Add a section flag to bypass failure if a specific path can't be found.

This is a temporary solution to bypass failure of reading cpu info or 
battery type in P if the path doesn't exist on some devices. See bug for
details. However in Q, incidentd should implement reading from the
common Linux kernel interfaces.

Bug: 78028767
Bug: 78239764
Test: atest incidentd_test
Change-Id: I08ffcb21709efe5478d2ac46121deb5795af1024
Merged-In: I08ffcb21709efe5478d2ac46121deb5795af1024
diff --git a/tools/incident_section_gen/main.cpp b/tools/incident_section_gen/main.cpp
index a274a8c..3f9588a 100644
--- a/tools/incident_section_gen/main.cpp
+++ b/tools/incident_section_gen/main.cpp
@@ -413,7 +413,8 @@
             case SECTION_NONE:
                 continue;
             case SECTION_FILE:
-                printf("    new FileSection(%d, \"%s\"),\n", field->number(), s.args().c_str());
+                printf("    new FileSection(%d, \"%s\", %s),\n", field->number(), s.args().c_str(),
+                       s.device_specific() ? "true" : "false");
                 break;
             case SECTION_COMMAND:
                 printf("    new CommandSection(%d,", field->number());