TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.tencent.mobileqq.msf.core.c;
import android.content.Context;
import android.text.TextUtils;
import com.tencent.mobileqq.msf.core.MsfStore;
import com.tencent.mobileqq.msf.sdk.MsfSdkUtils;
import com.tencent.mobileqq.msf.sdk.report.IMTAReporter;
import com.tencent.mobileqq.troop.utils.TroopBarUtils;
import com.tencent.qphone.base.util.BaseApplication;
import com.tencent.qphone.base.util.QLog;
import com.tencent.stat.StatConfig;
import com.tencent.stat.StatReportStrategy;
import com.tencent.stat.StatServiceImpl;
import com.tencent.stat.StatSpecifyReportedInfo;
import java.util.Map;
import java.util.Properties;
public class a implements IMTAReporter {
public static boolean f90389a = false;
private static final String f90390b = "MTAReportManager";
private static volatile a d;
private Context f90391c;
private StatSpecifyReportedInfo e = new StatSpecifyReportedInfo();
private volatile String f;
private boolean g;
private a(Context context) {
this.f90391c = context.getApplicationContext();
this.g = a(this.f90391c, true);
a(false);
initMtaConfig(MsfSdkUtils.getAppChannelId(), "A8X8VDVSK17B");
}
@Override
public boolean isMtaSupported() {
return this.g;
}
@Override
public void initMtaConfig(String str, String str2) {
String str3;
try {
this.e.setAppKey(str2);
if (str == null) {
Object appData = BaseApplication.getContext().getAppData("channel_id");
if (appData != null && (appData instanceof String)) {
str3 = (String) appData;
this.e.setInstallChannel(str3);
} else {
str3 = "yyb_msf";
}
} else {
this.e.setInstallChannel(str);
str3 = str;
}
StatConfig.setEnableConcurrentProcess(true);
StatConfig.setAutoExceptionCaught(false);
StatServiceImpl.setContext(this.f90391c);
StatConfig.setStatSendStrategy(StatReportStrategy.PERIOD);
StatConfig.setSendPeriodMinutes(30);
StatConfig.setEnableSmartReporting(true);
StatConfig.setStatReportUrl("http://sngmta.qq.com:80/mstat/report/");
this.f = MsfStore.getNativeConfigStore().getConfig("key_main_account");
if (!TextUtils.isEmpty(this.f)) {
StatConfig.setCustomUserId(this.f90391c, this.f);
}
f90389a = true;
QLog.i(f90390b, 1, "initMtaConfig channel=" + str3 + " uin=" + MsfSdkUtils.getShortUin(this.f));
} catch (Exception e) {
QLog.i(f90390b, 1, "initMtaConfig failed", e);
e.printStackTrace();
f90389a = false;
}
}
public void a(String str) {
this.f = str;
}
public static a a(Context context) {
if (d == null) {
synchronized (a.class) {
if (d == null) {
d = new a(context);
}
}
}
return d;
}
public void a(boolean z) {
StatConfig.setDebugEnable(z);
}
@Override
public void reportKVEvent(String str, Properties properties) {
if (this.g) {
if (QLog.isColorLevel()) {
QLog.d(f90390b, 2, "reportKVEvent " + str + " \n\t\t" + properties);
}
try {
StatServiceImpl.trackCustomKVEvent(this.f90391c, str, properties, this.e);
} catch (Exception e) {
QLog.w(f90390b, 1, "reportKVEvent", e);
e.printStackTrace();
}
}
}
public void a(String str, Map map) {
try {
Properties properties = new Properties();
if (map != null && map.size() > 0) {
properties.putAll(map);
}
reportKVEvent(str, properties);
} catch (Exception e) {
QLog.w(f90390b, 1, "reportKVEvent", e);
e.printStackTrace();
}
}
public void a(String str, Map map, int i) {
if (this.g) {
try {
Properties properties = new Properties();
if (map != null && map.size() > 0) {
properties.putAll(map);
}
reportTimeKVEvent(str, properties, i);
} catch (Exception e) {
QLog.w(f90390b, 1, "reportTimeKVEvent", e);
e.printStackTrace();
}
}
}
@Override
public void reportTimeKVEvent(String str, Properties properties, int i) {
if (this.g) {
if (QLog.isColorLevel()) {
QLog.d(f90390b, 2, "reportTimeKVEvent " + str + TroopBarUtils.y + i + "\n\t\t" + properties);
}
try {
StatServiceImpl.trackCustomKVTimeIntervalEvent(this.f90391c, str, properties, i, this.e);
} catch (Exception e) {
QLog.w(f90390b, 1, "reportTimeKVEvent", e);
e.printStackTrace();
}
}
}
@Override
public void trackBeginPage(String str) {
}
@Override
public void trackEndPage(String str) {
}
public static boolean a(Context context, boolean z) {
return context.getSharedPreferences("LIGHT_DPC_CFG", 4).getBoolean("SUPPORT_MTA", z);
}
}