563 lines
16 KiB
Java
563 lines
16 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.res.ColorStateList;
|
||
|
import android.graphics.Canvas;
|
||
|
import android.graphics.ColorFilter;
|
||
|
import android.graphics.Matrix;
|
||
|
import android.graphics.Outline;
|
||
|
import android.graphics.Paint;
|
||
|
import android.graphics.Path;
|
||
|
import android.graphics.PorterDuff;
|
||
|
import android.graphics.PorterDuffColorFilter;
|
||
|
import android.graphics.PorterDuffXfermode;
|
||
|
import android.graphics.Rect;
|
||
|
import android.graphics.RectF;
|
||
|
import android.graphics.Region;
|
||
|
import android.graphics.drawable.Drawable;
|
||
|
import android.os.Looper;
|
||
|
import android.util.AttributeSet;
|
||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||
|
import java.util.BitSet;
|
||
|
import o.EgE;
|
||
|
import o.LbZ;
|
||
|
|
||
|
/* renamed from: o.bXv, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public class C4363bXv extends Drawable implements Jaq {
|
||
|
private static final Paint c;
|
||
|
public LWm B;
|
||
|
final LbZ.ZqN[] C;
|
||
|
final BitSet D;
|
||
|
public int E;
|
||
|
public final RectF F;
|
||
|
public boolean G;
|
||
|
public boolean H;
|
||
|
private final Path a;
|
||
|
private final Matrix b;
|
||
|
private final RectF d;
|
||
|
private final Paint e;
|
||
|
private final RectF f;
|
||
|
private final Region g;
|
||
|
private final EgE.HBt h;
|
||
|
private final Path i;
|
||
|
private final EgE j;
|
||
|
private FLD k;
|
||
|
private PorterDuffColorFilter l;
|
||
|
private PorterDuffColorFilter m;
|
||
|
private final Paint n;
|
||
|
|
||
|
/* renamed from: o, reason: collision with root package name */
|
||
|
private final MFB f8553o;
|
||
|
private final Region q;
|
||
|
final LbZ.ZqN[] z;
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public int getOpacity() {
|
||
|
return -3;
|
||
|
}
|
||
|
|
||
|
static {
|
||
|
Paint paint = new Paint(1);
|
||
|
c = paint;
|
||
|
paint.setColor(-1);
|
||
|
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OUT));
|
||
|
}
|
||
|
|
||
|
public C4363bXv() {
|
||
|
this(new FLD());
|
||
|
}
|
||
|
|
||
|
public C4363bXv(FLD fld) {
|
||
|
this(new LWm(fld));
|
||
|
}
|
||
|
|
||
|
public C4363bXv(LWm lWm) {
|
||
|
EgE egE;
|
||
|
this.z = new LbZ.ZqN[4];
|
||
|
this.C = new LbZ.ZqN[4];
|
||
|
this.D = new BitSet(8);
|
||
|
this.b = new Matrix();
|
||
|
this.a = new Path();
|
||
|
this.i = new Path();
|
||
|
this.F = new RectF();
|
||
|
this.d = new RectF();
|
||
|
this.q = new Region();
|
||
|
this.g = new Region();
|
||
|
Paint paint = new Paint(1);
|
||
|
this.e = paint;
|
||
|
Paint paint2 = new Paint(1);
|
||
|
this.n = paint2;
|
||
|
this.f8553o = new MFB();
|
||
|
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
|
||
|
egE = new EgE();
|
||
|
} else {
|
||
|
egE = EgE.Sts.a;
|
||
|
}
|
||
|
this.j = egE;
|
||
|
this.f = new RectF();
|
||
|
this.G = true;
|
||
|
this.B = lWm;
|
||
|
paint2.setStyle(Paint.Style.STROKE);
|
||
|
paint.setStyle(Paint.Style.FILL);
|
||
|
i();
|
||
|
a(getState());
|
||
|
this.h = new EgE.HBt(this) { // from class: o.bXv.4
|
||
|
private C4363bXv c;
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
}
|
||
|
|
||
|
@Override // o.EgE.HBt
|
||
|
public final void Lq_(LbZ lbZ, Matrix matrix, int i) {
|
||
|
this.c.D.set(i, lbZ.a);
|
||
|
this.c.z[i] = lbZ.Lt_(matrix);
|
||
|
}
|
||
|
|
||
|
@Override // o.EgE.HBt
|
||
|
public final void Lr_(LbZ lbZ, Matrix matrix, int i) {
|
||
|
this.c.D.set(i + 4, lbZ.a);
|
||
|
this.c.C[i] = lbZ.Lt_(matrix);
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public Drawable mutate() {
|
||
|
this.B = new LWm(this.B);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@Override // o.Jaq
|
||
|
public void setShapeAppearanceModel(FLD fld) {
|
||
|
this.B.l = fld;
|
||
|
invalidateSelf();
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public void setTintMode(PorterDuff.Mode mode) {
|
||
|
if (this.B.q != mode) {
|
||
|
this.B.q = mode;
|
||
|
i();
|
||
|
super.invalidateSelf();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public void setTintList(ColorStateList colorStateList) {
|
||
|
this.B.s = colorStateList;
|
||
|
i();
|
||
|
super.invalidateSelf();
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public void setTint(int i) {
|
||
|
setTintList(ColorStateList.valueOf(i));
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public int getAlpha() {
|
||
|
return this.B.a;
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public void setAlpha(int i) {
|
||
|
if (this.B.a != i) {
|
||
|
this.B.a = i;
|
||
|
super.invalidateSelf();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public void setColorFilter(ColorFilter colorFilter) {
|
||
|
this.B.b = colorFilter;
|
||
|
super.invalidateSelf();
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public Region getTransparentRegion() {
|
||
|
this.q.set(getBounds());
|
||
|
this.F.set(getBounds());
|
||
|
La_(this.F, this.a);
|
||
|
this.g.setPath(this.a, this.q);
|
||
|
this.q.op(this.g, Region.Op.DIFFERENCE);
|
||
|
return this.q;
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public boolean getPadding(Rect rect) {
|
||
|
if (this.B.f != null) {
|
||
|
rect.set(this.B.f);
|
||
|
return true;
|
||
|
}
|
||
|
return super.getPadding(rect);
|
||
|
}
|
||
|
|
||
|
public final void d(int i) {
|
||
|
if (this.B.k != i) {
|
||
|
this.B.k = i;
|
||
|
super.invalidateSelf();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void d(Context context) {
|
||
|
this.B.c = new weT(context);
|
||
|
g();
|
||
|
}
|
||
|
|
||
|
public final void k(float f) {
|
||
|
if (this.B.i != f) {
|
||
|
this.B.i = f;
|
||
|
g();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void n(float f) {
|
||
|
if (this.B.e != f) {
|
||
|
this.B.e = f;
|
||
|
g();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public void invalidateSelf() {
|
||
|
this.H = true;
|
||
|
super.invalidateSelf();
|
||
|
}
|
||
|
|
||
|
public final void a() {
|
||
|
super.invalidateSelf();
|
||
|
}
|
||
|
|
||
|
public final void f() {
|
||
|
this.f8553o.c(-12303292);
|
||
|
this.B.w = false;
|
||
|
super.invalidateSelf();
|
||
|
}
|
||
|
|
||
|
private boolean d() {
|
||
|
return (this.B.g == Paint.Style.FILL_AND_STROKE || this.B.g == Paint.Style.STROKE) && this.n.getStrokeWidth() > BitmapDescriptorFactory.HUE_RED;
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
protected void onBoundsChange(Rect rect) {
|
||
|
this.H = true;
|
||
|
super.onBoundsChange(rect);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:19:0x00e4, code lost:
|
||
|
|
||
|
if (android.os.Build.VERSION.SDK_INT < 29) goto L21;
|
||
|
*/
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public void draw(android.graphics.Canvas r11) {
|
||
|
/*
|
||
|
Method dump skipped, instructions count: 482
|
||
|
To view this dump add '--comments-level debug' option
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.C4363bXv.draw(android.graphics.Canvas):void");
|
||
|
}
|
||
|
|
||
|
public final void Lg_(Canvas canvas, Paint paint, Path path, RectF rectF) {
|
||
|
Ld_(canvas, paint, path, this.B.l, rectF);
|
||
|
}
|
||
|
|
||
|
private void Ld_(Canvas canvas, Paint paint, Path path, FLD fld, RectF rectF) {
|
||
|
if (fld.Ln_(rectF)) {
|
||
|
float Lk_ = fld.k.Lk_(rectF) * this.B.h;
|
||
|
canvas.drawRoundRect(rectF, Lk_, Lk_, paint);
|
||
|
} else {
|
||
|
canvas.drawPath(path, paint);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void Ma_(Canvas canvas) {
|
||
|
Ld_(canvas, this.n, this.i, this.k, Le_());
|
||
|
}
|
||
|
|
||
|
private void Lc_(Canvas canvas) {
|
||
|
this.D.cardinality();
|
||
|
if (this.B.f8554o != 0) {
|
||
|
canvas.drawPath(this.a, this.f8553o.f);
|
||
|
}
|
||
|
for (int i = 0; i < 4; i++) {
|
||
|
this.z[i].LA_(LbZ.ZqN.a, this.f8553o, this.B.m, canvas);
|
||
|
this.C[i].LA_(LbZ.ZqN.a, this.f8553o, this.B.m, canvas);
|
||
|
}
|
||
|
if (this.G) {
|
||
|
int sin = (int) (this.B.f8554o * Math.sin(Math.toRadians(this.B.n)));
|
||
|
int cos = (int) (this.B.f8554o * Math.cos(Math.toRadians(this.B.n)));
|
||
|
canvas.translate(-sin, -cos);
|
||
|
canvas.drawPath(this.a, c);
|
||
|
canvas.translate(sin, cos);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public final void Lf_(RectF rectF, Path path) {
|
||
|
this.j.Lp_(this.B.l, this.B.h, rectF, this.h, path);
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public void getOutline(Outline outline) {
|
||
|
if (this.B.k == 2) {
|
||
|
return;
|
||
|
}
|
||
|
FLD fld = this.B.l;
|
||
|
this.F.set(getBounds());
|
||
|
if (fld.Ln_(this.F)) {
|
||
|
kdE kde = this.B.l.n;
|
||
|
this.F.set(getBounds());
|
||
|
outline.setRoundRect(getBounds(), kde.Lk_(this.F) * this.B.h);
|
||
|
return;
|
||
|
}
|
||
|
this.F.set(getBounds());
|
||
|
La_(this.F, this.a);
|
||
|
NiE.IX_(outline, this.a);
|
||
|
}
|
||
|
|
||
|
private void La_(RectF rectF, Path path) {
|
||
|
Lf_(rectF, path);
|
||
|
if (this.B.j != 1.0f) {
|
||
|
this.b.reset();
|
||
|
this.b.setScale(this.B.j, this.B.j, rectF.width() / 2.0f, rectF.height() / 2.0f);
|
||
|
path.transform(this.b);
|
||
|
}
|
||
|
path.computeBounds(this.f, true);
|
||
|
}
|
||
|
|
||
|
private boolean i() {
|
||
|
PorterDuffColorFilter porterDuffColorFilter = this.l;
|
||
|
PorterDuffColorFilter porterDuffColorFilter2 = this.m;
|
||
|
this.l = Lb_(this.B.s, this.B.q, this.e, true);
|
||
|
this.m = Lb_(this.B.t, this.B.q, this.n, false);
|
||
|
if (this.B.w) {
|
||
|
this.f8553o.c(this.B.s.getColorForState(getState(), 0));
|
||
|
}
|
||
|
return (ZEY.b(porterDuffColorFilter, this.l) && ZEY.b(porterDuffColorFilter2, this.m)) ? false : true;
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public boolean isStateful() {
|
||
|
return super.isStateful() || (this.B.s != null && this.B.s.isStateful()) || ((this.B.t != null && this.B.t.isStateful()) || ((this.B.r != null && this.B.r.isStateful()) || (this.B.d != null && this.B.d.isStateful())));
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public boolean onStateChange(int[] iArr) {
|
||
|
boolean z = a(iArr) || i();
|
||
|
if (z) {
|
||
|
invalidateSelf();
|
||
|
}
|
||
|
return z;
|
||
|
}
|
||
|
|
||
|
private boolean a(int[] iArr) {
|
||
|
boolean z;
|
||
|
int color;
|
||
|
int colorForState;
|
||
|
int color2;
|
||
|
int colorForState2;
|
||
|
if (this.B.d == null || color2 == (colorForState2 = this.B.d.getColorForState(iArr, (color2 = this.e.getColor())))) {
|
||
|
z = false;
|
||
|
} else {
|
||
|
this.e.setColor(colorForState2);
|
||
|
z = true;
|
||
|
}
|
||
|
if (this.B.r == null || color == (colorForState = this.B.r.getColorForState(iArr, (color = this.n.getColor())))) {
|
||
|
return z;
|
||
|
}
|
||
|
this.n.setColor(colorForState);
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
private RectF Le_() {
|
||
|
RectF rectF = this.d;
|
||
|
this.F.set(getBounds());
|
||
|
rectF.set(this.F);
|
||
|
float strokeWidth = d() ? this.n.getStrokeWidth() / 2.0f : BitmapDescriptorFactory.HUE_RED;
|
||
|
this.d.inset(strokeWidth, strokeWidth);
|
||
|
return this.d;
|
||
|
}
|
||
|
|
||
|
public final float h() {
|
||
|
kdE kde = this.B.l.n;
|
||
|
this.F.set(getBounds());
|
||
|
return kde.Lk_(this.F);
|
||
|
}
|
||
|
|
||
|
public final float j() {
|
||
|
kdE kde = this.B.l.k;
|
||
|
this.F.set(getBounds());
|
||
|
return kde.Lk_(this.F);
|
||
|
}
|
||
|
|
||
|
public final float b() {
|
||
|
kdE kde = this.B.l.b;
|
||
|
this.F.set(getBounds());
|
||
|
return kde.Lk_(this.F);
|
||
|
}
|
||
|
|
||
|
public final float e() {
|
||
|
kdE kde = this.B.l.j;
|
||
|
this.F.set(getBounds());
|
||
|
return kde.Lk_(this.F);
|
||
|
}
|
||
|
|
||
|
/* renamed from: o.bXv$LWm */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class LWm extends Drawable.ConstantState {
|
||
|
int a;
|
||
|
ColorFilter b;
|
||
|
public weT c;
|
||
|
public ColorStateList d;
|
||
|
public float e;
|
||
|
public Rect f;
|
||
|
public Paint.Style g;
|
||
|
public float h;
|
||
|
float i;
|
||
|
float j;
|
||
|
int k;
|
||
|
public FLD l;
|
||
|
public int m;
|
||
|
public int n;
|
||
|
|
||
|
/* renamed from: o, reason: collision with root package name */
|
||
|
public int f8554o;
|
||
|
public float p;
|
||
|
PorterDuff.Mode q;
|
||
|
public ColorStateList r;
|
||
|
ColorStateList s;
|
||
|
ColorStateList t;
|
||
|
boolean w;
|
||
|
float y;
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable.ConstantState
|
||
|
public int getChangingConfigurations() {
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
public LWm(FLD fld) {
|
||
|
this.d = null;
|
||
|
this.r = null;
|
||
|
this.t = null;
|
||
|
this.s = null;
|
||
|
this.q = PorterDuff.Mode.SRC_IN;
|
||
|
this.f = null;
|
||
|
this.j = 1.0f;
|
||
|
this.h = 1.0f;
|
||
|
this.a = 255;
|
||
|
this.i = BitmapDescriptorFactory.HUE_RED;
|
||
|
this.e = BitmapDescriptorFactory.HUE_RED;
|
||
|
this.y = BitmapDescriptorFactory.HUE_RED;
|
||
|
this.k = 0;
|
||
|
this.m = 0;
|
||
|
this.f8554o = 0;
|
||
|
this.n = 0;
|
||
|
this.w = false;
|
||
|
this.g = Paint.Style.FILL_AND_STROKE;
|
||
|
this.l = fld;
|
||
|
this.c = null;
|
||
|
}
|
||
|
|
||
|
public LWm(LWm lWm) {
|
||
|
this.d = null;
|
||
|
this.r = null;
|
||
|
this.t = null;
|
||
|
this.s = null;
|
||
|
this.q = PorterDuff.Mode.SRC_IN;
|
||
|
this.f = null;
|
||
|
this.j = 1.0f;
|
||
|
this.h = 1.0f;
|
||
|
this.a = 255;
|
||
|
this.i = BitmapDescriptorFactory.HUE_RED;
|
||
|
this.e = BitmapDescriptorFactory.HUE_RED;
|
||
|
this.y = BitmapDescriptorFactory.HUE_RED;
|
||
|
this.k = 0;
|
||
|
this.m = 0;
|
||
|
this.f8554o = 0;
|
||
|
this.n = 0;
|
||
|
this.w = false;
|
||
|
this.g = Paint.Style.FILL_AND_STROKE;
|
||
|
this.l = lWm.l;
|
||
|
this.c = lWm.c;
|
||
|
this.p = lWm.p;
|
||
|
this.b = lWm.b;
|
||
|
this.d = lWm.d;
|
||
|
this.r = lWm.r;
|
||
|
this.q = lWm.q;
|
||
|
this.s = lWm.s;
|
||
|
this.a = lWm.a;
|
||
|
this.j = lWm.j;
|
||
|
this.f8554o = lWm.f8554o;
|
||
|
this.k = lWm.k;
|
||
|
this.w = lWm.w;
|
||
|
this.h = lWm.h;
|
||
|
this.i = lWm.i;
|
||
|
this.e = lWm.e;
|
||
|
this.y = lWm.y;
|
||
|
this.m = lWm.m;
|
||
|
this.n = lWm.n;
|
||
|
this.t = lWm.t;
|
||
|
this.g = lWm.g;
|
||
|
if (lWm.f != null) {
|
||
|
this.f = new Rect(lWm.f);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable.ConstantState
|
||
|
public Drawable newDrawable() {
|
||
|
C4363bXv c4363bXv = new C4363bXv(this);
|
||
|
c4363bXv.H = true;
|
||
|
return c4363bXv;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public C4363bXv(Context context, AttributeSet attributeSet, int i, int i2) {
|
||
|
this(new FLD(FLD.Ll_(context, attributeSet, i, i2, new C17525xWe(BitmapDescriptorFactory.HUE_RED)), (byte) 0));
|
||
|
}
|
||
|
|
||
|
private PorterDuffColorFilter Lb_(ColorStateList colorStateList, PorterDuff.Mode mode, Paint paint, boolean z) {
|
||
|
if (colorStateList != null && mode != null) {
|
||
|
int colorForState = colorStateList.getColorForState(getState(), 0);
|
||
|
if (z) {
|
||
|
colorForState = e(colorForState);
|
||
|
}
|
||
|
this.E = colorForState;
|
||
|
return new PorterDuffColorFilter(colorForState, mode);
|
||
|
}
|
||
|
if (!z) {
|
||
|
return null;
|
||
|
}
|
||
|
int color = paint.getColor();
|
||
|
int e = e(color);
|
||
|
this.E = e;
|
||
|
if (e != color) {
|
||
|
return new PorterDuffColorFilter(e, PorterDuff.Mode.SRC_IN);
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
private void g() {
|
||
|
float f = this.B.e + this.B.y;
|
||
|
this.B.m = (int) Math.ceil(0.75f * f);
|
||
|
this.B.f8554o = (int) Math.ceil(f * 0.25f);
|
||
|
i();
|
||
|
super.invalidateSelf();
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public final int e(int i) {
|
||
|
return this.B.c != null ? this.B.c.c(i, this.B.e + this.B.y + this.B.i) : i;
|
||
|
}
|
||
|
|
||
|
@Override // android.graphics.drawable.Drawable
|
||
|
public Drawable.ConstantState getConstantState() {
|
||
|
return this.B;
|
||
|
}
|
||
|
}
|