package defpackage;

import android.os.Looper;
import android.util.AndroidRuntimeException;
import java.util.ArrayList;

/* renamed from: ᵴᵭ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4671 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final ᵺᵣᵬ f17282;

    /* renamed from: ˌᵜᵹᵩ, reason: contains not printable characters */
    public final ArrayList f17283;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public float f17284;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public boolean f17285;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public boolean f17286;

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public long f17287;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public float f17288;

    /* renamed from: ᵪʩ, reason: contains not printable characters */
    public float f17289;

    /* renamed from: ᵯٴᵦ, reason: contains not printable characters */
    public C1107 f17290;

    /* renamed from: ᵳٴᵶ, reason: contains not printable characters */
    public boolean f17291;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public float f17292;

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public float f17293;

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public final ArrayList f17294;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public float f17295;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final C2445 f17296;

    /* renamed from: ˌʾˀ, reason: contains not printable characters */
    public static final C0156 f17276 = new C0156(1);

    /* renamed from: ᵡʠ, reason: contains not printable characters */
    public static final C0156 f17279 = new C0156(2);

    /* renamed from: ᵸʓᵠ, reason: contains not printable characters */
    public static final C0156 f17281 = new C0156(3);

    /* renamed from: ᵞʡ, reason: contains not printable characters */
    public static final C0156 f17278 = new C0156(4);

    /* renamed from: ᵨᵳʝ, reason: contains not printable characters */
    public static final C0156 f17280 = new C0156(5);

    /* renamed from: ˑᵱ, reason: contains not printable characters */
    public static final C0156 f17277 = new C0156(0);

    public C4671(C2445 c2445, ᵺᵣᵬ r6) {
        this.f17288 = 0.0f;
        this.f17292 = Float.MAX_VALUE;
        this.f17286 = false;
        this.f17285 = false;
        this.f17284 = Float.MAX_VALUE;
        this.f17295 = -3.4028235E38f;
        this.f17287 = 0L;
        this.f17294 = new ArrayList();
        this.f17283 = new ArrayList();
        this.f17296 = c2445;
        this.f17282 = r6;
        if (r6 == f17281 || r6 == f17278 || r6 == f17280) {
            this.f17293 = 0.1f;
        } else if (r6 == f17277) {
            this.f17293 = 0.00390625f;
        } else if (r6 == f17276 || r6 == f17279) {
            this.f17293 = 0.002f;
        } else {
            this.f17293 = 1.0f;
        }
        this.f17290 = null;
        this.f17289 = Float.MAX_VALUE;
        this.f17291 = false;
    }

    public C4671(C4141 c4141) {
        this.f17288 = 0.0f;
        this.f17292 = Float.MAX_VALUE;
        this.f17286 = false;
        this.f17285 = false;
        this.f17284 = Float.MAX_VALUE;
        this.f17295 = -3.4028235E38f;
        this.f17287 = 0L;
        this.f17294 = new ArrayList();
        this.f17283 = new ArrayList();
        this.f17296 = null;
        this.f17282 = new C1857(c4141);
        this.f17293 = 1.0f;
        this.f17290 = null;
        this.f17289 = Float.MAX_VALUE;
        this.f17291 = false;
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static C0486 m9855() {
        ThreadLocal threadLocal = C0486.f2586;
        if (threadLocal.get() == null) {
            threadLocal.set(new C0486(new C2720(3)));
        }
        return (C0486) threadLocal.get();
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final void m9856(float f) {
        ArrayList arrayList;
        this.f17282.ˎˑː(this.f17296, f);
        int i = 0;
        while (true) {
            arrayList = this.f17283;
            if (i >= arrayList.size()) {
                break;
            }
            if (arrayList.get(i) != null) {
                C2844 c2844 = (C2844) arrayList.get(i);
                float f2 = this.f17292;
                C2058 c2058 = c2844.f10955;
                long jMax = Math.max(-1L, Math.min(c2058.f1499 + 1, Math.round(f2)));
                c2058.mo1252(jMax, c2844.f10953);
                c2844.f10953 = jMax;
            }
            i++;
        }
        for (int size = arrayList.size() - 1; size >= 0; size--) {
            if (arrayList.get(size) == null) {
                arrayList.remove(size);
            }
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m9857(float f) {
        if (this.f17285) {
            this.f17289 = f;
            return;
        }
        if (this.f17290 == null) {
            this.f17290 = new C1107(f);
        }
        C1107 c1107 = this.f17290;
        double d = f;
        c1107.f4775 = d;
        double d2 = (float) d;
        if (d2 > this.f17284) {
            C0190.m1432("Final position of the spring cannot be greater than the max value.");
            return;
        }
        if (d2 < this.f17295) {
            C0190.m1432("Final position of the spring cannot be less than the min value.");
            return;
        }
        double dAbs = Math.abs(this.f17293 * 0.75f);
        c1107.f4780 = dAbs;
        c1107.f4771 = dAbs * 62.5d;
        C2720 c2720 = m9855().f2587;
        c2720.getClass();
        if (Thread.currentThread() != ((Looper) c2720.f10550).getThread()) {
            throw new AndroidRuntimeException("Animations may only be started on the same thread as the animation handler");
        }
        boolean z = this.f17285;
        if (z || z) {
            return;
        }
        this.f17285 = true;
        if (!this.f17286) {
            this.f17292 = this.f17282.ᵸʓᵠ(this.f17296);
        }
        float f2 = this.f17292;
        if (f2 > this.f17284 || f2 < this.f17295) {
            ᵹˉᵞ.ˌᵜᵹᵩ("Starting value need to be in between min value and max value");
        } else {
            m9855().m2113(this);
        }
    }
}
