828 lines
29 KiB
Java
828 lines
29 KiB
Java
package com.scb.phone.view.fragment;
|
|
|
|
import android.app.Dialog;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.graphics.Bitmap;
|
|
import android.net.Uri;
|
|
import android.net.http.SslError;
|
|
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.webkit.SslErrorHandler;
|
|
import android.webkit.WebResourceError;
|
|
import android.webkit.WebResourceRequest;
|
|
import android.webkit.WebResourceResponse;
|
|
import android.webkit.WebView;
|
|
import android.webkit.WebViewClient;
|
|
import android.widget.Button;
|
|
import android.widget.CheckBox;
|
|
import android.widget.CompoundButton;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.RelativeLayout;
|
|
import androidx.fragment.app.Fragment;
|
|
import androidx.fragment.app.FragmentActivity;
|
|
import com.google.common.net.HttpHeaders;
|
|
import com.huawei.hms.support.api.entity.common.CommonConstant;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.activity.PreLoadCheckActivity;
|
|
import com.scb.phone.view.custom.webview.SCBWebView;
|
|
import com.scb.phone.view.fragment.TermsAndConditionsFragment;
|
|
import o.C0369Fc;
|
|
import o.C0371Fd;
|
|
import o.C0690Mh;
|
|
import o.C12891fKc;
|
|
import o.C12941fLs;
|
|
import o.C14957gcv;
|
|
import o.C16903sI;
|
|
import o.C2274abX;
|
|
import o.C2336acg;
|
|
import o.CBe;
|
|
import o.InterfaceC12853fJD;
|
|
import o.InterfaceC12938fLp;
|
|
import o.InterfaceC12954fMb;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC8948daV;
|
|
import o.InterfaceC9008dbc;
|
|
import o.MVV;
|
|
import o.ZI;
|
|
import o.fSQ;
|
|
import o.gHK;
|
|
import o.gdZ;
|
|
import o.guQ;
|
|
import o.nMh;
|
|
import o.qeC;
|
|
import okhttp3.OkHttpClient;
|
|
import okhttp3.Request;
|
|
import okhttp3.Response;
|
|
import okhttp3.ResponseBody;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class TermsAndConditionsFragment extends Hilt_TermsAndConditionsFragment implements InterfaceC9008dbc, InterfaceC12938fLp, InterfaceC8948daV {
|
|
public static final HBt c = new HBt(0);
|
|
private MVV d;
|
|
private Response f;
|
|
private InterfaceC12853fJD i;
|
|
|
|
@InterfaceC13391fZD
|
|
public C2274abX presenter;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class HBt {
|
|
private HBt() {
|
|
}
|
|
|
|
public static TermsAndConditionsFragment c(C0371Fd c0371Fd) {
|
|
C14957gcv.e(c0371Fd, "");
|
|
Bundle bundle = new Bundle();
|
|
bundle.putParcelable("EASYCASH_TERMS_CONDITIONS", c0371Fd);
|
|
TermsAndConditionsFragment termsAndConditionsFragment = new TermsAndConditionsFragment();
|
|
termsAndConditionsFragment.setArguments(bundle);
|
|
return termsAndConditionsFragment;
|
|
}
|
|
|
|
public /* synthetic */ HBt(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
C14957gcv.e(layoutInflater, "");
|
|
View inflate = getLayoutInflater().inflate(R.layout.2131559430, (ViewGroup) null, false);
|
|
int i = R.id.bottom_buttons;
|
|
LinearLayout linearLayout = (LinearLayout) qeC.e(inflate, R.id.bottom_buttons);
|
|
if (linearLayout != null) {
|
|
i = R.id.button_accept;
|
|
Button button = (Button) qeC.e(inflate, R.id.button_accept);
|
|
if (button != null) {
|
|
i = R.id.button_decline;
|
|
Button button2 = (Button) qeC.e(inflate, R.id.button_decline);
|
|
if (button2 != null) {
|
|
i = R.id.cb_first;
|
|
CheckBox checkBox = (CheckBox) qeC.e(inflate, R.id.cb_first);
|
|
if (checkBox != null) {
|
|
i = R.id.cb_second;
|
|
CheckBox checkBox2 = (CheckBox) qeC.e(inflate, R.id.cb_second);
|
|
if (checkBox2 != null) {
|
|
i = R.id.ll_check_box_section;
|
|
LinearLayout linearLayout2 = (LinearLayout) qeC.e(inflate, R.id.ll_check_box_section);
|
|
if (linearLayout2 != null) {
|
|
i = R.id.ve_separator;
|
|
View e = qeC.e(inflate, R.id.ve_separator);
|
|
if (e != null) {
|
|
i = R.id.webview;
|
|
SCBWebView sCBWebView = (SCBWebView) qeC.e(inflate, R.id.webview);
|
|
if (sCBWebView != null) {
|
|
MVV mvv = new MVV((RelativeLayout) inflate, linearLayout, button, button2, checkBox, checkBox2, linearLayout2, e, sCBWebView);
|
|
this.d = mvv;
|
|
C14957gcv.e(mvv);
|
|
return mvv.h;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void onViewCreated(View view, Bundle bundle) {
|
|
Parcelable parcelable;
|
|
C14957gcv.e(view, "");
|
|
super.onViewCreated(view, bundle);
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
mvv.b.setOnClickListener(new View.OnClickListener(this) { // from class: o.eEZ
|
|
private TermsAndConditionsFragment b;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view2) {
|
|
TermsAndConditionsFragment.a(this.b);
|
|
}
|
|
|
|
{
|
|
this.b = this;
|
|
}
|
|
});
|
|
mvv.e.setOnClickListener(new View.OnClickListener(this) { // from class: o.eEY
|
|
private TermsAndConditionsFragment d;
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view2) {
|
|
TermsAndConditionsFragment.b(this.d);
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
}
|
|
});
|
|
InterfaceC12853fJD interfaceC12853fJD = this.i;
|
|
if (interfaceC12853fJD != null && !interfaceC12853fJD.ayC_(mvv.b, mvv.e)) {
|
|
mvv.b.setText(R.string.accept_radio);
|
|
mvv.e.setText(R.string.decline_radio);
|
|
}
|
|
MVV mvv2 = this.d;
|
|
C14957gcv.e(mvv2);
|
|
mvv2.a.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(this) { // from class: o.eEU
|
|
private TermsAndConditionsFragment d;
|
|
|
|
@Override // android.widget.CompoundButton.OnCheckedChangeListener
|
|
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
|
|
TermsAndConditionsFragment.a(this.d, z);
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
}
|
|
});
|
|
mvv2.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(this) { // from class: o.eEV
|
|
private TermsAndConditionsFragment a;
|
|
|
|
@Override // android.widget.CompoundButton.OnCheckedChangeListener
|
|
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
|
|
TermsAndConditionsFragment.c(this.a, z);
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
}
|
|
});
|
|
C2274abX c2274abX = this.presenter;
|
|
final C2274abX c2274abX2 = null;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
c2274abX.e((C2274abX) this);
|
|
Bundle arguments = getArguments();
|
|
if (arguments != null) {
|
|
if (Build.VERSION.SDK_INT >= 33) {
|
|
parcelable = (Parcelable) arguments.getParcelable("EASYCASH_TERMS_CONDITIONS", C0371Fd.class);
|
|
} else {
|
|
Parcelable parcelable2 = arguments.getParcelable("EASYCASH_TERMS_CONDITIONS");
|
|
if (!(parcelable2 instanceof C0371Fd)) {
|
|
parcelable2 = null;
|
|
}
|
|
parcelable = (C0371Fd) parcelable2;
|
|
}
|
|
final C0371Fd c0371Fd = (C0371Fd) parcelable;
|
|
if (c0371Fd != null) {
|
|
C2274abX c2274abX3 = this.presenter;
|
|
if (c2274abX3 != null) {
|
|
c2274abX2 = c2274abX3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
if (c2274abX2.c.j()) {
|
|
if (c2274abX2.f != 0) {
|
|
c2274abX2.f.y();
|
|
}
|
|
CBe cBe = c2274abX2.d;
|
|
cBe.d(cBe.b(), new fSQ(c2274abX2, c0371Fd) { // from class: o.aco
|
|
private C2274abX a;
|
|
private C0371Fd e;
|
|
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
C2274abX.d(this.a, this.e);
|
|
}
|
|
|
|
{
|
|
this.a = c2274abX2;
|
|
this.e = c0371Fd;
|
|
}
|
|
}, new fSQ(c2274abX2, c0371Fd) { // from class: o.acr
|
|
private C0371Fd c;
|
|
private C2274abX e;
|
|
|
|
@Override // o.fSQ
|
|
public final void c(Object obj) {
|
|
C2274abX.d(this.e, this.c, (Throwable) obj);
|
|
}
|
|
|
|
{
|
|
this.e = c2274abX2;
|
|
this.c = c0371Fd;
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
c2274abX2.b(c0371Fd);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.Hilt_TermsAndConditionsFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment
|
|
public final void onAttach(Context context) {
|
|
C14957gcv.e(context, "");
|
|
super.onAttach(context);
|
|
Fragment parentFragment = getParentFragment();
|
|
boolean z = context instanceof InterfaceC12853fJD;
|
|
Object obj = context;
|
|
if (!z) {
|
|
obj = parentFragment instanceof InterfaceC12853fJD ? parentFragment : null;
|
|
}
|
|
this.i = (InterfaceC12853fJD) obj;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public final void onDetach() {
|
|
this.i = null;
|
|
super.onDetach();
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void b() {
|
|
C2274abX c2274abX = this.presenter;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
C0690Mh.IeS ieS = C0690Mh.IeS.NAVIGATE_BACK;
|
|
C16903sI c16903sI = c2274abX.j;
|
|
c2274abX.d(c16903sI.c((String) null, c16903sI.e(R.string.error_generic_resource), ieS));
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class RVV extends WebViewClient {
|
|
private TermsAndConditionsFragment d;
|
|
|
|
RVV(TermsAndConditionsFragment termsAndConditionsFragment) {
|
|
this.d = termsAndConditionsFragment;
|
|
}
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
public final void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
|
|
Context context;
|
|
if (sslErrorHandler == null || (context = this.d.getContext()) == null) {
|
|
return;
|
|
}
|
|
C12941fLs c12941fLs = new C12941fLs();
|
|
C14957gcv.c(context, "");
|
|
c12941fLs.aAA_(context, sslErrorHandler);
|
|
}
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
public final WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
|
|
Uri url;
|
|
if (webResourceRequest == null || (url = webResourceRequest.getUrl()) == null) {
|
|
return null;
|
|
}
|
|
TermsAndConditionsFragment termsAndConditionsFragment = this.d;
|
|
String obj = url.toString();
|
|
C14957gcv.c((Object) obj, "");
|
|
return termsAndConditionsFragment.aqr_(obj);
|
|
}
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
public final WebResourceResponse shouldInterceptRequest(WebView webView, String str) {
|
|
if (str != null) {
|
|
return this.d.aqr_(str);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
public final boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
|
|
String valueOf = String.valueOf(webResourceRequest != null ? webResourceRequest.getUrl() : null);
|
|
if (valueOf.length() <= 0) {
|
|
return true;
|
|
}
|
|
this.d.startActivity(new Intent(CommonConstant.ACTION.HWID_SCHEME_URL, Uri.parse(valueOf)));
|
|
return true;
|
|
}
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
|
|
super.onPageStarted(webView, str, bitmap);
|
|
TermsAndConditionsFragment.e(this.d, false);
|
|
}
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
public final void onPageFinished(WebView webView, String str) {
|
|
super.onPageFinished(webView, str);
|
|
TermsAndConditionsFragment termsAndConditionsFragment = this.d;
|
|
Dialog dialog = ((BaseFragment) termsAndConditionsFragment).e;
|
|
C2274abX c2274abX = null;
|
|
if (dialog != null && dialog.isShowing()) {
|
|
((BaseFragment) termsAndConditionsFragment).e.dismiss();
|
|
((BaseFragment) termsAndConditionsFragment).e = null;
|
|
}
|
|
Response response = this.d.f;
|
|
if (response != null) {
|
|
TermsAndConditionsFragment termsAndConditionsFragment2 = this.d;
|
|
if (response.code() >= 400) {
|
|
C2274abX c2274abX2 = termsAndConditionsFragment2.presenter;
|
|
if (c2274abX2 == null) {
|
|
C14957gcv.a("");
|
|
c2274abX2 = null;
|
|
}
|
|
c2274abX2.c();
|
|
} else {
|
|
C2274abX c2274abX3 = termsAndConditionsFragment2.presenter;
|
|
if (c2274abX3 == null) {
|
|
C14957gcv.a("");
|
|
c2274abX3 = null;
|
|
}
|
|
C0371Fd c0371Fd = c2274abX3.i;
|
|
if (c0371Fd == null) {
|
|
C14957gcv.a("");
|
|
c0371Fd = null;
|
|
}
|
|
if (c0371Fd.a) {
|
|
TermsAndConditionsFragment.e(termsAndConditionsFragment2, false);
|
|
} else {
|
|
TermsAndConditionsFragment.e(termsAndConditionsFragment2, true);
|
|
}
|
|
}
|
|
}
|
|
C2274abX c2274abX4 = this.d.presenter;
|
|
if (c2274abX4 == null) {
|
|
C14957gcv.a("");
|
|
c2274abX4 = null;
|
|
}
|
|
if (c2274abX4.b()) {
|
|
C2274abX c2274abX5 = this.d.presenter;
|
|
if (c2274abX5 == null) {
|
|
C14957gcv.a("");
|
|
c2274abX5 = null;
|
|
}
|
|
C0371Fd c0371Fd2 = c2274abX5.i;
|
|
if (c0371Fd2 == null) {
|
|
C14957gcv.a("");
|
|
c0371Fd2 = null;
|
|
}
|
|
if (!c0371Fd2.a) {
|
|
TermsAndConditionsFragment.e(this.d, true);
|
|
}
|
|
}
|
|
C2274abX c2274abX6 = this.d.presenter;
|
|
if (c2274abX6 != null) {
|
|
c2274abX = c2274abX6;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
C2336acg c2336acg = new C2336acg(c2274abX);
|
|
if (c2274abX.f != 0) {
|
|
c2336acg.e(c2274abX.f);
|
|
}
|
|
}
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
public final void onReceivedHttpError(WebView webView, WebResourceRequest webResourceRequest, WebResourceResponse webResourceResponse) {
|
|
Uri url;
|
|
super.onReceivedHttpError(webView, webResourceRequest, webResourceResponse);
|
|
TermsAndConditionsFragment.c(this.d, (webResourceRequest == null || (url = webResourceRequest.getUrl()) == null) ? null : url.toString());
|
|
}
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
public final void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) {
|
|
Uri url;
|
|
super.onReceivedError(webView, webResourceRequest, webResourceError);
|
|
TermsAndConditionsFragment.c(this.d, (webResourceRequest == null || (url = webResourceRequest.getUrl()) == null) ? null : url.toString());
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void d(C0371Fd c0371Fd) {
|
|
C14957gcv.e(c0371Fd, "");
|
|
y();
|
|
RVV rvv = new RVV(this);
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
final SCBWebView sCBWebView = mvv.g;
|
|
C2274abX c2274abX = this.presenter;
|
|
C2274abX c2274abX2 = null;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
C0371Fd c0371Fd2 = c2274abX.i;
|
|
if (c0371Fd2 == null) {
|
|
C14957gcv.a("");
|
|
c0371Fd2 = null;
|
|
}
|
|
sCBWebView.setWebViewBackgroundColor(c0371Fd2.f8171o);
|
|
sCBWebView.setWebViewClient(rvv);
|
|
C14957gcv.c(sCBWebView, "");
|
|
SCBWebView.setAdvanceWebView$default(sCBWebView, new Sts(), null, 2, null);
|
|
C2274abX c2274abX3 = this.presenter;
|
|
if (c2274abX3 == null) {
|
|
C14957gcv.a("");
|
|
c2274abX3 = null;
|
|
}
|
|
C0371Fd c0371Fd3 = c2274abX3.i;
|
|
if (c0371Fd3 == null) {
|
|
C14957gcv.a("");
|
|
c0371Fd3 = null;
|
|
}
|
|
if (c0371Fd3.a) {
|
|
sCBWebView.setOnScrollChangeListener(new View.OnScrollChangeListener(sCBWebView, this) { // from class: o.eEW
|
|
private SCBWebView b;
|
|
private TermsAndConditionsFragment e;
|
|
|
|
@Override // android.view.View.OnScrollChangeListener
|
|
public final void onScrollChange(View view, int i, int i2, int i3, int i4) {
|
|
TermsAndConditionsFragment.a(this.b, this.e, i2);
|
|
}
|
|
|
|
{
|
|
this.b = sCBWebView;
|
|
this.e = this;
|
|
}
|
|
});
|
|
}
|
|
C2274abX c2274abX4 = this.presenter;
|
|
if (c2274abX4 == null) {
|
|
C14957gcv.a("");
|
|
c2274abX4 = null;
|
|
}
|
|
String d = c2274abX4.d();
|
|
C2274abX c2274abX5 = this.presenter;
|
|
if (c2274abX5 != null) {
|
|
c2274abX2 = c2274abX5;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
if (c2274abX2.b()) {
|
|
sCBWebView.b(d, "css/consent_style.css");
|
|
} else if (d != null) {
|
|
sCBWebView.loadUrl(d);
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes5.dex */
|
|
public static final class Sts implements InterfaceC12954fMb {
|
|
private final boolean e = true;
|
|
|
|
@Override // o.InterfaceC12954fMb
|
|
public final boolean P_() {
|
|
return true;
|
|
}
|
|
|
|
Sts() {
|
|
}
|
|
|
|
@Override // o.InterfaceC12954fMb
|
|
public final Boolean K_() {
|
|
return Boolean.TRUE;
|
|
}
|
|
|
|
@Override // o.InterfaceC12954fMb
|
|
public final boolean aA_() {
|
|
return this.e;
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void d(String str) {
|
|
InterfaceC12853fJD interfaceC12853fJD = this.i;
|
|
if (interfaceC12853fJD != null) {
|
|
interfaceC12853fJD.e(str);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void c(String str) {
|
|
InterfaceC12853fJD interfaceC12853fJD = this.i;
|
|
if (interfaceC12853fJD != null) {
|
|
interfaceC12853fJD.d(str);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void d(boolean z) {
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
LinearLayout linearLayout = mvv.d;
|
|
C14957gcv.c(linearLayout, "");
|
|
LinearLayout linearLayout2 = linearLayout;
|
|
C14957gcv.e(linearLayout2, "");
|
|
linearLayout2.setVisibility(z ? 0 : 8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void c(C0371Fd c0371Fd) {
|
|
C14957gcv.e(c0371Fd, "");
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
mvv.b.setText(c0371Fd.h);
|
|
mvv.e.setText(c0371Fd.f);
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public final void onDestroyView() {
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
mvv.b.setOnClickListener(null);
|
|
mvv.e.setOnClickListener(null);
|
|
C2274abX c2274abX = this.presenter;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
c2274abX.w_();
|
|
this.d = null;
|
|
super.onDestroyView();
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void a() {
|
|
InterfaceC12853fJD interfaceC12853fJD = this.i;
|
|
if (interfaceC12853fJD != null) {
|
|
interfaceC12853fJD.h();
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void e(boolean z) {
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
mvv.b.setEnabled(z);
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void e(String str) {
|
|
C14957gcv.e(str, "");
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
CheckBox checkBox = mvv.a;
|
|
checkBox.setVisibility(0);
|
|
checkBox.setText(str);
|
|
mvv.c.setVisibility(8);
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void e(C0369Fc c0369Fc) {
|
|
C14957gcv.e(c0369Fc, "");
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
CheckBox checkBox = mvv.a;
|
|
checkBox.setVisibility(0);
|
|
checkBox.setText(c0369Fc.d);
|
|
CheckBox checkBox2 = mvv.c;
|
|
checkBox2.setVisibility(0);
|
|
checkBox2.setText(c0369Fc.e);
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void b(int i) {
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
mvv.j.setVisibility(i);
|
|
}
|
|
|
|
@Override // o.InterfaceC9008dbc
|
|
public final void d() {
|
|
Context context = getContext();
|
|
if (context != null) {
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
mvv.e.setTextColor(nMh.getColor(context, R.color.f2112131099717));
|
|
mvv.e.setBackground(nMh.getDrawable(context, R.drawable.bg_button_transparent));
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC12938fLp
|
|
public final void M_() {
|
|
FragmentActivity activity = getActivity();
|
|
if (activity != null) {
|
|
activity.onBackPressed();
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC8948daV
|
|
public final Bitmap aqs_() {
|
|
MVV mvv = this.d;
|
|
C14957gcv.e(mvv);
|
|
return C12891fKc.ayR_(mvv.g);
|
|
}
|
|
|
|
public static /* synthetic */ void a(TermsAndConditionsFragment termsAndConditionsFragment, boolean z) {
|
|
C14957gcv.e(termsAndConditionsFragment, "");
|
|
C2274abX c2274abX = termsAndConditionsFragment.presenter;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
c2274abX.a = z;
|
|
C2336acg c2336acg = new C2336acg(c2274abX);
|
|
if (c2274abX.f != 0) {
|
|
c2336acg.e(c2274abX.f);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(SCBWebView sCBWebView, TermsAndConditionsFragment termsAndConditionsFragment, int i) {
|
|
C14957gcv.e(sCBWebView, "");
|
|
C14957gcv.e(termsAndConditionsFragment, "");
|
|
if (i + sCBWebView.getMeasuredHeight() >= sCBWebView.e()) {
|
|
MVV mvv = termsAndConditionsFragment.d;
|
|
C14957gcv.e(mvv);
|
|
C2274abX c2274abX = termsAndConditionsFragment.presenter;
|
|
C0371Fd c0371Fd = null;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
C0371Fd c0371Fd2 = c2274abX.i;
|
|
if (c0371Fd2 == null) {
|
|
C14957gcv.a("");
|
|
} else {
|
|
c0371Fd = c0371Fd2;
|
|
}
|
|
if (c0371Fd.b) {
|
|
mvv.b.setEnabled(true);
|
|
mvv.e.setEnabled(true);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(TermsAndConditionsFragment termsAndConditionsFragment) {
|
|
C14957gcv.e(termsAndConditionsFragment, "");
|
|
final C2274abX c2274abX = termsAndConditionsFragment.presenter;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
ZI.IeS ieS = new ZI.IeS(c2274abX) { // from class: o.acj
|
|
private C2274abX b;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
C2274abX.c(this.b, (InterfaceC9008dbc) obj);
|
|
}
|
|
|
|
{
|
|
this.b = c2274abX;
|
|
}
|
|
};
|
|
if (c2274abX.f != 0) {
|
|
ieS.e(c2274abX.f);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void b(TermsAndConditionsFragment termsAndConditionsFragment) {
|
|
C14957gcv.e(termsAndConditionsFragment, "");
|
|
final C2274abX c2274abX = termsAndConditionsFragment.presenter;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
ZI.IeS ieS = new ZI.IeS(c2274abX) { // from class: o.acd
|
|
private C2274abX c;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
C2274abX.b(this.c, (InterfaceC9008dbc) obj);
|
|
}
|
|
|
|
{
|
|
this.c = c2274abX;
|
|
}
|
|
};
|
|
if (c2274abX.f != 0) {
|
|
ieS.e(c2274abX.f);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void c(TermsAndConditionsFragment termsAndConditionsFragment, boolean z) {
|
|
C14957gcv.e(termsAndConditionsFragment, "");
|
|
C2274abX c2274abX = termsAndConditionsFragment.presenter;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
c2274abX.e = z;
|
|
C2336acg c2336acg = new C2336acg(c2274abX);
|
|
if (c2274abX.f != 0) {
|
|
c2336acg.e(c2274abX.f);
|
|
}
|
|
}
|
|
|
|
public static final /* synthetic */ void e(TermsAndConditionsFragment termsAndConditionsFragment, boolean z) {
|
|
MVV mvv = termsAndConditionsFragment.d;
|
|
C14957gcv.e(mvv);
|
|
C2274abX c2274abX = termsAndConditionsFragment.presenter;
|
|
C0371Fd c0371Fd = null;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
C0371Fd c0371Fd2 = c2274abX.i;
|
|
if (c0371Fd2 == null) {
|
|
C14957gcv.a("");
|
|
} else {
|
|
c0371Fd = c0371Fd2;
|
|
}
|
|
if (c0371Fd.b) {
|
|
mvv.b.setEnabled(z);
|
|
mvv.e.setEnabled(z);
|
|
}
|
|
}
|
|
|
|
public static final /* synthetic */ void c(TermsAndConditionsFragment termsAndConditionsFragment, String str) {
|
|
if (str != null) {
|
|
C2274abX c2274abX = termsAndConditionsFragment.presenter;
|
|
C2274abX c2274abX2 = null;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
if (gdZ.e(str, c2274abX.d(), false)) {
|
|
C2274abX c2274abX3 = termsAndConditionsFragment.presenter;
|
|
if (c2274abX3 != null) {
|
|
c2274abX2 = c2274abX3;
|
|
} else {
|
|
C14957gcv.a("");
|
|
}
|
|
c2274abX2.c();
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public final WebResourceResponse aqr_(String str) {
|
|
String str2;
|
|
ResponseBody body;
|
|
C2274abX c2274abX = this.presenter;
|
|
if (c2274abX == null) {
|
|
C14957gcv.a("");
|
|
c2274abX = null;
|
|
}
|
|
if (!gdZ.e(str, c2274abX.d(), false)) {
|
|
return null;
|
|
}
|
|
try {
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
Request.Builder url = new Request.Builder().url(gdZ.b((CharSequence) str).toString());
|
|
gHK al = getActivity() instanceof PreLoadCheckActivity ? ((PreLoadCheckActivity) getActivity()).al() : null;
|
|
if (al == null || (str2 = al.mode) == null) {
|
|
str2 = gHK.INDIVIDUAL.mode;
|
|
}
|
|
Request.Builder addHeader = url.addHeader("userMode", str2);
|
|
C2274abX c2274abX2 = this.presenter;
|
|
if (c2274abX2 == null) {
|
|
C14957gcv.a("");
|
|
c2274abX2 = null;
|
|
}
|
|
Response execute = okHttpClient.newCall(addHeader.addHeader(HttpHeaders.ACCEPT_LANGUAGE, c2274abX2.b).build()).execute();
|
|
this.f = execute;
|
|
return new WebResourceResponse("text/html", "utf-8", (execute == null || (body = execute.body()) == null) ? null : body.byteStream());
|
|
} catch (Exception e) {
|
|
guQ.e(e);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static final TermsAndConditionsFragment a(C0371Fd c0371Fd) {
|
|
return HBt.c(c0371Fd);
|
|
}
|
|
}
|