Merge "Fix teardown of secondary connections on CDMA" into ics-mr1
diff --git a/core/java/android/server/BluetoothAdapterStateMachine.java b/core/java/android/server/BluetoothAdapterStateMachine.java
index 8ec79e2..f617d95 100644
--- a/core/java/android/server/BluetoothAdapterStateMachine.java
+++ b/core/java/android/server/BluetoothAdapterStateMachine.java
@@ -528,7 +528,7 @@
                     }
 
                     // we turn all the way to PowerOff with AIRPLANE_MODE_ON
-                    if (message.what == AIRPLANE_MODE_ON) {
+                    if (message.what == AIRPLANE_MODE_ON || mBluetoothService.isAirplaneModeOn()) {
                         // We inform all the per process callbacks
                         allProcessesCallback(false);
                         deferMessage(obtainMessage(AIRPLANE_MODE_ON));
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index 94fbbc8..fecc8f9 100755
--- a/core/java/android/server/BluetoothService.java
+++ b/core/java/android/server/BluetoothService.java
@@ -1706,7 +1706,7 @@
     }
 
     /* Returns true if airplane mode is currently on */
-    private final boolean isAirplaneModeOn() {
+    /*package*/ final boolean isAirplaneModeOn() {
         return Settings.System.getInt(mContext.getContentResolver(),
                 Settings.System.AIRPLANE_MODE_ON, 0) == 1;
     }
diff --git a/docs/html/design/get-started/principles.html b/docs/html/design/get-started/principles.html
index c564e5c..0d9ef20 100644
--- a/docs/html/design/get-started/principles.html
+++ b/docs/html/design/get-started/principles.html
@@ -147,8 +147,9 @@
   <div class="layout-content-col span-7">
 
 <h4>Let me make it mine</h4>
-<p>Let people add a personal touch because it helps them feel at home and in control. Think about
-subtle ways to offer personalization while providing sensible and beautiful default functionality.</p>
+<p>People love to add personal touches because it helps them feel at home and in control. Provide
+sensible, beautiful defaults, but also consider fun, optional customizations that don't hinder
+primary tasks.</p>
 
   </div>
   <div class="layout-content-col span-6">
diff --git a/docs/html/design/static/content/principles_decide_for_me.png b/docs/html/design/static/content/principles_decide_for_me.png
index 65911bc..2d8b883 100644
--- a/docs/html/design/static/content/principles_decide_for_me.png
+++ b/docs/html/design/static/content/principles_decide_for_me.png
Binary files differ
diff --git a/docs/html/design/static/content/principles_make_it_mine.png b/docs/html/design/static/content/principles_make_it_mine.png
index 3b63238..683a0b7 100644
--- a/docs/html/design/static/content/principles_make_it_mine.png
+++ b/docs/html/design/static/content/principles_make_it_mine.png
Binary files differ
diff --git a/docs/html/design/static/default.css b/docs/html/design/static/default.css
index 20fefad..42ab527 100644
--- a/docs/html/design/static/default.css
+++ b/docs/html/design/static/default.css
@@ -279,8 +279,7 @@
       background: rgba(0, 0, 0, 0.03); }
   #nav #back-dac-section {
     padding: 10px;
-    border-top: 1px solid #ddd;
-    background: transparent url(open_new_page.png) no-repeat scroll 139px 9px; }
+    border-top: 1px solid #ddd; }
     #nav #back-dac-section a {
       color: #333333;
       font-weight: 500;
@@ -569,4 +568,4 @@
     height: 12px;
     margin-right: 8px; }
   .video-instructions:after {
-    content: 'Click or move mouse over screenshot to replay movie.'; }
+    content: 'Click to replay movie.'; }
diff --git a/docs/html/design/static/default.js b/docs/html/design/static/default.js
index 26848e6..6721ab8 100644
--- a/docs/html/design/static/default.js
+++ b/docs/html/design/static/default.js
@@ -125,7 +125,8 @@
   });
 
   // Set up play-on-hover <video> tags.
-  $('video.play-on-hover').bind('mouseenter click', function(){
+  $('video.play-on-hover').bind('click', function(){
+    $(this).get(0).load(); // in case the video isn't seekable
     $(this).get(0).play();
   });
 
diff --git a/docs/html/guide/topics/manifest/uses-sdk-element.jd b/docs/html/guide/topics/manifest/uses-sdk-element.jd
index b371f34..99c91f6 100644
--- a/docs/html/guide/topics/manifest/uses-sdk-element.jd
+++ b/docs/html/guide/topics/manifest/uses-sdk-element.jd
@@ -60,7 +60,7 @@
   attribute, the system assumes a default value of "1", which indicates that your
   application is compatible with all versions of Android. If your application is
   <em>not</em> compatible with all versions (for instance, it uses APIs introduced
-  in API Level 3) and you have not declared the proper <code>android:minSdkVersion</code>,
+  in API Level 3) and you have not declared the proper <code>minSdkVersion</code>,
   then when installed on a system with an API Level less than 3, the application
   will crash during runtime when attempting to access the unavailable APIs. For
   this reason, be certain to declare the appropriate API Level in the
@@ -68,18 +68,32 @@
   </dd>
 
   <dt><a name="target"></a>{@code android:targetSdkVersion}</dt>
-  <dd>An integer designating the API Level that the application is targetting.
+  <dd>An integer designating the API Level that the application targets. If not set, the default
+value equals that given to {@code minSdkVersion}.
 
-  <p>With this attribute set, the application says that it is able to run on
-  older versions (down to {@code minSdkVersion}), but was explicitly tested to
-  work with the version specified here. Specifying this target version allows the
-  platform to disable compatibility settings that are not required for the target
-  version (which may otherwise be turned on in order to maintain
-  forward-compatibility) or enable newer features that are not available to older
-  applications. This does not mean that you can program different features for
-  different versions of the platform&mdash;it simply informs the platform that you
-  have tested against the target version and the platform should not perform any
-  extra work to maintain forward-compatibility with the target version.</p>
+  <p>This attribute informs the system that you have tested against the target version and the
+system should not enable any compatibility behaviors to maintain your app's forward-compatibility
+with the target version. The application is still able to run on older versions (down to {@code
+minSdkVersion}).</p>
+
+  <p>As Android evolves with each new version, some behaviors and even appearances might change.
+However, if the API level of the platform is higher than the version declared by your app's {@code
+targetSdkVersion}, the system may enable compatibility behaviors to ensure that your app
+continues to work the way you expect. You can disable such compatibility
+behaviors by specifying {@code targetSdkVersion} to match the API
+level of the platform on which it's running. For example, setting this value to "11" or higher
+allows the system to apply a new default theme (Holo) to your app when running on Android 3.0 or
+higher and also disables <a href="{@docRoot}guide/practices/screen-compat-mode.html">screen
+compatibility mode</a> when running on larger screens (because support for API level 11 implicitly
+supports larger screens).</p>
+
+  <p>There are many compatibility behaviors that the system may enable based on the value you set
+for this attribute. Several of these behaviors are described by the corresponding platform versions
+in the {@link android.os.Build.VERSION_CODES} reference.</p>
+
+  <p>To maintain your application along with each Android release, you should increase
+the value of this attribute to match the latest API level, then thoroughly test your application on
+the corresponding platform version.</p>
 
   <p>Introduced in: API Level 4</p>
   </dd>
@@ -89,25 +103,25 @@
   designed to run. 
 
   <p>In Android 1.5, 1.6, 2.0, and 2.0.1, the system checks the value of this
-  attribute when installing an application and when revalidating the application
+  attribute when installing an application and when re-validating the application
   after a system update. In either case, if the application's
-  <code>android:maxSdkVersion</code> attribute is lower than the API Level used by
+  <code>maxSdkVersion</code> attribute is lower than the API Level used by
   the system itself, then the system will not allow the application to be
-  installed. In the case of revalidation after system update, this effectively
+  installed. In the case of re-validation after system update, this effectively
   removes your application from the device.
 
   <p>To illustrate how this attribute can affect your application after system
   updates, consider the following example: </p>
 
-  <p>An application declaring <code>android:maxSdkVersion="5"</code> in its
+  <p>An application declaring <code>maxSdkVersion="5"</code> in its
   manifest is published on Android Market. A user whose device is running Android
   1.6 (API Level 4) downloads and installs the app. After a few weeks, the user
   receives an over-the-air system update to Android 2.0 (API Level 5). After the
   update is installed, the system checks the application's
-  <code>android:maxSdkVersion</code> and successfully revalidates it. The
+  <code>maxSdkVersion</code> and successfully re-validates it. The
   application functions as normal. However, some time later, the device receives
   another system update, this time to Android 2.0.1 (API Level 6). After the
-  update, the system can no longer revalidate the application because the system's
+  update, the system can no longer re-validate the application because the system's
   own API Level (6) is now higher than the maximum supported by the application
   (5). The system prevents the application from being visible to the user, in
   effect removing it from the device.</p>
@@ -120,7 +134,7 @@
   provided it uses only standard APIs and follows development best practices.
   Second, note that in some cases, declaring the attribute can <strong>result in
   your application being removed from users' devices after a system
-  update</strong> to a higher API Level. Most devices on which your appplication
+  update</strong> to a higher API Level. Most devices on which your application
   is likely to be installed will receive periodic system updates over the air, so
   you should consider their effect on your application before setting this
   attribute.</p>
@@ -128,8 +142,8 @@
   <p style="margin-bottom:1em;">Introduced in: API Level 4</p>
 
   <div class="special">Future versions of Android (beyond Android 2.0.1) will no
-longer check or enforce the <code>android:maxSdkVersion</code> attribute during
-installation or revalidation. Android Market will continue to use the attribute
+longer check or enforce the <code>maxSdkVersion</code> attribute during
+installation or re-validation. Android Market will continue to use the attribute
 as a filter, however, when presenting users with applications available for
 download. </div>
   </dd>
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 53c59e7..9197b5d 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -11,8 +11,10 @@
                             </div><!-- end homeTitle -->
                             <div id="announcement-block">
                             <!-- total max width is 520px -->
+                                <a href="{@docRoot}design/index.html">
                                   <img src="{@docRoot}images/home/android-design.png"
 alt="Android Design" width="160px" style="padding:10px 33px 5px"/>
+                                </a>
                                   <div id="announcement" style="width:275px">
     <p>Introducing <b>Android Design</b>: The place to learn about principles, building blocks, and patterns
       for creating world-class Android user interfaces. Whether you're a UI professional or a developer
diff --git a/libs/rs/scriptc/rs_allocation.rsh b/libs/rs/scriptc/rs_allocation.rsh
index 154a099..1cb3a99 100644
--- a/libs/rs/scriptc/rs_allocation.rsh
+++ b/libs/rs/scriptc/rs_allocation.rsh
@@ -14,6 +14,31 @@
  * limitations under the License.
  */
 
+/*! \mainpage notitle
+ *
+ * Renderscript is a high-performance runtime that provides graphics rendering and
+ * compute operations at the native level. Renderscript code is compiled on devices
+ * at runtime to allow platform-independence as well.
+ * This reference documentation describes the Renderscript runtime APIs, which you
+ * can utilize to write Renderscript code in C99. The Renderscript header
+ * files are automatically included for you, except for the rs_graphics.rsh header. If
+ * you are doing graphics rendering, include the graphics header file like this:
+ *
+ * <code>#include "rs_graphics.rsh"</code>
+ *
+ * To use Renderscript, you need to utilize the Renderscript runtime APIs documented here
+ * as well as the Android framework APIs for Renderscript.
+ * For documentation on the Android framework APIs, see the <a href=
+ * "http://developer.android.com/reference/android/renderscript/package-summary.html">
+ * android.renderscript</a> package reference.
+ * For more information on how to develop with Renderscript and how the runtime and
+ * Android framework APIs interact, see the <a href=
+ * "http://developer.android.com/guide/topics/renderscript/index.html">Renderscript
+ * developer guide</a> and the <a href=
+ * "http://developer.android.com/resources/samples/RenderScript/index.html">
+ * Renderscript samples</a>.
+ */
+
 /** @file rs_allocation.rsh
  *  \brief Allocation routines
  *
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml
index 46f4c39..c9b1673 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml
@@ -25,120 +25,167 @@
     android:background="@drawable/notify_panel_clock_bg"
     >
 
-    <LinearLayout
+    <TableLayout
         android:id="@+id/icons"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_alignParentLeft="true"
         android:layout_alignParentBottom="true"
-        android:baselineAlignedChildIndex="0"
         android:layout_marginLeft="16dp"
         android:layout_marginTop="16dp"
         android:layout_marginBottom="16dp"
+        android:shrinkColumns="2,4"
+        android:stretchColumns="7"
         >
+        <TableRow>
 
-        <ImageView
-            android:id="@+id/bluetooth"
-            android:layout_height="wrap_content"
-            android:layout_width="wrap_content"
-            android:scaleType="centerInside"
-            android:baseline="18dp"
-            android:visibility="gone"
-            android:contentDescription="@null"
-            />
-
-        <FrameLayout
-            android:id="@+id/netwerk"
-            android:layout_height="wrap_content"
-            android:layout_width="wrap_content"
-            android:layout_marginRight="4dp"
-            >
-
-            <ImageView
-                android:id="@+id/network_signal"
+            <!-- to keep the column ids stable we wrap disappearing views in
+                 frames -->
+            <FrameLayout
                 android:layout_height="wrap_content"
                 android:layout_width="wrap_content"
-                android:contentDescription="@null"
+                >
+                <ImageView
+                    android:id="@+id/bluetooth"
+                    android:layout_height="wrap_content"
+                    android:layout_width="wrap_content"
+                    android:scaleType="centerInside"
+                    android:visibility="gone"
+                    android:contentDescription="@null"
+                    android:layout_gravity="center_vertical"
+                    />
+            </FrameLayout>
+
+            <!-- mobile data -->
+            <FrameLayout
+                android:id="@+id/mobile_icon"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:paddingRight="4dp"
+                android:layout_gravity="center_vertical"
+                >
+
+                <ImageView
+                    android:id="@+id/mobile_signal"
+                    android:layout_height="wrap_content"
+                    android:layout_width="wrap_content"
+                    android:contentDescription="@null"
+                    />
+
+                <ImageView
+                    android:id="@+id/mobile_type"
+                    android:layout_height="wrap_content"
+                    android:layout_width="wrap_content"
+                    android:contentDescription="@null"
+                    />
+
+            </FrameLayout>
+            <TextView
+                android:id="@+id/mobile_text"
+                style="@style/StatusBarNotificationText"
+                android:layout_gravity="left|center_vertical"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:paddingRight="8dp"
+                android:layout_weight="1"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:text="@string/status_bar_settings_settings_button"
+                />
+
+            <!-- wifi -->
+            <FrameLayout
+                android:id="@+id/wifi_icon"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:paddingRight="4dp"
+                android:layout_gravity="center_vertical"
+                >
+
+                <ImageView
+                    android:id="@+id/wifi_signal"
+                    android:layout_height="wrap_content"
+                    android:layout_width="wrap_content"
+                    android:contentDescription="@null"
+                    />
+
+                <ImageView
+                    android:id="@+id/wifi_direction"
+                    android:layout_height="wrap_content"
+                    android:layout_width="wrap_content"
+                    android:contentDescription="@null"
+                    />
+
+            </FrameLayout>
+            <TextView
+                android:id="@+id/wifi_text"
+                style="@style/StatusBarNotificationText"
+                android:layout_gravity="left|center_vertical"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:paddingRight="8dp"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:text="@string/status_bar_settings_settings_button"
                 />
 
             <ImageView
-                android:id="@+id/network_type"
+                android:id="@+id/battery"
                 android:layout_height="wrap_content"
                 android:layout_width="wrap_content"
+                android:scaleType="centerInside"
+                android:layout_gravity="center_vertical"
+                android:layout_alignBaseline="@id/wifi_signal"
+                android:paddingLeft="8dp"
+                android:paddingRight="8dp"
                 android:contentDescription="@null"
                 />
 
-            <ImageView
-                android:id="@+id/network_direction"
+            <TextView
+                android:id="@+id/battery_text"
+                style="@style/StatusBarNotificationText"
+                android:layout_width="56dp"
                 android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:contentDescription="@null"
+                android:layout_gravity="left|center_vertical"
+                android:paddingRight="8dp"
+                android:singleLine="true"
+                android:text="@string/status_bar_settings_settings_button"
                 />
 
-        </FrameLayout>
-            
-        <TextView
-            android:id="@+id/network_text"
-            style="@style/StatusBarNotificationText"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_toRightOf="@id/netwerk"
-            android:layout_marginRight="8dp"
-            android:layout_alignBaseline="@id/network_signal"
-            android:singleLine="true"
-            android:text="@string/status_bar_settings_settings_button"
-            />
+            <!-- this will stretch to eat up available space -->
+            <View
+                android:layout_width="0dp"
+                android:layout_height="0dp"
+                />
 
-        <ImageView
-            android:id="@+id/battery"
-            android:layout_height="wrap_content"
-            android:layout_width="wrap_content"
-            android:scaleType="centerInside"
-            android:layout_toRightOf="@id/network_text"
-            android:layout_alignBaseline="@id/network_signal"
-            android:baseline="18dp"
-            android:layout_marginLeft="8dp"
-            android:layout_marginRight="8dp"
-            android:contentDescription="@null"
-            />
+            <FrameLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                >
 
-        <TextView
-            android:id="@+id/battery_text"
-            style="@style/StatusBarNotificationText"
-            android:layout_width="56dp"
-            android:layout_height="wrap_content"
-            android:layout_toRightOf="@id/battery"
-            android:layout_alignBaseline="@id/battery"
-            android:layout_marginRight="8dp"
-            android:singleLine="true"
-            android:text="@string/status_bar_settings_settings_button"
-            />
-    </LinearLayout>
+                <ImageView
+                    android:id="@+id/settings_button"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:paddingRight="16dp"
+                    android:src="@drawable/ic_sysbar_quicksettings"
+                    android:contentDescription="@string/accessibility_settings_button"
+                    />
 
-    <ImageView
-        android:id="@+id/settings_button"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignBaseline="@id/icons"
-        android:layout_alignParentRight="true"
-        android:paddingRight="16dp"
-        android:src="@drawable/ic_sysbar_quicksettings"
-        android:baseline="21dp"
-        android:contentDescription="@string/accessibility_settings_button"
-        />
+                <ImageView
+                    android:id="@+id/notification_button"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:paddingRight="16dp"
+                    android:src="@drawable/ic_notification_open"
+                    android:visibility="invisible"
+                    android:contentDescription="@string/accessibility_notifications_button"
+                    />
+            </FrameLayout>
 
-    <ImageView
-        android:id="@+id/notification_button"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignBaseline="@id/icons"
-        android:layout_alignParentRight="true"
-        android:paddingRight="16dp"
-        android:src="@drawable/ic_notification_open"
-        android:baseline="21dp"
-        android:visibility="invisible"
-        android:contentDescription="@string/accessibility_notifications_button"
-        />
+        </TableRow>
+    </TableLayout>
 
     <com.android.systemui.statusbar.tablet.HoloClock
         android:id="@+id/clock"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index 135a04c..d9114a5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -135,7 +135,9 @@
     ArrayList<ImageView> mWimaxIconViews = new ArrayList<ImageView>();
     ArrayList<ImageView> mCombinedSignalIconViews = new ArrayList<ImageView>();
     ArrayList<ImageView> mDataTypeIconViews = new ArrayList<ImageView>();
-    ArrayList<TextView> mLabelViews = new ArrayList<TextView>();
+    ArrayList<TextView> mCombinedLabelViews = new ArrayList<TextView>();
+    ArrayList<TextView> mMobileLabelViews = new ArrayList<TextView>();
+    ArrayList<TextView> mWifiLabelViews = new ArrayList<TextView>();
     ArrayList<SignalCluster> mSignalClusters = new ArrayList<SignalCluster>();
     int mLastPhoneSignalIconId = -1;
     int mLastDataDirectionIconId = -1;
@@ -144,7 +146,7 @@
     int mLastWimaxIconId = -1;
     int mLastCombinedSignalIconId = -1;
     int mLastDataTypeIconId = -1;
-    String mLastLabel = "";
+    String mLastCombinedLabel = "";
 
     private boolean mHasMobileDataFeature;
 
@@ -257,8 +259,16 @@
         mDataTypeIconViews.add(v);
     }
 
-    public void addLabelView(TextView v) {
-        mLabelViews.add(v);
+    public void addCombinedLabelView(TextView v) {
+        mCombinedLabelViews.add(v);
+    }
+
+    public void addMobileLabelView(TextView v) {
+        mMobileLabelViews.add(v);
+    }
+
+    public void addWifiLabelView(TextView v) {
+        mWifiLabelViews.add(v);
     }
 
     public void addSignalCluster(SignalCluster cluster) {
@@ -873,11 +883,16 @@
 
         int combinedSignalIconId = 0;
         int combinedActivityIconId = 0;
-        String label = "";
+        String combinedLabel = "";
+        String wifiLabel = "";
+        String mobileLabel = "";
         int N;
 
         if (mDataConnected) {
-            label = mNetworkName;
+            mobileLabel = mNetworkName;
+            if (DEBUG) {
+                mobileLabel += "yyyyYYYYyyyyYYYY";
+            }
             combinedSignalIconId = mDataSignalIconId;
             switch (mDataActivity) {
                 case TelephonyManager.DATA_ACTIVITY_IN:
@@ -894,6 +909,7 @@
                     break;
             }
 
+            combinedLabel = mobileLabel;
             combinedActivityIconId = mMobileActivityIconId;
             combinedSignalIconId = mDataSignalIconId; // set by updateDataIcon()
             mContentDescriptionCombinedSignal = mContentDescriptionDataType;
@@ -901,10 +917,13 @@
 
         if (mWifiConnected) {
             if (mWifiSsid == null) {
-                label = context.getString(R.string.status_bar_settings_signal_meter_wifi_nossid);
+                wifiLabel = context.getString(R.string.status_bar_settings_signal_meter_wifi_nossid);
                 mWifiActivityIconId = 0; // no wifis, no bits
             } else {
-                label = mWifiSsid;
+                wifiLabel = mWifiSsid;
+                if (DEBUG) {
+                    wifiLabel += "xxxxXXXXxxxxXXXX";
+                }
                 switch (mWifiActivity) {
                     case WifiManager.DATA_ACTIVITY_IN:
                         mWifiActivityIconId = R.drawable.stat_sys_wifi_in;
@@ -922,12 +941,13 @@
             }
 
             combinedActivityIconId = mWifiActivityIconId;
+            combinedLabel = wifiLabel;
             combinedSignalIconId = mWifiIconId; // set by updateWifiIcons()
             mContentDescriptionCombinedSignal = mContentDescriptionWifi;
         }
 
         if (mBluetoothTethered) {
-            label = mContext.getString(R.string.bluetooth_tethered);
+            combinedLabel = mContext.getString(R.string.bluetooth_tethered);
             combinedSignalIconId = mBluetoothTetherIconId;
             mContentDescriptionCombinedSignal = mContext.getString(
                     R.string.accessibility_bluetooth_tether);
@@ -945,7 +965,8 @@
 
             // combined values from connected wifi take precedence over airplane mode
             if (!mWifiConnected) {
-                label = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
+                wifiLabel = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
+                combinedLabel = wifiLabel;
                 mContentDescriptionCombinedSignal = mContentDescriptionPhoneSignal;
                 combinedSignalIconId = mDataSignalIconId;
             }
@@ -953,7 +974,7 @@
         else if (!mDataConnected && !mWifiConnected && !mBluetoothTethered && !mWimaxConnected) {
             // pretty much totally disconnected
 
-            label = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
+            combinedLabel = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
             // On devices without mobile radios, we want to show the wifi icon
             combinedSignalIconId =
                 mHasMobileDataFeature ? mDataSignalIconId : mWifiIconId;
@@ -1028,7 +1049,7 @@
             for (int i=0; i<N; i++) {
                 final ImageView v = mWifiIconViews.get(i);
                 if (mWifiIconId == 0) {
-                    v.setVisibility(View.INVISIBLE);
+                    v.setVisibility(View.GONE);
                 } else {
                     v.setVisibility(View.VISIBLE);
                     v.setImageResource(mWifiIconId);
@@ -1044,7 +1065,7 @@
             for (int i=0; i<N; i++) {
                 final ImageView v = mWimaxIconViews.get(i);
                 if (mWimaxIconId == 0) {
-                    v.setVisibility(View.INVISIBLE);
+                    v.setVisibility(View.GONE);
                 } else {
                     v.setVisibility(View.VISIBLE);
                     v.setImageResource(mWimaxIconId);
@@ -1070,7 +1091,7 @@
             for (int i=0; i<N; i++) {
                 final ImageView v = mDataTypeIconViews.get(i);
                 if (mDataTypeIconId == 0) {
-                    v.setVisibility(View.INVISIBLE);
+                    v.setVisibility(View.GONE);
                 } else {
                     v.setVisibility(View.VISIBLE);
                     v.setImageResource(mDataTypeIconId);
@@ -1089,7 +1110,7 @@
             for (int i=0; i<N; i++) {
                 final ImageView v = mDataDirectionOverlayIconViews.get(i);
                 if (combinedActivityIconId == 0) {
-                    v.setVisibility(View.INVISIBLE);
+                    v.setVisibility(View.GONE);
                 } else {
                     v.setVisibility(View.VISIBLE);
                     v.setImageResource(combinedActivityIconId);
@@ -1098,15 +1119,29 @@
             }
         }
 
-        // the label in the notification panel
-        if (!mLastLabel.equals(label)) {
-            mLastLabel = label;
-            N = mLabelViews.size();
+        // the combinedLabel in the notification panel
+        if (!mLastCombinedLabel.equals(combinedLabel)) {
+            mLastCombinedLabel = combinedLabel;
+            N = mCombinedLabelViews.size();
             for (int i=0; i<N; i++) {
-                TextView v = mLabelViews.get(i);
-                v.setText(label);
+                TextView v = mCombinedLabelViews.get(i);
+                v.setText(combinedLabel);
             }
         }
+
+        // wifi label
+        N = mWifiLabelViews.size();
+        for (int i=0; i<N; i++) {
+            TextView v = mWifiLabelViews.get(i);
+            v.setText(wifiLabel);
+        }
+        
+        // mobile label
+        N = mMobileLabelViews.size();
+        for (int i=0; i<N; i++) {
+            TextView v = mMobileLabelViews.get(i);
+            v.setText(mobileLabel);
+        }
     }
 
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
@@ -1220,8 +1255,8 @@
         pw.print(Integer.toHexString(mLastDataTypeIconId));
         pw.print("/");
         pw.println(getResourceName(mLastDataTypeIconId));
-        pw.print("  mLastLabel=");
-        pw.print(mLastLabel);
+        pw.print("  mLastCombinedLabel=");
+        pw.print(mLastCombinedLabel);
         pw.println("");
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
index 510fd3b..8e58649 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
@@ -316,8 +316,8 @@
 
     public void updatePanelModeButtons() {
         final boolean settingsVisible = (mSettingsView != null);
-        mSettingsButton.setVisibility(!settingsVisible ? View.VISIBLE : View.INVISIBLE);
-        mNotificationButton.setVisibility(settingsVisible ? View.VISIBLE : View.INVISIBLE);
+        mSettingsButton.setVisibility(!settingsVisible ? View.VISIBLE : View.GONE);
+        mNotificationButton.setVisibility(settingsVisible ? View.VISIBLE : View.GONE);
     }
 
     public boolean isInContentArea(int x, int y) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 05ad793..6913239 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -218,11 +218,6 @@
 
         // network icons: either a combo icon that switches between mobile and data, or distinct
         // mobile and data icons
-        final ImageView comboRSSI = 
-                (ImageView)mNotificationPanel.findViewById(R.id.network_signal);
-        if (comboRSSI != null) {
-            mNetworkController.addCombinedSignalIconView(comboRSSI);
-        }
         final ImageView mobileRSSI = 
                 (ImageView)mNotificationPanel.findViewById(R.id.mobile_signal);
         if (mobileRSSI != null) {
@@ -233,14 +228,14 @@
         if (wifiRSSI != null) {
             mNetworkController.addWifiIconView(wifiRSSI);
         }
+        mNetworkController.addWifiLabelView(
+                (TextView)mNotificationPanel.findViewById(R.id.wifi_text));
 
         mNetworkController.addDataTypeIconView(
-                (ImageView)mNotificationPanel.findViewById(R.id.network_type));
-        mNetworkController.addDataDirectionOverlayIconView(
-                (ImageView)mNotificationPanel.findViewById(R.id.network_direction));
-        mNetworkController.addLabelView(
-                (TextView)mNotificationPanel.findViewById(R.id.network_text));
-        mNetworkController.addLabelView(
+                (ImageView)mNotificationPanel.findViewById(R.id.mobile_type));
+        mNetworkController.addMobileLabelView(
+                (TextView)mNotificationPanel.findViewById(R.id.mobile_text));
+        mNetworkController.addCombinedLabelView(
                 (TextView)mBarContents.findViewById(R.id.network_text));
 
         mStatusBarView.setIgnoreChildren(0, mNotificationTrigger, mNotificationPanel);
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
index b4b82aa..d7041fc 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
@@ -583,8 +583,7 @@
      * through mHandler, this *must* be called from the UI thread.
      */
     public void reportSimUnlocked() {
-        mSimState = IccCard.State.READY;
-        handleSimStateChange(new SimArgs(mSimState));
+        handleSimStateChange(new SimArgs(IccCard.State.READY));
     }
 
     public boolean isKeyguardBypassEnabled() {
diff --git a/services/java/com/android/server/connectivity/Vpn.java b/services/java/com/android/server/connectivity/Vpn.java
index 72cf512..a76e70f 100644
--- a/services/java/com/android/server/connectivity/Vpn.java
+++ b/services/java/com/android/server/connectivity/Vpn.java
@@ -322,7 +322,7 @@
                     .setContentTitle(title)
                     .setContentText(text)
                     .setContentIntent(VpnConfig.getIntentForStatusPanel(mContext, config))
-                    .setDefaults(Notification.DEFAULT_ALL)
+                    .setDefaults(0)
                     .setOngoing(true)
                     .getNotification();
             nm.notify(R.drawable.vpn_connected, notification);