dumpstate: Log an error when we fail to start a dump thread
Test: adb shell dumpstate && adb logcat | grep "Failed to start"
Bug: 273937310
Change-Id: Iaf56795a211090f631a21a9c4f61353be5bc8741
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 47a513b..6bd4dea 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -1270,6 +1270,9 @@
dumpsys.writeDumpFooter(STDOUT_FILENO, service, elapsed_seconds);
bool dump_complete = (status == OK);
dumpsys.stopDumpThread(dump_complete);
+ } else {
+ MYLOGE("Failed to start dump thread for service: %s, status: %d",
+ String8(service).c_str(), status);
}
}