Add option to directly open fullscreen when the main player starts

This commit is contained in:
Stypox 2021-01-19 08:13:44 +01:00
parent faa7a91764
commit 3c2ea7697c
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
7 changed files with 44 additions and 12 deletions

View file

@ -3855,11 +3855,9 @@ public final class Player implements
if (DEBUG) {
Log.d(TAG, "toggleFullscreen() called");
}
if (popupPlayerSelected() || exoPlayerIsNull() || currentMetadata == null
|| fragmentListener == null) {
if (popupPlayerSelected() || exoPlayerIsNull() || fragmentListener == null) {
return;
}
//changeState(STATE_BLOCKED); TODO check what this does
isFullscreen = !isFullscreen;
if (!isFullscreen) {

View file

@ -239,6 +239,11 @@ public final class PlayerHelper {
.getBoolean(context.getString(R.string.brightness_gesture_control_key), true);
}
public static boolean isStartMainPlayerFullscreenEnabled(@NonNull final Context context) {
return getPreferences(context)
.getBoolean(context.getString(R.string.start_main_player_fullscreen_key), false);
}
public static boolean isAutoQueueEnabled(@NonNull final Context context) {
return getPreferences(context)
.getBoolean(context.getString(R.string.auto_queue_key), false);