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;
|
|
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
|
|
import java.util.Objects;
|
|
|
|
/* compiled from: AnimatedZoomableController */
|
|
|
|
public class b extends a {
|
|
|
|
|
|
|
|
/* renamed from: s reason: collision with root package name */
|
2021-10-05 06:20:57 +00:00
|
|
|
public final ValueAnimator f517s;
|
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;
|
|
|
|
Matrix matrix = bVar.r;
|
|
|
|
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;
|
|
|
|
Matrix matrix2 = bVar2.r;
|
|
|
|
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-09-07 06:52:02 +00:00
|
|
|
public class C0070b extends AnimatorListenerAdapter {
|
2021-07-24 02:37:17 +00:00
|
|
|
public final /* synthetic */ Runnable a;
|
|
|
|
|
2021-09-07 06:52:02 +00:00
|
|
|
public C0070b(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-10-05 06:20:57 +00:00
|
|
|
this.f517s = 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();
|
|
|
|
AnimatableValueParser.j(Boolean.valueOf(j > 0));
|
|
|
|
AnimatableValueParser.B(!this.m);
|
|
|
|
this.m = true;
|
2021-10-05 06:20:57 +00:00
|
|
|
this.f517s.setDuration(j);
|
2021-07-24 02:37:17 +00:00
|
|
|
this.h.getValues(this.n);
|
|
|
|
matrix.getValues(this.o);
|
2021-10-05 06:20:57 +00:00
|
|
|
this.f517s.addUpdateListener(new a());
|
|
|
|
this.f517s.addListener(new C0070b(runnable));
|
|
|
|
this.f517s.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-10-05 06:20:57 +00:00
|
|
|
this.f517s.cancel();
|
|
|
|
this.f517s.removeAllUpdateListeners();
|
|
|
|
this.f517s.removeAllListeners();
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|