summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/InputMethodManagerService.java
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-02-25 15:25:43 +0900
committerSatoshi Kataoka <satok@google.com>2013-02-25 16:11:36 +0900
commit7c4a2a12232d97fbc45f0be72efca9144a30cf75 (patch)
tree8b4d82150691762dbfcc170b6888e1ffdeda1715 /services/java/com/android/server/InputMethodManagerService.java
parentff4fcdb98c9575642c48f1daeafff4b257769e81 (diff)
downloadframeworks_base-7c4a2a12232d97fbc45f0be72efca9144a30cf75.zip
frameworks_base-7c4a2a12232d97fbc45f0be72efca9144a30cf75.tar.gz
frameworks_base-7c4a2a12232d97fbc45f0be72efca9144a30cf75.tar.bz2
Add a comment for secondary user handling in IMMS
This is a follow up change for I438daf996ba48cdb34f0a6 Bug: 8205725 Change-Id: Iae87580b7d56ed8badf548ac1830ddb12a051148
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
-rw-r--r--services/java/com/android/server/InputMethodManagerService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 6ba5cff..18a2b2b 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -785,10 +785,15 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
mFileManager = new InputMethodFileManager(mMethodMap, newUserId);
final String defaultImiId = mSettings.getSelectedInputMethod();
final boolean needsToResetDefaultIme = TextUtils.isEmpty(defaultImiId);
+ // For secondary users, the list of enabled IMEs may not have been updated since the
+ // callbacks to PackageMonitor are ignored for the secondary user. Here, defaultImiId may
+ // not be empty even if the IME has been uninstalled by the primary user.
+ // Even in such cases, IMMS works fine because it will find the most applicable
+ // IME for that user.
if (DEBUG) {
Slog.d(TAG, "Switch user: " + newUserId + " current ime = " + defaultImiId);
}
- resetAllInternalStateLocked(false /* updateOnlyWhenLocaleChanged */,
+ resetAllInternalStateLocked(false /* updateOnlyWhenLocaleChanged */,
needsToResetDefaultIme);
}