Home
last modified time | relevance | path

Searched refs:mCm (Results 1 – 17 of 17) sorted by relevance

/cts/tests/netlegacy22.api/src/android/net/cts/legacy/api22/
DConnectivityManagerLegacyTest.java58 private ConnectivityManager mCm; field in ConnectivityManagerLegacyTest
65 mCm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
92 Network[] networks = mCm.getAllNetworks(); in getIpAddresses()
94 NetworkInfo ni = mCm.getNetworkInfo(networks[i]); in getIpAddresses()
98 LinkProperties lp = mCm.getLinkProperties(networks[i]); in getIpAddresses()
158 int ret = mCm.startUsingNetworkFeature(TYPE_MOBILE, FEATURE_ENABLE_HIPRI); in testStartUsingNetworkFeature_enableHipri()
164 mCm.requestRouteToHost(TYPE_MOBILE_HIPRI, ipv4AddrToInt(HOST_ADDRESS1))); in testStartUsingNetworkFeature_enableHipri()
173 int ret = mCm.stopUsingNetworkFeature(TYPE_MOBILE, FEATURE_ENABLE_HIPRI); in testStartUsingNetworkFeature_enableHipri()
194 NetworkInfo ni = mCm.getNetworkInfo(TYPE_MOBILE); in testStartUsingNetworkFeature()
197 mCm.startUsingNetworkFeature(TYPE_MOBILE, invalidFeature)); in testStartUsingNetworkFeature()
[all …]
/cts/tests/tests/net/src/android/net/cts/
DConnectivityManagerTest.java173 private ConnectivityManager mCm; field in ConnectivityManagerTest
186 mCm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
243 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.TYPE_MOBILE_FOTA)); in testIsNetworkTypeValid()
244 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.TYPE_MOBILE_IMS)); in testIsNetworkTypeValid()
245 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.TYPE_MOBILE_CBS)); in testIsNetworkTypeValid()
246 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.TYPE_WIFI_P2P)); in testIsNetworkTypeValid()
247 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.TYPE_MOBILE_IA)); in testIsNetworkTypeValid()
248 assertFalse(mCm.isNetworkTypeValid(-1)); in testIsNetworkTypeValid()
249 assertTrue(mCm.isNetworkTypeValid(0)); in testIsNetworkTypeValid()
250 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.MAX_NETWORK_TYPE)); in testIsNetworkTypeValid()
[all …]
DDnsTest.java50 private ConnectivityManager mCm; field in DnsTest
53 mCm = getContext().getSystemService(ConnectivityManager.class); in setUp()
109 mCm.getActiveLinkProperties(); in testDnsWorks()
113 ", check your network's DNS server. lp=" + mCm.getActiveLinkProperties(); in testDnsWorks()
278 NetworkInfo info = mCm.getActiveNetworkInfo(); in activeNetworkInfoIsProxy()
298 mCm.registerDefaultNetworkCallback(callback); in ensureIpv6Connectivity()
302 + mCm.getActiveLinkProperties(); in ensureIpv6Connectivity()
306 mCm.unregisterNetworkCallback(callback); in ensureIpv6Connectivity()
/cts/tests/tests/net/util/java/android/net/cts/util/
DCtsNetUtils.java88 private final ConnectivityManager mCm; field in CtsNetUtils
97 mCm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in CtsNetUtils()
138 mCm.requestNetwork(nr, cb); in setupAndGetTestNetwork()
191 mCm.registerNetworkCallback(makeWifiNetworkRequest(), callback); in connectToWifi()
195 mCm, ConnectivityManager.TYPE_WIFI, NetworkInfo.State.CONNECTED); in connectToWifi()
214 mCm.unregisterNetworkCallback(callback); in connectToWifi()
277 mCm.registerNetworkCallback(makeWifiNetworkRequest(), callback); in disconnectFromWifi()
280 mCm, ConnectivityManager.TYPE_WIFI, NetworkInfo.State.DISCONNECTED); in disconnectFromWifi()
292 final NetworkCapabilities nc = mCm.getNetworkCapabilities(wifiNetworkToCheck); in disconnectFromWifi()
315 mCm.unregisterNetworkCallback(callback); in disconnectFromWifi()
[all …]
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DPhoneStateListenerTest.java104 private static ConnectivityManager mCm; field in PhoneStateListenerTest
138 mCm = (ConnectivityManager)getContext().getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
157 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testPhoneStateListener()
168 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnServiceStateChanged()
198 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnUnRegisterFollowedByRegister()
251 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnSignalStrengthChanged()
376 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnSignalStrengthsChanged()
415 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnMessageWaitingIndicatorChanged()
445 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnPreciseCallStateChanged()
480 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnCallDisconnectCauseChanged()
[all …]
DCellLocationTest.java44 private static ConnectivityManager mCm; field in CellLocationTest
51 mCm = (ConnectivityManager)getContext().getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
64 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testCellLocation()
DTelephonyManagerTest.java130 private static ConnectivityManager mCm; field in TelephonyManagerTest
229 mCm = getContext().getSystemService(ConnectivityManager.class); in setUp()
801 assertTrue(mCm.getNetworkInfo(ConnectivityManager.TYPE_ETHERNET) != null); in verifyDeviceId()
1072 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testGetServiceState()
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DConnectivityConstraintTest.java56 private ConnectivityManager mCm; field in ConnectivityConstraintTest
76 mCm = in setUp()
103 setWifiState(mInitialWiFiState, mContext, mCm, mWifiManager); in tearDown()
404 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in checkDeviceSupportsMobileData()
416 setWifiState(true, mContext, mCm, mWifiManager); in connectToWifi()
424 setWifiState(false, mContext, mCm, mWifiManager); in disconnectFromWifi()
470 NetworkInfo.State.CONNECTED, mCm); in disconnectWifiToConnectToMobile()
500 private final ConnectivityManager mCm; field in ConnectivityConstraintTest.ConnectivityActionReceiver
506 mCm = cm; in ConnectivityActionReceiver()
524 NetworkInfo[] allNetworkInfo = mCm.getAllNetworkInfo(); in onReceive()
[all …]
DJobThrottlingTest.java85 private ConnectivityManager mCm; field in JobThrottlingTest
137 mCm = mContext.getSystemService(ConnectivityManager.class); in setUp()
231 setWifiState(true, mContext, mCm, mWifiManager); in testBackgroundConnectivityJobsThrottled()
333 setWifiState(mInitialWiFiState, mContext, mCm, mWifiManager); in tearDown()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DMeteredDataRestrictionTest.java64 private ConnectivityManager mCm; field in MeteredDataRestrictionTest
71 mCm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
154 final NetworkInfo networkInfo = mCm.getActiveNetworkInfo(); in setMeteredNetwork()
157 } else if (mCm.isActiveNetworkMetered()) { in setMeteredNetwork()
213 actualMeteredStatus = mCm.isActiveNetworkMetered(); in assertActiveNetworkMetered()
221 + "; networkInfo=" + mCm.getActiveNetwork()); in assertActiveNetworkMetered()
/cts/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/
DMyService.java47 ConnectivityManager mCm; field in MyService
141 mCm.registerNetworkCallback(makeWifiNetworkRequest(), mNetworkCallback);
153 mCm.unregisterNetworkCallback(mNetworkCallback);
177 mCm = (ConnectivityManager) getApplicationContext() in onCreate()
/cts/hostsidetests/net/app/src/com/android/cts/net/hostside/
DNetworkPolicyTestUtils.java60 private static ConnectivityManager mCm; field in NetworkPolicyTestUtils
264 if (mCm == null) { in getConnectivityManager()
265 mCm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE); in getConnectivityManager()
267 return mCm; in getConnectivityManager()
DAbstractRestrictBackgroundNetworkTestCase.java133 protected ConnectivityManager mCm; field in AbstractRestrictBackgroundNetworkTestCase
150 mCm = getConnectivityManager(); in setUp()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/wifiaware/testcase/
DDataPathInBandTestCase.java88 private ConnectivityManager mCm; field in DataPathInBandTestCase
109 mCm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in executeTest()
137 mCm.unregisterNetworkCallback(mNetworkCb); in tearDown()
179 mCm.requestNetwork(nr, mNetworkCb, CALLBACK_TIMEOUT_SEC * 1000); in executeTestSubscriber()
369 mCm.requestNetwork(nr, mNetworkCb, CALLBACK_TIMEOUT_SEC * 1000); in executeTestPublisher()
/cts/tests/tests/tethering/src/android/tethering/cts/
DTetheringManagerTest.java96 private ConnectivityManager mCm; field in TetheringManagerTest
122 mCm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
766 mCm.registerDefaultNetworkCallback(networkCallback); in testTetheringUpstream()
769 mCm.unregisterNetworkCallback(networkCallback); in testTetheringUpstream()
774 final NetworkCapabilities activeNetCap = mCm.getNetworkCapabilities(activeNetwork); in testTetheringUpstream()
788 final NetworkCapabilities netCap = mCm.getNetworkCapabilities(network); in testTetheringUpstream()
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DNetworkUsageStatsTest.java163 private ConnectivityManager mCm; field in NetworkUsageStatsTest
173 NetworkInfo networkInfo = mCm.getNetworkInfo(network); in exerciseRemoteHost()
229 mCm = (ConnectivityManager) getInstrumentation().getContext() in setUp()
306 isDefault = network.equals(mCm.getActiveNetwork()); in onAvailable()
311 metered = !mCm.getNetworkCapabilities(network) in onAvailable()
331 mCm.requestNetwork(new NetworkRequest.Builder() in shouldTestThisNetworkType()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodFlowTestActivity.java68 private static ConnectivityManager mCm; field in ByodFlowTestActivity
570 mCm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); in setupTests()
571 if(mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) != null) { in setupTests()