Home
last modified time | relevance | path

Searched refs:NetworkCapabilities (Results 1 – 25 of 85) sorted by relevance

1234

/frameworks/base/tests/net/java/android/net/
DConnectivityManagerTest.java19 import static android.net.NetworkCapabilities.NET_CAPABILITY_CBS;
20 import static android.net.NetworkCapabilities.NET_CAPABILITY_DUN;
21 import static android.net.NetworkCapabilities.NET_CAPABILITY_FOTA;
22 import static android.net.NetworkCapabilities.NET_CAPABILITY_IMS;
23 import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
24 import static android.net.NetworkCapabilities.NET_CAPABILITY_MMS;
25 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
26 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VPN;
27 import static android.net.NetworkCapabilities.NET_CAPABILITY_SUPL;
28 import static android.net.NetworkCapabilities.NET_CAPABILITY_TRUSTED;
[all …]
DNetworkCapabilitiesTest.java19 import static android.net.NetworkCapabilities.NET_CAPABILITY_CBS;
20 import static android.net.NetworkCapabilities.NET_CAPABILITY_EIMS;
21 import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
22 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
23 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
24 import static android.net.NetworkCapabilities.RESTRICTED_CAPABILITIES;
25 import static android.net.NetworkCapabilities.UNRESTRICTED_CAPABILITIES;
31 import android.net.NetworkCapabilities;
59 NetworkCapabilities netCap = new NetworkCapabilities(); in testMaybeMarkCapabilitiesRestricted()
65 netCap = new NetworkCapabilities(); in testMaybeMarkCapabilitiesRestricted()
[all …]
/frameworks/base/core/java/android/net/
DNetworkCapabilities.java38 public final class NetworkCapabilities implements Parcelable { class
44 public NetworkCapabilities() { in NetworkCapabilities() method in NetworkCapabilities
49 public NetworkCapabilities(NetworkCapabilities nc) { in NetworkCapabilities() method in NetworkCapabilities
265 public NetworkCapabilities addCapability(int capability) { in addCapability()
280 public NetworkCapabilities removeCapability(int capability) { in removeCapability()
312 private void combineNetCapabilities(NetworkCapabilities nc) { in combineNetCapabilities()
336 private boolean satisfiedByNetCapabilities(NetworkCapabilities nc, boolean onlyImmutable) { in satisfiedByNetCapabilities()
345 public boolean equalsNetCapabilities(NetworkCapabilities nc) { in equalsNetCapabilities()
349 private boolean equalsNetCapabilitiesImmutable(NetworkCapabilities that) { in equalsNetCapabilitiesImmutable()
354 private boolean equalsNetCapabilitiesRequestable(NetworkCapabilities that) { in equalsNetCapabilitiesRequestable()
[all …]
DNetworkRequest.java35 public final NetworkCapabilities networkCapabilities;
108 public NetworkRequest(NetworkCapabilities nc, int legacyType, int rId, Type type) { in NetworkRequest()
122 networkCapabilities = new NetworkCapabilities(that.networkCapabilities); in NetworkRequest()
133 private final NetworkCapabilities mNetworkCapabilities = new NetworkCapabilities();
148 final NetworkCapabilities nc = new NetworkCapabilities(mNetworkCapabilities); in build()
189 public Builder setCapabilities(NetworkCapabilities nc) { in setCapabilities()
320 NetworkCapabilities nc = (NetworkCapabilities)in.readParcelable(null);
DConnectivityManager.java1000 public NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId) { in getDefaultNetworkCapabilitiesForUser()
1074 public NetworkCapabilities getNetworkCapabilities(Network network) { in getNetworkCapabilities()
1126 NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature); in startUsingNetworkFeature()
1183 NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature); in stopUsingNetworkFeature()
1196 private NetworkCapabilities networkCapabilitiesForFeature(int networkType, String feature) { in networkCapabilitiesForFeature()
1248 private int inferLegacyTypeForNetworkCapabilities(NetworkCapabilities netCap) { in inferLegacyTypeForNetworkCapabilities()
1253 if (!netCap.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) { in inferLegacyTypeForNetworkCapabilities()
1258 if (!netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_SUPL)) { in inferLegacyTypeForNetworkCapabilities()
1268 if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_CBS)) { in inferLegacyTypeForNetworkCapabilities()
1271 } else if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_IMS)) { in inferLegacyTypeForNetworkCapabilities()
[all …]
DIConnectivityManager.aidl22 import android.net.NetworkCapabilities;
55 NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId); in getDefaultNetworkCapabilitiesForUser()
63 NetworkCapabilities getNetworkCapabilities(in Network network); in getNetworkCapabilities()
143 in NetworkCapabilities nc, int score, in NetworkMisc misc); in registerNetworkAgent()
145 NetworkRequest requestNetwork(in NetworkCapabilities networkCapabilities, in requestNetwork()
148 NetworkRequest pendingRequestForNetwork(in NetworkCapabilities networkCapabilities, in pendingRequestForNetwork()
153 NetworkRequest listenForNetwork(in NetworkCapabilities networkCapabilities, in listenForNetwork()
156 void pendingListenForNetwork(in NetworkCapabilities networkCapabilities, in pendingListenForNetwork()
DNetworkFactory.java104 private NetworkCapabilities mCapabilityFilter;
110 NetworkCapabilities filter) { in NetworkFactory()
149 handleSetFilter((NetworkCapabilities) msg.obj); in handleMessage()
202 private void handleSetFilter(NetworkCapabilities netCap) { in handleSetFilter()
284 public void setCapabilityFilter(NetworkCapabilities netCap) { in setCapabilityFilter()
285 sendMessage(obtainMessage(CMD_SET_FILTER, new NetworkCapabilities(netCap))); in setCapabilityFilter()
DNetworkAgent.java209 NetworkCapabilities nc, LinkProperties lp, int score) { in NetworkAgent()
214 NetworkCapabilities nc, LinkProperties lp, int score, NetworkMisc misc) { in NetworkAgent()
226 new LinkProperties(lp), new NetworkCapabilities(nc), score, misc); in NetworkAgent()
375 public void sendNetworkCapabilities(NetworkCapabilities networkCapabilities) { in sendNetworkCapabilities()
379 new NetworkCapabilities(networkCapabilities)); in sendNetworkCapabilities()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/
DDcRequest.java30 import android.net.NetworkCapabilities;
71 NetworkCapabilities nc = nr.networkCapabilities; in apnIdForNetworkRequest()
74 nc.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) == false) { in apnIdForNetworkRequest()
83 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)) { in apnIdForNetworkRequest()
87 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_MMS)) { in apnIdForNetworkRequest()
91 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_SUPL)) { in apnIdForNetworkRequest()
95 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_DUN)) { in apnIdForNetworkRequest()
99 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_FOTA)) { in apnIdForNetworkRequest()
103 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_IMS)) { in apnIdForNetworkRequest()
107 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_CBS)) { in apnIdForNetworkRequest()
[all …]
DTelephonyNetworkFactory.java22 import android.net.NetworkCapabilities;
100 private NetworkCapabilities makeNetworkFilter(SubscriptionController subscriptionController, in makeNetworkFilter()
106 private NetworkCapabilities makeNetworkFilter(int subscriptionId) { in makeNetworkFilter()
107 NetworkCapabilities nc = new NetworkCapabilities(); in makeNetworkFilter()
108 nc.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR); in makeNetworkFilter()
109 nc.addCapability(NetworkCapabilities.NET_CAPABILITY_MMS); in makeNetworkFilter()
110 nc.addCapability(NetworkCapabilities.NET_CAPABILITY_SUPL); in makeNetworkFilter()
111 nc.addCapability(NetworkCapabilities.NET_CAPABILITY_DUN); in makeNetworkFilter()
112 nc.addCapability(NetworkCapabilities.NET_CAPABILITY_FOTA); in makeNetworkFilter()
113 nc.addCapability(NetworkCapabilities.NET_CAPABILITY_IMS); in makeNetworkFilter()
[all …]
DApnContext.java22 import android.net.NetworkCapabilities;
458 NetworkCapabilities.NET_CAPABILITY_DUN)) { in hasNoRestrictedRequests()
462 NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED) == false) { in hasNoRestrictedRequests()
569 NetworkCapabilities nc = nr.networkCapabilities; in apnIdForNetworkRequest()
572 nc.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) == false) { in apnIdForNetworkRequest()
581 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)) { in apnIdForNetworkRequest()
584 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_MMS)) { in apnIdForNetworkRequest()
588 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_SUPL)) { in apnIdForNetworkRequest()
592 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_DUN)) { in apnIdForNetworkRequest()
596 if (nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_FOTA)) { in apnIdForNetworkRequest()
[all …]
DDcAsyncChannel.java20 import android.net.NetworkCapabilities;
324 public NetworkCapabilities rspNetworkCapabilities(Message response) { in rspNetworkCapabilities()
325 NetworkCapabilities retVal = (NetworkCapabilities) response.obj; in rspNetworkCapabilities()
335 public NetworkCapabilities getNetworkCapabilitiesSync() { in getNetworkCapabilitiesSync()
336 NetworkCapabilities value; in getNetworkCapabilitiesSync()
DDataConnection.java24 import android.net.NetworkCapabilities;
864 NetworkCapabilities getNetworkCapabilities() { in getNetworkCapabilities()
865 NetworkCapabilities result = new NetworkCapabilities(); in getNetworkCapabilities()
866 result.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR); in getNetworkCapabilities()
880 result.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET); in getNetworkCapabilities()
881 result.addCapability(NetworkCapabilities.NET_CAPABILITY_MMS); in getNetworkCapabilities()
882 result.addCapability(NetworkCapabilities.NET_CAPABILITY_SUPL); in getNetworkCapabilities()
883 result.addCapability(NetworkCapabilities.NET_CAPABILITY_FOTA); in getNetworkCapabilities()
884 result.addCapability(NetworkCapabilities.NET_CAPABILITY_IMS); in getNetworkCapabilities()
885 result.addCapability(NetworkCapabilities.NET_CAPABILITY_CBS); in getNetworkCapabilities()
[all …]
/frameworks/base/tests/net/java/com/android/server/connectivity/
DNetworkNotificationManagerTest.java25 import android.net.NetworkCapabilities;
51 static final NetworkCapabilities CELL_CAPABILITIES = new NetworkCapabilities();
52 static final NetworkCapabilities WIFI_CAPABILITIES = new NetworkCapabilities();
54 CELL_CAPABILITIES.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR);
55 CELL_CAPABILITIES.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
57 WIFI_CAPABILITIES.addTransportType(NetworkCapabilities.TRANSPORT_WIFI);
58 WIFI_CAPABILITIES.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
135 mWifiNai.networkCapabilities = new NetworkCapabilities(); in testNotificationsNotShownIfNoInternetCapability()
136 mWifiNai.networkCapabilities .addTransportType(NetworkCapabilities.TRANSPORT_WIFI); in testNotificationsNotShownIfNoInternetCapability()
DNetdEventListenerServiceTest.java35 import android.net.NetworkCapabilities;
65 NetworkCapabilities ncWifi = new NetworkCapabilities(); in setUp()
66 NetworkCapabilities ncCell = new NetworkCapabilities(); in setUp()
67 ncWifi.addTransportType(NetworkCapabilities.TRANSPORT_WIFI); in setUp()
68 ncCell.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR); in setUp()
DIpConnectivityMetricsTest.java34 import android.net.NetworkCapabilities;
169 NetworkCapabilities ncWifi = new NetworkCapabilities(); in testEndToEndLogging()
170 NetworkCapabilities ncCell = new NetworkCapabilities(); in testEndToEndLogging()
171 ncWifi.addTransportType(NetworkCapabilities.TRANSPORT_WIFI); in testEndToEndLogging()
172 ncCell.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR); in testEndToEndLogging()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DPhoneSwitcher.java27 import android.net.NetworkCapabilities;
134 NetworkCapabilities netCap = new NetworkCapabilities(); in PhoneSwitcher()
135 netCap.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR); in PhoneSwitcher()
136 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_MMS); in PhoneSwitcher()
137 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_SUPL); in PhoneSwitcher()
138 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_DUN); in PhoneSwitcher()
139 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_FOTA); in PhoneSwitcher()
140 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_IMS); in PhoneSwitcher()
141 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_CBS); in PhoneSwitcher()
142 netCap.addCapability(NetworkCapabilities.NET_CAPABILITY_IA); in PhoneSwitcher()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/dataconnection/
DTelephonyNetworkFactoryTest.java21 import android.net.NetworkCapabilities;
113 NetworkCapabilities netCap = (new NetworkCapabilities()). in makeSubSpecificDefaultRequest()
114 addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET). in makeSubSpecificDefaultRequest()
115 addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED). in makeSubSpecificDefaultRequest()
116 addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR); in makeSubSpecificDefaultRequest()
121 NetworkCapabilities netCap = (new NetworkCapabilities()). in makeSubSpecificMmsRequest()
122 addCapability(NetworkCapabilities.NET_CAPABILITY_MMS). in makeSubSpecificMmsRequest()
123 addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED). in makeSubSpecificMmsRequest()
124 addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR); in makeSubSpecificMmsRequest()
/frameworks/base/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/
DProvisionObserver.java28 import android.net.NetworkCapabilities;
56 final NetworkCapabilities nc = connMgr.getNetworkCapabilities(nw); in onStartJob()
57 if (nc.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) in onStartJob()
58 && nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)) { in onStartJob()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DNetworkControllerWifiTest.java5 import android.net.NetworkCapabilities;
72 setConnectivity(NetworkCapabilities.TRANSPORT_WIFI, true, true); in testWifiIcon()
74 setConnectivity(NetworkCapabilities.TRANSPORT_WIFI, false, true); in testWifiIcon()
166 setConnectivity(NetworkCapabilities.TRANSPORT_WIFI, true, true); in testQsWifiIcon()
169 setConnectivity(NetworkCapabilities.TRANSPORT_WIFI, false, true); in testQsWifiIcon()
183 setConnectivity(NetworkCapabilities.TRANSPORT_WIFI, true, true); in testQsDataDirection()
208 setConnectivity(NetworkCapabilities.TRANSPORT_WIFI, true, true); in testRoamingIconDuringWifi()
214 setConnectivity(NetworkCapabilities.TRANSPORT_WIFI, true, true); in testRoamingIconDuringWifi()
215 setConnectivity(NetworkCapabilities.TRANSPORT_CELLULAR, false, false); in testRoamingIconDuringWifi()
/frameworks/base/services/core/java/com/android/server/connectivity/
DNetworkAgentInfo.java19 import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED;
24 import android.net.NetworkCapabilities;
126 public NetworkCapabilities networkCapabilities;
255 LinkProperties lp, NetworkCapabilities nc, int score, Context context, Handler handler, in NetworkAgentInfo()
402 return networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN); in isVPN()
431 boolean isWifi = networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) && in ignoreWifiUnvalidationPenalty()
432 networkCapabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET); in ignoreWifiUnvalidationPenalty()
460 new NetworkCapabilities(networkCapabilities), network, subscriberId, null); in getNetworkState()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DPhoneSwitcherTest.java21 import android.net.NetworkCapabilities;
155 NetworkCapabilities netCap = (new NetworkCapabilities()). in makeSubSpecificDefaultRequest()
156 addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET). in makeSubSpecificDefaultRequest()
157 addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED). in makeSubSpecificDefaultRequest()
158 addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR); in makeSubSpecificDefaultRequest()
164 NetworkCapabilities netCap = (new NetworkCapabilities()). in makeSubSpecificMmsRequest()
165 addCapability(NetworkCapabilities.NET_CAPABILITY_MMS). in makeSubSpecificMmsRequest()
166 addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED). in makeSubSpecificMmsRequest()
167 addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR); in makeSubSpecificMmsRequest()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/mocks/
DConnectivityServiceMock.java19 import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
20 import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
30 import android.net.NetworkCapabilities;
458 public NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId) { in getDefaultNetworkCapabilitiesForUser()
483 public NetworkCapabilities getNetworkCapabilities(Network network) { in getNetworkCapabilities()
684 public NetworkRequest requestNetwork(NetworkCapabilities networkCapabilities, in requestNetwork()
686 networkCapabilities = new NetworkCapabilities(networkCapabilities); in requestNetwork()
709 public NetworkRequest pendingRequestForNetwork(NetworkCapabilities networkCapabilities, in pendingRequestForNetwork()
720 public NetworkRequest listenForNetwork(NetworkCapabilities networkCapabilities, in listenForNetwork()
726 public void pendingListenForNetwork(NetworkCapabilities networkCapabilities, in pendingListenForNetwork()
[all …]
/frameworks/base/services/core/java/com/android/server/job/controllers/
DConnectivityController.java25 import android.net.NetworkCapabilities;
103 NetworkCapabilities capabilities) { in updateConstraintsSatisfied()
113 && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED); in updateConstraintsSatisfied()
151 private void updateTrackedJobs(int uid, NetworkCapabilities capabilities) { in updateTrackedJobs()
186 … public void onCapabilitiesChanged(Network network, NetworkCapabilities networkCapabilities) {
/frameworks/opt/net/ethernet/java/com/android/server/ethernet/
DEthernetNetworkFactory.java30 import android.net.NetworkCapabilities;
92 private NetworkCapabilities mNetworkCapabilities;
120 super(looper, context, name, new NetworkCapabilities()); in LocalNetworkFactory()
449 mNetworkCapabilities = new NetworkCapabilities(); in initNetworkCapabilities()
450 mNetworkCapabilities.addTransportType(NetworkCapabilities.TRANSPORT_ETHERNET); in initNetworkCapabilities()
451 mNetworkCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET); in initNetworkCapabilities()
452 mNetworkCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED); in initNetworkCapabilities()

1234