package androidx.media3.ui;

import B0.I;
import B0.RunnableC0014a;
import D1.C0080e;
import D1.C0093s;
import D1.E;
import D1.L;
import D1.ViewOnClickListenerC0083h;
import O3.e;
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.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewParent;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.TextView;
import java.util.Collections;
import java.util.Formatter;
import java.util.Iterator;
import java.util.Locale;
import java.util.concurrent.CopyOnWriteArraySet;
import u0.M;
import u0.S;
import x0.AbstractC1709a;
import x0.v;

/* JADX INFO: loaded from: classes.dex */
public class DefaultTimeBar extends View implements L {

    /* JADX INFO: renamed from: i0, reason: collision with root package name */
    public static final /* synthetic */ int f8886i0 = 0;

    /* JADX INFO: renamed from: A, reason: collision with root package name */
    public final Drawable f8887A;

    /* JADX INFO: renamed from: B, reason: collision with root package name */
    public final int f8888B;

    /* JADX INFO: renamed from: C, reason: collision with root package name */
    public final int f8889C;
    public final int D;

    /* JADX INFO: renamed from: E, reason: collision with root package name */
    public final int f8890E;

    /* JADX INFO: renamed from: F, reason: collision with root package name */
    public final int f8891F;

    /* JADX INFO: renamed from: G, reason: collision with root package name */
    public final int f8892G;
    public final int H;

    /* JADX INFO: renamed from: I, reason: collision with root package name */
    public final int f8893I;

    /* JADX INFO: renamed from: J, reason: collision with root package name */
    public final int f8894J;

    /* JADX INFO: renamed from: K, reason: collision with root package name */
    public final StringBuilder f8895K;

    /* JADX INFO: renamed from: L, reason: collision with root package name */
    public final Formatter f8896L;

    /* JADX INFO: renamed from: M, reason: collision with root package name */
    public final RunnableC0014a f8897M;

    /* JADX INFO: renamed from: N, reason: collision with root package name */
    public final CopyOnWriteArraySet f8898N;

    /* JADX INFO: renamed from: O, reason: collision with root package name */
    public final Point f8899O;

    /* JADX INFO: renamed from: P, reason: collision with root package name */
    public final float f8900P;

    /* JADX INFO: renamed from: Q, reason: collision with root package name */
    public int f8901Q;

    /* JADX INFO: renamed from: R, reason: collision with root package name */
    public long f8902R;

    /* JADX INFO: renamed from: S, reason: collision with root package name */
    public int f8903S;

    /* JADX INFO: renamed from: T, reason: collision with root package name */
    public Rect f8904T;

    /* JADX INFO: renamed from: U, reason: collision with root package name */
    public final ValueAnimator f8905U;

    /* JADX INFO: renamed from: V, reason: collision with root package name */
    public float f8906V;

    /* JADX INFO: renamed from: W, reason: collision with root package name */
    public boolean f8907W;

    /* JADX INFO: renamed from: a0, reason: collision with root package name */
    public boolean f8908a0;

    /* JADX INFO: renamed from: b0, reason: collision with root package name */
    public long f8909b0;

    /* JADX INFO: renamed from: c0, reason: collision with root package name */
    public long f8910c0;

    /* JADX INFO: renamed from: d0, reason: collision with root package name */
    public long f8911d0;

    /* JADX INFO: renamed from: e0, reason: collision with root package name */
    public long f8912e0;

    /* JADX INFO: renamed from: f0, reason: collision with root package name */
    public int f8913f0;

    /* JADX INFO: renamed from: g0, reason: collision with root package name */
    public long[] f8914g0;

    /* JADX INFO: renamed from: h0, reason: collision with root package name */
    public boolean[] f8915h0;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final Rect f8916q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final Rect f8917r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final Rect f8918s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final Rect f8919t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public final Paint f8920u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final Paint f8921v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final Paint f8922w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public final Paint f8923x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public final Paint f8924y;

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public final Paint f8925z;

    public DefaultTimeBar(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, attributeSet, 0);
    }

    public static int a(int i, float f3) {
        return (int) ((i * f3) + 0.5f);
    }

    private long getPositionIncrement() {
        long j8 = this.f8902R;
        if (j8 != -9223372036854775807L) {
            return j8;
        }
        long j9 = this.f8910c0;
        if (j9 == -9223372036854775807L) {
            return 0L;
        }
        return j9 / ((long) this.f8901Q);
    }

    private String getProgressText() {
        return v.A(this.f8895K, this.f8896L, this.f8911d0);
    }

    private long getScrubberPosition() {
        Rect rect = this.f8917r;
        if (rect.width() <= 0 || this.f8910c0 == -9223372036854775807L) {
            return 0L;
        }
        return (((long) this.f8919t.width()) * this.f8910c0) / ((long) rect.width());
    }

    public final boolean b(long j8) {
        long j9 = this.f8910c0;
        if (j9 <= 0) {
            return false;
        }
        long j10 = this.f8908a0 ? this.f8909b0 : this.f8911d0;
        long j11 = v.j(j10 + j8, 0L, j9);
        if (j11 == j10) {
            return false;
        }
        if (this.f8908a0) {
            f(j11);
        } else {
            c(j11);
        }
        e();
        return true;
    }

    public final void c(long j8) {
        this.f8909b0 = j8;
        this.f8908a0 = true;
        setPressed(true);
        ViewParent parent = getParent();
        if (parent != null) {
            parent.requestDisallowInterceptTouchEvent(true);
        }
        Iterator it = this.f8898N.iterator();
        while (it.hasNext()) {
            C0093s c0093s = ((ViewOnClickListenerC0083h) it.next()).f1738q;
            c0093s.f1773F0 = true;
            TextView textView = c0093s.f1794T;
            if (textView != null) {
                textView.setText(v.A(c0093s.f1796V, c0093s.f1797W, j8));
            }
            c0093s.f1814q.f();
        }
    }

    public final void d(boolean z8) {
        M m8;
        removeCallbacks(this.f8897M);
        this.f8908a0 = false;
        setPressed(false);
        ViewParent parent = getParent();
        if (parent != null) {
            parent.requestDisallowInterceptTouchEvent(false);
        }
        invalidate();
        for (ViewOnClickListenerC0083h viewOnClickListenerC0083h : this.f8898N) {
            long j8 = this.f8909b0;
            C0093s c0093s = viewOnClickListenerC0083h.f1738q;
            c0093s.f1773F0 = false;
            if (!z8 && (m8 = c0093s.f1832z0) != null) {
                if (c0093s.f1771E0) {
                    e eVar = (e) m8;
                    if (eVar.o(17) && eVar.o(10)) {
                        S sO = ((I) eVar).O();
                        int iO = sO.o();
                        int i = 0;
                        while (true) {
                            long jW = v.W(sO.m(i, c0093s.f1799b0, 0L).f17195m);
                            if (j8 < jW) {
                                break;
                            }
                            if (i == iO - 1) {
                                j8 = jW;
                                break;
                            } else {
                                j8 -= jW;
                                i++;
                            }
                        }
                        eVar.z(i, j8, false);
                    }
                } else {
                    e eVar2 = (e) m8;
                    if (eVar2.o(5)) {
                        eVar2.z(((I) eVar2).L(), j8, false);
                    }
                }
                c0093s.o();
            }
            c0093s.f1814q.g();
        }
    }

    @Override // android.view.View
    public final void drawableStateChanged() {
        super.drawableStateChanged();
        Drawable drawable = this.f8887A;
        if (drawable != null && drawable.isStateful() && drawable.setState(getDrawableState())) {
            invalidate();
        }
    }

    public final void e() {
        Rect rect = this.f8918s;
        Rect rect2 = this.f8917r;
        rect.set(rect2);
        Rect rect3 = this.f8919t;
        rect3.set(rect2);
        long j8 = this.f8908a0 ? this.f8909b0 : this.f8911d0;
        if (this.f8910c0 > 0) {
            rect.right = Math.min(rect2.left + ((int) ((((long) rect2.width()) * this.f8912e0) / this.f8910c0)), rect2.right);
            rect3.right = Math.min(rect2.left + ((int) ((((long) rect2.width()) * j8) / this.f8910c0)), rect2.right);
        } else {
            int i = rect2.left;
            rect.right = i;
            rect3.right = i;
        }
        invalidate(this.f8916q);
    }

    public final void f(long j8) {
        if (this.f8909b0 == j8) {
            return;
        }
        this.f8909b0 = j8;
        Iterator it = this.f8898N.iterator();
        while (it.hasNext()) {
            C0093s c0093s = ((ViewOnClickListenerC0083h) it.next()).f1738q;
            TextView textView = c0093s.f1794T;
            if (textView != null) {
                textView.setText(v.A(c0093s.f1796V, c0093s.f1797W, j8));
            }
        }
    }

    @Override // D1.L
    public long getPreferredUpdateDelay() {
        int iWidth = (int) (this.f8917r.width() / this.f8900P);
        if (iWidth == 0) {
            return Long.MAX_VALUE;
        }
        long j8 = this.f8910c0;
        if (j8 == 0 || j8 == -9223372036854775807L) {
            return Long.MAX_VALUE;
        }
        return j8 / ((long) iWidth);
    }

    @Override // android.view.View
    public final void jumpDrawablesToCurrentState() {
        super.jumpDrawablesToCurrentState();
        Drawable drawable = this.f8887A;
        if (drawable != null) {
            drawable.jumpToCurrentState();
        }
    }

    @Override // android.view.View
    public final void onDraw(Canvas canvas) {
        Canvas canvas2;
        canvas.save();
        Rect rect = this.f8917r;
        int iHeight = rect.height();
        int iCenterY = rect.centerY() - (iHeight / 2);
        int i = iCenterY + iHeight;
        long j8 = this.f8910c0;
        Paint paint = this.f8922w;
        Rect rect2 = this.f8919t;
        if (j8 <= 0) {
            canvas2 = canvas;
            canvas2.drawRect(rect.left, iCenterY, rect.right, i, paint);
        } else {
            Rect rect3 = this.f8918s;
            int i5 = rect3.left;
            int i8 = rect3.right;
            int iMax = Math.max(Math.max(rect.left, i8), rect2.right);
            int i9 = rect.right;
            if (iMax < i9) {
                canvas.drawRect(iMax, iCenterY, i9, i, paint);
            }
            int iMax2 = Math.max(i5, rect2.right);
            if (i8 > iMax2) {
                canvas.drawRect(iMax2, iCenterY, i8, i, this.f8921v);
            }
            if (rect2.width() > 0) {
                canvas.drawRect(rect2.left, iCenterY, rect2.right, i, this.f8920u);
            }
            if (this.f8913f0 != 0) {
                long[] jArr = this.f8914g0;
                jArr.getClass();
                boolean[] zArr = this.f8915h0;
                zArr.getClass();
                int i10 = this.f8890E;
                int i11 = i10 / 2;
                int i12 = 0;
                int i13 = 0;
                while (i13 < this.f8913f0) {
                    int i14 = i13;
                    canvas.drawRect(Math.min(rect.width() - i10, Math.max(i12, ((int) ((((long) rect.width()) * v.j(jArr[i13], 0L, this.f8910c0)) / this.f8910c0)) - i11)) + rect.left, iCenterY, r3 + i10, i, zArr[i13] ? this.f8924y : this.f8923x);
                    i13 = i14 + 1;
                    i12 = i12;
                }
            }
            canvas2 = canvas;
        }
        if (this.f8910c0 > 0) {
            int i15 = v.i(rect2.right, rect2.left, rect.right);
            int iCenterY2 = rect2.centerY();
            Drawable drawable = this.f8887A;
            if (drawable == null) {
                canvas2.drawCircle(i15, iCenterY2, (int) ((((this.f8908a0 || isFocused()) ? this.H : isEnabled() ? this.f8891F : this.f8892G) * this.f8906V) / 2.0f), this.f8925z);
            } else {
                int intrinsicWidth = ((int) (drawable.getIntrinsicWidth() * this.f8906V)) / 2;
                int intrinsicHeight = ((int) (drawable.getIntrinsicHeight() * this.f8906V)) / 2;
                drawable.setBounds(i15 - intrinsicWidth, iCenterY2 - intrinsicHeight, i15 + intrinsicWidth, iCenterY2 + intrinsicHeight);
                drawable.draw(canvas2);
            }
        }
        canvas2.restore();
    }

    @Override // android.view.View
    public final void onFocusChanged(boolean z8, int i, Rect rect) {
        super.onFocusChanged(z8, i, rect);
        if (!this.f8908a0 || z8) {
            return;
        }
        d(false);
    }

    @Override // android.view.View
    public final 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 final void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
        super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
        accessibilityNodeInfo.setClassName("android.widget.SeekBar");
        accessibilityNodeInfo.setContentDescription(getProgressText());
        if (this.f8910c0 <= 0) {
            return;
        }
        accessibilityNodeInfo.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD);
        accessibilityNodeInfo.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_BACKWARD);
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Removed duplicated region for block: B:11:0x001a  */
    /* JADX WARN: Removed duplicated region for block: B:13:0x0025  */
    @Override // android.view.View, android.view.KeyEvent.Callback
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (isEnabled()) {
            long positionIncrement = getPositionIncrement();
            if (i != 66) {
                switch (i) {
                    case 21:
                        positionIncrement = -positionIncrement;
                        if (b(positionIncrement)) {
                            RunnableC0014a runnableC0014a = this.f8897M;
                            removeCallbacks(runnableC0014a);
                            postDelayed(runnableC0014a, 1000L);
                        }
                        break;
                    case 22:
                        if (b(positionIncrement)) {
                        }
                        break;
                    case 23:
                        if (this.f8908a0) {
                            d(false);
                        }
                        break;
                }
                return true;
            }
        }
        return super.onKeyDown(i, keyEvent);
    }

    @Override // android.view.View
    public final void onLayout(boolean z8, int i, int i5, int i8, int i9) {
        int paddingBottom;
        int paddingBottom2;
        Rect rect;
        int i10 = i8 - i;
        int i11 = i9 - i5;
        int paddingLeft = getPaddingLeft();
        int paddingRight = i10 - getPaddingRight();
        int i12 = this.f8907W ? 0 : this.f8893I;
        int i13 = this.D;
        int i14 = this.f8888B;
        int i15 = this.f8889C;
        if (i13 == 1) {
            paddingBottom = (i11 - getPaddingBottom()) - i15;
            paddingBottom2 = ((i11 - getPaddingBottom()) - i14) - Math.max(i12 - (i14 / 2), 0);
        } else {
            paddingBottom = (i11 - i15) / 2;
            paddingBottom2 = (i11 - i14) / 2;
        }
        Rect rect2 = this.f8916q;
        rect2.set(paddingLeft, paddingBottom, paddingRight, i15 + paddingBottom);
        this.f8917r.set(rect2.left + i12, paddingBottom2, rect2.right - i12, i14 + paddingBottom2);
        if (v.f18553a >= 29 && ((rect = this.f8904T) == null || rect.width() != i10 || this.f8904T.height() != i11)) {
            Rect rect3 = new Rect(0, 0, i10, i11);
            this.f8904T = rect3;
            setSystemGestureExclusionRects(Collections.singletonList(rect3));
        }
        e();
    }

    @Override // android.view.View
    public final void onMeasure(int i, int i5) {
        int mode = View.MeasureSpec.getMode(i5);
        int size = View.MeasureSpec.getSize(i5);
        int i8 = this.f8889C;
        if (mode == 0) {
            size = i8;
        } else if (mode != 1073741824) {
            size = Math.min(i8, size);
        }
        setMeasuredDimension(View.MeasureSpec.getSize(i), size);
        Drawable drawable = this.f8887A;
        if (drawable != null && drawable.isStateful() && drawable.setState(getDrawableState())) {
            invalidate();
        }
    }

    @Override // android.view.View
    public final void onRtlPropertiesChanged(int i) {
        Drawable drawable = this.f8887A;
        if (drawable == null || v.f18553a < 23 || !drawable.setLayoutDirection(i)) {
            return;
        }
        invalidate();
    }

    /* JADX WARN: Removed duplicated region for block: B:23:0x006e  */
    @Override // android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean onTouchEvent(MotionEvent motionEvent) {
        if (isEnabled() && this.f8910c0 > 0) {
            Point point = this.f8899O;
            point.set((int) motionEvent.getX(), (int) motionEvent.getY());
            int i = point.x;
            int i5 = point.y;
            int action = motionEvent.getAction();
            Rect rect = this.f8919t;
            Rect rect2 = this.f8917r;
            if (action == 0) {
                int i8 = i;
                if (this.f8916q.contains(i8, i5)) {
                    rect.right = v.i(i8, rect2.left, rect2.right);
                    c(getScrubberPosition());
                    e();
                    invalidate();
                    return true;
                }
            } else if (action == 1) {
                if (this.f8908a0) {
                    d(motionEvent.getAction() == 3);
                    return true;
                }
            } else if (action != 2) {
                if (action == 3) {
                }
            } else if (this.f8908a0) {
                if (i5 < this.f8894J) {
                    int i9 = this.f8903S;
                    rect.right = v.i(((i - i9) / 3) + i9, rect2.left, rect2.right);
                } else {
                    this.f8903S = i;
                    rect.right = v.i(i, rect2.left, rect2.right);
                }
                f(getScrubberPosition());
                e();
                invalidate();
                return true;
            }
        }
        return false;
    }

    @Override // android.view.View
    public final boolean performAccessibilityAction(int i, Bundle bundle) {
        if (super.performAccessibilityAction(i, bundle)) {
            return true;
        }
        if (this.f8910c0 <= 0) {
            return false;
        }
        if (i == 8192) {
            if (b(-getPositionIncrement())) {
                d(false);
            }
        } else {
            if (i != 4096) {
                return false;
            }
            if (b(getPositionIncrement())) {
                d(false);
            }
        }
        sendAccessibilityEvent(4);
        return true;
    }

    public void setAdMarkerColor(int i) {
        this.f8923x.setColor(i);
        invalidate(this.f8916q);
    }

    public void setBufferedColor(int i) {
        this.f8921v.setColor(i);
        invalidate(this.f8916q);
    }

    @Override // D1.L
    public void setBufferedPosition(long j8) {
        if (this.f8912e0 == j8) {
            return;
        }
        this.f8912e0 = j8;
        e();
    }

    @Override // D1.L
    public void setDuration(long j8) {
        if (this.f8910c0 == j8) {
            return;
        }
        this.f8910c0 = j8;
        if (this.f8908a0 && j8 == -9223372036854775807L) {
            d(true);
        }
        e();
    }

    @Override // android.view.View, D1.L
    public void setEnabled(boolean z8) {
        super.setEnabled(z8);
        if (!this.f8908a0 || z8) {
            return;
        }
        d(true);
    }

    public void setKeyCountIncrement(int i) {
        AbstractC1709a.d(i > 0);
        this.f8901Q = i;
        this.f8902R = -9223372036854775807L;
    }

    public void setKeyTimeIncrement(long j8) {
        AbstractC1709a.d(j8 > 0);
        this.f8901Q = -1;
        this.f8902R = j8;
    }

    public void setPlayedAdMarkerColor(int i) {
        this.f8924y.setColor(i);
        invalidate(this.f8916q);
    }

    public void setPlayedColor(int i) {
        this.f8920u.setColor(i);
        invalidate(this.f8916q);
    }

    @Override // D1.L
    public void setPosition(long j8) {
        if (this.f8911d0 == j8) {
            return;
        }
        this.f8911d0 = j8;
        setContentDescription(getProgressText());
        e();
    }

    public void setScrubberColor(int i) {
        this.f8925z.setColor(i);
        invalidate(this.f8916q);
    }

    public void setUnplayedColor(int i) {
        this.f8922w.setColor(i);
        invalidate(this.f8916q);
    }

    public DefaultTimeBar(Context context, AttributeSet attributeSet, AttributeSet attributeSet2, int i) {
        super(context, attributeSet, 0);
        this.f8916q = new Rect();
        this.f8917r = new Rect();
        this.f8918s = new Rect();
        this.f8919t = new Rect();
        Paint paint = new Paint();
        this.f8920u = paint;
        Paint paint2 = new Paint();
        this.f8921v = paint2;
        Paint paint3 = new Paint();
        this.f8922w = paint3;
        Paint paint4 = new Paint();
        this.f8923x = paint4;
        Paint paint5 = new Paint();
        this.f8924y = paint5;
        Paint paint6 = new Paint();
        this.f8925z = paint6;
        paint6.setAntiAlias(true);
        this.f8898N = new CopyOnWriteArraySet();
        this.f8899O = new Point();
        float f3 = context.getResources().getDisplayMetrics().density;
        this.f8900P = f3;
        this.f8894J = a(-50, f3);
        int iA = a(4, f3);
        int iA2 = a(26, f3);
        int iA3 = a(4, f3);
        int iA4 = a(12, f3);
        int iA5 = a(0, f3);
        int iA6 = a(16, f3);
        if (attributeSet2 != null) {
            TypedArray typedArrayObtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet2, E.f1656b, 0, i);
            try {
                Drawable drawable = typedArrayObtainStyledAttributes.getDrawable(10);
                this.f8887A = drawable;
                if (drawable != null) {
                    int i5 = v.f18553a;
                    if (i5 >= 23) {
                        int layoutDirection = getLayoutDirection();
                        if (i5 < 23 || drawable.setLayoutDirection(layoutDirection)) {
                        }
                    }
                    iA2 = Math.max(drawable.getMinimumHeight(), iA2);
                }
                this.f8888B = typedArrayObtainStyledAttributes.getDimensionPixelSize(3, iA);
                this.f8889C = typedArrayObtainStyledAttributes.getDimensionPixelSize(12, iA2);
                this.D = typedArrayObtainStyledAttributes.getInt(2, 0);
                this.f8890E = typedArrayObtainStyledAttributes.getDimensionPixelSize(1, iA3);
                this.f8891F = typedArrayObtainStyledAttributes.getDimensionPixelSize(11, iA4);
                this.f8892G = typedArrayObtainStyledAttributes.getDimensionPixelSize(8, iA5);
                this.H = typedArrayObtainStyledAttributes.getDimensionPixelSize(9, iA6);
                int i8 = typedArrayObtainStyledAttributes.getInt(6, -1);
                int i9 = typedArrayObtainStyledAttributes.getInt(7, -1);
                int i10 = typedArrayObtainStyledAttributes.getInt(4, -855638017);
                int i11 = typedArrayObtainStyledAttributes.getInt(13, 872415231);
                int i12 = typedArrayObtainStyledAttributes.getInt(0, -1291845888);
                int i13 = typedArrayObtainStyledAttributes.getInt(5, 872414976);
                paint.setColor(i8);
                paint6.setColor(i9);
                paint2.setColor(i10);
                paint3.setColor(i11);
                paint4.setColor(i12);
                paint5.setColor(i13);
                typedArrayObtainStyledAttributes.recycle();
            } catch (Throwable th) {
                typedArrayObtainStyledAttributes.recycle();
                throw th;
            }
        } else {
            this.f8888B = iA;
            this.f8889C = iA2;
            this.D = 0;
            this.f8890E = iA3;
            this.f8891F = iA4;
            this.f8892G = iA5;
            this.H = iA6;
            paint.setColor(-1);
            paint6.setColor(-1);
            paint2.setColor(-855638017);
            paint3.setColor(872415231);
            paint4.setColor(-1291845888);
            paint5.setColor(872414976);
            this.f8887A = null;
        }
        StringBuilder sb = new StringBuilder();
        this.f8895K = sb;
        this.f8896L = new Formatter(sb, Locale.getDefault());
        this.f8897M = new RunnableC0014a(5, this);
        Drawable drawable2 = this.f8887A;
        if (drawable2 != null) {
            this.f8893I = (drawable2.getMinimumWidth() + 1) / 2;
        } else {
            this.f8893I = (Math.max(this.f8892G, Math.max(this.f8891F, this.H)) + 1) / 2;
        }
        this.f8906V = 1.0f;
        ValueAnimator valueAnimator = new ValueAnimator();
        this.f8905U = valueAnimator;
        valueAnimator.addUpdateListener(new C0080e(this, 0));
        this.f8910c0 = -9223372036854775807L;
        this.f8902R = -9223372036854775807L;
        this.f8901Q = 20;
        setFocusable(true);
        if (getImportantForAccessibility() == 0) {
            setImportantForAccessibility(1);
        }
    }
}
