百度手机卫士 v8.6.2版本的 MD5 值为:fa60cb367e40201705a2d9f9ce2cbfdf
以下内容为反编译后的 dba.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.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class dba {
private Context a;
public dba(Context context) {
this.a = context.getApplicationContext();
}
public void a() {
if (hvy.c(this.a)) {
SQLiteDatabase a = dah.a(this.a);
dar darVar = new dar(this.a, a);
if (System.currentTimeMillis() - darVar.b("https://mobsec-aip.baidu.com/aip/recmndupdate") >= AlarmUtil.DAY) {
try {
daq daqVar = new daq(this.a, a);
String a2 = a(this.a, daqVar.a());
if (a2 != null) {
String a3 = HttpUtils.a(this.a, "https://mobsec-aip.baidu.com/aip/recmndupdate", a2);
hvb hvbVar = new hvb();
JSONArray b = hvbVar.b(a3);
if (hvbVar.a()) {
daqVar.b(a(b));
darVar.a("https://mobsec-aip.baidu.com/aip/recmndupdate", System.currentTimeMillis(), null);
}
}
} catch (HttpUtils.HttpStatusException e) {
} catch (IOException e2) {
} catch (JSONException e3) {
}
}
}
}
private List<dap> 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")) {
dap dapVar = new dap();
dapVar.a = jSONObject.getString("pkg");
dapVar.b = jSONObject.getInt("tover");
dapVar.c = jSONObject.getString("tovername");
dapVar.d = jSONObject.getDouble("toverrate");
dapVar.e = jSONObject.getBoolean("isRecommend");
arrayList.add(dapVar);
}
}
return arrayList;
}
public static String a(Context context, List<def> list) {
JSONArray jSONArray = new JSONArray();
avj a = avj.a(context);
for (def defVar : list) {
avi c = a.c(defVar.b);
if (c != null) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("pkg", defVar.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(defVar.e));
jSONArray.put(jSONObject);
}
}
if (jSONArray.length() <= 0) {
return null;
}
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("apps", jSONArray);
return jSONObject2.toString();
}
}