package m0;

import android.animation.Animator;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;

/* JADX INFO: compiled from: MotionTiming.java */
/* JADX INFO: loaded from: classes.dex */
public class i {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private long f5568a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private long f5569b;

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

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

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

    public i(long j3, long j4) {
        this.f5568a = 0L;
        this.f5569b = 300L;
        this.f5570c = null;
        this.f5571d = 0;
        this.f5572e = 1;
        this.f5568a = j3;
        this.f5569b = j4;
    }

    static i b(ValueAnimator valueAnimator) {
        i iVar = new i(valueAnimator.getStartDelay(), valueAnimator.getDuration(), f(valueAnimator));
        iVar.f5571d = valueAnimator.getRepeatCount();
        iVar.f5572e = valueAnimator.getRepeatMode();
        return iVar;
    }

    private static TimeInterpolator f(ValueAnimator valueAnimator) {
        TimeInterpolator interpolator = valueAnimator.getInterpolator();
        return ((interpolator instanceof AccelerateDecelerateInterpolator) || interpolator == null) ? a.f5554b : interpolator instanceof AccelerateInterpolator ? a.f5555c : interpolator instanceof DecelerateInterpolator ? a.f5556d : interpolator;
    }

    public void a(Animator animator) {
        animator.setStartDelay(c());
        animator.setDuration(d());
        animator.setInterpolator(e());
        if (animator instanceof ValueAnimator) {
            ValueAnimator valueAnimator = (ValueAnimator) animator;
            valueAnimator.setRepeatCount(g());
            valueAnimator.setRepeatMode(h());
        }
    }

    public long c() {
        return this.f5568a;
    }

    public long d() {
        return this.f5569b;
    }

    public TimeInterpolator e() {
        TimeInterpolator timeInterpolator = this.f5570c;
        return timeInterpolator != null ? timeInterpolator : a.f5554b;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof i)) {
            return false;
        }
        i iVar = (i) obj;
        if (c() == iVar.c() && d() == iVar.d() && g() == iVar.g() && h() == iVar.h()) {
            return e().getClass().equals(iVar.e().getClass());
        }
        return false;
    }

    public int g() {
        return this.f5571d;
    }

    public int h() {
        return this.f5572e;
    }

    public int hashCode() {
        return (((((((((int) (c() ^ (c() >>> 32))) * 31) + ((int) (d() ^ (d() >>> 32)))) * 31) + e().getClass().hashCode()) * 31) + g()) * 31) + h();
    }

    public String toString() {
        return '\n' + i.class.getName() + '{' + Integer.toHexString(System.identityHashCode(this)) + " delay: " + c() + " duration: " + d() + " interpolator: " + e().getClass() + " repeatCount: " + g() + " repeatMode: " + h() + "}\n";
    }

    public i(long j3, long j4, TimeInterpolator timeInterpolator) {
        this.f5568a = 0L;
        this.f5569b = 300L;
        this.f5570c = null;
        this.f5571d = 0;
        this.f5572e = 1;
        this.f5568a = j3;
        this.f5569b = j4;
        this.f5570c = timeInterpolator;
    }
}
