This commit is contained in:
Bnyro 2022-07-14 16:07:47 +02:00
parent dd37e0edb7
commit 700781d63a
2 changed files with 7 additions and 1 deletions

View File

@ -170,7 +170,7 @@ class PlayerFragment : Fragment() {
autoRotationEnabled = PreferenceHelper.getBoolean(
requireContext(),
"auto_fullscreen",
true
false
)
val mainActivity = activity as MainActivity
if (autoRotationEnabled) {

View File

@ -9,6 +9,9 @@ object ConnectionHelper {
fun isNetworkAvailable(context: Context): Boolean {
val connectivityManager =
context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
// this seems to not recognize vpn connections
/*
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val nw = connectivityManager.activeNetwork ?: return false
val actNw = connectivityManager.getNetworkCapabilities(nw) ?: return false
@ -28,5 +31,8 @@ object ConnectionHelper {
} else {
return connectivityManager.activeNetworkInfo?.isConnected ?: false
}
*/
return connectivityManager.activeNetworkInfo?.isConnected ?: false
}
}