[2.13.2][Opt]查询性能监控的时机后置

This commit is contained in:
chenfufeng
2023-01-11 16:43:04 +08:00
parent 7cad199cfd
commit a841735ac4

View File

@@ -70,7 +70,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
initKoom();
}
clearMessageBoxTable();
checkMonitorDb();
CallerMsgBoxManager.INSTANCE.queryAllMessages(this);
}
upgradeProgressListener();
@@ -123,25 +122,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
}).start();
}
private void checkMonitorDb() {
new Thread(() -> {
long limitId = 50001;
File file = this.getDatabasePath(MonitorDb.INTERNAL_DB_NAME);
try {
if (file != null && file.exists()) {
List<CpuInfo> cpuList = MonitorDb.getDb(this).monitorDao().getAllCPUById(limitId);
List<MemInfo> memList = MonitorDb.getDb(this).monitorDao().getAllMemById(limitId);
// 大于5w条清除
if (cpuList.size() > 0 || memList.size() > 0) {
this.deleteDatabase(MonitorDb.INTERNAL_DB_NAME);
}
}
} catch (Exception e) {
CallerLogger.INSTANCE.e(TAG, e.getMessage());
}
}).start();
}
private void upgradeProgressListener() {
final NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
// builder.setSmallIcon(R.mipmap.icon1001);//todo emArrow 更换图标,去除地图下载图标的依赖关系