百度手机卫士 v8.8.0版本的 MD5 值为:a85894a6923c8a39f0c3a3a686ad7443
以下内容为反编译后的 af.java 源代码,内容仅作参考
package com.baidu.im.frame.utils;
import android.content.Context;
import android.text.TextUtils;
import com.baidu.hi.plugin.logcenter.LogCenter;
import com.baidu.hi.plugin.logcenter.LogCenterConfiguration;
import com.baidu.hi.plugin.logcenter.log.FileLog;
public class af {
public LogCenter dP;
private FileLog dQ;
private FileLog dR;
private FileLog dS;
private FileLog dT;
public af(s sVar, s sVar2) {
if (sVar == null || sVar2 == null) {
return;
}
LogCenterConfiguration logCenterConfiguration = new LogCenterConfiguration();
logCenterConfiguration.logFilePath = "/baidu/imsdk/log/";
logCenterConfiguration.logName = ".mainprocess.txt";
logCenterConfiguration.logClearTime = 240;
logCenterConfiguration.logNeedFormat = false;
logCenterConfiguration.defaultLogcatLevel = sVar.at();
logCenterConfiguration.defaultFileLogLevel = sVar2.at();
this.dP = new LogCenter(logCenterConfiguration, new ag(this));
}
public void b(String str, String str2, Throwable th) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dP == null) {
return;
}
if (this.dP.getLogcatLog() != null) {
this.dP.getLogcatLog().e(str, str2, th);
}
if (this.dR != null) {
this.dR.e(str, str2, th);
}
}
public void d(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dP == null) {
return;
}
try {
this.dP.d(str, str2);
} catch (Throwable th) {
th.printStackTrace();
}
}
public void e(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dP == null) {
return;
}
this.dP.e(str, str2);
}
public void e(String str, String str2, Throwable th) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dP == null) {
return;
}
this.dP.e(str, str2, th);
}
public void g(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
return;
}
if (this.dP != null && this.dP.getLogcatLog() != null) {
this.dP.getLogcatLog().i(str, str2);
}
if (this.dQ != null) {
this.dQ.e(str, str2);
}
}
public void h(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dP == null) {
return;
}
if (this.dP.getLogcatLog() != null) {
this.dP.getLogcatLog().i(str, str2);
}
if (this.dR != null) {
this.dR.i(str, str2);
}
}
public void i(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dP == null) {
return;
}
this.dP.i(str, str2);
}
public void j(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dP == null) {
return;
}
if (this.dP.getLogcatLog() != null) {
this.dP.getLogcatLog().i(str, str2, null);
}
if (this.dS != null) {
this.dS.i(str, str2);
}
}
public void k(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dP == null) {
return;
}
if (this.dP.getLogcatLog() != null) {
this.dP.getLogcatLog().w(str, str2, null);
}
if (this.dS != null) {
this.dT.w(str, str2);
}
}
public void q(Context context) {
if (context == null || this.dP == null) {
return;
}
this.dP.initialize(context, getClass());
this.dP.enablePeriodicUpload(true, 24, "http://rest.implus.baidu.com/proxy_monitor_api/request_log_upload.php", this.dQ);
this.dP.enableSpecificUpload(true, "");
}
public void w(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dP == null) {
return;
}
this.dP.w(str, str2);
}
}