Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0916f512 authored by Abhishek Gadewar's avatar Abhishek Gadewar Committed by Cosmin Băieș
Browse files

Fix NPE upon android.intent.action.LOCALE_CHANGED



Summary: Fixing the crash with below log
Error: android_crash:java.lang.NullPointerException:com.android.server.inputmethod.InputMethodManagerService.resetDefaultImeLocked

Test: No more crash on oculus

Change-Id: I734b5d1151b76ed441c2832cf378164ab5925856
Merged-In: I734b5d1151b76ed441c2832cf378164ab5925856
Signed-off-by: default avatarAbhishek Gadewar <abhishekgadewar@meta.com>
parent 8d6fd6ea
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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(