summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-09-26 11:39:20 -0700
committerDianne Hackborn <hackbod@google.com>2012-09-26 14:50:12 -0700
commitb12e1354f25f04e9c9a71da76c6fca858b7d39d0 (patch)
tree3568c1a0ce0a3348fbfcb4d5773140f26f630f80 /cmds
parent2fd6cb043901c1bfbf5f566d13522cc3c1c21fb4 (diff)
downloadframeworks_base-b12e1354f25f04e9c9a71da76c6fca858b7d39d0.zip
frameworks_base-b12e1354f25f04e9c9a71da76c6fca858b7d39d0.tar.gz
frameworks_base-b12e1354f25f04e9c9a71da76c6fca858b7d39d0.tar.bz2
Maybe fix issue #7211766: bindService() to User u0 While u10 is...
...Forground Sometimes Doesn't Take The main change here is a one-liner in ActiveServices to check the uid when deciding whether to remove an item from mPendingServices. This could cause the problem being seen -- if the same service for two users is starting at the same time, the second one would blow away the pending start of the first one. Unfortunately I have had trouble reproducing the bug, so I don't know if this is actually fixing it. It's a bug, anyway. The reason so much has changed here is because I spread around logging and printing of the user ID associated with operations and objects to make it easier to debug these kind of multi-user things. Also includes some tweaks to the oom manager to allow more background processes (I have seen many times in logs where we thrash through processes because the LRU list is too short), plus to compensate an additional time-based metric for when to get rid of background processes, plus some new logic to try to help things like Chrome keep around their service processes. Change-Id: Icda77fb2a1dd349969e3ff2c8fff0f19b40b31d3
Diffstat (limited to 'cmds')
-rw-r--r--cmds/am/src/com/android/commands/am/Am.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index bc9e74e..396b32f 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -804,8 +804,9 @@ public class Am {
ParcelFileDescriptor fd = null;
try {
- fd = ParcelFileDescriptor.open(
- new File(heapFile),
+ File file = new File(heapFile);
+ file.delete();
+ fd = ParcelFileDescriptor.open(file,
ParcelFileDescriptor.MODE_CREATE |
ParcelFileDescriptor.MODE_TRUNCATE |
ParcelFileDescriptor.MODE_READ_WRITE);