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

Commit 3696dc30 authored by Simranjit Kohli's avatar Simranjit Kohli
Browse files

[Fix NPE]: Add a null check

It's still unclear why AutofillManager would be returned as null
This is a band-aid fix due to lack of proper underlying cause.

Bug: 355926039
Test: Manual
Flag: EXEMPT bugfix
Change-Id: I1f5f2b32f4d04f8d174c6bf830e05363f7cd1939
parent ada655fe
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -94,8 +94,15 @@ public final class AutofillClientController implements AutofillManager.AutofillC
     * @hide
     */
    public boolean isRelayoutFixEnabled() {
        AutofillManager autofillManager = getAutofillManager();
        if (autofillManager == null) {
            if (Helper.sDebug) {
                Log.d(TAG, "isRelayoutFixEnabled() : getAutofillManager() == null");
            }
            return false;
        }
        if (mRelayoutFix == null) {
            mRelayoutFix = getAutofillManager().isRelayoutFixEnabled();
            mRelayoutFix = autofillManager.isRelayoutFixEnabled();
        }
        return mRelayoutFix;
    }