正在查看: Mint v5.7.3 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.taboola.android.tblweb;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Pair;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import com.taboola.android.global_components.monitor.TBLUrlParamsChange;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
import java.util.regex.Pattern;
class b extends WebViewClient {
private com.taboola.android.global_components.monitor.a a;
b(com.taboola.android.global_components.monitor.a aVar) {
this.a = aVar;
}
private static URI a(String str, String str2) throws URISyntaxException, NullPointerException, AssertionError {
if (TextUtils.isEmpty(str2)) {
return new URI(str);
}
String query = new URI(str).getQuery();
StringBuilder sb2 = new StringBuilder();
sb2.append(str);
sb2.append(TextUtils.isEmpty(query) ? "?" : "&");
return new URI(sb2.toString() + Uri.encode(str2, "&="));
}
@NonNull
private Pair<WebResourceResponse, URL> b(URL url) throws IOException {
HttpURLConnection httpURLConnection = (HttpURLConnection) ((URLConnection) FirebasePerfUrlConnection.instrument(url.openConnection()));
httpURLConnection.connect();
return new Pair<>(new WebResourceResponse("text/html", "UTF-8", new BufferedInputStream(httpURLConnection.getInputStream())), url);
}
private Pair<WebResourceResponse, URL> c(String str, TBLUrlParamsChange tBLUrlParamsChange) throws URISyntaxException, IOException, NullPointerException, AssertionError {
if (tBLUrlParamsChange == null || TextUtils.isEmpty(tBLUrlParamsChange.getParams())) {
return null;
}
return b(new URL(a(str, tBLUrlParamsChange.getParams()).toString()));
}
private static boolean d(String str) {
return str.endsWith("mobile-loader.js");
}
private static boolean e(String str) {
return str.startsWith("https://cdn.taboola.com/shared/templateJS.html");
}
private static boolean f(String str) {
return Pattern.compile("https://trc.taboola.com/.*/trc/3/json|http://trc.taboola.com/.*/trc/3/json").matcher(str).lookingAt();
}
private static boolean g(String str) {
return str.startsWith("https://trc.taboola.com") || str.startsWith("http://trc.taboola.com");
}
@Override
@Nullable
@RequiresApi(api = 21)
public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
return shouldInterceptRequest(webView, webResourceRequest.getUrl().toString());
}
@Override
@androidx.annotation.Nullable
public android.webkit.WebResourceResponse shouldInterceptRequest(android.webkit.WebView r7, java.lang.String r8) {
throw new UnsupportedOperationException("Method not decompiled: com.taboola.android.tblweb.b.shouldInterceptRequest(android.webkit.WebView, java.lang.String):android.webkit.WebResourceResponse");
}
}