Add BootIntegrityInfoReported

A new message is added because adding it to VBMetaDigestReported (as an
alternative) and renaming it can be tricky especially on the server
side.

Bug: 308471499
Test: build and write the message from system server
Change-Id: I86daf373676bd0206921413161ac9f2d18c2c0a8
diff --git a/stats/Android.bp b/stats/Android.bp
index 38bafaf..2f1eed3 100644
--- a/stats/Android.bp
+++ b/stats/Android.bp
@@ -161,6 +161,7 @@
     "atoms/sdksandbox/*.proto",
     "atoms/threadnetwork/*.proto",
     "atoms/automotive/carlauncher/*.proto",
+    "atoms/transparency/*.proto",
 ]
 
 cc_library_host_shared {
diff --git a/stats/atoms.proto b/stats/atoms.proto
index e4f9ca0..6a80459 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -1119,6 +1119,7 @@
     extensions 772; // ThermalStatusCalled thermal_status_called
     extensions 773; // ThermalHeadroomCalled thermal_headroom_called
     extensions 774; // ThermalHeadroomThresholdsCalled thermal_headroom_thresholds_called
+    extensions 775; // BootIntegrityInfoReported boot_integrity_info_reported
     extensions 9999; // Atom9999 atom_9999
     // StatsdStats tracks platform atoms with ids up to 900.
     // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
diff --git a/stats/atoms/transparency/boot_integrity_extension_atoms.proto b/stats/atoms/transparency/boot_integrity_extension_atoms.proto
new file mode 100644
index 0000000..b7ce3eb
--- /dev/null
+++ b/stats/atoms/transparency/boot_integrity_extension_atoms.proto
@@ -0,0 +1,30 @@
+syntax = "proto2";
+
+package android.os.statsd.transparency;
+
+import "frameworks/proto_logging/stats/atoms.proto";
+import "frameworks/proto_logging/stats/atom_field_options.proto";
+
+option java_package = "com.android.os.transparency";
+option java_multiple_files = true;
+
+extend Atom {
+    optional BootIntegrityInfoReported boot_integrity_info_reported = 775 [(module) = "framework"];
+}
+
+/**
+ * Boot integrity related information.
+ *
+ * * Sepolicy hash is calculated from /sys/fs/selinux/policy.
+ *
+ * Logs when boot is complete.
+ * Pushed from:
+ *    frameworks/base/services/core/java/com/android/server/BinaryTransparencyService.java
+ */
+message BootIntegrityInfoReported {
+    // the hex encoded string of sepolicy (from sysfs) hash
+    optional string sepolicy_hash = 1;
+    // the hex encoded string of VBMeta Digest value
+    optional string vbmeta_digest = 2;
+}
+