QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 SettingQBUrlExt.java 源代码,内容仅作参考
package com.tencent.mtt.external.setting;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import com.tencent.common.manifest.annotation.CreateMethod;
import com.tencent.common.manifest.annotation.ExtensionImpl;
import com.tencent.common.utils.UrlUtils;
import com.tencent.mtt.ContextHolder;
import com.tencent.mtt.account.base.IAccount;
import com.tencent.mtt.account.base.UserLoginListener;
import com.tencent.mtt.apkplugin.impl.IAPInjectService;
import com.tencent.mtt.base.account.facade.IAccountService;
import com.tencent.mtt.base.functionwindow.ActivityHandler;
import com.tencent.mtt.base.functionwindow.IFunctionWndFactory;
import com.tencent.mtt.base.utils.DeviceUtils;
import com.tencent.mtt.browser.db.pub.SkinBeanDao;
import com.tencent.mtt.browser.download.core.facade.IBusinessDownloadService;
import com.tencent.mtt.browser.push.facade.IPushNotificationDialogService;
import com.tencent.mtt.browser.setting.manager.SkinManager;
import com.tencent.mtt.browser.share.export.socialshare.qqshare.QQShareActivity;
import com.tencent.mtt.browser.window.UrlParams;
import com.tencent.mtt.businesscenter.facade.IFrameworkDelegate;
import com.tencent.mtt.businesscenter.facade.IQBUrlProcessExtension;
import com.tencent.mtt.qbcontext.core.QBContext;
import com.tencent.mtt.sdkcontext.SDKContext;
import com.tencent.mtt.setting.PublicSettingManager;
import java.net.URLDecoder;
@ExtensionImpl(createMethod = CreateMethod.NEW, extension = IQBUrlProcessExtension.class, filters = {"setting*"})
public class SettingQBUrlExt implements IQBUrlProcessExtension {
@Override
public Boolean doHandleQBUrl(String str, Intent intent) {
UrlParams urlParams;
UrlParams urlParams2;
String str2;
String str3;
String str4;
String[] split;
StringBuilder sb;
String str5;
String action = UrlUtils.getAction(str);
String para = UrlUtils.getPara(str);
if (intent != null) {
intent.getExtras();
}
Bundle bundle = new Bundle();
if (TextUtils.isEmpty(action)) {
bundle.putInt("ViewID", 1);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else {
if (action.equalsIgnoreCase("account")) {
return true;
}
if (action.equalsIgnoreCase("font")) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 84);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase("font_center")) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 84);
bundle.putInt("showthirdview", 84);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase("ads")) {
bundle.putInt("ViewID", 21);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase("search")) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 6);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase("preload")) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 12);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase(SkinBeanDao.TABLENAME)) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 84);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase("skin_center")) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 84);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase("homepage")) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 82);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else {
if (action.equalsIgnoreCase("skindynamic")) {
if (!TextUtils.isEmpty(para) && !TextUtils.isEmpty(para)) {
try {
String[] split2 = para.split("@");
if (split2 != null && split2.length >= 2) {
SkinManager.s().a(split2[0], split2[1]);
}
} catch (Exception unused) {
}
}
return true;
}
if (action.equalsIgnoreCase("cardstoredetail")) {
bundle.putInt("ViewID", 35);
String str6 = "";
if (!TextUtils.isEmpty(para)) {
try {
split = URLDecoder.decode(para, "gb2312").split("@");
} catch (Exception unused2) {
str2 = "";
str3 = str2;
}
if (split != null && split.length >= 3) {
str2 = split[0];
try {
str3 = split[1];
try {
str4 = split[2];
} catch (Exception unused3) {
str4 = "";
str6 = str2;
if (!TextUtils.isEmpty(str3)) {
}
if (!TextUtils.isEmpty(str4)) {
}
bundle.putBoolean("cache_flag", true);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(urlParams.d(2).a(bundle).d(true));
return true;
}
} catch (Exception unused4) {
str3 = "";
}
str6 = str2;
if (!TextUtils.isEmpty(str3)) {
String string = PublicSettingManager.a().getString("key_skin_web_url", "https://mdc.imtt.qq.com/skin/");
if (TextUtils.isEmpty(str6) || !str6.equals("gather")) {
sb = new StringBuilder();
sb.append(string);
str5 = "detail.html?skinid=";
} else {
sb = new StringBuilder();
sb.append(string);
str5 = "gather.html?gatherid=";
}
sb.append(str5);
sb.append(str3);
bundle.putString("card_store_url", sb.toString());
}
if (!TextUtils.isEmpty(str4)) {
bundle.putString("card_store_name", str4);
}
bundle.putBoolean("cache_flag", true);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
}
}
str4 = "";
str3 = str4;
if (!TextUtils.isEmpty(str3)) {
}
if (!TextUtils.isEmpty(str4)) {
}
bundle.putBoolean("cache_flag", true);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase("superflow")) {
bundle.putInt("ViewID", 7);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase("ua")) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 9);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase("push")) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 10);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase("clear")) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 2);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase(IAPInjectService.EP_DEFAULT)) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 13);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.equalsIgnoreCase(IBusinessDownloadService.FLOWCTRL_APP_WXMINI)) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 45);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else {
if (!action.equalsIgnoreCase("about")) {
if (action.equalsIgnoreCase("feedback")) {
IAccount iAccount = (IAccount) SDKContext.getInstance().getService(IAccount.class);
if (iAccount.getCurrentUserInfo().getQQorWxId().equalsIgnoreCase(((IAccountService) QBContext.getInstance().getService(IAccountService.class)).getDefaultUserDir().getName())) {
bundle.putInt(QQShareActivity.KEY_FROM_WHERE, 100);
iAccount.addUIListener(new UserLoginListener() {
@Override
public void onLoginFailed(int i, String str7) {
final IAccount iAccount2 = (IAccount) SDKContext.getInstance().getService(IAccount.class);
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
iAccount2.removeUIListener(this);
}
});
}
@Override
public void onLoginSuccess() {
final IAccount iAccount2 = (IAccount) SDKContext.getInstance().getService(IAccount.class);
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
Bundle bundle2 = new Bundle();
bundle2.putInt("ViewID", 18);
((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams(IFunctionWndFactory.WND_SETTING).d(2).a(bundle2).d(false));
iAccount2.removeUIListener(this);
}
}, 500L);
}
});
((IAccount) SDKContext.getInstance().getService(IAccount.class)).callUserLogin(ActivityHandler.b().n(), bundle);
} else {
bundle.putInt("ViewID", 18);
urlParams2 = new UrlParams(IFunctionWndFactory.WND_SETTING);
((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(urlParams2.d(2).a(bundle).d(true));
}
} else if (action.startsWith("notificationrepair")) {
if (TextUtils.isEmpty(para)) {
return false;
}
if (para.equalsIgnoreCase("qbnrdialog")) {
IPushNotificationDialogService iPushNotificationDialogService = (IPushNotificationDialogService) QBContext.getInstance().getService(IPushNotificationDialogService.class);
if (iPushNotificationDialogService != null) {
iPushNotificationDialogService.showNotificationGuideDlg(ActivityHandler.b().a(), "开启浏览器通知权限,直播开始前将收到开播提醒", " ", null, true, null, 2, 1921395);
}
return true;
}
if (para.equalsIgnoreCase("nrdialog")) {
IPushNotificationDialogService iPushNotificationDialogService2 = (IPushNotificationDialogService) QBContext.getInstance().getService(IPushNotificationDialogService.class);
if (iPushNotificationDialogService2 != null) {
iPushNotificationDialogService2.showNotificationGuideDlg(ActivityHandler.b().a(), "哎呀,您的消息通知关闭了", "您可能错过直播,请开启消息提醒功能", null, true, null, 2, 1921395);
}
return true;
}
if (para.equalsIgnoreCase("notifdialog")) {
IPushNotificationDialogService iPushNotificationDialogService3 = (IPushNotificationDialogService) QBContext.getInstance().getService(IPushNotificationDialogService.class);
if (iPushNotificationDialogService3 != null) {
iPushNotificationDialogService3.showNotificationGuideDlg(ActivityHandler.b().a(), "哎呀,您的消息通知关闭了", "您可能错过直播,请开启消息提醒功能", null, true, null, 2, 1921395);
}
return true;
}
if (para.equalsIgnoreCase("nrview")) {
if (DeviceUtils.aC || DeviceUtils.t) {
bundle.putInt("ViewID", 59);
((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams(IFunctionWndFactory.WND_SETTING).d(2).a(bundle).d(true));
}
return true;
}
if (para.equalsIgnoreCase("sysnotif")) {
Intent intent2 = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS");
intent2.setData(Uri.fromParts("package", ContextHolder.getAppContext().getPackageName(), null));
ContextHolder.getAppContext().startActivity(intent2);
return true;
}
} else if (action.startsWith("notification")) {
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 45);
bundle.putInt("showthirdview", 33);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.startsWith("yiyaassistant")) {
bundle.putInt("ViewID", 43);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.startsWith("voiceassistant")) {
bundle.putInt("ViewID", 43);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (action.startsWith("anim")) {
if (TextUtils.isEmpty(para)) {
return false;
}
if (para.equalsIgnoreCase("volumeKey")) {
bundle.putInt("button", 2);
bundle.putInt("ViewID", 1);
urlParams2 = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (para.equalsIgnoreCase("gestureMove")) {
bundle.putInt("button", 9);
bundle.putInt("ViewID", 1);
urlParams2 = new UrlParams(IFunctionWndFactory.WND_SETTING);
} else if (para.equalsIgnoreCase("push")) {
bundle.putInt("button", 13);
bundle.putInt("ViewID", 1);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
}
((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(urlParams2.d(2).a(bundle).d(true));
}
return false;
}
bundle.putInt("ViewID", 1);
bundle.putInt("showSecondView", 5);
urlParams = new UrlParams(IFunctionWndFactory.WND_SETTING);
}
}
}
((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(urlParams.d(2).a(bundle).d(true));
return true;
}
}