Temporarily relax the PI mutability flag requirement for chrome

Bug: 178065720
Test: chrome doesn't crash for missing PI mutability flag
Change-Id: I7d1ba664687f3fe0a99591994d46679812089364
This commit is contained in:
Ashwini Oruganti
2021-01-21 09:00:11 -08:00
parent f0715e0bce
commit abc350e0f9

View File

@@ -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);
}
}
}