修复闪退问题

1. 修复首页游戏库数据库更新闪退问题
2. 修复部分设备获取下载列表时的闪退问题
3. 修复重复发送设备应用列表的问题
This commit is contained in:
juntao
2021-02-05 17:40:56 +08:00
parent 338de605ec
commit c8684f837a
4 changed files with 16 additions and 3 deletions

View File

@ -556,6 +556,13 @@ public class PackageUtils {
if (!pm.isScreenOn()) return false;
}
// 上面的判断逻辑可能还是不够用,还是有少部分
// Not allowed to start service Intent: app is in background 错误
// 这里补充个自有的规则
if (!HaloApp.getInstance().isRunningForeground) {
return false;
}
String packageName = context.getApplicationContext().getPackageName();
for (ActivityManager.RunningAppProcessInfo appProcess : appProcesses) {
// The name of the process that this object is associated with.