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

Commit a90a5a84 authored by Jing Ji's avatar Jing Ji Committed by Android (Google) Code Review
Browse files

Merge "Do not kill process on removing task if it has a started service" into main

parents 29a04994 e834ea93
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18462,7 +18462,8 @@ public class ActivityManagerService extends IActivityManager.Stub
                            (WindowProcessController) procsToKill.get(i);
                    final ProcessRecord pr = (ProcessRecord) wpc.mOwner;
                    if (ActivityManager.isProcStateBackground(pr.mState.getSetProcState())
                            && pr.mReceivers.numberOfCurReceivers() == 0) {
                            && pr.mReceivers.numberOfCurReceivers() == 0
                            && !pr.mState.hasStartedServices()) {
                        pr.killLocked("remove task", ApplicationExitInfo.REASON_USER_REQUESTED,
                                ApplicationExitInfo.SUBREASON_REMOVE_TASK, true);
                    } else {
+2 −1
Original line number Diff line number Diff line
@@ -3322,7 +3322,8 @@ public class OomAdjuster {
                reportOomAdjMessageLocked(TAG_OOM_ADJ, msg);
            }
            if (app.getWaitingToKill() != null && app.mReceivers.numberOfCurReceivers() == 0
                    && ActivityManager.isProcStateBackground(state.getSetProcState())) {
                    && ActivityManager.isProcStateBackground(state.getSetProcState())
                    && !state.hasStartedServices()) {
                app.killLocked(app.getWaitingToKill(), ApplicationExitInfo.REASON_USER_REQUESTED,
                        ApplicationExitInfo.SUBREASON_REMOVE_TASK, true);
                success = false;