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.java35 import android.net.NetworkRequest;
80 private final ArrayList<NetworkRequest> mNetworkRequestList = new ArrayList<>();
89 private NetworkRequest makeSubSpecificInternetRequest(int subId) { in makeSubSpecificInternetRequest()
96 NetworkRequest networkRequest = new NetworkRequest(netCap, -1, in makeSubSpecificInternetRequest()
97 mRequestId++, NetworkRequest.Type.REQUEST); in makeSubSpecificInternetRequest()
103 private NetworkRequest makeDefaultInternetRequest() { in makeDefaultInternetRequest()
108 NetworkRequest networkRequest = new NetworkRequest(netCap, -1, in makeDefaultInternetRequest()
109 mRequestId++, NetworkRequest.Type.REQUEST); in makeDefaultInternetRequest()
115 private NetworkRequest makeSubSpecificMmsRequest(int subId) { in makeSubSpecificMmsRequest()
122 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;
165 void declareNetworkRequestUnfulfillable(in NetworkRequest request); in declareNetworkRequestUnfulfillable()
171 NetworkRequest requestNetwork(in NetworkCapabilities networkCapabilities, in requestNetwork()
175 NetworkRequest pendingRequestForNetwork(in NetworkCapabilities networkCapabilities, in pendingRequestForNetwork()
180 NetworkRequest listenForNetwork(in NetworkCapabilities networkCapabilities, in listenForNetwork()
186 void releaseNetworkRequest(in NetworkRequest networkRequest); in releaseNetworkRequest()
197 NetworkRequest getDefaultRequest(); in getDefaultRequest()
228 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()
2230 public NetworkRequest getDefaultRequest() { in getDefaultRequest()
3233 public void declareNetworkRequestUnfulfillable(@NonNull NetworkRequest request) { in declareNetworkRequestUnfulfillable()
3493 private NetworkRequest networkRequest;
3580 final NetworkRequest request = getObject(message, NetworkRequest.class); in handleMessage()
[all …]
/frameworks/libs/net/common/src_servicescommon/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.java21 import android.net.NetworkRequest;
407 private final ArrayList<NetworkRequest> mNetworkRequests = new ArrayList<>();
416 public void requestNetwork(NetworkRequest networkRequest, @RequestNetworkType int type, in requestNetwork()
432 public void releaseNetwork(NetworkRequest networkRequest, @ReleaseNetworkType int type) { in releaseNetwork()
460 for (NetworkRequest nr : mNetworkRequests) { in hasRestrictedRequests()
545 static @ApnType int getApnTypeFromNetworkRequest(NetworkRequest nr) { in getApnTypeFromNetworkRequest()
614 public List<NetworkRequest> getNetworkRequests() { in getNetworkRequests()
616 return new ArrayList<NetworkRequest>(mNetworkRequests); in getNetworkRequests()
647 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/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.java209 NetworkRequest request = makeRequest(1); in testCallbackRelease()
237 NetworkRequest req1 = makeRequest(1); in testCallbackRecycling()
238 NetworkRequest req2 = makeRequest(2); in testCallbackRecycling()
281 NetworkRequest request = makeRequest(1); in noDoubleCallbackRegistration()
309 NetworkRequest request = mock(NetworkRequest.class); in testArgumentValidation()
342 static Message makeMessage(NetworkRequest req, int messageType) { in makeMessage()
344 bundle.putParcelable(NetworkRequest.class.getSimpleName(), req); in makeMessage()
355 static NetworkRequest makeRequest(int requestId) { in makeRequest()
356 NetworkRequest request = new NetworkRequest.Builder().clearCapabilities().build(); in makeRequest()
357 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/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/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/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()
439 NetworkRequest internetRequest = addInternetNetworkRequest(null, 50); in testSetPreferredDataModemCommand()
440 NetworkRequest mmsRequest = addMmsNetworkRequest(2); in testSetPreferredDataModemCommand()
543 NetworkRequest internetRequest = addInternetNetworkRequest(null, 50); in testNonDefaultDataPhoneInCall()
590 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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DOsuNetworkConnectionTest.java39 import android.net.NetworkRequest;
211 verify(mConnectivityManager).requestNetwork(any(NetworkRequest.class), in verifyNetworkCallbackInvokedWhenConnected()
241 verify(mConnectivityManager).requestNetwork(any(NetworkRequest.class), in verifyNetworkCallbackWithoutOnAvailable()
264 verify(mConnectivityManager).requestNetwork(any(NetworkRequest.class), in verifyNetworkConnectionTimeout()
315 ArgumentCaptor<NetworkRequest> networkRequestCaptor = ArgumentCaptor.forClass( in verifyWifiConfigurationForOsuNetwork()
316 NetworkRequest.class); in verifyWifiConfigurationForOsuNetwork()
348 ArgumentCaptor<NetworkRequest> networkRequestCaptor = ArgumentCaptor.forClass( in verifyWifiConfigurationForOsenOsuNetwork()
349 NetworkRequest.class); in verifyWifiConfigurationForOsenOsuNetwork()
/frameworks/base/services/core/java/com/android/server/connectivity/
DNetworkRanker.java21 import android.net.NetworkRequest;
37 public NetworkAgentInfo getBestNetwork(@NonNull final NetworkRequest request, in getBestNetwork()
/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/telephony/src/java/com/android/internal/telephony/
DPhoneSwitcher.java40 import android.net.NetworkRequest;
462 onRequestNetwork((NetworkRequest)msg.obj); in handleMessage()
466 onReleaseNetwork((NetworkRequest)msg.obj); in handleMessage()
678 protected void needNetworkFor(NetworkRequest networkRequest, int score) { in needNetworkFor()
686 protected void releaseNetworkFor(NetworkRequest networkRequest) { in releaseNetworkFor()
694 private void onRequestNetwork(NetworkRequest networkRequest) { in onRequestNetwork()
708 private void onReleaseNetwork(NetworkRequest networkRequest) { in onReleaseNetwork()
720 private ApnConfigTypeRepository createApnRepository(NetworkRequest networkRequest) { in createApnRepository()
752 private void collectRequestNetworkMetrics(NetworkRequest networkRequest) { in collectRequestNetworkMetrics()
764 private void collectReleaseNetworkMetrics(NetworkRequest networkRequest) { in collectReleaseNetworkMetrics()
[all …]
/frameworks/base/core/java/com/android/server/net/
DNetworkPinner.java23 import android.net.NetworkRequest;
117 public static void pin(Context context, NetworkRequest request) { in pin()

1234