diff options
author | 2025-02-14 20:00:20 -0800 | |
---|---|---|
committer | 2025-02-14 20:00:20 -0800 | |
commit | ed8c91e410671fa153f1587f61d05b303bf94f95 (patch) | |
tree | 313e46e912dd4a4ca0cb355a79a43002c81bdbf3 | |
parent | 5d12b205645ba95d48caf1e47f9b4ecdfdfd42fc (diff) | |
parent | 0916f51225dc561def66a2fed4fdbd2e937b17c3 (diff) |
Merge "Fix NPE upon android.intent.action.LOCALE_CHANGED" into main
-rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodManagerService.java | 4 |
1 files changed, 2 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 2bb2b7b21cce..679d341c6f51 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -1294,8 +1294,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. // Do not reset the default (current) IME when it is a 3rd-party IME String selectedMethodId = bindingController.getSelectedMethodId(); final InputMethodSettings settings = InputMethodSettingsRepository.get(userId); - if (selectedMethodId != null - && !settings.getMethodMap().get(selectedMethodId).isSystem()) { + final InputMethodInfo selectedImi = settings.getMethodMap().get(selectedMethodId); + if (selectedImi != null && !selectedImi.isSystem()) { return; } final List<InputMethodInfo> suitableImes = InputMethodInfoUtils.getDefaultEnabledImes( |