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

Commit 305d30f7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "OOM-adjust an app to the foreground for startForegroundService" into oc-dev

parents dbc02098 e23fa2bc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -825,7 +825,7 @@ public final class ActiveServices {
        boolean anyForeground = false;
        for (int i=proc.services.size()-1; i>=0; i--) {
            ServiceRecord sr = proc.services.valueAt(i);
            if (sr.isForeground) {
            if (sr.isForeground || sr.fgRequired) {
                anyForeground = true;
                break;
            }
@@ -1869,7 +1869,7 @@ public final class ActiveServices {
        final boolean newService = app.services.add(r);
        bumpServiceExecutingLocked(r, execInFg, "create");
        mAm.updateLruProcessLocked(app, false, null);
        mAm.updateOomAdjLocked();
        updateServiceForegroundLocked(r.app, true);

        boolean created = false;
        try {