Home
last modified time | relevance | path

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

/cts/tests/netlegacy22.api/src/android/net/cts/legacy/api22/
DConnectivityManagerLegacyTest.java57 private ConnectivityManager mCm; field in ConnectivityManagerLegacyTest
65 mCm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
93 Network[] networks = mCm.getAllNetworks(); in getIpAddresses()
95 NetworkInfo ni = mCm.getNetworkInfo(networks[i]); in getIpAddresses()
99 LinkProperties lp = mCm.getLinkProperties(networks[i]); in getIpAddresses()
159 int ret = mCm.startUsingNetworkFeature(TYPE_MOBILE, FEATURE_ENABLE_HIPRI); in testStartUsingNetworkFeature_enableHipri()
165 mCm.requestRouteToHost(TYPE_MOBILE_HIPRI, ipv4AddrToInt(HOST_ADDRESS1))); in testStartUsingNetworkFeature_enableHipri()
174 int ret = mCm.stopUsingNetworkFeature(TYPE_MOBILE, FEATURE_ENABLE_HIPRI); in testStartUsingNetworkFeature_enableHipri()
195 NetworkInfo ni = mCm.getNetworkInfo(TYPE_MOBILE); in testStartUsingNetworkFeature()
198 mCm.startUsingNetworkFeature(TYPE_MOBILE, invalidFeature)); in testStartUsingNetworkFeature()
[all …]
/cts/tests/tests/net/src/android/net/cts/
DConnectivityManagerTest.java134 private ConnectivityManager mCm; field in ConnectivityManagerTest
149 mCm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
206 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.TYPE_MOBILE_FOTA)); in testIsNetworkTypeValid()
207 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.TYPE_MOBILE_IMS)); in testIsNetworkTypeValid()
208 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.TYPE_MOBILE_CBS)); in testIsNetworkTypeValid()
209 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.TYPE_WIFI_P2P)); in testIsNetworkTypeValid()
210 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.TYPE_MOBILE_IA)); in testIsNetworkTypeValid()
211 assertFalse(mCm.isNetworkTypeValid(-1)); in testIsNetworkTypeValid()
212 assertTrue(mCm.isNetworkTypeValid(0)); in testIsNetworkTypeValid()
213 assertTrue(mCm.isNetworkTypeValid(ConnectivityManager.MAX_NETWORK_TYPE)); in testIsNetworkTypeValid()
[all …]
DDnsTest.java48 private ConnectivityManager mCm; field in DnsTest
51 mCm = getContext().getSystemService(ConnectivityManager.class); in setUp()
106 mCm.getActiveLinkProperties(); in testDnsWorks()
110 ", check your network's DNS server. lp=" + mCm.getActiveLinkProperties(); in testDnsWorks()
275 NetworkInfo info = mCm.getActiveNetworkInfo(); in activeNetworkInfoIsProxy()
295 mCm.registerDefaultNetworkCallback(callback); in ensureIpv6Connectivity()
299 + mCm.getActiveLinkProperties(); in ensureIpv6Connectivity()
303 mCm.unregisterNetworkCallback(callback); in ensureIpv6Connectivity()
/cts/tests/tests/telephony/src/android/telephony/cts/
DPhoneStateListenerTest.java54 private static ConnectivityManager mCm; field in PhoneStateListenerTest
61 mCm = (ConnectivityManager)getContext().getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
74 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testPhoneStateListener()
89 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnServiceStateChanged()
126 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnSignalStrengthChanged()
163 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnSignalStrengthsChanged()
211 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnMessageWaitingIndicatorChanged()
249 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnCallForwardingIndicatorChanged()
288 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnCellLocationChanged()
325 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testOnCallStateChanged()
[all …]
DCellLocationTest.java38 private static ConnectivityManager mCm; field in CellLocationTest
46 mCm = (ConnectivityManager)getContext().getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
59 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testCellLocation()
DTelephonyManagerTest.java71 private static ConnectivityManager mCm; field in TelephonyManagerTest
78 mCm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
92 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testListen()
306 assertTrue(mCm.getNetworkInfo(ConnectivityManager.TYPE_ETHERNET) != null); in verifyDeviceId()
471 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testGetServiceState()
DCellInfoTest.java52 private static ConnectivityManager mCm; field in CellInfoTest
118 mCm = (ConnectivityManager)getContext().getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
129 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in testCellInfo()
/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/tests/JobScheduler/src/android/jobscheduler/cts/
DConnectivityConstraintTest.java56 private ConnectivityManager mCm; field in ConnectivityConstraintTest
74 mCm = in setUp()
276 if (mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) == null) { in checkDeviceSupportsMobileData()
374 NetworkInfo[] allNetworkInfo = mCm.getAllNetworkInfo(); in onReceive()
400 return mExpectedState == mCm.getNetworkInfo(mNetworkType).getState(); in hasExpectedState()
/cts/hostsidetests/net/app/src/com/android/cts/net/hostside/
DAbstractRestrictBackgroundNetworkTestCase.java120 protected ConnectivityManager mCm; field in AbstractRestrictBackgroundNetworkTestCase
136 mCm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
253 final int actualStatus = mCm.getRestrictBackgroundStatus(); in assertMyRestrictBackgroundStatus()
258 final int actualStatus = mCm.getRestrictBackgroundStatus(); in isMyRestrictBackgroundStatus()
583 final NetworkInfo info = mCm.getActiveNetworkInfo(); in setUnmeteredNetwork()
585 if (!mCm.isActiveNetworkMetered()) { in setUnmeteredNetwork()
608 final NetworkInfo info = mCm.getActiveNetworkInfo(); in setMeteredNetwork()
609 final boolean metered = mCm.isActiveNetworkMetered(); in setMeteredNetwork()
647 info = mCm.getActiveNetworkInfo(); in assertActiveNetworkMetered()
651 } else if (mCm.isActiveNetworkMetered() != expected) { in assertActiveNetworkMetered()
[all …]
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DNetworkUsageStatsTest.java158 private ConnectivityManager mCm; field in NetworkUsageStatsTest
168 NetworkInfo networkInfo = mCm.getNetworkInfo(network); in exerciseRemoteHost()
224 mCm = (ConnectivityManager) getInstrumentation().getContext() in setUp()
286 isDefault = network.equals(mCm.getActiveNetwork()); in onAvailable()
290 metered = !mCm.getNetworkCapabilities(network) in onAvailable()
310 mCm.requestNetwork(new NetworkRequest.Builder() in shouldTestThisNetworkType()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodFlowTestActivity.java57 private static ConnectivityManager mCm; field in ByodFlowTestActivity
501 mCm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); in setupTests()
502 if(mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) != null) { in setupTests()