summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRandy Pan <zpan@google.com>2016-04-29 13:51:36 -0700
committerRandy Pan <zpan@google.com>2016-04-29 15:22:22 -0700
commit50abba06efa7834b5309df561375e4a2e2df630d (patch)
tree30b6c04bb6a1876823c52f5cfc2bbae1fbd8042a /tests
parentddf3afe31f5e2174643e41943e9e9b881033981a (diff)
Fix check on current connected/connecting network
Keep track of the network BSSID of the last connection attempt. This BSSID is checked in case the phone is still in the process of connecting to that network. mWifiInfo is checked for the currently connected network. This is for the case that firmware performed roaming automatically. While there, addressed a checkstyle issue. Bug: 28462151 Change-Id: Ia9316048e0549036de1c20bf1f3099cfcda9a75e Test: WiFi unit tests
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java
index a8784a45c..89321e409 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java
@@ -25,6 +25,7 @@ import android.content.Context;
import android.content.res.Resources;
import android.net.wifi.ScanResult;
import android.net.wifi.ScanResult.InformationElement;
+import android.net.wifi.SupplicantState;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiScanner;
@@ -208,6 +209,7 @@ public class WifiConnectivityManagerTest {
when(wifiInfo.getNetworkId()).thenReturn(WifiConfiguration.INVALID_NETWORK_ID);
when(wifiInfo.getBSSID()).thenReturn(null);
+ when(wifiInfo.getSupplicantState()).thenReturn(SupplicantState.DISCONNECTED);
return wifiInfo;
}