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

156 lines
4.9 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
import android.view.animation.AccelerateDecelerateInterpolator;
import java.util.Iterator;
import o.NPh;
/* loaded from: classes3.dex */
public final class GmP extends XKS<AnimatorSet> {
private int a;
private int e;
private int g;
private mOC h;
private int i;
private int j;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes3.dex */
public enum Sts {
Width,
Height,
Radius
}
public GmP(NPh.RVV rvv) {
super(rvv);
this.h = new mOC();
}
public final GmP c(long j) {
super.b(j);
return this;
}
private ValueAnimator PD_(int i, int i2, long j, Sts sts) {
ValueAnimator ofInt = ValueAnimator.ofInt(i, i2);
ofInt.setInterpolator(new AccelerateDecelerateInterpolator());
ofInt.setDuration(j);
ofInt.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(this, sts) { // from class: o.GmP.3
private GmP c;
private Sts e;
{
this.c = this;
this.e = sts;
}
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
GmP.PC_(this.c, valueAnimator, this.e);
}
});
return ofInt;
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: o.GmP$2, reason: invalid class name */
/* loaded from: classes3.dex */
public static /* synthetic */ class AnonymousClass2 {
static final int[] b;
static {
int[] iArr = new int[Sts.values().length];
b = iArr;
try {
iArr[Sts.Width.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
b[Sts.Height.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
b[Sts.Radius.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
}
}
static /* synthetic */ void PC_(GmP gmP, ValueAnimator valueAnimator, Sts sts) {
int intValue = ((Integer) valueAnimator.getAnimatedValue()).intValue();
int i = AnonymousClass2.b[sts.ordinal()];
if (i == 1) {
gmP.h.c = intValue;
} else if (i == 2) {
gmP.h.d = intValue;
} else if (i == 3) {
gmP.h.b = intValue;
}
if (gmP.b != null) {
gmP.b.b(gmP.h);
}
}
@Override // o.XKS
public final /* synthetic */ AnimatorSet PW_() {
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.setInterpolator(new AccelerateDecelerateInterpolator());
return animatorSet;
}
@Override // o.XKS
public final /* bridge */ /* synthetic */ XKS b(long j) {
super.b(j);
return this;
}
@Override // o.XKS
public final /* synthetic */ XKS a(float f) {
if (this.c != 0) {
long j = f * ((float) this.d);
Iterator<Animator> it = ((AnimatorSet) this.c).getChildAnimations().iterator();
boolean z = false;
while (it.hasNext()) {
ValueAnimator valueAnimator = (ValueAnimator) it.next();
long duration = valueAnimator.getDuration();
long j2 = z ? j - duration : j;
if (j2 >= 0) {
if (j2 >= duration) {
j2 = duration;
}
if (valueAnimator.getValues() != null && valueAnimator.getValues().length > 0) {
valueAnimator.setCurrentPlayTime(j2);
}
if (!z && duration >= this.d) {
z = true;
}
}
}
}
return this;
}
public final GmP c(int i, int i2, int i3, int i4, int i5) {
if (this.i != i || this.g != i2 || this.e != i3 || this.a != i4 || this.j != i5) {
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.setInterpolator(new AccelerateDecelerateInterpolator());
this.c = animatorSet;
this.i = i;
this.g = i2;
this.e = i3;
this.a = i4;
this.j = i5;
int i6 = (int) (i5 / 1.5d);
long j = this.d / 2;
ValueAnimator PD_ = PD_(i, i2, this.d, Sts.Width);
ValueAnimator PD_2 = PD_(i3, i4, j, Sts.Height);
ValueAnimator PD_3 = PD_(i5, i6, j, Sts.Radius);
((AnimatorSet) this.c).play(PD_2).with(PD_3).with(PD_).before(PD_(i4, i3, j, Sts.Height)).before(PD_(i6, i5, j, Sts.Radius));
}
return this;
}
}