Minor IDumpstateDevice 1.1 method rename.

The old logic of "all or nothing" was breaking some existing Pixel use
cases, so we instead change the meaning of the toggle to be "verbose",
specifically anything with privacy, storage, or battery impact.

Bug: 143183758
Bug: 143184495
Test: atest VtsHalDumpstateV1_1TargetTest
Change-Id: I73be682c76e24c9e92e28f7a60f2219eb75de06b
Merged-In: I73be682c76e24c9e92e28f7a60f2219eb75de06b
(cherry picked from commit 4ffc92766a90135fa8bb930515d881a3d2694ba0)
diff --git a/guest/monitoring/dumpstate_ext/dumpstate_device.cpp b/guest/monitoring/dumpstate_ext/dumpstate_device.cpp
index ca7d9b7..f1d7a43 100644
--- a/guest/monitoring/dumpstate_ext/dumpstate_device.cpp
+++ b/guest/monitoring/dumpstate_ext/dumpstate_device.cpp
@@ -19,7 +19,7 @@
 #include <android-base/properties.h>
 #include <log/log.h>
 
-#define DEVICE_LOGGING_PROPERTY "persist.vendor.logging_enabled"
+#define VERBOSE_LOGGING_PROPERTY "persist.vendor.verbose_logging_enabled"
 
 using android::os::dumpstate::DumpFileToFd;
 
@@ -72,22 +72,20 @@
     return DumpstateStatus::UNSUPPORTED_MODE;
   }
 
-  if (!::android::base::GetBoolProperty(DEVICE_LOGGING_PROPERTY, false)) {
-    return DumpstateStatus::DEVICE_LOGGING_NOT_ENABLED;
-  }
-
   DumpFileToFd(fd, "GCE INITIAL METADATA", "/initial.metadata");
 
+  // Do not include any of the user's private information before checking if verbose logging is
+  // enabled.
   return DumpstateStatus::OK;
 }
 
-Return<void> DumpstateDevice::setDeviceLoggingEnabled(bool enable) {
-  ::android::base::SetProperty(DEVICE_LOGGING_PROPERTY, enable ? "true" : "false");
+Return<void> DumpstateDevice::setVerboseLoggingEnabled(bool enable) {
+  ::android::base::SetProperty(VERBOSE_LOGGING_PROPERTY, enable ? "true" : "false");
   return Void();
 }
 
-Return<bool> DumpstateDevice::getDeviceLoggingEnabled() {
-  return ::android::base::GetBoolProperty(DEVICE_LOGGING_PROPERTY, false);
+Return<bool> DumpstateDevice::getVerboseLoggingEnabled() {
+  return ::android::base::GetBoolProperty(VERBOSE_LOGGING_PROPERTY, false);
 }
 
 }  // namespace implementation
diff --git a/guest/monitoring/dumpstate_ext/dumpstate_device.h b/guest/monitoring/dumpstate_ext/dumpstate_device.h
index 4b97d84..e7c5fea 100644
--- a/guest/monitoring/dumpstate_ext/dumpstate_device.h
+++ b/guest/monitoring/dumpstate_ext/dumpstate_device.h
@@ -45,8 +45,8 @@
   Return<DumpstateStatus> dumpstateBoard_1_1(const hidl_handle& h,
                                              DumpstateMode mode,
                                              uint64_t timeoutMillis) override;
-  Return<void> setDeviceLoggingEnabled(bool enable) override;
-  Return<bool> getDeviceLoggingEnabled() override;
+  Return<void> setVerboseLoggingEnabled(bool enable) override;
+  Return<bool> getVerboseLoggingEnabled() override;
 };
 
 }  // namespace implementation
diff --git a/shared/sepolicy/vendor/property_contexts b/shared/sepolicy/vendor/property_contexts
index 5aacb9c..d137d65 100644
--- a/shared/sepolicy/vendor/property_contexts
+++ b/shared/sepolicy/vendor/property_contexts
@@ -1,6 +1,6 @@
 bt.rootcanal_mac_address  u:object_r:hal_bluetooth_sim_prop:s0
 bt.rootcanal_test_console  u:object_r:hal_bluetooth_sim_prop:s0
-persist.vendor.logging_enabled  u:object_r:hal_dumpstate_prop:s0
+persist.vendor.verbose_logging_enabled  u:object_r:hal_dumpstate_prop:s0
 qemu.sf.back_camera_caps  u:object_r:hal_camera_prop:s0
 qemu.sf.front_camera_caps  u:object_r:hal_camera_prop:s0
 qemu.sf.fake_camera  u:object_r:hal_camera_prop:s0