正在查看: 万能钥匙 v1.1.23 应用的 WebView2.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 万能钥匙 v1.1.23 应用的 WebView2.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.wifitutu.link.foundation.kernel.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.widget.FrameLayout;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import java.net.URL;
import java.util.Map;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import lg0.e4;
import lg0.h4;
@Metadata(d1 = {"\u0000t\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0010$\n\u0002\b\n\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0016\u0018\u00002\u00020\u00012\u00020\u00022\u00020\u0002B\u001d\b\u0007\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\n\b\u0002\u0010\u0006\u001a\u0004\u0018\u00010\u0005¢\u0006\u0004\b\u0007\u0010\bJ\u000f\u0010\n\u001a\u00020\tH\u0014¢\u0006\u0004\b\n\u0010\u000bJ\u000f\u0010\f\u001a\u00020\tH\u0014¢\u0006\u0004\b\f\u0010\u000bJ\u000f\u0010\r\u001a\u00020\tH\u0016¢\u0006\u0004\b\r\u0010\u000bJ\u0017\u0010\u0010\u001a\u00020\t2\u0006\u0010\u000f\u001a\u00020\u000eH\u0016¢\u0006\u0004\b\u0010\u0010\u0011J-\u0010\u0010\u001a\u00020\t2\u0006\u0010\u000f\u001a\u00020\u00122\u0014\u0010\u0014\u001a\u0010\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u000e\u0018\u00010\u0013H\u0016¢\u0006\u0004\b\u0010\u0010\u0015J?\u0010\u001b\u001a\u00020\t2\b\u0010\u0016\u001a\u0004\u0018\u00010\u000e2\u0006\u0010\u0017\u001a\u00020\u000e2\b\u0010\u0018\u001a\u0004\u0018\u00010\u000e2\b\u0010\u0019\u001a\u0004\u0018\u00010\u000e2\b\u0010\u001a\u001a\u0004\u0018\u00010\u000eH\u0016¢\u0006\u0004\b\u001b\u0010\u001cJ)\u0010 \u001a\u00020\t2\u0006\u0010\u001d\u001a\u00020\u000e2\u0010\u0010\u001f\u001a\f\u0012\u0006\u0012\u0004\u0018\u00010\u000e\u0018\u00010\u001eH\u0016¢\u0006\u0004\b \u0010!J\u000f\u0010\"\u001a\u00020\tH\u0016¢\u0006\u0004\b\"\u0010\u000bJ\u000f\u0010#\u001a\u00020\tH\u0016¢\u0006\u0004\b#\u0010\u000bJ\u000f\u0010%\u001a\u00020$H\u0016¢\u0006\u0004\b%\u0010&J\u000f\u0010'\u001a\u00020\tH\u0016¢\u0006\u0004\b'\u0010\u000bJ\u000f\u0010(\u001a\u00020$H\u0016¢\u0006\u0004\b(\u0010&J\u000f\u0010)\u001a\u00020\tH\u0016¢\u0006\u0004\b)\u0010\u000bJ\u0017\u0010,\u001a\u00020$2\u0006\u0010+\u001a\u00020*H\u0016¢\u0006\u0004\b,\u0010-J\u0017\u0010.\u001a\u00020\t2\u0006\u0010+\u001a\u00020*H\u0016¢\u0006\u0004\b.\u0010/J\u0011\u00101\u001a\u0004\u0018\u000100H\u0016¢\u0006\u0004\b1\u00102J\u0019\u00104\u001a\u00020\t2\b\u00103\u001a\u0004\u0018\u000100H\u0016¢\u0006\u0004\b4\u00105J\u0019\u00109\u001a\u0004\u0018\u0001082\u0006\u00107\u001a\u000206H\u0016¢\u0006\u0004\b9\u0010:J\u0019\u0010=\u001a\u00020$2\b\u0010<\u001a\u0004\u0018\u00010;H\u0016¢\u0006\u0004\b=\u0010>R\u0018\u0010@\u001a\u0004\u0018\u00010?8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b@\u0010AR\u0011\u0010D\u001a\u00020?8F¢\u0006\u0006\u001a\u0004\bB\u0010C¨\u0006E"}, d2 = {"Lcom/wifitutu/link/foundation/kernel/ui/WebView2;", "Landroid/widget/FrameLayout;", "", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attrs", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "Llg0/e0;", "_doEmitChildrenChanged", "()V", "onReset", "destroy", "", "url", "loadUrl", "(Ljava/lang/String;)V", "Ljava/net/URL;", "", "additionalHttpHeaders", "(Ljava/net/URL;Ljava/util/Map;)V", "baseUrl", "data", "mimeType", "encoding", "historyUrl", "loadDataWithBaseURL", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "script", "Landroid/webkit/ValueCallback;", "resultCallback", "evaluateJavascript", "(Ljava/lang/String;Landroid/webkit/ValueCallback;)V", "stopLoading", "reload", "", "canGoBack", "()Z", "goBack", "canGoForward", "goForward", "", "steps", "canGoBackOrForward", "(I)Z", "goBackOrForward", "(I)V", "Landroid/webkit/WebChromeClient;", "getWebChromeClient", "()Landroid/webkit/WebChromeClient;", "client", "setWebChromeClient", "(Landroid/webkit/WebChromeClient;)V", "Landroid/view/inputmethod/EditorInfo;", "outAttrs", "Landroid/view/inputmethod/InputConnection;", "onCreateInputConnection", "(Landroid/view/inputmethod/EditorInfo;)Landroid/view/inputmethod/InputConnection;", "Landroid/view/KeyEvent;", "event", "dispatchKeyEvent", "(Landroid/view/KeyEvent;)Z", "Lcom/wifitutu/link/foundation/kernel/ui/WebView;", "_webview", "Lcom/wifitutu/link/foundation/kernel/ui/WebView;", "getWebView", "()Lcom/wifitutu/link/foundation/kernel/ui/WebView;", "webView", "lib-kernel_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public class WebView2 extends FrameLayout implements c0 {
public static ChangeQuickRedirect changeQuickRedirect;
private WebView _webview;
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
public static final class a extends kotlin.jvm.internal.p implements ah0.a<Object> {
public static ChangeQuickRedirect changeQuickRedirect;
public static final a s = new a();
public a() {
super(0);
}
@Override
public final Object invoke() {
return "WebView2: 实例化WebView系统实例";
}
}
public WebView2(android.content.Context r3) {
throw new UnsupportedOperationException("Method not decompiled: com.wifitutu.link.foundation.kernel.ui.WebView2.<init>(android.content.Context):void");
}
public WebView2(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public WebView2(Context context, AttributeSet attributeSet, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(context, (i & 2) != 0 ? null : attributeSet);
}
public void _doEmitChildrenChanged() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12474, new Class[0], Void.TYPE).isSupported) {
return;
}
z0.b(this, null, 1, null);
}
public boolean canGoBack() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12483, new Class[0], Boolean.TYPE);
return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : getWebView().canGoBack();
}
public boolean canGoBackOrForward(int steps) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(steps)}, this, changeQuickRedirect, false, 12487, new Class[]{Integer.TYPE}, Boolean.TYPE);
return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : getWebView().canGoBackOrForward(steps);
}
public boolean canGoForward() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12485, new Class[0], Boolean.TYPE);
return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : getWebView().canGoForward();
}
public synchronized void destroy() {
try {
try {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12476, new Class[0], Void.TYPE).isSupported) {
return;
}
WebView webView = this._webview;
if (webView != null) {
webView.destroy();
}
this._webview = null;
} catch (Throwable th) {
th = th;
throw th;
}
} catch (Throwable th2) {
th = th2;
throw th;
}
}
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{event}, this, changeQuickRedirect, false, 12492, new Class[]{KeyEvent.class}, Boolean.TYPE);
return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : getWebView().dispatchKeyEvent(event);
}
public void evaluateJavascript(String script, ValueCallback<String> resultCallback) {
if (PatchProxy.proxy(new Object[]{script, resultCallback}, this, changeQuickRedirect, false, 12480, new Class[]{String.class, ValueCallback.class}, Void.TYPE).isSupported) {
return;
}
getWebView().evaluateJavascript(script, resultCallback);
}
public WebChromeClient getWebChromeClient() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12489, new Class[0], WebChromeClient.class);
return proxy.isSupported ? (WebChromeClient) proxy.result : getWebView().getWebChromeClient();
}
public final synchronized WebView getWebView() {
try {
try {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12475, new Class[0], WebView.class);
if (proxy.isSupported) {
return (WebView) proxy.result;
}
if (this._webview == null) {
final Context context = getContext();
WebView webView = new WebView(context) {
public static ChangeQuickRedirect changeQuickRedirect;
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
public static final class a extends kotlin.jvm.internal.p implements ah0.a<Object> {
public static ChangeQuickRedirect changeQuickRedirect;
public static final a s = new a();
public a() {
super(0);
}
@Override
public final Object invoke() {
return "WebView2: 移除WebView系统实例";
}
}
@Override
public void destroy() {
WebView webView2;
WebView webView3;
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12493, new Class[0], Void.TYPE).isSupported) {
return;
}
super.destroy();
h4.l().y(e4.b(), a.s);
webView2 = WebView2.this._webview;
if (webView2 != null) {
webView2.removeAllViews();
}
webView3 = WebView2.this._webview;
if (webView3 != null) {
z0.l(webView3);
}
WebView2.this._webview = null;
WebView2.this.onReset();
}
};
h4.l().y(e4.b(), a.s);
webView.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
addView(webView);
_doEmitChildrenChanged();
this._webview = webView;
}
WebView webView2 = this._webview;
kotlin.jvm.internal.n.f(webView2);
return webView2;
} catch (Throwable th) {
th = th;
throw th;
}
} catch (Throwable th2) {
th = th2;
}
}
public void goBack() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12484, new Class[0], Void.TYPE).isSupported) {
return;
}
getWebView().goBack();
}
public void goBackOrForward(int steps) {
if (PatchProxy.proxy(new Object[]{new Integer(steps)}, this, changeQuickRedirect, false, 12488, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
return;
}
getWebView().goBackOrForward(steps);
}
public void goForward() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12486, new Class[0], Void.TYPE).isSupported) {
return;
}
getWebView().goForward();
}
public void loadDataWithBaseURL(String baseUrl, String data, String mimeType, String encoding, String historyUrl) {
if (PatchProxy.proxy(new Object[]{baseUrl, data, mimeType, encoding, historyUrl}, this, changeQuickRedirect, false, 12479, new Class[]{String.class, String.class, String.class, String.class, String.class}, Void.TYPE).isSupported) {
return;
}
getWebView().loadDataWithBaseURL(baseUrl, data, mimeType, encoding, historyUrl);
}
public void loadUrl(String url) {
if (PatchProxy.proxy(new Object[]{url}, this, changeQuickRedirect, false, 12477, new Class[]{String.class}, Void.TYPE).isSupported) {
return;
}
getWebView().loadUrl(url);
}
public void loadUrl(URL url, Map<String, String> additionalHttpHeaders) {
if (PatchProxy.proxy(new Object[]{url, additionalHttpHeaders}, this, changeQuickRedirect, false, 12478, new Class[]{URL.class, Map.class}, Void.TYPE).isSupported) {
return;
}
getWebView().loadUrl(url, additionalHttpHeaders);
}
@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{outAttrs}, this, changeQuickRedirect, false, 12491, new Class[]{EditorInfo.class}, InputConnection.class);
return proxy.isSupported ? (InputConnection) proxy.result : getWebView().onCreateInputConnection(outAttrs);
}
public void onReset() {
}
public void reload() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12482, new Class[0], Void.TYPE).isSupported) {
return;
}
getWebView().reload();
}
public void setWebChromeClient(WebChromeClient client) {
if (PatchProxy.proxy(new Object[]{client}, this, changeQuickRedirect, false, 12490, new Class[]{WebChromeClient.class}, Void.TYPE).isSupported) {
return;
}
getWebView().setWebChromeClient(client);
}
public void stopLoading() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 12481, new Class[0], Void.TYPE).isSupported) {
return;
}
getWebView().stopLoading();
}
}