QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 WebView.java 源代码,内容仅作参考
package com.tencent.xweb;
import android.content.Context;
import android.content.MutableContextWrapper;
import android.content.ServiceConnection;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.TextureView;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.DownloadListener;
import android.webkit.ValueCallback;
import android.webkit.WebBackForwardList;
import android.webkit.WebView;
import android.widget.FrameLayout;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import com.tencent.xweb.internal.CookieInternal;
import com.tencent.xweb.internal.IWebView;
import com.tencent.xweb.internal.l;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.xwalk.core.Log;
import org.xwalk.core.XWalkEnvironment;
import org.xwalk.core.XWebCoreInfo;
public class WebView extends FrameLayout implements IWebView {
static c f82124b;
static String f82125c;
static boolean f82126d;
static com.tencent.luggage.wxa.uc.b i;
static boolean k;
private int f82127a;
IWebView e;
c f;
com.tencent.xweb.internal.d g;
View.OnLongClickListener h;
protected boolean j;
public interface PreInitCallback {
void a();
void b();
}
public enum a {
NOT_HOOK,
HOOK_NOT_EVALUTE_JS,
HOOK_EVALUTE_JS
}
public static class b {
private int f82134a = 0;
private String f82135b;
public void a(int i) {
this.f82134a = i;
}
public void a(String str) {
this.f82135b = str;
}
}
public enum c {
WV_KIND_NONE,
WV_KIND_CW,
WV_KIND_X5,
WV_KIND_SYS
}
public class d {
private WebView f82141b;
public d() {
}
public synchronized WebView a() {
return this.f82141b;
}
}
public static class e extends MutableContextWrapper {
IWebView f82142a;
public e(Context context) {
super(context);
}
public void a(IWebView iWebView) {
this.f82142a = iWebView;
}
@Override
public void setBaseContext(Context context) {
super.setBaseContext(context);
af.a("BASE_CONTEXT_CHANGED", this.f82142a);
}
@Override
public void unbindService(ServiceConnection serviceConnection) {
try {
super.unbindService(serviceConnection);
} catch (IllegalArgumentException e) {
Log.e("xweb.WebView", "ContextWrapper unbindService IllegalArgumentException", e);
}
}
}
static {
ah.a();
f82124b = c.WV_KIND_NONE;
f82125c = "";
f82126d = false;
k = false;
}
public WebView(Context context) {
this(context, null);
}
public WebView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public WebView(Context context, AttributeSet attributeSet, int i2) {
this(context, attributeSet, 0, c.WV_KIND_NONE);
}
public WebView(Context context, AttributeSet attributeSet, int i2, c cVar) {
super(a(context), attributeSet, i2);
this.f = c.WV_KIND_NONE;
this.j = false;
this.f82127a = -1;
a(cVar);
}
public static synchronized boolean _initWebviewCore(Context context, c cVar, PreInitCallback preInitCallback, boolean z) {
boolean a2;
synchronized (WebView.class) {
a2 = a(context, cVar, preInitCallback, true, false);
}
return a2;
}
private static Context a(Context context) {
return context instanceof MutableContextWrapper ? new e(((MutableContextWrapper) context).getBaseContext()) : context;
}
private List<TextureView> a(View view) {
ArrayList arrayList = new ArrayList();
if (view instanceof TextureView) {
arrayList.add((TextureView) view);
} else if (view instanceof ViewGroup) {
ViewGroup viewGroup = (ViewGroup) view;
for (int i2 = 0; i2 < viewGroup.getChildCount(); i2++) {
arrayList.addAll(a(viewGroup.getChildAt(i2)));
}
}
return arrayList;
}
private void a(c cVar) {
String str;
Log.i("xweb.WebView", "start to init, prefer type = " + getCurWebType() + " , forcetype = " + cVar);
if (XWalkEnvironment.getApplicationContext() == null) {
XWalkEnvironment.init(getContext());
}
if (this.f != c.WV_KIND_NONE) {
return;
}
if (getCurWebType() == c.WV_KIND_NONE) {
_initWebviewCore(getContext(), c.WV_KIND_SYS, null, true);
Log.e("xweb.Webview", "use xweb without init, force to use sys web");
}
if (com.tencent.xweb.internal.h.a().e()) {
this.f = c.WV_KIND_SYS;
XWalkEnvironment.addXWalkInitializeLog("xweb.WebView", "isTestingSys, force to use sys web");
} else if (cVar == c.WV_KIND_SYS) {
this.f = cVar;
l.a a2 = com.tencent.xweb.internal.l.a(c.WV_KIND_SYS);
if (a2 != null) {
a2.initWebviewCore(getContext(), null);
}
} else {
this.f = getCurWebType();
}
this.e = com.tencent.xweb.internal.l.a(this.f, this);
if (this.e == null) {
c[] cVarArr = {c.WV_KIND_CW, c.WV_KIND_SYS, c.WV_KIND_X5};
int i2 = 0;
while (true) {
if (i2 >= cVarArr.length) {
break;
}
if (cVarArr[i2] != this.f && _initWebviewCore(getContext(), cVarArr[i2], null, false)) {
this.e = com.tencent.xweb.internal.l.a(cVarArr[i2], this);
if (this.e != null) {
this.f = getCurWebType();
break;
}
}
i2++;
}
}
if (this.e == null) {
a(getContext(), c.WV_KIND_SYS, null, false, true);
this.e = com.tencent.xweb.internal.l.a(c.WV_KIND_SYS, this);
this.f = getCurWebType();
}
IWebView iWebView = this.e;
if (iWebView == null) {
Log.e("xweb.WebView", "init finally failed type = " + this.f);
com.tencent.xweb.util.h.H();
return;
}
addView(iWebView.getWebViewUI());
if (this.f != c.WV_KIND_X5) {
str = "this webview instance is using :" + this.f;
} else if (this.e.getX5WebViewExtension() != null) {
this.j = true;
str = "this webview instance is using x5-x5kernal";
} else {
str = "this webview instance is using x5-syskernal ";
}
Log.i("xweb.WebView", str);
if (this.e.getCurWebviewClient() != null) {
this.e.getCurWebviewClient().a(this.e.getDefalutOpProvider());
}
if (this.e.getCurWebChromeClient() != null) {
this.e.getCurWebChromeClient().a(this.e.getDefalutOpProvider());
}
this.e.getView().setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
EventCollector.getInstance().onViewLongClickedBefore(view);
boolean onLongClick = WebView.this.h != null ? WebView.this.h.onLongClick(WebView.this) : false;
EventCollector.getInstance().onViewLongClicked(view);
return onLongClick;
}
});
try {
this.g = (com.tencent.xweb.internal.d) com.tencent.xweb.internal.l.a(c.WV_KIND_CW).excute("STR_CMD_GET_DEBUG_VIEW", new Object[]{this});
this.g.a();
} catch (Exception unused) {
Log.e("xweb.WebView", "create IDebugView failed, use dummy one ");
this.g = new com.tencent.xweb.internal.d() {
@Override
public void a() {
}
@Override
public boolean a(String str2) {
return false;
}
};
}
if (getWebCoreType() == c.WV_KIND_CW) {
Context context = getContext();
if (context instanceof e) {
((e) context).a(this.e);
}
com.tencent.xweb.internal.k.a(c.WV_KIND_CW).b();
}
String a3 = getSettings().a();
getSettings().b(a3 + " MMWEBID/" + XWalkEnvironment.getGrayValue());
}
static synchronized boolean a(Context context, c cVar, PreInitCallback preInitCallback, boolean z, boolean z2) {
synchronized (WebView.class) {
if (!a(cVar, context, preInitCallback, z2) && z) {
cVar = c.WV_KIND_NONE;
c[] cVarArr = {c.WV_KIND_CW, c.WV_KIND_SYS, c.WV_KIND_X5};
int i2 = 0;
while (true) {
if (i2 >= cVarArr.length) {
break;
}
if (cVarArr[i2] != cVar && a(cVarArr[i2], context, preInitCallback, z2)) {
cVar = cVarArr[i2];
break;
}
i2++;
}
}
f82124b = cVar;
if (c.WV_KIND_NONE == cVar) {
com.tencent.xweb.util.h.G();
Log.e("xweb.WebView", "_initWebviewCore finally failed type = " + cVar);
return false;
}
XWalkEnvironment.addXWalkInitializeLog("init webview core type = " + cVar + ", sdk:" + XWalkEnvironment.SDK_VERSION + ",xweb apk ver:" + XWalkEnvironment.getAvailableVersion());
return true;
}
}
static boolean a(c cVar, Context context, PreInitCallback preInitCallback, boolean z) {
boolean z2 = false;
if (cVar == c.WV_KIND_X5 && !com.tencent.luggage.wxa.uc.c.a()) {
Log.e("xweb.WebView", "no tbs sdk compiled");
return false;
}
Log.i("xweb.WebView", "try to init webview core = " + cVar);
if (!z && com.tencent.xweb.internal.b.a(cVar)) {
com.tencent.xweb.util.h.c(cVar);
return false;
}
com.tencent.xweb.internal.b a2 = com.tencent.xweb.internal.b.a("LOAD_CORE", cVar);
a2.a();
com.tencent.xweb.internal.b b2 = com.tencent.xweb.internal.b.b("LOAD_CORE", cVar);
b2.a();
try {
l.a a3 = com.tencent.xweb.internal.l.a(cVar);
z2 = a3.initWebviewCore(context, preInitCallback);
if (z2) {
com.tencent.xweb.c.a().a(a3.getCookieManager());
com.tencent.xweb.d.a(a3.getCookieSyncManager());
com.tencent.xweb.util.h.b(cVar);
a2.b();
b2.b();
} else {
XWalkEnvironment.addXWalkInitializeLog("xweb.WebView", "init webview failed type = " + cVar);
}
} catch (Exception e2) {
XWalkEnvironment.addXWalkInitializeLog("xweb.WebView", "init webview got exception type = " + cVar + ", err = " + e2.getMessage());
try {
XWalkEnvironment.addXWalkInitializeLog("xweb.WebView", "crash stack : " + android.util.Log.getStackTraceString(e2));
} catch (Exception unused) {
}
com.tencent.xweb.util.h.d(cVar);
}
return z2;
}
@Deprecated
public static void disablePlatformNotifications() {
if (getCurWebType() == c.WV_KIND_SYS) {
com.tencent.xweb.util.g.a("android.webkit.WebView", "disablePlatformNotifications");
}
}
@Deprecated
public static void enablePlatformNotifications() {
if (getCurWebType() == c.WV_KIND_SYS) {
com.tencent.xweb.util.g.a("android.webkit.WebView", "enablePlatformNotifications");
}
}
public static void forceEnableFrameCostProfile() {
com.tencent.xweb.internal.f a2 = com.tencent.xweb.internal.k.a(getCurWebType());
if (a2 != null) {
a2.a().a();
}
}
public static boolean getCanReboot() {
String str;
if (f82126d && XWebCoreInfo.getCurAbiInstalledNewestVersion(XWalkEnvironment.getApplicationContext()) > 0) {
str = "need rebot because of has installed xweb core ";
} else {
if (getCurWebType() != c.WV_KIND_CW || XWalkEnvironment.getAvailableVersion() <= 0 || XWalkEnvironment.getInstalledNewstVersionForCurAbi() <= XWalkEnvironment.getAvailableVersion()) {
if (getCurWebType() == c.WV_KIND_X5) {
com.tencent.luggage.wxa.uc.b bVar = i;
if (bVar != null) {
return bVar.a();
}
Log.e("xweb.WebView", "getCanReboot: sImp is null");
}
return com.tencent.xweb.internal.h.a().f();
}
str = "need rebot because of has newer xweb version ";
}
Log.i("xweb.WebView", str);
return true;
}
public static String getCrashExtraMessage(Context context) {
com.tencent.luggage.wxa.uc.b bVar = i;
if (bVar != null) {
return bVar.c(context);
}
Log.e("xweb.WebView", "getCrashExtraMessage: sImp is null");
return "";
}
public static String getCurStrModule() {
return f82125c;
}
public static c getCurWebType() {
return f82124b;
}
public static int getInstalledTbsCoreVersion(Context context) {
com.tencent.luggage.wxa.uc.b bVar = i;
if (bVar != null) {
return bVar.a(context);
}
Log.e("xweb.WebView", "getTbsCoreVersion: sImp is null");
return 0;
}
public static c getPreferedWebviewType(Context context, c cVar, String str) {
c cVar2;
String str2;
if (f82124b != c.WV_KIND_NONE) {
return f82124b;
}
XWalkEnvironment.init(context);
if (XWalkEnvironment.isIaDevice()) {
XWalkEnvironment.addXWalkInitializeLog("XWeb.getPreferedWebviewType", "x86 device use WV_KIND_SYS");
com.tencent.xweb.util.h.a(69L, 1);
return c.WV_KIND_SYS;
}
if (v.a().b(str) != c.WV_KIND_NONE) {
cVar2 = v.a().b(str);
str2 = "use hard code web type = " + cVar2;
} else {
cVar2 = c.WV_KIND_CW;
str2 = "use compile setting force to xweb ";
}
XWalkEnvironment.addXWalkInitializeLog("XWeb.getPreferedWebviewType", str2);
com.tencent.xweb.util.h.a(cVar2);
if (cVar2 == c.WV_KIND_CW && !XWalkEnvironment.hasAvailableVersion()) {
cVar2 = c.WV_KIND_SYS;
f82126d = true;
XWalkEnvironment.addXWalkInitializeLog("xwalk is not available , use sys");
}
com.tencent.xweb.internal.h.a(cVar2, str);
if (com.tencent.xweb.internal.h.a().g()) {
XWalkEnvironment.addXWalkInitializeLog("kind is match loadurlwatchdog switch to syskernal");
cVar2 = c.WV_KIND_SYS;
}
if (cVar2 != c.WV_KIND_X5 || com.tencent.luggage.wxa.uc.c.a()) {
return cVar2;
}
XWalkEnvironment.addXWalkInitializeLog("x5 sdk is not compiled switch to xweb");
return c.WV_KIND_CW;
}
public static c getPreferedWebviewType(Context context, String str) {
return getPreferedWebviewType(context, c.WV_KIND_X5, str);
}
@Deprecated
public static int getTbsCoreVersion(Context context) {
com.tencent.luggage.wxa.uc.b bVar = i;
if (bVar != null) {
return bVar.a(context);
}
Log.e("xweb.WebView", "getTbsCoreVersion: sImp is null");
return 0;
}
public static int getTbsSDKVersion(Context context) {
com.tencent.luggage.wxa.uc.b bVar = i;
if (bVar != null) {
return bVar.b(context);
}
Log.e("xweb.WebView", "getTbsSDKVersion: sImp is null");
return 0;
}
public static int getUsingTbsCoreVersion(Context context) {
if (f82124b != c.WV_KIND_X5) {
return 0;
}
com.tencent.luggage.wxa.uc.b bVar = i;
if (bVar != null) {
return bVar.a(context);
}
Log.e("xweb.WebView", "getTbsCoreVersion: sImp is null");
return 0;
}
public static boolean hasInited() {
if (getCurWebType() == c.WV_KIND_NONE || com.tencent.xweb.internal.l.a(getCurWebType()) == null) {
return false;
}
return com.tencent.xweb.internal.l.a(getCurWebType()).hasInited();
}
public static void initWebviewCore(Context context, c cVar, String str, PreInitCallback preInitCallback) {
if (str == null || str.isEmpty()) {
str = "tools";
}
if (f82124b != c.WV_KIND_NONE) {
if (f82124b != cVar) {
Log.e("xweb.WebView", "invalid set webview kind to diffrent type");
return;
}
return;
}
f82125c = str;
com.tencent.xweb.util.h.a(str);
if (str == null) {
str = "";
}
XWalkEnvironment.init(context);
p.a();
v.a(context);
if (XWalkEnvironment.getAvailableVersion() <= 0) {
XWalkEnvironment.addXWalkInitializeLog("initWebviewCore with no xweb, tryEmbedInstall");
t.a();
}
_initWebviewCore(context, getPreferedWebviewType(context, cVar, str), preInitCallback, true);
}
public static boolean isSys() {
return getCurWebType() == c.WV_KIND_SYS;
}
public static boolean isX5() {
return getCurWebType() == c.WV_KIND_X5;
}
public static boolean isXWalk() {
return getCurWebType() == c.WV_KIND_CW;
}
public static boolean isXWebCoreInited() {
return k;
}
public static void onXWebCoreInited() {
k = true;
}
public static void reinitToXWeb() {
XWalkEnvironment.addXWalkInitializeLog("reinitToXWeb");
f82124b = c.WV_KIND_NONE;
XWalkEnvironment.refreshVerInfo();
initWebviewCore(XWalkEnvironment.getApplicationContext(), c.WV_KIND_CW, f82125c, null);
}
public static boolean setProfileResultCallback(String str, i iVar) {
com.tencent.xweb.internal.f a2 = com.tencent.xweb.internal.k.a(getCurWebType());
if (a2 != null) {
return a2.a().a(str, iVar);
}
return false;
}
public static void setX5Interface(com.tencent.luggage.wxa.uc.b bVar) {
i = bVar;
}
public void _disablePlatformNotifications() {
}
public void _enablePlatformNotifications() {
}
@Override
public void addJavascriptInterface(Object obj, String str) {
this.e.addJavascriptInterface(obj, str);
}
@Override
public boolean canGoBack() {
return this.e.canGoBack();
}
@Override
public boolean canGoForward() {
return this.e.canGoForward();
}
@Override
public Bitmap captureBitmap() {
return this.e.captureBitmap();
}
@Override
public void captureBitmap(IWebView.a aVar) {
Log.d("xweb.WebView", "captureBitmap");
this.e.captureBitmap(aVar);
}
@Override
public void clearHistory() {
this.e.clearHistory();
}
@Override
public void clearMatches() {
this.e.clearMatches();
}
@Override
public void clearSslPreferences() {
this.e.clearSslPreferences();
}
@Override
public void clearView() {
this.e.clearView();
}
@Override
public WebBackForwardList copyBackForwardList() {
return this.e.copyBackForwardList();
}
public void destroy() {
Context context = getContext();
if (context instanceof e) {
((e) context).a(null);
}
this.e.destroy();
}
@Override
public void disableVideoJsCallback(boolean z) {
this.e.disableVideoJsCallback(z);
}
@Override
public void dispatchDraw(Canvas canvas) {
super.dispatchDraw(canvas);
}
public void drawCanvas(Canvas canvas) {
if (isXWalkKernel()) {
canvas.drawBitmap(getBitmap(), 0.0f, 0.0f, (Paint) null);
} else {
draw(canvas);
}
}
@Override
protected boolean drawChild(Canvas canvas, View view, long j) {
return super.drawChild(canvas, view, j);
}
public void evaluateJavascript(String str, ValueCallback<String> valueCallback) {
this.e.evaluateJavascript(str, valueCallback);
}
@Override
public void findAllAsync(String str) {
this.e.findAllAsync(str);
}
@Override
public void findNext(boolean z) {
this.e.findNext(z);
}
@Override
public String getAbstractInfo() {
return this.e.getAbstractInfo();
}
public Bitmap getBitmap() {
Bitmap createBitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);
if (createBitmap != null) {
createBitmap.eraseColor(-1);
Canvas canvas = new Canvas(createBitmap);
if (isXWalkKernel()) {
try {
Paint paint = new Paint();
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_OVER));
Iterator<TextureView> it = a(this).iterator();
while (it.hasNext()) {
Bitmap bitmap = it.next().getBitmap();
if (bitmap != null) {
canvas.drawBitmap(bitmap, 0.0f, 0.0f, paint);
} else {
Log.e("xweb.WebView", "getBitmap textureViewBitmap = null");
}
}
Bitmap createBitmap2 = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);
getTopView().draw(new Canvas(createBitmap2));
canvas.drawBitmap(createBitmap2, 0.0f, 0.0f, paint);
} catch (Exception unused) {
}
} else {
draw(canvas);
}
}
return createBitmap;
}
@Override
public int getContentHeight() {
return this.e.getContentHeight();
}
public CookieInternal.ICookieManagerInternal getCookieManager() {
return null;
}
public CookieInternal.ICookieSyncManagerInternal getCookieSyncManager() {
return null;
}
@Override
public u getCurWebChromeClient() {
return this.e.getCurWebChromeClient();
}
@Override
public z getCurWebviewClient() {
return this.e.getCurWebviewClient();
}
@Override
public com.tencent.xweb.internal.e getDefalutOpProvider() {
return null;
}
@Override
public a getFullscreenVideoKind() {
return this.e.getFullscreenVideoKind();
}
@Override
public b getHitTestResult() {
return this.e.getHitTestResult();
}
@Override
public String[] getHttpAuthUsernamePassword(String str, String str2) {
return this.e.getHttpAuthUsernamePassword(str, str2);
}
@Override
public boolean getImageBitmapToFile(String str, String str2, String str3, g gVar) {
return this.e.getImageBitmapToFile(str, str2, str3, gVar);
}
@Override
public float getScale() {
return this.e.getScale();
}
@Override
public int getScrollHeight() {
return this.e.getScrollHeight();
}
@Override
public x getSettings() {
return this.e.getSettings();
}
@Override
public String getTitle() {
return this.e.getTitle();
}
@Override
public ViewGroup getTopView() {
return this.e.getTopView();
}
@Override
public String getUrl() {
return this.e.getUrl();
}
@Override
public String getVersionInfo() {
return this.e.getVersionInfo();
}
@Override
public View getView() {
return this.e.getView();
}
@Override
public int getVisibleTitleHeight() {
return this.e.getVisibleTitleHeight();
}
public c getWebCoreType() {
return this.f;
}
@Override
public int getWebScrollX() {
return this.e.getWebScrollX();
}
@Override
public int getWebScrollY() {
return this.e.getWebScrollY();
}
@Override
public View getWebViewUI() {
return this.e.getWebViewUI();
}
@Override
public Object getX5WebViewExtension() {
return this.e.getX5WebViewExtension();
}
@Override
public void goBack() {
this.e.goBack();
}
@Override
public void goForward() {
this.e.goForward();
}
@Override
public boolean hasEnteredFullscreen() {
return this.e.hasEnteredFullscreen();
}
@Override
public Bundle invokeMiscMethod(String str, Bundle bundle) {
return this.e.invokeMiscMethod(str, bundle);
}
@Override
public boolean isOverScrollStart() {
return this.e.isOverScrollStart();
}
@Override
public boolean isSupportExtendPluginForAppbrand() {
if (isXWalkKernel()) {
return this.e.isSupportExtendPluginForAppbrand();
}
return false;
}
public boolean isSysKernel() {
return this.f == c.WV_KIND_SYS;
}
public boolean isX5WrappedKernel() {
return getCurWebType() == c.WV_KIND_X5;
}
public boolean isX5WrappedSysKernel() {
return getCurWebType() == c.WV_KIND_X5 && !this.j;
}
public boolean isXWalkKernel() {
return this.f == c.WV_KIND_CW;
}
@Override
public void leaveFullscreen() {
this.e.leaveFullscreen();
}
@Override
public void loadData(String str, String str2, String str3) {
this.e.loadData(str, str2, str3);
com.tencent.xweb.util.h.a(str, this);
reportLoadByReason();
}
@Override
public void loadDataWithBaseURL(String str, String str2, String str3, String str4, String str5) {
this.e.loadDataWithBaseURL(str, str2, str3, str4, str5);
com.tencent.xweb.util.h.a(str, this);
}
public void loadUrl(String str) {
if (this.g.a(str)) {
this.e.loadUrl("http://weixin.qq.com/");
return;
}
this.e.loadUrl(str);
com.tencent.xweb.util.h.a(str, this);
reportLoadByReason();
}
@Override
public void loadUrl(String str, Map<String, String> map) {
if (this.g.a(str)) {
this.e.loadUrl("http://weixin.qq.com/");
return;
}
HashMap hashMap = null;
synchronized (map) {
if (map != null) {
hashMap = new HashMap();
hashMap.putAll(map);
}
}
this.e.loadUrl(str, hashMap);
com.tencent.xweb.util.h.a(str, this);
reportLoadByReason();
}
@Deprecated
public void manualStartFrameCostProfiler() {
com.tencent.xweb.internal.f a2 = com.tencent.xweb.internal.k.a(getCurWebType());
if (a2 != null) {
a2.a().a("xprofile.frameCost", 10000);
}
}
@Deprecated
public void manualStopFrameCostProfiler(j jVar) {
com.tencent.xweb.internal.f a2 = com.tencent.xweb.internal.k.a(getCurWebType());
if (a2 != null) {
a2.a().a(jVar);
}
}
public void onHide() {
this.e.onHide();
}
@Override
public void onPause() {
this.e.onPause();
}
@Override
public void onResume() {
this.e.onResume();
}
public void onShow() {
this.e.onShow();
}
@Override
protected void onVisibilityChanged(View view, int i2) {
super.onVisibilityChanged(view, i2);
IWebView iWebView = this.e;
if (iWebView != null) {
iWebView.getView().setVisibility(i2);
}
}
public void onWebViewScrollChanged(int i2, int i3, int i4, int i5) {
}
@Override
public boolean overlayHorizontalScrollbar() {
return this.e.overlayHorizontalScrollbar();
}
@Override
public void reload() {
this.e.reload();
}
@Override
public void removeJavascriptInterface(String str) {
this.e.removeJavascriptInterface(str);
}
public void reportLoadByReason() {
com.tencent.xweb.util.h.b(this.f82127a);
this.f82127a = -1;
}
@Override
public boolean savePage(String str, String str2, int i2) {
return this.e.savePage(str, str2, i2);
}
public void setA8keyReason(int i2) {
this.f82127a = i2;
}
@Override
public void setBackgroundColor(int i2) {
Log.i("xweb.WebView", "setBackgroundColor color:" + Integer.toHexString(i2));
super.setBackgroundColor(i2);
IWebView iWebView = this.e;
if (iWebView != null) {
iWebView.getWebViewUI().setBackgroundColor(i2);
}
}
@Override
public void setBottomHeight(int i2) {
this.e.setBottomHeight(i2);
}
@Override
public void setDownloadListener(DownloadListener downloadListener) {
this.e.setDownloadListener(downloadListener);
}
@Override
public void setFindListener(WebView.FindListener findListener) {
this.e.setFindListener(findListener);
}
@Override
public void setFocusable(boolean z) {
setDescendantFocusability(!z ? 393216 : 131072);
super.setFocusable(false);
}
@Override
public void setFocusableInTouchMode(boolean z) {
setDescendantFocusability(!z ? 393216 : 131072);
super.setFocusableInTouchMode(false);
}
@Override
public void setHorizontalScrollBarEnabled(boolean z) {
this.e.setHorizontalScrollBarEnabled(z);
}
@Override
public void setHttpAuthUsernamePassword(String str, String str2, String str3, String str4) {
this.e.setHttpAuthUsernamePassword(str, str2, str3, str4);
}
@Override
public void setJSExceptionListener(ab abVar) {
this.e.setJSExceptionListener(abVar);
}
@Override
public void setOnLongClickListener(View.OnLongClickListener onLongClickListener) {
this.h = onLongClickListener;
}
@Override
public void setOnTouchListener(View.OnTouchListener onTouchListener) {
this.e.getWebViewUI().setOnTouchListener(onTouchListener);
}
@Override
public void setVerticalScrollBarEnabled(boolean z) {
this.e.setVerticalScrollBarEnabled(z);
}
@Override
public r setVideoJsCallback(s sVar) {
return this.e.setVideoJsCallback(sVar);
}
@Override
public void setWebChromeClient(u uVar) {
if (uVar != null) {
uVar.a(this.e.getDefalutOpProvider());
}
this.e.setWebChromeClient(uVar);
}
@Override
public void setWebContentsSize(int i2, int i3) {
this.e.setWebContentsSize(i2, i3);
}
@Override
public void setWebViewCallbackClient(y yVar) {
this.e.setWebViewCallbackClient(yVar);
}
@Override
public void setWebViewClient(z zVar) {
if (zVar != null) {
zVar.a(this.e.getDefalutOpProvider());
}
this.e.setWebViewClient(zVar);
}
@Override
public void setWebViewClientExtension(com.tencent.xweb.x5.export.external.extension.proxy.a aVar) {
this.e.setWebViewClientExtension(aVar);
}
@Override
public void setXWebKeyEventHandler(ad adVar) {
this.e.setXWebKeyEventHandler(adVar);
}
@Override
public void smoothScroll(int i2, int i3, long j) {
this.e.smoothScroll(i2, i3, j);
}
public void startLongScreenshot(n nVar, boolean z) {
if ((this.e instanceof com.tencent.xweb.internal.g) && this.f == c.WV_KIND_CW) {
((com.tencent.xweb.internal.g) this.e).a(((ViewGroup) getWebViewUI()).getChildAt(0), z, nVar);
}
}
@Override
public void stopLoading() {
this.e.stopLoading();
}
@Override
public void super_computeScroll() {
this.e.super_computeScroll();
}
@Override
public boolean super_dispatchTouchEvent(MotionEvent motionEvent) {
return this.e.super_dispatchTouchEvent(motionEvent);
}
@Override
public boolean super_onInterceptTouchEvent(MotionEvent motionEvent) {
return this.e.super_onInterceptTouchEvent(motionEvent);
}
@Override
public void super_onOverScrolled(int i2, int i3, boolean z, boolean z2) {
this.e.super_onOverScrolled(i2, i3, z, z2);
}
@Override
public void super_onScrollChanged(int i2, int i3, int i4, int i5) {
this.e.super_onScrollChanged(i2, i3, i4, i5);
}
@Override
public boolean super_onTouchEvent(MotionEvent motionEvent) {
return this.e.super_onTouchEvent(motionEvent);
}
@Override
public boolean super_overScrollBy(int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, boolean z) {
return this.e.super_overScrollBy(i2, i3, i4, i5, i6, i7, i8, i9, z);
}
@Override
public boolean supportFeature(int i2) {
return this.e.supportFeature(i2);
}
@Override
public boolean supportSetWebContentsSize() {
return this.e.supportSetWebContentsSize();
}
@Override
public boolean zoomIn() {
return this.e.zoomIn();
}
@Override
public boolean zoomOut() {
return this.e.zoomOut();
}
}