what-the-bank/sources/com/scb/phone/view/custom/common/CustomInputDialog.java

220 lines
7.6 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.common;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.text.Editable;
import android.text.Spannable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.style.URLSpan;
import android.util.Base64;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.scb.phone.R;
import com.scb.phone.view.custom.common.CustomInputDialog;
import java.nio.charset.StandardCharsets;
/* loaded from: classes5.dex */
public class CustomInputDialog extends Dialog {
private static int b = 1;
private static int c = 0;
private static byte e = 6;
private Context d;
@BindView
public EditText mEditTextView;
@BindView
public TextView mErrorTextView;
@BindView
Button mNegativeButton;
@BindView
public Button mPositiveButton;
@BindView
public TextView mTextTextView;
@BindView
public TextView mTitleTextView;
private void f(String str, Object[] objArr) {
byte[] decode = Base64.decode(str, 0);
byte[] bArr = new byte[decode.length];
for (int i = 0; i < decode.length; i++) {
bArr[i] = (byte) (decode[(decode.length - i) - 1] ^ e);
}
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
}
private CustomInputDialog(Context context) {
super(context, R.style.f52332132017482);
this.d = context;
requestWindowFeature(1);
setContentView(R.layout.2131559052);
ButterKnife.Dh_(this);
this.mEditTextView.addTextChangedListener(new TextWatcher(this) { // from class: com.scb.phone.view.custom.common.CustomInputDialog.3
private CustomInputDialog b;
@Override // android.text.TextWatcher
public final void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override // android.text.TextWatcher
public final void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
{
this.b = this;
}
@Override // android.text.TextWatcher
public final void afterTextChanged(Editable editable) {
CustomInputDialog.apb_(this.b.mEditTextView.getText());
}
});
}
public static CustomInputDialog b(Context context) {
return new CustomInputDialog(context);
}
/* JADX WARN: Code restructure failed: missing block: B:10:0x002d, code lost:
if (r6.startsWith(",*,)") != false) goto L9;
*/
/* JADX WARN: Code restructure failed: missing block: B:4:0x0020, code lost:
if ((!r6.startsWith(",*,)")) != false) goto L10;
*/
/* JADX WARN: Code restructure failed: missing block: B:5:0x002f, code lost:
r1 = new java.lang.Object[1];
f(r6.substring(4), r1);
r6 = ((java.lang.String) r1[0]).intern();
r1 = com.scb.phone.view.custom.common.CustomInputDialog.c + 49;
com.scb.phone.view.custom.common.CustomInputDialog.b = r1 % 128;
r1 = r1 % 2;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final com.scb.phone.view.custom.common.CustomInputDialog apc_(int r6, android.content.DialogInterface.OnClickListener r7) {
/*
r5 = this;
r0 = 2
int r1 = r0 % r0
int r1 = com.scb.phone.view.custom.common.CustomInputDialog.b
int r1 = r1 + 65
int r2 = r1 % 128
com.scb.phone.view.custom.common.CustomInputDialog.c = r2
int r1 = r1 % r0
r2 = 1
r3 = 0
java.lang.String r4 = ",*,)"
if (r1 == 0) goto L23
android.content.Context r1 = r5.d
java.lang.String r6 = r1.getString(r6)
boolean r1 = r6.startsWith(r4)
r4 = 61
int r4 = r4 / r3
r1 = r1 ^ r2
if (r1 == 0) goto L2f
goto L4a
L23:
android.content.Context r1 = r5.d
java.lang.String r6 = r1.getString(r6)
boolean r1 = r6.startsWith(r4)
if (r1 == 0) goto L4a
L2f:
r1 = 4
java.lang.String r6 = r6.substring(r1)
java.lang.Object[] r1 = new java.lang.Object[r2]
r5.f(r6, r1)
r6 = r1[r3]
java.lang.String r6 = (java.lang.String) r6
java.lang.String r6 = r6.intern()
int r1 = com.scb.phone.view.custom.common.CustomInputDialog.c
int r1 = r1 + 49
int r2 = r1 % 128
com.scb.phone.view.custom.common.CustomInputDialog.b = r2
int r1 = r1 % r0
L4a:
com.scb.phone.view.custom.common.CustomInputDialog r6 = r5.apd_(r6, r7)
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.custom.common.CustomInputDialog.apc_(int, android.content.DialogInterface$OnClickListener):com.scb.phone.view.custom.common.CustomInputDialog");
}
public final CustomInputDialog apd_(String str, final DialogInterface.OnClickListener onClickListener) {
if (str != null && onClickListener != null) {
this.mNegativeButton.setVisibility(0);
this.mNegativeButton.setText(str);
this.mNegativeButton.setOnClickListener(new View.OnClickListener(this, onClickListener) { // from class: o.eBT
private DialogInterface.OnClickListener a;
private CustomInputDialog c;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
CustomInputDialog.aoY_(this.c, this.a);
}
{
this.c = this;
this.a = onClickListener;
}
});
}
return this;
}
public final CustomInputDialog c(String str) {
this.mEditTextView.setText(String.valueOf(str));
this.mEditTextView.setVisibility(0);
EditText editText = this.mEditTextView;
editText.setSelection(editText.getText().length());
return this;
}
public final CustomInputDialog c() {
this.mEditTextView.setEllipsize(TextUtils.TruncateAt.END);
this.mEditTextView.setInputType(1);
this.mEditTextView.setLines(1);
this.mEditTextView.setMaxLines(1);
return this;
}
public static /* synthetic */ void aoY_(CustomInputDialog customInputDialog, DialogInterface.OnClickListener onClickListener) {
onClickListener.onClick(customInputDialog, -2);
customInputDialog.dismiss();
}
public static /* synthetic */ void aoZ_(CustomInputDialog customInputDialog, DialogInterface.OnClickListener onClickListener) {
onClickListener.onClick(customInputDialog, -1);
customInputDialog.dismiss();
}
public static /* synthetic */ void apa_(CustomInputDialog customInputDialog, DialogInterface.OnClickListener onClickListener, boolean z) {
onClickListener.onClick(customInputDialog, -1);
if (z) {
customInputDialog.dismiss();
}
}
static /* synthetic */ void apb_(Spannable spannable) {
URLSpan[] uRLSpanArr = (URLSpan[]) spannable.getSpans(0, spannable.length(), URLSpan.class);
if (uRLSpanArr != null) {
for (URLSpan uRLSpan : uRLSpanArr) {
spannable.removeSpan(uRLSpan);
}
}
}
}