407 lines
14 KiB
Java
407 lines
14 KiB
Java
|
package com.scb.phone.view.custom.common;
|
||
|
|
||
|
import android.app.Dialog;
|
||
|
import android.content.Context;
|
||
|
import android.content.DialogInterface;
|
||
|
import android.graphics.Typeface;
|
||
|
import android.text.TextUtils;
|
||
|
import android.util.Base64;
|
||
|
import android.view.View;
|
||
|
import android.widget.Button;
|
||
|
import android.widget.LinearLayout;
|
||
|
import android.widget.TextView;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.custom.common.CustomDialog;
|
||
|
import java.nio.charset.StandardCharsets;
|
||
|
import o.gjJ;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class CustomDialog extends Dialog {
|
||
|
private static byte a = 6;
|
||
|
private static int c = 0;
|
||
|
private static int d = 1;
|
||
|
public Context e;
|
||
|
|
||
|
@BindView
|
||
|
LinearLayout mButtonHorizontalLayout;
|
||
|
|
||
|
@BindView
|
||
|
LinearLayout mButtonVerticalLayout;
|
||
|
|
||
|
@BindView
|
||
|
public Button mNegativeButton;
|
||
|
|
||
|
@BindView
|
||
|
Button mNegativeButtonV;
|
||
|
|
||
|
@BindView
|
||
|
Button mNeutralButton;
|
||
|
|
||
|
@BindView
|
||
|
Button mNeutralButtonV;
|
||
|
|
||
|
@BindView
|
||
|
public Button mPositiveButton;
|
||
|
|
||
|
@BindView
|
||
|
Button mPositiveButtonV;
|
||
|
|
||
|
@BindView
|
||
|
public TextView mTextTextView;
|
||
|
|
||
|
@BindView
|
||
|
public TextView mTitleTextView;
|
||
|
|
||
|
public static /* synthetic */ Object a(Object[] objArr, int i, int i2, int i3) {
|
||
|
return e(objArr);
|
||
|
}
|
||
|
|
||
|
private static 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] ^ a);
|
||
|
}
|
||
|
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
|
||
|
}
|
||
|
|
||
|
private CustomDialog(Context context) {
|
||
|
super(context, R.style.f52332132017482);
|
||
|
this.e = context;
|
||
|
requestWindowFeature(1);
|
||
|
setContentView(R.layout.f36402131558993);
|
||
|
ButterKnife.Dh_(this);
|
||
|
this.mTitleTextView.setTypeface(Typeface.createFromAsset(this.e.getAssets(), "fonts/db_heavent_medium.ttf"));
|
||
|
this.mTextTextView.setTypeface(Typeface.createFromAsset(this.e.getAssets(), "fonts/db_heavent_regular.ttf"));
|
||
|
}
|
||
|
|
||
|
public static CustomDialog b(Context context) {
|
||
|
return new CustomDialog(context);
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void aoM_(DialogInterface.OnClickListener onClickListener, DialogInterface dialogInterface, int i) {
|
||
|
dialogInterface.dismiss();
|
||
|
onClickListener.onClick(dialogInterface, i);
|
||
|
}
|
||
|
|
||
|
public final CustomDialog c(int i) {
|
||
|
int i2 = 2 % 2;
|
||
|
String string = this.e.getString(i);
|
||
|
if (string.startsWith(",*,)")) {
|
||
|
int i3 = d + 59;
|
||
|
c = i3 % 128;
|
||
|
int i4 = i3 % 2;
|
||
|
String substring = string.substring(4);
|
||
|
if (i4 != 0) {
|
||
|
Object[] objArr = new Object[1];
|
||
|
f(substring, objArr);
|
||
|
((String) objArr[0]).intern();
|
||
|
throw null;
|
||
|
}
|
||
|
Object[] objArr2 = new Object[1];
|
||
|
f(substring, objArr2);
|
||
|
string = ((String) objArr2[0]).intern();
|
||
|
}
|
||
|
if (gjJ.a(string)) {
|
||
|
int i5 = c + 111;
|
||
|
d = i5 % 128;
|
||
|
int i6 = i5 % 2;
|
||
|
this.mTitleTextView.setVisibility(0);
|
||
|
this.mTitleTextView.setText(string);
|
||
|
int i7 = c + 45;
|
||
|
d = i7 % 128;
|
||
|
int i8 = i7 % 2;
|
||
|
}
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public final CustomDialog d(int i) {
|
||
|
int i2 = 2 % 2;
|
||
|
String string = this.e.getString(i);
|
||
|
if (string.startsWith(",*,)")) {
|
||
|
int i3 = c + 77;
|
||
|
d = i3 % 128;
|
||
|
int i4 = i3 % 2;
|
||
|
Object[] objArr = new Object[1];
|
||
|
f(string.substring(4), objArr);
|
||
|
string = ((String) objArr[0]).intern();
|
||
|
}
|
||
|
if (!(!gjJ.a(string))) {
|
||
|
int i5 = d + 75;
|
||
|
c = i5 % 128;
|
||
|
int i6 = i5 % 2;
|
||
|
this.mTextTextView.setVisibility(0);
|
||
|
this.mTextTextView.setText(string);
|
||
|
}
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public final CustomDialog aoT_(int i, DialogInterface.OnClickListener onClickListener) {
|
||
|
int i2 = 2 % 2;
|
||
|
String string = this.e.getString(i);
|
||
|
if (string.startsWith(",*,)")) {
|
||
|
int i3 = c + 87;
|
||
|
d = i3 % 128;
|
||
|
int i4 = i3 % 2;
|
||
|
String substring = string.substring(4);
|
||
|
if (i4 == 0) {
|
||
|
Object[] objArr = new Object[1];
|
||
|
f(substring, objArr);
|
||
|
((String) objArr[0]).intern();
|
||
|
Object obj = null;
|
||
|
obj.hashCode();
|
||
|
throw null;
|
||
|
}
|
||
|
Object[] objArr2 = new Object[1];
|
||
|
f(substring, objArr2);
|
||
|
string = ((String) objArr2[0]).intern();
|
||
|
int i5 = d + 115;
|
||
|
c = i5 % 128;
|
||
|
int i6 = i5 % 2;
|
||
|
}
|
||
|
return aoU_(string, onClickListener);
|
||
|
}
|
||
|
|
||
|
public final CustomDialog aoU_(String str, DialogInterface.OnClickListener onClickListener) {
|
||
|
if (str != null && onClickListener != null) {
|
||
|
this.mPositiveButton.setVisibility(0);
|
||
|
this.mPositiveButton.setText(str);
|
||
|
this.mPositiveButton.setOnClickListener(new View.OnClickListener(this, onClickListener) { // from class: o.eBH
|
||
|
private DialogInterface.OnClickListener b;
|
||
|
private CustomDialog c;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
CustomDialog.aoH_(this.c, this.b);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
this.b = onClickListener;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ Object e(Object[] objArr) {
|
||
|
CustomDialog customDialog = (CustomDialog) objArr[0];
|
||
|
int intValue = ((Number) objArr[1]).intValue();
|
||
|
DialogInterface.OnClickListener onClickListener = (DialogInterface.OnClickListener) objArr[2];
|
||
|
int i = 2 % 2;
|
||
|
int i2 = d + 21;
|
||
|
c = i2 % 128;
|
||
|
if (i2 % 2 != 0) {
|
||
|
customDialog.e.getString(intValue).startsWith(",*,)");
|
||
|
throw null;
|
||
|
}
|
||
|
String string = customDialog.e.getString(intValue);
|
||
|
if (string.startsWith(",*,)")) {
|
||
|
Object[] objArr2 = new Object[1];
|
||
|
f(string.substring(4), objArr2);
|
||
|
string = ((String) objArr2[0]).intern();
|
||
|
int i3 = c + 11;
|
||
|
d = i3 % 128;
|
||
|
int i4 = i3 % 2;
|
||
|
}
|
||
|
return customDialog.aoO_(string, onClickListener);
|
||
|
}
|
||
|
|
||
|
public final CustomDialog aoO_(String str, 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.eBG
|
||
|
private DialogInterface.OnClickListener c;
|
||
|
private CustomDialog d;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
CustomDialog.aoF_(this.d, this.c);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.d = this;
|
||
|
this.c = onClickListener;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public final CustomDialog aoQ_(DialogInterface.OnClickListener onClickListener) {
|
||
|
int i = 2 % 2;
|
||
|
String string = this.e.getString(R.string.ok);
|
||
|
if (string.startsWith(",*,)")) {
|
||
|
Object[] objArr = new Object[1];
|
||
|
f(string.substring(4), objArr);
|
||
|
string = ((String) objArr[0]).intern();
|
||
|
int i2 = d + 25;
|
||
|
c = i2 % 128;
|
||
|
int i3 = i2 % 2;
|
||
|
}
|
||
|
CustomDialog aoR_ = aoR_(string, onClickListener);
|
||
|
int i4 = d + 13;
|
||
|
c = i4 % 128;
|
||
|
int i5 = i4 % 2;
|
||
|
return aoR_;
|
||
|
}
|
||
|
|
||
|
public final CustomDialog aoR_(String str, DialogInterface.OnClickListener onClickListener) {
|
||
|
if (str != null && onClickListener != null) {
|
||
|
this.mNeutralButton.setVisibility(0);
|
||
|
this.mNeutralButton.setText(str);
|
||
|
this.mNeutralButton.setOnClickListener(new View.OnClickListener(this, onClickListener) { // from class: o.eBE
|
||
|
private CustomDialog a;
|
||
|
private DialogInterface.OnClickListener c;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
CustomDialog.aoK_(this.a, this.c);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = this;
|
||
|
this.c = onClickListener;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public final CustomDialog aoV_(String str, DialogInterface.OnClickListener onClickListener) {
|
||
|
if (str != null) {
|
||
|
this.mButtonHorizontalLayout.setVisibility(8);
|
||
|
this.mButtonVerticalLayout.setVisibility(0);
|
||
|
this.mPositiveButtonV.setVisibility(0);
|
||
|
this.mPositiveButtonV.setText(str);
|
||
|
this.mPositiveButtonV.setOnClickListener(new View.OnClickListener(this, onClickListener) { // from class: o.eBI
|
||
|
private DialogInterface.OnClickListener a;
|
||
|
private CustomDialog b;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
CustomDialog.aoI_(this.b, this.a);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
this.a = onClickListener;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public final CustomDialog aoP_(String str, DialogInterface.OnClickListener onClickListener) {
|
||
|
if (str != null) {
|
||
|
this.mButtonHorizontalLayout.setVisibility(8);
|
||
|
this.mButtonVerticalLayout.setVisibility(0);
|
||
|
this.mNegativeButtonV.setVisibility(0);
|
||
|
this.mNegativeButtonV.setText(str);
|
||
|
this.mNegativeButtonV.setOnClickListener(new View.OnClickListener(this, onClickListener) { // from class: o.eBJ
|
||
|
private DialogInterface.OnClickListener a;
|
||
|
private CustomDialog e;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
CustomDialog.aoJ_(this.e, this.a);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = this;
|
||
|
this.a = onClickListener;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public final CustomDialog aoS_(String str, DialogInterface.OnClickListener onClickListener) {
|
||
|
if (str != null) {
|
||
|
this.mButtonHorizontalLayout.setVisibility(8);
|
||
|
this.mButtonVerticalLayout.setVisibility(0);
|
||
|
this.mNeutralButtonV.setVisibility(0);
|
||
|
this.mNeutralButtonV.setText(str);
|
||
|
this.mNeutralButtonV.setOnClickListener(new View.OnClickListener(this, onClickListener) { // from class: o.eBC
|
||
|
private DialogInterface.OnClickListener a;
|
||
|
private CustomDialog e;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
CustomDialog.aoG_(this.e, this.a);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = this;
|
||
|
this.a = onClickListener;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void aoF_(CustomDialog customDialog, DialogInterface.OnClickListener onClickListener) {
|
||
|
onClickListener.onClick(customDialog, -1);
|
||
|
customDialog.dismiss();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void aoG_(CustomDialog customDialog, DialogInterface.OnClickListener onClickListener) {
|
||
|
onClickListener.onClick(customDialog, -1);
|
||
|
customDialog.dismiss();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void aoH_(CustomDialog customDialog, DialogInterface.OnClickListener onClickListener) {
|
||
|
onClickListener.onClick(customDialog, -2);
|
||
|
customDialog.dismiss();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void aoI_(CustomDialog customDialog, DialogInterface.OnClickListener onClickListener) {
|
||
|
onClickListener.onClick(customDialog, -2);
|
||
|
customDialog.dismiss();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void aoJ_(CustomDialog customDialog, DialogInterface.OnClickListener onClickListener) {
|
||
|
onClickListener.onClick(customDialog, -1);
|
||
|
customDialog.dismiss();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void aoK_(CustomDialog customDialog, DialogInterface.OnClickListener onClickListener) {
|
||
|
onClickListener.onClick(customDialog, -1);
|
||
|
customDialog.dismiss();
|
||
|
}
|
||
|
|
||
|
public static CustomDialog aoL_(Context context, String str, String str2, DialogInterface.OnClickListener onClickListener, DialogInterface.OnClickListener onClickListener2) {
|
||
|
CustomDialog customDialog = new CustomDialog(context);
|
||
|
if (TextUtils.isEmpty(str)) {
|
||
|
str = context.getString(R.string.common_error);
|
||
|
}
|
||
|
if (gjJ.a(str)) {
|
||
|
customDialog.mTitleTextView.setVisibility(0);
|
||
|
customDialog.mTitleTextView.setText(str);
|
||
|
}
|
||
|
if (gjJ.a(str2)) {
|
||
|
customDialog.mTextTextView.setVisibility(0);
|
||
|
customDialog.mTextTextView.setText(str2);
|
||
|
}
|
||
|
return (CustomDialog) e(new Object[]{customDialog.aoT_(R.string.proceed, onClickListener), Integer.valueOf(R.string.cancel), new DialogInterface.OnClickListener(onClickListener2) { // from class: o.eBD
|
||
|
private DialogInterface.OnClickListener c;
|
||
|
|
||
|
@Override // android.content.DialogInterface.OnClickListener
|
||
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
||
|
CustomDialog.aoM_(this.c, dialogInterface, i);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.c = onClickListener2;
|
||
|
}
|
||
|
}});
|
||
|
}
|
||
|
|
||
|
public final CustomDialog aoN_(int i, DialogInterface.OnClickListener onClickListener) {
|
||
|
return (CustomDialog) e(new Object[]{this, Integer.valueOf(i), onClickListener});
|
||
|
}
|
||
|
}
|