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

Commit 22bc5136 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allow system process by opt in" into main

parents eee2efae 3edf573f
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1164,8 +1164,9 @@ public class BackgroundActivityStartController {
     * or {@link #BAL_BLOCK} if the launch should be blocked
     */
    BalVerdict checkBackgroundActivityStartAllowedByRealCallerInBackground(BalState state) {
        if (state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode()
                == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
        boolean allowAlways = state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode()
                == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS;
        if (allowAlways
                && hasBalPermission(state.mRealCallingUid, state.mRealCallingPid)) {
            return new BalVerdict(BAL_ALLOW_PERMISSION,
                    /*background*/ false,
@@ -1177,8 +1178,7 @@ public class BackgroundActivityStartController {
                + state.mRealCallingPid + ", " + state.mRealCallingPackage + ") "
                + balStartModeToString(
                state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode()));
        if (state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode()
                == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
        if (allowAlways
                && mService.hasSystemAlertWindowPermission(state.mRealCallingUid,
                state.mRealCallingPid, state.mRealCallingPackage)) {
            Slog.w(
@@ -1192,7 +1192,7 @@ public class BackgroundActivityStartController {

        // if the realCallingUid is a persistent system process, abort if the IntentSender
        // wasn't allowed to start an activity
        if (state.mAllowBalExemptionForSystemProcess
        if ((allowAlways || state.mAllowBalExemptionForSystemProcess)
                && state.mIsRealCallingUidPersistentSystemProcess) {
            return new BalVerdict(BAL_ALLOW_ALLOWLISTED_UID,
                    /*background*/ false,