[ActivityManager] Prevent kill a restarted process again.
Root Cause: Use removeTask with flag ActivityManager.REMOVE_TASK_KILL_PROCESS will set waitingToKill = "remove task" to the target process when its setSchedGroup is not BG_NONINTERACTIVE. Later the target process may be killed when applying oom-adj due to setSchedGroup has changed to BG_NONINTERACTIVE. If the process is needed to restart, the process record will be resued. Then the restarted process may be killed again because its waitingToKill is not null. Solution: Clean waitingToKill when process is dead. Change-Id: I5ffb5388127f4221da4c700d3f1c224f7ca6e7b2
Loading
Please register or sign in to comment