Home
last modified time | relevance | path

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

/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
DShadowNetworkInfo.java4 import android.net.NetworkInfo;
15 @Implements(NetworkInfo.class)
21 private NetworkInfo.DetailedState detailedState;
23 public static NetworkInfo newInstance() { in newInstance()
27 public static NetworkInfo newInstance(NetworkInfo.DetailedState detailedState) { in newInstance()
31 …public static NetworkInfo newInstance(NetworkInfo.DetailedState detailedState, int type, int subTy… in newInstance()
34 NetworkInfo networkInfo = Robolectric.newInstanceOf(NetworkInfo.class); in newInstance()
55 public NetworkInfo.State getState() { in getState()
56 return isConnected ? NetworkInfo.State.CONNECTED : in getState()
57 NetworkInfo.State.DISCONNECTED; in getState()
[all …]
DShadowConnectivityManager.java4 import android.net.NetworkInfo;
19 private NetworkInfo activeNetwork;
22 … private Map<Integer, NetworkInfo> networkTypeToNetworkInfo = new HashMap<Integer, NetworkInfo>();
29 public NetworkInfo getActiveNetworkInfo() { in getActiveNetworkInfo()
34 public NetworkInfo[] getAllNetworkInfo() { in getAllNetworkInfo()
35 …return networkTypeToNetworkInfo.values().toArray(new NetworkInfo[networkTypeToNetworkInfo.size()]); in getAllNetworkInfo()
39 public NetworkInfo getNetworkInfo(int networkType) { in getNetworkInfo()
48 public void setNetworkInfo(int networkType, NetworkInfo networkInfo) { in setNetworkInfo()
56 public void setActiveNetworkInfo(NetworkInfo info) { in setActiveNetworkInfo()
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/
DNetworkInfoTest.java3 import android.net.NetworkInfo;
18 NetworkInfo networkInfo = Robolectric.newInstanceOf(NetworkInfo.class); in getDetailedState_shouldReturnTheAssignedState()
19 shadowOf(networkInfo).setDetailedState(NetworkInfo.DetailedState.SCANNING); in getDetailedState_shouldReturnTheAssignedState()
20 assertThat(networkInfo.getDetailedState(), equalTo(NetworkInfo.DetailedState.SCANNING)); in getDetailedState_shouldReturnTheAssignedState()
DConnectivityManagerTest.java5 import android.net.NetworkInfo;
48NetworkInfo networkInfo = ShadowNetworkInfo.newInstance(NetworkInfo.DetailedState.CONNECTING); in getNetworkInfoShouldReturnAssignedValue()
50 NetworkInfo actual = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); in getNetworkInfoShouldReturnAssignedValue()
52 assertThat(actual.getDetailedState(), is(NetworkInfo.DetailedState.CONNECTING)); in getNetworkInfoShouldReturnAssignedValue()
87 NetworkInfo info = connectivityManager.getActiveNetworkInfo(); in shouldSetActiveNetworkInfo()
97 NetworkInfo[] infos = connectivityManager.getAllNetworkInfo(); in shouldGetAllNetworkInfo()
/external/chromium_org/ash/system/chromeos/network/
Dnetwork_state_list_detailed_view.h36 struct NetworkInfo;
95 bool UpdateNetworkChild(int index, const NetworkInfo* info);
129 ScopedVector<NetworkInfo> network_list_;
Dnetwork_state_list_detailed_view.cc98 struct NetworkInfo { struct
99 NetworkInfo(const std::string& path) in NetworkInfo() argument
471 NetworkInfo* info = new NetworkInfo(network->path()); in UpdateNetworks()
483 NetworkInfo* info = network_list_[i]; in UpdateNetworkList()
556 const NetworkInfo* info) { in UpdateNetworkChild()
604 const NetworkInfo* info = network_list_[i]; in UpdateNetworkListEntries()
659 const NetworkInfo* info = network_list_[i]; in UpdateNetworkListEntries()
/external/glide/library/src/main/java/com/bumptech/glide/manager/
DDefaultConnectivityMonitor.java8 import android.net.NetworkInfo;
56 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); in isConnected()
/external/chromium_org/content/public/android/java/src/org/chromium/content/browser/
DMediaResourceGetter.java11 import android.net.NetworkInfo;
356 NetworkInfo info = mConnectivityManager.getActiveNetworkInfo(); in getNetworkType()
/external/robolectric/src/main/java/com/xtremelabs/robolectric/
DRobolectric.java38 import android.net.NetworkInfo;
761 public static ShadowNetworkInfo shadowOf(NetworkInfo instance) { in shadowOf()