Move fullscreen-related comments to javadocs

This commit is contained in:
Stypox 2021-08-31 11:28:34 +02:00
parent 3bc661f583
commit ed408b2094
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
2 changed files with 21 additions and 8 deletions

View file

@ -747,16 +747,18 @@ public final class Player implements
NavigationHelper.sendPlayerStartedEvent(context);
}
/**
* Open fullscreen on tablets where the option to have the main player start automatically in
* fullscreen mode is on. Rotating the device to landscape is already done in {@link
* VideoDetailFragment#openVideoPlayer(boolean)} when the thumbnail is clicked, and that's
* enough for phones, but not for tablets since the mini player can be also shown in landscape.
*/
private void directlyOpenFullscreenIfNeeded() {
if (fragmentListener != null
&& PlayerHelper.isStartMainPlayerFullscreenEnabled(service)
&& DeviceUtils.isTablet(service)
&& videoPlayerSelected()
&& PlayerHelper.globalScreenOrientationLocked(service)) {
// Open fullscreen on tablets where the option to have the main player start
// automatically in fullscreen mode is on. Rotating the device to landscape is already
// done in VideoDetailFragment when the thumbnail is clicked, and that's enough for
// phones, but not for tablets since the mini player can be also shown in landscape.
fragmentListener.onScreenRotationButtonClicked();
}
}