Language

PackagePolicyMode Enum

Definition

Identifies how a PackagePolicy interprets its package names: as a blocklist, as an allowlist, or as an allowlist that also allows system packages.

public enum PackagePolicyMode
type PackagePolicyMode = 
Inheritance
PackagePolicyMode

Fields

Name Value Description
Blocklist 1

PackagePolicy type indicator for PackagePolicy

This constant indicates that all packages are allowed except for the packages returned by PackagePolicy.getPackageNames(), which acts as a denylist.

Android reference for android.app.admin.PackagePolicy.PACKAGE_POLICY_BLOCKLIST.

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.

AllowlistAndSystem 2

PackagePolicy type indicator for PackagePolicy

This constant indicates system packages are allowed in addition to the packages returned by PackagePolicy.getPackageNames(), which acts as an allowlist.

Functions that accept PackagePolicy will further clarify how this policy is interpreted.

Android reference for android.app.admin.PackagePolicy.PACKAGE_POLICY_ALLOWLIST_AND_SYSTEM.

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.

Allowlist 3

PackagePolicy type indicator for PackagePolicy

This constant indicates that all packages are denied except for the packages returned by PackagePolicy.getPackageNames(), which acts as an allowlist.

Android reference for android.app.admin.PackagePolicy.PACKAGE_POLICY_ALLOWLIST.

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.

Remarks

The PackagePolicy(PackagePolicyMode) constructors take one of these values, and the PolicyType property returns it. APIs that accept a PackagePolicy can clarify how they apply the policy.

Applies to