package com.airbnb.lottie;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.PorterDuff;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import com.airbnb.lottie.g;
import com.airbnb.lottie.i;
import com.strmr.ps.R;
import defpackage.bk5;
import defpackage.bl5;
import defpackage.cl5;
import defpackage.ek5;
import defpackage.gl5;
import defpackage.ha1;
import defpackage.hl5;
import defpackage.i35;
import defpackage.kk5;
import defpackage.mx5;
import defpackage.n41;
import defpackage.of2;
import defpackage.og4;
import defpackage.ph4;
import defpackage.pt8;
import defpackage.qh4;
import defpackage.qk9;
import defpackage.ql1;
import defpackage.qs7;
import defpackage.rq6;
import defpackage.sf1;
import defpackage.sk5;
import defpackage.tb5;
import defpackage.uv;
import defpackage.uy7;
import defpackage.v33;
import defpackage.vo6;
import defpackage.w57;
import defpackage.wk5;
import defpackage.wo;
import defpackage.wq0;
import defpackage.xg3;
import defpackage.xj5;
import defpackage.xk5;
import defpackage.yg3;
import defpackage.zj5;
import java.io.ByteArrayInputStream;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.Callable;

/* JADX INFO: loaded from: classes.dex */
public class LottieAnimationView extends wo {
    public static final xj5 p = new xj5();
    public final sk5 a;
    public final sk5 b;
    public sk5 c;
    public int d;
    public final g e;
    public String f;
    public int i;
    public boolean j;
    public boolean k;
    public boolean l;
    public final HashSet m;
    public final HashSet n;
    public cl5 o;

    public static class a extends View.BaseSavedState {
        public static final Parcelable.Creator<a> CREATOR = new C0077a();
        public String a;
        public int b;
        public float c;
        public boolean d;
        public String e;
        public int f;
        public int i;

        /* JADX INFO: renamed from: com.airbnb.lottie.LottieAnimationView$a$a, reason: collision with other inner class name */
        public class C0077a implements Parcelable.Creator<a> {
            @Override // android.os.Parcelable.Creator
            public final a createFromParcel(Parcel parcel) {
                a aVar = new a(parcel);
                aVar.a = parcel.readString();
                aVar.c = parcel.readFloat();
                aVar.d = parcel.readInt() == 1;
                aVar.e = parcel.readString();
                aVar.f = parcel.readInt();
                aVar.i = parcel.readInt();
                return aVar;
            }

            @Override // android.os.Parcelable.Creator
            public final a[] newArray(int i) {
                return new a[i];
            }
        }

        @Override // android.view.View.BaseSavedState, android.view.AbsSavedState, android.os.Parcelable
        public final void writeToParcel(Parcel parcel, int i) {
            super.writeToParcel(parcel, i);
            parcel.writeString(this.a);
            parcel.writeFloat(this.c);
            parcel.writeInt(this.d ? 1 : 0);
            parcel.writeString(this.e);
            parcel.writeInt(this.f);
            parcel.writeInt(this.i);
        }
    }

    /* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
    /* JADX WARN: Unknown enum class pattern. Please report as an issue! */
    public static final class b {
        public static final b a;
        public static final b b;
        public static final b c;
        public static final b d;
        public static final b e;
        public static final b f;
        public static final /* synthetic */ b[] i;

        static {
            b bVar = new b("SET_ANIMATION", 0);
            a = bVar;
            b bVar2 = new b("SET_PROGRESS", 1);
            b = bVar2;
            b bVar3 = new b("SET_REPEAT_MODE", 2);
            c = bVar3;
            b bVar4 = new b("SET_REPEAT_COUNT", 3);
            d = bVar4;
            b bVar5 = new b("SET_IMAGE_ASSETS", 4);
            e = bVar5;
            b bVar6 = new b("PLAY_OPTION", 5);
            f = bVar6;
            i = new b[]{bVar, bVar2, bVar3, bVar4, bVar5, bVar6};
        }

        public static b valueOf(String str) {
            return (b) Enum.valueOf(b.class, str);
        }

        public static b[] values() {
            return (b[]) i.clone();
        }
    }

    public static class c implements sk5<Throwable> {
        public final WeakReference a;

        public c(LottieAnimationView lottieAnimationView) {
            this.a = new WeakReference(lottieAnimationView);
        }

        @Override // defpackage.sk5
        public final void onResult(Object obj) {
            Throwable th = (Throwable) obj;
            LottieAnimationView lottieAnimationView = (LottieAnimationView) this.a.get();
            if (lottieAnimationView == null) {
                return;
            }
            int i = lottieAnimationView.d;
            if (i != 0) {
                lottieAnimationView.setImageResource(i);
            }
            sk5 sk5Var = lottieAnimationView.c;
            if (sk5Var == null) {
                sk5Var = LottieAnimationView.p;
            }
            sk5Var.onResult(th);
        }
    }

    public static class d implements sk5<zj5> {
        public final WeakReference a;

        public d(LottieAnimationView lottieAnimationView) {
            this.a = new WeakReference(lottieAnimationView);
        }

        @Override // defpackage.sk5
        public final void onResult(Object obj) {
            zj5 zj5Var = (zj5) obj;
            LottieAnimationView lottieAnimationView = (LottieAnimationView) this.a.get();
            if (lottieAnimationView == null) {
                return;
            }
            lottieAnimationView.setComposition(zj5Var);
        }
    }

    public LottieAnimationView(Context context, AttributeSet attributeSet) {
        String string;
        super(context, attributeSet, 0);
        this.a = new d(this);
        this.b = new c(this);
        this.d = 0;
        g gVar = new g();
        this.e = gVar;
        this.j = false;
        this.k = false;
        this.l = true;
        HashSet hashSet = new HashSet();
        this.m = hashSet;
        this.n = new HashSet();
        TypedArray typedArrayObtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, i.c.a, R.attr.lottieAnimationViewStyle, 0);
        this.l = typedArrayObtainStyledAttributes.getBoolean(4, true);
        boolean zHasValue = typedArrayObtainStyledAttributes.hasValue(16);
        boolean zHasValue2 = typedArrayObtainStyledAttributes.hasValue(11);
        boolean zHasValue3 = typedArrayObtainStyledAttributes.hasValue(21);
        if (zHasValue && zHasValue2) {
            throw new IllegalArgumentException("lottie_rawRes and lottie_fileName cannot be used at the same time. Please use only one at once.");
        }
        if (zHasValue) {
            int resourceId = typedArrayObtainStyledAttributes.getResourceId(16, 0);
            if (resourceId != 0) {
                setAnimation(resourceId);
            }
        } else if (zHasValue2) {
            String string2 = typedArrayObtainStyledAttributes.getString(11);
            if (string2 != null) {
                setAnimation(string2);
            }
        } else if (zHasValue3 && (string = typedArrayObtainStyledAttributes.getString(21)) != null) {
            setAnimationFromUrl(string);
        }
        setFallbackResource(typedArrayObtainStyledAttributes.getResourceId(10, 0));
        if (typedArrayObtainStyledAttributes.getBoolean(3, false)) {
            this.k = true;
        }
        if (typedArrayObtainStyledAttributes.getBoolean(14, false)) {
            gVar.b.setRepeatCount(-1);
        }
        if (typedArrayObtainStyledAttributes.hasValue(19)) {
            setRepeatMode(typedArrayObtainStyledAttributes.getInt(19, 1));
        }
        if (typedArrayObtainStyledAttributes.hasValue(18)) {
            setRepeatCount(typedArrayObtainStyledAttributes.getInt(18, -1));
        }
        if (typedArrayObtainStyledAttributes.hasValue(20)) {
            setSpeed(typedArrayObtainStyledAttributes.getFloat(20, 1.0f));
        }
        if (typedArrayObtainStyledAttributes.hasValue(6)) {
            setClipToCompositionBounds(typedArrayObtainStyledAttributes.getBoolean(6, true));
        }
        if (typedArrayObtainStyledAttributes.hasValue(5)) {
            setClipTextToBoundingBox(typedArrayObtainStyledAttributes.getBoolean(5, false));
        }
        if (typedArrayObtainStyledAttributes.hasValue(8)) {
            setDefaultFontFileExtension(typedArrayObtainStyledAttributes.getString(8));
        }
        setImageAssetsFolder(typedArrayObtainStyledAttributes.getString(13));
        boolean zHasValue4 = typedArrayObtainStyledAttributes.hasValue(15);
        float f = typedArrayObtainStyledAttributes.getFloat(15, 0.0f);
        if (zHasValue4) {
            hashSet.add(b.b);
        }
        gVar.u(f);
        boolean z = typedArrayObtainStyledAttributes.getBoolean(9, false);
        HashSet hashSet2 = gVar.r.a;
        kk5 kk5Var = kk5.a;
        boolean zAdd = z ? hashSet2.add(kk5Var) : hashSet2.remove(kk5Var);
        if (gVar.a != null && zAdd) {
            gVar.c();
        }
        setApplyingOpacityToLayersEnabled(typedArrayObtainStyledAttributes.getBoolean(0, false));
        setApplyingShadowToLayersEnabled(typedArrayObtainStyledAttributes.getBoolean(1, true));
        if (typedArrayObtainStyledAttributes.hasValue(7)) {
            gVar.a(new i35("**"), xk5.af, new hl5(new pt8(sf1.getColorStateList(getContext(), typedArrayObtainStyledAttributes.getResourceId(7, -1)).getDefaultColor(), PorterDuff.Mode.SRC_ATOP)));
        }
        if (typedArrayObtainStyledAttributes.hasValue(17)) {
            int i = typedArrayObtainStyledAttributes.getInt(17, 0);
            setRenderMode(uy7.values()[i >= uy7.values().length ? 0 : i]);
        }
        if (typedArrayObtainStyledAttributes.hasValue(2)) {
            int i2 = typedArrayObtainStyledAttributes.getInt(2, 0);
            setAsyncUpdates(uv.values()[i2 >= uy7.values().length ? 0 : i2]);
        }
        setIgnoreDisabledSystemAnimations(typedArrayObtainStyledAttributes.getBoolean(12, false));
        if (typedArrayObtainStyledAttributes.hasValue(22)) {
            setUseCompositionFrameRate(typedArrayObtainStyledAttributes.getBoolean(22, false));
        }
        typedArrayObtainStyledAttributes.recycle();
    }

    private void setCompositionTask(cl5<zj5> cl5Var) {
        bl5 bl5Var = cl5Var.d;
        g gVar = this.e;
        if (bl5Var != null && gVar == getDrawable() && gVar.a == bl5Var.a) {
            return;
        }
        this.m.add(b.a);
        this.e.d();
        c();
        cl5Var.b(this.a);
        cl5Var.a(this.b);
        this.o = cl5Var;
    }

    public final void c() {
        cl5 cl5Var = this.o;
        if (cl5Var != null) {
            sk5 sk5Var = this.a;
            synchronized (cl5Var) {
                cl5Var.a.remove(sk5Var);
            }
            cl5 cl5Var2 = this.o;
            sk5 sk5Var2 = this.b;
            synchronized (cl5Var2) {
                cl5Var2.b.remove(sk5Var2);
            }
        }
    }

    public uv getAsyncUpdates() {
        uv uvVar = this.e.ar;
        return uvVar != null ? uvVar : uv.a;
    }

    public boolean getAsyncUpdatesEnabled() {
        uv uvVar = this.e.ar;
        if (uvVar == null) {
            uvVar = uv.a;
        }
        return uvVar == uv.b;
    }

    public boolean getClipTextToBoundingBox() {
        return this.e.aa;
    }

    public boolean getClipToCompositionBounds() {
        return this.e.t;
    }

    @rq6
    public zj5 getComposition() {
        Drawable drawable = getDrawable();
        g gVar = this.e;
        if (drawable == gVar) {
            return gVar.a;
        }
        return null;
    }

    public long getDuration() {
        zj5 composition = getComposition();
        if (composition != null) {
            return (long) composition.b();
        }
        return 0L;
    }

    public int getFrame() {
        return (int) this.e.b.j;
    }

    @rq6
    public String getImageAssetsFolder() {
        return this.e.k;
    }

    public boolean getMaintainOriginalImageBounds() {
        return this.e.s;
    }

    public float getMaxFrame() {
        return this.e.b.d();
    }

    public float getMinFrame() {
        return this.e.b.e();
    }

    @rq6
    public w57 getPerformanceTracker() {
        zj5 zj5Var = this.e.a;
        if (zj5Var != null) {
            return zj5Var.a;
        }
        return null;
    }

    @v33
    public float getProgress() {
        return this.e.b.c();
    }

    public uy7 getRenderMode() {
        return this.e.ac ? uy7.c : uy7.b;
    }

    public int getRepeatCount() {
        return this.e.b.getRepeatCount();
    }

    public int getRepeatMode() {
        return this.e.b.getRepeatMode();
    }

    public float getSpeed() {
        return this.e.b.d;
    }

    @Override // android.view.View
    public final void invalidate() {
        super.invalidate();
        Drawable drawable = getDrawable();
        if (drawable instanceof g) {
            boolean z = ((g) drawable).ac;
            uy7 uy7Var = uy7.c;
            if ((z ? uy7Var : uy7.b) == uy7Var) {
                this.e.invalidateSelf();
            }
        }
    }

    @Override // android.widget.ImageView, android.view.View, android.graphics.drawable.Drawable.Callback
    public final void invalidateDrawable(Drawable drawable) {
        Drawable drawable2 = getDrawable();
        g gVar = this.e;
        if (drawable2 == gVar) {
            super.invalidateDrawable(gVar);
        } else {
            super.invalidateDrawable(drawable);
        }
    }

    @Override // android.widget.ImageView, android.view.View
    public final void onAttachedToWindow() {
        super.onAttachedToWindow();
        if (isInEditMode() || !this.k) {
            return;
        }
        this.e.l();
    }

    @Override // android.view.View
    public final void onRestoreInstanceState(Parcelable parcelable) {
        int i;
        if (!(parcelable instanceof a)) {
            super.onRestoreInstanceState(parcelable);
            return;
        }
        a aVar = (a) parcelable;
        super.onRestoreInstanceState(aVar.getSuperState());
        this.f = aVar.a;
        HashSet hashSet = this.m;
        b bVar = b.a;
        if (!hashSet.contains(bVar) && !TextUtils.isEmpty(this.f)) {
            setAnimation(this.f);
        }
        this.i = aVar.b;
        if (!hashSet.contains(bVar) && (i = this.i) != 0) {
            setAnimation(i);
        }
        boolean zContains = hashSet.contains(b.b);
        g gVar = this.e;
        if (!zContains) {
            gVar.u(aVar.c);
        }
        b bVar2 = b.f;
        if (!hashSet.contains(bVar2) && aVar.d) {
            hashSet.add(bVar2);
            gVar.l();
        }
        if (!hashSet.contains(b.e)) {
            setImageAssetsFolder(aVar.e);
        }
        if (!hashSet.contains(b.c)) {
            setRepeatMode(aVar.f);
        }
        if (hashSet.contains(b.d)) {
            return;
        }
        setRepeatCount(aVar.i);
    }

    @Override // android.view.View
    public final Parcelable onSaveInstanceState() {
        boolean z;
        a aVar = new a(super.onSaveInstanceState());
        aVar.a = this.f;
        aVar.b = this.i;
        g gVar = this.e;
        gl5 gl5Var = gVar.b;
        gl5 gl5Var2 = gVar.b;
        aVar.c = gl5Var.c();
        if (gVar.isVisible()) {
            z = gl5Var2.o;
        } else {
            g.b bVar = gVar.f;
            z = bVar == g.b.b || bVar == g.b.c;
        }
        aVar.d = z;
        aVar.e = gVar.k;
        aVar.f = gl5Var2.getRepeatMode();
        aVar.i = gl5Var2.getRepeatCount();
        return aVar;
    }

    public void setAnimation(@qs7 final int i) {
        cl5<zj5> cl5VarA;
        this.i = i;
        final String str = null;
        this.f = null;
        if (isInEditMode()) {
            cl5VarA = new cl5<>(new og4(this, i, 1), true);
        } else if (this.l) {
            Context context = getContext();
            final String strK = ek5.k(context, i);
            final WeakReference weakReference = new WeakReference(context);
            final Context applicationContext = context.getApplicationContext();
            cl5VarA = ek5.a(strK, new Callable() { // from class: dk5
                @Override // java.util.concurrent.Callable
                public final Object call() {
                    HashMap map = ek5.a;
                    Context context2 = (Context) weakReference.get();
                    if (context2 == null) {
                        context2 = applicationContext;
                    }
                    return ek5.f(context2, i, strK);
                }
            }, null);
        } else {
            Context context2 = getContext();
            HashMap map = ek5.a;
            final WeakReference weakReference2 = new WeakReference(context2);
            final Context applicationContext2 = context2.getApplicationContext();
            cl5VarA = ek5.a(null, new Callable() { // from class: dk5
                @Override // java.util.concurrent.Callable
                public final Object call() {
                    HashMap map2 = ek5.a;
                    Context context22 = (Context) weakReference2.get();
                    if (context22 == null) {
                        context22 = applicationContext2;
                    }
                    return ek5.f(context22, i, str);
                }
            }, null);
        }
        setCompositionTask(cl5VarA);
    }

    @Deprecated
    public void setAnimationFromJson(String str) {
        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(str.getBytes());
        setCompositionTask(ek5.a(null, new ql1(byteArrayInputStream, 3), new tb5(byteArrayInputStream, 1)));
    }

    public void setAnimationFromUrl(String str) {
        cl5<zj5> cl5VarA;
        int i = 0;
        String str2 = null;
        if (this.l) {
            Context context = getContext();
            HashMap map = ek5.a;
            String strN = n41.n("url_", str);
            cl5VarA = ek5.a(strN, new bk5(context, str, i, strN), null);
        } else {
            cl5VarA = ek5.a(null, new bk5(getContext(), str, i, str2), null);
        }
        setCompositionTask(cl5VarA);
    }

    public void setApplyingOpacityToLayersEnabled(boolean z) {
        this.e.y = z;
    }

    public void setApplyingShadowToLayersEnabled(boolean z) {
        this.e.z = z;
    }

    public void setAsyncUpdates(uv uvVar) {
        this.e.ar = uvVar;
    }

    public void setCacheComposition(boolean z) {
        this.l = z;
    }

    public void setClipTextToBoundingBox(boolean z) {
        g gVar = this.e;
        if (z != gVar.aa) {
            gVar.aa = z;
            gVar.invalidateSelf();
        }
    }

    public void setClipToCompositionBounds(boolean z) {
        g gVar = this.e;
        if (z != gVar.t) {
            gVar.t = z;
            ha1 ha1Var = gVar.u;
            if (ha1Var != null) {
                ha1Var.al = z;
            }
            gVar.invalidateSelf();
        }
    }

    public void setComposition(@vo6 zj5 zj5Var) {
        g gVar = this.e;
        gVar.setCallback(this);
        boolean z = true;
        this.j = true;
        ArrayList arrayList = gVar.i;
        gl5 gl5Var = gVar.b;
        if (gVar.a == zj5Var) {
            z = false;
        } else {
            gVar.aq = true;
            gVar.d();
            gVar.a = zj5Var;
            gVar.c();
            boolean z2 = gl5Var.n == null;
            gl5Var.n = zj5Var;
            if (z2) {
                gl5Var.i(Math.max(gl5Var.l, zj5Var.l), Math.min(gl5Var.m, zj5Var.m));
            } else {
                gl5Var.i((int) zj5Var.l, (int) zj5Var.m);
            }
            float f = gl5Var.j;
            gl5Var.j = 0.0f;
            gl5Var.i = 0.0f;
            gl5Var.h((int) f);
            gl5Var.b();
            gVar.u(gl5Var.getAnimatedFraction());
            Iterator it = new ArrayList(arrayList).iterator();
            while (it.hasNext()) {
                g.a aVar = (g.a) it.next();
                if (aVar != null) {
                    aVar.run();
                }
                it.remove();
            }
            arrayList.clear();
            zj5Var.a.a = gVar.w;
            gVar.e();
            Drawable.Callback callback = gVar.getCallback();
            if (callback instanceof ImageView) {
                ImageView imageView = (ImageView) callback;
                imageView.setImageDrawable(null);
                imageView.setImageDrawable(gVar);
            }
        }
        if (this.k) {
            gVar.l();
        }
        this.j = false;
        if (getDrawable() != gVar || z) {
            if (!z) {
                boolean z3 = gl5Var != null ? gl5Var.o : false;
                setImageDrawable(null);
                setImageDrawable(gVar);
                if (z3) {
                    gVar.n();
                }
            }
            onVisibilityChanged(this, getVisibility());
            requestLayout();
            Iterator it2 = this.n.iterator();
            while (it2.hasNext()) {
                ((wk5) it2.next()).a();
            }
        }
    }

    public void setDefaultFontFileExtension(String str) {
        g gVar = this.e;
        gVar.o = str;
        yg3 yg3VarI = gVar.i();
        if (yg3VarI != null) {
            yg3VarI.e = str;
        }
    }

    public void setFailureListener(@rq6 sk5<Throwable> sk5Var) {
        this.c = sk5Var;
    }

    public void setFallbackResource(@of2 int i) {
        this.d = i;
    }

    public void setFontAssetDelegate(xg3 xg3Var) {
        this.e.p = xg3Var;
    }

    public void setFontMap(@rq6 Map<String, Typeface> map) {
        g gVar = this.e;
        if (map == gVar.n) {
            return;
        }
        gVar.n = map;
        gVar.invalidateSelf();
    }

    public void setFrame(int i) {
        this.e.o(i);
    }

    @Deprecated
    public void setIgnoreDisabledSystemAnimations(boolean z) {
        this.e.d = z;
    }

    public void setImageAssetDelegate(ph4 ph4Var) {
        g gVar = this.e;
        gVar.l = ph4Var;
        qh4 qh4Var = gVar.j;
        if (qh4Var != null) {
            qh4Var.c = ph4Var;
        }
    }

    public void setImageAssetsFolder(String str) {
        this.e.k = str;
    }

    @Override // defpackage.wo, android.widget.ImageView
    public void setImageBitmap(Bitmap bitmap) {
        this.i = 0;
        this.f = null;
        c();
        super.setImageBitmap(bitmap);
    }

    @Override // defpackage.wo, android.widget.ImageView
    public void setImageDrawable(Drawable drawable) {
        this.i = 0;
        this.f = null;
        c();
        super.setImageDrawable(drawable);
    }

    @Override // defpackage.wo, android.widget.ImageView
    public void setImageResource(int i) {
        this.i = 0;
        this.f = null;
        c();
        super.setImageResource(i);
    }

    public void setMaintainOriginalImageBounds(boolean z) {
        this.e.s = z;
    }

    public void setMaxFrame(int i) {
        this.e.p(i);
    }

    public void setMaxProgress(@v33 float f) {
        g gVar = this.e;
        zj5 zj5Var = gVar.a;
        if (zj5Var == null) {
            gVar.i.add(new com.airbnb.lottie.d(gVar, f, 0));
            return;
        }
        gl5 gl5Var = gVar.b;
        gl5Var.i(gl5Var.l, mx5.f(zj5Var.l, zj5Var.m, f));
    }

    public void setMinAndMaxFrame(String str) {
        this.e.r(str);
    }

    public void setMinFrame(int i) {
        this.e.s(i);
    }

    public void setMinProgress(float f) {
        g gVar = this.e;
        zj5 zj5Var = gVar.a;
        if (zj5Var == null) {
            gVar.i.add(new com.airbnb.lottie.d(gVar, f, 1));
        } else {
            gVar.s((int) mx5.f(zj5Var.l, zj5Var.m, f));
        }
    }

    public void setOutlineMasksAndMattes(boolean z) {
        g gVar = this.e;
        if (gVar.x == z) {
            return;
        }
        gVar.x = z;
        ha1 ha1Var = gVar.u;
        if (ha1Var != null) {
            ha1Var.q(z);
        }
    }

    public void setPerformanceTrackingEnabled(boolean z) {
        g gVar = this.e;
        gVar.w = z;
        zj5 zj5Var = gVar.a;
        if (zj5Var != null) {
            zj5Var.a.a = z;
        }
    }

    public void setProgress(@v33 float f) {
        this.m.add(b.b);
        this.e.u(f);
    }

    public void setRenderMode(uy7 uy7Var) {
        g gVar = this.e;
        gVar.ab = uy7Var;
        gVar.e();
    }

    public void setRepeatCount(int i) {
        this.m.add(b.d);
        this.e.b.setRepeatCount(i);
    }

    public void setRepeatMode(int i) {
        this.m.add(b.c);
        this.e.b.setRepeatMode(i);
    }

    public void setSafeMode(boolean z) {
        this.e.e = z;
    }

    public void setSpeed(float f) {
        this.e.b.d = f;
    }

    public void setTextDelegate(qk9 qk9Var) {
        this.e.q = qk9Var;
    }

    public void setUseCompositionFrameRate(boolean z) {
        this.e.b.p = z;
    }

    /* JADX WARN: Removed duplicated region for block: B:12:0x0019  */
    @Override // android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void unscheduleDrawable(Drawable drawable) {
        g gVar;
        boolean z = this.j;
        if (!z && drawable == (gVar = this.e)) {
            gl5 gl5Var = gVar.b;
            if (gl5Var == null ? false : gl5Var.o) {
                this.k = false;
                gVar.k();
            }
        } else if (!z && (drawable instanceof g)) {
            g gVar2 = (g) drawable;
            gl5 gl5Var2 = gVar2.b;
            if (gl5Var2 != null ? gl5Var2.o : false) {
                gVar2.k();
            }
        }
        super.unscheduleDrawable(drawable);
    }

    public void setMaxFrame(String str) {
        this.e.q(str);
    }

    public void setMinFrame(String str) {
        this.e.t(str);
    }

    public void setAnimation(String str) {
        cl5<zj5> cl5VarA;
        this.f = str;
        this.i = 0;
        int i = 1;
        if (isInEditMode()) {
            cl5VarA = new cl5<>(new wq0(this, str, 3), true);
        } else {
            String str2 = null;
            if (this.l) {
                Context context = getContext();
                HashMap map = ek5.a;
                String strN = n41.n("asset_", str);
                cl5VarA = ek5.a(strN, new bk5(context.getApplicationContext(), str, i, strN), null);
            } else {
                Context context2 = getContext();
                HashMap map2 = ek5.a;
                cl5VarA = ek5.a(null, new bk5(context2.getApplicationContext(), str, i, str2), null);
            }
        }
        setCompositionTask(cl5VarA);
    }
}
