summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wale Ogunwale <ogunwale@google.com> 2015-04-08 14:33:21 -0700
committer Wale Ogunwale <ogunwale@google.com> 2015-04-08 16:01:24 -0700
commitbfac468ce907643eda50afa28f25538b9182e65e (patch)
tree836aae2c601c30c10aad5ccf11befad2939d8a32
parent0c43e55d2dc44f181c6f99d7d7b35ab9bfea93a0 (diff)
Throw caught DeadObjectException when trying to create a service.
We don't want to continue trying to start the service if the service appliction is dead. This will lead to an NPE later on since we have set ServiceRecord.app to null in the finally block. Bug: 5227987 Change-Id: I3ee5111f4a20d9455fedbf41ac54d41c43aa8d76
-rwxr-xr-xservices/core/java/com/android/server/am/ActiveServices.java1
-rw-r--r--services/core/java/com/android/server/am/BroadcastQueue.java2
2 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index e92443cf9109..3dece494c2d3 100755
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -1519,6 +1519,7 @@ public final class ActiveServices {
} catch (DeadObjectException e) {
Slog.w(TAG, "Application dead when creating service " + r);
mAm.appDiedLocked(app);
+ throw e;
} finally {
if (!created) {
// Keep the executeNesting count accurate.
diff --git a/services/core/java/com/android/server/am/BroadcastQueue.java b/services/core/java/com/android/server/am/BroadcastQueue.java
index 34c1c5393195..5b5ebef46e1f 100644
--- a/services/core/java/com/android/server/am/BroadcastQueue.java
+++ b/services/core/java/com/android/server/am/BroadcastQueue.java
@@ -50,7 +50,7 @@ import static com.android.server.am.ActivityManagerDebugConfig.*;
* foreground priority, and one for normal (background-priority) broadcasts.
*/
public final class BroadcastQueue {
- private static final String TAG = TAG_WITH_CLASS_NAME ? "BroadcastQueue" : TAG_AM;
+ private static final String TAG = "BroadcastQueue";
private static final String TAG_MU = TAG + POSTFIX_MU;
private static final String TAG_BROADCAST = TAG + POSTFIX_BROADCAST;