what-the-bank/sources/o/qXa.java

127 lines
4.6 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.animation.Animator;
import android.animation.AnimatorInflater;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.TimeInterpolator;
import android.content.Context;
import android.util.Property;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import com.airbnb.deeplinkdispatch.UrlTreeKt;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes2.dex */
public class qXa {
public final DFj<String, C0176ArQ> b = new DFj<>();
public final DFj<String, PropertyValuesHolder[]> e = new DFj<>();
public final C0176ArQ b(String str) {
if (this.b.get(str) == null) {
throw new IllegalArgumentException();
}
return this.b.get(str);
}
public final PropertyValuesHolder[] HG_(String str) {
if (this.e.get(str) == null) {
throw new IllegalArgumentException();
}
PropertyValuesHolder[] propertyValuesHolderArr = this.e.get(str);
PropertyValuesHolder[] propertyValuesHolderArr2 = new PropertyValuesHolder[propertyValuesHolderArr.length];
for (int i = 0; i < propertyValuesHolderArr.length; i++) {
propertyValuesHolderArr2[i] = propertyValuesHolderArr[i].clone();
}
return propertyValuesHolderArr2;
}
public final <T> ObjectAnimator HF_(String str, T t, Property<T, ?> property) {
ObjectAnimator ofPropertyValuesHolder = ObjectAnimator.ofPropertyValuesHolder(t, HG_(str));
ofPropertyValuesHolder.setProperty(property);
if (this.b.get(str) != null) {
this.b.get(str).HH_(ofPropertyValuesHolder);
return ofPropertyValuesHolder;
}
throw new IllegalArgumentException();
}
public static qXa b(Context context, int i) {
Animator loadAnimator;
try {
loadAnimator = AnimatorInflater.loadAnimator(context, i);
} catch (Exception unused) {
}
if (loadAnimator instanceof AnimatorSet) {
return e(((AnimatorSet) loadAnimator).getChildAnimations());
}
if (loadAnimator != null) {
ArrayList arrayList = new ArrayList();
arrayList.add(loadAnimator);
return e(arrayList);
}
return null;
}
private static qXa e(List<Animator> list) {
qXa qxa = new qXa();
int size = list.size();
for (int i = 0; i < size; i++) {
HE_(qxa, list.get(i));
}
return qxa;
}
private static void HE_(qXa qxa, Animator animator) {
if (animator instanceof ObjectAnimator) {
ObjectAnimator objectAnimator = (ObjectAnimator) animator;
qxa.e.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 = C6217cMa.d;
} else if (interpolator instanceof AccelerateInterpolator) {
interpolator = C6217cMa.c;
} else if (interpolator instanceof DecelerateInterpolator) {
interpolator = C6217cMa.b;
}
C0176ArQ c0176ArQ = new C0176ArQ(startDelay, duration, interpolator);
c0176ArQ.c = objectAnimator.getRepeatCount();
c0176ArQ.d = objectAnimator.getRepeatMode();
qxa.b.put(propertyName, c0176ArQ);
return;
}
throw new IllegalArgumentException("Animator must be an ObjectAnimator: ".concat(String.valueOf(animator)));
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof qXa) {
return this.b.equals(((qXa) obj).b);
}
return false;
}
public int hashCode() {
return this.b.hashCode();
}
public String toString() {
StringBuilder sb = new StringBuilder("\n");
sb.append(getClass().getName());
sb.append(UrlTreeKt.componentParamPrefixChar);
sb.append(Integer.toHexString(System.identityHashCode(this)));
sb.append(" timings: ");
sb.append(this.b);
sb.append("}\n");
return sb.toString();
}
}