/frameworks/base/tests/net/common/java/android/net/ |
D | NetworkCapabilitiesTest.java | 82 NetworkCapabilities netCap = new NetworkCapabilities(); in testMaybeMarkCapabilitiesRestricted() local 83 netCap.addCapability(NET_CAPABILITY_INTERNET); in testMaybeMarkCapabilitiesRestricted() 84 netCap.maybeMarkCapabilitiesRestricted(); in testMaybeMarkCapabilitiesRestricted() 85 assertTrue(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted() 88 netCap = new NetworkCapabilities(); in testMaybeMarkCapabilitiesRestricted() 89 netCap.addCapability(NET_CAPABILITY_INTERNET); in testMaybeMarkCapabilitiesRestricted() 90 netCap.addCapability(NET_CAPABILITY_NOT_METERED); in testMaybeMarkCapabilitiesRestricted() 91 netCap.maybeMarkCapabilitiesRestricted(); in testMaybeMarkCapabilitiesRestricted() 92 assertTrue(netCap.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); in testMaybeMarkCapabilitiesRestricted() 93 netCap = new NetworkCapabilities(); in testMaybeMarkCapabilitiesRestricted() [all …]
|
/frameworks/base/core/java/android/net/ |
D | ConnectivityManager.java | 1398 NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature); in startUsingNetworkFeature() local 1399 if (netCap == null) { in startUsingNetworkFeature() 1407 LegacyRequest l = sLegacyRequests.get(netCap); in startUsingNetworkFeature() 1418 request = requestNetworkForFeatureLocked(netCap); in startUsingNetworkFeature() 1455 NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature); in stopUsingNetworkFeature() local 1456 if (netCap == null) { in stopUsingNetworkFeature() 1462 if (removeRequestForFeature(netCap)) { in stopUsingNetworkFeature() 1521 private int inferLegacyTypeForNetworkCapabilities(NetworkCapabilities netCap) { in inferLegacyTypeForNetworkCapabilities() argument 1522 if (netCap == null) { in inferLegacyTypeForNetworkCapabilities() 1526 if (!netCap.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) { in inferLegacyTypeForNetworkCapabilities() [all …]
|
D | NetworkCapabilities.java | 1488 NetworkCapabilities netCap = new NetworkCapabilities(); 1490 netCap.mNetworkCapabilities = in.readLong(); 1491 netCap.mUnwantedNetworkCapabilities = in.readLong(); 1492 netCap.mTransportTypes = in.readLong(); 1493 netCap.mLinkUpBandwidthKbps = in.readInt(); 1494 netCap.mLinkDownBandwidthKbps = in.readInt(); 1495 netCap.mNetworkSpecifier = in.readParcelable(null); 1496 netCap.mTransportInfo = in.readParcelable(null); 1497 netCap.mSignalStrength = in.readInt(); 1498 netCap.mUids = (ArraySet<UidRange>) in.readArraySet( [all …]
|
D | NetworkFactory.java | 302 private void handleSetFilter(NetworkCapabilities netCap) { in handleSetFilter() argument 303 mCapabilityFilter = netCap; in handleSetFilter() 438 public void setCapabilityFilter(NetworkCapabilities netCap) { in setCapabilityFilter() argument 439 sendMessage(obtainMessage(CMD_SET_FILTER, new NetworkCapabilities(netCap))); in setCapabilityFilter()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | PhoneSwitcher.java | 393 NetworkCapabilities netCap = new NetworkCapabilities(); in PhoneSwitcher() local 394 netCap.addTransportType(TRANSPORT_CELLULAR); in PhoneSwitcher() 395 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_MMS); in PhoneSwitcher() 396 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_SUPL); in PhoneSwitcher() 397 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_DUN); in PhoneSwitcher() 398 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_FOTA); in PhoneSwitcher() 399 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_IMS); in PhoneSwitcher() 400 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_CBS); in PhoneSwitcher() 401 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_IA); in PhoneSwitcher() 402 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_RCS); in PhoneSwitcher() [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 StringNetworkSpecifier(Integer.toString(subId))); in makeSubSpecificInternetRequest() 90 return mConnectivityServiceMock.requestNetwork(netCap, null, 0, new Binder(), -1); in makeSubSpecificInternetRequest() 93 NetworkCapabilities netCap = (new NetworkCapabilities()). in makeSubSpecificMmsRequest() local 97 netCap.setNetworkSpecifier(new StringNetworkSpecifier(Integer.toString(subId))); in makeSubSpecificMmsRequest() 98 return mConnectivityServiceMock.requestNetwork(netCap, null, 0, new Binder(), -1); in makeSubSpecificMmsRequest()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/mocks/ |
D | ConnectivityServiceMock.java | 596 NetworkCapabilities netCap = new NetworkCapabilities(); in addDefaultRequest() 597 netCap.addCapability(NET_CAPABILITY_INTERNET); in addDefaultRequest() 598 netCap.addCapability(NET_CAPABILITY_NOT_RESTRICTED); in addDefaultRequest() 599 defaultRequest = requestNetwork(netCap, null, 0, new Binder(), in addDefaultRequest()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | PhoneSwitcherTest.java | 1106 NetworkCapabilities netCap = (new NetworkCapabilities()) in addInternetNetworkRequest() local 1110 netCap.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED); in addInternetNetworkRequest() 1114 netCap.setNetworkSpecifier(new StringNetworkSpecifier(Integer.toString(subId))); in addInternetNetworkRequest() 1116 NetworkRequest networkRequest = new NetworkRequest(netCap, ConnectivityManager.TYPE_NONE, in addInternetNetworkRequest() 1132 NetworkCapabilities netCap = (new NetworkCapabilities()) in addMmsNetworkRequest() local 1136 netCap.setNetworkSpecifier(new StringNetworkSpecifier(Integer.toString(subId))); in addMmsNetworkRequest() 1138 netCap.setNetworkSpecifier(new StringNetworkSpecifier(Integer.toString(subId))); in addMmsNetworkRequest() 1140 NetworkRequest networkRequest = new NetworkRequest(netCap, ConnectivityManager.TYPE_NONE, in addMmsNetworkRequest()
|
/frameworks/base/services/core/java/com/android/server/connectivity/tethering/ |
D | UpstreamNetworkMonitor.java | 554 private static boolean hasCapability(NetworkState ns, int netCap) { in hasCapability() argument 556 ns.networkCapabilities.hasCapability(netCap); in hasCapability()
|
/frameworks/base/services/core/java/com/android/server/ |
D | ConnectivityService.java | 1065 final NetworkCapabilities netCap = new NetworkCapabilities(); in createDefaultNetworkCapabilitiesForUid() local 1066 netCap.addCapability(NET_CAPABILITY_INTERNET); in createDefaultNetworkCapabilitiesForUid() 1067 netCap.addCapability(NET_CAPABILITY_NOT_RESTRICTED); in createDefaultNetworkCapabilitiesForUid() 1068 netCap.removeCapability(NET_CAPABILITY_NOT_VPN); in createDefaultNetworkCapabilitiesForUid() 1069 netCap.setSingleUid(uid); in createDefaultNetworkCapabilitiesForUid() 1070 return netCap; in createDefaultNetworkCapabilitiesForUid() 1075 final NetworkCapabilities netCap = new NetworkCapabilities(); in createDefaultInternetRequestForTransport() local 1076 netCap.addCapability(NET_CAPABILITY_INTERNET); in createDefaultInternetRequestForTransport() 1077 netCap.addCapability(NET_CAPABILITY_NOT_RESTRICTED); in createDefaultInternetRequestForTransport() 1079 netCap.addTransportType(transportType); in createDefaultInternetRequestForTransport() [all …]
|
/frameworks/base/tests/net/java/com/android/server/ |
D | ConnectivityServiceTest.java | 1770 public void onCapabilitiesChanged(Network network, NetworkCapabilities netCap) { in onCapabilitiesChanged() argument 1771 setLastCallback(CallbackState.NETWORK_CAPABILITIES, network, netCap); in onCapabilitiesChanged()
|