summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2013-10-04 11:11:44 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-04 11:11:44 -0700
commit0b5e0da80b7f31bc58a19dd22ee4132ac5e50be6 (patch)
treedc820fc9b6a0270d54a9fa0b9d9ba3e08dc3e20c /services
parentb0215287a805d548f509c318f1313501acd9b455 (diff)
parent4ad5e888d4fb983dedb2712361e53564a4820b66 (diff)
downloadframeworks_base-0b5e0da80b7f31bc58a19dd22ee4132ac5e50be6.zip
frameworks_base-0b5e0da80b7f31bc58a19dd22ee4132ac5e50be6.tar.gz
frameworks_base-0b5e0da80b7f31bc58a19dd22ee4132ac5e50be6.tar.bz2
am 4ad5e888: am 0f92dde3: am ae7b22d6: Merge "Fix issue #10901205: Shouldn\'t send broadcasts (or try to bind services, etc.)..." into klp-dev
* commit '4ad5e888d4fb983dedb2712361e53564a4820b66': Fix issue #10901205: Shouldn't send broadcasts (or try to bind services, etc.)...
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/am/BroadcastQueue.java18
-rw-r--r--services/java/com/android/server/am/ProcessRecord.java2
2 files changed, 12 insertions, 8 deletions
diff --git a/services/java/com/android/server/am/BroadcastQueue.java b/services/java/com/android/server/am/BroadcastQueue.java
index b2e3ce7..1d6970f 100644
--- a/services/java/com/android/server/am/BroadcastQueue.java
+++ b/services/java/com/android/server/am/BroadcastQueue.java
@@ -470,6 +470,12 @@ public final class BroadcastQueue {
r.callingPid, r.resolvedType, filter.receiverList.uid);
}
+ if (filter.receiverList.app == null || filter.receiverList.app.crashing) {
+ Slog.w(TAG, "Skipping deliver [" + mQueueName + "] " + r
+ + " to " + filter.receiverList + ": process crashing");
+ skip = true;
+ }
+
if (!skip) {
// If this is not being sent as an ordered broadcast, then we
// don't want to touch the fields that keep track of the current
@@ -565,8 +571,8 @@ public final class BroadcastQueue {
boolean isDead;
synchronized (mService.mPidsSelfLocked) {
- isDead = (mService.mPidsSelfLocked.get(
- mPendingBroadcast.curApp.pid) == null);
+ ProcessRecord proc = mService.mPidsSelfLocked.get(mPendingBroadcast.curApp.pid);
+ isDead = proc == null || proc.crashing;
}
if (!isDead) {
// It's still alive, so keep waiting
@@ -650,7 +656,7 @@ public final class BroadcastQueue {
new Intent(r.intent), r.resultCode,
r.resultData, r.resultExtras, false, false, r.userId);
// Set this to null so that the reference
- // (local and remote) isnt kept in the mBroadcastHistory.
+ // (local and remote) isn't kept in the mBroadcastHistory.
r.resultTo = null;
} catch (RemoteException e) {
Slog.w(TAG, "Failure ["
@@ -803,10 +809,8 @@ public final class BroadcastQueue {
}
if (r.curApp != null && r.curApp.crashing) {
// If the target process is crashing, just skip it.
- if (DEBUG_BROADCAST) Slog.v(TAG,
- "Skipping deliver ordered ["
- + mQueueName + "] " + r + " to " + r.curApp
- + ": process crashing");
+ Slog.w(TAG, "Skipping deliver ordered [" + mQueueName + "] " + r
+ + " to " + r.curApp + ": process crashing");
skip = true;
}
diff --git a/services/java/com/android/server/am/ProcessRecord.java b/services/java/com/android/server/am/ProcessRecord.java
index 4b62e7d..486e916 100644
--- a/services/java/com/android/server/am/ProcessRecord.java
+++ b/services/java/com/android/server/am/ProcessRecord.java
@@ -98,7 +98,7 @@ final class ProcessRecord {
boolean bad; // True if disabled in the bad process list
boolean killedByAm; // True when proc has been killed by activity manager, not for RAM
boolean procStateChanged; // Keep track of whether we changed 'setAdj'.
- String waitingToKill; // Process is waiting to be killed when in the bg; reason
+ String waitingToKill; // Process is waiting to be killed when in the bg, and reason
IBinder forcingToForeground;// Token that is forcing this process to be foreground
int adjSeq; // Sequence id for identifying oom_adj assignment cycles
int lruSeq; // Sequence id for identifying LRU update cycles