summaryrefslogtreecommitdiff
path: root/tools/incident_section_gen
diff options
context:
space:
mode:
authorKweku Adams <kwekua@google.com>2018-04-16 16:54:24 -0700
committerKweku Adams <kwekua@google.com>2018-05-07 17:53:57 -0700
commit71a9531806d9d37f5482c4d242f95416c04715bf (patch)
tree8eff29e64b4d22ac886f1a48d8645f3bd8820dcd /tools/incident_section_gen
parent564942d0655e841fcb7c7dd7032f04b8fb45a111 (diff)
Adding batterystats history to proto dump.
It will only print out a dump for userdebug or eng builds. Bug: 77727638 Test: flash device and check output of incident proto and 'dumpsys batterystats -c --history' Merged-In: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74 Change-Id: Ia0c993d1281cc350d93f9c13f5540b349a4bfb84
Diffstat (limited to 'tools/incident_section_gen')
-rw-r--r--tools/incident_section_gen/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/incident_section_gen/main.cpp b/tools/incident_section_gen/main.cpp
index 3f9588acf827..4e202df3134e 100644
--- a/tools/incident_section_gen/main.cpp
+++ b/tools/incident_section_gen/main.cpp
@@ -14,13 +14,12 @@
* limitations under the License.
*/
-
#include <frameworks/base/core/proto/android/os/incident.pb.h>
#include <map>
#include <set>
-#include <string>
#include <sstream>
+#include <string>
using namespace android;
using namespace android::os;
@@ -422,7 +421,8 @@ static bool generateSectionListCpp(Descriptor const* descriptor) {
printf(" NULL),\n");
break;
case SECTION_DUMPSYS:
- printf(" new DumpsysSection(%d,", field->number());
+ printf(" new DumpsysSection(%d, \"%s\",", field->number(),
+ s.userdebug_and_eng_only() ? "true" : "false");
splitAndPrint(s.args());
printf(" NULL),\n");
break;