Only show IME in navigation bar when it should
Add a flag to indicate that the IME should be shown. This follows
the continuous ime notification boolean, and if there are multiple
input methods to choose from enabled. This way the notification
and navigation button show up under the same circumstances (but
not on the same devices).
Change-Id: Ia6a2253061f1876f4bcc511de48c1078e9d96be5
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index bbbe8fa..5362af5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -65,6 +65,8 @@
public static final int FLAG_EXCLUDE_INPUT_METHODS_PANEL = 1 << 3;
public static final int FLAG_EXCLUDE_COMPAT_MODE_PANEL = 1 << 4;
+ private static final String SHOW_IME_SWITCHER_KEY = "showImeSwitcherKey";
+
private StatusBarIconList mList;
private Callbacks mCallbacks;
private Handler mHandler = new H();
@@ -91,7 +93,8 @@
public void animateExpandSettingsPanel();
public void setSystemUiVisibility(int vis, int mask);
public void topAppWindowChanged(boolean visible);
- public void setImeWindowStatus(IBinder token, int vis, int backDisposition);
+ public void setImeWindowStatus(IBinder token, int vis, int backDisposition,
+ boolean showImeSwitcher);
public void setHardKeyboardStatus(boolean available, boolean enabled);
public void toggleRecentApps();
public void preloadRecentApps();
@@ -190,11 +193,13 @@
}
}
- public void setImeWindowStatus(IBinder token, int vis, int backDisposition) {
+ public void setImeWindowStatus(IBinder token, int vis, int backDisposition,
+ boolean showImeSwitcher) {
synchronized (mList) {
mHandler.removeMessages(MSG_SHOW_IME_BUTTON);
- mHandler.obtainMessage(MSG_SHOW_IME_BUTTON, vis, backDisposition, token)
- .sendToTarget();
+ Message m = mHandler.obtainMessage(MSG_SHOW_IME_BUTTON, vis, backDisposition, token);
+ m.getData().putBoolean(SHOW_IME_SWITCHER_KEY, showImeSwitcher);
+ m.sendToTarget();
}
}
@@ -298,7 +303,8 @@
mCallbacks.topAppWindowChanged(msg.arg1 != 0);
break;
case MSG_SHOW_IME_BUTTON:
- mCallbacks.setImeWindowStatus((IBinder) msg.obj, msg.arg1, msg.arg2);
+ mCallbacks.setImeWindowStatus((IBinder) msg.obj, msg.arg1, msg.arg2,
+ msg.getData().getBoolean(SHOW_IME_SWITCHER_KEY, false));
break;
case MSG_SET_HARD_KEYBOARD_STATUS:
mCallbacks.setHardKeyboardStatus(msg.arg1 != 0, msg.arg2 != 0);