Home
last modified time | relevance | path

Searched refs:hasTransport (Results 1 – 25 of 67) sorted by relevance

123

/packages/modules/RemoteKeyProvisioning/app/src/com/android/rkpdapp/metrics/
DProvisioningAttempt.java233 if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) { in getTransportTypeForActiveNetwork()
234 if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) in getTransportTypeForActiveNetwork()
235 && capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) { in getTransportTypeForActiveNetwork()
239 if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) { in getTransportTypeForActiveNetwork()
243 if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) { in getTransportTypeForActiveNetwork()
247 if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_BLUETOOTH)) { in getTransportTypeForActiveNetwork()
251 if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)) { in getTransportTypeForActiveNetwork()
259 if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) { in getTransportTypeForActiveNetwork()
263 if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) { in getTransportTypeForActiveNetwork()
267 if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_BLUETOOTH)) { in getTransportTypeForActiveNetwork()
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/datausage/
DDataUsageEntryPreferenceControllerTest.java117 when(mMockNetworkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) in setUp()
131 when(mMockNetworkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) in getAvailabilityStatus_noMobileNetwork_isUnsupported()
140 when(mMockNetworkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) in getAvailabilityStatus_noMobileNetwork_isUnsupported_zoneWrite()
151 when(mMockNetworkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) in getAvailabilityStatus_noMobileNetwork_isUnsupported_zoneRead()
162 when(mMockNetworkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) in getAvailabilityStatus_noMobileNetwork_isUnsupported_zoneHidden()
173 when(mMockNetworkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) in getAvailabilityStatus_hasMobileNetwork_isAvailable()
182 when(mMockNetworkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) in getAvailabilityStatus_hasMobileNetwork_isAvailable_zoneWrite()
193 when(mMockNetworkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) in getAvailabilityStatus_hasMobileNetwork_isAvailable_zoneRead()
204 when(mMockNetworkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) in getAvailabilityStatus_hasMobileNetwork_isAvailable_zoneHidden()
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/
DNetworkMonitorUtils.java89 if (nc.hasTransport(TRANSPORT_TEST) && nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED) && ( in isPrivateDnsValidationRequired()
90 nc.hasTransport(TRANSPORT_WIFI) in isPrivateDnsValidationRequired()
91 || nc.hasTransport(TRANSPORT_CELLULAR) in isPrivateDnsValidationRequired()
92 || nc.hasTransport(TRANSPORT_BLUETOOTH) in isPrivateDnsValidationRequired()
93 || nc.hasTransport(TRANSPORT_ETHERNET))) { in isPrivateDnsValidationRequired()
/packages/modules/NetworkStack/src/com/android/networkstack/metrics/
DNetworkValidationMetrics.java94 boolean hasCellular = nc.hasTransport(TRANSPORT_CELLULAR); in getTransportTypeFromNC()
95 boolean hasWifi = nc.hasTransport(TRANSPORT_WIFI); in getTransportTypeFromNC()
96 boolean hasBT = nc.hasTransport(TRANSPORT_BLUETOOTH); in getTransportTypeFromNC()
97 boolean hasEthernet = nc.hasTransport(TRANSPORT_ETHERNET); in getTransportTypeFromNC()
98 boolean hasVpn = nc.hasTransport(TRANSPORT_VPN); in getTransportTypeFromNC()
99 boolean hasWifiAware = nc.hasTransport(TRANSPORT_WIFI_AWARE); in getTransportTypeFromNC()
100 boolean hasLopan = nc.hasTransport(TRANSPORT_LOWPAN); in getTransportTypeFromNC()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/metrics/
DTetheringMetrics.java368 if (nc.hasTransport(TRANSPORT_CELLULAR)) return UpstreamType.UT_CELLULAR; in transportTypeToUpstreamTypeEnum()
369 if (nc.hasTransport(TRANSPORT_WIFI)) return UpstreamType.UT_WIFI; in transportTypeToUpstreamTypeEnum()
370 if (nc.hasTransport(TRANSPORT_BLUETOOTH)) return UpstreamType.UT_BLUETOOTH; in transportTypeToUpstreamTypeEnum()
371 if (nc.hasTransport(TRANSPORT_ETHERNET)) return UpstreamType.UT_ETHERNET; in transportTypeToUpstreamTypeEnum()
372 if (nc.hasTransport(TRANSPORT_WIFI_AWARE)) return UpstreamType.UT_WIFI_AWARE; in transportTypeToUpstreamTypeEnum()
373 if (nc.hasTransport(TRANSPORT_LOWPAN)) return UpstreamType.UT_LOWPAN; in transportTypeToUpstreamTypeEnum()
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DLingerMonitor.java114 private static boolean hasTransport(NetworkAgentInfo nai, int transport) { in hasTransport() method in LingerMonitor
115 return nai.networkCapabilities.hasTransport(transport); in hasTransport()
149 if (hasTransport(fromNai, fromTransport) && hasTransport(toNai, toTransport)) { in isNotificationEnabled()
DFullScore.java174 everValidated, caps.hasTransport(TRANSPORT_VPN), in fromNetworkScore()
205 final boolean vpn = caps.hasTransport(TRANSPORT_VPN); in makeProspectiveScore()
248 everValidated, caps.hasTransport(TRANSPORT_VPN), in mixInScore()
DNetworkAgentInfo.java1051 return networkCapabilities.hasTransport(TRANSPORT_CELLULAR) && !mConnService.avoidBadWifi(); in yieldToBadWiFi()
1260 return networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN); in isVPN()
1558 if (nc.hasTransport(TRANSPORT_TEST)) {
1584 if (nc.hasTransport(TRANSPORT_ETHERNET)) {
1589 if (nc.hasTransport(TRANSPORT_TEST) && !nc.hasCapability(NET_CAPABILITY_INTERNET)) {
DNetworkRanker.java160 if (!caps.hasTransport(TRANSPORT_WIFI)) return false; in isPreferredBadWiFi()
330 partitionInto(candidates, nai -> nai.getCapsNoCopy().hasTransport(transport), in getBestNetworkByPolicy()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/network/
DMobileNetworkEntryPreferenceControllerTest.java137 when(mCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)).thenReturn(true); in setUp()
168 when(mCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)).thenReturn(false); in getAvailabilityStatus_noSim_noMobileNetwork_unsupported()
177 when(mCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)).thenReturn(false); in getAvailabilityStatus_noSim_noMobileNetwork_unsupported_zoneWrite()
187 when(mCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)).thenReturn(false); in getAvailabilityStatus_noSim_noMobileNetwork_unsupported_zoneRead()
197 when(mCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)).thenReturn(false); in getAvailabilityStatus_noSim_noMobileNetwork_unsupported_zoneHidden()
293 when(mCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)).thenReturn(false); in getAvailabilityStatus_hasSim_noMobileNetwork_isAdmin_noRestriction_available()
DNetworkUtilsTest.java45 when(capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)).thenReturn(true); in hasMobileNetwork_hasCellularCapabilities_returnsTrue()
58 when(capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)).thenReturn(false); in hasMobileNetwork_hasNoCellularCapabilities_returnsFalse()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DTetheringInterfaceUtils.java93 return nc.hasTransport(TRANSPORT_CELLULAR) || nc.hasTransport(TRANSPORT_TEST); in allowIpv6Tethering()
/packages/modules/Connectivity/tests/common/java/android/net/
DNetworkCapabilitiesTest.java1130 assertFalse(nc.hasTransport(i)); in assertNoTransport()
1141 assertTrue(nc.hasTransport(i)); in checkCurrentTransportTypes()
1143 assertFalse(nc.hasTransport(i)); in checkCurrentTransportTypes()
1148 assertFalse(nc.hasTransport(i)); in checkCurrentTransportTypes()
1150 assertTrue(nc.hasTransport(i)); in checkCurrentTransportTypes()
1171 assertTrue(nc.hasTransport(TRANSPORT_WIFI)); in testMultipleTransportTypes()
1172 assertFalse(nc.hasTransport(TRANSPORT_VPN)); in testMultipleTransportTypes()
1174 assertTrue(nc.hasTransport(TRANSPORT_WIFI)); in testMultipleTransportTypes()
1175 assertTrue(nc.hasTransport(TRANSPORT_VPN)); in testMultipleTransportTypes()
1177 assertFalse(nc.hasTransport(TRANSPORT_WIFI)); in testMultipleTransportTypes()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DMultinetworkApiTest.java228 if (nc != null && !nc.hasTransport(TRANSPORT_CELLULAR)) { in testResNApi()
297 && !nc.hasTransport(TRANSPORT_WIFI) in getTestableNetworks()
298 && !nc.hasTransport(TRANSPORT_CELLULAR)) { in getTestableNetworks()
/packages/modules/Telephony/services/QualifiedNetworksService/src/com/android/telephony/qns/
DIwlanNetworkStatusTracker.java191 if (nc != null && nc.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) { in onCrossSimEnabledEvent()
470 if (nc.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) { in onAvailable()
475 } else if (nc.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) { in onAvailable()
552 if (nc.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) { in onCapabilitiesChanged()
560 } else if (nc.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) { in onCapabilitiesChanged()
/packages/modules/Connectivity/tests/cts/hostside-network-policy/app/src/com/android/cts/netpolicy/hostside/
DNetworkPolicyTestUtils.java180 return networkCapabilities.hasTransport(TRANSPORT_WIFI) in canChangeActiveNetworkMeteredness()
181 || networkCapabilities.hasTransport(TRANSPORT_CELLULAR); in canChangeActiveNetworkMeteredness()
197 if (networkCapabilities.hasTransport(TRANSPORT_WIFI)) { in setupActiveNetworkMeteredness()
201 } else if (networkCapabilities.hasTransport(TRANSPORT_CELLULAR)) { in setupActiveNetworkMeteredness()
/packages/modules/Connectivity/framework/src/android/net/
DNetworkRequest.java534 } else if (mNetworkCapabilities.hasTransport(TRANSPORT_TEST)) { in setNetworkSpecifier()
754 public boolean hasTransport(@Transport int transportType) { in hasTransport() method in NetworkRequest
755 return networkCapabilities.hasTransport(transportType); in hasTransport()
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/testutils/
DTestableNetworkCallbackTest.kt186 cb is CapabilitiesChanged && cb.caps.hasTransport(WIFI) in <lambda>()
206 it.hasCapability(NOT_METERED) && it.hasTransport(WIFI) && !it.hasTransport(CELLULAR) in <lambda>()
209 assertFails { mCallback.expectCaps(net, SHORT_TIMEOUT_MS) { it.hasTransport(CELLULAR) } } in <lambda>()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/utils/
DRandomnessFactory.java60 networkCapabilities != null && networkCapabilities.hasTransport(TRANSPORT_TEST); in RandomnessFactory()
/packages/modules/Connectivity/tests/cts/tethering/src/android/tethering/cts/
DTetheringManagerTest.java463 assumeFalse(activeNetCap.hasTransport(TRANSPORT_ETHERNET)); in testTetheringUpstream()
465 assertTrue(activeNetCap.hasTransport(TRANSPORT_CELLULAR)); in testTetheringUpstream()
473 assertTrue(netCap.hasTransport(TRANSPORT_CELLULAR)); in testTetheringUpstream()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/net/
DIkeConnectionController.java368 if (nc.hasTransport(TRANSPORT_WIFI)) { in getKeepaliveDelaySec()
374 } else if (nc.hasTransport(TRANSPORT_CELLULAR)) { in getKeepaliveDelaySec()
729 if (mNc.hasTransport(TRANSPORT_WIFI)) { in getMetricsNetworkType()
731 } else if (mNc.hasTransport(TRANSPORT_CELLULAR)) { in getMetricsNetworkType()
1099 && nc.hasTransport(TRANSPORT_WIFI); in isIpV4Preferred()
/packages/apps/Car/Settings/src/com/android/car/settings/network/
DNetworkUtils.java42 if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) { in hasMobileNetwork()
/packages/modules/Connectivity/tests/unit/java/com/android/server/
DConnectivityServiceTest.java2530 assertTrue(mCm.getNetworkCapabilities(mCm.getActiveNetwork()).hasTransport(transport));
7745 assertTrue(capabilities.hasTransport(TRANSPORT_WIFI_AWARE));
8187 assertFalse(nc.hasTransport(TRANSPORT_WIFI));
8213 assertFalse(nc.hasTransport(TRANSPORT_WIFI));
8754 .hasTransport(TRANSPORT_VPN));
8756 .hasTransport(TRANSPORT_WIFI));
8780 .hasTransport(TRANSPORT_VPN));
8782 .hasTransport(TRANSPORT_WIFI));
8788 && c.hasTransport(TRANSPORT_VPN));
8815 && c.hasTransport(TRANSPORT_CELLULAR));
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/about/
DMacAddressPreferenceController.java65 || !networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)) { in updateConnectivity()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/net/
DIkeConnectionControllerTest.java665 doReturn(true).when(mockNc).hasTransport(transportType); in verifyIsIpV4Preferred()
786 doReturn(true).when(mockNc).hasTransport(transportType); in verifyUsedIpVersion()
813 if (isAutoSelectionEnabled) verify(mockNc, atLeastOnce()).hasTransport(TRANSPORT_WIFI); in verifyUsedIpVersion()
1350 doReturn(true).when(mockNc).hasTransport(transportType); in verifyGetKeepaliveDelaySec()
1360 verify(mockNc).hasTransport(TRANSPORT_WIFI); in verifyGetKeepaliveDelaySec()
1362 verify(mockNc).hasTransport(TRANSPORT_CELLULAR); in verifyGetKeepaliveDelaySec()

123