Add batterystats -c data to telephony bugreports

Telephony bugreports currently capture 'dumpsys batterystats' output,
but only in its human-friendly format.  While humans may enjoy that
format, Historian does not, and fails to properly load telephony
bugreports (including those triggered by LowPowerMonitor) as a result.
This makes it essentially impossible to use Historian when triaging/
analyzing telephony-style bugreports.

To enable Historian processing of telephony bugreports, this change adds
the 'checkin' format ("dumpsys batterystats -c") data along with the
existing entries.

ABT (Android Bug Tool) still doesn't properly list dumpsys sections in
its UI even with this change, but I think nothing short of a full,
comprehensive dumpsys run will make ABT happy.  And that's okay, because
all of the text content can still be navigated manually.

Bug: 111763716
Test: Triggered telephony bugreports within and without the change on a
device, manually verified that the checkin format data was
present with the code change in place, and loaded the bugreport into
Historian successfully.

Merged-In: Iba434bfd219c627cd3c058e549a627947d9ce501
Change-Id: Iba434bfd219c627cd3c058e549a627947d9ce501
(cherry picked from commit bbd6fdb674a9aa04fe2e3f1dd01a8be437d8e92b)
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 6cfdb2b..3e12ed5 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -1466,6 +1466,12 @@
             DUMPSYS_COMPONENTS_OPTIONS);
 
     printf("========================================================\n");
+    printf("== Checkins\n");
+    printf("========================================================\n");
+
+    RunDumpsys("CHECKIN BATTERYSTATS", {"batterystats", "-c"});
+
+    printf("========================================================\n");
     printf("== dumpstate: done (id %d)\n", ds.id_);
     printf("========================================================\n");
 }