QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 LockScreenBigPageViewPresenter.java 源代码,内容仅作参考
package com.tencent.mtt.base.notification;
import GodSearch.RecallHeader;
import GodSearch.RecallReqData;
import GodSearch.RecallResultItem;
import GodSearch.RecallResultReqItem;
import GodSearch.RecallResultsReq;
import GodSearch.RecallResultsRsp;
import GodSearch.RecallRspData;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import com.tencent.common.threadpool.BrowserExecutorSupplier;
import com.tencent.common.wup.IWUPRequestCallBack;
import com.tencent.common.wup.WUPRequestBase;
import com.tencent.common.wup.WUPResponseBase;
import com.tencent.common.wup.WUPTaskProxy;
import com.tencent.mtt.ContextHolder;
import com.tencent.mtt.base.functionwindow.ActivityHandler;
import com.tencent.mtt.base.stat.StatManager;
import com.tencent.mtt.base.stat.utils.PlatformStatUtils;
import com.tencent.mtt.base.wup.GUIDManager;
import com.tencent.mtt.base.wup.WUPRequest;
import com.tencent.mtt.external.qrcode.common.ActionConstants2;
import com.tencent.mtt.operation.event.EventLog;
import com.tencent.mtt.qbinfo.QUAUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Random;
import org.json.JSONObject;
public class LockScreenBigPageViewPresenter {
LockScreenTipsViewBigPageView f32677a;
ArrayList<RecallResultItem> f32678b = new ArrayList<>();
int f32679c = 0;
public LockScreenBigPageViewPresenter(LockScreenTipsViewBigPageView lockScreenTipsViewBigPageView) {
this.f32677a = lockScreenTipsViewBigPageView;
}
public void a() {
RecallResultsReq recallResultsReq = new RecallResultsReq();
recallResultsReq.stReqData = new RecallReqData();
recallResultsReq.stReqData.stHeader = new RecallHeader();
recallResultsReq.stReqData.stHeader.sUserId = GUIDManager.a().f();
recallResultsReq.stReqData.stHeader.sQua = QUAUtils.a();
recallResultsReq.stReqData.stHeader.sFrom = "adr_locked_screen_resou";
recallResultsReq.stReqData.mapService = new HashMap();
RecallResultReqItem recallResultReqItem = new RecallResultReqItem();
recallResultReqItem.iPageSize = 30;
recallResultsReq.stReqData.mapService.put("qb_hot_query", recallResultReqItem);
WUPRequest wUPRequest = new WUPRequest("hotquery", "getRecallResults");
wUPRequest.put(HiAnalyticsConstant.Direction.REQUEST, recallResultsReq);
wUPRequest.setRequestCallBack(new IWUPRequestCallBack() {
@Override
public void onWUPTaskFail(WUPRequestBase wUPRequestBase) {
EventLog.a("PushTips", "锁屏搜索框", "拉取热词响应", "WUPTaskFail", "allenhan", -1);
}
@Override
public void onWUPTaskSuccess(WUPRequestBase wUPRequestBase, WUPResponseBase wUPResponseBase) {
Object obj;
Integer returnCode = wUPResponseBase.getReturnCode();
EventLog.a("PushTips", "锁屏搜索框", "拉取热词响应", "result:" + returnCode, "allenhan");
if (returnCode == null || returnCode.intValue() != 0 || (obj = wUPResponseBase.get(HiAnalyticsConstant.Direction.RESPONSE)) == null || !(obj instanceof RecallResultsRsp)) {
return;
}
LockScreenBigPageViewPresenter.this.a((RecallResultsRsp) obj);
}
});
WUPTaskProxy.send(wUPRequest);
EventLog.a("PushTips", "锁屏搜索框", "拉取热词请求", "", "allenhan");
}
void a(RecallResultsRsp recallResultsRsp) {
RecallRspData recallRspData = recallResultsRsp.mapRecallResultDatas.get("qb_hot_query");
if (recallRspData.iCode < 0 || recallRspData.vecRspResults == null) {
return;
}
this.f32678b = recallRspData.vecRspResults;
if (this.f32678b.size() > 0) {
this.f32679c = new Random(System.currentTimeMillis()).nextInt(this.f32678b.size());
}
EventLog.a("PushTips", "锁屏搜索框", "拉取热词响应", "size:" + this.f32678b.size() + " curIndex:" + this.f32679c, "allenhan");
BrowserExecutorSupplier.forMainThreadTasks().execute(new Runnable() {
@Override
public void run() {
LockScreenBigPageViewPresenter.this.f32677a.setSearchWords(LockScreenBigPageViewPresenter.this.b());
}
});
}
public void a(String str, int i, int i2) {
StatManager b2;
String str2;
Context appContext = ContextHolder.getAppContext();
Intent intent = new Intent(appContext, ActivityHandler.f32417a);
intent.setAction("android.intent.action.VIEW");
if (TextUtils.isEmpty(str)) {
intent.setData(Uri.parse("qb://search"));
b2 = StatManager.b();
str2 = "adrlockscreen_click_start";
} else {
intent.setData(Uri.parse("https://so.html5.qq.com/page/real/search_result?q=" + str + "&jump_from=adr_locked_screen_resou"));
b2 = StatManager.b();
str2 = "adrlockscreen_click_result";
}
b2.c(str2);
intent.putExtra("internal_back", true);
intent.putExtra("fromWhere", 32);
intent.putExtra("appid", i);
intent.putExtra(ActionConstants2.z, i2);
intent.putExtra("ChannelID", "push");
intent.putExtra("PosID", "2");
appContext.startActivity(intent);
LockScreenTipsNotification.getInstance().b();
PlatformStatUtils.a("PushLockScreenSearchClick");
StatManager.b().c("adrlockscreen_click");
}
String b() {
RecallResultItem recallResultItem;
int i = this.f32679c;
if (i >= 0 && i < this.f32678b.size() && (recallResultItem = this.f32678b.get(this.f32679c)) != null && !TextUtils.isEmpty(recallResultItem.sJsonData)) {
try {
return new JSONObject(recallResultItem.sJsonData).optString("showTitle", "");
} catch (Exception unused) {
}
}
return "";
}
}