summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/ConfigurationMapTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ConfigurationMapTest.java b/tests/wifitests/src/com/android/server/wifi/ConfigurationMapTest.java
index b433d94cf..02994ecad 100644
--- a/tests/wifitests/src/com/android/server/wifi/ConfigurationMapTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/ConfigurationMapTest.java
@@ -333,4 +333,23 @@ public class ConfigurationMapTest extends WifiBaseTest {
mConfigs.clear();
assertNull(mConfigs.getByScanResultForCurrentUser(scanResult));
}
+
+ @Test
+ public void testScanResultDoesNotMatchForWifiNetworkSpecifier() {
+ // Add regular saved network, this should create a scan result match info cache entry.
+ WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
+ ScanResult scanResult = createScanResultForNetwork(config);
+ config.networkId = 5;
+ mConfigs.put(config);
+ assertNotNull(mConfigs.getByScanResultForCurrentUser(scanResult));
+
+ mConfigs.clear();
+
+ // Create WifiNetworkSpecifier network, this should not create a scan result match info
+ // cache entry.
+ config.ephemeral = true;
+ config.fromWifiNetworkSpecifier = true;
+ mConfigs.put(config);
+ assertNull(mConfigs.getByScanResultForCurrentUser(scanResult));
+ }
}