Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,131 @@
package com.google.android.exoplayer2.ui;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
/* loaded from: classes2.dex */
public final class AspectRatioFrameLayout extends FrameLayout {
public final AspectRatioUpdateDispatcher aspectRatioUpdateDispatcher;
public int resizeMode;
public float videoAspectRatio;
public interface AspectRatioListener {
}
public void setAspectRatioListener(@Nullable AspectRatioListener aspectRatioListener) {
}
public static /* synthetic */ AspectRatioListener access$100(AspectRatioFrameLayout aspectRatioFrameLayout) {
aspectRatioFrameLayout.getClass();
return null;
}
public AspectRatioFrameLayout(Context context) {
this(context, null);
}
public AspectRatioFrameLayout(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
this.resizeMode = 0;
if (attributeSet != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet, R$styleable.AspectRatioFrameLayout, 0, 0);
try {
this.resizeMode = obtainStyledAttributes.getInt(R$styleable.AspectRatioFrameLayout_resize_mode, 0);
} finally {
obtainStyledAttributes.recycle();
}
}
this.aspectRatioUpdateDispatcher = new AspectRatioUpdateDispatcher();
}
public void setAspectRatio(float f) {
if (this.videoAspectRatio != f) {
this.videoAspectRatio = f;
requestLayout();
}
}
public void setResizeMode(int i) {
if (this.resizeMode != i) {
this.resizeMode = i;
requestLayout();
}
}
@Override // android.widget.FrameLayout, android.view.View
public void onMeasure(int i, int i2) {
float f;
float f2;
super.onMeasure(i, i2);
if (this.videoAspectRatio <= 0.0f) {
return;
}
int measuredWidth = getMeasuredWidth();
int measuredHeight = getMeasuredHeight();
float f3 = measuredWidth;
float f4 = measuredHeight;
float f5 = f3 / f4;
float f6 = (this.videoAspectRatio / f5) - 1.0f;
if (Math.abs(f6) <= 0.01f) {
this.aspectRatioUpdateDispatcher.scheduleUpdate(this.videoAspectRatio, f5, false);
return;
}
int i3 = this.resizeMode;
if (i3 != 0) {
if (i3 != 1) {
if (i3 == 2) {
f = this.videoAspectRatio;
} else if (i3 == 4) {
if (f6 > 0.0f) {
f = this.videoAspectRatio;
} else {
f2 = this.videoAspectRatio;
}
}
measuredWidth = (int) (f4 * f);
} else {
f2 = this.videoAspectRatio;
}
measuredHeight = (int) (f3 / f2);
} else if (f6 > 0.0f) {
f2 = this.videoAspectRatio;
measuredHeight = (int) (f3 / f2);
} else {
f = this.videoAspectRatio;
measuredWidth = (int) (f4 * f);
}
this.aspectRatioUpdateDispatcher.scheduleUpdate(this.videoAspectRatio, f5, true);
super.onMeasure(View.MeasureSpec.makeMeasureSpec(measuredWidth, 1073741824), View.MeasureSpec.makeMeasureSpec(measuredHeight, 1073741824));
}
public final class AspectRatioUpdateDispatcher implements Runnable {
public boolean aspectRatioMismatch;
public boolean isScheduled;
public float naturalAspectRatio;
public float targetAspectRatio;
public AspectRatioUpdateDispatcher() {
}
public void scheduleUpdate(float f, float f2, boolean z) {
this.targetAspectRatio = f;
this.naturalAspectRatio = f2;
this.aspectRatioMismatch = z;
if (this.isScheduled) {
return;
}
this.isScheduled = true;
AspectRatioFrameLayout.this.post(this);
}
@Override // java.lang.Runnable
public void run() {
this.isScheduled = false;
AspectRatioFrameLayout.access$100(AspectRatioFrameLayout.this);
}
}
}

View File

@@ -0,0 +1,69 @@
package com.google.android.exoplayer2.ui;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;
import androidx.annotation.Nullable;
import com.amazonaws.handlers.HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0;
import com.google.android.exoplayer2.ui.SubtitleView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes2.dex */
final class CanvasSubtitleOutput extends View implements SubtitleView.Output {
public float bottomPaddingFraction;
public List cues;
public final List painters;
public CaptionStyleCompat style;
public float textSize;
public int textSizeType;
public CanvasSubtitleOutput(Context context) {
this(context, null);
}
public CanvasSubtitleOutput(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
this.painters = new ArrayList();
this.cues = Collections.emptyList();
this.textSizeType = 0;
this.textSize = 0.0533f;
this.style = CaptionStyleCompat.DEFAULT;
this.bottomPaddingFraction = 0.08f;
}
@Override // com.google.android.exoplayer2.ui.SubtitleView.Output
public void update(List list, CaptionStyleCompat captionStyleCompat, float f, int i, float f2) {
this.cues = list;
this.style = captionStyleCompat;
this.textSize = f;
this.textSizeType = i;
this.bottomPaddingFraction = f2;
while (this.painters.size() < list.size()) {
this.painters.add(new SubtitlePainter(getContext()));
}
invalidate();
}
@Override // android.view.View
public void dispatchDraw(Canvas canvas) {
List list = this.cues;
if (list.isEmpty()) {
return;
}
int height = getHeight();
int paddingLeft = getPaddingLeft();
int paddingTop = getPaddingTop();
int width = getWidth() - getPaddingRight();
int paddingBottom = height - getPaddingBottom();
if (paddingBottom <= paddingTop || width <= paddingLeft) {
return;
}
if (SubtitleViewUtils.resolveTextSize(this.textSizeType, this.textSize, height, paddingBottom - paddingTop) > 0.0f && list.size() > 0) {
HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0.m(list.get(0));
throw null;
}
}
}

View File

@@ -0,0 +1,41 @@
package com.google.android.exoplayer2.ui;
import android.graphics.Typeface;
import android.view.accessibility.CaptioningManager;
import androidx.core.view.ViewCompat;
import com.google.android.exoplayer2.util.Util;
/* loaded from: classes2.dex */
public final class CaptionStyleCompat {
public static final CaptionStyleCompat DEFAULT = new CaptionStyleCompat(-1, ViewCompat.MEASURED_STATE_MASK, 0, 0, -1, null);
public final int backgroundColor;
public final int edgeColor;
public final int edgeType;
public final int foregroundColor;
public final Typeface typeface;
public final int windowColor;
public static CaptionStyleCompat createFromCaptionStyle(CaptioningManager.CaptionStyle captionStyle) {
if (Util.SDK_INT >= 21) {
return createFromCaptionStyleV21(captionStyle);
}
return createFromCaptionStyleV19(captionStyle);
}
public CaptionStyleCompat(int i, int i2, int i3, int i4, int i5, Typeface typeface) {
this.foregroundColor = i;
this.backgroundColor = i2;
this.windowColor = i3;
this.edgeType = i4;
this.edgeColor = i5;
this.typeface = typeface;
}
public static CaptionStyleCompat createFromCaptionStyleV19(CaptioningManager.CaptionStyle captionStyle) {
return new CaptionStyleCompat(captionStyle.foregroundColor, captionStyle.backgroundColor, 0, captionStyle.edgeType, captionStyle.edgeColor, captionStyle.getTypeface());
}
public static CaptionStyleCompat createFromCaptionStyleV21(CaptioningManager.CaptionStyle captionStyle) {
return new CaptionStyleCompat(captionStyle.hasForegroundColor() ? captionStyle.foregroundColor : DEFAULT.foregroundColor, captionStyle.hasBackgroundColor() ? captionStyle.backgroundColor : DEFAULT.backgroundColor, captionStyle.hasWindowColor() ? captionStyle.windowColor : DEFAULT.windowColor, captionStyle.hasEdgeType() ? captionStyle.edgeType : DEFAULT.edgeType, captionStyle.hasEdgeColor() ? captionStyle.edgeColor : DEFAULT.edgeColor, captionStyle.getTypeface());
}
}

View File

@@ -0,0 +1,5 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public abstract /* synthetic */ class DefaultTimeBar$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,812 @@
package com.google.android.exoplayer2.ui;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewParent;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import androidx.annotation.ColorInt;
import androidx.annotation.Nullable;
import com.google.android.exoplayer2.ui.TimeBar;
import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.Util;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.util.Collections;
import java.util.Formatter;
import java.util.Iterator;
import java.util.Locale;
import java.util.concurrent.CopyOnWriteArraySet;
/* loaded from: classes2.dex */
public class DefaultTimeBar extends View implements TimeBar {
public int adGroupCount;
public long[] adGroupTimesMs;
public final Paint adMarkerPaint;
public final int adMarkerWidth;
public final int barGravity;
public final int barHeight;
public final Rect bufferedBar;
public final Paint bufferedPaint;
public long bufferedPosition;
public final float density;
public long duration;
public final int fineScrubYThreshold;
public final StringBuilder formatBuilder;
public final Formatter formatter;
public int keyCountIncrement;
public long keyTimeIncrement;
public int lastCoarseScrubXPosition;
public Rect lastExclusionRectangle;
public final CopyOnWriteArraySet listeners;
public boolean[] playedAdGroups;
public final Paint playedAdMarkerPaint;
public final Paint playedPaint;
public long position;
public final Rect progressBar;
public long scrubPosition;
public final Rect scrubberBar;
public final int scrubberDisabledSize;
public final int scrubberDraggedSize;
public final Drawable scrubberDrawable;
public final int scrubberEnabledSize;
public final int scrubberPadding;
public boolean scrubberPaddingDisabled;
public final Paint scrubberPaint;
public float scrubberScale;
public ValueAnimator scrubberScalingAnimator;
public boolean scrubbing;
public final Rect seekBounds;
public final Runnable stopScrubbingRunnable;
public final Point touchPosition;
public final int touchTargetHeight;
public final Paint unplayedPaint;
public static int dpToPx(float f, int i) {
return (int) ((i * f) + 0.5f);
}
public DefaultTimeBar(Context context) {
this(context, null);
}
public DefaultTimeBar(Context context, @Nullable AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public DefaultTimeBar(Context context, @Nullable AttributeSet attributeSet, int i) {
this(context, attributeSet, i, attributeSet);
}
public DefaultTimeBar(Context context, AttributeSet attributeSet, int i, AttributeSet attributeSet2) {
this(context, attributeSet, i, attributeSet2, 0);
}
public DefaultTimeBar(Context context, AttributeSet attributeSet, int i, AttributeSet attributeSet2, int i2) {
super(context, attributeSet, i);
this.seekBounds = new Rect();
this.progressBar = new Rect();
this.bufferedBar = new Rect();
this.scrubberBar = new Rect();
Paint paint = new Paint();
this.playedPaint = paint;
Paint paint2 = new Paint();
this.bufferedPaint = paint2;
Paint paint3 = new Paint();
this.unplayedPaint = paint3;
Paint paint4 = new Paint();
this.adMarkerPaint = paint4;
Paint paint5 = new Paint();
this.playedAdMarkerPaint = paint5;
Paint paint6 = new Paint();
this.scrubberPaint = paint6;
paint6.setAntiAlias(true);
this.listeners = new CopyOnWriteArraySet();
this.touchPosition = new Point();
float f = context.getResources().getDisplayMetrics().density;
this.density = f;
this.fineScrubYThreshold = dpToPx(f, -50);
int dpToPx = dpToPx(f, 4);
int dpToPx2 = dpToPx(f, 26);
int dpToPx3 = dpToPx(f, 4);
int dpToPx4 = dpToPx(f, 12);
int dpToPx5 = dpToPx(f, 0);
int dpToPx6 = dpToPx(f, 16);
if (attributeSet2 != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet2, R$styleable.DefaultTimeBar, i, i2);
try {
Drawable drawable = obtainStyledAttributes.getDrawable(R$styleable.DefaultTimeBar_scrubber_drawable);
this.scrubberDrawable = drawable;
if (drawable != null) {
setDrawableLayoutDirection(drawable);
dpToPx2 = Math.max(drawable.getMinimumHeight(), dpToPx2);
}
this.barHeight = obtainStyledAttributes.getDimensionPixelSize(R$styleable.DefaultTimeBar_bar_height, dpToPx);
this.touchTargetHeight = obtainStyledAttributes.getDimensionPixelSize(R$styleable.DefaultTimeBar_touch_target_height, dpToPx2);
this.barGravity = obtainStyledAttributes.getInt(R$styleable.DefaultTimeBar_bar_gravity, 0);
this.adMarkerWidth = obtainStyledAttributes.getDimensionPixelSize(R$styleable.DefaultTimeBar_ad_marker_width, dpToPx3);
this.scrubberEnabledSize = obtainStyledAttributes.getDimensionPixelSize(R$styleable.DefaultTimeBar_scrubber_enabled_size, dpToPx4);
this.scrubberDisabledSize = obtainStyledAttributes.getDimensionPixelSize(R$styleable.DefaultTimeBar_scrubber_disabled_size, dpToPx5);
this.scrubberDraggedSize = obtainStyledAttributes.getDimensionPixelSize(R$styleable.DefaultTimeBar_scrubber_dragged_size, dpToPx6);
int i3 = obtainStyledAttributes.getInt(R$styleable.DefaultTimeBar_played_color, -1);
int i4 = obtainStyledAttributes.getInt(R$styleable.DefaultTimeBar_scrubber_color, -1);
int i5 = obtainStyledAttributes.getInt(R$styleable.DefaultTimeBar_buffered_color, -855638017);
int i6 = obtainStyledAttributes.getInt(R$styleable.DefaultTimeBar_unplayed_color, 872415231);
int i7 = obtainStyledAttributes.getInt(R$styleable.DefaultTimeBar_ad_marker_color, -1291845888);
int i8 = obtainStyledAttributes.getInt(R$styleable.DefaultTimeBar_played_ad_marker_color, 872414976);
paint.setColor(i3);
paint6.setColor(i4);
paint2.setColor(i5);
paint3.setColor(i6);
paint4.setColor(i7);
paint5.setColor(i8);
obtainStyledAttributes.recycle();
} catch (Throwable th) {
obtainStyledAttributes.recycle();
throw th;
}
} else {
this.barHeight = dpToPx;
this.touchTargetHeight = dpToPx2;
this.barGravity = 0;
this.adMarkerWidth = dpToPx3;
this.scrubberEnabledSize = dpToPx4;
this.scrubberDisabledSize = dpToPx5;
this.scrubberDraggedSize = dpToPx6;
paint.setColor(-1);
paint6.setColor(-1);
paint2.setColor(-855638017);
paint3.setColor(872415231);
paint4.setColor(-1291845888);
paint5.setColor(872414976);
this.scrubberDrawable = null;
}
StringBuilder sb = new StringBuilder();
this.formatBuilder = sb;
this.formatter = new Formatter(sb, Locale.getDefault());
this.stopScrubbingRunnable = new Runnable() { // from class: com.google.android.exoplayer2.ui.DefaultTimeBar$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
DefaultTimeBar.this.lambda$new$0();
}
};
Drawable drawable2 = this.scrubberDrawable;
if (drawable2 != null) {
this.scrubberPadding = (drawable2.getMinimumWidth() + 1) / 2;
} else {
this.scrubberPadding = (Math.max(this.scrubberDisabledSize, Math.max(this.scrubberEnabledSize, this.scrubberDraggedSize)) + 1) / 2;
}
this.scrubberScale = 1.0f;
ValueAnimator valueAnimator = new ValueAnimator();
this.scrubberScalingAnimator = valueAnimator;
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.google.android.exoplayer2.ui.DefaultTimeBar$$ExternalSyntheticLambda2
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator2) {
DefaultTimeBar.this.lambda$new$1(valueAnimator2);
}
});
this.duration = C.TIME_UNSET;
this.keyTimeIncrement = C.TIME_UNSET;
this.keyCountIncrement = 20;
setFocusable(true);
if (getImportantForAccessibility() == 0) {
setImportantForAccessibility(1);
}
}
public final /* synthetic */ void lambda$new$0() {
stopScrubbing(false);
}
public final /* synthetic */ void lambda$new$1(ValueAnimator valueAnimator) {
this.scrubberScale = ((Float) valueAnimator.getAnimatedValue()).floatValue();
invalidate(this.seekBounds);
}
public void showScrubber() {
if (this.scrubberScalingAnimator.isStarted()) {
this.scrubberScalingAnimator.cancel();
}
this.scrubberPaddingDisabled = false;
this.scrubberScale = 1.0f;
invalidate(this.seekBounds);
}
public void showScrubber(long j) {
if (this.scrubberScalingAnimator.isStarted()) {
this.scrubberScalingAnimator.cancel();
}
this.scrubberPaddingDisabled = false;
this.scrubberScalingAnimator.setFloatValues(this.scrubberScale, 1.0f);
this.scrubberScalingAnimator.setDuration(j);
this.scrubberScalingAnimator.start();
}
public void hideScrubber(boolean z) {
if (this.scrubberScalingAnimator.isStarted()) {
this.scrubberScalingAnimator.cancel();
}
this.scrubberPaddingDisabled = z;
this.scrubberScale = 0.0f;
invalidate(this.seekBounds);
}
public void hideScrubber(long j) {
if (this.scrubberScalingAnimator.isStarted()) {
this.scrubberScalingAnimator.cancel();
}
this.scrubberScalingAnimator.setFloatValues(this.scrubberScale, 0.0f);
this.scrubberScalingAnimator.setDuration(j);
this.scrubberScalingAnimator.start();
}
public void setPlayedColor(@ColorInt int i) {
this.playedPaint.setColor(i);
invalidate(this.seekBounds);
}
public void setScrubberColor(@ColorInt int i) {
this.scrubberPaint.setColor(i);
invalidate(this.seekBounds);
}
public void setBufferedColor(@ColorInt int i) {
this.bufferedPaint.setColor(i);
invalidate(this.seekBounds);
}
public void setUnplayedColor(@ColorInt int i) {
this.unplayedPaint.setColor(i);
invalidate(this.seekBounds);
}
public void setAdMarkerColor(@ColorInt int i) {
this.adMarkerPaint.setColor(i);
invalidate(this.seekBounds);
}
public void setPlayedAdMarkerColor(@ColorInt int i) {
this.playedAdMarkerPaint.setColor(i);
invalidate(this.seekBounds);
}
@Override // com.google.android.exoplayer2.ui.TimeBar
public void addListener(TimeBar.OnScrubListener onScrubListener) {
Assertions.checkNotNull(onScrubListener);
this.listeners.add(onScrubListener);
}
public void setKeyTimeIncrement(long j) {
Assertions.checkArgument(j > 0);
this.keyCountIncrement = -1;
this.keyTimeIncrement = j;
}
public void setKeyCountIncrement(int i) {
Assertions.checkArgument(i > 0);
this.keyCountIncrement = i;
this.keyTimeIncrement = C.TIME_UNSET;
}
@Override // com.google.android.exoplayer2.ui.TimeBar
public void setPosition(long j) {
if (this.position == j) {
return;
}
this.position = j;
setContentDescription(getProgressText());
update();
}
@Override // com.google.android.exoplayer2.ui.TimeBar
public void setBufferedPosition(long j) {
if (this.bufferedPosition == j) {
return;
}
this.bufferedPosition = j;
update();
}
public void setDuration(long j) {
if (this.duration == j) {
return;
}
this.duration = j;
if (this.scrubbing && j == C.TIME_UNSET) {
stopScrubbing(true);
}
update();
}
public void setAdGroupTimesMs(@Nullable long[] jArr, @Nullable boolean[] zArr, int i) {
Assertions.checkArgument(i == 0 || !(jArr == null || zArr == null));
this.adGroupCount = i;
this.adGroupTimesMs = jArr;
this.playedAdGroups = zArr;
update();
}
@Override // android.view.View, com.google.android.exoplayer2.ui.TimeBar
public void setEnabled(boolean z) {
super.setEnabled(z);
if (!this.scrubbing || z) {
return;
}
stopScrubbing(true);
}
@Override // android.view.View
public void onDraw(Canvas canvas) {
canvas.save();
drawTimeBar(canvas);
drawPlayhead(canvas);
canvas.restore();
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x0025, code lost:
if (r3 != 3) goto L34;
*/
@Override // android.view.View
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public boolean onTouchEvent(android.view.MotionEvent r8) {
/*
r7 = this;
boolean r0 = r7.isEnabled()
r1 = 0
if (r0 == 0) goto L76
long r2 = r7.duration
r4 = 0
int r0 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1))
if (r0 > 0) goto L10
goto L76
L10:
android.graphics.Point r0 = r7.resolveRelativeTouchPosition(r8)
int r2 = r0.x
int r0 = r0.y
int r3 = r8.getAction()
r4 = 1
if (r3 == 0) goto L5d
r5 = 3
if (r3 == r4) goto L4e
r6 = 2
if (r3 == r6) goto L28
if (r3 == r5) goto L4e
goto L76
L28:
boolean r8 = r7.scrubbing
if (r8 == 0) goto L76
int r8 = r7.fineScrubYThreshold
if (r0 >= r8) goto L3a
int r8 = r7.lastCoarseScrubXPosition
int r2 = r2 - r8
int r2 = r2 / r5
int r8 = r8 + r2
float r8 = (float) r8
r7.positionScrubber(r8)
goto L40
L3a:
r7.lastCoarseScrubXPosition = r2
float r8 = (float) r2
r7.positionScrubber(r8)
L40:
long r0 = r7.getScrubberPosition()
r7.updateScrubbing(r0)
r7.update()
r7.invalidate()
return r4
L4e:
boolean r0 = r7.scrubbing
if (r0 == 0) goto L76
int r8 = r8.getAction()
if (r8 != r5) goto L59
r1 = r4
L59:
r7.stopScrubbing(r1)
return r4
L5d:
float r8 = (float) r2
float r0 = (float) r0
boolean r0 = r7.isInSeekBar(r8, r0)
if (r0 == 0) goto L76
r7.positionScrubber(r8)
long r0 = r7.getScrubberPosition()
r7.startScrubbing(r0)
r7.update()
r7.invalidate()
return r4
L76:
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.exoplayer2.ui.DefaultTimeBar.onTouchEvent(android.view.MotionEvent):boolean");
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Removed duplicated region for block: B:9:0x001a */
@Override // android.view.View, android.view.KeyEvent.Callback
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public boolean onKeyDown(int r5, android.view.KeyEvent r6) {
/*
r4 = this;
boolean r0 = r4.isEnabled()
if (r0 == 0) goto L30
long r0 = r4.getPositionIncrement()
r2 = 66
r3 = 1
if (r5 == r2) goto L27
switch(r5) {
case 21: goto L13;
case 22: goto L14;
case 23: goto L27;
default: goto L12;
}
L12:
goto L30
L13:
long r0 = -r0
L14:
boolean r0 = r4.scrubIncrementally(r0)
if (r0 == 0) goto L30
java.lang.Runnable r5 = r4.stopScrubbingRunnable
r4.removeCallbacks(r5)
java.lang.Runnable r5 = r4.stopScrubbingRunnable
r0 = 1000(0x3e8, double:4.94E-321)
r4.postDelayed(r5, r0)
return r3
L27:
boolean r0 = r4.scrubbing
if (r0 == 0) goto L30
r5 = 0
r4.stopScrubbing(r5)
return r3
L30:
boolean r5 = super.onKeyDown(r5, r6)
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.exoplayer2.ui.DefaultTimeBar.onKeyDown(int, android.view.KeyEvent):boolean");
}
@Override // android.view.View
public void onFocusChanged(boolean z, int i, Rect rect) {
super.onFocusChanged(z, i, rect);
if (!this.scrubbing || z) {
return;
}
stopScrubbing(false);
}
@Override // android.view.View
public void drawableStateChanged() {
super.drawableStateChanged();
updateDrawableState();
}
@Override // android.view.View
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
Drawable drawable = this.scrubberDrawable;
if (drawable != null) {
drawable.jumpToCurrentState();
}
}
@Override // android.view.View
public void onMeasure(int i, int i2) {
int mode = View.MeasureSpec.getMode(i2);
int size = View.MeasureSpec.getSize(i2);
if (mode == 0) {
size = this.touchTargetHeight;
} else if (mode != 1073741824) {
size = Math.min(this.touchTargetHeight, size);
}
setMeasuredDimension(View.MeasureSpec.getSize(i), size);
updateDrawableState();
}
@Override // android.view.View
public void onLayout(boolean z, int i, int i2, int i3, int i4) {
int i5;
int i6;
int i7 = i3 - i;
int i8 = i4 - i2;
int paddingLeft = getPaddingLeft();
int paddingRight = i7 - getPaddingRight();
int i9 = this.scrubberPaddingDisabled ? 0 : this.scrubberPadding;
if (this.barGravity == 1) {
i5 = (i8 - getPaddingBottom()) - this.touchTargetHeight;
int paddingBottom = i8 - getPaddingBottom();
int i10 = this.barHeight;
i6 = (paddingBottom - i10) - Math.max(i9 - (i10 / 2), 0);
} else {
i5 = (i8 - this.touchTargetHeight) / 2;
i6 = (i8 - this.barHeight) / 2;
}
this.seekBounds.set(paddingLeft, i5, paddingRight, this.touchTargetHeight + i5);
Rect rect = this.progressBar;
Rect rect2 = this.seekBounds;
rect.set(rect2.left + i9, i6, rect2.right - i9, this.barHeight + i6);
if (Util.SDK_INT >= 29) {
setSystemGestureExclusionRectsV29(i7, i8);
}
update();
}
@Override // android.view.View
public void onRtlPropertiesChanged(int i) {
Drawable drawable = this.scrubberDrawable;
if (drawable == null || !setDrawableLayoutDirection(drawable, i)) {
return;
}
invalidate();
}
@Override // android.view.View
public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
super.onInitializeAccessibilityEvent(accessibilityEvent);
if (accessibilityEvent.getEventType() == 4) {
accessibilityEvent.getText().add(getProgressText());
}
accessibilityEvent.setClassName("android.widget.SeekBar");
}
@Override // android.view.View
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
accessibilityNodeInfo.setClassName("android.widget.SeekBar");
accessibilityNodeInfo.setContentDescription(getProgressText());
if (this.duration <= 0) {
return;
}
if (Util.SDK_INT >= 21) {
accessibilityNodeInfo.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD);
accessibilityNodeInfo.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_BACKWARD);
} else {
accessibilityNodeInfo.addAction(4096);
accessibilityNodeInfo.addAction(8192);
}
}
@Override // android.view.View
public boolean performAccessibilityAction(int i, Bundle bundle) {
if (super.performAccessibilityAction(i, bundle)) {
return true;
}
if (this.duration <= 0) {
return false;
}
if (i == 8192) {
if (scrubIncrementally(-getPositionIncrement())) {
stopScrubbing(false);
}
} else {
if (i != 4096) {
return false;
}
if (scrubIncrementally(getPositionIncrement())) {
stopScrubbing(false);
}
}
sendAccessibilityEvent(4);
return true;
}
public final void startScrubbing(long j) {
this.scrubPosition = j;
this.scrubbing = true;
setPressed(true);
ViewParent parent = getParent();
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(true);
}
Iterator it = this.listeners.iterator();
while (it.hasNext()) {
((TimeBar.OnScrubListener) it.next()).onScrubStart(this, j);
}
}
public final void updateScrubbing(long j) {
if (this.scrubPosition == j) {
return;
}
this.scrubPosition = j;
Iterator it = this.listeners.iterator();
while (it.hasNext()) {
((TimeBar.OnScrubListener) it.next()).onScrubMove(this, j);
}
}
public final void stopScrubbing(boolean z) {
removeCallbacks(this.stopScrubbingRunnable);
this.scrubbing = false;
setPressed(false);
ViewParent parent = getParent();
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(false);
}
invalidate();
Iterator it = this.listeners.iterator();
while (it.hasNext()) {
((TimeBar.OnScrubListener) it.next()).onScrubStop(this, this.scrubPosition, z);
}
}
public final boolean scrubIncrementally(long j) {
long j2 = this.duration;
if (j2 <= 0) {
return false;
}
long j3 = this.scrubbing ? this.scrubPosition : this.position;
long constrainValue = Util.constrainValue(j3 + j, 0L, j2);
if (constrainValue == j3) {
return false;
}
if (!this.scrubbing) {
startScrubbing(constrainValue);
} else {
updateScrubbing(constrainValue);
}
update();
return true;
}
public final void update() {
this.bufferedBar.set(this.progressBar);
this.scrubberBar.set(this.progressBar);
long j = this.scrubbing ? this.scrubPosition : this.position;
if (this.duration > 0) {
int width = (int) ((this.progressBar.width() * this.bufferedPosition) / this.duration);
Rect rect = this.bufferedBar;
Rect rect2 = this.progressBar;
rect.right = Math.min(rect2.left + width, rect2.right);
int width2 = (int) ((this.progressBar.width() * j) / this.duration);
Rect rect3 = this.scrubberBar;
Rect rect4 = this.progressBar;
rect3.right = Math.min(rect4.left + width2, rect4.right);
} else {
Rect rect5 = this.bufferedBar;
int i = this.progressBar.left;
rect5.right = i;
this.scrubberBar.right = i;
}
invalidate(this.seekBounds);
}
public final void positionScrubber(float f) {
Rect rect = this.scrubberBar;
Rect rect2 = this.progressBar;
rect.right = Util.constrainValue((int) f, rect2.left, rect2.right);
}
public final Point resolveRelativeTouchPosition(MotionEvent motionEvent) {
this.touchPosition.set((int) motionEvent.getX(), (int) motionEvent.getY());
return this.touchPosition;
}
public final long getScrubberPosition() {
if (this.progressBar.width() <= 0 || this.duration == C.TIME_UNSET) {
return 0L;
}
return (this.scrubberBar.width() * this.duration) / this.progressBar.width();
}
public final boolean isInSeekBar(float f, float f2) {
return this.seekBounds.contains((int) f, (int) f2);
}
public final void drawTimeBar(Canvas canvas) {
int height = this.progressBar.height();
int centerY = this.progressBar.centerY() - (height / 2);
int i = height + centerY;
if (this.duration <= 0) {
Rect rect = this.progressBar;
canvas.drawRect(rect.left, centerY, rect.right, i, this.unplayedPaint);
return;
}
Rect rect2 = this.bufferedBar;
int i2 = rect2.left;
int i3 = rect2.right;
int max = Math.max(Math.max(this.progressBar.left, i3), this.scrubberBar.right);
int i4 = this.progressBar.right;
if (max < i4) {
canvas.drawRect(max, centerY, i4, i, this.unplayedPaint);
}
int max2 = Math.max(i2, this.scrubberBar.right);
if (i3 > max2) {
canvas.drawRect(max2, centerY, i3, i, this.bufferedPaint);
}
if (this.scrubberBar.width() > 0) {
Rect rect3 = this.scrubberBar;
canvas.drawRect(rect3.left, centerY, rect3.right, i, this.playedPaint);
}
if (this.adGroupCount == 0) {
return;
}
long[] jArr = (long[]) Assertions.checkNotNull(this.adGroupTimesMs);
boolean[] zArr = (boolean[]) Assertions.checkNotNull(this.playedAdGroups);
int i5 = this.adMarkerWidth / 2;
for (int i6 = 0; i6 < this.adGroupCount; i6++) {
int width = ((int) ((this.progressBar.width() * Util.constrainValue(jArr[i6], 0L, this.duration)) / this.duration)) - i5;
Rect rect4 = this.progressBar;
canvas.drawRect(rect4.left + Math.min(rect4.width() - this.adMarkerWidth, Math.max(0, width)), centerY, r10 + this.adMarkerWidth, i, zArr[i6] ? this.playedAdMarkerPaint : this.adMarkerPaint);
}
}
public final void drawPlayhead(Canvas canvas) {
int i;
if (this.duration <= 0) {
return;
}
Rect rect = this.scrubberBar;
int constrainValue = Util.constrainValue(rect.right, rect.left, this.progressBar.right);
int centerY = this.scrubberBar.centerY();
if (this.scrubberDrawable == null) {
if (this.scrubbing || isFocused()) {
i = this.scrubberDraggedSize;
} else {
i = isEnabled() ? this.scrubberEnabledSize : this.scrubberDisabledSize;
}
canvas.drawCircle(constrainValue, centerY, (int) ((i * this.scrubberScale) / 2.0f), this.scrubberPaint);
return;
}
int intrinsicWidth = ((int) (r2.getIntrinsicWidth() * this.scrubberScale)) / 2;
int intrinsicHeight = ((int) (this.scrubberDrawable.getIntrinsicHeight() * this.scrubberScale)) / 2;
this.scrubberDrawable.setBounds(constrainValue - intrinsicWidth, centerY - intrinsicHeight, constrainValue + intrinsicWidth, centerY + intrinsicHeight);
this.scrubberDrawable.draw(canvas);
}
public final void updateDrawableState() {
Drawable drawable = this.scrubberDrawable;
if (drawable != null && drawable.isStateful() && this.scrubberDrawable.setState(getDrawableState())) {
invalidate();
}
}
public final void setSystemGestureExclusionRectsV29(int i, int i2) {
Rect rect = this.lastExclusionRectangle;
if (rect != null && rect.width() == i && this.lastExclusionRectangle.height() == i2) {
return;
}
Rect rect2 = new Rect(0, 0, i, i2);
this.lastExclusionRectangle = rect2;
setSystemGestureExclusionRects(Collections.singletonList(rect2));
}
public final String getProgressText() {
return Util.getStringForTime(this.formatBuilder, this.formatter, this.position);
}
public final long getPositionIncrement() {
long j = this.keyTimeIncrement;
if (j != C.TIME_UNSET) {
return j;
}
long j2 = this.duration;
if (j2 == C.TIME_UNSET) {
return 0L;
}
return j2 / this.keyCountIncrement;
}
public final boolean setDrawableLayoutDirection(Drawable drawable) {
return Util.SDK_INT >= 23 && setDrawableLayoutDirection(drawable, getLayoutDirection());
}
public static boolean setDrawableLayoutDirection(Drawable drawable, int i) {
return Util.SDK_INT >= 23 && drawable.setLayoutDirection(i);
}
}

View File

@@ -0,0 +1,13 @@
package com.google.android.exoplayer2.ui;
import android.content.res.Resources;
import com.google.android.exoplayer2.util.Assertions;
/* loaded from: classes2.dex */
public class DefaultTrackNameProvider implements TrackNameProvider {
public final Resources resources;
public DefaultTrackNameProvider(Resources resources) {
this.resources = (Resources) Assertions.checkNotNull(resources);
}
}

View File

@@ -0,0 +1,22 @@
package com.google.android.exoplayer2.ui;
import android.graphics.Color;
import com.google.android.exoplayer2.util.Util;
import csdk.gluads.Consts;
/* loaded from: classes2.dex */
public abstract class HtmlUtils {
public static String toCssRgba(int i) {
return Util.formatInvariant("rgba(%d,%d,%d,%.3f)", Integer.valueOf(Color.red(i)), Integer.valueOf(Color.green(i)), Integer.valueOf(Color.blue(i)), Double.valueOf(Color.alpha(i) / 255.0d));
}
public static String cssAllClassDescendantsSelector(String str) {
StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 5 + String.valueOf(str).length());
sb.append(Consts.STRING_PERIOD);
sb.append(str);
sb.append(",.");
sb.append(str);
sb.append(" *");
return sb.toString();
}
}

View File

@@ -0,0 +1,651 @@
package com.google.android.exoplayer2.ui;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Looper;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.DoNotInline;
import androidx.annotation.Nullable;
import com.google.android.exoplayer2.ControlDispatcher;
import com.google.android.exoplayer2.DefaultControlDispatcher;
import com.google.android.exoplayer2.ExoPlayerLibraryInfo;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.Timeline$Period;
import com.google.android.exoplayer2.Timeline$Window;
import com.google.android.exoplayer2.ui.TimeBar;
import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.Util;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.util.Formatter;
import java.util.Iterator;
import java.util.Locale;
import java.util.concurrent.CopyOnWriteArrayList;
/* loaded from: classes2.dex */
public class PlayerControlView extends FrameLayout {
public long[] adGroupTimesMs;
public final float buttonAlphaDisabled;
public final float buttonAlphaEnabled;
public final ComponentListener componentListener;
public ControlDispatcher controlDispatcher;
public long currentBufferedPosition;
public long currentPosition;
public final TextView durationView;
public long[] extraAdGroupTimesMs;
public boolean[] extraPlayedAdGroups;
public final View fastForwardButton;
public final StringBuilder formatBuilder;
public final Formatter formatter;
public final Runnable hideAction;
public long hideAtMs;
public boolean isAttachedToWindow;
public final View nextButton;
public final View pauseButton;
public final Timeline$Period period;
public final View playButton;
public boolean[] playedAdGroups;
public final TextView positionView;
public final View previousButton;
public final String repeatAllButtonContentDescription;
public final Drawable repeatAllButtonDrawable;
public final String repeatOffButtonContentDescription;
public final Drawable repeatOffButtonDrawable;
public final String repeatOneButtonContentDescription;
public final Drawable repeatOneButtonDrawable;
public final ImageView repeatToggleButton;
public int repeatToggleModes;
public final View rewindButton;
public boolean scrubbing;
public boolean showFastForwardButton;
public boolean showMultiWindowTimeBar;
public boolean showNextButton;
public boolean showPreviousButton;
public boolean showRewindButton;
public boolean showShuffleButton;
public int showTimeoutMs;
public final ImageView shuffleButton;
public final Drawable shuffleOffButtonDrawable;
public final String shuffleOffContentDescription;
public final Drawable shuffleOnButtonDrawable;
public final String shuffleOnContentDescription;
public final TimeBar timeBar;
public int timeBarMinUpdateIntervalMs;
public final Runnable updateProgressAction;
public final CopyOnWriteArrayList visibilityListeners;
public final View vrButton;
public final Timeline$Window window;
public interface ProgressUpdateListener {
}
public interface VisibilityListener {
void onVisibilityChange(int i);
}
public int getShowTimeoutMs() {
return this.showTimeoutMs;
}
public void setProgressUpdateListener(@Nullable ProgressUpdateListener progressUpdateListener) {
}
public final boolean shouldShowPauseButton() {
return false;
}
public final void updateTimeline() {
}
public static /* synthetic */ Player access$1100(PlayerControlView playerControlView) {
playerControlView.getClass();
return null;
}
static {
ExoPlayerLibraryInfo.registerModule("goog.exo.ui");
}
public PlayerControlView(Context context) {
this(context, null);
}
public PlayerControlView(Context context, @Nullable AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public PlayerControlView(Context context, @Nullable AttributeSet attributeSet, int i) {
this(context, attributeSet, i, attributeSet);
}
public PlayerControlView(Context context, AttributeSet attributeSet, int i, AttributeSet attributeSet2) {
super(context, attributeSet, i);
int i2 = R$layout.exo_player_control_view;
this.showTimeoutMs = 5000;
this.repeatToggleModes = 0;
this.timeBarMinUpdateIntervalMs = 200;
this.hideAtMs = C.TIME_UNSET;
this.showRewindButton = true;
this.showFastForwardButton = true;
this.showPreviousButton = true;
this.showNextButton = true;
this.showShuffleButton = false;
if (attributeSet2 != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet2, R$styleable.PlayerControlView, i, 0);
try {
this.showTimeoutMs = obtainStyledAttributes.getInt(R$styleable.PlayerControlView_show_timeout, this.showTimeoutMs);
i2 = obtainStyledAttributes.getResourceId(R$styleable.PlayerControlView_controller_layout_id, i2);
this.repeatToggleModes = getRepeatToggleModes(obtainStyledAttributes, this.repeatToggleModes);
this.showRewindButton = obtainStyledAttributes.getBoolean(R$styleable.PlayerControlView_show_rewind_button, this.showRewindButton);
this.showFastForwardButton = obtainStyledAttributes.getBoolean(R$styleable.PlayerControlView_show_fastforward_button, this.showFastForwardButton);
this.showPreviousButton = obtainStyledAttributes.getBoolean(R$styleable.PlayerControlView_show_previous_button, this.showPreviousButton);
this.showNextButton = obtainStyledAttributes.getBoolean(R$styleable.PlayerControlView_show_next_button, this.showNextButton);
this.showShuffleButton = obtainStyledAttributes.getBoolean(R$styleable.PlayerControlView_show_shuffle_button, this.showShuffleButton);
setTimeBarMinUpdateInterval(obtainStyledAttributes.getInt(R$styleable.PlayerControlView_time_bar_min_update_interval, this.timeBarMinUpdateIntervalMs));
} finally {
obtainStyledAttributes.recycle();
}
}
this.visibilityListeners = new CopyOnWriteArrayList();
this.period = new Timeline$Period();
this.window = new Timeline$Window();
StringBuilder sb = new StringBuilder();
this.formatBuilder = sb;
this.formatter = new Formatter(sb, Locale.getDefault());
this.adGroupTimesMs = new long[0];
this.playedAdGroups = new boolean[0];
this.extraAdGroupTimesMs = new long[0];
this.extraPlayedAdGroups = new boolean[0];
ComponentListener componentListener = new ComponentListener();
this.componentListener = componentListener;
this.controlDispatcher = new DefaultControlDispatcher();
this.updateProgressAction = new Runnable() { // from class: com.google.android.exoplayer2.ui.PlayerControlView$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
PlayerControlView.this.updateProgress();
}
};
this.hideAction = new Runnable() { // from class: com.google.android.exoplayer2.ui.PlayerControlView$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
PlayerControlView.this.hide();
}
};
LayoutInflater.from(context).inflate(i2, this);
setDescendantFocusability(262144);
TimeBar timeBar = (TimeBar) findViewById(R$id.exo_progress);
View findViewById = findViewById(R$id.exo_progress_placeholder);
if (timeBar != null) {
this.timeBar = timeBar;
} else if (findViewById != null) {
DefaultTimeBar defaultTimeBar = new DefaultTimeBar(context, null, 0, attributeSet2);
defaultTimeBar.setId(R$id.exo_progress);
defaultTimeBar.setLayoutParams(findViewById.getLayoutParams());
ViewGroup viewGroup = (ViewGroup) findViewById.getParent();
int indexOfChild = viewGroup.indexOfChild(findViewById);
viewGroup.removeView(findViewById);
viewGroup.addView(defaultTimeBar, indexOfChild);
this.timeBar = defaultTimeBar;
} else {
this.timeBar = null;
}
this.durationView = (TextView) findViewById(R$id.exo_duration);
this.positionView = (TextView) findViewById(R$id.exo_position);
TimeBar timeBar2 = this.timeBar;
if (timeBar2 != null) {
timeBar2.addListener(componentListener);
}
View findViewById2 = findViewById(R$id.exo_play);
this.playButton = findViewById2;
if (findViewById2 != null) {
findViewById2.setOnClickListener(componentListener);
}
View findViewById3 = findViewById(R$id.exo_pause);
this.pauseButton = findViewById3;
if (findViewById3 != null) {
findViewById3.setOnClickListener(componentListener);
}
View findViewById4 = findViewById(R$id.exo_prev);
this.previousButton = findViewById4;
if (findViewById4 != null) {
findViewById4.setOnClickListener(componentListener);
}
View findViewById5 = findViewById(R$id.exo_next);
this.nextButton = findViewById5;
if (findViewById5 != null) {
findViewById5.setOnClickListener(componentListener);
}
View findViewById6 = findViewById(R$id.exo_rew);
this.rewindButton = findViewById6;
if (findViewById6 != null) {
findViewById6.setOnClickListener(componentListener);
}
View findViewById7 = findViewById(R$id.exo_ffwd);
this.fastForwardButton = findViewById7;
if (findViewById7 != null) {
findViewById7.setOnClickListener(componentListener);
}
ImageView imageView = (ImageView) findViewById(R$id.exo_repeat_toggle);
this.repeatToggleButton = imageView;
if (imageView != null) {
imageView.setOnClickListener(componentListener);
}
ImageView imageView2 = (ImageView) findViewById(R$id.exo_shuffle);
this.shuffleButton = imageView2;
if (imageView2 != null) {
imageView2.setOnClickListener(componentListener);
}
View findViewById8 = findViewById(R$id.exo_vr);
this.vrButton = findViewById8;
setShowVrButton(false);
updateButton(false, false, findViewById8);
Resources resources = context.getResources();
this.buttonAlphaEnabled = resources.getInteger(R$integer.exo_media_button_opacity_percentage_enabled) / 100.0f;
this.buttonAlphaDisabled = resources.getInteger(R$integer.exo_media_button_opacity_percentage_disabled) / 100.0f;
this.repeatOffButtonDrawable = resources.getDrawable(R$drawable.exo_controls_repeat_off);
this.repeatOneButtonDrawable = resources.getDrawable(R$drawable.exo_controls_repeat_one);
this.repeatAllButtonDrawable = resources.getDrawable(R$drawable.exo_controls_repeat_all);
this.shuffleOnButtonDrawable = resources.getDrawable(R$drawable.exo_controls_shuffle_on);
this.shuffleOffButtonDrawable = resources.getDrawable(R$drawable.exo_controls_shuffle_off);
this.repeatOffButtonContentDescription = resources.getString(R$string.exo_controls_repeat_off_description);
this.repeatOneButtonContentDescription = resources.getString(R$string.exo_controls_repeat_one_description);
this.repeatAllButtonContentDescription = resources.getString(R$string.exo_controls_repeat_all_description);
this.shuffleOnContentDescription = resources.getString(R$string.exo_controls_shuffle_on_description);
this.shuffleOffContentDescription = resources.getString(R$string.exo_controls_shuffle_off_description);
}
public void setPlayer(@Nullable Player player) {
Assertions.checkState(Looper.myLooper() == Looper.getMainLooper());
Assertions.checkArgument(player == null || player.getApplicationLooper() == Looper.getMainLooper());
if (player == null) {
return;
}
if (player != null) {
player.addListener(this.componentListener);
}
updateAll();
}
public void setShowMultiWindowTimeBar(boolean z) {
this.showMultiWindowTimeBar = z;
updateTimeline();
}
public void setExtraAdGroupMarkers(@Nullable long[] jArr, @Nullable boolean[] zArr) {
if (jArr == null) {
this.extraAdGroupTimesMs = new long[0];
this.extraPlayedAdGroups = new boolean[0];
} else {
boolean[] zArr2 = (boolean[]) Assertions.checkNotNull(zArr);
Assertions.checkArgument(jArr.length == zArr2.length);
this.extraAdGroupTimesMs = jArr;
this.extraPlayedAdGroups = zArr2;
}
updateTimeline();
}
public void addVisibilityListener(VisibilityListener visibilityListener) {
Assertions.checkNotNull(visibilityListener);
this.visibilityListeners.add(visibilityListener);
}
public void removeVisibilityListener(VisibilityListener visibilityListener) {
this.visibilityListeners.remove(visibilityListener);
}
@Deprecated
public void setControlDispatcher(ControlDispatcher controlDispatcher) {
if (this.controlDispatcher != controlDispatcher) {
this.controlDispatcher = controlDispatcher;
updateNavigation();
}
}
public void setShowRewindButton(boolean z) {
this.showRewindButton = z;
updateNavigation();
}
public void setShowFastForwardButton(boolean z) {
this.showFastForwardButton = z;
updateNavigation();
}
public void setShowPreviousButton(boolean z) {
this.showPreviousButton = z;
updateNavigation();
}
public void setShowNextButton(boolean z) {
this.showNextButton = z;
updateNavigation();
}
public void setShowTimeoutMs(int i) {
this.showTimeoutMs = i;
if (isVisible()) {
hideAfterTimeout();
}
}
public void setRepeatToggleModes(int i) {
this.repeatToggleModes = i;
updateRepeatModeButton();
}
public void setShowShuffleButton(boolean z) {
this.showShuffleButton = z;
updateShuffleButton();
}
public boolean getShowVrButton() {
View view = this.vrButton;
return view != null && view.getVisibility() == 0;
}
public void setShowVrButton(boolean z) {
View view = this.vrButton;
if (view != null) {
view.setVisibility(z ? 0 : 8);
}
}
public void setVrButtonListener(@Nullable View.OnClickListener onClickListener) {
View view = this.vrButton;
if (view != null) {
view.setOnClickListener(onClickListener);
updateButton(getShowVrButton(), onClickListener != null, this.vrButton);
}
}
public void setTimeBarMinUpdateInterval(int i) {
this.timeBarMinUpdateIntervalMs = Util.constrainValue(i, 16, 1000);
}
public void show() {
if (!isVisible()) {
setVisibility(0);
Iterator it = this.visibilityListeners.iterator();
while (it.hasNext()) {
((VisibilityListener) it.next()).onVisibilityChange(getVisibility());
}
updateAll();
requestPlayPauseFocus();
requestPlayPauseAccessibilityFocus();
}
hideAfterTimeout();
}
public void hide() {
if (isVisible()) {
setVisibility(8);
Iterator it = this.visibilityListeners.iterator();
while (it.hasNext()) {
((VisibilityListener) it.next()).onVisibilityChange(getVisibility());
}
removeCallbacks(this.updateProgressAction);
removeCallbacks(this.hideAction);
this.hideAtMs = C.TIME_UNSET;
}
}
public boolean isVisible() {
return getVisibility() == 0;
}
public final void hideAfterTimeout() {
removeCallbacks(this.hideAction);
if (this.showTimeoutMs <= 0) {
this.hideAtMs = C.TIME_UNSET;
return;
}
long uptimeMillis = SystemClock.uptimeMillis();
int i = this.showTimeoutMs;
this.hideAtMs = uptimeMillis + i;
if (this.isAttachedToWindow) {
postDelayed(this.hideAction, i);
}
}
public final void updateAll() {
updatePlayPauseButton();
updateNavigation();
updateRepeatModeButton();
updateShuffleButton();
updateTimeline();
}
public final void updatePlayPauseButton() {
boolean z;
boolean z2;
if (isVisible() && this.isAttachedToWindow) {
boolean shouldShowPauseButton = shouldShowPauseButton();
View view = this.playButton;
boolean z3 = true;
if (view != null) {
z = shouldShowPauseButton && view.isFocused();
if (Util.SDK_INT < 21) {
z2 = z;
} else {
z2 = shouldShowPauseButton && Api21.isAccessibilityFocused(this.playButton);
}
this.playButton.setVisibility(shouldShowPauseButton ? 8 : 0);
} else {
z = false;
z2 = false;
}
View view2 = this.pauseButton;
if (view2 != null) {
z |= !shouldShowPauseButton && view2.isFocused();
if (Util.SDK_INT < 21) {
z3 = z;
} else if (shouldShowPauseButton || !Api21.isAccessibilityFocused(this.pauseButton)) {
z3 = false;
}
z2 |= z3;
this.pauseButton.setVisibility(shouldShowPauseButton ? 0 : 8);
}
if (z) {
requestPlayPauseFocus();
}
if (z2) {
requestPlayPauseAccessibilityFocus();
}
}
}
public final void updateNavigation() {
if (isVisible() && this.isAttachedToWindow) {
updateButton(this.showPreviousButton, false, this.previousButton);
updateButton(this.showRewindButton, false, this.rewindButton);
updateButton(this.showFastForwardButton, false, this.fastForwardButton);
updateButton(this.showNextButton, false, this.nextButton);
TimeBar timeBar = this.timeBar;
if (timeBar != null) {
timeBar.setEnabled(false);
}
}
}
public final void updateRepeatModeButton() {
ImageView imageView;
if (isVisible() && this.isAttachedToWindow && (imageView = this.repeatToggleButton) != null) {
if (this.repeatToggleModes == 0) {
updateButton(false, false, imageView);
return;
}
updateButton(true, false, imageView);
this.repeatToggleButton.setImageDrawable(this.repeatOffButtonDrawable);
this.repeatToggleButton.setContentDescription(this.repeatOffButtonContentDescription);
}
}
public final void updateShuffleButton() {
ImageView imageView;
if (isVisible() && this.isAttachedToWindow && (imageView = this.shuffleButton) != null) {
if (!this.showShuffleButton) {
updateButton(false, false, imageView);
return;
}
updateButton(true, false, imageView);
this.shuffleButton.setImageDrawable(this.shuffleOffButtonDrawable);
this.shuffleButton.setContentDescription(this.shuffleOffContentDescription);
}
}
public final void updateProgress() {
if (isVisible() && this.isAttachedToWindow) {
boolean z = 0 != this.currentPosition;
this.currentPosition = 0L;
this.currentBufferedPosition = 0L;
TextView textView = this.positionView;
if (textView != null && !this.scrubbing && z) {
textView.setText(Util.getStringForTime(this.formatBuilder, this.formatter, 0L));
}
TimeBar timeBar = this.timeBar;
if (timeBar != null) {
timeBar.setPosition(0L);
this.timeBar.setBufferedPosition(0L);
}
removeCallbacks(this.updateProgressAction);
}
}
public final void requestPlayPauseFocus() {
View view;
View view2;
boolean shouldShowPauseButton = shouldShowPauseButton();
if (!shouldShowPauseButton && (view2 = this.playButton) != null) {
view2.requestFocus();
} else {
if (!shouldShowPauseButton || (view = this.pauseButton) == null) {
return;
}
view.requestFocus();
}
}
public final void requestPlayPauseAccessibilityFocus() {
View view;
View view2;
boolean shouldShowPauseButton = shouldShowPauseButton();
if (!shouldShowPauseButton && (view2 = this.playButton) != null) {
view2.sendAccessibilityEvent(8);
} else {
if (!shouldShowPauseButton || (view = this.pauseButton) == null) {
return;
}
view.sendAccessibilityEvent(8);
}
}
public final void updateButton(boolean z, boolean z2, View view) {
if (view == null) {
return;
}
view.setEnabled(z2);
view.setAlpha(z2 ? this.buttonAlphaEnabled : this.buttonAlphaDisabled);
view.setVisibility(z ? 0 : 8);
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
this.isAttachedToWindow = true;
long j = this.hideAtMs;
if (j != C.TIME_UNSET) {
long uptimeMillis = j - SystemClock.uptimeMillis();
if (uptimeMillis <= 0) {
hide();
} else {
postDelayed(this.hideAction, uptimeMillis);
}
} else if (isVisible()) {
hideAfterTimeout();
}
updateAll();
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
this.isAttachedToWindow = false;
removeCallbacks(this.updateProgressAction);
removeCallbacks(this.hideAction);
}
@Override // android.view.ViewGroup, android.view.View
public final boolean dispatchTouchEvent(MotionEvent motionEvent) {
if (motionEvent.getAction() == 0) {
removeCallbacks(this.hideAction);
} else if (motionEvent.getAction() == 1) {
hideAfterTimeout();
}
return super.dispatchTouchEvent(motionEvent);
}
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
return dispatchMediaKeyEvent(keyEvent) || super.dispatchKeyEvent(keyEvent);
}
public boolean dispatchMediaKeyEvent(KeyEvent keyEvent) {
keyEvent.getKeyCode();
return false;
}
public static int getRepeatToggleModes(TypedArray typedArray, int i) {
return typedArray.getInt(R$styleable.PlayerControlView_repeat_toggle_modes, i);
}
public final class ComponentListener implements Player.Listener, TimeBar.OnScrubListener, View.OnClickListener {
public ComponentListener() {
}
@Override // com.google.android.exoplayer2.ui.TimeBar.OnScrubListener
public void onScrubStart(TimeBar timeBar, long j) {
PlayerControlView.this.scrubbing = true;
if (PlayerControlView.this.positionView != null) {
PlayerControlView.this.positionView.setText(Util.getStringForTime(PlayerControlView.this.formatBuilder, PlayerControlView.this.formatter, j));
}
}
@Override // com.google.android.exoplayer2.ui.TimeBar.OnScrubListener
public void onScrubMove(TimeBar timeBar, long j) {
if (PlayerControlView.this.positionView != null) {
PlayerControlView.this.positionView.setText(Util.getStringForTime(PlayerControlView.this.formatBuilder, PlayerControlView.this.formatter, j));
}
}
@Override // com.google.android.exoplayer2.ui.TimeBar.OnScrubListener
public void onScrubStop(TimeBar timeBar, long j, boolean z) {
PlayerControlView.this.scrubbing = false;
if (z) {
return;
}
PlayerControlView.access$1100(PlayerControlView.this);
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
PlayerControlView.access$1100(PlayerControlView.this);
}
}
public static final class Api21 {
@DoNotInline
public static boolean isAccessibilityFocused(View view) {
return view.isAccessibilityFocused();
}
}
}

View File

@@ -0,0 +1,706 @@
package com.google.android.exoplayer2.ui;
import android.R;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.os.Looper;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.SurfaceView;
import android.view.TextureView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.google.android.exoplayer2.ControlDispatcher;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.Timeline$Period;
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
import com.google.android.exoplayer2.ui.PlayerControlView;
import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.ErrorMessageProvider;
import com.google.android.exoplayer2.util.Util;
import com.google.android.exoplayer2.video.VideoDecoderGLSurfaceView;
import com.google.android.exoplayer2.video.VideoSize;
import com.google.android.exoplayer2.video.spherical.SphericalGLSurfaceView;
/* loaded from: classes2.dex */
public class PlayerView extends FrameLayout {
public final FrameLayout adOverlayFrameLayout;
public final ImageView artworkView;
public final View bufferingView;
public final ComponentListener componentListener;
public final AspectRatioFrameLayout contentFrame;
public final PlayerControlView controller;
public boolean controllerAutoShow;
public boolean controllerHideDuringAds;
public boolean controllerHideOnTouch;
public int controllerShowTimeoutMs;
public PlayerControlView.VisibilityListener controllerVisibilityListener;
public CharSequence customErrorMessage;
public Drawable defaultArtwork;
public final TextView errorMessageView;
public boolean keepContentOnPlayerReset;
public final FrameLayout overlayFrameLayout;
public int showBuffering;
public final View shutterView;
public final SubtitleView subtitleView;
public final View surfaceView;
public final boolean surfaceViewIgnoresVideoAspectRatio;
public int textureViewRotation;
public boolean useArtwork;
public boolean useController;
public final boolean isDpadKey(int i) {
return i == 19 || i == 270 || i == 22 || i == 271 || i == 20 || i == 269 || i == 21 || i == 268 || i == 23;
}
public final boolean isPlayingAd() {
return false;
}
public void setControllerAutoShow(boolean z) {
this.controllerAutoShow = z;
}
public void setControllerHideDuringAds(boolean z) {
this.controllerHideDuringAds = z;
}
public final boolean shouldShowControllerIndefinitely() {
return true;
}
public PlayerView(Context context) {
this(context, null);
}
public PlayerView(Context context, @Nullable AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
/* JADX WARN: Multi-variable type inference failed */
public PlayerView(Context context, @Nullable AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
int i2;
boolean z;
int i3;
int i4;
boolean z2;
boolean z3;
int i5;
boolean z4;
int i6;
boolean z5;
int i7;
boolean z6;
boolean z7;
boolean z8;
int i8;
boolean z9;
ComponentListener componentListener = new ComponentListener();
this.componentListener = componentListener;
if (isInEditMode()) {
this.contentFrame = null;
this.shutterView = null;
this.surfaceView = null;
this.surfaceViewIgnoresVideoAspectRatio = false;
this.artworkView = null;
this.subtitleView = null;
this.bufferingView = null;
this.errorMessageView = null;
this.controller = null;
this.adOverlayFrameLayout = null;
this.overlayFrameLayout = null;
ImageView imageView = new ImageView(context);
if (Util.SDK_INT >= 23) {
configureEditModeLogoV23(getResources(), imageView);
} else {
configureEditModeLogo(getResources(), imageView);
}
addView(imageView);
return;
}
int i9 = R$layout.exo_player_view;
if (attributeSet != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet, R$styleable.PlayerView, i, 0);
try {
boolean hasValue = obtainStyledAttributes.hasValue(R$styleable.PlayerView_shutter_background_color);
int color = obtainStyledAttributes.getColor(R$styleable.PlayerView_shutter_background_color, 0);
int resourceId = obtainStyledAttributes.getResourceId(R$styleable.PlayerView_player_layout_id, i9);
boolean z10 = obtainStyledAttributes.getBoolean(R$styleable.PlayerView_use_artwork, true);
int resourceId2 = obtainStyledAttributes.getResourceId(R$styleable.PlayerView_default_artwork, 0);
boolean z11 = obtainStyledAttributes.getBoolean(R$styleable.PlayerView_use_controller, true);
int i10 = obtainStyledAttributes.getInt(R$styleable.PlayerView_surface_type, 1);
int i11 = obtainStyledAttributes.getInt(R$styleable.PlayerView_resize_mode, 0);
int i12 = obtainStyledAttributes.getInt(R$styleable.PlayerView_show_timeout, 5000);
boolean z12 = obtainStyledAttributes.getBoolean(R$styleable.PlayerView_hide_on_touch, true);
boolean z13 = obtainStyledAttributes.getBoolean(R$styleable.PlayerView_auto_show, true);
i4 = obtainStyledAttributes.getInteger(R$styleable.PlayerView_show_buffering, 0);
this.keepContentOnPlayerReset = obtainStyledAttributes.getBoolean(R$styleable.PlayerView_keep_content_on_player_reset, this.keepContentOnPlayerReset);
boolean z14 = obtainStyledAttributes.getBoolean(R$styleable.PlayerView_hide_during_ads, true);
obtainStyledAttributes.recycle();
z3 = z12;
z = z13;
i3 = i11;
z6 = z11;
i7 = resourceId2;
z5 = z10;
i6 = color;
z4 = hasValue;
i5 = i10;
i9 = resourceId;
i2 = i12;
z2 = z14;
} catch (Throwable th) {
obtainStyledAttributes.recycle();
throw th;
}
} else {
i2 = 5000;
z = true;
i3 = 0;
i4 = 0;
z2 = true;
z3 = true;
i5 = 1;
z4 = false;
i6 = 0;
z5 = true;
i7 = 0;
z6 = true;
}
LayoutInflater.from(context).inflate(i9, this);
setDescendantFocusability(262144);
AspectRatioFrameLayout aspectRatioFrameLayout = (AspectRatioFrameLayout) findViewById(R$id.exo_content_frame);
this.contentFrame = aspectRatioFrameLayout;
if (aspectRatioFrameLayout != null) {
setResizeModeRaw(aspectRatioFrameLayout, i3);
}
View findViewById = findViewById(R$id.exo_shutter);
this.shutterView = findViewById;
if (findViewById != null && z4) {
findViewById.setBackgroundColor(i6);
}
if (aspectRatioFrameLayout == null || i5 == 0) {
z7 = true;
this.surfaceView = null;
z8 = false;
} else {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(-1, -1);
if (i5 == 2) {
z7 = true;
this.surfaceView = new TextureView(context);
} else if (i5 != 3) {
if (i5 == 4) {
try {
int i13 = VideoDecoderGLSurfaceView.$r8$clinit;
this.surfaceView = (View) VideoDecoderGLSurfaceView.class.getConstructor(Context.class).newInstance(context);
} catch (Exception e) {
throw new IllegalStateException("video_decoder_gl_surface_view requires an ExoPlayer dependency", e);
}
} else {
this.surfaceView = new SurfaceView(context);
}
z7 = true;
} else {
try {
int i14 = SphericalGLSurfaceView.$r8$clinit;
z7 = true;
this.surfaceView = (View) SphericalGLSurfaceView.class.getConstructor(Context.class).newInstance(context);
z9 = true;
this.surfaceView.setLayoutParams(layoutParams);
this.surfaceView.setOnClickListener(componentListener);
this.surfaceView.setClickable(false);
aspectRatioFrameLayout.addView(this.surfaceView, 0);
z8 = z9;
} catch (Exception e2) {
throw new IllegalStateException("spherical_gl_surface_view requires an ExoPlayer dependency", e2);
}
}
z9 = false;
this.surfaceView.setLayoutParams(layoutParams);
this.surfaceView.setOnClickListener(componentListener);
this.surfaceView.setClickable(false);
aspectRatioFrameLayout.addView(this.surfaceView, 0);
z8 = z9;
}
this.surfaceViewIgnoresVideoAspectRatio = z8;
this.adOverlayFrameLayout = (FrameLayout) findViewById(R$id.exo_ad_overlay);
this.overlayFrameLayout = (FrameLayout) findViewById(R$id.exo_overlay);
ImageView imageView2 = (ImageView) findViewById(R$id.exo_artwork);
this.artworkView = imageView2;
this.useArtwork = (!z5 || imageView2 == null) ? false : z7;
if (i7 != 0) {
this.defaultArtwork = ContextCompat.getDrawable(getContext(), i7);
}
SubtitleView subtitleView = (SubtitleView) findViewById(R$id.exo_subtitles);
this.subtitleView = subtitleView;
if (subtitleView != null) {
subtitleView.setUserDefaultStyle();
subtitleView.setUserDefaultTextSize();
}
View findViewById2 = findViewById(R$id.exo_buffering);
this.bufferingView = findViewById2;
if (findViewById2 != null) {
findViewById2.setVisibility(8);
}
this.showBuffering = i4;
TextView textView = (TextView) findViewById(R$id.exo_error_message);
this.errorMessageView = textView;
if (textView != null) {
textView.setVisibility(8);
}
PlayerControlView playerControlView = (PlayerControlView) findViewById(R$id.exo_controller);
View findViewById3 = findViewById(R$id.exo_controller_placeholder);
if (playerControlView != null) {
this.controller = playerControlView;
i8 = 0;
} else if (findViewById3 != null) {
i8 = 0;
PlayerControlView playerControlView2 = new PlayerControlView(context, null, 0, attributeSet);
this.controller = playerControlView2;
playerControlView2.setId(R$id.exo_controller);
playerControlView2.setLayoutParams(findViewById3.getLayoutParams());
ViewGroup viewGroup = (ViewGroup) findViewById3.getParent();
int indexOfChild = viewGroup.indexOfChild(findViewById3);
viewGroup.removeView(findViewById3);
viewGroup.addView(playerControlView2, indexOfChild);
} else {
i8 = 0;
this.controller = null;
}
PlayerControlView playerControlView3 = this.controller;
this.controllerShowTimeoutMs = playerControlView3 != null ? i2 : i8;
this.controllerHideOnTouch = z3;
this.controllerAutoShow = z;
this.controllerHideDuringAds = z2;
this.useController = (!z6 || playerControlView3 == null) ? i8 : z7;
hideController();
updateContentDescription();
PlayerControlView playerControlView4 = this.controller;
if (playerControlView4 != null) {
playerControlView4.addVisibilityListener(componentListener);
}
}
public void setPlayer(@Nullable Player player) {
Assertions.checkState(Looper.myLooper() == Looper.getMainLooper());
Assertions.checkArgument(player == null || player.getApplicationLooper() == Looper.getMainLooper());
if (player == null) {
return;
}
SubtitleView subtitleView = this.subtitleView;
if (subtitleView != null) {
subtitleView.setCues(null);
}
if (useController()) {
this.controller.setPlayer(player);
}
updateBuffering();
updateErrorMessage();
updateForCurrentTrackSelections(true);
if (player != null) {
if (player.isCommandAvailable(26)) {
View view = this.surfaceView;
if (view instanceof TextureView) {
player.setVideoTextureView((TextureView) view);
} else if (view instanceof SurfaceView) {
player.setVideoSurfaceView((SurfaceView) view);
}
updateAspectRatio();
}
if (this.subtitleView != null && player.isCommandAvailable(27)) {
this.subtitleView.setCues(player.getCurrentCues());
}
player.addListener(this.componentListener);
maybeShowController(false);
return;
}
hideController();
}
@Override // android.view.View
public void setVisibility(int i) {
super.setVisibility(i);
View view = this.surfaceView;
if (view instanceof SurfaceView) {
view.setVisibility(i);
}
}
public void setResizeMode(int i) {
Assertions.checkStateNotNull(this.contentFrame);
this.contentFrame.setResizeMode(i);
}
public void setUseArtwork(boolean z) {
Assertions.checkState((z && this.artworkView == null) ? false : true);
if (this.useArtwork != z) {
this.useArtwork = z;
updateForCurrentTrackSelections(false);
}
}
public void setDefaultArtwork(@Nullable Drawable drawable) {
if (this.defaultArtwork != drawable) {
this.defaultArtwork = drawable;
updateForCurrentTrackSelections(false);
}
}
public void setUseController(boolean z) {
Assertions.checkState((z && this.controller == null) ? false : true);
if (this.useController == z) {
return;
}
this.useController = z;
if (useController()) {
this.controller.setPlayer(null);
} else {
PlayerControlView playerControlView = this.controller;
if (playerControlView != null) {
playerControlView.hide();
this.controller.setPlayer(null);
}
}
updateContentDescription();
}
public void setShutterBackgroundColor(int i) {
View view = this.shutterView;
if (view != null) {
view.setBackgroundColor(i);
}
}
public void setKeepContentOnPlayerReset(boolean z) {
if (this.keepContentOnPlayerReset != z) {
this.keepContentOnPlayerReset = z;
updateForCurrentTrackSelections(false);
}
}
public void setShowBuffering(int i) {
if (this.showBuffering != i) {
this.showBuffering = i;
updateBuffering();
}
}
public void setErrorMessageProvider(@Nullable ErrorMessageProvider errorMessageProvider) {
if (errorMessageProvider != null) {
updateErrorMessage();
}
}
public void setCustomErrorMessage(@Nullable CharSequence charSequence) {
Assertions.checkState(this.errorMessageView != null);
this.customErrorMessage = charSequence;
updateErrorMessage();
}
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
boolean isDpadKey = isDpadKey(keyEvent.getKeyCode());
if (isDpadKey && useController() && !this.controller.isVisible()) {
maybeShowController(true);
return true;
}
if (dispatchMediaKeyEvent(keyEvent) || super.dispatchKeyEvent(keyEvent)) {
maybeShowController(true);
return true;
}
if (isDpadKey && useController()) {
maybeShowController(true);
}
return false;
}
public boolean dispatchMediaKeyEvent(KeyEvent keyEvent) {
return useController() && this.controller.dispatchMediaKeyEvent(keyEvent);
}
public void showController() {
showController(shouldShowControllerIndefinitely());
}
public void hideController() {
PlayerControlView playerControlView = this.controller;
if (playerControlView != null) {
playerControlView.hide();
}
}
public void setControllerShowTimeoutMs(int i) {
Assertions.checkStateNotNull(this.controller);
this.controllerShowTimeoutMs = i;
if (this.controller.isVisible()) {
showController();
}
}
public void setControllerHideOnTouch(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controllerHideOnTouch = z;
updateContentDescription();
}
public void setControllerVisibilityListener(@Nullable PlayerControlView.VisibilityListener visibilityListener) {
Assertions.checkStateNotNull(this.controller);
PlayerControlView.VisibilityListener visibilityListener2 = this.controllerVisibilityListener;
if (visibilityListener2 == visibilityListener) {
return;
}
if (visibilityListener2 != null) {
this.controller.removeVisibilityListener(visibilityListener2);
}
this.controllerVisibilityListener = visibilityListener;
if (visibilityListener != null) {
this.controller.addVisibilityListener(visibilityListener);
}
}
@Deprecated
public void setControlDispatcher(ControlDispatcher controlDispatcher) {
Assertions.checkStateNotNull(this.controller);
this.controller.setControlDispatcher(controlDispatcher);
}
public void setShowRewindButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowRewindButton(z);
}
public void setShowFastForwardButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowFastForwardButton(z);
}
public void setShowPreviousButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowPreviousButton(z);
}
public void setShowNextButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowNextButton(z);
}
public void setRepeatToggleModes(int i) {
Assertions.checkStateNotNull(this.controller);
this.controller.setRepeatToggleModes(i);
}
public void setShowShuffleButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowShuffleButton(z);
}
public void setShowMultiWindowTimeBar(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowMultiWindowTimeBar(z);
}
public void setExtraAdGroupMarkers(@Nullable long[] jArr, @Nullable boolean[] zArr) {
Assertions.checkStateNotNull(this.controller);
this.controller.setExtraAdGroupMarkers(jArr, zArr);
}
public void setAspectRatioListener(@Nullable AspectRatioFrameLayout.AspectRatioListener aspectRatioListener) {
Assertions.checkStateNotNull(this.contentFrame);
this.contentFrame.setAspectRatioListener(aspectRatioListener);
}
@Override // android.view.View
public boolean onTouchEvent(MotionEvent motionEvent) {
useController();
return false;
}
@Override // android.view.View
public boolean performClick() {
super.performClick();
return toggleControllerVisibility();
}
@Override // android.view.View
public boolean onTrackballEvent(MotionEvent motionEvent) {
useController();
return false;
}
public void onContentAspectRatioChanged(AspectRatioFrameLayout aspectRatioFrameLayout, float f) {
if (aspectRatioFrameLayout != null) {
aspectRatioFrameLayout.setAspectRatio(f);
}
}
public final boolean useController() {
if (!this.useController) {
return false;
}
Assertions.checkStateNotNull(this.controller);
return true;
}
public final boolean toggleControllerVisibility() {
useController();
return false;
}
public final void maybeShowController(boolean z) {
if (!(isPlayingAd() && this.controllerHideDuringAds) && useController()) {
boolean z2 = this.controller.isVisible() && this.controller.getShowTimeoutMs() <= 0;
boolean shouldShowControllerIndefinitely = shouldShowControllerIndefinitely();
if (z || z2 || shouldShowControllerIndefinitely) {
showController(shouldShowControllerIndefinitely);
}
}
}
public final void showController(boolean z) {
if (useController()) {
this.controller.setShowTimeoutMs(z ? 0 : this.controllerShowTimeoutMs);
this.controller.show();
}
}
public final void updateForCurrentTrackSelections(boolean z) {
if (this.keepContentOnPlayerReset) {
return;
}
hideArtwork();
closeShutter();
}
public final void updateAspectRatio() {
VideoSize videoSize = VideoSize.UNKNOWN;
int i = videoSize.width;
int i2 = videoSize.height;
int i3 = videoSize.unappliedRotationDegrees;
float f = (i2 == 0 || i == 0) ? 0.0f : (i * videoSize.pixelWidthHeightRatio) / i2;
View view = this.surfaceView;
if (view instanceof TextureView) {
if (f > 0.0f && (i3 == 90 || i3 == 270)) {
f = 1.0f / f;
}
if (this.textureViewRotation != 0) {
view.removeOnLayoutChangeListener(this.componentListener);
}
this.textureViewRotation = i3;
if (i3 != 0) {
this.surfaceView.addOnLayoutChangeListener(this.componentListener);
}
applyTextureViewRotation((TextureView) this.surfaceView, this.textureViewRotation);
}
onContentAspectRatioChanged(this.contentFrame, this.surfaceViewIgnoresVideoAspectRatio ? 0.0f : f);
}
public final void hideArtwork() {
ImageView imageView = this.artworkView;
if (imageView != null) {
imageView.setImageResource(R.color.transparent);
this.artworkView.setVisibility(4);
}
}
public final void closeShutter() {
View view = this.shutterView;
if (view != null) {
view.setVisibility(0);
}
}
public final void updateBuffering() {
View view = this.bufferingView;
if (view != null) {
view.setVisibility(8);
}
}
public final void updateErrorMessage() {
TextView textView = this.errorMessageView;
if (textView != null) {
CharSequence charSequence = this.customErrorMessage;
if (charSequence != null) {
textView.setText(charSequence);
this.errorMessageView.setVisibility(0);
} else {
textView.setVisibility(8);
}
}
}
public final void updateContentDescription() {
PlayerControlView playerControlView = this.controller;
if (playerControlView == null || !this.useController) {
setContentDescription(null);
} else if (playerControlView.getVisibility() == 0) {
setContentDescription(this.controllerHideOnTouch ? getResources().getString(R$string.exo_controls_hide) : null);
} else {
setContentDescription(getResources().getString(R$string.exo_controls_show));
}
}
public static void configureEditModeLogoV23(Resources resources, ImageView imageView) {
imageView.setImageDrawable(resources.getDrawable(R$drawable.exo_edit_mode_logo, null));
imageView.setBackgroundColor(resources.getColor(R$color.exo_edit_mode_background_color, null));
}
public static void configureEditModeLogo(Resources resources, ImageView imageView) {
imageView.setImageDrawable(resources.getDrawable(R$drawable.exo_edit_mode_logo));
imageView.setBackgroundColor(resources.getColor(R$color.exo_edit_mode_background_color));
}
public static void setResizeModeRaw(AspectRatioFrameLayout aspectRatioFrameLayout, int i) {
aspectRatioFrameLayout.setResizeMode(i);
}
public static void applyTextureViewRotation(TextureView textureView, int i) {
Matrix matrix = new Matrix();
float width = textureView.getWidth();
float height = textureView.getHeight();
if (width != 0.0f && height != 0.0f && i != 0) {
float f = width / 2.0f;
float f2 = height / 2.0f;
matrix.postRotate(i, f, f2);
RectF rectF = new RectF(0.0f, 0.0f, width, height);
RectF rectF2 = new RectF();
matrix.mapRect(rectF2, rectF);
matrix.postScale(width / rectF2.width(), height / rectF2.height(), f, f2);
}
textureView.setTransform(matrix);
}
public final class ComponentListener implements Player.Listener, View.OnLayoutChangeListener, View.OnClickListener, PlayerControlView.VisibilityListener {
public final Timeline$Period period = new Timeline$Period();
public ComponentListener() {
}
@Override // android.view.View.OnLayoutChangeListener
public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
PlayerView.applyTextureViewRotation((TextureView) view, PlayerView.this.textureViewRotation);
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
PlayerView.this.toggleControllerVisibility();
}
@Override // com.google.android.exoplayer2.ui.PlayerControlView.VisibilityListener
public void onVisibilityChange(int i) {
PlayerView.this.updateContentDescription();
}
}
}

View File

@@ -0,0 +1,7 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$array {
public static int exo_playback_speeds = 2130903049;
public static int exo_speed_multiplied_by_100 = 2130903050;
}

View File

@@ -0,0 +1,66 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$attr {
public static int ad_marker_color = 2130968615;
public static int ad_marker_width = 2130968616;
public static int alpha = 2130968661;
public static int animation_enabled = 2130968663;
public static int auto_show = 2130968672;
public static int backgroundTint = 2130968676;
public static int bar_gravity = 2130968679;
public static int bar_height = 2130968680;
public static int buffered_color = 2130968682;
public static int controller_layout_id = 2130968754;
public static int default_artwork = 2130968759;
public static int fastScrollEnabled = 2130968786;
public static int fastScrollHorizontalThumbDrawable = 2130968787;
public static int fastScrollHorizontalTrackDrawable = 2130968788;
public static int fastScrollVerticalThumbDrawable = 2130968789;
public static int fastScrollVerticalTrackDrawable = 2130968790;
public static int font = 2130968792;
public static int fontProviderAuthority = 2130968794;
public static int fontProviderCerts = 2130968795;
public static int fontProviderFetchStrategy = 2130968797;
public static int fontProviderFetchTimeout = 2130968798;
public static int fontProviderPackage = 2130968799;
public static int fontProviderQuery = 2130968800;
public static int fontStyle = 2130968802;
public static int fontVariationSettings = 2130968803;
public static int fontWeight = 2130968804;
public static int hide_during_ads = 2130968809;
public static int hide_on_touch = 2130968810;
public static int keep_content_on_player_reset = 2130968824;
public static int layoutManager = 2130968829;
public static int played_ad_marker_color = 2130968877;
public static int played_color = 2130968878;
public static int player_layout_id = 2130968879;
public static int recyclerViewStyle = 2130968893;
public static int repeat_toggle_modes = 2130968894;
public static int resize_mode = 2130968895;
public static int reverseLayout = 2130968896;
public static int scrubber_color = 2130968898;
public static int scrubber_disabled_size = 2130968899;
public static int scrubber_dragged_size = 2130968900;
public static int scrubber_drawable = 2130968901;
public static int scrubber_enabled_size = 2130968902;
public static int show_buffering = 2130968914;
public static int show_fastforward_button = 2130968915;
public static int show_next_button = 2130968916;
public static int show_previous_button = 2130968917;
public static int show_rewind_button = 2130968918;
public static int show_shuffle_button = 2130968919;
public static int show_subtitle_button = 2130968920;
public static int show_timeout = 2130968921;
public static int show_vr_button = 2130968922;
public static int shutter_background_color = 2130968923;
public static int spanCount = 2130968925;
public static int stackFromEnd = 2130968931;
public static int surface_type = 2130968941;
public static int time_bar_min_update_interval = 2130968966;
public static int touch_target_height = 2130968984;
public static int ttcIndex = 2130968988;
public static int unplayed_color = 2130968989;
public static int use_artwork = 2130968990;
public static int use_controller = 2130968991;
}

View File

@@ -0,0 +1,22 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$color {
public static int androidx_core_ripple_material_light = 2131099685;
public static int androidx_core_secondary_text_default_material_light = 2131099686;
public static int exo_black_opacity_60 = 2131099769;
public static int exo_black_opacity_70 = 2131099770;
public static int exo_bottom_bar_background = 2131099771;
public static int exo_edit_mode_background_color = 2131099772;
public static int exo_error_message_background_color = 2131099773;
public static int exo_styled_error_message_background = 2131099774;
public static int exo_white = 2131099775;
public static int exo_white_opacity_70 = 2131099776;
public static int notification_action_color_filter = 2131099879;
public static int notification_icon_bg_color = 2131099880;
public static int notification_material_background_media_default_color = 2131099881;
public static int primary_text_default_material_dark = 2131099886;
public static int ripple_material_light = 2131099891;
public static int secondary_text_default_material_dark = 2131099892;
public static int secondary_text_default_material_light = 2131099893;
}

View File

@@ -0,0 +1,68 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$dimen {
public static int compat_button_inset_horizontal_material = 2131165333;
public static int compat_button_inset_vertical_material = 2131165334;
public static int compat_button_padding_horizontal_material = 2131165335;
public static int compat_button_padding_vertical_material = 2131165336;
public static int compat_control_corner_material = 2131165337;
public static int compat_notification_large_icon_max_height = 2131165338;
public static int compat_notification_large_icon_max_width = 2131165339;
public static int exo_error_message_height = 2131165343;
public static int exo_error_message_margin_bottom = 2131165344;
public static int exo_error_message_text_padding_horizontal = 2131165345;
public static int exo_error_message_text_padding_vertical = 2131165346;
public static int exo_error_message_text_size = 2131165347;
public static int exo_icon_horizontal_margin = 2131165348;
public static int exo_icon_padding = 2131165349;
public static int exo_icon_padding_bottom = 2131165350;
public static int exo_icon_size = 2131165351;
public static int exo_icon_text_size = 2131165352;
public static int exo_media_button_height = 2131165353;
public static int exo_media_button_width = 2131165354;
public static int exo_setting_width = 2131165355;
public static int exo_settings_height = 2131165356;
public static int exo_settings_icon_size = 2131165357;
public static int exo_settings_main_text_size = 2131165358;
public static int exo_settings_offset = 2131165359;
public static int exo_settings_sub_text_size = 2131165360;
public static int exo_settings_text_height = 2131165361;
public static int exo_small_icon_height = 2131165362;
public static int exo_small_icon_horizontal_margin = 2131165363;
public static int exo_small_icon_padding_horizontal = 2131165364;
public static int exo_small_icon_padding_vertical = 2131165365;
public static int exo_small_icon_width = 2131165366;
public static int exo_styled_bottom_bar_height = 2131165367;
public static int exo_styled_bottom_bar_margin_top = 2131165368;
public static int exo_styled_bottom_bar_time_padding = 2131165369;
public static int exo_styled_controls_padding = 2131165370;
public static int exo_styled_minimal_controls_margin_bottom = 2131165371;
public static int exo_styled_progress_bar_height = 2131165372;
public static int exo_styled_progress_dragged_thumb_size = 2131165373;
public static int exo_styled_progress_enabled_thumb_size = 2131165374;
public static int exo_styled_progress_layout_height = 2131165375;
public static int exo_styled_progress_margin_bottom = 2131165376;
public static int exo_styled_progress_touch_target_height = 2131165377;
public static int fastscroll_default_thickness = 2131165378;
public static int fastscroll_margin = 2131165379;
public static int fastscroll_minimum_range = 2131165380;
public static int item_touch_helper_max_drag_scroll_per_frame = 2131165431;
public static int item_touch_helper_swipe_escape_max_velocity = 2131165432;
public static int item_touch_helper_swipe_escape_velocity = 2131165433;
public static int notification_action_icon_size = 2131165445;
public static int notification_action_text_size = 2131165446;
public static int notification_big_circle_margin = 2131165447;
public static int notification_content_margin_start = 2131165448;
public static int notification_large_icon_height = 2131165449;
public static int notification_large_icon_width = 2131165450;
public static int notification_main_column_padding_top = 2131165451;
public static int notification_media_narrow_margin = 2131165452;
public static int notification_right_icon_size = 2131165453;
public static int notification_right_side_padding_top = 2131165454;
public static int notification_small_icon_background_padding = 2131165455;
public static int notification_small_icon_size_as_large = 2131165456;
public static int notification_subtext_size = 2131165457;
public static int notification_top_pad = 2131165458;
public static int notification_top_pad_large_text = 2131165459;
}

View File

@@ -0,0 +1,96 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$drawable {
public static int exo_controls_fastforward = 2131230994;
public static int exo_controls_fullscreen_enter = 2131230995;
public static int exo_controls_fullscreen_exit = 2131230996;
public static int exo_controls_next = 2131230997;
public static int exo_controls_pause = 2131230998;
public static int exo_controls_play = 2131230999;
public static int exo_controls_previous = 2131231000;
public static int exo_controls_repeat_all = 2131231001;
public static int exo_controls_repeat_off = 2131231002;
public static int exo_controls_repeat_one = 2131231003;
public static int exo_controls_rewind = 2131231004;
public static int exo_controls_shuffle_off = 2131231005;
public static int exo_controls_shuffle_on = 2131231006;
public static int exo_controls_vr = 2131231007;
public static int exo_edit_mode_logo = 2131231008;
public static int exo_ic_audiotrack = 2131231009;
public static int exo_ic_check = 2131231010;
public static int exo_ic_chevron_left = 2131231011;
public static int exo_ic_chevron_right = 2131231012;
public static int exo_ic_default_album_image = 2131231013;
public static int exo_ic_forward = 2131231014;
public static int exo_ic_fullscreen_enter = 2131231015;
public static int exo_ic_fullscreen_exit = 2131231016;
public static int exo_ic_pause_circle_filled = 2131231017;
public static int exo_ic_play_circle_filled = 2131231018;
public static int exo_ic_rewind = 2131231019;
public static int exo_ic_settings = 2131231020;
public static int exo_ic_skip_next = 2131231021;
public static int exo_ic_skip_previous = 2131231022;
public static int exo_ic_speed = 2131231023;
public static int exo_ic_subtitle_off = 2131231024;
public static int exo_ic_subtitle_on = 2131231025;
public static int exo_icon_circular_play = 2131231026;
public static int exo_icon_fastforward = 2131231027;
public static int exo_icon_fullscreen_enter = 2131231028;
public static int exo_icon_fullscreen_exit = 2131231029;
public static int exo_icon_next = 2131231030;
public static int exo_icon_pause = 2131231031;
public static int exo_icon_play = 2131231032;
public static int exo_icon_previous = 2131231033;
public static int exo_icon_repeat_all = 2131231034;
public static int exo_icon_repeat_off = 2131231035;
public static int exo_icon_repeat_one = 2131231036;
public static int exo_icon_rewind = 2131231037;
public static int exo_icon_shuffle_off = 2131231038;
public static int exo_icon_shuffle_on = 2131231039;
public static int exo_icon_stop = 2131231040;
public static int exo_icon_vr = 2131231041;
public static int exo_notification_fastforward = 2131231042;
public static int exo_notification_next = 2131231043;
public static int exo_notification_pause = 2131231044;
public static int exo_notification_play = 2131231045;
public static int exo_notification_previous = 2131231046;
public static int exo_notification_rewind = 2131231047;
public static int exo_notification_small_icon = 2131231048;
public static int exo_notification_stop = 2131231049;
public static int exo_rounded_rectangle = 2131231050;
public static int exo_styled_controls_audiotrack = 2131231051;
public static int exo_styled_controls_check = 2131231052;
public static int exo_styled_controls_fastforward = 2131231053;
public static int exo_styled_controls_fullscreen_enter = 2131231054;
public static int exo_styled_controls_fullscreen_exit = 2131231055;
public static int exo_styled_controls_next = 2131231056;
public static int exo_styled_controls_overflow_hide = 2131231057;
public static int exo_styled_controls_overflow_show = 2131231058;
public static int exo_styled_controls_pause = 2131231059;
public static int exo_styled_controls_play = 2131231060;
public static int exo_styled_controls_previous = 2131231061;
public static int exo_styled_controls_repeat_all = 2131231062;
public static int exo_styled_controls_repeat_off = 2131231063;
public static int exo_styled_controls_repeat_one = 2131231064;
public static int exo_styled_controls_rewind = 2131231065;
public static int exo_styled_controls_settings = 2131231066;
public static int exo_styled_controls_shuffle_off = 2131231067;
public static int exo_styled_controls_shuffle_on = 2131231068;
public static int exo_styled_controls_speed = 2131231069;
public static int exo_styled_controls_subtitle_off = 2131231070;
public static int exo_styled_controls_subtitle_on = 2131231071;
public static int exo_styled_controls_vr = 2131231072;
public static int notification_action_background = 2131231297;
public static int notification_bg = 2131231298;
public static int notification_bg_low = 2131231299;
public static int notification_bg_low_normal = 2131231300;
public static int notification_bg_low_pressed = 2131231301;
public static int notification_bg_normal = 2131231302;
public static int notification_bg_normal_pressed = 2131231303;
public static int notification_icon_background = 2131231304;
public static int notification_template_icon_bg = 2131231306;
public static int notification_template_icon_low_bg = 2131231307;
public static int notification_tile_bg = 2131231308;
public static int notify_panel_notification_icon_bg = 2131231309;
}

View File

@@ -0,0 +1,6 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$font {
public static int roboto_medium_numbers = 2131296256;
}

View File

@@ -0,0 +1,143 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$id {
public static int accessibility_action_clickable_span = 2131361801;
public static int accessibility_custom_action_0 = 2131361802;
public static int accessibility_custom_action_1 = 2131361803;
public static int accessibility_custom_action_10 = 2131361804;
public static int accessibility_custom_action_11 = 2131361805;
public static int accessibility_custom_action_12 = 2131361806;
public static int accessibility_custom_action_13 = 2131361807;
public static int accessibility_custom_action_14 = 2131361808;
public static int accessibility_custom_action_15 = 2131361809;
public static int accessibility_custom_action_16 = 2131361810;
public static int accessibility_custom_action_17 = 2131361811;
public static int accessibility_custom_action_18 = 2131361812;
public static int accessibility_custom_action_19 = 2131361813;
public static int accessibility_custom_action_2 = 2131361814;
public static int accessibility_custom_action_20 = 2131361815;
public static int accessibility_custom_action_21 = 2131361816;
public static int accessibility_custom_action_22 = 2131361817;
public static int accessibility_custom_action_23 = 2131361818;
public static int accessibility_custom_action_24 = 2131361819;
public static int accessibility_custom_action_25 = 2131361820;
public static int accessibility_custom_action_26 = 2131361821;
public static int accessibility_custom_action_27 = 2131361822;
public static int accessibility_custom_action_28 = 2131361823;
public static int accessibility_custom_action_29 = 2131361824;
public static int accessibility_custom_action_3 = 2131361825;
public static int accessibility_custom_action_30 = 2131361826;
public static int accessibility_custom_action_31 = 2131361827;
public static int accessibility_custom_action_4 = 2131361828;
public static int accessibility_custom_action_5 = 2131361829;
public static int accessibility_custom_action_6 = 2131361830;
public static int accessibility_custom_action_7 = 2131361831;
public static int accessibility_custom_action_8 = 2131361832;
public static int accessibility_custom_action_9 = 2131361833;
public static int action0 = 2131361834;
public static int action_container = 2131361842;
public static int action_divider = 2131361844;
public static int action_image = 2131361845;
public static int action_text = 2131361852;
public static int actions = 2131361853;
public static int always = 2131361906;
public static int async = 2131361928;
public static int blocking = 2131361937;
public static int bottom = 2131361938;
public static int cancel_action = 2131361951;
public static int center = 2131361953;
public static int chronometer = 2131361958;
public static int dialog_button = 2131361985;
public static int end_padder = 2131361993;
public static int exo_ad_overlay = 2131361994;
public static int exo_artwork = 2131361995;
public static int exo_audio_track = 2131361996;
public static int exo_basic_controls = 2131361997;
public static int exo_bottom_bar = 2131361998;
public static int exo_buffering = 2131361999;
public static int exo_center_controls = 2131362000;
public static int exo_check = 2131362001;
public static int exo_content_frame = 2131362002;
public static int exo_controller = 2131362003;
public static int exo_controller_placeholder = 2131362004;
public static int exo_controls_background = 2131362005;
public static int exo_duration = 2131362006;
public static int exo_error_message = 2131362007;
public static int exo_extra_controls = 2131362008;
public static int exo_extra_controls_scroll_view = 2131362009;
public static int exo_ffwd = 2131362010;
public static int exo_ffwd_with_amount = 2131362011;
public static int exo_fullscreen = 2131362012;
public static int exo_icon = 2131362013;
public static int exo_main_text = 2131362014;
public static int exo_minimal_controls = 2131362015;
public static int exo_minimal_fullscreen = 2131362016;
public static int exo_next = 2131362017;
public static int exo_overflow_hide = 2131362018;
public static int exo_overflow_show = 2131362019;
public static int exo_overlay = 2131362020;
public static int exo_pause = 2131362021;
public static int exo_play = 2131362022;
public static int exo_play_pause = 2131362023;
public static int exo_playback_speed = 2131362024;
public static int exo_position = 2131362025;
public static int exo_prev = 2131362026;
public static int exo_progress = 2131362027;
public static int exo_progress_placeholder = 2131362028;
public static int exo_repeat_toggle = 2131362029;
public static int exo_rew = 2131362030;
public static int exo_rew_with_amount = 2131362031;
public static int exo_settings = 2131362032;
public static int exo_settings_listview = 2131362033;
public static int exo_shuffle = 2131362034;
public static int exo_shutter = 2131362035;
public static int exo_sub_text = 2131362036;
public static int exo_subtitle = 2131362037;
public static int exo_subtitles = 2131362038;
public static int exo_text = 2131362039;
public static int exo_time = 2131362040;
public static int exo_track_selection_view = 2131362041;
public static int exo_vr = 2131362042;
public static int fill = 2131362045;
public static int fit = 2131362052;
public static int fixed_height = 2131362053;
public static int fixed_width = 2131362054;
public static int forever = 2131362055;
public static int icon = 2131362122;
public static int icon_group = 2131362123;
public static int info = 2131362129;
public static int italic = 2131362134;
public static int item_touch_helper_previous_elevation = 2131362136;
public static int line1 = 2131362141;
public static int line3 = 2131362142;
public static int media_actions = 2131362333;
public static int media_controller_compat_view_tag = 2131362334;
public static int never = 2131362348;
public static int none = 2131362350;
public static int normal = 2131362351;
public static int notification_background = 2131362352;
public static int notification_main_column = 2131362353;
public static int notification_main_column_container = 2131362354;
public static int right_icon = 2131362376;
public static int right_side = 2131362377;
public static int spherical_gl_surface_view = 2131362402;
public static int status_bar_latest_event_content = 2131362409;
public static int surface_view = 2131362413;
public static int tag_accessibility_actions = 2131362416;
public static int tag_accessibility_clickable_spans = 2131362417;
public static int tag_accessibility_heading = 2131362418;
public static int tag_accessibility_pane_title = 2131362419;
public static int tag_screen_reader_focusable = 2131362423;
public static int tag_transition_group = 2131362425;
public static int tag_unhandled_key_event_manager = 2131362426;
public static int tag_unhandled_key_listeners = 2131362427;
public static int text = 2131362429;
public static int text2 = 2131362430;
public static int texture_view = 2131362434;
public static int time = 2131362435;
public static int title = 2131362436;
public static int video_decoder_gl_surface_view = 2131362447;
public static int when_playing = 2131362453;
public static int zoom = 2131362457;
}

View File

@@ -0,0 +1,9 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$integer {
public static int cancel_button_image_alpha = 2131427333;
public static int exo_media_button_opacity_percentage_disabled = 2131427341;
public static int exo_media_button_opacity_percentage_enabled = 2131427342;
public static int status_bar_notification_info_maxnum = 2131427348;
}

View File

@@ -0,0 +1,32 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$layout {
public static int custom_dialog = 2131558451;
public static int exo_list_divider = 2131558452;
public static int exo_player_control_view = 2131558453;
public static int exo_player_view = 2131558454;
public static int exo_styled_player_control_ffwd_button = 2131558455;
public static int exo_styled_player_control_rewind_button = 2131558456;
public static int exo_styled_player_control_view = 2131558457;
public static int exo_styled_player_view = 2131558458;
public static int exo_styled_settings_list = 2131558459;
public static int exo_styled_settings_list_item = 2131558460;
public static int exo_styled_sub_settings_list_item = 2131558461;
public static int exo_track_selection_dialog = 2131558462;
public static int notification_action = 2131558559;
public static int notification_action_tombstone = 2131558560;
public static int notification_media_action = 2131558561;
public static int notification_media_cancel_action = 2131558562;
public static int notification_template_big_media = 2131558563;
public static int notification_template_big_media_custom = 2131558564;
public static int notification_template_big_media_narrow = 2131558565;
public static int notification_template_big_media_narrow_custom = 2131558566;
public static int notification_template_custom_big = 2131558567;
public static int notification_template_icon_group = 2131558568;
public static int notification_template_lines_media = 2131558569;
public static int notification_template_media = 2131558570;
public static int notification_template_media_custom = 2131558571;
public static int notification_template_part_chronometer = 2131558572;
public static int notification_template_part_time = 2131558573;
}

View File

@@ -0,0 +1,7 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$plurals {
public static int exo_controls_fastforward_by_amount_description = 2131755010;
public static int exo_controls_rewind_by_amount_description = 2131755011;
}

View File

@@ -0,0 +1,57 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$string {
public static int exo_controls_cc_disabled_description = 2131886282;
public static int exo_controls_cc_enabled_description = 2131886283;
public static int exo_controls_custom_playback_speed = 2131886284;
public static int exo_controls_fastforward_description = 2131886285;
public static int exo_controls_fullscreen_enter_description = 2131886286;
public static int exo_controls_fullscreen_exit_description = 2131886287;
public static int exo_controls_hide = 2131886288;
public static int exo_controls_next_description = 2131886289;
public static int exo_controls_overflow_hide_description = 2131886290;
public static int exo_controls_overflow_show_description = 2131886291;
public static int exo_controls_pause_description = 2131886292;
public static int exo_controls_play_description = 2131886293;
public static int exo_controls_playback_speed = 2131886294;
public static int exo_controls_playback_speed_normal = 2131886295;
public static int exo_controls_previous_description = 2131886296;
public static int exo_controls_repeat_all_description = 2131886297;
public static int exo_controls_repeat_off_description = 2131886298;
public static int exo_controls_repeat_one_description = 2131886299;
public static int exo_controls_rewind_description = 2131886300;
public static int exo_controls_seek_bar_description = 2131886301;
public static int exo_controls_settings_description = 2131886302;
public static int exo_controls_show = 2131886303;
public static int exo_controls_shuffle_off_description = 2131886304;
public static int exo_controls_shuffle_on_description = 2131886305;
public static int exo_controls_stop_description = 2131886306;
public static int exo_controls_time_placeholder = 2131886307;
public static int exo_controls_vr_description = 2131886308;
public static int exo_download_completed = 2131886309;
public static int exo_download_description = 2131886310;
public static int exo_download_downloading = 2131886311;
public static int exo_download_failed = 2131886312;
public static int exo_download_notification_channel_name = 2131886313;
public static int exo_download_removing = 2131886314;
public static int exo_item_list = 2131886315;
public static int exo_track_bitrate = 2131886316;
public static int exo_track_mono = 2131886317;
public static int exo_track_resolution = 2131886318;
public static int exo_track_role_alternate = 2131886319;
public static int exo_track_role_closed_captions = 2131886320;
public static int exo_track_role_commentary = 2131886321;
public static int exo_track_role_supplementary = 2131886322;
public static int exo_track_selection_auto = 2131886323;
public static int exo_track_selection_none = 2131886324;
public static int exo_track_selection_title_audio = 2131886325;
public static int exo_track_selection_title_text = 2131886326;
public static int exo_track_selection_title_video = 2131886327;
public static int exo_track_stereo = 2131886328;
public static int exo_track_surround = 2131886329;
public static int exo_track_surround_5_point_1 = 2131886330;
public static int exo_track_surround_7_point_1 = 2131886331;
public static int exo_track_unknown = 2131886332;
public static int status_bar_notification_info_overflow = 2131886471;
}

View File

@@ -0,0 +1,50 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public final class R$style {
public static int ExoMediaButton = 2131951817;
public static int ExoMediaButton_FastForward = 2131951818;
public static int ExoMediaButton_Next = 2131951819;
public static int ExoMediaButton_Pause = 2131951820;
public static int ExoMediaButton_Play = 2131951821;
public static int ExoMediaButton_Previous = 2131951822;
public static int ExoMediaButton_Rewind = 2131951823;
public static int ExoMediaButton_VR = 2131951824;
public static int ExoStyledControls = 2131951825;
public static int ExoStyledControls_Button = 2131951826;
public static int ExoStyledControls_ButtonText = 2131951844;
public static int ExoStyledControls_Button_Bottom = 2131951827;
public static int ExoStyledControls_Button_Bottom_AudioTrack = 2131951828;
public static int ExoStyledControls_Button_Bottom_CC = 2131951829;
public static int ExoStyledControls_Button_Bottom_FullScreen = 2131951830;
public static int ExoStyledControls_Button_Bottom_OverflowHide = 2131951831;
public static int ExoStyledControls_Button_Bottom_OverflowShow = 2131951832;
public static int ExoStyledControls_Button_Bottom_PlaybackSpeed = 2131951833;
public static int ExoStyledControls_Button_Bottom_RepeatToggle = 2131951834;
public static int ExoStyledControls_Button_Bottom_Settings = 2131951835;
public static int ExoStyledControls_Button_Bottom_Shuffle = 2131951836;
public static int ExoStyledControls_Button_Bottom_VR = 2131951837;
public static int ExoStyledControls_Button_Center = 2131951838;
public static int ExoStyledControls_Button_Center_FfwdWithAmount = 2131951839;
public static int ExoStyledControls_Button_Center_Next = 2131951840;
public static int ExoStyledControls_Button_Center_PlayPause = 2131951841;
public static int ExoStyledControls_Button_Center_Previous = 2131951842;
public static int ExoStyledControls_Button_Center_RewWithAmount = 2131951843;
public static int ExoStyledControls_TimeBar = 2131951845;
public static int ExoStyledControls_TimeText = 2131951846;
public static int ExoStyledControls_TimeText_Duration = 2131951847;
public static int ExoStyledControls_TimeText_Position = 2131951848;
public static int ExoStyledControls_TimeText_Separator = 2131951849;
public static int TextAppearance_Compat_Notification = 2131951943;
public static int TextAppearance_Compat_Notification_Info = 2131951944;
public static int TextAppearance_Compat_Notification_Info_Media = 2131951945;
public static int TextAppearance_Compat_Notification_Line2 = 2131951946;
public static int TextAppearance_Compat_Notification_Line2_Media = 2131951947;
public static int TextAppearance_Compat_Notification_Media = 2131951948;
public static int TextAppearance_Compat_Notification_Time = 2131951949;
public static int TextAppearance_Compat_Notification_Time_Media = 2131951950;
public static int TextAppearance_Compat_Notification_Title = 2131951951;
public static int TextAppearance_Compat_Notification_Title_Media = 2131951952;
public static int Widget_Compat_NotificationActionContainer = 2131952065;
public static int Widget_Compat_NotificationActionText = 2131952066;
}

View File

@@ -0,0 +1,196 @@
package com.google.android.exoplayer2.ui;
import com.ea.games.r3_row.R;
/* loaded from: classes2.dex */
public final class R$styleable {
public static int AspectRatioFrameLayout_resize_mode = 0;
public static int ColorStateListItem_alpha = 3;
public static int ColorStateListItem_android_alpha = 1;
public static int ColorStateListItem_android_color = 0;
public static int ColorStateListItem_android_lStar = 2;
public static int ColorStateListItem_lStar = 4;
public static int DefaultTimeBar_ad_marker_color = 0;
public static int DefaultTimeBar_ad_marker_width = 1;
public static int DefaultTimeBar_bar_gravity = 2;
public static int DefaultTimeBar_bar_height = 3;
public static int DefaultTimeBar_buffered_color = 4;
public static int DefaultTimeBar_played_ad_marker_color = 5;
public static int DefaultTimeBar_played_color = 6;
public static int DefaultTimeBar_scrubber_color = 7;
public static int DefaultTimeBar_scrubber_disabled_size = 8;
public static int DefaultTimeBar_scrubber_dragged_size = 9;
public static int DefaultTimeBar_scrubber_drawable = 10;
public static int DefaultTimeBar_scrubber_enabled_size = 11;
public static int DefaultTimeBar_touch_target_height = 12;
public static int DefaultTimeBar_unplayed_color = 13;
public static int FontFamilyFont_android_font = 0;
public static int FontFamilyFont_android_fontStyle = 2;
public static int FontFamilyFont_android_fontVariationSettings = 4;
public static int FontFamilyFont_android_fontWeight = 1;
public static int FontFamilyFont_android_ttcIndex = 3;
public static int FontFamilyFont_font = 5;
public static int FontFamilyFont_fontStyle = 6;
public static int FontFamilyFont_fontVariationSettings = 7;
public static int FontFamilyFont_fontWeight = 8;
public static int FontFamilyFont_ttcIndex = 9;
public static int FontFamily_fontProviderAuthority = 0;
public static int FontFamily_fontProviderCerts = 1;
public static int FontFamily_fontProviderFallbackQuery = 2;
public static int FontFamily_fontProviderFetchStrategy = 3;
public static int FontFamily_fontProviderFetchTimeout = 4;
public static int FontFamily_fontProviderPackage = 5;
public static int FontFamily_fontProviderQuery = 6;
public static int FontFamily_fontProviderSystemFontFamily = 7;
public static int GradientColorItem_android_color = 0;
public static int GradientColorItem_android_offset = 1;
public static int GradientColor_android_centerColor = 7;
public static int GradientColor_android_centerX = 3;
public static int GradientColor_android_centerY = 4;
public static int GradientColor_android_endColor = 1;
public static int GradientColor_android_endX = 10;
public static int GradientColor_android_endY = 11;
public static int GradientColor_android_gradientRadius = 5;
public static int GradientColor_android_startColor = 0;
public static int GradientColor_android_startX = 8;
public static int GradientColor_android_startY = 9;
public static int GradientColor_android_tileMode = 6;
public static int GradientColor_android_type = 2;
public static int PlayerControlView_ad_marker_color = 0;
public static int PlayerControlView_ad_marker_width = 1;
public static int PlayerControlView_bar_gravity = 2;
public static int PlayerControlView_bar_height = 3;
public static int PlayerControlView_buffered_color = 4;
public static int PlayerControlView_controller_layout_id = 5;
public static int PlayerControlView_played_ad_marker_color = 6;
public static int PlayerControlView_played_color = 7;
public static int PlayerControlView_repeat_toggle_modes = 8;
public static int PlayerControlView_scrubber_color = 9;
public static int PlayerControlView_scrubber_disabled_size = 10;
public static int PlayerControlView_scrubber_dragged_size = 11;
public static int PlayerControlView_scrubber_drawable = 12;
public static int PlayerControlView_scrubber_enabled_size = 13;
public static int PlayerControlView_show_fastforward_button = 14;
public static int PlayerControlView_show_next_button = 15;
public static int PlayerControlView_show_previous_button = 16;
public static int PlayerControlView_show_rewind_button = 17;
public static int PlayerControlView_show_shuffle_button = 18;
public static int PlayerControlView_show_timeout = 19;
public static int PlayerControlView_time_bar_min_update_interval = 20;
public static int PlayerControlView_touch_target_height = 21;
public static int PlayerControlView_unplayed_color = 22;
public static int PlayerView_ad_marker_color = 0;
public static int PlayerView_ad_marker_width = 1;
public static int PlayerView_auto_show = 2;
public static int PlayerView_bar_height = 3;
public static int PlayerView_buffered_color = 4;
public static int PlayerView_controller_layout_id = 5;
public static int PlayerView_default_artwork = 6;
public static int PlayerView_hide_during_ads = 7;
public static int PlayerView_hide_on_touch = 8;
public static int PlayerView_keep_content_on_player_reset = 9;
public static int PlayerView_played_ad_marker_color = 10;
public static int PlayerView_played_color = 11;
public static int PlayerView_player_layout_id = 12;
public static int PlayerView_repeat_toggle_modes = 13;
public static int PlayerView_resize_mode = 14;
public static int PlayerView_scrubber_color = 15;
public static int PlayerView_scrubber_disabled_size = 16;
public static int PlayerView_scrubber_dragged_size = 17;
public static int PlayerView_scrubber_drawable = 18;
public static int PlayerView_scrubber_enabled_size = 19;
public static int PlayerView_show_buffering = 20;
public static int PlayerView_show_shuffle_button = 21;
public static int PlayerView_show_timeout = 22;
public static int PlayerView_shutter_background_color = 23;
public static int PlayerView_surface_type = 24;
public static int PlayerView_time_bar_min_update_interval = 25;
public static int PlayerView_touch_target_height = 26;
public static int PlayerView_unplayed_color = 27;
public static int PlayerView_use_artwork = 28;
public static int PlayerView_use_controller = 29;
public static int RecyclerView_android_clipToPadding = 1;
public static int RecyclerView_android_descendantFocusability = 2;
public static int RecyclerView_android_orientation = 0;
public static int RecyclerView_fastScrollEnabled = 3;
public static int RecyclerView_fastScrollHorizontalThumbDrawable = 4;
public static int RecyclerView_fastScrollHorizontalTrackDrawable = 5;
public static int RecyclerView_fastScrollVerticalThumbDrawable = 6;
public static int RecyclerView_fastScrollVerticalTrackDrawable = 7;
public static int RecyclerView_layoutManager = 8;
public static int RecyclerView_reverseLayout = 9;
public static int RecyclerView_spanCount = 10;
public static int RecyclerView_stackFromEnd = 11;
public static int StyledPlayerControlView_ad_marker_color = 0;
public static int StyledPlayerControlView_ad_marker_width = 1;
public static int StyledPlayerControlView_animation_enabled = 2;
public static int StyledPlayerControlView_bar_gravity = 3;
public static int StyledPlayerControlView_bar_height = 4;
public static int StyledPlayerControlView_buffered_color = 5;
public static int StyledPlayerControlView_controller_layout_id = 6;
public static int StyledPlayerControlView_played_ad_marker_color = 7;
public static int StyledPlayerControlView_played_color = 8;
public static int StyledPlayerControlView_repeat_toggle_modes = 9;
public static int StyledPlayerControlView_scrubber_color = 10;
public static int StyledPlayerControlView_scrubber_disabled_size = 11;
public static int StyledPlayerControlView_scrubber_dragged_size = 12;
public static int StyledPlayerControlView_scrubber_drawable = 13;
public static int StyledPlayerControlView_scrubber_enabled_size = 14;
public static int StyledPlayerControlView_show_fastforward_button = 15;
public static int StyledPlayerControlView_show_next_button = 16;
public static int StyledPlayerControlView_show_previous_button = 17;
public static int StyledPlayerControlView_show_rewind_button = 18;
public static int StyledPlayerControlView_show_shuffle_button = 19;
public static int StyledPlayerControlView_show_subtitle_button = 20;
public static int StyledPlayerControlView_show_timeout = 21;
public static int StyledPlayerControlView_show_vr_button = 22;
public static int StyledPlayerControlView_time_bar_min_update_interval = 23;
public static int StyledPlayerControlView_touch_target_height = 24;
public static int StyledPlayerControlView_unplayed_color = 25;
public static int StyledPlayerView_ad_marker_color = 0;
public static int StyledPlayerView_ad_marker_width = 1;
public static int StyledPlayerView_animation_enabled = 2;
public static int StyledPlayerView_auto_show = 3;
public static int StyledPlayerView_bar_gravity = 4;
public static int StyledPlayerView_bar_height = 5;
public static int StyledPlayerView_buffered_color = 6;
public static int StyledPlayerView_controller_layout_id = 7;
public static int StyledPlayerView_default_artwork = 8;
public static int StyledPlayerView_hide_during_ads = 9;
public static int StyledPlayerView_hide_on_touch = 10;
public static int StyledPlayerView_keep_content_on_player_reset = 11;
public static int StyledPlayerView_played_ad_marker_color = 12;
public static int StyledPlayerView_played_color = 13;
public static int StyledPlayerView_player_layout_id = 14;
public static int StyledPlayerView_repeat_toggle_modes = 15;
public static int StyledPlayerView_resize_mode = 16;
public static int StyledPlayerView_scrubber_color = 17;
public static int StyledPlayerView_scrubber_disabled_size = 18;
public static int StyledPlayerView_scrubber_dragged_size = 19;
public static int StyledPlayerView_scrubber_drawable = 20;
public static int StyledPlayerView_scrubber_enabled_size = 21;
public static int StyledPlayerView_show_buffering = 22;
public static int StyledPlayerView_show_shuffle_button = 23;
public static int StyledPlayerView_show_subtitle_button = 24;
public static int StyledPlayerView_show_timeout = 25;
public static int StyledPlayerView_show_vr_button = 26;
public static int StyledPlayerView_shutter_background_color = 27;
public static int StyledPlayerView_surface_type = 28;
public static int StyledPlayerView_time_bar_min_update_interval = 29;
public static int StyledPlayerView_touch_target_height = 30;
public static int StyledPlayerView_unplayed_color = 31;
public static int StyledPlayerView_use_artwork = 32;
public static int StyledPlayerView_use_controller = 33;
public static int[] AspectRatioFrameLayout = {R.attr.resize_mode};
public static int[] ColorStateListItem = {android.R.attr.color, android.R.attr.alpha, android.R.attr.lStar, R.attr.alpha, R.attr.lStar};
public static int[] DefaultTimeBar = {R.attr.ad_marker_color, R.attr.ad_marker_width, R.attr.bar_gravity, R.attr.bar_height, R.attr.buffered_color, R.attr.played_ad_marker_color, R.attr.played_color, R.attr.scrubber_color, R.attr.scrubber_disabled_size, R.attr.scrubber_dragged_size, R.attr.scrubber_drawable, R.attr.scrubber_enabled_size, R.attr.touch_target_height, R.attr.unplayed_color};
public static int[] FontFamily = {R.attr.fontProviderAuthority, R.attr.fontProviderCerts, R.attr.fontProviderFallbackQuery, R.attr.fontProviderFetchStrategy, R.attr.fontProviderFetchTimeout, R.attr.fontProviderPackage, R.attr.fontProviderQuery, R.attr.fontProviderSystemFontFamily};
public static int[] FontFamilyFont = {android.R.attr.font, android.R.attr.fontWeight, android.R.attr.fontStyle, android.R.attr.ttcIndex, android.R.attr.fontVariationSettings, R.attr.font, R.attr.fontStyle, R.attr.fontVariationSettings, R.attr.fontWeight, R.attr.ttcIndex};
public static int[] GradientColor = {android.R.attr.startColor, android.R.attr.endColor, android.R.attr.type, android.R.attr.centerX, android.R.attr.centerY, android.R.attr.gradientRadius, android.R.attr.tileMode, android.R.attr.centerColor, android.R.attr.startX, android.R.attr.startY, android.R.attr.endX, android.R.attr.endY};
public static int[] GradientColorItem = {android.R.attr.color, android.R.attr.offset};
public static int[] PlayerControlView = {R.attr.ad_marker_color, R.attr.ad_marker_width, R.attr.bar_gravity, R.attr.bar_height, R.attr.buffered_color, R.attr.controller_layout_id, R.attr.played_ad_marker_color, R.attr.played_color, R.attr.repeat_toggle_modes, R.attr.scrubber_color, R.attr.scrubber_disabled_size, R.attr.scrubber_dragged_size, R.attr.scrubber_drawable, R.attr.scrubber_enabled_size, R.attr.show_fastforward_button, R.attr.show_next_button, R.attr.show_previous_button, R.attr.show_rewind_button, R.attr.show_shuffle_button, R.attr.show_timeout, R.attr.time_bar_min_update_interval, R.attr.touch_target_height, R.attr.unplayed_color};
public static int[] PlayerView = {R.attr.ad_marker_color, R.attr.ad_marker_width, R.attr.auto_show, R.attr.bar_height, R.attr.buffered_color, R.attr.controller_layout_id, R.attr.default_artwork, R.attr.hide_during_ads, R.attr.hide_on_touch, R.attr.keep_content_on_player_reset, R.attr.played_ad_marker_color, R.attr.played_color, R.attr.player_layout_id, R.attr.repeat_toggle_modes, R.attr.resize_mode, R.attr.scrubber_color, R.attr.scrubber_disabled_size, R.attr.scrubber_dragged_size, R.attr.scrubber_drawable, R.attr.scrubber_enabled_size, R.attr.show_buffering, R.attr.show_shuffle_button, R.attr.show_timeout, R.attr.shutter_background_color, R.attr.surface_type, R.attr.time_bar_min_update_interval, R.attr.touch_target_height, R.attr.unplayed_color, R.attr.use_artwork, R.attr.use_controller};
public static int[] RecyclerView = {android.R.attr.orientation, android.R.attr.clipToPadding, android.R.attr.descendantFocusability, R.attr.fastScrollEnabled, R.attr.fastScrollHorizontalThumbDrawable, R.attr.fastScrollHorizontalTrackDrawable, R.attr.fastScrollVerticalThumbDrawable, R.attr.fastScrollVerticalTrackDrawable, R.attr.layoutManager, R.attr.reverseLayout, R.attr.spanCount, R.attr.stackFromEnd};
public static int[] StyledPlayerControlView = {R.attr.ad_marker_color, R.attr.ad_marker_width, R.attr.animation_enabled, R.attr.bar_gravity, R.attr.bar_height, R.attr.buffered_color, R.attr.controller_layout_id, R.attr.played_ad_marker_color, R.attr.played_color, R.attr.repeat_toggle_modes, R.attr.scrubber_color, R.attr.scrubber_disabled_size, R.attr.scrubber_dragged_size, R.attr.scrubber_drawable, R.attr.scrubber_enabled_size, R.attr.show_fastforward_button, R.attr.show_next_button, R.attr.show_previous_button, R.attr.show_rewind_button, R.attr.show_shuffle_button, R.attr.show_subtitle_button, R.attr.show_timeout, R.attr.show_vr_button, R.attr.time_bar_min_update_interval, R.attr.touch_target_height, R.attr.unplayed_color};
public static int[] StyledPlayerView = {R.attr.ad_marker_color, R.attr.ad_marker_width, R.attr.animation_enabled, R.attr.auto_show, R.attr.bar_gravity, R.attr.bar_height, R.attr.buffered_color, R.attr.controller_layout_id, R.attr.default_artwork, R.attr.hide_during_ads, R.attr.hide_on_touch, R.attr.keep_content_on_player_reset, R.attr.played_ad_marker_color, R.attr.played_color, R.attr.player_layout_id, R.attr.repeat_toggle_modes, R.attr.resize_mode, R.attr.scrubber_color, R.attr.scrubber_disabled_size, R.attr.scrubber_dragged_size, R.attr.scrubber_drawable, R.attr.scrubber_enabled_size, R.attr.show_buffering, R.attr.show_shuffle_button, R.attr.show_subtitle_button, R.attr.show_timeout, R.attr.show_vr_button, R.attr.shutter_background_color, R.attr.surface_type, R.attr.time_bar_min_update_interval, R.attr.touch_target_height, R.attr.unplayed_color, R.attr.use_artwork, R.attr.use_controller};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,682 @@
package com.google.android.exoplayer2.ui;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.res.Resources;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes2.dex */
public final class StyledPlayerControlViewLayoutManager {
public final ViewGroup basicControls;
public final ViewGroup bottomBar;
public final ViewGroup centerControls;
public final View controlsBackground;
public final ViewGroup extraControls;
public final ViewGroup extraControlsScrollView;
public final AnimatorSet hideAllBarsAnimator;
public final AnimatorSet hideMainBarAnimator;
public final AnimatorSet hideProgressBarAnimator;
public boolean isMinimalMode;
public final ViewGroup minimalControls;
public boolean needToShowBars;
public final ValueAnimator overflowHideAnimator;
public final ValueAnimator overflowShowAnimator;
public final View overflowShowButton;
public final AnimatorSet showAllBarsAnimator;
public final AnimatorSet showMainBarAnimator;
public final StyledPlayerControlView styledPlayerControlView;
public final View timeBar;
public final ViewGroup timeView;
public final Runnable showAllBarsRunnable = new Runnable() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
StyledPlayerControlViewLayoutManager.this.showAllBars();
}
};
public final Runnable hideAllBarsRunnable = new Runnable() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
StyledPlayerControlViewLayoutManager.this.hideAllBars();
}
};
public final Runnable hideProgressBarRunnable = new Runnable() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda4
@Override // java.lang.Runnable
public final void run() {
StyledPlayerControlViewLayoutManager.this.hideProgressBar();
}
};
public final Runnable hideMainBarRunnable = new Runnable() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda5
@Override // java.lang.Runnable
public final void run() {
StyledPlayerControlViewLayoutManager.this.hideMainBar();
}
};
public final Runnable hideControllerRunnable = new Runnable() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda6
@Override // java.lang.Runnable
public final void run() {
StyledPlayerControlViewLayoutManager.this.hideController();
}
};
public final View.OnLayoutChangeListener onLayoutChangeListener = new View.OnLayoutChangeListener() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda7
@Override // android.view.View.OnLayoutChangeListener
public final void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
StyledPlayerControlViewLayoutManager.this.onLayoutChange(view, i, i2, i3, i4, i5, i6, i7, i8);
}
};
public boolean animationEnabled = true;
public int uxState = 0;
public final List shownButtons = new ArrayList();
public void setAnimationEnabled(boolean z) {
this.animationEnabled = z;
}
public StyledPlayerControlViewLayoutManager(final StyledPlayerControlView styledPlayerControlView) {
this.styledPlayerControlView = styledPlayerControlView;
this.controlsBackground = styledPlayerControlView.findViewById(R$id.exo_controls_background);
this.centerControls = (ViewGroup) styledPlayerControlView.findViewById(R$id.exo_center_controls);
this.minimalControls = (ViewGroup) styledPlayerControlView.findViewById(R$id.exo_minimal_controls);
ViewGroup viewGroup = (ViewGroup) styledPlayerControlView.findViewById(R$id.exo_bottom_bar);
this.bottomBar = viewGroup;
this.timeView = (ViewGroup) styledPlayerControlView.findViewById(R$id.exo_time);
View findViewById = styledPlayerControlView.findViewById(R$id.exo_progress);
this.timeBar = findViewById;
this.basicControls = (ViewGroup) styledPlayerControlView.findViewById(R$id.exo_basic_controls);
this.extraControls = (ViewGroup) styledPlayerControlView.findViewById(R$id.exo_extra_controls);
this.extraControlsScrollView = (ViewGroup) styledPlayerControlView.findViewById(R$id.exo_extra_controls_scroll_view);
View findViewById2 = styledPlayerControlView.findViewById(R$id.exo_overflow_show);
this.overflowShowButton = findViewById2;
View findViewById3 = styledPlayerControlView.findViewById(R$id.exo_overflow_hide);
if (findViewById2 != null && findViewById3 != null) {
findViewById2.setOnClickListener(new View.OnClickListener() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda8
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
StyledPlayerControlViewLayoutManager.this.onOverflowButtonClick(view);
}
});
findViewById3.setOnClickListener(new View.OnClickListener() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda8
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
StyledPlayerControlViewLayoutManager.this.onOverflowButtonClick(view);
}
});
}
ValueAnimator ofFloat = ValueAnimator.ofFloat(1.0f, 0.0f);
ofFloat.setInterpolator(new LinearInterpolator());
ofFloat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda9
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
StyledPlayerControlViewLayoutManager.this.lambda$new$0(valueAnimator);
}
});
ofFloat.addListener(new AnimatorListenerAdapter() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager.1
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
if (!(StyledPlayerControlViewLayoutManager.this.timeBar instanceof DefaultTimeBar) || StyledPlayerControlViewLayoutManager.this.isMinimalMode) {
return;
}
((DefaultTimeBar) StyledPlayerControlViewLayoutManager.this.timeBar).hideScrubber(250L);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
if (StyledPlayerControlViewLayoutManager.this.controlsBackground != null) {
StyledPlayerControlViewLayoutManager.this.controlsBackground.setVisibility(4);
}
if (StyledPlayerControlViewLayoutManager.this.centerControls != null) {
StyledPlayerControlViewLayoutManager.this.centerControls.setVisibility(4);
}
if (StyledPlayerControlViewLayoutManager.this.minimalControls != null) {
StyledPlayerControlViewLayoutManager.this.minimalControls.setVisibility(4);
}
}
});
ValueAnimator ofFloat2 = ValueAnimator.ofFloat(0.0f, 1.0f);
ofFloat2.setInterpolator(new LinearInterpolator());
ofFloat2.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda10
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
StyledPlayerControlViewLayoutManager.this.lambda$new$1(valueAnimator);
}
});
ofFloat2.addListener(new AnimatorListenerAdapter() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager.2
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
if (StyledPlayerControlViewLayoutManager.this.controlsBackground != null) {
StyledPlayerControlViewLayoutManager.this.controlsBackground.setVisibility(0);
}
if (StyledPlayerControlViewLayoutManager.this.centerControls != null) {
StyledPlayerControlViewLayoutManager.this.centerControls.setVisibility(0);
}
if (StyledPlayerControlViewLayoutManager.this.minimalControls != null) {
StyledPlayerControlViewLayoutManager.this.minimalControls.setVisibility(StyledPlayerControlViewLayoutManager.this.isMinimalMode ? 0 : 4);
}
if (!(StyledPlayerControlViewLayoutManager.this.timeBar instanceof DefaultTimeBar) || StyledPlayerControlViewLayoutManager.this.isMinimalMode) {
return;
}
((DefaultTimeBar) StyledPlayerControlViewLayoutManager.this.timeBar).showScrubber(250L);
}
});
Resources resources = styledPlayerControlView.getResources();
float dimension = resources.getDimension(R$dimen.exo_styled_bottom_bar_height) - resources.getDimension(R$dimen.exo_styled_progress_bar_height);
float dimension2 = resources.getDimension(R$dimen.exo_styled_bottom_bar_height);
AnimatorSet animatorSet = new AnimatorSet();
this.hideMainBarAnimator = animatorSet;
animatorSet.setDuration(250L);
animatorSet.addListener(new AnimatorListenerAdapter() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager.3
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
StyledPlayerControlViewLayoutManager.this.setUxState(3);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
StyledPlayerControlViewLayoutManager.this.setUxState(1);
if (StyledPlayerControlViewLayoutManager.this.needToShowBars) {
styledPlayerControlView.post(StyledPlayerControlViewLayoutManager.this.showAllBarsRunnable);
StyledPlayerControlViewLayoutManager.this.needToShowBars = false;
}
}
});
animatorSet.play(ofFloat).with(ofTranslationY(0.0f, dimension, findViewById)).with(ofTranslationY(0.0f, dimension, viewGroup));
AnimatorSet animatorSet2 = new AnimatorSet();
this.hideProgressBarAnimator = animatorSet2;
animatorSet2.setDuration(250L);
animatorSet2.addListener(new AnimatorListenerAdapter() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager.4
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
StyledPlayerControlViewLayoutManager.this.setUxState(3);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
StyledPlayerControlViewLayoutManager.this.setUxState(2);
if (StyledPlayerControlViewLayoutManager.this.needToShowBars) {
styledPlayerControlView.post(StyledPlayerControlViewLayoutManager.this.showAllBarsRunnable);
StyledPlayerControlViewLayoutManager.this.needToShowBars = false;
}
}
});
animatorSet2.play(ofTranslationY(dimension, dimension2, findViewById)).with(ofTranslationY(dimension, dimension2, viewGroup));
AnimatorSet animatorSet3 = new AnimatorSet();
this.hideAllBarsAnimator = animatorSet3;
animatorSet3.setDuration(250L);
animatorSet3.addListener(new AnimatorListenerAdapter() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager.5
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
StyledPlayerControlViewLayoutManager.this.setUxState(3);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
StyledPlayerControlViewLayoutManager.this.setUxState(2);
if (StyledPlayerControlViewLayoutManager.this.needToShowBars) {
styledPlayerControlView.post(StyledPlayerControlViewLayoutManager.this.showAllBarsRunnable);
StyledPlayerControlViewLayoutManager.this.needToShowBars = false;
}
}
});
animatorSet3.play(ofFloat).with(ofTranslationY(0.0f, dimension2, findViewById)).with(ofTranslationY(0.0f, dimension2, viewGroup));
AnimatorSet animatorSet4 = new AnimatorSet();
this.showMainBarAnimator = animatorSet4;
animatorSet4.setDuration(250L);
animatorSet4.addListener(new AnimatorListenerAdapter() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager.6
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
StyledPlayerControlViewLayoutManager.this.setUxState(4);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
StyledPlayerControlViewLayoutManager.this.setUxState(0);
}
});
animatorSet4.play(ofFloat2).with(ofTranslationY(dimension, 0.0f, findViewById)).with(ofTranslationY(dimension, 0.0f, viewGroup));
AnimatorSet animatorSet5 = new AnimatorSet();
this.showAllBarsAnimator = animatorSet5;
animatorSet5.setDuration(250L);
animatorSet5.addListener(new AnimatorListenerAdapter() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager.7
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
StyledPlayerControlViewLayoutManager.this.setUxState(4);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
StyledPlayerControlViewLayoutManager.this.setUxState(0);
}
});
animatorSet5.play(ofFloat2).with(ofTranslationY(dimension2, 0.0f, findViewById)).with(ofTranslationY(dimension2, 0.0f, viewGroup));
ValueAnimator ofFloat3 = ValueAnimator.ofFloat(0.0f, 1.0f);
this.overflowShowAnimator = ofFloat3;
ofFloat3.setDuration(250L);
ofFloat3.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda1
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
StyledPlayerControlViewLayoutManager.this.lambda$new$2(valueAnimator);
}
});
ofFloat3.addListener(new AnimatorListenerAdapter() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager.8
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
if (StyledPlayerControlViewLayoutManager.this.extraControlsScrollView != null) {
StyledPlayerControlViewLayoutManager.this.extraControlsScrollView.setVisibility(0);
StyledPlayerControlViewLayoutManager.this.extraControlsScrollView.setTranslationX(StyledPlayerControlViewLayoutManager.this.extraControlsScrollView.getWidth());
StyledPlayerControlViewLayoutManager.this.extraControlsScrollView.scrollTo(StyledPlayerControlViewLayoutManager.this.extraControlsScrollView.getWidth(), 0);
}
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
if (StyledPlayerControlViewLayoutManager.this.basicControls != null) {
StyledPlayerControlViewLayoutManager.this.basicControls.setVisibility(4);
}
}
});
ValueAnimator ofFloat4 = ValueAnimator.ofFloat(1.0f, 0.0f);
this.overflowHideAnimator = ofFloat4;
ofFloat4.setDuration(250L);
ofFloat4.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda2
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
StyledPlayerControlViewLayoutManager.this.lambda$new$3(valueAnimator);
}
});
ofFloat4.addListener(new AnimatorListenerAdapter() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager.9
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
if (StyledPlayerControlViewLayoutManager.this.basicControls != null) {
StyledPlayerControlViewLayoutManager.this.basicControls.setVisibility(0);
}
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
if (StyledPlayerControlViewLayoutManager.this.extraControlsScrollView != null) {
StyledPlayerControlViewLayoutManager.this.extraControlsScrollView.setVisibility(4);
}
}
});
}
public final /* synthetic */ void lambda$new$0(ValueAnimator valueAnimator) {
float floatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
View view = this.controlsBackground;
if (view != null) {
view.setAlpha(floatValue);
}
ViewGroup viewGroup = this.centerControls;
if (viewGroup != null) {
viewGroup.setAlpha(floatValue);
}
ViewGroup viewGroup2 = this.minimalControls;
if (viewGroup2 != null) {
viewGroup2.setAlpha(floatValue);
}
}
public final /* synthetic */ void lambda$new$1(ValueAnimator valueAnimator) {
float floatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
View view = this.controlsBackground;
if (view != null) {
view.setAlpha(floatValue);
}
ViewGroup viewGroup = this.centerControls;
if (viewGroup != null) {
viewGroup.setAlpha(floatValue);
}
ViewGroup viewGroup2 = this.minimalControls;
if (viewGroup2 != null) {
viewGroup2.setAlpha(floatValue);
}
}
public final /* synthetic */ void lambda$new$2(ValueAnimator valueAnimator) {
animateOverflow(((Float) valueAnimator.getAnimatedValue()).floatValue());
}
public final /* synthetic */ void lambda$new$3(ValueAnimator valueAnimator) {
animateOverflow(((Float) valueAnimator.getAnimatedValue()).floatValue());
}
public void show() {
if (!this.styledPlayerControlView.isVisible()) {
this.styledPlayerControlView.setVisibility(0);
this.styledPlayerControlView.updateAll();
this.styledPlayerControlView.requestPlayPauseFocus();
}
showAllBars();
}
public void hide() {
int i = this.uxState;
if (i == 3 || i == 2) {
return;
}
removeHideCallbacks();
if (!this.animationEnabled) {
hideController();
} else if (this.uxState == 1) {
hideProgressBar();
} else {
hideAllBars();
}
}
public void hideImmediately() {
int i = this.uxState;
if (i == 3 || i == 2) {
return;
}
removeHideCallbacks();
hideController();
}
public void resetHideCallbacks() {
if (this.uxState == 3) {
return;
}
removeHideCallbacks();
int showTimeoutMs = this.styledPlayerControlView.getShowTimeoutMs();
if (showTimeoutMs > 0) {
if (!this.animationEnabled) {
postDelayedRunnable(this.hideControllerRunnable, showTimeoutMs);
} else if (this.uxState == 1) {
postDelayedRunnable(this.hideProgressBarRunnable, 2000L);
} else {
postDelayedRunnable(this.hideMainBarRunnable, showTimeoutMs);
}
}
}
public void removeHideCallbacks() {
this.styledPlayerControlView.removeCallbacks(this.hideControllerRunnable);
this.styledPlayerControlView.removeCallbacks(this.hideAllBarsRunnable);
this.styledPlayerControlView.removeCallbacks(this.hideMainBarRunnable);
this.styledPlayerControlView.removeCallbacks(this.hideProgressBarRunnable);
}
public void onAttachedToWindow() {
this.styledPlayerControlView.addOnLayoutChangeListener(this.onLayoutChangeListener);
}
public void onDetachedFromWindow() {
this.styledPlayerControlView.removeOnLayoutChangeListener(this.onLayoutChangeListener);
}
public boolean isFullyVisible() {
return this.uxState == 0 && this.styledPlayerControlView.isVisible();
}
public void setShowButton(View view, boolean z) {
if (view == null) {
return;
}
if (!z) {
view.setVisibility(8);
this.shownButtons.remove(view);
return;
}
if (this.isMinimalMode && shouldHideInMinimalMode(view)) {
view.setVisibility(4);
} else {
view.setVisibility(0);
}
this.shownButtons.add(view);
}
public boolean getShowButton(View view) {
return view != null && this.shownButtons.contains(view);
}
public final void setUxState(int i) {
int i2 = this.uxState;
this.uxState = i;
if (i == 2) {
this.styledPlayerControlView.setVisibility(8);
} else if (i2 == 2) {
this.styledPlayerControlView.setVisibility(0);
}
if (i2 != i) {
this.styledPlayerControlView.notifyOnVisibilityChange();
}
}
public void onLayout(boolean z, int i, int i2, int i3, int i4) {
View view = this.controlsBackground;
if (view != null) {
view.layout(0, 0, i3 - i, i4 - i2);
}
}
public final void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
boolean useMinimalMode = useMinimalMode();
if (this.isMinimalMode != useMinimalMode) {
this.isMinimalMode = useMinimalMode;
view.post(new Runnable() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda11
@Override // java.lang.Runnable
public final void run() {
StyledPlayerControlViewLayoutManager.this.updateLayoutForSizeChange();
}
});
}
boolean z = i3 - i != i7 - i5;
if (this.isMinimalMode || !z) {
return;
}
view.post(new Runnable() { // from class: com.google.android.exoplayer2.ui.StyledPlayerControlViewLayoutManager$$ExternalSyntheticLambda12
@Override // java.lang.Runnable
public final void run() {
StyledPlayerControlViewLayoutManager.this.onLayoutWidthChanged();
}
});
}
public final void onOverflowButtonClick(View view) {
resetHideCallbacks();
if (view.getId() == R$id.exo_overflow_show) {
this.overflowShowAnimator.start();
} else if (view.getId() == R$id.exo_overflow_hide) {
this.overflowHideAnimator.start();
}
}
public final void showAllBars() {
if (!this.animationEnabled) {
setUxState(0);
resetHideCallbacks();
return;
}
int i = this.uxState;
if (i == 1) {
this.showMainBarAnimator.start();
} else if (i == 2) {
this.showAllBarsAnimator.start();
} else if (i == 3) {
this.needToShowBars = true;
} else if (i == 4) {
return;
}
resetHideCallbacks();
}
public final void hideAllBars() {
this.hideAllBarsAnimator.start();
}
public final void hideProgressBar() {
this.hideProgressBarAnimator.start();
}
public final void hideMainBar() {
this.hideMainBarAnimator.start();
postDelayedRunnable(this.hideProgressBarRunnable, 2000L);
}
public final void hideController() {
setUxState(2);
}
public static ObjectAnimator ofTranslationY(float f, float f2, View view) {
return ObjectAnimator.ofFloat(view, "translationY", f, f2);
}
public final void postDelayedRunnable(Runnable runnable, long j) {
if (j >= 0) {
this.styledPlayerControlView.postDelayed(runnable, j);
}
}
public final void animateOverflow(float f) {
if (this.extraControlsScrollView != null) {
this.extraControlsScrollView.setTranslationX((int) (r0.getWidth() * (1.0f - f)));
}
ViewGroup viewGroup = this.timeView;
if (viewGroup != null) {
viewGroup.setAlpha(1.0f - f);
}
ViewGroup viewGroup2 = this.basicControls;
if (viewGroup2 != null) {
viewGroup2.setAlpha(1.0f - f);
}
}
public final boolean useMinimalMode() {
int width = (this.styledPlayerControlView.getWidth() - this.styledPlayerControlView.getPaddingLeft()) - this.styledPlayerControlView.getPaddingRight();
int height = (this.styledPlayerControlView.getHeight() - this.styledPlayerControlView.getPaddingBottom()) - this.styledPlayerControlView.getPaddingTop();
int widthWithMargins = getWidthWithMargins(this.centerControls);
ViewGroup viewGroup = this.centerControls;
int paddingLeft = widthWithMargins - (viewGroup != null ? viewGroup.getPaddingLeft() + this.centerControls.getPaddingRight() : 0);
int heightWithMargins = getHeightWithMargins(this.centerControls);
ViewGroup viewGroup2 = this.centerControls;
return width <= Math.max(paddingLeft, getWidthWithMargins(this.timeView) + getWidthWithMargins(this.overflowShowButton)) || height <= (heightWithMargins - (viewGroup2 != null ? viewGroup2.getPaddingTop() + this.centerControls.getPaddingBottom() : 0)) + (getHeightWithMargins(this.bottomBar) * 2);
}
public final void updateLayoutForSizeChange() {
ViewGroup viewGroup = this.minimalControls;
if (viewGroup != null) {
viewGroup.setVisibility(this.isMinimalMode ? 0 : 4);
}
View view = this.timeBar;
if (view != null) {
ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
int dimensionPixelSize = this.styledPlayerControlView.getResources().getDimensionPixelSize(R$dimen.exo_styled_progress_margin_bottom);
if (this.isMinimalMode) {
dimensionPixelSize = 0;
}
marginLayoutParams.bottomMargin = dimensionPixelSize;
this.timeBar.setLayoutParams(marginLayoutParams);
View view2 = this.timeBar;
if (view2 instanceof DefaultTimeBar) {
DefaultTimeBar defaultTimeBar = (DefaultTimeBar) view2;
if (this.isMinimalMode) {
defaultTimeBar.hideScrubber(true);
} else {
int i = this.uxState;
if (i == 1) {
defaultTimeBar.hideScrubber(false);
} else if (i != 3) {
defaultTimeBar.showScrubber();
}
}
}
}
for (View view3 : this.shownButtons) {
view3.setVisibility((this.isMinimalMode && shouldHideInMinimalMode(view3)) ? 4 : 0);
}
}
public final boolean shouldHideInMinimalMode(View view) {
int id = view.getId();
return id == R$id.exo_bottom_bar || id == R$id.exo_prev || id == R$id.exo_next || id == R$id.exo_rew || id == R$id.exo_rew_with_amount || id == R$id.exo_ffwd || id == R$id.exo_ffwd_with_amount;
}
public final void onLayoutWidthChanged() {
int i;
if (this.basicControls == null || this.extraControls == null) {
return;
}
int width = (this.styledPlayerControlView.getWidth() - this.styledPlayerControlView.getPaddingLeft()) - this.styledPlayerControlView.getPaddingRight();
while (true) {
if (this.extraControls.getChildCount() <= 1) {
break;
}
int childCount = this.extraControls.getChildCount() - 2;
View childAt = this.extraControls.getChildAt(childCount);
this.extraControls.removeViewAt(childCount);
this.basicControls.addView(childAt, 0);
}
View view = this.overflowShowButton;
if (view != null) {
view.setVisibility(8);
}
int widthWithMargins = getWidthWithMargins(this.timeView);
int childCount2 = this.basicControls.getChildCount() - 1;
for (int i2 = 0; i2 < childCount2; i2++) {
widthWithMargins += getWidthWithMargins(this.basicControls.getChildAt(i2));
}
if (widthWithMargins > width) {
View view2 = this.overflowShowButton;
if (view2 != null) {
view2.setVisibility(0);
widthWithMargins += getWidthWithMargins(this.overflowShowButton);
}
ArrayList arrayList = new ArrayList();
for (int i3 = 0; i3 < childCount2; i3++) {
View childAt2 = this.basicControls.getChildAt(i3);
widthWithMargins -= getWidthWithMargins(childAt2);
arrayList.add(childAt2);
if (widthWithMargins <= width) {
break;
}
}
if (arrayList.isEmpty()) {
return;
}
this.basicControls.removeViews(0, arrayList.size());
for (i = 0; i < arrayList.size(); i++) {
this.extraControls.addView((View) arrayList.get(i), this.extraControls.getChildCount() - 1);
}
return;
}
ViewGroup viewGroup = this.extraControlsScrollView;
if (viewGroup == null || viewGroup.getVisibility() != 0 || this.overflowHideAnimator.isStarted()) {
return;
}
this.overflowShowAnimator.cancel();
this.overflowHideAnimator.start();
}
public static int getWidthWithMargins(View view) {
if (view == null) {
return 0;
}
int width = view.getWidth();
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
if (!(layoutParams instanceof ViewGroup.MarginLayoutParams)) {
return width;
}
ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;
return width + marginLayoutParams.leftMargin + marginLayoutParams.rightMargin;
}
public static int getHeightWithMargins(View view) {
if (view == null) {
return 0;
}
int height = view.getHeight();
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
if (!(layoutParams instanceof ViewGroup.MarginLayoutParams)) {
return height;
}
ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;
return height + marginLayoutParams.topMargin + marginLayoutParams.bottomMargin;
}
}

View File

@@ -0,0 +1,720 @@
package com.google.android.exoplayer2.ui;
import android.R;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.os.Looper;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.SurfaceView;
import android.view.TextureView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.google.android.exoplayer2.ControlDispatcher;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.Timeline$Period;
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
import com.google.android.exoplayer2.ui.StyledPlayerControlView;
import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.ErrorMessageProvider;
import com.google.android.exoplayer2.util.Util;
import com.google.android.exoplayer2.video.VideoDecoderGLSurfaceView;
import com.google.android.exoplayer2.video.VideoSize;
import com.google.android.exoplayer2.video.spherical.SphericalGLSurfaceView;
/* loaded from: classes2.dex */
public class StyledPlayerView extends FrameLayout {
public final FrameLayout adOverlayFrameLayout;
public final ImageView artworkView;
public final View bufferingView;
public final ComponentListener componentListener;
public final AspectRatioFrameLayout contentFrame;
public final StyledPlayerControlView controller;
public boolean controllerAutoShow;
public boolean controllerHideDuringAds;
public boolean controllerHideOnTouch;
public int controllerShowTimeoutMs;
public StyledPlayerControlView.VisibilityListener controllerVisibilityListener;
public CharSequence customErrorMessage;
public Drawable defaultArtwork;
public final TextView errorMessageView;
public boolean keepContentOnPlayerReset;
public final FrameLayout overlayFrameLayout;
public int showBuffering;
public final View shutterView;
public final SubtitleView subtitleView;
public final View surfaceView;
public final boolean surfaceViewIgnoresVideoAspectRatio;
public int textureViewRotation;
public boolean useArtwork;
public boolean useController;
public final boolean isDpadKey(int i) {
return i == 19 || i == 270 || i == 22 || i == 271 || i == 20 || i == 269 || i == 21 || i == 268 || i == 23;
}
public final boolean isPlayingAd() {
return false;
}
public void setControllerAutoShow(boolean z) {
this.controllerAutoShow = z;
}
public void setControllerHideDuringAds(boolean z) {
this.controllerHideDuringAds = z;
}
public final boolean shouldShowControllerIndefinitely() {
return true;
}
public StyledPlayerView(Context context) {
this(context, null);
}
public StyledPlayerView(Context context, @Nullable AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
/* JADX WARN: Multi-variable type inference failed */
public StyledPlayerView(Context context, @Nullable AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
int i2;
boolean z;
int i3;
int i4;
boolean z2;
boolean z3;
int i5;
boolean z4;
int i6;
boolean z5;
int i7;
boolean z6;
boolean z7;
boolean z8;
int i8;
boolean z9;
ComponentListener componentListener = new ComponentListener();
this.componentListener = componentListener;
if (isInEditMode()) {
this.contentFrame = null;
this.shutterView = null;
this.surfaceView = null;
this.surfaceViewIgnoresVideoAspectRatio = false;
this.artworkView = null;
this.subtitleView = null;
this.bufferingView = null;
this.errorMessageView = null;
this.controller = null;
this.adOverlayFrameLayout = null;
this.overlayFrameLayout = null;
ImageView imageView = new ImageView(context);
if (Util.SDK_INT >= 23) {
configureEditModeLogoV23(getResources(), imageView);
} else {
configureEditModeLogo(getResources(), imageView);
}
addView(imageView);
return;
}
int i9 = R$layout.exo_styled_player_view;
if (attributeSet != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet, R$styleable.StyledPlayerView, i, 0);
try {
boolean hasValue = obtainStyledAttributes.hasValue(R$styleable.StyledPlayerView_shutter_background_color);
int color = obtainStyledAttributes.getColor(R$styleable.StyledPlayerView_shutter_background_color, 0);
int resourceId = obtainStyledAttributes.getResourceId(R$styleable.StyledPlayerView_player_layout_id, i9);
boolean z10 = obtainStyledAttributes.getBoolean(R$styleable.StyledPlayerView_use_artwork, true);
int resourceId2 = obtainStyledAttributes.getResourceId(R$styleable.StyledPlayerView_default_artwork, 0);
boolean z11 = obtainStyledAttributes.getBoolean(R$styleable.StyledPlayerView_use_controller, true);
int i10 = obtainStyledAttributes.getInt(R$styleable.StyledPlayerView_surface_type, 1);
int i11 = obtainStyledAttributes.getInt(R$styleable.StyledPlayerView_resize_mode, 0);
int i12 = obtainStyledAttributes.getInt(R$styleable.StyledPlayerView_show_timeout, 5000);
boolean z12 = obtainStyledAttributes.getBoolean(R$styleable.StyledPlayerView_hide_on_touch, true);
boolean z13 = obtainStyledAttributes.getBoolean(R$styleable.StyledPlayerView_auto_show, true);
i4 = obtainStyledAttributes.getInteger(R$styleable.StyledPlayerView_show_buffering, 0);
this.keepContentOnPlayerReset = obtainStyledAttributes.getBoolean(R$styleable.StyledPlayerView_keep_content_on_player_reset, this.keepContentOnPlayerReset);
boolean z14 = obtainStyledAttributes.getBoolean(R$styleable.StyledPlayerView_hide_during_ads, true);
obtainStyledAttributes.recycle();
z3 = z12;
z = z13;
i3 = i11;
z6 = z11;
i7 = resourceId2;
z5 = z10;
i6 = color;
z4 = hasValue;
i5 = i10;
i9 = resourceId;
i2 = i12;
z2 = z14;
} catch (Throwable th) {
obtainStyledAttributes.recycle();
throw th;
}
} else {
i2 = 5000;
z = true;
i3 = 0;
i4 = 0;
z2 = true;
z3 = true;
i5 = 1;
z4 = false;
i6 = 0;
z5 = true;
i7 = 0;
z6 = true;
}
LayoutInflater.from(context).inflate(i9, this);
setDescendantFocusability(262144);
AspectRatioFrameLayout aspectRatioFrameLayout = (AspectRatioFrameLayout) findViewById(R$id.exo_content_frame);
this.contentFrame = aspectRatioFrameLayout;
if (aspectRatioFrameLayout != null) {
setResizeModeRaw(aspectRatioFrameLayout, i3);
}
View findViewById = findViewById(R$id.exo_shutter);
this.shutterView = findViewById;
if (findViewById != null && z4) {
findViewById.setBackgroundColor(i6);
}
if (aspectRatioFrameLayout == null || i5 == 0) {
z7 = true;
this.surfaceView = null;
z8 = false;
} else {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(-1, -1);
if (i5 == 2) {
z7 = true;
this.surfaceView = new TextureView(context);
} else if (i5 != 3) {
if (i5 == 4) {
try {
int i13 = VideoDecoderGLSurfaceView.$r8$clinit;
this.surfaceView = (View) VideoDecoderGLSurfaceView.class.getConstructor(Context.class).newInstance(context);
} catch (Exception e) {
throw new IllegalStateException("video_decoder_gl_surface_view requires an ExoPlayer dependency", e);
}
} else {
this.surfaceView = new SurfaceView(context);
}
z7 = true;
} else {
try {
int i14 = SphericalGLSurfaceView.$r8$clinit;
z7 = true;
this.surfaceView = (View) SphericalGLSurfaceView.class.getConstructor(Context.class).newInstance(context);
z9 = true;
this.surfaceView.setLayoutParams(layoutParams);
this.surfaceView.setOnClickListener(componentListener);
this.surfaceView.setClickable(false);
aspectRatioFrameLayout.addView(this.surfaceView, 0);
z8 = z9;
} catch (Exception e2) {
throw new IllegalStateException("spherical_gl_surface_view requires an ExoPlayer dependency", e2);
}
}
z9 = false;
this.surfaceView.setLayoutParams(layoutParams);
this.surfaceView.setOnClickListener(componentListener);
this.surfaceView.setClickable(false);
aspectRatioFrameLayout.addView(this.surfaceView, 0);
z8 = z9;
}
this.surfaceViewIgnoresVideoAspectRatio = z8;
this.adOverlayFrameLayout = (FrameLayout) findViewById(R$id.exo_ad_overlay);
this.overlayFrameLayout = (FrameLayout) findViewById(R$id.exo_overlay);
ImageView imageView2 = (ImageView) findViewById(R$id.exo_artwork);
this.artworkView = imageView2;
this.useArtwork = (!z5 || imageView2 == null) ? false : z7;
if (i7 != 0) {
this.defaultArtwork = ContextCompat.getDrawable(getContext(), i7);
}
SubtitleView subtitleView = (SubtitleView) findViewById(R$id.exo_subtitles);
this.subtitleView = subtitleView;
if (subtitleView != null) {
subtitleView.setUserDefaultStyle();
subtitleView.setUserDefaultTextSize();
}
View findViewById2 = findViewById(R$id.exo_buffering);
this.bufferingView = findViewById2;
if (findViewById2 != null) {
findViewById2.setVisibility(8);
}
this.showBuffering = i4;
TextView textView = (TextView) findViewById(R$id.exo_error_message);
this.errorMessageView = textView;
if (textView != null) {
textView.setVisibility(8);
}
StyledPlayerControlView styledPlayerControlView = (StyledPlayerControlView) findViewById(R$id.exo_controller);
View findViewById3 = findViewById(R$id.exo_controller_placeholder);
if (styledPlayerControlView != null) {
this.controller = styledPlayerControlView;
i8 = 0;
} else if (findViewById3 != null) {
i8 = 0;
StyledPlayerControlView styledPlayerControlView2 = new StyledPlayerControlView(context, null, 0, attributeSet);
this.controller = styledPlayerControlView2;
styledPlayerControlView2.setId(R$id.exo_controller);
styledPlayerControlView2.setLayoutParams(findViewById3.getLayoutParams());
ViewGroup viewGroup = (ViewGroup) findViewById3.getParent();
int indexOfChild = viewGroup.indexOfChild(findViewById3);
viewGroup.removeView(findViewById3);
viewGroup.addView(styledPlayerControlView2, indexOfChild);
} else {
i8 = 0;
this.controller = null;
}
StyledPlayerControlView styledPlayerControlView3 = this.controller;
this.controllerShowTimeoutMs = styledPlayerControlView3 != null ? i2 : i8;
this.controllerHideOnTouch = z3;
this.controllerAutoShow = z;
this.controllerHideDuringAds = z2;
this.useController = (!z6 || styledPlayerControlView3 == null) ? i8 : z7;
if (styledPlayerControlView3 != null) {
styledPlayerControlView3.hideImmediately();
this.controller.addVisibilityListener(componentListener);
}
updateContentDescription();
}
public void setPlayer(@Nullable Player player) {
Assertions.checkState(Looper.myLooper() == Looper.getMainLooper());
Assertions.checkArgument(player == null || player.getApplicationLooper() == Looper.getMainLooper());
if (player == null) {
return;
}
SubtitleView subtitleView = this.subtitleView;
if (subtitleView != null) {
subtitleView.setCues(null);
}
if (useController()) {
this.controller.setPlayer(player);
}
updateBuffering();
updateErrorMessage();
updateForCurrentTrackSelections(true);
if (player != null) {
if (player.isCommandAvailable(26)) {
View view = this.surfaceView;
if (view instanceof TextureView) {
player.setVideoTextureView((TextureView) view);
} else if (view instanceof SurfaceView) {
player.setVideoSurfaceView((SurfaceView) view);
}
updateAspectRatio();
}
if (this.subtitleView != null && player.isCommandAvailable(27)) {
this.subtitleView.setCues(player.getCurrentCues());
}
player.addListener(this.componentListener);
maybeShowController(false);
return;
}
hideController();
}
@Override // android.view.View
public void setVisibility(int i) {
super.setVisibility(i);
View view = this.surfaceView;
if (view instanceof SurfaceView) {
view.setVisibility(i);
}
}
public void setResizeMode(int i) {
Assertions.checkStateNotNull(this.contentFrame);
this.contentFrame.setResizeMode(i);
}
public void setUseArtwork(boolean z) {
Assertions.checkState((z && this.artworkView == null) ? false : true);
if (this.useArtwork != z) {
this.useArtwork = z;
updateForCurrentTrackSelections(false);
}
}
public void setDefaultArtwork(@Nullable Drawable drawable) {
if (this.defaultArtwork != drawable) {
this.defaultArtwork = drawable;
updateForCurrentTrackSelections(false);
}
}
public void setUseController(boolean z) {
Assertions.checkState((z && this.controller == null) ? false : true);
if (this.useController == z) {
return;
}
this.useController = z;
if (useController()) {
this.controller.setPlayer(null);
} else {
StyledPlayerControlView styledPlayerControlView = this.controller;
if (styledPlayerControlView != null) {
styledPlayerControlView.hide();
this.controller.setPlayer(null);
}
}
updateContentDescription();
}
public void setShutterBackgroundColor(int i) {
View view = this.shutterView;
if (view != null) {
view.setBackgroundColor(i);
}
}
public void setKeepContentOnPlayerReset(boolean z) {
if (this.keepContentOnPlayerReset != z) {
this.keepContentOnPlayerReset = z;
updateForCurrentTrackSelections(false);
}
}
public void setShowBuffering(int i) {
if (this.showBuffering != i) {
this.showBuffering = i;
updateBuffering();
}
}
public void setErrorMessageProvider(@Nullable ErrorMessageProvider errorMessageProvider) {
if (errorMessageProvider != null) {
updateErrorMessage();
}
}
public void setCustomErrorMessage(@Nullable CharSequence charSequence) {
Assertions.checkState(this.errorMessageView != null);
this.customErrorMessage = charSequence;
updateErrorMessage();
}
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
boolean isDpadKey = isDpadKey(keyEvent.getKeyCode());
if (isDpadKey && useController() && !this.controller.isFullyVisible()) {
maybeShowController(true);
return true;
}
if (dispatchMediaKeyEvent(keyEvent) || super.dispatchKeyEvent(keyEvent)) {
maybeShowController(true);
return true;
}
if (isDpadKey && useController()) {
maybeShowController(true);
}
return false;
}
public boolean dispatchMediaKeyEvent(KeyEvent keyEvent) {
return useController() && this.controller.dispatchMediaKeyEvent(keyEvent);
}
public void showController() {
showController(shouldShowControllerIndefinitely());
}
public void hideController() {
StyledPlayerControlView styledPlayerControlView = this.controller;
if (styledPlayerControlView != null) {
styledPlayerControlView.hide();
}
}
public void setControllerShowTimeoutMs(int i) {
Assertions.checkStateNotNull(this.controller);
this.controllerShowTimeoutMs = i;
if (this.controller.isFullyVisible()) {
showController();
}
}
public void setControllerHideOnTouch(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controllerHideOnTouch = z;
updateContentDescription();
}
public void setControllerVisibilityListener(@Nullable StyledPlayerControlView.VisibilityListener visibilityListener) {
Assertions.checkStateNotNull(this.controller);
StyledPlayerControlView.VisibilityListener visibilityListener2 = this.controllerVisibilityListener;
if (visibilityListener2 == visibilityListener) {
return;
}
if (visibilityListener2 != null) {
this.controller.removeVisibilityListener(visibilityListener2);
}
this.controllerVisibilityListener = visibilityListener;
if (visibilityListener != null) {
this.controller.addVisibilityListener(visibilityListener);
}
}
public void setControllerOnFullScreenModeChangedListener(@Nullable StyledPlayerControlView.OnFullScreenModeChangedListener onFullScreenModeChangedListener) {
Assertions.checkStateNotNull(this.controller);
this.controller.setOnFullScreenModeChangedListener(onFullScreenModeChangedListener);
}
@Deprecated
public void setControlDispatcher(ControlDispatcher controlDispatcher) {
Assertions.checkStateNotNull(this.controller);
this.controller.setControlDispatcher(controlDispatcher);
}
public void setShowRewindButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowRewindButton(z);
}
public void setShowFastForwardButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowFastForwardButton(z);
}
public void setShowPreviousButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowPreviousButton(z);
}
public void setShowNextButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowNextButton(z);
}
public void setRepeatToggleModes(int i) {
Assertions.checkStateNotNull(this.controller);
this.controller.setRepeatToggleModes(i);
}
public void setShowShuffleButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowShuffleButton(z);
}
public void setShowSubtitleButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowSubtitleButton(z);
}
public void setShowVrButton(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowVrButton(z);
}
public void setShowMultiWindowTimeBar(boolean z) {
Assertions.checkStateNotNull(this.controller);
this.controller.setShowMultiWindowTimeBar(z);
}
public void setExtraAdGroupMarkers(@Nullable long[] jArr, @Nullable boolean[] zArr) {
Assertions.checkStateNotNull(this.controller);
this.controller.setExtraAdGroupMarkers(jArr, zArr);
}
public void setAspectRatioListener(@Nullable AspectRatioFrameLayout.AspectRatioListener aspectRatioListener) {
Assertions.checkStateNotNull(this.contentFrame);
this.contentFrame.setAspectRatioListener(aspectRatioListener);
}
@Override // android.view.View
public boolean onTouchEvent(MotionEvent motionEvent) {
useController();
return false;
}
@Override // android.view.View
public boolean performClick() {
super.performClick();
return toggleControllerVisibility();
}
@Override // android.view.View
public boolean onTrackballEvent(MotionEvent motionEvent) {
useController();
return false;
}
public void onContentAspectRatioChanged(AspectRatioFrameLayout aspectRatioFrameLayout, float f) {
if (aspectRatioFrameLayout != null) {
aspectRatioFrameLayout.setAspectRatio(f);
}
}
public final boolean useController() {
if (!this.useController) {
return false;
}
Assertions.checkStateNotNull(this.controller);
return true;
}
public final boolean toggleControllerVisibility() {
useController();
return false;
}
public final void maybeShowController(boolean z) {
if (!(isPlayingAd() && this.controllerHideDuringAds) && useController()) {
boolean z2 = this.controller.isFullyVisible() && this.controller.getShowTimeoutMs() <= 0;
boolean shouldShowControllerIndefinitely = shouldShowControllerIndefinitely();
if (z || z2 || shouldShowControllerIndefinitely) {
showController(shouldShowControllerIndefinitely);
}
}
}
public final void showController(boolean z) {
if (useController()) {
this.controller.setShowTimeoutMs(z ? 0 : this.controllerShowTimeoutMs);
this.controller.show();
}
}
public final void updateForCurrentTrackSelections(boolean z) {
if (this.keepContentOnPlayerReset) {
return;
}
hideArtwork();
closeShutter();
}
public final void hideArtwork() {
ImageView imageView = this.artworkView;
if (imageView != null) {
imageView.setImageResource(R.color.transparent);
this.artworkView.setVisibility(4);
}
}
public final void closeShutter() {
View view = this.shutterView;
if (view != null) {
view.setVisibility(0);
}
}
public final void updateBuffering() {
View view = this.bufferingView;
if (view != null) {
view.setVisibility(8);
}
}
public final void updateErrorMessage() {
TextView textView = this.errorMessageView;
if (textView != null) {
CharSequence charSequence = this.customErrorMessage;
if (charSequence != null) {
textView.setText(charSequence);
this.errorMessageView.setVisibility(0);
} else {
textView.setVisibility(8);
}
}
}
public final void updateContentDescription() {
StyledPlayerControlView styledPlayerControlView = this.controller;
if (styledPlayerControlView == null || !this.useController) {
setContentDescription(null);
} else if (styledPlayerControlView.isFullyVisible()) {
setContentDescription(this.controllerHideOnTouch ? getResources().getString(R$string.exo_controls_hide) : null);
} else {
setContentDescription(getResources().getString(R$string.exo_controls_show));
}
}
public final void updateAspectRatio() {
VideoSize videoSize = VideoSize.UNKNOWN;
int i = videoSize.width;
int i2 = videoSize.height;
int i3 = videoSize.unappliedRotationDegrees;
float f = (i2 == 0 || i == 0) ? 0.0f : (i * videoSize.pixelWidthHeightRatio) / i2;
View view = this.surfaceView;
if (view instanceof TextureView) {
if (f > 0.0f && (i3 == 90 || i3 == 270)) {
f = 1.0f / f;
}
if (this.textureViewRotation != 0) {
view.removeOnLayoutChangeListener(this.componentListener);
}
this.textureViewRotation = i3;
if (i3 != 0) {
this.surfaceView.addOnLayoutChangeListener(this.componentListener);
}
applyTextureViewRotation((TextureView) this.surfaceView, this.textureViewRotation);
}
onContentAspectRatioChanged(this.contentFrame, this.surfaceViewIgnoresVideoAspectRatio ? 0.0f : f);
}
public static void configureEditModeLogoV23(Resources resources, ImageView imageView) {
imageView.setImageDrawable(resources.getDrawable(R$drawable.exo_edit_mode_logo, null));
imageView.setBackgroundColor(resources.getColor(R$color.exo_edit_mode_background_color, null));
}
public static void configureEditModeLogo(Resources resources, ImageView imageView) {
imageView.setImageDrawable(resources.getDrawable(R$drawable.exo_edit_mode_logo));
imageView.setBackgroundColor(resources.getColor(R$color.exo_edit_mode_background_color));
}
public static void setResizeModeRaw(AspectRatioFrameLayout aspectRatioFrameLayout, int i) {
aspectRatioFrameLayout.setResizeMode(i);
}
public static void applyTextureViewRotation(TextureView textureView, int i) {
Matrix matrix = new Matrix();
float width = textureView.getWidth();
float height = textureView.getHeight();
if (width != 0.0f && height != 0.0f && i != 0) {
float f = width / 2.0f;
float f2 = height / 2.0f;
matrix.postRotate(i, f, f2);
RectF rectF = new RectF(0.0f, 0.0f, width, height);
RectF rectF2 = new RectF();
matrix.mapRect(rectF2, rectF);
matrix.postScale(width / rectF2.width(), height / rectF2.height(), f, f2);
}
textureView.setTransform(matrix);
}
public final class ComponentListener implements Player.Listener, View.OnLayoutChangeListener, View.OnClickListener, StyledPlayerControlView.VisibilityListener {
public final Timeline$Period period = new Timeline$Period();
public ComponentListener() {
}
@Override // android.view.View.OnLayoutChangeListener
public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
StyledPlayerView.applyTextureViewRotation((TextureView) view, StyledPlayerView.this.textureViewRotation);
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
StyledPlayerView.this.toggleControllerVisibility();
}
@Override // com.google.android.exoplayer2.ui.StyledPlayerControlView.VisibilityListener
public void onVisibilityChange(int i) {
StyledPlayerView.this.updateContentDescription();
}
}
}

View File

@@ -0,0 +1,42 @@
package com.google.android.exoplayer2.ui;
import android.R;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Paint;
import android.text.TextPaint;
/* loaded from: classes2.dex */
public final class SubtitlePainter {
public final Paint bitmapPaint;
public final float outlineWidth;
public final float shadowOffset;
public final float shadowRadius;
public final float spacingAdd;
public final float spacingMult;
public final TextPaint textPaint;
public final Paint windowPaint;
public SubtitlePainter(Context context) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(null, new int[]{R.attr.lineSpacingExtra, R.attr.lineSpacingMultiplier}, 0, 0);
this.spacingAdd = obtainStyledAttributes.getDimensionPixelSize(0, 0);
this.spacingMult = obtainStyledAttributes.getFloat(1, 1.0f);
obtainStyledAttributes.recycle();
float round = Math.round((context.getResources().getDisplayMetrics().densityDpi * 2.0f) / 160.0f);
this.outlineWidth = round;
this.shadowRadius = round;
this.shadowOffset = round;
TextPaint textPaint = new TextPaint();
this.textPaint = textPaint;
textPaint.setAntiAlias(true);
textPaint.setSubpixelText(true);
Paint paint = new Paint();
this.windowPaint = paint;
paint.setAntiAlias(true);
paint.setStyle(Paint.Style.FILL);
Paint paint2 = new Paint();
this.bitmapPaint = paint2;
paint2.setAntiAlias(true);
paint2.setFilterBitmap(true);
}
}

View File

@@ -0,0 +1,182 @@
package com.google.android.exoplayer2.ui;
import android.content.Context;
import android.content.res.Resources;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
import android.view.accessibility.CaptioningManager;
import android.widget.FrameLayout;
import androidx.annotation.Dimension;
import androidx.annotation.Nullable;
import com.amazonaws.handlers.HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0;
import com.google.android.exoplayer2.text.Cue;
import com.google.android.exoplayer2.util.Util;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes2.dex */
public final class SubtitleView extends FrameLayout {
public boolean applyEmbeddedFontSizes;
public boolean applyEmbeddedStyles;
public float bottomPaddingFraction;
public List cues;
public float defaultTextSize;
public int defaultTextSizeType;
public View innerSubtitleView;
public Output output;
public CaptionStyleCompat style;
public int viewType;
public interface Output {
void update(List list, CaptionStyleCompat captionStyleCompat, float f, int i, float f2);
}
public SubtitleView(Context context) {
this(context, null);
}
public SubtitleView(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
this.cues = Collections.emptyList();
this.style = CaptionStyleCompat.DEFAULT;
this.defaultTextSizeType = 0;
this.defaultTextSize = 0.0533f;
this.bottomPaddingFraction = 0.08f;
this.applyEmbeddedStyles = true;
this.applyEmbeddedFontSizes = true;
CanvasSubtitleOutput canvasSubtitleOutput = new CanvasSubtitleOutput(context);
this.output = canvasSubtitleOutput;
this.innerSubtitleView = canvasSubtitleOutput;
addView(canvasSubtitleOutput);
this.viewType = 1;
}
public void setCues(@Nullable List<Cue> list) {
if (list == null) {
list = Collections.emptyList();
}
this.cues = list;
updateOutput();
}
public void setViewType(int i) {
if (this.viewType == i) {
return;
}
if (i == 1) {
setView(new CanvasSubtitleOutput(getContext()));
} else if (i == 2) {
setView(new WebViewSubtitleOutput(getContext()));
} else {
throw new IllegalArgumentException();
}
this.viewType = i;
}
/* JADX WARN: Multi-variable type inference failed */
public final void setView(View view) {
removeView(this.innerSubtitleView);
View view2 = this.innerSubtitleView;
if (view2 instanceof WebViewSubtitleOutput) {
((WebViewSubtitleOutput) view2).destroy();
}
this.innerSubtitleView = view;
this.output = (Output) view;
addView(view);
}
public void setFixedTextSize(@Dimension int i, float f) {
Resources resources;
Context context = getContext();
if (context == null) {
resources = Resources.getSystem();
} else {
resources = context.getResources();
}
setTextSize(2, TypedValue.applyDimension(i, f, resources.getDisplayMetrics()));
}
public void setUserDefaultTextSize() {
setFractionalTextSize(getUserCaptionFontScale() * 0.0533f);
}
public void setFractionalTextSize(float f) {
setFractionalTextSize(f, false);
}
public void setFractionalTextSize(float f, boolean z) {
setTextSize(z ? 1 : 0, f);
}
public final void setTextSize(int i, float f) {
this.defaultTextSizeType = i;
this.defaultTextSize = f;
updateOutput();
}
public void setApplyEmbeddedStyles(boolean z) {
this.applyEmbeddedStyles = z;
updateOutput();
}
public void setApplyEmbeddedFontSizes(boolean z) {
this.applyEmbeddedFontSizes = z;
updateOutput();
}
public void setUserDefaultStyle() {
setStyle(getUserCaptionStyle());
}
public void setStyle(CaptionStyleCompat captionStyleCompat) {
this.style = captionStyleCompat;
updateOutput();
}
public void setBottomPaddingFraction(float f) {
this.bottomPaddingFraction = f;
updateOutput();
}
public final float getUserCaptionFontScale() {
CaptioningManager captioningManager;
if (Util.SDK_INT < 19 || isInEditMode() || (captioningManager = (CaptioningManager) getContext().getSystemService("captioning")) == null || !captioningManager.isEnabled()) {
return 1.0f;
}
return captioningManager.getFontScale();
}
public final CaptionStyleCompat getUserCaptionStyle() {
if (Util.SDK_INT < 19 || isInEditMode()) {
return CaptionStyleCompat.DEFAULT;
}
CaptioningManager captioningManager = (CaptioningManager) getContext().getSystemService("captioning");
if (captioningManager != null && captioningManager.isEnabled()) {
return CaptionStyleCompat.createFromCaptionStyle(captioningManager.getUserStyle());
}
return CaptionStyleCompat.DEFAULT;
}
public final void updateOutput() {
this.output.update(getCuesWithStylingPreferencesApplied(), this.style, this.defaultTextSize, this.defaultTextSizeType, this.bottomPaddingFraction);
}
public final List getCuesWithStylingPreferencesApplied() {
if (this.applyEmbeddedStyles && this.applyEmbeddedFontSizes) {
return this.cues;
}
ArrayList arrayList = new ArrayList(this.cues.size());
for (int i = 0; i < this.cues.size(); i++) {
HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0.m(this.cues.get(i));
removeEmbeddedStyling(null);
arrayList.add(null);
}
return arrayList;
}
public final Cue removeEmbeddedStyling(Cue cue) {
throw null;
}
}

View File

@@ -0,0 +1,23 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public abstract class SubtitleViewUtils {
public static float resolveTextSize(int i, float f, int i2, int i3) {
float f2;
if (f == -3.4028235E38f) {
return -3.4028235E38f;
}
if (i == 0) {
f2 = i3;
} else {
if (i != 1) {
if (i != 2) {
return -3.4028235E38f;
}
return f;
}
f2 = i2;
}
return f * f2;
}
}

View File

@@ -0,0 +1,21 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public interface TimeBar {
public interface OnScrubListener {
void onScrubMove(TimeBar timeBar, long j);
void onScrubStart(TimeBar timeBar, long j);
void onScrubStop(TimeBar timeBar, long j, boolean z);
}
void addListener(OnScrubListener onScrubListener);
void setBufferedPosition(long j);
void setEnabled(boolean z);
void setPosition(long j);
}

View File

@@ -0,0 +1,5 @@
package com.google.android.exoplayer2.ui;
/* loaded from: classes2.dex */
public interface TrackNameProvider {
}

View File

@@ -0,0 +1,242 @@
package com.google.android.exoplayer2.ui;
import android.R;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckedTextView;
import android.widget.LinearLayout;
import androidx.annotation.AttrRes;
import androidx.annotation.Nullable;
import com.google.android.exoplayer2.source.TrackGroupArray;
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
import com.google.android.exoplayer2.util.Assertions;
import java.util.Arrays;
/* loaded from: classes2.dex */
public class TrackSelectionView extends LinearLayout {
public boolean allowAdaptiveSelections;
public boolean allowMultipleOverrides;
public final ComponentListener componentListener;
public final CheckedTextView defaultView;
public final CheckedTextView disableView;
public final LayoutInflater inflater;
public boolean isDisabled;
public final SparseArray overrides;
public final int selectableItemBackgroundResourceId;
public TrackGroupArray trackGroups;
public TrackNameProvider trackNameProvider;
public CheckedTextView[][] trackViews;
public static final class TrackInfo {
public final int groupIndex;
public final int trackIndex;
}
public TrackSelectionView(Context context) {
this(context, null);
}
public TrackSelectionView(Context context, @Nullable AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public TrackSelectionView(Context context, @Nullable AttributeSet attributeSet, @AttrRes int i) {
super(context, attributeSet, i);
setOrientation(1);
this.overrides = new SparseArray();
setSaveFromParentEnabled(false);
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(new int[]{R.attr.selectableItemBackground});
int resourceId = obtainStyledAttributes.getResourceId(0, 0);
this.selectableItemBackgroundResourceId = resourceId;
obtainStyledAttributes.recycle();
LayoutInflater from = LayoutInflater.from(context);
this.inflater = from;
ComponentListener componentListener = new ComponentListener();
this.componentListener = componentListener;
this.trackNameProvider = new DefaultTrackNameProvider(getResources());
this.trackGroups = TrackGroupArray.EMPTY;
CheckedTextView checkedTextView = (CheckedTextView) from.inflate(R.layout.simple_list_item_single_choice, (ViewGroup) this, false);
this.disableView = checkedTextView;
checkedTextView.setBackgroundResource(resourceId);
checkedTextView.setText(R$string.exo_track_selection_none);
checkedTextView.setEnabled(false);
checkedTextView.setFocusable(true);
checkedTextView.setOnClickListener(componentListener);
checkedTextView.setVisibility(8);
addView(checkedTextView);
addView(from.inflate(R$layout.exo_list_divider, (ViewGroup) this, false));
CheckedTextView checkedTextView2 = (CheckedTextView) from.inflate(R.layout.simple_list_item_single_choice, (ViewGroup) this, false);
this.defaultView = checkedTextView2;
checkedTextView2.setBackgroundResource(resourceId);
checkedTextView2.setText(R$string.exo_track_selection_auto);
checkedTextView2.setEnabled(false);
checkedTextView2.setFocusable(true);
checkedTextView2.setOnClickListener(componentListener);
addView(checkedTextView2);
}
public void setAllowAdaptiveSelections(boolean z) {
if (this.allowAdaptiveSelections != z) {
this.allowAdaptiveSelections = z;
updateViews();
}
}
public void setAllowMultipleOverrides(boolean z) {
if (this.allowMultipleOverrides != z) {
this.allowMultipleOverrides = z;
if (!z && this.overrides.size() > 1) {
for (int size = this.overrides.size() - 1; size > 0; size--) {
this.overrides.remove(size);
}
}
updateViews();
}
}
public void setShowDisableOption(boolean z) {
this.disableView.setVisibility(z ? 0 : 8);
}
public void setTrackNameProvider(TrackNameProvider trackNameProvider) {
this.trackNameProvider = (TrackNameProvider) Assertions.checkNotNull(trackNameProvider);
updateViews();
}
public final void updateViews() {
int childCount = getChildCount();
while (true) {
childCount--;
if (childCount >= 3) {
removeViewAt(childCount);
} else {
this.disableView.setEnabled(false);
this.defaultView.setEnabled(false);
return;
}
}
}
public final void updateViewStates() {
this.disableView.setChecked(this.isDisabled);
this.defaultView.setChecked(!this.isDisabled && this.overrides.size() == 0);
for (int i = 0; i < this.trackViews.length; i++) {
DefaultTrackSelector.SelectionOverride selectionOverride = (DefaultTrackSelector.SelectionOverride) this.overrides.get(i);
int i2 = 0;
while (true) {
CheckedTextView[] checkedTextViewArr = this.trackViews[i];
if (i2 < checkedTextViewArr.length) {
if (selectionOverride != null) {
this.trackViews[i][i2].setChecked(selectionOverride.containsTrack(((TrackInfo) Assertions.checkNotNull(checkedTextViewArr[i2].getTag())).trackIndex));
} else {
checkedTextViewArr[i2].setChecked(false);
}
i2++;
}
}
}
}
public final void onClick(View view) {
if (view == this.disableView) {
onDisableViewClicked();
} else if (view == this.defaultView) {
onDefaultViewClicked();
} else {
onTrackViewClicked(view);
}
updateViewStates();
}
public final void onDisableViewClicked() {
this.isDisabled = true;
this.overrides.clear();
}
public final void onDefaultViewClicked() {
this.isDisabled = false;
this.overrides.clear();
}
public final void onTrackViewClicked(View view) {
this.isDisabled = false;
TrackInfo trackInfo = (TrackInfo) Assertions.checkNotNull(view.getTag());
int i = trackInfo.groupIndex;
int i2 = trackInfo.trackIndex;
DefaultTrackSelector.SelectionOverride selectionOverride = (DefaultTrackSelector.SelectionOverride) this.overrides.get(i);
Assertions.checkNotNull(null);
if (selectionOverride == null) {
if (!this.allowMultipleOverrides && this.overrides.size() > 0) {
this.overrides.clear();
}
this.overrides.put(i, new DefaultTrackSelector.SelectionOverride(i, i2));
return;
}
int i3 = selectionOverride.length;
int[] iArr = selectionOverride.tracks;
boolean isChecked = ((CheckedTextView) view).isChecked();
boolean shouldEnableAdaptiveSelection = shouldEnableAdaptiveSelection(i);
boolean z = shouldEnableAdaptiveSelection || shouldEnableMultiGroupSelection();
if (isChecked && z) {
if (i3 == 1) {
this.overrides.remove(i);
return;
} else {
this.overrides.put(i, new DefaultTrackSelector.SelectionOverride(i, getTracksRemoving(iArr, i2)));
return;
}
}
if (isChecked) {
return;
}
if (shouldEnableAdaptiveSelection) {
this.overrides.put(i, new DefaultTrackSelector.SelectionOverride(i, getTracksAdding(iArr, i2)));
} else {
this.overrides.put(i, new DefaultTrackSelector.SelectionOverride(i, i2));
}
}
public final boolean shouldEnableAdaptiveSelection(int i) {
if (!this.allowAdaptiveSelections || this.trackGroups.get(i).length <= 1) {
return false;
}
throw null;
}
public final boolean shouldEnableMultiGroupSelection() {
return this.allowMultipleOverrides && this.trackGroups.length > 1;
}
public static int[] getTracksAdding(int[] iArr, int i) {
int[] copyOf = Arrays.copyOf(iArr, iArr.length + 1);
copyOf[copyOf.length - 1] = i;
return copyOf;
}
public static int[] getTracksRemoving(int[] iArr, int i) {
int[] iArr2 = new int[iArr.length - 1];
int i2 = 0;
for (int i3 : iArr) {
if (i3 != i) {
iArr2[i2] = i3;
i2++;
}
}
return iArr2;
}
public class ComponentListener implements View.OnClickListener {
public ComponentListener() {
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
TrackSelectionView.this.onClick(view);
}
}
}

View File

@@ -0,0 +1,135 @@
package com.google.android.exoplayer2.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.MotionEvent;
import android.webkit.WebView;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.amazonaws.handlers.HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0;
import com.google.android.exoplayer2.ui.SubtitleView;
import com.google.android.exoplayer2.util.Util;
import com.google.common.base.Charsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
/* loaded from: classes2.dex */
final class WebViewSubtitleOutput extends FrameLayout implements SubtitleView.Output {
public float bottomPaddingFraction;
public final CanvasSubtitleOutput canvasSubtitleOutput;
public float defaultTextSize;
public int defaultTextSizeType;
public CaptionStyleCompat style;
public List textCues;
public final WebView webView;
public WebViewSubtitleOutput(Context context) {
this(context, null);
}
public WebViewSubtitleOutput(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
this.textCues = Collections.emptyList();
this.style = CaptionStyleCompat.DEFAULT;
this.defaultTextSize = 0.0533f;
this.defaultTextSizeType = 0;
this.bottomPaddingFraction = 0.08f;
CanvasSubtitleOutput canvasSubtitleOutput = new CanvasSubtitleOutput(context, attributeSet);
this.canvasSubtitleOutput = canvasSubtitleOutput;
WebView webView = new WebView(this, context, attributeSet) { // from class: com.google.android.exoplayer2.ui.WebViewSubtitleOutput.1
@Override // android.webkit.WebView, android.view.View
public boolean onTouchEvent(MotionEvent motionEvent) {
super.onTouchEvent(motionEvent);
return false;
}
@Override // android.view.View
public boolean performClick() {
super.performClick();
return false;
}
};
this.webView = webView;
webView.setBackgroundColor(0);
addView(canvasSubtitleOutput);
addView(webView);
}
@Override // com.google.android.exoplayer2.ui.SubtitleView.Output
public void update(List list, CaptionStyleCompat captionStyleCompat, float f, int i, float f2) {
this.style = captionStyleCompat;
this.defaultTextSize = f;
this.defaultTextSizeType = i;
this.bottomPaddingFraction = f2;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
if (list.size() > 0) {
HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0.m(list.get(0));
throw null;
}
if (!this.textCues.isEmpty() || !arrayList2.isEmpty()) {
this.textCues = arrayList2;
updateWebView();
}
this.canvasSubtitleOutput.update(arrayList, captionStyleCompat, f, i, f2);
invalidate();
}
@Override // android.widget.FrameLayout, android.view.ViewGroup, android.view.View
public void onLayout(boolean z, int i, int i2, int i3, int i4) {
super.onLayout(z, i, i2, i3, i4);
if (!z || this.textCues.isEmpty()) {
return;
}
updateWebView();
}
public void destroy() {
this.webView.destroy();
}
public final void updateWebView() {
StringBuilder sb = new StringBuilder();
sb.append(Util.formatInvariant("<body><div style='-webkit-user-select:none;position:fixed;top:0;bottom:0;left:0;right:0;color:%s;font-size:%s;line-height:%.2f;text-shadow:%s;'>", HtmlUtils.toCssRgba(this.style.foregroundColor), convertTextSizeToCss(this.defaultTextSizeType, this.defaultTextSize), Float.valueOf(1.2f), convertCaptionStyleToCssTextShadow(this.style)));
HashMap hashMap = new HashMap();
hashMap.put(HtmlUtils.cssAllClassDescendantsSelector("default_bg"), Util.formatInvariant("background-color:%s;", HtmlUtils.toCssRgba(this.style.backgroundColor)));
if (this.textCues.size() > 0) {
HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0.m(this.textCues.get(0));
throw null;
}
sb.append("</div></body></html>");
StringBuilder sb2 = new StringBuilder();
sb2.append("<html><head><style>");
for (String str : hashMap.keySet()) {
sb2.append(str);
sb2.append("{");
sb2.append((String) hashMap.get(str));
sb2.append("}");
}
sb2.append("</style></head>");
sb.insert(0, sb2.toString());
this.webView.loadData(Base64.encodeToString(sb.toString().getBytes(Charsets.UTF_8), 1), "text/html", "base64");
}
public final String convertTextSizeToCss(int i, float f) {
float resolveTextSize = SubtitleViewUtils.resolveTextSize(i, f, getHeight(), (getHeight() - getPaddingTop()) - getPaddingBottom());
return resolveTextSize == -3.4028235E38f ? "unset" : Util.formatInvariant("%.2fpx", Float.valueOf(resolveTextSize / getContext().getResources().getDisplayMetrics().density));
}
public static String convertCaptionStyleToCssTextShadow(CaptionStyleCompat captionStyleCompat) {
int i = captionStyleCompat.edgeType;
if (i == 1) {
return Util.formatInvariant("1px 1px 0 %1$s, 1px -1px 0 %1$s, -1px 1px 0 %1$s, -1px -1px 0 %1$s", HtmlUtils.toCssRgba(captionStyleCompat.edgeColor));
}
if (i == 2) {
return Util.formatInvariant("0.1em 0.12em 0.15em %s", HtmlUtils.toCssRgba(captionStyleCompat.edgeColor));
}
if (i != 3) {
return i != 4 ? "unset" : Util.formatInvariant("-0.05em -0.05em 0.15em %s", HtmlUtils.toCssRgba(captionStyleCompat.edgeColor));
}
return Util.formatInvariant("0.06em 0.08em 0.15em %s", HtmlUtils.toCssRgba(captionStyleCompat.edgeColor));
}
}