Home
last modified time | relevance | path

Searched refs:NetworkStatus (Results 1 – 8 of 8) sorted by relevance

/packages/providers/MediaProvider/photopicker/tests/src/com/android/photopicker/core/network/
DNetworkMonitorTest.kt77 assertThat(reportedStatus).isEqualTo(NetworkStatus.Available) in testInitialNetworkIsAvailable()
89 assertThat(reportedStatus).isEqualTo(NetworkStatus.Available) in testRegistersNetworkCallback()
111 val emissions = mutableListOf<NetworkStatus>() in testCallbackEmitsNewNetworkStatus()
119 assertThat(emissions.removeFirst()).isEqualTo(NetworkStatus.Available) in testCallbackEmitsNewNetworkStatus()
124 assertThat(emissions.removeFirst()).isEqualTo(NetworkStatus.Unavailable) in testCallbackEmitsNewNetworkStatus()
129 assertThat(emissions.removeFirst()).isEqualTo(NetworkStatus.Available) in testCallbackEmitsNewNetworkStatus()
134 assertThat(emissions.removeFirst()).isEqualTo(NetworkStatus.Unavailable) in testCallbackEmitsNewNetworkStatus()
143 val allEmissions = mutableListOf<NetworkStatus>() in testNetworkStatusReplayedForNewSubscribers()
163 val emissions = mutableListOf<NetworkStatus>() in testNetworkStatusReplayedForNewSubscribers()
167 assertThat(emissions.first()).isEqualTo(NetworkStatus.Unavailable) in testNetworkStatusReplayedForNewSubscribers()
[all …]
/packages/providers/MediaProvider/photopicker/src/com/android/photopicker/core/network/
DNetworkMonitor.kt58 val networkStatus: SharedFlow<NetworkStatus> =
59 callbackFlow<NetworkStatus> { in <lambda>()
63 trySend(NetworkStatus.Unavailable).onFailure { in <lambda>()
69 trySend(NetworkStatus.Available).onFailure { in <lambda>()
75 trySend(NetworkStatus.Unavailable).onFailure { in <lambda>()
94 trySend(if (isConnected) NetworkStatus.Available else NetworkStatus.Unavailable) in <lambda>()
DNetworkStatus.kt20 sealed class NetworkStatus { class
21 object Available : NetworkStatus()
23 object Unavailable : NetworkStatus()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/module/
DNetworkStatusNotifier.java29 @NetworkStatus
48 @interface NetworkStatus { annotation
55 void onNetworkChanged(@NetworkStatus int newNetworkStatus); in onNetworkChanged()
DDefaultNetworkStatusNotifier.java55 @NetworkStatus
71 @NetworkStatus int networkStatus = getNetworkStatus(); in registerListener()
DDefaultCategoryProvider.java44 import com.android.wallpaper.module.NetworkStatusNotifier.NetworkStatus;
86 @NetworkStatus
/packages/apps/WallpaperPicker2/tests/common/src/com/android/wallpaper/testing/
DTestNetworkStatusNotifier.java35 @NetworkStatus
59 public void setAndNotifyNetworkStatus(@NetworkStatus int networkStatus) { in setAndNotifyNetworkStatus()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/picker/
DCustomizationPickerActivity.java53 import com.android.wallpaper.module.NetworkStatusNotifier.NetworkStatus;
85 @NetworkStatus private int mNetworkStatus;