fixed back button pausing fullscreen tablet videos
This commit is contained in:
parent
6e3e5e8114
commit
7d456c9a9c
2 changed files with 11 additions and 3 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue