Home
last modified time | relevance | path

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

1234567

/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/
DConnectivityManagerMobileTest.java19 import android.net.ConnectivityManager;
58 if (!waitForNetworkState(ConnectivityManager.TYPE_MOBILE, in setUp()
90 ConnectivityManager.TYPE_MOBILE, State.CONNECTED, LONG_TIMEOUT)); in test3GToWifiNotification()
94 assertEquals("active network is not mobile", ConnectivityManager.TYPE_MOBILE, ni.getType()); in test3GToWifiNotification()
125 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifi()
149 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifWithKnownAP()
161 ConnectivityManager.TYPE_MOBILE, State.CONNECTED, LONG_TIMEOUT)); in testConnectToWifWithKnownAP()
173 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifWithKnownAP()
197 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testDisconnectWifi()
207 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/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/services/tests/servicestests/src/com/android/server/net/
DNetworkManagementServiceTest.java19 import static android.net.ConnectivityManager.FIREWALL_CHAIN_BACKGROUND;
20 import static android.net.ConnectivityManager.FIREWALL_CHAIN_DOZABLE;
21 import static android.net.ConnectivityManager.FIREWALL_CHAIN_LOW_POWER_STANDBY;
22 import static android.net.ConnectivityManager.FIREWALL_CHAIN_METERED_ALLOW;
23 import static android.net.ConnectivityManager.FIREWALL_CHAIN_METERED_DENY_ADMIN;
24 import static android.net.ConnectivityManager.FIREWALL_CHAIN_METERED_DENY_USER;
25 import static android.net.ConnectivityManager.FIREWALL_CHAIN_POWERSAVE;
26 import static android.net.ConnectivityManager.FIREWALL_CHAIN_RESTRICTED;
27 import static android.net.ConnectivityManager.FIREWALL_CHAIN_STANDBY;
28 import static android.net.ConnectivityManager.FIREWALL_RULE_ALLOW;
[all …]
/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/telephony/src/java/com/android/internal/telephony/metrics/
DDefaultNetworkMonitor.java22 import android.net.ConnectivityManager;
23 import android.net.ConnectivityManager.NetworkCallback;
76 ConnectivityManager connectivityManager = in registerSystemDefaultNetworkCallback()
77 context.getSystemService(ConnectivityManager.class); in registerSystemDefaultNetworkCallback()
/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/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/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()
249 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_MOBILE); in isConnectedToMobile()
254 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI); in isConnectedToWifi()
484 waitForNetworkState(ConnectivityManager.TYPE_WIFI, in connectToWifi()
/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()
116 mCM = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in initialize()
155 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive()
160 final ConnectivityManager connManager = (ConnectivityManager) context in onReceive()
164 if (intent.hasExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO)) { in onReceive()
166 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); in onReceive()
521 NetworkInfo networkInfo = mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); in isConnectedToMobile()
[all …]
/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/base/tests/vcn/java/com/android/server/vcn/routeselection/
DUnderlyingNetworkControllerTest.java49 import android.net.ConnectivityManager;
154 @Mock private ConnectivityManager mConnectivityManager;
190 ConnectivityManager.class); in setUp()
253 final ConnectivityManager cm = mock(ConnectivityManager.class); in testNetworkCallbacksRegisteredOnStartupForTestMode()
254 setupSystemService(mContext, cm, Context.CONNECTIVITY_SERVICE, ConnectivityManager.class); in testNetworkCallbacksRegisteredOnStartupForTestMode()
279 ConnectivityManager cm, in verifyRequestBackgroundNetwork()
296 final ConnectivityManager cm = mock(ConnectivityManager.class); in testNetworkCallbacksRegisteredOnStartupForNonInternetCapabilities()
297 setupSystemService(mContext, cm, Context.CONNECTIVITY_SERVICE, ConnectivityManager.class); in testNetworkCallbacksRegisteredOnStartupForNonInternetCapabilities()
342 final ConnectivityManager cm = mock(ConnectivityManager.class); in testNetworkCallbacksRegisteredOnStartupWithDedupedtCapabilities()
343 setupSystemService(mContext, cm, Context.CONNECTIVITY_SERVICE, ConnectivityManager.class); in testNetworkCallbacksRegisteredOnStartupWithDedupedtCapabilities()
[all …]
/frameworks/base/services/core/java/com/android/server/location/gnss/
DGnssNetworkConnectivityHandler.java24 import android.net.ConnectivityManager;
114 private final ConnectivityManager mConnMgr;
141 private int mType = ConnectivityManager.TYPE_NONE;
181 private ConnectivityManager.NetworkCallback mNetworkConnectivityCallback;
188 private ConnectivityManager.NetworkCallback mSuplConnectivityCallback;
219 mConnMgr = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in GnssNetworkConnectivityHandler()
367 private ConnectivityManager.NetworkCallback createNetworkConnectivityCallback() { in createNetworkConnectivityCallback()
368 return new ConnectivityManager.NetworkCallback() { in createNetworkConnectivityCallback()
419 private ConnectivityManager.NetworkCallback createSuplConnectivityCallback() { in createSuplConnectivityCallback()
420 return new ConnectivityManager.NetworkCallback() { in createSuplConnectivityCallback()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/
DWifiStatusTrackerFactory.kt19 import android.net.ConnectivityManager
38 private val mConnectivityManager: ConnectivityManager,
DWifiPickerTrackerFactory.kt20 import android.net.ConnectivityManager
46 private val connectivityManager: ConnectivityManager,
/frameworks/opt/net/wifi/libs/WifiTrackerLib/src/com/android/wifitrackerlib/
DNetworkDetailsTracker.java24 import android.net.ConnectivityManager;
66 @NonNull ConnectivityManager connectivityManager, in createNetworkDetailsTracker()
93 @NonNull ConnectivityManager connectivityManager, in createNetworkDetailsTracker()
127 @NonNull ConnectivityManager connectivityManager, in NetworkDetailsTracker()
DBaseWifiTracker.java29 import android.net.ConnectivityManager;
162 protected final ConnectivityManager mConnectivityManager;
180 private final ConnectivityManager.NetworkCallback mNetworkCallback =
181 new ConnectivityManager.NetworkCallback(
182 ConnectivityManager.NetworkCallback.FLAG_INCLUDE_LOCATION_INFO) {
204 private final ConnectivityManager.NetworkCallback mDefaultNetworkCallback =
205 new ConnectivityManager.NetworkCallback(
206 ConnectivityManager.NetworkCallback.FLAG_INCLUDE_LOCATION_INFO) {
321 @NonNull ConnectivityManager connectivityManager,
/frameworks/opt/net/ims/tests/src/com/android/ims/
DContextFixture.java35 import android.net.ConnectivityManager;
56 private final ConnectivityManager mConnectivityManager = mock(ConnectivityManager.class);
117 } else if (serviceClass == ConnectivityManager.class) { in getSystemServiceName()
/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;
40 import android.net.ConnectivityManager;
41 import android.net.ConnectivityManager.NetworkCallback;
110 private ConnectivityManager mCM;
149 mCM = mContext.getSystemService(ConnectivityManager.class); in start()
283 return new NetworkIdentity.Builder().setType(ConnectivityManager.TYPE_MOBILE) in getTemplateMatchingNetworkIdentity()
476 mMobileNetworkCallback = new ConnectivityManager.NetworkCallback() { in registerTrackMobileCallback()
575 DebugUtils.flagsToString(ConnectivityManager.class, "MULTIPATH_PREFERENCE_", in dump()
/frameworks/opt/net/wifi/libs/WifiTrackerLib/sdk_src/src/com/android/wifitrackerlib/
DNonSdkApiWrapper.java22 import android.net.ConnectivityManager;
46 @NonNull ConnectivityManager connectivityManager, @NonNull Network network) { in startCaptivePortalApp()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/
DWifiStressTest.java21 import android.net.ConnectivityManager;
217 assertTrue("wifi not connected", waitForNetworkState(ConnectivityManager.TYPE_WIFI, in testWifiReconnectionAfterSleep()
254 waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, in testWifiReconnectionAfterSleep()
267 mCm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState()); in testWifiReconnectionAfterSleep()
278 waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, in testWifiReconnectionAfterSleep()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/
DWifiStatusTrackerTest.java27 import android.net.ConnectivityManager;
50 @Mock ConnectivityManager mConnectivityManager;
55 private final ArgumentCaptor<ConnectivityManager.NetworkCallback>
57 ArgumentCaptor.forClass(ConnectivityManager.NetworkCallback.class);
59 private final ArgumentCaptor<ConnectivityManager.NetworkCallback>
61 ArgumentCaptor.forClass(ConnectivityManager.NetworkCallback.class);
/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()

1234567