package c.b.e;

import android.view.View;
import android.view.animation.Interpolator;
import c.f.j.i0;
import c.f.j.j0;
import c.f.j.k0;
import java.util.ArrayList;
import java.util.Iterator;

/* JADX INFO: compiled from: ViewPropertyAnimatorCompatSet.java */
/* JADX INFO: loaded from: classes.dex */
public class g {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public Interpolator f653c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public j0 f654d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public boolean f655e;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public long f652b = -1;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final k0 f656f = new a();
    public final ArrayList<i0> a = new ArrayList<>();

    /* JADX INFO: compiled from: ViewPropertyAnimatorCompatSet.java */
    public class a extends k0 {
        public boolean a = false;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public int f657b = 0;

        public a() {
        }

        @Override // c.f.j.j0
        public void b(View view) {
            int i2 = this.f657b + 1;
            this.f657b = i2;
            if (i2 == g.this.a.size()) {
                j0 j0Var = g.this.f654d;
                if (j0Var != null) {
                    j0Var.b(null);
                }
                this.f657b = 0;
                this.a = false;
                g.this.f655e = false;
            }
        }

        @Override // c.f.j.k0, c.f.j.j0
        public void c(View view) {
            if (this.a) {
                return;
            }
            this.a = true;
            j0 j0Var = g.this.f654d;
            if (j0Var != null) {
                j0Var.c(null);
            }
        }
    }

    public void a() {
        if (this.f655e) {
            Iterator<i0> it = this.a.iterator();
            while (it.hasNext()) {
                it.next().b();
            }
            this.f655e = false;
        }
    }

    public void b() {
        View view;
        if (this.f655e) {
            return;
        }
        for (i0 i0Var : this.a) {
            long j2 = this.f652b;
            if (j2 >= 0) {
                i0Var.c(j2);
            }
            Interpolator interpolator = this.f653c;
            if (interpolator != null && (view = i0Var.a.get()) != null) {
                view.animate().setInterpolator(interpolator);
            }
            if (this.f654d != null) {
                i0Var.d(this.f656f);
            }
            View view2 = i0Var.a.get();
            if (view2 != null) {
                view2.animate().start();
            }
        }
        this.f655e = true;
    }
}
