am 4bcdd6b0: am 90c6aec1: Merge "Fix issue #2619247: Music sometimes stops playing when navigation talks" into froyo
Merge commit '4bcdd6b0688735d7da0eb2a4f211b4b4c8911e3b' into kraken * commit '4bcdd6b0688735d7da0eb2a4f211b4b4c8911e3b': Fix issue #2619247: Music sometimes stops playing when navigation talks
This commit is contained in:
@@ -315,6 +315,11 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
// without empty apps being able to push them out of memory.
|
// without empty apps being able to push them out of memory.
|
||||||
static final int MIN_HIDDEN_APPS = 2;
|
static final int MIN_HIDDEN_APPS = 2;
|
||||||
|
|
||||||
|
// The maximum number of hidden processes we will keep around before
|
||||||
|
// killing them; this is just a control to not let us go too crazy with
|
||||||
|
// keeping around processes on devices with large amounts of RAM.
|
||||||
|
static final int MAX_HIDDEN_APPS = 15;
|
||||||
|
|
||||||
// We put empty content processes after any hidden processes that have
|
// We put empty content processes after any hidden processes that have
|
||||||
// been idle for less than 30 seconds.
|
// been idle for less than 30 seconds.
|
||||||
static final long CONTENT_APP_IDLE_OFFSET = 30*1000;
|
static final long CONTENT_APP_IDLE_OFFSET = 30*1000;
|
||||||
@@ -8488,8 +8493,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
}
|
}
|
||||||
int adj = proc.setAdj;
|
int adj = proc.setAdj;
|
||||||
if (adj >= worstType) {
|
if (adj >= worstType) {
|
||||||
Slog.w(TAG, "Killing " + reason + " : " + proc + " (adj "
|
Slog.w(TAG, "Killing " + proc + " (adj " + adj + "): " + reason);
|
||||||
+ adj + ")");
|
|
||||||
EventLog.writeEvent(EventLogTags.AM_KILL, proc.pid,
|
EventLog.writeEvent(EventLogTags.AM_KILL, proc.pid,
|
||||||
proc.processName, adj, reason);
|
proc.processName, adj, reason);
|
||||||
killed = true;
|
killed = true;
|
||||||
@@ -8904,9 +8908,10 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
}
|
}
|
||||||
if (app.pid > 0 && app.pid != MY_PID) {
|
if (app.pid > 0 && app.pid != MY_PID) {
|
||||||
handleAppCrashLocked(app);
|
handleAppCrashLocked(app);
|
||||||
Slog.i(ActivityManagerService.TAG, "Killing process "
|
Slog.i(ActivityManagerService.TAG, "Killing "
|
||||||
+ app.processName
|
+ app.processName + " (pid=" + app.pid + "): user's request");
|
||||||
+ " (pid=" + app.pid + ") at user's request");
|
EventLog.writeEvent(EventLogTags.AM_KILL, app.pid,
|
||||||
|
app.processName, app.setAdj, "user's request after error");
|
||||||
Process.killProcess(app.pid);
|
Process.killProcess(app.pid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10434,10 +10439,11 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
if (!capp.persistent && capp.thread != null
|
if (!capp.persistent && capp.thread != null
|
||||||
&& capp.pid != 0
|
&& capp.pid != 0
|
||||||
&& capp.pid != MY_PID) {
|
&& capp.pid != MY_PID) {
|
||||||
Slog.i(TAG, "Killing app " + capp.processName
|
Slog.i(TAG, "Kill " + capp.processName
|
||||||
+ " (pid " + capp.pid
|
+ " (pid " + capp.pid + "): provider " + cpr.info.name
|
||||||
+ ") because provider " + cpr.info.name
|
+ " in dying process " + proc.processName);
|
||||||
+ " is in dying process " + proc.processName);
|
EventLog.writeEvent(EventLogTags.AM_KILL, capp.pid,
|
||||||
|
capp.processName, capp.setAdj, "dying provider " + proc.processName);
|
||||||
Process.killProcess(capp.pid);
|
Process.killProcess(capp.pid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11522,6 +11528,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
if (r.isForeground) {
|
if (r.isForeground) {
|
||||||
r.isForeground = false;
|
r.isForeground = false;
|
||||||
if (r.app != null) {
|
if (r.app != null) {
|
||||||
|
updateLruProcessLocked(r.app, false, true);
|
||||||
updateServiceForegroundLocked(r.app, true);
|
updateServiceForegroundLocked(r.app, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14244,6 +14251,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
int factor = (mLruProcesses.size()-4)/numSlots;
|
int factor = (mLruProcesses.size()-4)/numSlots;
|
||||||
if (factor < 1) factor = 1;
|
if (factor < 1) factor = 1;
|
||||||
int step = 0;
|
int step = 0;
|
||||||
|
int numHidden = 0;
|
||||||
|
|
||||||
// First try updating the OOM adjustment for each of the
|
// First try updating the OOM adjustment for each of the
|
||||||
// application processes based on their current state.
|
// application processes based on their current state.
|
||||||
@@ -14262,6 +14270,17 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
curHiddenAdj++;
|
curHiddenAdj++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
didOomAdj = false;
|
didOomAdj = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user