/cts/tests/netlegacy22.api/src/android/net/cts/legacy/api22/ |
D | ConnectivityManagerLegacyTest.java | 57 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/ |
D | ConnectivityManagerTest.java | 134 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 …]
|
D | DnsTest.java | 48 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/ |
D | PhoneStateListenerTest.java | 54 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 …]
|
D | CellLocationTest.java | 38 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()
|
D | TelephonyManagerTest.java | 71 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()
|
D | CellInfoTest.java | 52 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/ |
D | MeteredDataRestrictionTest.java | 64 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/ |
D | ConnectivityConstraintTest.java | 56 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/ |
D | AbstractRestrictBackgroundNetworkTestCase.java | 120 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/ |
D | NetworkUsageStatsTest.java | 158 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/ |
D | ByodFlowTestActivity.java | 57 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()
|