百度手机卫士 v8.4.5版本的 MD5 值为:c65ef854a40bb6200c4d8c4603c58403
以下内容为反编译后的 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 dN;
private FileLog dO;
private FileLog dP;
private FileLog dQ;
private FileLog dR;
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.dN = new LogCenter(logCenterConfiguration, new ag(this));
}
public void b(String str, String str2, Throwable th) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dN == null) {
return;
}
if (this.dN.getLogcatLog() != null) {
this.dN.getLogcatLog().e(str, str2, th);
}
if (this.dP != null) {
this.dP.e(str, str2, th);
}
}
public void d(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dN == null) {
return;
}
try {
this.dN.d(str, str2);
} catch (Throwable th) {
th.printStackTrace();
}
}
public void e(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dN == null) {
return;
}
this.dN.e(str, str2);
}
public void e(String str, String str2, Throwable th) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dN == null) {
return;
}
this.dN.e(str, str2, th);
}
public void g(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
return;
}
if (this.dN != null && this.dN.getLogcatLog() != null) {
this.dN.getLogcatLog().i(str, str2);
}
if (this.dO != null) {
this.dO.e(str, str2);
}
}
public void h(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dN == null) {
return;
}
if (this.dN.getLogcatLog() != null) {
this.dN.getLogcatLog().i(str, str2);
}
if (this.dP != null) {
this.dP.i(str, str2);
}
}
public void i(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dN == null) {
return;
}
this.dN.i(str, str2);
}
public void j(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dN == null) {
return;
}
if (this.dN.getLogcatLog() != null) {
this.dN.getLogcatLog().i(str, str2, null);
}
if (this.dQ != null) {
this.dQ.i(str, str2);
}
}
public void k(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dN == null) {
return;
}
if (this.dN.getLogcatLog() != null) {
this.dN.getLogcatLog().w(str, str2, null);
}
if (this.dQ != null) {
this.dR.w(str, str2);
}
}
public void q(Context context) {
if (context == null || this.dN == null) {
return;
}
this.dN.initialize(context, getClass());
this.dN.enablePeriodicUpload(true, 24, "http://rest.implus.baidu.com/proxy_monitor_api/request_log_upload.php", this.dO);
this.dN.enableSpecificUpload(true, "");
}
public void w(String str, String str2) {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || this.dN == null) {
return;
}
this.dN.w(str, str2);
}
}