/external/robolectric/v1/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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
TestUtil.java | 23 import android.net.NetworkInfo; 36 Context context, NetworkInfo.DetailedState detailedState) { 38 NetworkInfo networkInfo = new NetworkInfo(0, 0, "", ""); 39 networkInfo.setDetailedState(detailedState, "", ""); 40 intent.putExtra(WifiManager.EXTRA_NETWORK_INFO, networkInfo);
|
/frameworks/base/core/java/android/net/ |
NetworkState.java | 30 public final NetworkInfo networkInfo; 37 public NetworkState(NetworkInfo networkInfo, LinkProperties linkProperties, 40 this.networkInfo = networkInfo; 49 networkInfo = in.readParcelable(null); 64 out.writeParcelable(networkInfo, flags);
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/analytics/ |
NetworkTypeLogger.java | 23 import android.net.NetworkInfo; 57 final NetworkInfo networkInfo = mUtils.getActiveNetworkInfo(mContext); 59 final int networkType = networkInfo.getType();
|
/packages/apps/StorageManager/src/com/android/storagemanager/automatic/ |
JobPreconditions.java | 6 import android.net.NetworkInfo; 31 NetworkInfo networkInfo = connectivityManager.getNetworkInfo(network); 32 if (networkInfo.getType() == ConnectivityManager.TYPE_WIFI 33 && networkInfo.isConnected()) {
|
/frameworks/base/packages/Osu2/tests/src/com/android/osu/ |
NetworkConnectionTest.java | 31 import android.net.NetworkInfo; 117 NetworkInfo networkInfo = new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0, "WIFI", ""); 118 networkInfo.setDetailedState(NetworkInfo.DetailedState.CONNECTED, "", ""); 119 intent.putExtra(WifiManager.EXTRA_NETWORK_INFO, networkInfo);
|
/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()) {
|
/development/tools/emulator/test-apps/SmokeTests/src/com/android/emulator/smoketests/connectivity/ |
ConnectivityTest.java | 25 import android.net.NetworkInfo; 50 NetworkInfo networkInfo = connectivity.getActiveNetworkInfo(); 52 assertNotNull(networkInfo); 53 assertEquals( NetworkInfo.State.CONNECTED, networkInfo.getState());
|
/external/glide/library/src/main/java/com/bumptech/glide/manager/ |
DefaultConnectivityMonitor.java | 8 import android.net.NetworkInfo; 55 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); 56 return networkInfo != null && networkInfo.isConnected();
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/ |
WifiStatusTracker.java | 14 import android.net.NetworkInfo; 47 final NetworkInfo networkInfo = (NetworkInfo) 49 connecting = networkInfo != null && !networkInfo.isConnected() 50 && networkInfo.isConnectedOrConnecting(); 51 connected = networkInfo != null && networkInfo.isConnected();
|
/cts/tests/tests/media/src/android/media/cts/ |
ConnectionStatus.java | 21 import android.net.NetworkInfo; 47 NetworkInfo networkInfo = mConnectivityManager.getActiveNetworkInfo(); 48 if (networkInfo != null) { 49 return networkInfo.getReason(); 56 NetworkInfo networkInfo = mConnectivityManager.getActiveNetworkInfo(); 57 return (networkInfo != null) && networkInfo.isAvailable(); 61 NetworkInfo networkInfo = mConnectivityManager.getActiveNetworkInfo() [all...] |
/developers/build/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/ |
MainActivity.java | 21 import android.net.NetworkInfo; 98 public NetworkInfo getActiveNetworkInfo() { 101 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); 102 return networkInfo;
|
/developers/samples/android/connectivity/network/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/ |
MainActivity.java | 21 import android.net.NetworkInfo; 98 public NetworkInfo getActiveNetworkInfo() { 101 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); 102 return networkInfo;
|
/developers/samples/android/connectivity/wifidirect/DirectP2P/Application/src/main/java/com/example/android/wifidirectp2p/ |
WiFiDirectBroadcastReceiver.java | 22 import android.net.NetworkInfo; 88 NetworkInfo networkInfo = (NetworkInfo) intent 91 if (networkInfo.isConnected()) {
|
/development/samples/WiFiDirectDemo/src/com/example/android/wifidirect/ |
WiFiDirectBroadcastReceiver.java | 22 import android.net.NetworkInfo; 88 NetworkInfo networkInfo = (NetworkInfo) intent 91 if (networkInfo.isConnected()) {
|
/development/samples/browseable/NetworkConnect/src/com.example.android.networkconnect/ |
MainActivity.java | 21 import android.net.NetworkInfo; 98 public NetworkInfo getActiveNetworkInfo() { 101 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); 102 return networkInfo;
|
/external/autotest/frontend/client/src/autotest/moblab/wizard/ |
NetworkInfoCard.java | 11 import autotest.moblab.rpc.NetworkInfo; 18 private NetworkInfo networkInfo; 39 return networkInfo != null && networkInfo.isConnectedToGoogle(); 44 if (networkInfo != null) { 48 if (networkInfo.getServerIps().length > 0) { 49 layoutTable.setWidget(row, 1, new Label(networkInfo.getServerIps()[0])); 56 new Label(networkInfo.isConnectedToGoogle() ? "Yes" : "No")); 69 public void onNetworkInfoFetched(NetworkInfo info) [all...] |
/external/robolectric/v1/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...] |
/packages/services/BuiltInPrintService/src/com/android/bips/util/ |
WifiMonitor.java | 26 import android.net.NetworkInfo; 76 NetworkInfo networkInfo = cm.getNetworkInfo(network); 77 if (networkInfo != null && networkInfo.isConnected() && 78 networkInfo.getType() == ConnectivityManager.TYPE_WIFI) {
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/ |
PasspointNetworkEvaluator.java | 139 * @param networkInfo Contained information for the Passpoint network to connect to 142 private WifiConfiguration createWifiConfigForProvider(PasspointNetworkCandidate networkInfo) { 143 WifiConfiguration config = networkInfo.mProvider.getWifiConfig(); 144 config.SSID = ScanResultUtil.createQuotedSSID(networkInfo.mScanDetail.getSSID()); 145 if (networkInfo.mMatchStatus == PasspointMatch.HomeProvider) { 158 networkInfo.mScanDetail.getScanResult(), 0); 160 result.getNetworkId(), networkInfo.mScanDetail);
|
/packages/apps/Email/provider_src/com/android/email/ |
EmailConnectivityManager.java | 25 import android.net.NetworkInfo; 26 import android.net.NetworkInfo.State; 123 NetworkInfo networkInfo = 124 (NetworkInfo)extras.get(ConnectivityManager.EXTRA_NETWORK_INFO); 125 if (networkInfo == null) return; 126 State state = networkInfo.getState(); 131 onConnectivityRestored(networkInfo.getType()); 133 onConnectivityLost(networkInfo.getType()); 144 NetworkInfo info = mConnectivityManager.getActiveNetworkInfo() [all...] |
/packages/apps/Email/provider_src/com/android/email/provider/ |
RefreshStatusMonitor.java | 10 import android.net.NetworkInfo; 88 final NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); 89 return (networkInfo != null) && networkInfo.isConnected();
|
/packages/apps/Settings/tests/unit/src/com/android/settings/wifi/ |
WifiSettingsUiTest.java | 42 import android.net.NetworkInfo; 135 NetworkInfo networkInfo = new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0, null, null); 136 networkInfo.setDetailedState(NetworkInfo.DetailedState.CONNECTED, null, null); 138 accessPoint.update(config, wifiInfo, networkInfo);
|
/cts/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/ |
MyBroadcastReceiver.java | 44 import android.net.NetworkInfo; 139 * <li>{@code NetinfoState}: enum value of {@link NetworkInfo.State}. 140 * <li>{@code NetinfoDetailedState}: enum value of {@link NetworkInfo.DetailedState}. 145 * <li>{@code Netinfo}: string representation of the {@link NetworkInfo}. 160 final NetworkInfo networkInfo = cm.getActiveNetworkInfo(); 163 + "\n\tactiveNetworkInfo: " + networkInfo + "\n\tURL: " + address); 183 if (networkInfo != null) { 184 state = networkInfo.getState().name(); 185 detailedState = networkInfo.getDetailedState().name() [all...] |