Merge remote-tracking branch 'origin/release' into dev

# Conflicts:
#	app/src/main/java/com/gh/gamecenter/catalog/CatalogFragment.kt
#	app/src/main/java/com/gh/gamecenter/catalog/SubCatalogFragment.kt
This commit is contained in:
juntao
2021-02-27 10:58:57 +08:00
10 changed files with 81 additions and 58 deletions

View File

@ -621,6 +621,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.