discord-jadx/app/src/main/java/c/f/l/b/b.java

116 lines
3.7 KiB
Java
Raw Normal View History

2021-07-24 02:37:17 +00:00
package c.f.l.b;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.graphics.Matrix;
import android.view.animation.DecelerateInterpolator;
import androidx.annotation.Nullable;
2021-10-08 22:11:56 +00:00
import c.c.a.a0.d;
2021-07-24 02:37:17 +00:00
import java.util.Objects;
/* compiled from: AnimatedZoomableController */
public class b extends a {
2021-11-02 06:38:17 +00:00
/* renamed from: s reason: collision with root package name */
public final ValueAnimator f516s;
2021-07-24 02:37:17 +00:00
/* compiled from: AnimatedZoomableController */
public class a implements ValueAnimator.AnimatorUpdateListener {
public a() {
}
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public void onAnimationUpdate(ValueAnimator valueAnimator) {
b bVar = b.this;
2021-11-02 06:38:17 +00:00
Matrix matrix = bVar.r;
2021-07-24 02:37:17 +00:00
float floatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
for (int i = 0; i < 9; i++) {
bVar.p[i] = (bVar.o[i] * floatValue) + ((1.0f - floatValue) * bVar.n[i]);
}
matrix.setValues(bVar.p);
b bVar2 = b.this;
2021-11-02 06:38:17 +00:00
Matrix matrix2 = bVar2.r;
2021-07-24 02:37:17 +00:00
c.f.d.e.a.i(c.class, "setTransform");
bVar2.h.set(matrix2);
bVar2.i();
}
}
/* compiled from: AnimatedZoomableController */
/* renamed from: c.f.l.b.b$b reason: collision with other inner class name */
2021-10-20 06:51:20 +00:00
public class C0071b extends AnimatorListenerAdapter {
2021-07-24 02:37:17 +00:00
public final /* synthetic */ Runnable a;
2021-10-20 06:51:20 +00:00
public C0071b(Runnable runnable) {
2021-07-24 02:37:17 +00:00
this.a = runnable;
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationCancel(Animator animator) {
Objects.requireNonNull(b.this);
c.f.d.e.a.i(b.class, "setTransformAnimated: animation cancelled");
Runnable runnable = this.a;
if (runnable != null) {
runnable.run();
}
b bVar = b.this;
bVar.m = false;
bVar.a.d();
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
Objects.requireNonNull(b.this);
c.f.d.e.a.i(b.class, "setTransformAnimated: animation finished");
Runnable runnable = this.a;
if (runnable != null) {
runnable.run();
}
b bVar = b.this;
bVar.m = false;
bVar.a.d();
}
}
@SuppressLint({"NewApi"})
public b(c.f.l.a.b bVar) {
super(bVar);
ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 1.0f);
2021-11-02 06:38:17 +00:00
this.f516s = ofFloat;
2021-07-24 02:37:17 +00:00
ofFloat.setInterpolator(new DecelerateInterpolator());
}
@Override // c.f.l.b.a
public Class<?> m() {
return b.class;
}
@Override // c.f.l.b.a
@SuppressLint({"NewApi"})
public void n(Matrix matrix, long j, @Nullable Runnable runnable) {
int i = c.f.d.e.a.a;
o();
2021-10-08 22:11:56 +00:00
d.j(Boolean.valueOf(j > 0));
d.B(!this.m);
2021-07-24 02:37:17 +00:00
this.m = true;
2021-11-02 06:38:17 +00:00
this.f516s.setDuration(j);
2021-07-24 02:37:17 +00:00
this.h.getValues(this.n);
matrix.getValues(this.o);
2021-11-02 06:38:17 +00:00
this.f516s.addUpdateListener(new a());
this.f516s.addListener(new C0071b(runnable));
this.f516s.start();
2021-07-24 02:37:17 +00:00
}
@Override // c.f.l.b.a
@SuppressLint({"NewApi"})
public void o() {
if (this.m) {
c.f.d.e.a.i(b.class, "stopAnimation");
2021-11-02 06:38:17 +00:00
this.f516s.cancel();
this.f516s.removeAllUpdateListeners();
this.f516s.removeAllListeners();
2021-07-24 02:37:17 +00:00
}
}
}