/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ |
D | ConnectivityManagerMobileTest.java | 54 mCm.setAirplaneMode(false); in setUp() 72 mCm.setAirplaneMode(false); in tearDown() 93 NetworkInfo ni = mCm.getActiveNetworkInfo(); in test3GToWifiNotification() 230 mCm.setAirplaneMode(true); in testDataConnectionWith3GToAmTo3G() 236 mCm.setAirplaneMode(false); in testDataConnectionWith3GToAmTo3G() 253 mCm.setAirplaneMode(true); in testDataConnectionOverAMWithWifi() 266 mCm.setAirplaneMode(false); in testDataConnectionOverAMWithWifi() 285 mCm.setAirplaneMode(true); in testDataConnectionWithWifiToAMToWifi() 291 mCm.setAirplaneMode(false); in testDataConnectionWithWifiToAMToWifi() 333 NetworkInfo extraNetInfo = mCm.getActiveNetworkInfo(); in verifyCellularConnection()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/net/ |
D | NetworkManagementServiceTest.java | 94 @Mock private ConnectivityManager mCm; field in NetworkManagementServiceTest 142 doReturn(mCm).when(mContext).getSystemService(eq(Context.CONNECTIVITY_SERVICE)); in setUp() 280 verify(mCm).addUidToMeteredNetworkDenyList(TEST_UID); in testMeteredNetworkRestrictions() 284 verify(mCm).setDataSaverEnabled(true); in testMeteredNetworkRestrictions() 292 verify(mCm).removeUidFromMeteredNetworkDenyList(TEST_UID); in testMeteredNetworkRestrictions() 297 verify(mCm).addUidToMeteredNetworkAllowList(TEST_UID); in testMeteredNetworkRestrictions() 301 verify(mCm).removeUidFromMeteredNetworkAllowList(TEST_UID); in testMeteredNetworkRestrictions() 304 verify(mCm).setDataSaverEnabled(false); in testMeteredNetworkRestrictions() 317 verify(mCm).setUidFirewallRule(FIREWALL_CHAIN_METERED_DENY_ADMIN, TEST_UID, in testMeteredNetworkRestrictionsByAdminChain() 324 verify(mCm).setUidFirewallRule(FIREWALL_CHAIN_METERED_DENY_ADMIN, TEST_UID, in testMeteredNetworkRestrictionsByAdminChain() [all …]
|
/frameworks/base/services/tests/VpnTests/java/com/android/server/net/ |
D | LockdownVpnTrackerTest.java | 86 if (Context.CONNECTIVITY_SERVICE.equals(name)) return mCm; 92 @Mock private ConnectivityManager mCm; field in LockdownVpnTrackerTest 121 verify(mCm).registerSystemDefaultNetworkCallback(callbackCaptor.capture(), eq(mHandler)); in getDefaultNetworkCallback() 128 verify(mCm).registerNetworkCallback(any(), callbackCaptor.capture(), eq(mHandler)); in getVpnNetworkCallback() 164 verify(mCm).setLegacyLockdownVpnEnabled(true); in initAndVerifyLockdownVpnTracker() 202 clearInvocations(mVpn, mCm, mNotificationManager); in testShutdown() 207 verify(mCm).setLegacyLockdownVpnEnabled(false); in testShutdown() 210 verify(mCm).unregisterNetworkCallback(defaultCallback); in testShutdown() 211 verify(mCm).unregisterNetworkCallback(vpnCallback); in testShutdown() 218 clearInvocations(mVpn, mCm, mNotificationManager); in testDefaultNetworkConnected() [all …]
|
/frameworks/base/services/core/java/com/android/server/net/ |
D | LockdownVpnTracker.java | 60 @NonNull private final ConnectivityManager mCm; field in LockdownVpnTracker 136 mCm = mContext.getSystemService(ConnectivityManager.class); in LockdownVpnTracker() 238 mCm.setLegacyLockdownVpnEnabled(true); in initLocked() 241 mCm.registerSystemDefaultNetworkCallback(mDefaultNetworkCallback, mHandler); in initLocked() 246 mCm.registerNetworkCallback(vpnRequest, mVpnNetworkCallback, mHandler); in initLocked() 262 mCm.setLegacyLockdownVpnEnabled(false); in shutdownLocked() 266 mCm.unregisterNetworkCallback(mDefaultNetworkCallback); in shutdownLocked() 267 mCm.unregisterNetworkCallback(mVpnNetworkCallback); in shutdownLocked()
|
/frameworks/base/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/ |
D | CaptivePortalLoginActivity.java | 79 private ConnectivityManager mCm; field in CaptivePortalLoginActivity 89 mCm = getSystemService(ConnectivityManager.class); in onCreate() 141 if (mNetwork.equals(mCm.getActiveNetwork())) break; in onDestroy() 163 mCm.bindProcessToNetwork(network); in setNetwork() 206 if (TextUtils.isEmpty(url)) url = mCm.getCaptivePortalServerUrl(); in getUrlForCaptivePortal() 244 new URL(mCm.getCaptivePortalServerUrl())); in testForCaptivePortal() 266 Network[] info = mCm.getAllNetworks(); in getNetworkForCaptivePortal() 269 final NetworkCapabilities nc = mCm.getNetworkCapabilities(nw); in getNetworkForCaptivePortal() 319 mCm.requestNetwork(request, mNetworkCallback, NETWORK_REQUEST_TIMEOUT_MS); in requestNetworkForCaptivePortal() 325 mCm.unregisterNetworkCallback(mNetworkCallback); in releaseNetworkRequest()
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ |
D | ConnectivityManagerTestBase.java | 75 protected ConnectivityManager mCm; field in ConnectivityManagerTestBase 130 mCm = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in setUp() 160 NetworkInfo ni = mCm.getNetworkInfo(networkType); in waitForNetworkState() 249 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_MOBILE); in isConnectedToMobile() 254 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI); in isConnectedToWifi() 421 NetworkInfo ni = mCm.getActiveNetworkInfo(); in waitForActiveNetworkConnection() 437 NetworkInfo ni = mCm.getActiveNetworkInfo(); in waitUntilNoActiveNetworkConnection()
|
/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | NetdEventListenerService.java | 101 private final ConnectivityManager mCm; field in NetdEventListenerService 167 mCm = cm; in NetdEventListenerService() 169 mCm.registerNetworkCallback(new NetworkRequest.Builder().clearCapabilities().build(), in NetdEventListenerService() 283 final NetworkCapabilities nc = mCm.getNetworkCapabilities(network); in hasWifiTransport()
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/ |
D | WifiStressTest.java | 260 NetworkInfo ni = mCm.getActiveNetworkInfo(); in testWifiReconnectionAfterSleep() 267 mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState()); in testWifiReconnectionAfterSleep()
|
/frameworks/base/services/tests/VpnTests/java/com/android/server/ |
D | VpnManagerServiceTest.java | 83 @Mock private ConnectivityManager mCm; field in VpnManagerServiceTest 153 mockService(mContext, ConnectivityManager.class, Context.CONNECTIVITY_SERVICE, mCm); in setUp()
|