diff options
author | Hai Shalom <haishalom@google.com> | 2020-03-13 17:21:49 -0700 |
---|---|---|
committer | Hai Shalom <haishalom@google.com> | 2020-03-13 18:18:43 -0700 |
commit | f88368556d981bcc4d5b5890ccf54f2f4b85c9ca (patch) | |
tree | 6bf4b0ec56864df0433b5b05a20b6ab33bfe3f8b /wifi/java | |
parent | 83d02a976abfed340bf848f0508a8118939d5008 (diff) |
[Passpoint] Fix credential unique ID calculation
Fix credential unique ID to allow multiple instances of same
credential type.
Bug: 151478195
Test: atest CredentialTest PasspointConfigurationTest
Change-Id: Ie99fe0430aa31ee7d461150eca5c9ce718f75aaf
Diffstat (limited to 'wifi/java')
-rw-r--r-- | wifi/java/android/net/wifi/hotspot2/pps/Credential.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/Credential.java b/wifi/java/android/net/wifi/hotspot2/pps/Credential.java index 65e8b3d9283d..fa806e7797cd 100644 --- a/wifi/java/android/net/wifi/hotspot2/pps/Credential.java +++ b/wifi/java/android/net/wifi/hotspot2/pps/Credential.java @@ -1037,18 +1037,7 @@ public final class Credential implements Parcelable { * @return a Unique identifier for a Credential object */ public int getUniqueId() { - int usedCredential; - - // Initialize usedCredential based on the credential type of the profile - if (mUserCredential != null) { - usedCredential = 0; - } else if (mCertCredential != null) { - usedCredential = 1; - } else { - usedCredential = 2; - } - - return Objects.hash(usedCredential, mRealm); + return Objects.hash(mUserCredential, mCertCredential, mSimCredential, mRealm); } @Override |