Add a PendingIntent flag to mark unaudited PI mutability
This change adds a FLAG_MUTABLE_UNAUDITED that is equal in value to FLAG_MUTABLE but is intended to be used with PendingIntents that have not yet been audited to be intentionally mutable/immutable. This will help us update the tree to work with the enforced explicit mutability flag requirement (go/immutable-pendingintents has more context). This flag is marked as deprecated and we hope to remove it once all PIs have been audited and use either FLAG_MUTABLE or FLAG_IMMUTABLE. FLAG_MUTABLE_UNAUDITED should not be relied on long term, and any usage is intended to be short term. Bug: 160794467 Test: TH Change-Id: I6a4f65d5364a611620b88e92c208aba7faaa13b8
This commit is contained in:
@@ -130,6 +130,7 @@ public final class PendingIntent implements Parcelable {
|
||||
FLAG_UPDATE_CURRENT,
|
||||
FLAG_IMMUTABLE,
|
||||
FLAG_MUTABLE,
|
||||
FLAG_MUTABLE_UNAUDITED,
|
||||
|
||||
Intent.FILL_IN_ACTION,
|
||||
Intent.FILL_IN_DATA,
|
||||
@@ -204,6 +205,13 @@ public final class PendingIntent implements Parcelable {
|
||||
*/
|
||||
public static final int FLAG_MUTABLE = 1<<25;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #FLAG_IMMUTABLE} or {@link #FLAG_MUTABLE} instead.
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
public static final int FLAG_MUTABLE_UNAUDITED = FLAG_MUTABLE;
|
||||
|
||||
/**
|
||||
* Exception thrown when trying to send through a PendingIntent that
|
||||
* has been canceled or is otherwise no longer able to execute the request.
|
||||
|
||||
Reference in New Issue
Block a user