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

Commit e320fb7b authored by Hao Ke's avatar Hao Ke Committed by Android (Google) Code Review
Browse files

Merge "Revise IntentRedirect Hardening debug logs." into main

parents 60274c5e aca09734
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -19397,13 +19397,13 @@ public class ActivityManagerService extends IActivityManager.Stub
        if (((intent.getExtendedFlags() & Intent.EXTENDED_FLAG_NESTED_INTENT_KEYS_COLLECTED) == 0)
                && intent.getExtras() != null && intent.getExtras().hasIntent()) {
            Slog.wtf(TAG,
                    "[IntentRedirect] The intent does not have its nested keys collected as a "
                    "[IntentRedirect Hardening] The intent does not have its nested keys collected as a "
                            + "preparation for creating intent creator tokens. Intent: "
                            + intent + "; creatorPackage: " + creatorPackage);
            if (preventIntentRedirectShowToastIfNestedKeysNotCollectedRW()) {
                UiThread.getHandler().post(
                        () -> Toast.makeText(mContext,
                                "Nested keys not collected. go/report-bug-intentRedir to report a"
                                "Nested keys not collected, activity launch won't be blocked. go/report-bug-intentRedir to report a"
                                        + " bug", Toast.LENGTH_LONG).show());
            }
            if (preventIntentRedirectThrowExceptionIfNestedKeysNotCollected()) {
+1 −1
Original line number Diff line number Diff line
@@ -3655,7 +3655,7 @@ class ActivityStarter {
    private static String getIntentRedirectPreventedLogMessage(@NonNull String message,
            @NonNull Intent intent, int intentCreatorUid, @Nullable String intentCreatorPackage,
            int callingUid, @Nullable String callingPackage) {
        return "[IntentRedirect]" + message + " intentCreatorUid: " + intentCreatorUid
        return "[IntentRedirect Hardening] " + message + " intentCreatorUid: " + intentCreatorUid
                + "; intentCreatorPackage: " + intentCreatorPackage + "; callingUid: " + callingUid
                + "; callingPackage: " + callingPackage + "; intent: " + intent;
    }