mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
cleanup
This commit is contained in:
parent
bad6243268
commit
32dd1ecaad
1 changed files with 1 additions and 5 deletions
|
@ -494,11 +494,7 @@ object AppUtils {
|
||||||
fun Context.isNetworkAvailable(): Boolean {
|
fun Context.isNetworkAvailable(): Boolean {
|
||||||
val manager = this.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
val manager = this.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||||
val activeNetworkInfo = manager.activeNetworkInfo
|
val activeNetworkInfo = manager.activeNetworkInfo
|
||||||
var connected = activeNetworkInfo != null && activeNetworkInfo.isConnected
|
return (activeNetworkInfo != null && activeNetworkInfo.isConnected ) || manager.allNetworkInfo?.any { it.isConnected } ?: false
|
||||||
if (!connected) {
|
|
||||||
connected = manager.allNetworkInfo?.any { it.isConnected } ?: false
|
|
||||||
}
|
|
||||||
return connected
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun splitQuery(url: URL): Map<String, String> {
|
fun splitQuery(url: URL): Map<String, String> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue