Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xF committed May 20, 2021
1 parent 0de4b9e commit cd3ccb7
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,10 @@ public boolean isForeground()throws RemoteException{
boolean foreground = false;
while (N-- > 0) {
ProcessRecord r = mPidsSelfLocked.get(N);
foreground|=r.client.isAppForeground();
if(r.client != null)
foreground|=r.client.isAppForeground();
}
Log.e(TAG, " process is foreground " + foreground);
//Log.e(TAG, " process is foreground " + foreground);
return foreground;
}
}
Expand Down Expand Up @@ -795,7 +796,7 @@ public void killAppByPkg(final String pkg, final int userId) {
if (r.pkgList.contains(pkg) || r.info.packageName.equals(pkg)) {
//xdja
try {
Log.e("wxd", " killAppByPkg " + r.processName + r.pkgList.toString());
//Log.e("wxd", " killAppByPkg " + r.processName + r.pkgList.toString());
//processDied处有做处理
//mServices.stopServiceByPkg(userId, pkg);
r.client.clearSettingProvider();
Expand Down

0 comments on commit cd3ccb7

Please sign in to comment.