diff options
| author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-02-03 16:42:01 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-02-03 16:42:01 +0000 |
| commit | 892c82e0f284ef9add4faad9f4cec8cfa2cace42 (patch) | |
| tree | a3fb29c564a50697f2649211e2b8cd4237fca242 /core/java | |
| parent | 752040beada0bba59f5e340de804616f18aa4118 (diff) | |
| parent | cca3d8120440b0c86c8389818583da1df067d7fc (diff) | |
Merge changes from topic "limited_use_keys"
* changes:
Add limited use keys related API into Keystore 2.0 SPI.
Limited use key: feature flags.
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/content/pm/PackageManager.java | 18 | ||||
| -rw-r--r-- | core/java/android/security/keymaster/KeymasterDefs.java | 1 |
2 files changed, 19 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; diff --git a/core/java/android/security/keymaster/KeymasterDefs.java b/core/java/android/security/keymaster/KeymasterDefs.java index f994d2930cd9..c39b8c5eb6d1 100644 --- a/core/java/android/security/keymaster/KeymasterDefs.java +++ b/core/java/android/security/keymaster/KeymasterDefs.java @@ -80,6 +80,7 @@ public final class KeymasterDefs { public static final int KM_TAG_MIN_SECONDS_BETWEEN_OPS = Tag.MIN_SECONDS_BETWEEN_OPS; // KM_UINT | 403; public static final int KM_TAG_MAX_USES_PER_BOOT = Tag.MAX_USES_PER_BOOT; // KM_UINT | 404; + public static final int KM_TAG_USAGE_COUNT_LIMIT = Tag.USAGE_COUNT_LIMIT; // KM_UINT | 405; public static final int KM_TAG_USER_ID = Tag.USER_ID; // KM_UINT | 501; public static final int KM_TAG_USER_SECURE_ID = Tag.USER_SECURE_ID; // KM_ULONG_REP | 502; |
