diff options
author | Ecco Park <eccopark@google.com> | 2019-03-01 20:38:52 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-03-01 20:38:52 +0000 |
commit | dbdfcdccd094d88a75a3dd80ebb97b1c5ae976da (patch) | |
tree | ac8996106b004d6116ebd75e494f55d123e2f459 /tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java | |
parent | 3fe7f77ce699e7848cddb186c8da5aeae4a05902 (diff) | |
parent | bca718fef43a315820c233f992a36dc9560de68f (diff) | |
download | android_frameworks_opt_net_wifi-dbdfcdccd094d88a75a3dd80ebb97b1c5ae976da.tar.gz android_frameworks_opt_net_wifi-dbdfcdccd094d88a75a3dd80ebb97b1c5ae976da.tar.bz2 android_frameworks_opt_net_wifi-dbdfcdccd094d88a75a3dd80ebb97b1c5ae976da.zip |
Merge "Filter out WifiConfiguration for Passpoint in getConfiguredNetworks"
Diffstat (limited to 'tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java index e4da770ee..9d3ea9f9c 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java @@ -542,7 +542,7 @@ public class WifiConfigManagerTest { /** * Verifies the addition of a single ephemeral network using * {@link WifiConfigManager#addOrUpdateNetwork(WifiConfiguration, int)} and verifies that - * the {@link WifiConfigManager#getSavedNetworks()} does not return this network. + * the {@link WifiConfigManager#getSavedNetworks(int)} does not return this network. */ @Test public void testAddSingleEphemeralNetwork() throws Exception { @@ -564,6 +564,24 @@ public class WifiConfigManagerTest { } /** + * Verifies the addition of a single passpoint network using + * {@link WifiConfigManager#addOrUpdateNetwork(WifiConfiguration, int)} and verifies that + * the {@link WifiConfigManager#getSavedNetworks(int)} ()} does not return this network. + */ + @Test + public void testAddSinglePasspointNetwork() throws Exception { + WifiConfiguration passpointNetwork = WifiConfigurationTestUtil.createPasspointNetwork(); + + verifyAddPasspointNetworkToWifiConfigManager(passpointNetwork); + // Ensure that configured network list is not empty. + assertFalse(mWifiConfigManager.getConfiguredNetworks().isEmpty()); + + // Ensure that this is not returned in the saved network list. + assertTrue(mWifiConfigManager.getSavedNetworks(Process.WIFI_UID).isEmpty()); + verify(mWcmListener, never()).onSavedNetworkAdded(passpointNetwork.networkId); + } + + /** * Verifies the addition of 2 networks (1 normal and 1 ephemeral) using * {@link WifiConfigManager#addOrUpdateNetwork(WifiConfiguration, int)} and ensures that * the ephemeral network configuration is not persisted in config store. |