QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 PullConfigRequest.java 源代码,内容仅作参考
package com.tencent.superplayer.config;
import com.tencent.qqlive.superplayer.tools.utils.ITVKHttpProcessor;
import com.tencent.qqlive.superplayer.tools.utils.TVKLogUtil;
import com.tencent.qqlive.superplayer.tools.utils.TVKUtils;
import com.tencent.qqlive.superplayer.vinfo.common.TVKVideoInfoConfig;
import com.tencent.qqlive.superplayer.vinfo.common.TVKVideoInfoHttpProcessor;
import com.tencent.superplayer.api.SuperPlayerSDKMgr;
import com.tencent.superplayer.utils.LogUtil;
import com.tencent.thumbplayer.tplayer.plugins.report.BeaconAdapter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class PullConfigRequest {
private static String f79645a = "PullConfigRequest";
private static String f79646b = "https://cgi.kandian.qq.com/trpc.tkdqq.kd_rainbow_proxy.ConfigService/PullConfigReq";
private static int f79647c = TVKVideoInfoConfig.a().f();
private String f79648d;
private PullConfigCallback e;
private int f = 0;
private ITVKHttpProcessor.ITVKHttpCallback g = new ITVKHttpProcessor.ITVKHttpCallback() {
@Override
public void a(ITVKHttpProcessor.HttpResponse httpResponse) {
PullConfigRequest.this.a(httpResponse);
}
@Override
public void a(IOException iOException) {
PullConfigRequest.this.a(iOException);
}
};
public interface PullConfigCallback {
void a(String str);
}
private void a() {
a(this.f79648d, this.e);
}
public void a(ITVKHttpProcessor.HttpResponse httpResponse) {
String str;
TVKLogUtil.a(f79645a, "pullConfigRequest onSuccess.");
try {
if (httpResponse.f77699a.containsKey("Content-Encoding") && httpResponse.f77699a.get("Content-Encoding").contains("gzip")) {
byte[] a2 = TVKUtils.a(httpResponse.f77700b);
str = a2 != null ? new String(a2, "UTF-8") : "";
} else {
str = new String(httpResponse.f77700b, "UTF-8");
}
LogUtil.b(f79645a, "handleHttpCallbackOnSuccess response:" + str);
if (this.e != null) {
this.e.a(str);
}
} catch (Exception e) {
TVKLogUtil.a(f79645a, e);
a(e);
}
}
public void a(Exception exc) {
int i = this.f;
if (i > f79647c) {
return;
}
this.f = i + 1;
a();
}
private Map<String, String> b() {
return new HashMap();
}
private byte[] c() {
try {
JSONObject jSONObject = new JSONObject();
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("app_id", "07d79ecd-33f9-4b90-80cb-e12359816b34");
jSONObject2.put("group", this.f79648d);
jSONObject2.put("version", SuperPlayerSDKMgr.b());
jSONObject.put("pull_item", jSONObject2);
jSONObject.put("client_infos", d());
return jSONObject.toString().getBytes("utf-8");
} catch (Exception e) {
LogUtil.a(f79645a, "getRequestRawData error", e);
return new byte[0];
}
}
private JSONArray d() throws JSONException {
JSONArray jSONArray = new JSONArray();
JSONObject jSONObject = new JSONObject();
jSONObject.put("client_identified_name", "qmei");
jSONObject.put("client_identified_value", BeaconAdapter.getQIMEI());
jSONArray.put(jSONObject);
return jSONArray;
}
private Map<String, String> e() {
HashMap hashMap = new HashMap();
hashMap.put("Content-Type", "application/json");
return hashMap;
}
public void a(String str, PullConfigCallback pullConfigCallback) {
this.f79648d = str;
this.e = pullConfigCallback;
TVKVideoInfoHttpProcessor.a().a(this.f, f79646b, b(), e(), c(), this.g);
}
}