summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nan Wu <wnan@google.com> 2024-10-31 20:25:24 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-10-31 20:25:24 +0000
commit73f20ce1b901f900f4aae4a390f30e24075af0cc (patch)
tree9b4fd2ef1d2e520fe75a656268973639ac20ad73
parentaa47b52cf801dc81746da45288d8a1cd16fd9b96 (diff)
parentf8c9fd7838851e9ff67becd40aa6a05790fedb35 (diff)
Merge "Fix check creator token" into main
-rw-r--r--core/java/android/content/Intent.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 2fdf2589e13d..6fa5a9b82858 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -899,7 +899,7 @@ public class Intent implements Parcelable, Cloneable {
boolean isForeign = (intent.mLocalFlags & LOCAL_FLAG_FROM_PARCEL) != 0;
boolean isWithoutTrustedCreatorToken =
(intent.mLocalFlags & Intent.LOCAL_FLAG_TRUSTED_CREATOR_TOKEN_PRESENT) == 0;
- if (isForeign && isWithoutTrustedCreatorToken) {
+ if (isForeign && isWithoutTrustedCreatorToken && preventIntentRedirect()) {
intent.addExtendedFlags(EXTENDED_FLAG_MISSING_CREATOR_OR_INVALID_TOKEN);
}
}