summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author riddle_hsu <riddle_hsu@htc.com> 2014-07-31 00:15:05 +0800
committer Craig Mautner <cmautner@google.com> 2014-07-31 10:18:59 -0700
commit214be42ea690ee99e1b404844afbe2c138447b59 (patch)
treed9f0f5187a1612d043eb5af6e934fe1760050f91
parentebbbb2cfc38c3a6b800ea28e52a2086fbcbba78f (diff)
[ActivityManager] Prevent coredump file may not complete for testing.
Cherry-pick from aosp to lmp-dev Sympton: During testing, skip kill native crash process manually because it will continue to die by default. Root Cause: Large process may take some time to do coredump.In auto test, crash process will be killed immediately that results incomplete coredump file. Solution: If the tester (IActivityController) will handle app crash event, Do not kill native crashed process if the rom is debuggable. Change-Id: Ia360af147d694125d440e5ba2f958c4759a50494 Conflicts: services/java/com/android/server/am/ActivityManagerService.java
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index cfdf7cfd6db0..1ae0bbcf3ae8 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -10966,11 +10966,17 @@ public final class ActivityManagerService extends ActivityManagerNative
int uid = r != null ? r.info.uid : Binder.getCallingUid();
if (!mController.appCrashed(name, pid,
shortMsg, longMsg, timeMillis, crashInfo.stackTrace)) {
- Slog.w(TAG, "Force-killing crashed app " + name
- + " at watcher's request");
- Process.killProcess(pid);
- if (r != null) {
- Process.killProcessGroup(uid, pid);
+ if ("1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"))
+ && "Native crash".equals(crashInfo.exceptionClassName)) {
+ Slog.w(TAG, "Skip killing native crashed app " + name
+ + "(" + pid + ") during testing");
+ } else {
+ Slog.w(TAG, "Force-killing crashed app " + name
+ + " at watcher's request");
+ Process.killProcess(pid);
+ if (r != null) {
+ Process.killProcessGroup(uid, pid);
+ }
}
return;
}