Home
last modified time | relevance | path

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

123456

/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/
DConnectivityManagerMobileTest.java19 import android.net.ConnectivityManager;
57 if (!waitForNetworkState(ConnectivityManager.TYPE_MOBILE, in setUp()
89 ConnectivityManager.TYPE_MOBILE, State.CONNECTED, LONG_TIMEOUT)); in test3GToWifiNotification()
93 assertEquals("active network is not mobile", ConnectivityManager.TYPE_MOBILE, ni.getType()); in test3GToWifiNotification()
124 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifi()
148 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifWithKnownAP()
160 ConnectivityManager.TYPE_MOBILE, State.CONNECTED, LONG_TIMEOUT)); in testConnectToWifWithKnownAP()
172 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifWithKnownAP()
196 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testDisconnectWifi()
206 assertTrue("mobile not enabled", waitForNetworkState(ConnectivityManager.TYPE_MOBILE, in testDisconnectWifi()
[all …]
/frameworks/ex/common/java/com/android/common/
DNetworkConnectivityListener.java23 import android.net.ConnectivityManager;
68 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION) || in onReceive()
75 intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); in onReceive()
84 intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); in onReceive()
86 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); in onReceive()
88 mReason = intent.getStringExtra(ConnectivityManager.EXTRA_REASON); in onReceive()
90 intent.getBooleanExtra(ConnectivityManager.EXTRA_IS_FAILOVER, false); in onReceive()
142 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in startListening()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/
DSimStatusImeiInfoPreferenceControllerTest.java23 import android.net.ConnectivityManager;
60 extract(RuntimeEnvironment.application.getSystemService(ConnectivityManager.class)); in testIsAvailable_isAdminAndHasMobile_shouldReturnTrue()
61 connectivityManager.setNetworkSupported(ConnectivityManager.TYPE_MOBILE, true); in testIsAvailable_isAdminAndHasMobile_shouldReturnTrue()
72 extract(RuntimeEnvironment.application.getSystemService(ConnectivityManager.class)); in testIsAvailable_isAdminButNoMobile_shouldReturnFalse()
73 connectivityManager.setNetworkSupported(ConnectivityManager.TYPE_MOBILE, false); in testIsAvailable_isAdminButNoMobile_shouldReturnFalse()
102 @Implements(ConnectivityManager.class)
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/deviceinfo/
DAbstractIpAddressPreferenceController.java20 import android.net.ConnectivityManager;
44 ConnectivityManager.CONNECTIVITY_ACTION,
50 private final ConnectivityManager mCM;
54 mCM = context.getSystemService(ConnectivityManager.class); in AbstractIpAddressPreferenceController()
95 private static String getDefaultIpAddresses(ConnectivityManager cm) { in getDefaultIpAddresses()
/frameworks/base/samples/training/network-usage/src/com/example/android/networkusage/
DNetworkActivity.java23 import android.net.ConnectivityManager;
88 IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); in onCreate()
129 ConnectivityManager connMgr = in updateConnectedFlags()
130 (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); in updateConnectedFlags()
134 wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI; in updateConnectedFlags()
135 mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE; in updateConnectedFlags()
290 ConnectivityManager connMgr = in onReceive()
291 (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); in onReceive()
299 && networkInfo.getType() == ConnectivityManager.TYPE_WIFI) { in onReceive()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DTetherUtil.java21 import android.net.ConnectivityManager;
26 final ConnectivityManager cm = context.getSystemService(ConnectivityManager.class); in isTetherAvailable()
/frameworks/opt/net/wifi/libs/WifiTrackerLib/tests/src/com/android/wifitrackerlib/
DPasspointWifiEntryTest.java34 import android.net.ConnectivityManager;
70 @Mock private ConnectivityManager mMockConnectivityManager;
163 ConnectivityManager mockConnectivityManager = mock(ConnectivityManager.class); in testGetSummary_connectedWifiNetwork_showsConnected()
172 new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0 /* subtype */, "WIFI", ""); in testGetSummary_connectedWifiNetwork_showsConnected()
203 ConnectivityManager mockConnectivityManager = mock(ConnectivityManager.class); in testGetSummary_providerModelConnectedButNotDefault_doesNotShowConnected()
212 new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0 /* subtype */, "WIFI", ""); in testGetSummary_providerModelConnectedButNotDefault_doesNotShowConnected()
232 new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0 /* subtype */, "WIFI", ""); in testGetSecurityTypes_connectedWifiNetwork_showsCurrentSecurityType()
270 ConnectivityManager mockConnectivityManager = mock(ConnectivityManager.class); in testShouldShowXLevelIcon_unvalidatedOrNotDefault_returnsTrue()
279 new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0 /* subtype */, "WIFI", ""); in testShouldShowXLevelIcon_unvalidatedOrNotDefault_returnsTrue()
385 new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0 /* subtype */, "WIFI", ""); in testGetMacAddress_wifiInfoAvailable_usesWifiInfoMacAddress()
[all …]
/frameworks/base/core/java/android/util/
DNtpTrustedTime.java25 import android.net.ConnectivityManager;
109 private final Supplier<ConnectivityManager> mConnectivityManagerSupplier =
110 new Supplier<ConnectivityManager>() {
111 private ConnectivityManager mConnectivityManager;
115 public synchronized ConnectivityManager get() {
119 mConnectivityManager = mContext.getSystemService(ConnectivityManager.class);
152 ConnectivityManager connectivityManager = mConnectivityManagerSupplier.get(); in forceRefresh()
/frameworks/base/core/java/com/android/server/net/
DNetworkPinner.java20 import android.net.ConnectivityManager;
21 import android.net.ConnectivityManager.NetworkCallback;
68 private static ConnectivityManager sCM;
81 sCM = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); in maybeInitConnectivityManager()
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/
DConnectionUtil.java30 import android.net.ConnectivityManager;
68 private ConnectivityManager mCM;
81 private static final int NUM_NETWORK_TYPES = ConnectivityManager.TYPE_VPN + 1;
97 new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); in initialize()
115 mCM = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in initialize()
154 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive()
159 final ConnectivityManager connManager = (ConnectivityManager) context in onReceive()
163 if (intent.hasExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO)) { in onReceive()
165 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); in onReceive()
520 NetworkInfo networkInfo = mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); in isConnectedToMobile()
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/
DConnectivityManagerTestBase.java24 import android.net.ConnectivityManager;
75 protected ConnectivityManager mCm;
103 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive()
130 mCm = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
138 new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); in setUp()
248 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_MOBILE); in isConnectedToMobile()
253 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI); in isConnectedToWifi()
483 waitForNetworkState(ConnectivityManager.TYPE_WIFI, in connectToWifi()
/frameworks/base/core/tests/batterystatstests/BatteryStatsLoadTests/src/com/android/frameworks/core/batterystatsloadtests/
DConnectivitySetupRule.java23 import android.net.ConnectivityManager;
46 private final ConnectivityManager mConnectivityManager;
55 mConnectivityManager = context.getSystemService(ConnectivityManager.class); in ConnectivitySetupRule()
109 private class NetworkTracker extends ConnectivityManager.NetworkCallback {
/frameworks/base/services/core/java/com/android/server/location/gnss/
DGnssNetworkConnectivityHandler.java20 import android.net.ConnectivityManager;
104 private final ConnectivityManager mConnMgr;
129 private int mType = ConnectivityManager.TYPE_NONE;
169 private ConnectivityManager.NetworkCallback mNetworkConnectivityCallback;
176 private ConnectivityManager.NetworkCallback mSuplConnectivityCallback;
202 mConnMgr = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in GnssNetworkConnectivityHandler()
335 private ConnectivityManager.NetworkCallback createNetworkConnectivityCallback() { in createNetworkConnectivityCallback()
336 return new ConnectivityManager.NetworkCallback() { in createNetworkConnectivityCallback()
387 private ConnectivityManager.NetworkCallback createSuplConnectivityCallback() { in createSuplConnectivityCallback()
388 return new ConnectivityManager.NetworkCallback() { in createSuplConnectivityCallback()
[all …]
DNtpTimeHelper.java20 import android.net.ConnectivityManager;
71 private final ConnectivityManager mConnMgr;
95 mConnMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); in NtpTimeHelper()
/frameworks/base/tests/vcn/java/com/android/server/vcn/
DVcnNetworkProviderTest.java30 import android.net.ConnectivityManager;
58 @NonNull private ConnectivityManager mConnMgr;
70 mConnMgr = mock(ConnectivityManager.class); in setUp()
72 mContext, mConnMgr, Context.CONNECTIVITY_SERVICE, ConnectivityManager.class); in setUp()
/frameworks/base/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/
DProvisionObserver.java26 import android.net.ConnectivityManager;
52 final ConnectivityManager connMgr = getSystemService(ConnectivityManager.class); in onStartJob()
/frameworks/libs/net/common/testutils/devicetests/com/android/testutils/
DTestNetworkTracker.kt20 import android.net.ConnectivityManager
21 import android.net.ConnectivityManager.NetworkCallback
59 private val cm = context.getSystemService(ConnectivityManager::class.java)
/frameworks/base/services/core/java/com/android/server/connectivity/
DMultipathPolicyTracker.java19 import static android.net.ConnectivityManager.MULTIPATH_PREFERENCE_HANDOVER;
20 import static android.net.ConnectivityManager.MULTIPATH_PREFERENCE_RELIABILITY;
21 import static android.net.ConnectivityManager.TYPE_MOBILE;
45 import android.net.ConnectivityManager;
46 import android.net.ConnectivityManager.NetworkCallback;
114 private ConnectivityManager mCM;
153 mCM = mContext.getSystemService(ConnectivityManager.class); in start()
274 ConnectivityManager.TYPE_MOBILE, in getTemplateMatchingNetworkIdentity()
462 mMobileNetworkCallback = new ConnectivityManager.NetworkCallback() { in registerTrackMobileCallback()
561 DebugUtils.flagsToString(ConnectivityManager.class, "MULTIPATH_PREFERENCE_", in dump()
/frameworks/opt/net/ims/tests/src/com/android/ims/
DContextFixture.java35 import android.net.ConnectivityManager;
55 private final ConnectivityManager mConnectivityManager = mock(ConnectivityManager.class);
116 } else if (serviceClass == ConnectivityManager.class) { in getSystemServiceName()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/
DDataUsageController.java29 import android.net.ConnectivityManager;
247 return ConnectivityManager.TYPE_NONE; in getNetworkType()
253 return ConnectivityManager.TYPE_MOBILE; in getNetworkType()
256 return ConnectivityManager.TYPE_WIFI; in getNetworkType()
258 return ConnectivityManager.TYPE_ETHERNET; in getNetworkType()
260 return ConnectivityManager.TYPE_MOBILE; in getNetworkType()
/frameworks/opt/net/wifi/libs/WifiTrackerLib/src/com/android/wifitrackerlib/
DBaseWifiTracker.java29 import android.net.ConnectivityManager;
144 protected final ConnectivityManager mConnectivityManager;
165 private final ConnectivityManager.NetworkCallback mNetworkCallback =
166 new ConnectivityManager.NetworkCallback() {
216 private final ConnectivityManager.NetworkCallback mDefaultNetworkCallback =
217 new ConnectivityManager.NetworkCallback() {
284 @NonNull ConnectivityManager connectivityManager, in BaseWifiTracker()
DNetworkDetailsTracker.java25 import android.net.ConnectivityManager;
66 @NonNull ConnectivityManager connectivityManager, in createNetworkDetailsTracker()
96 @NonNull ConnectivityManager connectivityManager, in NetworkDetailsTracker()
/frameworks/opt/net/ethernet/java/com/android/server/ethernet/
DEthernetNetworkFactory.java24 import android.net.ConnectivityManager;
294 new TransportInfo(ConnectivityManager.TYPE_NONE, 30)); in sTransports.put()
297 new TransportInfo(ConnectivityManager.TYPE_NONE, 1)); in sTransports.put()
300 new TransportInfo(ConnectivityManager.TYPE_ETHERNET, 70)); in sTransports.put()
303 new TransportInfo(ConnectivityManager.TYPE_BLUETOOTH, 69)); in sTransports.put()
306 new TransportInfo(ConnectivityManager.TYPE_WIFI, 60)); in sTransports.put()
309 new TransportInfo(ConnectivityManager.TYPE_MOBILE, 50)); in sTransports.put()
369 int legacyType = ConnectivityManager.TYPE_NONE; in NetworkInterfaceState()
412 return ConnectivityManager.TYPE_NONE; in getLegacyType()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/
DWifiStressTest.java21 import android.net.ConnectivityManager;
216 assertTrue("wifi not connected", waitForNetworkState(ConnectivityManager.TYPE_WIFI, in testWifiReconnectionAfterSleep()
253 waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, in testWifiReconnectionAfterSleep()
266 mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState()); in testWifiReconnectionAfterSleep()
277 waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, in testWifiReconnectionAfterSleep()
/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/
DDownloadManagerBaseTest.java26 import android.net.ConnectivityManager;
90 if (intent.getAction().equalsIgnoreCase(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive()
104 ConnectivityManager connManager = (ConnectivityManager)mContext.getSystemService( in getWiFiIsOn()
106 NetworkInfo info = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); in getWiFiIsOn()
294 ConnectivityManager.CONNECTIVITY_ACTION)); in setWiFiStateOn()

123456