diff options
author | David Su <dysu@google.com> | 2020-05-28 22:26:52 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-05-28 22:26:52 +0000 |
commit | 75f16940174b144426004977efaead4a95a1e6a0 (patch) | |
tree | 1136dbb1cf23f45251a1586b81930fe9cd33463f /tests | |
parent | 819407400d52526b8f392e5842e3ddd3059558a9 (diff) | |
parent | 41769d6bebe1cda033204823aee61c8f205fdeff (diff) |
Merge "Add overlays for stationary/moving PNO scan interval" into rvc-dev
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java index fe16b2833..7bf21fb27 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java @@ -160,6 +160,10 @@ public class WifiConnectivityManagerTest extends WifiBaseTest { HIGH_MVMT_RSSI_DELTA); resources.setInteger(R.integer.config_wifiInitialPartialScanChannelCacheAgeMins, CHANNEL_CACHE_AGE_MINS); + resources.setInteger(R.integer.config_wifiMovingPnoScanIntervalMillis, + MOVING_PNO_SCAN_INTERVAL_MILLIS); + resources.setInteger(R.integer.config_wifiStationaryPnoScanIntervalMillis, + STATIONARY_PNO_SCAN_INTERVAL_MILLIS); } /** @@ -244,6 +248,8 @@ public class WifiConnectivityManagerTest extends WifiBaseTest { private static final int TEMP_BSSID_BLOCK_DURATION_MS = 10 * 1000; // 10 seconds private static final int TEST_CONNECTED_NETWORK_ID = 55; private static final int CHANNEL_CACHE_AGE_MINS = 14400; + private static final int MOVING_PNO_SCAN_INTERVAL_MILLIS = 20_000; + private static final int STATIONARY_PNO_SCAN_INTERVAL_MILLIS = 60_000; Context mockContext() { Context context = mock(Context.class); @@ -2730,8 +2736,7 @@ public class WifiConnectivityManagerTest extends WifiBaseTest { inOrder.verify(mWifiScanner).startDisconnectedPnoScan( scanSettingsCaptor.capture(), any(), any(), any()); - assertEquals(scanSettingsCaptor.getValue().periodInMs, - WifiConnectivityManager.MOVING_PNO_SCAN_INTERVAL_MS); + assertEquals(scanSettingsCaptor.getValue().periodInMs, MOVING_PNO_SCAN_INTERVAL_MILLIS); // initial connectivity state uses moving PNO scan interval, now set it to stationary mWifiConnectivityManager.setDeviceMobilityState( @@ -2740,8 +2745,7 @@ public class WifiConnectivityManagerTest extends WifiBaseTest { inOrder.verify(mWifiScanner).stopPnoScan(any()); inOrder.verify(mWifiScanner).startDisconnectedPnoScan( scanSettingsCaptor.capture(), any(), any(), any()); - assertEquals(scanSettingsCaptor.getValue().periodInMs, - WifiConnectivityManager.STATIONARY_PNO_SCAN_INTERVAL_MS); + assertEquals(scanSettingsCaptor.getValue().periodInMs, STATIONARY_PNO_SCAN_INTERVAL_MILLIS); verify(mScoringParams, times(2)).getEntryRssi(ScanResult.BAND_6_GHZ_START_FREQ_MHZ); verify(mScoringParams, times(2)).getEntryRssi(ScanResult.BAND_5_GHZ_START_FREQ_MHZ); verify(mScoringParams, times(2)).getEntryRssi(ScanResult.BAND_24_GHZ_START_FREQ_MHZ); @@ -2766,8 +2770,7 @@ public class WifiConnectivityManagerTest extends WifiBaseTest { inOrder.verify(mWifiScanner, never()).stopPnoScan(any()); inOrder.verify(mWifiScanner).startDisconnectedPnoScan( scanSettingsCaptor.capture(), any(), any(), any()); - assertEquals(scanSettingsCaptor.getValue().periodInMs, - WifiConnectivityManager.MOVING_PNO_SCAN_INTERVAL_MS); + assertEquals(scanSettingsCaptor.getValue().periodInMs, MOVING_PNO_SCAN_INTERVAL_MILLIS); mWifiConnectivityManager.setDeviceMobilityState( WifiManager.DEVICE_MOBILITY_STATE_LOW_MVMT); @@ -2805,8 +2808,7 @@ public class WifiConnectivityManagerTest extends WifiBaseTest { scanSettingsCaptor.capture(), any(), any(), any()); // check that now the PNO scan uses the stationary interval, even though it was set before // the PNO scan started - assertEquals(scanSettingsCaptor.getValue().periodInMs, - WifiConnectivityManager.STATIONARY_PNO_SCAN_INTERVAL_MS); + assertEquals(scanSettingsCaptor.getValue().periodInMs, STATIONARY_PNO_SCAN_INTERVAL_MILLIS); } /** |