Home
last modified time | relevance | path

Searched refs:connectivityManager (Results 1 – 13 of 13) sorted by relevance

/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowConnectivityManagerTest.java34 private ConnectivityManager connectivityManager; field in ShadowConnectivityManagerTest
39 connectivityManager = in setUp()
42 shadowOfActiveNetworkInfo = shadowOf(connectivityManager.getActiveNetworkInfo()); in setUp()
47 assertThat(connectivityManager.getActiveNetworkInfo()).isNotNull(); in getActiveNetworkInfo_shouldInitializeItself()
53 assertThat(connectivityManager.getActiveNetworkInfo().isConnectedOrConnecting()).isTrue(); in getActiveNetworkInfo_shouldReturnTrueCorrectly()
54 assertThat(connectivityManager.getActiveNetworkInfo().isConnected()).isTrue(); in getActiveNetworkInfo_shouldReturnTrueCorrectly()
57 assertThat(connectivityManager.getActiveNetworkInfo().isConnectedOrConnecting()).isTrue(); in getActiveNetworkInfo_shouldReturnTrueCorrectly()
58 assertThat(connectivityManager.getActiveNetworkInfo().isConnected()).isFalse(); in getActiveNetworkInfo_shouldReturnTrueCorrectly()
61 assertThat(connectivityManager.getActiveNetworkInfo().isConnectedOrConnecting()).isFalse(); in getActiveNetworkInfo_shouldReturnTrueCorrectly()
62 assertThat(connectivityManager.getActiveNetworkInfo().isConnected()).isFalse(); in getActiveNetworkInfo_shouldReturnTrueCorrectly()
[all …]
/external/grpc-grpc-java/android/src/test/java/io/grpc/android/
DAndroidChannelBuilderTest.java81 private ConnectivityManager connectivityManager; field in AndroidChannelBuilderTest
85 connectivityManager = in setUp()
131 shadowOf(connectivityManager).setActiveNetworkInfo(WIFI_CONNECTED); in nullContextDoesNotThrow_api23()
142 shadowOf(connectivityManager).setActiveNetworkInfo(MOBILE_DISCONNECTED); in nullContextDoesNotThrow_api24()
147 shadowOf(connectivityManager).setActiveNetworkInfo(MOBILE_CONNECTED); in nullContextDoesNotThrow_api24()
165 shadowOf(connectivityManager).setActiveNetworkInfo(WIFI_CONNECTED); in resetConnectBackoff_api23()
176 shadowOf(connectivityManager).setActiveNetworkInfo(null); in resetConnectBackoff_api23()
182 shadowOf(connectivityManager).setActiveNetworkInfo(MOBILE_DISCONNECTED); in resetConnectBackoff_api23()
188 shadowOf(connectivityManager).setActiveNetworkInfo(MOBILE_CONNECTED); in resetConnectBackoff_api23()
195 shadowOf(connectivityManager).setActiveNetworkInfo(null); in resetConnectBackoff_api23()
[all …]
/external/downloader/src/test/java/com/google/android/downloader/
DAndroidConnectivityHandlerTest.java65 private ConnectivityManager connectivityManager; field in AndroidConnectivityHandlerTest
72 connectivityManager = in setUp()
98 shadowOf(connectivityManager).setActiveNetworkInfo(null); in checkConnectivity_noNetwork()
112 shadowOf(connectivityManager) in checkConnectivity_networkNotConnected()
133 shadowOf(connectivityManager) in checkConnectivity_wrongNetworkType()
154 shadowOf(connectivityManager) in checkConnectivity_anyNetworkType()
178 shadowOf(connectivityManager) in checkConnectivity_unknownNetworkType()
203 shadowOf(connectivityManager) in checkConnectivity_requiredNetworkConnected_wifiOnly()
220 shadowOf(connectivityManager) in checkConnectivity_requiredNetworkConnected_wifiOrCellular()
242 ShadowConnectivityManager shadowConnectivityManager = shadowOf(connectivityManager); in checkConnectivity_requiredNetworkConnected_sdk23()
[all …]
/external/webrtc/sdk/android/api/org/webrtc/
DNetworkMonitorAutoDetect.java217 @Nullable private final ConnectivityManager connectivityManager; field in NetworkMonitorAutoDetect.ConnectivityManagerDelegate
220 connectivityManager = in ConnectivityManagerDelegate()
227 connectivityManager = null; in ConnectivityManagerDelegate()
235 if (connectivityManager == null) { in getNetworkState()
238 return getNetworkState(connectivityManager.getActiveNetworkInfo()); in getNetworkState()
247 if (network == null || connectivityManager == null) { in getNetworkState()
250 NetworkInfo networkInfo = connectivityManager.getNetworkInfo(network); in getNetworkState()
274 connectivityManager.getNetworkCapabilities(network); in getNetworkState()
295 && network.equals(connectivityManager.getActiveNetwork())) { in getNetworkState()
299 NetworkInfo underlyingActiveNetworkInfo = connectivityManager.getActiveNetworkInfo(); in getNetworkState()
[all …]
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/scheduler/
DRequirements.java131 ConnectivityManager connectivityManager = in getNotMetNetworkRequirements() local
133 NetworkInfo networkInfo = Assertions.checkNotNull(connectivityManager).getActiveNetworkInfo(); in getNotMetNetworkRequirements()
136 || !isInternetConnectivityValidated(connectivityManager)) { in getNotMetNetworkRequirements()
140 if (isUnmeteredNetworkRequired() && connectivityManager.isActiveNetworkMetered()) { in getNotMetNetworkRequirements()
165 private static boolean isInternetConnectivityValidated(ConnectivityManager connectivityManager) { in isInternetConnectivityValidated() argument
172 Network activeNetwork = connectivityManager.getActiveNetwork(); in isInternetConnectivityValidated()
177 connectivityManager.getNetworkCapabilities(activeNetwork); in isInternetConnectivityValidated()
DRequirementsWatcher.java128 ConnectivityManager connectivityManager = in registerNetworkCallbackV24() local
132 connectivityManager.registerDefaultNetworkCallback(networkCallback); in registerNetworkCallbackV24()
137 ConnectivityManager connectivityManager = in unregisterNetworkCallbackV24() local
139 connectivityManager.unregisterNetworkCallback(Assertions.checkNotNull(networkCallback)); in unregisterNetworkCallbackV24()
/external/downloader/src/main/java/com/google/android/downloader/
DAndroidConnectivityHandler.java59 private final ConnectivityManager connectivityManager; field in AndroidConnectivityHandler
84 this.connectivityManager = checkNotNull(getSystemService(context, ConnectivityManager.class)); in AndroidConnectivityHandler()
115 Network network = connectivityManager.getActiveNetwork(); in connectivitySatisfied()
121 NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(network); in connectivitySatisfied()
135 && ConnectivityManagerCompat.isActiveNetworkMetered(connectivityManager)) { in connectivitySatisfied()
149 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); in connectivitySatisfied()
163 && ConnectivityManagerCompat.isActiveNetworkMetered(connectivityManager)) { in connectivitySatisfied()
/external/grpc-grpc-java/android/src/main/java/io/grpc/android/
DAndroidChannelBuilder.java189 @Nullable private final ConnectivityManager connectivityManager; field in AndroidChannelBuilder.AndroidChannel
202 connectivityManager = in AndroidChannel()
214 connectivityManager = null; in AndroidChannel()
222 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && connectivityManager != null) { in configureNetworkMonitoring()
224 connectivityManager.registerDefaultNetworkCallback(defaultNetworkCallback); in configureNetworkMonitoring()
230 connectivityManager.unregisterNetworkCallback(defaultNetworkCallback); in configureNetworkMonitoring()
/external/glide/library/src/main/java/com/bumptech/glide/manager/
DDefaultConnectivityMonitor.java53 ConnectivityManager connectivityManager = in isConnected() local
55 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); in isConnected()
/external/libchrome/base/test/android/javatests/src/org/chromium/base/test/util/
DRestrictionSkipCheck.java73 final ConnectivityManager connectivityManager = (ConnectivityManager) in isNetworkAvailable() local
75 final NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); in isNetworkAvailable()
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/upstream/
DDefaultBandwidthMeterTest.java47 private ConnectivityManager connectivityManager; field in DefaultBandwidthMeterTest
57 connectivityManager = in setUp()
561 Shadows.shadowOf(connectivityManager).setActiveNetworkInfo(networkInfo); in setActiveNetworkInfo()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowWifiManager.java236 ShadowConnectivityManager connectivityManager = in connect() local
239 connectivityManager.setActiveNetworkInfo(networkInfo); in connect()
/external/exoplayer/tree/library/common/src/main/java/com/google/android/exoplayer2/util/
DUtil.java1915 ConnectivityManager connectivityManager = in getNetworkType() local
1917 if (connectivityManager == null) { in getNetworkType()
1921 networkInfo = connectivityManager.getActiveNetworkInfo(); in getNetworkType()