diff options
author | Alex Johnston <acjohnston@google.com> | 2021-03-01 11:05:51 +0000 |
---|---|---|
committer | Alex Johnston <acjohnston@google.com> | 2021-03-03 18:13:21 +0000 |
commit | 0c3f0c51bc7232be56b658ea647544641f234b88 (patch) | |
tree | bf3689c5add1bc5c28237b2afd012202e9b4122f /keystore/java/android/security/AppUriAuthenticationPolicy.java | |
parent | 755168f912702a7606c6ad38180013eab5eedf54 (diff) |
AppUriAuthenticationPolicy and UrisToAliases equals and hashcode
Bug: 177979648
Test: atest android.devicepolicy.cts.CredentialManagementAppTest
atest android.devicepolicy.cts.AppUriAuthenticationPolicyTest
atest android.security.CredentialManagementAppTest
Change-Id: I66d715ba6b47749e2e89c037caecc29f02d3a017
Diffstat (limited to 'keystore/java/android/security/AppUriAuthenticationPolicy.java')
-rw-r--r-- | keystore/java/android/security/AppUriAuthenticationPolicy.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/keystore/java/android/security/AppUriAuthenticationPolicy.java b/keystore/java/android/security/AppUriAuthenticationPolicy.java index 0244ce97c0d4..df79912128fe 100644 --- a/keystore/java/android/security/AppUriAuthenticationPolicy.java +++ b/keystore/java/android/security/AppUriAuthenticationPolicy.java @@ -238,4 +238,21 @@ public final class AppUriAuthenticationPolicy implements Parcelable { return aliases; } + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof AppUriAuthenticationPolicy)) { + return false; + } + AppUriAuthenticationPolicy other = (AppUriAuthenticationPolicy) obj; + return Objects.equals(mAppToUris, other.mAppToUris); + } + + @Override + public int hashCode() { + return mAppToUris.hashCode(); + } + } |