Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +12 −12 Original line number Diff line number Diff line Loading @@ -2973,10 +2973,11 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. @GuardedBy("ImfLock.class") void updateInputMethodsFromSettingsLocked(boolean enabledMayChange) { final InputMethodSettings settings = InputMethodSettingsRepository.get(mCurrentUserId); final int userId = mCurrentUserId; final InputMethodSettings settings = InputMethodSettingsRepository.get(userId); if (enabledMayChange) { final PackageManager userAwarePackageManager = getPackageManagerForUser(mContext, settings.getUserId()); userId); List<InputMethodInfo> enabled = settings.getEnabledInputMethodList(); for (int i = 0; i < enabled.size(); i++) { Loading Loading @@ -3005,20 +3006,19 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. if (mDeviceIdToShowIme == DEVICE_ID_DEFAULT) { String ime = SecureSettingsWrapper.getString( Settings.Secure.DEFAULT_INPUT_METHOD, null, settings.getUserId()); Settings.Secure.DEFAULT_INPUT_METHOD, null, userId); String defaultDeviceIme = SecureSettingsWrapper.getString( Settings.Secure.DEFAULT_DEVICE_INPUT_METHOD, null, settings.getUserId()); Settings.Secure.DEFAULT_DEVICE_INPUT_METHOD, null, userId); if (defaultDeviceIme != null && !Objects.equals(ime, defaultDeviceIme)) { if (DEBUG) { Slog.v(TAG, "Current input method " + ime + " differs from the stored default" + " device input method for user " + settings.getUserId() + " device input method for user " + userId + " - restoring " + defaultDeviceIme); } SecureSettingsWrapper.putString( Settings.Secure.DEFAULT_INPUT_METHOD, defaultDeviceIme, settings.getUserId()); Settings.Secure.DEFAULT_INPUT_METHOD, defaultDeviceIme, userId); SecureSettingsWrapper.putString( Settings.Secure.DEFAULT_DEVICE_INPUT_METHOD, null, settings.getUserId()); Settings.Secure.DEFAULT_DEVICE_INPUT_METHOD, null, userId); } } Loading @@ -3044,18 +3044,18 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } // TODO: Instantiate mSwitchingController for each user. if (settings.getUserId() == mSwitchingController.getUserId()) { if (userId == mSwitchingController.getUserId()) { mSwitchingController.resetCircularListLocked(settings.getMethodMap()); } else { mSwitchingController = InputMethodSubtypeSwitchingController.createInstanceLocked( mContext, settings.getMethodMap(), settings.getUserId()); mContext, settings.getMethodMap(), userId); } // TODO: Instantiate mHardwareKeyboardShortcutController for each user. if (settings.getUserId() == mHardwareKeyboardShortcutController.getUserId()) { if (userId == mHardwareKeyboardShortcutController.getUserId()) { mHardwareKeyboardShortcutController.reset(settings.getMethodMap()); } else { mHardwareKeyboardShortcutController = new HardwareKeyboardShortcutController( settings.getMethodMap(), settings.getUserId()); settings.getMethodMap(), userId); } sendOnNavButtonFlagsChangedLocked(); } Loading Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +12 −12 Original line number Diff line number Diff line Loading @@ -2973,10 +2973,11 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. @GuardedBy("ImfLock.class") void updateInputMethodsFromSettingsLocked(boolean enabledMayChange) { final InputMethodSettings settings = InputMethodSettingsRepository.get(mCurrentUserId); final int userId = mCurrentUserId; final InputMethodSettings settings = InputMethodSettingsRepository.get(userId); if (enabledMayChange) { final PackageManager userAwarePackageManager = getPackageManagerForUser(mContext, settings.getUserId()); userId); List<InputMethodInfo> enabled = settings.getEnabledInputMethodList(); for (int i = 0; i < enabled.size(); i++) { Loading Loading @@ -3005,20 +3006,19 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. if (mDeviceIdToShowIme == DEVICE_ID_DEFAULT) { String ime = SecureSettingsWrapper.getString( Settings.Secure.DEFAULT_INPUT_METHOD, null, settings.getUserId()); Settings.Secure.DEFAULT_INPUT_METHOD, null, userId); String defaultDeviceIme = SecureSettingsWrapper.getString( Settings.Secure.DEFAULT_DEVICE_INPUT_METHOD, null, settings.getUserId()); Settings.Secure.DEFAULT_DEVICE_INPUT_METHOD, null, userId); if (defaultDeviceIme != null && !Objects.equals(ime, defaultDeviceIme)) { if (DEBUG) { Slog.v(TAG, "Current input method " + ime + " differs from the stored default" + " device input method for user " + settings.getUserId() + " device input method for user " + userId + " - restoring " + defaultDeviceIme); } SecureSettingsWrapper.putString( Settings.Secure.DEFAULT_INPUT_METHOD, defaultDeviceIme, settings.getUserId()); Settings.Secure.DEFAULT_INPUT_METHOD, defaultDeviceIme, userId); SecureSettingsWrapper.putString( Settings.Secure.DEFAULT_DEVICE_INPUT_METHOD, null, settings.getUserId()); Settings.Secure.DEFAULT_DEVICE_INPUT_METHOD, null, userId); } } Loading @@ -3044,18 +3044,18 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } // TODO: Instantiate mSwitchingController for each user. if (settings.getUserId() == mSwitchingController.getUserId()) { if (userId == mSwitchingController.getUserId()) { mSwitchingController.resetCircularListLocked(settings.getMethodMap()); } else { mSwitchingController = InputMethodSubtypeSwitchingController.createInstanceLocked( mContext, settings.getMethodMap(), settings.getUserId()); mContext, settings.getMethodMap(), userId); } // TODO: Instantiate mHardwareKeyboardShortcutController for each user. if (settings.getUserId() == mHardwareKeyboardShortcutController.getUserId()) { if (userId == mHardwareKeyboardShortcutController.getUserId()) { mHardwareKeyboardShortcutController.reset(settings.getMethodMap()); } else { mHardwareKeyboardShortcutController = new HardwareKeyboardShortcutController( settings.getMethodMap(), settings.getUserId()); settings.getMethodMap(), userId); } sendOnNavButtonFlagsChangedLocked(); } Loading