正在查看: Clean Center v0.5.5 应用的 TlJobService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clean Center v0.5.5 应用的 TlJobService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.trustlook.sdk.job;
import android.app.job.JobParameters;
import android.app.job.JobService;
import android.content.Context;
import com.trustlook.sdk.cloudscan.NetworkUtils;
import com.trustlook.sdk.cloudscan.PkgUtils;
import com.trustlook.sdk.data.AppInfo;
import com.trustlook.sdk.data.DataUtils;
import com.trustlook.sdk.data.Region;
import com.trustlook.sdk.database.DBHelper;
import com.trustlook.sdk.database.DBManager;
import java.io.File;
import java.util.HashMap;
import java.util.List;
public class TlJobService extends JobService {
Context a;
String b;
String c;
class a extends Thread {
private JobParameters a;
public a(JobParameters jobParameters) {
this.a = jobParameters;
}
@Override
public void run() {
List<AppInfo> loadSortedInterestList = PkgUtils.loadSortedInterestList(TlJobService.this.a);
if (loadSortedInterestList != null && loadSortedInterestList.size() > 0) {
TlJobService tlJobService = TlJobService.this;
NetworkUtils networkUtils = new NetworkUtils(tlJobService.a, 30000, 50000);
for (AppInfo appInfo : loadSortedInterestList) {
try {
if (networkUtils.missing(tlJobService.b + appInfo.getMd5())) {
appInfo.getMd5();
File file = new File(appInfo.getApkPath());
if (file.exists()) {
HashMap hashMap = new HashMap();
hashMap.put(DBHelper.COLUMN_MD5, appInfo.getMd5());
new HashMap().put("file", file);
appInfo.getPackageName();
appInfo.getMd5();
file.getName();
networkUtils.upload2Trustlook(hashMap, file.getName(), file, tlJobService.c);
}
} else {
PkgUtils.removeMD5FromInterestList(tlJobService.a, appInfo.getMd5());
}
} catch (Exception e) {
appInfo.getMd5();
e.getMessage();
}
}
DBManager.getInstance(tlJobService.a).getDataSource().updateUploadResult(loadSortedInterestList);
}
TlJobService.this.jobFinished(this.a, false);
}
}
@Override
public boolean onStopJob(JobParameters jobParameters) {
jobFinished(jobParameters, false);
return false;
}
@Override
public boolean onStartJob(JobParameters jobParameters) {
this.a = this;
Region regionValue = DataUtils.getRegionValue(this, 0);
if (regionValue == Region.CHN) {
this.b = "https://api.luweitech.com/missing/";
this.c = "https://file.luweitech.com/collect_v2";
} else if (regionValue == Region.BAIDU) {
this.b = "http://queryapi-1431840856.bceapp.com/missing/";
this.c = "http://fileservice-1431840856.bceapp.com/collect_v2";
} else {
this.b = "https://sla-intl.trustlook.com/missing/";
this.c = "https://file.trustlook.com/collect_v2";
}
new a(jobParameters).start();
return true;
}
}