summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Seth Moore <sethmo@google.com> 2022-12-13 10:08:54 -0800
committer Seth Moore <sethmo@google.com> 2022-12-13 10:53:48 -0800
commit23fc5c8d575ef364941e60024780147d9a4a97bc (patch)
tree0fc65144efb77c3b18ca12f168ce75feb92db03a
parent8f870ada723111f83d68a51f52034b958d65b772 (diff)
Fix API feedback on AuthenticatedKeyMetadata
Make class final. Add @NonNull annotation to ctor param Fixes: 262381995 Test: atest android.security.identity.cts Change-Id: Icae24f120090ec03e532ffdf139513a1cb852c80
-rw-r--r--core/api/current.txt2
-rw-r--r--identity/java/android/security/identity/AuthenticationKeyMetadata.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index 5cea1592cecc..85e9a161d09a 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -37652,7 +37652,7 @@ package android.security.identity {
ctor public AlreadyPersonalizedException(@NonNull String, @NonNull Throwable);
}
- public class AuthenticationKeyMetadata {
+ public final class AuthenticationKeyMetadata {
method @NonNull public java.time.Instant getExpirationDate();
method @IntRange(from=0) public int getUsageCount();
}
diff --git a/identity/java/android/security/identity/AuthenticationKeyMetadata.java b/identity/java/android/security/identity/AuthenticationKeyMetadata.java
index d4c28f8d459a..c6abc22c305f 100644
--- a/identity/java/android/security/identity/AuthenticationKeyMetadata.java
+++ b/identity/java/android/security/identity/AuthenticationKeyMetadata.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019 The Android Open Source Project
+ * Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,11 +24,11 @@ import java.time.Instant;
/**
* Data about authentication keys.
*/
-public class AuthenticationKeyMetadata {
+public final class AuthenticationKeyMetadata {
private int mUsageCount;
private Instant mExpirationDate;
- AuthenticationKeyMetadata(int usageCount, Instant expirationDate) {
+ AuthenticationKeyMetadata(int usageCount, @NonNull Instant expirationDate) {
mUsageCount = usageCount;
mExpirationDate = expirationDate;
}