From 30f77e8df83a00fc61579752d6e4ed55d76443d9 Mon Sep 17 00:00:00 2001 From: "Yevhen Babiichuk (DustDFG)" Date: Wed, 7 Jan 2026 19:24:34 +0200 Subject: [PATCH] Convert MinimizeMode to normal enum --- .../schabi/newpipe/player/helper/PlayerHelper.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java index 0f9579352..1dd96ae5b 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java @@ -68,13 +68,10 @@ public final class PlayerHelper { int AUTOPLAY_TYPE_NEVER = 2; } - @Retention(SOURCE) - @IntDef({MINIMIZE_ON_EXIT_MODE_NONE, MINIMIZE_ON_EXIT_MODE_BACKGROUND, - MINIMIZE_ON_EXIT_MODE_POPUP}) - public @interface MinimizeMode { - int MINIMIZE_ON_EXIT_MODE_NONE = 0; - int MINIMIZE_ON_EXIT_MODE_BACKGROUND = 1; - int MINIMIZE_ON_EXIT_MODE_POPUP = 2; + public enum MinimizeMode { + MINIMIZE_ON_EXIT_MODE_NONE, + MINIMIZE_ON_EXIT_MODE_BACKGROUND, + MINIMIZE_ON_EXIT_MODE_POPUP } private PlayerHelper() { @@ -236,8 +233,7 @@ public final class PlayerHelper { .getBoolean(context.getString(R.string.clear_queue_confirmation_key), false); } - @MinimizeMode - public static int getMinimizeOnExitAction(@NonNull final Context context) { + public static MinimizeMode getMinimizeOnExitAction(@NonNull final Context context) { final String action = getPreferences(context) .getString(context.getString(R.string.minimize_on_exit_key), ""); if (action.equals(context.getString(R.string.minimize_on_exit_popup_key))) {