Home
last modified time | relevance | path

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

/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/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()
DShadowWifiManagerTest.java12 import android.net.NetworkInfo;
447 NetworkInfo networkInfo = in reconnect_updatesConnectivityManager()
/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/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()
DMoblabRpcHelper.java83 NetworkInfo networkInfo = new NetworkInfo(); in fetchNetworkInfo()
/external/webrtc/talk/app/webrtc/java/android/org/webrtc/
DNetworkMonitorAutoDetect.java42 import android.net.NetworkInfo;
142 NetworkState getNetworkState(NetworkInfo networkInfo) { in getNetworkState()
175 final NetworkInfo defaultNetworkInfo = connectivityManager.getActiveNetworkInfo(); in getDefaultNetId()
185 final NetworkInfo networkInfo = connectivityManager.getNetworkInfo(network); in getDefaultNetId()
/external/glide/library/src/main/java/com/bumptech/glide/manager/
DDefaultConnectivityMonitor.java8 import android.net.NetworkInfo;
55 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); in isConnected()
/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/autotest/client/site_tests/network_ChromeCellularEndToEnd/
Dnetwork_ChromeCellularEndToEnd.py17 NetworkInfo = namedtuple('NetworkInfo', ['name', 'guid', 'connectionState', variable
41 network = NetworkInfo(name=network['Name'],
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/
DConnectivityManagerFacade.java33 import android.net.NetworkInfo;
118 for (NetworkInfo info : mManager.getAllNetworkInfo()) { in onReceive()
714 NetworkInfo current = mManager.getActiveNetworkInfo(); in connectivityNetworkGetActiveConnectionExtraInfo()
724 NetworkInfo current = mManager.getActiveNetworkInfo(); in connectivityNetworkGetActiveConnectionSubtypeName()
734 NetworkInfo current = mManager.getActiveNetworkInfo(); in connectivityNetworkGetActiveConnectionTypeName()
743 public NetworkInfo[] connectivityNetworkGetAllInfo() { in connectivityNetworkGetAllInfo()
749 NetworkInfo current = mManager.getActiveNetworkInfo(); in connectivityNetworkIsConnected()
/external/grpc-grpc-java/android/src/main/java/io/grpc/android/
DAndroidChannelBuilder.java26 import android.net.NetworkInfo;
350 NetworkInfo networkInfo = conn.getActiveNetworkInfo(); in onReceive()
/external/apache-http/android/src/android/net/http/
DRequestQueue.java29 import android.net.NetworkInfo;
256 NetworkInfo info = mConnectivityManager.getActiveNetworkInfo(); in setProxyConfig()
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/wifi/
DWifiP2pManagerFacade.java24 import android.net.NetworkInfo;
299 NetworkInfo networkInfo = intent in onReceive()
DWifiManagerFacade.java32 import android.net.NetworkInfo;
33 import android.net.NetworkInfo.DetailedState;
355 NetworkInfo nInfo = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO); in onReceive()
/external/sl4a/Common/src/com/googlecode/android_scripting/jsonrpc/
DJsonBuilder.java39 import android.net.NetworkInfo;
236 if (data instanceof NetworkInfo) { in build()
237 return buildNetworkInfo((NetworkInfo) data); in build()
913 private static Object buildNetworkInfo(NetworkInfo data) in buildNetworkInfo()