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

Commit 87294abd authored by Achim Thesmann's avatar Achim Thesmann
Browse files

Add documentation link to wtf log

To allow developers easy access to documentation on background activity launches (goo.gle/android-bal), I've added a link to the relevant warning/error messages in the wtf log. This will make it easier for developers to understand the issue and find potential solutions.

Test: atest BackgroundActivityLaunchTest
Flag: EXEMPT logging only
Bug: 372918480
Change-Id: I3ee61afa683ebbb055ffa03dbe232f11cdd73ee6
parent eea8460f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -793,6 +793,7 @@ public class BackgroundActivityStartController {
            if (state.mBalAllowedByPiCreator.allowsBackgroundActivityStarts()) {
                Slog.wtf(TAG, "With Android 15 BAL hardening this activity start may be blocked"
                        + " if the PI creator upgrades target_sdk to 35+!"
                        + " goo.gle/android-bal"
                        + " (missing opt in by PI creator)!" + state);
                return allowBasedOnCaller(state);
            }
@@ -802,6 +803,7 @@ public class BackgroundActivityStartController {
            if (state.mBalAllowedByPiSender.allowsBackgroundActivityStarts()) {
                Slog.wtf(TAG, "With Android 14 BAL hardening this activity start will be blocked"
                        + " if the PI sender upgrades target_sdk to 34+! "
                        + " goo.gle/android-bal"
                        + " (missing opt in by PI sender)!" + state);
                return allowBasedOnRealCaller(state);
            }
@@ -829,7 +831,8 @@ public class BackgroundActivityStartController {
    }

    private BalVerdict abortLaunch(BalState state) {
        Slog.wtf(TAG, "Background activity launch blocked! " + state);
        Slog.wtf(TAG, "Background activity launch blocked! goo.gle/android-bal "
                + state);
        if (balShowToastsBlocked()
                && (state.mResultForCaller.allows() || state.mResultForRealCaller.allows())) {
            // only show a toast if either caller or real caller could launch if they opted in