Dump the phone process stack (as well as the system process) on watchdog reset.

Change-Id: I3c47086f9cc010f524da7de539942ea30d0338e3
This commit is contained in:
Dan Egnor
2010-03-11 22:00:47 -08:00
parent 4ea833d9a2
commit 4bded0744a

View File

@@ -828,7 +828,13 @@ public class Watchdog extends Thread {
ArrayList pids = new ArrayList();
pids.add(Process.myPid());
if (mPhonePid > 0) pids.add(mPhonePid);
File stack = ActivityManagerService.dumpStackTraces(pids);
// Give some extra time to make sure the stack traces get written.
// The system's been hanging for a minute, another second or two won't hurt much.
SystemClock.sleep(2000);
mActivity.addErrorToDropBox("watchdog", null, null, null, name, null, stack, null);
// Only kill the process if the debugger is not attached.