/packages/modules/Connectivity/tests/common/java/android/net/ |
D | NetworkTest.java | 52 final Network mNetwork = new Network(99); 120 Network zero = new Network(0); in testZeroIsObviousForDebugging() 128 Network one = new Network(1); in testGetNetworkHandle() 129 Network two = new Network(2); in testGetNetworkHandle() 130 Network three = new Network(3); in testGetNetworkHandle() 166 assertEquals(1234, new Network(1234).getNetId()); in testGetNetId() 167 assertEquals(2345, new Network(2345, true).getNetId()); in testGetNetId() 172 final Network network = new Network(1234); in testFromNetworkHandle() 173 assertEquals(network.netId, Network.fromNetworkHandle(network.getNetworkHandle()).netId); in testFromNetworkHandle() 179 final Network network = new Network(1234, true); in testFromNetworkHandlePrivateDnsBypass_S() [all …]
|
D | ConnectivityDiagnosticsManagerTest.java | 105 new Network(NET_ID), TIMESTAMP, linkProperties, networkCapabilities, bundle); in createSampleConnectivityReport() 110 new Network(0), in createDefaultConnectivityReport() 164 new Network(NET_ID), in testConnectivityReportEquals() 172 new Network(0), in testConnectivityReportEquals() 180 new Network(0), in testConnectivityReportEquals() 188 new Network(0), in testConnectivityReportEquals() 196 new Network(0), in testConnectivityReportEquals() 219 new Network(NET_ID), in createSampleDataStallReport() 229 new Network(0), in createDefaultDataStallReport() 251 new Network(NET_ID), in testDataStallReportEquals() [all …]
|
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/ |
D | TestableNetworkCallback.kt | 22 import android.net.Network 43 object NULL_NETWORK : Network(-1) 44 object ANY_NETWORK : Network(-2) 62 abstract val network: Network in anyNetwork() 64 data class Available(override val network: Network) : CallbackEntry() in anyNetwork() 66 override val network: Network, in anyNetwork() 70 override val network: Network, in anyNetwork() 74 override val network: Network, in anyNetwork() 77 data class Suspended(override val network: Network) : CallbackEntry() in anyNetwork() 78 data class Resumed(override val network: Network) : CallbackEntry() in anyNetwork() [all …]
|
/packages/modules/Connectivity/framework/src/android/net/ |
D | IConnectivityManager.aidl | 31 import android.net.Network; 59 Network getActiveNetwork(); in getActiveNetwork() 60 Network getActiveNetworkForUid(int uid, boolean ignoreBlocked); in getActiveNetworkForUid() 66 NetworkInfo getNetworkInfoForUid(in Network network, int uid, boolean ignoreBlocked); in getNetworkInfoForUid() 69 Network getNetworkForType(int networkType); in getNetworkForType() 70 Network[] getAllNetworks(); in getAllNetworks() 79 LinkProperties getLinkProperties(in Network network); in getLinkProperties() 83 NetworkCapabilities getNetworkCapabilities(in Network network, String callingPackageName, in getNetworkCapabilities() 127 void reportNetworkConnectivity(in Network network, boolean hasConnectivity); in reportNetworkConnectivity() 133 ProxyInfo getProxyForNetwork(in Network nework); in getProxyForNetwork() [all …]
|
D | Network.java | 63 public class Network implements Parcelable { class 116 public Network(int netId) { in Network() method in Network 123 public Network(int netId, boolean privateDnsBypass) { in Network() method in Network 132 public Network(@NonNull Network that) { in Network() method in Network 169 public @NonNull Network getPrivateDnsBypassingCopy() { in getPrivateDnsBypassingCopy() 170 return new Network(netId, true); in getPrivateDnsBypassingCopy() 452 public static Network fromNetworkHandle(long networkHandle) { in fromNetworkHandle() 462 return new Network((netIdForResolv & ~USE_LOCAL_NAMESERVERS_FLAG), in fromNetworkHandle() 502 public static final @android.annotation.NonNull Creator<Network> CREATOR = 503 new Creator<Network>() { [all …]
|
D | LocalNetworkInfo.java | 33 @Nullable private final Network mUpstreamNetwork; 35 public LocalNetworkInfo(@Nullable final Network upstreamNetwork) { in LocalNetworkInfo() 43 public Network getUpstreamNetwork() { in getUpstreamNetwork() 64 final Network upstreamNetwork = in.readParcelable(null); 78 @Nullable private Network mUpstreamNetwork; 84 @NonNull public Builder setUpstreamNetwork(@Nullable final Network network) { in setUpstreamNetwork()
|
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | MultinetworkApiTest.java | 34 import android.net.Network; 90 private Network mRequestedCellNetwork; 102 for (Network network : getTestableNetworks()) { in testGetaddrinfo() 118 for (Network network : getTestableNetworks()) { in testSetprocnetwork() 127 Network processDefault = mCM.getProcessDefaultNetwork(); in testSetprocnetwork() 137 for (Network network : getTestableNetworks()) { in testSetprocnetwork() 146 assertEquals(network, new Network(mCM.getBoundNetworkForProcess())); in testSetprocnetwork() 158 for (Network network : getTestableNetworks()) { in testSetsocknetwork() 169 for (Network network : getTestableNetworks()) { in testNativeDatagramTransmission() 180 final Network eNoNet = new Network(54321); in testNoSuchNetwork() [all …]
|
D | DiscoveryRequestTest.kt | 19 import android.net.Network 46 .setNetwork(Network(1)) in testParcelingIsLossLess() 57 .setNetwork(Network(1)) in testBuilder_success() 62 assertEquals(Network(1), request.network) in testBuilder_success() 78 .setNetwork(Network(1)) in testEquality() 82 .setNetwork(Network(1)) in testEquality()
|
/packages/modules/Connectivity/tests/cts/net/util/java/android/net/cts/util/ |
D | CtsNetUtils.java | 44 import android.net.Network; 182 Network wifiNetwork = getWifiNetwork(); in reconnectWifiAndWaitForConnectivityAction() 211 public Network expectNetworkIsSystemDefault(Network network) in expectNetworkIsSystemDefault() 213 final CompletableFuture<Network> future = new CompletableFuture(); in expectNetworkIsSystemDefault() 216 public void onAvailable(Network n) { in expectNetworkIsSystemDefault() 239 public Network connectToWifi() { in connectToWifi() 249 public Network ensureWifiConnected() { in ensureWifiConnected() 262 private Network connectToWifi(boolean expectLegacyBroadcast) { in connectToWifi() 270 final Network network = new ConnectUtil(mContext).ensureWifiConnected(); in connectToWifi() 294 public void disconnectFromWifi(Network wifiNetworkToCheck) { in disconnectFromWifi() [all …]
|
/packages/services/Car/tests/RailwayReferenceApp/src/com/google/android/car/networking/railway/ |
D | CurrentEthernetNetworksViewModel.java | 24 import android.net.Network; 42 private final MutableLiveData<List<Network>> mNetworks = 53 public LiveData<List<Network>> getNetworksLiveData() { in getNetworksLiveData() 87 private void addNetwork(Network network) { in addNetwork() 88 List<Network> networks = mNetworks.getValue(); in addNetwork() 95 private void removeNetwork(Network network) { in removeNetwork() 96 List<Network> networks = mNetworks.getValue(); in removeNetwork() 103 public String getCurrentEthernetNetworksText(List<Network> networks) { in getCurrentEthernetNetworksText() 105 for (Network network : networks) { in getCurrentEthernetNetworksText() 142 public void onAvailable(Network network) { in onAvailable() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/wifi/ |
D | NetworkMonitorTest.java | 29 import android.net.Network; 68 final Network network = mock(Network.class); in testStartListening() 90 cb.onBlockedStatusChanged(mock(Network.class), false); in testStopListening() 103 final Network network = mock(Network.class); in testWaitForValidated_NoCallbackBeforeValidated() 120 final Network network = mock(Network.class); in testWaitForValidated_NetworkChange() 129 final Network network2 = mock(Network.class); in testWaitForValidated_NetworkChange() 152 final Network network = mock(Network.class); in testWaitForValidated_NoCallbackOnCapabilitiesChange() 176 final Network network = mock(Network.class); in testWaitForValidated_ToggleBlocked()
|
/packages/modules/NetworkStack/src/com/android/networkstack/ |
D | NetworkStackNotifier.java | 31 import android.net.Network; 62 private final Hashtable<Network, TrackedNetworkStatus> mNetworkStatus = new Hashtable<>(); 64 private Network mDefaultNetwork; 167 public void notifyCaptivePortalValidationPending(@NonNull Network network) { in notifyCaptivePortalValidationPending() 171 private void setCaptivePortalValidationPending(@NonNull Network network) { in setCaptivePortalValidationPending() 187 private void updateNetworkStatus(@NonNull Network network, in updateNetworkStatus() 194 private void updateNotifications(@NonNull Network network) { in updateNotifications() 314 private static String getNotificationTag(@NonNull Network network) { in getNotificationTag() 320 public void onAvailable(Network network) { in onAvailable() 325 public void onLost(Network network) { in onLost() [all …]
|
/packages/modules/Connectivity/framework-t/src/android/net/nsd/ |
D | DiscoveryRequest.java | 22 import android.net.Network; 43 private final Network mNetwork; 55 Network network = 56 in.readParcelable(Network.class.getClassLoader(), Network.class); 67 @Nullable String subtype, @Nullable Network network) { in DiscoveryRequest() 110 public Network getNetwork() { in getNetwork() 168 private Network mNetwork; 234 public Builder setNetwork(@Nullable Network network) { in setNetwork()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/ |
D | DataConnectivityListenerTest.java | 29 import android.net.Network; 52 private Network mActiveNetwork; 81 Network changedNetwork = mock(Network.class); in onCapabilitiesChanged_notActiveNetwork_noCallback() 97 Network changedNetwork = mock(Network.class); in onLosing_notActiveNetwork_onDataConnectivityChangeFires() 113 Network changedNetwork = mock(Network.class); in onLost_notActiveNetwork_onDataConnectivityChangeFires()
|
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/testutils/ |
D | TestableNetworkCallbackTest.kt | 22 import android.net.Network in <lambda>() 63 override val network: Network = Network(netId) in <lambda>() 75 val net2097 = Network(2097) in <lambda>() 92 val net2098 = Network(2098) in <lambda>() 99 val net2099 = Network(2099) in <lambda>() 123 mCallback.onAvailable(Network(100)) in <lambda>() 125 val net = Network(101) in <lambda>() 139 val net = Network(101) in <lambda>() 170 val net = Network(193) in <lambda>() 192 val net = Network(101) in <lambda>() [all …]
|
/packages/modules/Connectivity/tests/cts/hostside-network-policy/app/src/com/android/cts/netpolicy/hostside/ |
D | NetworkCallbackTest.java | 34 import android.net.Network; 54 private Network mNetwork; 73 public final Network network; 76 CallbackInfo(CallbackState s, Network n, Object o) { in CallbackInfo() 105 protected void setLastCallback(CallbackState state, Network network, Object o) { in setLastCallback() 121 CallbackInfo expectCallback(CallbackState state, Network expectedNetwork, Object o) { in expectCallback() 129 public void onAvailable(Network network) { in onAvailable() 134 public void onLost(Network network) { in onLost() 139 public void onBlockedStatusChanged(Network network, boolean blocked) { in onBlockedStatusChanged() 144 public void onCapabilitiesChanged(Network network, NetworkCapabilities cap) { in onCapabilitiesChanged() [all …]
|
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/ |
D | JobPreconditionsTest.java | 27 import android.net.Network; 50 @Mock private Network mWifiNetwork; 53 private ArrayList<Network> mNetworkList; 54 private HashMap<Network, NetworkInfo> mNetworkMap; 111 doReturn(mNetworkList.toArray(new Network[mNetworkList.size()])) in hookUpMocks() 113 when(mConnectivityManager.getNetworkInfo(any(Network.class))).thenAnswer( in hookUpMocks() 117 Network network = (Network) invocation.getArguments()[0]; in hookUpMocks()
|
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/ |
D | MdnsSocketProvider.java | 36 import android.net.Network; 88 private final ArrayMap<Network, SocketInfo> mNetworkSockets = new ArrayMap<>(); 90 private final ArrayMap<Network, LinkProperties> mActiveNetworksLinkProperties = 92 private final ArrayMap<Network, int[]> mActiveNetworksTransports = new ArrayMap<>(); 93 private final ArrayMap<SocketCallback, Network> mCallbacksToRequestedNetworks = 177 public void onLost(Network network) { in MdnsSocketProvider() 184 public void onCapabilitiesChanged(@NonNull Network network, in MdnsSocketProvider() 190 public void onLinkPropertiesChanged(Network network, LinkProperties lp) { in MdnsSocketProvider() 403 private boolean matchRequestedNetwork(Network network) { in matchRequestedNetwork() 412 private void handleLinkPropertiesChanged(Network network, LinkProperties lp) { in handleLinkPropertiesChanged() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/ |
D | WifiNoInternetDialogTest.java | 39 import android.net.Network; 66 private Network mNetwork; 134 verify(mConnectivityManager).setAcceptUnvalidated(any(Network.class), eq(true), eq(false)); in clickPositiveButton_whenPromptUnvalidated_shouldCallSetAcceptUnvalidated() 145 verify(mConnectivityManager).setAcceptPartialConnectivity(any(Network.class), eq(true), in positiveButton_withPartialConnectivity_shouldCallSetAcceptPartialConnectivity() 157 verify(mConnectivityManager).setAvoidUnvalidated(any(Network.class)); in positiveButton_withLostValidation_shouldCallSetAvoidUnvalidated() 169 verify(mConnectivityManager).setAcceptPartialConnectivity(any(Network.class), eq(false), in destroyWithNoClick_inPartialConnectivity_shouldCallSetAcceptPartialConnectivity() 182 verify(mConnectivityManager).setAcceptUnvalidated(any(Network.class), eq(false), eq(false)); in destroyWithNoClick_whenUnvalidated_shouldCallSetAcceptUnvalidated() 206 Network unexpectedNetwork = mock(Network.class); in networkCallbackOnLost_shouldNotFinishIfNetworkIsNotTheSame() 235 Network unexpectedNetwork = mock(Network.class); in networkCallbackOnCapabilitiesChanged_shouldNotFinishIfNetworkIsNotTheSame() 273 private void setupActivityWithAction(String action, Network network) { in setupActivityWithAction()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/network/ |
D | NetworkUtilsTest.java | 25 import android.net.Network; 40 Network network = mock(Network.class); in hasMobileNetwork_hasCellularCapabilities_returnsTrue() 43 when(connectivityManager.getAllNetworks()).thenReturn(new Network[]{network}); in hasMobileNetwork_hasCellularCapabilities_returnsTrue() 53 Network network = mock(Network.class); in hasMobileNetwork_hasNoCellularCapabilities_returnsFalse() 56 when(connectivityManager.getAllNetworks()).thenReturn(new Network[]{network}); in hasMobileNetwork_hasNoCellularCapabilities_returnsFalse()
|
/packages/modules/Connectivity/tests/cts/hostside-network-policy/aidl/com/android/cts/netpolicy/hostside/ |
D | INetworkCallback.aidl | 19 import android.net.Network; 23 void onBlockedStatusChanged(in Network network, boolean blocked); in onBlockedStatusChanged() 24 void onAvailable(in Network network); in onAvailable() 25 void onLost(in Network network); in onLost() 26 void onCapabilitiesChanged(in Network network, in NetworkCapabilities cap); in onCapabilitiesChanged()
|
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/details/ |
D | WifiInfoProvider.java | 26 import android.net.Network; 67 void onLost(Network network); in onLost() 72 void onCapabilitiesChanged(Network network, NetworkCapabilities nc); in onCapabilitiesChanged() 77 void onLinkPropertiesChanged(Network network, LinkProperties lp); in onLinkPropertiesChanged() 88 private final Network mNetwork; 105 public void onLinkPropertiesChanged(Network network, LinkProperties lp) { 115 public void onCapabilitiesChanged(Network network, NetworkCapabilities nc) { 126 public void onLost(Network network) { 225 public Network getNetwork() { in getNetwork()
|
/packages/services/Telephony/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/protocol/msrp/ |
D | ImsPdnNetworkFetcher.java | 21 import android.net.Network; 50 ListenableFuture<Network> getImsPdnNetwork() { in getImsPdnNetwork() 60 List<String> getNetworkIpAddresses(Network network) { in getNetworkIpAddresses() 66 private ListenableFuture<Network> requestNetwork() { in requestNetwork() 67 SettableFuture<Network> result = SettableFuture.create(); in requestNetwork() 73 public void onAvailable(Network network) { in requestNetwork()
|
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/net/ |
D | IkeNetworkCallbackBase.java | 24 import android.net.Network; 36 protected Network mCurrNetwork; 43 Network currNetwork, in IkeNetworkCallbackBase() 55 public void onLost(Network network) { in onLost() 93 public void setNetwork(Network network, LinkProperties lp, NetworkCapabilities nc) { in setNetwork() 102 public Network getNetwork() { in getNetwork()
|
/packages/apps/Settings/src/com/android/settings/network/telephony/ |
D | DataConnectivityListener.java | 21 import android.net.Network; 57 public void onCapabilitiesChanged(Network network, NetworkCapabilities networkCapabilities) { in onCapabilitiesChanged() 58 final Network activeNetwork = mConnectivityManager.getActiveNetwork(); in onCapabilitiesChanged() 65 public void onLosing(Network network, int maxMsToLive) { in onLosing() 70 public void onLost(Network network) { in onLost()
|