Commit 03fc7e3c authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 0f5422ae
......@@ -250,7 +250,8 @@ public class MintsApplication extends BaseApp {
@Override
public void onAdded(String pkgName) {
if (WifiDataManager.INSTANCE.getInstallApk()) {
AntiAuditManager.Companion.getInstance().updateInstallApkCount();
// AntiAuditManager.Companion.getInstance().updateInstallApkCount();
AntiAuditManager.Companion.getInstance().antiAudit();
OutAppRouter.INSTANCE.showApkActivity(0, pkgName);
}
}
......
......@@ -1183,9 +1183,11 @@ class DeviceInfo private constructor() {
}
}
}
val localApkCount = AntiAuditManager.instance.getCurrentDayCount()
LogUtil.d("AntiAuditManager", "获取列表-本地个数 -> $localApkCount")
AntiAuditManager.instance.setCurrentDayCount(if (localApkCount > onedayItems.size) localApkCount else onedayItems.size)
// val localApkCount = AntiAuditManager.instance.getCurrentDayCount()
// LogUtil.d("AntiAuditManager", "获取列表-本地个数 -> $localApkCount")
// AntiAuditManager.instance.setCurrentDayCount(if (localApkCount > onedayItems.size) localApkCount else onedayItems.size)
AntiAuditManager.instance.setCurrentDayCount(onedayItems.size)
LogUtil.d("AntiAuditManager", "ThreeDay -> $threedayItems")
LogUtil.d("AntiAuditManager", "TwoDay -> $twodayItems")
......
......@@ -38,21 +38,21 @@ class AntiAuditManager private constructor() {
/**
* 更新 新安装的apk个数
*/
fun updateInstallApkCount() {
// 若是黑名单则返回
if (isBlack()) {
return
}
val count = getCurrentDayCount()
val sumCount = count + 1
LogUtil.d(TAG, "新安装apk 当天apk个数: -> $sumCount")
setCurrentDayCount(sumCount)
if (sumCount >= sp.getInt(TODAY_INSTALL_SUM_COUNT, N)) {
cmtBlackToServier()
setBlack(true)
}
}
// fun updateInstallApkCount() {
// // 若是黑名单则返回
// if (isBlack()) {
// return
// }
//
// val count = getCurrentDayCount()
// val sumCount = count + 1
// LogUtil.d(TAG, "新安装apk 当天apk个数: -> $sumCount")
// setCurrentDayCount(sumCount)
// if (sumCount >= sp.getInt(TODAY_INSTALL_SUM_COUNT, N)) {
// cmtBlackToServier()
// setBlack(true)
// }
// }
/**
* 获取所有以安装列表,除系统应用,归类到自然日
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment