From 3d46bab02978df14354379c4b10d7f68c3b80771 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Fri, 30 May 2014 18:10:18 +0900 Subject: [PATCH] Rebuild the enabled IMEs list when changed in Settings page With this CL, the input method switching controller is notified even when the list of enabled IMEs is changed by System Settings. Ideally we should hook every setter method in InputMethodSettings to ensure that InputMethodSettings and InputMethodSubtypeSwitchingController can share the same list. Until then, most of user visible weirdness should disappear with this CL. BUG: 15299968 Change-Id: Ie41da226d71b58d2e12057f85e4793b35e8b9f23 --- .../com/android/server/InputMethodManagerService.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java index fb69c865cd603..3a8f7676653ae 100644 --- a/services/core/java/com/android/server/InputMethodManagerService.java +++ b/services/core/java/com/android/server/InputMethodManagerService.java @@ -1681,6 +1681,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mCurMethodId = null; unbindCurrentMethodLocked(true, false); } + // Here is not the perfect place to reset the switching controller. Ideally + // mSwitchingController and mSettings should be able to share the same state. + // TODO: Make sure that mSwitchingController and mSettings are sharing the + // the same enabled IMEs list. + mSwitchingController.resetCircularListLocked(mContext); } /* package */ void setInputMethodLocked(String id, int subtypeId) { @@ -2650,7 +2655,10 @@ public class InputMethodManagerService extends IInputMethodManager.Stub setInputMethodEnabledLocked(defaultImiId, true); } } - + // Here is not the perfect place to reset the switching controller. Ideally + // mSwitchingController and mSettings should be able to share the same state. + // TODO: Make sure that mSwitchingController and mSettings are sharing the + // the same enabled IMEs list. mSwitchingController.resetCircularListLocked(mContext); }