正在查看: Spermatid Pro v6.4.3 应用的 r.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Spermatid Pro v6.4.3 应用的 r.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.bytedance.adsdk.lottie;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.ImageView;
import androidx.core.view.MotionEventCompat;
import com.bytedance.component.sdk.annotation.FloatRange;
import com.bytedance.component.sdk.annotation.IntRange;
import com.bytedance.component.sdk.annotation.MainThread;
import com.bytedance.component.sdk.annotation.RestrictTo;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import k3.f;
import k3.g;
import k3.j;
import k3.l;
import l3.b;
import w3.c;
import w3.i;
public class r extends Drawable implements Animatable, Drawable.Callback {
public Bitmap A;
public Canvas B;
public Rect C;
public RectF D;
public Paint E;
public Rect F;
public Rect G;
public RectF H;
public RectF I;
public Matrix J;
public Matrix K;
public j L;
public LottieAnimationView M;
public boolean N;
public a a;
public final c b;
public boolean c;
public boolean d;
public bh e;
public final ArrayList<n> f1415f;
public final ValueAnimator.AnimatorUpdateListener g;
public l3.a f1416h;
public String f1417i;
public f j;
public b k;
public Map<String, Typeface> l;
public String f1418m;
public g f1419n;
public b o;
public boolean p;
public boolean f1420q;
public boolean f1421r;
public com.bytedance.adsdk.lottie.model.layer.b s;
public int t;
public boolean u;
public boolean v;
public boolean f1422w;
public uw x;
public boolean f1423y;
public final Matrix f1424z;
public r(LottieAnimationView lottieAnimationView) {
c cVar = new c();
this.b = cVar;
this.c = true;
this.d = false;
this.e = bh.do;
this.f1415f = new ArrayList<>();
e eVar = new e(this);
this.g = eVar;
this.f1420q = false;
this.f1421r = true;
this.t = MotionEventCompat.ACTION_MASK;
this.x = uw.do;
this.f1423y = false;
this.f1424z = new Matrix();
this.N = false;
this.M = lottieAnimationView;
cVar.addUpdateListener(eVar);
}
private Context getContext() {
Drawable.Callback callback = getCallback();
if (callback != null && (callback instanceof View)) {
return ((View) callback).getContext();
}
return null;
}
public final void A(Rect rect, RectF rectF) {
rectF.set(rect.left, rect.top, rect.right, rect.bottom);
}
public String A0() {
return this.f1417i;
}
public final void B(RectF rectF, float f2, float f5) {
rectF.set(rectF.left * f2, rectF.top * f5, rectF.right * f2, rectF.bottom * f5);
}
public void B0(int i3) {
this.b.setRepeatCount(i3);
}
public final void C(RectF rectF, Rect rect) {
rect.set((int) Math.floor(rectF.left), (int) Math.floor(rectF.top), (int) Math.ceil(rectF.right), (int) Math.ceil(rectF.bottom));
}
public void C0(boolean z4) {
this.f1422w = z4;
}
public void D(b bVar) {
this.o = bVar;
}
public final void D0() {
a aVar = this.a;
if (aVar == null) {
return;
}
this.f1423y = this.x.do(Build.VERSION.SDK_INT, aVar.k(), aVar.a());
}
public void E(uw uwVar) {
this.x = uwVar;
D0();
}
public boolean E0() {
if (isVisible()) {
return this.b.isRunning();
}
bh bhVar = this.e;
return bhVar == bh.bh || bhVar == bh.p;
}
public void F(Boolean bool) {
this.c = bool.booleanValue();
}
public l F0() {
a aVar = this.a;
if (aVar != null) {
return aVar.p();
}
return null;
}
public void G(String str) {
this.f1417i = str;
}
@MainThread
public void G0() {
this.f1415f.clear();
this.b.h();
if (isVisible()) {
return;
}
this.e = bh.do;
}
public void H(Map<String, Typeface> map) {
if (map == this.l) {
return;
}
this.l = map;
invalidateSelf();
}
public float H0() {
return this.b.F();
}
public void I(f fVar) {
this.j = fVar;
l3.a aVar = this.f1416h;
if (aVar != null) {
aVar.d(fVar);
}
}
public void J(g gVar) {
this.f1419n = gVar;
b bVar = this.k;
if (bVar != null) {
bVar.e(gVar);
}
}
public void K(j jVar) {
this.L = jVar;
}
public void L(boolean z4) {
if (z4 != this.f1421r) {
this.f1421r = z4;
com.bytedance.adsdk.lottie.model.layer.b bVar = this.s;
if (bVar != null) {
bVar.k(z4);
}
invalidateSelf();
}
}
public void M(boolean z4, Context context) {
if (this.p == z4) {
return;
}
if (Build.VERSION.SDK_INT < 19) {
i.a("Merge paths are not supported pre-Kit Kat.");
return;
}
this.p = z4;
if (this.a != null) {
x(context);
}
}
public boolean N(a aVar, Context context) {
if (this.a == aVar) {
return false;
}
this.N = true;
x0();
this.a = aVar;
x(context);
this.b.l(aVar);
b0(this.b.getAnimatedFraction());
Iterator it = new ArrayList(this.f1415f).iterator();
while (it.hasNext()) {
n nVar = (n) it.next();
if (nVar != null) {
nVar.a(aVar);
}
it.remove();
}
this.f1415f.clear();
aVar.c(this.u);
D0();
Drawable.Callback callback = getCallback();
if (callback instanceof ImageView) {
ImageView imageView = (ImageView) callback;
imageView.setImageDrawable(null);
imageView.setImageDrawable(this);
}
return true;
}
public final boolean O() {
return this.c || this.d;
}
public final b P() {
if (getCallback() == null) {
return null;
}
if (this.k == null) {
b bVar = new b(getCallback(), this.f1419n);
this.k = bVar;
String str = this.f1418m;
if (str != null) {
bVar.d(str);
}
}
return this.k;
}
@MainThread
public void Q() {
if (this.s == null) {
this.f1415f.add(new k(this));
return;
}
D0();
if (O() || Z() == 0) {
if (isVisible()) {
this.b.m();
this.e = bh.do;
} else {
this.e = bh.p;
}
}
if (O()) {
return;
}
i0((int) (p0() < 0.0f ? H0() : Y()));
this.b.h();
if (isVisible()) {
return;
}
this.e = bh.do;
}
public final l3.a R() {
l3.a aVar = this.f1416h;
if (aVar != null && !aVar.e(getContext())) {
this.f1416h = null;
}
if (this.f1416h == null) {
this.f1416h = new l3.a(getCallback(), this.f1417i, this.j, this.a.s());
}
return this.f1416h;
}
public e S(String str) {
a aVar = this.a;
if (aVar == null) {
return null;
}
return aVar.s().get(str);
}
public void T(boolean z4) {
}
public boolean U() {
return this.f1420q;
}
@FloatRange(from = 0.0d, to = 1.0d)
public float V() {
return this.b.n();
}
public final boolean W() {
Drawable.Callback callback = getCallback();
if (!(callback instanceof View)) {
return false;
}
ViewParent parent = ((View) callback).getParent();
return Build.VERSION.SDK_INT >= 18 && (parent instanceof ViewGroup) && !((ViewGroup) parent).getClipChildren();
}
public a X() {
return this.a;
}
public float Y() {
return this.b.q();
}
public int Z() {
return this.b.getRepeatCount();
}
public final void a() {
if (this.B != null) {
return;
}
this.B = new Canvas();
this.I = new RectF();
this.J = new Matrix();
this.K = new Matrix();
this.C = new Rect();
this.D = new RectF();
this.E = new m3.a();
this.F = new Rect();
this.G = new Rect();
this.H = new RectF();
}
public boolean a0() {
c cVar = this.b;
if (cVar == null) {
return false;
}
return cVar.isRunning();
}
public b b() {
return this.o;
}
public void b0(@FloatRange(from = 0.0d, to = 1.0d) float f2) {
if (this.a == null) {
this.f1415f.add(new i(this, f2));
return;
}
d.d("Drawable#setProgress");
this.b.i(this.a.e(f2));
d.a("Drawable#setProgress");
}
public LottieAnimationView c() {
return this.M;
}
public void c0(int i3) {
this.b.setRepeatMode(i3);
}
public void d0(String str) {
a aVar = this.a;
if (aVar == null) {
this.f1415f.add(new f(this, str));
return;
}
q3.a q2 = aVar.q(str);
if (q2 != null) {
int i3 = (int) q2.b;
u(i3, ((int) q2.c) + i3);
} else {
throw new IllegalArgumentException("Cannot find marker with name " + str + ".");
}
}
@Override
public void draw(Canvas canvas) {
d.d("Drawable#draw");
try {
if (this.f1423y) {
z(canvas, this.s);
} else {
y(canvas);
}
} catch (Throwable th) {
i.b("Lottie crashed in draw!", th);
}
this.N = false;
d.a("Drawable#draw");
}
public void e(@FloatRange(from = 0.0d, to = 1.0d) float f2) {
a aVar = this.a;
if (aVar == null) {
this.f1415f.add(new b(this, f2));
} else {
this.b.g(w3.f.c(aVar.m(), this.a.t(), f2));
}
}
public void e0(boolean z4) {
if (this.v == z4) {
return;
}
this.v = z4;
com.bytedance.adsdk.lottie.model.layer.b bVar = this.s;
if (bVar != null) {
bVar.y(z4);
}
}
public void f(int i3) {
if (this.a == null) {
this.f1415f.add(new a(this, i3));
} else {
this.b.g(i3 + 0.99f);
}
}
public boolean f0() {
return this.f1421r;
}
public final void g(int i3, int i4) {
Bitmap bitmap = this.A;
if (bitmap == null || bitmap.getWidth() < i3 || this.A.getHeight() < i4) {
Bitmap createBitmap = Bitmap.createBitmap(i3, i4, Bitmap.Config.ARGB_8888);
this.A = createBitmap;
this.B.setBitmap(createBitmap);
this.N = true;
return;
}
if (this.A.getWidth() > i3 || this.A.getHeight() > i4) {
Bitmap createBitmap2 = Bitmap.createBitmap(this.A, 0, 0, i3, i4);
this.A = createBitmap2;
this.B.setBitmap(createBitmap2);
this.N = true;
}
}
public com.bytedance.adsdk.lottie.model.layer.b g0() {
return this.s;
}
@Override
public int getAlpha() {
return this.t;
}
@Override
public int getIntrinsicHeight() {
a aVar = this.a;
if (aVar == null) {
return -1;
}
return aVar.o().height();
}
@Override
public int getIntrinsicWidth() {
a aVar = this.a;
if (aVar == null) {
return -1;
}
return aVar.o().width();
}
@Override
public int getOpacity() {
return -3;
}
public void h(Animator.AnimatorListener animatorListener) {
this.b.removeListener(animatorListener);
}
public void h0(float f2) {
this.b.s(f2);
}
public void i(ValueAnimator.AnimatorUpdateListener animatorUpdateListener) {
this.b.removeUpdateListener(animatorUpdateListener);
}
public void i0(int i3) {
if (this.a == null) {
this.f1415f.add(new h(this, i3));
} else {
this.b.i(i3);
}
}
@Override
public void invalidateDrawable(Drawable drawable) {
Drawable.Callback callback = getCallback();
if (callback == null) {
return;
}
callback.invalidateDrawable(this);
}
@Override
public void invalidateSelf() {
if (this.N) {
return;
}
this.N = true;
Drawable.Callback callback = getCallback();
if (callback != null) {
callback.invalidateDrawable(this);
}
}
@Override
public boolean isRunning() {
return a0();
}
public void j(String str) {
a aVar = this.a;
if (aVar == null) {
this.f1415f.add(new c(this, str));
return;
}
q3.a q2 = aVar.q(str);
if (q2 != null) {
t((int) q2.b);
return;
}
throw new IllegalArgumentException("Cannot find marker with name " + str + ".");
}
public void j0(String str) {
a aVar = this.a;
if (aVar == null) {
this.f1415f.add(new d(this, str));
return;
}
q3.a q2 = aVar.q(str);
if (q2 != null) {
f((int) (q2.b + q2.c));
return;
}
throw new IllegalArgumentException("Cannot find marker with name " + str + ".");
}
public void k(boolean z4) {
this.f1420q = z4;
}
public void k0(boolean z4) {
this.u = z4;
a aVar = this.a;
if (aVar != null) {
aVar.c(z4);
}
}
public boolean l() {
return this.l == null && this.o == null && this.a.A().size() > 0;
}
public int l0() {
return (int) this.b.x();
}
@MainThread
public void m() {
if (this.s == null) {
this.f1415f.add(new j(this));
return;
}
D0();
if (O() || Z() == 0) {
if (isVisible()) {
this.b.B();
this.e = bh.do;
} else {
this.e = bh.bh;
}
}
if (O()) {
return;
}
i0((int) (p0() < 0.0f ? H0() : Y()));
this.b.h();
if (isVisible()) {
return;
}
this.e = bh.do;
}
public void m0() {
this.f1415f.clear();
this.b.E();
if (isVisible()) {
return;
}
this.e = bh.do;
}
public void n() {
this.f1415f.clear();
this.b.cancel();
if (isVisible()) {
return;
}
this.e = bh.do;
}
public void n0(boolean z4) {
this.b.t(z4);
}
public Bitmap o(String str, Bitmap bitmap) {
l3.a R = R();
if (R == null) {
i.a("Cannot update bitmap. Most likely the drawable is not added to a View which prevents Lottie from getting a Context.");
return null;
}
Bitmap c = R.c(str, bitmap);
invalidateSelf();
return c;
}
public boolean o0() {
return this.f1423y;
}
@RestrictTo({RestrictTo.Scope.LIBRARY})
public Typeface p(com.bytedance.adsdk.lottie.model.c cVar) {
Map<String, Typeface> map = this.l;
if (map != null) {
String b = cVar.b();
if (map.containsKey(b)) {
return map.get(b);
}
String a = cVar.a();
if (map.containsKey(a)) {
return map.get(a);
}
String str = cVar.b() + "-" + cVar.e();
if (map.containsKey(str)) {
return map.get(str);
}
}
b P = P();
if (P != null) {
return P.c(cVar);
}
return null;
}
public float p0() {
return this.b.y();
}
public uw q0() {
return this.f1423y ? uw.p : uw.bh;
}
public j r() {
return this.L;
}
public void r0(String str) {
this.f1418m = str;
b P = P();
if (P != null) {
P.d(str);
}
}
public void s(float f2) {
a aVar = this.a;
if (aVar == null) {
this.f1415f.add(new m(this, f2));
} else {
t((int) w3.f.c(aVar.m(), this.a.t(), f2));
}
}
public void s0(boolean z4) {
this.d = z4;
}
@Override
public void scheduleDrawable(Drawable drawable, Runnable runnable, long j) {
Drawable.Callback callback = getCallback();
if (callback == null) {
return;
}
callback.scheduleDrawable(this, runnable, j);
}
@Override
public void setAlpha(@IntRange(from = 0, to = 255) int i3) {
this.t = i3;
invalidateSelf();
}
@Override
public void setColorFilter(ColorFilter colorFilter) {
i.a("Use addColorFilter instead.");
}
@Override
public boolean setVisible(boolean z4, boolean z5) {
boolean z6 = !isVisible();
boolean visible = super.setVisible(z4, z5);
if (z4) {
bh bhVar = this.e;
if (bhVar == bh.bh) {
m();
} else if (bhVar == bh.p) {
Q();
}
} else if (this.b.isRunning()) {
m0();
this.e = bh.p;
} else if (!z6) {
this.e = bh.do;
}
return visible;
}
@Override
@MainThread
public void start() {
Drawable.Callback callback = getCallback();
if ((callback instanceof View) && ((View) callback).isInEditMode()) {
return;
}
m();
}
@Override
@MainThread
public void stop() {
G0();
}
public void t(int i3) {
if (this.a == null) {
this.f1415f.add(new l(this, i3));
} else {
this.b.k(i3);
}
}
public RectF t0() {
return this.I;
}
public void u(int i3, int i4) {
if (this.a == null) {
this.f1415f.add(new g(this, i3, i4));
} else {
this.b.j(i3, i4 + 0.99f);
}
}
public boolean u0() {
return this.f1422w;
}
@Override
public void unscheduleDrawable(Drawable drawable, Runnable runnable) {
Drawable.Callback callback = getCallback();
if (callback == null) {
return;
}
callback.unscheduleDrawable(this, runnable);
}
public void v(Animator.AnimatorListener animatorListener) {
this.b.addListener(animatorListener);
}
public void v0() {
this.b.removeAllListeners();
}
public void w(ValueAnimator.AnimatorUpdateListener animatorUpdateListener) {
this.b.addUpdateListener(animatorUpdateListener);
}
@SuppressLint({"WrongConstant"})
public int w0() {
return this.b.getRepeatMode();
}
public final void x(Context context) {
a aVar = this.a;
if (aVar == null) {
return;
}
com.bytedance.adsdk.lottie.model.layer.b bVar = new com.bytedance.adsdk.lottie.model.layer.b(this, u3.r.b(aVar), aVar.l(), aVar, context);
this.s = bVar;
if (this.v) {
bVar.y(true);
}
this.s.k(this.f1421r);
}
public void x0() {
if (this.b.isRunning()) {
this.b.cancel();
if (!isVisible()) {
this.e = bh.do;
}
}
this.a = null;
this.s = null;
this.f1416h = null;
this.b.v();
invalidateSelf();
}
public final void y(Canvas canvas) {
com.bytedance.adsdk.lottie.model.layer.b bVar = this.s;
a aVar = this.a;
if (bVar == null || aVar == null) {
return;
}
this.f1424z.reset();
if (!getBounds().isEmpty()) {
this.f1424z.preScale(r2.width() / aVar.o().width(), r2.height() / aVar.o().height());
this.f1424z.preTranslate(r2.left, r2.top);
}
bVar.a(canvas, this.f1424z, this.t);
}
public void y0() {
this.b.removeAllUpdateListeners();
this.b.addUpdateListener(this.g);
}
public final void z(Canvas canvas, com.bytedance.adsdk.lottie.model.layer.b bVar) {
if (this.a == null || bVar == null) {
return;
}
a();
canvas.getMatrix(this.J);
canvas.getClipBounds(this.C);
A(this.C, this.D);
this.J.mapRect(this.D);
C(this.D, this.C);
if (this.f1421r) {
this.I.set(0.0f, 0.0f, getIntrinsicWidth(), getIntrinsicHeight());
} else {
bVar.d(this.I, null, false);
}
this.J.mapRect(this.I);
Rect bounds = getBounds();
float width = bounds.width() / getIntrinsicWidth();
float height = bounds.height() / getIntrinsicHeight();
B(this.I, width, height);
if (!W()) {
RectF rectF = this.I;
Rect rect = this.C;
rectF.intersect(rect.left, rect.top, rect.right, rect.bottom);
}
int ceil = (int) Math.ceil(this.I.width());
int ceil2 = (int) Math.ceil(this.I.height());
if (ceil == 0 || ceil2 == 0) {
return;
}
g(ceil, ceil2);
if (this.N) {
this.f1424z.set(this.J);
this.f1424z.preScale(width, height);
Matrix matrix = this.f1424z;
RectF rectF2 = this.I;
matrix.postTranslate(-rectF2.left, -rectF2.top);
this.A.eraseColor(0);
bVar.a(this.B, this.f1424z, this.t);
this.J.invert(this.K);
this.K.mapRect(this.H, this.I);
C(this.H, this.G);
}
this.F.set(0, 0, ceil, ceil2);
canvas.drawBitmap(this.A, this.F, this.G, this.E);
}
public Bitmap z0(String str) {
l3.a R = R();
if (R != null) {
return R.b(str);
}
return null;
}
}