Merge commit '2adec762fbb61c73f612acb7463ba765de1296ad' into froyo-plus-aosp * commit '2adec762fbb61c73f612acb7463ba765de1296ad': Fix issue #2621809: Kill! Kill! Kill!
This commit is contained in:
@@ -14271,14 +14271,17 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
}
|
||||
}
|
||||
if (app.curAdj >= HIDDEN_APP_MIN_ADJ) {
|
||||
numHidden++;
|
||||
if (numHidden > MAX_HIDDEN_APPS) {
|
||||
Slog.i(TAG, "Kill " + app.processName
|
||||
+ " (pid " + app.pid + "): hidden #" + numHidden
|
||||
+ " beyond limit " + MAX_HIDDEN_APPS);
|
||||
EventLog.writeEvent(EventLogTags.AM_KILL, app.pid,
|
||||
app.processName, app.setAdj, "too many background");
|
||||
Process.killProcess(app.pid);
|
||||
if (!app.killedBackground) {
|
||||
numHidden++;
|
||||
if (numHidden > MAX_HIDDEN_APPS) {
|
||||
Slog.i(TAG, "Kill " + app.processName
|
||||
+ " (pid " + app.pid + "): hidden #" + numHidden
|
||||
+ " 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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user