mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
commit
ea59effff8
@ -170,7 +170,7 @@ class PlayerFragment : Fragment() {
|
||||
autoRotationEnabled = PreferenceHelper.getBoolean(
|
||||
requireContext(),
|
||||
"auto_fullscreen",
|
||||
true
|
||||
false
|
||||
)
|
||||
val mainActivity = activity as MainActivity
|
||||
if (autoRotationEnabled) {
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user