Merge "Recheck the condition before really killing" am: f24ac73825 am: c2cbdc7065
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2121361 Change-Id: Ie6d2d6958b27e59b3ccb9ca8f16d2e680758a8d5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -15246,6 +15246,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,
|
||||
@@ -15271,6 +15275,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