diff options
| -rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodManagerService.java | 10 |
1 files changed, 8 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 7548b3679bae..9477380d408d 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -1127,6 +1127,11 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. public void onUserSwitching(@Nullable TargetUser from, @NonNull TargetUser to) { // Called on ActivityManager thread. synchronized (ImfLock.class) { + if (mService.mExperimentalConcurrentMultiUserModeEnabled) { + // In concurrent multi-user mode, we in general do not rely on the concept of + // current user. + return; + } mService.scheduleSwitchUserTaskLocked(to.getUserIdentifier(), /* clientToBeReset= */ null); } @@ -3553,7 +3558,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. final long ident = Binder.clearCallingIdentity(); try { // Verify if IMMS is in the process of switching user. - if (mUserSwitchHandlerTask != null) { + if (!mExperimentalConcurrentMultiUserModeEnabled + && mUserSwitchHandlerTask != null) { // There is already an on-going pending user switch task. final int nextUserId = mUserSwitchHandlerTask.mToUserId; if (userId == nextUserId) { @@ -3607,7 +3613,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } // Verify if caller is a background user. - if (userId != mCurrentUserId) { + if (!mExperimentalConcurrentMultiUserModeEnabled && userId != mCurrentUserId) { if (ArrayUtils.contains( mUserManagerInternal.getProfileIds(mCurrentUserId, false), userId)) { |