Home
last modified time | relevance | path

Searched refs:netInfo (Results 1 – 6 of 6) sorted by relevance

/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DNetworkInfoTest.kt63 for (netInfo in ni) { in testAccessNetworkInfoProperties() constant
64 when (netInfo.getType()) { in testAccessNetworkInfoProperties()
65 TYPE_MOBILE -> assertNetworkInfo(netInfo, MOBILE_TYPE_NAME) in testAccessNetworkInfoProperties()
66 TYPE_WIFI -> assertNetworkInfo(netInfo, WIFI_TYPE_NAME) in testAccessNetworkInfoProperties()
72 private fun assertNetworkInfo(netInfo: NetworkInfo, expectedTypeName: String) { in assertNetworkInfo()
73 assertTrue(expectedTypeName.equals(netInfo.getTypeName(), ignoreCase = true)) in assertNetworkInfo()
74 assertNotNull(netInfo.toString()) in assertNetworkInfo()
76 if (!netInfo.isConnectedOrConnecting()) return in assertNetworkInfo()
78 assertTrue(netInfo.isAvailable()) in assertNetworkInfo()
79 if (State.CONNECTED == netInfo.getState()) { in assertNetworkInfo()
[all …]
/packages/apps/Dialer/java/com/android/dialer/common/
DNetworkUtil.java72 NetworkInfo netInfo = connectivityManager.getActiveNetworkInfo(); in getCurrentNetworkTypeName() local
73 @NetworkType String networkType = getNetworkType(netInfo); in getCurrentNetworkTypeName()
75 return networkType + " (" + netInfo.getSubtypeName() + ")"; in getCurrentNetworkTypeName()
81 public static String getNetworkType(@Nullable NetworkInfo netInfo) { in getNetworkType() argument
82 if (netInfo == null || !netInfo.isConnected()) { in getNetworkType()
85 switch (netInfo.getType()) { in getNetworkType()
89 return getMobileNetworkType(netInfo.getSubtype()); in getNetworkType()
/packages/modules/Connectivity/framework/src/android/net/
DNetworkInfo.java636 NetworkInfo netInfo = new NetworkInfo(netType, subtype, typeName, subtypeName);
637 netInfo.mState = State.valueOf(in.readString());
638 netInfo.mDetailedState = DetailedState.valueOf(in.readString());
639 netInfo.mIsFailover = in.readInt() != 0;
640 netInfo.mIsAvailable = in.readInt() != 0;
641 netInfo.mIsRoaming = in.readInt() != 0;
642 netInfo.mReason = in.readString();
643 netInfo.mExtraInfo = in.readString();
644 return netInfo;
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/suggestions/eligibility/
DConnectivityEligibilityChecker.java44 NetworkInfo netInfo = cm.getActiveNetworkInfo(); in isEligible() local
45 boolean satisfiesConnectivity = netInfo != null && netInfo.isConnectedOrConnecting(); in isEligible()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareDataPathStateManagerTest.java600 WifiAwareNetworkInfo netInfo = in testMultipleNdpsOnSingleNdi() local
604 netInfo.getPeerIpv6Addr().getAddress()); in testMultipleNdpsOnSingleNdi()
605 assertEquals(port, netInfo.getPort()); in testMultipleNdpsOnSingleNdi()
606 assertEquals(transportProtocol, netInfo.getTransportProtocol()); in testMultipleNdpsOnSingleNdi()
608 assertEquals(AWARE_CHANNEL_INFO, netInfo.getChannelInfoList().get(0)); in testMultipleNdpsOnSingleNdi()
734 WifiAwareNetworkInfo netInfo = in testMultipleIdenticalRequests() local
739 netInfo.getPeerIpv6Addr().getAddress()); in testMultipleIdenticalRequests()
740 assertEquals(port, netInfo.getPort()); in testMultipleIdenticalRequests()
741 assertEquals(transportProtocol, netInfo.getTransportProtocol()); in testMultipleIdenticalRequests()
867 WifiAwareNetworkInfo netInfo = in testMultipleNdiToSamePeer() local
[all …]
/packages/apps/Test/connectivity/UID/src/com/android/tests/connectivity/uid/
DConnectivityTestActivity.java74 NetworkInfo netInfo = mConnectivityManager.getActiveNetworkInfo(); in checkNow() local
75 return netInfo.isConnected() && httpRequest(); in checkNow()