diff --git a/core/java/android/content/AttributionSource.java b/core/java/android/content/AttributionSource.java index b13bf0940d347..2c155d5884ac2 100644 --- a/core/java/android/content/AttributionSource.java +++ b/core/java/android/content/AttributionSource.java @@ -550,8 +550,27 @@ public final class AttributionSource implements Parcelable { } /** - * Permissions that should be considered revoked regardless if granted. + * Sets permissions which have been voluntarily "renounced" by the + * calling app. + *

+ * Interactions performed through services obtained from the created + * Context will ideally be treated as if these "renounced" permissions + * have not actually been granted to the app, regardless of their actual + * grant status. + *

+ * This is designed for use by separate logical components within an app + * which have no intention of interacting with data or services that are + * protected by the renounced permissions. + *

+ * Note that only {@link PermissionInfo#PROTECTION_DANGEROUS} + * permissions are supported by this mechanism. Additionally, this + * mechanism only applies to calls made through services obtained via + * {@link Context#getSystemService}; it has no effect on static or raw + * Binder calls. * + * @param renouncedPermissions The set of permissions to treat as + * renounced, which is as if not granted. + * @return This builder. * @hide */ @SystemApi diff --git a/core/java/android/content/ContextParams.java b/core/java/android/content/ContextParams.java index ace2ba721c108..5cc3a2420811e 100644 --- a/core/java/android/content/ContextParams.java +++ b/core/java/android/content/ContextParams.java @@ -162,16 +162,20 @@ public final class ContextParams { * Sets permissions which have been voluntarily "renounced" by the * calling app. *

- * Interactions performed through the created Context will ideally be - * treated as if these "renounced" permissions have not actually been - * granted to the app, regardless of their actual grant status. + * Interactions performed through services obtained from the created + * Context will ideally be treated as if these "renounced" permissions + * have not actually been granted to the app, regardless of their actual + * grant status. *

* This is designed for use by separate logical components within an app * which have no intention of interacting with data or services that are * protected by the renounced permissions. *

* Note that only {@link PermissionInfo#PROTECTION_DANGEROUS} - * permissions are supported by this mechanism. + * permissions are supported by this mechanism. Additionally, this + * mechanism only applies to calls made through services obtained via + * {@link Context#getSystemService}; it has no effect on static or raw + * Binder calls. * * @param renouncedPermissions The set of permissions to treat as * renounced, which is as if not granted.