diff options
Diffstat (limited to 'android')
2 files changed, 5 insertions, 4 deletions
diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/talpid/util/ConnectivityManagerUtilKtTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/talpid/util/ConnectivityManagerUtilKtTest.kt index a3d684611d..5653e43712 100644 --- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/talpid/util/ConnectivityManagerUtilKtTest.kt +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/talpid/util/ConnectivityManagerUtilKtTest.kt @@ -24,9 +24,9 @@ import net.mullvad.talpid.model.Connectivity import net.mullvad.talpid.model.IpAvailability import net.mullvad.talpid.util.NetworkEvent import net.mullvad.talpid.util.UnderlyingConnectivityStatusResolver -import net.mullvad.talpid.util.allNetworkEvents import net.mullvad.talpid.util.defaultNetworkEvents import net.mullvad.talpid.util.hasInternetConnectivity +import net.mullvad.talpid.util.nonVpnInternetNetworksEvents import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -36,7 +36,8 @@ class ConnectivityManagerUtilKtTest { @BeforeEach fun setup() { mockkStatic(CONNECTIVITY_MANAGER_UTIL_CLASS) - every { connectivityManager.allNetworkEvents() } returns flowOf(NetworkEvent.Unavailable) + every { connectivityManager.nonVpnInternetNetworksEvents() } returns + flowOf(NetworkEvent.Unavailable) } /** User being online, the listener should emit once with `true` */ diff --git a/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/util/ConnectivityManagerUtil.kt b/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/util/ConnectivityManagerUtil.kt index 1d1b82e685..923aca44fb 100644 --- a/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/util/ConnectivityManagerUtil.kt +++ b/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/util/ConnectivityManagerUtil.kt @@ -199,9 +199,9 @@ internal fun ConnectivityManager.activeRawNetworkState(): RawNetworkState? = * default network and depending on if it is a VPN. If it is not a VPN we check the network * properties directly and if it is a VPN we use a socket to check the underlying network. A * debounce is applied to avoid emitting too many events and to avoid setting the app in an offline - * state when switching networks. The flow is combined with the all network events to fix issues + * state when switching networks. The flow is combined with the non-VPN network events to fix issues * with the default network not being updated correctly on Android 9 and below when the VPN is - * turned on. The all network event is not used it is just there to trigger a new connectivity + * turned on. The non-VPN network event is not used it is just there to trigger a new connectivity * check. */ @OptIn(FlowPreview::class) |
