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

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

Merge "Use a read write feature flag to control showToast when extra intent...

Merge "Use a read write feature flag to control showToast when extra intent keys not collected" into main
parents 10cd796a 158b749d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -103,6 +103,13 @@ flag {
    is_fixed_read_only: true
}

flag {
    name: "prevent_intent_redirect_show_toast_if_nested_keys_not_collected_r_w"
    namespace: "responsible_apis"
    description: "Prevent intent redirect attacks by showing a toast if not yet collected"
    bug: "361143368"
}

flag {
    name: "prevent_intent_redirect_throw_exception_if_nested_keys_not_collected"
    namespace: "responsible_apis"
+2 −2
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ import static android.provider.Settings.Global.DEBUG_APP;
import static android.provider.Settings.Global.WAIT_FOR_DEBUGGER;
import static android.security.Flags.preventIntentRedirect;
import static android.security.Flags.preventIntentRedirectCollectNestedKeysOnServerIfNotCollected;
import static android.security.Flags.preventIntentRedirectShowToastIfNestedKeysNotCollected;
import static android.security.Flags.preventIntentRedirectShowToastIfNestedKeysNotCollectedRW;
import static android.security.Flags.preventIntentRedirectThrowExceptionIfNestedKeysNotCollected;
import static android.util.FeatureFlagUtils.SETTINGS_ENABLE_MONITOR_PHANTOM_PROCS;
import static android.view.Display.INVALID_DISPLAY;
@@ -19339,7 +19339,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                    "[IntentRedirect] The intent does not have its nested keys collected as a "
                            + "preparation for creating intent creator tokens. Intent: "
                            + intent + "; creatorPackage: " + creatorPackage);
            if (preventIntentRedirectShowToastIfNestedKeysNotCollected()) {
            if (preventIntentRedirectShowToastIfNestedKeysNotCollectedRW()) {
                UiThread.getHandler().post(
                        () -> Toast.makeText(mContext,
                                "Nested keys not collected. go/report-bug-intentRedir to report a"