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

Commit c08c5064 authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Fix an NPE when running with Keep." into lmp-dev

parents aa3ff194 411fa590
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -776,15 +776,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen

    private void onStartInputInternal(final EditorInfo editorInfo, final boolean restarting) {
        super.onStartInput(editorInfo, restarting);
        if (editorInfo == null) {
            Log.e(TAG, "Null EditorInfo in onStartInput()");
            return;
        }
        SettingsValues currentSettingsValues = mSettings.getCurrent();
        final boolean isSameInputType = currentSettingsValues.isSameInputType(editorInfo);
        final boolean hasSameOrientation =
                currentSettingsValues.hasSameOrientation(getResources().getConfiguration());
        mRichImm.clearSubtypeCaches();
        if (editorInfo == null) {
            Log.e(TAG, "Null EditorInfo in onStartInput()");
            return;
        }
        final boolean inputTypeChanged = !isSameInputType;
        final boolean isDifferentTextField = !restarting || inputTypeChanged;
        if (isDifferentTextField || !hasSameOrientation) {