QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 NVReporter.java 源代码,内容仅作参考
package com.tencent.nativevue.hippy.report;
import android.os.Build;
import com.qq.e.comm.constants.TangramHippyConstants;
import com.tencent.mtt.hippy.adapter.http.HippyHttpAdapter;
import com.tencent.mtt.hippy.adapter.http.HippyHttpRequest;
import com.tencent.mtt.hippy.adapter.http.HippyHttpResponse;
import com.tencent.mtt.hippy.qb.modules.appdownload.HippyAppConstants;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class NVReporter {
public static String f75754a = "";
public static String f75755b = "";
public static String f75756c = "";
public static boolean f75757d;
private static HippyHttpAdapter e;
public static void a(long j) {
if (f75757d) {
return;
}
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("nv_cost_time", j).put("page", f75756c);
a("nativevue_hippy_performance", jSONObject);
} catch (JSONException unused) {
}
}
public static void a(HippyHttpAdapter hippyHttpAdapter, JSONObject jSONObject) {
JSONObject optJSONObject;
e = hippyHttpAdapter;
if (jSONObject == null || (optJSONObject = jSONObject.optJSONObject("Platform")) == null) {
return;
}
f75754a = optJSONObject.optString("PackageName");
f75755b = optJSONObject.optString("VersionName");
}
public static void a(String str) {
if (f75757d) {
return;
}
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("error", str).put("page", f75756c);
a("nativevue_hippy_error", jSONObject);
} catch (JSONException unused) {
}
}
public static void a(String str, JSONObject jSONObject) throws JSONException {
if (e == null) {
return;
}
a(jSONObject);
long currentTimeMillis = System.currentTimeMillis();
JSONArray put = new JSONArray().put(new JSONObject().put(TangramHippyConstants.COUNT, 1).put("start", currentTimeMillis).put("id", 999).put("name", str).put("params", jSONObject));
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("id", "383f92e96363f8001556765139223000").put("start", currentTimeMillis).put("status", 2).put("pages", new JSONArray()).put("events", put);
JSONObject jSONObject3 = new JSONObject();
jSONObject3.put("type", 2).put("data", jSONObject2);
JSONArray put2 = new JSONArray().put(jSONObject3);
JSONObject jSONObject4 = new JSONObject();
jSONObject4.put("appkey", "0WEB0DKCOJ4I1V9Q").put(HippyAppConstants.KEY_PKG_VERSION_CODE, "1.0.1").put("initTime", currentTimeMillis).put("language", "zh-CN").put("msgs", put2);
HippyHttpRequest hippyHttpRequest = new HippyHttpRequest();
hippyHttpRequest.setMethod("POST");
hippyHttpRequest.setBody(jSONObject4.toString());
hippyHttpRequest.setUrl("https://jrlts.beacon.qq.com/analytics/upload?tp=js");
hippyHttpRequest.setConnectTimeout(5000);
hippyHttpRequest.addHeader("Content-Type", "application/json;charset=UTF-8");
e.sendRequest(hippyHttpRequest, new HippyHttpAdapter.HttpTaskCallback() {
@Override
public void onTaskFailed(HippyHttpRequest hippyHttpRequest2, Throwable th) {
}
@Override
public void onTaskSuccess(HippyHttpRequest hippyHttpRequest2, HippyHttpResponse hippyHttpResponse) throws Exception {
}
});
}
private static void a(JSONObject jSONObject) {
try {
jSONObject.put("platform", "Android").put("osVersion", Build.VERSION.SDK_INT).put("appName", f75754a).put("appVersion", f75755b);
} catch (JSONException unused) {
}
}
public static void a(boolean z) {
if (f75757d) {
return;
}
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("success", z ? 1 : 0).put("page", f75756c);
a("nativevue_hippy_result", jSONObject);
} catch (JSONException unused) {
}
}
}