package androidx.constraintlayout.motion.widget;

import android.content.Context;
import android.graphics.Canvas;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.Interpolator;
import androidx.constraintlayout.motion.widget.l;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.view.p;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;

/* JADX INFO: compiled from: MotionLayout.java */
/* JADX INFO: loaded from: classes.dex */
public class j extends ConstraintLayout implements p {

    /* JADX INFO: renamed from: v0, reason: collision with root package name */
    public static boolean f1184v0;
    Interpolator A;
    float B;
    private int C;
    int D;
    private int E;
    private boolean F;
    HashMap<View, g> G;
    private long H;
    private float I;
    float J;
    float K;
    private long L;
    float M;
    private boolean N;
    boolean O;
    private d P;
    int Q;
    private boolean R;
    private p.b S;
    private androidx.constraintlayout.motion.widget.b T;
    boolean U;
    float V;
    float W;

    /* JADX INFO: renamed from: a0, reason: collision with root package name */
    long f1185a0;

    /* JADX INFO: renamed from: b0, reason: collision with root package name */
    float f1186b0;

    /* JADX INFO: renamed from: c0, reason: collision with root package name */
    private boolean f1187c0;

    /* JADX INFO: renamed from: d0, reason: collision with root package name */
    private ArrayList<h> f1188d0;

    /* JADX INFO: renamed from: e0, reason: collision with root package name */
    private ArrayList<h> f1189e0;

    /* JADX INFO: renamed from: f0, reason: collision with root package name */
    private ArrayList<h> f1190f0;

    /* JADX INFO: renamed from: g0, reason: collision with root package name */
    private CopyOnWriteArrayList<d> f1191g0;

    /* JADX INFO: renamed from: h0, reason: collision with root package name */
    private int f1192h0;

    /* JADX INFO: renamed from: i0, reason: collision with root package name */
    private float f1193i0;

    /* JADX INFO: renamed from: j0, reason: collision with root package name */
    protected boolean f1194j0;

    /* JADX INFO: renamed from: k0, reason: collision with root package name */
    float f1195k0;

    /* JADX INFO: renamed from: l0, reason: collision with root package name */
    private l.c f1196l0;

    /* JADX INFO: renamed from: m0, reason: collision with root package name */
    private boolean f1197m0;

    /* JADX INFO: renamed from: n0, reason: collision with root package name */
    private c f1198n0;

    /* JADX INFO: renamed from: o0, reason: collision with root package name */
    private Runnable f1199o0;

    /* JADX INFO: renamed from: p0, reason: collision with root package name */
    private int[] f1200p0;

    /* JADX INFO: renamed from: q0, reason: collision with root package name */
    int f1201q0;

    /* JADX INFO: renamed from: r0, reason: collision with root package name */
    private boolean f1202r0;

    /* JADX INFO: renamed from: s0, reason: collision with root package name */
    e f1203s0;

    /* JADX INFO: renamed from: t0, reason: collision with root package name */
    private boolean f1204t0;

    /* JADX INFO: renamed from: u0, reason: collision with root package name */
    ArrayList<Integer> f1205u0;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    l f1206y;

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    Interpolator f1207z;

    /* JADX INFO: compiled from: MotionLayout.java */
    class a implements Runnable {
        a() {
        }

        @Override // java.lang.Runnable
        public void run() {
            j.this.f1198n0.a();
        }
    }

    /* JADX INFO: compiled from: MotionLayout.java */
    static /* synthetic */ class b {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        static final /* synthetic */ int[] f1209a;

        static {
            int[] iArr = new int[e.values().length];
            f1209a = iArr;
            try {
                iArr[e.UNDEFINED.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                f1209a[e.SETUP.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                f1209a[e.MOVING.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                f1209a[e.FINISHED.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
        }
    }

    /* JADX INFO: compiled from: MotionLayout.java */
    class c {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        float f1210a = Float.NaN;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        float f1211b = Float.NaN;

        /* JADX INFO: renamed from: c, reason: collision with root package name */
        int f1212c = -1;

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        int f1213d = -1;

        c() {
        }

        void a() {
            int i3 = this.f1212c;
            if (i3 != -1 || this.f1213d != -1) {
                if (i3 == -1) {
                    j.this.O(this.f1213d);
                } else {
                    int i4 = this.f1213d;
                    if (i4 == -1) {
                        j.this.L(i3, -1, -1);
                    } else {
                        j.this.M(i3, i4);
                    }
                }
                j.this.setState(e.SETUP);
            }
            if (Float.isNaN(this.f1211b)) {
                if (Float.isNaN(this.f1210a)) {
                    return;
                }
                j.this.setProgress(this.f1210a);
            } else {
                j.this.K(this.f1210a, this.f1211b);
                this.f1210a = Float.NaN;
                this.f1211b = Float.NaN;
                this.f1212c = -1;
                this.f1213d = -1;
            }
        }

        public Bundle b() {
            Bundle bundle = new Bundle();
            bundle.putFloat("motion.progress", this.f1210a);
            bundle.putFloat("motion.velocity", this.f1211b);
            bundle.putInt("motion.StartState", this.f1212c);
            bundle.putInt("motion.EndState", this.f1213d);
            return bundle;
        }

        public void c() {
            this.f1213d = j.this.E;
            this.f1212c = j.this.C;
            this.f1211b = j.this.getVelocity();
            this.f1210a = j.this.getProgress();
        }

        public void d(int i3) {
            this.f1213d = i3;
        }

        public void e(float f3) {
            this.f1210a = f3;
        }

        public void f(int i3) {
            this.f1212c = i3;
        }

        public void g(Bundle bundle) {
            this.f1210a = bundle.getFloat("motion.progress");
            this.f1211b = bundle.getFloat("motion.velocity");
            this.f1212c = bundle.getInt("motion.StartState");
            this.f1213d = bundle.getInt("motion.EndState");
        }

        public void h(float f3) {
            this.f1211b = f3;
        }
    }

    /* JADX INFO: compiled from: MotionLayout.java */
    public interface d {
        void a(j jVar, int i3, int i4);

        void b(j jVar, int i3, int i4, float f3);

        void c(j jVar, int i3);
    }

    /* JADX INFO: compiled from: MotionLayout.java */
    enum e {
        UNDEFINED,
        SETUP,
        MOVING,
        FINISHED
    }

    private void G() {
        CopyOnWriteArrayList<d> copyOnWriteArrayList;
        if ((this.P == null && ((copyOnWriteArrayList = this.f1191g0) == null || copyOnWriteArrayList.isEmpty())) || this.f1193i0 == this.J) {
            return;
        }
        if (this.f1192h0 != -1) {
            d dVar = this.P;
            if (dVar != null) {
                dVar.a(this, this.C, this.E);
            }
            CopyOnWriteArrayList<d> copyOnWriteArrayList2 = this.f1191g0;
            if (copyOnWriteArrayList2 != null) {
                Iterator<d> it = copyOnWriteArrayList2.iterator();
                while (it.hasNext()) {
                    it.next().a(this, this.C, this.E);
                }
            }
        }
        this.f1192h0 = -1;
        float f3 = this.J;
        this.f1193i0 = f3;
        d dVar2 = this.P;
        if (dVar2 != null) {
            dVar2.b(this, this.C, this.E, f3);
        }
        CopyOnWriteArrayList<d> copyOnWriteArrayList3 = this.f1191g0;
        if (copyOnWriteArrayList3 != null) {
            Iterator<d> it2 = copyOnWriteArrayList3.iterator();
            while (it2.hasNext()) {
                it2.next().b(this, this.C, this.E, this.J);
            }
        }
    }

    private void J() {
        CopyOnWriteArrayList<d> copyOnWriteArrayList;
        if (this.P == null && ((copyOnWriteArrayList = this.f1191g0) == null || copyOnWriteArrayList.isEmpty())) {
            return;
        }
        for (Integer num : this.f1205u0) {
            d dVar = this.P;
            if (dVar != null) {
                dVar.c(this, num.intValue());
            }
            CopyOnWriteArrayList<d> copyOnWriteArrayList2 = this.f1191g0;
            if (copyOnWriteArrayList2 != null) {
                Iterator<d> it = copyOnWriteArrayList2.iterator();
                while (it.hasNext()) {
                    it.next().c(this, num.intValue());
                }
            }
        }
        this.f1205u0.clear();
    }

    void E(float f3) {
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r10v13 */
    /* JADX WARN: Type inference failed for: r10v4 */
    /* JADX WARN: Type inference failed for: r10v5, types: [int] */
    /* JADX WARN: Type inference failed for: r23v0, types: [android.view.ViewGroup, androidx.constraintlayout.motion.widget.j] */
    void F(boolean z2) {
        boolean z3;
        boolean z4;
        boolean z5;
        int i3;
        float interpolation;
        boolean z6;
        boolean z7;
        if (this.L == -1) {
            this.L = getNanoTime();
        }
        float f3 = this.K;
        if (f3 > 0.0f && f3 < 1.0f) {
            this.D = -1;
        }
        if (this.f1187c0 || (this.O && (z2 || this.M != f3))) {
            float fSignum = Math.signum(this.M - f3);
            long nanoTime = getNanoTime();
            Interpolator interpolator = this.f1207z;
            float f4 = !(interpolator instanceof i) ? (((nanoTime - this.L) * fSignum) * 1.0E-9f) / this.I : 0.0f;
            float f5 = this.K + f4;
            if (this.N) {
                f5 = this.M;
            }
            if ((fSignum <= 0.0f || f5 < this.M) && (fSignum > 0.0f || f5 > this.M)) {
                z3 = false;
            } else {
                f5 = this.M;
                this.O = false;
                z3 = true;
            }
            this.K = f5;
            this.J = f5;
            this.L = nanoTime;
            if (interpolator == null || z3) {
                this.B = f4;
            } else {
                if (this.R) {
                    interpolation = interpolator.getInterpolation((nanoTime - this.H) * 1.0E-9f);
                    Interpolator interpolator2 = this.f1207z;
                    if (interpolator2 == this.S) {
                        throw null;
                    }
                    this.K = interpolation;
                    this.L = nanoTime;
                    if (interpolator2 instanceof i) {
                        float fA = ((i) interpolator2).a();
                        this.B = fA;
                        int i4 = ((Math.abs(fA) * this.I) > 1.0E-5f ? 1 : ((Math.abs(fA) * this.I) == 1.0E-5f ? 0 : -1));
                        if (fA <= 0.0f || interpolation < 1.0f) {
                            z6 = false;
                        } else {
                            this.K = 1.0f;
                            z6 = false;
                            this.O = false;
                            interpolation = 1.0f;
                        }
                        if (fA < 0.0f && interpolation <= 0.0f) {
                            this.K = 0.0f;
                            this.O = z6;
                            f5 = 0.0f;
                        }
                    }
                } else {
                    interpolation = interpolator.getInterpolation(f5);
                    Interpolator interpolator3 = this.f1207z;
                    if (interpolator3 instanceof i) {
                        this.B = ((i) interpolator3).a();
                    } else {
                        this.B = ((interpolator3.getInterpolation(f5 + f4) - interpolation) * fSignum) / f4;
                    }
                }
                f5 = interpolation;
            }
            if (Math.abs(this.B) > 1.0E-5f) {
                setState(e.MOVING);
            }
            if ((fSignum > 0.0f && f5 >= this.M) || (fSignum <= 0.0f && f5 <= this.M)) {
                f5 = this.M;
                this.O = false;
            }
            if (f5 >= 1.0f || f5 <= 0.0f) {
                z4 = false;
                this.O = false;
                setState(e.FINISHED);
            } else {
                z4 = false;
            }
            int childCount = getChildCount();
            this.f1187c0 = z4;
            long nanoTime2 = getNanoTime();
            this.f1195k0 = f5;
            Interpolator interpolator4 = this.A;
            float interpolation2 = interpolator4 == null ? f5 : interpolator4.getInterpolation(f5);
            Interpolator interpolator5 = this.A;
            if (interpolator5 != null) {
                float interpolation3 = interpolator5.getInterpolation((fSignum / this.I) + f5);
                this.B = interpolation3;
                this.B = interpolation3 - this.A.getInterpolation(f5);
            }
            for (?? r10 = z4; r10 < childCount; r10++) {
                View childAt = getChildAt(r10);
                g gVar = this.G.get(childAt);
                if (gVar != null) {
                    this.f1187c0 = gVar.c(childAt, interpolation2, nanoTime2, this.f1196l0) | this.f1187c0;
                }
            }
            boolean z8 = (fSignum > 0.0f && f5 >= this.M) || (fSignum <= 0.0f && f5 <= this.M);
            if (!this.f1187c0 && !this.O && z8) {
                setState(e.FINISHED);
            }
            if (this.f1194j0) {
                requestLayout();
            }
            z5 = true;
            boolean z9 = this.f1187c0 | (!z8);
            this.f1187c0 = z9;
            if (f5 <= 0.0f && (i3 = this.C) != -1 && this.D != i3) {
                this.D = i3;
                throw null;
            }
            if (f5 >= 1.0d) {
                int i5 = this.D;
                int i6 = this.E;
                if (i5 != i6) {
                    this.D = i6;
                    throw null;
                }
            }
            if (z9 || this.O) {
                invalidate();
            } else if ((fSignum > 0.0f && f5 == 1.0f) || (fSignum < 0.0f && f5 == 0.0f)) {
                setState(e.FINISHED);
            }
            if (!this.f1187c0 && !this.O && ((fSignum > 0.0f && f5 == 1.0f) || (fSignum < 0.0f && f5 == 0.0f))) {
                I();
            }
        } else {
            z5 = true;
        }
        float f6 = this.K;
        if (f6 >= 1.0f) {
            int i7 = this.D;
            int i8 = this.E;
            if (i7 == i8) {
                z5 = false;
            }
            this.D = i8;
        } else {
            if (f6 > 0.0f) {
                z7 = false;
                this.f1204t0 |= z7;
                if (z7 && !this.f1197m0) {
                    requestLayout();
                }
                this.J = this.K;
            }
            int i9 = this.D;
            int i10 = this.C;
            if (i9 == i10) {
                z5 = false;
            }
            this.D = i10;
        }
        z7 = z5;
        this.f1204t0 |= z7;
        if (z7) {
            requestLayout();
        }
        this.J = this.K;
    }

    protected void H() {
        int iIntValue;
        CopyOnWriteArrayList<d> copyOnWriteArrayList;
        if ((this.P != null || ((copyOnWriteArrayList = this.f1191g0) != null && !copyOnWriteArrayList.isEmpty())) && this.f1192h0 == -1) {
            this.f1192h0 = this.D;
            if (this.f1205u0.isEmpty()) {
                iIntValue = -1;
            } else {
                ArrayList<Integer> arrayList = this.f1205u0;
                iIntValue = arrayList.get(arrayList.size() - 1).intValue();
            }
            int i3 = this.D;
            if (iIntValue != i3 && i3 != -1) {
                this.f1205u0.add(Integer.valueOf(i3));
            }
        }
        J();
        Runnable runnable = this.f1199o0;
        if (runnable != null) {
            runnable.run();
        }
        int[] iArr = this.f1200p0;
        if (iArr == null || this.f1201q0 <= 0) {
            return;
        }
        O(iArr[0]);
        int[] iArr2 = this.f1200p0;
        System.arraycopy(iArr2, 1, iArr2, 0, iArr2.length - 1);
        this.f1201q0--;
    }

    void I() {
    }

    public void K(float f3, float f4) {
        if (!isAttachedToWindow()) {
            if (this.f1198n0 == null) {
                this.f1198n0 = new c();
            }
            this.f1198n0.e(f3);
            this.f1198n0.h(f4);
            return;
        }
        setProgress(f3);
        setState(e.MOVING);
        this.B = f4;
        if (f4 != 0.0f) {
            E(f4 > 0.0f ? 1.0f : 0.0f);
        } else {
            if (f3 == 0.0f || f3 == 1.0f) {
                return;
            }
            E(f3 > 0.5f ? 1.0f : 0.0f);
        }
    }

    public void L(int i3, int i4, int i5) {
        setState(e.SETUP);
        this.D = i3;
        this.C = -1;
        this.E = -1;
        androidx.constraintlayout.widget.c cVar = this.f1246o;
        if (cVar != null) {
            cVar.d(i3, i4, i5);
        }
    }

    public void M(int i3, int i4) {
        if (isAttachedToWindow()) {
            return;
        }
        if (this.f1198n0 == null) {
            this.f1198n0 = new c();
        }
        this.f1198n0.f(i3);
        this.f1198n0.d(i4);
    }

    public void N() {
        E(1.0f);
        this.f1199o0 = null;
    }

    public void O(int i3) {
        if (isAttachedToWindow()) {
            P(i3, -1, -1);
            return;
        }
        if (this.f1198n0 == null) {
            this.f1198n0 = new c();
        }
        this.f1198n0.d(i3);
    }

    public void P(int i3, int i4, int i5) {
        Q(i3, i4, i5, -1);
    }

    public void Q(int i3, int i4, int i5, int i6) {
        int i7 = this.D;
        if (i7 == i3) {
            return;
        }
        if (this.C == i3) {
            E(0.0f);
            if (i6 > 0) {
                this.I = i6 / 1000.0f;
                return;
            }
            return;
        }
        if (this.E == i3) {
            E(1.0f);
            if (i6 > 0) {
                this.I = i6 / 1000.0f;
                return;
            }
            return;
        }
        this.E = i3;
        if (i7 != -1) {
            M(i7, i3);
            E(1.0f);
            this.K = 0.0f;
            N();
            if (i6 > 0) {
                this.I = i6 / 1000.0f;
                return;
            }
            return;
        }
        this.R = false;
        this.M = 1.0f;
        this.J = 0.0f;
        this.K = 0.0f;
        this.L = getNanoTime();
        this.H = getNanoTime();
        this.N = false;
        this.f1207z = null;
        if (i6 == -1) {
            throw null;
        }
        this.C = -1;
        throw null;
    }

    @Override // androidx.core.view.o
    public void d(View view, View view2, int i3, int i4) {
        this.f1185a0 = getNanoTime();
        this.f1186b0 = 0.0f;
        this.V = 0.0f;
        this.W = 0.0f;
    }

    @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup, android.view.View
    protected void dispatchDraw(Canvas canvas) {
        ArrayList<h> arrayList = this.f1190f0;
        if (arrayList != null) {
            Iterator<h> it = arrayList.iterator();
            while (it.hasNext()) {
                it.next().w(canvas);
            }
        }
        F(false);
        super.dispatchDraw(canvas);
    }

    public int[] getConstraintSetIds() {
        return null;
    }

    public int getCurrentState() {
        return this.D;
    }

    public ArrayList<l.a> getDefinedTransitions() {
        return null;
    }

    public androidx.constraintlayout.motion.widget.b getDesignTool() {
        if (this.T == null) {
            this.T = new androidx.constraintlayout.motion.widget.b(this);
        }
        return this.T;
    }

    public int getEndState() {
        return this.E;
    }

    protected long getNanoTime() {
        return System.nanoTime();
    }

    public float getProgress() {
        return this.K;
    }

    public l getScene() {
        return this.f1206y;
    }

    public int getStartState() {
        return this.C;
    }

    public float getTargetPosition() {
        return this.M;
    }

    public Bundle getTransitionState() {
        if (this.f1198n0 == null) {
            this.f1198n0 = new c();
        }
        this.f1198n0.c();
        return this.f1198n0.b();
    }

    public long getTransitionTimeMs() {
        return (long) (this.I * 1000.0f);
    }

    public float getVelocity() {
        return this.B;
    }

    @Override // androidx.core.view.o
    public void i(View view, int i3) {
    }

    @Override // android.view.View
    public boolean isAttachedToWindow() {
        return Build.VERSION.SDK_INT >= 19 ? super.isAttachedToWindow() : getWindowToken() != null;
    }

    @Override // androidx.core.view.o
    public void j(View view, int i3, int i4, int[] iArr, int i5) {
    }

    @Override // androidx.core.view.p
    public void m(View view, int i3, int i4, int i5, int i6, int i7, int[] iArr) {
        if (this.U || i3 != 0 || i4 != 0) {
            iArr[0] = iArr[0] + i5;
            iArr[1] = iArr[1] + i6;
        }
        this.U = false;
    }

    @Override // androidx.core.view.o
    public void n(View view, int i3, int i4, int i5, int i6, int i7) {
    }

    @Override // androidx.core.view.o
    public boolean o(View view, View view2, int i3, int i4) {
        return false;
    }

    @Override // android.view.ViewGroup, android.view.View
    protected void onAttachedToWindow() {
        Display display;
        super.onAttachedToWindow();
        if (Build.VERSION.SDK_INT >= 17 && (display = getDisplay()) != null) {
            display.getRotation();
        }
        I();
        c cVar = this.f1198n0;
        if (cVar != null) {
            if (this.f1202r0) {
                post(new a());
            } else {
                cVar.a();
            }
        }
    }

    @Override // android.view.ViewGroup
    public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
        return false;
    }

    @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup, android.view.View
    protected void onLayout(boolean z2, int i3, int i4, int i5, int i6) {
        this.f1197m0 = true;
        try {
            super.onLayout(z2, i3, i4, i5, i6);
        } finally {
            this.f1197m0 = false;
        }
    }

    @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.View
    protected void onMeasure(int i3, int i4) {
        super.onMeasure(i3, i4);
    }

    @Override // android.view.ViewGroup, android.view.ViewParent, androidx.core.view.q
    public boolean onNestedFling(View view, float f3, float f4, boolean z2) {
        return false;
    }

    @Override // android.view.ViewGroup, android.view.ViewParent, androidx.core.view.q
    public boolean onNestedPreFling(View view, float f3, float f4) {
        return false;
    }

    @Override // android.view.View
    public void onRtlPropertiesChanged(int i3) {
    }

    @Override // android.view.View
    public boolean onTouchEvent(MotionEvent motionEvent) {
        return super.onTouchEvent(motionEvent);
    }

    @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup
    public void onViewAdded(View view) {
        super.onViewAdded(view);
        if (view instanceof h) {
            h hVar = (h) view;
            if (this.f1191g0 == null) {
                this.f1191g0 = new CopyOnWriteArrayList<>();
            }
            this.f1191g0.add(hVar);
            if (hVar.v()) {
                if (this.f1188d0 == null) {
                    this.f1188d0 = new ArrayList<>();
                }
                this.f1188d0.add(hVar);
            }
            if (hVar.u()) {
                if (this.f1189e0 == null) {
                    this.f1189e0 = new ArrayList<>();
                }
                this.f1189e0.add(hVar);
            }
            if (hVar.t()) {
                if (this.f1190f0 == null) {
                    this.f1190f0 = new ArrayList<>();
                }
                this.f1190f0.add(hVar);
            }
        }
    }

    @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup
    public void onViewRemoved(View view) {
        super.onViewRemoved(view);
        ArrayList<h> arrayList = this.f1188d0;
        if (arrayList != null) {
            arrayList.remove(view);
        }
        ArrayList<h> arrayList2 = this.f1189e0;
        if (arrayList2 != null) {
            arrayList2.remove(view);
        }
    }

    @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.View, android.view.ViewParent
    public void requestLayout() {
        if (!this.f1194j0) {
            int i3 = this.D;
        }
        super.requestLayout();
    }

    public void setDebugMode(int i3) {
        this.Q = i3;
        invalidate();
    }

    public void setDelayedApplicationOfInitialState(boolean z2) {
        this.f1202r0 = z2;
    }

    public void setInteractionEnabled(boolean z2) {
        this.F = z2;
    }

    public void setInterpolatedProgress(float f3) {
        setProgress(f3);
    }

    public void setOnHide(float f3) {
        ArrayList<h> arrayList = this.f1189e0;
        if (arrayList != null) {
            int size = arrayList.size();
            for (int i3 = 0; i3 < size; i3++) {
                this.f1189e0.get(i3).setProgress(f3);
            }
        }
    }

    public void setOnShow(float f3) {
        ArrayList<h> arrayList = this.f1188d0;
        if (arrayList != null) {
            int size = arrayList.size();
            for (int i3 = 0; i3 < size; i3++) {
                this.f1188d0.get(i3).setProgress(f3);
            }
        }
    }

    public void setProgress(float f3) {
        if (f3 < 0.0f || f3 > 1.0f) {
            Log.w("MotionLayout", "Warning! Progress is defined for values between 0.0 and 1.0 inclusive");
        }
        if (!isAttachedToWindow()) {
            if (this.f1198n0 == null) {
                this.f1198n0 = new c();
            }
            this.f1198n0.e(f3);
            return;
        }
        if (f3 <= 0.0f) {
            if (this.K == 1.0f && this.D == this.E) {
                setState(e.MOVING);
            }
            this.D = this.C;
            if (this.K == 0.0f) {
                setState(e.FINISHED);
                return;
            }
            return;
        }
        if (f3 < 1.0f) {
            this.D = -1;
            setState(e.MOVING);
            return;
        }
        if (this.K == 0.0f && this.D == this.C) {
            setState(e.MOVING);
        }
        this.D = this.E;
        if (this.K == 1.0f) {
            setState(e.FINISHED);
        }
    }

    public void setScene(l lVar) {
        r();
        throw null;
    }

    void setStartState(int i3) {
        if (isAttachedToWindow()) {
            this.D = i3;
            return;
        }
        if (this.f1198n0 == null) {
            this.f1198n0 = new c();
        }
        this.f1198n0.f(i3);
        this.f1198n0.d(i3);
    }

    void setState(e eVar) {
        e eVar2 = e.FINISHED;
        if (eVar == eVar2 && this.D == -1) {
            return;
        }
        e eVar3 = this.f1203s0;
        this.f1203s0 = eVar;
        e eVar4 = e.MOVING;
        if (eVar3 == eVar4 && eVar == eVar4) {
            G();
        }
        int i3 = b.f1209a[eVar3.ordinal()];
        if (i3 != 1 && i3 != 2) {
            if (i3 == 3 && eVar == eVar2) {
                H();
                return;
            }
            return;
        }
        if (eVar == eVar4) {
            G();
        }
        if (eVar == eVar2) {
            H();
        }
    }

    public void setTransition(int i3) {
    }

    protected void setTransition(l.a aVar) {
        throw null;
    }

    public void setTransitionDuration(int i3) {
        Log.e("MotionLayout", "MotionScene not defined");
    }

    public void setTransitionListener(d dVar) {
        this.P = dVar;
    }

    public void setTransitionState(Bundle bundle) {
        if (this.f1198n0 == null) {
            this.f1198n0 = new c();
        }
        this.f1198n0.g(bundle);
        if (isAttachedToWindow()) {
            this.f1198n0.a();
        }
    }

    @Override // androidx.constraintlayout.widget.ConstraintLayout
    protected void t(int i3) {
        this.f1246o = null;
    }

    @Override // android.view.View
    public String toString() {
        Context context = getContext();
        return androidx.constraintlayout.motion.widget.a.a(context, this.C) + "->" + androidx.constraintlayout.motion.widget.a.a(context, this.E) + " (pos:" + this.K + " Dpos/Dt:" + this.B;
    }
}
