导航菜单

页面标题

页面副标题

万能钥匙 v1.1.23 - l0.java 源代码

正在查看: 万能钥匙 v1.1.23 应用的 l0.java JAVA 源代码文件

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


package e8;

import android.animation.Animator;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
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 androidx.annotation.FloatRange;
import androidx.annotation.IntRange;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
import com.brentvatne.exoplayer.ReactExoplayerView;
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 l0 extends Drawable implements Drawable.Callback, Animatable {
    public static final boolean T;
    public static final List<String> U;
    public static final Executor V;
    public Bitmap A;
    public Canvas B;
    public Rect C;
    public RectF D;
    public Paint E;
    public Rect F;
    public Rect G;
    public RectF H;
    public RectF I;
    public Matrix J;
    public Matrix K;
    public boolean L;

    @Nullable
    public e8.a M;
    public final ValueAnimator.AnimatorUpdateListener N;
    public final Semaphore O;
    public Handler P;
    public Runnable Q;
    public final Runnable R;
    public float S;

    public i f12510a;

    public final r8.g f12511b;

    public boolean f12512c;

    public boolean f12513d;

    public boolean f12514e;

    public b f12515f;

    public final ArrayList<a> f12516g;

    @Nullable
    public j8.b f12517h;

    @Nullable
    public String f12518i;

    @Nullable
    public j8.a f12519j;

    @Nullable
    public Map<String, Typeface> f12520k;

    @Nullable
    public String f12521l;

    @Nullable
    public e8.b f12522m;

    @Nullable
    public c1 f12523n;

    public final n0 f12524o;

    public boolean f12525p;

    public boolean f12526q;

    @Nullable
    public n8.c f12527r;

    public int f12528s;

    public boolean f12529t;

    public boolean f12530u;

    public boolean f12531v;

    public boolean f12532w;

    public a1 f12533x;
    public boolean y;
    public final Matrix z;

    public interface a {
        void a(i iVar);
    }

    public enum b {
        NONE,
        PLAY,
        RESUME
    }

    static {
        T = Build.VERSION.SDK_INT <= 25;
        U = Arrays.asList("reduced motion", "reduced_motion", "reduced-motion", "reducedmotion");
        V = new ThreadPoolExecutor(0, 2, 35L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new r8.e());
    }

    public l0() {
        r8.g gVar = new r8.g();
        this.f12511b = gVar;
        this.f12512c = true;
        this.f12513d = false;
        this.f12514e = false;
        this.f12515f = b.NONE;
        this.f12516g = new ArrayList<>();
        this.f12524o = new n0();
        this.f12525p = false;
        this.f12526q = true;
        this.f12528s = 255;
        this.f12532w = false;
        this.f12533x = a1.AUTOMATIC;
        this.y = false;
        this.z = new Matrix();
        this.L = false;
        ValueAnimator.AnimatorUpdateListener animatorUpdateListener = new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                l0.h(l0.this, valueAnimator);
            }
        };
        this.N = animatorUpdateListener;
        this.O = new Semaphore(1);
        this.R = new Runnable() {
            @Override
            public final void run() {
                l0.l(l0.this);
            }
        };
        this.S = -3.4028235E38f;
        gVar.addUpdateListener(animatorUpdateListener);
    }

    public static void h(l0 l0Var, ValueAnimator valueAnimator) {
        if (l0Var.K()) {
            l0Var.invalidateSelf();
            return;
        }
        n8.c cVar = l0Var.f12527r;
        if (cVar != null) {
            cVar.L(l0Var.f12511b.n());
        }
    }

    public static void l(final l0 l0Var) {
        n8.c cVar = l0Var.f12527r;
        if (cVar == null) {
            return;
        }
        try {
            l0Var.O.acquire();
            cVar.L(l0Var.f12511b.n());
            if (T && l0Var.L) {
                if (l0Var.P == null) {
                    l0Var.P = new Handler(Looper.getMainLooper());
                    l0Var.Q = new Runnable() {
                        @Override
                        public final void run() {
                            l0.p(l0.this);
                        }
                    };
                }
                l0Var.P.post(l0Var.Q);
            }
            l0Var.O.release();
        } catch (InterruptedException unused) {
            l0Var.O.release();
        } catch (Throwable th) {
            l0Var.O.release();
            throw th;
        }
    }

    public static void p(l0 l0Var) {
        Drawable.Callback callback = l0Var.getCallback();
        if (callback != null) {
            callback.invalidateDrawable(l0Var);
        }
    }

    public final void A() {
        i iVar = this.f12510a;
        if (iVar == null) {
            return;
        }
        this.y = this.f12533x.b(Build.VERSION.SDK_INT, iVar.q(), iVar.m());
    }

    public void A0(boolean z) {
        this.f12531v = z;
    }

    public final void B(Rect rect, RectF rectF) {
        rectF.set(rect.left, rect.top, rect.right, rect.bottom);
    }

    public void B0(@Nullable e8.a aVar) {
        this.M = aVar;
    }

    public final void C(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));
    }

    public void C0(boolean z) {
        if (z != this.f12532w) {
            this.f12532w = z;
            invalidateSelf();
        }
    }

    @Deprecated
    public void D() {
    }

    public void D0(boolean z) {
        if (z != this.f12526q) {
            this.f12526q = z;
            n8.c cVar = this.f12527r;
            if (cVar != null) {
                cVar.R(z);
            }
            invalidateSelf();
        }
    }

    public final void E(Canvas canvas) {
        n8.c cVar = this.f12527r;
        i iVar = this.f12510a;
        if (cVar == null || iVar == null) {
            return;
        }
        this.z.reset();
        if (!getBounds().isEmpty()) {
            this.z.preScale(r2.width() / iVar.b().width(), r2.height() / iVar.b().height());
            this.z.preTranslate(r2.left, r2.top);
        }
        cVar.h(canvas, this.z, this.f12528s);
    }

    public boolean E0(i iVar) {
        if (this.f12510a == iVar) {
            return false;
        }
        this.L = true;
        z();
        this.f12510a = iVar;
        x();
        this.f12511b.B(iVar);
        Z0(this.f12511b.getAnimatedFraction());
        Iterator it = new ArrayList(this.f12516g).iterator();
        while (it.hasNext()) {
            a aVar = (a) it.next();
            if (aVar != null) {
                aVar.a(iVar);
            }
            it.remove();
        }
        this.f12516g.clear();
        iVar.v(this.f12529t);
        A();
        Drawable.Callback callback = getCallback();
        if (callback instanceof ImageView) {
            ImageView imageView = (ImageView) callback;
            imageView.setImageDrawable(null);
            imageView.setImageDrawable(this);
        }
        return true;
    }

    public void F(m0 m0Var, boolean z) {
        boolean a10 = this.f12524o.a(m0Var, z);
        if (this.f12510a == null || !a10) {
            return;
        }
        x();
    }

    public void F0(String str) {
        this.f12521l = str;
        j8.a Q = Q();
        if (Q != null) {
            Q.c(str);
        }
    }

    @MainThread
    public void G() {
        this.f12516g.clear();
        this.f12511b.m();
        if (isVisible()) {
            return;
        }
        this.f12515f = b.NONE;
    }

    public void G0(e8.b bVar) {
        this.f12522m = bVar;
        j8.a aVar = this.f12519j;
        if (aVar != null) {
            aVar.d(bVar);
        }
    }

    public final void H(int i10, int i11) {
        Bitmap bitmap = this.A;
        if (bitmap == null || bitmap.getWidth() < i10 || this.A.getHeight() < i11) {
            Bitmap createBitmap = Bitmap.createBitmap(i10, i11, Bitmap.Config.ARGB_8888);
            this.A = createBitmap;
            this.B.setBitmap(createBitmap);
            this.L = true;
            return;
        }
        if (this.A.getWidth() > i10 || this.A.getHeight() > i11) {
            Bitmap createBitmap2 = Bitmap.createBitmap(this.A, 0, 0, i10, i11);
            this.A = createBitmap2;
            this.B.setBitmap(createBitmap2);
            this.L = true;
        }
    }

    public void H0(@Nullable Map<String, Typeface> map) {
        if (map == this.f12520k) {
            return;
        }
        this.f12520k = map;
        invalidateSelf();
    }

    public final void I() {
        if (this.B != null) {
            return;
        }
        this.B = new Canvas();
        this.I = new RectF();
        this.J = new Matrix();
        this.K = new Matrix();
        this.C = new Rect();
        this.D = new RectF();
        this.E = new f8.a();
        this.F = new Rect();
        this.G = new Rect();
        this.H = new RectF();
    }

    public void I0(final int i10) {
        if (this.f12510a == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar) {
                    l0.this.I0(i10);
                }
            });
        } else {
            this.f12511b.C(i10);
        }
    }

    public e8.a J() {
        e8.a aVar = this.M;
        return aVar != null ? aVar : e.d();
    }

    @Deprecated
    public void J0(boolean z) {
        this.f12513d = z;
    }

    public boolean K() {
        return J() == e8.a.ENABLED;
    }

    public void K0(c cVar) {
        j8.b bVar = this.f12517h;
        if (bVar != null) {
            bVar.d(cVar);
        }
    }

    @Nullable
    public Bitmap L(String str) {
        j8.b S = S();
        if (S != null) {
            return S.a(str);
        }
        return null;
    }

    public void L0(@Nullable String str) {
        this.f12518i = str;
    }

    public boolean M() {
        return this.f12532w;
    }

    public void M0(boolean z) {
        this.f12525p = z;
    }

    public boolean N() {
        return this.f12526q;
    }

    public void N0(final int i10) {
        if (this.f12510a == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar) {
                    l0.this.N0(i10);
                }
            });
        } else {
            this.f12511b.D(i10 + 0.99f);
        }
    }

    public i O() {
        return this.f12510a;
    }

    public void O0(final String str) {
        i iVar = this.f12510a;
        if (iVar == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar2) {
                    l0.this.O0(str);
                }
            });
            return;
        }
        k8.h l10 = iVar.l(str);
        if (l10 != null) {
            N0((int) (l10.f14791b + l10.f14792c));
            return;
        }
        throw new IllegalArgumentException("Cannot find marker with name " + str + ".");
    }

    @Nullable
    public final Context P() {
        Drawable.Callback callback = getCallback();
        if (callback != null && (callback instanceof View)) {
            return ((View) callback).getContext();
        }
        return null;
    }

    public void P0(@FloatRange(from = 0.0d, to = 1.0d) final float f10) {
        i iVar = this.f12510a;
        if (iVar == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar2) {
                    l0.this.P0(f10);
                }
            });
        } else {
            this.f12511b.D(r8.i.i(iVar.p(), this.f12510a.f(), f10));
        }
    }

    public final j8.a Q() {
        if (getCallback() == null) {
            return null;
        }
        if (this.f12519j == null) {
            j8.a aVar = new j8.a(getCallback(), this.f12522m);
            this.f12519j = aVar;
            String str = this.f12521l;
            if (str != null) {
                aVar.c(str);
            }
        }
        return this.f12519j;
    }

    public void Q0(final int i10, final int i11) {
        if (this.f12510a == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar) {
                    l0.this.Q0(i10, i11);
                }
            });
        } else {
            this.f12511b.G(i10, i11 + 0.99f);
        }
    }

    public int R() {
        return (int) this.f12511b.o();
    }

    public void R0(final String str) {
        i iVar = this.f12510a;
        if (iVar == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar2) {
                    l0.this.R0(str);
                }
            });
            return;
        }
        k8.h l10 = iVar.l(str);
        if (l10 != null) {
            int i10 = (int) l10.f14791b;
            Q0(i10, ((int) l10.f14792c) + i10);
        } else {
            throw new IllegalArgumentException("Cannot find marker with name " + str + ".");
        }
    }

    public final j8.b S() {
        j8.b bVar = this.f12517h;
        if (bVar != null && !bVar.b(P())) {
            this.f12517h = null;
        }
        if (this.f12517h == null) {
            this.f12517h = new j8.b(getCallback(), this.f12518i, null, this.f12510a.j());
        }
        return this.f12517h;
    }

    public void S0(final String str, final String str2, final boolean z) {
        i iVar = this.f12510a;
        if (iVar == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar2) {
                    l0.this.S0(str, str2, z);
                }
            });
            return;
        }
        k8.h l10 = iVar.l(str);
        if (l10 == null) {
            throw new IllegalArgumentException("Cannot find marker with name " + str + ".");
        }
        int i10 = (int) l10.f14791b;
        k8.h l11 = this.f12510a.l(str2);
        if (l11 != null) {
            Q0(i10, (int) (l11.f14791b + (z ? 1.0f : 0.0f)));
            return;
        }
        throw new IllegalArgumentException("Cannot find marker with name " + str2 + ".");
    }

    @Nullable
    public String T() {
        return this.f12518i;
    }

    public void T0(@FloatRange(from = 0.0d, to = 1.0d) final float f10, @FloatRange(from = 0.0d, to = 1.0d) final float f11) {
        i iVar = this.f12510a;
        if (iVar == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar2) {
                    l0.this.T0(f10, f11);
                }
            });
        } else {
            Q0((int) r8.i.i(iVar.p(), this.f12510a.f(), f10), (int) r8.i.i(this.f12510a.p(), this.f12510a.f(), f11));
        }
    }

    @Nullable
    public o0 U(String str) {
        i iVar = this.f12510a;
        if (iVar == null) {
            return null;
        }
        return iVar.j().get(str);
    }

    public void U0(final int i10) {
        if (this.f12510a == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar) {
                    l0.this.U0(i10);
                }
            });
        } else {
            this.f12511b.I(i10);
        }
    }

    public boolean V() {
        return this.f12525p;
    }

    public void V0(final String str) {
        i iVar = this.f12510a;
        if (iVar == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar2) {
                    l0.this.V0(str);
                }
            });
            return;
        }
        k8.h l10 = iVar.l(str);
        if (l10 != null) {
            U0((int) l10.f14791b);
            return;
        }
        throw new IllegalArgumentException("Cannot find marker with name " + str + ".");
    }

    @RestrictTo({RestrictTo.Scope.LIBRARY})
    public k8.h W() {
        Iterator<String> it = U.iterator();
        k8.h hVar = null;
        while (it.hasNext()) {
            hVar = this.f12510a.l(it.next());
            if (hVar != null) {
                break;
            }
        }
        return hVar;
    }

    public void W0(final float f10) {
        i iVar = this.f12510a;
        if (iVar == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar2) {
                    l0.this.W0(f10);
                }
            });
        } else {
            U0((int) r8.i.i(iVar.p(), this.f12510a.f(), f10));
        }
    }

    public float X() {
        return this.f12511b.q();
    }

    public void X0(boolean z) {
        if (this.f12530u == z) {
            return;
        }
        this.f12530u = z;
        n8.c cVar = this.f12527r;
        if (cVar != null) {
            cVar.J(z);
        }
    }

    public float Y() {
        return this.f12511b.r();
    }

    public void Y0(boolean z) {
        this.f12529t = z;
        i iVar = this.f12510a;
        if (iVar != null) {
            iVar.v(z);
        }
    }

    @Nullable
    public x0 Z() {
        i iVar = this.f12510a;
        if (iVar != null) {
            return iVar.n();
        }
        return null;
    }

    public void Z0(@FloatRange(from = 0.0d, to = 1.0d) final float f10) {
        if (this.f12510a == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar) {
                    l0.this.Z0(f10);
                }
            });
            return;
        }
        if (e.h()) {
            e.b("Drawable#setProgress");
        }
        this.f12511b.C(this.f12510a.h(f10));
        if (e.h()) {
            e.c("Drawable#setProgress");
        }
    }

    @FloatRange(from = ReactExoplayerView.DEFAULT_MIN_BUFFER_MEMORY_RESERVE, to = ReactExoplayerView.DEFAULT_MAX_HEAP_ALLOCATION_PERCENT)
    public float a0() {
        return this.f12511b.n();
    }

    public void a1(a1 a1Var) {
        this.f12533x = a1Var;
        A();
    }

    public a1 b0() {
        return this.y ? a1.SOFTWARE : a1.HARDWARE;
    }

    public void b1(int i10) {
        this.f12511b.setRepeatCount(i10);
    }

    public int c0() {
        return this.f12511b.getRepeatCount();
    }

    public void c1(int i10) {
        this.f12511b.setRepeatMode(i10);
    }

    @SuppressLint({"WrongConstant"})
    public int d0() {
        return this.f12511b.getRepeatMode();
    }

    public void d1(boolean z) {
        this.f12514e = z;
    }

    @Override
    public void draw(@NonNull Canvas canvas) {
        n8.c cVar = this.f12527r;
        if (cVar == null) {
            return;
        }
        boolean K = K();
        if (K) {
            try {
                this.O.acquire();
            } catch (InterruptedException unused) {
                if (e.h()) {
                    e.c("Drawable#draw");
                }
                if (!K) {
                    return;
                }
                this.O.release();
                if (cVar.O() == this.f12511b.n()) {
                    return;
                }
            } catch (Throwable th) {
                if (e.h()) {
                    e.c("Drawable#draw");
                }
                if (K) {
                    this.O.release();
                    if (cVar.O() != this.f12511b.n()) {
                        V.execute(this.R);
                    }
                }
                throw th;
            }
        }
        if (e.h()) {
            e.b("Drawable#draw");
        }
        if (K && h1()) {
            Z0(this.f12511b.n());
        }
        if (this.f12514e) {
            try {
                if (this.y) {
                    v0(canvas, cVar);
                } else {
                    E(canvas);
                }
            } catch (Throwable th2) {
                r8.d.b("Lottie crashed in draw!", th2);
            }
        } else if (this.y) {
            v0(canvas, cVar);
        } else {
            E(canvas);
        }
        this.L = false;
        if (e.h()) {
            e.c("Drawable#draw");
        }
        if (K) {
            this.O.release();
            if (cVar.O() == this.f12511b.n()) {
                return;
            }
            V.execute(this.R);
        }
    }

    public float e0() {
        return this.f12511b.s();
    }

    public void e1(float f10) {
        this.f12511b.J(f10);
    }

    @Nullable
    public c1 f0() {
        return this.f12523n;
    }

    public void f1(c1 c1Var) {
        this.f12523n = c1Var;
    }

    @Nullable
    @RestrictTo({RestrictTo.Scope.LIBRARY})
    public Typeface g0(k8.c cVar) {
        Map<String, Typeface> map = this.f12520k;
        if (map != null) {
            String a10 = cVar.a();
            if (map.containsKey(a10)) {
                return map.get(a10);
            }
            String b10 = cVar.b();
            if (map.containsKey(b10)) {
                return map.get(b10);
            }
            String str = cVar.a() + "-" + cVar.c();
            if (map.containsKey(str)) {
                return map.get(str);
            }
        }
        j8.a Q = Q();
        if (Q != null) {
            return Q.b(cVar);
        }
        return null;
    }

    public void g1(boolean z) {
        this.f12511b.K(z);
    }

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

    @Override
    public int getIntrinsicHeight() {
        i iVar = this.f12510a;
        if (iVar == null) {
            return -1;
        }
        return iVar.b().height();
    }

    @Override
    public int getIntrinsicWidth() {
        i iVar = this.f12510a;
        if (iVar == null) {
            return -1;
        }
        return iVar.b().width();
    }

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

    public boolean h0() {
        n8.c cVar = this.f12527r;
        return cVar != null && cVar.P();
    }

    public final boolean h1() {
        i iVar = this.f12510a;
        if (iVar == null) {
            return false;
        }
        float f10 = this.S;
        float n10 = this.f12511b.n();
        this.S = n10;
        return Math.abs(n10 - f10) * iVar.d() >= 50.0f;
    }

    public boolean i0() {
        n8.c cVar = this.f12527r;
        return cVar != null && cVar.Q();
    }

    @Nullable
    public Bitmap i1(String str, @Nullable Bitmap bitmap) {
        j8.b S = S();
        if (S == null) {
            r8.d.c("Cannot update bitmap. Most likely the drawable is not added to a View which prevents Lottie from getting a Context.");
            return null;
        }
        Bitmap e10 = S.e(str, bitmap);
        invalidateSelf();
        return e10;
    }

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

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

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

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

    public boolean j1() {
        return this.f12520k == null && this.f12523n == null && this.f12510a.c().size() > 0;
    }

    public boolean k0() {
        r8.g gVar = this.f12511b;
        if (gVar == null) {
            return false;
        }
        return gVar.isRunning();
    }

    public boolean l0() {
        if (isVisible()) {
            return this.f12511b.isRunning();
        }
        b bVar = this.f12515f;
        return bVar == b.PLAY || bVar == b.RESUME;
    }

    public boolean m0() {
        return this.f12531v;
    }

    public boolean n0(m0 m0Var) {
        return this.f12524o.b(m0Var);
    }

    public void o0() {
        this.f12516g.clear();
        this.f12511b.u();
        if (isVisible()) {
            return;
        }
        this.f12515f = b.NONE;
    }

    @MainThread
    public void p0() {
        if (this.f12527r == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar) {
                    l0.this.p0();
                }
            });
            return;
        }
        A();
        if (w(P()) || c0() == 0) {
            if (isVisible()) {
                this.f12511b.v();
                this.f12515f = b.NONE;
            } else {
                this.f12515f = b.PLAY;
            }
        }
        if (w(P())) {
            return;
        }
        k8.h W = W();
        if (W != null) {
            I0((int) W.f14791b);
        } else {
            I0((int) (e0() < 0.0f ? Y() : X()));
        }
        this.f12511b.m();
        if (isVisible()) {
            return;
        }
        this.f12515f = b.NONE;
    }

    public void q0() {
        this.f12511b.removeAllListeners();
    }

    public void r0() {
        this.f12511b.removeAllUpdateListeners();
        this.f12511b.addUpdateListener(this.N);
    }

    public void s(Animator.AnimatorListener animatorListener) {
        this.f12511b.addListener(animatorListener);
    }

    public void s0(Animator.AnimatorListener animatorListener) {
        this.f12511b.removeListener(animatorListener);
    }

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

    @Override
    public void setAlpha(@IntRange(from = 0, to = 255) int i10) {
        this.f12528s = i10;
        invalidateSelf();
    }

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

    @Override
    public boolean setVisible(boolean z, boolean z2) {
        boolean isVisible = isVisible();
        boolean visible = super.setVisible(z, z2);
        if (z) {
            b bVar = this.f12515f;
            if (bVar == b.PLAY) {
                p0();
                return visible;
            }
            if (bVar == b.RESUME) {
                x0();
                return visible;
            }
        } else {
            if (this.f12511b.isRunning()) {
                o0();
                this.f12515f = b.RESUME;
                return visible;
            }
            if (isVisible) {
                this.f12515f = b.NONE;
            }
        }
        return visible;
    }

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

    @Override
    @MainThread
    public void stop() {
        G();
    }

    @RequiresApi(api = 19)
    public void t(Animator.AnimatorPauseListener animatorPauseListener) {
        this.f12511b.addPauseListener(animatorPauseListener);
    }

    @RequiresApi(api = 19)
    public void t0(Animator.AnimatorPauseListener animatorPauseListener) {
        this.f12511b.removePauseListener(animatorPauseListener);
    }

    public void u(ValueAnimator.AnimatorUpdateListener animatorUpdateListener) {
        this.f12511b.addUpdateListener(animatorUpdateListener);
    }

    public void u0(ValueAnimator.AnimatorUpdateListener animatorUpdateListener) {
        this.f12511b.removeUpdateListener(animatorUpdateListener);
    }

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

    public <T> void v(final k8.e eVar, final T t10, @Nullable final s8.c<T> cVar) {
        n8.c cVar2 = this.f12527r;
        if (cVar2 == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar) {
                    l0.this.v(eVar, t10, cVar);
                }
            });
            return;
        }
        boolean z = true;
        if (eVar == k8.e.f14785c) {
            cVar2.g(t10, cVar);
        } else if (eVar.d() != null) {
            eVar.d().g(t10, cVar);
        } else {
            List<k8.e> w02 = w0(eVar);
            for (int i10 = 0; i10 < w02.size(); i10++) {
                w02.get(i10).d().g(t10, cVar);
            }
            z = true ^ w02.isEmpty();
        }
        if (z) {
            invalidateSelf();
            if (t10 == s0.E) {
                Z0(a0());
            }
        }
    }

    public final void v0(Canvas canvas, n8.c cVar) {
        if (this.f12510a == null || cVar == null) {
            return;
        }
        I();
        canvas.getMatrix(this.J);
        canvas.getClipBounds(this.C);
        B(this.C, this.D);
        this.J.mapRect(this.D);
        C(this.D, this.C);
        if (this.f12526q) {
            this.I.set(0.0f, 0.0f, getIntrinsicWidth(), getIntrinsicHeight());
        } else {
            cVar.d(this.I, null, false);
        }
        this.J.mapRect(this.I);
        Rect bounds = getBounds();
        float width = bounds.width() / getIntrinsicWidth();
        float height = bounds.height() / getIntrinsicHeight();
        z0(this.I, width, height);
        if (!j0()) {
            RectF rectF = this.I;
            Rect rect = this.C;
            rectF.intersect(rect.left, rect.top, rect.right, rect.bottom);
        }
        int ceil = (int) Math.ceil(this.I.width());
        int ceil2 = (int) Math.ceil(this.I.height());
        if (ceil <= 0 || ceil2 <= 0) {
            return;
        }
        H(ceil, ceil2);
        if (this.L) {
            this.z.set(this.J);
            this.z.preScale(width, height);
            Matrix matrix = this.z;
            RectF rectF2 = this.I;
            matrix.postTranslate(-rectF2.left, -rectF2.top);
            this.A.eraseColor(0);
            cVar.h(this.B, this.z, this.f12528s);
            this.J.invert(this.K);
            this.K.mapRect(this.H, this.I);
            C(this.H, this.G);
        }
        this.F.set(0, 0, ceil, ceil2);
        canvas.drawBitmap(this.A, this.F, this.G, this.E);
    }

    public boolean w(@Nullable Context context) {
        if (this.f12513d) {
            return true;
        }
        return this.f12512c && e.f().a(context) == i8.a.STANDARD_MOTION;
    }

    public List<k8.e> w0(k8.e eVar) {
        if (this.f12527r == null) {
            r8.d.c("Cannot resolve KeyPath. Composition is not set yet.");
            return Collections.EMPTY_LIST;
        }
        ArrayList arrayList = new ArrayList();
        this.f12527r.f(eVar, 0, arrayList, new k8.e(new String[0]));
        return arrayList;
    }

    public final void x() {
        i iVar = this.f12510a;
        if (iVar == null) {
            return;
        }
        n8.c cVar = new n8.c(this, p8.v.a(iVar), iVar.k(), iVar);
        this.f12527r = cVar;
        if (this.f12530u) {
            cVar.J(true);
        }
        this.f12527r.R(this.f12526q);
    }

    @MainThread
    public void x0() {
        if (this.f12527r == null) {
            this.f12516g.add(new a() {
                @Override
                public final void a(i iVar) {
                    l0.this.x0();
                }
            });
            return;
        }
        A();
        if (w(P()) || c0() == 0) {
            if (isVisible()) {
                this.f12511b.z();
                this.f12515f = b.NONE;
            } else {
                this.f12515f = b.RESUME;
            }
        }
        if (w(P())) {
            return;
        }
        I0((int) (e0() < 0.0f ? Y() : X()));
        this.f12511b.m();
        if (isVisible()) {
            return;
        }
        this.f12515f = b.NONE;
    }

    public void y() {
        this.f12516g.clear();
        this.f12511b.cancel();
        if (isVisible()) {
            return;
        }
        this.f12515f = b.NONE;
    }

    public void y0() {
        this.f12511b.A();
    }

    public void z() {
        if (this.f12511b.isRunning()) {
            this.f12511b.cancel();
            if (!isVisible()) {
                this.f12515f = b.NONE;
            }
        }
        this.f12510a = null;
        this.f12527r = null;
        this.f12517h = null;
        this.S = -3.4028235E38f;
        this.f12511b.l();
        invalidateSelf();
    }

    public final void z0(RectF rectF, float f10, float f11) {
        rectF.set(rectF.left * f10, rectF.top * f11, rectF.right * f10, rectF.bottom * f11);
    }
}