summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2016-02-16 17:07:57 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-02-18 12:10:30 -0800
commit6dc6966659c069ad716693d80d043d129f476ec4 (patch)
tree944504fae937c015edeec2a00e453525020656fd
parent3bc505f8610574da143626de6032ddc046eeec9a (diff)
downloadframeworks_base-6dc6966659c069ad716693d80d043d129f476ec4.zip
frameworks_base-6dc6966659c069ad716693d80d043d129f476ec4.tar.gz
frameworks_base-6dc6966659c069ad716693d80d043d129f476ec4.tar.bz2
services: Fix publishing of ime tile.
The tile would previously only appear on devices which didn't have a navigation bar unless the user reset their tiles from edit which would trigger it to strangly appear. Fix interaction by relying on the same mechanism as notifying via the other indicators. Change-Id: I644b4c5305b647f985584d651a31215d103cf425 TICKET: CYNGNOS-1991
-rw-r--r--services/core/java/com/android/server/InputMethodManagerService.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index 4f9f972..6e7a750 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -1836,8 +1836,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
com.android.internal.R.string.select_input_method,
mImeSwitcherNotification.build(), UserHandle.ALL);
mNotificationShown = true;
- publishImeSelectorCustomTile(imi);
}
+ publishImeSelectorCustomTile(imi);
} else {
if (mNotificationShown && mNotificationManager != null) {
if (DEBUG) {
@@ -1846,8 +1846,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
mNotificationManager.cancelAsUser(null,
com.android.internal.R.string.select_input_method, UserHandle.ALL);
mNotificationShown = false;
- unpublishImeSelectorCustomTile();
}
+ unpublishImeSelectorCustomTile();
}
} finally {
Binder.restoreCallingIdentity(ident);
@@ -3633,9 +3633,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
imi = mMethodMap.get(mCurMethodId);
}
}
- final boolean hasInputMethod = isIMEVisible && imi != null && mCurrentSubtype != null;
- boolean enabled = hasInputMethod;
- if (enabled) {
+ if (shouldShowImeSwitcherLocked(isIMEVisible ? 1 : 0)) {
publishImeSelectorCustomTile(imi);
} else {
unpublishImeSelectorCustomTile();