/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();
|
/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...] |
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ |
ConnectivityManagerMobileTest.java | 21 import android.net.NetworkInfo; 22 import android.net.NetworkInfo.State; 97 NetworkInfo extraNetInfo = cmActivity.mCM.getActiveNetworkInfo(); 137 NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); 139 networkInfo.getState(), NetworkState.DO_NOTHING, State.CONNECTED); 140 networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI); 141 cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(), 168 NetworkInfo networkInfo; [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; 122 NetworkInfo networkInfo = 123 (NetworkInfo)extras.get(ConnectivityManager.EXTRA_NETWORK_INFO); 124 if (networkInfo == null) return; 125 State state = networkInfo.getState(); 130 onConnectivityRestored(networkInfo.getType()); 132 onConnectivityLost(networkInfo.getType()); 143 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) {
|
/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; 105 NetworkInfo[] ni = mCm.getAllNetworkInfo(); 107 for (NetworkInfo n: ni) { 145 NetworkInfo ni = mCm.getActiveNetworkInfo(); 155 NetworkInfo ni = mCm.getNetworkInfo(type); 171 NetworkInfo[] ni = mCm.getAllNetworkInfo(); 176 for (NetworkInfo i : ni) { 181 for (NetworkInfo networkInfo : ni) Log.e(TAG, " " + networkInfo) [all...] |
/development/samples/training/bitmapfun/src/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 | 39 import android.net.NetworkInfo; 149 NetworkInfo networkInfo = getActiveNetworkInfo(); 150 return networkInfo != null && networkInfo.isConnected(); 153 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; 103 private NetworkInfo mNetworkInfo; 698 private void handleConnectionChanged(NetworkInfo networkInfo) { 699 mNetworkInfo = networkInfo; 700 if (mWfdEnabled && networkInfo.isConnected()) { [all...] |
/frameworks/base/wifi/java/android/net/wifi/ |
WifiWatchdogStateMachine.java | 27 import android.net.NetworkInfo; 511 NetworkInfo networkInfo = (NetworkInfo) 514 switch (networkInfo.getDetailedState()) { 548 NetworkInfo networkInfo = 549 (NetworkInfo) intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO); 550 if (DBG) logd("Network state change " + networkInfo.getDetailedState()); 555 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());
|
/frameworks/base/services/java/com/android/server/ |
ConnectivityService.java | 63 import android.net.NetworkInfo; 64 import android.net.NetworkInfo.DetailedState; 65 import android.net.NetworkInfo.State; 803 * (see {@link #handleDisconnect(NetworkInfo)}). [all...] |