Keystore 2.0: Add namespace locksettings.

This namespace is required by LocksettingsService to protect the
synthetic password key from removal when the user removes the
credentials or wipes AID_SYSTEM app data.

Bug: 184664830
Test: N/A
Change-Id: Ie752a75d2cb2ebf1f4e5814bc2cbc807cc754c21
This commit is contained in:
Janis Danisevskis
2021-04-15 09:32:16 -07:00
parent cbe7e963ab
commit 52e19940b1

View File

@@ -904,6 +904,7 @@ public abstract class KeyProperties {
@IntDef(prefix = { "NAMESPACE_" }, value = {
NAMESPACE_APPLICATION,
NAMESPACE_WIFI,
NAMESPACE_LOCKSETTINGS,
})
public @interface Namespace {}
@@ -924,6 +925,13 @@ public abstract class KeyProperties {
@SystemApi
public static final int NAMESPACE_WIFI = 102;
/**
* The namespace identifier for the LOCKSETTINGS Keystore namespace.
* This must be kept in sync with system/sepolicy/private/keystore2_key_contexts
* @hide
*/
public static final int NAMESPACE_LOCKSETTINGS = 103;
/**
* For legacy support, translate namespaces into known UIDs.
* @hide