百度手机卫士 v8.4.5版本的 MD5 值为:c65ef854a40bb6200c4d8c4603c58403
以下内容为反编译后的 czk.java 源代码,内容仅作参考
package dxoptimizer;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import com.baidu.sapi2.utils.SapiUtils;
import com.baidu.security.plugin.alarm.AlarmUtil;
import com.dianxinos.optimizer.utils.HttpUtils;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class czk {
private Context a;
public czk(Context context) {
this.a = context.getApplicationContext();
}
public void a() {
if (hqo.c(this.a)) {
SQLiteDatabase a = cyr.a(this.a);
czb czbVar = new czb(this.a, a);
if (System.currentTimeMillis() - czbVar.b("https://mobsec-aip.baidu.com/aip/recmndupdate") >= AlarmUtil.DAY) {
try {
cza czaVar = new cza(this.a, a);
String a2 = a(this.a, czaVar.a());
if (a2 != null) {
String a3 = HttpUtils.a(this.a, "https://mobsec-aip.baidu.com/aip/recmndupdate", a2);
hpr hprVar = new hpr();
JSONArray b = hprVar.b(a3);
if (hprVar.a()) {
czaVar.b(a(b));
czbVar.a("https://mobsec-aip.baidu.com/aip/recmndupdate", System.currentTimeMillis(), null);
}
}
} catch (HttpUtils.HttpStatusException e) {
} catch (IOException e2) {
} catch (JSONException e3) {
}
}
}
}
private List a(JSONArray jSONArray) {
ArrayList arrayList = new ArrayList();
int length = jSONArray.length();
for (int i = 0; i < length; i++) {
JSONObject jSONObject = jSONArray.getJSONObject(i);
if (!jSONObject.isNull("tover") && !jSONObject.isNull("toverrate")) {
cyz cyzVar = new cyz();
cyzVar.a = jSONObject.getString("pkg");
cyzVar.b = jSONObject.getInt("tover");
cyzVar.c = jSONObject.getString("tovername");
cyzVar.d = jSONObject.getDouble("toverrate");
cyzVar.e = jSONObject.getBoolean("isRecommend");
arrayList.add(cyzVar);
}
}
return arrayList;
}
public static String a(Context context, List list) {
JSONArray jSONArray = new JSONArray();
aww a = aww.a(context);
Iterator it = list.iterator();
while (it.hasNext()) {
dco dcoVar = (dco) it.next();
awv c = a.c(dcoVar.b);
if (c != null) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("pkg", dcoVar.b);
jSONObject.put(SapiUtils.KEY_QR_LOGIN_SIGN, c.b(context));
jSONObject.put("ver", String.valueOf(c.h()));
jSONObject.put("vername", c.g());
jSONObject.put("signmd5", String.valueOf(c.c(context)));
jSONObject.put("tover", String.valueOf(dcoVar.e));
jSONArray.put(jSONObject);
}
}
if (jSONArray.length() <= 0) {
return null;
}
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("apps", jSONArray);
return jSONObject2.toString();
}
}