summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorQi Wu <siofive@google.com>2021-01-16 23:26:30 +0800
committerQi Wu <siofive@google.com>2021-02-02 18:11:41 +0000
commitcd6c58acd83c7a77783258f65dc99a0455e290d2 (patch)
tree859f74c25938f31e56aef3b506007450317be696 /core/java
parent182e90d1ea5cda262500c73085c17544fb62755d (diff)
Limited use key: feature flags.
Add feature flags to indicate whether KeyMint only enforce this feature in hardware with count == 1 or enforce with any number of the count (>=1). Test: compile Change-Id: Id9c13ee91b779164bd07ff20ae2b4c0e158fdb33 Merged-In: Id9c13ee91b779164bd07ff20ae2b4c0e158fdb33
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/content/pm/PackageManager.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 31beb6e6a565..742f48c7a6a3 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -3224,6 +3224,24 @@ public abstract class PackageManager {
@SdkConstant(SdkConstantType.FEATURE)
public static final String FEATURE_APP_ENUMERATION = "android.software.app_enumeration";
+ /**
+ * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: The device has
+ * a Keystore implementation that can only enforce limited use key in hardware with max usage
+ * count equals to 1.
+ */
+ @SdkConstant(SdkConstantType.FEATURE)
+ public static final String FEATURE_KEYSTORE_SINGLE_USE_KEY =
+ "android.hardware.keystore.single_use_key";
+
+ /**
+ * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: The device has
+ * a Keystore implementation that can enforce limited use key in hardware with any max usage
+ * count (including count equals to 1).
+ */
+ @SdkConstant(SdkConstantType.FEATURE)
+ public static final String FEATURE_KEYSTORE_LIMITED_USE_KEY =
+ "android.hardware.keystore.limited_use_key";
+
/** @hide */
public static final boolean APP_ENUMERATION_ENABLED_BY_DEFAULT = true;