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

Commit 14c5b940 authored by Adam He's avatar Adam He
Browse files

Fixed autofill compat mode regression caused by DecorContext

Fixes: 135038324
Test: manual verification
Test: atest CtsAutoFillServiceTestCases
Change-Id: Iab32c24fdd9ad02308e79652422d1c4965be8e7c
parent 927d44d9
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.internal.policy;

import android.content.AutofillOptions;
import android.content.ContentCaptureOptions;
import android.content.Context;
import android.content.res.AssetManager;
@@ -97,6 +98,15 @@ public class DecorContext extends ContextThemeWrapper {
        return mActivityResources.getAssets();
    }

    @Override
    public AutofillOptions getAutofillOptions() {
        Context activityContext = mActivityContext.get();
        if (activityContext != null) {
            return activityContext.getAutofillOptions();
        }
        return null;
    }

    @Override
    public ContentCaptureOptions getContentCaptureOptions() {
        Context activityContext = mActivityContext.get();