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

Commit 0132c9a1 authored by Achim Thesmann's avatar Achim Thesmann Committed by Android (Google) Code Review
Browse files

Merge "Feature Flag for restricting PendingIntents by same UID" into main

parents 2aafdfb5 5de953a9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7,6 +7,13 @@ flag {
    bug: "296478951"
}

flag {
    name: "bal_require_opt_in_same_uid"
    namespace: "responsible_apis"
    description: "Require the PendingIntent creator/sender to opt in if it is the same UID"
    bug: "296478951"
}

flag {
    name: "bal_dont_bring_existing_background_task_stack_to_fg"
    namespace: "responsible_apis"
+3 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_ALLOW;
import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_FG_ONLY;
import static com.android.server.wm.ActivityTaskSupervisor.getApplicationLabel;
import static com.android.window.flags.Flags.balRequireOptInByPendingIntentCreator;
import static com.android.window.flags.Flags.balRequireOptInSameUid;
import static com.android.window.flags.Flags.balShowToasts;
import static com.android.window.flags.Flags.balShowToastsBlocked;
import static com.android.server.wm.PendingRemoteAnimationRegistry.TIMEOUT_MS;
@@ -277,6 +278,8 @@ public class BackgroundActivityStartController {
                mAutoOptInReason = "notPendingIntent";
            } else if (balRequireOptInByPendingIntentCreator() && mIsCallForResult) {
                mAutoOptInReason = "callForResult";
            } else if (callingUid == realCallingUid && !balRequireOptInSameUid()) {
                mAutoOptInReason = "sameUid";
            } else {
                mAutoOptInReason = null;
            }