summaryrefslogtreecommitdiff
path: root/keystore/java/android/security/KeyStoreParameter.java
diff options
context:
space:
mode:
authorAlex Klyubin <klyubin@google.com>2015-05-07 09:51:21 -0700
committerAlex Klyubin <klyubin@google.com>2015-05-07 09:51:21 -0700
commit27dd1a22275e92afed612655822438ab3df15356 (patch)
treec92faf5ab41e59ea9801d7af048140bad636d37a /keystore/java/android/security/KeyStoreParameter.java
parent6223ec129b256526d8c30920271b2ee3960bcf1f (diff)
Adjust the Javadoc for user authentication timeout.
The Javadoc incorrectly stated that: * 0 means authentication required for every use. * -1 means that timeout is not specified and the key can be any time. Bug: 18088752 Change-Id: Ie5f37e74dc207f23443527ac1725ae8a37213d75
Diffstat (limited to 'keystore/java/android/security/KeyStoreParameter.java')
-rw-r--r--keystore/java/android/security/KeyStoreParameter.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/keystore/java/android/security/KeyStoreParameter.java b/keystore/java/android/security/KeyStoreParameter.java
index b4747e937040..4c4f0dee60e6 100644
--- a/keystore/java/android/security/KeyStoreParameter.java
+++ b/keystore/java/android/security/KeyStoreParameter.java
@@ -218,10 +218,12 @@ public final class KeyStoreParameter implements ProtectionParameter {
/**
* Gets the duration of time (seconds) for which this key can be used after the user is
- * successfully authenticated.
+ * successfully authenticated. This has effect only if user authentication is required.
*
- * @return duration in seconds or {@code -1} if not restricted. {@code 0} means authentication
- * is required for every use of the key.
+ * @return duration in seconds or {@code -1} if authentication is required for every use of the
+ * key.
+ *
+ * @see #isUserAuthenticationRequired()
*/
public int getUserAuthenticationValidityDurationSeconds() {
return mUserAuthenticationValidityDurationSeconds;
@@ -462,7 +464,7 @@ public final class KeyStoreParameter implements ProtectionParameter {
*
* <p>By default, the user needs to authenticate for every use of the key.
*
- * @param seconds duration in seconds or {@code 0} if the user needs to authenticate for
+ * @param seconds duration in seconds or {@code -1} if the user needs to authenticate for
* every use of the key.
*
* @see #setUserAuthenticationRequired(boolean)