summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-03-06 10:52:05 -0800
committerDianne Hackborn <hackbod@google.com>2014-03-06 10:52:05 -0800
commit52f610d248e53444fe27ed695ed9d412567c90f1 (patch)
tree76d10e0e951e9019e6587b32665c196f40be378f /services/java
parent71ab245a0d7830791cb89ec9130313620a1ee029 (diff)
downloadframeworks_base-52f610d248e53444fe27ed695ed9d412567c90f1.zip
frameworks_base-52f610d248e53444fe27ed695ed9d412567c90f1.tar.gz
frameworks_base-52f610d248e53444fe27ed695ed9d412567c90f1.tar.bz2
Fix issue #13199860: PRE_BOOT_COMPLETED intent is...
...broadcasted repeatedly at every boot time Remember the last done pre-boot receivers, so that if we have a new pre boot receiver appearing (without the platform version changing), when we re-write the file of done receivers it will contain all of them, not just the new one. Change-Id: I4ed3478edc549d4b023ec4b3719111bc4d970ae4
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 2cf0ece..e2050fc 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -9225,8 +9225,13 @@ public final class ActivityManagerService extends ActivityManagerNative
ActivityInfo ai = ris.get(i).activityInfo;
ComponentName comp = new ComponentName(ai.packageName, ai.name);
if (lastDoneReceivers.contains(comp)) {
+ // We already did the pre boot receiver for this app with the current
+ // platform version, so don't do it again...
ris.remove(i);
i--;
+ // ...however, do keep it as one that has been done, so we don't
+ // forget about it when rewriting the file of last done receivers.
+ doneReceivers.add(comp);
}
}