diff options
author | Mike Harris <mwharris@google.com> | 2018-04-26 15:20:10 -0700 |
---|---|---|
committer | Rubin Xu <rubinxu@google.com> | 2018-04-30 09:27:31 +0000 |
commit | cd0eb716c52b20fbc051d1da79a8fe1b91c1f4c3 (patch) | |
tree | 7b6b3b9a071026b5cbac8f1c03f21e7ac96b5b1c /keystore/java/android/security/KeyChain.java | |
parent | 8785209fd7e7172cb096350b4007d5d9f8ef3208 (diff) |
Use the @Nullable annotations for choosePrivateKeyAlias.
Both the code and docstring support this, but the parameters weren't
annotated.
Test: it builds locally
Change-Id: I16beddcd74a86047ce9aaf37007d96f3e8e0d4e0
Merged-In: I16beddcd74a86047ce9aaf37007d96f3e8e0d4e0
Fix: 78868934
(cherry picked from commit b7c5eddc53c3872b661222ae30270d95cfe63b4e)
Diffstat (limited to 'keystore/java/android/security/KeyChain.java')
-rw-r--r-- | keystore/java/android/security/KeyChain.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/keystore/java/android/security/KeyChain.java b/keystore/java/android/security/KeyChain.java index 46a7fa8d5e28..066e17ccb31d 100644 --- a/keystore/java/android/security/KeyChain.java +++ b/keystore/java/android/security/KeyChain.java @@ -371,9 +371,9 @@ public final class KeyChain { * a private key; used only to call startActivity(); must not * be null. * @param response Callback to invoke when the request completes; - * must not be null + * must not be null. * @param keyTypes The acceptable types of asymmetric keys such as - * "RSA" or "DSA", or a null array. + * "RSA" or "DSA", or null. * @param issuers The acceptable certificate issuers for the * certificate matching the private key, or null. * @param host The host name of the server requesting the @@ -385,7 +385,8 @@ public final class KeyChain { */ public static void choosePrivateKeyAlias(@NonNull Activity activity, @NonNull KeyChainAliasCallback response, - @KeyProperties.KeyAlgorithmEnum String[] keyTypes, Principal[] issuers, + @Nullable @KeyProperties.KeyAlgorithmEnum String[] keyTypes, + @Nullable Principal[] issuers, @Nullable String host, int port, @Nullable String alias) { Uri uri = null; if (host != null) { @@ -421,9 +422,9 @@ public final class KeyChain { * a private key; used only to call startActivity(); must not * be null. * @param response Callback to invoke when the request completes; - * must not be null + * must not be null. * @param keyTypes The acceptable types of asymmetric keys such as - * "EC" or "RSA", or a null array. + * "EC" or "RSA", or null. * @param issuers The acceptable certificate issuers for the * certificate matching the private key, or null. * @param uri The full URI the server is requesting the certificate @@ -433,7 +434,8 @@ public final class KeyChain { */ public static void choosePrivateKeyAlias(@NonNull Activity activity, @NonNull KeyChainAliasCallback response, - @KeyProperties.KeyAlgorithmEnum String[] keyTypes, Principal[] issuers, + @Nullable @KeyProperties.KeyAlgorithmEnum String[] keyTypes, + @Nullable Principal[] issuers, @Nullable Uri uri, @Nullable String alias) { /* * TODO currently keyTypes, issuers are unused. They are meant |