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

Commit 6a1972ba authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Revert "Kill process asynchronously on updateOomAdjLocked."

This reverts commit 7c8169b0.

Change-Id: I4e8d8dd4e8e2615950bdf2f7bf93aa5cc6025577
(cherry picked from commit d65899f7)
parent 320af649
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -18606,19 +18606,19 @@ public final class ActivityManagerService extends ActivityManagerNative
                        mNumCachedHiddenProcs++;
                        numCached++;
                        if (numCached > cachedProcessLimit) {
                            postKillProc(app, "cached #" + numCached, true);
                            app.kill("cached #" + numCached, true);
                        }
                        break;
                    case ActivityManager.PROCESS_STATE_CACHED_EMPTY:
                        if (numEmpty > ProcessList.TRIM_EMPTY_APPS
                                && app.lastActivityTime < oldTime) {
                            postKillProc(app, "empty for "
                            app.kill("empty for "
                                    + ((oldTime + ProcessList.MAX_EMPTY_TIME - app.lastActivityTime)
                                    / 1000) + "s", true);
                        } else {
                            numEmpty++;
                            if (numEmpty > emptyProcessLimit) {
                                postKillProc(app, "empty #" + numEmpty, true);
                                app.kill("empty #" + numEmpty, true);
                            }
                        }
                        break;
@@ -18634,7 +18634,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                    // definition not re-use the same process again, and it is
                    // good to avoid having whatever code was running in them
                    // left sitting around after no longer needed.
                    postKillProc(app, "isolated not needed", true);
                    app.kill("isolated not needed", true);
                }
                if (app.curProcState >= ActivityManager.PROCESS_STATE_HOME
@@ -18859,15 +18859,6 @@ public final class ActivityManagerService extends ActivityManagerNative
        }
    }
    private void postKillProc(final ProcessRecord app, final String reason, final boolean noisy) {
        mHandler.post(new Runnable() {
            @Override
            public void run() {
                app.kill(reason, noisy);
            }
        });
    }
    final void trimApplications() {
        synchronized (this) {
            int i;