/frameworks/base/core/java/android/net/ |
NetworkState.java | 29 public final NetworkInfo networkInfo; 36 public NetworkState(NetworkInfo networkInfo, LinkProperties linkProperties, 38 this(networkInfo, linkProperties, linkCapabilities, null, null); 41 public NetworkState(NetworkInfo networkInfo, LinkProperties linkProperties, 43 this.networkInfo = networkInfo; 51 networkInfo = in.readParcelable(null) [all...] |
NetworkIdentity.java | 33 * {@link NetworkInfo} and an IMSI. 140 final int type = state.networkInfo.getType(); 141 final int subType = state.networkInfo.getSubtype();
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ |
ConnectivityManagerMobileTest.java | 21 import android.net.NetworkInfo; 22 import android.net.NetworkInfo.State; 83 NetworkInfo extraNetInfo = mCM.getActiveNetworkInfo(); 123 NetworkInfo networkInfo = mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); 125 networkInfo.getState(), NetworkState.DO_NOTHING, State.CONNECTED); 126 networkInfo = mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI); 127 setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(), 154 NetworkInfo networkInfo; [all...] |
/development/tools/emulator/test-apps/ConnectivityTest/src/com/android/emulator/connectivity/test/ |
ConnectivityTest.java | 25 import android.net.NetworkInfo; 50 NetworkInfo networkInfo = connectivity.getActiveNetworkInfo(); 52 assertNotNull(networkInfo); 53 assertEquals( NetworkInfo.State.CONNECTED, networkInfo.getState());
|
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
NetworkInfoTest.java | 3 import android.net.NetworkInfo; 18 NetworkInfo networkInfo = Robolectric.newInstanceOf(NetworkInfo.class); 19 shadowOf(networkInfo).setDetailedState(NetworkInfo.DetailedState.SCANNING); 20 assertThat(networkInfo.getDetailedState(), equalTo(NetworkInfo.DetailedState.SCANNING));
|
ConnectivityManagerTest.java | 5 import android.net.NetworkInfo; 48 NetworkInfo networkInfo = ShadowNetworkInfo.newInstance(NetworkInfo.DetailedState.CONNECTING); 49 shadowConnectivityManager.setNetworkInfo(ConnectivityManager.TYPE_WIFI, networkInfo); 50 NetworkInfo actual = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); 51 assertThat(actual, sameInstance(networkInfo)); 52 assertThat(actual.getDetailedState(), is(NetworkInfo.DetailedState.CONNECTING)); 87 NetworkInfo info = connectivityManager.getActiveNetworkInfo(); 97 NetworkInfo[] infos = connectivityManager.getAllNetworkInfo() [all...] |
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowNetworkInfo.java | 4 import android.net.NetworkInfo; 12 * Shadow of {@code NetworkInfo} which is used by ShadowConnectivityManager. 15 @Implements(NetworkInfo.class) 21 private NetworkInfo.DetailedState detailedState; 23 public static NetworkInfo newInstance() { 27 public static NetworkInfo newInstance(NetworkInfo.DetailedState detailedState) { 31 public static NetworkInfo newInstance(NetworkInfo.DetailedState detailedState, int type, int subType, 34 NetworkInfo networkInfo = Robolectric.newInstanceOf(NetworkInfo.class) [all...] |
ShadowConnectivityManager.java | 4 import android.net.NetworkInfo; 19 private NetworkInfo activeNetwork; 22 private Map<Integer, NetworkInfo> networkTypeToNetworkInfo = new HashMap<Integer, NetworkInfo>(); 29 public NetworkInfo getActiveNetworkInfo() { 34 public NetworkInfo[] getAllNetworkInfo() { 35 return networkTypeToNetworkInfo.values().toArray(new NetworkInfo[networkTypeToNetworkInfo.size()]); 39 public NetworkInfo getNetworkInfo(int networkType) { 48 public void setNetworkInfo(int networkType, NetworkInfo networkInfo) { [all...] |
/development/samples/WiFiDirectServiceDiscovery/src/com/example/android/wifidirect/discovery/ |
WiFiDirectBroadcastReceiver.java | 24 import android.net.NetworkInfo; 68 NetworkInfo networkInfo = (NetworkInfo) intent 71 if (networkInfo.isConnected()) {
|
/packages/apps/Email/src/com/android/email/ |
EmailConnectivityManager.java | 25 import android.net.NetworkInfo; 26 import android.net.NetworkInfo.State; 124 NetworkInfo networkInfo = 125 (NetworkInfo)extras.get(ConnectivityManager.EXTRA_NETWORK_INFO); 126 if (networkInfo == null) return; 127 State state = networkInfo.getState(); 132 onConnectivityRestored(networkInfo.getType()); 134 onConnectivityLost(networkInfo.getType()); 145 NetworkInfo info = mConnectivityManager.getActiveNetworkInfo() [all...] |
/development/samples/WiFiDirectDemo/src/com/example/android/wifidirect/ |
WiFiDirectBroadcastReceiver.java | 22 import android.net.NetworkInfo; 88 NetworkInfo networkInfo = (NetworkInfo) intent 91 if (networkInfo.isConnected()) {
|
/cts/tests/tests/net/src/android/net/http/cts/ |
ApacheHttpClientTest.java | 30 import android.net.NetworkInfo; 31 import android.net.NetworkInfo.State; 192 NetworkInfo networkInfo = intent.getExtras() 194 int networkType = networkInfo.getType(); 195 State networkState = networkInfo.getState(); 196 Log.i(TAG, "Network type: " + networkType + " State: " + networkInfo.getState()); 197 if (networkType == mNetworkType && networkInfo.getState() == mExpectedState) {
|
/packages/apps/Email/src/com/android/email/provider/ |
RefreshStatusMonitor.java | 10 import android.net.NetworkInfo; 88 final NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); 89 return (networkInfo != null) && networkInfo.isConnected();
|
/development/samples/training/network-usage/src/com/example/android/networkusage/ |
NetworkActivity.java | 24 import android.net.NetworkInfo; 132 NetworkInfo activeInfo = connMgr.getActiveNetworkInfo(); 292 NetworkInfo networkInfo = connMgr.getActiveNetworkInfo(); 298 if (WIFI.equals(sPref) && networkInfo != null 299 && networkInfo.getType() == ConnectivityManager.TYPE_WIFI) { 308 } else if (ANY.equals(sPref) && networkInfo != null) {
|
/frameworks/base/samples/training/network-usage/src/com/example/android/networkusage/ |
NetworkActivity.java | 24 import android.net.NetworkInfo; 132 NetworkInfo activeInfo = connMgr.getActiveNetworkInfo(); 292 NetworkInfo networkInfo = connMgr.getActiveNetworkInfo(); 298 if (WIFI.equals(sPref) && networkInfo != null 299 && networkInfo.getType() == ConnectivityManager.TYPE_WIFI) { 308 } else if (ANY.equals(sPref) && networkInfo != null) {
|
/cts/tests/tests/net/src/android/net/cts/ |
ConnectivityManagerTest.java | 27 import android.net.NetworkInfo; 28 import android.net.NetworkInfo.DetailedState; 29 import android.net.NetworkInfo.State; 106 NetworkInfo[] ni = mCm.getAllNetworkInfo(); 108 for (NetworkInfo n: ni) { 146 NetworkInfo ni = mCm.getActiveNetworkInfo(); 156 NetworkInfo ni = mCm.getNetworkInfo(type); 172 NetworkInfo[] ni = mCm.getAllNetworkInfo(); 177 for (NetworkInfo i : ni) { 182 for (NetworkInfo networkInfo : ni) Log.e(TAG, " " + networkInfo) [all...] |
/development/samples/training/bitmapfun/BitmapFun/src/main/java/com/example/android/bitmapfun/util/ |
ImageFetcher.java | 22 import android.net.NetworkInfo; 174 final NetworkInfo networkInfo = cm.getActiveNetworkInfo(); 175 if (networkInfo == null || !networkInfo.isConnectedOrConnecting()) {
|
/frameworks/base/services/java/com/android/server/wifi/ |
WifiNotificationController.java | 28 import android.net.NetworkInfo; 93 private NetworkInfo mNetworkInfo; 116 mNetworkInfo = (NetworkInfo) intent.getParcelableExtra( 141 private synchronized void checkAndSetNotification(NetworkInfo networkInfo, 147 if (networkInfo == null) return; 150 NetworkInfo.State state = networkInfo.getState(); 151 if ((state == NetworkInfo.State.DISCONNECTED) 152 || (state == NetworkInfo.State.UNKNOWN)) [all...] |
/packages/apps/Browser/src/com/android/browser/search/ |
OpenSearchSearchEngine.java | 34 import android.net.NetworkInfo; 199 NetworkInfo networkInfo = getActiveNetworkInfo(context); 200 return networkInfo != null && networkInfo.isConnected(); 203 private NetworkInfo getActiveNetworkInfo(Context context) {
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/google/ |
GoogleSuggestClient.java | 22 import android.net.NetworkInfo; 148 NetworkInfo networkInfo = getActiveNetworkInfo(); 149 return networkInfo != null && networkInfo.isConnected(); 152 private NetworkInfo getActiveNetworkInfo() {
|
/packages/apps/Gallery2/src/com/android/gallery3d/util/ |
ReverseGeocoder.java | 25 import android.net.NetworkInfo; 315 NetworkInfo networkInfo = mConnectivityManager.getActiveNetworkInfo(); 317 if (networkInfo == null || !networkInfo.isConnected()) {
|
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ |
ConnectionUtil.java | 31 import android.net.NetworkInfo; 32 import android.net.NetworkInfo.State; 67 private NetworkInfo mNetworkInfo; 68 private NetworkInfo mOtherNetworkInfo; 75 private NetworkInfo mWifiNetworkInfo; 162 mOtherNetworkInfo = (NetworkInfo) 192 (NetworkInfo) intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO); 458 Log.v(LOG_TAG, "Do not have networkInfo! Force fetch of network info."); 464 Log.v(LOG_TAG, "Failed to force fetch networkInfo. " + 518 NetworkInfo networkInfo = mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) [all...] |
/frameworks/base/services/java/com/android/server/display/ |
WifiDisplayController.java | 31 import android.net.NetworkInfo; 104 private NetworkInfo mNetworkInfo; 816 private void handleConnectionChanged(NetworkInfo networkInfo) { 817 mNetworkInfo = networkInfo; 818 if (mWfdEnabled && networkInfo.isConnected()) { [all...] |
/frameworks/base/wifi/java/android/net/wifi/ |
WifiWatchdogStateMachine.java | 27 import android.net.NetworkInfo; 510 NetworkInfo networkInfo = (NetworkInfo) 513 switch (networkInfo.getDetailedState()) { 547 NetworkInfo networkInfo = 548 (NetworkInfo) intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO); 549 if (DBG) logd("Network state change " + networkInfo.getDetailedState()); 554 switch (networkInfo.getDetailedState()) [all...] |
/packages/apps/Settings/src/com/android/settings/wifi/ |
WifiStatusTest.java | 31 import android.net.NetworkInfo; 95 (NetworkInfo) intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO)); 295 private void handleNetworkStateChanged(NetworkInfo networkInfo) { 298 networkInfo.getDetailedState());
|