/frameworks/base/tests/net/common/java/android/net/ |
D | NetworkCapabilitiesTest.java | 114 NetworkCapabilities netCap = new NetworkCapabilities(); in testMaybeMarkCapabilitiesRestricted() local 115 netCap.addCapability(NET_CAPABILITY_INTERNET); in testMaybeMarkCapabilitiesRestricted() 116 netCap.maybeMarkCapabilitiesRestricted(); in testMaybeMarkCapabilitiesRestricted() 117 assertTrue(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted() 120 netCap = new NetworkCapabilities(); in testMaybeMarkCapabilitiesRestricted() 121 netCap.addCapability(NET_CAPABILITY_INTERNET); in testMaybeMarkCapabilitiesRestricted() 122 netCap.addCapability(NET_CAPABILITY_NOT_METERED); in testMaybeMarkCapabilitiesRestricted() 123 netCap.maybeMarkCapabilitiesRestricted(); in testMaybeMarkCapabilitiesRestricted() 124 assertTrue(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted() 125 netCap = new NetworkCapabilities(); in testMaybeMarkCapabilitiesRestricted() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/dataconnection/ |
D | TelephonyNetworkFactoryTest.java | 85 NetworkCapabilities netCap = (new NetworkCapabilities()). in makeSubSpecificInternetRequest() local 89 netCap.setNetworkSpecifier(new TelephonyNetworkSpecifier.Builder() in makeSubSpecificInternetRequest() 91 NetworkRequest networkRequest = new NetworkRequest(netCap, -1, in makeSubSpecificInternetRequest() 99 NetworkCapabilities netCap = (new NetworkCapabilities()) in makeDefaultInternetRequest() local 103 NetworkRequest networkRequest = new NetworkRequest(netCap, -1, in makeDefaultInternetRequest() 111 NetworkCapabilities netCap = (new NetworkCapabilities()). in makeSubSpecificMmsRequest() local 115 netCap.setNetworkSpecifier(new TelephonyNetworkSpecifier.Builder() in makeSubSpecificMmsRequest() 117 NetworkRequest networkRequest = new NetworkRequest(netCap, -1, in makeSubSpecificMmsRequest()
|
/frameworks/base/core/java/android/net/ |
D | NetworkCapabilities.java | 1729 NetworkCapabilities netCap = new NetworkCapabilities(); 1731 netCap.mNetworkCapabilities = in.readLong(); 1732 netCap.mUnwantedNetworkCapabilities = in.readLong(); 1733 netCap.mTransportTypes = in.readLong(); 1734 netCap.mLinkUpBandwidthKbps = in.readInt(); 1735 netCap.mLinkDownBandwidthKbps = in.readInt(); 1736 netCap.mNetworkSpecifier = in.readParcelable(null); 1737 netCap.mTransportInfo = in.readParcelable(null); 1738 netCap.mSignalStrength = in.readInt(); 1739 netCap.mUids = (ArraySet<UidRange>) in.readArraySet( [all …]
|
D | ConnectivityManager.java | 1443 NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature); in startUsingNetworkFeature() local 1444 if (netCap == null) { in startUsingNetworkFeature() 1452 LegacyRequest l = sLegacyRequests.get(netCap); in startUsingNetworkFeature() 1463 request = requestNetworkForFeatureLocked(netCap); in startUsingNetworkFeature() 1500 NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature); in stopUsingNetworkFeature() local 1501 if (netCap == null) { in stopUsingNetworkFeature() 1507 if (removeRequestForFeature(netCap)) { in stopUsingNetworkFeature() 1541 private int legacyTypeForNetworkCapabilities(NetworkCapabilities netCap) { in legacyTypeForNetworkCapabilities() argument 1542 if (netCap == null) return TYPE_NONE; in legacyTypeForNetworkCapabilities() 1543 if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_CBS)) { in legacyTypeForNetworkCapabilities() [all …]
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | PhoneSwitcher.java | 392 NetworkCapabilities netCap = new NetworkCapabilities(); in PhoneSwitcher() local 393 netCap.addTransportType(TRANSPORT_CELLULAR); in PhoneSwitcher() 394 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_MMS); in PhoneSwitcher() 395 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_SUPL); in PhoneSwitcher() 396 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_DUN); in PhoneSwitcher() 397 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_FOTA); in PhoneSwitcher() 398 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_IMS); in PhoneSwitcher() 399 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_CBS); in PhoneSwitcher() 400 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_IA); in PhoneSwitcher() 401 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_RCS); in PhoneSwitcher() [all …]
|
/frameworks/libs/net/common/device/android/net/ |
D | NetworkFactory.java | 242 private void handleSetFilter(NetworkCapabilities netCap) { in handleSetFilter() argument 243 mCapabilityFilter = netCap; in handleSetFilter() 373 public void setCapabilityFilter(NetworkCapabilities netCap) { in setCapabilityFilter() argument 374 sendMessage(obtainMessage(CMD_SET_FILTER, new NetworkCapabilities(netCap))); in setCapabilityFilter()
|
/frameworks/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/ |
D | IPv6TetheringCoordinatorTest.java | 83 final NetworkCapabilities netCap = in createDualStackUpstream() local 94 return new UpstreamNetworkState(linkProp, netCap, network); in createDualStackUpstream()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | PhoneSwitcherTest.java | 1237 NetworkCapabilities netCap = (new NetworkCapabilities()) in addInternetNetworkRequest() local 1241 netCap.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED); in addInternetNetworkRequest() 1245 netCap.setNetworkSpecifier(new TelephonyNetworkSpecifier.Builder() in addInternetNetworkRequest() 1248 NetworkRequest networkRequest = new NetworkRequest(netCap, ConnectivityManager.TYPE_NONE, in addInternetNetworkRequest() 1265 NetworkCapabilities netCap = (new NetworkCapabilities()) in addMmsNetworkRequest() local 1270 netCap.setNetworkSpecifier(new TelephonyNetworkSpecifier.Builder() in addMmsNetworkRequest() 1273 NetworkRequest networkRequest = new NetworkRequest(netCap, ConnectivityManager.TYPE_NONE, in addMmsNetworkRequest()
|
/frameworks/base/packages/Tethering/src/com/android/networkstack/tethering/ |
D | UpstreamNetworkMonitor.java | 563 private static boolean hasCapability(UpstreamNetworkState ns, int netCap) { in hasCapability() argument 565 && ns.networkCapabilities.hasCapability(netCap); in hasCapability()
|
/frameworks/base/services/core/java/com/android/server/ |
D | ConnectivityService.java | 1172 final NetworkCapabilities netCap = new NetworkCapabilities(); in createDefaultNetworkCapabilitiesForUid() local 1173 netCap.addCapability(NET_CAPABILITY_INTERNET); in createDefaultNetworkCapabilitiesForUid() 1174 netCap.removeCapability(NET_CAPABILITY_NOT_VPN); in createDefaultNetworkCapabilitiesForUid() 1175 netCap.setSingleUid(uid); in createDefaultNetworkCapabilitiesForUid() 1176 return netCap; in createDefaultNetworkCapabilitiesForUid() 1181 final NetworkCapabilities netCap = new NetworkCapabilities(); in createDefaultInternetRequestForTransport() local 1182 netCap.addCapability(NET_CAPABILITY_INTERNET); in createDefaultInternetRequestForTransport() 1183 netCap.setRequestorUidAndPackageName(Process.myUid(), mContext.getPackageName()); in createDefaultInternetRequestForTransport() 1185 netCap.addTransportType(transportType); in createDefaultInternetRequestForTransport() 1187 return new NetworkRequest(netCap, TYPE_NONE, nextNetworkRequestId(), type); in createDefaultInternetRequestForTransport() [all …]
|
/frameworks/base/tests/net/java/com/android/server/ |
D | ConnectivityServiceTest.java | 6858 final NetworkCapabilities netCap = new NetworkCapabilities().setOwnerUid(ownerUid); in getOwnerUidNetCapsForCallerPermission() local 6861 .maybeSanitizeLocationInfoForCaller(netCap, callerUid, mContext.getPackageName()) in getOwnerUidNetCapsForCallerPermission()
|