summaryrefslogtreecommitdiffstats
path: root/services/core/java/com/android/server/am/ActivityManagerService.java
diff options
context:
space:
mode:
authorTobias Lindskog <tobias.lindskog@sonymobile.com>2015-02-03 11:45:58 +0100
committerSteve Kondik <steve@cyngn.com>2015-11-07 05:40:45 -0800
commitc8b36677ee6533443e99a0d9b3f42674a6d13da7 (patch)
tree62ab9ad532c13b6792e8c18a02e6a772850e4332 /services/core/java/com/android/server/am/ActivityManagerService.java
parentebf5eee5de8c426b2c22404e100f4e215afd7456 (diff)
downloadframeworks_base-c8b36677ee6533443e99a0d9b3f42674a6d13da7.zip
frameworks_base-c8b36677ee6533443e99a0d9b3f42674a6d13da7.tar.gz
frameworks_base-c8b36677ee6533443e99a0d9b3f42674a6d13da7.tar.bz2
Skip ANR for processes that have been killed
If a controller is attached and decides to kill a process after an ANR, other ANR reports for that app that are queued up won't be handled until after the app has died. This can create a report without the relevant callstacks because the app is dead by the time the traces are dumped. Since the trace file is global, the traces recorded for the first ANR are overwritten, leaving us with no clue as to what happened. After the app has been killedByAm, it is not interesting to handle ANRs for that app until it is started again, so killedByAm can be used to filter out these spurious reports. Change-Id: I34ba790f6d29d563c819dc2f6ac71a3c8955bb76
Diffstat (limited to 'services/core/java/com/android/server/am/ActivityManagerService.java')
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 4070a2c..74fbe74 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -5089,6 +5089,9 @@ public final class ActivityManagerService extends ActivityManagerNative
} else if (app.crashing) {
Slog.i(TAG, "Crashing app skipping ANR: " + app + " " + annotation);
return;
+ } else if (app.killedByAm) {
+ Slog.i(TAG, "App already killed by AM skipping ANR: " + app + " " + annotation);
+ return;
}
// In case we come through here for the same app before completing