diff options
| author | Jon Moeller <moellerj@google.com> | 2022-03-29 02:04:29 +0000 |
|---|---|---|
| committer | Jon Moeller <moellerj@google.com> | 2022-03-29 20:50:27 +0000 |
| commit | 03efadfcfb83baa597e48c9e99dfb5ae56e28bf6 (patch) | |
| tree | f494afea3e24109252361ad7bbeed47379ea9eff /core/java/android/content/ClipDescription.java | |
| parent | 228a605dd24b7cf996ff6e71f20ade0527707fae (diff) | |
Add Extra to mark ClipData items as "sensitive".
This extra enables applications to mark ClipData items as sensitive,
indicating that the data within should not ordinarily be displayed.
Applications (e.g. IMEs that store clipboard history) can use
this flag to prevent sensitive data from being unintentionally
displayed on screen.
Bug: 195554988
Test: N/A
Change-Id: Ibccd3944842a40d3e5afec2dd99f32eb7a3564db
Diffstat (limited to 'core/java/android/content/ClipDescription.java')
| -rw-r--r-- | core/java/android/content/ClipDescription.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/content/ClipDescription.java b/core/java/android/content/ClipDescription.java index 2ecd71bc1f06..bf466116009b 100644 --- a/core/java/android/content/ClipDescription.java +++ b/core/java/android/content/ClipDescription.java @@ -134,6 +134,26 @@ public class ClipDescription implements Parcelable { public static final String EXTRA_LOGGING_INSTANCE_ID = "android.intent.extra.LOGGING_INSTANCE_ID"; + /** + * Indicates that a ClipData contains potentially sensitive information, such as a + * password or credit card number. + * <p> + * Type: boolean + * </p> + * <p> + * This extra can be used to indicate that a ClipData contains sensitive information that + * should be redacted or hidden from view until a user takes explicit action to reveal it + * (e.g., by pasting). + * </p> + * <p> + * Adding this extra does not change clipboard behavior or add additional security to + * the ClipData. Its purpose is essentially a rendering hint from the source application, + * asking that the data within be obfuscated or redacted, unless the user has taken action + * to make it visible. + * </p> + */ + public static final String EXTRA_IS_SENSITIVE = "android.content.extra.IS_SENSITIVE"; + /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(value = |
