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

116 lines
3.7 KiB
Java
Raw Normal View History

2021-12-17 21:59:34 +00:00
package b.f.l.b;
2021-07-24 02:37:17 +00:00
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-12-17 21:59:34 +00:00
import b.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 */
2022-01-27 07:52:47 +00:00
public final ValueAnimator f646s;
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-12-17 21:59:34 +00:00
b.f.d.e.a.i(c.class, "setTransform");
2021-07-24 02:37:17 +00:00
bVar2.h.set(matrix2);
bVar2.i();
}
}
/* compiled from: AnimatedZoomableController */
2021-12-17 21:59:34 +00:00
/* renamed from: b.f.l.b.b$b reason: collision with other inner class name */
2022-02-02 08:50:56 +00:00
public class C0069b extends AnimatorListenerAdapter {
2021-07-24 02:37:17 +00:00
public final /* synthetic */ Runnable a;
2022-02-02 08:50:56 +00:00
public C0069b(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);
2021-12-17 21:59:34 +00:00
b.f.d.e.a.i(b.class, "setTransformAnimated: animation cancelled");
2021-07-24 02:37:17 +00:00
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);
2021-12-17 21:59:34 +00:00
b.f.d.e.a.i(b.class, "setTransformAnimated: animation finished");
2021-07-24 02:37:17 +00:00
Runnable runnable = this.a;
if (runnable != null) {
runnable.run();
}
b bVar = b.this;
bVar.m = false;
bVar.a.d();
}
}
@SuppressLint({"NewApi"})
2021-12-17 21:59:34 +00:00
public b(b.f.l.a.b bVar) {
2021-07-24 02:37:17 +00:00
super(bVar);
ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 1.0f);
2022-01-27 07:52:47 +00:00
this.f646s = ofFloat;
2021-07-24 02:37:17 +00:00
ofFloat.setInterpolator(new DecelerateInterpolator());
}
2021-12-17 21:59:34 +00:00
@Override // b.f.l.b.a
2021-07-24 02:37:17 +00:00
public Class<?> m() {
return b.class;
}
2021-12-17 21:59:34 +00:00
@Override // b.f.l.b.a
2021-07-24 02:37:17 +00:00
@SuppressLint({"NewApi"})
public void n(Matrix matrix, long j, @Nullable Runnable runnable) {
2021-12-17 21:59:34 +00:00
int i = b.f.d.e.a.a;
2021-07-24 02:37:17 +00:00
o();
2021-11-05 06:48:17 +00:00
d.i(Boolean.valueOf(j > 0));
2021-10-08 22:11:56 +00:00
d.B(!this.m);
2021-07-24 02:37:17 +00:00
this.m = true;
2022-01-27 07:52:47 +00:00
this.f646s.setDuration(j);
2021-07-24 02:37:17 +00:00
this.h.getValues(this.n);
matrix.getValues(this.o);
2022-01-27 07:52:47 +00:00
this.f646s.addUpdateListener(new a());
2022-02-02 08:50:56 +00:00
this.f646s.addListener(new C0069b(runnable));
2022-01-27 07:52:47 +00:00
this.f646s.start();
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.f.l.b.a
2021-07-24 02:37:17 +00:00
@SuppressLint({"NewApi"})
public void o() {
if (this.m) {
2021-12-17 21:59:34 +00:00
b.f.d.e.a.i(b.class, "stopAnimation");
2022-01-27 07:52:47 +00:00
this.f646s.cancel();
this.f646s.removeAllUpdateListeners();
this.f646s.removeAllListeners();
2021-07-24 02:37:17 +00:00
}
}
}