mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-27 01:22:33 -06:00
41 lines
1.2 KiB
Java
41 lines
1.2 KiB
Java
package com.google.android.exoplayer2.util;
|
|
|
|
import java.lang.annotation.Documented;
|
|
import java.lang.annotation.ElementType;
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
import java.lang.annotation.Target;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class RepeatModeUtil {
|
|
public static final int REPEAT_TOGGLE_MODE_ALL = 2;
|
|
public static final int REPEAT_TOGGLE_MODE_NONE = 0;
|
|
public static final int REPEAT_TOGGLE_MODE_ONE = 1;
|
|
|
|
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE, ElementType.TYPE_USE})
|
|
@Documented
|
|
@Retention(RetentionPolicy.SOURCE)
|
|
/* loaded from: classes2.dex */
|
|
public @interface RepeatToggleModes {
|
|
}
|
|
|
|
public static boolean isRepeatModeEnabled(int i, int i2) {
|
|
if (i != 0) {
|
|
return i != 1 ? i == 2 && (i2 & 2) != 0 : (i2 & 1) != 0;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
private RepeatModeUtil() {
|
|
}
|
|
|
|
public static int getNextRepeatMode(int i, int i2) {
|
|
for (int i3 = 1; i3 <= 2; i3++) {
|
|
int i4 = (i + i3) % 3;
|
|
if (isRepeatModeEnabled(i4, i2)) {
|
|
return i4;
|
|
}
|
|
}
|
|
return i;
|
|
}
|
|
}
|