Condividi tramite


PackageInstaller.SessionParams.SetAutoRevokePermissionsMode(Boolean) Method

Definition

Sets whether permissions should be auto-revoked if this package is unused for an extended periodd of time.

[Android.Runtime.Register("setAutoRevokePermissionsMode", "(Z)V", "GetSetAutoRevokePermissionsMode_ZHandler", ApiSince=30)]
public virtual void SetAutoRevokePermissionsMode (bool shouldAutoRevoke);
[<Android.Runtime.Register("setAutoRevokePermissionsMode", "(Z)V", "GetSetAutoRevokePermissionsMode_ZHandler", ApiSince=30)>]
abstract member SetAutoRevokePermissionsMode : bool -> unit
override this.SetAutoRevokePermissionsMode : bool -> unit

Parameters

shouldAutoRevoke
Boolean

whether permissions should be auto-revoked.

Attributes

Remarks

Sets whether permissions should be auto-revoked if this package is unused for an extended periodd of time.

It's disabled by default but generally the installer should enable it for most packages, excluding only those where doing so might cause breakage that cannot be easily addressed by simply re-requesting the permission(s).

If user explicitly enabled or disabled it via settings, this call is ignored.

This member is deprecated. No longer used

Java documentation for android.content.pm.PackageInstaller.SessionParams.setAutoRevokePermissionsMode(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to