diff options
| author | 2022-01-20 20:41:41 -0800 | |
|---|---|---|
| committer | 2022-01-20 20:41:41 -0800 | |
| commit | 79cad7881cc781adbc0217a4e825a1bd5f5a414b (patch) | |
| tree | 66b8b930ad3baf4e821fdb44cba075547f945004 | |
| parent | 040e6899941e9c285e99f370e42cd983f11e0b0f (diff) | |
Remove IMMS#MSG_UNBIND_INPUT
This CL inlines
InputMethodManagerService#MSG_UNBIND_INPUT
handler as it has always been executed from the calling thread.
There should be no observable behavior change.
Bug: 215609403
Test: presubmit
Change-Id: Ic0bc0768bf6d42b84c2e36353c822f748508e838
| -rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodManagerService.java | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index bfe2c2a1c907..16794217bbc7 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -221,7 +221,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub private static final int MSG_SHOW_IM_SUBTYPE_PICKER = 1; private static final int MSG_SHOW_IM_CONFIG = 3; - private static final int MSG_UNBIND_INPUT = 1000; private static final int MSG_BIND_INPUT = 1010; private static final int MSG_SHOW_SOFT_INPUT = 1020; private static final int MSG_HIDE_SOFT_INPUT = 1030; @@ -2201,8 +2200,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mBoundToMethod = false; IInputMethod curMethod = getCurMethodLocked(); if (curMethod != null) { - executeOrSendMessage(curMethod, mCaller.obtainMessageO( - MSG_UNBIND_INPUT, curMethod)); + try { + curMethod.unbindInput(); + } catch (RemoteException e) { + // There is nothing interesting about the method dying. + } } } mCurClient = null; @@ -2248,8 +2250,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mBoundToMethod = false; IInputMethod curMethod = getCurMethodLocked(); if (curMethod != null) { - executeOrSendMessage(curMethod, mCaller.obtainMessageO( - MSG_UNBIND_INPUT, curMethod)); + try { + curMethod.unbindInput(); + } catch (RemoteException e) { + // There is nothing interesting about the method dying. + } } } @@ -4222,13 +4227,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub // --------------------------------------------------------- - case MSG_UNBIND_INPUT: - try { - ((IInputMethod)msg.obj).unbindInput(); - } catch (RemoteException e) { - // There is nothing interesting about the method dying. - } - return true; case MSG_BIND_INPUT: args = (SomeArgs)msg.obj; try { |