Add atom for Wifi Wake metric
Bug: 285445594
Test: TH
Change-Id: I890b4aff4cf847db4e1a4bd48cc608c12b3d2479
Merged-In: I890b4aff4cf847db4e1a4bd48cc608c12b3d2479
(cherry picked from commit 2700d0bf76bb570519e0917d5cf1d7aaef44700e)
diff --git a/stats/atoms.proto b/stats/atoms.proto
index 89dfc0c..a0a6836 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -1035,6 +1035,7 @@
extensions 693; // WifiLocalOnlyRequestScanTriggered wifi_local_only_request_scan_triggered
extensions 694; // WifiThreadTaskExecuted wifi_thread_task_executed
extensions 696; // BluetoothProfileConnectionAttempted bluetooth_profile_connection_attempted
+ extensions 700; // WifiStateChanged wifi_state_changed
extensions 702; // AdServicesConsentMigrated ad_services_consent_migrated
extensions 9999; // Atom9999 atom_9999
// StatsdStats tracks platform atoms with ids up to 900.
diff --git a/stats/atoms/wifi/wifi_extension_atoms.proto b/stats/atoms/wifi/wifi_extension_atoms.proto
index 3bc9887..9d4f4b1 100644
--- a/stats/atoms/wifi/wifi_extension_atoms.proto
+++ b/stats/atoms/wifi/wifi_extension_atoms.proto
@@ -44,6 +44,7 @@
optional WifiLocalOnlyRequestScanTriggered wifi_local_only_request_scan_triggered
= 693 [(module) = "wifi"];
optional WifiThreadTaskExecuted wifi_thread_task_executed = 694 [(module) = "wifi"];
+ optional WifiStateChanged wifi_state_changed = 700 [(module) = "wifi"];
// Pull metrics
optional WifiAwareCapabilities wifi_aware_capabilities = 10190 [(module) = "wifi"];
@@ -358,4 +359,14 @@
message WifiConfigSaved {
// How long does it cost to save all config
optional int32 running_time_ms = 1;
+}
+
+// Logged when Wi-Fi state change happens.
+message WifiStateChanged {
+ // If Wi-Fi was enabled
+ optional bool wifi_enabled = 1;
+ // If Wi-Fi Wake feature was enabled
+ optional bool wifi_wake_enabled = 2;
+ // If the state change was due to Wi-Fi Wake
+ optional bool enabled_by_wifi_wake = 3;
}
\ No newline at end of file