Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +15 −0 Original line number Diff line number Diff line Loading @@ -1126,6 +1126,21 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } }); } @Override public void onUserStopped(@NonNull TargetUser user) { final int userId = user.getUserIdentifier(); // Called on ActivityManager thread. SecureSettingsWrapper.onUserStopped(userId); mService.mIoHandler.post(() -> { final var additionalSubtypeMap = AdditionalSubtypeMapRepository.get(userId); final var settings = InputMethodManagerService.queryInputMethodServicesInternal( mService.mContext, userId, additionalSubtypeMap, DirectBootAwareness.AUTO).getMethodMap(); InputMethodSettingsRepository.put(userId, InputMethodSettings.create(settings, userId)); }); } } @GuardedBy("ImfLock.class") Loading services/core/java/com/android/server/inputmethod/SecureSettingsWrapper.java +17 −0 Original line number Diff line number Diff line Loading @@ -376,6 +376,23 @@ final class SecureSettingsWrapper { putOrGet(userId, readerWriter); } /** * Called when a user is stopped, which changes the user storage to the locked state again. * * @param userId the ID of the user whose storage is being locked again. */ @AnyThread static void onUserStopped(@UserIdInt int userId) { final LockedUserImpl lockedUserImpl = new LockedUserImpl(userId, sContentResolver); synchronized (sMutationLock) { final ReaderWriter current = sUserMap.get(userId); if (current == null || current instanceof LockedUserImpl) { return; } sUserMap = sUserMap.cloneWithPutOrSelf(userId, lockedUserImpl); } } /** * Put the given string {@code value} to {@code key}. * Loading Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +15 −0 Original line number Diff line number Diff line Loading @@ -1126,6 +1126,21 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } }); } @Override public void onUserStopped(@NonNull TargetUser user) { final int userId = user.getUserIdentifier(); // Called on ActivityManager thread. SecureSettingsWrapper.onUserStopped(userId); mService.mIoHandler.post(() -> { final var additionalSubtypeMap = AdditionalSubtypeMapRepository.get(userId); final var settings = InputMethodManagerService.queryInputMethodServicesInternal( mService.mContext, userId, additionalSubtypeMap, DirectBootAwareness.AUTO).getMethodMap(); InputMethodSettingsRepository.put(userId, InputMethodSettings.create(settings, userId)); }); } } @GuardedBy("ImfLock.class") Loading
services/core/java/com/android/server/inputmethod/SecureSettingsWrapper.java +17 −0 Original line number Diff line number Diff line Loading @@ -376,6 +376,23 @@ final class SecureSettingsWrapper { putOrGet(userId, readerWriter); } /** * Called when a user is stopped, which changes the user storage to the locked state again. * * @param userId the ID of the user whose storage is being locked again. */ @AnyThread static void onUserStopped(@UserIdInt int userId) { final LockedUserImpl lockedUserImpl = new LockedUserImpl(userId, sContentResolver); synchronized (sMutationLock) { final ReaderWriter current = sUserMap.get(userId); if (current == null || current instanceof LockedUserImpl) { return; } sUserMap = sUserMap.cloneWithPutOrSelf(userId, lockedUserImpl); } } /** * Put the given string {@code value} to {@code key}. * Loading