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:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user