package com.google.android.material.animation; 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; /* loaded from: classes.dex */ public class MotionTiming { private long a; private long b; private TimeInterpolator c; private int d; private int e; public MotionTiming(long j, long j2) { this.a = 0L; this.b = 300L; this.c = null; this.d = 0; this.e = 1; this.a = j; this.b = j2; } public void a(Animator animator) { animator.setStartDelay(a()); animator.setDuration(b()); animator.setInterpolator(c()); if (animator instanceof ValueAnimator) { ValueAnimator valueAnimator = (ValueAnimator) animator; valueAnimator.setRepeatCount(d()); valueAnimator.setRepeatMode(e()); } } public long b() { return this.b; } public TimeInterpolator c() { TimeInterpolator timeInterpolator = this.c; return timeInterpolator != null ? timeInterpolator : AnimationUtils.b; } public int d() { return this.d; } public int e() { return this.e; } public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || MotionTiming.class != obj.getClass()) { return false; } MotionTiming motionTiming = (MotionTiming) obj; if (a() == motionTiming.a() && b() == motionTiming.b() && d() == motionTiming.d() && e() == motionTiming.e()) { return c().getClass().equals(motionTiming.c().getClass()); } return false; } public int hashCode() { return (((((((((int) (a() ^ (a() >>> 32))) * 31) + ((int) (b() ^ (b() >>> 32)))) * 31) + c().getClass().hashCode()) * 31) + d()) * 31) + e(); } public String toString() { return '\n' + MotionTiming.class.getName() + '{' + Integer.toHexString(System.identityHashCode(this)) + " delay: " + a() + " duration: " + b() + " interpolator: " + c().getClass() + " repeatCount: " + d() + " repeatMode: " + e() + "}\n"; } private static TimeInterpolator b(ValueAnimator valueAnimator) { TimeInterpolator interpolator = valueAnimator.getInterpolator(); return ((interpolator instanceof AccelerateDecelerateInterpolator) || interpolator == null) ? AnimationUtils.b : interpolator instanceof AccelerateInterpolator ? AnimationUtils.c : interpolator instanceof DecelerateInterpolator ? AnimationUtils.d : interpolator; } public long a() { return this.a; } static MotionTiming a(ValueAnimator valueAnimator) { MotionTiming motionTiming = new MotionTiming(valueAnimator.getStartDelay(), valueAnimator.getDuration(), b(valueAnimator)); motionTiming.d = valueAnimator.getRepeatCount(); motionTiming.e = valueAnimator.getRepeatMode(); return motionTiming; } public MotionTiming(long j, long j2, TimeInterpolator timeInterpolator) { this.a = 0L; this.b = 300L; this.c = null; this.d = 0; this.e = 1; this.a = j; this.b = j2; this.c = timeInterpolator; } }