From 443d35a0013ef878568045bdd26e996718137944 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Fri, 16 Jun 2017 17:59:35 -0700 Subject: [PATCH] Maybe fix issue #62199092: Alarm didn't ring, upcoming alarm... ...notification was stuck Don't deliver to a ProcessRecord that has been killed, instead go through creating a new process. Test: manual Change-Id: I74eb0843200b5b99d6496e4b3f6eef5ed38c926e --- .../core/java/com/android/server/am/BroadcastQueue.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/am/BroadcastQueue.java b/services/core/java/com/android/server/am/BroadcastQueue.java index 639b7a9119982..b3a2c291760cb 100644 --- a/services/core/java/com/android/server/am/BroadcastQueue.java +++ b/services/core/java/com/android/server/am/BroadcastQueue.java @@ -614,9 +614,10 @@ public final class BroadcastQueue { skip = true; } - if (!skip && (filter.receiverList.app == null || filter.receiverList.app.crashing)) { + if (!skip && (filter.receiverList.app == null || filter.receiverList.app.killed + || filter.receiverList.app.crashing)) { Slog.w(TAG, "Skipping deliver [" + mQueueName + "] " + r - + " to " + filter.receiverList + ": process crashing"); + + " to " + filter.receiverList + ": process gone or crashing"); skip = true; } @@ -1317,7 +1318,7 @@ public final class BroadcastQueue { } // Is this receiver's application already running? - if (app != null && app.thread != null) { + if (app != null && app.thread != null && !app.killed) { try { app.addPackage(info.activityInfo.packageName, info.activityInfo.applicationInfo.versionCode, mService.mProcessStats);