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

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

Merge "Remove bal_respect_app_switch_state_when_check_bound_by_foreground_uid flag" into main

parents 4df1a964 276b7949
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ import static com.android.window.flags.Flags.balDontBringExistingBackgroundTaskS
import static com.android.window.flags.Flags.balImproveRealCallerVisibilityCheck;
import static com.android.window.flags.Flags.balImprovedMetrics;
import static com.android.window.flags.Flags.balRequireOptInByPendingIntentCreator;
import static com.android.window.flags.Flags.balRespectAppSwitchStateWhenCheckBoundByForegroundUid;
import static com.android.window.flags.Flags.balShowToastsBlocked;
import static com.android.window.flags.Flags.balStrictModeRo;

@@ -603,8 +602,6 @@ public class BackgroundActivityStartController {
                    .append(balImproveRealCallerVisibilityCheck());
            sb.append("; balRequireOptInByPendingIntentCreator: ")
                    .append(balRequireOptInByPendingIntentCreator());
            sb.append("; balRespectAppSwitchStateWhenCheckBoundByForegroundUid: ")
                    .append(balRespectAppSwitchStateWhenCheckBoundByForegroundUid());
            sb.append("; balDontBringExistingBackgroundTaskStackToFg: ")
                    .append(balDontBringExistingBackgroundTaskStackToFg());
            sb.append("]");
+2 −5
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ import android.util.IntArray;

import com.android.internal.annotations.GuardedBy;
import com.android.server.wm.BackgroundActivityStartController.BalVerdict;
import com.android.window.flags.Flags;

import java.io.PrintWriter;
import java.util.ArrayList;
@@ -137,10 +136,8 @@ class BackgroundLaunchProcessController {
        }
        // Allow if the caller is bound by a UID that's currently foreground.
        // But still respect the appSwitchState.
        if (checkConfiguration.checkVisibility && (
                Flags.balRespectAppSwitchStateWhenCheckBoundByForegroundUid()
                        ? appSwitchState != APP_SWITCH_DISALLOW && isBoundByForegroundUid()
                        : isBoundByForegroundUid())) {
        if (checkConfiguration.checkVisibility && appSwitchState != APP_SWITCH_DISALLOW
                && isBoundByForegroundUid()) {
            return new BalVerdict(balImprovedMetrics() ? BAL_ALLOW_BOUND_BY_FOREGROUND
                    : BAL_ALLOW_VISIBLE_WINDOW, /*background*/ false,
                    "process bound by foreground uid");