QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 DoodleExploreWebView.java 源代码,内容仅作参考
package com.tencent.mtt.browser.homepage.xhome.logo.doodle.webview;
import android.content.Context;
import android.os.Bundle;
import com.tencent.mtt.base.webview.QBWebView;
import com.tencent.mtt.base.wrapper.extension.EmptyWebViewClientExtension;
import com.tencent.mtt.base.wrapper.extension.IQQBrowserSettings;
import com.tencent.mtt.base.wrapper.extension.IWebSettingsExtension;
import com.tencent.mtt.browser.homepage.xhome.logo.doodle.impl.DoodleWebUtil;
import com.tencent.mtt.browser.homepage.xhome.logo.doodle.webview.DoodleWebViewClient;
import com.tencent.mtt.browser.setting.manager.UserSettingManager;
import com.tencent.mtt.setting.PublicSettingManager;
public class DoodleExploreWebView extends QBWebView {
DoodleWebViewClient f41654a;
private Context f41655b;
private boolean f41656c;
private boolean f41657d;
public DoodleExploreWebView(Context context, int i) {
super(context, i);
this.f41656c = false;
this.f41657d = false;
this.f41655b = context;
this.f41654a = new DoodleWebViewClient();
b();
}
public static void a(QBWebView qBWebView) {
qBWebView.getQBSettings().q(true);
qBWebView.getQBSettings().p(true);
qBWebView.getQBSettings().a(false);
qBWebView.getQBSettings().c(true);
qBWebView.getQBSettings().m(true);
qBWebView.getQBSettings().n(false);
IWebSettingsExtension qBSettingsExtension = qBWebView.getQBSettingsExtension();
if (qBSettingsExtension != null) {
qBSettingsExtension.d(!PublicSettingManager.a().e());
qBSettingsExtension.f(UserSettingManager.b().getBoolean("Key4FitScreen", false));
qBSettingsExtension.c(true);
qBSettingsExtension.a(false);
qBSettingsExtension.i(true);
qBSettingsExtension.j(false);
qBSettingsExtension.n(false);
qBSettingsExtension.k(true);
}
IQQBrowserSettings qQBrowserSettings = qBWebView.getQQBrowserSettings();
qQBrowserSettings.a(UserSettingManager.b().getBoolean("mKey4EnableX5Proxy", true));
qQBrowserSettings.b(true);
qQBrowserSettings.a("normal");
Bundle bundle = new Bundle();
bundle.putBoolean("enable", true);
qBWebView.invokeMiscMethod("setFloatVideoEnabled", bundle);
}
private void b() {
setWebViewBackgroundColor(0);
setUseMaskForNightMode(false);
setNightModeEnabled(false);
setWebCoreNightModeEnabled(false);
}
private void b(QBWebView qBWebView) {
qBWebView.init();
qBWebView.setOverScrollMode(2);
qBWebView.setWebViewOverScrollMode(2);
qBWebView.setScrollBarFadingEnabled(false);
qBWebView.setEnableAutoPageDiscarding(false);
qBWebView.setEnableAutoPageRestoration(false);
b();
qBWebView.setQBWebViewClient(this.f41654a);
qBWebView.setWebViewClientExtension(new EmptyWebViewClientExtension() {
@Override
public Object a(String str, Bundle bundle) {
return "blockInlinePanelType".equals(str) ? "all" : super.a(str, bundle);
}
});
qBWebView.setVerticalScrollBarEnabled(false);
a(qBWebView);
qBWebView.addDefaultJavaScriptInterface();
qBWebView.setOverScrollEnable(true);
}
public void a() {
if (this.f41657d) {
DoodleWebUtil.a("doodle explore webview deactive");
this.f41657d = false;
super.deactive();
}
}
@Override
public void active() {
if (this.f41657d) {
return;
}
DoodleWebUtil.a("doodle explore webview active");
this.f41657d = true;
super.active();
invalidate();
}
@Override
public void loadUrl(String str) {
StringBuilder sb;
String str2;
if (this.f41656c) {
DoodleWebUtil.a("已经load过,不重复load");
return;
}
this.f41656c = true;
b(this);
if (DoodleWebUtil.c()) {
super.loadUrl("https://test.static.res.qq.com/nav/explorewin/index.html");
sb = new StringBuilder();
str2 = "webview load url, is X5 :";
} else {
super.loadUrl(str);
sb = new StringBuilder();
str2 = "webview load file, is X5 :";
}
sb.append(str2);
sb.append(isX5WebView());
DoodleWebUtil.a(DoodleWebviewTimeUtil.a(sb.toString()));
}
public void setWebViewClientListener(DoodleWebViewClient.IWebViewClientListener iWebViewClientListener) {
this.f41654a.a(iWebViewClientListener);
}
}