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

Commit de97af1b authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Read the autofill highlight from rootView context

Fixes: 37792810
Test: CtsAutoFillServiceTestCases
      CtsUiRenderingTestCases:.testclasses.AutofillHighlightTests
Change-Id: Idb843d90f8abb591ba6845ab713745b0eafc4a92
parent 180f0174
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -20419,9 +20419,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    @Nullable private Drawable getAutofilledDrawable() {
        // Lazily load the isAutofilled drawable.
        if (mAttachInfo.mAutofilledDrawable == null) {
            TypedArray a = mContext.getTheme().obtainStyledAttributes(AUTOFILL_HIGHLIGHT_ATTR);
            Context rootContext = getRootView().getContext();
            TypedArray a = rootContext.getTheme().obtainStyledAttributes(AUTOFILL_HIGHLIGHT_ATTR);
            int attributeResourceId = a.getResourceId(0, 0);
            mAttachInfo.mAutofilledDrawable = mContext.getDrawable(attributeResourceId);
            mAttachInfo.mAutofilledDrawable = rootContext.getDrawable(attributeResourceId);
            a.recycle();
        }