/frameworks/base/tests/net/java/com/android/server/ |
D | ConnectivityServiceTest.java | 330 private WrappedConnectivityManager mCm; field in ConnectivityServiceTest 439 if (Context.CONNECTIVITY_SERVICE.equals(name)) return mCm; in getSystemService() 557 assertEquals(i, mCm.getNetworkCapabilities(n).getSignalStrength()); in testWaitForIdle() 577 if (i != mCm.getNetworkCapabilities(n).getSignalStrength()) { in verifyThatNotWaitingForIdleCausesRaceConditions() 721 mCm.registerNetworkCallback(request, callback); in connect() 735 if (callback != null) mCm.unregisterNetworkCallback(callback); in connect() 1249 mCm = new WrappedConnectivityManager(InstrumentationRegistry.getContext(), mService); in setUp() 1252 mCm.bindProcessToNetwork(null); in setUp() 1351 assertNotNull(mCm.getActiveNetworkInfo()); in verifyActiveNetwork() 1352 assertEquals(transportToLegacyType(transport), mCm.getActiveNetworkInfo().getType()); in verifyActiveNetwork() [all …]
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ |
D | ConnectivityManagerMobileTest.java | 53 mCm.setAirplaneMode(false); in setUp() 71 mCm.setAirplaneMode(false); in tearDown() 92 NetworkInfo ni = mCm.getActiveNetworkInfo(); in test3GToWifiNotification() 229 mCm.setAirplaneMode(true); in testDataConnectionWith3GToAmTo3G() 235 mCm.setAirplaneMode(false); in testDataConnectionWith3GToAmTo3G() 252 mCm.setAirplaneMode(true); in testDataConnectionOverAMWithWifi() 265 mCm.setAirplaneMode(false); in testDataConnectionOverAMWithWifi() 284 mCm.setAirplaneMode(true); in testDataConnectionWithWifiToAMToWifi() 290 mCm.setAirplaneMode(false); in testDataConnectionWithWifiToAMToWifi() 332 NetworkInfo extraNetInfo = mCm.getActiveNetworkInfo(); in verifyCellularConnection()
|
/frameworks/base/tests/net/common/java/android/net/ |
D | NetworkProviderTest.kt | 49 private val mCm = context.getSystemService(ConnectivityManager::class.java) in <lambda>() constant 98 mCm.registerNetworkProvider(provider) in <lambda>() 107 mCm.requestNetwork(nr, cb) in <lambda>() 142 mCm.unregisterNetworkCallback(cb) in <lambda>() 147 mCm.unregisterNetworkProvider(provider) in <lambda>() 152 mCm.unregisterNetworkProvider(provider) in <lambda>() 173 mCm.registerNetworkProvider(provider) in <lambda>() 182 mCm.requestNetwork(nr, cb) in <lambda>() 185 mCm.unregisterNetworkProvider(provider) in <lambda>()
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ |
D | ConnectivityManagerTestBase.java | 74 protected ConnectivityManager mCm; field in ConnectivityManagerTestBase 128 mCm = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in setUp() 156 NetworkInfo ni = mCm.getNetworkInfo(networkType); in waitForNetworkState() 218 String[] wifiRegexes = mCm.getTetherableWifiRegexs(); in waitForTetherStateChange() 223 String[] active = mCm.getTetheredIfaces(); in waitForTetherStateChange() 224 String[] error = mCm.getTetheringErroredIfaces(); in waitForTetherStateChange() 245 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_MOBILE); in isConnectedToMobile() 250 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI); in isConnectedToWifi() 417 NetworkInfo ni = mCm.getActiveNetworkInfo(); in waitForActiveNetworkConnection() 433 NetworkInfo ni = mCm.getActiveNetworkInfo(); in waitUntilNoActiveNetworkConnection()
|
/frameworks/base/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/ |
D | CaptivePortalLoginActivity.java | 79 private ConnectivityManager mCm; field in CaptivePortalLoginActivity 89 mCm = ConnectivityManager.from(this); in onCreate() 141 if (mNetwork.equals(mCm.getActiveNetwork())) break; in onDestroy() 163 mCm.bindProcessToNetwork(network); in setNetwork() 164 mCm.setProcessDefaultNetworkForHostResolution(network); in setNetwork() 207 if (TextUtils.isEmpty(url)) url = mCm.getCaptivePortalServerUrl(); in getUrlForCaptivePortal() 245 new URL(mCm.getCaptivePortalServerUrl())); in testForCaptivePortal() 267 Network[] info = mCm.getAllNetworks(); in getNetworkForCaptivePortal() 270 final NetworkCapabilities nc = mCm.getNetworkCapabilities(nw); in getNetworkForCaptivePortal() 320 mCm.requestNetwork(request, mNetworkCallback, NETWORK_REQUEST_TIMEOUT_MS); in requestNetworkForCaptivePortal() [all …]
|
/frameworks/base/packages/OsuLogin/src/com/android/hotspot2/osu/ |
D | OsuLoginActivity.java | 60 private ConnectivityManager mCm; field in OsuLoginActivity 110 mCm = (ConnectivityManager) getApplicationContext().getSystemService( in onCreate() 112 if (mCm == null) { in onCreate() 118 if (!mCm.bindProcessToNetwork(mNetwork)) { in onCreate() 124 final NetworkCapabilities networkCapabilities = mCm.getNetworkCapabilities(mNetwork); in onCreate() 155 mCm.registerNetworkCallback( in onCreate() 208 mCm.unregisterNetworkCallback(mNetworkCallback); in onDestroy()
|
/frameworks/base/core/java/android/net/ |
D | NetworkProvider.java | 73 private final ConnectivityManager mCm; field in NetworkProvider 88 mCm = ConnectivityManager.from(context); in NetworkProvider() 168 mCm.declareNetworkRequestUnfulfillable(request); in declareNetworkRequestUnfulfillable()
|
/frameworks/base/tests/net/java/com/android/server/connectivity/ |
D | NetdEventListenerServiceTest.java | 63 ConnectivityManager mCm; field in NetdEventListenerServiceTest 72 mCm = mock(ConnectivityManager.class); in setUp() 73 when(mCm.getNetworkCapabilities(new Network(100))).thenReturn(ncWifi); in setUp() 74 when(mCm.getNetworkCapabilities(new Network(101))).thenReturn(ncCell); in setUp() 76 mService = new NetdEventListenerService(mCm); in setUp()
|
D | IpConnectivityMetricsTest.java | 79 @Mock ConnectivityManager mCm; field in IpConnectivityMetricsTest 88 mNetdListener = new NetdEventListenerService(mCm); in setUp() 255 when(mCm.getNetworkCapabilities(new Network(100))).thenReturn(ncWifi); in testEndToEndLogging() 256 when(mCm.getNetworkCapabilities(new Network(101))).thenReturn(ncCell); in testEndToEndLogging()
|
/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | NetdEventListenerService.java | 95 private final ConnectivityManager mCm; field in NetdEventListenerService 160 mCm = cm; in NetdEventListenerService() 388 NetworkCapabilities nc = mCm.getNetworkCapabilities(new Network(netId)); in getTransports()
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/ |
D | WifiStressTest.java | 259 NetworkInfo ni = mCm.getActiveNetworkInfo(); in testWifiReconnectionAfterSleep() 266 mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState()); in testWifiReconnectionAfterSleep()
|
/frameworks/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/ |
D | TetheringTest.java | 205 @Mock private ConnectivityManager mCm; field in TetheringTest 264 if (Context.CONNECTIVITY_SERVICE.equals(name)) return mCm; in getSystemService() 1629 when(mCm.getRestrictBackgroundStatus()).thenReturn(status); in setDataSaverEnabled() 1883 when(mCm.getAllNetworks()).thenReturn(allNetworks); in testHandleIpConflict() 1912 when(mCm.getAllNetworks()).thenReturn(allNetworks); in testNoAddressAvailable()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | ClientModeImpl.java | 207 private ConnectivityManager mCm; field in ClientModeImpl 2634 if (mCm == null) { in checkAndSetConnectivityInstance() 2635 mCm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in checkAndSetConnectivityInstance() 2637 if (mCm == null) { in checkAndSetConnectivityInstance()
|