百度手机卫士 v8.1.5版本的 MD5 值为:15af71eae74e2f2b5b9f845fe77a4804

以下内容为反编译后的 wp.java 源代码,内容仅作参考


package dxoptimizer;

import android.content.Context;
import android.text.TextUtils;
import com.baidu.hao123.internal.http.HttpPool;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class wp {
    public static void a(Context context, String str, String str2, String str3) {
        if (!TextUtils.isEmpty(str) && !TextUtils.isEmpty(str2)) {
            try {
                String valueOf = String.valueOf(System.currentTimeMillis());
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("t", valueOf);
                jSONObject.put("k", str);
                jSONObject.put("v", str2);
                if (!TextUtils.isEmpty(str3)) {
                    jSONObject.put("i", str3);
                }
                wh.a(context).a("log_event_list", wh.a, valueOf, jSONObject.toString(), false);
                wg.a("KPICommit", "===================================\ndoSaveEventLog: " + jSONObject.toString() + "\n===================================");
            } catch (JSONException e) {
            } catch (Exception e2) {
            }
        }
    }

    public static void a(Context context) {
        Map a;
        if (wi.a(context) && (a = wh.a(context).a("log_event_list", wh.a)) != null && a.size() >= 1) {
            ArrayList arrayList = new ArrayList();
            JSONArray jSONArray = new JSONArray();
            int i = 0;
            Iterator it = a.entrySet().iterator();
            do {
                int i2 = i;
                if (!it.hasNext()) {
                    break;
                }
                Map.Entry entry = (Map.Entry) it.next();
                try {
                    arrayList.add((String) entry.getKey());
                    String str = (String) entry.getValue();
                    i2 += str.getBytes().length;
                    jSONArray.put(new JSONObject(str));
                    wg.a("KPICommit", "envalue: " + str);
                    wg.a("KPICommit", "envalue length: " + str.getBytes().length);
                    wg.a("KPICommit", "value length: " + i2);
                    i = i2;
                } catch (JSONException e) {
                    i = i2;
                } catch (Exception e2) {
                    i = i2;
                }
                if (i > 1024) {
                    break;
                }
            } while (arrayList.size() < 19);
            String str2 = "http://m.hao123.com/static/app.gif?" + wf.b(context) + "&data=";
            wg.a("KPICommit", "submitLog data: " + jSONArray.toString());
            HttpPool.a(context).a(String.valueOf(str2) + wi.b(jSONArray.toString()), null, new wq(arrayList, context));
        }
    }

    public static void a(Context context, String str, boolean z) {
        if (wi.a(context)) {
            wg.a("KPICommit", "doSendKPIAction send action");
            String str2 = "http://m.hao123.com/hao123_app/action/?" + wf.b(context) + "&action=" + ((str.equals("visit") && TextUtils.isEmpty(wh.a(context).b("hao123_logs", wh.a, "cuid", "", false))) ? "firstvisit" : str);
            if (!TextUtils.isEmpty(str2)) {
                wg.a("KPICommit", "doSendKPIAction log: " + str2);
                HttpPool.a(context).a(str2, null, new wr(z, context, str, str2));
            }
        }
    }
}