Merge "Null check for early watchdog-caught thread hangs" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f4c2cb6830
@@ -617,9 +617,13 @@ public class Watchdog extends Thread {
|
|||||||
// deadlock and the watchdog as a whole to be ineffective)
|
// deadlock and the watchdog as a whole to be ineffective)
|
||||||
Thread dropboxThread = new Thread("watchdogWriteToDropbox") {
|
Thread dropboxThread = new Thread("watchdogWriteToDropbox") {
|
||||||
public void run() {
|
public void run() {
|
||||||
mActivity.addErrorToDropBox(
|
// If a watched thread hangs before init() is called, we don't have a
|
||||||
"watchdog", null, "system_server", null, null, null,
|
// valid mActivity. So we can't log the error to dropbox.
|
||||||
subject, null, stack, null);
|
if (mActivity != null) {
|
||||||
|
mActivity.addErrorToDropBox(
|
||||||
|
"watchdog", null, "system_server", null, null, null,
|
||||||
|
subject, null, stack, null);
|
||||||
|
}
|
||||||
StatsLog.write(StatsLog.SYSTEM_SERVER_WATCHDOG_OCCURRED, subject);
|
StatsLog.write(StatsLog.SYSTEM_SERVER_WATCHDOG_OCCURRED, subject);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user