Merge "Enforce that a PendingIntent has an explicit mutability flag on creation."

This commit is contained in:
Ashwini Oruganti
2021-01-06 03:04:14 +00:00
committed by Android (Google) Code Review

View File

@@ -352,7 +352,9 @@ public final class PendingIntent implements Parcelable {
if (Compatibility.isChangeEnabled(PENDING_INTENT_EXPLICIT_MUTABILITY_REQUIRED)
&& !flagImmutableSet && !flagMutableSet) {
Log.e(TAG, msg);
Log.wtf(TAG, msg);
throw new IllegalArgumentException(
"Please specify an explicit mutability flag (FLAG_IMMUTABLE or FLAG_MUTABLE)");
}
}