导航菜单

页面标题

页面副标题

Dostt v1.0.89 - L.java 源代码

正在查看: Dostt v1.0.89 应用的 L.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package T1;

import android.animation.Animator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import c2.C0838c;
import g2.AbstractC1195f;
import h2.C1213c;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.Semaphore;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class L extends Drawable implements Drawable.Callback, Animatable {

    private static final boolean f4896b0;

    private static final List f4897c0;

    private static final Executor f4898d0;

    private int f4899A;

    private boolean f4900B;

    private boolean f4901C;

    private boolean f4902D;

    private boolean f4903E;

    private a0 f4904F;

    private boolean f4905G;

    private final Matrix f4906H;

    private Bitmap f4907I;

    private Canvas f4908J;

    private Rect f4909K;

    private RectF f4910L;

    private Paint f4911M;

    private Rect f4912N;

    private Rect f4913O;

    private RectF f4914P;

    private RectF f4915Q;

    private Matrix f4916R;

    private Matrix f4917S;

    private boolean f4918T;

    private EnumC0554a f4919U;

    private final ValueAnimator.AnimatorUpdateListener f4920V;

    private final Semaphore f4921W;

    private Handler f4922X;

    private Runnable f4923Y;

    private final Runnable f4924Z;

    private C0564k f4925a;

    private float f4926a0;

    private final g2.i f4927b;

    private boolean f4928c;

    private boolean f4929d;

    private boolean f4930e;

    private b f4931f;

    private final ArrayList f4932o;

    private Y1.b f4933p;

    private String f4934q;

    private Y1.a f4935r;

    private Map f4936s;

    String f4937t;

    AbstractC0555b f4938u;

    c0 f4939v;

    private final N f4940w;

    private boolean f4941x;

    private boolean f4942y;

    private C0838c f4943z;

    interface a {
        void a(C0564k c0564k);
    }

    private enum b {
        NONE,
        PLAY,
        RESUME
    }

    static {
        f4896b0 = Build.VERSION.SDK_INT <= 25;
        f4897c0 = Arrays.asList("reduced motion", "reduced_motion", "reduced-motion", "reducedmotion");
        f4898d0 = new ThreadPoolExecutor(0, 2, 35L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new g2.g());
    }

    public L() {
        g2.i iVar = new g2.i();
        this.f4927b = iVar;
        this.f4928c = true;
        this.f4929d = false;
        this.f4930e = false;
        this.f4931f = b.NONE;
        this.f4932o = new ArrayList();
        this.f4940w = new N();
        this.f4941x = false;
        this.f4942y = true;
        this.f4899A = 255;
        this.f4903E = false;
        this.f4904F = a0.AUTOMATIC;
        this.f4905G = false;
        this.f4906H = new Matrix();
        this.f4918T = false;
        ValueAnimator.AnimatorUpdateListener animatorUpdateListener = new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                L.this.i0(valueAnimator);
            }
        };
        this.f4920V = animatorUpdateListener;
        this.f4921W = new Semaphore(1);
        this.f4924Z = new Runnable() {
            @Override
            public final void run() {
                L.this.k0();
            }
        };
        this.f4926a0 = -3.4028235E38f;
        iVar.addUpdateListener(animatorUpdateListener);
    }

    private void C(int i7, int i8) {
        Bitmap bitmap = this.f4907I;
        if (bitmap == null || bitmap.getWidth() < i7 || this.f4907I.getHeight() < i8) {
            Bitmap createBitmap = Bitmap.createBitmap(i7, i8, Bitmap.Config.ARGB_8888);
            this.f4907I = createBitmap;
            this.f4908J.setBitmap(createBitmap);
            this.f4918T = true;
            return;
        }
        if (this.f4907I.getWidth() > i7 || this.f4907I.getHeight() > i8) {
            Bitmap createBitmap2 = Bitmap.createBitmap(this.f4907I, 0, 0, i7, i8);
            this.f4907I = createBitmap2;
            this.f4908J.setBitmap(createBitmap2);
            this.f4918T = true;
        }
    }

    private void D() {
        if (this.f4908J != null) {
            return;
        }
        this.f4908J = new Canvas();
        this.f4915Q = new RectF();
        this.f4916R = new Matrix();
        this.f4917S = new Matrix();
        this.f4909K = new Rect();
        this.f4910L = new RectF();
        this.f4911M = new U1.a();
        this.f4912N = new Rect();
        this.f4913O = new Rect();
        this.f4914P = new RectF();
    }

    private void D0(RectF rectF, float f7, float f8) {
        rectF.set(rectF.left * f7, rectF.top * f8, rectF.right * f7, rectF.bottom * f8);
    }

    private Context K() {
        Drawable.Callback callback = getCallback();
        if (callback != null && (callback instanceof View)) {
            return ((View) callback).getContext();
        }
        return null;
    }

    private Y1.a L() {
        if (getCallback() == null) {
            return null;
        }
        if (this.f4935r == null) {
            Y1.a aVar = new Y1.a(getCallback(), this.f4938u);
            this.f4935r = aVar;
            String str = this.f4937t;
            if (str != null) {
                aVar.c(str);
            }
        }
        return this.f4935r;
    }

    private Y1.b N() {
        Y1.b bVar = this.f4933p;
        if (bVar != null && !bVar.b(K())) {
            this.f4933p = null;
        }
        if (this.f4933p == null) {
            this.f4933p = new Y1.b(getCallback(), this.f4934q, null, this.f4925a.j());
        }
        return this.f4933p;
    }

    private boolean c0() {
        Drawable.Callback callback = getCallback();
        if (!(callback instanceof View)) {
            return false;
        }
        if (((View) callback).getParent() instanceof ViewGroup) {
            return !((ViewGroup) r0).getClipChildren();
        }
        return false;
    }

    public void h0(Z1.e eVar, Object obj, C1213c c1213c, C0564k c0564k) {
        r(eVar, obj, c1213c);
    }

    public void i0(ValueAnimator valueAnimator) {
        if (F()) {
            invalidateSelf();
            return;
        }
        C0838c c0838c = this.f4943z;
        if (c0838c != null) {
            c0838c.N(this.f4927b.n());
        }
    }

    public void j0() {
        Drawable.Callback callback = getCallback();
        if (callback != null) {
            callback.invalidateDrawable(this);
        }
    }

    private boolean j1() {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            return false;
        }
        float f7 = this.f4926a0;
        float n7 = this.f4927b.n();
        this.f4926a0 = n7;
        return Math.abs(n7 - f7) * c0564k.d() >= 50.0f;
    }

    public void k0() {
        C0838c c0838c = this.f4943z;
        if (c0838c == null) {
            return;
        }
        try {
            this.f4921W.acquire();
            c0838c.N(this.f4927b.n());
            if (f4896b0 && this.f4918T) {
                if (this.f4922X == null) {
                    this.f4922X = new Handler(Looper.getMainLooper());
                    this.f4923Y = new Runnable() {
                        @Override
                        public final void run() {
                            L.this.j0();
                        }
                    };
                }
                this.f4922X.post(this.f4923Y);
            }
        } catch (InterruptedException unused) {
        } catch (Throwable th) {
            this.f4921W.release();
            throw th;
        }
        this.f4921W.release();
    }

    public void l0(C0564k c0564k) {
        y0();
    }

    public void m0(C0564k c0564k) {
        B0();
    }

    public void n0(int i7, C0564k c0564k) {
        M0(i7);
    }

    public void o0(String str, C0564k c0564k) {
        S0(str);
    }

    public void p0(int i7, C0564k c0564k) {
        R0(i7);
    }

    public void q0(float f7, C0564k c0564k) {
        T0(f7);
    }

    public void r0(String str, C0564k c0564k) {
        V0(str);
    }

    public void s0(int i7, int i8, C0564k c0564k) {
        U0(i7, i8);
    }

    private void t() {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            return;
        }
        C0838c c0838c = new C0838c(this, e2.v.a(c0564k), c0564k.k(), c0564k);
        this.f4943z = c0838c;
        if (this.f4901C) {
            c0838c.L(true);
        }
        this.f4943z.R(this.f4942y);
    }

    public void t0(int i7, C0564k c0564k) {
        W0(i7);
    }

    public void u0(String str, C0564k c0564k) {
        X0(str);
    }

    public void v0(float f7, C0564k c0564k) {
        Y0(f7);
    }

    private void w() {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            return;
        }
        this.f4905G = this.f4904F.e(Build.VERSION.SDK_INT, c0564k.q(), c0564k.m());
    }

    public void w0(float f7, C0564k c0564k) {
        b1(f7);
    }

    private void x(Rect rect, RectF rectF) {
        rectF.set(rect.left, rect.top, rect.right, rect.bottom);
    }

    private void y(RectF rectF, Rect rect) {
        rect.set((int) Math.floor(rectF.left), (int) Math.floor(rectF.top), (int) Math.ceil(rectF.right), (int) Math.ceil(rectF.bottom));
    }

    private void z(Canvas canvas) {
        C0838c c0838c = this.f4943z;
        C0564k c0564k = this.f4925a;
        if (c0838c == null || c0564k == null) {
            return;
        }
        this.f4906H.reset();
        if (!getBounds().isEmpty()) {
            this.f4906H.preScale(r2.width() / c0564k.b().width(), r2.height() / c0564k.b().height());
            this.f4906H.preTranslate(r2.left, r2.top);
        }
        c0838c.g(canvas, this.f4906H, this.f4899A);
    }

    private void z0(Canvas canvas, C0838c c0838c) {
        if (this.f4925a == null || c0838c == null) {
            return;
        }
        D();
        canvas.getMatrix(this.f4916R);
        canvas.getClipBounds(this.f4909K);
        x(this.f4909K, this.f4910L);
        this.f4916R.mapRect(this.f4910L);
        y(this.f4910L, this.f4909K);
        if (this.f4942y) {
            this.f4915Q.set(0.0f, 0.0f, getIntrinsicWidth(), getIntrinsicHeight());
        } else {
            c0838c.e(this.f4915Q, null, false);
        }
        this.f4916R.mapRect(this.f4915Q);
        Rect bounds = getBounds();
        float width = bounds.width() / getIntrinsicWidth();
        float height = bounds.height() / getIntrinsicHeight();
        D0(this.f4915Q, width, height);
        if (!c0()) {
            RectF rectF = this.f4915Q;
            Rect rect = this.f4909K;
            rectF.intersect(rect.left, rect.top, rect.right, rect.bottom);
        }
        int ceil = (int) Math.ceil(this.f4915Q.width());
        int ceil2 = (int) Math.ceil(this.f4915Q.height());
        if (ceil <= 0 || ceil2 <= 0) {
            return;
        }
        C(ceil, ceil2);
        if (this.f4918T) {
            this.f4906H.set(this.f4916R);
            this.f4906H.preScale(width, height);
            Matrix matrix = this.f4906H;
            RectF rectF2 = this.f4915Q;
            matrix.postTranslate(-rectF2.left, -rectF2.top);
            this.f4907I.eraseColor(0);
            c0838c.g(this.f4908J, this.f4906H, this.f4899A);
            this.f4916R.invert(this.f4917S);
            this.f4917S.mapRect(this.f4914P, this.f4915Q);
            y(this.f4914P, this.f4913O);
        }
        this.f4912N.set(0, 0, ceil, ceil2);
        canvas.drawBitmap(this.f4907I, this.f4912N, this.f4913O, this.f4911M);
    }

    public void A(M m7, boolean z6) {
        boolean a7 = this.f4940w.a(m7, z6);
        if (this.f4925a == null || !a7) {
            return;
        }
        t();
    }

    public List A0(Z1.e eVar) {
        if (this.f4943z == null) {
            AbstractC1195f.c("Cannot resolve KeyPath. Composition is not set yet.");
            return Collections.emptyList();
        }
        ArrayList arrayList = new ArrayList();
        this.f4943z.c(eVar, 0, arrayList, new Z1.e(new String[0]));
        return arrayList;
    }

    public void B() {
        this.f4932o.clear();
        this.f4927b.l();
        if (isVisible()) {
            return;
        }
        this.f4931f = b.NONE;
    }

    public void B0() {
        if (this.f4943z == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k) {
                    L.this.m0(c0564k);
                }
            });
            return;
        }
        w();
        if (s(K()) || X() == 0) {
            if (isVisible()) {
                this.f4927b.A();
                this.f4931f = b.NONE;
            } else {
                this.f4931f = b.RESUME;
            }
        }
        if (s(K())) {
            return;
        }
        M0((int) (Z() < 0.0f ? T() : S()));
        this.f4927b.l();
        if (isVisible()) {
            return;
        }
        this.f4931f = b.NONE;
    }

    public void C0() {
        this.f4927b.B();
    }

    public EnumC0554a E() {
        EnumC0554a enumC0554a = this.f4919U;
        return enumC0554a != null ? enumC0554a : AbstractC0558e.d();
    }

    public void E0(boolean z6) {
        this.f4902D = z6;
    }

    public boolean F() {
        return E() == EnumC0554a.ENABLED;
    }

    public void F0(EnumC0554a enumC0554a) {
        this.f4919U = enumC0554a;
    }

    public Bitmap G(String str) {
        Y1.b N6 = N();
        if (N6 != null) {
            return N6.a(str);
        }
        return null;
    }

    public void G0(boolean z6) {
        if (z6 != this.f4903E) {
            this.f4903E = z6;
            invalidateSelf();
        }
    }

    public boolean H() {
        return this.f4903E;
    }

    public void H0(boolean z6) {
        if (z6 != this.f4942y) {
            this.f4942y = z6;
            C0838c c0838c = this.f4943z;
            if (c0838c != null) {
                c0838c.R(z6);
            }
            invalidateSelf();
        }
    }

    public boolean I() {
        return this.f4942y;
    }

    public boolean I0(C0564k c0564k) {
        if (this.f4925a == c0564k) {
            return false;
        }
        this.f4918T = true;
        v();
        this.f4925a = c0564k;
        t();
        this.f4927b.C(c0564k);
        b1(this.f4927b.getAnimatedFraction());
        Iterator it = new ArrayList(this.f4932o).iterator();
        while (it.hasNext()) {
            a aVar = (a) it.next();
            if (aVar != null) {
                aVar.a(c0564k);
            }
            it.remove();
        }
        this.f4932o.clear();
        c0564k.v(this.f4900B);
        w();
        Drawable.Callback callback = getCallback();
        if (callback instanceof ImageView) {
            ImageView imageView = (ImageView) callback;
            imageView.setImageDrawable(null);
            imageView.setImageDrawable(this);
        }
        return true;
    }

    public C0564k J() {
        return this.f4925a;
    }

    public void J0(String str) {
        this.f4937t = str;
        Y1.a L6 = L();
        if (L6 != null) {
            L6.c(str);
        }
    }

    public void K0(AbstractC0555b abstractC0555b) {
        this.f4938u = abstractC0555b;
        Y1.a aVar = this.f4935r;
        if (aVar != null) {
            aVar.d(abstractC0555b);
        }
    }

    public void L0(Map map) {
        if (map == this.f4936s) {
            return;
        }
        this.f4936s = map;
        invalidateSelf();
    }

    public int M() {
        return (int) this.f4927b.o();
    }

    public void M0(final int i7) {
        if (this.f4925a == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k) {
                    L.this.n0(i7, c0564k);
                }
            });
        } else {
            this.f4927b.D(i7);
        }
    }

    public void N0(boolean z6) {
        this.f4929d = z6;
    }

    public String O() {
        return this.f4934q;
    }

    public void O0(InterfaceC0556c interfaceC0556c) {
        Y1.b bVar = this.f4933p;
        if (bVar != null) {
            bVar.d(interfaceC0556c);
        }
    }

    public O P(String str) {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            return null;
        }
        return (O) c0564k.j().get(str);
    }

    public void P0(String str) {
        this.f4934q = str;
    }

    public boolean Q() {
        return this.f4941x;
    }

    public void Q0(boolean z6) {
        this.f4941x = z6;
    }

    public Z1.h R() {
        Iterator it = f4897c0.iterator();
        Z1.h hVar = null;
        while (it.hasNext()) {
            hVar = this.f4925a.l((String) it.next());
            if (hVar != null) {
                break;
            }
        }
        return hVar;
    }

    public void R0(final int i7) {
        if (this.f4925a == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k) {
                    L.this.p0(i7, c0564k);
                }
            });
        } else {
            this.f4927b.E(i7 + 0.99f);
        }
    }

    public float S() {
        return this.f4927b.q();
    }

    public void S0(final String str) {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k2) {
                    L.this.o0(str, c0564k2);
                }
            });
            return;
        }
        Z1.h l7 = c0564k.l(str);
        if (l7 != null) {
            R0((int) (l7.f6734b + l7.f6735c));
            return;
        }
        throw new IllegalArgumentException("Cannot find marker with name " + str + ".");
    }

    public float T() {
        return this.f4927b.r();
    }

    public void T0(final float f7) {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k2) {
                    L.this.q0(f7, c0564k2);
                }
            });
        } else {
            this.f4927b.E(g2.k.i(c0564k.p(), this.f4925a.f(), f7));
        }
    }

    public X U() {
        C0564k c0564k = this.f4925a;
        if (c0564k != null) {
            return c0564k.n();
        }
        return null;
    }

    public void U0(final int i7, final int i8) {
        if (this.f4925a == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k) {
                    L.this.s0(i7, i8, c0564k);
                }
            });
        } else {
            this.f4927b.F(i7, i8 + 0.99f);
        }
    }

    public float V() {
        return this.f4927b.n();
    }

    public void V0(final String str) {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k2) {
                    L.this.r0(str, c0564k2);
                }
            });
            return;
        }
        Z1.h l7 = c0564k.l(str);
        if (l7 != null) {
            int i7 = (int) l7.f6734b;
            U0(i7, ((int) l7.f6735c) + i7);
        } else {
            throw new IllegalArgumentException("Cannot find marker with name " + str + ".");
        }
    }

    public a0 W() {
        return this.f4905G ? a0.SOFTWARE : a0.HARDWARE;
    }

    public void W0(final int i7) {
        if (this.f4925a == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k) {
                    L.this.t0(i7, c0564k);
                }
            });
        } else {
            this.f4927b.G(i7);
        }
    }

    public int X() {
        return this.f4927b.getRepeatCount();
    }

    public void X0(final String str) {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k2) {
                    L.this.u0(str, c0564k2);
                }
            });
            return;
        }
        Z1.h l7 = c0564k.l(str);
        if (l7 != null) {
            W0((int) l7.f6734b);
            return;
        }
        throw new IllegalArgumentException("Cannot find marker with name " + str + ".");
    }

    public int Y() {
        return this.f4927b.getRepeatMode();
    }

    public void Y0(final float f7) {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k2) {
                    L.this.v0(f7, c0564k2);
                }
            });
        } else {
            W0((int) g2.k.i(c0564k.p(), this.f4925a.f(), f7));
        }
    }

    public float Z() {
        return this.f4927b.t();
    }

    public void Z0(boolean z6) {
        if (this.f4901C == z6) {
            return;
        }
        this.f4901C = z6;
        C0838c c0838c = this.f4943z;
        if (c0838c != null) {
            c0838c.L(z6);
        }
    }

    public c0 a0() {
        return this.f4939v;
    }

    public void a1(boolean z6) {
        this.f4900B = z6;
        C0564k c0564k = this.f4925a;
        if (c0564k != null) {
            c0564k.v(z6);
        }
    }

    public Typeface b0(Z1.c cVar) {
        Map map = this.f4936s;
        if (map != null) {
            String a7 = cVar.a();
            if (map.containsKey(a7)) {
                return (Typeface) map.get(a7);
            }
            String b7 = cVar.b();
            if (map.containsKey(b7)) {
                return (Typeface) map.get(b7);
            }
            String str = cVar.a() + "-" + cVar.c();
            if (map.containsKey(str)) {
                return (Typeface) map.get(str);
            }
        }
        Y1.a L6 = L();
        if (L6 != null) {
            return L6.b(cVar);
        }
        return null;
    }

    public void b1(final float f7) {
        if (this.f4925a == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k) {
                    L.this.w0(f7, c0564k);
                }
            });
            return;
        }
        if (AbstractC0558e.h()) {
            AbstractC0558e.b("Drawable#setProgress");
        }
        this.f4927b.D(this.f4925a.h(f7));
        if (AbstractC0558e.h()) {
            AbstractC0558e.c("Drawable#setProgress");
        }
    }

    public void c1(a0 a0Var) {
        this.f4904F = a0Var;
        w();
    }

    public boolean d0() {
        g2.i iVar = this.f4927b;
        if (iVar == null) {
            return false;
        }
        return iVar.isRunning();
    }

    public void d1(int i7) {
        this.f4927b.setRepeatCount(i7);
    }

    @Override
    public void draw(Canvas canvas) {
        C0838c c0838c = this.f4943z;
        if (c0838c == null) {
            return;
        }
        boolean F6 = F();
        if (F6) {
            try {
                this.f4921W.acquire();
            } catch (InterruptedException unused) {
                if (AbstractC0558e.h()) {
                    AbstractC0558e.c("Drawable#draw");
                }
                if (!F6) {
                    return;
                }
                this.f4921W.release();
                if (c0838c.Q() == this.f4927b.n()) {
                    return;
                }
            } catch (Throwable th) {
                if (AbstractC0558e.h()) {
                    AbstractC0558e.c("Drawable#draw");
                }
                if (F6) {
                    this.f4921W.release();
                    if (c0838c.Q() != this.f4927b.n()) {
                        f4898d0.execute(this.f4924Z);
                    }
                }
                throw th;
            }
        }
        if (AbstractC0558e.h()) {
            AbstractC0558e.b("Drawable#draw");
        }
        if (F6 && j1()) {
            b1(this.f4927b.n());
        }
        if (this.f4930e) {
            try {
                if (this.f4905G) {
                    z0(canvas, c0838c);
                } else {
                    z(canvas);
                }
            } catch (Throwable th2) {
                AbstractC1195f.b("Lottie crashed in draw!", th2);
            }
        } else if (this.f4905G) {
            z0(canvas, c0838c);
        } else {
            z(canvas);
        }
        this.f4918T = false;
        if (AbstractC0558e.h()) {
            AbstractC0558e.c("Drawable#draw");
        }
        if (F6) {
            this.f4921W.release();
            if (c0838c.Q() == this.f4927b.n()) {
                return;
            }
            f4898d0.execute(this.f4924Z);
        }
    }

    boolean e0() {
        if (isVisible()) {
            return this.f4927b.isRunning();
        }
        b bVar = this.f4931f;
        return bVar == b.PLAY || bVar == b.RESUME;
    }

    public void e1(int i7) {
        this.f4927b.setRepeatMode(i7);
    }

    public boolean f0() {
        return this.f4902D;
    }

    public void f1(boolean z6) {
        this.f4930e = z6;
    }

    public boolean g0(M m7) {
        return this.f4940w.b(m7);
    }

    public void g1(float f7) {
        this.f4927b.I(f7);
    }

    @Override
    public int getAlpha() {
        return this.f4899A;
    }

    @Override
    public int getIntrinsicHeight() {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            return -1;
        }
        return c0564k.b().height();
    }

    @Override
    public int getIntrinsicWidth() {
        C0564k c0564k = this.f4925a;
        if (c0564k == null) {
            return -1;
        }
        return c0564k.b().width();
    }

    @Override
    public int getOpacity() {
        return -3;
    }

    public void h1(c0 c0Var) {
        this.f4939v = c0Var;
    }

    public void i1(boolean z6) {
        this.f4927b.J(z6);
    }

    @Override
    public void invalidateDrawable(Drawable drawable) {
        Drawable.Callback callback = getCallback();
        if (callback == null) {
            return;
        }
        callback.invalidateDrawable(this);
    }

    @Override
    public void invalidateSelf() {
        Drawable.Callback callback;
        if (this.f4918T) {
            return;
        }
        this.f4918T = true;
        if ((!f4896b0 || Looper.getMainLooper() == Looper.myLooper()) && (callback = getCallback()) != null) {
            callback.invalidateDrawable(this);
        }
    }

    @Override
    public boolean isRunning() {
        return d0();
    }

    public boolean k1() {
        return this.f4936s == null && this.f4939v == null && this.f4925a.c().n() > 0;
    }

    public void q(Animator.AnimatorListener animatorListener) {
        this.f4927b.addListener(animatorListener);
    }

    public void r(final Z1.e eVar, final Object obj, final C1213c c1213c) {
        C0838c c0838c = this.f4943z;
        if (c0838c == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k) {
                    L.this.h0(eVar, obj, c1213c, c0564k);
                }
            });
            return;
        }
        boolean z6 = true;
        if (eVar == Z1.e.f6728c) {
            c0838c.h(obj, c1213c);
        } else if (eVar.d() != null) {
            eVar.d().h(obj, c1213c);
        } else {
            List A02 = A0(eVar);
            for (int i7 = 0; i7 < A02.size(); i7++) {
                ((Z1.e) A02.get(i7)).d().h(obj, c1213c);
            }
            z6 = true ^ A02.isEmpty();
        }
        if (z6) {
            invalidateSelf();
            if (obj == T.f4962E) {
                b1(V());
            }
        }
    }

    public boolean s(Context context) {
        if (this.f4929d) {
            return true;
        }
        return this.f4928c && AbstractC0558e.f().a(context) == X1.a.STANDARD_MOTION;
    }

    @Override
    public void scheduleDrawable(Drawable drawable, Runnable runnable, long j7) {
        Drawable.Callback callback = getCallback();
        if (callback == null) {
            return;
        }
        callback.scheduleDrawable(this, runnable, j7);
    }

    @Override
    public void setAlpha(int i7) {
        this.f4899A = i7;
        invalidateSelf();
    }

    @Override
    public void setColorFilter(ColorFilter colorFilter) {
        AbstractC1195f.c("Use addColorFilter instead.");
    }

    @Override
    public boolean setVisible(boolean z6, boolean z7) {
        boolean isVisible = isVisible();
        boolean visible = super.setVisible(z6, z7);
        if (z6) {
            b bVar = this.f4931f;
            if (bVar == b.PLAY) {
                y0();
            } else if (bVar == b.RESUME) {
                B0();
            }
        } else if (this.f4927b.isRunning()) {
            x0();
            this.f4931f = b.RESUME;
        } else if (isVisible) {
            this.f4931f = b.NONE;
        }
        return visible;
    }

    @Override
    public void start() {
        Drawable.Callback callback = getCallback();
        if ((callback instanceof View) && ((View) callback).isInEditMode()) {
            return;
        }
        y0();
    }

    @Override
    public void stop() {
        B();
    }

    public void u() {
        this.f4932o.clear();
        this.f4927b.cancel();
        if (isVisible()) {
            return;
        }
        this.f4931f = b.NONE;
    }

    @Override
    public void unscheduleDrawable(Drawable drawable, Runnable runnable) {
        Drawable.Callback callback = getCallback();
        if (callback == null) {
            return;
        }
        callback.unscheduleDrawable(this, runnable);
    }

    public void v() {
        if (this.f4927b.isRunning()) {
            this.f4927b.cancel();
            if (!isVisible()) {
                this.f4931f = b.NONE;
            }
        }
        this.f4925a = null;
        this.f4943z = null;
        this.f4933p = null;
        this.f4926a0 = -3.4028235E38f;
        this.f4927b.i();
        invalidateSelf();
    }

    public void x0() {
        this.f4932o.clear();
        this.f4927b.v();
        if (isVisible()) {
            return;
        }
        this.f4931f = b.NONE;
    }

    public void y0() {
        if (this.f4943z == null) {
            this.f4932o.add(new a() {
                @Override
                public final void a(C0564k c0564k) {
                    L.this.l0(c0564k);
                }
            });
            return;
        }
        w();
        if (s(K()) || X() == 0) {
            if (isVisible()) {
                this.f4927b.w();
                this.f4931f = b.NONE;
            } else {
                this.f4931f = b.PLAY;
            }
        }
        if (s(K())) {
            return;
        }
        Z1.h R6 = R();
        if (R6 != null) {
            M0((int) R6.f6734b);
        } else {
            M0((int) (Z() < 0.0f ? T() : S()));
        }
        this.f4927b.l();
        if (isVisible()) {
            return;
        }
        this.f4931f = b.NONE;
    }
}