TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c

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


package com.tencent.mobileqq.msf.core.b;

import android.content.SharedPreferences;
import com.tencent.mobileqq.msf.core.NetConnInfoCenter;
import com.tencent.mobileqq.msf.service.MsfService;
import com.tencent.mobileqq.troop.utils.TroopBarUtils;
import com.tencent.qphone.base.util.BaseApplication;
import com.tencent.qphone.base.util.QLog;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
public class a {
    public static String f90381a = "LogEvent";
    public static int f90382b = 10;
    public static int f90383c = 11;
    public static int d = 20;
    public static int e = 30;
    public static int f = 40;
    public static int g = 41;
    public static String h = "SetLogLevel";
    public static String i = "UploadLogFile";
    public static String j = "UploadLogFiled_Debug";
    private static String k = "/183.61.46.145:60000";

    public static void a(String str, String str2) {
        a(str);
        SharedPreferences sharedPreferences = BaseApplication.getContext().getSharedPreferences(str, 0);
        try {
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("time", System.currentTimeMillis());
            jSONObject.put("stat", f90382b);
            jSONObject.put("uin", MsfService.getCore().getAccountCenter().i());
            jSONObject.put("startNet", NetConnInfoCenter.getSystemNetState());
            jSONObject.put("isSSOConfIP", k.equals(MsfService.core.sender.f90305a.s().toString()));
            sharedPreferences.edit().putString(str2, jSONObject.toString()).commit();
            QLog.d(f90381a, 1, "new LogEvent1 " + str2);
        } catch (Exception e2) {
            QLog.e(f90381a, 1, "", e2);
        }
    }

    public static void a(String str, String str2, int i2, boolean z, Object... objArr) {
        SharedPreferences sharedPreferences = BaseApplication.getContext().getSharedPreferences(str, 0);
        String string = sharedPreferences.getString(str2, null);
        if (string != null) {
            try {
                JSONObject jSONObject = new JSONObject(string);
                jSONObject.put("stat", i2);
                if (objArr != null && objArr.length > 0 && (i2 == f || i2 == g)) {
                    jSONObject.put("fileSize", (Long) objArr[0]);
                }
                if (z) {
                    jSONObject.put("endNet", NetConnInfoCenter.getSystemNetState());
                    a(str, jSONObject);
                    sharedPreferences.edit().remove(str2).commit();
                } else {
                    sharedPreferences.edit().putString(str2, jSONObject.toString()).commit();
                }
                QLog.d(f90381a, 1, "changeEventStat " + i2 + TroopBarUtils.y + str2);
            } catch (JSONException e2) {
                QLog.e(f90381a, 1, "", e2);
            }
        }
    }

    public static void a(String str) {
        SharedPreferences sharedPreferences = BaseApplication.getContext().getSharedPreferences(str, 0);
        SharedPreferences.Editor edit = sharedPreferences.edit();
        for (Map.Entry<String, ?> entry : sharedPreferences.getAll().entrySet()) {
            try {
                JSONObject jSONObject = new JSONObject((String) entry.getValue());
                if (System.currentTimeMillis() - jSONObject.getLong("time") > 3600000) {
                    a(str, jSONObject);
                    edit.remove(entry.getKey());
                }
            } catch (JSONException e2) {
                QLog.e(f90381a, 1, "", e2);
            }
        }
        edit.commit();
    }

    public static void a(String str, JSONObject jSONObject) {
        try {
            int i2 = jSONObject.has("stat") ? jSONObject.getInt("stat") : 0;
            QLog.d(f90381a, 1, "reportLogEvent, " + i2);
            HashMap hashMap = new HashMap();
            if (str.equals(i)) {
                hashMap.put("pmStat", String.valueOf(i2));
                if (jSONObject.has("uin")) {
                    hashMap.put("pmUin", String.valueOf(jSONObject.getString("uin")));
                }
                if (jSONObject.has("time")) {
                    hashMap.put("pmTime", String.valueOf(jSONObject.getLong("time")));
                }
                if (jSONObject.has("startNet")) {
                    hashMap.put("pmStartNet", String.valueOf(jSONObject.getInt("startNet")));
                }
                if (jSONObject.has("endNet")) {
                    hashMap.put("pmEndNet", String.valueOf(jSONObject.getInt("endNet")));
                }
                if (jSONObject.has("fileSize")) {
                    hashMap.put("pmFileSize", String.valueOf(jSONObject.getLong("fileSize")));
                }
                if (jSONObject.has("isSSOConfIP")) {
                    hashMap.put("pmSSOConfIP", String.valueOf(jSONObject.getBoolean("isSSOConfIP")));
                }
            }
            if (MsfService.getCore().getStatReporter() != null) {
                MsfService.getCore().getStatReporter().a(str, true, 0L, 0L, (Map) hashMap, false, false);
                if (QLog.isDebugVersion() && i.equals(str)) {
                    MsfService.getCore().getStatReporter().a(j, true, 0L, 0L, (Map) hashMap, false, false);
                }
            }
        } catch (JSONException e2) {
            QLog.e(f90381a, 1, "", e2);
        }
    }
}