Class RepeatModeUtil
- java.lang.Object
-
- com.google.android.exoplayer2.util.RepeatModeUtil
-
public final class RepeatModeUtil extends Object
Util class for repeat mode handling.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RepeatModeUtil.RepeatToggleModes
Set of repeat toggle modes.
-
Field Summary
Fields Modifier and Type Field Description static int
REPEAT_TOGGLE_MODE_ALL
"Repeat All" button enabled.static int
REPEAT_TOGGLE_MODE_NONE
All repeat mode buttons disabled.static int
REPEAT_TOGGLE_MODE_ONE
"Repeat One" button enabled.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @com.google.android.exoplayer2.Player.RepeatMode int
getNextRepeatMode(@com.google.android.exoplayer2.Player.RepeatMode int currentMode, int enabledModes)
Gets the next repeat mode out ofenabledModes
starting fromcurrentMode
.static boolean
isRepeatModeEnabled(@com.google.android.exoplayer2.Player.RepeatMode int repeatMode, int enabledModes)
Verifies whether a givenrepeatMode
is enabled in the bitmaskenabledModes
.
-
-
-
Field Detail
-
REPEAT_TOGGLE_MODE_NONE
public static final int REPEAT_TOGGLE_MODE_NONE
All repeat mode buttons disabled.- See Also:
- Constant Field Values
-
REPEAT_TOGGLE_MODE_ONE
public static final int REPEAT_TOGGLE_MODE_ONE
"Repeat One" button enabled.- See Also:
- Constant Field Values
-
REPEAT_TOGGLE_MODE_ALL
public static final int REPEAT_TOGGLE_MODE_ALL
"Repeat All" button enabled.- See Also:
- Constant Field Values
-
-
Method Detail
-
getNextRepeatMode
@RepeatMode public static @com.google.android.exoplayer2.Player.RepeatMode int getNextRepeatMode(@RepeatMode @com.google.android.exoplayer2.Player.RepeatMode int currentMode, int enabledModes)
Gets the next repeat mode out ofenabledModes
starting fromcurrentMode
.- Parameters:
currentMode
- The current repeat mode.enabledModes
- Bitmask of enabled modes.- Returns:
- The next repeat mode.
-
isRepeatModeEnabled
public static boolean isRepeatModeEnabled(@RepeatMode @com.google.android.exoplayer2.Player.RepeatMode int repeatMode, int enabledModes)
Verifies whether a givenrepeatMode
is enabled in the bitmaskenabledModes
.- Parameters:
repeatMode
- The mode to check.enabledModes
- The bitmask representing the enabled modes.- Returns:
true
if enabled.
-
-