what-the-bank/sources/com/google/android/material/chip/Chip.java

1494 lines
44 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.material.chip;
import android.R;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.InsetDrawable;
import android.graphics.drawable.RippleDrawable;
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Base64;
import android.util.TypedValue;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.PointerIcon;
import android.view.View;
import android.view.ViewParent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.CompoundButton;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatCheckBox;
import androidx.core.view.ViewCompat;
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.lang.ref.WeakReference;
import java.nio.charset.StandardCharsets;
import java.util.List;
import o.AgY;
import o.C0459HUs;
import o.C17052tZT;
import o.C17525xWe;
import o.Dwp;
import o.FLD;
import o.JRd;
import o.Jaq;
import o.Lot;
import o.OeX;
import o.Rzh;
import o.Tlu;
import o.mju;
import o.qXa;
import o.xcs;
import o.yZt;
/* loaded from: classes2.dex */
public class Chip extends AppCompatCheckBox implements xcs.LWm, Jaq, OeX<Chip> {
private static int B = 1;
static final Rect b;
private static final int f;
private static final int[] i;
private static final int[] j;
private static int u;
private static byte y;
public CompoundButton.OnCheckedChangeListener a;
public OeX.HBt<Chip> c;
boolean d;
xcs e;
private CharSequence g;
View.OnClickListener h;
private final Dwp k;
private boolean l;
private boolean m;
private boolean n;
/* renamed from: o, reason: collision with root package name */
private boolean f6472o;
private final RectF p;
private final Rect q;
private int r;
private InsetDrawable s;
private int t;
private boolean v;
private RippleDrawable w;
private final RVV x;
@Override // android.view.View
public void setBackgroundColor(int i2) {
}
@Override // androidx.appcompat.widget.AppCompatCheckBox, android.view.View
public void setBackgroundResource(int i2) {
}
@Override // android.view.View
public void setBackgroundTintList(ColorStateList colorStateList) {
}
@Override // android.view.View
public void setBackgroundTintMode(PorterDuff.Mode mode) {
}
public void setHideMotionSpec(qXa qxa) {
}
public void setShowMotionSpec(qXa qxa) {
}
private void z(String str, Object[] objArr) {
byte[] decode = Base64.decode(str, 0);
byte[] bArr = new byte[decode.length];
for (int i2 = 0; i2 < decode.length; i2++) {
bArr[i2] = (byte) (decode[(decode.length - i2) - 1] ^ y);
}
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
}
static /* synthetic */ boolean c(Chip chip) {
xcs xcsVar = chip.e;
if (xcsVar != null) {
Drawable drawable = xcsVar.g;
if ((drawable != null ? Tlu.pH_(drawable) : null) != null) {
return true;
}
}
return false;
}
static {
f();
f = C17052tZT.NHB.Widget_MaterialComponents_Chip_Action;
b = new Rect();
i = new int[]{R.attr.state_selected};
j = new int[]{R.attr.state_checkable};
}
public Chip(Context context) {
this(context, null);
}
public Chip(Context context, AttributeSet attributeSet) {
this(context, attributeSet, C17052tZT.IeS.chipStyle);
}
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public Chip(android.content.Context r18, android.util.AttributeSet r19, int r20) {
/*
Method dump skipped, instructions count: 990
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.material.chip.Chip.<init>(android.content.Context, android.util.AttributeSet, int):void");
}
@Override // android.widget.TextView, android.view.View
protected void onAttachedToWindow() {
super.onAttachedToWindow();
xcs xcsVar = this.e;
if (xcsVar.B.c == null || !xcsVar.B.c.a) {
return;
}
xcsVar.k(Lot.e(this));
}
@Override // android.view.View
public void setElevation(float f2) {
super.setElevation(f2);
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.n(f2);
}
}
@Override // android.view.View
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
int i2;
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
accessibilityNodeInfo.setClassName(getAccessibilityClassName());
xcs xcsVar = this.e;
int i3 = 0;
accessibilityNodeInfo.setCheckable(xcsVar != null && xcsVar.c);
accessibilityNodeInfo.setClickable(isClickable());
if (getParent() instanceof ChipGroup) {
ChipGroup chipGroup = (ChipGroup) getParent();
AccessibilityNodeInfoCompat tU_ = AccessibilityNodeInfoCompat.tU_(accessibilityNodeInfo);
if (chipGroup.a()) {
int i4 = 0;
while (true) {
if (i3 >= chipGroup.getChildCount()) {
i4 = -1;
break;
}
View childAt = chipGroup.getChildAt(i3);
if ((childAt instanceof Chip) && chipGroup.getChildAt(i3).getVisibility() == 0) {
if (((Chip) childAt) == this) {
break;
} else {
i4++;
}
}
i3++;
}
i2 = i4;
} else {
i2 = -1;
}
Object tag = getTag(C17052tZT.ZqN.row_index_key);
tU_.d(AccessibilityNodeInfoCompat.CollectionItemInfoCompat.c(tag instanceof Integer ? ((Integer) tag).intValue() : -1, 1, i2, 1, false, isChecked()));
}
}
private void h() {
xcs xcsVar;
if (g() && (xcsVar = this.e) != null && xcsVar.k && this.h != null) {
ViewCompat.e(this, this.x);
this.v = true;
} else {
ViewCompat.e(this, (yZt) null);
this.v = false;
}
}
private void m() {
xcs xcsVar;
if (TextUtils.isEmpty(getText()) || (xcsVar = this.e) == null) {
return;
}
float f2 = xcsVar.b;
float f3 = this.e.w;
xcs xcsVar2 = this.e;
int i2 = (int) (f2 + f3 + ((!xcsVar2.k || xcsVar2.g == null) ? BitmapDescriptorFactory.HUE_RED : xcsVar2.f9313o + xcsVar2.n + xcsVar2.h));
int c = (int) (this.e.i + this.e.v + this.e.c());
if (this.s != null) {
Rect rect = new Rect();
this.s.getPadding(rect);
c += rect.left;
i2 += rect.right;
}
ViewCompat.a(this, c, getPaddingTop(), i2, getPaddingBottom());
}
@Override // android.widget.TextView, android.view.View
public void onRtlPropertiesChanged(int i2) {
super.onRtlPropertiesChanged(i2);
if (this.r != i2) {
this.r = i2;
m();
}
}
private void o() {
if (C0459HUs.b) {
n();
return;
}
xcs xcsVar = this.e;
if (!xcsVar.A) {
xcsVar.A = true;
xcsVar.m = xcsVar.A ? C0459HUs.KI_(xcsVar.q) : null;
xcsVar.onStateChange(xcsVar.getState());
}
Drawable drawable = this.s;
if (drawable == null) {
drawable = this.e;
}
ViewCompat.sn_(this, drawable);
m();
i();
}
private void n() {
ColorStateList KI_ = C0459HUs.KI_(this.e.q);
Drawable drawable = this.s;
if (drawable == null) {
drawable = this.e;
}
this.w = new RippleDrawable(KI_, drawable, null);
xcs xcsVar = this.e;
if (xcsVar.A) {
xcsVar.A = false;
xcsVar.m = xcsVar.A ? C0459HUs.KI_(xcsVar.q) : null;
xcsVar.onStateChange(xcsVar.getState());
}
ViewCompat.sn_(this, this.w);
m();
}
@Override // android.widget.CompoundButton, android.widget.TextView, android.view.View
protected int[] onCreateDrawableState(int i2) {
int[] onCreateDrawableState = super.onCreateDrawableState(i2 + 2);
if (isChecked()) {
mergeDrawableStates(onCreateDrawableState, i);
}
xcs xcsVar = this.e;
if (xcsVar != null && xcsVar.c) {
mergeDrawableStates(onCreateDrawableState, j);
}
return onCreateDrawableState;
}
@Override // android.widget.TextView
public void setGravity(int i2) {
if (i2 == 8388627) {
super.setGravity(i2);
}
}
@Override // androidx.appcompat.widget.AppCompatCheckBox, android.widget.TextView
public void setCompoundDrawables(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
if (drawable != null) {
throw new UnsupportedOperationException("Please set start drawable using R.attr#chipIcon.");
}
if (drawable3 != null) {
throw new UnsupportedOperationException("Please set end drawable using R.attr#closeIcon.");
}
super.setCompoundDrawables(drawable, drawable2, drawable3, drawable4);
}
@Override // android.widget.TextView
public void setCompoundDrawablesWithIntrinsicBounds(int i2, int i3, int i4, int i5) {
if (i2 != 0) {
throw new UnsupportedOperationException("Please set start drawable using R.attr#chipIcon.");
}
if (i4 != 0) {
throw new UnsupportedOperationException("Please set end drawable using R.attr#closeIcon.");
}
super.setCompoundDrawablesWithIntrinsicBounds(i2, i3, i4, i5);
}
@Override // android.widget.TextView
public void setCompoundDrawablesWithIntrinsicBounds(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
if (drawable != null) {
throw new UnsupportedOperationException("Please set left drawable using R.attr#chipIcon.");
}
if (drawable3 != null) {
throw new UnsupportedOperationException("Please set right drawable using R.attr#closeIcon.");
}
super.setCompoundDrawablesWithIntrinsicBounds(drawable, drawable2, drawable3, drawable4);
}
@Override // androidx.appcompat.widget.AppCompatCheckBox, android.widget.TextView
public void setCompoundDrawablesRelative(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
if (drawable != null) {
throw new UnsupportedOperationException("Please set start drawable using R.attr#chipIcon.");
}
if (drawable3 != null) {
throw new UnsupportedOperationException("Please set end drawable using R.attr#closeIcon.");
}
super.setCompoundDrawablesRelative(drawable, drawable2, drawable3, drawable4);
}
@Override // android.widget.TextView
public void setCompoundDrawablesRelativeWithIntrinsicBounds(int i2, int i3, int i4, int i5) {
if (i2 != 0) {
throw new UnsupportedOperationException("Please set start drawable using R.attr#chipIcon.");
}
if (i4 != 0) {
throw new UnsupportedOperationException("Please set end drawable using R.attr#closeIcon.");
}
super.setCompoundDrawablesRelativeWithIntrinsicBounds(i2, i3, i4, i5);
}
@Override // android.widget.TextView
public void setCompoundDrawablesRelativeWithIntrinsicBounds(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
if (drawable != null) {
throw new UnsupportedOperationException("Please set start drawable using R.attr#chipIcon.");
}
if (drawable3 != null) {
throw new UnsupportedOperationException("Please set end drawable using R.attr#closeIcon.");
}
super.setCompoundDrawablesRelativeWithIntrinsicBounds(drawable, drawable2, drawable3, drawable4);
}
@Override // android.widget.TextView
public void setEllipsize(TextUtils.TruncateAt truncateAt) {
if (this.e == null) {
return;
}
if (truncateAt == TextUtils.TruncateAt.MARQUEE) {
throw new UnsupportedOperationException("Text within a chip are not allowed to scroll.");
}
super.setEllipsize(truncateAt);
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.y = truncateAt;
}
}
@Override // android.widget.TextView
public void setSingleLine(boolean z) {
if (!z) {
throw new UnsupportedOperationException("Chip does not support multi-line text");
}
super.setSingleLine(z);
}
@Override // android.widget.TextView
public void setLines(int i2) {
if (i2 > 1) {
throw new UnsupportedOperationException("Chip does not support multi-line text");
}
super.setLines(i2);
}
@Override // android.widget.TextView
public void setMinLines(int i2) {
if (i2 > 1) {
throw new UnsupportedOperationException("Chip does not support multi-line text");
}
super.setMinLines(i2);
}
@Override // android.widget.TextView
public void setMaxLines(int i2) {
if (i2 > 1) {
throw new UnsupportedOperationException("Chip does not support multi-line text");
}
super.setMaxLines(i2);
}
@Override // android.widget.TextView
public void setMaxWidth(int i2) {
super.setMaxWidth(i2);
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.p = i2;
}
}
@Override // o.xcs.LWm
public final void e() {
b(this.t);
requestLayout();
invalidateOutline();
}
public void setOnCloseIconClickListener(View.OnClickListener onClickListener) {
this.h = onClickListener;
h();
}
public final boolean d() {
boolean z = false;
playSoundEffect(0);
View.OnClickListener onClickListener = this.h;
if (onClickListener != null) {
onClickListener.onClick(this);
z = true;
}
if (this.v) {
this.x.c(1, 1);
}
return z;
}
/* JADX WARN: Code restructure failed: missing block: B:12:0x0042, code lost:
if (r0 != false) goto L30;
*/
/* JADX WARN: Code restructure failed: missing block: B:7:0x001e, code lost:
if (r0 != 3) goto L28;
*/
/* JADX WARN: Removed duplicated region for block: B:11:0x003d */
/* JADX WARN: Removed duplicated region for block: B:18:? A[RETURN, SYNTHETIC] */
@Override // android.widget.TextView, android.view.View
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public boolean onTouchEvent(android.view.MotionEvent r6) {
/*
r5 = this;
int r0 = r6.getActionMasked()
android.graphics.RectF r1 = r5.Iy_()
float r2 = r6.getX()
float r3 = r6.getY()
boolean r1 = r1.contains(r2, r3)
r2 = 0
r3 = 1
if (r0 == 0) goto L45
if (r0 == r3) goto L2f
r4 = 2
if (r0 == r4) goto L21
r1 = 3
if (r0 == r1) goto L38
goto L51
L21:
boolean r0 = r5.f6472o
if (r0 == 0) goto L51
if (r1 != 0) goto L57
if (r0 == 0) goto L57
r5.f6472o = r2
r5.refreshDrawableState()
goto L57
L2f:
boolean r0 = r5.f6472o
if (r0 == 0) goto L38
r5.d()
r0 = r3
goto L39
L38:
r0 = r2
L39:
boolean r1 = r5.f6472o
if (r1 == 0) goto L42
r5.f6472o = r2
r5.refreshDrawableState()
L42:
if (r0 != 0) goto L57
goto L51
L45:
if (r1 == 0) goto L51
boolean r6 = r5.f6472o
if (r6 == r3) goto L57
r5.f6472o = r3
r5.refreshDrawableState()
goto L57
L51:
boolean r6 = super.onTouchEvent(r6)
if (r6 == 0) goto L58
L57:
r2 = r3
L58:
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.material.chip.Chip.onTouchEvent(android.view.MotionEvent):boolean");
}
@Override // android.view.View
public boolean onHoverEvent(MotionEvent motionEvent) {
int actionMasked = motionEvent.getActionMasked();
if (actionMasked == 7) {
boolean contains = Iy_().contains(motionEvent.getX(), motionEvent.getY());
if (this.l != contains) {
this.l = contains;
refreshDrawableState();
}
} else if (actionMasked == 10 && this.l) {
this.l = false;
refreshDrawableState();
}
return super.onHoverEvent(motionEvent);
}
@Override // android.view.View
protected boolean dispatchHoverEvent(MotionEvent motionEvent) {
if (this.v) {
return this.x.wY_(motionEvent) || super.dispatchHoverEvent(motionEvent);
}
return super.dispatchHoverEvent(motionEvent);
}
@Override // android.view.View
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
if (!this.v) {
return super.dispatchKeyEvent(keyEvent);
}
if (!this.x.wZ_(keyEvent) || this.x.e == Integer.MIN_VALUE) {
return super.dispatchKeyEvent(keyEvent);
}
return true;
}
@Override // android.widget.TextView, android.view.View
protected void onFocusChanged(boolean z, int i2, Rect rect) {
super.onFocusChanged(z, i2, rect);
if (this.v) {
this.x.xa_(z, i2, rect);
}
}
/* JADX WARN: Type inference failed for: r1v0, types: [int, boolean] */
@Override // androidx.appcompat.widget.AppCompatCheckBox, android.widget.CompoundButton, android.widget.TextView, android.view.View
public void drawableStateChanged() {
Drawable drawable;
super.drawableStateChanged();
xcs xcsVar = this.e;
if (xcsVar == null || (drawable = xcsVar.g) == null || !drawable.isStateful()) {
return;
}
xcs xcsVar2 = this.e;
?? isEnabled = isEnabled();
int i2 = isEnabled;
if (this.d) {
i2 = isEnabled + 1;
}
int i3 = i2;
if (this.l) {
i3 = i2 + 1;
}
int i4 = i3;
if (this.f6472o) {
i4 = i3 + 1;
}
int i5 = i4;
if (isChecked()) {
i5 = i4 + 1;
}
int[] iArr = new int[i5];
int i6 = 0;
if (isEnabled()) {
iArr[0] = 16842910;
i6 = 1;
}
if (this.d) {
iArr[i6] = 16842908;
i6++;
}
if (this.l) {
iArr[i6] = 16843623;
i6++;
}
if (this.f6472o) {
iArr[i6] = 16842919;
i6++;
}
if (isChecked()) {
iArr[i6] = 16842913;
}
if (xcsVar2.e(iArr)) {
invalidate();
}
}
private boolean g() {
xcs xcsVar = this.e;
if (xcsVar != null) {
Drawable drawable = xcsVar.g;
if ((drawable != null ? Tlu.pH_(drawable) : null) != null) {
return true;
}
}
return false;
}
final RectF Iy_() {
this.p.setEmpty();
xcs xcsVar = this.e;
if (xcsVar != null) {
Drawable drawable = xcsVar.g;
if ((drawable != null ? Tlu.pH_(drawable) : null) != null && this.h != null) {
xcs xcsVar2 = this.e;
RectF rectF = this.p;
Rect bounds = xcsVar2.getBounds();
rectF.setEmpty();
if (xcsVar2.k && xcsVar2.g != null) {
float f2 = xcsVar2.b + xcsVar2.h + xcsVar2.n + xcsVar2.f9313o + xcsVar2.w;
if (Tlu.pw_(xcsVar2) == 0) {
rectF.right = bounds.right;
rectF.left = rectF.right - f2;
} else {
rectF.left = bounds.left;
rectF.right = bounds.left + f2;
}
rectF.top = bounds.top;
rectF.bottom = bounds.bottom;
}
}
}
return this.p;
}
final Rect Iz_() {
RectF Iy_ = Iy_();
this.q.set((int) Iy_.left, (int) Iy_.top, (int) Iy_.right, (int) Iy_.bottom);
return this.q;
}
@Override // android.widget.Button, android.widget.TextView, android.view.View
public PointerIcon onResolvePointerIcon(MotionEvent motionEvent, int i2) {
if (Iy_().contains(motionEvent.getX(), motionEvent.getY()) && isEnabled()) {
return PointerIcon.getSystemIcon(getContext(), 1002);
}
return null;
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public class RVV extends JRd {
private Chip c;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
RVV(Chip chip, Chip chip2) {
super(chip2);
this.c = chip;
}
@Override // o.JRd
public final int a(float f, float f2) {
return (Chip.c(this.c) && this.c.Iy_().contains(f, f2)) ? 1 : 0;
}
@Override // o.JRd
public final void e(List<Integer> list) {
xcs xcsVar;
list.add(0);
if (!Chip.c(this.c) || (xcsVar = this.c.e) == null || !xcsVar.k || this.c.h == null) {
return;
}
list.add(1);
}
@Override // o.JRd
public final void e(int i, AccessibilityNodeInfoCompat accessibilityNodeInfoCompat) {
if (i == 1) {
xcs xcsVar = this.c.e;
CharSequence charSequence = xcsVar != null ? xcsVar.j : null;
if (charSequence != null) {
accessibilityNodeInfoCompat.d(charSequence);
} else {
CharSequence text = this.c.getText();
Context context = this.c.getContext();
int i2 = C17052tZT.ojQ.mtrl_chip_close_icon_content_description;
Object[] objArr = new Object[1];
objArr[0] = TextUtils.isEmpty(text) ? "" : text;
accessibilityNodeInfoCompat.d((CharSequence) context.getString(i2, objArr).trim());
}
accessibilityNodeInfoCompat.tZ_(this.c.Iz_());
accessibilityNodeInfoCompat.e(AccessibilityNodeInfoCompat.AccessibilityActionCompat.e);
accessibilityNodeInfoCompat.g(this.c.isEnabled());
return;
}
accessibilityNodeInfoCompat.d("");
accessibilityNodeInfoCompat.tZ_(Chip.b);
}
@Override // o.JRd
public final void a(AccessibilityNodeInfoCompat accessibilityNodeInfoCompat) {
xcs xcsVar = this.c.e;
accessibilityNodeInfoCompat.c(xcsVar != null && xcsVar.c);
accessibilityNodeInfoCompat.d(this.c.isClickable());
accessibilityNodeInfoCompat.e(this.c.getAccessibilityClassName());
accessibilityNodeInfoCompat.g(this.c.getText());
}
@Override // o.JRd
public final boolean d(int i, int i2) {
if (i2 != 16) {
return false;
}
if (i == 0) {
return this.c.performClick();
}
if (i == 1) {
return this.c.d();
}
return false;
}
@Override // o.JRd
public final void c(int i, boolean z) {
if (i == 1) {
this.c.d = z;
this.c.refreshDrawableState();
}
}
}
public void setChipBackgroundColorResource(int i2) {
ColorStateList dS_;
xcs xcsVar = this.e;
if (xcsVar == null || xcsVar.a == (dS_ = AgY.dS_(xcsVar.l, i2))) {
return;
}
xcsVar.a = dS_;
xcsVar.onStateChange(xcsVar.getState());
}
public void setChipBackgroundColor(ColorStateList colorStateList) {
xcs xcsVar = this.e;
if (xcsVar == null || xcsVar.a == colorStateList) {
return;
}
xcsVar.a = colorStateList;
xcsVar.onStateChange(xcsVar.getState());
}
public void setChipMinHeightResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.d(xcsVar.l.getResources().getDimension(i2));
}
}
public void setChipMinHeight(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.d(f2);
}
}
@Deprecated
public void setChipCornerRadiusResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
float dimension = xcsVar.l.getResources().getDimension(i2);
if (xcsVar.d != dimension) {
xcsVar.d = dimension;
FLD.RVV rvv = new FLD.RVV(xcsVar.B.l);
rvv.f = new C17525xWe(dimension);
rvv.k = new C17525xWe(dimension);
rvv.d = new C17525xWe(dimension);
rvv.e = new C17525xWe(dimension);
xcsVar.setShapeAppearanceModel(new FLD(rvv, (byte) 0));
}
}
}
@Override // o.Jaq
public void setShapeAppearanceModel(FLD fld) {
this.e.setShapeAppearanceModel(fld);
}
@Deprecated
public void setChipCornerRadius(float f2) {
xcs xcsVar = this.e;
if (xcsVar == null || xcsVar.d == f2) {
return;
}
xcsVar.d = f2;
FLD.RVV rvv = new FLD.RVV(xcsVar.B.l);
rvv.f = new C17525xWe(f2);
rvv.k = new C17525xWe(f2);
rvv.d = new C17525xWe(f2);
rvv.e = new C17525xWe(f2);
xcsVar.setShapeAppearanceModel(new FLD(rvv, (byte) 0));
}
public void setChipStrokeColorResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.IH_(AgY.dS_(xcsVar.l, i2));
}
}
public void setChipStrokeColor(ColorStateList colorStateList) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.IH_(colorStateList);
}
}
public void setChipStrokeWidthResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.e(xcsVar.l.getResources().getDimension(i2));
}
}
public void setChipStrokeWidth(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.e(f2);
}
}
public void setRippleColorResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
ColorStateList dS_ = AgY.dS_(xcsVar.l, i2);
if (xcsVar.q != dS_) {
xcsVar.q = dS_;
xcsVar.m = xcsVar.A ? C0459HUs.KI_(xcsVar.q) : null;
xcsVar.onStateChange(xcsVar.getState());
}
if (this.e.A) {
return;
}
n();
}
}
public void setRippleColor(ColorStateList colorStateList) {
xcs xcsVar = this.e;
if (xcsVar != null && xcsVar.q != colorStateList) {
xcsVar.q = colorStateList;
xcsVar.m = xcsVar.A ? C0459HUs.KI_(xcsVar.q) : null;
xcsVar.onStateChange(xcsVar.getState());
}
if (this.e.A) {
return;
}
n();
}
@Override // android.view.View
public void setLayoutDirection(int i2) {
if (this.e == null) {
return;
}
super.setLayoutDirection(i2);
}
@Deprecated
public void setChipTextResource(int i2) {
int i3 = 2 % 2;
int i4 = u + 7;
B = i4 % 128;
Object obj = null;
if (i4 % 2 == 0) {
getResources().getString(i2).startsWith(",*,)");
throw null;
}
String string = getResources().getString(i2);
if (!(!string.startsWith(",*,)"))) {
Object[] objArr = new Object[1];
z(string.substring(4), objArr);
string = ((String) objArr[0]).intern();
}
setText(string);
int i5 = B + 55;
u = i5 % 128;
if (i5 % 2 == 0) {
return;
}
obj.hashCode();
throw null;
}
@Deprecated
public void setChipText(CharSequence charSequence) {
setText(charSequence);
}
public void setTextAppearanceResource(int i2) {
setTextAppearance(getContext(), i2);
}
public void setTextAppearance(Rzh rzh) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.u.e(rzh, xcsVar.l);
}
k();
}
@Override // android.widget.TextView
public void setTextAppearance(Context context, int i2) {
super.setTextAppearance(context, i2);
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.u.e(new Rzh(xcsVar.l, i2), xcsVar.l);
}
k();
}
@Override // android.widget.TextView
public void setTextAppearance(int i2) {
super.setTextAppearance(i2);
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.u.e(new Rzh(xcsVar.l, i2), xcsVar.l);
}
k();
}
@Override // android.widget.TextView
public void setTextSize(int i2, float f2) {
super.setTextSize(i2, f2);
xcs xcsVar = this.e;
if (xcsVar != null) {
float applyDimension = TypedValue.applyDimension(i2, f2, getResources().getDisplayMetrics());
Rzh rzh = xcsVar.u.b;
if (rzh != null) {
rzh.h = applyDimension;
xcsVar.u.e.setTextSize(applyDimension);
xcs.LWm lWm = xcsVar.r.get();
if (lWm != null) {
lWm.e();
}
xcsVar.invalidateSelf();
}
}
k();
}
private void k() {
TextPaint paint = getPaint();
xcs xcsVar = this.e;
if (xcsVar != null) {
paint.drawableState = xcsVar.getState();
}
xcs xcsVar2 = this.e;
Rzh rzh = xcsVar2 != null ? xcsVar2.u.b : null;
if (rzh != null) {
rzh.KA_(getContext(), paint, this.k);
}
}
public void setChipIconVisible(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.e(xcsVar.l.getResources().getBoolean(i2));
}
}
public void setChipIconVisible(boolean z) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.e(z);
}
}
@Deprecated
public void setChipIconEnabledResource(int i2) {
setChipIconVisible(i2);
}
@Deprecated
public void setChipIconEnabled(boolean z) {
setChipIconVisible(z);
}
public void setChipIconResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.IF_(AgY.dT_(xcsVar.l, i2));
}
}
public void setChipIcon(Drawable drawable) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.IF_(drawable);
}
}
public void setChipIconTintResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.IG_(AgY.dS_(xcsVar.l, i2));
}
}
public void setChipIconTint(ColorStateList colorStateList) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.IG_(colorStateList);
}
}
public void setChipIconSizeResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.a(xcsVar.l.getResources().getDimension(i2));
}
}
public void setChipIconSize(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.a(f2);
}
}
public void setCloseIconVisible(int i2) {
setCloseIconVisible(getResources().getBoolean(i2));
}
public void setCloseIconVisible(boolean z) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.a(z);
}
h();
}
@Deprecated
public void setCloseIconEnabledResource(int i2) {
setCloseIconVisible(i2);
}
@Deprecated
public void setCloseIconEnabled(boolean z) {
setCloseIconVisible(z);
}
public void setCloseIconResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.II_(AgY.dT_(xcsVar.l, i2));
}
h();
}
public void setCloseIcon(Drawable drawable) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.II_(drawable);
}
h();
}
public void setCloseIconTintResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.IJ_(AgY.dS_(xcsVar.l, i2));
}
}
public void setCloseIconTint(ColorStateList colorStateList) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.IJ_(colorStateList);
}
}
public void setCloseIconSizeResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.h(xcsVar.l.getResources().getDimension(i2));
}
}
public void setCloseIconSize(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.h(f2);
}
}
public void setCloseIconContentDescription(CharSequence charSequence) {
xcs xcsVar = this.e;
if (xcsVar == null || xcsVar.j == charSequence) {
return;
}
mju d = mju.d();
xcsVar.j = d.d(charSequence, d.e);
xcsVar.invalidateSelf();
}
public void setCheckableResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.d(xcsVar.l.getResources().getBoolean(i2));
}
}
public void setCheckable(boolean z) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.d(z);
}
}
public void setCheckedIconVisible(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.c(xcsVar.l.getResources().getBoolean(i2));
}
}
public void setCheckedIconVisible(boolean z) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.c(z);
}
}
@Deprecated
public void setCheckedIconEnabledResource(int i2) {
setCheckedIconVisible(i2);
}
@Deprecated
public void setCheckedIconEnabled(boolean z) {
setCheckedIconVisible(z);
}
public void setCheckedIconResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.ID_(AgY.dT_(xcsVar.l, i2));
}
}
public void setCheckedIcon(Drawable drawable) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.ID_(drawable);
}
}
public void setCheckedIconTintResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.IE_(AgY.dS_(xcsVar.l, i2));
}
}
public void setCheckedIconTint(ColorStateList colorStateList) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.IE_(colorStateList);
}
}
public void setShowMotionSpecResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
qXa.b(xcsVar.l, i2);
}
}
public void setHideMotionSpecResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
qXa.b(xcsVar.l, i2);
}
}
public void setChipStartPaddingResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.c(xcsVar.l.getResources().getDimension(i2));
}
}
public void setChipStartPadding(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.c(f2);
}
}
public void setIconStartPaddingResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.f(xcsVar.l.getResources().getDimension(i2));
}
}
public void setIconStartPadding(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.f(f2);
}
}
public void setIconEndPaddingResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.i(xcsVar.l.getResources().getDimension(i2));
}
}
public void setIconEndPadding(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.i(f2);
}
}
public void setTextStartPaddingResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.o(xcsVar.l.getResources().getDimension(i2));
}
}
public void setTextStartPadding(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.o(f2);
}
}
public void setTextEndPaddingResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.m(xcsVar.l.getResources().getDimension(i2));
}
}
public void setTextEndPadding(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.m(f2);
}
}
public void setCloseIconStartPaddingResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.g(xcsVar.l.getResources().getDimension(i2));
}
}
public void setCloseIconStartPadding(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.g(f2);
}
}
public void setCloseIconEndPaddingResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.j(xcsVar.l.getResources().getDimension(i2));
}
}
public void setCloseIconEndPadding(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.j(f2);
}
}
public void setChipEndPaddingResource(int i2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.b(xcsVar.l.getResources().getDimension(i2));
}
}
public void setChipEndPadding(float f2) {
xcs xcsVar = this.e;
if (xcsVar != null) {
xcsVar.b(f2);
}
}
public void setEnsureMinTouchTargetSize(boolean z) {
this.m = z;
b(this.t);
}
@Override // android.widget.CheckBox, android.widget.CompoundButton, android.widget.Button, android.widget.TextView, android.view.View
public CharSequence getAccessibilityClassName() {
if (!TextUtils.isEmpty(this.g)) {
return this.g;
}
xcs xcsVar = this.e;
if (xcsVar == null || !xcsVar.c) {
return isClickable() ? "android.widget.Button" : "android.view.View";
}
ViewParent parent = getParent();
return ((parent instanceof ChipGroup) && ((ChipGroup) parent).c.a) ? "android.widget.RadioButton" : "android.widget.Button";
}
private void j() {
if (this.s != null) {
this.s = null;
setMinWidth(0);
xcs xcsVar = this.e;
setMinHeight((int) (xcsVar != null ? xcsVar.e : BitmapDescriptorFactory.HUE_RED));
o();
}
}
private void i() {
Drawable.Callback callback = this.s;
if ((callback == null ? this.e : callback) == callback && this.e.getCallback() == null) {
this.e.setCallback(this.s);
}
}
private boolean b(int i2) {
this.t = i2;
if (!this.m) {
if (this.s != null) {
j();
} else {
o();
}
return false;
}
int max = Math.max(0, i2 - this.e.getIntrinsicHeight());
int max2 = Math.max(0, i2 - this.e.getIntrinsicWidth());
if (max2 <= 0 && max <= 0) {
if (this.s != null) {
j();
} else {
o();
}
return false;
}
int i3 = max2 > 0 ? max2 / 2 : 0;
int i4 = max > 0 ? max / 2 : 0;
if (this.s != null) {
Rect rect = new Rect();
this.s.getPadding(rect);
if (rect.top == i4 && rect.bottom == i4 && rect.left == i3 && rect.right == i3) {
o();
return true;
}
}
if (getMinHeight() != i2) {
setMinHeight(i2);
}
if (getMinWidth() != i2) {
setMinWidth(i2);
}
this.s = new InsetDrawable((Drawable) this.e, i3, i4, i3, i4);
o();
return true;
}
@Override // android.widget.TextView
public TextUtils.TruncateAt getEllipsize() {
xcs xcsVar = this.e;
if (xcsVar != null) {
return xcsVar.y;
}
return null;
}
@Override // android.widget.TextView, android.view.View
public void getFocusedRect(Rect rect) {
if (this.v && (this.x.e == 1 || this.x.d == 1)) {
rect.set(Iz_());
} else {
super.getFocusedRect(rect);
}
}
@Override // android.view.View
public void setBackground(Drawable drawable) {
Drawable drawable2 = this.s;
if (drawable2 == null) {
drawable2 = this.e;
}
if (drawable == drawable2 || drawable == this.w) {
super.setBackground(drawable);
}
}
@Override // androidx.appcompat.widget.AppCompatCheckBox, android.view.View
public void setBackgroundDrawable(Drawable drawable) {
Drawable drawable2 = this.s;
if (drawable2 == null) {
drawable2 = this.e;
}
if (drawable == drawable2 || drawable == this.w) {
super.setBackgroundDrawable(drawable);
}
}
@Override // android.widget.CompoundButton, android.widget.Checkable
public void setChecked(boolean z) {
xcs xcsVar = this.e;
if (xcsVar == null) {
this.n = z;
} else if (xcsVar.c) {
super.setChecked(z);
}
}
@Override // android.widget.TextView
public void setText(CharSequence charSequence, TextView.BufferType bufferType) {
xcs xcsVar = this.e;
if (xcsVar == null) {
return;
}
if (charSequence == null) {
charSequence = "";
}
super.setText(xcsVar.s ? null : charSequence, bufferType);
xcs xcsVar2 = this.e;
if (xcsVar2 != null) {
xcsVar2.b(charSequence);
}
}
public void setChipDrawable(xcs xcsVar) {
xcs xcsVar2 = this.e;
if (xcsVar2 != xcsVar) {
if (xcsVar2 != null) {
xcsVar2.r = new WeakReference<>(null);
}
this.e = xcsVar;
xcsVar.s = false;
this.e.r = new WeakReference<>(this);
b(this.t);
}
}
static void f() {
y = (byte) 6;
}
@Override // android.widget.CompoundButton
public void setOnCheckedChangeListener(CompoundButton.OnCheckedChangeListener onCheckedChangeListener) {
this.a = onCheckedChangeListener;
}
@Override // o.OeX
public void setInternalOnCheckedChangeListener(OeX.HBt<Chip> hBt) {
this.c = hBt;
}
public void setAccessibilityClassName(CharSequence charSequence) {
this.g = charSequence;
}
}