Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f24ac738 authored by Jing Ji's avatar Jing Ji Committed by Gerrit Code Review
Browse files

Merge "Recheck the condition before really killing"

parents 5c73e446 a2461a3f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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,