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

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

Remove strict mode flags

Test: atest BackgroundActivityLaunchTest
Bug: 424052187
Flag: EXEMPT remove com.android.window.flags.bal_strict_mode_grace_period
Change-Id: Ib79cdaf0a6e2c7d1c2227cc9f835bbb9521c2fca
parent bd21bbb5
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -54,13 +54,6 @@ flag {
    bug: "362575865"
}

flag {
    name: "bal_strict_mode_grace_period"
    namespace: "responsible_apis"
    description: "Strict mode violation triggered by grace period usage"
    bug: "384807495"
}

flag {
    name: "bal_clear_allowlist_duration"
    namespace: "responsible_apis"
+27 −33
Original line number Diff line number Diff line
@@ -48,8 +48,6 @@ import static com.android.window.flags.Flags.balAdditionalLogging;
import static com.android.window.flags.Flags.balAdditionalStartModes;
import static com.android.window.flags.Flags.balDontBringExistingBackgroundTaskStackToFg;
import static com.android.window.flags.Flags.balShowToastsBlocked;
import static com.android.window.flags.Flags.balStrictModeGracePeriod;
import static com.android.window.flags.Flags.balStrictModeRo;

import static java.lang.annotation.RetentionPolicy.SOURCE;
import static java.util.Objects.requireNonNull;
@@ -899,7 +897,6 @@ public class BackgroundActivityStartController {
            showToast("BAL blocked. goo.gle/android-bal");
        }
        BalVerdict verdict = statsLog(BalVerdict.BLOCK, state);
        if (balStrictModeRo()) {
        String abortDebugMessage;
        if (state.isPendingIntent()) {
            abortDebugMessage =
@@ -924,7 +921,6 @@ public class BackgroundActivityStartController {
        if (!state.callerIsRealCaller()) {
            strictModeLaunchAborted(state.mRealCallingUid, abortDebugMessage);
        }
        }
        return verdict;
    }

@@ -1970,13 +1966,11 @@ public class BackgroundActivityStartController {
        }

        if (logIfOnlyAllowedBy(finalVerdict, state, BAL_ALLOW_GRACE_PERIOD)) {
            if (balStrictModeRo() && balStrictModeGracePeriod()) {
            String abortDebugMessage = "Activity start is only allowed by grace period. "
                    + "This may stop working in the future. "
                    + "intent: " + state.mIntent;
            strictModeLaunchAborted(state.mRealCallingUid, abortDebugMessage);
        }
        }
        logIfOnlyAllowedBy(finalVerdict, state, BAL_ALLOW_NON_APP_VISIBLE_WINDOW);
        logIfOnlyAllowedBy(finalVerdict, state, BAL_ALLOW_NOTIFICATION_TOKEN);
        logIfOnlyAllowedBy(finalVerdict, state, BAL_ALLOW_WALLPAPER);