Home
last modified time | relevance | path

Searched refs:NetworkRequest (Results 1 – 25 of 182) sorted by relevance

12345678

/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DNetworkRequestTest.java51 import android.net.NetworkRequest;
106 assertTrue(new NetworkRequest.Builder().addCapability(NET_CAPABILITY_MMS).build() in testCapabilities()
108 assertFalse(new NetworkRequest.Builder().removeCapability(NET_CAPABILITY_MMS).build() in testCapabilities()
111 final NetworkRequest nr = new NetworkRequest.Builder().clearCapabilities().build(); in testCapabilities()
118 final NetworkRequest.Builder builder = new NetworkRequest.Builder(); in testForbiddenCapabilities()
135 assertTrue(new NetworkRequest.Builder() in testTemporarilyNotMeteredCapability()
138 assertFalse(new NetworkRequest.Builder() in testTemporarilyNotMeteredCapability()
143 private void verifyNoCapabilities(NetworkRequest nr) { in verifyNoCapabilities()
153 assertTrue(new NetworkRequest.Builder().addTransportType(TRANSPORT_BLUETOOTH).build() in testTransports()
155 assertFalse(new NetworkRequest.Builder().removeTransportType(TRANSPORT_BLUETOOTH).build() in testTransports()
[all …]
/packages/modules/Connectivity/framework/src/android/net/
DNetworkRequest.java146 public class NetworkRequest implements Parcelable { class
248 public NetworkRequest(NetworkCapabilities nc, int legacyType, int rId, Type type) { in NetworkRequest() method in NetworkRequest
261 public NetworkRequest(NetworkRequest that) { in NetworkRequest() method in NetworkRequest
313 public Builder(@NonNull final NetworkRequest request) { in Builder()
325 public NetworkRequest build() { in build()
333 return new NetworkRequest(nc, ConnectivityManager.TYPE_NONE, in build()
661 public static final @android.annotation.NonNull Creator<NetworkRequest> CREATOR =
662 new Creator<NetworkRequest>() {
663 public NetworkRequest createFromParcel(Parcel in) {
668 NetworkRequest result = new NetworkRequest(nc, legacyType, requestId, type);
[all …]
DNetworkProvider.java93 onNetworkRequested((NetworkRequest) m.obj, m.arg1, m.arg2); in NetworkProvider()
96 onNetworkRequestWithdrawn((NetworkRequest) m.obj); in NetworkProvider()
145 public void onNetworkRequested(@NonNull NetworkRequest request, in onNetworkRequested()
153 public void onNetworkRequestWithdrawn(@NonNull NetworkRequest request) {} in onNetworkRequestWithdrawn()
166 public void declareNetworkRequestUnfulfillable(@NonNull NetworkRequest request) { in declareNetworkRequestUnfulfillable()
185 void onNetworkNeeded(@NonNull NetworkRequest request); in onNetworkNeeded()
189 void onNetworkUnneeded(@NonNull NetworkRequest request); in onNetworkUnneeded()
203 public void onNetworkNeeded(final @NonNull NetworkRequest request) { in onNetworkNeeded()
208 public void onNetworkUnneeded(final @NonNull NetworkRequest request) { in onNetworkUnneeded()
DLocalNetworkConfig.java31 private final NetworkRequest mUpstreamSelector;
39 private LocalNetworkConfig(@Nullable final NetworkRequest upstreamSelector, in LocalNetworkConfig()
61 public NetworkRequest getUpstreamSelector() { in getUpstreamSelector()
104 final NetworkRequest upstreamSelector = in.readParcelable(null);
120 private NetworkRequest mUpstreamSelector;
146 public Builder setUpstreamSelector(@Nullable NetworkRequest upstreamSelector) { in setUpstreamSelector()
DIConnectivityManager.aidl35 import android.net.NetworkRequest;
147 void declareNetworkRequestUnfulfillable(in NetworkRequest request); in declareNetworkRequestUnfulfillable()
154 NetworkRequest requestNetwork(int uid, in NetworkCapabilities networkCapabilities, int reqType, in requestNetwork()
158 NetworkRequest pendingRequestForNetwork(in NetworkCapabilities networkCapabilities, in pendingRequestForNetwork()
163 NetworkRequest listenForNetwork(in NetworkCapabilities networkCapabilities, in listenForNetwork()
171 void releaseNetworkRequest(in NetworkRequest networkRequest); in releaseNetworkRequest()
182 NetworkRequest getDefaultRequest(); in getDefaultRequest()
209 in NetworkRequest request, String callingPackageName); in registerConnectivityDiagnosticsCallback()
DINetworkOfferCallback.aidl19 import android.net.NetworkRequest;
55 void onNetworkNeeded(in NetworkRequest networkRequest); in onNetworkNeeded()
60 void onNetworkUnneeded(in NetworkRequest networkRequest); in onNetworkUnneeded()
/packages/modules/NetworkStack/apishim/31/com/android/networkstack/apishim/api31/
DNetworkRequestShimImpl.java21 import android.net.NetworkRequest;
55 public void setUids(@NonNull NetworkRequest.Builder builder, in setUids()
61 public NetworkRequest.Builder setIncludeOtherUidNetworks(NetworkRequest.Builder builder, in setIncludeOtherUidNetworks()
68 public NetworkRequest.Builder newBuilder(@NonNull NetworkRequest request) { in newBuilder()
69 return new NetworkRequest.Builder(request); in newBuilder()
/packages/modules/NetworkStack/apishim/common/com/android/networkstack/apishim/common/
DNetworkRequestShim.java19 import android.net.NetworkRequest;
36 void setUids(@NonNull NetworkRequest.Builder builder, in setUids()
42 default NetworkRequest.Builder setIncludeOtherUidNetworks(NetworkRequest.Builder builder, in setIncludeOtherUidNetworks()
51 default NetworkRequest.Builder newBuilder(@NonNull NetworkRequest request) in newBuilder()
/packages/modules/Connectivity/staticlibs/device/android/net/
DNetworkFactoryImpl.java109 private final Map<NetworkRequest, NetworkRequestInfo> mNetworkRequests =
116 public void onNetworkNeeded(@NonNull final NetworkRequest request) {
121 public void onNetworkUnneeded(@NonNull final NetworkRequest request) {
159 public void onNetworkRequested(@NonNull NetworkRequest request, int score, in register()
165 public void onNetworkRequestWithdrawn(@NonNull NetworkRequest request) { in register()
190 handleAddRequest((NetworkRequest) msg.obj); in handleMessage()
194 handleRemoveRequest((NetworkRequest) msg.obj); in handleMessage()
217 @NonNull public final NetworkRequest request;
220 NetworkRequestInfo(@NonNull final NetworkRequest request) { in NetworkRequestInfo()
237 private void handleAddRequest(@NonNull final NetworkRequest request) { in handleAddRequest()
[all …]
DNetworkFactoryLegacyImpl.java104 private final Map<NetworkRequest, NetworkRequestInfo> mNetworkRequests =
130 public void onNetworkRequested(@NonNull NetworkRequest request, int score, in register()
136 public void onNetworkRequestWithdrawn(@NonNull NetworkRequest request) { in register()
164 handleAddRequest((NetworkRequest) msg.obj, msg.arg1, msg.arg2); in handleMessage()
168 handleRemoveRequest((NetworkRequest) msg.obj); in handleMessage()
183 public final NetworkRequest request;
188 NetworkRequestInfo(NetworkRequest request, int score, int providerId) { in NetworkRequestInfo()
211 protected void handleAddRequest(NetworkRequest request, int score, int servingProviderId) { in handleAddRequest()
233 private void handleRemoveRequest(NetworkRequest request) { in handleRemoveRequest()
270 public boolean acceptRequest(NetworkRequest request) { in acceptRequest()
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DMultiInternetWifiNetworkFactoryTest.java36 import android.net.NetworkRequest;
75 private NetworkRequest mNetworkRequest2G;
76 private NetworkRequest mNetworkRequest5G;
107 mNetworkRequest2G = new NetworkRequest.Builder() in setUp()
111 mNetworkRequest5G = new NetworkRequest.Builder() in setUp()
140 final NetworkRequest networkRequestNoBandSpecifier = new NetworkRequest.Builder() in testIsWifiMultiInternetRequest()
148 final NetworkRequest networkRequestSSIDSpecifier = new NetworkRequest.Builder() in testIsWifiMultiInternetRequest()
158 final NetworkRequest networkRequestBSSIDSpecifier = new NetworkRequest.Builder() in testIsWifiMultiInternetRequest()
201 final NetworkRequest networkRequestBSSIDSpecifier = new NetworkRequest.Builder() in testMultiInternetHandleNetworkRequestFromSettingsWithBssid()
/packages/modules/Connectivity/tests/cts/hostside/networkslicingtestapp/src/com.android.cts.net.hostside.networkslicingtestapp/
DNetworkSelfDeclaredCapabilitiesTest.java24 import android.net.NetworkRequest;
51 final NetworkRequest request = in requestNetwork_withoutRequestCapabilities()
52 new NetworkRequest.Builder().build(); in requestNetwork_withoutRequestCapabilities()
67 final NetworkRequest request = in requestNetwork_withSelfDeclaredCapabilities()
68 new NetworkRequest.Builder() in requestNetwork_withSelfDeclaredCapabilities()
86 final NetworkRequest request = in requestNetwork_lackingRequiredSelfDeclaredCapabilities()
87 new NetworkRequest.Builder() in requestNetwork_lackingRequiredSelfDeclaredCapabilities()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DNetworkRequestStateStatsMetricsTest.java33 import android.net.NetworkRequest;
68 private static final NetworkRequest NOT_METERED_WIFI_NETWORK_REQUEST = new NetworkRequest(
74 0, TEST_REQUEST_ID, NetworkRequest.Type.REQUEST
164 mNetworkRequestStateStatsMetrics.onNetworkRequestReceived(new NetworkRequest( in testMessageQueueSizeLimitNotExceeded()
166 0, i + 1, NetworkRequest.Type.REQUEST)); in testMessageQueueSizeLimitNotExceeded()
167 mNetworkRequestStateStatsMetrics.onNetworkRequestRemoved(new NetworkRequest( in testMessageQueueSizeLimitNotExceeded()
169 0, i + 1, NetworkRequest.Type.REQUEST)); in testMessageQueueSizeLimitNotExceeded()
173 mNetworkRequestStateStatsMetrics.onNetworkRequestReceived(new NetworkRequest( in testMessageQueueSizeLimitNotExceeded()
176 NetworkRequest.Type.REQUEST)); in testMessageQueueSizeLimitNotExceeded()
DNetworkRequestStateInfoTest.java25 import android.net.NetworkRequest;
54 NetworkRequest notMeteredWifiNetworkRequest = new NetworkRequest( in testSetNetworkRequestRemoved()
58 0, 1, NetworkRequest.Type.REQUEST in testSetNetworkRequestRemoved()
79 new NetworkRequest(new NetworkCapabilities(), 0, 1, NetworkRequest.Type.REQUEST), in testCheckInitialState()
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DNetworkOffer.java22 import android.net.NetworkRequest;
58 private final Set<NetworkRequest> mCurrentlyNeeded = new HashSet<>();
88 public void onNetworkNeeded(@NonNull final NetworkRequest request) { in onNetworkNeeded()
107 public void onNetworkUnneeded(@NonNull final NetworkRequest request) { in onNetworkUnneeded()
124 public boolean neededFor(@NonNull final NetworkRequest request) { in neededFor()
148 for (final NetworkRequest request : mCurrentlyNeeded) { in toString()
/packages/modules/Connectivity/tests/unit/java/android/net/
DConnectivityManagerTest.java35 import static android.net.NetworkRequest.Type.BACKGROUND_REQUEST;
36 import static android.net.NetworkRequest.Type.REQUEST;
37 import static android.net.NetworkRequest.Type.TRACK_DEFAULT;
38 import static android.net.NetworkRequest.Type.TRACK_SYSTEM_DEFAULT;
235 NetworkRequest request = makeRequest(1); in testCallbackRelease()
263 NetworkRequest req1 = makeRequest(1); in testCallbackRecycling()
264 NetworkRequest req2 = makeRequest(2); in testCallbackRecycling()
306 NetworkRequest request = makeRequest(1); in noDoubleCallbackRegistration()
349 NetworkRequest request = mock(NetworkRequest.class); in testArgumentValidation()
400 final NetworkRequest request = makeRequest(1); in testRequestType()
[all …]
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivityservice/
DCSLocalAgentTests.kt36 import android.net.NetworkRequest
99 val upstreamSelectorAny = NetworkRequest.Builder() in keepScore()
102 val upstreamSelectorWifi = NetworkRequest.Builder() in keepScore()
106 val upstreamSelectorCell = NetworkRequest.Builder() in keepScore()
132 cm.requestNetwork(NetworkRequest.Builder() in keepScore()
161 cm.requestNetwork(NetworkRequest.Builder() in keepScore()
181 .setUpstreamSelector(NetworkRequest.Builder() in keepScore()
231 upstreamSelector: NetworkRequest?, in keepScore()
247 cm.registerNetworkCallback(NetworkRequest.Builder().clearCapabilities().build(), cb) in keepScore()
323 cm.registerNetworkCallback(NetworkRequest.Builder().clearCapabilities() in keepScore()
[all …]
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DAutoReleaseNetworkCallbackRule.kt23 import android.net.NetworkRequest
80 NetworkRequest.Builder() in requestCell()
121 request: NetworkRequest, in requestNetwork()
137 request: NetworkRequest, in requestNetwork()
153 request: NetworkRequest, in registerNetworkCallback()
196 request: NetworkRequest, in registerBestMatchingNetworkCallback()
206 request: NetworkRequest, in requestBackgroundNetwork()
DTestableNetworkOfferCallback.kt21 import android.net.NetworkRequest
32 data class OnNetworkNeeded(val request: NetworkRequest) : CallbackEntry()
33 data class OnNetworkUnneeded(val request: NetworkRequest) : CallbackEntry()
40 override fun onNetworkNeeded(request: NetworkRequest) { in onNetworkNeeded()
48 override fun onNetworkUnneeded(request: NetworkRequest) { in onNetworkUnneeded()
/packages/modules/NetworkStack/apishim/29/com/android/networkstack/apishim/api29/
DConnectivityManagerShimImpl.java27 import android.net.NetworkRequest;
58 public void requestBackgroundNetwork(@NonNull NetworkRequest request, in requestBackgroundNetwork()
77 final NetworkRequest defaultNetworkRequest = makeEmptyCapabilitiesRequest() in registerSystemDefaultNetworkCallback()
87 protected NetworkRequest.Builder makeEmptyCapabilitiesRequest() { in makeEmptyCapabilitiesRequest()
89 return new NetworkRequest.Builder() in makeEmptyCapabilitiesRequest()
/packages/modules/Connectivity/tests/common/java/android/net/
DNetworkProviderTest.kt92 val request: NetworkRequest, in <lambda>()
96 data class OnNetworkRequestWithdrawn(val request: NetworkRequest) : CallbackEntry() in <lambda>()
99 override fun onNetworkRequested(request: NetworkRequest, score: Int, id: Int) { in <lambda>()
104 override fun onNetworkRequestWithdrawn(request: NetworkRequest) { in <lambda>()
143 val nr: NetworkRequest = NetworkRequest.Builder() in <lambda>()
258 val nrNoNotVcn: NetworkRequest = NetworkRequest.Builder() in <lambda>()
279 val nrNotVcn: NetworkRequest = NetworkRequest.Builder() in <lambda>()
387 val nr: NetworkRequest = NetworkRequest.Builder() in <lambda>()
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/
DTestConnectivityManager.java36 import android.net.NetworkRequest;
98 public final NetworkRequest request;
100 NetworkRequestInfo(NetworkRequest r, Handler h) { in NetworkRequestInfo()
199 static boolean looksLikeDefaultRequest(NetworkRequest req) { in looksLikeDefaultRequest()
206 public void requestNetwork(NetworkRequest req, NetworkCallback cb, Handler h) { in requestNetwork()
234 public void requestNetwork(NetworkRequest req, NetworkCallback cb) { in requestNetwork()
239 public void requestNetwork(NetworkRequest req, in requestNetwork()
242 NetworkRequest newReq = new NetworkRequest(req.networkCapabilities, legacyType, in requestNetwork()
254 public void registerNetworkCallback(NetworkRequest req, NetworkCallback cb, Handler h) { in registerNetworkCallback()
262 public void registerNetworkCallback(NetworkRequest req, NetworkCallback cb) { in registerNetworkCallback()
/packages/apps/Dialer/java/com/android/voicemail/impl/sync/
DVvmNetworkRequestCallback.java25 import android.net.NetworkRequest;
56 protected NetworkRequest networkRequest;
92 private NetworkRequest createNetworkRequest() { in createNetworkRequest()
94 NetworkRequest.Builder builder = in createNetworkRequest()
95 new NetworkRequest.Builder().addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET); in createNetworkRequest()
112 public NetworkRequest getNetworkRequest() { in getNetworkRequest()
/packages/modules/NetworkStack/apishim/30/com/android/networkstack/apishim/api30/
DConnectivityManagerShimImpl.java23 import android.net.NetworkRequest;
60 public void requestBackgroundNetwork(@NonNull NetworkRequest request, in requestBackgroundNetwork()
69 protected NetworkRequest.Builder makeEmptyCapabilitiesRequest() { in makeEmptyCapabilitiesRequest()
70 return new NetworkRequest.Builder().clearCapabilities(); in makeEmptyCapabilitiesRequest()
/packages/modules/Wifi/service/java/com/android/server/wifi/
DMultiInternetWifiNetworkFactory.java23 import android.net.NetworkRequest;
70 public final NetworkRequest networkRequest;
76 NetworkRequestState(NetworkRequest request, in NetworkRequestState()
94 public static boolean isWifiMultiInternetRequest(NetworkRequest networkRequest, in isWifiMultiInternetRequest()
141 public boolean acceptRequest(NetworkRequest networkRequest) { in acceptRequest()
168 protected void needNetworkFor(NetworkRequest networkRequest) { in needNetworkFor()
212 protected void releaseNetworkFor(NetworkRequest networkRequest) { in releaseNetworkFor()

12345678