Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +14 −1 Original line number Diff line number Diff line Loading @@ -1082,6 +1082,19 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. AdditionalSubtypeMapRepository.remove(userId); InputMethodSettingsRepository.remove(userId); mService.mUserDataRepository.remove(userId); synchronized (ImfLock.class) { final int nextOrCurrentUser = mService.mUserSwitchHandlerTask != null ? mService.mUserSwitchHandlerTask.mToUserId : mService.mCurrentImeUserId; if (!mService.mConcurrentMultiUserModeEnabled && userId == nextOrCurrentUser) { // The current user was removed without an ongoing switch, or the user targeted // by the ongoing switch was removed. Switch to the current non-profile user // to allow starting input on it or one of its profile users later. // Note: non-profile users cannot be removed while they are the current user. final int currentUserId = mService.mActivityManagerInternal.getCurrentUserId(); mService.scheduleSwitchUserTaskLocked(currentUserId, null /* clientToBeReset */); } } } @Override Loading Loading @@ -1332,7 +1345,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. + " prevUserId=" + prevUserId); } // Clean up stuff for mCurrentUserId, which soon becomes the previous user. // Clean up stuff for mCurrentImeUserId, which soon becomes the previous user. // TODO(b/338461930): Check if this is still necessary or not. onUnbindCurrentMethodByReset(prevUserId); Loading Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +14 −1 Original line number Diff line number Diff line Loading @@ -1082,6 +1082,19 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. AdditionalSubtypeMapRepository.remove(userId); InputMethodSettingsRepository.remove(userId); mService.mUserDataRepository.remove(userId); synchronized (ImfLock.class) { final int nextOrCurrentUser = mService.mUserSwitchHandlerTask != null ? mService.mUserSwitchHandlerTask.mToUserId : mService.mCurrentImeUserId; if (!mService.mConcurrentMultiUserModeEnabled && userId == nextOrCurrentUser) { // The current user was removed without an ongoing switch, or the user targeted // by the ongoing switch was removed. Switch to the current non-profile user // to allow starting input on it or one of its profile users later. // Note: non-profile users cannot be removed while they are the current user. final int currentUserId = mService.mActivityManagerInternal.getCurrentUserId(); mService.scheduleSwitchUserTaskLocked(currentUserId, null /* clientToBeReset */); } } } @Override Loading Loading @@ -1332,7 +1345,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. + " prevUserId=" + prevUserId); } // Clean up stuff for mCurrentUserId, which soon becomes the previous user. // Clean up stuff for mCurrentImeUserId, which soon becomes the previous user. // TODO(b/338461930): Check if this is still necessary or not. onUnbindCurrentMethodByReset(prevUserId); Loading