Home
last modified time | relevance | path

Searched refs:NetworkInfo (Results 1 – 25 of 37) sorted by relevance

12

/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowNetworkInfo.java3 import android.net.NetworkInfo;
8 @Implements(NetworkInfo.class)
11 private NetworkInfo.State state;
14 private NetworkInfo.DetailedState detailedState;
24 public static NetworkInfo newInstance( in newInstance()
25 NetworkInfo.DetailedState detailedState, in newInstance()
35 isConnected ? NetworkInfo.State.CONNECTED : NetworkInfo.State.DISCONNECTED); in newInstance()
39 public static NetworkInfo newInstance( in newInstance()
40 NetworkInfo.DetailedState detailedState, in newInstance()
44 NetworkInfo.State state) { in newInstance()
[all …]
DShadowConnectivityManager.java15 import android.net.NetworkInfo;
34 private NetworkInfo activeNetworkInfo;
37 private final Map<Integer, NetworkInfo> networkTypeToNetworkInfo = new HashMap<>();
41 private final Map<Integer, NetworkInfo> netIdToNetworkInfo = new HashMap<>();
52 NetworkInfo wifi = ShadowNetworkInfo.newInstance(NetworkInfo.DetailedState.DISCONNECTED, in ShadowConnectivityManager()
56 NetworkInfo mobile = ShadowNetworkInfo.newInstance(NetworkInfo.DetailedState.CONNECTED, in ShadowConnectivityManager()
114 protected NetworkInfo getActiveNetworkInfo() { in getActiveNetworkInfo()
135 protected NetworkInfo[] getAllNetworkInfo() { in getAllNetworkInfo()
140 .toArray(new NetworkInfo[networkTypeToNetworkInfo.size()]); in getAllNetworkInfo()
146 protected NetworkInfo getNetworkInfo(int networkType) { in getNetworkInfo()
[all …]
DShadowWifiManager.java10 import android.net.NetworkInfo;
229 NetworkInfo networkInfo = in connect()
231 NetworkInfo.DetailedState.CONNECTED, in connect()
/external/openscreen/discovery/common/
Dconfig.h17 struct NetworkInfo { struct
38 std::vector<NetworkInfo> network_info;
101 inline Config::NetworkInfo::AddressFamilies operator&(
102 Config::NetworkInfo::AddressFamilies lhs,
103 Config::NetworkInfo::AddressFamilies rhs) {
104 return static_cast<Config::NetworkInfo::AddressFamilies>(
108 inline Config::NetworkInfo::AddressFamilies operator|(
109 Config::NetworkInfo::AddressFamilies lhs,
110 Config::NetworkInfo::AddressFamilies rhs) {
111 return static_cast<Config::NetworkInfo::AddressFamilies>(
[all …]
/external/autotest/frontend/client/test/autotest/moblab/rpc/
DNetworkInfoTest.java7 import autotest.moblab.rpc.NetworkInfo;
12 NetworkInfo info = new NetworkInfo(null, true); in testSerialization()
14 JSONValue ips = jsonInfo.get(NetworkInfo.JSON_FIELD_SERVER_IPS); in testSerialization()
16 assertTrue(jsonInfo.get(NetworkInfo.JSON_FIELD_IS_CONNECTED).isBoolean() in testSerialization()
19 info = new NetworkInfo(); in testSerialization()
26 info = new NetworkInfo(serverIps, true); in testSerialization()
28 ips = jsonInfo.get(NetworkInfo.JSON_FIELD_SERVER_IPS); in testSerialization()
32 assertTrue(jsonInfo.get(NetworkInfo.JSON_FIELD_IS_CONNECTED).isBoolean() in testSerialization()
36 info = new NetworkInfo(); in testSerialization()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowConnectivityManagerTest.java19 import android.net.NetworkInfo;
52 shadowOfActiveNetworkInfo.setConnectionStatus(NetworkInfo.State.CONNECTED); in getActiveNetworkInfo_shouldReturnTrueCorrectly()
56 shadowOfActiveNetworkInfo.setConnectionStatus(NetworkInfo.State.CONNECTING); in getActiveNetworkInfo_shouldReturnTrueCorrectly()
60 shadowOfActiveNetworkInfo.setConnectionStatus(NetworkInfo.State.DISCONNECTED); in getActiveNetworkInfo_shouldReturnTrueCorrectly()
67 NetworkInfo wifi = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); in getNetworkInfo_shouldReturnDefaultNetworks()
68 assertThat(wifi.getDetailedState()).isEqualTo(NetworkInfo.DetailedState.DISCONNECTED); in getNetworkInfo_shouldReturnDefaultNetworks()
70 NetworkInfo mobile = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); in getNetworkInfo_shouldReturnDefaultNetworks()
71 assertThat(mobile.getDetailedState()).isEqualTo(NetworkInfo.DetailedState.CONNECTED); in getNetworkInfo_shouldReturnDefaultNetworks()
78 NetworkInfo networkInfo = connectivityManager.getNetworkInfo(network); in getNetworkInfo_shouldReturnSomeForAllNetworks()
86 NetworkInfo vpnNetworkInfo = in getNetworkInfo_shouldReturnAddedNetwork()
[all …]
DShadowNetworkInfoTest.java6 import android.net.NetworkInfo;
17 NetworkInfo networkInfo = Shadow.newInstanceOf(NetworkInfo.class); in getDetailedState_shouldReturnTheAssignedState()
18 shadowOf(networkInfo).setDetailedState(NetworkInfo.DetailedState.SCANNING); in getDetailedState_shouldReturnTheAssignedState()
19 assertThat(networkInfo.getDetailedState()).isEqualTo(NetworkInfo.DetailedState.SCANNING); in getDetailedState_shouldReturnTheAssignedState()
/external/openscreen/discovery/dnssd/impl/
Dservice_instance.cc19 const Config::NetworkInfo& network_info) in ServiceInstance()
27 Config::NetworkInfo::kUseIpV4) in ServiceInstance()
31 Config::NetworkInfo::kUseIpV6)
34 const Config::NetworkInfo::AddressFamilies supported_address_families =
37 OSP_DCHECK(!(supported_address_families & Config::NetworkInfo::kUseIpV4) ||
39 OSP_DCHECK(!(supported_address_families & Config::NetworkInfo::kUseIpV6) ||
Dservice_instance.h29 const Config::NetworkInfo& network_info);
/external/grpc-grpc-java/android/src/test/java/io/grpc/android/
DAndroidChannelBuilderTest.java29 import android.net.NetworkInfo;
60 private final NetworkInfo WIFI_CONNECTED =
62 NetworkInfo.DetailedState.CONNECTED, ConnectivityManager.TYPE_WIFI, 0, true, true);
63 private final NetworkInfo WIFI_DISCONNECTED =
65 NetworkInfo.DetailedState.DISCONNECTED, ConnectivityManager.TYPE_WIFI, 0, true, false);
66 private final NetworkInfo MOBILE_CONNECTED =
68 NetworkInfo.DetailedState.CONNECTED,
73 private final NetworkInfo MOBILE_DISCONNECTED =
75 NetworkInfo.DetailedState.DISCONNECTED,
319 public void setActiveNetworkInfo(NetworkInfo activeNetworkInfo) { in setActiveNetworkInfo()
[all …]
/external/openscreen/cast/standalone_receiver/
Dcast_service.cc37 discovery::Config::NetworkInfo::AddressFamilies supported_address_families = in MakeDiscoveryConfig()
38 discovery::Config::NetworkInfo::kNoAddressFamily; in MakeDiscoveryConfig()
40 supported_address_families |= discovery::Config::NetworkInfo::kUseIpV4; in MakeDiscoveryConfig()
42 supported_address_families |= discovery::Config::NetworkInfo::kUseIpV6; in MakeDiscoveryConfig()
/external/openscreen/cast/standalone_sender/
Dreceiver_chooser.cc35 Config::NetworkInfo::AddressFamilies families = in ReceiverChooser()
36 Config::NetworkInfo::kNoAddressFamily; in ReceiverChooser()
38 families |= Config::NetworkInfo::kUseIpV4; in ReceiverChooser()
41 families |= Config::NetworkInfo::kUseIpV6; in ReceiverChooser()
/external/autotest/frontend/client/src/autotest/moblab/wizard/
DNetworkInfoCard.java11 import autotest.moblab.rpc.NetworkInfo;
18 private NetworkInfo networkInfo;
69 public void onNetworkInfoFetched(NetworkInfo info) { in validateNetworkInfo()
/external/autotest/frontend/client/src/autotest/moblab/rpc/
DNetworkInfo.java12 public class NetworkInfo extends JsonRpcEntity { class
18 public NetworkInfo() { in NetworkInfo() method in NetworkInfo
22 public NetworkInfo(String[] serverIps, boolean connectedToGoogle) { in NetworkInfo() method in NetworkInfo
DMoblabRpcCallbacks.java15 public void onNetworkInfoFetched(NetworkInfo info); in onNetworkInfoFetched()
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/upstream/
DDefaultBandwidthMeterTest.java22 import android.net.NetworkInfo;
23 import android.net.NetworkInfo.DetailedState;
48 private NetworkInfo networkInfoOffline;
49 private NetworkInfo networkInfoWifi;
50 private NetworkInfo networkInfo2g;
51 private NetworkInfo networkInfo3g;
52 private NetworkInfo networkInfo4g;
53 private NetworkInfo networkInfoEthernet;
560 private void setActiveNetworkInfo(NetworkInfo networkInfo) { in setActiveNetworkInfo()
/external/openscreen/discovery/mdns/
Dmdns_service_impl.cc23 const Config::NetworkInfo& network_info) { in Create()
32 const Config::NetworkInfo& network_info) in MdnsServiceImpl()
47 if (network_info.supported_address_families & Config::NetworkInfo::kUseIpV4) { in MdnsServiceImpl()
58 if (network_info.supported_address_families & Config::NetworkInfo::kUseIpV6) { in MdnsServiceImpl()
/external/glide/library/src/main/java/com/bumptech/glide/manager/
DDefaultConnectivityMonitor.java8 import android.net.NetworkInfo;
55 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); in isConnected()
/external/libchrome/base/test/android/javatests/src/org/chromium/base/test/util/
DRestrictionSkipCheck.java9 import android.net.NetworkInfo;
75 final NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); in isNetworkAvailable()
/external/webrtc/sdk/android/api/org/webrtc/
DNetworkMonitorAutoDetect.java24 import android.net.NetworkInfo;
250 NetworkInfo networkInfo = connectivityManager.getNetworkInfo(network); in getNetworkState()
299 NetworkInfo underlyingActiveNetworkInfo = connectivityManager.getActiveNetworkInfo(); in getNetworkState()
319 private NetworkState getNetworkState(@Nullable NetworkInfo networkInfo) { in getNetworkState()
367 final NetworkInfo defaultNetworkInfo = connectivityManager.getActiveNetworkInfo(); in getDefaultNetId()
377 final NetworkInfo networkInfo = connectivityManager.getNetworkInfo(network); in getDefaultNetId()
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/scheduler/
DRequirements.java24 import android.net.NetworkInfo;
133 NetworkInfo networkInfo = Assertions.checkNotNull(connectivityManager).getActiveNetworkInfo(); in getNotMetNetworkRequirements()
/external/autotest/client/site_tests/network_ChromeWifiEndToEnd/
Dnetwork_ChromeWifiEndToEnd.py16 NetworkInfo = namedtuple('NetworkInfo', 'name guid connectionState security') variable
41 network = NetworkInfo(name=network['Name'],
/external/openscreen/cast/common/discovery/e2e_test/
Dtests.cc128 discovery::Config::NetworkInfo::AddressFamilies address_families = in GetConfigSettings()
129 discovery::Config::NetworkInfo::kNoAddressFamily; in GetConfigSettings()
131 address_families |= discovery::Config::NetworkInfo::kUseIpV4; in GetConfigSettings()
134 address_families |= discovery::Config::NetworkInfo::kUseIpV6; in GetConfigSettings()
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/
DConnectivityManagerFacade.java33 import android.net.NetworkInfo;
124 for (NetworkInfo info : mManager.getAllNetworkInfo()) { in onReceive()
637 NetworkInfo current = mManager.getActiveNetworkInfo(); in connectivityNetworkGetActiveConnectionExtraInfo()
647 NetworkInfo current = mManager.getActiveNetworkInfo(); in connectivityNetworkGetActiveConnectionSubtypeName()
657 NetworkInfo current = mManager.getActiveNetworkInfo(); in connectivityNetworkGetActiveConnectionTypeName()
666 public NetworkInfo[] connectivityNetworkGetAllInfo() { in connectivityNetworkGetAllInfo()
682 NetworkInfo current = mManager.getActiveNetworkInfo(); in connectivityNetworkIsConnected()
1114 NetworkInfo mWifi = mManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); in connectivityIsActiveNetworkWiFi()
/external/autotest/client/site_tests/network_ChromeCellularEndToEnd/
Dnetwork_ChromeCellularEndToEnd.py17 NetworkInfo = namedtuple('NetworkInfo', ['name', 'guid', 'connectionState', variable
41 network = NetworkInfo(name=network['Name'],

12