diff options
author | Ecco Park <eccopark@google.com> | 2019-01-13 04:48:45 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-01-13 04:48:45 +0000 |
commit | 63da3825d91eef8d21d694d0ccb7f4687f66e297 (patch) | |
tree | 4ddd31d24e4cff7c37d5512cd111ec32624e1de1 /tests/wifitests/src/com/android/server/wifi/hotspot2 | |
parent | 066ca866972a3c3931cdc4292d0ccb63c80bea57 (diff) | |
parent | 1e4b1cff543681a6d4c1ecfef25c0ad46df620d4 (diff) | |
download | android_frameworks_opt_net_wifi-63da3825d91eef8d21d694d0ccb7f4687f66e297.tar.gz android_frameworks_opt_net_wifi-63da3825d91eef8d21d694d0ccb7f4687f66e297.tar.bz2 android_frameworks_opt_net_wifi-63da3825d91eef8d21d694d0ccb7f4687f66e297.zip |
Merge "passpoint: fix the matching logic for EAP-method in NAI realm"
Diffstat (limited to 'tests/wifitests/src/com/android/server/wifi/hotspot2')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/hotspot2/ANQPMatcherTest.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/hotspot2/ANQPMatcherTest.java b/tests/wifitests/src/com/android/server/wifi/hotspot2/ANQPMatcherTest.java index 7225c2abf..134d27d0a 100644 --- a/tests/wifitests/src/com/android/server/wifi/hotspot2/ANQPMatcherTest.java +++ b/tests/wifitests/src/com/android/server/wifi/hotspot2/ANQPMatcherTest.java @@ -160,7 +160,8 @@ public class ANQPMatcherTest { /** * Verify that method match will be returned when the specified EAP - * method only matches a eap method in the NAI Realm ANQP element. + * method only matches a eap method in the NAI Realm ANQP element if the element does not have + * auth params. * * @throws Exception */ @@ -169,17 +170,18 @@ public class ANQPMatcherTest { // Test data. String providerRealm = "test.com"; String anqpRealm = "test2.com"; + NonEAPInnerAuth authParam = new NonEAPInnerAuth(NonEAPInnerAuth.AUTH_TYPE_MSCHAP); int eapMethodID = EAPConstants.EAP_TLS; - // Setup NAI Realm element. + // Setup NAI Realm element that has EAP method and no auth params. EAPMethod method = new EAPMethod(eapMethodID, new HashMap<Integer, Set<AuthParam>>()); NAIRealmData realmData = new NAIRealmData( - Arrays.asList(new String[] {anqpRealm}), Arrays.asList(new EAPMethod[] {method})); + Arrays.asList(new String[]{anqpRealm}), Arrays.asList(new EAPMethod[]{method})); NAIRealmElement element = new NAIRealmElement( - Arrays.asList(new NAIRealmData[] {realmData})); + Arrays.asList(new NAIRealmData[]{realmData})); assertEquals(AuthMatch.METHOD, - ANQPMatcher.matchNAIRealm(element, providerRealm, eapMethodID, null)); + ANQPMatcher.matchNAIRealm(element, providerRealm, eapMethodID, authParam)); } /** |