diff options
author | Roshan Pius <rpius@google.com> | 2019-09-23 13:37:41 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2019-09-26 14:33:16 -0700 |
commit | 16b50ecceea67d41e3aae6746dafcab77c813051 (patch) | |
tree | 755682994a699079c465508a2790223cd6c1c01c /tests | |
parent | 029454382657b338cff31208656f1bca6f504ca0 (diff) |
WifiConfigManager: Allow multiple listeners
This allows multiple ClientModeImpl instances to register their listeners
along with the existing listener (WifiConnectivityManager).
Bug: 138403307
Bug: 117601161
Test: atest com.android.server.wifi
Change-Id: I977f47190978da4932c7aad0b9504ac47e50a407
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java | 2 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java index 855508425..6e798dd6b 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java @@ -216,7 +216,7 @@ public class WifiConfigManagerTest extends WifiBaseTest { .thenReturn(false); when(mWifiInjector.getCarrierNetworkConfig()).thenReturn(mCarrierNetworkConfig); createWifiConfigManager(); - mWifiConfigManager.setOnNetworkUpdateListener(mWcmListener); + mWifiConfigManager.addOnNetworkUpdateListener(mWcmListener); ArgumentCaptor<ContentObserver> observerCaptor = ArgumentCaptor.forClass(ContentObserver.class); verify(mFrameworkFacade).registerContentObserver(eq(mContext), eq(Settings.Global.getUriFor( diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java index 80d8ab739..8fc52f78c 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java @@ -102,7 +102,7 @@ public class WifiConnectivityManagerTest extends WifiBaseTest { when(mWifiNetworkSuggestionsManager.retrieveHiddenNetworkList()) .thenReturn(new ArrayList<>()); mWifiConnectivityManager = createConnectivityManager(); - verify(mWifiConfigManager).setOnNetworkUpdateListener(anyObject()); + verify(mWifiConfigManager).addOnNetworkUpdateListener(anyObject()); mWifiConnectivityManager.setTrustedConnectionAllowed(true); mWifiConnectivityManager.setWifiEnabled(true); when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()); @@ -315,7 +315,7 @@ public class WifiConnectivityManagerTest extends WifiBaseTest { pnoNetworkList.add(pnoNetwork); when(wifiConfigManager.retrievePnoNetworkList()).thenReturn(pnoNetworkList); when(wifiConfigManager.retrievePnoNetworkList()).thenReturn(pnoNetworkList); - doNothing().when(wifiConfigManager).setOnNetworkUpdateListener( + doNothing().when(wifiConfigManager).addOnNetworkUpdateListener( mNetworkUpdateListenerCaptor.capture()); return wifiConfigManager; |