Merge "[AM] Skip unnessary ANR when process already died." am: 831a4aea1e am: 57341808f1 am: 7aafc81c2e
am: 8b4da0ee04

Change-Id: I1e5c79a6e332a4b72022a850ab8dd5f5182a1bca
diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
index 337fcec21..c19a571 100644
--- a/services/core/java/com/android/server/am/AppErrors.java
+++ b/services/core/java/com/android/server/am/AppErrors.java
@@ -771,6 +771,9 @@
             } else if (app.killedByAm) {
                 Slog.i(TAG, "App already killed by AM skipping ANR: " + app + " " + annotation);
                 return;
+            } else if (app.killed) {
+                Slog.i(TAG, "Skipping died app ANR: " + app + " " + annotation);
+                return;
             }
 
             // In case we come through here for the same app before completing