/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowConnectivityManagerTest.java | 34 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/ |
D | AndroidChannelBuilderTest.java | 81 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/ |
D | AndroidConnectivityHandlerTest.java | 65 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/ |
D | NetworkMonitorAutoDetect.java | 217 @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/ |
D | Requirements.java | 131 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()
|
D | RequirementsWatcher.java | 128 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/ |
D | AndroidConnectivityHandler.java | 59 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/ |
D | AndroidChannelBuilder.java | 189 @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/ |
D | DefaultConnectivityMonitor.java | 53 ConnectivityManager connectivityManager = in isConnected() local 55 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); in isConnected()
|
/external/libchrome/base/test/android/javatests/src/org/chromium/base/test/util/ |
D | RestrictionSkipCheck.java | 73 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/ |
D | DefaultBandwidthMeterTest.java | 47 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/ |
D | ShadowWifiManager.java | 236 ShadowConnectivityManager connectivityManager = in connect() local 239 connectivityManager.setActiveNetworkInfo(networkInfo); in connect()
|
/external/exoplayer/tree/library/common/src/main/java/com/google/android/exoplayer2/util/ |
D | Util.java | 1915 ConnectivityManager connectivityManager = in getNetworkType() local 1917 if (connectivityManager == null) { in getNetworkType() 1921 networkInfo = connectivityManager.getActiveNetworkInfo(); in getNetworkType()
|