Loading services/core/java/com/android/server/TextServicesManagerService.java +6 −6 Original line number Original line Diff line number Diff line Loading @@ -128,14 +128,14 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { synchronized (mLock) { synchronized (mLock) { if (!mSystemReady) { if (!mSystemReady) { mSystemReady = true; mSystemReady = true; resetInternalState(mSettings.getCurrentUserId()); resetInternalStateLocked(mSettings.getCurrentUserId()); } } } } } } void onSwitchUser(@UserIdInt int userId) { void onSwitchUser(@UserIdInt int userId) { synchronized (mLock) { synchronized (mLock) { resetInternalState(userId); resetInternalStateLocked(userId); } } } } Loading @@ -145,7 +145,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { if (userId != currentUserId) { if (userId != currentUserId) { return; return; } } resetInternalState(currentUserId); resetInternalStateLocked(currentUserId); } } } } Loading Loading @@ -173,11 +173,11 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { mSettings = new TextServicesSettings(context.getContentResolver(), userId, mSettings = new TextServicesSettings(context.getContentResolver(), userId, useCopyOnWriteSettings); useCopyOnWriteSettings); // "resetInternalState" initializes the states for the foreground user // "resetInternalStateLocked" initializes the states for the foreground user resetInternalState(userId); resetInternalStateLocked(userId); } } private void resetInternalState(@UserIdInt int userId) { private void resetInternalStateLocked(@UserIdInt int userId) { final boolean useCopyOnWriteSettings = final boolean useCopyOnWriteSettings = !mSystemReady || !mUserManager.isUserUnlockingOrUnlocked(userId); !mSystemReady || !mUserManager.isUserUnlockingOrUnlocked(userId); mSettings.switchCurrentUser(userId, useCopyOnWriteSettings); mSettings.switchCurrentUser(userId, useCopyOnWriteSettings); Loading Loading
services/core/java/com/android/server/TextServicesManagerService.java +6 −6 Original line number Original line Diff line number Diff line Loading @@ -128,14 +128,14 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { synchronized (mLock) { synchronized (mLock) { if (!mSystemReady) { if (!mSystemReady) { mSystemReady = true; mSystemReady = true; resetInternalState(mSettings.getCurrentUserId()); resetInternalStateLocked(mSettings.getCurrentUserId()); } } } } } } void onSwitchUser(@UserIdInt int userId) { void onSwitchUser(@UserIdInt int userId) { synchronized (mLock) { synchronized (mLock) { resetInternalState(userId); resetInternalStateLocked(userId); } } } } Loading @@ -145,7 +145,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { if (userId != currentUserId) { if (userId != currentUserId) { return; return; } } resetInternalState(currentUserId); resetInternalStateLocked(currentUserId); } } } } Loading Loading @@ -173,11 +173,11 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { mSettings = new TextServicesSettings(context.getContentResolver(), userId, mSettings = new TextServicesSettings(context.getContentResolver(), userId, useCopyOnWriteSettings); useCopyOnWriteSettings); // "resetInternalState" initializes the states for the foreground user // "resetInternalStateLocked" initializes the states for the foreground user resetInternalState(userId); resetInternalStateLocked(userId); } } private void resetInternalState(@UserIdInt int userId) { private void resetInternalStateLocked(@UserIdInt int userId) { final boolean useCopyOnWriteSettings = final boolean useCopyOnWriteSettings = !mSystemReady || !mUserManager.isUserUnlockingOrUnlocked(userId); !mSystemReady || !mUserManager.isUserUnlockingOrUnlocked(userId); mSettings.switchCurrentUser(userId, useCopyOnWriteSettings); mSettings.switchCurrentUser(userId, useCopyOnWriteSettings); Loading