Loading core/java/android/security/responsible_apis_flags.aconfig +8 −0 Original line number Original line Diff line number Diff line Loading @@ -95,6 +95,14 @@ flag { is_fixed_read_only: true is_fixed_read_only: true } } flag { name: "prevent_intent_redirect_show_toast_if_nested_keys_not_collected" namespace: "responsible_apis" description: "Prevent intent redirect attacks by showing a toast if not yet collected" bug: "361143368" is_fixed_read_only: true } flag { flag { name: "prevent_intent_redirect_throw_exception_if_nested_keys_not_collected" name: "prevent_intent_redirect_throw_exception_if_nested_keys_not_collected" namespace: "responsible_apis" namespace: "responsible_apis" Loading services/core/java/com/android/server/am/ActivityManagerService.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -132,7 +132,7 @@ import static android.provider.Settings.Global.DEBUG_APP; import static android.provider.Settings.Global.WAIT_FOR_DEBUGGER; import static android.provider.Settings.Global.WAIT_FOR_DEBUGGER; import static android.security.Flags.preventIntentRedirect; import static android.security.Flags.preventIntentRedirect; import static android.security.Flags.preventIntentRedirectCollectNestedKeysOnServerIfNotCollected; import static android.security.Flags.preventIntentRedirectCollectNestedKeysOnServerIfNotCollected; import static android.security.Flags.preventIntentRedirectShowToast; import static android.security.Flags.preventIntentRedirectShowToastIfNestedKeysNotCollected; import static android.security.Flags.preventIntentRedirectThrowExceptionIfNestedKeysNotCollected; import static android.security.Flags.preventIntentRedirectThrowExceptionIfNestedKeysNotCollected; import static android.util.FeatureFlagUtils.SETTINGS_ENABLE_MONITOR_PHANTOM_PROCS; import static android.util.FeatureFlagUtils.SETTINGS_ENABLE_MONITOR_PHANTOM_PROCS; import static android.view.Display.INVALID_DISPLAY; import static android.view.Display.INVALID_DISPLAY; Loading Loading @@ -19326,7 +19326,7 @@ public class ActivityManagerService extends IActivityManager.Stub "[IntentRedirect] The intent does not have its nested keys collected as a " "[IntentRedirect] The intent does not have its nested keys collected as a " + "preparation for creating intent creator tokens. Intent: " + "preparation for creating intent creator tokens. Intent: " + intent + "; creatorPackage: " + creatorPackage); + intent + "; creatorPackage: " + creatorPackage); if (preventIntentRedirectShowToast()) { if (preventIntentRedirectShowToastIfNestedKeysNotCollected()) { UiThread.getHandler().post( UiThread.getHandler().post( () -> Toast.makeText(mContext, () -> Toast.makeText(mContext, "Nested keys not collected. go/report-bug-intentRedir to report a" "Nested keys not collected. go/report-bug-intentRedir to report a" Loading
core/java/android/security/responsible_apis_flags.aconfig +8 −0 Original line number Original line Diff line number Diff line Loading @@ -95,6 +95,14 @@ flag { is_fixed_read_only: true is_fixed_read_only: true } } flag { name: "prevent_intent_redirect_show_toast_if_nested_keys_not_collected" namespace: "responsible_apis" description: "Prevent intent redirect attacks by showing a toast if not yet collected" bug: "361143368" is_fixed_read_only: true } flag { flag { name: "prevent_intent_redirect_throw_exception_if_nested_keys_not_collected" name: "prevent_intent_redirect_throw_exception_if_nested_keys_not_collected" namespace: "responsible_apis" namespace: "responsible_apis" Loading
services/core/java/com/android/server/am/ActivityManagerService.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -132,7 +132,7 @@ import static android.provider.Settings.Global.DEBUG_APP; import static android.provider.Settings.Global.WAIT_FOR_DEBUGGER; import static android.provider.Settings.Global.WAIT_FOR_DEBUGGER; import static android.security.Flags.preventIntentRedirect; import static android.security.Flags.preventIntentRedirect; import static android.security.Flags.preventIntentRedirectCollectNestedKeysOnServerIfNotCollected; import static android.security.Flags.preventIntentRedirectCollectNestedKeysOnServerIfNotCollected; import static android.security.Flags.preventIntentRedirectShowToast; import static android.security.Flags.preventIntentRedirectShowToastIfNestedKeysNotCollected; import static android.security.Flags.preventIntentRedirectThrowExceptionIfNestedKeysNotCollected; import static android.security.Flags.preventIntentRedirectThrowExceptionIfNestedKeysNotCollected; import static android.util.FeatureFlagUtils.SETTINGS_ENABLE_MONITOR_PHANTOM_PROCS; import static android.util.FeatureFlagUtils.SETTINGS_ENABLE_MONITOR_PHANTOM_PROCS; import static android.view.Display.INVALID_DISPLAY; import static android.view.Display.INVALID_DISPLAY; Loading Loading @@ -19326,7 +19326,7 @@ public class ActivityManagerService extends IActivityManager.Stub "[IntentRedirect] The intent does not have its nested keys collected as a " "[IntentRedirect] The intent does not have its nested keys collected as a " + "preparation for creating intent creator tokens. Intent: " + "preparation for creating intent creator tokens. Intent: " + intent + "; creatorPackage: " + creatorPackage); + intent + "; creatorPackage: " + creatorPackage); if (preventIntentRedirectShowToast()) { if (preventIntentRedirectShowToastIfNestedKeysNotCollected()) { UiThread.getHandler().post( UiThread.getHandler().post( () -> Toast.makeText(mContext, () -> Toast.makeText(mContext, "Nested keys not collected. go/report-bug-intentRedir to report a" "Nested keys not collected. go/report-bug-intentRedir to report a"