Merge "Recheck the condition before really killing" am: f24ac73825
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2121361 Change-Id: I3d1793941c3a96133b51e787008e1c6fb82566fd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -14372,6 +14372,10 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
app.processName, app.toShortString(), cpuLimit, app)) {
|
||||
mHandler.post(() -> {
|
||||
synchronized (ActivityManagerService.this) {
|
||||
if (app.getThread() == null
|
||||
|| app.mState.getSetProcState() < ActivityManager.PROCESS_STATE_HOME) {
|
||||
return;
|
||||
}
|
||||
app.killLocked("excessive cpu " + cpuTimeUsed + " during "
|
||||
+ uptimeSince + " dur=" + checkDur + " limit=" + cpuLimit,
|
||||
ApplicationExitInfo.REASON_EXCESSIVE_RESOURCE_USAGE,
|
||||
@@ -14397,6 +14401,10 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
app.processName, r.toString(), cpuLimit, app)) {
|
||||
mHandler.post(() -> {
|
||||
synchronized (ActivityManagerService.this) {
|
||||
if (app.getThread() == null
|
||||
|| app.mState.getSetProcState() < ActivityManager.PROCESS_STATE_HOME) {
|
||||
return;
|
||||
}
|
||||
mPhantomProcessList.killPhantomProcessGroupLocked(app, r,
|
||||
ApplicationExitInfo.REASON_EXCESSIVE_RESOURCE_USAGE,
|
||||
ApplicationExitInfo.SUBREASON_EXCESSIVE_CPU,
|
||||
|
||||
Reference in New Issue
Block a user