导航菜单

页面标题

页面副标题

Empower MX v1.29.4.340 - f.java 源代码

正在查看: Empower MX v1.29.4.340 应用的 f.java JAVA 源代码文件

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


package com.stripe.android.stripe3ds2.views;

import android.net.Uri;
import android.webkit.URLUtil;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import java.util.Locale;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;

public final class f extends WebViewClient {
    public static final a b = new a(null);
    private b a;

    public static final class a {
        public a(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private a() {
        }
    }

    public interface b {
        void a(String str);
    }

    public final void a(Uri uri) {
        b bVar;
        Intrinsics.checkNotNullParameter(uri, "uri");
        String uri2 = uri.toString();
        Intrinsics.checkNotNullExpressionValue(uri2, "toString(...)");
        Locale locale = Locale.ENGLISH;
        Intrinsics.checkNotNullExpressionValue(locale, "ENGLISH");
        String lowerCase = uri2.toLowerCase(locale);
        Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase(locale)");
        if (!StringsKt.L(lowerCase, "https://emv3ds/challenge", false, 2, (Object) null) || (bVar = this.a) == null) {
            return;
        }
        bVar.a(uri.getQuery());
    }

    public final void b(b bVar) {
        this.a = bVar;
    }

    public final boolean c(Uri uri) {
        Intrinsics.checkNotNullParameter(uri, "uri");
        return URLUtil.isDataUrl(uri.toString());
    }

    @Override
    public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
        Intrinsics.checkNotNullParameter(webView, "view");
        Intrinsics.checkNotNullParameter(webResourceRequest, "request");
        Uri url = webResourceRequest.getUrl();
        Intrinsics.checkNotNullExpressionValue(url, "getUrl(...)");
        a(url);
        Uri url2 = webResourceRequest.getUrl();
        Intrinsics.checkNotNullExpressionValue(url2, "getUrl(...)");
        return c(url2) ? super.shouldInterceptRequest(webView, webResourceRequest) : new WebResourceResponse(null, null, null);
    }

    @Override
    public boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
        Intrinsics.checkNotNullParameter(webView, "view");
        Intrinsics.checkNotNullParameter(webResourceRequest, "request");
        Uri url = webResourceRequest.getUrl();
        Intrinsics.checkNotNullExpressionValue(url, "getUrl(...)");
        a(url);
        return true;
    }
}