what-the-bank/sources/com/scb/phone/view/fragment/ntb/touchpoint/TouchPointPinFragment.java

370 lines
13 KiB
Java

package com.scb.phone.view.fragment.ntb.touchpoint;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.huawei.hms.support.api.entity.common.CommonConstant;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.demo.ntb.NTBLandingActivity;
import com.scb.phone.view.activity.forgotpin.PinLockActivity;
import com.scb.phone.view.activity.ntb.NtbOpenAccountLandingActivity;
import com.scb.phone.view.activity.ntb.ReviewInfoResultActivity;
import com.scb.phone.view.activity.ntb.fatca.FatcaErrorActivity;
import com.scb.phone.view.activity.ntb.touchpoint.TouchPointFatcaActivity;
import com.scb.phone.view.activity.ntb.touchpoint.TouchPointSelectAccountActivity;
import com.scb.phone.view.custom.login.CustomKeypad;
import com.scb.phone.view.custom.login.CustomPinInput;
import com.scb.phone.view.fragment.BaseFragment;
import com.scb.phone.view.fragment.registration.RegistrationFacialRecognitionLandingActivity;
import com.squareup.picasso.Picasso;
import o.C0996Tg;
import o.C0997Th;
import o.C13020fOa;
import o.C14957gcv;
import o.C6968cfS;
import o.EnumC1258Zb;
import o.EnumC8951daY;
import o.IHt;
import o.InterfaceC10433eDx;
import o.InterfaceC12980fNE;
import o.InterfaceC13391fZD;
import o.InterfaceC9459dkD;
import o.fJE;
import o.fLI;
import o.guQ;
/* loaded from: classes5.dex */
public final class TouchPointPinFragment extends Hilt_TouchPointPinFragment implements InterfaceC10433eDx, InterfaceC9459dkD.LWm {
public static final IeS c = new IeS(0);
@BindView
public CustomKeypad customKeypad;
@BindView
public CustomPinInput customPinInput;
@BindView
public ImageView pinAvatar;
@BindView
public TextView pinTouchPointName;
@InterfaceC13391fZD
public C6968cfS presenter;
@Override // o.InterfaceC10433eDx
public final void S_() {
}
@Override // o.InterfaceC10433eDx
public final void T_() {
}
@Override // o.InterfaceC9307dhK
public final void b() {
}
@Override // o.InterfaceC9307dhK
public final void d() {
}
/* loaded from: classes5.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(byte b) {
this();
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559955, viewGroup, false);
((BaseFragment) this).a = ButterKnife.c(this, inflate);
return inflate;
}
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
Parcelable parcelable;
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
CustomPinInput customPinInput = this.customPinInput;
ImageView imageView = null;
if (customPinInput == null) {
C14957gcv.a("");
customPinInput = null;
}
customPinInput.setPinInputListener(this);
CustomKeypad customKeypad = this.customKeypad;
if (customKeypad == null) {
C14957gcv.a("");
customKeypad = null;
}
CustomPinInput customPinInput2 = this.customPinInput;
if (customPinInput2 == null) {
C14957gcv.a("");
customPinInput2 = null;
}
customKeypad.setKeypadListener(customPinInput2);
CustomKeypad customKeypad2 = this.customKeypad;
if (customKeypad2 == null) {
C14957gcv.a("");
customKeypad2 = null;
}
customKeypad2.setEnabledLines(true);
C6968cfS c6968cfS = this.presenter;
if (c6968cfS == null) {
C14957gcv.a("");
c6968cfS = null;
}
c6968cfS.e((C6968cfS) this);
Bundle arguments = getArguments();
if (arguments != null) {
if (Build.VERSION.SDK_INT >= 33) {
parcelable = (Parcelable) arguments.getParcelable("EXTRA_INFO_DISPLAY", C0996Tg.class);
} else {
Parcelable parcelable2 = arguments.getParcelable("EXTRA_INFO_DISPLAY");
if (!(parcelable2 instanceof C0996Tg)) {
parcelable2 = null;
}
parcelable = (C0996Tg) parcelable2;
}
C0996Tg c0996Tg = (C0996Tg) parcelable;
if (c0996Tg != null) {
TextView textView = this.pinTouchPointName;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
textView.setText(c0996Tg.d);
if (c0996Tg.c.length() > 0) {
C13020fOa e = Picasso.d().e(c0996Tg.c);
e.a.c(new fLI());
ImageView imageView2 = this.pinAvatar;
if (imageView2 != null) {
imageView = imageView2;
} else {
C14957gcv.a("");
}
e.aBu_(imageView, new LWm(this));
return;
}
ImageView imageView3 = this.pinAvatar;
if (imageView3 != null) {
imageView = imageView3;
} else {
C14957gcv.a("");
}
ImageView imageView4 = imageView;
C14957gcv.e(imageView4, "");
imageView4.setVisibility(8);
}
}
}
/* loaded from: classes5.dex */
public static final class LWm implements InterfaceC12980fNE {
private TouchPointPinFragment c;
@Override // o.InterfaceC12980fNE
public final void d() {
}
LWm(TouchPointPinFragment touchPointPinFragment) {
this.c = touchPointPinFragment;
}
@Override // o.InterfaceC12980fNE
public final void b(Exception exc) {
C14957gcv.e(exc, "");
ImageView imageView = this.c.pinAvatar;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
ImageView imageView2 = imageView;
C14957gcv.e(imageView2, "");
imageView2.setVisibility(8);
}
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroy() {
C6968cfS c6968cfS = this.presenter;
if (c6968cfS == null) {
C14957gcv.a("");
c6968cfS = null;
}
c6968cfS.w_();
super.onDestroy();
}
@Override // o.InterfaceC9459dkD.LWm
public final void e() {
NtbOpenAccountLandingActivity.b(new Object[]{getContext()}, -2088391552, 2088391552, (int) System.currentTimeMillis());
}
@Override // o.InterfaceC10433eDx
public final void o_(String str) {
Parcelable parcelable;
C14957gcv.e(str, "");
Bundle arguments = getArguments();
if (arguments != null) {
C6968cfS c6968cfS = null;
if (Build.VERSION.SDK_INT >= 33) {
parcelable = (Parcelable) arguments.getParcelable("EXTRA_INFO_DISPLAY", C0996Tg.class);
} else {
Parcelable parcelable2 = arguments.getParcelable("EXTRA_INFO_DISPLAY");
if (!(parcelable2 instanceof C0996Tg)) {
parcelable2 = null;
}
parcelable = (C0996Tg) parcelable2;
}
C0996Tg c0996Tg = (C0996Tg) parcelable;
if (c0996Tg != null) {
C6968cfS c6968cfS2 = this.presenter;
if (c6968cfS2 != null) {
c6968cfS = c6968cfS2;
} else {
C14957gcv.a("");
}
c6968cfS.c(c0996Tg, str);
}
}
}
@Override // o.InterfaceC9307dhK
public final void b(String str) {
C14957gcv.e(str, "");
FragmentActivity activity = getActivity();
C14957gcv.d(activity, "");
FragmentActivity fragmentActivity = activity;
EnumC8951daY enumC8951daY = EnumC8951daY.ERROR;
if (getActivity() != null) {
BaseActivity.a(new Object[]{(BaseActivity) getActivity(), fragmentActivity, Integer.valueOf(R.id.view_group_root), str, enumC8951daY}, 855668825, -855668822, R.id.view_group_root);
}
}
@Override // o.InterfaceC9307dhK
public final void c() {
CustomPinInput customPinInput = this.customPinInput;
if (customPinInput == null) {
C14957gcv.a("");
customPinInput = null;
}
customPinInput.a();
}
@Override // o.InterfaceC9459dkD.LWm
public final void d(C0997Th c0997Th, boolean z) {
C14957gcv.e(c0997Th, "");
if (!z) {
c0997Th.b = new fJE();
}
FragmentActivity activity = getActivity();
if (activity != null) {
activity.startActivity(ReviewInfoResultActivity.ajz_(activity, c0997Th));
activity.finish();
}
}
@Override // o.InterfaceC9459dkD.LWm
public final void c(String str, EnumC8951daY enumC8951daY) {
C14957gcv.e(enumC8951daY, "");
FragmentActivity activity = getActivity();
if (activity != null) {
FragmentActivity fragmentActivity = activity;
if (getActivity() != null) {
BaseActivity.a(new Object[]{(BaseActivity) getActivity(), fragmentActivity, Integer.valueOf(R.id.view_group_root), str, enumC8951daY}, 855668825, -855668822, R.id.view_group_root);
}
}
}
@Override // o.InterfaceC9459dkD.LWm
public final void f() {
if (getContext() != null) {
Intent intent = new Intent(getContext(), (Class<?>) FatcaErrorActivity.class);
intent.putExtra("EXTRA_TITLE", R.string.fatca_error_open_account_title);
startActivity(intent);
FragmentActivity activity = getActivity();
if (activity != null) {
activity.finish();
}
}
}
@Override // o.InterfaceC9459dkD.LWm
public final void g() {
PinLockActivity.d(getContext());
}
@Override // o.InterfaceC9459dkD.LWm
public final void j() {
TouchPointSelectAccountActivity.IeS ieS = TouchPointSelectAccountActivity.m;
Context requireContext = requireContext();
C14957gcv.c(requireContext, "");
C14957gcv.e(requireContext, "");
startActivity(new Intent(requireContext, (Class<?>) TouchPointSelectAccountActivity.class));
}
@Override // o.InterfaceC9459dkD.LWm
public final void i() {
TouchPointFatcaActivity.Sts sts = TouchPointFatcaActivity.l;
Context requireContext = requireContext();
C14957gcv.c(requireContext, "");
C14957gcv.e(requireContext, "");
startActivity(new Intent(requireContext, (Class<?>) TouchPointFatcaActivity.class));
requireActivity().finish();
}
@Override // o.InterfaceC9459dkD.LWm
public final void a(String str) {
C14957gcv.e(str, "");
try {
startActivity(new Intent(CommonConstant.ACTION.HWID_SCHEME_URL, Uri.parse(str)));
} catch (ActivityNotFoundException e) {
guQ.a("open deeplink exception = ".concat(String.valueOf(e)), new Object[0]);
}
}
@Override // o.InterfaceC9459dkD.LWm
public final void e(String str, IHt iHt) {
C14957gcv.e(iHt, "");
CustomPinInput customPinInput = this.customPinInput;
if (customPinInput == null) {
C14957gcv.a("");
customPinInput = null;
}
customPinInput.a();
RegistrationFacialRecognitionLandingActivity.IeS ieS = RegistrationFacialRecognitionLandingActivity.l;
Context requireContext = requireContext();
C14957gcv.c(requireContext, "");
startActivity(RegistrationFacialRecognitionLandingActivity.IeS.awY_(requireContext, EnumC1258Zb.TOUCH_POINT, str, iHt.c, iHt.f, iHt.a));
}
@Override // o.InterfaceC9459dkD.LWm
public final void h() {
startActivity(NTBLandingActivity.adR_(getContext(), true));
FragmentActivity activity = getActivity();
if (activity != null) {
activity.finish();
}
}
}