package com.google.android.material.floatingactionbutton;

import android.R;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.content.res.ColorStateList;
import android.graphics.Matrix;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.InsetDrawable;
import android.util.Property;
import android.view.View;
import android.view.ViewTreeObserver;
import androidx.core.view.s0;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.util.ArrayList;
import java.util.Iterator;
import lj.n;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes3.dex */
public abstract class b {
    static final TimeInterpolator D = wi.a.f49479c;
    static final int[] E = {R.attr.state_pressed, R.attr.state_enabled};
    static final int[] F = {R.attr.state_hovered, R.attr.state_focused, R.attr.state_enabled};
    static final int[] G = {R.attr.state_focused, R.attr.state_enabled};
    static final int[] H = {R.attr.state_hovered, R.attr.state_enabled};
    static final int[] I = {R.attr.state_enabled};
    static final int[] J = new int[0];
    private ViewTreeObserver.OnPreDrawListener C;

    /* renamed from: a, reason: collision with root package name */
    lj.k f13234a;

    /* renamed from: b, reason: collision with root package name */
    lj.g f13235b;

    /* renamed from: c, reason: collision with root package name */
    Drawable f13236c;

    /* renamed from: d, reason: collision with root package name */
    com.google.android.material.floatingactionbutton.a f13237d;

    /* renamed from: e, reason: collision with root package name */
    Drawable f13238e;

    /* renamed from: f, reason: collision with root package name */
    boolean f13239f;

    /* renamed from: h, reason: collision with root package name */
    float f13241h;

    /* renamed from: i, reason: collision with root package name */
    float f13242i;

    /* renamed from: j, reason: collision with root package name */
    float f13243j;

    /* renamed from: k, reason: collision with root package name */
    int f13244k;

    /* renamed from: l, reason: collision with root package name */
    private final com.google.android.material.internal.j f13245l;

    /* renamed from: m, reason: collision with root package name */
    private Animator f13246m;

    /* renamed from: n, reason: collision with root package name */
    private wi.f f13247n;

    /* renamed from: o, reason: collision with root package name */
    private wi.f f13248o;

    /* renamed from: p, reason: collision with root package name */
    private float f13249p;

    /* renamed from: r, reason: collision with root package name */
    private int f13251r;

    /* renamed from: t, reason: collision with root package name */
    private ArrayList f13253t;

    /* renamed from: u, reason: collision with root package name */
    private ArrayList f13254u;

    /* renamed from: v, reason: collision with root package name */
    private ArrayList f13255v;

    /* renamed from: w, reason: collision with root package name */
    final FloatingActionButton f13256w;

    /* renamed from: x, reason: collision with root package name */
    final kj.b f13257x;

    /* renamed from: g, reason: collision with root package name */
    boolean f13240g = true;

    /* renamed from: q, reason: collision with root package name */
    private float f13250q = 1.0f;

    /* renamed from: s, reason: collision with root package name */
    private int f13252s = 0;

    /* renamed from: y, reason: collision with root package name */
    private final Rect f13258y = new Rect();

    /* renamed from: z, reason: collision with root package name */
    private final RectF f13259z = new RectF();
    private final RectF A = new RectF();
    private final Matrix B = new Matrix();

    /* loaded from: classes3.dex */
    class a extends AnimatorListenerAdapter {

        /* renamed from: a, reason: collision with root package name */
        private boolean f13260a;

        /* renamed from: b, reason: collision with root package name */
        final /* synthetic */ boolean f13261b;

        /* renamed from: c, reason: collision with root package name */
        final /* synthetic */ j f13262c;

        a(boolean z10, j jVar) {
            this.f13261b = z10;
            this.f13262c = jVar;
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationCancel(Animator animator) {
            this.f13260a = true;
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationEnd(Animator animator) {
            b.this.f13252s = 0;
            b.this.f13246m = null;
            if (this.f13260a) {
                return;
            }
            FloatingActionButton floatingActionButton = b.this.f13256w;
            boolean z10 = this.f13261b;
            floatingActionButton.b(z10 ? 8 : 4, z10);
            j jVar = this.f13262c;
            if (jVar != null) {
                jVar.b();
            }
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationStart(Animator animator) {
            b.this.f13256w.b(0, this.f13261b);
            b.this.f13252s = 1;
            b.this.f13246m = animator;
            this.f13260a = false;
        }
    }

    /* renamed from: com.google.android.material.floatingactionbutton.b$b, reason: collision with other inner class name */
    /* loaded from: classes3.dex */
    class C0308b extends AnimatorListenerAdapter {

        /* renamed from: a, reason: collision with root package name */
        final /* synthetic */ boolean f13264a;

        /* renamed from: b, reason: collision with root package name */
        final /* synthetic */ j f13265b;

        C0308b(boolean z10, j jVar) {
            this.f13264a = z10;
            this.f13265b = jVar;
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationEnd(Animator animator) {
            b.this.f13252s = 0;
            b.this.f13246m = null;
            j jVar = this.f13265b;
            if (jVar != null) {
                jVar.a();
            }
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationStart(Animator animator) {
            b.this.f13256w.b(0, this.f13264a);
            b.this.f13252s = 2;
            b.this.f13246m = animator;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes3.dex */
    public class c extends wi.e {
        c() {
        }

        @Override // android.animation.TypeEvaluator
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public Matrix evaluate(float f10, Matrix matrix, Matrix matrix2) {
            b.this.f13250q = f10;
            return super.evaluate(f10, matrix, matrix2);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes3.dex */
    public class d implements ValueAnimator.AnimatorUpdateListener {

        /* renamed from: a, reason: collision with root package name */
        final /* synthetic */ float f13268a;

        /* renamed from: b, reason: collision with root package name */
        final /* synthetic */ float f13269b;

        /* renamed from: c, reason: collision with root package name */
        final /* synthetic */ float f13270c;

        /* renamed from: d, reason: collision with root package name */
        final /* synthetic */ float f13271d;

        /* renamed from: e, reason: collision with root package name */
        final /* synthetic */ float f13272e;

        /* renamed from: f, reason: collision with root package name */
        final /* synthetic */ float f13273f;

        /* renamed from: g, reason: collision with root package name */
        final /* synthetic */ float f13274g;

        /* renamed from: h, reason: collision with root package name */
        final /* synthetic */ Matrix f13275h;

        d(float f10, float f11, float f12, float f13, float f14, float f15, float f16, Matrix matrix) {
            this.f13268a = f10;
            this.f13269b = f11;
            this.f13270c = f12;
            this.f13271d = f13;
            this.f13272e = f14;
            this.f13273f = f15;
            this.f13274g = f16;
            this.f13275h = matrix;
        }

        @Override // android.animation.ValueAnimator.AnimatorUpdateListener
        public void onAnimationUpdate(ValueAnimator valueAnimator) {
            float floatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
            b.this.f13256w.setAlpha(wi.a.b(this.f13268a, this.f13269b, BitmapDescriptorFactory.HUE_RED, 0.2f, floatValue));
            b.this.f13256w.setScaleX(wi.a.a(this.f13270c, this.f13271d, floatValue));
            b.this.f13256w.setScaleY(wi.a.a(this.f13272e, this.f13271d, floatValue));
            b.this.f13250q = wi.a.a(this.f13273f, this.f13274g, floatValue);
            b.this.e(wi.a.a(this.f13273f, this.f13274g, floatValue), this.f13275h);
            b.this.f13256w.setImageMatrix(this.f13275h);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes3.dex */
    public class e implements ViewTreeObserver.OnPreDrawListener {
        e() {
        }

        @Override // android.view.ViewTreeObserver.OnPreDrawListener
        public boolean onPreDraw() {
            b.this.D();
            return true;
        }
    }

    /* loaded from: classes3.dex */
    private class f extends l {
        f() {
            super(b.this, null);
        }

        @Override // com.google.android.material.floatingactionbutton.b.l
        protected float a() {
            return BitmapDescriptorFactory.HUE_RED;
        }
    }

    /* loaded from: classes3.dex */
    private class g extends l {
        g() {
            super(b.this, null);
        }

        @Override // com.google.android.material.floatingactionbutton.b.l
        protected float a() {
            b bVar = b.this;
            return bVar.f13241h + bVar.f13242i;
        }
    }

    /* loaded from: classes3.dex */
    private class h extends l {
        h() {
            super(b.this, null);
        }

        @Override // com.google.android.material.floatingactionbutton.b.l
        protected float a() {
            b bVar = b.this;
            return bVar.f13241h + bVar.f13243j;
        }
    }

    /* loaded from: classes3.dex */
    interface i {
        void a();

        void b();
    }

    /* loaded from: classes3.dex */
    interface j {
        void a();

        void b();
    }

    /* loaded from: classes3.dex */
    private class k extends l {
        k() {
            super(b.this, null);
        }

        @Override // com.google.android.material.floatingactionbutton.b.l
        protected float a() {
            return b.this.f13241h;
        }
    }

    /* loaded from: classes3.dex */
    private abstract class l extends AnimatorListenerAdapter implements ValueAnimator.AnimatorUpdateListener {

        /* renamed from: a, reason: collision with root package name */
        private boolean f13282a;

        /* renamed from: b, reason: collision with root package name */
        private float f13283b;

        /* renamed from: c, reason: collision with root package name */
        private float f13284c;

        private l() {
        }

        protected abstract float a();

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationEnd(Animator animator) {
            b.this.c0((int) this.f13284c);
            this.f13282a = false;
        }

        @Override // android.animation.ValueAnimator.AnimatorUpdateListener
        public void onAnimationUpdate(ValueAnimator valueAnimator) {
            if (!this.f13282a) {
                lj.g gVar = b.this.f13235b;
                this.f13283b = gVar == null ? BitmapDescriptorFactory.HUE_RED : gVar.w();
                this.f13284c = a();
                this.f13282a = true;
            }
            b bVar = b.this;
            float f10 = this.f13283b;
            bVar.c0((int) (f10 + ((this.f13284c - f10) * valueAnimator.getAnimatedFraction())));
        }

        /* synthetic */ l(b bVar, a aVar) {
            this();
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public b(FloatingActionButton floatingActionButton, kj.b bVar) {
        this.f13256w = floatingActionButton;
        this.f13257x = bVar;
        com.google.android.material.internal.j jVar = new com.google.android.material.internal.j();
        this.f13245l = jVar;
        jVar.a(E, h(new h()));
        jVar.a(F, h(new g()));
        jVar.a(G, h(new g()));
        jVar.a(H, h(new g()));
        jVar.a(I, h(new k()));
        jVar.a(J, h(new f()));
        this.f13249p = floatingActionButton.getRotation();
    }

    private boolean W() {
        return s0.Q(this.f13256w) && !this.f13256w.isInEditMode();
    }

    private void d0(ObjectAnimator objectAnimator) {
    }

    /* JADX INFO: Access modifiers changed from: private */
    public void e(float f10, Matrix matrix) {
        matrix.reset();
        if (this.f13256w.getDrawable() == null || this.f13251r == 0) {
            return;
        }
        RectF rectF = this.f13259z;
        RectF rectF2 = this.A;
        rectF.set(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, r0.getIntrinsicWidth(), r0.getIntrinsicHeight());
        int i10 = this.f13251r;
        rectF2.set(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, i10, i10);
        matrix.setRectToRect(rectF, rectF2, Matrix.ScaleToFit.CENTER);
        int i11 = this.f13251r;
        matrix.postScale(f10, f10, i11 / 2.0f, i11 / 2.0f);
    }

    private AnimatorSet f(wi.f fVar, float f10, float f11, float f12) {
        ArrayList arrayList = new ArrayList();
        ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f13256w, (Property<FloatingActionButton, Float>) View.ALPHA, f10);
        fVar.e("opacity").a(ofFloat);
        arrayList.add(ofFloat);
        ObjectAnimator ofFloat2 = ObjectAnimator.ofFloat(this.f13256w, (Property<FloatingActionButton, Float>) View.SCALE_X, f11);
        fVar.e("scale").a(ofFloat2);
        d0(ofFloat2);
        arrayList.add(ofFloat2);
        ObjectAnimator ofFloat3 = ObjectAnimator.ofFloat(this.f13256w, (Property<FloatingActionButton, Float>) View.SCALE_Y, f11);
        fVar.e("scale").a(ofFloat3);
        d0(ofFloat3);
        arrayList.add(ofFloat3);
        e(f12, this.B);
        ObjectAnimator ofObject = ObjectAnimator.ofObject(this.f13256w, new wi.d(), new c(), new Matrix(this.B));
        fVar.e("iconScale").a(ofObject);
        arrayList.add(ofObject);
        AnimatorSet animatorSet = new AnimatorSet();
        wi.b.a(animatorSet, arrayList);
        return animatorSet;
    }

    private AnimatorSet g(float f10, float f11, float f12) {
        AnimatorSet animatorSet = new AnimatorSet();
        ArrayList arrayList = new ArrayList();
        ValueAnimator ofFloat = ValueAnimator.ofFloat(BitmapDescriptorFactory.HUE_RED, 1.0f);
        ofFloat.addUpdateListener(new d(this.f13256w.getAlpha(), f10, this.f13256w.getScaleX(), f11, this.f13256w.getScaleY(), this.f13250q, f12, new Matrix(this.B)));
        arrayList.add(ofFloat);
        wi.b.a(animatorSet, arrayList);
        animatorSet.setDuration(gj.a.d(this.f13256w.getContext(), vi.b.G, this.f13256w.getContext().getResources().getInteger(vi.g.f39831b)));
        animatorSet.setInterpolator(gj.a.e(this.f13256w.getContext(), vi.b.H, wi.a.f49478b));
        return animatorSet;
    }

    private ValueAnimator h(l lVar) {
        ValueAnimator valueAnimator = new ValueAnimator();
        valueAnimator.setInterpolator(D);
        valueAnimator.setDuration(100L);
        valueAnimator.addListener(lVar);
        valueAnimator.addUpdateListener(lVar);
        valueAnimator.setFloatValues(BitmapDescriptorFactory.HUE_RED, 1.0f);
        return valueAnimator;
    }

    private ViewTreeObserver.OnPreDrawListener n() {
        if (this.C == null) {
            this.C = new e();
        }
        return this.C;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public abstract void A(int[] iArr);

    abstract void B(float f10, float f11, float f12);

    void C(Rect rect) {
        s3.i.h(this.f13238e, "Didn't initialize content background");
        if (!V()) {
            this.f13257x.b(this.f13238e);
        } else {
            this.f13257x.b(new InsetDrawable(this.f13238e, rect.left, rect.top, rect.right, rect.bottom));
        }
    }

    void D() {
        float rotation = this.f13256w.getRotation();
        if (this.f13249p != rotation) {
            this.f13249p = rotation;
            Z();
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void E() {
        ArrayList arrayList = this.f13255v;
        if (arrayList != null) {
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                ((i) it.next()).b();
            }
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void F() {
        ArrayList arrayList = this.f13255v;
        if (arrayList != null) {
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                ((i) it.next()).a();
            }
        }
    }

    abstract boolean G();

    /* JADX INFO: Access modifiers changed from: package-private */
    public void H(ColorStateList colorStateList) {
        lj.g gVar = this.f13235b;
        if (gVar != null) {
            gVar.setTintList(colorStateList);
        }
        com.google.android.material.floatingactionbutton.a aVar = this.f13237d;
        if (aVar != null) {
            aVar.c(colorStateList);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void I(PorterDuff.Mode mode) {
        lj.g gVar = this.f13235b;
        if (gVar != null) {
            gVar.setTintMode(mode);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void J(float f10) {
        if (this.f13241h != f10) {
            this.f13241h = f10;
            B(f10, this.f13242i, this.f13243j);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void K(boolean z10) {
        this.f13239f = z10;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void L(wi.f fVar) {
        this.f13248o = fVar;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void M(float f10) {
        if (this.f13242i != f10) {
            this.f13242i = f10;
            B(this.f13241h, f10, this.f13243j);
        }
    }

    final void N(float f10) {
        this.f13250q = f10;
        Matrix matrix = this.B;
        e(f10, matrix);
        this.f13256w.setImageMatrix(matrix);
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void O(int i10) {
        if (this.f13251r != i10) {
            this.f13251r = i10;
            a0();
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void P(int i10) {
        this.f13244k = i10;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void Q(float f10) {
        if (this.f13243j != f10) {
            this.f13243j = f10;
            B(this.f13241h, this.f13242i, f10);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void R(ColorStateList colorStateList) {
        Drawable drawable = this.f13236c;
        if (drawable != null) {
            androidx.core.graphics.drawable.a.i(drawable, jj.b.d(colorStateList));
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void S(boolean z10) {
        this.f13240g = z10;
        b0();
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void T(lj.k kVar) {
        this.f13234a = kVar;
        lj.g gVar = this.f13235b;
        if (gVar != null) {
            gVar.setShapeAppearanceModel(kVar);
        }
        Object obj = this.f13236c;
        if (obj instanceof n) {
            ((n) obj).setShapeAppearanceModel(kVar);
        }
        com.google.android.material.floatingactionbutton.a aVar = this.f13237d;
        if (aVar != null) {
            aVar.f(kVar);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void U(wi.f fVar) {
        this.f13247n = fVar;
    }

    abstract boolean V();

    /* JADX INFO: Access modifiers changed from: package-private */
    public final boolean X() {
        return !this.f13239f || this.f13256w.getSizeDimension() >= this.f13244k;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void Y(j jVar, boolean z10) {
        if (v()) {
            return;
        }
        Animator animator = this.f13246m;
        if (animator != null) {
            animator.cancel();
        }
        boolean z11 = this.f13247n == null;
        if (!W()) {
            this.f13256w.b(0, z10);
            this.f13256w.setAlpha(1.0f);
            this.f13256w.setScaleY(1.0f);
            this.f13256w.setScaleX(1.0f);
            N(1.0f);
            if (jVar != null) {
                jVar.a();
                return;
            }
            return;
        }
        if (this.f13256w.getVisibility() != 0) {
            FloatingActionButton floatingActionButton = this.f13256w;
            float f10 = BitmapDescriptorFactory.HUE_RED;
            floatingActionButton.setAlpha(BitmapDescriptorFactory.HUE_RED);
            this.f13256w.setScaleY(z11 ? 0.4f : 0.0f);
            this.f13256w.setScaleX(z11 ? 0.4f : 0.0f);
            if (z11) {
                f10 = 0.4f;
            }
            N(f10);
        }
        wi.f fVar = this.f13247n;
        AnimatorSet f11 = fVar != null ? f(fVar, 1.0f, 1.0f, 1.0f) : g(1.0f, 1.0f, 1.0f);
        f11.addListener(new C0308b(z10, jVar));
        ArrayList arrayList = this.f13253t;
        if (arrayList != null) {
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                f11.addListener((Animator.AnimatorListener) it.next());
            }
        }
        f11.start();
    }

    abstract void Z();

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void a0() {
        N(this.f13250q);
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void b0() {
        Rect rect = this.f13258y;
        o(rect);
        C(rect);
        this.f13257x.a(rect.left, rect.top, rect.right, rect.bottom);
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void c0(float f10) {
        lj.g gVar = this.f13235b;
        if (gVar != null) {
            gVar.V(f10);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final Drawable i() {
        return this.f13238e;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public abstract float j();

    /* JADX INFO: Access modifiers changed from: package-private */
    public boolean k() {
        return this.f13239f;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final wi.f l() {
        return this.f13248o;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public float m() {
        return this.f13242i;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void o(Rect rect) {
        int sizeDimension = this.f13239f ? (this.f13244k - this.f13256w.getSizeDimension()) / 2 : 0;
        int max = Math.max(sizeDimension, (int) Math.ceil(this.f13240g ? j() + this.f13243j : BitmapDescriptorFactory.HUE_RED));
        int max2 = Math.max(sizeDimension, (int) Math.ceil(r1 * 1.5f));
        rect.set(max, max2, max, max2);
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public float p() {
        return this.f13243j;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final lj.k q() {
        return this.f13234a;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final wi.f r() {
        return this.f13247n;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void s(j jVar, boolean z10) {
        if (u()) {
            return;
        }
        Animator animator = this.f13246m;
        if (animator != null) {
            animator.cancel();
        }
        if (!W()) {
            this.f13256w.b(z10 ? 8 : 4, z10);
            if (jVar != null) {
                jVar.b();
                return;
            }
            return;
        }
        wi.f fVar = this.f13248o;
        AnimatorSet f10 = fVar != null ? f(fVar, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) : g(BitmapDescriptorFactory.HUE_RED, 0.4f, 0.4f);
        f10.addListener(new a(z10, jVar));
        ArrayList arrayList = this.f13254u;
        if (arrayList != null) {
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                f10.addListener((Animator.AnimatorListener) it.next());
            }
        }
        f10.start();
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public abstract void t(ColorStateList colorStateList, PorterDuff.Mode mode, ColorStateList colorStateList2, int i10);

    boolean u() {
        return this.f13256w.getVisibility() == 0 ? this.f13252s == 1 : this.f13252s != 2;
    }

    boolean v() {
        return this.f13256w.getVisibility() != 0 ? this.f13252s == 2 : this.f13252s != 1;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public abstract void w();

    /* JADX INFO: Access modifiers changed from: package-private */
    public void x() {
        lj.g gVar = this.f13235b;
        if (gVar != null) {
            lj.h.f(this.f13256w, gVar);
        }
        if (G()) {
            this.f13256w.getViewTreeObserver().addOnPreDrawListener(n());
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public abstract void y();

    /* JADX INFO: Access modifiers changed from: package-private */
    public void z() {
        ViewTreeObserver viewTreeObserver = this.f13256w.getViewTreeObserver();
        ViewTreeObserver.OnPreDrawListener onPreDrawListener = this.C;
        if (onPreDrawListener != null) {
            viewTreeObserver.removeOnPreDrawListener(onPreDrawListener);
            this.C = null;
        }
    }
}
