summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/InputMethodManagerService.java
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2013-03-12 14:12:39 -0700
committerCraig Mautner <cmautner@google.com>2013-03-12 14:44:59 -0700
commit274323ce8fa11e39ba66e9874c0a576e58046b1b (patch)
treeedd43b111f112b93f5b337bb96dfaad37189a43e /services/java/com/android/server/InputMethodManagerService.java
parent93f99846df1e00f115c8870eab6ef3df54d1ec6a (diff)
Remove old show/hide messages on new ime (DO NOT MERGE)
The previous show/hide messages in the queue were still trying to be honored even after a new ime was attached. Fixes bug 8263462. Change-Id: Iee60dbd1d58542f73aedeac5ccb54cddeb5d5dfe
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
-rw-r--r--services/java/com/android/server/InputMethodManagerService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 6ba5cffcaa66..01f75449c430 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1243,6 +1243,10 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
unbindCurrentMethodLocked(false, false);
return;
}
+ // Remove commands relating to the previous service. Otherwise WindowManagerService
+ // will reject the command because the token attached to these messages is invalid.
+ mCaller.removeMessages(MSG_SHOW_SOFT_INPUT);
+ mCaller.removeMessages(MSG_HIDE_SOFT_INPUT);
if (DEBUG) Slog.v(TAG, "Initiating attach with token: " + mCurToken);
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
MSG_ATTACH_TOKEN, mCurMethod, mCurToken));