PermissionInfoCompat

Added in 1.1.0

public final class PermissionInfoCompat


Helper for accessing features in PermissionInfo.

Summary

Public methods

static int

Return the base permission type of a PermissionInfo.

static int

Return the additional protection flags of a PermissionInfo.

Public methods

getProtection

Added in 1.1.0
public static int getProtection(@NonNull PermissionInfo permissionInfo)

Return the base permission type of a PermissionInfo.

Value is one of the following:

  • PermissionInfo.PROTECTION_NORMAL
  • PermissionInfo.PROTECTION_DANGEROUS
  • PermissionInfo.PROTECTION_SIGNATURE
  • PermissionInfo.PROTECTION_SIGNATURE_OR_SYSTEM

getProtectionFlags

Added in 1.1.0
public static int getProtectionFlags(@NonNull PermissionInfo permissionInfo)

Return the additional protection flags of a PermissionInfo.

Value is either 0 or a combination of the following:

  • PermissionInfo.PROTECTION_FLAG_PRIVILEGED
  • PermissionInfo.PROTECTION_FLAG_SYSTEM
  • PermissionInfo.PROTECTION_FLAG_DEVELOPMENT
  • PermissionInfo.PROTECTION_FLAG_APPOP
  • PermissionInfo.PROTECTION_FLAG_PRE23
  • PermissionInfo.PROTECTION_FLAG_INSTALLER
  • PermissionInfo.PROTECTION_FLAG_VERIFIER
  • PermissionInfo.PROTECTION_FLAG_PREINSTALLED
  • PermissionInfo.PROTECTION_FLAG_SETUP
  • PermissionInfo.PROTECTION_FLAG_INSTANT
  • PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY