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,136 @@
package com.applovin.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;
import com.applovin.sdk.R;
/* loaded from: classes.dex */
public final class AspectRatioFrameLayout extends FrameLayout {
private final c a;
private float b;
private int c;
public interface b {
}
public final class c implements Runnable {
private float a;
private float b;
private boolean c;
private boolean d;
private c() {
}
@Override // java.lang.Runnable
public void run() {
this.d = false;
AspectRatioFrameLayout.a(AspectRatioFrameLayout.this);
}
public void a(float f, float f2, boolean z) {
this.a = f;
this.b = f2;
this.c = z;
if (this.d) {
return;
}
this.d = true;
AspectRatioFrameLayout.this.post(this);
}
}
public AspectRatioFrameLayout(Context context) {
this(context, null);
}
public static /* synthetic */ b a(AspectRatioFrameLayout aspectRatioFrameLayout) {
aspectRatioFrameLayout.getClass();
return null;
}
public int getResizeMode() {
return this.c;
}
@Override // android.widget.FrameLayout, android.view.View
public void onMeasure(int i, int i2) {
float f;
float f2;
super.onMeasure(i, i2);
if (this.b <= 0.0f) {
return;
}
int measuredWidth = getMeasuredWidth();
int measuredHeight = getMeasuredHeight();
float f3 = measuredWidth;
float f4 = measuredHeight;
float f5 = f3 / f4;
float f6 = (this.b / f5) - 1.0f;
if (Math.abs(f6) <= 0.01f) {
this.a.a(this.b, f5, false);
return;
}
int i3 = this.c;
if (i3 != 0) {
if (i3 != 1) {
if (i3 == 2) {
f = this.b;
} else if (i3 == 4) {
if (f6 > 0.0f) {
f = this.b;
} else {
f2 = this.b;
}
}
measuredWidth = (int) (f4 * f);
} else {
f2 = this.b;
}
measuredHeight = (int) (f3 / f2);
} else if (f6 > 0.0f) {
f2 = this.b;
measuredHeight = (int) (f3 / f2);
} else {
f = this.b;
measuredWidth = (int) (f4 * f);
}
this.a.a(this.b, f5, true);
super.onMeasure(View.MeasureSpec.makeMeasureSpec(measuredWidth, 1073741824), View.MeasureSpec.makeMeasureSpec(measuredHeight, 1073741824));
}
public void setAspectRatioListener(@Nullable b bVar) {
}
public AspectRatioFrameLayout(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
this.c = 0;
if (attributeSet != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet, R.styleable.AppLovinAspectRatioFrameLayout, 0, 0);
try {
this.c = obtainStyledAttributes.getInt(R.styleable.AppLovinAspectRatioFrameLayout_al_resize_mode, 0);
} finally {
obtainStyledAttributes.recycle();
}
}
this.a = new c();
}
public void setAspectRatio(float f) {
if (this.b != f) {
this.b = f;
requestLayout();
}
}
public void setResizeMode(int i) {
if (this.c != i) {
this.c = i;
requestLayout();
}
}
}

View File

@@ -0,0 +1,174 @@
package com.applovin.exoplayer2.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.accessibility.CaptioningManager;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.applovin.impl.b5;
import com.applovin.impl.qh;
import com.applovin.impl.x2;
import com.applovin.impl.xp;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public final class SubtitleView extends FrameLayout implements qh.e {
private List a;
private x2 b;
private int c;
private float d;
private float f;
private boolean g;
private boolean h;
private int i;
private a j;
private View k;
public interface a {
void a(List list, x2 x2Var, float f, int i, float f2);
}
public SubtitleView(Context context) {
this(context, null);
}
private float getUserCaptionFontScale() {
CaptioningManager captioningManager;
if (xp.a < 19 || isInEditMode() || (captioningManager = (CaptioningManager) getContext().getSystemService("captioning")) == null || !captioningManager.isEnabled()) {
return 1.0f;
}
return captioningManager.getFontScale();
}
private x2 getUserCaptionStyle() {
if (xp.a < 19 || isInEditMode()) {
return x2.g;
}
CaptioningManager captioningManager = (CaptioningManager) getContext().getSystemService("captioning");
return (captioningManager == null || !captioningManager.isEnabled()) ? x2.g : x2.a(captioningManager.getUserStyle());
}
private <T extends View & a> void setView(T t) {
removeView(this.k);
View view = this.k;
if (view instanceof j) {
((j) view).a();
}
this.k = t;
this.j = t;
addView(t);
}
public void c() {
setStyle(getUserCaptionStyle());
}
public void d() {
setFractionalTextSize(getUserCaptionFontScale() * 0.0533f);
}
public void setCues(@Nullable List<b5> list) {
if (list == null) {
list = Collections.emptyList();
}
this.a = list;
e();
}
public void setFractionalTextSize(float f) {
a(f, false);
}
public SubtitleView(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
this.a = Collections.emptyList();
this.b = x2.g;
this.c = 0;
this.d = 0.0533f;
this.f = 0.08f;
this.g = true;
this.h = true;
com.applovin.exoplayer2.ui.a aVar = new com.applovin.exoplayer2.ui.a(context);
this.j = aVar;
this.k = aVar;
addView(aVar);
this.i = 1;
}
private void e() {
this.j.a(getCuesWithStylingPreferencesApplied(), this.b, this.d, this.c, this.f);
}
public void setApplyEmbeddedFontSizes(boolean z) {
this.h = z;
e();
}
public void setApplyEmbeddedStyles(boolean z) {
this.g = z;
e();
}
public void setBottomPaddingFraction(float f) {
this.f = f;
e();
}
private List<b5> getCuesWithStylingPreferencesApplied() {
if (this.g && this.h) {
return this.a;
}
ArrayList arrayList = new ArrayList(this.a.size());
for (int i = 0; i < this.a.size(); i++) {
arrayList.add(a((b5) this.a.get(i)));
}
return arrayList;
}
public void setViewType(int i) {
if (this.i == i) {
return;
}
if (i == 1) {
setView(new com.applovin.exoplayer2.ui.a(getContext()));
} else if (i == 2) {
setView(new j(getContext()));
} else {
throw new IllegalArgumentException();
}
this.i = i;
}
public void setStyle(x2 x2Var) {
this.b = x2Var;
e();
}
private b5 a(b5 b5Var) {
b5.b a2 = b5Var.a();
if (!this.g) {
h.a(a2);
} else if (!this.h) {
h.b(a2);
}
return a2.a();
}
@Override // com.applovin.impl.qh.e
public void a(List list) {
setCues(list);
}
public void a(float f, boolean z) {
a(z ? 1 : 0, f);
}
private void a(int i, float f) {
this.c = i;
this.d = f;
e();
}
}

View File

@@ -0,0 +1,103 @@
package com.applovin.exoplayer2.ui;
import android.content.Context;
import android.graphics.Canvas;
import android.text.Layout;
import android.util.AttributeSet;
import android.view.View;
import com.applovin.exoplayer2.ui.SubtitleView;
import com.applovin.impl.b5;
import com.applovin.impl.x2;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
final class a extends View implements SubtitleView.a {
private final List a;
private List b;
private int c;
private float d;
private x2 f;
private float g;
public a(Context context) {
this(context, null);
}
public a(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.a = new ArrayList();
this.b = Collections.emptyList();
this.c = 0;
this.d = 0.0533f;
this.f = x2.g;
this.g = 0.08f;
}
@Override // android.view.View
public void dispatchDraw(Canvas canvas) {
List list = this.b;
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;
}
int i = paddingBottom - paddingTop;
float a = h.a(this.c, this.d, height, i);
if (a <= 0.0f) {
return;
}
int size = list.size();
int i2 = 0;
while (i2 < size) {
b5 b5Var = (b5) list.get(i2);
if (b5Var.q != Integer.MIN_VALUE) {
b5Var = a(b5Var);
}
b5 b5Var2 = b5Var;
int i3 = paddingBottom;
((g) this.a.get(i2)).a(b5Var2, this.f, a, h.a(b5Var2.o, b5Var2.p, height, i), this.g, canvas, paddingLeft, paddingTop, width, i3);
i2++;
size = size;
i = i;
paddingBottom = i3;
width = width;
}
}
private static b5 a(b5 b5Var) {
b5.b b = b5Var.a().b(-3.4028235E38f).b(Integer.MIN_VALUE).b((Layout.Alignment) null);
if (b5Var.g == 0) {
b.a(1.0f - b5Var.f, 0);
} else {
b.a((-b5Var.f) - 1.0f, 1);
}
int i = b5Var.h;
if (i == 0) {
b.a(2);
} else if (i == 2) {
b.a(0);
}
return b.a();
}
@Override // com.applovin.exoplayer2.ui.SubtitleView.a
public void a(List list, x2 x2Var, float f, int i, float f2) {
this.b = list;
this.f = x2Var;
this.d = f;
this.c = i;
this.g = f2;
while (this.a.size() < list.size()) {
this.a.add(new g(getContext()));
}
invalidate();
}
}

View File

@@ -0,0 +1,5 @@
package com.applovin.exoplayer2.ui;
/* loaded from: classes.dex */
public abstract /* synthetic */ class b$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,783 @@
package com.applovin.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 com.applovin.exoplayer2.ui.i;
import com.applovin.impl.b1;
import com.applovin.impl.xp;
import com.applovin.sdk.R;
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: classes.dex */
public class b extends View implements i {
private final float A;
private int B;
private long C;
private int D;
private Rect E;
private ValueAnimator F;
private float G;
private boolean H;
private boolean I;
private long J;
private long K;
private long L;
private long M;
private int N;
private long[] O;
private boolean[] P;
private final Rect a;
private final Rect b;
private final Rect c;
private final Rect d;
private final Paint f;
private final Paint g;
private final Paint h;
private final Paint i;
private final Paint j;
private final Paint k;
private final Drawable l;
private final int m;
private final int n;
private final int o;
private final int p;
private final int q;
private final int r;
private final int s;
private final int t;
private final int u;
private final StringBuilder v;
private final Formatter w;
private final Runnable x;
private final CopyOnWriteArraySet y;
private final Point z;
public b(Context context, AttributeSet attributeSet, int i, AttributeSet attributeSet2) {
this(context, attributeSet, i, attributeSet2, 0);
}
private static int a(float f, int i) {
return (int) ((i * f) + 0.5f);
}
private static int b(float f, int i) {
return (int) (i / f);
}
private String getProgressText() {
return xp.a(this.v, this.w, this.L);
}
private long getScrubberPosition() {
if (this.b.width() <= 0 || this.K == C.TIME_UNSET) {
return 0L;
}
return (this.d.width() * this.K) / this.b.width();
}
@Override // android.view.View
public void drawableStateChanged() {
super.drawableStateChanged();
c();
}
@Override // com.applovin.exoplayer2.ui.i
public long getPreferredUpdateDelay() {
int b = b(this.A, this.b.width());
if (b != 0) {
long j = this.K;
if (j != 0 && j != C.TIME_UNSET) {
return j / b;
}
}
return Long.MAX_VALUE;
}
@Override // android.view.View
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
Drawable drawable = this.l;
if (drawable != null) {
drawable.jumpToCurrentState();
}
}
@Override // android.view.View
public void onDraw(Canvas canvas) {
canvas.save();
b(canvas);
a(canvas);
canvas.restore();
}
@Override // android.view.View
public void onFocusChanged(boolean z, int i, Rect rect) {
super.onFocusChanged(z, i, rect);
if (!this.I || z) {
return;
}
a(false);
}
@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.K <= 0) {
return;
}
if (xp.a >= 21) {
accessibilityNodeInfo.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD);
accessibilityNodeInfo.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_BACKWARD);
} else {
accessibilityNodeInfo.addAction(4096);
accessibilityNodeInfo.addAction(8192);
}
}
/* 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.a(r0)
if (r0 == 0) goto L30
java.lang.Runnable r5 = r4.x
r4.removeCallbacks(r5)
java.lang.Runnable r5 = r4.x
r0 = 1000(0x3e8, double:4.94E-321)
r4.postDelayed(r5, r0)
return r3
L27:
boolean r0 = r4.I
if (r0 == 0) goto L30
r5 = 0
r4.a(r5)
return r3
L30:
boolean r5 = super.onKeyDown(r5, r6)
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.ui.b.onKeyDown(int, android.view.KeyEvent):boolean");
}
@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.H ? 0 : this.t;
if (this.o == 1) {
i5 = (i8 - getPaddingBottom()) - this.n;
int paddingBottom = i8 - getPaddingBottom();
int i10 = this.m;
i6 = (paddingBottom - i10) - Math.max(i9 - (i10 / 2), 0);
} else {
i5 = (i8 - this.n) / 2;
i6 = (i8 - this.m) / 2;
}
this.a.set(paddingLeft, i5, paddingRight, this.n + i5);
Rect rect = this.b;
Rect rect2 = this.a;
rect.set(rect2.left + i9, i6, rect2.right - i9, this.m + i6);
if (xp.a >= 29) {
a(i7, i8);
}
b();
}
@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.n;
} else if (mode != 1073741824) {
size = Math.min(this.n, size);
}
setMeasuredDimension(View.MeasureSpec.getSize(i), size);
c();
}
@Override // android.view.View
public void onRtlPropertiesChanged(int i) {
Drawable drawable = this.l;
if (drawable == null || !a(drawable, i)) {
return;
}
invalidate();
}
/* 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.K
r4 = 0
int r0 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1))
if (r0 > 0) goto L10
goto L76
L10:
android.graphics.Point r0 = r7.a(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.I
if (r8 == 0) goto L76
int r8 = r7.u
if (r0 >= r8) goto L3a
int r8 = r7.D
int r2 = r2 - r8
int r2 = r2 / r5
int r8 = r8 + r2
float r8 = (float) r8
r7.a(r8)
goto L40
L3a:
r7.D = r2
float r8 = (float) r2
r7.a(r8)
L40:
long r0 = r7.getScrubberPosition()
r7.c(r0)
r7.b()
r7.invalidate()
return r4
L4e:
boolean r0 = r7.I
if (r0 == 0) goto L76
int r8 = r8.getAction()
if (r8 != r5) goto L59
r1 = r4
L59:
r7.a(r1)
return r4
L5d:
float r8 = (float) r2
float r0 = (float) r0
boolean r0 = r7.a(r8, r0)
if (r0 == 0) goto L76
r7.a(r8)
long r0 = r7.getScrubberPosition()
r7.b(r0)
r7.b()
r7.invalidate()
return r4
L76:
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.ui.b.onTouchEvent(android.view.MotionEvent):boolean");
}
@Override // android.view.View
public boolean performAccessibilityAction(int i, Bundle bundle) {
if (super.performAccessibilityAction(i, bundle)) {
return true;
}
if (this.K <= 0) {
return false;
}
if (i == 8192) {
if (a(-getPositionIncrement())) {
a(false);
}
} else {
if (i != 4096) {
return false;
}
if (a(getPositionIncrement())) {
a(false);
}
}
sendAccessibilityEvent(4);
return true;
}
public void setAdMarkerColor(@ColorInt int i) {
this.i.setColor(i);
invalidate(this.a);
}
public void setBufferedColor(@ColorInt int i) {
this.g.setColor(i);
invalidate(this.a);
}
@Override // android.view.View, com.applovin.exoplayer2.ui.i
public void setEnabled(boolean z) {
super.setEnabled(z);
if (!this.I || z) {
return;
}
a(true);
}
public void setKeyCountIncrement(int i) {
b1.a(i > 0);
this.B = i;
this.C = C.TIME_UNSET;
}
public void setKeyTimeIncrement(long j) {
b1.a(j > 0);
this.B = -1;
this.C = j;
}
public void setPlayedAdMarkerColor(@ColorInt int i) {
this.j.setColor(i);
invalidate(this.a);
}
public void setPlayedColor(@ColorInt int i) {
this.f.setColor(i);
invalidate(this.a);
}
public void setScrubberColor(@ColorInt int i) {
this.k.setColor(i);
invalidate(this.a);
}
public void setUnplayedColor(@ColorInt int i) {
this.h.setColor(i);
invalidate(this.a);
}
public b(Context context, AttributeSet attributeSet, int i, AttributeSet attributeSet2, int i2) {
super(context, attributeSet, i);
this.a = new Rect();
this.b = new Rect();
this.c = new Rect();
this.d = new Rect();
Paint paint = new Paint();
this.f = paint;
Paint paint2 = new Paint();
this.g = paint2;
Paint paint3 = new Paint();
this.h = paint3;
Paint paint4 = new Paint();
this.i = paint4;
Paint paint5 = new Paint();
this.j = paint5;
Paint paint6 = new Paint();
this.k = paint6;
paint6.setAntiAlias(true);
this.y = new CopyOnWriteArraySet();
this.z = new Point();
float f = context.getResources().getDisplayMetrics().density;
this.A = f;
this.u = a(f, -50);
int a = a(f, 4);
int a2 = a(f, 26);
int a3 = a(f, 4);
int a4 = a(f, 12);
int a5 = a(f, 0);
int a6 = a(f, 16);
if (attributeSet2 != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet2, R.styleable.AppLovinDefaultTimeBar, i, i2);
try {
Drawable drawable = obtainStyledAttributes.getDrawable(R.styleable.AppLovinDefaultTimeBar_al_scrubber_drawable);
this.l = drawable;
if (drawable != null) {
a(drawable);
a2 = Math.max(drawable.getMinimumHeight(), a2);
}
this.m = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_bar_height, a);
this.n = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_touch_target_height, a2);
this.o = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_bar_gravity, 0);
this.p = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_ad_marker_width, a3);
this.q = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_scrubber_enabled_size, a4);
this.r = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_scrubber_disabled_size, a5);
this.s = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_scrubber_dragged_size, a6);
int i3 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_played_color, -1);
int i4 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_scrubber_color, -1);
int i5 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_buffered_color, -855638017);
int i6 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_unplayed_color, 872415231);
int i7 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_ad_marker_color, -1291845888);
int i8 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_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.m = a;
this.n = a2;
this.o = 0;
this.p = a3;
this.q = a4;
this.r = a5;
this.s = a6;
paint.setColor(-1);
paint6.setColor(-1);
paint2.setColor(-855638017);
paint3.setColor(872415231);
paint4.setColor(-1291845888);
paint5.setColor(872414976);
this.l = null;
}
StringBuilder sb = new StringBuilder();
this.v = sb;
this.w = new Formatter(sb, Locale.getDefault());
this.x = new Runnable() { // from class: com.applovin.exoplayer2.ui.b$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
b.this.a();
}
};
Drawable drawable2 = this.l;
if (drawable2 != null) {
this.t = (drawable2.getMinimumWidth() + 1) / 2;
} else {
this.t = (Math.max(this.r, Math.max(this.q, this.s)) + 1) / 2;
}
this.G = 1.0f;
ValueAnimator valueAnimator = new ValueAnimator();
this.F = valueAnimator;
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.applovin.exoplayer2.ui.b$$ExternalSyntheticLambda2
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator2) {
b.this.a(valueAnimator2);
}
});
this.K = C.TIME_UNSET;
this.C = C.TIME_UNSET;
this.B = 20;
setFocusable(true);
if (getImportantForAccessibility() == 0) {
setImportantForAccessibility(1);
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a() {
a(false);
}
private long getPositionIncrement() {
long j = this.C;
if (j != C.TIME_UNSET) {
return j;
}
long j2 = this.K;
if (j2 == C.TIME_UNSET) {
return 0L;
}
return j2 / this.B;
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(ValueAnimator valueAnimator) {
this.G = ((Float) valueAnimator.getAnimatedValue()).floatValue();
invalidate(this.a);
}
private void b(long j) {
this.J = j;
this.I = true;
setPressed(true);
ViewParent parent = getParent();
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(true);
}
Iterator it = this.y.iterator();
while (it.hasNext()) {
((i.a) it.next()).a(this, j);
}
}
private void c(long j) {
if (this.J == j) {
return;
}
this.J = j;
Iterator it = this.y.iterator();
while (it.hasNext()) {
((i.a) it.next()).b(this, j);
}
}
@Override // com.applovin.exoplayer2.ui.i
public void a(i.a aVar) {
b1.a(aVar);
this.y.add(aVar);
}
@Override // com.applovin.exoplayer2.ui.i
public void setBufferedPosition(long j) {
if (this.M == j) {
return;
}
this.M = j;
b();
}
@Override // com.applovin.exoplayer2.ui.i
public void setPosition(long j) {
if (this.L == j) {
return;
}
this.L = j;
setContentDescription(getProgressText());
b();
}
@Override // com.applovin.exoplayer2.ui.i
public void setDuration(long j) {
if (this.K == j) {
return;
}
this.K = j;
if (this.I && j == C.TIME_UNSET) {
a(true);
}
b();
}
@Override // com.applovin.exoplayer2.ui.i
public void a(long[] jArr, boolean[] zArr, int i) {
b1.a(i == 0 || !(jArr == null || zArr == null));
this.N = i;
this.O = jArr;
this.P = zArr;
b();
}
private void c() {
Drawable drawable = this.l;
if (drawable != null && drawable.isStateful() && this.l.setState(getDrawableState())) {
invalidate();
}
}
private void b() {
this.c.set(this.b);
this.d.set(this.b);
long j = this.I ? this.J : this.L;
if (this.K > 0) {
int width = (int) ((this.b.width() * this.M) / this.K);
Rect rect = this.c;
Rect rect2 = this.b;
rect.right = Math.min(rect2.left + width, rect2.right);
int width2 = (int) ((this.b.width() * j) / this.K);
Rect rect3 = this.d;
Rect rect4 = this.b;
rect3.right = Math.min(rect4.left + width2, rect4.right);
} else {
Rect rect5 = this.c;
int i = this.b.left;
rect5.right = i;
this.d.right = i;
}
invalidate(this.a);
}
private void a(boolean z) {
removeCallbacks(this.x);
this.I = false;
setPressed(false);
ViewParent parent = getParent();
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(false);
}
invalidate();
Iterator it = this.y.iterator();
while (it.hasNext()) {
((i.a) it.next()).a(this, this.J, z);
}
}
private void b(Canvas canvas) {
int height = this.b.height();
int centerY = this.b.centerY() - (height / 2);
int i = height + centerY;
if (this.K <= 0) {
Rect rect = this.b;
canvas.drawRect(rect.left, centerY, rect.right, i, this.h);
return;
}
Rect rect2 = this.c;
int i2 = rect2.left;
int i3 = rect2.right;
int max = Math.max(Math.max(this.b.left, i3), this.d.right);
int i4 = this.b.right;
if (max < i4) {
canvas.drawRect(max, centerY, i4, i, this.h);
}
int max2 = Math.max(i2, this.d.right);
if (i3 > max2) {
canvas.drawRect(max2, centerY, i3, i, this.g);
}
if (this.d.width() > 0) {
Rect rect3 = this.d;
canvas.drawRect(rect3.left, centerY, rect3.right, i, this.f);
}
if (this.N == 0) {
return;
}
long[] jArr = (long[]) b1.a(this.O);
boolean[] zArr = (boolean[]) b1.a(this.P);
int i5 = this.p / 2;
for (int i6 = 0; i6 < this.N; i6++) {
int width = ((int) ((this.b.width() * xp.b(jArr[i6], 0L, this.K)) / this.K)) - i5;
Rect rect4 = this.b;
canvas.drawRect(rect4.left + Math.min(rect4.width() - this.p, Math.max(0, width)), centerY, r10 + this.p, i, zArr[i6] ? this.j : this.i);
}
}
private boolean a(long j) {
long j2 = this.K;
if (j2 <= 0) {
return false;
}
long j3 = this.I ? this.J : this.L;
long b = xp.b(j3 + j, 0L, j2);
if (b == j3) {
return false;
}
if (!this.I) {
b(b);
} else {
c(b);
}
b();
return true;
}
private void a(float f) {
Rect rect = this.d;
Rect rect2 = this.b;
rect.right = xp.a((int) f, rect2.left, rect2.right);
}
private Point a(MotionEvent motionEvent) {
this.z.set((int) motionEvent.getX(), (int) motionEvent.getY());
return this.z;
}
private boolean a(float f, float f2) {
return this.a.contains((int) f, (int) f2);
}
private void a(Canvas canvas) {
int i;
if (this.K <= 0) {
return;
}
Rect rect = this.d;
int a = xp.a(rect.right, rect.left, this.b.right);
int centerY = this.d.centerY();
if (this.l == null) {
if (this.I || isFocused()) {
i = this.s;
} else {
i = isEnabled() ? this.q : this.r;
}
canvas.drawCircle(a, centerY, (int) ((i * this.G) / 2.0f), this.k);
return;
}
int intrinsicWidth = ((int) (r2.getIntrinsicWidth() * this.G)) / 2;
int intrinsicHeight = ((int) (this.l.getIntrinsicHeight() * this.G)) / 2;
this.l.setBounds(a - intrinsicWidth, centerY - intrinsicHeight, a + intrinsicWidth, centerY + intrinsicHeight);
this.l.draw(canvas);
}
private void a(int i, int i2) {
Rect rect = this.E;
if (rect != null && rect.width() == i && this.E.height() == i2) {
return;
}
Rect rect2 = new Rect(0, 0, i, i2);
this.E = rect2;
setSystemGestureExclusionRects(Collections.singletonList(rect2));
}
private boolean a(Drawable drawable) {
return xp.a >= 23 && a(drawable, getLayoutDirection());
}
private static boolean a(Drawable drawable, int i) {
return xp.a >= 23 && drawable.setLayoutDirection(i);
}
}

View File

@@ -0,0 +1,16 @@
package com.applovin.exoplayer2.ui;
import android.graphics.Color;
import com.applovin.impl.xp;
import csdk.gluads.Consts;
/* loaded from: classes.dex */
abstract class c {
public static String a(int i) {
return xp.a("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 a(String str) {
return Consts.STRING_PERIOD + str + ",." + str + " *";
}
}

View File

@@ -0,0 +1,986 @@
package com.applovin.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.Nullable;
import com.applovin.exoplayer2.ui.i;
import com.applovin.impl.b1;
import com.applovin.impl.f8;
import com.applovin.impl.fo;
import com.applovin.impl.qh;
import com.applovin.impl.t2;
import com.applovin.impl.t4;
import com.applovin.impl.u5;
import com.applovin.impl.ui;
import com.applovin.impl.xp;
import com.applovin.sdk.R;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.util.Arrays;
import java.util.Formatter;
import java.util.Iterator;
import java.util.Locale;
import java.util.concurrent.CopyOnWriteArrayList;
/* loaded from: classes.dex */
public class d extends FrameLayout {
private final String A;
private final Drawable B;
private final Drawable C;
private final float D;
private final float E;
private final String F;
private final String G;
private qh H;
private t4 I;
private boolean J;
private boolean K;
private boolean L;
private boolean M;
private int N;
private int O;
private int P;
private boolean Q;
private boolean R;
private boolean S;
private boolean T;
private boolean U;
private long V;
private long[] W;
private final c a;
private boolean[] a0;
private final CopyOnWriteArrayList b;
private long[] b0;
private final View c;
private boolean[] c0;
private final View d;
private long d0;
private long e0;
private final View f;
private long f0;
private final View g;
private final View h;
private final View i;
private final ImageView j;
private final ImageView k;
private final View l;
private final TextView m;
private final TextView n;
private final i o;
private final StringBuilder p;
private final Formatter q;
private final fo.b r;
private final fo.d s;
private final Runnable t;
private final Runnable u;
private final Drawable v;
private final Drawable w;
private final Drawable x;
private final String y;
private final String z;
public static final class b {
public static boolean a(View view) {
return view.isAccessibilityFocused();
}
}
/* renamed from: com.applovin.exoplayer2.ui.d$d, reason: collision with other inner class name */
public interface InterfaceC0011d {
}
public interface e {
void d(int i);
}
static {
f8.a("goog.exo.ui");
}
public d(Context context, AttributeSet attributeSet, int i, AttributeSet attributeSet2) {
super(context, attributeSet, i);
int i2 = R.layout.applovin_exo_player_control_view;
this.N = 5000;
this.P = 0;
this.O = 200;
this.V = C.TIME_UNSET;
this.Q = true;
this.R = true;
this.S = true;
this.T = true;
this.U = false;
if (attributeSet2 != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet2, R.styleable.AppLovinPlayerControlView, i, 0);
try {
this.N = obtainStyledAttributes.getInt(R.styleable.AppLovinPlayerControlView_al_show_timeout, this.N);
i2 = obtainStyledAttributes.getResourceId(R.styleable.AppLovinPlayerControlView_al_controller_layout_id, i2);
this.P = a(obtainStyledAttributes, this.P);
this.Q = obtainStyledAttributes.getBoolean(R.styleable.AppLovinPlayerControlView_al_show_rewind_button, this.Q);
this.R = obtainStyledAttributes.getBoolean(R.styleable.AppLovinPlayerControlView_al_show_fastforward_button, this.R);
this.S = obtainStyledAttributes.getBoolean(R.styleable.AppLovinPlayerControlView_al_show_previous_button, this.S);
this.T = obtainStyledAttributes.getBoolean(R.styleable.AppLovinPlayerControlView_al_show_next_button, this.T);
this.U = obtainStyledAttributes.getBoolean(R.styleable.AppLovinPlayerControlView_al_show_shuffle_button, this.U);
setTimeBarMinUpdateInterval(obtainStyledAttributes.getInt(R.styleable.AppLovinPlayerControlView_al_time_bar_min_update_interval, this.O));
} finally {
obtainStyledAttributes.recycle();
}
}
this.b = new CopyOnWriteArrayList();
this.r = new fo.b();
this.s = new fo.d();
StringBuilder sb = new StringBuilder();
this.p = sb;
this.q = new Formatter(sb, Locale.getDefault());
this.W = new long[0];
this.a0 = new boolean[0];
this.b0 = new long[0];
this.c0 = new boolean[0];
c cVar = new c();
this.a = cVar;
this.I = new u5();
this.t = new Runnable() { // from class: com.applovin.exoplayer2.ui.d$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
d.this.k();
}
};
this.u = new Runnable() { // from class: com.applovin.exoplayer2.ui.d$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
d.this.a();
}
};
LayoutInflater.from(context).inflate(i2, this);
setDescendantFocusability(262144);
i iVar = (i) findViewById(R.id.al_exo_progress);
View findViewById = findViewById(R.id.al_exo_progress_placeholder);
if (iVar != null) {
this.o = iVar;
} else if (findViewById != null) {
com.applovin.exoplayer2.ui.b bVar = new com.applovin.exoplayer2.ui.b(context, null, 0, attributeSet2);
bVar.setId(R.id.al_exo_progress);
bVar.setLayoutParams(findViewById.getLayoutParams());
ViewGroup viewGroup = (ViewGroup) findViewById.getParent();
int indexOfChild = viewGroup.indexOfChild(findViewById);
viewGroup.removeView(findViewById);
viewGroup.addView(bVar, indexOfChild);
this.o = bVar;
} else {
this.o = null;
}
this.m = (TextView) findViewById(R.id.al_exo_duration);
this.n = (TextView) findViewById(R.id.al_exo_position);
i iVar2 = this.o;
if (iVar2 != null) {
iVar2.a(cVar);
}
View findViewById2 = findViewById(R.id.al_exo_play);
this.f = findViewById2;
if (findViewById2 != null) {
findViewById2.setOnClickListener(cVar);
}
View findViewById3 = findViewById(R.id.al_exo_pause);
this.g = findViewById3;
if (findViewById3 != null) {
findViewById3.setOnClickListener(cVar);
}
View findViewById4 = findViewById(R.id.al_exo_prev);
this.c = findViewById4;
if (findViewById4 != null) {
findViewById4.setOnClickListener(cVar);
}
View findViewById5 = findViewById(R.id.al_exo_next);
this.d = findViewById5;
if (findViewById5 != null) {
findViewById5.setOnClickListener(cVar);
}
View findViewById6 = findViewById(R.id.al_exo_rew);
this.i = findViewById6;
if (findViewById6 != null) {
findViewById6.setOnClickListener(cVar);
}
View findViewById7 = findViewById(R.id.al_exo_ffwd);
this.h = findViewById7;
if (findViewById7 != null) {
findViewById7.setOnClickListener(cVar);
}
ImageView imageView = (ImageView) findViewById(R.id.al_exo_repeat_toggle);
this.j = imageView;
if (imageView != null) {
imageView.setOnClickListener(cVar);
}
ImageView imageView2 = (ImageView) findViewById(R.id.al_exo_shuffle);
this.k = imageView2;
if (imageView2 != null) {
imageView2.setOnClickListener(cVar);
}
View findViewById8 = findViewById(R.id.al_exo_vr);
this.l = findViewById8;
setShowVrButton(false);
a(false, false, findViewById8);
Resources resources = context.getResources();
this.D = resources.getInteger(R.integer.al_exo_media_button_opacity_percentage_enabled) / 100.0f;
this.E = resources.getInteger(R.integer.al_exo_media_button_opacity_percentage_disabled) / 100.0f;
this.v = resources.getDrawable(R.drawable.al_exo_controls_repeat_off);
this.w = resources.getDrawable(R.drawable.al_exo_controls_repeat_one);
this.x = resources.getDrawable(R.drawable.al_exo_controls_repeat_all);
this.B = resources.getDrawable(R.drawable.al_exo_controls_shuffle_on);
this.C = resources.getDrawable(R.drawable.al_exo_controls_shuffle_off);
this.y = resources.getString(R.string.al_exo_controls_repeat_off_description);
this.z = resources.getString(R.string.al_exo_controls_repeat_one_description);
this.A = resources.getString(R.string.al_exo_controls_repeat_all_description);
this.F = resources.getString(R.string.al_exo_controls_shuffle_on_description);
this.G = resources.getString(R.string.al_exo_controls_shuffle_off_description);
}
private static boolean a(int i) {
return i == 90 || i == 89 || i == 85 || i == 79 || i == 126 || i == 127 || i == 87 || i == 88;
}
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
return a(keyEvent) || super.dispatchKeyEvent(keyEvent);
}
@Override // android.view.ViewGroup, android.view.View
public final boolean dispatchTouchEvent(MotionEvent motionEvent) {
if (motionEvent.getAction() == 0) {
removeCallbacks(this.u);
} else if (motionEvent.getAction() == 1) {
b();
}
return super.dispatchTouchEvent(motionEvent);
}
@Nullable
public qh getPlayer() {
return this.H;
}
public int getRepeatToggleModes() {
return this.P;
}
public boolean getShowShuffleButton() {
return this.U;
}
public int getShowTimeoutMs() {
return this.N;
}
public boolean getShowVrButton() {
View view = this.l;
return view != null && view.getVisibility() == 0;
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
this.J = true;
long j = this.V;
if (j != C.TIME_UNSET) {
long uptimeMillis = j - SystemClock.uptimeMillis();
if (uptimeMillis <= 0) {
a();
} else {
postDelayed(this.u, uptimeMillis);
}
} else if (c()) {
b();
}
h();
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
this.J = false;
removeCallbacks(this.t);
removeCallbacks(this.u);
}
public void setPlayer(@Nullable qh qhVar) {
b1.b(Looper.myLooper() == Looper.getMainLooper());
b1.a(qhVar == null || qhVar.p() == Looper.getMainLooper());
qh qhVar2 = this.H;
if (qhVar2 == qhVar) {
return;
}
if (qhVar2 != null) {
qhVar2.a(this.a);
}
this.H = qhVar;
if (qhVar != null) {
qhVar.b(this.a);
}
h();
}
public void setProgressUpdateListener(@Nullable InterfaceC0011d interfaceC0011d) {
}
public void setTimeBarMinUpdateInterval(int i) {
this.O = xp.a(i, 16, 1000);
}
private void d() {
View view;
View view2;
boolean f = f();
if (!f && (view2 = this.f) != null) {
view2.sendAccessibilityEvent(8);
} else {
if (!f || (view = this.g) == null) {
return;
}
view.sendAccessibilityEvent(8);
}
}
private void h() {
j();
i();
l();
m();
n();
}
/* JADX INFO: Access modifiers changed from: private */
public void i() {
boolean z;
boolean z2;
boolean z3;
boolean z4;
if (c() && this.J) {
qh qhVar = this.H;
boolean z5 = false;
if (qhVar != null) {
boolean b2 = qhVar.b(4);
boolean b3 = qhVar.b(6);
z4 = qhVar.b(10) && this.I.b();
if (qhVar.b(11) && this.I.a()) {
z5 = true;
}
z2 = qhVar.b(8);
z = z5;
z5 = b3;
z3 = b2;
} else {
z = false;
z2 = false;
z3 = false;
z4 = false;
}
a(this.S, z5, this.c);
a(this.Q, z4, this.i);
a(this.R, z, this.h);
a(this.T, z2, this.d);
i iVar = this.o;
if (iVar != null) {
iVar.setEnabled(z3);
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public void j() {
boolean z;
boolean z2;
if (c() && this.J) {
boolean f = f();
View view = this.f;
boolean z3 = true;
if (view != null) {
z = f && view.isFocused();
z2 = xp.a < 21 ? z : f && b.a(this.f);
this.f.setVisibility(f ? 8 : 0);
} else {
z = false;
z2 = false;
}
View view2 = this.g;
if (view2 != null) {
z |= !f && view2.isFocused();
if (xp.a < 21) {
z3 = z;
} else if (f || !b.a(this.g)) {
z3 = false;
}
z2 |= z3;
this.g.setVisibility(f ? 0 : 8);
}
if (z) {
e();
}
if (z2) {
d();
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public void k() {
long j;
long j2;
if (c() && this.J) {
qh qhVar = this.H;
if (qhVar != null) {
j = this.d0 + qhVar.g();
j2 = this.d0 + qhVar.s();
} else {
j = 0;
j2 = 0;
}
boolean z = j != this.e0;
this.e0 = j;
this.f0 = j2;
TextView textView = this.n;
if (textView != null && !this.M && z) {
textView.setText(xp.a(this.p, this.q, j));
}
i iVar = this.o;
if (iVar != null) {
iVar.setPosition(j);
this.o.setBufferedPosition(j2);
}
removeCallbacks(this.t);
int o = qhVar == null ? 1 : qhVar.o();
if (qhVar == null || !qhVar.isPlaying()) {
if (o == 4 || o == 1) {
return;
}
postDelayed(this.t, 1000L);
return;
}
i iVar2 = this.o;
long min = Math.min(iVar2 != null ? iVar2.getPreferredUpdateDelay() : 1000L, 1000 - (j % 1000));
float f = qhVar.a().a;
postDelayed(this.t, xp.b(f > 0.0f ? (long) (min / f) : 1000L, this.O, 1000L));
}
}
/* JADX INFO: Access modifiers changed from: private */
public void l() {
ImageView imageView;
if (c() && this.J && (imageView = this.j) != null) {
if (this.P == 0) {
a(false, false, (View) imageView);
return;
}
qh qhVar = this.H;
if (qhVar == null) {
a(true, false, (View) imageView);
this.j.setImageDrawable(this.v);
this.j.setContentDescription(this.y);
return;
}
a(true, true, (View) imageView);
int m = qhVar.m();
if (m == 0) {
this.j.setImageDrawable(this.v);
this.j.setContentDescription(this.y);
} else if (m == 1) {
this.j.setImageDrawable(this.w);
this.j.setContentDescription(this.z);
} else if (m == 2) {
this.j.setImageDrawable(this.x);
this.j.setContentDescription(this.A);
}
this.j.setVisibility(0);
}
}
/* JADX INFO: Access modifiers changed from: private */
public void m() {
ImageView imageView;
if (c() && this.J && (imageView = this.k) != null) {
qh qhVar = this.H;
if (!this.U) {
a(false, false, (View) imageView);
return;
}
if (qhVar == null) {
a(true, false, (View) imageView);
this.k.setImageDrawable(this.C);
this.k.setContentDescription(this.G);
} else {
a(true, true, (View) imageView);
this.k.setImageDrawable(qhVar.r() ? this.B : this.C);
this.k.setContentDescription(qhVar.r() ? this.F : this.G);
}
}
}
public void g() {
if (!c()) {
setVisibility(0);
Iterator it = this.b.iterator();
while (it.hasNext()) {
((e) it.next()).d(getVisibility());
}
h();
e();
d();
}
b();
}
public void setShowFastForwardButton(boolean z) {
this.R = z;
i();
}
public void setShowMultiWindowTimeBar(boolean z) {
this.K = z;
n();
}
public void setShowNextButton(boolean z) {
this.T = z;
i();
}
public void setShowPreviousButton(boolean z) {
this.S = z;
i();
}
public void setShowRewindButton(boolean z) {
this.Q = z;
i();
}
public void setShowShuffleButton(boolean z) {
this.U = z;
m();
}
public void setShowTimeoutMs(int i) {
this.N = i;
if (c()) {
b();
}
}
public void setShowVrButton(boolean z) {
View view = this.l;
if (view != null) {
view.setVisibility(z ? 0 : 8);
}
}
public void setVrButtonListener(@Nullable View.OnClickListener onClickListener) {
View view = this.l;
if (view != null) {
view.setOnClickListener(onClickListener);
a(getShowVrButton(), onClickListener != null, this.l);
}
}
private boolean f() {
qh qhVar = this.H;
return (qhVar == null || qhVar.o() == 4 || this.H.o() == 1 || !this.H.l()) ? false : true;
}
public void setRepeatToggleModes(int i) {
this.P = i;
qh qhVar = this.H;
if (qhVar != null) {
int m = qhVar.m();
if (i == 0 && m != 0) {
this.I.a(this.H, 0);
} else if (i == 1 && m == 2) {
this.I.a(this.H, 1);
} else if (i == 2 && m == 1) {
this.I.a(this.H, 2);
}
}
l();
}
/* JADX INFO: Access modifiers changed from: private */
public void n() {
int i;
fo.d dVar;
qh qhVar = this.H;
if (qhVar == null) {
return;
}
boolean z = true;
this.L = this.K && a(qhVar.n(), this.s);
long j = 0;
this.d0 = 0L;
fo n = qhVar.n();
if (n.c()) {
i = 0;
} else {
int t = qhVar.t();
boolean z2 = this.L;
int i2 = z2 ? 0 : t;
int b2 = z2 ? n.b() - 1 : t;
long j2 = 0;
i = 0;
while (true) {
if (i2 > b2) {
break;
}
if (i2 == t) {
this.d0 = t2.b(j2);
}
n.a(i2, this.s);
fo.d dVar2 = this.s;
if (dVar2.o == C.TIME_UNSET) {
b1.b(this.L ^ z);
break;
}
int i3 = dVar2.p;
while (true) {
dVar = this.s;
if (i3 <= dVar.q) {
n.a(i3, this.r);
int a2 = this.r.a();
for (int f = this.r.f(); f < a2; f++) {
long b3 = this.r.b(f);
if (b3 == Long.MIN_VALUE) {
long j3 = this.r.d;
if (j3 != C.TIME_UNSET) {
b3 = j3;
}
}
long e2 = b3 + this.r.e();
if (e2 >= 0) {
long[] jArr = this.W;
if (i == jArr.length) {
int length = jArr.length == 0 ? 1 : jArr.length * 2;
this.W = Arrays.copyOf(jArr, length);
this.a0 = Arrays.copyOf(this.a0, length);
}
this.W[i] = t2.b(j2 + e2);
this.a0[i] = this.r.e(f);
i++;
}
}
i3++;
}
}
j2 += dVar.o;
i2++;
z = true;
}
j = j2;
}
long b4 = t2.b(j);
TextView textView = this.m;
if (textView != null) {
textView.setText(xp.a(this.p, this.q, b4));
}
i iVar = this.o;
if (iVar != null) {
iVar.setDuration(b4);
int length2 = this.b0.length;
int i4 = i + length2;
long[] jArr2 = this.W;
if (i4 > jArr2.length) {
this.W = Arrays.copyOf(jArr2, i4);
this.a0 = Arrays.copyOf(this.a0, i4);
}
System.arraycopy(this.b0, 0, this.W, i, length2);
System.arraycopy(this.c0, 0, this.a0, i, length2);
this.o.a(this.W, this.a0, i4);
}
k();
}
private void e() {
View view;
View view2;
boolean f = f();
if (!f && (view2 = this.f) != null) {
view2.requestFocus();
} else {
if (!f || (view = this.g) == null) {
return;
}
view.requestFocus();
}
}
@Deprecated
public void setControlDispatcher(t4 t4Var) {
if (this.I != t4Var) {
this.I = t4Var;
i();
}
}
public final class c implements qh.e, i.a, View.OnClickListener {
private c() {
}
@Override // com.applovin.exoplayer2.ui.i.a
public void b(i iVar, long j) {
if (d.this.n != null) {
d.this.n.setText(xp.a(d.this.p, d.this.q, j));
}
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
qh qhVar = d.this.H;
if (qhVar == null) {
return;
}
if (d.this.d == view) {
d.this.I.a(qhVar);
return;
}
if (d.this.c == view) {
d.this.I.e(qhVar);
return;
}
if (d.this.h == view) {
if (qhVar.o() != 4) {
d.this.I.d(qhVar);
return;
}
return;
}
if (d.this.i == view) {
d.this.I.c(qhVar);
return;
}
if (d.this.f == view) {
d.this.b(qhVar);
return;
}
if (d.this.g == view) {
d.this.a(qhVar);
} else if (d.this.j == view) {
d.this.I.a(qhVar, ui.a(qhVar.m(), d.this.P));
} else if (d.this.k == view) {
d.this.I.a(qhVar, !qhVar.r());
}
}
@Override // com.applovin.impl.qh.e, com.applovin.impl.qh.c
public void a(qh qhVar, qh.d dVar) {
if (dVar.a(4, 5)) {
d.this.j();
}
if (dVar.a(4, 5, 7)) {
d.this.k();
}
if (dVar.a(8)) {
d.this.l();
}
if (dVar.a(9)) {
d.this.m();
}
if (dVar.a(8, 9, 11, 0, 13)) {
d.this.i();
}
if (dVar.a(11, 0)) {
d.this.n();
}
}
@Override // com.applovin.exoplayer2.ui.i.a
public void a(i iVar, long j) {
d.this.M = true;
if (d.this.n != null) {
d.this.n.setText(xp.a(d.this.p, d.this.q, j));
}
}
@Override // com.applovin.exoplayer2.ui.i.a
public void a(i iVar, long j, boolean z) {
d.this.M = false;
if (z || d.this.H == null) {
return;
}
d dVar = d.this;
dVar.a(dVar.H, j);
}
}
private void c(qh qhVar) {
int o = qhVar.o();
if (o != 1 && o != 4 && qhVar.l()) {
a(qhVar);
} else {
b(qhVar);
}
}
public boolean c() {
return getVisibility() == 0;
}
/* JADX INFO: Access modifiers changed from: private */
public void b(qh qhVar) {
int o = qhVar.o();
if (o == 1) {
this.I.b(qhVar);
} else if (o == 4) {
a(qhVar, qhVar.t(), C.TIME_UNSET);
}
this.I.b(qhVar, true);
}
public void b(e eVar) {
this.b.remove(eVar);
}
private void b() {
removeCallbacks(this.u);
if (this.N <= 0) {
this.V = C.TIME_UNSET;
return;
}
long uptimeMillis = SystemClock.uptimeMillis();
long j = this.N;
this.V = uptimeMillis + j;
if (this.J) {
postDelayed(this.u, j);
}
}
private static boolean a(fo foVar, fo.d dVar) {
if (foVar.b() > 100) {
return false;
}
int b2 = foVar.b();
for (int i = 0; i < b2; i++) {
if (foVar.a(i, dVar).o == C.TIME_UNSET) {
return false;
}
}
return true;
}
/* JADX INFO: Access modifiers changed from: private */
public void a(qh qhVar) {
this.I.b(qhVar, false);
}
private boolean a(qh qhVar, int i, long j) {
return this.I.a(qhVar, i, j);
}
/* JADX INFO: Access modifiers changed from: private */
public void a(qh qhVar, long j) {
int t;
fo n = qhVar.n();
if (this.L && !n.c()) {
int b2 = n.b();
t = 0;
while (true) {
long d = n.a(t, this.s).d();
if (j < d) {
break;
}
if (t == b2 - 1) {
j = d;
break;
} else {
j -= d;
t++;
}
}
} else {
t = qhVar.t();
}
a(qhVar, t, j);
k();
}
public void a(e eVar) {
b1.a(eVar);
this.b.add(eVar);
}
public void a() {
if (c()) {
setVisibility(8);
Iterator it = this.b.iterator();
while (it.hasNext()) {
((e) it.next()).d(getVisibility());
}
removeCallbacks(this.t);
removeCallbacks(this.u);
this.V = C.TIME_UNSET;
}
}
private void a(boolean z, boolean z2, View view) {
if (view == null) {
return;
}
view.setEnabled(z2);
view.setAlpha(z2 ? this.D : this.E);
view.setVisibility(z ? 0 : 8);
}
public boolean a(KeyEvent keyEvent) {
int keyCode = keyEvent.getKeyCode();
qh qhVar = this.H;
if (qhVar == null || !a(keyCode)) {
return false;
}
if (keyEvent.getAction() != 0) {
return true;
}
if (keyCode == 90) {
if (qhVar.o() == 4) {
return true;
}
this.I.d(qhVar);
return true;
}
if (keyCode == 89) {
this.I.c(qhVar);
return true;
}
if (keyEvent.getRepeatCount() != 0) {
return true;
}
if (keyCode == 79 || keyCode == 85) {
c(qhVar);
return true;
}
if (keyCode == 87) {
this.I.a(qhVar);
return true;
}
if (keyCode == 88) {
this.I.e(qhVar);
return true;
}
if (keyCode == 126) {
b(qhVar);
return true;
}
if (keyCode != 127) {
return true;
}
a(qhVar);
return true;
}
private static int a(TypedArray typedArray, int i) {
return typedArray.getInt(R.styleable.AppLovinPlayerControlView_al_repeat_toggle_modes, i);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,299 @@
package com.applovin.exoplayer2.ui;
import android.text.Html;
import android.text.Spanned;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.BackgroundColorSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.RelativeSizeSpan;
import android.text.style.StrikethroughSpan;
import android.text.style.StyleSpan;
import android.text.style.TypefaceSpan;
import android.text.style.UnderlineSpan;
import android.util.SparseArray;
import com.applovin.exoplayer2.ui.f;
import com.applovin.impl.b1;
import com.applovin.impl.gb;
import com.applovin.impl.pa;
import com.applovin.impl.xp;
import com.applovin.impl.yn;
import com.applovin.impl.zi;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
/* loaded from: classes.dex */
abstract class f {
private static final Pattern a = Pattern.compile("(&#13;)?&#10;");
public static class b {
public final String a;
public final Map b;
private b(String str, Map map) {
this.a = str;
this.b = map;
}
}
public static final class c {
private static final Comparator e = new Comparator() { // from class: com.applovin.exoplayer2.ui.f$c$$ExternalSyntheticLambda0
@Override // java.util.Comparator
public final int compare(Object obj, Object obj2) {
int a;
a = f.c.a((f.c) obj, (f.c) obj2);
return a;
}
};
private static final Comparator f = new Comparator() { // from class: com.applovin.exoplayer2.ui.f$c$$ExternalSyntheticLambda1
@Override // java.util.Comparator
public final int compare(Object obj, Object obj2) {
int b;
b = f.c.b((f.c) obj, (f.c) obj2);
return b;
}
};
public final int a;
public final int b;
public final String c;
public final String d;
private c(int i, int i2, String str, String str2) {
this.a = i;
this.b = i2;
this.c = str;
this.d = str2;
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ int a(c cVar, c cVar2) {
int compare = Integer.compare(cVar2.b, cVar.b);
if (compare != 0) {
return compare;
}
int compareTo = cVar.c.compareTo(cVar2.c);
return compareTo != 0 ? compareTo : cVar.d.compareTo(cVar2.d);
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ int b(c cVar, c cVar2) {
int compare = Integer.compare(cVar2.a, cVar.a);
if (compare != 0) {
return compare;
}
int compareTo = cVar2.c.compareTo(cVar.c);
return compareTo != 0 ? compareTo : cVar2.d.compareTo(cVar.d);
}
}
public static final class d {
private final List a = new ArrayList();
private final List b = new ArrayList();
}
public static b a(CharSequence charSequence, float f) {
if (charSequence == null) {
return new b("", gb.h());
}
if (!(charSequence instanceof Spanned)) {
return new b(a(charSequence), gb.h());
}
Spanned spanned = (Spanned) charSequence;
HashSet hashSet = new HashSet();
int i = 0;
for (BackgroundColorSpan backgroundColorSpan : (BackgroundColorSpan[]) spanned.getSpans(0, spanned.length(), BackgroundColorSpan.class)) {
hashSet.add(Integer.valueOf(backgroundColorSpan.getBackgroundColor()));
}
HashMap hashMap = new HashMap();
Iterator it = hashSet.iterator();
while (it.hasNext()) {
int intValue = ((Integer) it.next()).intValue();
hashMap.put(com.applovin.exoplayer2.ui.c.a("bg_" + intValue), xp.a("background-color:%s;", com.applovin.exoplayer2.ui.c.a(intValue)));
}
SparseArray a2 = a(spanned, f);
StringBuilder sb = new StringBuilder(spanned.length());
int i2 = 0;
while (i < a2.size()) {
int keyAt = a2.keyAt(i);
sb.append(a(spanned.subSequence(i2, keyAt)));
d dVar = (d) a2.get(keyAt);
Collections.sort(dVar.b, c.f);
Iterator it2 = dVar.b.iterator();
while (it2.hasNext()) {
sb.append(((c) it2.next()).d);
}
Collections.sort(dVar.a, c.e);
Iterator it3 = dVar.a.iterator();
while (it3.hasNext()) {
sb.append(((c) it3.next()).c);
}
i++;
i2 = keyAt;
}
sb.append(a(spanned.subSequence(i2, spanned.length())));
return new b(sb.toString(), hashMap);
}
private static String a(int i) {
return i != 2 ? "over right" : "under left";
}
private static SparseArray a(Spanned spanned, float f) {
SparseArray sparseArray = new SparseArray();
for (Object obj : spanned.getSpans(0, spanned.length(), Object.class)) {
String a2 = a(obj, f);
String a3 = a(obj);
int spanStart = spanned.getSpanStart(obj);
int spanEnd = spanned.getSpanEnd(obj);
if (a2 != null) {
b1.a((Object) a3);
c cVar = new c(spanStart, spanEnd, a2, a3);
a(sparseArray, spanStart).a.add(cVar);
a(sparseArray, spanEnd).b.add(cVar);
}
}
return sparseArray;
}
private static String a(Object obj, float f) {
float size;
if (obj instanceof StrikethroughSpan) {
return "<span style='text-decoration:line-through;'>";
}
if (obj instanceof ForegroundColorSpan) {
return xp.a("<span style='color:%s;'>", com.applovin.exoplayer2.ui.c.a(((ForegroundColorSpan) obj).getForegroundColor()));
}
if (obj instanceof BackgroundColorSpan) {
return xp.a("<span class='bg_%s'>", Integer.valueOf(((BackgroundColorSpan) obj).getBackgroundColor()));
}
if (obj instanceof pa) {
return "<span style='text-combine-upright:all;'>";
}
if (obj instanceof AbsoluteSizeSpan) {
AbsoluteSizeSpan absoluteSizeSpan = (AbsoluteSizeSpan) obj;
if (absoluteSizeSpan.getDip()) {
size = absoluteSizeSpan.getSize();
} else {
size = absoluteSizeSpan.getSize() / f;
}
return xp.a("<span style='font-size:%.2fpx;'>", Float.valueOf(size));
}
if (obj instanceof RelativeSizeSpan) {
return xp.a("<span style='font-size:%.2f%%;'>", Float.valueOf(((RelativeSizeSpan) obj).getSizeChange() * 100.0f));
}
if (obj instanceof TypefaceSpan) {
String family = ((TypefaceSpan) obj).getFamily();
if (family != null) {
return xp.a("<span style='font-family:\"%s\";'>", family);
}
return null;
}
if (obj instanceof StyleSpan) {
int style = ((StyleSpan) obj).getStyle();
if (style == 1) {
return "<b>";
}
if (style == 2) {
return "<i>";
}
if (style != 3) {
return null;
}
return "<b><i>";
}
if (obj instanceof zi) {
int i = ((zi) obj).b;
if (i == -1) {
return "<ruby style='ruby-position:unset;'>";
}
if (i == 1) {
return "<ruby style='ruby-position:over;'>";
}
if (i != 2) {
return null;
}
return "<ruby style='ruby-position:under;'>";
}
if (obj instanceof UnderlineSpan) {
return "<u>";
}
if (!(obj instanceof yn)) {
return null;
}
yn ynVar = (yn) obj;
return xp.a("<span style='-webkit-text-emphasis-style:%1$s;text-emphasis-style:%1$s;-webkit-text-emphasis-position:%2$s;text-emphasis-position:%2$s;display:inline-block;'>", a(ynVar.a, ynVar.b), a(ynVar.c));
}
private static String a(Object obj) {
if ((obj instanceof StrikethroughSpan) || (obj instanceof ForegroundColorSpan) || (obj instanceof BackgroundColorSpan) || (obj instanceof pa) || (obj instanceof AbsoluteSizeSpan) || (obj instanceof RelativeSizeSpan) || (obj instanceof yn)) {
return "</span>";
}
if (obj instanceof TypefaceSpan) {
if (((TypefaceSpan) obj).getFamily() != null) {
return "</span>";
}
return null;
}
if (obj instanceof StyleSpan) {
int style = ((StyleSpan) obj).getStyle();
if (style == 1) {
return "</b>";
}
if (style == 2) {
return "</i>";
}
if (style == 3) {
return "</i></b>";
}
} else {
if (obj instanceof zi) {
return "<rt>" + a((CharSequence) ((zi) obj).a) + "</rt></ruby>";
}
if (obj instanceof UnderlineSpan) {
return "</u>";
}
}
return null;
}
private static String a(int i, int i2) {
StringBuilder sb = new StringBuilder();
if (i2 == 1) {
sb.append("filled ");
} else if (i2 == 2) {
sb.append("open ");
}
if (i == 0) {
sb.append("none");
} else if (i == 1) {
sb.append("circle");
} else if (i == 2) {
sb.append("dot");
} else if (i != 3) {
sb.append("unset");
} else {
sb.append("sesame");
}
return sb.toString();
}
private static d a(SparseArray sparseArray, int i) {
d dVar = (d) sparseArray.get(i);
if (dVar != null) {
return dVar;
}
d dVar2 = new d();
sparseArray.put(i, dVar2);
return dVar2;
}
private static String a(CharSequence charSequence) {
return a.matcher(Html.escapeHtml(charSequence)).replaceAll("<br>");
}
}

View File

@@ -0,0 +1,288 @@
package com.applovin.exoplayer2.ui;
import android.R;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.text.TextUtils;
import androidx.core.view.ViewCompat;
import com.applovin.impl.b1;
import com.applovin.impl.b5;
import com.applovin.impl.x2;
import com.applovin.impl.xp;
/* loaded from: classes.dex */
final class g {
private int A;
private int B;
private int C;
private int D;
private StaticLayout E;
private StaticLayout F;
private int G;
private int H;
private int I;
private Rect J;
private final float a;
private final float b;
private final float c;
private final float d;
private final float e;
private final TextPaint f;
private final Paint g;
private final Paint h;
private CharSequence i;
private Layout.Alignment j;
private Bitmap k;
private float l;
private int m;
private int n;
private float o;
private int p;
private float q;
private float r;
private int s;
private int t;
private int u;
private int v;
private int w;
private float x;
private float y;
private float z;
public g(Context context) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(null, new int[]{R.attr.lineSpacingExtra, R.attr.lineSpacingMultiplier}, 0, 0);
this.e = obtainStyledAttributes.getDimensionPixelSize(0, 0);
this.d = obtainStyledAttributes.getFloat(1, 1.0f);
obtainStyledAttributes.recycle();
float round = Math.round((context.getResources().getDisplayMetrics().densityDpi * 2.0f) / 160.0f);
this.a = round;
this.b = round;
this.c = round;
TextPaint textPaint = new TextPaint();
this.f = textPaint;
textPaint.setAntiAlias(true);
textPaint.setSubpixelText(true);
Paint paint = new Paint();
this.g = paint;
paint.setAntiAlias(true);
paint.setStyle(Paint.Style.FILL);
Paint paint2 = new Paint();
this.h = paint2;
paint2.setAntiAlias(true);
paint2.setFilterBitmap(true);
}
/* JADX WARN: Removed duplicated region for block: B:58:0x019f */
/* JADX WARN: Removed duplicated region for block: B:62:0x01a3 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void b() {
/*
Method dump skipped, instructions count: 489
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.ui.g.b():void");
}
public void a(b5 b5Var, x2 x2Var, float f, float f2, float f3, Canvas canvas, int i, int i2, int i3, int i4) {
int i5;
boolean z = b5Var.d == null;
if (!z) {
i5 = ViewCompat.MEASURED_STATE_MASK;
} else if (TextUtils.isEmpty(b5Var.a)) {
return;
} else {
i5 = b5Var.m ? b5Var.n : x2Var.c;
}
if (a(this.i, b5Var.a) && xp.a(this.j, b5Var.b) && this.k == b5Var.d && this.l == b5Var.f && this.m == b5Var.g && xp.a(Integer.valueOf(this.n), Integer.valueOf(b5Var.h)) && this.o == b5Var.i && xp.a(Integer.valueOf(this.p), Integer.valueOf(b5Var.j)) && this.q == b5Var.k && this.r == b5Var.l && this.s == x2Var.a && this.t == x2Var.b && this.u == i5 && this.w == x2Var.d && this.v == x2Var.e && xp.a(this.f.getTypeface(), x2Var.f) && this.x == f && this.y == f2 && this.z == f3 && this.A == i && this.B == i2 && this.C == i3 && this.D == i4) {
a(canvas, z);
return;
}
this.i = b5Var.a;
this.j = b5Var.b;
this.k = b5Var.d;
this.l = b5Var.f;
this.m = b5Var.g;
this.n = b5Var.h;
this.o = b5Var.i;
this.p = b5Var.j;
this.q = b5Var.k;
this.r = b5Var.l;
this.s = x2Var.a;
this.t = x2Var.b;
this.u = i5;
this.w = x2Var.d;
this.v = x2Var.e;
this.f.setTypeface(x2Var.f);
this.x = f;
this.y = f2;
this.z = f3;
this.A = i;
this.B = i2;
this.C = i3;
this.D = i4;
if (z) {
b1.a(this.i);
b();
} else {
b1.a(this.k);
a();
}
a(canvas, z);
}
private void b(Canvas canvas) {
StaticLayout staticLayout = this.E;
StaticLayout staticLayout2 = this.F;
if (staticLayout == null || staticLayout2 == null) {
return;
}
int save = canvas.save();
canvas.translate(this.G, this.H);
if (Color.alpha(this.u) > 0) {
this.g.setColor(this.u);
canvas.drawRect(-this.I, 0.0f, staticLayout.getWidth() + this.I, staticLayout.getHeight(), this.g);
}
int i = this.w;
if (i == 1) {
this.f.setStrokeJoin(Paint.Join.ROUND);
this.f.setStrokeWidth(this.a);
this.f.setColor(this.v);
this.f.setStyle(Paint.Style.FILL_AND_STROKE);
staticLayout2.draw(canvas);
} else if (i == 2) {
TextPaint textPaint = this.f;
float f = this.b;
float f2 = this.c;
textPaint.setShadowLayer(f, f2, f2, this.v);
} else if (i == 3 || i == 4) {
boolean z = i == 3;
int i2 = z ? -1 : this.v;
int i3 = z ? this.v : -1;
float f3 = this.b / 2.0f;
this.f.setColor(this.s);
this.f.setStyle(Paint.Style.FILL);
float f4 = -f3;
this.f.setShadowLayer(this.b, f4, f4, i2);
staticLayout2.draw(canvas);
this.f.setShadowLayer(this.b, f3, f3, i3);
}
this.f.setColor(this.s);
this.f.setStyle(Paint.Style.FILL);
staticLayout.draw(canvas);
this.f.setShadowLayer(0.0f, 0.0f, 0.0f, 0);
canvas.restoreToCount(save);
}
/* JADX WARN: Removed duplicated region for block: B:10:0x0056 */
/* JADX WARN: Removed duplicated region for block: B:15:0x0059 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void a() {
/*
r7 = this;
android.graphics.Bitmap r0 = r7.k
int r1 = r7.C
int r2 = r7.A
int r1 = r1 - r2
int r3 = r7.D
int r4 = r7.B
int r3 = r3 - r4
float r2 = (float) r2
float r1 = (float) r1
float r5 = r7.o
float r5 = r5 * r1
float r2 = r2 + r5
float r4 = (float) r4
float r3 = (float) r3
float r5 = r7.l
float r5 = r5 * r3
float r4 = r4 + r5
float r5 = r7.q
float r1 = r1 * r5
int r1 = java.lang.Math.round(r1)
float r5 = r7.r
r6 = -8388609(0xffffffffff7fffff, float:-3.4028235E38)
int r6 = (r5 > r6 ? 1 : (r5 == r6 ? 0 : -1))
if (r6 == 0) goto L2e
float r3 = r3 * r5
int r0 = java.lang.Math.round(r3)
goto L3f
L2e:
float r3 = (float) r1
int r5 = r0.getHeight()
float r5 = (float) r5
int r0 = r0.getWidth()
float r0 = (float) r0
float r5 = r5 / r0
float r3 = r3 * r5
int r0 = java.lang.Math.round(r3)
L3f:
int r3 = r7.p
r5 = 1
r6 = 2
if (r3 != r6) goto L48
float r3 = (float) r1
L46:
float r2 = r2 - r3
goto L4e
L48:
if (r3 != r5) goto L4e
int r3 = r1 / 2
float r3 = (float) r3
goto L46
L4e:
int r2 = java.lang.Math.round(r2)
int r3 = r7.n
if (r3 != r6) goto L59
float r3 = (float) r0
L57:
float r4 = r4 - r3
goto L5f
L59:
if (r3 != r5) goto L5f
int r3 = r0 / 2
float r3 = (float) r3
goto L57
L5f:
int r3 = java.lang.Math.round(r4)
android.graphics.Rect r4 = new android.graphics.Rect
int r1 = r1 + r2
int r0 = r0 + r3
r4.<init>(r2, r3, r1, r0)
r7.J = r4
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.ui.g.a():void");
}
private void a(Canvas canvas, boolean z) {
if (z) {
b(canvas);
return;
}
b1.a(this.J);
b1.a(this.k);
a(canvas);
}
private void a(Canvas canvas) {
canvas.drawBitmap(this.k, (Rect) null, this.J, this.h);
}
private static boolean a(CharSequence charSequence, CharSequence charSequence2) {
return charSequence == charSequence2 || (charSequence != null && charSequence.equals(charSequence2));
}
}

View File

@@ -0,0 +1,86 @@
package com.applovin.exoplayer2.ui;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.RelativeSizeSpan;
import com.applovin.exoplayer2.common.base.Predicate;
import com.applovin.impl.ac;
import com.applovin.impl.b1;
import com.applovin.impl.b5;
/* loaded from: classes.dex */
abstract class h {
public static float a(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;
}
public static void a(b5.b bVar) {
bVar.b();
if (bVar.e() instanceof Spanned) {
if (!(bVar.e() instanceof Spannable)) {
bVar.a(SpannableString.valueOf(bVar.e()));
}
a((Spannable) b1.a(bVar.e()), new Predicate() { // from class: com.applovin.exoplayer2.ui.h$$ExternalSyntheticLambda1
@Override // com.applovin.exoplayer2.common.base.Predicate
public final boolean apply(Object obj) {
boolean a;
a = h.a(obj);
return a;
}
});
}
b(bVar);
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ boolean a(Object obj) {
return !(obj instanceof ac);
}
private static void a(Spannable spannable, Predicate predicate) {
for (Object obj : spannable.getSpans(0, spannable.length(), Object.class)) {
if (predicate.apply(obj)) {
spannable.removeSpan(obj);
}
}
}
public static void b(b5.b bVar) {
bVar.b(-3.4028235E38f, Integer.MIN_VALUE);
if (bVar.e() instanceof Spanned) {
if (!(bVar.e() instanceof Spannable)) {
bVar.a(SpannableString.valueOf(bVar.e()));
}
a((Spannable) b1.a(bVar.e()), new Predicate() { // from class: com.applovin.exoplayer2.ui.h$$ExternalSyntheticLambda0
@Override // com.applovin.exoplayer2.common.base.Predicate
public final boolean apply(Object obj) {
boolean b;
b = h.b(obj);
return b;
}
});
}
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ boolean b(Object obj) {
return (obj instanceof AbsoluteSizeSpan) || (obj instanceof RelativeSizeSpan);
}
}

View File

@@ -0,0 +1,27 @@
package com.applovin.exoplayer2.ui;
/* loaded from: classes.dex */
public interface i {
public interface a {
void a(i iVar, long j);
void a(i iVar, long j, boolean z);
void b(i iVar, long j);
}
void a(a aVar);
void a(long[] jArr, boolean[] zArr, int i);
long getPreferredUpdateDelay();
void setBufferedPosition(long j);
void setDuration(long j);
void setEnabled(boolean z);
void setPosition(long j);
}

View File

@@ -0,0 +1,208 @@
package com.applovin.exoplayer2.ui;
import android.content.Context;
import android.text.Layout;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.webkit.WebView;
import android.widget.FrameLayout;
import com.applovin.exoplayer2.ui.SubtitleView;
import com.applovin.impl.b5;
import com.applovin.impl.x2;
import com.applovin.impl.xp;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
final class j extends FrameLayout implements SubtitleView.a {
private final com.applovin.exoplayer2.ui.a a;
private final WebView b;
private List c;
private x2 d;
private float f;
private int g;
private float h;
public class a extends WebView {
public a(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@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;
}
}
public static /* synthetic */ class b {
static final /* synthetic */ int[] a;
static {
int[] iArr = new int[Layout.Alignment.values().length];
a = iArr;
try {
iArr[Layout.Alignment.ALIGN_NORMAL.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[Layout.Alignment.ALIGN_OPPOSITE.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[Layout.Alignment.ALIGN_CENTER.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
}
}
public j(Context context) {
this(context, null);
}
private static int a(int i) {
if (i != 1) {
return i != 2 ? 0 : -100;
}
return -50;
}
private static String b(int i) {
return i != 1 ? i != 2 ? "horizontal-tb" : "vertical-lr" : "vertical-rl";
}
/* JADX WARN: Code restructure failed: missing block: B:53:0x013b, code lost:
if (r8 != false) goto L42;
*/
/* JADX WARN: Code restructure failed: missing block: B:54:0x013e, code lost:
r10 = "left";
*/
/* JADX WARN: Code restructure failed: missing block: B:55:0x013f, code lost:
r19 = r10;
r17 = "top";
*/
/* JADX WARN: Code restructure failed: missing block: B:56:0x0144, code lost:
if (r8 != false) goto L41;
*/
/* JADX WARN: Removed duplicated region for block: B:17:0x00ee */
/* JADX WARN: Removed duplicated region for block: B:21:0x0119 */
/* JADX WARN: Removed duplicated region for block: B:24:0x0130 */
/* JADX WARN: Removed duplicated region for block: B:35:0x017d */
/* JADX WARN: Removed duplicated region for block: B:47:0x01d7 */
/* JADX WARN: Removed duplicated region for block: B:50:0x01f1 */
/* JADX WARN: Removed duplicated region for block: B:56:0x0144 */
/* JADX WARN: Removed duplicated region for block: B:57:0x011c */
/* JADX WARN: Removed duplicated region for block: B:58:0x00fe */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void b() {
/*
Method dump skipped, instructions count: 613
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.ui.j.b():void");
}
@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.c.isEmpty()) {
return;
}
b();
}
public j(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.c = Collections.emptyList();
this.d = x2.g;
this.f = 0.0533f;
this.g = 0;
this.h = 0.08f;
com.applovin.exoplayer2.ui.a aVar = new com.applovin.exoplayer2.ui.a(context, attributeSet);
this.a = aVar;
a aVar2 = new a(context, attributeSet);
this.b = aVar2;
aVar2.setBackgroundColor(0);
addView(aVar);
addView(aVar2);
}
private static String a(x2 x2Var) {
int i = x2Var.d;
if (i == 1) {
return xp.a("1px 1px 0 %1$s, 1px -1px 0 %1$s, -1px 1px 0 %1$s, -1px -1px 0 %1$s", c.a(x2Var.e));
}
if (i == 2) {
return xp.a("0.1em 0.12em 0.15em %s", c.a(x2Var.e));
}
if (i != 3) {
return i != 4 ? "unset" : xp.a("-0.05em -0.05em 0.15em %s", c.a(x2Var.e));
}
return xp.a("0.06em 0.08em 0.15em %s", c.a(x2Var.e));
}
private static String a(b5 b5Var) {
float f = b5Var.r;
if (f == 0.0f) {
return "";
}
int i = b5Var.q;
return xp.a("%s(%.2fdeg)", (i == 2 || i == 1) ? "skewY" : "skewX", Float.valueOf(f));
}
@Override // com.applovin.exoplayer2.ui.SubtitleView.a
public void a(List list, x2 x2Var, float f, int i, float f2) {
this.d = x2Var;
this.f = f;
this.g = i;
this.h = f2;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (int i2 = 0; i2 < list.size(); i2++) {
b5 b5Var = (b5) list.get(i2);
if (b5Var.d != null) {
arrayList.add(b5Var);
} else {
arrayList2.add(b5Var);
}
}
if (!this.c.isEmpty() || !arrayList2.isEmpty()) {
this.c = arrayList2;
b();
}
this.a.a(arrayList, x2Var, f, i, f2);
invalidate();
}
public void a() {
this.b.destroy();
}
private String a(int i, float f) {
float a2 = h.a(i, f, getHeight(), (getHeight() - getPaddingTop()) - getPaddingBottom());
return a2 == -3.4028235E38f ? "unset" : xp.a("%.2fpx", Float.valueOf(a2 / getContext().getResources().getDisplayMetrics().density));
}
private static String a(Layout.Alignment alignment) {
if (alignment == null) {
return "center";
}
int i = b.a[alignment.ordinal()];
return i != 1 ? i != 2 ? "center" : TtmlNode.END : "start";
}
}