Loading core/java/android/content/Intent.java +4 −0 Original line number Diff line number Diff line Loading @@ -7857,6 +7857,10 @@ public class Intent implements Parcelable, Cloneable { */ public static final int URI_ALLOW_UNSAFE = 1<<2; static { Bundle.intentClass = Intent.class; } // --------------------------------------------------------------------- private String mAction; Loading core/java/android/os/Bundle.java +24 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,11 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { */ static final int FLAG_VERIFY_TOKENS_PRESENT = 1 << 13; /** * Indicates the bundle definitely contains an Intent. */ static final int FLAG_HAS_INTENT = 1 << 14; /** * Status when the Bundle can <b>assert</b> that the underlying Parcel DOES NOT contain Loading Loading @@ -117,6 +122,11 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { /** An unmodifiable {@code Bundle} that is always {@link #isEmpty() empty}. */ public static final Bundle EMPTY; /** * @hide */ public static Class<?> intentClass; /** * Special extras used to denote extras have been stripped off. * @hide Loading Loading @@ -388,6 +398,7 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { if ((bundle.mFlags & FLAG_HAS_BINDERS_KNOWN) == 0) { mFlags &= ~FLAG_HAS_BINDERS_KNOWN; } mFlags |= bundle.mFlags & FLAG_HAS_INTENT; } /** Loading Loading @@ -447,6 +458,16 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { } } /** * Returns if the bundle definitely contains at least an intent. This method returns false does * not guarantee the bundle does not contain a nested intent. An intent could still exist in a * ParcelableArrayList, ParcelableArray, ParcelableList, a bundle in this bundle, etc. * @hide */ public boolean hasIntent() { return (mFlags & FLAG_HAS_INTENT) != 0; } /** {@hide} */ @Override public void putObject(@Nullable String key, @Nullable Object value) { Loading Loading @@ -569,6 +590,9 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { mMap.put(key, value); mFlags &= ~FLAG_HAS_FDS_KNOWN; mFlags &= ~FLAG_HAS_BINDERS_KNOWN; if (intentClass != null && intentClass.isInstance(value)) { mFlags |= FLAG_HAS_INTENT; } } /** Loading services/core/java/com/android/server/am/ActivityManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -19334,7 +19334,8 @@ public class ActivityManagerService extends IActivityManager.Stub if (!preventIntentRedirect()) return; if (intent == null) return; if ((intent.getExtendedFlags() & Intent.EXTENDED_FLAG_NESTED_INTENT_KEYS_COLLECTED) == 0) { 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 " + "preparation for creating intent creator tokens. Intent: " Loading
core/java/android/content/Intent.java +4 −0 Original line number Diff line number Diff line Loading @@ -7857,6 +7857,10 @@ public class Intent implements Parcelable, Cloneable { */ public static final int URI_ALLOW_UNSAFE = 1<<2; static { Bundle.intentClass = Intent.class; } // --------------------------------------------------------------------- private String mAction; Loading
core/java/android/os/Bundle.java +24 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,11 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { */ static final int FLAG_VERIFY_TOKENS_PRESENT = 1 << 13; /** * Indicates the bundle definitely contains an Intent. */ static final int FLAG_HAS_INTENT = 1 << 14; /** * Status when the Bundle can <b>assert</b> that the underlying Parcel DOES NOT contain Loading Loading @@ -117,6 +122,11 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { /** An unmodifiable {@code Bundle} that is always {@link #isEmpty() empty}. */ public static final Bundle EMPTY; /** * @hide */ public static Class<?> intentClass; /** * Special extras used to denote extras have been stripped off. * @hide Loading Loading @@ -388,6 +398,7 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { if ((bundle.mFlags & FLAG_HAS_BINDERS_KNOWN) == 0) { mFlags &= ~FLAG_HAS_BINDERS_KNOWN; } mFlags |= bundle.mFlags & FLAG_HAS_INTENT; } /** Loading Loading @@ -447,6 +458,16 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { } } /** * Returns if the bundle definitely contains at least an intent. This method returns false does * not guarantee the bundle does not contain a nested intent. An intent could still exist in a * ParcelableArrayList, ParcelableArray, ParcelableList, a bundle in this bundle, etc. * @hide */ public boolean hasIntent() { return (mFlags & FLAG_HAS_INTENT) != 0; } /** {@hide} */ @Override public void putObject(@Nullable String key, @Nullable Object value) { Loading Loading @@ -569,6 +590,9 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { mMap.put(key, value); mFlags &= ~FLAG_HAS_FDS_KNOWN; mFlags &= ~FLAG_HAS_BINDERS_KNOWN; if (intentClass != null && intentClass.isInstance(value)) { mFlags |= FLAG_HAS_INTENT; } } /** Loading
services/core/java/com/android/server/am/ActivityManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -19334,7 +19334,8 @@ public class ActivityManagerService extends IActivityManager.Stub if (!preventIntentRedirect()) return; if (intent == null) return; if ((intent.getExtendedFlags() & Intent.EXTENDED_FLAG_NESTED_INTENT_KEYS_COLLECTED) == 0) { 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 " + "preparation for creating intent creator tokens. Intent: "