374 lines
13 KiB
Java
374 lines
13 KiB
Java
|
package com.scb.phone.view.fragment.csent;
|
||
|
|
||
|
import android.app.Dialog;
|
||
|
import android.content.Context;
|
||
|
import android.content.DialogInterface;
|
||
|
import android.content.Intent;
|
||
|
import android.content.res.Resources;
|
||
|
import android.os.Build;
|
||
|
import android.os.Bundle;
|
||
|
import android.os.Parcelable;
|
||
|
import android.text.method.LinkMovementMethod;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.webkit.WebResourceRequest;
|
||
|
import android.webkit.WebResourceResponse;
|
||
|
import android.webkit.WebView;
|
||
|
import android.webkit.WebViewClient;
|
||
|
import android.widget.TextView;
|
||
|
import androidx.appcompat.widget.AppCompatButton;
|
||
|
import androidx.fragment.app.FragmentActivity;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import butterknife.OnClick;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.activity.csent.CrossMatchConsentActivity;
|
||
|
import com.scb.phone.view.activity.csent.PrivacyCSentWebViewActivity;
|
||
|
import com.scb.phone.view.activity.csent.SensitiveCSentActivity;
|
||
|
import com.scb.phone.view.custom.common.CustomDialog;
|
||
|
import com.scb.phone.view.custom.webview.SCBWebView;
|
||
|
import com.scb.phone.view.fragment.BaseFragment;
|
||
|
import com.scb.phone.view.fragment.csent.SensitiveCSentFragment;
|
||
|
import o.C11560ehe;
|
||
|
import o.C1363aBx;
|
||
|
import o.C14866gag;
|
||
|
import o.C14954gcs;
|
||
|
import o.C14957gcv;
|
||
|
import o.Heg;
|
||
|
import o.IF;
|
||
|
import o.IK;
|
||
|
import o.InterfaceC0834Plv;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC14890gbN;
|
||
|
import o.InterfaceC9090ddE;
|
||
|
import o.fKB;
|
||
|
import o.huo;
|
||
|
import o.pug;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class SensitiveCSentFragment extends Hilt_SensitiveCSentFragment implements InterfaceC9090ddE {
|
||
|
public static final LWm d = new LWm(0);
|
||
|
private huo<Intent> c;
|
||
|
|
||
|
@BindView
|
||
|
public AppCompatButton nextButton;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C1363aBx presenter;
|
||
|
|
||
|
@BindView
|
||
|
public TextView tvPrivacyNotice;
|
||
|
|
||
|
@BindView
|
||
|
public SCBWebView wvConsent;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public static final class LWm {
|
||
|
private LWm() {
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ LWm(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.2131559913, viewGroup, false);
|
||
|
ButterKnife.c(this, inflate);
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public final void onViewCreated(View view, Bundle bundle) {
|
||
|
IK ik;
|
||
|
Parcelable parcelable;
|
||
|
C14957gcv.e(view, "");
|
||
|
c("ndid_common_sensitive_consent_load", new pug("channel", "LVL"));
|
||
|
super.onViewCreated(view, bundle);
|
||
|
C1363aBx c1363aBx = this.presenter;
|
||
|
C1363aBx c1363aBx2 = null;
|
||
|
if (c1363aBx == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1363aBx = null;
|
||
|
}
|
||
|
c1363aBx.e((C1363aBx) this);
|
||
|
C1363aBx c1363aBx3 = this.presenter;
|
||
|
if (c1363aBx3 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1363aBx3 = null;
|
||
|
}
|
||
|
Bundle arguments = getArguments();
|
||
|
if (arguments != null) {
|
||
|
if (Build.VERSION.SDK_INT >= 33) {
|
||
|
parcelable = (Parcelable) arguments.getParcelable("EXTRA_SENSITIVE_CSENT_DTO", IK.class);
|
||
|
} else {
|
||
|
Parcelable parcelable2 = arguments.getParcelable("EXTRA_SENSITIVE_CSENT_DTO");
|
||
|
if (!(parcelable2 instanceof IK)) {
|
||
|
parcelable2 = null;
|
||
|
}
|
||
|
parcelable = (IK) parcelable2;
|
||
|
}
|
||
|
ik = (IK) parcelable;
|
||
|
} else {
|
||
|
ik = null;
|
||
|
}
|
||
|
c1363aBx3.a(ik);
|
||
|
TextView textView = this.tvPrivacyNotice;
|
||
|
if (textView == null) {
|
||
|
C14957gcv.a("");
|
||
|
textView = null;
|
||
|
}
|
||
|
Resources resources = textView.getResources();
|
||
|
C14957gcv.c(resources, "");
|
||
|
String string = getString(R.string.auto_csent_sensitive_notice_read_more_link);
|
||
|
C14957gcv.c((Object) string, "");
|
||
|
String string2 = getString(R.string.auto_csent_sensitive_notice_read_more);
|
||
|
C14957gcv.c((Object) string2, "");
|
||
|
C1363aBx c1363aBx4 = this.presenter;
|
||
|
if (c1363aBx4 == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1363aBx4 = null;
|
||
|
}
|
||
|
String a = c1363aBx4.a();
|
||
|
C1363aBx c1363aBx5 = this.presenter;
|
||
|
if (c1363aBx5 != null) {
|
||
|
c1363aBx2 = c1363aBx5;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
textView.setText(fKB.azW_(resources, string, string2, a, true, R.color.f13682131100876, new RVV(c1363aBx2), 32));
|
||
|
textView.setMovementMethod(LinkMovementMethod.getInstance());
|
||
|
huo<Intent> registerForActivityResult = registerForActivityResult(new C11560ehe.Sts(), new InterfaceC0834Plv(this) { // from class: o.ePe
|
||
|
private SensitiveCSentFragment c;
|
||
|
|
||
|
@Override // o.InterfaceC0834Plv
|
||
|
public final void d(Object obj) {
|
||
|
SensitiveCSentFragment.a(this.c, (Heg) obj);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
}
|
||
|
});
|
||
|
C14957gcv.c(registerForActivityResult, "");
|
||
|
this.c = registerForActivityResult;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9090ddE
|
||
|
public final void a(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
SCBWebView sCBWebView = this.wvConsent;
|
||
|
if (sCBWebView == null) {
|
||
|
C14957gcv.a("");
|
||
|
sCBWebView = null;
|
||
|
}
|
||
|
sCBWebView.setScrollContainer(false);
|
||
|
sCBWebView.setWebViewClient(new IeS(this));
|
||
|
if (str != null) {
|
||
|
sCBWebView.loadUrl(str);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9090ddE
|
||
|
public final void e(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
FragmentActivity activity = getActivity();
|
||
|
if (activity != null) {
|
||
|
PrivacyCSentWebViewActivity.IeS ieS = PrivacyCSentWebViewActivity.b;
|
||
|
activity.startActivity(PrivacyCSentWebViewActivity.IeS.aaM_(activity, str));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9090ddE
|
||
|
public final void e(IF r5) {
|
||
|
C14957gcv.e(r5, "");
|
||
|
Context context = getContext();
|
||
|
if (context != null) {
|
||
|
huo<Intent> huoVar = this.c;
|
||
|
if (huoVar == null) {
|
||
|
C14957gcv.a("");
|
||
|
huoVar = null;
|
||
|
}
|
||
|
CrossMatchConsentActivity.LWm lWm = CrossMatchConsentActivity.b;
|
||
|
huoVar.d(CrossMatchConsentActivity.LWm.aaI_(context, r5), null);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@OnClick
|
||
|
public final void onClickRadioButtonAccept() {
|
||
|
c("ndid_common_sensitive_consent_accept", new pug("key", "accept"));
|
||
|
C1363aBx c1363aBx = this.presenter;
|
||
|
if (c1363aBx == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1363aBx = null;
|
||
|
}
|
||
|
c1363aBx.a(true);
|
||
|
}
|
||
|
|
||
|
@OnClick
|
||
|
public final void onClickRadioButtonDecline() {
|
||
|
c("ndid_common_sensitive_consent_accept", new pug("key", "decline"));
|
||
|
C1363aBx c1363aBx = this.presenter;
|
||
|
if (c1363aBx == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1363aBx = null;
|
||
|
}
|
||
|
c1363aBx.a(false);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9090ddE
|
||
|
public final void b() {
|
||
|
AppCompatButton appCompatButton = this.nextButton;
|
||
|
if (appCompatButton == null) {
|
||
|
C14957gcv.a("");
|
||
|
appCompatButton = null;
|
||
|
}
|
||
|
appCompatButton.setEnabled(true);
|
||
|
}
|
||
|
|
||
|
@OnClick
|
||
|
public final void onNext() {
|
||
|
v("ndid_common_sensitive_consent_next");
|
||
|
C1363aBx c1363aBx = this.presenter;
|
||
|
if (c1363aBx == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1363aBx = null;
|
||
|
}
|
||
|
c1363aBx.c();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9090ddE
|
||
|
public final void e() {
|
||
|
((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.common_ndid_consent_decline_title).d(R.string.common_ndid_consent_decline_description), Integer.valueOf(R.string.cancel), new DialogInterface.OnClickListener() { // from class: o.ePj
|
||
|
@Override // android.content.DialogInterface.OnClickListener
|
||
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
||
|
dialogInterface.dismiss();
|
||
|
}
|
||
|
}})).aoT_(R.string.confirm, new DialogInterface.OnClickListener(this) { // from class: o.ePi
|
||
|
private SensitiveCSentFragment b;
|
||
|
|
||
|
@Override // android.content.DialogInterface.OnClickListener
|
||
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
||
|
SensitiveCSentFragment.arC_(this.b, dialogInterface);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
}
|
||
|
}).show();
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
final class IeS extends WebViewClient {
|
||
|
private SensitiveCSentFragment e;
|
||
|
|
||
|
public IeS(SensitiveCSentFragment sensitiveCSentFragment) {
|
||
|
this.e = sensitiveCSentFragment;
|
||
|
}
|
||
|
|
||
|
@Override // android.webkit.WebViewClient
|
||
|
public final void onReceivedHttpError(WebView webView, WebResourceRequest webResourceRequest, WebResourceResponse webResourceResponse) {
|
||
|
super.onReceivedHttpError(webView, webResourceRequest, webResourceResponse);
|
||
|
C1363aBx c1363aBx = this.e.presenter;
|
||
|
if (c1363aBx == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1363aBx = null;
|
||
|
}
|
||
|
C1363aBx.d(new Object[]{c1363aBx, String.valueOf(webResourceRequest != null ? webResourceRequest.getUrl() : null)}, -176555152, 176555156, System.identityHashCode(c1363aBx));
|
||
|
}
|
||
|
|
||
|
@Override // android.webkit.WebViewClient
|
||
|
public final void onPageFinished(WebView webView, String str) {
|
||
|
super.onPageFinished(webView, str);
|
||
|
SensitiveCSentFragment sensitiveCSentFragment = this.e;
|
||
|
Dialog dialog = ((BaseFragment) sensitiveCSentFragment).e;
|
||
|
if (dialog == null || !dialog.isShowing()) {
|
||
|
return;
|
||
|
}
|
||
|
((BaseFragment) sensitiveCSentFragment).e.dismiss();
|
||
|
((BaseFragment) sensitiveCSentFragment).e = null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public final void onDestroy() {
|
||
|
huo<Intent> huoVar = this.c;
|
||
|
if (huoVar == null) {
|
||
|
C14957gcv.a("");
|
||
|
huoVar = null;
|
||
|
}
|
||
|
huoVar.e();
|
||
|
super.onDestroy();
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
final /* synthetic */ class RVV extends C14954gcs implements InterfaceC14890gbN<C14866gag> {
|
||
|
@Override // o.InterfaceC14890gbN
|
||
|
public final /* synthetic */ C14866gag invoke() {
|
||
|
((C1363aBx) this.f).d();
|
||
|
return C14866gag.c;
|
||
|
}
|
||
|
|
||
|
RVV(Object obj) {
|
||
|
super(0, obj, C1363aBx.class, "onClickPrivacyNotice", "onClickPrivacyNotice()V");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void arC_(SensitiveCSentFragment sensitiveCSentFragment, DialogInterface dialogInterface) {
|
||
|
C14957gcv.e(sensitiveCSentFragment, "");
|
||
|
dialogInterface.dismiss();
|
||
|
C1363aBx c1363aBx = sensitiveCSentFragment.presenter;
|
||
|
if (c1363aBx == null) {
|
||
|
C14957gcv.a("");
|
||
|
c1363aBx = null;
|
||
|
}
|
||
|
c1363aBx.b();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void a(SensitiveCSentFragment sensitiveCSentFragment, Heg heg) {
|
||
|
SensitiveCSentActivity sensitiveCSentActivity;
|
||
|
C14957gcv.e(sensitiveCSentFragment, "");
|
||
|
if (-1 == heg.e) {
|
||
|
FragmentActivity activity = sensitiveCSentFragment.getActivity();
|
||
|
sensitiveCSentActivity = activity instanceof SensitiveCSentActivity ? (SensitiveCSentActivity) activity : null;
|
||
|
if (sensitiveCSentActivity != null) {
|
||
|
sensitiveCSentActivity.setResult(-1);
|
||
|
sensitiveCSentActivity.finish();
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
if (heg.e == 0) {
|
||
|
FragmentActivity activity2 = sensitiveCSentFragment.getActivity();
|
||
|
sensitiveCSentActivity = activity2 instanceof SensitiveCSentActivity ? (SensitiveCSentActivity) activity2 : null;
|
||
|
if (sensitiveCSentActivity != null) {
|
||
|
sensitiveCSentActivity.onBackPressed();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9090ddE
|
||
|
public final void b(boolean z) {
|
||
|
FragmentActivity activity = getActivity();
|
||
|
SensitiveCSentActivity sensitiveCSentActivity = activity instanceof SensitiveCSentActivity ? (SensitiveCSentActivity) activity : null;
|
||
|
if (sensitiveCSentActivity != null) {
|
||
|
if (z) {
|
||
|
sensitiveCSentActivity.setResult(-1);
|
||
|
}
|
||
|
sensitiveCSentActivity.finish();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9090ddE
|
||
|
public final void c() {
|
||
|
FragmentActivity activity = getActivity();
|
||
|
SensitiveCSentActivity sensitiveCSentActivity = activity instanceof SensitiveCSentActivity ? (SensitiveCSentActivity) activity : null;
|
||
|
if (sensitiveCSentActivity != null) {
|
||
|
sensitiveCSentActivity.onBackPressed();
|
||
|
}
|
||
|
}
|
||
|
}
|