导航菜单

页面标题

页面副标题

Mint v5.7.3 - CRIFWebView.java 源代码

正在查看: Mint v5.7.3 应用的 CRIFWebView.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.htmedia.mint.utils;

import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.net.Uri;
import android.net.http.SslError;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.webkit.SslErrorHandler;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import androidx.activity.OnBackPressedCallback;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.core.content.res.ResourcesCompat;
import com.google.gson.Gson;
import com.htmedia.mint.pojo.CRIFInnerData;
import com.htmedia.mint.pojo.CrifPojoResponse;
import com.htmedia.mint.pojo.CrifResponseData;
import com.htmedia.mint.pojo.CrifResultData;
import com.htmedia.mint.pojo.SocialResponsePojo;
import com.htmedia.mint.pojo.config.Config;
import com.htmedia.mint.pojo.config.CrifConfig;
import com.htmedia.mint.utils.q;
import com.snowplowanalytics.snowplow.tracker.constants.Parameters;
import com.thoughtbot.expandablerecyclerview.BuildConfig;
import in.juspay.hyper.constants.LogCategory;
import in.juspay.hypersdk.core.PaymentConstants;
import java.util.ArrayList;
import java.util.HashMap;
import kotlin.Metadata;

@Metadata(d1 = {"\u0000X\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u00002\u00020\u0001:\u0001-B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\r\u001a\u00020\u001cH\u0002J\u0006\u0010\u001d\u001a\u00020\u001cJ\u0010\u0010\u001e\u001a\u00020\u001c2\u0006\u0010\u001f\u001a\u00020 H\u0002J\"\u0010!\u001a\u00020\u001c2\u0006\u0010\"\u001a\u00020\u00042\u0006\u0010#\u001a\u00020\u00042\b\u0010$\u001a\u0004\u0018\u00010\u000fH\u0014J\b\u0010%\u001a\u00020\u001cH\u0002J\b\u0010&\u001a\u00020\u001cH\u0016J\u0012\u0010'\u001a\u00020\u001c2\b\u0010(\u001a\u0004\u0018\u00010)H\u0014J\b\u0010*\u001a\u00020\u001cH\u0002J\u0010\u0010+\u001a\u00020\u001c2\u0006\u0010,\u001a\u00020\u0006H\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082D¢\u0006\u0002\n\u0000R\u001a\u0010\u0005\u001a\u00020\u0006X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\nR\u000e\u0010\u000b\u001a\u00020\fX\u0082.¢\u0006\u0002\n\u0000R\u0014\u0010\r\u001a\b\u0012\u0004\u0012\u00020\u000f0\u000eX\u0082.¢\u0006\u0002\n\u0000R\u001a\u0010\u0010\u001a\u00020\u0011X\u0086.¢\u0006\u000e\n\u0000\u001a\u0004\b\u0012\u0010\u0013\"\u0004\b\u0014\u0010\u0015R\u000e\u0010\u0016\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u001c\u0010\u0017\u001a\u0010\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u001a0\u0019\u0018\u00010\u0018X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u001b\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006."}, d2 = {"Lcom/htmedia/mint/utils/CRIFWebView;", "Landroidx/appcompat/app/AppCompatActivity;", "()V", "FILE_CHOOSER_REQUEST_CODE", BuildConfig.FLAVOR, "TAG", BuildConfig.FLAVOR, "getTAG", "()Ljava/lang/String;", "setTAG", "(Ljava/lang/String;)V", PaymentConstants.Category.CONFIG, "Lcom/htmedia/mint/pojo/config/Config;", "getActivityResultLauncher", "Landroidx/activity/result/ActivityResultLauncher;", "Landroid/content/Intent;", "mContentBinding", "Lcom/htmedia/mint/databinding/ActivityCrifWebviewBinding;", "getMContentBinding", "()Lcom/htmedia/mint/databinding/ActivityCrifWebviewBinding;", "setMContentBinding", "(Lcom/htmedia/mint/databinding/ActivityCrifWebviewBinding;)V", "response", "uploadMessage", "Landroid/webkit/ValueCallback;", BuildConfig.FLAVOR, "Landroid/net/Uri;", "url", BuildConfig.FLAVOR, "getOnBack", "initWebView", "webView", "Landroid/webkit/WebView;", "onActivityResult", "requestCode", "resultCode", Parameters.DATA, "onBackPressListener", "onBackPressed", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "setupDarkMode", "setupToolbar", "text", "CRIFWebViewClient", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class CRIFWebView extends AppCompatActivity {
    private ValueCallback<Uri[]> b;
    private ActivityResultLauncher<Intent> c;
    private Config f;
    public x4.w g;
    private final int a = 100;
    private String d = BuildConfig.FLAVOR;
    private String e = BuildConfig.FLAVOR;
    private String h = "crifOfferWebInterface";

    @Metadata(d1 = {"\u0000Z\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\b\u0012\u0018\u00002\u00020\u0001B\u001d\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\bJ\u001c\u0010\u0015\u001a\u00020\u00162\b\u0010\u0017\u001a\u0004\u0018\u00010\u00182\b\u0010\u0019\u001a\u0004\u0018\u00010\u0010H\u0016J&\u0010\u001a\u001a\u00020\u00162\b\u0010\u0017\u001a\u0004\u0018\u00010\u00182\b\u0010\u001b\u001a\u0004\u0018\u00010\u001c2\b\u0010\u001d\u001a\u0004\u0018\u00010\u001eH\u0016J&\u0010\u001f\u001a\u00020\u00162\b\u0010\u0017\u001a\u0004\u0018\u00010\u00182\b\u0010\u001b\u001a\u0004\u0018\u00010\u001c2\b\u0010 \u001a\u0004\u0018\u00010!H\u0016J&\u0010\"\u001a\u00020\u00162\b\u0010\u0017\u001a\u0004\u0018\u00010\u00182\b\u0010#\u001a\u0004\u0018\u00010$2\b\u0010\u001d\u001a\u0004\u0018\u00010%H\u0016J\u0018\u0010&\u001a\u00020'2\u0006\u0010\u0017\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u0010H\u0016R\u0011\u0010\u0006\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000eR\u001a\u0010\u000f\u001a\u00020\u0010X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0011\u0010\u0012\"\u0004\b\u0013\u0010\u0014¨\u0006("}, d2 = {"Lcom/htmedia/mint/utils/CRIFWebView$CRIFWebViewClient;", "Landroid/webkit/WebViewClient;", LogCategory.CONTEXT, "Landroidx/appcompat/app/AppCompatActivity;", "progressBar", "Landroid/widget/ProgressBar;", PaymentConstants.Category.CONFIG, "Lcom/htmedia/mint/pojo/config/Config;", "(Landroidx/appcompat/app/AppCompatActivity;Landroid/widget/ProgressBar;Lcom/htmedia/mint/pojo/config/Config;)V", "getConfig", "()Lcom/htmedia/mint/pojo/config/Config;", "getContext", "()Landroidx/appcompat/app/AppCompatActivity;", "getProgressBar", "()Landroid/widget/ProgressBar;", "response", BuildConfig.FLAVOR, "getResponse", "()Ljava/lang/String;", "setResponse", "(Ljava/lang/String;)V", "onPageFinished", BuildConfig.FLAVOR, "view", "Landroid/webkit/WebView;", "url", "onReceivedError", "request", "Landroid/webkit/WebResourceRequest;", "error", "Landroid/webkit/WebResourceError;", "onReceivedHttpError", "errorResponse", "Landroid/webkit/WebResourceResponse;", "onReceivedSslError", "handler", "Landroid/webkit/SslErrorHandler;", "Landroid/net/http/SslError;", "shouldOverrideUrlLoading", BuildConfig.FLAVOR, "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
    private static class a extends WebViewClient {
        private final AppCompatActivity a;
        private final ProgressBar b;
        private final Config c;
        private String d;

        public a(AppCompatActivity appCompatActivity, ProgressBar progressBar, Config config) {
            kotlin.jvm.internal.m.g(appCompatActivity, LogCategory.CONTEXT);
            kotlin.jvm.internal.m.g(progressBar, "progressBar");
            kotlin.jvm.internal.m.g(config, PaymentConstants.Category.CONFIG);
            this.a = appCompatActivity;
            this.b = progressBar;
            this.c = config;
            this.d = BuildConfig.FLAVOR;
        }

        public final void a(String str) {
            kotlin.jvm.internal.m.g(str, "<set-?>");
            this.d = str;
        }

        @Override
        public void onPageFinished(WebView view, String url) {
            super.onPageFinished(view, url);
            this.b.setVisibility(8);
            if (view == null) {
                return;
            }
            view.setVisibility(0);
        }

        @Override
        public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
            super.onReceivedError(view, request, error);
            this.b.setVisibility(8);
        }

        @Override
        public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
            super.onReceivedHttpError(view, request, errorResponse);
            this.b.setVisibility(8);
        }

        @Override
        public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
            super.onReceivedSslError(view, handler, error);
            this.b.setVisibility(8);
        }

        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            CRIFInnerData data;
            CRIFInnerData data2;
            CrifConfig crifConfig;
            kotlin.jvm.internal.m.g(view, "view");
            kotlin.jvm.internal.m.g(url, "url");
            Config config = this.c;
            String str = null;
            if (!f0.j2(url, (ArrayList) ((config == null || (crifConfig = config.getCrifConfig()) == null) ? null : crifConfig.getPersonalLoanUrls()))) {
                view.loadUrl(url);
            } else if (f0.G1(this.a, "userClient") != null) {
                AppCompatActivity appCompatActivity = this.a;
                f0.z2(appCompatActivity, f0.w(url, appCompatActivity, f0.G1(appCompatActivity, "userToken"), f0.G1(this.a, "userClient")));
            } else if (TextUtils.isEmpty(this.d)) {
                AppCompatActivity appCompatActivity2 = this.a;
                f0.z2(appCompatActivity2, f0.w(url, appCompatActivity2, BuildConfig.FLAVOR, BuildConfig.FLAVOR));
            } else {
                Gson gson = new Gson();
                Object fromJson = gson.fromJson(this.d, CrifResponseData.class);
                kotlin.jvm.internal.m.f(fromJson, "fromJson(...)");
                CrifPojoResponse data3 = ((CrifResponseData) fromJson).getData();
                kotlin.jvm.internal.m.d(data3);
                SocialResponsePojo socialResponsePojo = new SocialResponsePojo();
                String resultData = (data3 == null || (data2 = data3.getData()) == null) ? null : data2.getResultData();
                Object fromJson2 = gson.fromJson(resultData, CrifResultData.class);
                kotlin.jvm.internal.m.f(fromJson2, "fromJson(...)");
                socialResponsePojo.setData(((CrifResultData) fromJson2).getData());
                if (resultData == null || resultData.length() == 0) {
                    AppCompatActivity appCompatActivity3 = this.a;
                    f0.z2(appCompatActivity3, f0.w(url, appCompatActivity3, BuildConfig.FLAVOR, BuildConfig.FLAVOR));
                } else {
                    AppCompatActivity appCompatActivity4 = this.a;
                    if (data3 != null && (data = data3.getData()) != null) {
                        str = data.getToken();
                    }
                    f0.z2(appCompatActivity4, f0.w(url, appCompatActivity4, str, socialResponsePojo.getData().getClientId()));
                }
            }
            return true;
        }
    }

    @Metadata(d1 = {"\u0000+\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J0\u0010\u0002\u001a\u00020\u00032\b\u0010\u0004\u001a\u0004\u0018\u00010\u00052\u0012\u0010\u0006\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\t0\b0\u00072\b\u0010\n\u001a\u0004\u0018\u00010\u000bH\u0016¨\u0006\f"}, d2 = {"com/htmedia/mint/utils/CRIFWebView$initWebView$2", "Landroid/webkit/WebChromeClient;", "onShowFileChooser", BuildConfig.FLAVOR, "webView", "Landroid/webkit/WebView;", "filePathCallback", "Landroid/webkit/ValueCallback;", BuildConfig.FLAVOR, "Landroid/net/Uri;", "fileChooserParams", "Landroid/webkit/WebChromeClient$FileChooserParams;", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
    public static final class b extends WebChromeClient {
        b() {
        }

        @Override
        public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, WebChromeClient.FileChooserParams fileChooserParams) {
            kotlin.jvm.internal.m.g(filePathCallback, "filePathCallback");
            CRIFWebView.this.b = filePathCallback;
            Intent intent = new Intent("android.intent.action.GET_CONTENT");
            intent.addCategory("android.intent.category.OPENABLE");
            intent.setType("image/*");
            ActivityResultLauncher activityResultLauncher = CRIFWebView.this.c;
            if (activityResultLauncher == null) {
                kotlin.jvm.internal.m.w("getActivityResultLauncher");
                activityResultLauncher = null;
            }
            activityResultLauncher.launch(Intent.createChooser(intent, "Select ID Card"));
            return true;
        }
    }

    @Metadata(d1 = {"\u0000\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001¨\u0006\u0002"}, d2 = {"com/htmedia/mint/utils/CRIFWebView$initWebView$client$1", "Lcom/htmedia/mint/utils/CRIFWebView$CRIFWebViewClient;", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
    public static final class c extends a {
        c(CRIFWebView cRIFWebView, ProgressBar progressBar, Config config) {
            super(cRIFWebView, progressBar, config);
            kotlin.jvm.internal.m.d(progressBar);
        }
    }

    @Metadata(d1 = {"\u0000\u0019\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H\u0016J\u0010\u0010\u0004\u001a\u00020\u00032\u0006\u0010\u0005\u001a\u00020\u0006H\u0016¨\u0006\u0007"}, d2 = {"com/htmedia/mint/utils/CRIFWebView$initWebView$listener$1", "Lcom/htmedia/mint/utils/CRIFListener;", "onCRIFHome", BuildConfig.FLAVOR, "onCRIFResponse", "response1", BuildConfig.FLAVOR, "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
    public static final class d implements u {
        final c b;

        d(c cVar) {
            this.b = cVar;
        }

        @Override
        public void a(String str) {
            kotlin.jvm.internal.m.g(str, "response1");
            CRIFWebView.this.e = str;
            this.b.a(CRIFWebView.this.e);
        }

        @Override
        public void b() {
            CRIFWebView.this.T();
        }
    }

    @Metadata(d1 = {"\u0000\u0011\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H\u0016¨\u0006\u0004"}, d2 = {"com/htmedia/mint/utils/CRIFWebView$onBackPressListener$1", "Landroidx/activity/OnBackPressedCallback;", "handleOnBackPressed", BuildConfig.FLAVOR, "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
    public static final class e extends OnBackPressedCallback {
        e() {
            super(true);
        }

        public void handleOnBackPressed() {
            String str;
            WebView webView;
            x4.w S = CRIFWebView.this.S();
            if (S == null || (webView = S.e) == null || (str = webView.getUrl()) == null) {
                str = BuildConfig.FLAVOR;
            }
            if (CRIFWebView.this.S().e.canGoBack()) {
                Config config = CRIFWebView.this.f;
                if (config == null) {
                    kotlin.jvm.internal.m.w(PaymentConstants.Category.CONFIG);
                    config = null;
                }
                CrifConfig crifConfig = config.getCrifConfig();
                if (!f0.i2(str, (ArrayList) (crifConfig != null ? crifConfig.getLastPathComponents() : null))) {
                    CRIFWebView.this.S().e.goBack();
                    return;
                }
            }
            CRIFWebView.this.T();
        }
    }

    private final void Q() {
        ActivityResultLauncher<Intent> registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
            public final void onActivityResult(Object obj) {
                CRIFWebView.R(CRIFWebView.this, (ActivityResult) obj);
            }
        });
        kotlin.jvm.internal.m.f(registerForActivityResult, "registerForActivityResult(...)");
        this.c = registerForActivityResult;
    }

    public static final void R(CRIFWebView cRIFWebView, ActivityResult activityResult) {
        ug.a0 a0Var;
        kotlin.jvm.internal.m.g(cRIFWebView, "this$0");
        if (activityResult.getResultCode() == -1) {
            Intent data = activityResult.getData();
            Uri data2 = data != null ? data.getData() : null;
            if (data2 != null) {
                ValueCallback<Uri[]> valueCallback = cRIFWebView.b;
                if (valueCallback != null) {
                    valueCallback.onReceiveValue(new Uri[]{data2});
                }
                cRIFWebView.b = null;
                a0Var = ug.a0.a;
            } else {
                a0Var = null;
            }
            if (a0Var == null) {
                cRIFWebView.b = null;
            }
        }
    }

    private final void U(WebView webView) {
        WebSettings settings;
        S().b.setVisibility(0);
        if (webView != null && (settings = webView.getSettings()) != null) {
            settings.setJavaScriptEnabled(true);
            settings.setAllowFileAccess(true);
            settings.setAllowContentAccess(true);
            settings.setAllowFileAccessFromFileURLs(true);
            settings.setAllowUniversalAccessFromFileURLs(true);
            settings.setDomStorageEnabled(true);
            settings.setDatabaseEnabled(true);
            settings.setSupportMultipleWindows(true);
        }
        ProgressBar progressBar = S().b;
        Config config = this.f;
        if (config == null) {
            kotlin.jvm.internal.m.w(PaymentConstants.Category.CONFIG);
            config = null;
        }
        c cVar = new c(this, progressBar, config);
        webView.setWebViewClient(cVar);
        webView.setWebChromeClient(new b());
        S().e.addJavascriptInterface(new l7.i(this, new d(cVar)), "Android");
        S().e.loadUrl(this.d);
    }

    private final void V() {
        getOnBackPressedDispatcher().addCallback(this, new e());
    }

    private final void X(String str) {
        S().c.setContentInsetStartWithNavigation(0);
        setSupportActionBar(S().c);
        if (getSupportActionBar() != null) {
            ActionBar supportActionBar = getSupportActionBar();
            kotlin.jvm.internal.m.d(supportActionBar);
            supportActionBar.setDisplayShowTitleEnabled(false);
            ActionBar supportActionBar2 = getSupportActionBar();
            kotlin.jvm.internal.m.d(supportActionBar2);
            supportActionBar2.setDisplayHomeAsUpEnabled(true);
            ActionBar supportActionBar3 = getSupportActionBar();
            kotlin.jvm.internal.m.d(supportActionBar3);
            supportActionBar3.setDisplayShowHomeEnabled(true);
        }
        S().c.setTitle(str + "  ");
        S().c.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                CRIFWebView.Y(CRIFWebView.this, view);
            }
        });
        if (S().c.getTitle() != null) {
            String obj = S().c.getTitle().toString();
            int childCount = S().c.getChildCount();
            for (int i = 0; i < childCount; i++) {
                AppCompatTextView childAt = S().c.getChildAt(i);
                kotlin.jvm.internal.m.f(childAt, "getChildAt(...)");
                if (kotlin.jvm.internal.m.b("androidx.appcompat.widget.AppCompatTextView", childAt.getClass().getName())) {
                    AppCompatTextView appCompatTextView = childAt;
                    if (kotlin.jvm.internal.m.b(appCompatTextView.getText(), obj)) {
                        appCompatTextView.setTypeface(ResourcesCompat.getFont(this, 2131296270));
                        appCompatTextView.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
                        appCompatTextView.setCompoundDrawablePadding(0);
                        childAt.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public final void onClick(View view) {
                                CRIFWebView.Z(CRIFWebView.this, view);
                            }
                        });
                    }
                }
            }
        }
    }

    public static final void Y(CRIFWebView cRIFWebView, View view) {
        kotlin.jvm.internal.m.g(cRIFWebView, "this$0");
        cRIFWebView.T();
    }

    public static final void Z(CRIFWebView cRIFWebView, View view) {
        kotlin.jvm.internal.m.g(cRIFWebView, "this$0");
        cRIFWebView.T();
    }

    private final void setupDarkMode() {
        getWindow().setStatusBarColor(-1);
        getWindow().getDecorView().setSystemUiVisibility(8192);
        S().c.setTitleTextColor(ResourcesCompat.getColor(getResources(), 2131101008, (Resources.Theme) null));
        S().c.setNavigationIcon(2131231330);
        S().d.setBackgroundColor(getResources().getColor(2131100913));
    }

    public final x4.w S() {
        x4.w wVar = this.g;
        if (wVar != null) {
            return wVar;
        }
        kotlin.jvm.internal.m.w("mContentBinding");
        return null;
    }

    public final void T() {
        CRIFInnerData data;
        CRIFInnerData data2;
        CRIFInnerData data3;
        if (f0.G1(this, "userClient") != null) {
            finish();
            return;
        }
        if (TextUtils.isEmpty(this.e)) {
            finish();
            Log.e("handleOnBackPressed: ", "555");
            return;
        }
        Gson gson = new Gson();
        Object fromJson = gson.fromJson(this.e, CrifResponseData.class);
        kotlin.jvm.internal.m.f(fromJson, "fromJson(...)");
        CrifPojoResponse data4 = ((CrifResponseData) fromJson).getData();
        kotlin.jvm.internal.m.d(data4);
        SocialResponsePojo socialResponsePojo = new SocialResponsePojo();
        String str = null;
        String resultData = (data4 == null || (data3 = data4.getData()) == null) ? null : data3.getResultData();
        if (resultData == null || resultData.length() == 0) {
            return;
        }
        Object fromJson2 = gson.fromJson(resultData, CrifResultData.class);
        kotlin.jvm.internal.m.f(fromJson2, "fromJson(...)");
        socialResponsePojo.setData(((CrifResultData) fromJson2).getData());
        SharedPreferences sharedPreferences = getSharedPreferences("LoginData", 0);
        kotlin.jvm.internal.m.f(sharedPreferences, "getSharedPreferences(...)");
        SharedPreferences.Editor edit = sharedPreferences.edit();
        edit.putString("userToken", (data4 == null || (data2 = data4.getData()) == null) ? null : data2.getToken());
        edit.apply();
        f0.X2(this, socialResponsePojo);
        String clientId = socialResponsePojo.getData().getClientId();
        kotlin.jvm.internal.m.f(clientId, "getClientId(...)");
        if (data4 != null && (data = data4.getData()) != null) {
            str = data.getToken();
        }
        if (str == null) {
            str = BuildConfig.FLAVOR;
        }
        new l7.h(this, clientId, str).performActionJustAfterLogin();
    }

    public final void W(x4.w wVar) {
        kotlin.jvm.internal.m.g(wVar, "<set-?>");
        this.g = wVar;
    }

    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == 102 && resultCode == -1) {
            HashMap hashMap = new HashMap();
            String F1 = f0.F1(this);
            if (F1 != null) {
                hashMap.put("userEmail", F1);
            }
            if (f0.G1(this, "userName") != null) {
                String G1 = f0.G1(this, "userName");
                kotlin.jvm.internal.m.f(G1, "getUserInfo(...)");
                hashMap.put("userName", G1);
            }
            if (!hashMap.isEmpty()) {
                o0.i(hashMap);
            }
            f0.w.add(q.a.AUTH.a());
            finish();
        }
        super/*androidx.fragment.app.FragmentActivity*/.onActivityResult(requestCode, resultCode, data);
    }

    public void onBackPressed() {
        String str;
        WebView webView;
        x4.w S = S();
        if (S == null || (webView = S.e) == null || (str = webView.getUrl()) == null) {
            str = BuildConfig.FLAVOR;
        }
        if (S().e.canGoBack()) {
            Config config = this.f;
            if (config == null) {
                kotlin.jvm.internal.m.w(PaymentConstants.Category.CONFIG);
                config = null;
            }
            CrifConfig crifConfig = config.getCrifConfig();
            if (!f0.i2(str, (ArrayList) (crifConfig != null ? crifConfig.getLastPathComponents() : null))) {
                S().e.goBack();
                return;
            }
        }
        T();
    }

    protected void onCreate(android.os.Bundle r3) {
        throw new UnsupportedOperationException("Method not decompiled: com.htmedia.mint.utils.CRIFWebView.onCreate(android.os.Bundle):void");
    }
}