summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Plass <mplass@google.com>2018-03-06 16:00:33 -0800
committerMichael Plass <mplass@google.com>2018-03-20 11:08:00 -0700
commit2d5bf2ffab544ae02b295910f55e56f163e45ec8 (patch)
treefed9a49d0ae33c41aa7f1b1485be6c3b38612437 /tests
parent43932b3defc6cc2d3e110fa3c3a9f610c33b98e5 (diff)
Use wifi ScoringParams for rssi thresholds
Bug: 65216267 Test: atest FrameworkWifiTests Change-Id: I6e7d67e166cba3d5da2d1ab9ffc5096efd5f02d4
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
index 1163b0772..97ba7d869 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
@@ -179,6 +179,7 @@ public class WifiNetworkSelectorTest {
// simulate a disconnected state
when(mWifiInfo.is24GHz()).thenReturn(true);
when(mWifiInfo.is5GHz()).thenReturn(false);
+ when(mWifiInfo.getFrequency()).thenReturn(2400);
when(mWifiInfo.getRssi()).thenReturn(-70);
when(mWifiInfo.getNetworkId()).thenReturn(WifiConfiguration.INVALID_NETWORK_ID);
when(mWifiInfo.getBSSID()).thenReturn(null);
@@ -361,6 +362,7 @@ public class WifiNetworkSelectorTest {
when(mWifiInfo.getBSSID()).thenReturn(bssids[0]);
when(mWifiInfo.is24GHz()).thenReturn(false);
when(mWifiInfo.is5GHz()).thenReturn(true);
+ when(mWifiInfo.getFrequency()).thenReturn(5000);
when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()
+ WifiNetworkSelector.MINIMUM_NETWORK_SELECTION_INTERVAL_MS + 2000);
@@ -407,6 +409,7 @@ public class WifiNetworkSelectorTest {
when(mWifiInfo.getBSSID()).thenReturn(bssids[0]);
when(mWifiInfo.is24GHz()).thenReturn(false);
when(mWifiInfo.is5GHz()).thenReturn(true);
+ when(mWifiInfo.getFrequency()).thenReturn(5000);
when(mWifiInfo.getRssi()).thenReturn(levels[0]);
when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()
@@ -483,6 +486,7 @@ public class WifiNetworkSelectorTest {
when(mWifiInfo.getBSSID()).thenReturn(bssids[0]);
when(mWifiInfo.is24GHz()).thenReturn(true);
when(mWifiInfo.is5GHz()).thenReturn(false);
+ when(mWifiInfo.getFrequency()).thenReturn(2400);
when(mWifiInfo.getRssi()).thenReturn(levels[0]);
when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()
+ WifiNetworkSelector.MINIMUM_NETWORK_SELECTION_INTERVAL_MS + 2000);
@@ -910,6 +914,7 @@ public class WifiNetworkSelectorTest {
when(mWifiInfo.getBSSID()).thenReturn(bssids[0]);
when(mWifiInfo.is24GHz()).thenReturn(!ScanResult.is5GHz(freqs[0]));
when(mWifiInfo.is5GHz()).thenReturn(ScanResult.is5GHz(freqs[0]));
+ when(mWifiInfo.getFrequency()).thenReturn(freqs[0]);
when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()
+ WifiNetworkSelector.MINIMUM_NETWORK_SELECTION_INTERVAL_MS + 2000);