/cts/tests/tests/permission/src/android/permission/cts/ |
ConnectivityManagerPermissionTest.java | 20 import android.net.ConnectivityManager; 25 * Test that protected android.net.ConnectivityManager methods cannot be called without 30 private ConnectivityManager mConnectivityManager = null; 35 mConnectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 42 * Verify that calling {@link ConnectivityManager#getNetworkInfo(int))} 50 mConnectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); 58 * Verify that calling {@link ConnectivityManager#getNetworkPreference()} 74 * Verify that calling {@link ConnectivityManager#requestRouteToHost(int, int)} 82 mConnectivityManager.requestRouteToHost(ConnectivityManager.TYPE_MOBILE, 1); 90 * Verify that calling {@link ConnectivityManager#setNetworkPreference(int) [all...] |
NoNetworkStatePermissionTest.java | 20 import android.net.ConnectivityManager; 25 * Verify ConnectivityManager related methods without specific network state permissions. 28 private ConnectivityManager mConnectivityManager; 36 mConnectivityManager = (ConnectivityManager) mContext.getSystemService( 42 * Verify that ConnectivityManager#getNetworkPreference() requires permissions. 50 fail("ConnectivityManager.getNetworkPreference didn't throw SecurityException as" 58 * Verify that ConnectivityManager#getActiveNetworkInfo() requires permissions. 66 fail("ConnectivityManager.getActiveNetworkInfo didn't throw SecurityException as" 74 * Verify that ConnectivityManager#getNetworkInfo() requires permissions. 82 fail("ConnectivityManager.getNetworkInfo didn't throw SecurityException as [all...] |
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ |
ConnectivityManagerMobileTest.java | 30 import android.net.ConnectivityManager; 73 if (!cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, 102 assertEquals("network type is not MOBILE", ConnectivityManager.TYPE_MOBILE, 128 assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, 130 assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, 137 NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); 138 cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE, 140 networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI); 141 cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(), 148 if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) [all...] |
/packages/apps/Browser/src/com/android/browser/ |
NetworkStateHandler.java | 24 import android.net.ConnectivityManager; 45 ConnectivityManager cm = (ConnectivityManager) mActivity 57 ConnectivityManager.CONNECTIVITY_ACTION); 62 ConnectivityManager.CONNECTIVITY_ACTION)) { 65 ConnectivityManager.EXTRA_NETWORK_INFO); 72 ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);
|
PreloadRequestReceiver.java | 21 import android.net.ConnectivityManager; 45 private ConnectivityManager mConnectivityManager; 72 mConnectivityManager = (ConnectivityManager) 80 case ConnectivityManager.TYPE_MOBILE: 81 case ConnectivityManager.TYPE_MOBILE_DUN: 82 case ConnectivityManager.TYPE_MOBILE_MMS: 83 case ConnectivityManager.TYPE_MOBILE_SUPL: 84 case ConnectivityManager.TYPE_MOBILE_HIPRI: 85 case ConnectivityManager.TYPE_WIMAX: // separate case for this? 87 case ConnectivityManager.TYPE_WIFI [all...] |
/cts/tests/tests/net/src/android/net/cts/ |
NetworkInfoTest.java | 22 import android.net.ConnectivityManager; 31 public static final int TYPE_MOBILE = ConnectivityManager.TYPE_MOBILE; 32 public static final int TYPE_WIFI = ConnectivityManager.TYPE_WIFI; 37 ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(
|
ConnectivityManagerTest.java | 30 import android.net.ConnectivityManager; 43 @TestTargetClass(ConnectivityManager.class) 50 public static final int TYPE_MOBILE = ConnectivityManager.TYPE_MOBILE; 51 public static final int TYPE_WIFI = ConnectivityManager.TYPE_WIFI; 57 private ConnectivityManager mCm; 64 mCm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE); 115 assertTrue(ConnectivityManager.isNetworkTypeValid(n.getType())); 117 assertFalse(ConnectivityManager.isNetworkTypeValid(-1)); 176 exceptionFreeTypes.add(ConnectivityManager.TYPE_BLUETOOTH); 177 exceptionFreeTypes.add(ConnectivityManager.TYPE_ETHERNET) [all...] |
/development/tools/emulator/test-apps/ConnectivityTest/src/com/android/emulator/connectivity/test/ |
ConnectivityTest.java | 24 import android.net.ConnectivityManager; 34 private ConnectivityManager connectivity; 41 connectivity = (ConnectivityManager) getContext().
|
/frameworks/ex/common/java/com/android/common/ |
NetworkConnectivityListener.java | 23 import android.net.ConnectivityManager; 36 * (or poll ConnectivityManager) directly. 67 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION) || 74 intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); 83 intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); 85 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); 87 mReason = intent.getStringExtra(ConnectivityManager.EXTRA_REASON); 89 intent.getBooleanExtra(ConnectivityManager.EXTRA_IS_FAILOVER, false); 141 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
|
/packages/apps/Email/src/com/android/email/ |
EmailConnectivityManager.java | 24 import android.net.ConnectivityManager; 33 * Encapsulates functionality of ConnectivityManager for use in the Email application. In 60 private final android.net.ConnectivityManager mConnectivityManager; 73 (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); 76 mContext.registerReceiver(this, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); 94 * @param networkType as defined by ConnectivityManager 102 * @param networkType as defined by ConnectivityManager 119 if (intent.getAction().equals(ConnectivityManager.CONNECTIVITY_ACTION)) { 123 (NetworkInfo)extras.get(ConnectivityManager.EXTRA_NETWORK_INFO); 156 ConnectivityManager cm [all...] |
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
RealSystemFacade.java | 9 import android.net.ConnectivityManager; 31 ConnectivityManager connectivity = 32 (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 46 ConnectivityManager connectivity = 47 (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 54 boolean isMobile = (info != null && info.getType() == ConnectivityManager.TYPE_MOBILE);
|
/development/cmds/monkey/src/com/android/commands/monkey/ |
MonkeyNetworkMonitor.java | 23 import android.net.ConnectivityManager; 34 private final IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); 45 ConnectivityManager.EXTRA_NETWORK_INFO); 63 case ConnectivityManager.TYPE_MOBILE: 67 case ConnectivityManager.TYPE_WIFI:
|
/frameworks/base/services/java/com/android/server/connectivity/ |
Tethering.java | 29 import android.net.ConnectivityManager; 87 private static final Integer MOBILE_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE); 88 private static final Integer HIPRI_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_HIPRI); 89 private static final Integer DUN_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_DUN); 93 private int mPreferredUpstreamMobileApn = ConnectivityManager.TYPE_NONE; 155 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); 328 return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE; 332 return ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE; 335 return ConnectivityManager.TETHER_ERROR_NO_ERROR; 346 return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE [all...] |
/cts/tests/tests/net/src/android/net/http/cts/ |
ApacheHttpClientTest.java | 29 import android.net.ConnectivityManager; 57 private ConnectivityManager mConnectivityManager; 68 mConnectivityManager = (ConnectivityManager) 143 new ConnectivityActionReceiver(ConnectivityManager.TYPE_WIFI, State.CONNECTED); 145 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); 159 new ConnectivityActionReceiver(ConnectivityManager.TYPE_MOBILE, 162 new ConnectivityActionReceiver(ConnectivityManager.TYPE_WIFI, 164 IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); 193 .getParcelable(ConnectivityManager.EXTRA_NETWORK_INFO);
|
/packages/apps/Settings/src/com/android/settings/ |
TetherSettings.java | 35 import android.net.ConnectivityManager; 135 ConnectivityManager cm = 136 (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); 263 if (action.equals(ConnectivityManager.ACTION_TETHER_STATE_CHANGED)) { 266 ConnectivityManager.EXTRA_AVAILABLE_TETHER); 268 ConnectivityManager.EXTRA_ACTIVE_TETHER); 270 ConnectivityManager.EXTRA_ERRORED_TETHER); 314 IntentFilter filter = new IntentFilter(ConnectivityManager.ACTION_TETHER_STATE_CHANGED); 352 ConnectivityManager cm = 353 (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE) [all...] |
Utils.java | 29 import android.net.ConnectivityManager; 295 ConnectivityManager cm = (ConnectivityManager)context.getSystemService( 297 return (cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE) == false); 306 ConnectivityManager cm = (ConnectivityManager) 308 LinkProperties prop = cm.getLinkProperties(ConnectivityManager.TYPE_WIFI); 319 ConnectivityManager cm = (ConnectivityManager) 419 public static int getTetheringLabel(ConnectivityManager cm) [all...] |
/frameworks/base/cmds/svc/src/com/android/commands/svc/ |
DataCommand.java | 22 import android.net.ConnectivityManager; 58 connMgr.setNetworkPreference(ConnectivityManager.TYPE_MOBILE);
|
WifiCommand.java | 23 import android.net.ConnectivityManager; 58 connMgr.setNetworkPreference(ConnectivityManager.TYPE_WIFI);
|
/packages/apps/Settings/src/com/android/settings/wifi/ |
WifiApEnabler.java | 30 import android.net.ConnectivityManager; 50 ConnectivityManager mCm; 60 } else if (ConnectivityManager.ACTION_TETHER_STATE_CHANGED.equals(action)) { 62 ConnectivityManager.EXTRA_AVAILABLE_TETHER); 64 ConnectivityManager.EXTRA_ACTIVE_TETHER); 66 ConnectivityManager.EXTRA_ERRORED_TETHER); 82 mCm = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 87 mIntentFilter.addAction(ConnectivityManager.ACTION_TETHER_STATE_CHANGED);
|
/packages/apps/Mms/src/com/android/mms/transaction/ |
Transaction.java | 25 import android.net.ConnectivityManager; 212 ConnectivityManager connMgr = 213 (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 223 ConnectivityManager.TYPE_MOBILE_MMS, inetAddr)) { 234 ConnectivityManager.TYPE_MOBILE_MMS, inetAddr)) {
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ |
ConnectivityManagerTestActivity.java | 24 import android.net.ConnectivityManager; 83 public ConnectivityManager mCM; 101 public static final int NUM_NETWORK_TYPES = ConnectivityManager.MAX_NETWORK_TYPE + 1; 117 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { 123 intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); 132 intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); 135 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); 137 mReason = intent.getStringExtra(ConnectivityManager.EXTRA_REASON); 138 mIsFailOver = intent.getBooleanExtra(ConnectivityManager.EXTRA_IS_FAILOVER, false); 174 } else if (action.equals(ConnectivityManager.ACTION_TETHER_STATE_CHANGED)) [all...] |
/frameworks/base/core/java/android/net/ |
NetworkIdentity.java | 19 import static android.net.ConnectivityManager.isNetworkTypeMobile; 64 final String typeName = ConnectivityManager.getNetworkTypeName(mType); 66 if (ConnectivityManager.isNetworkTypeMobile(mType)) {
|
/frameworks/base/services/java/com/android/server/ |
ConnectivityService.java | 20 import static android.net.ConnectivityManager.CONNECTIVITY_ACTION; 21 import static android.net.ConnectivityManager.CONNECTIVITY_ACTION_IMMEDIATE; 22 import static android.net.ConnectivityManager.isNetworkTypeValid; 34 import android.net.ConnectivityManager; 376 ConnectivityManager.MAX_NETWORK_TYPE+1]; 377 mCurrentLinkProperties = new LinkProperties[ConnectivityManager.MAX_NETWORK_TYPE+1]; 381 mRadioAttributes = new RadioAttributes[ConnectivityManager.MAX_RADIO_TYPE+1]; 382 mNetConfigs = new NetworkConfig[ConnectivityManager.MAX_NETWORK_TYPE+1]; 389 if (r.mType > ConnectivityManager.MAX_RADIO_TYPE) { 406 if (n.type > ConnectivityManager.MAX_NETWORK_TYPE) [all...] |
NetworkTimeUpdateService.java | 27 import android.net.ConnectivityManager; 137 intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); 229 /** Receiver for ConnectivityManager events */ 235 if (ConnectivityManager.CONNECTIVITY_ACTION.equals(action)) { 238 ConnectivityManager.EXTRA_NETWORK_INFO); 242 netInfo.getType() == ConnectivityManager.TYPE_WIFI ) {
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/ |
WifiStressTest.java | 24 import android.net.ConnectivityManager; 250 assertTrue(mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, 272 mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED, 277 mAct.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, 283 mAct.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState()); 287 mAct.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState()); 299 mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
|