Merge "Hide navigation buttons when they are DISABLEd."
diff --git a/core/java/android/server/BluetoothHealthProfileHandler.java b/core/java/android/server/BluetoothHealthProfileHandler.java
index 2d80de4..1d8afe3 100644
--- a/core/java/android/server/BluetoothHealthProfileHandler.java
+++ b/core/java/android/server/BluetoothHealthProfileHandler.java
@@ -77,16 +77,6 @@
              mConfig = config;
              mState = BluetoothHealth.STATE_CHANNEL_DISCONNECTED;
         }
-
-        @Override
-        public int hashCode() {
-            int result = 17;
-            result = 31 * result + (mChannelPath == null ? 0 : mChannelPath.hashCode());
-            result = 31 * result + mDevice.hashCode();
-            result = 31 * result + mConfig.hashCode();
-            result = 31 * result + mChannelType;
-            return result;
-        }
     }
 
     private final Handler mHandler = new Handler() {
diff --git a/core/java/android/webkit/ZoomManager.java b/core/java/android/webkit/ZoomManager.java
index 0bfb668..7ca6aeb 100644
--- a/core/java/android/webkit/ZoomManager.java
+++ b/core/java/android/webkit/ZoomManager.java
@@ -651,6 +651,11 @@
             mTextWrapScale = newTextWrapScale;
             refreshZoomScale(true);
         } else if (!mInZoomOverview && willScaleTriggerZoom(getZoomOverviewScale())) {
+            // Reflow, if necessary.
+            if (mTextWrapScale > getReadingLevelScale()) {
+                mTextWrapScale = getReadingLevelScale();
+                refreshZoomScale(true);
+            }
             zoomToOverview();
         } else {
             zoomToReadingLevelOrMore();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java
index fd58174..fa8aa6d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java
@@ -102,7 +102,9 @@
             return true;
         } else if (nonAuxCount == 1 && auxCount == 1) {
             if (nonAuxSubtype != null && auxSubtype != null
-                    && nonAuxSubtype.getLocale().equals(auxSubtype.getLocale())
+                    && (nonAuxSubtype.getLocale().equals(auxSubtype.getLocale())
+                            || auxSubtype.overridesImplicitlyEnabledSubtype()
+                            || nonAuxSubtype.overridesImplicitlyEnabledSubtype())
                     && nonAuxSubtype.containsExtraValueKey(TAG_TRY_SUPPRESSING_IME_SWITCHER)) {
                 return false;
             }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java
index e406a0c..f793af9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java
@@ -218,8 +218,12 @@
 
     private View createInputMethodItem(
             final InputMethodInfo imi, final InputMethodSubtype subtype) {
-        final CharSequence subtypeName = subtype.overridesImplicitlyEnabledSubtype()
-                ? null : getSubtypeName(imi, subtype);
+        final CharSequence subtypeName;
+        if (subtype == null || subtype.overridesImplicitlyEnabledSubtype()) {
+            subtypeName = null;
+        } else {
+            subtypeName = getSubtypeName(imi, subtype);
+        }
         final CharSequence imiName = getIMIName(imi);
         final Drawable icon = getSubtypeIcon(imi, subtype);
         final View view = View.inflate(mContext, R.layout.status_bar_input_methods_item, null);
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index ab70d6c..146bc94 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1115,7 +1115,9 @@
                 return true;
             } else if (nonAuxCount == 1 && auxCount == 1) {
                 if (nonAuxSubtype != null && auxSubtype != null
-                        && nonAuxSubtype.getLocale().equals(auxSubtype.getLocale())
+                        && (nonAuxSubtype.getLocale().equals(auxSubtype.getLocale())
+                                || auxSubtype.overridesImplicitlyEnabledSubtype()
+                                || nonAuxSubtype.overridesImplicitlyEnabledSubtype())
                         && nonAuxSubtype.containsExtraValueKey(TAG_TRY_SUPPRESSING_IME_SWITCHER)) {
                     return false;
                 }