/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, 121 assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, 123 assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, 133 NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); 134 cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE, 136 networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI); 137 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; 84 private static final Integer MOBILE_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE); 85 private static final Integer HIPRI_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_HIPRI); 86 private static final Integer DUN_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_DUN); 90 private int mPreferredUpstreamMobileApn = ConnectivityManager.TYPE_NONE; 148 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); 309 return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE; 313 return ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE; 316 return ConnectivityManager.TETHER_ERROR_NO_ERROR; 327 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);
|
/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)) {
|
/packages/apps/Settings/src/com/android/settings/ |
TetherSettings.java | 35 import android.net.ConnectivityManager; 124 ConnectivityManager cm = 125 (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); 249 if (action.equals(ConnectivityManager.ACTION_TETHER_STATE_CHANGED)) { 252 ConnectivityManager.EXTRA_AVAILABLE_TETHER); 254 ConnectivityManager.EXTRA_ACTIVE_TETHER); 256 ConnectivityManager.EXTRA_ERRORED_TETHER); 300 IntentFilter filter = new IntentFilter(ConnectivityManager.ACTION_TETHER_STATE_CHANGED); 338 ConnectivityManager cm = 339 (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE) [all...] |
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ |
ConnectivityManagerTestActivity.java | 24 import android.net.ConnectivityManager; 81 public ConnectivityManager mCM; 99 public static final int NUM_NETWORK_TYPES = ConnectivityManager.MAX_NETWORK_TYPE + 1; 115 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { 121 intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); 130 intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); 133 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); 135 mReason = intent.getStringExtra(ConnectivityManager.EXTRA_REASON); 136 mIsFailOver = intent.getBooleanExtra(ConnectivityManager.EXTRA_IS_FAILOVER, false); 172 } 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/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ |
ConnectionUtil.java | 30 import android.net.ConnectivityManager; 66 private ConnectivityManager mCM; 75 private static final int NUM_NETWORK_TYPES = ConnectivityManager.MAX_NETWORK_TYPE + 1; 91 new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); 108 // Get an instance of ConnectivityManager 109 mCM = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 143 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { 147 if (intent.hasExtra(ConnectivityManager.EXTRA_NETWORK_INFO)) { 149 intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); 152 if (intent.hasExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO)) [all...] |
/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; 32 import android.net.ConnectivityManager; 363 ConnectivityManager.MAX_NETWORK_TYPE+1]; 364 mCurrentLinkProperties = new LinkProperties[ConnectivityManager.MAX_NETWORK_TYPE+1]; 368 mRadioAttributes = new RadioAttributes[ConnectivityManager.MAX_RADIO_TYPE+1]; 369 mNetConfigs = new NetworkConfig[ConnectivityManager.MAX_NETWORK_TYPE+1]; 376 if (r.mType > ConnectivityManager.MAX_RADIO_TYPE) { 393 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; 245 assertTrue(mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, 266 mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED, 271 mAct.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, 277 mAct.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState()); 281 mAct.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState()); 291 mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
|