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

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

Merge "Remove strict mode flags" into main

parents c4f3054c ff69bd5d
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);