PackageManagerCompat

public final class PackageManagerCompat
extends Object

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


Helper for accessing features in PackageManager.

Summary

Constants

String ACTION_PERMISSION_REVOCATION_SETTINGS

Activity action: creates an intent to redirect the user to UI to turn on/off their permission revocation settings.

Public methods

static ListenableFuture<Integer> getUnusedAppRestrictionsStatus(Context context)

Returns the status of Unused App Restrictions for the current application.

Inherited methods

Constants

ACTION_PERMISSION_REVOCATION_SETTINGS

public static final String ACTION_PERMISSION_REVOCATION_SETTINGS

Activity action: creates an intent to redirect the user to UI to turn on/off their permission revocation settings.

Constant Value: "android.intent.action.AUTO_REVOKE_PERMISSIONS"

Public methods

getUnusedAppRestrictionsStatus

public static ListenableFuture<Integer> getUnusedAppRestrictionsStatus (Context context)

Returns the status of Unused App Restrictions for the current application. In other words, whether the features are available and if so, enabled for the application. The returned value is a ListenableFuture with an Integer corresponding to a value in UnusedAppRestrictionsConstants. The possible values are as follows:

Compatibility behavior:

Parameters
context Context

Returns
ListenableFuture<Integer>