QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 UserFeedback.java 源代码,内容仅作参考
package com.tencent.mtt.browser.feedback;
import android.text.TextUtils;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import com.tencent.common.manifest.AppManifest;
import com.tencent.common.task.QBTask;
import com.tencent.common.threadpool.BrowserExecutorSupplier;
import com.tencent.mtt.base.webview.QBWebView;
import com.tencent.mtt.base.webview.common.IWebBackForwardList;
import com.tencent.mtt.base.webview.common.IWebHistoryItem;
import com.tencent.mtt.browser.download.core.impl.DownloadServiceManager;
import com.tencent.mtt.browser.window.IWebView;
import com.tencent.mtt.browser.window.WindowManager;
import com.tencent.mtt.log.access.Logs;
import com.tencent.mtt.log.access.UploadCallback;
import com.tencent.mtt.log.access.UploadSetting;
import com.tencent.mtt.logcontroller.facade.ILogService;
import com.tencent.mtt.qbcontext.core.QBContext;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Callable;
import org.json.JSONObject;
public class UserFeedback {
public static void a(String str, String str2, final JSONObject jSONObject) {
QBTask.b((Callable) new Callable<Void>() {
@Override
public Void call() throws Exception {
String str3;
String str4;
String[] strArr;
String str5;
boolean querySwitch;
boolean z;
String str6;
String str7;
String str8;
long currentTimeMillis;
try {
str4 = jSONObject.getString("feedbackId");
try {
str3 = jSONObject.has("feedbackPath") ? jSONObject.getString("feedbackPath") : null;
if (str3 != null) {
try {
strArr = str3.split(">");
} catch (Exception unused) {
strArr = null;
str5 = null;
UserFeedback.c();
if (strArr != null) {
}
ILogService iLogService = (ILogService) QBContext.getInstance().getService(ILogService.class);
String str9 = ILogService.SWITCH_INIT_END_TIME;
querySwitch = iLogService.querySwitch(ILogService.SWITCH_INIT_END_TIME);
if (!querySwitch) {
}
if (strArr != null) {
}
z = false;
while (r9 < r5) {
}
DownloadServiceManager.a().uploadDownloadDebugInfo();
if (!querySwitch) {
}
if (TextUtils.isEmpty(str4)) {
}
}
} else {
strArr = null;
}
} catch (Exception unused2) {
str3 = null;
}
} catch (Exception unused3) {
str3 = null;
str4 = null;
}
if (jSONObject.has("content")) {
str5 = jSONObject.getString("content");
UserFeedback.c();
if (strArr != null && strArr.length == 0) {
strArr = null;
}
ILogService iLogService2 = (ILogService) QBContext.getInstance().getService(ILogService.class);
String str92 = ILogService.SWITCH_INIT_END_TIME;
querySwitch = iLogService2.querySwitch(ILogService.SWITCH_INIT_END_TIME);
if (!querySwitch) {
ILogService iLogService3 = (ILogService) QBContext.getInstance().getService(ILogService.class);
if (!TextUtils.isEmpty(str3) && strArr.length >= 2) {
if ("基础性能".equals(strArr[0])) {
iLogService3.switchOn(ILogService.SWITCH_INIT_END_TIME, System.currentTimeMillis() + 432000000);
if ("卡顿".equals(strArr[1])) {
currentTimeMillis = System.currentTimeMillis() + 432000000;
str92 = ILogService.SWITCH_FPS_PLUGIN_END_TIME;
iLogService3.switchOn(str92, currentTimeMillis);
}
} else if ("广告过滤".equals(strArr[0])) {
String b2 = UserFeedback.b();
if (!TextUtils.isEmpty(b2)) {
iLogService3.switchOn(ILogService.SWITCH_INIT_END_TIME, System.currentTimeMillis() + 432000000);
Logs.c("UserFeedback", b2);
UploadSetting uploadSetting = new UploadSetting();
uploadSetting.d(3);
uploadSetting.a(0.5f);
uploadSetting.a(400);
uploadSetting.a("Main");
uploadSetting.b("ads-cur-urls");
Logs.a(uploadSetting, (UploadCallback) null);
}
}
}
currentTimeMillis = System.currentTimeMillis() + 432000000;
iLogService3.switchOn(str92, currentTimeMillis);
}
if (strArr != null || strArr.length <= 0 || TextUtils.isEmpty(strArr[0])) {
z = false;
for (IUserFeedbackNotify iUserFeedbackNotify : (IUserFeedbackNotify[]) AppManifest.getInstance().queryExtensions(IUserFeedbackNotify.class)) {
z = z || UserFeedback.a(iUserFeedbackNotify, str4, strArr, str5);
}
} else {
HashSet hashSet = new HashSet();
int length = strArr.length;
int i = 0;
z = false;
while (i < length) {
boolean z2 = z;
for (IUserFeedbackNotify iUserFeedbackNotify2 : (IUserFeedbackNotify[]) AppManifest.getInstance().queryExtensions(IUserFeedbackNotify.class, strArr[i])) {
if (!hashSet.contains(iUserFeedbackNotify2)) {
z2 = z2 || UserFeedback.a(iUserFeedbackNotify2, str4, strArr, str5);
hashSet.add(iUserFeedbackNotify2);
}
}
i++;
z = z2;
}
}
DownloadServiceManager.a().uploadDownloadDebugInfo();
if (!querySwitch || z) {
if (TextUtils.isEmpty(str4)) {
try {
str7 = jSONObject.getString("feature");
try {
str6 = jSONObject.getString("module");
} catch (Exception unused4) {
str6 = null;
}
try {
str8 = jSONObject.getString("code_type");
} catch (Exception unused5) {
str8 = null;
UploadSetting uploadSetting2 = new UploadSetting();
uploadSetting2.d(3);
HashMap hashMap = new HashMap();
hashMap.put("ft_name", str7);
hashMap.put("module", str6);
hashMap.put("code_type", str8);
uploadSetting2.a(hashMap);
Logs.a(uploadSetting2, (UploadCallback) null);
return null;
}
} catch (Exception unused6) {
str6 = null;
str7 = null;
}
UploadSetting uploadSetting22 = new UploadSetting();
uploadSetting22.d(3);
HashMap hashMap2 = new HashMap();
hashMap2.put("ft_name", str7);
hashMap2.put("module", str6);
hashMap2.put("code_type", str8);
uploadSetting22.a(hashMap2);
Logs.a(uploadSetting22, (UploadCallback) null);
return null;
}
((ILogService) QBContext.getInstance().getService(ILogService.class)).uploadLogFromBBS(str4);
}
return null;
}
str5 = null;
UserFeedback.c();
if (strArr != null) {
strArr = null;
}
ILogService iLogService22 = (ILogService) QBContext.getInstance().getService(ILogService.class);
String str922 = ILogService.SWITCH_INIT_END_TIME;
querySwitch = iLogService22.querySwitch(ILogService.SWITCH_INIT_END_TIME);
if (!querySwitch) {
}
if (strArr != null) {
}
z = false;
while (r9 < r5) {
}
DownloadServiceManager.a().uploadDownloadDebugInfo();
if (!querySwitch) {
}
if (TextUtils.isEmpty(str4)) {
}
}
});
}
static boolean a(IUserFeedbackNotify iUserFeedbackNotify, String str, String[] strArr, String str2) {
int feedbackSubmitted = iUserFeedbackNotify.feedbackSubmitted(str, strArr, str2);
if ((feedbackSubmitted & 2) != 0) {
String f = f();
if (!TextUtils.isEmpty(f)) {
Logs.c("UserFeedback", f);
}
}
return (feedbackSubmitted & 3) != 0;
}
static String b() {
return f();
}
public static void c() {
try {
d();
e();
Logs.a((Runnable) null);
} catch (Exception unused) {
}
}
private static void d() {
Map<Thread, StackTraceElement[]> allStackTraces = Thread.getAllStackTraces();
Set<Thread> keySet = allStackTraces.keySet();
Logs.e("printThread", "---- print thread: start ----" + keySet.size());
for (Thread thread : keySet) {
StackTraceElement[] stackTraceElementArr = allStackTraces.get(thread);
Logs.e("printThread", "---- print thread: " + thread.getName() + " start ----");
for (StackTraceElement stackTraceElement : stackTraceElementArr) {
Logs.e("printThread", "StackTraceElement: " + stackTraceElement.toString());
}
Logs.e("printThread", "---- print thread: " + thread.getName() + " end ----");
}
}
private static void e() {
Map<Thread, StackTraceElement[]> allStackTraces = Thread.getAllStackTraces();
for (Thread thread : allStackTraces.keySet()) {
StackTraceElement[] stackTraceElementArr = allStackTraces.get(thread);
Logs.e("ThreadStack", "------------------------------------------------");
Logs.e("ThreadStack", "name: " + thread.getName() + " ->");
for (StackTraceElement stackTraceElement : stackTraceElementArr) {
Logs.e("ThreadStack", "stack: " + stackTraceElement.toString());
}
}
Logs.e("EasyThreadPool", BrowserExecutorSupplier.getInstance().toString());
}
private static String f() {
IWebView u;
QBWebView qBWebView;
WindowManager a2 = WindowManager.a();
if (a2 == null || (u = a2.u()) == null || (qBWebView = u.getQBWebView()) == null) {
return "";
}
StringBuilder sb = new StringBuilder();
IWebBackForwardList copyQBBackForwardList = qBWebView.copyQBBackForwardList();
if (copyQBBackForwardList != null) {
int c2 = copyQBBackForwardList.c();
for (int i = 0; i < c2; i++) {
IWebHistoryItem a3 = copyQBBackForwardList.a(i);
if (a3 != null) {
String b2 = a3.b();
if (!TextUtils.isEmpty(b2) && !b2.startsWith("https://bbs.mb.qq.com")) {
sb.append("url_" + i + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + a3.b() + "\r\n");
}
}
}
}
return sb.toString();
}
}