diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index a0b92a60d..f5c3ba100 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -746,7 +746,7 @@ public final class VideoDetailFragment // If we are in fullscreen mode just exit from it via first back press if (player != null && player.isFullscreen()) { - if (!DeviceUtils.isTablet(activity)) { + if (!DeviceUtils.isTablet(activity, true)) { player.pause(); } restoreDefaultOrientation(); diff --git a/app/src/main/java/org/schabi/newpipe/util/DeviceUtils.java b/app/src/main/java/org/schabi/newpipe/util/DeviceUtils.java index a51b8658e..64d3e875c 100644 --- a/app/src/main/java/org/schabi/newpipe/util/DeviceUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/DeviceUtils.java @@ -25,9 +25,13 @@ public final class DeviceUtils { } public static boolean isTv(final Context context) { + return isTv(context, false); + } + + public static boolean isTv(final Context context, final boolean forceCheck) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); - if (prefs.getBoolean(context + if (!forceCheck && prefs.getBoolean(context .getString(R.string.disable_tv_ui_key), false)) { return false; } @@ -63,9 +67,13 @@ public final class DeviceUtils { } public static boolean isTablet(@NonNull final Context context) { + return isTablet(context, false); + } + + public static boolean isTablet(@NonNull final Context context, final boolean forceCheck) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); - if (prefs.getBoolean(context + if (!forceCheck && prefs.getBoolean(context .getString(R.string.disable_tablet_ui_key), false)) { return false; }