380 lines
12 KiB
Java
380 lines
12 KiB
Java
package com.scb.phone.view.fragment.hml;
|
|
|
|
import android.content.Context;
|
|
import android.os.Bundle;
|
|
import android.text.SpannableString;
|
|
import android.text.Spanned;
|
|
import android.text.SpannedString;
|
|
import android.text.TextUtils;
|
|
import android.util.Base64;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.ImageView;
|
|
import android.widget.TextView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.investment.scbs.AddAccountConsentActivity;
|
|
import com.scb.phone.view.fragment.BaseFragment;
|
|
import java.nio.charset.StandardCharsets;
|
|
import kotlin.NoWhenBranchMatchedException;
|
|
import o.AbstractC5115bmu;
|
|
import o.C14957gcv;
|
|
import o.InterfaceC9245dgA;
|
|
import o.Tdc;
|
|
import o.ZI;
|
|
import o.nMh;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class HmlBaseLoanSetupFragment<V extends InterfaceC9245dgA> extends BaseFragment implements InterfaceC9245dgA {
|
|
private static byte c = 6;
|
|
private static int d = 0;
|
|
private static int f = 1;
|
|
|
|
@BindView
|
|
public ImageView header;
|
|
|
|
@BindView
|
|
public ImageView openAccountChecked;
|
|
|
|
@BindView
|
|
public ImageView openAccountIcon;
|
|
|
|
@BindView
|
|
public ImageView openAccountIndicator;
|
|
|
|
@BindView
|
|
public TextView openAccountTextView;
|
|
|
|
@BindView
|
|
public TextView reviewLoanTextView;
|
|
|
|
@BindView
|
|
public ImageView setupAccountIndicator;
|
|
|
|
@BindView
|
|
public TextView setupAccountTextView;
|
|
|
|
@BindView
|
|
public TextView subtitle;
|
|
|
|
@BindView
|
|
public TextView title;
|
|
|
|
@BindView
|
|
public ImageView verifyEmailChecked;
|
|
|
|
@BindView
|
|
public ImageView verifyEmailIcon;
|
|
|
|
@BindView
|
|
public ImageView verifyEmailIndicator;
|
|
|
|
@BindView
|
|
public TextView verifyEmailTextView;
|
|
|
|
public abstract int f();
|
|
|
|
public abstract V g();
|
|
|
|
public abstract AbstractC5115bmu<V> h();
|
|
|
|
public abstract int j();
|
|
|
|
public abstract int l();
|
|
|
|
public abstract int m();
|
|
|
|
private void n(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] ^ c);
|
|
}
|
|
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
View inflate = layoutInflater.inflate(R.layout.2131559700, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
TextView textView = this.verifyEmailTextView;
|
|
TextView textView2 = null;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setText(getString(m()));
|
|
TextView textView3 = this.openAccountTextView;
|
|
if (textView3 == null) {
|
|
C14957gcv.a("");
|
|
textView3 = null;
|
|
}
|
|
textView3.setText(getString(j()));
|
|
TextView textView4 = this.setupAccountTextView;
|
|
if (textView4 == null) {
|
|
C14957gcv.a("");
|
|
textView4 = null;
|
|
}
|
|
textView4.setText(getString(l()));
|
|
TextView textView5 = this.reviewLoanTextView;
|
|
if (textView5 != null) {
|
|
textView2 = textView5;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
textView2.setText(getString(f()));
|
|
h().e((AbstractC5115bmu<V>) g());
|
|
AbstractC5115bmu<V> h = h();
|
|
if (h.f != 0) {
|
|
h.f.y();
|
|
}
|
|
h.c.e();
|
|
Tdc tdc = h.c;
|
|
tdc.d(tdc.i, new AbstractC5115bmu.RVV(h));
|
|
return inflate;
|
|
}
|
|
|
|
@Override // o.InterfaceC9245dgA
|
|
public final void c(AbstractC5115bmu.Sts sts) {
|
|
C14957gcv.e(sts, "");
|
|
int i = HBt.c[sts.ordinal()];
|
|
if (i == 1) {
|
|
c(R.drawable.background_bird_01);
|
|
return;
|
|
}
|
|
if (i == 2) {
|
|
c(R.drawable.background_bird_03);
|
|
} else {
|
|
if (i != 3 && i != 4) {
|
|
throw new NoWhenBranchMatchedException();
|
|
}
|
|
c(R.drawable.background_bird_02);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9245dgA
|
|
public final void b(AbstractC5115bmu.LWm lWm) {
|
|
C14957gcv.e(lWm, "");
|
|
int i = HBt.e[lWm.ordinal()];
|
|
ImageView imageView = null;
|
|
if (i == 1) {
|
|
ImageView imageView2 = this.verifyEmailIndicator;
|
|
if (imageView2 != null) {
|
|
imageView = imageView2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
imageView.setImageDrawable(nMh.getDrawable(requireContext(), R.drawable.shape_circle_cheque_purple));
|
|
return;
|
|
}
|
|
if (i == 2 || i == 3) {
|
|
i();
|
|
ImageView imageView3 = this.openAccountIndicator;
|
|
if (imageView3 != null) {
|
|
imageView = imageView3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
imageView.setImageDrawable(nMh.getDrawable(requireContext(), R.drawable.shape_circle_cheque_purple));
|
|
return;
|
|
}
|
|
if (i == 4) {
|
|
i();
|
|
ImageView imageView4 = this.openAccountIcon;
|
|
if (imageView4 == null) {
|
|
C14957gcv.a("");
|
|
imageView4 = null;
|
|
}
|
|
imageView4.setAlpha(0.4f);
|
|
ImageView imageView5 = this.openAccountChecked;
|
|
if (imageView5 == null) {
|
|
C14957gcv.a("");
|
|
imageView5 = null;
|
|
}
|
|
imageView5.setVisibility(0);
|
|
TextView textView = this.openAccountTextView;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
textView.setAlpha(0.4f);
|
|
ImageView imageView6 = this.setupAccountIndicator;
|
|
if (imageView6 != null) {
|
|
imageView = imageView6;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
imageView.setImageDrawable(nMh.getDrawable(requireContext(), R.drawable.shape_circle_cheque_purple));
|
|
return;
|
|
}
|
|
throw new NoWhenBranchMatchedException();
|
|
}
|
|
|
|
@OnClick
|
|
public final void onNextClicked() {
|
|
h().b();
|
|
}
|
|
|
|
@OnClick
|
|
public final void onHomeClicked() {
|
|
AbstractC5115bmu<V> h = h();
|
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.bmq
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9245dgA) obj).a();
|
|
}
|
|
};
|
|
if (h.f != 0) {
|
|
ieS.e(h.f);
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r6v3, types: [android.text.SpannableString, android.text.Spannable] */
|
|
/* JADX WARN: Type inference failed for: r6v6, types: [android.text.SpannableString, android.text.Spannable] */
|
|
private final void c(int i) {
|
|
int i2 = 2 % 2;
|
|
TextView textView = this.title;
|
|
if (textView == null) {
|
|
C14957gcv.a("");
|
|
textView = null;
|
|
}
|
|
Context context = textView.getContext();
|
|
String string = context.getString(R.string.hml_loan_setup_money_on_the_way);
|
|
if (string.startsWith(",*,)")) {
|
|
Object[] objArr = new Object[1];
|
|
n(string.substring(4), objArr);
|
|
string = ((String) objArr[0]).intern();
|
|
CharSequence text = context.getText(R.string.hml_loan_setup_money_on_the_way);
|
|
if (text instanceof Spanned) {
|
|
?? spannableString = new SpannableString(string);
|
|
TextUtils.copySpansFrom((SpannedString) text, 0, string.length(), Object.class, spannableString, 0);
|
|
string = spannableString;
|
|
}
|
|
}
|
|
textView.setText(string);
|
|
TextView textView2 = this.subtitle;
|
|
if (textView2 != null) {
|
|
int i3 = f + 5;
|
|
d = i3 % 128;
|
|
if (i3 % 2 != 0) {
|
|
int i4 = 11 / 0;
|
|
}
|
|
} else {
|
|
C14957gcv.a("");
|
|
textView2 = null;
|
|
}
|
|
Context context2 = textView2.getContext();
|
|
String string2 = context2.getString(R.string.hml_loan_setup_complete_steps);
|
|
if (string2.startsWith(",*,)")) {
|
|
int i5 = d + 75;
|
|
f = i5 % 128;
|
|
if (i5 % 2 == 0) {
|
|
Object[] objArr2 = new Object[1];
|
|
n(string2.substring(4), objArr2);
|
|
((String) objArr2[0]).intern();
|
|
boolean z = context2.getText(R.string.hml_loan_setup_complete_steps) instanceof Spanned;
|
|
throw null;
|
|
}
|
|
Object[] objArr3 = new Object[1];
|
|
n(string2.substring(4), objArr3);
|
|
string2 = ((String) objArr3[0]).intern();
|
|
CharSequence text2 = context2.getText(R.string.hml_loan_setup_complete_steps);
|
|
if (text2 instanceof Spanned) {
|
|
?? spannableString2 = new SpannableString(string2);
|
|
TextUtils.copySpansFrom((SpannedString) text2, 0, string2.length(), Object.class, spannableString2, 0);
|
|
string2 = spannableString2;
|
|
}
|
|
}
|
|
textView2.setText(string2);
|
|
ImageView imageView = this.header;
|
|
if (imageView == null) {
|
|
C14957gcv.a("");
|
|
imageView = null;
|
|
}
|
|
imageView.setImageDrawable(nMh.getDrawable(requireContext(), i));
|
|
int i6 = d + 7;
|
|
f = i6 % 128;
|
|
if (i6 % 2 == 0) {
|
|
throw null;
|
|
}
|
|
}
|
|
|
|
private final void i() {
|
|
ImageView imageView = this.verifyEmailIcon;
|
|
TextView textView = null;
|
|
if (imageView == null) {
|
|
C14957gcv.a("");
|
|
imageView = null;
|
|
}
|
|
imageView.setAlpha(0.4f);
|
|
ImageView imageView2 = this.verifyEmailChecked;
|
|
if (imageView2 == null) {
|
|
C14957gcv.a("");
|
|
imageView2 = null;
|
|
}
|
|
imageView2.setVisibility(0);
|
|
TextView textView2 = this.verifyEmailTextView;
|
|
if (textView2 != null) {
|
|
textView = textView2;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
textView.setAlpha(0.4f);
|
|
}
|
|
|
|
@Override // o.InterfaceC9245dgA
|
|
public final void d() {
|
|
AddAccountConsentActivity.e(getContext());
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final /* synthetic */ class HBt {
|
|
public static final int[] c;
|
|
public static final int[] e;
|
|
|
|
static {
|
|
int[] iArr = new int[AbstractC5115bmu.Sts.values().length];
|
|
try {
|
|
iArr[AbstractC5115bmu.Sts.NO_VERIFIED.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
iArr[AbstractC5115bmu.Sts.NO_VALUE_VERIFIED.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
iArr[AbstractC5115bmu.Sts.OPEN_VERIFIED.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
try {
|
|
iArr[AbstractC5115bmu.Sts.ADD_VERIFIED.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused4) {
|
|
}
|
|
c = iArr;
|
|
int[] iArr2 = new int[AbstractC5115bmu.LWm.values().length];
|
|
try {
|
|
iArr2[AbstractC5115bmu.LWm.VERIFY_EMAIL.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused5) {
|
|
}
|
|
try {
|
|
iArr2[AbstractC5115bmu.LWm.OPEN_ACCOUNT.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused6) {
|
|
}
|
|
try {
|
|
iArr2[AbstractC5115bmu.LWm.ADD_ACCOUNT.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused7) {
|
|
}
|
|
try {
|
|
iArr2[AbstractC5115bmu.LWm.SETUP_LOAN.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused8) {
|
|
}
|
|
e = iArr2;
|
|
}
|
|
}
|
|
}
|