UnusedAppRestrictionsConstants

public final class UnusedAppRestrictionsConstants
extends Object

java.lang.Object
   ↳ androidx.core.content.UnusedAppRestrictionsConstants


Shared constants related to Unused App Restrictions (e.g. Permission Revocation, App Hibernation).

Summary

Constants

int API_30

Unused App Restrictions introduced by Android API 30 are enabled for this app: permission auto-reset.

int API_30_BACKPORT

Unused App Restrictions introduced by Android API 30, and since made available on earlier (API 23-29) devices are enabled for this app: permission auto-reset.

int API_31

Unused App Restrictions introduced by Android API 31 are enabled for this app: permission auto-reset and app hibernation.

int DISABLED

Any available Unused App Restrictions on the device are disabled for this app.

int ERROR

The status of Unused App Restrictions could not be retrieved from this app.

int FEATURE_NOT_AVAILABLE

There are no available Unused App Restrictions for this app.

Inherited methods

Constants

API_30

public static final int API_30

Unused App Restrictions introduced by Android API 30 are enabled for this app: permission auto-reset. Note: This value is only used on API 30 or later devices.

Constant Value: 4 (0x00000004)

API_30_BACKPORT

public static final int API_30_BACKPORT

Unused App Restrictions introduced by Android API 30, and since made available on earlier (API 23-29) devices are enabled for this app: permission auto-reset. Note: This value is only used on API 29 or earlier devices.

Constant Value: 3 (0x00000003)

API_31

public static final int API_31

Unused App Restrictions introduced by Android API 31 are enabled for this app: permission auto-reset and app hibernation. Note: This value is only used on API 31 or later devices.

Constant Value: 5 (0x00000005)

DISABLED

public static final int DISABLED

Any available Unused App Restrictions on the device are disabled for this app. In other words, this app is exempt from having its permissions automatically removed or being hibernated.

Constant Value: 2 (0x00000002)

ERROR

public static final int ERROR

The status of Unused App Restrictions could not be retrieved from this app. Note: check the logs for the reason (e.g. if the app's target SDK version < 30 or the user is in locked device boot mode).

Constant Value: 0 (0x00000000)

FEATURE_NOT_AVAILABLE

public static final int FEATURE_NOT_AVAILABLE

There are no available Unused App Restrictions for this app.

Constant Value: 1 (0x00000001)