VideoDetailFragment: Don't exit fullscreen on rotation in tablet UI

Fixes https://github.com/TeamNewPipe/NewPipe/issues/4936

Going from portrait to landscape doesn't toggle fullscreen in tablet mode, so
the reverse action shouldn't do it either.
This commit is contained in:
Atemu 2020-11-20 21:43:05 +01:00
parent 66d15ea635
commit c0ff1e86b9
1 changed files with 3 additions and 1 deletions

View File

@ -274,7 +274,9 @@ public final class VideoDetailFragment
// If the video is playing but orientation changed
// let's make the video in fullscreen again
checkLandscape();
} else if (player.isFullscreen() && !player.isVerticalVideo()) {
} else if (player.isFullscreen() && !player.isVerticalVideo()
// Tablet UI has orientation-independent fullscreen
&& !DeviceUtils.isTablet(activity)) {
// Device is in portrait orientation after rotation but UI is in fullscreen.
// Return back to non-fullscreen state
player.toggleFullscreen();