321 lines
11 KiB
Java
321 lines
11 KiB
Java
package com.scb.phone.view.fragment.profilemanagement.accounts;
|
|
|
|
import android.os.Bundle;
|
|
import android.view.KeyEvent;
|
|
import android.view.LayoutInflater;
|
|
import android.view.MenuItem;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.Button;
|
|
import android.widget.TextView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.profilemanagement.accounts.VerifyIdentityTipsActivity;
|
|
import com.scb.phone.view.custom.common.CustomATMInput;
|
|
import com.scb.phone.view.custom.common.CustomCardInformationInput;
|
|
import com.scb.phone.view.fragment.profilemanagement.accounts.VerifyIdentityFragment;
|
|
import o.C15602gz;
|
|
import o.C7796cvA;
|
|
import o.C7918cxR;
|
|
import o.C7919cxS;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC9532dlX;
|
|
import o.ZI;
|
|
import o.iZJ;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class VerifyIdentityFragment extends Hilt_VerifyIdentityFragment implements InterfaceC9532dlX {
|
|
|
|
@BindView
|
|
CustomCardInformationInput cardNoInput;
|
|
|
|
@BindView
|
|
Button confirmButton;
|
|
|
|
@BindView
|
|
CustomATMInput pinInput;
|
|
|
|
@InterfaceC13391fZD
|
|
public C7796cvA presenter;
|
|
private TextView.OnEditorActionListener c = new TextView.OnEditorActionListener(this) { // from class: o.fuX
|
|
private VerifyIdentityFragment e;
|
|
|
|
@Override // android.widget.TextView.OnEditorActionListener
|
|
public final boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
|
|
return VerifyIdentityFragment.d(this.e, i);
|
|
}
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
};
|
|
private TextView.OnEditorActionListener d = new TextView.OnEditorActionListener(this) { // from class: o.fuU
|
|
private VerifyIdentityFragment d;
|
|
|
|
@Override // android.widget.TextView.OnEditorActionListener
|
|
public final boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
|
|
return VerifyIdentityFragment.e(this.d, i);
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
}
|
|
};
|
|
|
|
public static VerifyIdentityFragment l() {
|
|
Bundle bundle = new Bundle();
|
|
VerifyIdentityFragment verifyIdentityFragment = new VerifyIdentityFragment();
|
|
verifyIdentityFragment.setArguments(bundle);
|
|
return verifyIdentityFragment;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
super.onCreateView(layoutInflater, viewGroup, bundle);
|
|
View inflate = layoutInflater.inflate(R.layout.2131559975, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
this.confirmButton.setEnabled(false);
|
|
this.cardNoInput.setCardInputListener(new CustomCardInformationInput.Sts(this) { // from class: com.scb.phone.view.fragment.profilemanagement.accounts.VerifyIdentityFragment.5
|
|
private VerifyIdentityFragment c;
|
|
|
|
{
|
|
this.c = this;
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.CustomCardInformationInput.Sts
|
|
public final void b(boolean z) {
|
|
this.c.cardNoInput.setIcon(z ? R.drawable.ic_sample_card_grey : R.drawable.ic_sample_card);
|
|
VerifyIdentityFragment.c(this.c);
|
|
this.c.cardNoInput.setErrorValidationVisibility(8);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.CustomCardInformationInput.Sts
|
|
public final void a(String str) {
|
|
this.c.presenter.e(str, false);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.CustomCardInformationInput.Sts
|
|
public final void e(String str) {
|
|
this.c.presenter.e(str, true);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.CustomCardInformationInput.Sts
|
|
public final void d() {
|
|
this.c.confirmButton.setEnabled(false);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.CustomCardInformationInput.Sts
|
|
public final void d(boolean z) {
|
|
this.c.presenter.a(z);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.CustomCardInformationInput.Sts
|
|
public final String c(String str) {
|
|
iZJ izj = this.c.presenter.a;
|
|
return C15602gz.b(str, "[^0-9]", "XXXX XXXX XXXX XXXX");
|
|
}
|
|
});
|
|
this.cardNoInput.setCardNoEditorActionListener(this.d);
|
|
this.cardNoInput.setCardNumber("");
|
|
this.cardNoInput.setIcon(R.drawable.ic_sample_card_grey);
|
|
this.cardNoInput.setRegularText();
|
|
this.cardNoInput.setOnFocusLostListener(new Runnable(this) { // from class: o.fvb
|
|
private VerifyIdentityFragment e;
|
|
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
VerifyIdentityFragment.d(this.e);
|
|
}
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
});
|
|
this.pinInput.setCardInputListener(new CustomATMInput.Sts(this) { // from class: com.scb.phone.view.fragment.profilemanagement.accounts.VerifyIdentityFragment.1
|
|
private VerifyIdentityFragment c;
|
|
|
|
{
|
|
this.c = this;
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.CustomATMInput.Sts
|
|
public final void e(boolean z) {
|
|
this.c.presenter.d(z);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.custom.common.CustomATMInput.Sts
|
|
public final void a(String str) {
|
|
this.c.presenter.e(str);
|
|
}
|
|
});
|
|
this.pinInput.setOnEditorActionListener(this.c);
|
|
this.pinInput.setATMNumber("");
|
|
this.pinInput.setHint(getString(R.string.unknown_pin_hint));
|
|
this.cardNoInput.setHeaderVisibility(8);
|
|
this.confirmButton.setOnClickListener(new View.OnClickListener(this) { // from class: o.fuT
|
|
private VerifyIdentityFragment c;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
this.c.presenter.c();
|
|
}
|
|
|
|
{
|
|
this.c = this;
|
|
}
|
|
});
|
|
this.presenter.e((C7796cvA) this);
|
|
return inflate;
|
|
}
|
|
|
|
@Override // o.InterfaceC9289dgt
|
|
public final void b() {
|
|
this.cardNoInput.setIcon(R.drawable.ic_sample_card_grey);
|
|
this.pinInput.setHint(getString(R.string.unknown_pin_hint));
|
|
}
|
|
|
|
@Override // o.InterfaceC9289dgt
|
|
public final void c() {
|
|
this.cardNoInput.setIcon(R.drawable.ic_atm_card);
|
|
this.pinInput.setHint(getString(R.string.atm_pin_hint));
|
|
}
|
|
|
|
@Override // o.InterfaceC9289dgt
|
|
public final void a() {
|
|
this.cardNoInput.setIcon(R.drawable.ic_credit_card);
|
|
this.pinInput.setHint(getString(R.string.cc_pin_hint));
|
|
}
|
|
|
|
@Override // o.InterfaceC9289dgt
|
|
public final void e() {
|
|
this.cardNoInput.setIcon(R.drawable.ic_sample_card);
|
|
this.pinInput.setHint(getString(R.string.unknown_pin_hint));
|
|
}
|
|
|
|
@Override // o.InterfaceC9289dgt
|
|
public final void d() {
|
|
this.cardNoInput.setErrorValidationVisibility(0);
|
|
}
|
|
|
|
@Override // o.InterfaceC9289dgt
|
|
public final void j() {
|
|
this.presenter.a();
|
|
this.presenter.d(this.pinInput.a());
|
|
this.cardNoInput.setErrorValidationVisibility(8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9289dgt
|
|
public final void f() {
|
|
this.presenter.d();
|
|
this.presenter.d(this.pinInput.a());
|
|
this.cardNoInput.setErrorValidationVisibility(8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9591dmd
|
|
public final void b(boolean z) {
|
|
this.confirmButton.setEnabled(z);
|
|
}
|
|
|
|
@Override // o.InterfaceC9591dmd
|
|
public final void i() {
|
|
if (getActivity() != null) {
|
|
getActivity().setResult(-1);
|
|
getActivity().onBackPressed();
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9591dmd
|
|
public final void k() {
|
|
this.pinInput.atmPin.requestFocus();
|
|
}
|
|
|
|
@Override // o.InterfaceC9532dlX
|
|
public final void c(String str) {
|
|
i(str);
|
|
}
|
|
|
|
@Override // o.InterfaceC9532dlX
|
|
public final void h() {
|
|
this.cardNoInput.setErrorValidationVisibility(0);
|
|
}
|
|
|
|
@Override // o.InterfaceC9591dmd
|
|
public final void o() {
|
|
this.pinInput.atmPin.requestFocus();
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public boolean onOptionsItemSelected(MenuItem menuItem) {
|
|
if (menuItem.getItemId() != R.id.menu_action_bulk_transfer_help) {
|
|
return super.onOptionsItemSelected(menuItem);
|
|
}
|
|
C7796cvA c7796cvA = this.presenter;
|
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.cvx
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9532dlX) obj).g();
|
|
}
|
|
};
|
|
if (c7796cvA.f == 0) {
|
|
return true;
|
|
}
|
|
ieS.e(c7796cvA.f);
|
|
return true;
|
|
}
|
|
|
|
@Override // o.InterfaceC9532dlX
|
|
public final void g() {
|
|
if (getContext() != null) {
|
|
VerifyIdentityTipsActivity.e(getContext());
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ boolean d(VerifyIdentityFragment verifyIdentityFragment, int i) {
|
|
if (i != 6) {
|
|
return false;
|
|
}
|
|
C7796cvA c7796cvA = verifyIdentityFragment.presenter;
|
|
C7918cxR c7918cxR = new C7918cxR(c7796cvA);
|
|
if (c7796cvA.f == 0) {
|
|
return true;
|
|
}
|
|
c7918cxR.e(c7796cvA.f);
|
|
return true;
|
|
}
|
|
|
|
public static /* synthetic */ boolean e(VerifyIdentityFragment verifyIdentityFragment, int i) {
|
|
if (i != 5) {
|
|
return false;
|
|
}
|
|
C7796cvA c7796cvA = verifyIdentityFragment.presenter;
|
|
C7919cxS c7919cxS = new C7919cxS(c7796cvA);
|
|
if (c7796cvA.f == 0) {
|
|
return true;
|
|
}
|
|
c7919cxS.e(c7796cvA.f);
|
|
return true;
|
|
}
|
|
|
|
public static /* synthetic */ void d(VerifyIdentityFragment verifyIdentityFragment) {
|
|
verifyIdentityFragment.cardNoInput.setErrorInLine(R.string.invalid_account_inline_error);
|
|
C7796cvA c7796cvA = verifyIdentityFragment.presenter;
|
|
if (c7796cvA.g) {
|
|
return;
|
|
}
|
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.cvB
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC9532dlX) obj).h();
|
|
}
|
|
};
|
|
if (c7796cvA.f != 0) {
|
|
ieS.e(c7796cvA.f);
|
|
}
|
|
}
|
|
|
|
static /* synthetic */ void c(VerifyIdentityFragment verifyIdentityFragment) {
|
|
verifyIdentityFragment.pinInput.setHint(verifyIdentityFragment.getString(R.string.unknown_pin_hint));
|
|
}
|
|
}
|