diff options
author | Roshan Pius <rpius@google.com> | 2017-02-15 13:21:42 -0800 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2017-02-16 10:19:15 -0800 |
commit | 65d8ba5dd551cd132789e8feb270dfc7998dfbdc (patch) | |
tree | 00023a0385b5a75f5e8c8cd7a270f67e33b3d312 /tests/wifitests/src/com/android/server/wifi/hotspot2 | |
parent | d0f7cebec538f526929376cf1b18514148678d3c (diff) | |
download | android_frameworks_opt_net_wifi-65d8ba5dd551cd132789e8feb270dfc7998dfbdc.tar.gz android_frameworks_opt_net_wifi-65d8ba5dd551cd132789e8feb270dfc7998dfbdc.tar.bz2 android_frameworks_opt_net_wifi-65d8ba5dd551cd132789e8feb270dfc7998dfbdc.zip |
Passpoint: Change ANQP response handling
Currently, the ANQP done notification from WifiMonitor is used
as a trigger to fetch anqp data in PasspointEventHandler.
In the HIDL interface, the callback itself will contain all the
necessary ANQP data. So, change the currently handling to prepare for
integration with HIDL interface.
Changes in the CL:
1. Move the ANQP data fetching to WifiMonitor away from
PasspointEventHandler.
2. Change the params of the ANQP done result to include a newly created
struct (AnqpResult) which would contain the bssid and the ANPQ results.
3. Add a new public method in WifiMonitor to send the notification out
from WifiMonitor, which will be used by the HIDL interface in the future.
4. Remove the redundant PasspointEventHandler.parsANQPLines().
Note: There are no unit tests for any of these changes because this CL
is just moving things around and most of it is going to be removed when
we integrate with HIDL.
Bug: 35393853
Test: Connects to passpoint networks.
Test: Will send for regression tests.
Change-Id: I7fdf8fbdba13d267eb986db3f8a5854c606bcd4c
Diffstat (limited to 'tests/wifitests/src/com/android/server/wifi/hotspot2')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointEventHandlerTest.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointEventHandlerTest.java b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointEventHandlerTest.java index 3e6fa1407..5c2964e96 100644 --- a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointEventHandlerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointEventHandlerTest.java @@ -18,15 +18,15 @@ package com.android.server.wifi.hotspot2; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.anyString; -import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; import android.test.suitebuilder.annotation.SmallTest; + import com.android.server.wifi.WifiNative; import com.android.server.wifi.hotspot2.anqp.Constants; + import org.junit.Before; import org.junit.Test; import org.mockito.Mock; @@ -143,8 +143,7 @@ public class PasspointEventHandlerTest { */ @Test public void anqpRequestCompletedWithError() { - mHandler.notifyANQPDone(BSSID, false); - verify(mWifiNative, never()).scanResult(anyString()); + mHandler.notifyANQPDone(new AnqpEvent(BSSID, null)); verify(mCallbacks).onANQPResponse(BSSID, null); } } |