diff options
| author | 2020-11-20 21:30:14 +0000 | |
|---|---|---|
| committer | 2020-11-20 21:30:14 +0000 | |
| commit | cb5e8c50879f2c612befe243ae56c4e27d0857be (patch) | |
| tree | 74c28b668babbd0af2324529452830565ca99bdc | |
| parent | 44e16cd59f2e5128e14df1f7c82475b236e63a39 (diff) | |
| parent | 11a9f15e5f8dbfe4ef579e4cef52ad116a0dfa4d (diff) | |
Merge "Update the docs for FLAG_UPDATE_CURRENT and FLAG_IMMUTABLE"
| -rw-r--r-- | core/java/android/app/PendingIntent.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java index f76a75749480..9dbf1ff6f7c9 100644 --- a/core/java/android/app/PendingIntent.java +++ b/core/java/android/app/PendingIntent.java @@ -179,6 +179,12 @@ public final class PendingIntent implements Parcelable { * extras change, and don't care that any entities that received your * previous PendingIntent will be able to launch it with your new * extras even if they are not explicitly given to it. + * + * <p>{@link #FLAG_UPDATE_CURRENT} still works even if {@link + * #FLAG_IMMUTABLE} is set - the creator of the PendingIntent can always + * update the PendingIntent itself. The IMMUTABLE flag only limits the + * ability to alter the semantics of the intent that is sent by {@link + * #send} by the invoker of {@link #send}. */ public static final int FLAG_UPDATE_CURRENT = 1<<27; @@ -187,6 +193,11 @@ public final class PendingIntent implements Parcelable { * This means that the additional intent argument passed to the send * methods to fill in unpopulated properties of this intent will be * ignored. + * + * <p>{@link #FLAG_IMMUTABLE} only limits the ability to alter the + * semantics of the intent that is sent by {@link #send} by the invoker of + * {@link #send}. The creator of the PendingIntent can always update the + * PendingIntent itself via {@link #FLAG_UPDATE_CURRENT}. */ public static final int FLAG_IMMUTABLE = 1<<26; |