diff options
author | Wale Ogunwale <ogunwale@google.com> | 2015-03-09 10:18:51 -0700 |
---|---|---|
committer | Wale Ogunwale <ogunwale@google.com> | 2015-03-09 10:37:04 -0700 |
commit | 3c36b8e9569292b7da9a916b148a21dd6c273dc9 (patch) | |
tree | 0f7be3f8a8f228d179e14a8574e62a2f6fa34474 /services | |
parent | 93891686eb28f8c0da6545d277965e4db50d5065 (diff) | |
parent | ca54b8765776cb1d1f5c2b87ca046ca64b9386ad (diff) | |
download | frameworks_base-3c36b8e9569292b7da9a916b148a21dd6c273dc9.zip frameworks_base-3c36b8e9569292b7da9a916b148a21dd6c273dc9.tar.gz frameworks_base-3c36b8e9569292b7da9a916b148a21dd6c273dc9.tar.bz2 |
resolved conflicts for merge of ca54b876 to master
Change-Id: I3148551b9809fb5c36007b26f26acf812b2f654d
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/am/BroadcastQueue.java | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/services/core/java/com/android/server/am/BroadcastQueue.java b/services/core/java/com/android/server/am/BroadcastQueue.java index 7a29a88..8fe1238 100644 --- a/services/core/java/com/android/server/am/BroadcastQueue.java +++ b/services/core/java/com/android/server/am/BroadcastQueue.java @@ -305,17 +305,16 @@ public final class BroadcastQueue { r.resultExtras, r.resultAbort, false); reschedule = true; } - - r = mPendingBroadcast; - if (r != null && r.curApp == app) { + if (r == null && mPendingBroadcast != null && mPendingBroadcast.curApp == app) { if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, "[" + mQueueName + "] skip & discard pending app " + r); + r = mPendingBroadcast; + } + + if (r != null) { logBroadcastReceiverDiscardLocked(r); finishReceiverLocked(r, r.resultCode, r.resultData, r.resultExtras, r.resultAbort, false); - reschedule = true; - } - if (reschedule) { scheduleBroadcastsLocked(); } } @@ -512,10 +511,11 @@ public final class BroadcastQueue { } } try { - if (DEBUG_BROADCAST_LIGHT) Slog.i(TAG_BROADCAST, "Delivering to " + filter + " : " + r); + if (DEBUG_BROADCAST_LIGHT) Slog.i(TAG_BROADCAST, + "Delivering to " + filter + " : " + r); performReceiveLocked(filter.receiverList.app, filter.receiverList.receiver, - new Intent(r.intent), r.resultCode, r.resultData, - r.resultExtras, r.ordered, r.initialSticky, r.userId); + new Intent(r.intent), r.resultCode, r.resultData, + r.resultExtras, r.ordered, r.initialSticky, r.userId); if (ordered) { r.state = BroadcastRecord.CALL_DONE_RECEIVE; } @@ -574,11 +574,9 @@ public final class BroadcastQueue { // broadcast, then do nothing at this point. Just in case, we // check that the process we're waiting for still exists. if (mPendingBroadcast != null) { - if (DEBUG_BROADCAST_LIGHT) { - Slog.v(TAG_BROADCAST, "processNextBroadcast [" - + mQueueName + "]: waiting for " - + mPendingBroadcast.curApp); - } + if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG_BROADCAST, + "processNextBroadcast [" + mQueueName + "]: waiting for " + + mPendingBroadcast.curApp); boolean isDead; synchronized (mService.mPidsSelfLocked) { @@ -677,8 +675,8 @@ public final class BroadcastQueue { if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, "Cancelling BROADCAST_TIMEOUT_MSG"); cancelBroadcastTimeoutLocked(); - if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG_BROADCAST, "Finished with ordered broadcast " - + r); + if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG_BROADCAST, + "Finished with ordered broadcast " + r); // ... and on to the next... addBroadcastToHistoryLocked(r); @@ -834,19 +832,18 @@ public final class BroadcastQueue { + info.activityInfo.packageName, e); } if (!isAvailable) { - if (DEBUG_BROADCAST) { - Slog.v(TAG_BROADCAST, "Skipping delivery to " + info.activityInfo.packageName - + " / " + info.activityInfo.applicationInfo.uid - + " : package no longer available"); - } + if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, + "Skipping delivery to " + info.activityInfo.packageName + " / " + + info.activityInfo.applicationInfo.uid + + " : package no longer available"); skip = true; } } if (skip) { if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, - "Skipping delivery of ordered [" - + mQueueName + "] " + r + " for whatever reason"); + "Skipping delivery of ordered [" + mQueueName + "] " + + r + " for whatever reason"); r.receiver = null; r.curFilter = null; r.state = BroadcastRecord.IDLE; |