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

Commit aeb55783 authored by Achim Thesmann's avatar Achim Thesmann
Browse files

BAL opt-in Autofill

Autofill craetes a PendingIntent (as user) and then fires the intent
itself. This would be blocked by BAL hardening.

Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.saveui.SimpleSaveActivityTest
Bug: 311549142
Change-Id: I841afb39a17750fb5490287ca4b99983b4707f48
parent bdb52a53
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static com.android.server.autofill.Helper.sVerbose;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityOptions;
import android.app.Dialog;
import android.app.PendingIntent;
import android.content.ComponentName;
@@ -205,7 +206,10 @@ final class SaveUi {
                        intent,
                        PendingIntent.FLAG_MUTABLE
                                | PendingIntent.FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT,
                        /* options= */ null, UserHandle.CURRENT);
                        ActivityOptions.makeBasic()
                                .setPendingIntentCreatorBackgroundActivityStartMode(
                                        ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
                                .toBundle(), UserHandle.CURRENT);
                if (sDebug) {
                    Slog.d(TAG, "startActivity add save UI restored with intent=" + intent);
                }