package com.scb.phone.view.fragment.profilemanagement; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.net.Uri; import android.os.Bundle; import android.os.Parcelable; import android.provider.MediaStore; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import androidx.core.widget.NestedScrollView; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; 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.PreLoadCheckActivity; import com.scb.phone.view.activity.accountDeletion.EasyAppAccountDeletionActivity; import com.scb.phone.view.activity.bscanc.ManageQrToPayActivity; import com.scb.phone.view.activity.customizeyourpages.CustomizeYourPageActivity; import com.scb.phone.view.activity.ebillsubscription.EBillSubscriptionActivity; import com.scb.phone.view.activity.emailverification.ManageEmailLandingActivity; import com.scb.phone.view.activity.fastpay.ManageFastPayQrScanActivity; import com.scb.phone.view.activity.friends.FriendsLandingActivity; import com.scb.phone.view.activity.mailingaddress.GoodToKnowActivity; import com.scb.phone.view.activity.manageverification.ManageVerificationActivity; import com.scb.phone.view.activity.mediaimage.MediaImagePreviewActivity; import com.scb.phone.view.activity.ndid.NdidMenuActivity; import com.scb.phone.view.activity.personallimit.PersonalLimitActivity; import com.scb.phone.view.activity.pinchange.PinChangeActivity; import com.scb.phone.view.activity.profilemanagement.ManageNotificationsActivity; import com.scb.phone.view.activity.profilemanagement.manageaccountinbound.ManageAccountInboundActivity; import com.scb.phone.view.activity.profilemanagement.manageaccounts.AccountManagementActivity; import com.scb.phone.view.activity.profilemanagement.promptpay.PromptPayTermsAndConditionsLandingActivity; import com.scb.phone.view.activity.transferandpay.EditFavouriteActivity; import com.scb.phone.view.custom.common.CustomDialog; import com.scb.phone.view.fragment.BaseFragment; import com.scb.phone.view.fragment.profilemanagement.ProfileManagementFragment; import java.util.List; import o.AbstractC13163fSk; import o.AbstractC14961gcz; import o.C0391Fn; import o.C10457eEr; import o.C12459eyc; import o.C12891fKc; import o.C14496fuM; import o.C14866gag; import o.C14957gcv; import o.C7758cuP; import o.EsJ; import o.InterfaceC12868fJl; import o.InterfaceC12878fJv; import o.InterfaceC13391fZD; import o.InterfaceC14894gbR; import o.InterfaceC15577gud; import o.InterfaceC8970dar; import o.PcV; import o.RH; import o.VY; import o.fSQ; import o.gHK; import o.glR; import o.guQ; import o.qeC; import o.xhu; /* loaded from: classes5.dex */ public final class ProfileManagementFragment extends Hilt_ProfileManagementFragment implements InterfaceC8970dar, InterfaceC12868fJl { public boolean c; private EsJ d; private InterfaceC12878fJv j; @InterfaceC13391fZD public C7758cuP profileManagementPresenter; /* loaded from: classes5.dex */ public static final class RVV { private RVV() { } public /* synthetic */ RVV(byte b) { this(); } } @Override // androidx.fragment.app.Fragment public final void onViewCreated(View view, Bundle bundle) { C14957gcv.e(view, ""); super.onViewCreated(view, bundle); aa(); C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.e((C7758cuP) this); AbstractC13163fSk Ge_ = glR.Ge_(getContext(), new IntentFilter("com.scb.phone/BROADCAST_PROFILE_UPDATED")); final IeS ieS = new IeS(this); fSQ fsq = new fSQ(ieS) { // from class: o.fuF private InterfaceC14894gbR e; @Override // o.fSQ public final void c(Object obj) { ProfileManagementFragment.b(this.e, obj); } { this.e = ieS; } }; final HBt hBt = HBt.e; ((BaseFragment) this).b = Ge_.subscribe(fsq, new fSQ(hBt) { // from class: o.fuE private InterfaceC14894gbR e; @Override // o.fSQ public final void c(Object obj) { ProfileManagementFragment.c(this.e, obj); } { this.e = hBt; } }); M(); EsJ esJ = this.d; C14957gcv.e(esJ); esJ.d.setOnClickListener(new View.OnClickListener(this) { // from class: o.fuI private ProfileManagementFragment e; @Override // android.view.View.OnClickListener public final void onClick(View view2) { ProfileManagementFragment.b(this.e); } { this.e = this; } }); } /* loaded from: classes5.dex */ static final class HBt extends AbstractC14961gcz implements InterfaceC14894gbR { public static final HBt e = new HBt(); @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Throwable th) { guQ.a(th); return C14866gag.c; } HBt() { super(1); } } /* loaded from: classes5.dex */ static final class IeS extends AbstractC14961gcz implements InterfaceC14894gbR { private ProfileManagementFragment c; @Override // o.InterfaceC14894gbR public final /* synthetic */ C14866gag invoke(Intent intent) { ProfileManagementFragment.c(this.c); return C14866gag.c; } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ IeS(ProfileManagementFragment profileManagementFragment) { super(1); this.c = profileManagementFragment; } } /* JADX WARN: Multi-variable type inference failed */ @Override // com.scb.phone.view.fragment.profilemanagement.Hilt_ProfileManagementFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment public final void onAttach(Context context) { C14957gcv.e(context, ""); super.onAttach(context); if (context instanceof InterfaceC12878fJv) { this.j = (InterfaceC12878fJv) context; } } private final void M() { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.d(gHK.JURISTIC == (getActivity() instanceof PreLoadCheckActivity ? ((PreLoadCheckActivity) getActivity()).al() : null)); } @Override // o.InterfaceC8970dar public final void b(C0391Fn c0391Fn) { C14957gcv.e(c0391Fn, ""); EsJ esJ = this.d; C14957gcv.e(esJ); esJ.e.setText(c0391Fn.a); Context context = getContext(); if (context != null) { C14957gcv.e(context, ""); TypedValue typedValue = new TypedValue(); context.getTheme().resolveAttribute(R.attr.profilePlaceholder, typedValue, true); int i = typedValue.resourceId; EsJ esJ2 = this.d; C14957gcv.e(esJ2); C12891fKc.aze_(i, esJ2.c, c0391Fn.b); } } @Override // o.InterfaceC8970dar public final void c(List list) { C14957gcv.e(list, ""); getContext(); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(1, false); EsJ esJ = this.d; C14957gcv.e(esJ); RecyclerView recyclerView = esJ.b; recyclerView.setLayoutManager(linearLayoutManager); recyclerView.setNestedScrollingEnabled(false); recyclerView.setFocusable(false); Context context = recyclerView.getContext(); C14957gcv.c(context, ""); recyclerView.setAdapter(new C12459eyc(list, this, context)); } @Override // o.InterfaceC12868fJl public final void e(int i) { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.d(i); } @Override // o.InterfaceC12868fJl public final void e(boolean z, int i) { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.a(z, i); } @Override // o.InterfaceC8970dar public final void g() { InterfaceC12878fJv interfaceC12878fJv = this.j; if (interfaceC12878fJv == null) { C14957gcv.a(""); interfaceC12878fJv = null; } interfaceC12878fJv.j(); } @Override // o.InterfaceC8970dar public final void n() { startActivityForResult(new Intent(getContext(), (Class) ManageEmailLandingActivity.class), 10004); } @Override // o.InterfaceC8970dar public final void i() { startActivity(new Intent(getContext(), (Class) PinChangeActivity.class)); } @Override // o.InterfaceC8970dar public final void m() { AccountManagementActivity.e(getContext(), false); } @Override // o.InterfaceC8970dar public final void z() { PromptPayTermsAndConditionsLandingActivity.c(getContext()); } @Override // o.InterfaceC8970dar public final void F() { startActivity(new Intent(getContext(), (Class) PersonalLimitActivity.class)); } @Override // o.InterfaceC8970dar public final void w() { ManageNotificationsActivity.e(getContext()); } @Override // o.InterfaceC8970dar public final void C() { startActivity(new Intent(getContext(), (Class) CustomizeYourPageActivity.class)); } @Override // o.InterfaceC8970dar public final void f() { startActivity(new Intent(getContext(), (Class) EasyAppAccountDeletionActivity.class)); } @Override // o.InterfaceC8970dar public final void I() { Intent intent = new Intent(getContext(), (Class) EditFavouriteActivity.class); intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TITLE", getString(R.string.favorite_top_up_empty)); intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TAG", "TOPUP"); startActivity(intent); } @Override // o.InterfaceC8970dar public final void k() { Intent intent = new Intent(getContext(), (Class) EditFavouriteActivity.class); intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TITLE", getString(R.string.favorite_bill_payment_empty)); intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TAG", "BILLPAYMENT"); startActivity(intent); } @Override // o.InterfaceC8970dar public final void G() { Intent intent = new Intent(getContext(), (Class) EditFavouriteActivity.class); intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TITLE", getString(R.string.favorite_transfer_empty)); intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TAG", "TRANSFER"); startActivity(intent); } @Override // o.InterfaceC8970dar public final void B() { Intent intent = new Intent(getContext(), (Class) EditFavouriteActivity.class); intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TITLE", getString(R.string.favorite_remittance_title)); intent.putExtra("com.scb.phone.EXTRA_EDIT_FAVOURITE_TAG", "REMITTANCE"); startActivity(intent); } @Override // o.InterfaceC8970dar public final void A() { xhu xhuVar = new xhu(); if (getActivity() != null) { xhuVar.c(((BaseActivity) getActivity()).scbAnalytics, "fastpay_managefastpay"); } startActivityForResult(new Intent(getContext(), (Class) ManageFastPayQrScanActivity.class), 10005); } @Override // o.InterfaceC8970dar public final void D() { ManageQrToPayActivity.RVV rvv = ManageQrToPayActivity.f6597o; Context requireContext = requireContext(); C14957gcv.c(requireContext, ""); startActivity(ManageQrToPayActivity.RVV.YJ_(requireContext, null, true)); } @Override // o.InterfaceC8970dar public final void r() { if (getContext() != null) { GoodToKnowActivity.Sts sts = GoodToKnowActivity.b; Context requireContext = requireContext(); C14957gcv.c(requireContext, ""); C14957gcv.e(requireContext, ""); startActivityForResult(new Intent(requireContext, (Class) GoodToKnowActivity.class), 10004); } } @Override // o.InterfaceC8970dar public final void l() { ManageAccountInboundActivity.HBt hBt = ManageAccountInboundActivity.k; Context context = getContext(); if (context != null) { context.startActivity(new Intent(context, (Class) ManageAccountInboundActivity.class)); } } @Override // o.InterfaceC8970dar public final void s() { if (getContext() != null) { NdidMenuActivity.IeS ieS = NdidMenuActivity.f7624o; Context requireContext = requireContext(); C14957gcv.c(requireContext, ""); C14957gcv.e(requireContext, ""); startActivity(new Intent(requireContext, (Class) NdidMenuActivity.class)); } } @Override // o.InterfaceC8970dar public final void d(RH rh) { C14957gcv.e(rh, ""); ManageVerificationActivity.LWm lWm = ManageVerificationActivity.f7562o; Context requireContext = requireContext(); C14957gcv.c(requireContext, ""); C14957gcv.e(requireContext, ""); Intent intent = new Intent(requireContext, (Class) ManageVerificationActivity.class); intent.putExtra("EXTRA_MANAGE_VERIFICATION_DISPLAY", rh); startActivity(intent); } @Override // o.InterfaceC8970dar public final void E() { ManageVerificationActivity.LWm lWm = ManageVerificationActivity.f7562o; Context requireContext = requireContext(); C14957gcv.c(requireContext, ""); C14957gcv.e(requireContext, ""); Intent intent = new Intent(requireContext, (Class) ManageVerificationActivity.class); intent.putExtra("EXTRA_MANAGE_VERIFICATION_DISPLAY", (Parcelable) null); startActivity(intent); } @Override // o.InterfaceC8970dar public final void h() { startActivity(new Intent(getContext(), (Class) EBillSubscriptionActivity.class)); } @Override // o.InterfaceC8970dar public final void b(String str) { C14957gcv.e(str, ""); v("settings_scb_connect"); try { Intent intent = new Intent(CommonConstant.ACTION.HWID_SCHEME_URL); intent.setData(Uri.parse(str)); intent.setFlags(603979776); startActivity(intent); } catch (ActivityNotFoundException e) { guQ.e(e); } catch (NullPointerException e2) { guQ.e(e2); } } @Override // o.InterfaceC8970dar public final void o() { Context requireContext = requireContext(); C14957gcv.c(requireContext, ""); C14957gcv.e(requireContext, ""); startActivity(new Intent(requireContext, (Class) FriendsLandingActivity.class)); PcV pcV = new PcV(); if (getActivity() != null) { pcV.c(((BaseActivity) getActivity()).scbAnalytics, "settings_friends_get_friends"); } } @Override // androidx.fragment.app.Fragment public final void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) { C14957gcv.e(strArr, ""); C14957gcv.e(iArr, ""); super.onRequestPermissionsResult(i, strArr, iArr); C14496fuM.c(this, i, iArr); } @Override // o.InterfaceC8970dar public final void H() { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.b(false); } @Override // o.InterfaceC8970dar public final void d() { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.a(true); } @Override // o.InterfaceC8970dar public final void e() { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.a(false); } @Override // o.InterfaceC8970dar public final void a() { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } C7758cuP.b(new Object[]{c7758cuP, true}, -580384576, 580384580, System.identityHashCode(c7758cuP)); } @Override // o.InterfaceC8970dar public final void b() { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } C7758cuP.b(new Object[]{c7758cuP, false}, -580384576, 580384580, System.identityHashCode(c7758cuP)); } @Override // o.InterfaceC8970dar public final void j() { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.e(true); } @Override // o.InterfaceC8970dar public final void c() { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.e(false); } public final void L() { guQ.b("onPermissionDenied", new Object[0]); C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.b(this.c); } public final void N() { guQ.b("onPermissionDeniedAndroid13", new Object[0]); C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.b(this.c); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onActivityResult(int i, int i2, Intent intent) { if (i != 10003 || i2 != -1) { if (i == 10004) { M(); return; } if (i == 10005) { EsJ esJ = this.d; C14957gcv.e(esJ); final int verticalScrollbarPosition = esJ.b.getVerticalScrollbarPosition(); M(); EsJ esJ2 = this.d; C14957gcv.e(esJ2); esJ2.b.post(new Runnable(this, verticalScrollbarPosition) { // from class: o.fuH private int a; private ProfileManagementFragment d; @Override // java.lang.Runnable public final void run() { ProfileManagementFragment.a(this.d, this.a); } { this.d = this; this.a = verticalScrollbarPosition; } }); return; } return; } if (intent != null) { MediaImagePreviewActivity.LWm lWm = MediaImagePreviewActivity.l; C14957gcv.e(intent, ""); if (!intent.getBooleanExtra("isCropped", false)) { MediaImagePreviewActivity.LWm lWm2 = MediaImagePreviewActivity.l; Context requireContext = requireContext(); C14957gcv.e(intent, ""); Intent intent2 = new Intent(requireContext, (Class) MediaImagePreviewActivity.class); intent2.putExtra("imageUri", intent.getData()); intent2.putExtra("maxWidth", 100); intent2.putExtra("maxHeight", 100); startActivityForResult(intent2, 10003); return; } C10457eEr.aqd_(this, new Intent("com.scb.phone/BROADCAST_PROFILE_UPDATED")); } } public final void a(final InterfaceC15577gud interfaceC15577gud) { C14957gcv.e(interfaceC15577gud, ""); guQ.b("onShowRationale", new Object[0]); ((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.permission_storage_title).d(R.string.permission_storage).aoT_(R.string.permission_allow, new DialogInterface.OnClickListener(interfaceC15577gud) { // from class: o.fuz private InterfaceC15577gud e; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { ProfileManagementFragment.e(this.e); } { this.e = interfaceC15577gud; } }), Integer.valueOf(R.string.permission_deny), new DialogInterface.OnClickListener(interfaceC15577gud) { // from class: o.fuG private InterfaceC15577gud b; @Override // android.content.DialogInterface.OnClickListener public final void onClick(DialogInterface dialogInterface, int i) { ProfileManagementFragment.d(this.b); } { this.b = interfaceC15577gud; } }})).show(); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public final void onDestroy() { C7758cuP c7758cuP = this.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.w_(); this.d = null; super.onDestroy(); } public static /* synthetic */ void a(ProfileManagementFragment profileManagementFragment, int i) { C14957gcv.e(profileManagementFragment, ""); EsJ esJ = profileManagementFragment.d; C14957gcv.e(esJ); esJ.b.d(i); } public static /* synthetic */ void d(InterfaceC15577gud interfaceC15577gud) { C14957gcv.e(interfaceC15577gud, ""); interfaceC15577gud.e(); } public static /* synthetic */ void c(InterfaceC14894gbR interfaceC14894gbR, Object obj) { C14957gcv.e(interfaceC14894gbR, ""); interfaceC14894gbR.invoke(obj); } public static /* synthetic */ void e(InterfaceC15577gud interfaceC15577gud) { C14957gcv.e(interfaceC15577gud, ""); interfaceC15577gud.c(); } public static /* synthetic */ void b(ProfileManagementFragment profileManagementFragment) { C14957gcv.e(profileManagementFragment, ""); profileManagementFragment.startActivityForResult(new Intent("android.intent.action.PICK", MediaStore.Images.Media.EXTERNAL_CONTENT_URI), 10003); } public static /* synthetic */ void b(InterfaceC14894gbR interfaceC14894gbR, Object obj) { C14957gcv.e(interfaceC14894gbR, ""); interfaceC14894gbR.invoke(obj); } public static final /* synthetic */ void c(ProfileManagementFragment profileManagementFragment) { C7758cuP c7758cuP = profileManagementFragment.profileManagementPresenter; if (c7758cuP == null) { C14957gcv.a(""); c7758cuP = null; } c7758cuP.d(gHK.JURISTIC == (profileManagementFragment.getActivity() instanceof PreLoadCheckActivity ? ((PreLoadCheckActivity) profileManagementFragment.getActivity()).al() : null)); } @Override // androidx.fragment.app.Fragment public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { C14957gcv.e(layoutInflater, ""); View inflate = layoutInflater.inflate(R.layout.2131559837, viewGroup, false); int i = R.id.avatar_image_view; ImageView imageView = (ImageView) qeC.e(inflate, R.id.avatar_image_view); if (imageView != null) { i = R.id.footer_divider_view; View e = qeC.e(inflate, R.id.footer_divider_view); if (e != null) { i = R.id.image_layout; RelativeLayout relativeLayout = (RelativeLayout) qeC.e(inflate, R.id.image_layout); if (relativeLayout != null) { i = R.id.profile_management_recycler_view; RecyclerView recyclerView = (RecyclerView) qeC.e(inflate, R.id.profile_management_recycler_view); if (recyclerView != null) { NestedScrollView nestedScrollView = (NestedScrollView) inflate; i = R.id.select_image; ImageView imageView2 = (ImageView) qeC.e(inflate, R.id.select_image); if (imageView2 != null) { i = R.id.user_name; TextView textView = (TextView) qeC.e(inflate, R.id.user_name); if (textView != null) { EsJ esJ = new EsJ(nestedScrollView, imageView, e, relativeLayout, recyclerView, nestedScrollView, imageView2, textView); this.d = esJ; C14957gcv.e(esJ); NestedScrollView nestedScrollView2 = esJ.a; C14957gcv.c(nestedScrollView2, ""); return nestedScrollView2; } } } } } } throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i))); } @Override // o.InterfaceC8970dar public final void K() { this.c = true; if (getActivity() != null) { if (BaseActivity.P()) { C14496fuM.a(this); return; } } C14496fuM.c(this); } static { new RVV((byte) 0); } }