package o;

import android.animation.Animator;
import android.animation.AnimatorInflater;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.TimeInterpolator;
import android.content.Context;
import android.content.res.Resources;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import java.util.ArrayList;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.dQ, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0999dQ {
    public final I80 a = new I80(0);
    public final I80 b = new I80(0);

    public static C0999dQ a(Context context, int i) throws Resources.NotFoundException {
        try {
            Animator animatorLoadAnimator = AnimatorInflater.loadAnimator(context, i);
            if (animatorLoadAnimator instanceof AnimatorSet) {
                return b(((AnimatorSet) animatorLoadAnimator).getChildAnimations());
            }
            if (animatorLoadAnimator == null) {
                return null;
            }
            ArrayList arrayList = new ArrayList();
            arrayList.add(animatorLoadAnimator);
            return b(arrayList);
        } catch (Exception unused) {
            Integer.toHexString(i);
            return null;
        }
    }

    public static C0999dQ b(ArrayList arrayList) {
        C0999dQ c0999dQ = new C0999dQ();
        int size = arrayList.size();
        for (int i = 0; i < size; i++) {
            Animator animator = (Animator) arrayList.get(i);
            if (!(animator instanceof ObjectAnimator)) {
                throw new IllegalArgumentException("Animator must be an ObjectAnimator: " + animator);
            }
            ObjectAnimator objectAnimator = (ObjectAnimator) animator;
            c0999dQ.b.put(objectAnimator.getPropertyName(), objectAnimator.getValues());
            String propertyName = objectAnimator.getPropertyName();
            long startDelay = objectAnimator.getStartDelay();
            long duration = objectAnimator.getDuration();
            TimeInterpolator interpolator = objectAnimator.getInterpolator();
            if ((interpolator instanceof AccelerateDecelerateInterpolator) || interpolator == null) {
                interpolator = T6.b;
            } else if (interpolator instanceof AccelerateInterpolator) {
                interpolator = T6.c;
            } else if (interpolator instanceof DecelerateInterpolator) {
                interpolator = T6.d;
            }
            C1094eQ c1094eQ = new C1094eQ();
            c1094eQ.d = 0;
            c1094eQ.e = 1;
            c1094eQ.a = startDelay;
            c1094eQ.b = duration;
            c1094eQ.c = interpolator;
            c1094eQ.d = objectAnimator.getRepeatCount();
            c1094eQ.e = objectAnimator.getRepeatMode();
            c0999dQ.a.put(propertyName, c1094eQ);
        }
        return c0999dQ;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof C0999dQ) {
            return this.a.equals(((C0999dQ) obj).a);
        }
        return false;
    }

    public final int hashCode() {
        return this.a.hashCode();
    }

    public final String toString() {
        return "\n" + C0999dQ.class.getName() + '{' + Integer.toHexString(System.identityHashCode(this)) + " timings: " + this.a + "}\n";
    }
}
