diff options
author | Chad Brubaker <cbrubaker@google.com> | 2016-05-02 13:17:31 -0700 |
---|---|---|
committer | Chad Brubaker <cbrubaker@google.com> | 2016-06-30 09:23:15 -0700 |
commit | 4de59ef3238c4bf4b8c994b83be2c703ffad2a5b (patch) | |
tree | 4a66736e782345c88a1d516e5b434852900c2fb9 /keystore/java/android/security/KeyChain.java | |
parent | b657b9b7febd38e309bef943dcfc55dbb7b30c2c (diff) |
Deprecate ACTION_STORAGE_CHANGED
ACTION_STORAGE_CHANGED is too noisy and fires on too many events. It has
been split into ACTION_KEYCHAIN_CHANGED for
addition/modification/removal of user certificates and keys,
ACTION_TRUST_STORE_CHANGED for changes the the user added and system CA
stores on the device and ACTION_KEY_ACCESS_CHANGED for changes to key
grants.
ACTION_STORAGE_CHANGED will only be sent to applications targeting N
and below. Applications targeting future releases should use the new
broadcasts.
Bug:28450538
Change-Id: I34ff838e9858db65f7308ca2b0f7d652c48fae17
Diffstat (limited to 'keystore/java/android/security/KeyChain.java')
-rw-r--r-- | keystore/java/android/security/KeyChain.java | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/keystore/java/android/security/KeyChain.java b/keystore/java/android/security/KeyChain.java index cce58c2096f3..9481c462e41c 100644 --- a/keystore/java/android/security/KeyChain.java +++ b/keystore/java/android/security/KeyChain.java @@ -179,7 +179,6 @@ public final class KeyChain { // Compatible with old android.security.Credentials.PKCS12 public static final String EXTRA_PKCS12 = "PKCS12"; - /** * Broadcast Action: Indicates the trusted storage has changed. Sent when * one of this happens: @@ -191,10 +190,50 @@ public final class KeyChain { * <li>trusted storage is reset (all user certs are cleared), * <li>when permission to access a private key is changed. * </ul> + * + * @deprecated Use {@link #ACTION_KEYCHAIN_CHANGED}, {@link #ACTION_STORAGE_CHANGED} or + * {@link #ACTION_KEY_ACCESS_CHANGED}. */ public static final String ACTION_STORAGE_CHANGED = "android.security.STORAGE_CHANGED"; /** + * Broadcast Action: Indicates the contents of the keychain has changed. Sent when a KeyChain + * entry is added, modified or removed. + */ + public static final String ACTION_KEYCHAIN_CHANGED = "android.security.action.KEYCHAIN_CHANGED"; + + /** + * Broadcast Action: Indicates the contents of the trusted certificate store has changed. Sent + * when one the following occurs: + * + * <ul> + * <li>A pre-installed CA is disabled or re-enabled</li> + * <li>A CA is added or removed from the trust store</li> + * </ul> + */ + public static final String ACTION_TRUST_STORE_CHANGED = + "android.security.action.TRUST_STORE_CHANGED"; + + /** + * Broadcast Action: Indicates that the access permissions for a private key have changed. + * + */ + public static final String ACTION_KEY_ACCESS_CHANGED = + "android.security.action.KEY_ACCESS_CHANGED"; + + /** + * Used as a String extra field in {@link #ACTION_KEY_ACCESS_CHANGED} to supply the alias of + * the key. + */ + public static final String EXTRA_KEY_ALIAS = "android.security.extra.KEY_ALIAS"; + + /** + * Used as a boolean extra field in {@link #ACTION_KEY_ACCESS_CHANGED} to supply if the key is + * accessible to the application. + */ + public static final String EXTRA_KEY_ACCESSIBLE = "android.security.extra.KEY_ACCESSIBLE"; + + /** * Returns an {@code Intent} that can be used for credential * installation. The intent may be used without any extras, in * which case the user will be able to install credentials from |