summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2024-07-25 09:38:33 -0700
committer Yohei Yukawa <yukawa@google.com> 2024-07-25 09:38:33 -0700
commitfca524fbb38b95ec4fa73e887e81ea4392c7960a (patch)
treeb3c721494ef745646ec0de9c933d7a7d6418c25b
parent325cdf6592e589cb613a6bd709ad925497228b21 (diff)
Use IO thread to handle IMMS user switching
This is a preparation before enabling strict mode check on IO operation on the handler thread (UI thread) in IMMS. As other user-related operations are also offloaded to IO thread, moving user swithcing task to the IO thread would also give us a strong order garantee across user-related operations (e.g. user addition/removal, unlocking, and so on). Observable semantics should remain unchanged. Bug: 196206770 Bug: 343601565 Test: presubmit Flag: EXEMPT refactor Change-Id: I3b6212d724b1d3bec89aa7fd7f0bc12187376719
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 4716e6c24154..8b673ee8d088 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -1095,7 +1095,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
mUserSwitchHandlerTask.mClientToBeReset = clientToBeReset;
return;
}
- mHandler.removeCallbacks(mUserSwitchHandlerTask);
+ mIoHandler.removeCallbacks(mUserSwitchHandlerTask);
}
// Hide soft input before user switch task since switch task may block main handler a while
// and delayed the hideCurrentInputLocked().
@@ -1105,7 +1105,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
final UserSwitchHandlerTask task = new UserSwitchHandlerTask(this, userId,
clientToBeReset);
mUserSwitchHandlerTask = task;
- mHandler.post(task);
+ mIoHandler.post(task);
}
@VisibleForTesting