Merge "Check the process state for the killProcessesForRemovedTask"
This commit is contained in:
@@ -16651,7 +16651,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
final WindowProcessController wpc =
|
||||
(WindowProcessController) procsToKill.get(i);
|
||||
final ProcessRecord pr = (ProcessRecord) wpc.mOwner;
|
||||
if (pr.mState.getSetSchedGroup() == ProcessList.SCHED_GROUP_BACKGROUND
|
||||
if (ActivityManager.isProcStateBackground(pr.mState.getSetProcState())
|
||||
&& pr.mReceivers.numberOfCurReceivers() == 0) {
|
||||
pr.killLocked("remove task", ApplicationExitInfo.REASON_USER_REQUESTED,
|
||||
ApplicationExitInfo.SUBREASON_REMOVE_TASK, true);
|
||||
|
||||
@@ -2597,7 +2597,7 @@ public class OomAdjuster {
|
||||
reportOomAdjMessageLocked(TAG_OOM_ADJ, msg);
|
||||
}
|
||||
if (app.getWaitingToKill() != null && app.mReceivers.numberOfCurReceivers() == 0
|
||||
&& state.getSetSchedGroup() == ProcessList.SCHED_GROUP_BACKGROUND) {
|
||||
&& ActivityManager.isProcStateBackground(state.getSetProcState())) {
|
||||
app.killLocked(app.getWaitingToKill(), ApplicationExitInfo.REASON_USER_REQUESTED,
|
||||
ApplicationExitInfo.SUBREASON_REMOVE_TASK, true);
|
||||
success = false;
|
||||
|
||||
Reference in New Issue
Block a user