/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/enterprise/ |
D | GlobalHttpProxyPreferenceControllerTest.java | 41 private ConnectivityManager mConnectivityManager; field in GlobalHttpProxyPreferenceControllerTest 46 .thenReturn(mConnectivityManager); in setUp() 53 when(mConnectivityManager.getGlobalProxy()).thenReturn( in testGlobalProxyNotSet_disablesPreference() 63 when(mConnectivityManager.getGlobalProxy()).thenReturn( in testGlobalProxyNotSet_disablesPreference_zoneWrite() 73 when(mConnectivityManager.getGlobalProxy()).thenReturn( in testGlobalProxyNotSet_disablesPreference_zoneRead() 84 when(mConnectivityManager.getGlobalProxy()).thenReturn( in testGlobalProxyNotSet_disablesPreference_zoneHidden() 94 when(mConnectivityManager.getGlobalProxy()).thenReturn(null); in testGlobalProxySet_enablesPreference() 103 when(mConnectivityManager.getGlobalProxy()).thenReturn(null); in testGlobalProxySet_enablesPreference_zoneWrite() 112 when(mConnectivityManager.getGlobalProxy()).thenReturn(null); in testGlobalProxySet_enablesPreference_zoneRead() 121 when(mConnectivityManager.getGlobalProxy()).thenReturn(null); in testGlobalProxySet_enablesPreference_zoneHidden()
|
/packages/apps/Messaging/src/android/support/v7/mms/ |
D | MmsNetworkManager.java | 74 private final ConnectivityManager mConnectivityManager; field in MmsNetworkManager 104 mConnectivityManager = (ConnectivityManager) mContext.getSystemService( in MmsNetworkManager() 114 return mConnectivityManager; in getConnectivityManager() 197 final NetworkInfo mmsNetworkInfo = mConnectivityManager.getNetworkInfo( in getApnName() 217 mConnectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE_MMS); in onMmsConnectivityChange() 299 final Method method = mConnectivityManager.getClass().getMethod( in startMmsConnectivity() 303 mConnectivityManager, ConnectivityManager.TYPE_MOBILE, FEATURE_ENABLE_MMS); in startMmsConnectivity() 314 final Method method = mConnectivityManager.getClass().getMethod( in endMmsConnectivity() 318 mConnectivityManager, ConnectivityManager.TYPE_MOBILE, FEATURE_ENABLE_MMS); in endMmsConnectivity() 373 final Class cmClass = mConnectivityManager.getClass(); in isMobileDataEnabled() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/ |
D | WifiNoInternetDialogTest.java | 72 private ConnectivityManager mConnectivityManager; field in WifiNoInternetDialogTest 134 verify(mConnectivityManager).setAcceptUnvalidated(any(Network.class), eq(true), eq(false)); in clickPositiveButton_whenPromptUnvalidated_shouldCallSetAcceptUnvalidated() 145 verify(mConnectivityManager).setAcceptPartialConnectivity(any(Network.class), eq(true), in positiveButton_withPartialConnectivity_shouldCallSetAcceptPartialConnectivity() 157 verify(mConnectivityManager).setAvoidUnvalidated(any(Network.class)); in positiveButton_withLostValidation_shouldCallSetAvoidUnvalidated() 169 verify(mConnectivityManager).setAcceptPartialConnectivity(any(Network.class), eq(false), in destroyWithNoClick_inPartialConnectivity_shouldCallSetAcceptPartialConnectivity() 182 verify(mConnectivityManager).setAcceptUnvalidated(any(Network.class), eq(false), eq(false)); in destroyWithNoClick_whenUnvalidated_shouldCallSetAcceptUnvalidated() 190 verify(mConnectivityManager, times(1)).registerNetworkCallback( in networkCallbackOnLost_shouldFinish() 203 verify(mConnectivityManager, times(1)).registerNetworkCallback( in networkCallbackOnLost_shouldNotFinishIfNetworkIsNotTheSame() 218 verify(mConnectivityManager, times(1)).registerNetworkCallback( in networkCallbackOnCapabilitiesChanged_shouldFinish() 232 verify(mConnectivityManager, times(1)).registerNetworkCallback( in networkCallbackOnCapabilitiesChanged_shouldNotFinishIfNetworkIsNotTheSame() [all …]
|
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/ |
D | NoNetworkStatePermissionTest.java | 31 private ConnectivityManager mConnectivityManager; field in NoNetworkStatePermissionTest 38 mConnectivityManager = (ConnectivityManager) mContext.getSystemService( in setUp() 40 assertNotNull(mConnectivityManager); in setUp() 51 mConnectivityManager.getActiveNetworkInfo(); in testGetActiveNetworkInfo() 67 mConnectivityManager.getNetworkInfo(TEST_NETWORK_TYPE); in testGetNetworkInfo() 83 mConnectivityManager.getAllNetworkInfo(); in testGetAllNetworkInfo()
|
D | ConnectivityManagerPermissionTest.java | 45 private ConnectivityManager mConnectivityManager; field in ConnectivityManagerPermissionTest 51 mConnectivityManager = mContext.getSystemService(ConnectivityManager.class); in setUp() 52 assertNotNull(mConnectivityManager); in setUp() 64 mConnectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); in testGetNetworkInfo() 89 mConnectivityManager.setOemNetworkPreference(preferences, null, null); in testSetOemNetworkPreference() 114 mConnectivityManager.setOemNetworkPreference(preferences, null, null); in testSetOemNetworkPreferenceHasAutomotiveFeature()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/tether/ |
D | WifiTetherSwitchBarControllerTest.java | 64 private ConnectivityManager mConnectivityManager; field in WifiTetherSwitchBarControllerTest 78 mConnectivityManager); in setUp() 92 verify(mConnectivityManager, never()).startTethering(anyInt(), anyBoolean(), any(), any()); in startTether_wifiApIsActivated_doNothing() 101 verify(mConnectivityManager).startTethering(anyInt(), anyBoolean(), any(), any()); in startTether_wifiApNotActivated_startTethering() 110 verify(mConnectivityManager).stopTethering(anyInt()); in stopTether_wifiApIsActivated_stopTethering() 119 verify(mConnectivityManager, never()).stopTethering(anyInt()); in stopTether_wifiApNotActivated_doNothing() 155 verify(mConnectivityManager, never()).startTethering(anyInt(), anyBoolean(), any(), any()); in onSwitchChanged_switchNotEnabled_doNothingForTethering() 156 verify(mConnectivityManager, never()).stopTethering(anyInt()); in onSwitchChanged_switchNotEnabled_doNothingForTethering() 163 verify(mConnectivityManager).startTethering(anyInt(), anyBoolean(), any(), any()); in onSwitchChanged_isChecked_startTethering() 171 verify(mConnectivityManager).stopTethering(anyInt()); in onSwitchChanged_isNotChecked_stopTethering()
|
/packages/apps/Settings/src/com/android/settings/network/telephony/ |
D | DataConnectivityListener.java | 30 private ConnectivityManager mConnectivityManager; field in DataConnectivityListener 40 mConnectivityManager = mContext.getSystemService(ConnectivityManager.class); in DataConnectivityListener() 48 mConnectivityManager.registerNetworkCallback(mNetworkRequest, this, in start() 53 mConnectivityManager.unregisterNetworkCallback(this); in stop() 58 final Network activeNetwork = mConnectivityManager.getActiveNetwork(); in onCapabilitiesChanged()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | TetherEnablerTest.java | 74 private ConnectivityManager mConnectivityManager; field in TetherEnablerTest 97 mConnectivityManager); in setUp() 180 verify(mConnectivityManager, never()).startTethering(anyInt(), anyBoolean(), any(), any()); in onSwitchToggled_onlyStartsWifiTetherWhenNeeded() 184 verify(mConnectivityManager).startTethering(eq(TETHERING_WIFI), anyBoolean(), any(), any()); in onSwitchToggled_onlyStartsWifiTetherWhenNeeded() 185 verify(mConnectivityManager, never()).startTethering(eq(TETHERING_USB), anyBoolean(), any(), in onSwitchToggled_onlyStartsWifiTetherWhenNeeded() 187 verify(mConnectivityManager, never()).startTethering(eq(TETHERING_BLUETOOTH), anyBoolean(), in onSwitchToggled_onlyStartsWifiTetherWhenNeeded() 189 verify(mConnectivityManager, never()).startTethering(eq(TETHERING_ETHERNET), anyBoolean(), in onSwitchToggled_onlyStartsWifiTetherWhenNeeded() 199 verify(mConnectivityManager).stopTethering(TETHERING_WIFI); in onSwitchToggled_stopAllTetheringInterfaces() 203 verify(mConnectivityManager).stopTethering(TETHERING_USB); in onSwitchToggled_stopAllTetheringInterfaces() 207 verify(mConnectivityManager).stopTethering(TETHERING_BLUETOOTH); in onSwitchToggled_stopAllTetheringInterfaces() [all …]
|
/packages/services/Car/tests/RailwayReferenceApp/src/com/google/android/car/networking/railway/ |
D | CurrentEthernetNetworksViewModel.java | 45 private final ConnectivityManager mConnectivityManager; field in CurrentEthernetNetworksViewModel 63 mConnectivityManager = in CurrentEthernetNetworksViewModel() 66 assert mConnectivityManager != null; in CurrentEthernetNetworksViewModel() 72 mConnectivityManager.registerNetworkCallback(request, mNetworkCallback); in CurrentEthernetNetworksViewModel() 79 mConnectivityManager.unregisterNetworkCallback(mNetworkCallback); in onCleared() 106 LinkProperties linkProperties = mConnectivityManager.getLinkProperties(network); in getCurrentEthernetNetworksText() 108 mConnectivityManager.getNetworkCapabilities(network); in getCurrentEthernetNetworksText()
|
/packages/modules/Connectivity/remoteauth/tests/unit/src/com/android/server/remoteauth/ |
D | RemoteAuthConnectionCacheTest.java | 45 @Mock private ConnectivityManager mConnectivityManager; field in RemoteAuthConnectionCacheTest 56 mConnectionCache = new RemoteAuthConnectionCache(mConnectivityManager); in setUp() 66 assertEquals(mConnectivityManager, mConnectionCache.getConnectivityManager()); in testGetManager_managerExists() 101 doReturn(null).when(mConnectivityManager).connect(eq(mConnectionInfo), anyObject()); in testGetConnection_failedToConnect() 110 .when(mConnectivityManager) in testGetConnection_failedToConnectException() 119 doReturn(mConnection).when(mConnectivityManager).connect(eq(mConnectionInfo), anyObject()); in testGetConnection_connectionSucceed()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/connectivity/ |
D | ConnectivityFragment.java | 64 private ConnectivityManager mConnectivityManager; field in ConnectivityFragment 154 NetworkCapabilities nc = mConnectivityManager.getNetworkCapabilities(n); in getRequestForNetwork() 197 mConnectivityManager.requestNetwork(request, cb); in requestNetworkById() 204 mConnectivityManager.unregisterNetworkCallback(cb); in releaseNetworkById() 222 Network def = mConnectivityManager.getBoundNetworkForProcess(); in bindToNetwork() 226 mConnectivityManager.bindProcessToNetwork(network); in bindToNetwork() 231 mConnectivityManager.bindProcessToNetwork(null); in clearBoundNetwork() 240 mConnectivityManager.reportNetworkConnectivity(network, false); in reportNetworkbyId() 364 Network defNetwork = mConnectivityManager.getBoundNetworkForProcess(); in getNetworkItem() 367 NetworkInfo nInfo = mConnectivityManager.getNetworkInfo(n); in getNetworkItem() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/about/ |
D | MacAddressPreferenceController.java | 42 private final ConnectivityManager mConnectivityManager; field in MacAddressPreferenceController 47 mConnectivityManager = context.getSystemService(ConnectivityManager.class); in MacAddressPreferenceController() 58 Network activeNetwork = mConnectivityManager.getActiveNetwork(); in updateConnectivity() 60 ? mConnectivityManager.getNetworkCapabilities(activeNetwork) : null; in updateConnectivity() 62 ? mConnectivityManager.getLinkProperties(activeNetwork) : null; in updateConnectivity()
|
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/details/ |
D | WifiInfoProvider.java | 85 private final ConnectivityManager mConnectivityManager; field in WifiInfoProvider 140 mConnectivityManager = in WifiInfoProvider() 145 mLinkProperties = mConnectivityManager.getLinkProperties(mNetwork); in WifiInfoProvider() 146 mNetworkCapabilities = mConnectivityManager.getNetworkCapabilities(mNetwork); in WifiInfoProvider() 178 mConnectivityManager.registerNetworkCallback(mNetworkRequest, mNetworkCallback, in onStart() 189 mConnectivityManager.unregisterNetworkCallback(mNetworkCallback); in onStop() 263 mNetworkInfo = mConnectivityManager.getNetworkInfo(mNetwork); in updateInfo()
|
/packages/modules/ConfigInfrastructure/service/javatests/src/com/android/server/deviceconfig/ |
D | UnattendedRebootManagerTest.java | 75 private ConnectivityManager mConnectivityManager; field in UnattendedRebootManagerTest 92 mConnectivityManager = mock(ConnectivityManager.class); in setUp() 105 return mConnectivityManager; in setUp() 172 when(mConnectivityManager.getNetworkCapabilities(any())) in scheduleReboot() 194 when(mConnectivityManager.getNetworkCapabilities(any())) in scheduleReboot_requiresCharging_notCharging() 231 when(mConnectivityManager.getNetworkCapabilities(any())) in scheduleReboot_doesNotRequireCharging_notCharging() 258 when(mConnectivityManager.getNetworkCapabilities(any())) in scheduleReboot_requiresCharging_flagNotEnabled() 285 when(mConnectivityManager.getNetworkCapabilities(any())) in scheduleReboot_noPinLock() 306 when(mConnectivityManager.getNetworkCapabilities(any())) in scheduleReboot_noPreparation() 326 when(mConnectivityManager.getNetworkCapabilities(any())) in scheduleReboot_simPinPreparationFailed() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/ |
D | DataConnectivityListenerTest.java | 50 private ConnectivityManager mConnectivityManager; field in DataConnectivityListenerTest 61 when(mContext.getSystemService(ConnectivityManager.class)).thenReturn(mConnectivityManager); in setUp() 62 when(mConnectivityManager.getActiveNetwork()).thenReturn(mActiveNetwork); in setUp() 68 verify(mConnectivityManager, never()).registerNetworkCallback(any(NetworkRequest.class), in registerNetworkCallback_listenerNotStart_doesNotRegister() 75 verify(mConnectivityManager).registerNetworkCallback(any(NetworkRequest.class), in registerNetworkCallback_listenerStart_doesRegister()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | OsuNetworkConnectionTest.java | 81 @Mock ConnectivityManager mConnectivityManager; field in OsuNetworkConnectionTest 91 doReturn(mConnectivityManager).when(mContext) in setUp() 209 verify(mConnectivityManager).requestNetwork(any(NetworkRequest.class), in verifyNetworkCallbackInvokedWhenConnected() 221 verify(mConnectivityManager).unregisterNetworkCallback(any(ConnectivityManager in verifyNetworkCallbackInvokedWhenConnected() 239 verify(mConnectivityManager).requestNetwork(any(NetworkRequest.class), in verifyNetworkCallbackWithoutOnAvailable() 262 verify(mConnectivityManager).requestNetwork(any(NetworkRequest.class), in verifyNetworkConnectionTimeout() 273 verify(mConnectivityManager).unregisterNetworkCallback(any(ConnectivityManager in verifyNetworkConnectionTimeout() 289 verify(mConnectivityManager).unregisterNetworkCallback(any(ConnectivityManager in verifyNetworkDisconnect() 315 verify(mConnectivityManager, times(1)).requestNetwork(networkRequestCaptor.capture(), in verifyWifiConfigurationForOsuNetwork() 348 verify(mConnectivityManager, times(1)).requestNetwork(networkRequestCaptor.capture(), in verifyWifiConfigurationForOsenOsuNetwork()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/ |
D | ConnectivityMonitorWithConnectivityManagerTests.java | 52 @Mock private ConnectivityManager mConnectivityManager; field in ConnectivityMonitorWithConnectivityManagerTests 60 doReturn(mConnectivityManager).when(mContext) in setUp() 113 verify(mConnectivityManager, times(1)).registerNetworkCallback( in testIntentFired_shouldNotifyListener() 133 verify(mConnectivityManager, times(time)).registerNetworkCallback( in verifyNetworkCallbackRegistered() 138 verify(mConnectivityManager, times(time)) in verifyNetworkCallbackUnregistered()
|
/packages/apps/Settings/src/com/android/settings/network/ |
D | InternetUpdater.java | 127 private final ConnectivityManager mConnectivityManager; field in InternetUpdater 170 mConnectivityManager = mContext.getSystemService(ConnectivityManager.class); in InternetUpdater() 184 mConnectivityManager.registerDefaultNetworkCallback(mNetworkCallback); in onResume() 193 mConnectivityManager.unregisterNetworkCallback(mNetworkCallback); in onPause() 212 Network activeNetwork = mConnectivityManager.getActiveNetwork(); in fetchActiveNetwork() 220 mConnectivityManager.getNetworkCapabilities(activeNetwork); in fetchActiveNetwork()
|
D | VpnPreferenceController.java | 67 private ConnectivityManager mConnectivityManager; field in VpnPreferenceController 108 if (mConnectivityManager != null) { in onPause() 109 mConnectivityManager.unregisterNetworkCallback(mNetworkCallback); in onPause() 110 mConnectivityManager = null; in onPause() 117 mConnectivityManager = mContext.getSystemService(ConnectivityManager.class); in onResume() 118 mConnectivityManager.registerNetworkCallback(REQUEST, mNetworkCallback); in onResume() 120 mConnectivityManager = null; in onResume()
|
D | PrivateDnsPreferenceController.java | 70 private final ConnectivityManager mConnectivityManager; field in PrivateDnsPreferenceController 78 mConnectivityManager = context.getSystemService(ConnectivityManager.class); in PrivateDnsPreferenceController() 108 final Network defaultNetwork = mConnectivityManager.getActiveNetwork(); in onStart() 110 mLatestLinkProperties = mConnectivityManager.getLinkProperties(defaultNetwork); in onStart() 112 mConnectivityManager.registerDefaultNetworkCallback(mNetworkCallback, mHandler); in onStart() 118 mConnectivityManager.unregisterNetworkCallback(mNetworkCallback); in onStop()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/development/ |
D | WirelessDebuggingFragment.java | 91 private ConnectivityManager mConnectivityManager; field in WirelessDebuggingFragment 141 mConnectivityManager = getContext().getSystemService(ConnectivityManager.class); in onCreatePreferences() 156 mConnectivityManager.registerNetworkCallback( in onResume() 169 mConnectivityManager.unregisterNetworkCallback(mWifiNetworkCallback); in onPause() 354 NetworkInfo activeNetworkInfo = mConnectivityManager.getActiveNetworkInfo(); in isNetworkConnected() 383 LinkProperties prop = mConnectivityManager.getLinkProperties( in getWifiIpv4Address() 384 mConnectivityManager.getActiveNetwork()); in getWifiIpv4Address() 439 private ConnectivityManager mConnectivityManager; field in WirelessDebuggingFragment.PairingCodeFragment 470 mConnectivityManager = getContext().getSystemService(ConnectivityManager.class); in onCreate() 600 NetworkInfo activeNetworkInfo = mConnectivityManager.getActiveNetworkInfo(); [all …]
|
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | ConnectivityDiagnosticsManagerTest.java | 150 private ConnectivityManager mConnectivityManager; field in ConnectivityDiagnosticsManagerTest 198 mConnectivityManager = mContext.getSystemService(ConnectivityManager.class); in setUp() 205 mConnectivityManager.requestNetwork(TEST_NETWORK_REQUEST, mTestNetworkCallback); in setUp() 212 mConnectivityManager.unregisterNetworkCallback(mTestNetworkCallback); in tearDown() 240 mConnectivityManager.getLinkProperties(mTestNetwork).getInterfaceName(); in testRegisterConnectivityDiagnosticsCallback() 270 mConnectivityManager.unregisterNetworkCallback(testNetworkCallback); in testRegisterCallbackWithCarrierPrivileges() 320 () -> mConnectivityManager.requestNetwork( in doBroadcastCarrierConfigsAndVerifyOnConnectivityReportAvailable() 338 mConnectivityManager.getLinkProperties(network).getInterfaceName(); in doBroadcastCarrierConfigsAndVerifyOnConnectivityReportAvailable() 378 mConnectivityManager.getLinkProperties(mTestNetwork).getInterfaceName(); in testOnConnectivityReportAvailable() 430 mConnectivityManager.getLinkProperties(mTestNetwork).getInterfaceName(); in verifyOnDataStallSuspected() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/ |
D | ConnectivityListener.java | 69 private final ConnectivityManager mConnectivityManager; field in ConnectivityListener 101 mConnectivityManager = (ConnectivityManager) mContext.getSystemService( in ConnectivityListener() 120 mConnectivityManager); in ConnectivityListener() 151 mConnectivityManager.registerDefaultNetworkCallback(mNetworkCallback, mUiHandler); in start() 166 mConnectivityManager.unregisterNetworkCallback(mNetworkCallback); in stop() 293 final Network[] networks = mConnectivityManager.getAllNetworks(); in getFirstEthernet() 295 NetworkInfo networkInfo = mConnectivityManager.getNetworkInfo(network); in getFirstEthernet() 304 final LinkProperties linkProperties = mConnectivityManager.getLinkProperties(network); in formatIpAddresses() 392 NetworkInfo networkInfo = mConnectivityManager.getActiveNetworkInfo(); in updateConnectivityStatus()
|
D | ConnectivityListenerLite.java | 36 private final ConnectivityManager mConnectivityManager; field in ConnectivityListenerLite 46 mConnectivityManager = context.getSystemService(ConnectivityManager.class); in ConnectivityListenerLite() 69 mConnectivityManager.registerDefaultNetworkCallback(mNetworkCallback); in registerNetworkCallback() 74 mConnectivityManager.unregisterNetworkCallback(mNetworkCallback); in unregisterNetworkCallback()
|
/packages/modules/Connectivity/remoteauth/service/java/com/android/server/remoteauth/ |
D | RemoteAuthConnectionCache.java | 43 private final ConnectivityManager mConnectivityManager; field in RemoteAuthConnectionCache 47 this.mConnectivityManager = connectivityManager; in RemoteAuthConnectionCache() 52 return mConnectivityManager; in getConnectivityManager() 100 mConnectivityManager.connect( in getConnection()
|