Home
last modified time | relevance | path

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

12345678

/frameworks/base/tests/net/java/android/net/
DConnectivityManagerTest.java51 import android.net.ConnectivityManager;
52 import android.net.ConnectivityManager.NetworkCallback;
85 final NetworkCapabilities nc = ConnectivityManager.networkCapabilitiesForType(legacyType); in verifyNetworkCapabilities()
120 ConnectivityManager.TYPE_MOBILE, TRANSPORT_CELLULAR); in testNetworkCapabilitiesForTypeMobile()
126 ConnectivityManager.TYPE_MOBILE_CBS, NET_CAPABILITY_CBS); in testNetworkCapabilitiesForTypeMobileCbs()
132 ConnectivityManager.TYPE_MOBILE_DUN, NET_CAPABILITY_DUN); in testNetworkCapabilitiesForTypeMobileDun()
138 ConnectivityManager.TYPE_MOBILE_FOTA, NET_CAPABILITY_FOTA); in testNetworkCapabilitiesForTypeMobileFota()
144 ConnectivityManager.TYPE_MOBILE_HIPRI, TRANSPORT_CELLULAR); in testNetworkCapabilitiesForTypeMobileHipri()
150 ConnectivityManager.TYPE_MOBILE_IMS, NET_CAPABILITY_IMS); in testNetworkCapabilitiesForTypeMobileIms()
156 ConnectivityManager.TYPE_MOBILE_MMS, in testNetworkCapabilitiesForTypeMobileMms()
[all …]
/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/base/tests/net/integration/util/com/android/server/
DConnectivityServiceTestUtils.kt19 import android.net.ConnectivityManager.TYPE_BLUETOOTH
20 import android.net.ConnectivityManager.TYPE_ETHERNET
21 import android.net.ConnectivityManager.TYPE_MOBILE
22 import android.net.ConnectivityManager.TYPE_NONE
23 import android.net.ConnectivityManager.TYPE_TEST
24 import android.net.ConnectivityManager.TYPE_VPN
25 import android.net.ConnectivityManager.TYPE_WIFI
/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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DOsuNetworkConnectionTest.java34 import android.net.ConnectivityManager;
83 @Mock ConnectivityManager mConnectivityManager;
209 ArgumentCaptor<ConnectivityManager.NetworkCallback> networkCallbackCaptor = in verifyNetworkCallbackInvokedWhenConnected()
210 ArgumentCaptor.forClass(ConnectivityManager.NetworkCallback.class); in verifyNetworkCallbackInvokedWhenConnected()
213 ConnectivityManager.NetworkCallback callback = networkCallbackCaptor.getValue(); in verifyNetworkCallbackInvokedWhenConnected()
223 verify(mConnectivityManager).unregisterNetworkCallback(any(ConnectivityManager in verifyNetworkCallbackInvokedWhenConnected()
239 ArgumentCaptor<ConnectivityManager.NetworkCallback> networkCallbackCaptor = in verifyNetworkCallbackWithoutOnAvailable()
240 ArgumentCaptor.forClass(ConnectivityManager.NetworkCallback.class); in verifyNetworkCallbackWithoutOnAvailable()
243 ConnectivityManager.NetworkCallback callback = networkCallbackCaptor.getValue(); in verifyNetworkCallbackWithoutOnAvailable()
262 ArgumentCaptor<ConnectivityManager.NetworkCallback> networkCallbackCaptor = in verifyNetworkConnectionTimeout()
[all …]
/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/base/core/java/android/util/
DNtpTrustedTime.java25 import android.net.ConnectivityManager;
108 private final Supplier<ConnectivityManager> mConnectivityManagerSupplier =
109 new Supplier<ConnectivityManager>() {
110 private ConnectivityManager mConnectivityManager;
114 public synchronized ConnectivityManager get() {
118 mConnectivityManager = mContext.getSystemService(ConnectivityManager.class);
151 ConnectivityManager connectivityManager = mConnectivityManagerSupplier.get(); in forceRefresh()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/
DDataUsageController.java19 import static android.net.ConnectivityManager.TYPE_MOBILE;
30 import android.net.ConnectivityManager;
62 private final ConnectivityManager mConnectivityManager;
74 mConnectivityManager = ConnectivityManager.from(context); in DataUsageController()
249 return ConnectivityManager.TYPE_NONE; in getNetworkType()
255 return ConnectivityManager.TYPE_MOBILE; in getNetworkType()
258 return ConnectivityManager.TYPE_WIFI; in getNetworkType()
260 return ConnectivityManager.TYPE_ETHERNET; in getNetworkType()
262 return ConnectivityManager.TYPE_MOBILE; in getNetworkType()
/frameworks/base/packages/Tethering/src/com/android/networkstack/tethering/
DUpstreamNetworkMonitor.java19 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_WIFI;
32 import android.net.ConnectivityManager;
33 import android.net.ConnectivityManager.NetworkCallback;
112 private ConnectivityManager mCM;
137 ConnectivityManager cm, StateMachine tgt, SharedLog log, int what) { in UpstreamNetworkMonitor()
[all …]
/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/ConnectivityManagerTest/src/com/android/connectivitymanagertest/
DConnectivityManagerTestBase.java24 import android.net.ConnectivityManager;
74 protected ConnectivityManager mCm;
101 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive()
128 mCm = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in setUp()
135 new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); in setUp()
144 mIntentFilter.addAction(ConnectivityManager.ACTION_TETHER_STATE_CHANGED); in setUp()
245 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_MOBILE); in isConnectedToMobile()
250 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI); in isConnectedToWifi()
480 waitForNetworkState(ConnectivityManager.TYPE_WIFI, in connectToWifi()
/frameworks/base/services/core/java/com/android/server/timezonedetector/
DTimeZoneDetectorCallbackImpl.java23 import android.net.ConnectivityManager;
56 return mContext.getSystemService(ConnectivityManager.class) in deviceHasTelephonyNetwork()
57 .isNetworkSupported(ConnectivityManager.TYPE_MOBILE); in deviceHasTelephonyNetwork()
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/
DConnectionUtil.java30 import android.net.ConnectivityManager;
70 private ConnectivityManager mCM;
79 private static final int NUM_NETWORK_TYPES = ConnectivityManager.MAX_NETWORK_TYPE + 1;
95 new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); in initialize()
113 mCM = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in initialize()
152 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive()
157 final ConnectivityManager connManager = (ConnectivityManager) context in onReceive()
161 if (intent.hasExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO)) { in onReceive()
163 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); in onReceive()
518 NetworkInfo networkInfo = mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); in isConnectedToMobile()
[all …]
/frameworks/base/services/core/java/com/android/server/connectivity/
DDataConnectionStats.java26 import android.net.ConnectivityManager;
73 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in startMonitoring()
74 filter.addAction(ConnectivityManager.INET_CONDITION_ACTION); in startMonitoring()
84 } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION) || in onReceive()
85 action.equals(ConnectivityManager.INET_CONDITION_ACTION)) { in onReceive()
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;
43 import android.net.ConnectivityManager;
44 import android.net.ConnectivityManager.NetworkCallback;
108 private ConnectivityManager mCM;
146 mCM = mContext.getSystemService(ConnectivityManager.class); in start()
266 ConnectivityManager.TYPE_MOBILE, in getTemplateMatchingNetworkIdentity()
452 mMobileNetworkCallback = new ConnectivityManager.NetworkCallback() { in registerTrackMobileCallback()
551 DebugUtils.flagsToString(ConnectivityManager.class, "MULTIPATH_PREFERENCE_", in dump()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DTestUtil.java22 import android.net.ConnectivityManager;
99 Intent intent = new Intent(ConnectivityManager.ACTION_TETHER_STATE_CHANGED); in sendTetherStateChanged()
100 intent.putExtra(ConnectivityManager.EXTRA_AVAILABLE_TETHER, available); in sendTetherStateChanged()
101 intent.putExtra(ConnectivityManager.EXTRA_ACTIVE_TETHER, active); in sendTetherStateChanged()
/frameworks/base/tests/net/common/java/android/net/
DNetworkAgentConfigTest.kt42 setLegacyType(ConnectivityManager.TYPE_ETHERNET) in testParcelNetworkAgentConfig()
54 setLegacyType(ConnectivityManager.TYPE_ETHERNET) in testBuilder()
64 assertEquals(ConnectivityManager.TYPE_ETHERNET, config.getLegacyType()) in testBuilder()
/frameworks/base/tests/net/java/com/android/server/
DLegacyTypeTrackerTest.kt19 import android.net.ConnectivityManager.TYPE_ETHERNET
20 import android.net.ConnectivityManager.TYPE_MOBILE
21 import android.net.ConnectivityManager.TYPE_MOBILE_SUPL
22 import android.net.ConnectivityManager.TYPE_WIFI
23 import android.net.ConnectivityManager.TYPE_WIMAX
/frameworks/opt/net/wifi/libs/WifiTrackerLib/src/com/android/wifitrackerlib/
DNetworkDetailsTracker.java20 import android.net.ConnectivityManager;
56 @NonNull ConnectivityManager connectivityManager, in createNetworkDetailsTracker()
85 @NonNull ConnectivityManager connectivityManager, in NetworkDetailsTracker()
/frameworks/base/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/
DProvisionObserver.java26 import android.net.ConnectivityManager;
52 final ConnectivityManager connMgr = ConnectivityManager.from(this); in onStartJob()
/frameworks/base/services/core/java/com/android/server/location/gnss/
DGnssNetworkConnectivityHandler.java21 import android.net.ConnectivityManager;
102 private final ConnectivityManager mConnMgr;
127 private int mType = ConnectivityManager.TYPE_NONE;
167 private ConnectivityManager.NetworkCallback mNetworkConnectivityCallback;
174 private ConnectivityManager.NetworkCallback mSuplConnectivityCallback;
200 mConnMgr = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in GnssNetworkConnectivityHandler()
333 private ConnectivityManager.NetworkCallback createNetworkConnectivityCallback() { in createNetworkConnectivityCallback()
334 return new ConnectivityManager.NetworkCallback() { in createNetworkConnectivityCallback()
385 private ConnectivityManager.NetworkCallback createSuplConnectivityCallback() { in createSuplConnectivityCallback()
386 return new ConnectivityManager.NetworkCallback() { in createSuplConnectivityCallback()
[all …]
/frameworks/opt/net/ethernet/java/com/android/server/ethernet/
DEthernetNetworkFactory.java25 import android.net.ConnectivityManager;
288 new TransportInfo(ConnectivityManager.TYPE_NONE, 30)); in sTransports.put()
291 new TransportInfo(ConnectivityManager.TYPE_NONE, 1)); in sTransports.put()
294 new TransportInfo(ConnectivityManager.TYPE_ETHERNET, 70)); in sTransports.put()
297 new TransportInfo(ConnectivityManager.TYPE_BLUETOOTH, 69)); in sTransports.put()
300 new TransportInfo(ConnectivityManager.TYPE_WIFI, 60)); in sTransports.put()
303 new TransportInfo(ConnectivityManager.TYPE_MOBILE, 50)); in sTransports.put()
363 int legacyType = ConnectivityManager.TYPE_NONE; in NetworkInterfaceState()
406 return ConnectivityManager.TYPE_NONE; in getLegacyType()

12345678