summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ashwini Oruganti <ashfall@google.com> 2021-01-22 03:47:00 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-01-22 03:47:00 +0000
commit773d2c63c841fe65f56bbd205de82e439b65a5f7 (patch)
tree0cc9376b6a4552fa02fc2984d91f7ac92a517bfb
parentd6f4f4ef189a5f06db0b89db393472e0287847b2 (diff)
parentabc350e0f90cffb94ce0b3c3e27b489db7e35e09 (diff)
Merge "Temporarily relax the PI mutability flag requirement for chrome"
-rw-r--r--core/java/android/app/PendingIntent.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java
index b055c6768e7b..6d75d0fe020a 100644
--- a/core/java/android/app/PendingIntent.java
+++ b/core/java/android/app/PendingIntent.java
@@ -359,10 +359,12 @@ public final class PendingIntent implements Parcelable {
if (Compatibility.isChangeEnabled(PENDING_INTENT_EXPLICIT_MUTABILITY_REQUIRED)
&& !flagImmutableSet && !flagMutableSet) {
- if (!mInstrumentation.isInstrumenting()) {
- throw new IllegalArgumentException(msg);
- } else {
+
+ //TODO(b/178065720) Remove check for chrome and enforce this requirement
+ if (packageName.equals("com.android.chrome") || mInstrumentation.isInstrumenting()) {
Log.e(TAG, msg);
+ } else {
+ throw new IllegalArgumentException(msg);
}
}
}