Hook IDumpstateDevice 1.1 up to dumpstate binary.

Bug reports will now prefer v1.1 of the HAL since it supports
well-scoped modes that mirror BugreportManager. For new devices
launching with R, v1.1 must be supported if this (optional) HAL is
implemented. It's also fairly trivial to update existing devices to 1.1
if an OEM chooses.

As for what this means, bug reports will:
- Be smaller in many cases, and as a result, faster to collect
- Contain less unnecessary PII (e.g. camera logs should now be excluded
    for MODE_TELEPHONY)

There's still some minor cleanup to be done, but for now leaving TODOs.

Bug: 143183758
Bug: 143184495
Test: atest dumpstate_test
Test: take bug report on Cuttlefish and Blueline, check for v1.1 usage
Change-Id: I1660ff3983931fdeed51c85f2342700c89a012aa
diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h
index 7d9b113..111c098 100644
--- a/cmds/dumpstate/dumpstate.h
+++ b/cmds/dumpstate/dumpstate.h
@@ -27,6 +27,7 @@
 
 #include <android-base/macros.h>
 #include <android-base/unique_fd.h>
+#include <android/hardware/dumpstate/1.1/types.h>
 #include <android/os/BnIncidentAuthListener.h>
 #include <android/os/IDumpstate.h>
 #include <android/os/IDumpstateListener.h>
@@ -366,6 +367,11 @@
         bool wifi_only = false;
         // Whether progress updates should be published.
         bool do_progress_updates = false;
+        // The mode we'll use when calling IDumpstateDevice::dumpstateBoard.
+        // TODO(b/148168577) get rid of the AIDL values, replace them with the HAL values instead.
+        // The HAL is actually an API surface that can be validated, while the AIDL is not (@hide).
+        ::android::hardware::dumpstate::V1_1::DumpstateMode dumpstate_hal_mode =
+            ::android::hardware::dumpstate::V1_1::DumpstateMode::DEFAULT;
         // File descriptor to output zip file.
         android::base::unique_fd bugreport_fd;
         // File descriptor to screenshot file.