diff options
| -rw-r--r-- | core/java/android/app/PendingIntent.java | 8 |
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); } } } |