Skip to content

Commit 30f77e8

Browse files
author
Yevhen Babiichuk (DustDFG)
committed
Convert MinimizeMode to normal enum
1 parent 25ea75f commit 30f77e8

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,10 @@ public final class PlayerHelper {
6868
int AUTOPLAY_TYPE_NEVER = 2;
6969
}
7070

71-
@Retention(SOURCE)
72-
@IntDef({MINIMIZE_ON_EXIT_MODE_NONE, MINIMIZE_ON_EXIT_MODE_BACKGROUND,
73-
MINIMIZE_ON_EXIT_MODE_POPUP})
74-
public @interface MinimizeMode {
75-
int MINIMIZE_ON_EXIT_MODE_NONE = 0;
76-
int MINIMIZE_ON_EXIT_MODE_BACKGROUND = 1;
77-
int MINIMIZE_ON_EXIT_MODE_POPUP = 2;
71+
public enum MinimizeMode {
72+
MINIMIZE_ON_EXIT_MODE_NONE,
73+
MINIMIZE_ON_EXIT_MODE_BACKGROUND,
74+
MINIMIZE_ON_EXIT_MODE_POPUP
7875
}
7976

8077
private PlayerHelper() {
@@ -236,8 +233,7 @@ public static boolean isClearingQueueConfirmationRequired(@NonNull final Context
236233
.getBoolean(context.getString(R.string.clear_queue_confirmation_key), false);
237234
}
238235

239-
@MinimizeMode
240-
public static int getMinimizeOnExitAction(@NonNull final Context context) {
236+
public static MinimizeMode getMinimizeOnExitAction(@NonNull final Context context) {
241237
final String action = getPreferences(context)
242238
.getString(context.getString(R.string.minimize_on_exit_key), "");
243239
if (action.equals(context.getString(R.string.minimize_on_exit_popup_key))) {

0 commit comments

Comments
 (0)