Add IS_REMOTE extra for ClipData

This extra can be used to indicate that a ClipData comes from a
separate device rather than being local. It is a rendering hint
that can be used to take different behavior based on the source
device of copied data.

Bug: 246808749
Test: manual (no behavior change)
Merged-In: I6998b7a216fac73a1387367f4179efb95d7562c5
Change-Id: I6998b7a216fac73a1387367f4179efb95d7562c5
This commit is contained in:
Miranda Kephart
2022-10-18 09:48:55 -04:00
parent 73784f47ca
commit b4a5acfcc2

View File

@@ -139,21 +139,29 @@ public class ClipDescription implements Parcelable {
* 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";
/** Indicates that a ClipData's source is a remote device.
* <p>
* Type: boolean
* <p>
* This extra can be used to indicate that a ClipData comes from a separate device rather
* than being local. It is a rendering hint that can be used to take different behavior
* based on the source device of copied data.
* @hide
*/
public static final String EXTRA_IS_REMOTE_DEVICE = "android.content.extra.IS_REMOTE_DEVICE";
/** @hide */
@Retention(RetentionPolicy.SOURCE)
@IntDef(value =