Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54c922d9 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

issue_5413: Change ReactiveNetwork library internetConnection host to http://204.ecloud.global

parent f21ed972
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import ru.beryukhov.reactivenetwork.ReactiveNetwork
import ru.beryukhov.reactivenetwork.internet.observing.InternetObservingSettings
import ru.beryukhov.reactivenetwork.internet.observing.strategy.SocketInternetObservingStrategy
import timber.log.Timber
import java.io.ByteArrayOutputStream
import javax.inject.Inject
@@ -533,7 +535,14 @@ class MainActivityViewModel @Inject constructor(
    }

    val internetConnection = liveData {
        emitSource(ReactiveNetwork().observeInternetConnectivity().asLiveData(Dispatchers.Default))
        emitSource(
            ReactiveNetwork().observeInternetConnectivity(
                InternetObservingSettings.builder()
                    .host("http://204.ecloud.global")
                    .strategy(SocketInternetObservingStrategy())
                    .build()
            ).asLiveData(Dispatchers.Default)
        )
    }

    fun updateStatusOfFusedApps(