summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@google.com> 2013-09-23 13:00:23 -0700
committer Dianne Hackborn <hackbod@google.com> 2013-09-23 13:01:43 -0700
commit90007f7440d3bed04de01619da7506bed40ea171 (patch)
treeb0a2f983b41161582b19a649eea4ed901f880d70
parent4bf0fcef9296b53114e86490d79956986f8b93a6 (diff)
Fix issue #10876433: java.lang.IllegalStateException in...
...ActivityManagerService.updateLruProcessInternalLocked on bluetooth Don't try to move process records associated with dead service connections. Technically we should probably be clearing the binding/service's app entry so we don't get into this case, but the least intrusive change for now is this check. Change-Id: I6683e692eb5a8fa4f8ec1fa31bd63ec3d7f878ef
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index ee329fc892ea..808bf88996d7 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -2241,8 +2241,9 @@ public final class ActivityManagerService extends ActivityManagerNative
int lrui = mLruProcesses.lastIndexOf(app);
if (lrui < 0) {
- throw new IllegalStateException("Adding dependent process " + app
- + " not on LRU list: " + what + obj + " from " + srcApp);
+ Log.wtf(TAG, "Adding dependent process " + app + " not on LRU list: "
+ + what + " " + obj + " from " + srcApp);
+ return index;
}
if (lrui >= mLruProcessActivityStart) {
@@ -2307,7 +2308,7 @@ public final class ActivityManagerService extends ActivityManagerNative
// bump those processes as well.
for (int j=app.connections.size()-1; j>=0; j--) {
ConnectionRecord cr = app.connections.valueAt(j);
- if (cr.binding != null && cr.binding.service != null
+ if (cr.binding != null && !cr.serviceDead && cr.binding.service != null
&& cr.binding.service.app != null
&& cr.binding.service.app.lruSeq != mLruSeq) {
nextIndex = updateLruProcessInternalLocked(cr.binding.service.app, now, nextIndex,