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

Commit 4fdf1de4 authored by satok's avatar satok
Browse files

Check null pointer agressively.

Bug: 3250622

Change-Id: I25f367ad1bd6a741282603f2f587f7a1256ef460
parent a01ac783
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -184,6 +184,9 @@ public class InputMethodButton extends ImageView {
    }

    private void refreshStatusIcon() {
        if (mIcon == null) {
            return;
        }
        if (!needsToShowIMEButton()) {
            setVisibility(View.INVISIBLE);
            return;
@@ -202,14 +205,12 @@ public class InputMethodButton extends ImageView {
                icon = getShortcutInputMethodAndSubtypeDrawable();
                break;
        }
        if (mIcon != null) {
        if (icon == null) {
            mIcon.setImageResource(R.drawable.ic_sysbar_ime_default);
        } else {
            mIcon.setImageDrawable(icon);
        }
    }
    }

    private int loadInputMethodSelectorVisibility() {
        return Settings.Secure.getInt(getContext().getContentResolver(),