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

Commit d247de85 authored by Felipe Leme's avatar Felipe Leme
Browse files

Don't call setAutofillClient() on base Context if it's null.

Test: atest CtsAutoFillServiceTestCases
Test: changed activity on autofill sample to override attachBaseContext() by
      calling super.attachBaseContext(null) - the activity still crashes, but
      not on attachBaseContext().

Fixes: 79707861

Change-Id: Idfaa9c596cc338ab815441138ce06ba64cd3b4d2
parent 869c6f55
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -979,8 +979,10 @@ public class Activity extends ContextThemeWrapper
    @Override
    protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(newBase);
        if (newBase != null) {
            newBase.setAutofillClient(this);
        }
    }

    /** @hide */
    @Override