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

Commit 8aed789f authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am 994e3990: am 2adec762: Merge "Fix issue #2621809: Kill! Kill! Kill!" into froyo

Merge commit '994e3990' into kraken

* commit '994e3990':
  Fix issue #2621809: Kill! Kill! Kill!
parents 0c817ba3 994e3990
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -14271,6 +14271,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
                    }
                }
                if (app.curAdj >= HIDDEN_APP_MIN_ADJ) {
                    if (!app.killedBackground) {
                        numHidden++;
                        if (numHidden > MAX_HIDDEN_APPS) {
                            Slog.i(TAG, "Kill " + app.processName
@@ -14278,9 +14279,11 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
                                    + " beyond limit " + MAX_HIDDEN_APPS);
                            EventLog.writeEvent(EventLogTags.AM_KILL, app.pid,
                                    app.processName, app.setAdj, "too many background");
                            app.killedBackground = true;
                            Process.killProcess(app.pid);
                        }
                    }
                }
            } else {
                didOomAdj = false;
            }
+4 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ class ProcessRecord implements Watchdog.PssRequestor {
    boolean setIsForeground;    // Running foreground UI when last set?
    boolean foregroundServices; // Running any services that are foreground?
    boolean bad;                // True if disabled in the bad process list
    boolean killedBackground;   // True when proc has been killed due to too many bg
    IBinder forcingToForeground;// Token that is forcing this process to be foreground
    int adjSeq;                 // Sequence id for identifying repeated trav
    ComponentName instrumentationClass;// class installed to instrument app
@@ -174,6 +175,9 @@ class ProcessRecord implements Watchdog.PssRequestor {
        pw.print(prefix); pw.print("persistent="); pw.print(persistent);
                pw.print(" removed="); pw.print(removed);
                pw.print(" persistentActivities="); pw.println(persistentActivities);
        if (killedBackground) {
            pw.print(prefix); pw.print("killedBackground="); pw.println(killedBackground);
        }
        if (debugging || crashing || crashDialog != null || notResponding
                || anrDialog != null || bad) {
            pw.print(prefix); pw.print("debugging="); pw.print(debugging);