summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index f84d55f9b20b..7daf9582cdd6 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -1038,13 +1038,15 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
// Called on ActivityManager thread.
final int userId = user.getUserIdentifier();
SecureSettingsWrapper.onUserStarting(userId);
- synchronized (ImfLock.class) {
- if (mService.mConcurrentMultiUserModeEnabled) {
- if (mService.mCurrentUserId != userId && mService.mSystemReady) {
- mService.initializeVisibleBackgroundUserLocked(userId);
+ mService.mIoHandler.post(() -> {
+ synchronized (ImfLock.class) {
+ if (mService.mConcurrentMultiUserModeEnabled) {
+ if (mService.mCurrentUserId != userId && mService.mSystemReady) {
+ mService.initializeVisibleBackgroundUserLocked(userId);
+ }
}
}
- }
+ });
}
}