Home
last modified time | relevance | path

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

1234

/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/dataconnection/
DDcRequestTest.java24 import android.net.NetworkRequest;
53 NetworkRequest request = in whenNetworkRequestInternetThenPriorityZero()
54 new NetworkRequest.Builder() in whenNetworkRequestInternetThenPriorityZero()
68 NetworkRequest request = in whenNetworkRequestMcxThenApnConfigTypeMcxPriorityReturned()
69 new NetworkRequest.Builder() in whenNetworkRequestMcxThenApnConfigTypeMcxPriorityReturned()
84 NetworkRequest request = in whenNetworkRequestNotCellularThenDcRequestIsNull()
85 new NetworkRequest.Builder() in whenNetworkRequestNotCellularThenDcRequestIsNull()
98 NetworkRequest request = in whenNetworkRequestHasNoTransportThenPriorityStays()
99 new NetworkRequest.Builder() in whenNetworkRequestHasNoTransportThenPriorityStays()
115 NetworkRequest request = in whenNetworkRequestNotCellularWithTelephonySpecifierThenDcRequestIsNull()
[all …]
DTelephonyNetworkFactoryTest.java34 import android.net.NetworkRequest;
75 private final ArrayList<NetworkRequest> mNetworkRequestList = new ArrayList<>();
84 private NetworkRequest makeSubSpecificInternetRequest(int subId) { in makeSubSpecificInternetRequest()
91 NetworkRequest networkRequest = new NetworkRequest(netCap, -1, in makeSubSpecificInternetRequest()
92 mRequestId++, NetworkRequest.Type.REQUEST); in makeSubSpecificInternetRequest()
98 private NetworkRequest makeDefaultInternetRequest() { in makeDefaultInternetRequest()
103 NetworkRequest networkRequest = new NetworkRequest(netCap, -1, in makeDefaultInternetRequest()
104 mRequestId++, NetworkRequest.Type.REQUEST); in makeDefaultInternetRequest()
110 private NetworkRequest makeSubSpecificMmsRequest(int subId) { in makeSubSpecificMmsRequest()
117 NetworkRequest networkRequest = new NetworkRequest(netCap, -1, in makeSubSpecificMmsRequest()
[all …]
DApnContextTest.java30 import android.net.NetworkRequest;
118 NetworkRequest nr1 = new NetworkRequest.Builder().build(); in testNetworkRequestNormal()
124 NetworkRequest nr2 = new NetworkRequest.Builder() in testNetworkRequestNormal()
146 NetworkRequest nr1 = new NetworkRequest.Builder().build(); in testNetworkRequestDetach()
151 NetworkRequest nr2 = new NetworkRequest.Builder() in testNetworkRequestDetach()
173 NetworkRequest nr1 = new NetworkRequest.Builder().build(); in testNetworkRequestHandover()
/frameworks/base/core/java/android/net/
DNetworkRequest.java41 public class NetworkRequest implements Parcelable { class
122 public NetworkRequest(NetworkCapabilities nc, int legacyType, int rId, Type type) { in NetworkRequest() method in NetworkRequest
135 public NetworkRequest(NetworkRequest that) { in NetworkRequest() method in NetworkRequest
163 public NetworkRequest build() { in build()
170 return new NetworkRequest(nc, ConnectivityManager.TYPE_NONE, in build()
384 public static final @android.annotation.NonNull Creator<NetworkRequest> CREATOR =
385 new Creator<NetworkRequest>() {
386 public NetworkRequest createFromParcel(Parcel in) {
391 NetworkRequest result = new NetworkRequest(nc, legacyType, requestId, type);
394 public NetworkRequest[] newArray(int size) {
[all …]
DNetworkProvider.java95 onNetworkRequested((NetworkRequest) m.obj, m.arg1, m.arg2); in NetworkProvider()
98 onNetworkRequestWithdrawn((NetworkRequest) m.obj); in NetworkProvider()
146 public void onNetworkRequested(@NonNull NetworkRequest request, in onNetworkRequested()
154 public void onNetworkRequestWithdrawn(@NonNull NetworkRequest request) {} in onNetworkRequestWithdrawn()
167 public void declareNetworkRequestUnfulfillable(@NonNull NetworkRequest request) { in declareNetworkRequestUnfulfillable()
DIConnectivityManager.aidl29 import android.net.NetworkRequest;
166 void declareNetworkRequestUnfulfillable(in NetworkRequest request); in declareNetworkRequestUnfulfillable()
172 NetworkRequest requestNetwork(in NetworkCapabilities networkCapabilities, in requestNetwork()
176 NetworkRequest pendingRequestForNetwork(in NetworkCapabilities networkCapabilities, in pendingRequestForNetwork()
181 NetworkRequest listenForNetwork(in NetworkCapabilities networkCapabilities, in listenForNetwork()
187 void releaseNetworkRequest(in NetworkRequest networkRequest); in releaseNetworkRequest()
198 NetworkRequest getDefaultRequest(); in getDefaultRequest()
229 in NetworkRequest request, String callingPackageName); in registerConnectivityDiagnosticsCallback()
DConnectivityManager.java778 private static final NetworkRequest ALREADY_UNREGISTERED =
779 new NetworkRequest.Builder().clearCapabilities().build();
1450 NetworkRequest request = null; in startUsingNetworkFeature()
1572 NetworkRequest networkRequest;
1603 private NetworkRequest findRequestForFeature(NetworkCapabilities netCap) { in findRequestForFeature()
1629 private NetworkRequest requestNetworkForFeatureLocked(NetworkCapabilities netCap) { in requestNetworkForFeatureLocked()
2240 public NetworkRequest getDefaultRequest() { in getDefaultRequest()
3271 public void declareNetworkRequestUnfulfillable(@NonNull NetworkRequest request) { in declareNetworkRequestUnfulfillable()
3532 private NetworkRequest networkRequest;
3619 final NetworkRequest request = getObject(message, NetworkRequest.class); in handleMessage()
[all …]
/frameworks/libs/net/common/device/android/net/
DNetworkFactory.java99 private final Map<NetworkRequest, NetworkRequestInfo> mNetworkRequests =
125 public void onNetworkRequested(@NonNull NetworkRequest request, int score, in register()
131 public void onNetworkRequestWithdrawn(@NonNull NetworkRequest request) { in register()
159 handleAddRequest((NetworkRequest) msg.obj, msg.arg1, msg.arg2); in handleMessage()
163 handleRemoveRequest((NetworkRequest) msg.obj); in handleMessage()
178 public final NetworkRequest request;
183 NetworkRequestInfo(NetworkRequest request, int score, int providerId) { in NetworkRequestInfo()
206 protected void handleAddRequest(NetworkRequest request, int score, int servingProviderId) { in handleAddRequest()
229 protected void handleRemoveRequest(NetworkRequest request) { in handleRemoveRequest()
266 public boolean acceptRequest(NetworkRequest request, int score) { in acceptRequest()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/
DTelephonyNetworkFactory.java23 import android.net.NetworkRequest;
78 private final Map<NetworkRequest, Integer> mNetworkRequests = new HashMap<>();
188 NetworkRequest nr = bundle.getParcelable( in handleMessage()
210 private int getTransportTypeFromNetworkRequest(NetworkRequest networkRequest) { in getTransportTypeFromNetworkRequest()
215 private void requestNetworkInternal(NetworkRequest networkRequest, in requestNetworkInternal()
224 private void releaseNetworkInternal(NetworkRequest networkRequest, in releaseNetworkInternal()
244 for (HashMap.Entry<NetworkRequest, Integer> entry : mNetworkRequests.entrySet()) { in onActivePhoneSwitch()
245 NetworkRequest networkRequest = entry.getKey(); in onActivePhoneSwitch()
283 public void needNetworkFor(NetworkRequest networkRequest, int score) { in needNetworkFor()
290 NetworkRequest networkRequest = (NetworkRequest) msg.obj; in onNeedNetworkFor()
[all …]
DDcRequest.java20 import android.net.NetworkRequest;
34 public final NetworkRequest networkRequest;
38 private DcRequest(@NonNull final NetworkRequest nr, @ApnType final int type, in DcRequest()
54 public static DcRequest create(@NonNull final NetworkRequest networkRequest, in create()
68 private static void checkForAnomalousNetworkRequest(NetworkRequest networkRequest) { in checkForAnomalousNetworkRequest()
77 private static void reportAnomalousNetworkRequest(NetworkRequest networkRequest) { in reportAnomalousNetworkRequest()
DApnContext.java20 import android.net.NetworkRequest;
406 private final ArrayList<NetworkRequest> mNetworkRequests = new ArrayList<>();
415 public void requestNetwork(NetworkRequest networkRequest, @RequestNetworkType int type, in requestNetwork()
431 public void releaseNetwork(NetworkRequest networkRequest, @ReleaseNetworkType int type) { in releaseNetwork()
459 for (NetworkRequest nr : mNetworkRequests) { in hasRestrictedRequests()
544 static @ApnType int getApnTypeFromNetworkRequest(NetworkRequest nr) { in getApnTypeFromNetworkRequest()
613 public List<NetworkRequest> getNetworkRequests() { in getNetworkRequests()
615 return new ArrayList<NetworkRequest>(mNetworkRequests); in getNetworkRequests()
646 for (NetworkRequest nr : mNetworkRequests) { in dump()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DNetworkRankerTest.kt19 import android.net.NetworkRequest
45 val someRequest = mock(NetworkRequest::class.java) in testGetBestNetwork()
54 val someRequest = mock(NetworkRequest::class.java) in testIgnoreNonSatisfying()
61 val someRequest = mock(NetworkRequest::class.java) in testNoMatch()
67 val someRequest = mock(NetworkRequest::class.java) in testEmpty()
77 val someRequest = mock(NetworkRequest::class.java) in testStable()
/frameworks/base/services/core/java/com/android/server/connectivity/
DNetworkAgentInfo.java35 import android.net.NetworkRequest;
180 public final NetworkRequest request;
183 public LingerTimer(NetworkRequest request, long expiryMs) { in LingerTimer()
242 private final SparseArray<NetworkRequest> mNetworkRequests = new SparseArray<>();
351 private void updateRequestCounts(boolean add, NetworkRequest request) { in updateRequestCounts()
379 public boolean addRequest(NetworkRequest networkRequest) { in addRequest()
380 NetworkRequest existing = mNetworkRequests.get(networkRequest.requestId); in addRequest()
398 NetworkRequest existing = mNetworkRequests.get(requestId); in removeRequest()
418 public NetworkRequest requestAt(int index) { in requestAt()
466 public boolean satisfies(NetworkRequest request) { in satisfies()
[all …]
DNetworkRanker.java21 import android.net.NetworkRequest;
37 public NetworkAgentInfo getBestNetwork(@NonNull final NetworkRequest request, in getBestNetwork()
/frameworks/base/tests/net/common/java/android/net/
DNetworkProviderTest.kt70 val request: NetworkRequest, in <lambda>()
74 data class OnNetworkRequestWithdrawn(val request: NetworkRequest) : CallbackEntry() in <lambda>()
77 override fun onNetworkRequested(request: NetworkRequest, score: Int, id: Int) { in <lambda>()
81 override fun onNetworkRequestWithdrawn(request: NetworkRequest) { in <lambda>()
102 val nr: NetworkRequest = NetworkRequest.Builder() in <lambda>()
176 val nr: NetworkRequest = NetworkRequest.Builder() in <lambda>()
/frameworks/base/tests/net/java/android/net/
DConnectivityManagerTest.java210 NetworkRequest request = makeRequest(1); in testCallbackRelease()
238 NetworkRequest req1 = makeRequest(1); in testCallbackRecycling()
239 NetworkRequest req2 = makeRequest(2); in testCallbackRecycling()
282 NetworkRequest request = makeRequest(1); in noDoubleCallbackRegistration()
310 NetworkRequest request = mock(NetworkRequest.class); in testArgumentValidation()
343 static Message makeMessage(NetworkRequest req, int messageType) { in makeMessage()
345 bundle.putParcelable(NetworkRequest.class.getSimpleName(), req); in makeMessage()
356 static NetworkRequest makeRequest(int requestId) { in makeRequest()
357 NetworkRequest request = new NetworkRequest.Builder().clearCapabilities().build(); in makeRequest()
358 return new NetworkRequest(request.networkCapabilities, ConnectivityManager.TYPE_NONE, in makeRequest()
[all …]
DConnectivityDiagnosticsManagerTest.java338 final NetworkRequest request = new NetworkRequest.Builder().build(); in testRegisterConnectivityDiagnosticsCallback()
349 final NetworkRequest request = new NetworkRequest.Builder().build(); in testRegisterDuplicateConnectivityDiagnosticsCallback()
362 final NetworkRequest request = new NetworkRequest.Builder().build(); in testUnregisterConnectivityDiagnosticsCallback()
/frameworks/base/tests/net/java/com/android/server/
DConnectivityServiceTest.java173 import android.net.NetworkRequest;
708 NetworkRequest request = new NetworkRequest.Builder() in connect()
877 private SparseArray<NetworkRequest> mNetworkRequests = new SparseArray<>();
914 protected void handleAddRequest(NetworkRequest request, int score, in handleAddRequest()
938 protected void handleRemoveRequest(NetworkRequest request) { in handleRemoveRequest()
956 public void triggerUnfulfillable(NetworkRequest r) { in triggerUnfulfillable()
999 public SparseArray<NetworkRequest> waitForNetworkRequests(final int count) in waitForNetworkRequests()
1445 final NetworkRequest legacyRequest = new NetworkRequest(legacyCaps, TYPE_MOBILE_SUPL, in testNetworkFeature()
1446 ConnectivityManager.REQUEST_ID_UNSET, NetworkRequest.Type.REQUEST); in testNetworkFeature()
1774 final NetworkRequest genericRequest = new NetworkRequest.Builder() in testStateChangeNetworkCallbacks()
[all …]
/frameworks/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/
DUpstreamNetworkMonitorTest.java53 import android.net.NetworkRequest;
90 private static final NetworkRequest sDefaultRequest = new NetworkRequest.Builder().build();
172 any(NetworkRequest.class), any(NetworkCallback.class), any(Handler.class)); in testCallbacksRegistered()
208 any(NetworkRequest.class), any(NetworkCallback.class), any(Handler.class)); in testDuplicateMobileRequestsIgnored()
215 any(NetworkRequest.class), anyInt(), anyInt(), any(Handler.class), in testDuplicateMobileRequestsIgnored()
321 NetworkRequest netReq = (NetworkRequest) mCM.requested.values().toArray()[0]; in testSelectPreferredUpstreamType()
357 netReq = (NetworkRequest) mCM.requested.values().toArray()[0]; in testSelectPreferredUpstreamType()
562 for (NetworkRequest req : mCM.requested.values()) { in isDunRequested()
574 public Map<NetworkCallback, NetworkRequest> listening = new HashMap<>();
575 public Map<NetworkCallback, NetworkRequest> requested = new HashMap<>();
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DUntrustedWifiNetworkFactory.java22 import android.net.NetworkRequest;
49 protected void needNetworkFor(NetworkRequest networkRequest, int score) { in needNetworkFor()
58 protected void releaseNetworkFor(NetworkRequest networkRequest) { in releaseNetworkFor()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DUntrustedWifiNetworkFactoryTest.java24 import android.net.NetworkRequest;
43 NetworkRequest mNetworkRequest;
63 mNetworkRequest = new NetworkRequest.Builder() in setUp()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DPhoneSwitcherTest.java50 import android.net.NetworkRequest;
147 NetworkRequest internetNetworkRequest = addInternetNetworkRequest(null, 50); in testRegister()
238 NetworkRequest specificInternetRequest = addInternetNetworkRequest(0, 50); in testRegister()
440 NetworkRequest internetRequest = addInternetNetworkRequest(null, 50); in testSetPreferredDataModemCommand()
441 NetworkRequest mmsRequest = addMmsNetworkRequest(2); in testSetPreferredDataModemCommand()
544 NetworkRequest internetRequest = addInternetNetworkRequest(null, 50); in testNonDefaultDataPhoneInCall()
591 NetworkRequest internetRequest = addInternetNetworkRequest(2, 50); in testNetworkRequestOnNonDefaultData()
938 NetworkRequest internetRequest = addInternetNetworkRequest(null, 50); in testValidationOffSwitch_shouldSwitchOnNetworkAvailable()
974 NetworkRequest internetRequest = addInternetNetworkRequest(null, 50); in testValidationOffSwitch_shouldSwitchOnTimeOut()
1077 NetworkRequest internetRequest = addInternetNetworkRequest(null, 50); in setMsimDefaultDataSubId()
[all …]
/frameworks/base/packages/Tethering/src/com/android/networkstack/tethering/
DUpstreamNetworkMonitor.java38 import android.net.NetworkRequest;
149 public void startTrackDefaultNetwork(NetworkRequest defaultNetworkRequest, in startTrackDefaultNetwork()
170 final NetworkRequest listenAllRequest = new NetworkRequest.Builder() in startObserveAllNetworks()
220 final NetworkRequest mobileUpstreamRequest; in registerMobileNetworkRequest()
222 mobileUpstreamRequest = new NetworkRequest.Builder() in registerMobileNetworkRequest()
227 mobileUpstreamRequest = new NetworkRequest.Builder() in registerMobileNetworkRequest()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DOsuNetworkConnectionTest.java38 import android.net.NetworkRequest;
219 verify(mConnectivityManager).requestNetwork(any(NetworkRequest.class), in verifyNetworkCallbackInvokedWhenConnected()
249 verify(mConnectivityManager).requestNetwork(any(NetworkRequest.class), in verifyNetworkCallbackWithoutOnAvailable()
272 verify(mConnectivityManager).requestNetwork(any(NetworkRequest.class), in verifyNetworkConnectionTimeout()
323 ArgumentCaptor<NetworkRequest> networkRequestCaptor = ArgumentCaptor.forClass( in verifyWifiConfigurationForOsuNetwork()
324 NetworkRequest.class); in verifyWifiConfigurationForOsuNetwork()
/frameworks/base/services/core/java/com/android/server/location/
DGnssNetworkConnectivityHandler.java25 import android.net.NetworkRequest;
183 NetworkRequest.Builder networkRequestBuilder = new NetworkRequest.Builder(); in registerNetworkCallbacks()
187 NetworkRequest networkRequest = networkRequestBuilder.build(); in registerNetworkCallbacks()
467 NetworkRequest.Builder networkRequestBuilder = new NetworkRequest.Builder();
470 NetworkRequest networkRequest = networkRequestBuilder.build();

1234