summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2022-01-21 07:42:17 -0800
committer Yohei Yukawa <yukawa@google.com> 2022-01-21 07:42:17 -0800
commit11c5c9cd8e1b15c1c5ee116bf24c598198beb182 (patch)
treeadea65f632ca3d7e68038f0f397b798e9353400d
parent4ae443d2ecc8cec15f10fb706e50875020054e29 (diff)
Remove IMMS#MSG_START_HANDWRITING
This CL inlines InputMethodManagerService#MSG_START_HANDWRITING handler as it has always been executed from the calling thread. There should be no observable behavior change. Bug: 215609403 Test: presubmit Change-Id: Ia28f7ed55e59d9cfda98338a2a94550a6a477102
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index acf88af730a1..5375cdcce282 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -225,7 +225,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
private static final int MSG_REMOVE_IME_SURFACE = 1060;
private static final int MSG_REMOVE_IME_SURFACE_FROM_WINDOW = 1061;
private static final int MSG_UPDATE_IME_WINDOW_STATUS = 1070;
- private static final int MSG_START_HANDWRITING = 1100;
private static final int MSG_START_INPUT = 2000;
@@ -3100,9 +3099,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
return;
}
if (DEBUG) Slog.v(TAG, "Client requesting Stylus Handwriting to be started");
- if (getCurMethodLocked() != null) {
- executeOrSendMessage(getCurMethodLocked(), mCaller.obtainMessageIO(
- MSG_START_HANDWRITING, ++mHwRequestId, getCurMethodLocked()));
+ final IInputMethod curMethod = getCurMethodLocked();
+ if (curMethod != null) {
+ try {
+ curMethod.canStartStylusHandwriting(++mHwRequestId);
+ } catch (RemoteException e) {
+ Slog.w(TAG, "RemoteException calling canStartStylusHandwriting(): ", e);
+ }
}
} finally {
Binder.restoreCallingIdentity(ident);
@@ -4420,13 +4423,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
return true;
}
- case MSG_START_HANDWRITING:
- try {
- (((IInputMethod) msg.obj)).canStartStylusHandwriting(msg.arg1);
- } catch (RemoteException e) {
- Slog.w(TAG, "RemoteException calling canStartStylusHandwriting(): ", e);
- }
- return true;
}
return false;
}