/frameworks/support/v4/jellybean/android/support/v4/net/ |
ConnectivityManagerCompatJellyBean.java | 19 import android.net.ConnectivityManager; 25 public static boolean isActiveNetworkMetered(ConnectivityManager cm) {
|
/frameworks/support/v4/honeycomb_mr2/android/support/v4/net/ |
ConnectivityManagerCompatHoneycombMR2.java | 19 import static android.net.ConnectivityManager.TYPE_BLUETOOTH; 20 import static android.net.ConnectivityManager.TYPE_ETHERNET; 21 import static android.net.ConnectivityManager.TYPE_MOBILE; 22 import static android.net.ConnectivityManager.TYPE_MOBILE_DUN; 23 import static android.net.ConnectivityManager.TYPE_MOBILE_HIPRI; 24 import static android.net.ConnectivityManager.TYPE_MOBILE_MMS; 25 import static android.net.ConnectivityManager.TYPE_MOBILE_SUPL; 26 import static android.net.ConnectivityManager.TYPE_WIFI; 27 import static android.net.ConnectivityManager.TYPE_WIMAX; 29 import android.net.ConnectivityManager; [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/ |
ConnectivityManagerCompatUtils.java | 19 import android.net.ConnectivityManager; 24 // ConnectivityManager#isActiveNetworkMetered() has been introduced 27 ConnectivityManager.class, "isActiveNetworkMetered"); 29 public static boolean isActiveNetworkMetered(final ConnectivityManager manager) { 33 manager.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_MOBILE,
|
/frameworks/support/v4/gingerbread/android/support/v4/net/ |
ConnectivityManagerCompatGingerbread.java | 19 import static android.net.ConnectivityManager.TYPE_MOBILE; 20 import static android.net.ConnectivityManager.TYPE_MOBILE_DUN; 21 import static android.net.ConnectivityManager.TYPE_MOBILE_HIPRI; 22 import static android.net.ConnectivityManager.TYPE_MOBILE_MMS; 23 import static android.net.ConnectivityManager.TYPE_MOBILE_SUPL; 24 import static android.net.ConnectivityManager.TYPE_WIFI; 25 import static android.net.ConnectivityManager.TYPE_WIMAX; 27 import android.net.ConnectivityManager; 34 public static boolean isActiveNetworkMetered(ConnectivityManager cm) {
|
/frameworks/support/v4/java/android/support/v4/net/ |
ConnectivityManagerCompat.java | 19 import static android.net.ConnectivityManager.TYPE_MOBILE; 20 import static android.net.ConnectivityManager.TYPE_WIFI; 23 import android.net.ConnectivityManager; 28 * Helper for accessing features in {@link ConnectivityManager} introduced after 34 boolean isActiveNetworkMetered(ConnectivityManager cm); 39 public boolean isActiveNetworkMetered(ConnectivityManager cm) { 61 public boolean isActiveNetworkMetered(ConnectivityManager cm) { 69 public boolean isActiveNetworkMetered(ConnectivityManager cm) { 76 public boolean isActiveNetworkMetered(ConnectivityManager cm) { 102 public static boolean isActiveNetworkMetered(ConnectivityManager cm) [all...] |
/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; 26 * Verify ConnectivityManager related methods without specific network state permissions. 29 private ConnectivityManager mConnectivityManager; 37 mConnectivityManager = (ConnectivityManager) mContext.getSystemService( 43 * Verify that ConnectivityManager#getNetworkPreference() requires permissions. 51 fail("ConnectivityManager.getNetworkPreference didn't throw SecurityException as" 59 * Verify that ConnectivityManager#getActiveNetworkInfo() requires permissions. 67 fail("ConnectivityManager.getActiveNetworkInfo didn't throw SecurityException as" 75 * Verify that ConnectivityManager#getNetworkInfo() requires permissions. 83 fail("ConnectivityManager.getNetworkInfo didn't throw SecurityException as [all...] |
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ |
ConnectivityManagerMobileTest.java | 20 import android.net.ConnectivityManager; 69 if (!cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, 98 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...] |
/cts/tests/tests/net/src/android/net/cts/ |
ConnectivityManagerTest.java | 25 import android.net.ConnectivityManager; 48 public static final int TYPE_MOBILE = ConnectivityManager.TYPE_MOBILE; 49 public static final int TYPE_WIFI = ConnectivityManager.TYPE_WIFI; 55 private ConnectivityManager mCm; 65 mCm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE); 86 assertTrue(ConnectivityManager.isNetworkTypeValid(ConnectivityManager.TYPE_MOBILE)); 87 assertTrue(ConnectivityManager.isNetworkTypeValid(ConnectivityManager.TYPE_WIFI)); 88 assertTrue(ConnectivityManager.isNetworkTypeValid(ConnectivityManager.TYPE_MOBILE_MMS)) [all...] |
NetworkInfoTest.java | 21 import android.net.ConnectivityManager; 29 public static final int TYPE_MOBILE = ConnectivityManager.TYPE_MOBILE; 30 public static final int TYPE_WIFI = ConnectivityManager.TYPE_WIFI; 35 ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
RealSystemFacade.java | 23 import android.net.ConnectivityManager; 42 ConnectivityManager connectivity = 43 (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 58 final ConnectivityManager conn = ConnectivityManager.from(mContext); 64 ConnectivityManager connectivity = 65 (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 72 boolean isMobile = (info != null && info.getType() == ConnectivityManager.TYPE_MOBILE);
|
/packages/apps/Browser/src/com/android/browser/ |
NetworkStateHandler.java | 24 import android.net.ConnectivityManager; 48 ConnectivityManager cm = (ConnectivityManager) mActivity 60 ConnectivityManager.CONNECTIVITY_ACTION); 65 ConnectivityManager.CONNECTIVITY_ACTION)) { 68 ConnectivityManager.EXTRA_NETWORK_INFO); 76 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...] |
/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);
|
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
ConnectivityManagerTest.java | 4 import android.net.ConnectivityManager; 21 private ConnectivityManager connectivityManager; 27 connectivityManager = (ConnectivityManager) Robolectric.application.getSystemService(Context.CONNECTIVITY_SERVICE); 28 shadowConnectivityManager = shadowOf(connectivityManager); 29 shadowOfActiveNetworkInfo = shadowOf(connectivityManager.getActiveNetworkInfo()); 34 assertNotNull(connectivityManager); 35 assertNotNull(connectivityManager.getActiveNetworkInfo()); 42 assertTrue(connectivityManager.getActiveNetworkInfo().isConnectedOrConnecting()) [all...] |
/packages/apps/Mms/src/com/android/mms/transaction/ |
MmsSystemEventReceiver.java | 23 import android.net.ConnectivityManager; 45 private static ConnectivityManager mConnMgr = null; 65 } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { 67 mConnMgr = (ConnectivityManager) context 71 .getNetworkInfo(ConnectivityManager.TYPE_MOBILE_MMS);
|
/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/tests/src/com/android/providers/downloads/ |
FakeSystemFacade.java | 5 import android.net.ConnectivityManager; 13 Integer mActiveNetworkType = ConnectivityManager.TYPE_WIFI; 23 mActiveNetworkType = ConnectivityManager.TYPE_WIFI;
|
/developers/samples/android/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/ |
MainActivity.java | 20 import android.net.ConnectivityManager; 95 ConnectivityManager connMgr = 96 (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); 99 wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI; 100 mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE;
|
/development/cmds/monkey/src/com/android/commands/monkey/ |
MonkeyNetworkMonitor.java | 23 import android.net.ConnectivityManager; 35 private final IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); 46 ConnectivityManager.EXTRA_NETWORK_INFO); 64 case ConnectivityManager.TYPE_MOBILE: 68 case ConnectivityManager.TYPE_WIFI:
|
/frameworks/base/services/java/com/android/server/connectivity/ |
Tethering.java | 29 import android.net.ConnectivityManager; 91 private static final Integer MOBILE_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE); 92 private static final Integer HIPRI_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_HIPRI); 93 private static final Integer DUN_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_DUN); 97 private int mPreferredUpstreamMobileApn = ConnectivityManager.TYPE_NONE; 159 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); 335 return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE; 339 return ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE; 342 return ConnectivityManager.TETHER_ERROR_NO_ERROR; 353 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);
|
/development/samples/training/network-usage/src/com/example/android/networkusage/ |
NetworkActivity.java | 23 import android.net.ConnectivityManager; 88 IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); 129 ConnectivityManager connMgr = 130 (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); 134 wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI; 135 mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE; 280 * This BroadcastReceiver intercepts the android.net.ConnectivityManager.CONNECTIVITY_ACTION, 290 ConnectivityManager connMgr = 291 (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); 299 && networkInfo.getType() == ConnectivityManager.TYPE_WIFI) [all...] |
/frameworks/base/samples/training/network-usage/src/com/example/android/networkusage/ |
NetworkActivity.java | 23 import android.net.ConnectivityManager; 88 IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); 129 ConnectivityManager connMgr = 130 (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); 134 wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI; 135 mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE; 280 * This BroadcastReceiver intercepts the android.net.ConnectivityManager.CONNECTIVITY_ACTION, 290 ConnectivityManager connMgr = 291 (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); 299 && networkInfo.getType() == ConnectivityManager.TYPE_WIFI) [all...] |