PackageManager.SetAutoRevokeWhitelisted(String, Boolean) Method

Definition

Marks an application exempt from having its permissions be automatically revoked when the app is unused for an extended period of time.

[Android.Runtime.Register("setAutoRevokeWhitelisted", "(Ljava/lang/String;Z)Z", "GetSetAutoRevokeWhitelisted_Ljava_lang_String_ZHandler", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.WHITELIST_AUTO_REVOKE_PERMISSIONS")]
public virtual bool SetAutoRevokeWhitelisted (string packageName, bool whitelisted);
[<Android.Runtime.Register("setAutoRevokeWhitelisted", "(Ljava/lang/String;Z)Z", "GetSetAutoRevokeWhitelisted_Ljava_lang_String_ZHandler", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.WHITELIST_AUTO_REVOKE_PERMISSIONS")>]
abstract member SetAutoRevokeWhitelisted : string * bool -> bool
override this.SetAutoRevokeWhitelisted : string * bool -> bool

Parameters

packageName
String

The app for which to set exemption.

whitelisted
Boolean

Whether the app should be whitelisted.

Returns

Boolean

whether any change took effect.

Attributes

Remarks

Java documentation for android.content.pm.PackageManager.setAutoRevokeWhitelisted(java.lang.String, 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