Home
last modified time | relevance | path

Searched refs:ConnectivityManager (Results 1 – 25 of 58) sorted by relevance

123

/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/
DConnectivityManagerMobileTest.java30 import android.net.ConnectivityManager;
73 if (!cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, in setUp()
102 assertEquals("network type is not MOBILE", ConnectivityManager.TYPE_MOBILE, in verifyCellularConnection()
121 assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, in test3GToWifiNotification()
123 assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, in test3GToWifiNotification()
133 NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); in test3GToWifiNotification()
134 cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE, in test3GToWifiNotification()
136 networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI); in test3GToWifiNotification()
137 cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(), in test3GToWifiNotification()
148 if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) { in test3GToWifiNotification()
[all …]
DWifiConnectionTest.java33 import android.net.ConnectivityManager;
138 assertTrue(mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, in connectToWifi()
/frameworks/base/services/java/com/android/server/connectivity/
DTethering.java29 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); in Tethering()
309 return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE; in tether()
313 return ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE; in tether()
316 return ConnectivityManager.TETHER_ERROR_NO_ERROR; in tether()
327 return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE; in untether()
[all …]
/frameworks/ex/common/java/com/android/common/
DNetworkConnectivityListener.java23 import android.net.ConnectivityManager;
67 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION) || in onReceive()
74 intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); in onReceive()
83 intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); in onReceive()
85 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); in onReceive()
87 mReason = intent.getStringExtra(ConnectivityManager.EXTRA_REASON); in onReceive()
89 intent.getBooleanExtra(ConnectivityManager.EXTRA_IS_FAILOVER, false); in onReceive()
141 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in startListening()
/frameworks/base/services/java/com/android/server/
DConnectivityService.java20 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]; in ConnectivityService()
364 mCurrentLinkProperties = new LinkProperties[ConnectivityManager.MAX_NETWORK_TYPE+1]; in ConnectivityService()
368 mRadioAttributes = new RadioAttributes[ConnectivityManager.MAX_RADIO_TYPE+1]; in ConnectivityService()
369 mNetConfigs = new NetworkConfig[ConnectivityManager.MAX_NETWORK_TYPE+1]; in ConnectivityService()
376 if (r.mType > ConnectivityManager.MAX_RADIO_TYPE) { in ConnectivityService()
393 if (n.type > ConnectivityManager.MAX_NETWORK_TYPE) { in ConnectivityService()
[all …]
DNetworkTimeUpdateService.java27 import android.net.ConnectivityManager;
137 intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in registerForConnectivityIntents()
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/
DConnectivityManagerTestActivity.java24 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)) { in onReceive()
121 intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); in onReceive()
130 intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); in onReceive()
133 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); in onReceive()
135 mReason = intent.getStringExtra(ConnectivityManager.EXTRA_REASON); in onReceive()
136 mIsFailOver = intent.getBooleanExtra(ConnectivityManager.EXTRA_IS_FAILOVER, false); in onReceive()
172 } else if (action.equals(ConnectivityManager.ACTION_TETHER_STATE_CHANGED)) { in onReceive()
[all …]
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/
DConnectionUtil.java30 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)); in initialize()
109 mCM = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in initialize()
143 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive()
147 if (intent.hasExtra(ConnectivityManager.EXTRA_NETWORK_INFO)) { in onReceive()
149 intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); in onReceive()
152 if (intent.hasExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO)) { in onReceive()
154 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); in onReceive()
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/
DWifiStressTest.java24 import android.net.ConnectivityManager;
245 assertTrue(mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, in testWifiReconnectionAfterSleep()
266 mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED, in testWifiReconnectionAfterSleep()
271 mAct.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, in testWifiReconnectionAfterSleep()
277 mAct.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState()); in testWifiReconnectionAfterSleep()
281 mAct.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState()); in testWifiReconnectionAfterSleep()
291 mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, in testWifiReconnectionAfterSleep()
/frameworks/base/core/java/android/net/
DNetworkIdentity.java19 import static android.net.ConnectivityManager.isNetworkTypeMobile;
64 final String typeName = ConnectivityManager.getNetworkTypeName(mType); in toString()
66 if (ConnectivityManager.isNetworkTypeMobile(mType)) { in toString()
DMobileDataStateTracker.java554 case ConnectivityManager.TYPE_MOBILE: in networkTypeToApnType()
556 case ConnectivityManager.TYPE_MOBILE_MMS: in networkTypeToApnType()
558 case ConnectivityManager.TYPE_MOBILE_SUPL: in networkTypeToApnType()
560 case ConnectivityManager.TYPE_MOBILE_DUN: in networkTypeToApnType()
562 case ConnectivityManager.TYPE_MOBILE_HIPRI: in networkTypeToApnType()
564 case ConnectivityManager.TYPE_MOBILE_FOTA: in networkTypeToApnType()
566 case ConnectivityManager.TYPE_MOBILE_IMS: in networkTypeToApnType()
568 case ConnectivityManager.TYPE_MOBILE_CBS: in networkTypeToApnType()
DNetworkTemplate.java19 import static android.net.ConnectivityManager.TYPE_ETHERNET;
20 import static android.net.ConnectivityManager.TYPE_WIFI;
21 import static android.net.ConnectivityManager.TYPE_WIMAX;
DDnsPinger.java66 private ConnectivityManager mConnectivityManager = null;
126 if (!ConnectivityManager.isNetworkTypeValid(connectionType)) { in DnsPinger()
290 mConnectivityManager = (ConnectivityManager) mContext.getSystemService( in getCurrentLinkProperties()
DConnectivityManager.java46 public class ConnectivityManager { class
593 public ConnectivityManager(IConnectivityManager service) { in ConnectivityManager() method in ConnectivityManager
/frameworks/base/core/java/android/webkit/
DNetwork.java23 import android.net.ConnectivityManager;
169 if (!ConnectivityManager.CONNECTIVITY_ACTION.equals(intent.getAction())) in onReceive()
172 … NetworkInfo info = (NetworkInfo)intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); in onReceive()
181 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in monitorRoaming()
/frameworks/base/cmds/svc/src/com/android/commands/svc/
DDataCommand.java22 import android.net.ConnectivityManager;
58 connMgr.setNetworkPreference(ConnectivityManager.TYPE_MOBILE); in run()
DWifiCommand.java23 import android.net.ConnectivityManager;
58 connMgr.setNetworkPreference(ConnectivityManager.TYPE_WIFI); in run()
/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/
DDownloadManagerBaseTest.java27 import android.net.ConnectivityManager;
215 if (intent.getAction().equalsIgnoreCase(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive()
229 ConnectivityManager connManager = (ConnectivityManager)mContext.getSystemService( in getWiFiIsOn()
231 NetworkInfo info = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); in getWiFiIsOn()
430 ConnectivityManager.CONNECTIVITY_ACTION)); in setWiFiStateOn()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DNetworkController.java29 import android.net.ConnectivityManager;
155 ConnectivityManager cm = (ConnectivityManager)mContext.getSystemService( in NetworkController()
157 mHasMobileDataFeature = cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE); in NetworkController()
193 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in NetworkController()
194 filter.addAction(ConnectivityManager.INET_CONDITION_ACTION); in NetworkController()
273 } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION) || in onReceive()
274 action.equals(ConnectivityManager.INET_CONDITION_ACTION)) { in onReceive()
725 ConnectivityManager.EXTRA_NETWORK_INFO)); in updateConnectivity()
726 int connectionStatus = intent.getIntExtra(ConnectivityManager.EXTRA_INET_CONDITION, 0); in updateConnectivity()
735 if (info != null && info.getType() == ConnectivityManager.TYPE_BLUETOOTH) { in updateConnectivity()
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/
DTrackerService.java31 import android.net.ConnectivityManager;
155 mIntentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in initLocationListeners()
396 } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive()
400 ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); in onReceive()
/frameworks/base/core/tests/coretests/src/android/app/
DDownloadManagerBaseTest.java30 import android.net.ConnectivityManager;
210 if (intent.getAction().equalsIgnoreCase(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive()
224 ConnectivityManager connManager = (ConnectivityManager)mContext.getSystemService( in getWiFiIsOn()
226 NetworkInfo info = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); in getWiFiIsOn()
525 ConnectivityManager.CONNECTIVITY_ACTION)); in setWiFiStateOn()
/frameworks/base/core/java/android/server/
DBluetoothPanProfileHandler.java29 import android.net.ConnectivityManager;
350 ConnectivityManager cm = in enableTethering()
351 (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in enableTethering()
391 if (cm.tether(iface) != ConnectivityManager.TETHER_ERROR_NO_ERROR) { in enableTethering()
/frameworks/base/core/java/android/net/http/
DRequestQueue.java28 import android.net.ConnectivityManager;
59 private final ConnectivityManager mConnectivityManager;
220 mConnectivityManager = (ConnectivityManager) in RequestQueue()
264 if (info != null && info.getType() == ConnectivityManager.TYPE_WIFI) { in setProxyConfig()
/frameworks/base/core/java/android/bluetooth/
DBluetoothTetheringDataTracker.java20 import android.net.ConnectivityManager;
66 mNetworkInfo = new NetworkInfo(ConnectivityManager.TYPE_BLUETOOTH, 0, NETWORKTYPE, ""); in BluetoothTetheringDataTracker()
/frameworks/base/voip/java/com/android/server/sip/
DSipService.java25 import android.net.ConnectivityManager;
1112 bundle.get(ConnectivityManager.EXTRA_NETWORK_INFO); in onReceive()
1126 new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); in registerReceivers()
1148 ConnectivityManager cm = (ConnectivityManager) in onConnectivityChanged()
1156 (!mSipOnWifiOnly || info.getType() == ConnectivityManager.TYPE_WIFI)); in onConnectivityChanged()
1189 if (info.getType() == ConnectivityManager.TYPE_WIFI) { in onConnectivityChanged()

123