Home
last modified time | relevance | path

Searched refs:hasCapability (Results 1 – 25 of 60) sorted by relevance

123

/packages/modules/NetworkStack/common/moduleutils/src/android/net/shared/
DNetworkMonitorUtils.java71 final boolean isVcnManaged = !nc.hasCapability(NET_CAPABILITY_NOT_VCN_MANAGED); in isPrivateDnsValidationRequired()
72 final boolean isOemPaid = nc.hasCapability(NET_CAPABILITY_OEM_PAID) in isPrivateDnsValidationRequired()
73 && nc.hasCapability(NET_CAPABILITY_TRUSTED); in isPrivateDnsValidationRequired()
74 final boolean isDefaultCapable = nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED) in isPrivateDnsValidationRequired()
75 && nc.hasCapability(NET_CAPABILITY_TRUSTED); in isPrivateDnsValidationRequired()
78 if (nc.hasCapability(NET_CAPABILITY_INTERNET) in isPrivateDnsValidationRequired()
91 if (nc.hasTransport(TRANSPORT_TEST) && nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED) && ( in isPrivateDnsValidationRequired()
108 return isPrivateDnsValidationRequired(nc) && nc.hasCapability(NET_CAPABILITY_NOT_VPN); in isValidationRequired()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DNetworkRequestTest.java98 .hasCapability(NET_CAPABILITY_MMS)); in testCapabilities()
100 .hasCapability(NET_CAPABILITY_MMS)); in testCapabilities()
111 .hasCapability(NET_CAPABILITY_TEMPORARILY_NOT_METERED)); in testTemporarilyNotMeteredCapability()
114 .hasCapability(NET_CAPABILITY_TEMPORARILY_NOT_METERED)); in testTemporarilyNotMeteredCapability()
121 assertFalse(nr.hasCapability(bit)); in verifyNoCapabilities()
372 assertTrue(emptyRequest.hasCapability(ConstantsShim.NET_CAPABILITY_NOT_VCN_MANAGED)); in testBypassingVcn()
379 assertTrue(mmsAddNotVcnRequest.hasCapability( in testBypassingVcn()
387 assertTrue(mmsAddNotVcnRequest2.hasCapability( in testBypassingVcn()
393 assertFalse(removeNotVcnRequest.hasCapability( in testBypassingVcn()
400 assertTrue(notRoamRequest.hasCapability(ConstantsShim.NET_CAPABILITY_NOT_VCN_MANAGED)); in testBypassingVcn()
[all …]
DMultinetworkApiTest.java83 && nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED) in getTestableNetworks()
84 && nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)) { in getTestableNetworks()
DNetworkAgentTest.kt487 it.hasCapability(NET_CAPABILITY_NOT_METERED) in testSetLegacySubtypeInNetworkAgent()
609 it.hasCapability(NET_CAPABILITY_NOT_METERED) in agent()
691 assertFalse(vpnNc.hasCapability(NET_CAPABILITY_NOT_VPN)) in testSetUnderlyingNetworksAndVpnSpecifier()
720 if (defaultNetworkCapabilities.hasCapability(cap) && !vpnNc.hasCapability(cap)) { in testSetUnderlyingNetworksAndVpnSpecifier()
823 it.hasCapability(NET_CAPABILITY_TEMPORARILY_NOT_METERED) in testTemporarilyUnmeteredCapability()
831 !it.hasCapability(NET_CAPABILITY_TEMPORARILY_NOT_METERED) in testTemporarilyUnmeteredCapability()
DConnectivityManagerTest.java1114 final boolean metered = !nc.hasCapability(NET_CAPABILITY_NOT_METERED); in waitForActiveNetworkMetered()
1216 assertEquals(mCm.getNetworkCapabilities(network).hasCapability( in testGetMultipathPreference()
1225 assertEquals(mCm.getNetworkCapabilities(network).hasCapability( in testGetMultipathPreference()
1232 assertEquals(mCm.getNetworkCapabilities(network).hasCapability( in testGetMultipathPreference()
1799 if (nc != null && !nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)) {
2075 .hasCapability(NET_CAPABILITY_FOREGROUND));
2078 nc.hasCapability(NET_CAPABILITY_FOREGROUND));
2621 assertTrue(mCm.getNetworkCapabilities(wifiNetwork).hasCapability(
2631 .hasCapability(NET_CAPABILITY_VALIDATED));
2635 .hasCapability(NET_CAPABILITY_VALIDATED));
[all …]
DCaptivePortalTest.kt145 it.network == cellNetwork && it.caps.hasCapability(NET_CAPABILITY_VALIDATED) in testCaptivePortalIsNotDefaultNetwork()
169 if (nc.hasCapability(NET_CAPABILITY_CAPTIVE_PORTAL)) { in testCaptivePortalIsNotDefaultNetwork()
/packages/modules/Connectivity/tests/common/java/android/net/
DNetworkCapabilitiesTest.java110 assertTrue(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted()
117 assertTrue(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted()
122 assertTrue(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted()
130 assertTrue(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted()
136 assertTrue(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted()
143 assertFalse(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted()
148 assertFalse(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted()
156 assertFalse(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted()
162 assertFalse(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted()
400 assertFalse(nc.hasCapability(NET_CAPABILITY_OEM_PAID)); in testOemPaid()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/
DOemWifiNetworkFactory.java51 if (networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_OEM_PAID)) { in needNetworkFor()
59 if (networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_OEM_PRIVATE)) { in needNetworkFor()
71 if (networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_OEM_PAID)) { in releaseNetworkFor()
81 if (networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_OEM_PRIVATE)) { in releaseNetworkFor()
DUntrustedWifiNetworkFactory.java50 if (!networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED)) { in needNetworkFor()
59 if (!networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED)) { in releaseNetworkFor()
DWifiScoreReport.java876 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_OEM_PAID) in isLocalOnlyOrRestrictedConnection()
877 || nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_OEM_PRIVATE)) { in isLocalOnlyOrRestrictedConnection()
883 if (!nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)) { in isLocalOnlyOrRestrictedConnection()
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DFullScore.java162 caps.hasCapability(NET_CAPABILITY_VALIDATED), in fromNetworkScore()
164 caps.hasCapability(NET_CAPABILITY_NOT_METERED), in fromNetworkScore()
188 final boolean mayValidate = caps.hasCapability(NET_CAPABILITY_INTERNET); in makeProspectiveScore()
225 caps.hasCapability(NET_CAPABILITY_VALIDATED), in mixInScore()
227 caps.hasCapability(NET_CAPABILITY_NOT_METERED), in mixInScore()
/packages/modules/Connectivity/tests/unit/java/android/net/
DConnectivityManagerTest.java101 assertTrue(nc.hasCapability(capability)); in verifyNetworkCapabilities()
125 assertFalse(nc.hasCapability(NET_CAPABILITY_INTERNET)); in verifyRestrictedMobileNetworkCapabilities()
126 assertFalse(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in verifyRestrictedMobileNetworkCapabilities()
174 assertFalse(nc.hasCapability(NET_CAPABILITY_INTERNET)); in testNetworkCapabilitiesForTypeMobileMms()
186 assertFalse(nc.hasCapability(NET_CAPABILITY_INTERNET)); in testNetworkCapabilitiesForTypeMobileSupl()
203 assertFalse(nc.hasCapability(NET_CAPABILITY_INTERNET)); in testNetworkCapabilitiesForTypeWifiP2p()
/packages/apps/Settings/src/com/android/settings/wifi/slice/
DContextualWifiSlice.java147 && !nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL) in hasInternetAccess()
148 && !nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_PARTIAL_CONNECTIVITY) in hasInternetAccess()
149 && nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED); in hasInternetAccess()
/packages/modules/Connectivity/tests/unit/java/com/android/server/
DConnectivityServiceTest.java935 assertFalse(getNetworkCapabilities().hasCapability(NET_CAPABILITY_INTERNET)); in connect()
949 networkCapabilities.hasCapability(NET_CAPABILITY_VALIDATED)) { in connect()
2323 assertFalse(mCm.getNetworkCapabilities(mWiFiNetworkAgent.getNetwork()).hasCapability( in testUnlingeringDoesNotValidate()
2331 assertFalse(mCm.getNetworkCapabilities(mWiFiNetworkAgent.getNetwork()).hasCapability( in testUnlingeringDoesNotValidate()
2339 assertFalse(mCm.getNetworkCapabilities(mWiFiNetworkAgent.getNetwork()).hasCapability( in testUnlingeringDoesNotValidate()
2414 assertTrue(mCm.getNetworkCapabilities(mWiFiNetworkAgent.getNetwork()).hasCapability( in testCellularFallback()
2419 assertFalse(mCm.getNetworkCapabilities(mWiFiNetworkAgent.getNetwork()).hasCapability( in testCellularFallback()
2424 assertTrue(mCm.getNetworkCapabilities(mCellNetworkAgent.getNetwork()).hasCapability( in testCellularFallback()
2429 assertFalse(mCm.getNetworkCapabilities(mCellNetworkAgent.getNetwork()).hasCapability( in testCellularFallback()
2431 assertFalse(mCm.getNetworkCapabilities(mWiFiNetworkAgent.getNetwork()).hasCapability( in testCellularFallback()
[all …]
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DUpstreamNetworkMonitor.java643 && nc.hasCapability(NET_CAPABILITY_NOT_VPN); in isCellular()
646 private static boolean hasCapability(UpstreamNetworkState ns, int netCap) { in hasCapability() method in UpstreamNetworkMonitor
648 && ns.networkCapabilities.hasCapability(netCap); in hasCapability()
659 if (isCellular(ns) && hasCapability(ns, NET_CAPABILITY_DUN)) return ns; in findFirstDunNetwork()
/packages/services/Car/tests/GarageModeTestApp/src/com/google/android/car/garagemode/testapp/
DJobInfoRowArrayAdapter.java142 } else if (networkRequest.hasCapability(NET_CAPABILITY_NOT_METERED)) { in getNetworkType()
144 } else if (networkRequest.hasCapability(NET_CAPABILITY_NOT_ROAMING)) { in getNetworkType()
/packages/apps/Settings/src/com/android/settings/network/
DInternetUpdater.java232 if (capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) in updateInternetAvailable()
233 && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED)) { in updateInternetAvailable()
/packages/services/Car/tests/NetworkPreferenceApp/src/com/google/android/car/networking/preferenceupdater/components/
DMetricDisplay.java102 if (netCapabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_OEM_PAID)) { in scanAndPrintOemNetworksIfExist()
104 } else if (netCapabilities.hasCapability( in scanAndPrintOemNetworksIfExist()
/packages/modules/Connectivity/framework/src/android/net/
DConnectivityManager.java1722 if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_CBS)) { in legacyTypeForNetworkCapabilities()
1725 if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_IMS)) { in legacyTypeForNetworkCapabilities()
1728 if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_FOTA)) { in legacyTypeForNetworkCapabilities()
1731 if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_DUN)) { in legacyTypeForNetworkCapabilities()
1734 if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_SUPL)) { in legacyTypeForNetworkCapabilities()
1737 if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_MMS)) { in legacyTypeForNetworkCapabilities()
1740 if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)) { in legacyTypeForNetworkCapabilities()
1743 if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_WIFI_P2P)) { in legacyTypeForNetworkCapabilities()
3561 if (!networkCapabilities.hasCapability( in onAvailable()
DNetworkRequest.java631 public boolean hasCapability(@NetCapability int capability) { in hasCapability() method in NetworkRequest
632 return networkCapabilities.hasCapability(capability); in hasCapability()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/
DWifiNoInternetDialogTest.java214 when(mNetworkCapabilities.hasCapability(NET_CAPABILITY_VALIDATED)).thenReturn(true); in networkCallbackOnCapabilitiesChanged_shouldFinish()
228 when(mNetworkCapabilities.hasCapability(NET_CAPABILITY_VALIDATED)).thenReturn(true); in networkCallbackOnCapabilitiesChanged_shouldNotFinishIfNetworkIsNotTheSame()
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/store/
DImapConnection.java172 if (hasCapability(ImapConstants.CAPABILITY_STARTTLS)) { in maybeDoStartTls()
306 private boolean hasCapability(String capability) { in hasCapability() method in ImapConnection
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/setup/
DConnectState.java223 if (wifiNetworkCapabilities.hasCapability( in inferConnectionStatus()
226 } else if (wifiNetworkCapabilities.hasCapability( in inferConnectionStatus()
/packages/modules/ExtServices/java/src/android/ext/services/watchdog/
DNetworkChecker.java86 && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED)) { in onCapabilitiesChanged()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/
DOsuNetworkConnectionTest.java317 assertFalse(networkRequestCaptor.getValue().hasCapability(NET_CAPABILITY_TRUSTED)); in verifyWifiConfigurationForOsuNetwork()
350 assertFalse(networkRequestCaptor.getValue().hasCapability(NET_CAPABILITY_TRUSTED)); in verifyWifiConfigurationForOsenOsuNetwork()

123