Add atom for brightness configuration and ambient light.

Test: statsd_testdrive
Bug: 250876737, 243369305

Also cherry-pick of I06ab9ad0923bc690f8f4fcad151c4f6634c40896

Change-Id: I37d8a88ff892b19fc3e08946bb4fb605e6f25e89
(cherry picked from commit 1361e78b994b4880d0ef0712ab7709b3e876e4e0)
Merged-in: I37d8a88ff892b19fc3e08946bb4fb605e6f25e89
Merged-in: I06ab9ad0923bc690f8f4fcad151c4f6634c40896
diff --git a/stats/atoms.proto b/stats/atoms.proto
index ed032df..6086ec2 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -716,6 +716,7 @@
         // reserved 492
         DisplayBrightnessChanged display_brightness_changed = 494 [(module) = "framework"];
         ActivityActionBlocked activity_action_blocked = 495 [(module) = "framework"];
+        AmbientBrightnessStatsReported ambient_brightness_stats_reported = 507 [(module) = "framework"];
         MediametricsSpatializerCapabilitiesReported mediametrics_spatializercapabilities_reported = 508;
         MediametricsSpatializerDeviceEnabledReported mediametrics_spatializerdeviceenabled_reported = 509;
         MediametricsHeadTrackerDeviceEnabledReported mediametrics_headtrackerdeviceenabled_reported = 510;
@@ -730,6 +731,7 @@
         BluetoothLocalSupportedFeaturesReported bluetooth_local_supported_features_reported = 532 [(module) = "bluetooth"];
         BluetoothGattAppInfo bluetooth_gatt_app_info = 533 [(module) = "bluetooth"];
         LauncherImpressionEvent launcher_impression_event = 547 [(module) = "sysui"];
+        BrightnessConfigurationUpdated brightness_configuration_updated = 534 [(module) = "framework"];
         // StatsdStats tracks platform atoms with ids upto 750.
         // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
     }
@@ -21734,3 +21736,32 @@
     }
     optional BondEntry bond_entry = 3;
 }
+
+// Logs daily ambient brightness stats.
+message AmbientBrightnessStatsReported {
+
+    // How much time was spent in each of the buckets, in seconds.
+    repeated float bucket_size_seconds = 1;
+
+    // Ambient brightness values for creating bucket boundaries from.
+    repeated float bucket_boundary_lux = 2;
+}
+
+/**
+ * Logs the Brightness Configuration pushed by the long term model. The Brightness Configuration is
+ * expressed as a curve where each point is a pair of ambient light (lux) and the corresponding
+ * screen brightness (nits).
+ *
+ * Logged from:
+ *    frameworks/base/services/core/java/com/android/server/display/DisplayManagerService.java
+ */
+message BrightnessConfigurationUpdated {
+    // Array of ambient light values (in lux) to define the configuration.
+    repeated float lux = 1;
+    // Array of screen brightness values (in nits) corresponding to the lux
+    // values above.
+    repeated float nits = 2;
+    // Physical display id, with format $ADAPTER_PREFIX:$ID, in this case
+    // "local:$PHYSICAL_ID".
+    optional string physical_display_id = 3;
+}