358 lines
15 KiB
Java
358 lines
15 KiB
Java
|
package com.google.android.material.timepicker;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.res.Configuration;
|
||
|
import android.graphics.Color;
|
||
|
import android.graphics.PointF;
|
||
|
import android.os.SystemClock;
|
||
|
import android.telephony.cdma.CdmaCellLocation;
|
||
|
import android.text.Editable;
|
||
|
import android.text.InputFilter;
|
||
|
import android.text.TextUtils;
|
||
|
import android.text.TextWatcher;
|
||
|
import android.util.AttributeSet;
|
||
|
import android.util.TypedValue;
|
||
|
import android.view.KeyEvent;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewConfiguration;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.view.inputmethod.InputMethodManager;
|
||
|
import android.widget.Checkable;
|
||
|
import android.widget.EditText;
|
||
|
import android.widget.FrameLayout;
|
||
|
import android.widget.TextView;
|
||
|
import androidx.core.view.ViewCompat;
|
||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||
|
import com.google.android.material.chip.Chip;
|
||
|
import com.google.android.material.textfield.TextInputLayout;
|
||
|
import java.lang.reflect.Method;
|
||
|
import java.util.Arrays;
|
||
|
import o.C17052tZT;
|
||
|
import o.GES;
|
||
|
import o.VPp;
|
||
|
import o.dQY;
|
||
|
import o.xzZ;
|
||
|
import o.yZt;
|
||
|
import org.bouncycastle.crypto.tls.CipherSuite;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public class ChipTextInputComboView extends FrameLayout implements Checkable {
|
||
|
final Chip a;
|
||
|
private TextView b;
|
||
|
private TextWatcher c;
|
||
|
private final EditText d;
|
||
|
public final TextInputLayout e;
|
||
|
|
||
|
public ChipTextInputComboView(Context context) {
|
||
|
this(context, null);
|
||
|
}
|
||
|
|
||
|
public ChipTextInputComboView(Context context, AttributeSet attributeSet) {
|
||
|
this(context, attributeSet, 0);
|
||
|
}
|
||
|
|
||
|
public ChipTextInputComboView(Context context, AttributeSet attributeSet, int i) {
|
||
|
super(context, attributeSet, i);
|
||
|
LayoutInflater from = LayoutInflater.from(context);
|
||
|
Chip chip = (Chip) from.inflate(C17052tZT.tOB.material_time_chip, (ViewGroup) this, false);
|
||
|
this.a = chip;
|
||
|
chip.setAccessibilityClassName("android.view.View");
|
||
|
TextInputLayout textInputLayout = (TextInputLayout) from.inflate(C17052tZT.tOB.material_time_input, (ViewGroup) this, false);
|
||
|
this.e = textInputLayout;
|
||
|
EditText editText = textInputLayout.f;
|
||
|
this.d = editText;
|
||
|
editText.setVisibility(4);
|
||
|
RVV rvv = new RVV(this, (byte) 0);
|
||
|
this.c = rvv;
|
||
|
editText.addTextChangedListener(rvv);
|
||
|
editText.setImeHintLocales(getContext().getResources().getConfiguration().getLocales());
|
||
|
addView(chip);
|
||
|
addView(textInputLayout);
|
||
|
this.b = (TextView) findViewById(C17052tZT.ZqN.material_label);
|
||
|
editText.setId(ViewCompat.a());
|
||
|
ViewCompat.i(this.b, editText.getId());
|
||
|
editText.setSaveEnabled(false);
|
||
|
editText.setLongClickable(false);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
class RVV extends GES {
|
||
|
private ChipTextInputComboView b;
|
||
|
private static final byte[] $$a = {101, 120, 60, 69};
|
||
|
private static final int $$b = CipherSuite.TLS_DH_RSA_WITH_AES_256_GCM_SHA384;
|
||
|
private static int $10 = 0;
|
||
|
private static int $11 = 1;
|
||
|
private static int d = 0;
|
||
|
private static int e = 1;
|
||
|
private static char[] a = {36834, 31837};
|
||
|
private static long c = -8126736845746701203L;
|
||
|
|
||
|
/* JADX WARN: Removed duplicated region for block: B:10:0x0025 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:7:0x001d */
|
||
|
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0025 -> B:4:0x0029). Please report as a decompilation issue!!! */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
private static void g(int r5, byte r6, short r7, java.lang.Object[] r8) {
|
||
|
/*
|
||
|
byte[] r0 = com.google.android.material.timepicker.ChipTextInputComboView.RVV.$$a
|
||
|
int r7 = r7 * 2
|
||
|
int r7 = 4 - r7
|
||
|
int r6 = r6 + 98
|
||
|
int r5 = r5 * 2
|
||
|
int r1 = 1 - r5
|
||
|
byte[] r1 = new byte[r1]
|
||
|
r2 = 0
|
||
|
int r5 = 0 - r5
|
||
|
if (r0 != 0) goto L17
|
||
|
r4 = r6
|
||
|
r3 = r2
|
||
|
r6 = r5
|
||
|
goto L29
|
||
|
L17:
|
||
|
r3 = r2
|
||
|
L18:
|
||
|
byte r4 = (byte) r6
|
||
|
r1[r3] = r4
|
||
|
if (r3 != r5) goto L25
|
||
|
java.lang.String r5 = new java.lang.String
|
||
|
r5.<init>(r1, r2)
|
||
|
r8[r2] = r5
|
||
|
return
|
||
|
L25:
|
||
|
int r3 = r3 + 1
|
||
|
r4 = r0[r7]
|
||
|
L29:
|
||
|
int r6 = r6 + r4
|
||
|
int r7 = r7 + 1
|
||
|
goto L18
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.material.timepicker.ChipTextInputComboView.RVV.g(int, byte, short, java.lang.Object[]):void");
|
||
|
}
|
||
|
|
||
|
private static void f(char c2, int i, int i2, Object[] objArr) {
|
||
|
int i3 = 2 % 2;
|
||
|
dQY dqy = new dQY();
|
||
|
long[] jArr = new long[i2];
|
||
|
dqy.a = 0;
|
||
|
while (dqy.a < i2) {
|
||
|
int i4 = dqy.a;
|
||
|
try {
|
||
|
Object[] objArr2 = {Integer.valueOf(a[i + dqy.a])};
|
||
|
Object obj = xzZ.y.get(1095064095);
|
||
|
if (obj == null) {
|
||
|
Class cls = (Class) xzZ.c((-16776908) - Color.rgb(0, 0, 0), 5 - KeyEvent.normalizeMetaState(0), (char) (32798 - (ViewConfiguration.getGlobalActionKeyTimeout() > 0L ? 1 : (ViewConfiguration.getGlobalActionKeyTimeout() == 0L ? 0 : -1))));
|
||
|
byte b = (byte) 0;
|
||
|
byte b2 = b;
|
||
|
Object[] objArr3 = new Object[1];
|
||
|
g(b, b2, b2, objArr3);
|
||
|
obj = cls.getMethod((String) objArr3[0], Integer.TYPE);
|
||
|
xzZ.y.put(1095064095, obj);
|
||
|
}
|
||
|
try {
|
||
|
Object[] objArr4 = {Long.valueOf(((Long) ((Method) obj).invoke(null, objArr2)).longValue()), Long.valueOf(dqy.a), Long.valueOf(c), Integer.valueOf(c2)};
|
||
|
Object obj2 = xzZ.y.get(-548438098);
|
||
|
if (obj2 == null) {
|
||
|
Class cls2 = (Class) xzZ.c(413 - (SystemClock.currentThreadTimeMillis() > (-1L) ? 1 : (SystemClock.currentThreadTimeMillis() == (-1L) ? 0 : -1)), 4 - TextUtils.lastIndexOf("", '0', 0, 0), (char) TextUtils.getOffsetBefore("", 0));
|
||
|
byte b3 = (byte) 0;
|
||
|
byte b4 = (byte) (b3 + 1);
|
||
|
Object[] objArr5 = new Object[1];
|
||
|
g(b3, b4, (byte) (b4 - 1), objArr5);
|
||
|
obj2 = cls2.getMethod((String) objArr5[0], Long.TYPE, Long.TYPE, Long.TYPE, Integer.TYPE);
|
||
|
xzZ.y.put(-548438098, obj2);
|
||
|
}
|
||
|
jArr[i4] = ((Long) ((Method) obj2).invoke(null, objArr4)).longValue();
|
||
|
try {
|
||
|
Object[] objArr6 = {dqy, dqy};
|
||
|
Object obj3 = xzZ.y.get(1071125919);
|
||
|
if (obj3 == null) {
|
||
|
Class cls3 = (Class) xzZ.c(TextUtils.getOffsetBefore("", 0) + 407, 5 - View.combineMeasuredStates(0, 0), (char) (TextUtils.indexOf((CharSequence) "", '0', 0) + 29235));
|
||
|
byte b5 = (byte) 0;
|
||
|
Object[] objArr7 = new Object[1];
|
||
|
g(b5, (byte) (b5 | 8), b5, objArr7);
|
||
|
obj3 = cls3.getMethod((String) objArr7[0], Object.class, Object.class);
|
||
|
xzZ.y.put(1071125919, obj3);
|
||
|
}
|
||
|
((Method) obj3).invoke(null, objArr6);
|
||
|
} catch (Throwable th) {
|
||
|
Throwable cause = th.getCause();
|
||
|
if (cause == null) {
|
||
|
throw th;
|
||
|
}
|
||
|
throw cause;
|
||
|
}
|
||
|
} catch (Throwable th2) {
|
||
|
Throwable cause2 = th2.getCause();
|
||
|
if (cause2 == null) {
|
||
|
throw th2;
|
||
|
}
|
||
|
throw cause2;
|
||
|
}
|
||
|
} catch (Throwable th3) {
|
||
|
Throwable cause3 = th3.getCause();
|
||
|
if (cause3 == null) {
|
||
|
throw th3;
|
||
|
}
|
||
|
throw cause3;
|
||
|
}
|
||
|
}
|
||
|
char[] cArr = new char[i2];
|
||
|
dqy.a = 0;
|
||
|
int i5 = $10 + 79;
|
||
|
$11 = i5 % 128;
|
||
|
if (i5 % 2 == 0) {
|
||
|
int i6 = 4 / 5;
|
||
|
}
|
||
|
while (dqy.a < i2) {
|
||
|
int i7 = $10 + 11;
|
||
|
$11 = i7 % 128;
|
||
|
int i8 = i7 % 2;
|
||
|
cArr[dqy.a] = (char) jArr[dqy.a];
|
||
|
try {
|
||
|
Object[] objArr8 = {dqy, dqy};
|
||
|
Object obj4 = xzZ.y.get(1071125919);
|
||
|
if (obj4 == null) {
|
||
|
Class cls4 = (Class) xzZ.c(407 - Color.argb(0, 0, 0, 0), 5 - Color.argb(0, 0, 0, 0), (char) (29234 - (PointF.length(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) > BitmapDescriptorFactory.HUE_RED ? 1 : (PointF.length(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) == BitmapDescriptorFactory.HUE_RED ? 0 : -1))));
|
||
|
byte b6 = (byte) 0;
|
||
|
Object[] objArr9 = new Object[1];
|
||
|
g(b6, (byte) (b6 | 8), b6, objArr9);
|
||
|
obj4 = cls4.getMethod((String) objArr9[0], Object.class, Object.class);
|
||
|
xzZ.y.put(1071125919, obj4);
|
||
|
}
|
||
|
((Method) obj4).invoke(null, objArr8);
|
||
|
} catch (Throwable th4) {
|
||
|
Throwable cause4 = th4.getCause();
|
||
|
if (cause4 == null) {
|
||
|
throw th4;
|
||
|
}
|
||
|
throw cause4;
|
||
|
}
|
||
|
}
|
||
|
objArr[0] = new String(cArr);
|
||
|
}
|
||
|
|
||
|
private RVV(ChipTextInputComboView chipTextInputComboView) {
|
||
|
this.b = chipTextInputComboView;
|
||
|
}
|
||
|
|
||
|
/* synthetic */ RVV(ChipTextInputComboView chipTextInputComboView, byte b) {
|
||
|
this(chipTextInputComboView);
|
||
|
}
|
||
|
|
||
|
@Override // o.GES, android.text.TextWatcher
|
||
|
public final void afterTextChanged(Editable editable) {
|
||
|
int i = 2 % 2;
|
||
|
int i2 = d + 95;
|
||
|
e = i2 % 128;
|
||
|
int i3 = i2 % 2;
|
||
|
if (TextUtils.isEmpty(editable)) {
|
||
|
int i4 = e + 31;
|
||
|
d = i4 % 128;
|
||
|
int i5 = i4 % 2;
|
||
|
Chip chip = this.b.a;
|
||
|
ChipTextInputComboView chipTextInputComboView = this.b;
|
||
|
Object[] objArr = new Object[1];
|
||
|
f((char) (ViewConfiguration.getMinimumFlingVelocity() >> 16), KeyEvent.getMaxKeyCode() >> 16, 2 - TextUtils.getOffsetBefore("", 0), objArr);
|
||
|
chip.setText(VPp.MS_(chipTextInputComboView.getResources(), ((String) objArr[0]).intern(), "%02d"));
|
||
|
int i6 = d + 95;
|
||
|
e = i6 % 128;
|
||
|
int i7 = i6 % 2;
|
||
|
return;
|
||
|
}
|
||
|
String MS_ = VPp.MS_(this.b.getResources(), editable, "%02d");
|
||
|
Chip chip2 = this.b.a;
|
||
|
if (TextUtils.isEmpty(MS_)) {
|
||
|
int i8 = d + 123;
|
||
|
e = i8 % 128;
|
||
|
int i9 = i8 % 2;
|
||
|
ChipTextInputComboView chipTextInputComboView2 = this.b;
|
||
|
Object[] objArr2 = new Object[1];
|
||
|
f((char) (CdmaCellLocation.convertQuartSecToDecDegrees(0) > 0.0d ? 1 : (CdmaCellLocation.convertQuartSecToDecDegrees(0) == 0.0d ? 0 : -1)), View.resolveSizeAndState(0, 0, 0), (TypedValue.complexToFloat(0) > BitmapDescriptorFactory.HUE_RED ? 1 : (TypedValue.complexToFloat(0) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)) + 2, objArr2);
|
||
|
MS_ = VPp.MS_(chipTextInputComboView2.getResources(), ((String) objArr2[0]).intern(), "%02d");
|
||
|
}
|
||
|
chip2.setText(MS_);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.widget.Checkable
|
||
|
public boolean isChecked() {
|
||
|
return this.a.isChecked();
|
||
|
}
|
||
|
|
||
|
@Override // android.widget.Checkable
|
||
|
public void setChecked(boolean z) {
|
||
|
this.a.setChecked(z);
|
||
|
this.d.setVisibility(z ? 0 : 4);
|
||
|
this.a.setVisibility(z ? 8 : 0);
|
||
|
if (isChecked()) {
|
||
|
EditText editText = this.d;
|
||
|
editText.requestFocus();
|
||
|
editText.post(new Runnable(editText) { // from class: o.Lot.2
|
||
|
private View a;
|
||
|
|
||
|
{
|
||
|
this.a = editText;
|
||
|
}
|
||
|
|
||
|
@Override // java.lang.Runnable
|
||
|
public final void run() {
|
||
|
((InputMethodManager) this.a.getContext().getSystemService("input_method")).showSoftInput(this.a, 1);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.widget.Checkable
|
||
|
public void toggle() {
|
||
|
this.a.toggle();
|
||
|
}
|
||
|
|
||
|
@Override // android.view.View
|
||
|
public void setOnClickListener(View.OnClickListener onClickListener) {
|
||
|
this.a.setOnClickListener(onClickListener);
|
||
|
}
|
||
|
|
||
|
@Override // android.view.View
|
||
|
public void setTag(int i, Object obj) {
|
||
|
this.a.setTag(i, obj);
|
||
|
}
|
||
|
|
||
|
public void setHelperText(CharSequence charSequence) {
|
||
|
this.b.setText(charSequence);
|
||
|
}
|
||
|
|
||
|
public void setCursorVisible(boolean z) {
|
||
|
this.d.setCursorVisible(z);
|
||
|
}
|
||
|
|
||
|
public final void MR_(InputFilter inputFilter) {
|
||
|
InputFilter[] filters = this.d.getFilters();
|
||
|
InputFilter[] inputFilterArr = (InputFilter[]) Arrays.copyOf(filters, filters.length + 1);
|
||
|
inputFilterArr[filters.length] = inputFilter;
|
||
|
this.d.setFilters(inputFilterArr);
|
||
|
}
|
||
|
|
||
|
public void setChipDelegate(yZt yzt) {
|
||
|
ViewCompat.e(this.a, yzt);
|
||
|
}
|
||
|
|
||
|
@Override // android.view.View
|
||
|
protected void onConfigurationChanged(Configuration configuration) {
|
||
|
super.onConfigurationChanged(configuration);
|
||
|
this.d.setImeHintLocales(getContext().getResources().getConfiguration().getLocales());
|
||
|
}
|
||
|
|
||
|
public void setText(CharSequence charSequence) {
|
||
|
String MS_ = VPp.MS_(getResources(), charSequence, "%02d");
|
||
|
this.a.setText(MS_);
|
||
|
if (TextUtils.isEmpty(MS_)) {
|
||
|
return;
|
||
|
}
|
||
|
this.d.removeTextChangedListener(this.c);
|
||
|
this.d.setText(MS_);
|
||
|
this.d.addTextChangedListener(this.c);
|
||
|
}
|
||
|
}
|