Merge Android R

Bug: 168057903
Merged-In: Ice3e441cc9c0df8d0a6acc016bb74375e081bd67
Change-Id: I1d85742f594be2007c99841b290e502b6ede624e
diff --git a/stats/atom_field_options.proto b/stats/atom_field_options.proto
index 16c936c..ff5717e 100644
--- a/stats/atom_field_options.proto
+++ b/stats/atom_field_options.proto
@@ -23,45 +23,72 @@
 
 import "google/protobuf/descriptor.proto";
 
-enum StateField {
-    // Default value for fields that are not primary or exclusive state.
-    STATE_FIELD_UNSET = 0;
-    // Fields that represent the key that the state belongs to.
-    PRIMARY = 1;
-    // The field that represents the state. It's an exclusive state.
-    EXCLUSIVE = 2;
-}
-
-// Used to annotate an atom that reprsents a state change. A state change atom must have exactly ONE
-// exclusive state field, and any number of primary key fields.
-// For example,
-// message UidProcessStateChanged {
-//    optional int32 uid = 1 [(state_field_option).option = PRIMARY];
-//    optional android.app.ProcessStateEnum state = 2 [(state_field_option).option = EXCLUSIVE];
+// Used to annotate an atom that represents a state change. A state change atom must have exactly
+// ONE exclusive state field, and any number of primary key fields. For example, message
+// UidProcessStateChanged {
+//    optional int32 uid = 1 [(state_field_option).primary_field = true];
+//    optional android.app.ProcessStateEnum state =
+//            2 [(state_field_option).exclusive_state = true];
 //  }
-// Each of this UidProcessStateChanged atom represents a state change for a specific uid.
+// Each UidProcessStateChanged atom event represents a state change for a specific uid.
 // A new state automatically overrides the previous state.
 //
-// If the atom has 2 or more primary fields, it means the combination of the primary fields are
-// the primary key.
+// If the atom has 2 or more primary fields, it means the combination of the
+// primary fields are the primary key.
 // For example:
 // message ThreadStateChanged {
-//    optional int32 pid = 1  [(state_field_option).option = PRIMARY];
-//    optional int32 tid = 2  [(state_field_option).option = PRIMARY];
-//    optional int32 state = 3 [(state_field_option).option = EXCLUSIVE];
+//    optional int32 pid = 1  [(state_field_option).primary_field = true];
+//    optional int32 tid = 2  [(state_field_option).primary_field = true];
+//    optional int32 state = 3 [(state_field_option).exclusive_state = true];
 // }
 //
 // Sometimes, there is no primary key field, when the state is GLOBAL.
 // For example,
-//
 // message ScreenStateChanged {
-//    optional android.view.DisplayStateEnum state = 1 [(state_field_option).option = EXCLUSIVE];
+//    optional android.view.DisplayStateEnum state =
+//          1 [(state_field_option).exclusive_state = true];
 // }
 //
-// Only fields of primary types can be annotated. AttributionNode cannot be primary keys (and they
-// usually are not).
+// For state atoms with attribution chain, sometimes the primary key is the first uid in the chain.
+// For example:
+// message AudioStateChanged {
+//   repeated AttributionNode attribution_node = 1
+//       [(stateFieldOption).primary_field_first_uid = true];
+//
+//    enum State {
+//      OFF = 0;
+//      ON = 1;
+//      // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes).
+//      RESET = 2;
+//    }
+//    optional State state = 2 [(stateFieldOption).exclusive_state = true];
+// }
 message StateAtomFieldOption {
-    optional StateField option = 1 [default = STATE_FIELD_UNSET];
+    // Fields that represent the key that the state belongs to.
+    // Used on simple proto fields. Do not use on attribution chains.
+    optional bool primary_field = 1 [default = false];
+
+    // The field that represents the state. It's an exclusive state.
+    optional bool exclusive_state = 2 [default = false];
+
+    // Used on an attribution chain field to indicate that the first uid is the
+    // primary field.
+    optional bool primary_field_first_uid = 3 [default = false];
+
+    // Note: We cannot annotate directly on the enums because many enums are imported from other
+    // proto files in the platform. proto-lite cc library does not support annotations unfortunately
+
+    // Knowing the default state value allows state trackers to remove entries that become the
+    // default state. If there is no default value specified, the default value is unknown, and all
+    // states will be tracked in memory.
+    optional int32 default_state_value = 4;
+
+    // A reset state signals all states go to default value. For example, BLE reset means all active
+    // BLE scans are to be turned off.
+    optional int32 trigger_state_reset_value = 5;
+
+    // If the state change needs to count nesting.
+    optional bool nested = 6 [default = true];
 }
 
 // Used to generate StatsLog.write APIs.
@@ -83,7 +110,7 @@
 
     optional LogMode log_mode = 50002 [default = MODE_AUTOMATIC];
 
-    optional bool allow_from_any_uid = 50003 [default = false];
+    repeated string module = 50004;
 
-    optional string log_from_module = 50004;
-}
\ No newline at end of file
+    optional bool truncate_timestamp = 50005 [default = false];
+}
diff --git a/stats/atoms.proto b/stats/atoms.proto
index b8de3f0..ab1d3cb 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -24,6 +24,8 @@
 import "frameworks/base/core/proto/android/app/enums.proto";
 import "frameworks/base/core/proto/android/app/job/enums.proto";
 import "frameworks/base/core/proto/android/app/settings_enums.proto";
+import "frameworks/base/core/proto/android/app/media_output_enum.proto";
+import "frameworks/base/core/proto/android/app/tvsettings_enums.proto";
 import "frameworks/base/core/proto/android/bluetooth/a2dp/enums.proto";
 import "frameworks/base/core/proto/android/bluetooth/enums.proto";
 import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto";
@@ -46,18 +48,22 @@
 import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto";
 import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto";
 import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto";
+import "frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto";
 import "frameworks/base/core/proto/android/stats/enums.proto";
 import "frameworks/base/core/proto/android/stats/intelligence/enums.proto";
 import "frameworks/base/core/proto/android/stats/launcher/launcher.proto";
 import "frameworks/base/core/proto/android/stats/location/location_enums.proto";
 import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto";
-import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto";
+import "frameworks/base/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto";
 import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto";
 import "frameworks/base/core/proto/android/stats/style/style_enums.proto";
+import "frameworks/base/core/proto/android/stats/sysui/notification_enums.proto";
 import "frameworks/base/core/proto/android/telecomm/enums.proto";
 import "frameworks/base/core/proto/android/telephony/enums.proto";
 import "frameworks/base/core/proto/android/view/enums.proto";
 import "frameworks/base/core/proto/android/wifi/enums.proto";
+import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto";
+import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto";
 
 /**
  * The primary atom class. This message defines all of the available
@@ -76,241 +82,258 @@
     // Pushed atoms start at 2.
     oneof pushed {
         // For StatsLog reasons, 1 is illegal and will not work. Must start at 2.
-        BleScanStateChanged ble_scan_state_changed = 2 [(log_from_module) = "bluetooth"];
-        ProcessStateChanged process_state_changed = 3;
-        BleScanResultReceived ble_scan_result_received = 4 [(log_from_module) = "bluetooth"];
-        SensorStateChanged sensor_state_changed = 5;
-        GpsScanStateChanged gps_scan_state_changed = 6;
-        SyncStateChanged sync_state_changed = 7;
-        ScheduledJobStateChanged scheduled_job_state_changed = 8;
-        ScreenBrightnessChanged screen_brightness_changed = 9;
-        WakelockStateChanged wakelock_state_changed = 10;
-        LongPartialWakelockStateChanged long_partial_wakelock_state_changed = 11;
-        MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12 [(log_from_module) = "framework"];
-        WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(log_from_module) = "framework"];
-        ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = 14;
-        MemoryFactorStateChanged memory_factor_state_changed = 15;
-        ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16;
-        CachedKillReported cached_kill_reported = 17;
-        ProcessMemoryStatReported process_memory_stat_reported = 18;
-        LauncherUIChanged launcher_event = 19;
-        BatterySaverModeStateChanged battery_saver_mode_state_changed = 20;
-        DeviceIdleModeStateChanged device_idle_mode_state_changed = 21;
-        DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22;
-        AudioStateChanged audio_state_changed = 23;
-        MediaCodecStateChanged media_codec_state_changed = 24;
-        CameraStateChanged camera_state_changed = 25;
-        FlashlightStateChanged flashlight_state_changed = 26;
-        UidProcessStateChanged uid_process_state_changed = 27;
-        ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28;
-        ScreenStateChanged screen_state_changed = 29;
-        BatteryLevelChanged battery_level_changed = 30;
-        ChargingStateChanged charging_state_changed = 31;
-        PluggedStateChanged plugged_state_changed = 32;
-        InteractiveStateChanged interactive_state_changed = 33;
+        BleScanStateChanged ble_scan_state_changed = 2
+                [(module) = "bluetooth", (module) = "statsdtest"];
+        ProcessStateChanged process_state_changed = 3 [(module) = "framework"];
+        BleScanResultReceived ble_scan_result_received = 4 [(module) = "bluetooth"];
+        SensorStateChanged sensor_state_changed =
+                5 [(module) = "framework", (module) = "statsdtest"];
+        GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"];
+        SyncStateChanged sync_state_changed = 7 [(module) = "framework", (module) = "statsdtest"];
+        ScheduledJobStateChanged scheduled_job_state_changed =
+                8 [(module) = "framework", (module) = "statsdtest"];
+        ScreenBrightnessChanged screen_brightness_changed =
+                9 [(module) = "framework", (module) = "statsdtest"];
+        WakelockStateChanged wakelock_state_changed =
+                10 [(module) = "framework", (module) = "statsdtest"];
+        LongPartialWakelockStateChanged long_partial_wakelock_state_changed =
+                11 [(module) = "framework"];
+        MobileRadioPowerStateChanged mobile_radio_power_state_changed =
+                12 [(module) = "framework", (truncate_timestamp) = true];
+        WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(module) = "framework"];
+        ActivityManagerSleepStateChanged activity_manager_sleep_state_changed =
+                14 [(module) = "framework"];
+        MemoryFactorStateChanged memory_factor_state_changed = 15 [(module) = "framework"];
+        ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16 [(module) = "framework"];
+        CachedKillReported cached_kill_reported = 17 [(module) = "framework"];
+        ProcessMemoryStatReported process_memory_stat_reported = 18 [(module) = "framework"];
+        LauncherUIChanged launcher_event = 19 [(module) = "sysui"];
+        BatterySaverModeStateChanged battery_saver_mode_state_changed =
+                20 [(module) = "framework", (module) = "statsdtest"];
+        DeviceIdleModeStateChanged device_idle_mode_state_changed = 21 [(module) = "framework"];
+        DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22 [(module) = "framework"];
+        AudioStateChanged audio_state_changed =
+                23 [(module) = "framework", (truncate_timestamp) = true];
+        MediaCodecStateChanged media_codec_state_changed = 24 [(module) = "framework"];
+        CameraStateChanged camera_state_changed = 25 [(module) = "framework"];
+        FlashlightStateChanged flashlight_state_changed = 26 [(module) = "framework"];
+        UidProcessStateChanged uid_process_state_changed =
+                27 [(module) = "framework", (module) = "statsdtest"];
+        ProcessLifeCycleStateChanged process_life_cycle_state_changed =
+                28 [(module) = "framework", (module) = "statsdtest"];
+        ScreenStateChanged screen_state_changed =
+                29 [(module) = "framework", (module) = "statsdtest"];
+        BatteryLevelChanged battery_level_changed =
+                30 [(module) = "framework", (module) = "statsdtest"];
+        ChargingStateChanged charging_state_changed = 31 [(module) = "framework"];
+        PluggedStateChanged plugged_state_changed = 32
+                [(module) = "framework", (module) = "statsdtest"];
+        InteractiveStateChanged interactive_state_changed = 33 [(module) = "framework"];
         TouchEventReported touch_event_reported = 34;
-        WakeupAlarmOccurred wakeup_alarm_occurred = 35;
-        KernelWakeupReported kernel_wakeup_reported = 36;
-        WifiLockStateChanged wifi_lock_state_changed = 37;
-        WifiSignalStrengthChanged wifi_signal_strength_changed = 38;
-        WifiScanStateChanged wifi_scan_state_changed = 39;
-        PhoneSignalStrengthChanged phone_signal_strength_changed = 40;
-        SettingChanged setting_changed = 41;
-        ActivityForegroundStateChanged activity_foreground_state_changed = 42;
-        IsolatedUidChanged isolated_uid_changed = 43;
-        PacketWakeupOccurred packet_wakeup_occurred = 44 [(log_from_module) = "framework"];
-        WallClockTimeShifted wall_clock_time_shifted = 45;
-        AnomalyDetected anomaly_detected = 46;
-        AppBreadcrumbReported app_breadcrumb_reported = 47 [(allow_from_any_uid) = true];
-        AppStartOccurred app_start_occurred = 48;
-        AppStartCanceled app_start_canceled = 49;
-        AppStartFullyDrawn app_start_fully_drawn = 50;
-        LmkKillOccurred lmk_kill_occurred = 51 [(log_from_module) = "lmkd"];
-        PictureInPictureStateChanged picture_in_picture_state_changed = 52;
-        WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53;
-        LmkStateChanged lmk_state_changed = 54 [(log_from_module) = "lmkd"];
-        AppStartMemoryStateCaptured app_start_memory_state_captured = 55;
-        ShutdownSequenceReported shutdown_sequence_reported = 56;
+        WakeupAlarmOccurred wakeup_alarm_occurred = 35 [(module) = "framework"];
+        KernelWakeupReported kernel_wakeup_reported = 36 [(module) = "framework"];
+        WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"];
+        WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"];
+        WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"];
+        PhoneSignalStrengthChanged phone_signal_strength_changed =
+                40 [(module) = "framework", (truncate_timestamp) = true];
+        SettingChanged setting_changed = 41 [(module) = "framework"];
+        ActivityForegroundStateChanged activity_foreground_state_changed =
+                42 [(module) = "framework", (module) = "statsdtest"];
+        IsolatedUidChanged isolated_uid_changed =
+                43 [(module) = "framework", (module) = "statsd", (module) = "statsdtest"];
+        PacketWakeupOccurred packet_wakeup_occurred = 44 [(module) = "framework"];
+        WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"];
+        AnomalyDetected anomaly_detected = 46 [(module) = "statsd"];
+        AppBreadcrumbReported app_breadcrumb_reported = 47 [(module) = "statsd"];
+        AppStartOccurred app_start_occurred = 48 [(module) = "framework", (module) = "statsdtest"];
+        AppStartCanceled app_start_canceled = 49 [(module) = "framework"];
+        AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"];
+        LmkKillOccurred lmk_kill_occurred = 51 [(module) = "lmkd"];
+        PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"];
+        WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"];
+        LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"];
+        AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"];
+        ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"];
         BootSequenceReported boot_sequence_reported = 57;
-        DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true];
-        OverlayStateChanged overlay_state_changed = 59;
-        ForegroundServiceStateChanged foreground_service_state_changed = 60;
-        CallStateChanged call_state_changed = 61;
-        KeyguardStateChanged keyguard_state_changed = 62;
-        KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63;
-        KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64;
-        AppDied app_died = 65;
-        ResourceConfigurationChanged resource_configuration_changed = 66;
-        BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67;
+        DaveyOccurred davey_occurred = 58 [(module) = "statsd"];
+        OverlayStateChanged overlay_state_changed =
+                59 [(module) = "framework", (module) = "statsdtest"];
+        ForegroundServiceStateChanged foreground_service_state_changed
+                = 60 [(module) = "framework"];
+        CallStateChanged call_state_changed =
+                61 [(module) = "telecom", (truncate_timestamp) = true];
+        KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"];
+        KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"];
+        KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"];
+        AppDied app_died = 65 [(module) = "framework"];
+        ResourceConfigurationChanged resource_configuration_changed = 66 [(module) = "framework"];
+        BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67 [(module) = "framework"];
         BluetoothConnectionStateChanged bluetooth_connection_state_changed =
-                68 [(log_from_module) = "bluetooth"];
-        GpsSignalQualityChanged gps_signal_quality_changed = 69;
-        UsbConnectorStateChanged usb_connector_state_changed = 70;
+                68 [(module) = "bluetooth"];
+        GpsSignalQualityChanged gps_signal_quality_changed = 69 [(module) = "framework"];
+        UsbConnectorStateChanged usb_connector_state_changed = 70 [(module) = "framework"];
         SpeakerImpedanceReported speaker_impedance_reported = 71;
         HardwareFailed hardware_failed = 72;
         PhysicalDropDetected physical_drop_detected = 73;
         ChargeCyclesReported charge_cycles_reported = 74;
-        MobileConnectionStateChanged mobile_connection_state_changed =
-                75 [(log_from_module) = "telephony"];
-        MobileRadioTechnologyChanged mobile_radio_technology_changed =
-                76 [(log_from_module) = "telephony"];
-        UsbDeviceAttached usb_device_attached = 77;
-        AppCrashOccurred app_crash_occurred = 78;
-        ANROccurred anr_occurred = 79;
-        WTFOccurred wtf_occurred = 80;
-        LowMemReported low_mem_reported = 81;
+        MobileConnectionStateChanged mobile_connection_state_changed = 75 [(module) = "telephony"];
+        MobileRadioTechnologyChanged mobile_radio_technology_changed = 76 [(module) = "telephony"];
+        UsbDeviceAttached usb_device_attached = 77 [(module) = "framework"];
+        AppCrashOccurred app_crash_occurred = 78 [(module) = "framework", (module) = "statsdtest"];
+        ANROccurred anr_occurred = 79 [(module) = "framework"];
+        WTFOccurred wtf_occurred = 80 [(module) = "framework"];
+        LowMemReported low_mem_reported = 81 [(module) = "framework"];
         GenericAtom generic_atom = 82;
-        KeyValuePairsAtom key_value_pairs_atom = 83 [(allow_from_any_uid) = true];
-        VibratorStateChanged vibrator_state_changed = 84;
-        DeferredJobStatsReported deferred_job_stats_reported = 85;
+        KeyValuePairsAtom key_value_pairs_atom = 83 [(module) = "framework", (module) = "statsd"];
+        VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"];
+        DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"];
         ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true];
-        BiometricAcquired biometric_acquired = 87;
-        BiometricAuthenticated biometric_authenticated = 88;
-        BiometricErrorOccurred biometric_error_occurred = 89;
-        // Atom number 90 is available for use.
+        BiometricAcquired biometric_acquired = 87 [(module) = "framework"];
+        BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"];
+        BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"];
+        UiEventReported ui_event_reported = 90 [(module) = "framework", (module) = "sysui"];
         BatteryHealthSnapshot battery_health_snapshot = 91;
         SlowIo slow_io = 92;
         BatteryCausedShutdown battery_caused_shutdown = 93;
-        PhoneServiceStateChanged phone_service_state_changed = 94;
-        PhoneStateChanged phone_state_changed = 95;
+        PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"];
+        PhoneStateChanged phone_state_changed = 95 [(module) = "framework"];
         UserRestrictionChanged user_restriction_changed = 96;
-        SettingsUIChanged settings_ui_changed = 97;
-        ConnectivityStateChanged connectivity_state_changed = 98;
+        SettingsUIChanged settings_ui_changed = 97 [(module) = "settings"];
+        ConnectivityStateChanged connectivity_state_changed = 98 [(module) = "framework"];
         // TODO: service state change is very noisy shortly after boot, as well
         // as at other transitions - coming out of doze, device plugged in, etc.
         // Consider removing this if it becomes a problem
-        ServiceStateChanged service_state_changed = 99;
-        ServiceLaunchReported service_launch_reported = 100;
-        FlagFlipUpdateOccurred flag_flip_update_occurred = 101;
-        BinaryPushStateChanged binary_push_state_changed = 102;
-        DevicePolicyEvent device_policy_event = 103;
-        DocsUIFileOperationCanceledReported docs_ui_file_op_canceled =
-            104 [(log_from_module) = "docsui"];
-        DocsUIFileOperationCopyMoveModeReported
-            docs_ui_file_op_copy_move_mode_reported =
-            105 [(log_from_module) = "docsui"];
-        DocsUIFileOperationFailureReported docs_ui_file_op_failure =
-            106 [(log_from_module) = "docsui"];
-        DocsUIFileOperationReported docs_ui_provider_file_op =
-            107 [(log_from_module) = "docsui"];
-        DocsUIInvalidScopedAccessRequestReported
-            docs_ui_invalid_scoped_access_request =
-            108 [(log_from_module) = "docsui"];
-        DocsUILaunchReported docs_ui_launch_reported =
-            109 [(log_from_module) = "docsui"];
-        DocsUIRootVisitedReported docs_ui_root_visited =
-            110 [(log_from_module) = "docsui"];
-        DocsUIStartupMsReported docs_ui_startup_ms =
-            111 [(log_from_module) = "docsui"];
-        DocsUIUserActionReported docs_ui_user_action_reported =
-            112 [(log_from_module) = "docsui"];
-        WifiEnabledStateChanged wifi_enabled_state_changed = 113;
-        WifiRunningStateChanged wifi_running_state_changed = 114;
-        AppCompacted app_compacted = 115;
-        NetworkDnsEventReported network_dns_event_reported = 116 [(log_from_module) = "resolv"];
+        ServiceStateChanged service_state_changed = 99 [(module) = "framework"];
+        ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"];
+        FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"];
+        BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "statsd"];
+        DevicePolicyEvent device_policy_event = 103 [(module) = "framework"];
+        DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"];
+        DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported =
+            105 [(module) = "docsui"];
+        DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"];
+        DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"];
+        DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request =
+            108 [(module) = "docsui"];
+        DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"];
+        DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"];
+        DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"];
+        DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"];
+        WifiEnabledStateChanged wifi_enabled_state_changed = 113 [(module) = "framework"];
+        WifiRunningStateChanged wifi_running_state_changed = 114
+                [(module) = "framework", deprecated = true];
+        AppCompacted app_compacted = 115 [(module) = "framework"];
+        NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"];
         DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported =
-            117 [(log_from_module) = "docsui"];
-        DocsUIPickResultReported docs_ui_pick_result_reported =
-            118 [(log_from_module) = "docsui"];
-        DocsUISearchModeReported docs_ui_search_mode_reported =
-            119 [(log_from_module) = "docsui"];
-        DocsUISearchTypeReported docs_ui_search_type_reported =
-            120 [(log_from_module) = "docsui"];
-        DataStallEvent data_stall_event = 121 [(log_from_module) = "network_stack"];
-        RescuePartyResetReported rescue_party_reset_reported = 122;
-        SignedConfigReported signed_config_reported = 123;
-        GnssNiEventReported gnss_ni_event_reported = 124;
+            117 [(module) = "docsui"];
+        DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"];
+        DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"];
+        DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"];
+        DataStallEvent data_stall_event = 121 [(module) = "network_stack"];
+        RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"];
+        SignedConfigReported signed_config_reported = 123 [(module) = "framework"];
+        GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"];
         BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event =
-                125 [(log_from_module) = "bluetooth"];
+                125 [(module) = "bluetooth"];
         BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed =
-                126 [(log_from_module) = "bluetooth"];
+                126 [(module) = "bluetooth"];
         BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed =
-                127 [(log_from_module) = "bluetooth"];
-        AppDowngraded app_downgraded = 128;
+                127 [(module) = "bluetooth"];
+        AppDowngraded app_downgraded = 128 [(module) = "framework"];
         AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129;
-        LowStorageStateChanged low_storage_state_changed = 130;
-        GnssNfwNotificationReported gnss_nfw_notification_reported = 131;
-        GnssConfigurationReported gnss_configuration_reported = 132;
+        LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"];
+        GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"];
+        GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"];
         UsbPortOverheatEvent usb_port_overheat_event_reported = 133;
-        NfcErrorOccurred nfc_error_occurred = 134;
-        NfcStateChanged nfc_state_changed = 135;
-        NfcBeamOccurred nfc_beam_occurred = 136;
-        NfcCardemulationOccurred nfc_cardemulation_occurred = 137;
-        NfcTagOccurred nfc_tag_occurred = 138;
-        NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139;
-        SeStateChanged se_state_changed = 140;
-        SeOmapiReported se_omapi_reported = 141;
-        BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = 142;
-        AttentionManagerServiceResultReported attention_manager_service_result_reported = 143;
-        AdbConnectionChanged adb_connection_changed = 144;
+        NfcErrorOccurred nfc_error_occurred = 134 [(module) = "nfc"];
+        NfcStateChanged nfc_state_changed = 135 [(module) = "nfc"];
+        NfcBeamOccurred nfc_beam_occurred = 136 [(module) = "nfc"];
+        NfcCardemulationOccurred nfc_cardemulation_occurred = 137 [(module) = "nfc"];
+        NfcTagOccurred nfc_tag_occurred = 138 [(module) = "nfc"];
+        NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139 [(module) = "nfc"];
+        SeStateChanged se_state_changed = 140 [(module) = "secure_element"];
+        SeOmapiReported se_omapi_reported = 141 [(module) = "secure_element"];
+        BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported =
+                142 [(module) = "framework"];
+        AttentionManagerServiceResultReported attention_manager_service_result_reported =
+                143 [(module) = "framework"];
+        AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"];
         SpeechDspStatReported speech_dsp_stat_reported = 145;
-        UsbContaminantReported usb_contaminant_reported = 146;
-        WatchdogRollbackOccurred watchdog_rollback_occurred = 147;
-        BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = 148;
-        BubbleUIChanged bubble_ui_changed = 149;
-        ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150;
+        UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"];
+        WatchdogRollbackOccurred watchdog_rollback_occurred =
+                147 [(module) = "framework", (module) = "statsd"];
+        BiometricSystemHealthIssueDetected biometric_system_health_issue_detected =
+                148 [(module) = "framework"];
+        BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"];
+        ScheduledJobConstraintChanged scheduled_job_constraint_changed =
+                150 [(module) = "framework"];
         BluetoothActiveDeviceChanged bluetooth_active_device_changed =
-                151 [(log_from_module) = "bluetooth"];
+                151 [(module) = "bluetooth"];
         BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed =
-                152 [(log_from_module) = "bluetooth"];
+                152 [(module) = "bluetooth"];
         BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed =
-                153 [(log_from_module) = "bluetooth"];
+                153 [(module) = "bluetooth"];
         BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed =
-                154 [(log_from_module) = "bluetooth"];
+                154 [(module) = "bluetooth"];
         BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported =
-                155 [(log_from_module) = "bluetooth"];
+                155 [(module) = "bluetooth"];
         BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported =
-                156 [(log_from_module) = "bluetooth"];
+                156 [(module) = "bluetooth"];
         BluetoothDeviceRssiReported bluetooth_device_rssi_reported =
-                157 [(log_from_module) = "bluetooth"];
+                157 [(module) = "bluetooth"];
         BluetoothDeviceFailedContactCounterReported
-                bluetooth_device_failed_contact_counter_reported = 158 [(log_from_module) = "bluetooth"];
+                bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"];
         BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported =
-                159 [(log_from_module) = "bluetooth"];
+                159 [(module) = "bluetooth"];
         BluetoothHciTimeoutReported bluetooth_hci_timeout_reported =
-                160 [(log_from_module) = "bluetooth"];
+                160 [(module) = "bluetooth"];
         BluetoothQualityReportReported bluetooth_quality_report_reported =
-                161 [(log_from_module) = "bluetooth"];
+                161 [(module) = "bluetooth"];
         BluetoothDeviceInfoReported bluetooth_device_info_reported =
-                162 [(log_from_module) = "bluetooth"];
+                162 [(module) = "bluetooth"];
         BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported =
-                163 [(log_from_module) = "bluetooth"];
+                163 [(module) = "bluetooth"];
         BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported =
-                164 [(log_from_module) = "bluetooth"];
+                164 [(module) = "bluetooth"];
         BluetoothBondStateChanged bluetooth_bond_state_changed =
-                165 [(log_from_module) = "bluetooth"];
+                165 [(module) = "bluetooth"];
         BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported =
-                166 [(log_from_module) = "bluetooth"];
+                166 [(module) = "bluetooth"];
         BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported =
-                167 [(log_from_module) = "bluetooth"];
-        ScreenTimeoutExtensionReported screen_timeout_extension_reported = 168;
-        ProcessStartTime process_start_time = 169;
+                167 [(module) = "bluetooth"];
+        ScreenTimeoutExtensionReported screen_timeout_extension_reported =
+                168 [(module) = "framework"];
+        ProcessStartTime process_start_time = 169 [(module) = "framework"];
         PermissionGrantRequestResultReported permission_grant_request_result_reported =
-            170 [(log_from_module) = "permissioncontroller"];
+                170 [(module) = "permissioncontroller"];
         BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
-        DeviceIdentifierAccessDenied device_identifier_access_denied = 172;
-        BubbleDeveloperErrorReported bubble_developer_error_reported = 173;
-        AssistGestureStageReported assist_gesture_stage_reported = 174;
-        AssistGestureFeedbackReported assist_gesture_feedback_reported = 175;
-        AssistGestureProgressReported assist_gesture_progress_reported = 176;
-        TouchGestureClassified touch_gesture_classified = 177;
-        HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true];
-        StyleUIChanged style_ui_changed = 179 [(log_from_module) = "style"];
+        DeviceIdentifierAccessDenied device_identifier_access_denied =
+                172 [(module) = "telephony_common"];
+        BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"];
+        AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"];
+        AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"];
+        AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"];
+        TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"];
+        HiddenApiUsed hidden_api_used = 178 [(module) = "framework"];
+        StyleUIChanged style_ui_changed = 179 [(module) = "sysui"];
         PrivacyIndicatorsInteracted privacy_indicators_interacted =
-            180 [(log_from_module) = "permissioncontroller"];
-        AppInstallOnExternalStorageReported app_install_on_external_storage_reported = 181;
-        NetworkStackReported network_stack_reported = 182 [(log_from_module) = "network_stack"];
-        AppMovedStorageReported app_moved_storage_reported = 183;
-        BiometricEnrolled biometric_enrolled = 184;
-        SystemServerWatchdogOccurred system_server_watchdog_occurred = 185;
-        TombStoneOccurred tomb_stone_occurred = 186;
+                180 [(module) = "permissioncontroller"];
+        AppInstallOnExternalStorageReported app_install_on_external_storage_reported =
+                181 [(module) = "framework"];
+        NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"];
+        AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"];
+        BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"];
+        SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"];
+        TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"];
         BluetoothClassOfDeviceReported bluetooth_class_of_device_reported =
-                187 [(log_from_module) = "bluetooth"];
+                187 [(module) = "bluetooth"];
         IntelligenceEventReported intelligence_event_reported =
-            188 [(log_from_module) = "intelligence"];
-        ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = 189;
+                188 [(module) = "intelligence"];
+        ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed =
+                189 [(module) = "framework"];
         RoleRequestResultReported role_request_result_reported =
-            190 [(log_from_module) = "permissioncontroller"];
+                190 [(module) = "permissioncontroller"];
         MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191;
         MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192;
         MediametricsAudiothreadReported mediametrics_audiothread_reported = 193;
@@ -321,131 +344,258 @@
         MediametricsMediadrmReported mediametrics_mediadrm_reported = 198;
         MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199;
         MediametricsRecorderReported mediametrics_recorder_reported = 200;
-        CarPowerStateChanged car_power_state_changed = 203;
-        GarageModeInfo garage_mode_info = 204;
-        TestAtomReported test_atom_reported = 205 [(log_from_module) = "cts"];
-        ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = 206;
-        ContentCaptureServiceEvents content_capture_service_events = 207;
-        ContentCaptureSessionEvents content_capture_session_events = 208;
-        ContentCaptureFlushed content_capture_flushed = 209;
-        LocationManagerApiUsageReported location_manager_api_usage_reported = 210;
+        MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201;
+        CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"];
+        GarageModeInfo garage_mode_info = 204 [(module) = "car"];
+        TestAtomReported test_atom_reported = 205 [(module) = "cts"];
+        ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported =
+                206 [(module) = "framework"];
+        ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"];
+        ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"];
+        ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"];
+        LocationManagerApiUsageReported location_manager_api_usage_reported =
+                210 [(module) = "framework"];
         ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported =
-            211 [(log_from_module) = "permissioncontroller"];
+                211 [(module) = "permissioncontroller"];
         RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result =
-            212 [(log_from_module) = "permissioncontroller"];
+                212 [(module) = "permissioncontroller"];
         GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions =
-            213 [(log_from_module) = "permissioncontroller"];
+                213 [(module) = "permissioncontroller"];
         LocationAccessCheckNotificationAction location_access_check_notification_action =
-            214 [(log_from_module) = "permissioncontroller"];
+                214 [(module) = "permissioncontroller"];
         AppPermissionFragmentActionReported app_permission_fragment_action_reported =
-            215 [(log_from_module) = "permissioncontroller"];
+                215 [(module) = "permissioncontroller"];
         AppPermissionFragmentViewed app_permission_fragment_viewed =
-            216 [(log_from_module) = "permissioncontroller"];
+                216 [(module) = "permissioncontroller"];
         AppPermissionsFragmentViewed app_permissions_fragment_viewed =
-            217 [(log_from_module) = "permissioncontroller"];
+                217 [(module) = "permissioncontroller"];
         PermissionAppsFragmentViewed permission_apps_fragment_viewed =
-            218  [(log_from_module) = "permissioncontroller"];
-        ExclusionRectStateChanged exclusion_rect_state_changed = 223;
-        BackGesture back_gesture_reported_reported = 224;
-
+                218  [(module) = "permissioncontroller"];
+        TextSelectionEvent text_selection_event = 219  [(module) = "textclassifier"];
+        TextLinkifyEvent text_linkify_event = 220  [(module) = "textclassifier"];
+        ConversationActionsEvent conversation_actions_event = 221  [(module) = "textclassifier"];
+        LanguageDetectionEvent language_detection_event = 222  [(module) = "textclassifier"];
+        ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"];
+        BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"];
         UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225;
         UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226;
+        CameraActionEvent camera_action_event = 227 [(module) = "framework"];
         AppCompatibilityChangeReported app_compatibility_change_reported =
-            228 [(allow_from_any_uid) = true];
-        PerfettoUploaded perfetto_uploaded =
-            229 [(log_from_module) = "perfetto"];
-        VmsClientConnectionStateChanged vms_client_connection_state_changed = 230;
-        BootTimeEventDuration boot_time_event_duration_reported = 239;
-        BootTimeEventElapsedTime boot_time_event_elapsed_time_reported = 240;
+                228 [(module) = "framework"];
+        PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"];
+        VmsClientConnectionStateChanged vms_client_connection_state_changed =
+                230 [(module) = "car"];
+        MediaProviderScanOccurred media_provider_scan_occurred = 233 [(module) = "mediaprovider"];
+        MediaContentDeleted media_content_deleted = 234 [(module) = "mediaprovider"];
+        MediaProviderPermissionRequested media_provider_permission_requested =
+            235 [(module) = "mediaprovider"];
+        MediaProviderSchemaChanged media_provider_schema_changed = 236 [(module) = "mediaprovider"];
+        MediaProviderIdleMaintenanceFinished media_provider_idle_maintenance_finished =
+            237 [(module) = "mediaprovider"];
+        RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"];
+        BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"];
+        BootTimeEventElapsedTime boot_time_event_elapsed_time_reported =
+                240 [(module) = "framework"];
         BootTimeEventUtcTime boot_time_event_utc_time_reported = 241;
-        BootTimeEventErrorCode boot_time_event_error_code_reported = 242;
-        UserspaceRebootReported userspace_reboot_reported = 243 [(log_from_module) = "framework"];
+        BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"];
+        UserspaceRebootReported userspace_reboot_reported = 243 [(module) = "framework"];
+        NotificationReported notification_reported = 244 [(module) = "framework"];
+        NotificationPanelReported notification_panel_reported = 245 [(module) = "sysui"];
+        NotificationChannelModified notification_channel_modified = 246 [(module) = "framework"];
+        IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"];
+        IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"];
+        CellBroadcastMessageReported cb_message_reported =
+            249 [(module) = "cellbroadcast"];
+        CellBroadcastMessageError cb_message_error =
+            250 [(module) = "cellbroadcast"];
+        WifiHealthStatReported wifi_health_stat_reported = 251 [(module) = "wifi"];
+        WifiFailureStatReported wifi_failure_stat_reported = 252 [(module) = "wifi"];
+        WifiConnectionResultReported wifi_connection_result_reported = 253 [(module) = "wifi"];
+        AppFreezeChanged app_freeze_changed = 254 [(module) = "framework"];
         SnapshotMergeReported snapshot_merge_reported = 255;
-        NetworkIpProvisioningReported network_ip_provisioning_reported = 290 [(log_from_module) = "network_stack"];
-        NetworkDhcpRenewReported network_dhcp_renew_reported = 291 [(log_from_module) = "network_stack"];
-        NetworkValidationReported network_validation_reported = 292 [(log_from_module) = "network_stack"];
-        NetworkStackQuirkReported network_stack_quirk_reported = 293 [(log_from_module) = "network_stack"];
+        ForegroundServiceAppOpSessionEnded foreground_service_app_op_session_ended =
+            256  [(module) = "framework"];
+        DisplayJankReported display_jank_reported = 257;
+        AppStandbyBucketChanged app_standby_bucket_changed = 258 [(module) = "framework"];
+        SharesheetStarted sharesheet_started = 259 [(module) = "framework"];
+        RankingSelected ranking_selected = 260 [(module) = "framework", (module) = "sysui"];
+        TvSettingsUIInteracted tvsettings_ui_interacted = 261 [(module) = "tv_settings"];
+        LauncherStaticLayout launcher_snapshot = 262 [(module) = "sysui"];
+        PackageInstallerV2Reported package_installer_v2_reported = 263 [(module) = "framework"];
+        UserLifecycleJourneyReported user_lifecycle_journey_reported = 264 [(module) = "framework"];
+        UserLifecycleEventOccurred user_lifecycle_event_occurred = 265 [(module) = "framework"];
+        AccessibilityShortcutReported accessibility_shortcut_reported =
+            266 [(module) = "framework"];
+        AccessibilityServiceReported accessibility_service_reported = 267 [(module) = "settings"];
+        DocsUIDragAndDropReported docs_ui_drag_and_drop_reported = 268 [(module) = "docsui"];
+        AppUsageEventOccurred app_usage_event_occurred = 269 [(module) = "framework"];
+        AutoRevokeNotificationClicked auto_revoke_notification_clicked =
+            270 [(module) = "permissioncontroller"];
+        AutoRevokeFragmentAppViewed auto_revoke_fragment_app_viewed =
+            271 [(module) = "permissioncontroller"];
+        AutoRevokedAppInteraction auto_revoked_app_interaction =
+            272 [(module) = "permissioncontroller", (module) = "settings"];
+        AppPermissionGroupsFragmentAutoRevokeAction
+            app_permission_groups_fragment_auto_revoke_action =
+            273 [(module) = "permissioncontroller"];
+        EvsUsageStatsReported evs_usage_stats_reported = 274 [(module) = "evs"];
+        AudioPowerUsageDataReported audio_power_usage_data_reported = 275;
+        TvTunerStateChanged tv_tuner_state_changed = 276 [(module) = "framework"];
+        MediaOutputOpSwitchReported mediaoutput_op_switch_reported =
+            277 [(module) = "settings"];
+        CellBroadcastMessageFiltered cb_message_filtered =
+            278 [(module) = "cellbroadcast"];
+        TvTunerDvrStatus tv_tuner_dvr_status = 279 [(module) = "framework"];
+        TvCasSessionOpenStatus tv_cas_session_open_status =
+            280 [(module) = "framework"];
+        AssistantInvocationReported assistant_invocation_reported = 281 [(module) = "framework"];
+        DisplayWakeReported display_wake_reported = 282 [(module) = "framework"];
+        CarUserHalModifyUserRequestReported car_user_hal_modify_user_request_reported =
+            283 [(module) = "car"];
+        CarUserHalModifyUserResponseReported car_user_hal_modify_user_response_reported =
+            284 [(module) = "car"];
+        CarUserHalPostSwitchResponseReported car_user_hal_post_switch_response_reported =
+            285 [(module) = "car"];
+        CarUserHalInitialUserInfoRequestReported car_user_hal_initial_user_info_request_reported =
+            286 [(module) = "car"];
+        CarUserHalInitialUserInfoResponseReported car_user_hal_initial_user_info_response_reported =
+            287 [(module) = "car"];
+        CarUserHalUserAssociationRequestReported car_user_hal_user_association_request_reported =
+            288 [(module) = "car"];
+        CarUserHalSetUserAssociationResponseReported car_user_hal_set_user_association_response_reported =
+            289 [(module) = "car"];
+        NetworkIpProvisioningReported network_ip_provisioning_reported =
+            290 [(module) = "network_stack"];
+        NetworkDhcpRenewReported network_dhcp_renew_reported = 291 [(module) = "network_stack"];
+        NetworkValidationReported network_validation_reported = 292 [(module) = "network_stack"];
+        NetworkStackQuirkReported network_stack_quirk_reported = 293 [(module) = "network_stack"];
+        MediametricsAudioRecordDeviceUsageReported mediametrics_audiorecorddeviceusage_reported =
+            294;
+        MediametricsAudioThreadDeviceUsageReported mediametrics_audiothreaddeviceusage_reported =
+            295;
+        MediametricsAudioTrackDeviceUsageReported mediametrics_audiotrackdeviceusage_reported =
+            296;
+        MediametricsAudioDeviceConnectionReported mediametrics_audiodeviceconnection_reported =
+            297;
+        BlobCommitted blob_committed = 298 [(module) = "framework"];
+        BlobLeased blob_leased = 299 [(module) = "framework"];
+        BlobOpened blob_opened = 300 [(module) = "framework"];
+        ContactsProviderStatusReported contacts_provider_status_reported = 301;
         KeystoreKeyEventReported keystore_key_event_reported = 302;
-        NetworkTetheringReported  network_tethering_reported = 303 [(log_from_module) =  "network_tethering"];
+        NetworkTetheringReported  network_tethering_reported =
+            303 [(module) = "network_tethering"];
+        ImeTouchReported ime_touch_reported = 304 [(module) = "sysui"];
+
+        // StatsdStats tracks platform atoms with ids upto 500.
+        // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
     }
 
     // Pulled events will start at field 10000.
-    // Next: 10080
+    // Next: 10084
     oneof pulled {
-        WifiBytesTransfer wifi_bytes_transfer = 10000;
-        WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001;
-        MobileBytesTransfer mobile_bytes_transfer = 10002;
-        MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003;
-        BluetoothBytesTransfer bluetooth_bytes_transfer = 10006;
-        KernelWakelock kernel_wakelock = 10004;
-        SubsystemSleepState subsystem_sleep_state = 10005;
-        CpuTimePerFreq cpu_time_per_freq = 10008;
-        CpuTimePerUid cpu_time_per_uid = 10009;
-        CpuTimePerUidFreq cpu_time_per_uid_freq = 10010;
-        WifiActivityInfo wifi_activity_info = 10011;
-        ModemActivityInfo modem_activity_info = 10012;
-        BluetoothActivityInfo bluetooth_activity_info = 10007;
-        ProcessMemoryState process_memory_state = 10013;
-        SystemElapsedRealtime system_elapsed_realtime = 10014;
-        SystemUptime system_uptime = 10015;
-        CpuActiveTime cpu_active_time = 10016;
-        CpuClusterTime cpu_cluster_time = 10017;
-        DiskSpace disk_space = 10018 [deprecated=true];
-        RemainingBatteryCapacity remaining_battery_capacity = 10019;
-        FullBatteryCapacity full_battery_capacity = 10020;
-        Temperature temperature = 10021;
-        BinderCalls binder_calls = 10022;
-        BinderCallsExceptions binder_calls_exceptions = 10023;
-        LooperStats looper_stats = 10024;
-        DiskStats disk_stats = 10025;
-        DirectoryUsage directory_usage = 10026;
-        AppSize app_size = 10027;
-        CategorySize category_size = 10028;
-        ProcStats proc_stats = 10029;
-        BatteryVoltage battery_voltage = 10030;
-        NumFingerprintsEnrolled num_fingerprints_enrolled = 10031;
-        DiskIo disk_io = 10032;
-        PowerProfile power_profile = 10033;
-        ProcStatsPkgProc proc_stats_pkg_proc = 10034;
-        ProcessCpuTime process_cpu_time = 10035;
-        NativeProcessMemoryState native_process_memory_state = 10036;
-        CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037;
+        WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"];
+        WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"];
+        MobileBytesTransfer mobile_bytes_transfer =
+                10002 [(module) = "framework", (truncate_timestamp) = true];
+        MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg =
+                10003 [(module) = "framework", (truncate_timestamp) = true];
+        BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"];
+        KernelWakelock kernel_wakelock = 10004 [(module) = "framework"];
+        SubsystemSleepState subsystem_sleep_state = 10005 [(module) = "statsdtest"];
+        CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"];
+        CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework", (module) = "statsdtest"];
+        CpuTimePerUidFreq cpu_time_per_uid_freq =
+                10010 [(module) = "framework", (module) = "statsd"];
+        WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"];
+        ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"];
+        BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"];
+        ProcessMemoryState process_memory_state = 10013 [(module) = "framework"];
+        SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"];
+        SystemUptime system_uptime = 10015 [(module) = "framework"];
+        CpuActiveTime cpu_active_time = 10016 [(module) = "framework", (module) = "statsdtest"];
+        CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"];
+        DiskSpace disk_space = 10018 [deprecated=true, (module) = "statsdtest"];
+        RemainingBatteryCapacity remaining_battery_capacity = 10019 [(module) = "framework"];
+        FullBatteryCapacity full_battery_capacity = 10020 [(module) = "framework"];
+        Temperature temperature = 10021 [(module) = "framework", (module) = "statsdtest"];
+        BinderCalls binder_calls = 10022 [(module) = "framework", (module) = "statsd"];
+        BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"];
+        LooperStats looper_stats = 10024 [(module) = "framework", (module) = "statsd"];
+        DiskStats disk_stats = 10025 [(module) = "framework"];
+        DirectoryUsage directory_usage = 10026 [(module) = "framework"];
+        AppSize app_size = 10027 [(module) = "framework"];
+        CategorySize category_size = 10028 [(module) = "framework"];
+        ProcStats proc_stats = 10029 [(module) = "framework"];
+        BatteryVoltage battery_voltage = 10030 [(module) = "framework"];
+        NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"];
+        DiskIo disk_io = 10032 [(module) = "framework"];
+        PowerProfile power_profile = 10033 [(module) = "framework"];
+        ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"];
+        ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"];
+        CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"];
         OnDevicePowerMeasurement on_device_power_measurement = 10038;
-        DeviceCalculatedPowerUse device_calculated_power_use = 10039;
-        DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = 10040;
-        DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = 10041;
-        ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042;
-        BatteryLevel battery_level = 10043;
-        BuildInformation build_information = 10044;
-        BatteryCycleCount battery_cycle_count = 10045;
-        DebugElapsedClock debug_elapsed_clock = 10046;
-        DebugFailingElapsedClock debug_failing_elapsed_clock = 10047;
-        NumFacesEnrolled num_faces_enrolled = 10048;
-        RoleHolder role_holder = 10049;
-        DangerousPermissionState dangerous_permission_state = 10050;
-        TrainInfo train_info = 10051;
-        TimeZoneDataInfo time_zone_data_info = 10052;
-        ExternalStorageInfo external_storage_info = 10053;
+        DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"];
+        DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid =
+                10040 [(module) = "framework"];
+        DeviceCalculatedPowerBlameOther device_calculated_power_blame_other =
+                10041 [(module) = "framework"];
+        ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"];
+        BatteryLevel battery_level = 10043 [(module) = "framework"];
+        BuildInformation build_information = 10044 [(module) = "framework"];
+        BatteryCycleCount battery_cycle_count = 10045 [(module) = "framework"];
+        DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"];
+        DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"];
+        NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"];
+        RoleHolder role_holder = 10049 [(module) = "framework"];
+        DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"];
+        TrainInfo train_info = 10051 [(module) = "statsd"];
+        TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"];
+        ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"];
         GpuStatsGlobalInfo gpu_stats_global_info = 10054;
         GpuStatsAppInfo gpu_stats_app_info = 10055;
-        SystemIonHeapSize system_ion_heap_size = 10056;
-        AppsOnExternalStorageInfo apps_on_external_storage_info = 10057;
-        FaceSettings face_settings = 10058;
-        CoolingDevice cooling_device = 10059;
-        AppOps app_ops = 10060;
-        ProcessSystemIonHeapSize process_system_ion_heap_size = 10061;
-        VmsClientStats vms_client_stats = 10065;
-        NotificationRemoteViews notification_remote_views = 10066;
-        VoiceCallSession voice_call_session = 10076 [(log_from_module) = "telephony"];
-        VoiceCallRatUsage voice_call_rat_usage = 10077 [(log_from_module) = "telephony"];
-        SimSlotState sim_slot_state = 10078 [(log_from_module) = "telephony"];
-        SupportedRadioAccessFamily supported_radio_access_family =
-            10079 [(log_from_module) = "telephony"];
+        SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"];
+        AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"];
+        FaceSettings face_settings = 10058 [(module) = "framework"];
+        CoolingDevice cooling_device = 10059 [(module) = "framework"];
+        AppOps app_ops = 10060 [(module) = "framework"];
+        ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"];
+        SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062;
+        SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063;
+        ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"];
+        VmsClientStats vms_client_stats = 10065 [(module) = "car"];
+        NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"];
+        DangerousPermissionStateSampled dangerous_permission_state_sampled =
+                10067 [(module) = "framework"];
+        GraphicsStats graphics_stats = 10068;
+        RuntimeAppOpAccess runtime_app_op_access = 10069 [(module) = "framework"];
+        IonHeapSize ion_heap_size = 10070 [(module) = "framework"];
+        PackageNotificationPreferences package_notification_preferences =
+                10071 [(module) = "framework"];
+        PackageNotificationChannelPreferences package_notification_channel_preferences =
+                10072 [(module) = "framework"];
+        PackageNotificationChannelGroupPreferences package_notification_channel_group_preferences =
+                10073 [(module) = "framework"];
+        GnssStats gnss_stats = 10074 [(module) = "framework"];
+        AttributedAppOps attributed_app_ops = 10075 [(module) = "framework"];
+        VoiceCallSession voice_call_session = 10076 [(module) = "telephony"];
+        VoiceCallRatUsage voice_call_rat_usage = 10077 [(module) = "telephony"];
+        SimSlotState sim_slot_state = 10078 [(module) = "telephony"];
+        SupportedRadioAccessFamily supported_radio_access_family = 10079 [(module) = "telephony"];
+        SettingSnapshot setting_snapshot = 10080 [(module) = "framework"];
+        BlobInfo blob_info = 10081 [(module) = "framework"];
+        DataUsageBytesTransfer data_usage_bytes_transfer = 10082 [(module) = "framework"];
+        BytesTransferByTagAndMetered bytes_transfer_by_tag_and_metered =
+                10083 [(module) = "framework"];
+        DNDModeProto dnd_mode_rule = 10084 [(module) = "framework"];
+        GeneralExternalStorageAccessStats general_external_storage_access_stats =
+            10085 [(module) = "mediaprovider"];
     }
 
     // DO NOT USE field numbers above 100,000 in AOSP.
     // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use.
     // Field numbers 200,000 and above are reserved for future use; do not use them at all.
+
+    reserved 10036;
 }
 
 /**
@@ -534,7 +684,8 @@
  */
 message ScreenStateChanged {
     // New screen state, from frameworks/base/core/proto/android/view/enums.proto.
-    optional android.view.DisplayStateEnum state = 1 [(state_field_option).option = EXCLUSIVE];
+    optional android.view.DisplayStateEnum state = 1
+            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
 }
 
 /**
@@ -545,10 +696,11 @@
  *   frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
  */
 message UidProcessStateChanged {
-    optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true];
+    optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true];
 
     // The state, from frameworks/base/core/proto/android/app/enums.proto.
-    optional android.app.ProcessStateEnum state = 2 [(state_field_option).option = EXCLUSIVE];
+    optional android.app.ProcessStateEnum state = 2
+            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
 }
 
 /**
@@ -580,7 +732,8 @@
         ASLEEP = 1;
         AWAKE = 2;
     }
-    optional State state = 1 [(state_field_option).option = EXCLUSIVE];
+    optional State state = 1
+            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
 }
 
 /**
@@ -599,7 +752,7 @@
         CRITICAL = 4;   // critical memory.
 
     }
-    optional State factor = 1 [(state_field_option).option = EXCLUSIVE];
+    optional State factor = 1 [(state_field_option).exclusive_state = true];
 }
 
 /**
@@ -632,6 +785,96 @@
 }
 
 /**
+ * Logs the change in wifi health.
+ *
+ * Logged from:
+ *   frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDataStall.java
+ */
+message WifiHealthStatReported {
+    enum Band {
+        UNKNOWN = 0;
+        // All of 2.4GHz band
+        BAND_2G = 1;
+        // Frequencies in the range of [5150, 5250) GHz
+        BAND_5G_LOW = 2;
+        // Frequencies in the range of [5250, 5725) GHz
+        BAND_5G_MIDDLE = 3;
+        // Frequencies in the range of [5725, 5850) GHz
+        BAND_5G_HIGH = 4;
+        // Frequencies in the range of [5925, 6425) GHz
+        BAND_6G_LOW = 5;
+        // Frequencies in the range of [6425, 6875) GHz
+        BAND_6G_MIDDLE = 6;
+        // Frequencies in the range of [6875, 7125) GHz
+        BAND_6G_HIGH = 7;
+    }
+    // duration this stat is obtained over in milliseconds
+    optional int32 duration_millis = 1;
+    // whether wifi is classified as sufficient for the user's data traffic, determined
+    // by whether the calculated throughput exceeds the average demand within |duration_millis|
+    optional bool is_sufficient = 2;
+    // whether cellular data is available
+    optional bool is_cell_data_available = 3;
+    // the Band bucket the connected network is on
+    optional Band band = 4;
+}
+
+/**
+ * Logged when wifi detects a significant change in connection failure rate.
+ *
+ * Logged from: frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiHealthMonitor.java
+ *
+ */
+message WifiFailureStatReported {
+    enum AbnormalityType {
+        UNKNOWN = 0;
+        SIGNIFICANT_INCREASE = 1;
+        SIGNIFICANT_DECREASE = 2;
+        SIMPLY_HIGH = 3;
+    }
+    enum FailureType {
+        FAILURE_UNKNOWN = 0;
+        FAILURE_CONNECTION = 1;
+        FAILURE_ASSOCIATION_REJECTION = 2;
+        FAILURE_ASSOCIATION_TIMEOUT = 3;
+        FAILURE_AUTHENTICATION = 4;
+        FAILURE_NON_LOCAL_DISCONNECTION = 5;
+        FAILURE_SHORT_CONNECTION_DUE_TO_NON_LOCAL_DISCONNECTION = 6;
+    }
+    // Reason for uploading this stat
+    optional AbnormalityType abnormality_type = 1;
+    // The particular type of failure
+    optional FailureType failure_type = 2;
+    // How many times we have encountered this combination of AbnormalityType and FailureType
+    optional int32 failure_count = 3;
+}
+
+/**
+ * Logs whether a wifi connection is successful and reasons for failure if it isn't.
+ *
+ * Logged from:
+ *   frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
+ */
+message WifiConnectionResultReported {
+    enum FailureCode {
+        FAILURE_UNKNOWN = 0;
+        FAILURE_ASSOCIATION_TIMEOUT = 1;
+        FAILURE_ASSOCIATION_REJECTION = 2;
+        FAILURE_AUTHENTICATION_GENERAL = 3;
+        FAILURE_AUTHENTICATION_EAP = 4;
+        FAILURE_DHCP = 5;
+        FAILURE_NETWORK_DISCONNECTION = 6;
+        FAILURE_ROAM_TIMEOUT = 7;
+    }
+    // true represents a successful connection
+    optional bool connection_result = 1;
+    // reason for the connection failure
+    optional FailureCode failure_code = 2;
+    // scan rssi before the connection attempt
+    optional int32 rssi = 3;
+}
+
+/**
  * Logs when memory stats of a process is reported.
  *
  * Logged from:
@@ -686,7 +929,8 @@
  *   packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
  */
 message BleScanStateChanged {
-    repeated AttributionNode attribution_node = 1;
+    repeated AttributionNode attribution_node = 1
+            [(state_field_option).primary_field_first_uid = true];
 
     enum State {
         OFF = 0;
@@ -694,14 +938,19 @@
         // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes).
         RESET = 2;
     }
-    optional State state = 2;
+    optional State state = 2 [
+        (state_field_option).exclusive_state = true,
+        (state_field_option).default_state_value = 0 /* State.OFF */,
+        (state_field_option).trigger_state_reset_value = 2 /* State.RESET */,
+        (state_field_option).nested = true
+    ];
 
     // Does the scan have a filter.
-    optional bool is_filtered = 3;
+    optional bool is_filtered = 3 [(state_field_option).primary_field = true];
     // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally.
-    optional bool is_first_match = 4;
+    optional bool is_first_match = 4 [(state_field_option).primary_field = true];
     // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC).
-    optional bool is_opportunistic = 5;
+    optional bool is_opportunistic = 5 [(state_field_option).primary_field = true];
 }
 
 /**
@@ -833,11 +1082,23 @@
         FREQUENT = 2;
         RARE = 3;
         NEVER = 4;
+        RESTRICTED = 5;
     }
     optional Bucket standby_bucket = 5 [default = UNKNOWN];
 
     // The job id (as assigned by the app).
     optional int32 job_id = 6;
+
+    // One flag for each of the API constraints defined by Jobscheduler. Does not include implcit
+    // constraints as they are always assumed to be set.
+    optional bool has_charging_constraint = 7;
+    optional bool has_battery_not_low_constraint = 8;
+    optional bool has_storage_not_low_constraint = 9;
+    optional bool has_timing_delay_constraint = 10;
+    optional bool has_deadline_constraint = 11;
+    optional bool has_idle_constraint = 12;
+    optional bool has_connectivity_constraint = 13;
+    optional bool has_content_trigger_constraint = 14;
 }
 
 /**
@@ -919,14 +1180,15 @@
  *   TODO
  */
 message WakelockStateChanged {
-    repeated AttributionNode attribution_node = 1;
+    repeated AttributionNode attribution_node = 1
+            [(state_field_option).primary_field_first_uid = true];
 
     // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock.
     // From frameworks/base/core/proto/android/os/enums.proto.
-    optional android.os.WakeLockLevelEnum type = 2;
+    optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).primary_field = true];
 
     // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
-    optional string tag = 3;
+    optional string tag = 3 [(state_field_option).primary_field = true];
 
     enum State {
         RELEASE = 0;
@@ -934,7 +1196,11 @@
         CHANGE_RELEASE = 2;
         CHANGE_ACQUIRE = 3;
     }
-    optional State state = 4;
+    optional State state = 4 [
+        (state_field_option).exclusive_state = true,
+        (state_field_option).default_state_value = 0,
+        (state_field_option).nested = true
+    ];
 }
 
 /**
@@ -984,7 +1250,8 @@
         OFF = 0;
         ON = 1;
     }
-    optional State state = 1;
+    optional State state = 1
+            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
 }
 
 /**
@@ -994,7 +1261,8 @@
  *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
  */
 message DeviceIdleModeStateChanged {
-    optional android.server.DeviceIdleModeEnum state = 1;
+    optional android.server.DeviceIdleModeEnum state = 1
+            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
 }
 
 
@@ -1005,7 +1273,8 @@
  *   frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
  */
 message DeviceIdlingModeStateChanged {
-    optional android.server.DeviceIdleModeEnum state = 1;
+    optional android.server.DeviceIdleModeEnum state = 1
+            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
 }
 
 /**
@@ -1038,7 +1307,8 @@
  */
 message ChargingStateChanged {
     // State of the battery, from frameworks/base/core/proto/android/os/enums.proto.
-    optional android.os.BatteryStatusEnum state = 1;
+    optional android.os.BatteryStatusEnum state = 1
+            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
 }
 
 /**
@@ -1049,7 +1319,8 @@
  */
 message PluggedStateChanged {
     // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto.
-    optional android.os.BatteryPluggedStateEnum state = 1;
+    optional android.os.BatteryPluggedStateEnum state = 1
+            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
 }
 
 /**
@@ -1067,18 +1338,8 @@
     // Name of source package (for historical reasons, since BatteryStats tracked it).
     optional string package_name = 3;
 
-    // These enum values match the STANDBY_BUCKET_XXX constants defined in UsageStatsManager.java.
-    enum Bucket {
-        UNKNOWN = 0;
-        EXEMPTED = 5;
-        ACTIVE = 10;
-        WORKING_SET = 20;
-        FREQUENT = 30;
-        RARE = 40;
-        NEVER = 50;
-    }
     // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired.
-    optional Bucket app_standby_bucket = 4;
+    optional AppStandbyBucketChanged.Bucket app_standby_bucket = 4;
 }
 
 /**
@@ -1139,6 +1400,8 @@
 }
 
 /**
+ * This atom is deprecated starting in R.
+ *
  * Logs when an app causes Wifi to run. In this context, 'to run' means to use Wifi Client Mode.
  * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'.
  * Note that Wifi Scanning is monitored separately in WifiScanStateChanged.
@@ -1789,12 +2052,15 @@
         REASON_EXPLICIT_HEALTH_CHECK = 2;
         REASON_APP_CRASH = 3;
         REASON_APP_NOT_RESPONDING = 4;
+        REASON_NATIVE_CRASH_DURING_BOOT = 5;
     }
     optional RollbackReasonType rollback_reason = 4;
 
     // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback
     // is initiated. Empty if the package is unknown.
     optional string failing_package_name = 5;
+
+    optional TrainExperimentIds experiment_ids = 6 [(log_mode) = MODE_BYTES];
 }
 
 /**
@@ -2518,8 +2784,9 @@
         STATE_DISCONNECTED = 0;
         STATE_CONNECTED = 1;
     }
-    optional State state = 1;
-    optional string id = 2;
+    optional State state = 1
+            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
+    optional string id = 2 [(state_field_option).primary_field = true];
     // Last active session in ms.
     // 0 when the port is in connected state.
     optional int64 last_connect_duration_millis = 3;
@@ -2750,21 +3017,32 @@
 
 message BackGesture {
     enum BackType {
-          DEFAULT_BACK_TYPE = 0;
-          COMPLETED = 1;
-          COMPLETED_REJECTED = 2; // successful because coming from rejected area
-          INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area
-          INCOMPLETE = 4;
+        DEFAULT_BACK_TYPE = 0;
+        COMPLETED = 1;
+        COMPLETED_REJECTED = 2; // successful because coming from rejected area
+        INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area
+        INCOMPLETE = 4;  // Unsuccessful, for reasons other than below.
+        INCOMPLETE_FAR_FROM_EDGE = 5;  // Unsuccessful, far from the edge.
+        INCOMPLETE_MULTI_TOUCH = 6;  // Unsuccessful, multi touch.
+        INCOMPLETE_LONG_PRESS = 7;  // Unsuccessful, long press.
+        INCOMPLETE_VERTICAL_MOVE = 8;  // Unsuccessful, move vertically.
     }
     optional BackType type = 1;
 
-    optional int32 y_coordinate = 2; // y coordinate for ACTION_DOWN event
+    optional int32 y_coordinate = 2 [deprecated = true]; // y coordinate for ACTION_DOWN event
+    optional int32 start_x = 4;  // X coordinate for ACTION_DOWN event.
+    optional int32 start_y = 5;  // Y coordinate for ACTION_DOWN event.
+    optional int32 end_x = 6;   // X coordinate for ACTION_MOVE event.
+    optional int32 end_y = 7;  // Y coordinate for ACTION_MOVE event.
+    optional int32 left_boundary = 8;  // left edge width + left inset
+    optional int32 right_boundary = 9;  // screen width - (right edge width + right inset)
+
     enum WindowHorizontalLocation {
         DEFAULT_LOCATION = 0;
         LEFT = 1;
         RIGHT = 2;
     }
-    optional WindowHorizontalLocation x_location = 3;
+    optional WindowHorizontalLocation x_location = 3 [deprecated = true];
 }
 
 message ExclusionRectStateChanged {
@@ -2783,14 +3061,125 @@
     optional int32 duration_millis = 7;
 }
 
-message LauncherUIChanged {
-    optional android.stats.launcher.LauncherAction action = 1;
-    optional android.stats.launcher.LauncherState src_state = 2;
-    optional android.stats.launcher.LauncherState dst_state = 3;
-    optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES];
-    optional bool is_swipe_up_enabled = 5;
+/**
+ * Logs when IME is on.
+ *
+ * Logged from: /packages/SystemUI/src/com/android/systemui/
+                statusbar/phone/NavigationBarView.java
+ *
+ */
+message ImeTouchReported {
+    optional int32 x_coordinate = 1;  // X coordinate for ACTION_DOWN event.
+    optional int32 y_coordinate = 2;  // Y coordinate for ACTION_DOWN event.
 }
 
+/**
+ * Logs when Launcher (HomeScreen) UI has changed or was interacted.
+ *
+ * Logged from:
+ *   packages/apps/Launcher3
+ */
+message LauncherUIChanged {
+    optional android.stats.launcher.LauncherAction action = 1 [deprecated = true];
+    optional android.stats.launcher.LauncherState src_state = 2;
+    optional android.stats.launcher.LauncherState dst_state = 3;
+    optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES, deprecated = true];
+    optional bool is_swipe_up_enabled = 5 [deprecated = true];
+
+    // The event id (e.g., app launch, drag and drop, long press)
+    optional int32 event_id = 6;
+    // The event's source or target id (e.g., icon, task, button)
+    optional int32 target_id = 7;
+    // If the target needs to be tracked, use this id field
+    optional int32 instance_id = 8;
+    optional int32 uid = 9 [(is_uid) = true];
+    optional string package_name = 10;
+    optional string component_name = 11;
+
+    // (x, y) coordinate and the index information of the target on the container
+    optional int32 grid_x = 12 [default = -1];
+    optional int32 grid_y = 13 [default = -1];
+    optional int32 page_id = 14 [default = -2];
+
+    // e.g., folder icon's (x, y) location and index information on the workspace
+    optional int32 grid_x_parent = 15 [default = -1];
+    optional int32 grid_y_parent = 16 [default = -1];
+    optional int32 page_id_parent = 17 [default = -2];
+
+    // e.g., SEARCHBOX_ALLAPPS, FOLDER_WORKSPACE
+    optional int32 hierarchy = 18;
+
+    optional bool is_work_profile = 19;
+
+    // Used to store the predicted rank of the target
+    optional int32 rank = 20 [default = -1];
+
+    // e.g., folderLabelState can be captured in the following two fields
+    optional int32 from_state = 21;
+    optional int32 to_state = 22;
+
+    // e.g., autofilled or suggested texts that are not user entered
+    optional string edittext = 23;
+
+    // e.g., number of contents inside a container (e.g., icons inside a folder)
+    optional int32 cardinality = 24;
+}
+
+/**
+ * Used for snapshot of the HomeScreen UI elements
+ *
+ * Logged from:
+ *   packages/apps/Launcher3
+ */
+message LauncherStaticLayout {
+    // The event id (e.g., snapshot, drag and drop)
+    optional int32 event_id = 1;
+    // The event's source or target id (e.g., icon, shortcut, widget)
+    optional int32 target_id = 2;
+    // If the target needs to be tracked, use this id field
+    optional int32 instance_id = 3;
+    optional int32 uid = 4 [(is_uid) = true];
+    optional string package_name = 5;
+    optional string component_name = 6;
+
+    // (x, y) coordinate and the index information of the target on the container
+    optional int32 grid_x = 7 [default = -1];
+    optional int32 grid_y = 8 [default = -1];
+    optional int32 page_id = 9 [default = -2];
+
+    // e.g., folder icon's (x, y) location and index information on the workspace
+    // e.g., when used with widgets target, use these values for (span_x, span_y)
+    optional int32 grid_x_parent = 10 [default = -1];
+    optional int32 grid_y_parent = 11 [default = -1];
+    optional int32 page_id_parent = 12 [default = -2];
+
+    // UNKNOWN = 0
+    // HOTSEAT = 1
+    // WORKSPACE = 2
+    // FOLDER_HOTSEAT = 3
+    // FOLDER_WORKSPACE = 4
+    optional int32 hierarchy = 13;
+
+    optional bool is_work_profile = 14;
+
+    // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION
+    optional int32 origin = 15;
+
+    // e.g., number of icons inside a folder
+    optional int32 cardinality = 16;
+
+    // e.g., (x, y) span of the widget inside homescreen grid system
+    optional int32 span_x = 17 [default = 1];
+    optional int32 span_y = 18 [default = 1];
+}
+
+/**
+ * Logs when Wallpaper or ThemePicker UI has changed.
+ *
+ * Logged from:
+ *   packages/apps/ThemePicker
+ *   packages/apps/WallpaperPicker2
+ */
 message StyleUIChanged {
     optional android.stats.style.Action action = 1;
     optional int32 color_package_hash = 2;
@@ -2848,12 +3237,14 @@
 message TouchEventReported {
     /**
      * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean,
-     * and the standard deviation of latency between the kernel and framework
-     * for touchscreen events. The units are microseconds.
+     * and the standard deviation of the time spent processing touchscreen events
+     * in the kernel and inputflinger. The units are microseconds.
      *
-     * The number is measured as the difference between the time at which
-     * the input event was received in the evdev driver,
-     * and the time at which the input event was received in EventHub.
+     * On supported devices, the starting point is taken during the hard interrupt inside the
+     * kernel touch driver. On all other devices, the starting point is taken inside
+     * the kernel's input event subsystem upon receipt of the input event.
+     * The ending point is taken inside InputDispatcher, just after the input event
+     * is sent to the app.
      */
     // Minimum value
     optional float latency_min_micros = 1;
@@ -3023,7 +3414,7 @@
     optional string process_name = 3;
 
     // The pid if available. -1 means not available.
-    optional sint32 pid = 4;
+    optional int32 pid = 4;
 
     optional string package_name = 5;
 
@@ -3059,7 +3450,7 @@
     optional string process_name = 3;
 
     // The pid if available. -1 means not available.
-    optional sint32 pid = 4;
+    optional int32 pid = 4;
 
     optional android.server.ErrorSource error_source = 5;
 }
@@ -3295,9 +3686,9 @@
  *     services/core/java/com/android/server/wm/Session.java
  */
 message OverlayStateChanged {
-    optional int32 uid = 1 [(is_uid) = true];
+    optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true];
 
-    optional string package_name = 2;
+    optional string package_name = 2 [(state_field_option).primary_field = true];
 
     optional bool using_alert_window = 3;
 
@@ -3305,15 +3696,16 @@
         ENTERED = 1;
         EXITED = 2;
     }
-    optional State state = 4;
+    optional State state = 4
+            [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
 }
 
-/*
+/**
  * Logs foreground service starts and stops.
  * Note that this is not when a service starts or stops, but when it is
  * considered foreground.
  * Logged from
- *     //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
+ *     frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
  */
 message ForegroundServiceStateChanged {
     optional int32 uid = 1 [(is_uid) = true];
@@ -3325,6 +3717,45 @@
         EXIT = 2;
     }
     optional State state = 3;
+
+    // Whether the fgs is allowed while-in-use permissions, i.e. is considered 'in-use' to the user.
+    // (If the fgs was started while the app wasn't TOP it usually will be denied these permissions)
+    optional bool allow_while_in_use_permission = 4;
+}
+
+/**
+ * Logs the number of times a uid accesses a sensitive AppOp during a foreground service session.
+ * A foreground service session is any continuous period during which the uid holds at least one
+ * foreground service; the atom will be pushed when the uid no longer holds any foreground services.
+ * Accesses initiated while the uid is in the TOP state are ignored.
+ * Sessions with no attempted accesses are not logged.
+ * Logged from
+ *     frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
+ */
+message ForegroundServiceAppOpSessionEnded {
+    optional int32 uid = 1 [(is_uid) = true];
+
+    // The operation's name.
+    // Only following four ops are logged
+    // COARSE_LOCATION = 0
+    // FINE_LOCATION = 1
+    // CAMERA = 26
+    // RECORD_AUDIO = 27
+    optional android.app.AppOpEnum app_op_name = 2 [default = APP_OP_NONE];
+
+    // The uid's permission mode for accessing the AppOp during this fgs session.
+    enum Mode {
+        MODE_UNKNOWN = 0;
+        MODE_ALLOWED = 1; // Always allowed
+        MODE_IGNORED = 2; // Denied
+        MODE_FOREGROUND = 3; // Allow-while-in-use (or allowed-one-time)
+    }
+    optional Mode app_op_mode = 3;
+
+    // Number of times this AppOp was requested and allowed.
+    optional int32 count_ops_accepted = 4;
+    // Number of times this AppOp was requested but denied.
+    optional int32 count_ops_rejected = 5;
 }
 
 /**
@@ -3471,7 +3902,7 @@
  */
 message AppDied {
     // timestamp(elapsedRealtime) of record creation
-    optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE];
+    optional uint64 timestamp_millis = 1 [(state_field_option).exclusive_state = true];
 }
 
 /**
@@ -3486,6 +3917,144 @@
 }
 
 /**
+ * Atom for simple logging of user interaction and impression events, such as "the user touched
+ * this button" or "this dialog was displayed".
+ * Keep the UI event stream clean: don't use for system or background events.
+ * Log using the UiEventLogger wrapper - don't write with the StatsLog API directly.
+ *
+ * Logged from:
+ *   frameworks/base/services/core/java/com/android/server/
+ *   frameworks/base/packages/SystemUI/src/com/android/systemui/
+ */
+message UiEventReported {
+    // The event_id.
+    optional int32 event_id = 1;
+    // The event's source or target uid and package, if applicable.
+    // For example, the package posting a notification, or the destination package of a share.
+    optional int32 uid = 2 [(is_uid) = true];
+    optional string package_name = 3;
+    // An identifier used to disambiguate which logs refer to a particular instance of some
+    // UI element. Useful when there might be multiple instances simultaneously active.
+    optional int32 instance_id = 4;
+}
+
+/**
+ * Reports a notification was created or updated.
+ *
+ * Logged from:
+ *   frameworks/base/services/core/java/com/android/server/notification/
+ */
+message NotificationReported {
+    // The event_id (as for UiEventReported).
+    optional int32 event_id = 1;
+    // The notifying app's uid and package.
+    optional int32 uid = 2 [(is_uid) = true];
+    optional string package_name = 3;
+    // A small system-assigned identifier for the notification.
+    // Locally probably-unique, but expect collisions across users and/or days.
+    optional int32 instance_id = 4;
+    optional int32 notification_id_hash = 5;  // Small hash of the app-assigned notif ID + tag
+    optional int32 channel_id_hash = 6;  // Small hash of app-assigned channel ID
+
+    // Grouping information
+    optional int32 group_id_hash = 7;  // Small hash of the group ID of the notification
+    optional int32 group_instance_id = 8;  // Instance_id of the group-summary notification
+    optional bool is_group_summary = 9;  // Tags the group-summary notification
+
+    // Attributes
+    optional string category = 10;   // App-assigned notification category (API-defined strings)
+    optional int32 style = 11;       // App-assigned notification style
+    optional int32 num_people = 12;  // Number of Person records attached to the notification
+
+    // Ordering, importance and interruptiveness
+
+    optional int32 position = 13;    // Position in NotificationManager's list
+
+    optional android.stats.sysui.NotificationImportance importance = 14;
+    optional int32 alerting = 15;    // Bitfield, 1=buzz 2=beep 4=blink
+
+    enum NotificationImportanceExplanation {
+        IMPORTANCE_EXPLANATION_UNKNOWN = 0;
+        IMPORTANCE_EXPLANATION_APP = 1;     // App-specified channel importance.
+        IMPORTANCE_EXPLANATION_USER = 2;    // User-specified channel importance.
+        IMPORTANCE_EXPLANATION_ASST = 3;    // Notification Assistant override.
+        IMPORTANCE_EXPLANATION_SYSTEM = 4;  // System override.
+        // Like _APP, but based on pre-channels priority signal.
+        IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5;
+    }
+
+    optional NotificationImportanceExplanation importance_source = 16;
+    optional android.stats.sysui.NotificationImportance importance_initial = 17;
+    optional NotificationImportanceExplanation importance_initial_source = 18;
+    optional android.stats.sysui.NotificationImportance importance_asst = 19;
+    optional int32 assistant_hash = 20;
+    optional float assistant_ranking_score = 21;
+}
+
+message Notification {
+    // The notifying app's uid and package.
+    optional int32 uid = 1 [(is_uid) = true];
+    optional string package_name = 2;
+    // A small system-assigned identifier for the notification.
+    optional int32 instance_id = 3;
+
+    // Grouping information.
+    optional int32 group_instance_id = 4;
+    optional bool is_group_summary = 5;
+
+    // The section of the shade that the notification is in.
+    // See NotificationSectionsManager.PriorityBucket.
+    enum NotificationSection {
+        SECTION_UNKNOWN = 0;
+        SECTION_HEADS_UP = 1;
+        SECTION_MEDIA_CONTROLS = 2;
+        SECTION_PEOPLE = 3;
+        SECTION_ALERTING = 4;
+        SECTION_SILENT = 5;
+    }
+    optional NotificationSection section = 6;
+}
+
+message NotificationList {
+    repeated Notification notifications = 1;  // An ordered sequence of notifications.
+}
+
+/**
+ * Reports a notification panel was displayed, e.g. from the lockscreen or status bar.
+ *
+ * Logged from:
+ *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
+ */
+message NotificationPanelReported {
+    // The event_id (as for UiEventReported).
+    optional int32 event_id = 1;
+    optional int32 num_notifications = 2;
+    // The notifications in the panel, in the order that they appear there.
+    optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES];
+}
+
+/**
+ * Reports a notification channel, or channel group, was created, updated, or deleted.
+ *
+ * Logged from:
+ *   frameworks/base/services/core/java/com/android/server/notification/
+ */
+message NotificationChannelModified {
+    // The event_id (as for UiEventReported).
+    optional int32 event_id = 1;
+    // The notifying app's uid and package.
+    optional int32 uid = 2 [(is_uid) = true];
+    optional string package_name = 3;
+    // Hash of app-assigned notification channel ID or channel-group ID
+    optional int32 channel_id_hash = 4;
+    // Previous importance setting, if applicable
+    optional android.stats.sysui.NotificationImportance old_importance = 5;
+    // New importance setting
+    optional android.stats.sysui.NotificationImportance importance = 6;
+}
+
+
+/**
  * Logs when a biometric acquire event occurs.
  *
  * Logged from:
@@ -3622,6 +4191,7 @@
 
 /**
  * Potential experiment ids that goes with a train install.
+ * Should be kept in sync with experiment_ids.proto.
  */
 message TrainExperimentIds {
     repeated int64 experiment_id = 1;
@@ -3673,12 +4243,16 @@
         INSTALL_FAILURE_DOWNLOAD = 23;
         INSTALL_FAILURE_STATE_MISMATCH = 24;
         INSTALL_FAILURE_COMMIT = 25;
+        REBOOT_TRIGGERED = 26;
     }
     optional State state = 6;
     // Possible experiment ids for monitoring this push.
     optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES];
     // user id
     optional int32 user_id = 8;
+    optional int32 reason = 9;
+    // Whether or not this is a rollback event
+    optional bool is_rollback = 10;
 }
 
 /* Test atom, is not logged anywhere */
@@ -3851,7 +4425,7 @@
         DIALOG_LINE_ITEM = 5;
     }
 
-    optional Type type = 1 [(state_field_option).option = EXCLUSIVE];
+    optional Type type = 1 [(state_field_option).exclusive_state = true];
 
     // Used if the type is LINE_ITEM
     optional string package_name = 2;
@@ -3981,6 +4555,145 @@
     optional State state  = 2;
 }
 
+message MimeTypes {
+    repeated string mime_types = 1;
+}
+
+/**
+ * Logs statistics regarding accesses to external storage.
+ * All stats are normalized for one day period.
+ *
+ * Logged from:
+ *   packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
+ */
+message GeneralExternalStorageAccessStats {
+    optional int32 uid = 1 [(is_uid) = true];
+    // Total number of accesses like creation, open, delete and rename/update.
+    // Includes file path and ContentResolver accesses
+    optional uint32 total_accesses = 2;
+    // Number of file path accesses, as opposed to file path and ContentResolver.
+    optional uint32 file_path_accesses = 3;
+    // Number of accesses on secondary volumes like SD cards.
+    // Includes file path and ContentResolver accesses
+    optional uint32 secondary_storage_accesses = 4;
+    // Comma-separated list of mime types that were accessed.
+    optional MimeTypes mime_types_accessed = 5;
+}
+
+/**
+ * Logs when MediaProvider has successfully finished scanning a storage volume.
+ *
+ * Logged from:
+ *   packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java
+ */
+message MediaProviderScanOccurred {
+    enum Reason {
+        // Scan triggered due to unknown reason
+        UNKNOWN = 0;
+        // Scan triggered due to storage volume being mounted
+        MOUNTED = 1;
+        // Scan triggered due to explicit user action or app request
+        DEMAND = 2;
+        // Scan triggered due to idle maintenance
+        IDLE = 3;
+    }
+
+    // Volume type that this event pertains to
+    optional android.stats.mediaprovider.VolumeType volume_type = 1;
+    // Reason why this scan was triggered
+    optional Reason reason = 2;
+    // Total number of files scanned
+    optional int64 item_count = 3;
+    // Duration of scan, normalized per file
+    optional float normalized_duration_millis = 4;
+    // Number of database inserts, normalized per file
+    optional float normalized_insert_count = 5;
+    // Number of database updates, normalized per file
+    optional float normalized_update_count = 6;
+    // Number of database deletes, normalized per file
+    optional float normalized_delete_count = 7;
+}
+
+/**
+ * Logs when an app has asked MediaProvider to delete media belonging to the user.
+ *
+ * Logged from:
+ *   packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
+ */
+message MediaContentDeleted {
+    // Volume type that this event pertains to
+    optional android.stats.mediaprovider.VolumeType volume_type = 1;
+    // UID of app that requested deletion
+    optional int32 uid = 2 [(is_uid) = true];
+    // Number of items that were deleted
+    optional int32 item_count = 3;
+}
+
+/**
+ * Logs when an app has asked MediaProvider to grant them access to media belonging to the user.
+ *
+ * Logged from:
+ *   packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java
+ */
+message MediaProviderPermissionRequested {
+    enum Result {
+        UNKNOWN = 0;
+        USER_GRANTED = 1;
+        AUTO_GRANTED = 2;
+        USER_DENIED = 3;
+        USER_DENIED_WITH_PREJUDICE = 4;
+        AUTO_DENIED = 5;
+    }
+
+    // Volume type that this event pertains to
+    optional android.stats.mediaprovider.VolumeType volume_type = 1;
+    // UID of app that requested permission
+    optional int32 uid = 2 [(is_uid) = true];
+    // Number of items that were requested
+    optional int32 item_count = 3;
+    // Result of this request
+    optional Result result = 4;
+}
+
+/**
+ * Logs when MediaProvider has finished upgrading or downgrading its database schema.
+ *
+ * Logged from:
+ *   packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java
+ */
+message MediaProviderSchemaChanged {
+    // Volume type that this event pertains to
+    optional android.stats.mediaprovider.VolumeType volume_type = 1;
+    // Old database version code
+    optional int32 version_from = 2;
+    // New database version code
+    optional int32 version_to = 3;
+    // Total number of files in database
+    optional int64 item_count = 4;
+    // Duration of schema change, normalized per file
+    optional float normalized_duration_millis = 5;
+}
+
+/**
+ * Logs when MediaProvider has finished an idle maintenance job.
+ *
+ * Logged from:
+ *   packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
+ */
+message MediaProviderIdleMaintenanceFinished {
+    // Volume type that this event pertains to
+    optional android.stats.mediaprovider.VolumeType volume_type = 1;
+
+    // Total number of files in database
+    optional int64 item_count = 2;
+    // Duration of idle maintenance, normalized per file
+    optional float normalized_duration_millis = 3;
+    // Number of thumbnails found to be stale, normalized per file
+    optional float normalized_stale_thumbnails = 4;
+    // Number of items found to be expired, normalized per file
+    optional float normalized_expired_media = 5;
+}
+
 /**
  * Represents boot time event with duration in ms.
  *
@@ -4190,8 +4903,7 @@
  * after an OTA.
  *
  * Logged from:
- *  - system/core/fs_mgr/libsnapshot/snapshot.cpp
- *  - system/core/fs_mgr/libsnapshot/snapshotctl.cpp
+ *  - system/update_engine/cleanup_previous_update_action.cc
  */
 message SnapshotMergeReported {
     // Keep in sync with
@@ -4229,6 +4941,106 @@
     // Number of reboots that occurred after issuing and before completing the
     // merge of all the snapshot devices.
     optional int32 intermediate_reboots = 3;
+
+    // The device has been upgraded to Virtual A/B.
+    optional bool is_vab_retrofit = 4;
+
+    // Space that has been temporarily allocated in the /data partition
+    // containing the dm-snapshot's copy-on-write data generated during a
+    // Virtual A/B update.
+    optional int64 cow_file_size_bytes = 5;
+}
+
+/**
+ * Event representing when BlobStoreManager.Session#commit() is called
+ *
+ * Logged from:
+ *  frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
+ */
+message BlobCommitted {
+    // Uid of the Blob committer
+    optional int32 uid = 1 [(is_uid) = true];
+
+    // Id of the Blob committed
+    optional int64 blob_id = 2;
+
+    // Size of the Blob
+    optional int64 size = 3;
+
+    enum Result {
+        UNKNOWN = 0;
+        // Commit Succeeded
+        SUCCESS = 1;
+        // Commit Failed: Error occurred during commit
+        ERROR_DURING_COMMIT = 2;
+        // Commit Failed: Digest of the data did not match Blob digest
+        DIGEST_MISMATCH = 3;
+        // Commit Failed: Allowed count limit exceeded
+        COUNT_LIMIT_EXCEEDED = 4;
+    }
+    optional Result result = 4;
+}
+
+/**
+ * Event representing when BlobStoreManager#acquireLease() is called
+ *
+ * Logged from:
+ *  frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
+ */
+message BlobLeased{
+    // Uid of the Blob leasee
+    optional int32 uid = 1 [(is_uid) = true];
+
+    // Id of the Blob leased or 0 if the Blob does not exist
+    optional int64 blob_id = 2;
+
+    // Size of the Blob or 0 if the Blob does not exist
+    optional int64 size = 3;
+
+    enum Result {
+        UNKNOWN = 0;
+        // Lease Succeeded
+        SUCCESS = 1;
+        // Lease Failed: Blob does not exist
+        BLOB_DNE = 2;
+        // Lease Failed: Leasee does not have access to the Blob
+        ACCESS_NOT_ALLOWED = 3;
+        // Lease Failed: Leasee requested an invalid expiry duration
+        LEASE_EXPIRY_INVALID = 4;
+        // Lease Failed: Leasee has exceeded the total data lease limit
+        DATA_SIZE_LIMIT_EXCEEDED = 5;
+        // Leasee Failed: Allowed count limit exceeded
+        COUNT_LIMIT_EXCEEDED = 6;
+    }
+    optional Result result = 4;
+}
+
+/**
+ * Event representing when BlobStoreManager#openBlob() is called
+ *
+ * Logged from:
+ *  frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
+ */
+message BlobOpened{
+    // Uid of the Blob opener
+    optional int32 uid = 1 [(is_uid) = true];
+
+    // Id of the Blob opened or 0 if the Blob does not exist
+    optional int64 blob_id = 2;
+
+    // Size of the Blob or 0 if the Blob does not exist
+    optional int64 size = 3;
+
+    enum Result {
+        UNKNOWN = 0;
+        // Open Succeeded
+        SUCCESS = 1;
+        // Open Failed: Blob does not exist
+        BLOB_DNE = 2;
+        // Open Failed: Opener does not have access to the Blob
+        ACCESS_NOT_ALLOWED = 3;
+    }
+    optional Result result = 4;
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -4315,6 +5127,66 @@
 }
 
 /**
+ * Used for pull network statistics via mobile|wifi networks, and sliced by interesting dimensions.
+ * Note that the data is expected to be sliced into more dimensions in future. In other words,
+ * the caller must not assume any row of data is one full report when filtering with a set of
+ * matching conditions, because future data may represent with multiple rows what is currently
+ * represented by one.
+ * To avoid being broken by future slicing, callers must take care to aggregate rows even if they
+ * query all the existing columns.
+ *
+ * Pulled from:
+ *   StatsPullAtomService (using NetworkStatsService to get NetworkStats)
+ */
+message DataUsageBytesTransfer {
+    // State of this record. Should be NetworkStats#SET_DEFAULT or NetworkStats#SET_FOREGROUND to
+    // indicate the foreground state, or NetworkStats#SET_ALL to indicate the record is for all
+    // states combined, not including debug states. See NetworkStats#SET_*.
+    optional int32 state = 1;
+
+    optional int64 rx_bytes = 2;
+
+    optional int64 rx_packets = 3;
+
+    optional int64 tx_bytes = 4;
+
+    optional int64 tx_packets = 5;
+
+    // Radio Access Technology (RAT) type of this record, should be one of
+    // TelephonyManager#NETWORK_TYPE_* constants, or NetworkTemplate#NETWORK_TYPE_ALL to indicate
+    // the record is for all rat types combined.
+    optional int32 rat_type = 6;
+
+    // Mcc/Mnc read from sim if the record is for a specific subscription, null indicates the
+    // record is combined across subscriptions.
+    optional string sim_mcc = 7;
+    optional string sim_mnc = 8;
+
+    // Allows mobile virtual network operators (MVNOs) to be identified with individual IDs.
+    // See TelephonyManager#getSimCarrierId.
+    optional int32 carrier_id = 9;
+
+    // Enumeration of opportunistic states with an additional ALL state indicates the record is
+    // combined regardless of the boolean value in its field.
+    enum DataSubscriptionState {
+        UNKNOWN = 0; // For server side backward compatibility.
+        ALL = 1;
+        OPPORTUNISTIC = 2;
+        NOT_OPPORTUNISTIC = 3;
+    }
+    // Mark whether the subscription is an opportunistic data subscription, and ALL indicates the
+    // record is combined across opportunistic data subscriptions.
+    // See {@link SubscriptionManager#setOpportunistic}.
+    optional DataSubscriptionState opportunistic_data_sub = 10;
+
+    // Indicate whether NR is connected, server side could use this with RAT type to determine if
+    // the record is for 5G NSA (Non Stand Alone) mode, where the primary cell is still LTE and
+    // network allocates a secondary 5G cell so telephony reports RAT = LTE along with NR state as
+    // connected.
+    optional bool is_nr_connected = 11;
+}
+
+/**
  * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller.
  *
  * Pulled from:
@@ -4521,8 +5393,8 @@
     optional int64 page_major_fault = 5;
 
     // RSS
-    // Value is read from /proc/PID/status. Or from memory.stat, field
-    // total_rss if per-app memory cgroups are enabled.
+    // Value is read from memory.stat, field total_rss if per-app memory
+    // cgroups are enabled. Otherwise, value from /proc/pid/stat.
     optional int64 rss_in_bytes = 6;
 
     // CACHE
@@ -4532,56 +5404,17 @@
 
     // SWAP
     // Value is read from memory.stat, field total_swap if per-app memory
-    // cgroups are enabled. Otherwise, VmSwap from /proc/PID/status.
+    // cgroups are enabled. Otherwise, 0.
     optional int64 swap_in_bytes = 8;
 
-    // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0.
+    // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1.
     optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true];
 
-    // Elapsed real time when the process started.
-    // Value is read from /proc/PID/stat, field 22. 0 if read from per-app memory cgroups.
-    optional int64 start_time_nanos = 10;
+    // Deprecated: use ProcessMemorySnapshot atom instead. Always -1.
+    optional int64 start_time_nanos = 10 [deprecated = true];
 
-    // Anonymous page size plus swap size. Values are read from /proc/PID/status.
-    optional int32 anon_rss_and_swap_in_kilobytes = 11;
-}
-
-/*
- * Logs the memory stats for a native process (from procfs).
- *
- * Pulled from StatsCompanionService for selected native processes.
- */
-message NativeProcessMemoryState {
-    // The uid if available. -1 means not available.
-    optional int32 uid = 1 [(is_uid) = true];
-
-    // The process name.
-    // Value read from /proc/PID/cmdline.
-    optional string process_name = 2;
-
-    // # of page-faults
-    optional int64 page_fault = 3;
-
-    // # of major page-faults
-    optional int64 page_major_fault = 4;
-
-    // RSS
-    // Value read from /proc/PID/status.
-    optional int64 rss_in_bytes = 5;
-
-    // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0.
-    optional int64 rss_high_watermark_in_bytes = 6 [deprecated = true];
-
-    // Elapsed real time when the process started.
-    // Value is read from /proc/PID/stat, field 22.
-    optional int64 start_time_nanos = 7;
-
-    // SWAP
-    // Value read from /proc/PID/status, field VmSwap.
-    optional int64 swap_in_bytes = 8;
-
-    // Anonymous page size plus swap size. Values are read from /proc/PID/status.
-    optional int32 anon_rss_and_swap_in_kilobytes = 9;
+    // Deprecated: use ProcessMemorySnapshot atom instead. Always -1.
+    optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true];
 }
 
 /*
@@ -4601,9 +5434,53 @@
     // Provided by ActivityManagerService or read from /proc/PID/cmdline.
     optional string process_name = 2;
 
+    // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is
+    // computed by converting kilobytes to bytes.
+    optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true];
+
     // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in
     // /proc/PID/status.
-    optional int64 rss_high_water_mark_in_bytes = 3;
+    optional int32 rss_high_water_mark_in_kilobytes = 4;
+}
+
+/*
+ * Logs the memory stats for a process.
+ *
+ * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService)
+ * and for selected native processes.
+ */
+message ProcessMemorySnapshot {
+    // The uid if available. -1 means not available.
+    optional int32 uid = 1 [(is_uid) = true];
+
+    // The process name.
+    // Usually package name or process cmdline.
+    // Provided by ActivityManagerService or read from /proc/PID/cmdline.
+    optional string process_name = 2;
+
+    // The pid of the process.
+    // Allows to disambiguate instances of the process.
+    optional int32 pid = 3;
+
+    // The current OOM score adjustment value.
+    // Read from ProcessRecord for managed processes.
+    // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones.
+    optional int32 oom_score_adj = 4;
+
+    // The current RSS of the process.
+    // VmRSS from /proc/pid/status.
+    optional int32 rss_in_kilobytes = 5;
+
+    // The current anon RSS of the process.
+    // RssAnon from /proc/pid/status.
+    optional int32 anon_rss_in_kilobytes = 6;
+
+    // The current swap size of the process.
+    // VmSwap from /proc/pid/status.
+    optional int32 swap_in_kilobytes = 7;
+
+    // The sum of rss_in_kilobytes and swap_in_kilobytes.
+    optional int32 anon_rss_and_swap_in_kilobytes = 8;
 }
 
 /*
@@ -5026,48 +5903,81 @@
 }
 
 message AggStats {
-    optional int64 min = 1;
+    // These are all in byte resolution.
+    optional int64 min = 1 [deprecated = true];
+    optional int64 average = 2 [deprecated = true];
+    optional int64 max = 3 [deprecated = true];
 
-    optional int64 average = 2;
-
-    optional int64 max = 3;
+    // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above
+    // int64 fields.
+    optional int32 mean_kb = 4;
+    optional int32 max_kb = 5;
 }
 
+// A reduced subset of process states; reducing the number of possible states allows more
+// aggressive device-side aggregation of statistics and hence reduces metric upload size.
+enum ProcessStateAggregated {
+    PROCESS_STATE_UNKNOWN = 0;
+    // Persistent system process.
+    PROCESS_STATE_PERSISTENT = 1;
+    // Top activity; actually any visible activity.
+    PROCESS_STATE_TOP = 2;
+    // Process binding to top or a foreground service.
+    PROCESS_STATE_BOUND_TOP_OR_FGS = 3;
+    // Processing running a foreground service.
+    PROCESS_STATE_FGS = 4;
+    // Important foreground process (ime, wallpaper, etc).
+    PROCESS_STATE_IMPORTANT_FOREGROUND = 5;
+    // Important background process.
+    PROCESS_STATE_BACKGROUND = 6;
+    // Process running a receiver.
+    PROCESS_STATE_RECEIVER = 7;
+    // All kinds of cached processes.
+    PROCESS_STATE_CACHED = 8;
+}
+
+// Next tag: 13
 message ProcessStatsStateProto {
     optional android.service.procstats.ScreenState screen_state = 1;
 
-    optional android.service.procstats.MemoryState memory_state = 2;
+    optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true];
 
     // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
     // and not frameworks/base/core/java/android/app/ActivityManager.java
-    optional android.service.procstats.ProcessState process_state = 3;
+    optional android.service.procstats.ProcessState process_state = 3 [deprecated = true];
+
+    optional ProcessStateAggregated process_state_aggregated = 10;
 
     // Millisecond uptime duration spent in this state
-    optional int64 duration_millis = 4;
+    optional int64 duration_millis = 4 [deprecated = true];
+    // Same as above, but with minute resolution so it fits into an int32.
+    optional int32 duration_minutes = 11;
 
     // Millisecond elapsed realtime duration spent in this state
-    optional int64 realtime_duration_millis = 9;
+    optional int64 realtime_duration_millis = 9 [deprecated = true];
+    // Same as above, but with minute resolution so it fits into an int32.
+    optional int32 realtime_duration_minutes = 12;
 
     // # of samples taken
     optional int32 sample_size = 5;
 
     // PSS is memory reserved for this process
-    optional AggStats pss = 6;
+    optional AggStats pss = 6 [deprecated = true];
 
     // USS is memory shared between processes, divided evenly for accounting
-    optional AggStats uss = 7;
+    optional AggStats uss = 7 [deprecated = true];
 
     // RSS is memory resident for this process
     optional AggStats rss = 8;
 }
 
-// Next Tag: 7
+// Next Tag: 8
 message ProcessStatsProto {
     // Name of process.
     optional string process = 1;
 
     // Uid of the process.
-    optional int32 uid = 2;
+    optional int32 uid = 2 [(is_uid) = true];
 
     // Information about how often kills occurred
     message Kill {
@@ -5080,7 +5990,7 @@
         // PSS stats during cached kill
         optional AggStats cached_pss = 3;
     }
-    optional Kill kill = 3;
+    optional Kill kill = 3 [deprecated = true];
 
     // Time and memory spent in various states.
     repeated ProcessStatsStateProto states = 5;
@@ -5088,6 +5998,28 @@
     // Total time process has been running...  screen_state, memory_state, and process_state
     // will not be set.
     optional ProcessStatsStateProto total_running_state = 6;
+
+    // Association data for this process in this state;
+    // each entry here is one association.
+    repeated ProcessStatsAssociationProto assocs = 7;
+}
+
+// Next Tag: 6
+message ProcessStatsAssociationProto {
+    // Procss Name of the associated process (client process of service binding)
+    optional string assoc_process_name = 1;
+
+    // Package Name of the associated package (client package of service binding)
+    optional string assoc_package_name = 2 [deprecated = true];
+
+    // UID of the associated process/package (client package of service binding)
+    optional int32 assoc_uid = 5 [(is_uid) = true];
+
+    // Total count of the times this association (service binding) appeared.
+    optional int32 total_count = 3;
+
+    // Uptime total duration in seconds this association (service binding) was around.
+    optional int32 total_duration_secs = 4;
 }
 
 message PackageServiceOperationStatsProto {
@@ -5236,6 +6168,10 @@
  */
 message ProcStats {
     optional ProcessStatsSectionProto proc_stats_section = 1;
+    // Data pulled from device into this is sometimes sharded across multiple atoms to work around
+    // a size limit. When this happens, this shard ID will contain an increasing 1-indexed integer
+    // with the number of this shard.
+    optional int32 shard_id = 2;
 }
 
 /**
@@ -5263,6 +6199,141 @@
     optional NotificationRemoteViewsProto notification_remote_views = 1;
 }
 
+/**
+ * Atom that contains a list of a package's preferences, pulled from NotificationManagerService.java
+ */
+message PackageNotificationPreferences {
+    // Uid under which the package is installed.
+    optional int32 uid = 1 [(is_uid) = true];
+    // Notification importance, which specifies when and how a notification is displayed.
+    // Specified under core/java/android/app/NotificationManager.java.
+    optional int32 importance = 2;
+    // Lockscreen visibility as set by the user.
+    optional int32 visibility = 3;
+    // Bitfield mask indicating what fields were locked by the user (see LockableAppfields in
+    // PreferencesHelper.java)
+    optional int32 user_locked_fields = 4;
+}
+
+/**
+ * Atom that contains a list of a package's channel preferences, pulled from
+ * NotificationManagerService.java.
+ */
+message PackageNotificationChannelPreferences {
+    // Uid under which the package is installed.
+    optional int32 uid = 1 [(is_uid) = true];
+    // Channel's ID. Should always be available.
+    optional string channel_id = 2;
+    // Channel's name. Should always be available.
+    optional string channel_name = 3;
+    // Channel's description. Optionally set by the channel creator.
+    optional string description = 4;
+    // Notification importance, which specifies when and how a notification is displayed. Specified
+    // under core/java/android/app/NotificationManager.java.
+    optional int32 importance = 5;
+    // Bitmask representing which fields have been set by the user. See field bitmask descriptions
+    // at core/java/android/app/NotificationChannel.java
+    optional int32 user_locked_fields = 6;
+    // Indicates if the channel was deleted by the app.
+    optional bool is_deleted = 7;
+    // Indicates if the channel was marked as a conversation by the app.
+    optional bool is_conversation = 8;
+    // Indicates if the channel is a conversation that was demoted by the user.
+    optional bool is_demoted_conversation = 9;
+    // Indicates if the channel is a conversation that was marked as important by the user.
+    optional bool is_important_conversation = 10;
+}
+
+/**
+ * Atom that represents an item in the list of Do Not Disturb rules, pulled from
+ * NotificationManagerService.java.
+ */
+message DNDModeProto {
+    enum Mode {
+        ROOT_CONFIG = -1;  // Used to distinguish the config (one per user) from the rules.
+        ZEN_MODE_OFF = 0;
+        ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
+        ZEN_MODE_NO_INTERRUPTIONS = 2;
+        ZEN_MODE_ALARMS = 3;
+    }
+    optional int32 user = 1;  // Android user ID (0, 1, 10, ...)
+    optional bool enabled = 2;  // true for ROOT_CONFIG if a manualRule is enabled
+    optional bool channels_bypassing = 3; // only valid for ROOT_CONFIG
+    optional Mode zen_mode = 4;
+    // id is one of the system default rule IDs, or empty
+    // May also be "MANUAL_RULE" to indicate app-activation of the manual rule.
+    optional string id = 5;
+    optional int32 uid = 6 [(is_uid) = true]; // currently only SYSTEM_UID or 0 for other
+    optional DNDPolicyProto policy = 7;
+}
+
+/**
+ * Atom that represents a Do Not Disturb policy, an optional detail proto for DNDModeProto.
+ */
+message DNDPolicyProto {
+    enum State {
+        STATE_UNSET = 0;
+        STATE_ALLOW = 1;
+        STATE_DISALLOW = 2;
+    }
+    optional State calls = 1;
+    optional State repeat_callers = 2;
+    optional State messages = 3;
+    optional State conversations = 4;
+    optional State reminders = 5;
+    optional State events = 6;
+    optional State alarms = 7;
+    optional State media = 8;
+    optional State system = 9;
+    optional State fullscreen = 10;
+    optional State lights = 11;
+    optional State peek = 12;
+    optional State status_bar = 13;
+    optional State badge = 14;
+    optional State ambient = 15;
+    optional State notification_list = 16;
+
+    enum PeopleType {
+        PEOPLE_UNSET = 0;
+        PEOPLE_ANYONE = 1;
+        PEOPLE_CONTACTS = 2;
+        PEOPLE_STARRED = 3;
+        PEOPLE_NONE = 4;
+    }
+
+    optional PeopleType allow_calls_from = 17;
+    optional PeopleType allow_messages_from = 18;
+
+    enum ConversationType {
+        CONV_UNSET = 0;
+        CONV_ANYONE = 1;
+        CONV_IMPORTANT = 2;
+        CONV_NONE = 3;
+    }
+
+    optional ConversationType allow_conversations_from = 19;
+}
+
+/**
+ * Atom that contains a list of a package's channel group preferences, pulled from
+ * NotificationManagerService.java.
+ */
+message PackageNotificationChannelGroupPreferences {
+    // Uid under which the package is installed.
+    optional int32 uid = 1 [(is_uid) = true];
+    // Channel Group's ID. Should always be available.
+    optional string group_id = 2;
+    // Channel Group's name. Should always be available.
+    optional string group_name = 3;
+    // Channel Group's description. Optionally set by group creator.
+    optional string description = 4;
+    // Indicates if notifications from this channel group are blocked.
+    optional bool is_blocked = 5;
+    // Bitmask representing which fields have been set by the user. See field bitmask descriptions
+    // at core/java/android/app/NotificationChannelGroup.java
+    optional int32 user_locked_fields = 6;
+}
+
 message PowerProfileProto {
     optional double cpu_suspend = 1;
 
@@ -5494,6 +6565,16 @@
         SET_WHITELIST = 3;
         SET_DISABLED = 4;
         ON_USER_DATA_REMOVED = 5;
+        ON_DATA_SHARE_REQUEST = 6;
+        ACCEPT_DATA_SHARE_REQUEST = 7;
+        REJECT_DATA_SHARE_REQUEST = 8;
+        DATA_SHARE_WRITE_FINISHED = 9;
+        DATA_SHARE_ERROR_IOEXCEPTION = 10;
+        DATA_SHARE_ERROR_EMPTY_DATA = 11;
+        DATA_SHARE_ERROR_CLIENT_PIPE_FAIL = 12;
+        DATA_SHARE_ERROR_SERVICE_PIPE_FAIL = 13;
+        DATA_SHARE_ERROR_CONCURRENT_REQUEST = 14;
+        DATA_SHARE_ERROR_TIMEOUT_INTERRUPTED = 15;
     }
     optional Event event = 1;
     // component/package of content capture service.
@@ -5785,6 +6866,15 @@
     optional int32 repeatedly_pick_times = 7;
 }
 
+/** Logs the drag and drop of files.
+
+ * Logged from:
+ *     package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
+ */
+message DocsUIDragAndDropReported {
+    optional bool drag_initiated_from_docsui = 1;
+}
+
 /**
  * Logs when an app's memory is compacted.
  *
@@ -6431,10 +7521,10 @@
     optional int64 request_id = 1;
 
     // UID of package requesting the permission grant
-    optional int32 requesting_uid = 2 [(is_uid) = true];
+    optional int32 uid = 2 [(is_uid) = true];
 
     // Name of package requesting the permission grant
-    optional string requesting_package_name = 3;
+    optional string package_name = 3;
 
     // The permission to be granted
     optional string permission_name = 4;
@@ -6462,6 +7552,20 @@
         AUTO_DENIED = 8;
         // permission request was ignored because permission is restricted
         IGNORED_RESTRICTED_PERMISSION = 9;
+        // one time permission was granted by user action
+        USER_GRANTED_ONE_TIME = 10;
+        // user ignored request by leaving the request screen without choosing any option
+        USER_IGNORED = 11;
+        // user granted the permission after being linked to settings
+        USER_GRANTED_IN_SETTINGS = 12;
+        // user denied the permission after being linked to settings
+        USER_DENIED_IN_SETTINGS = 13;
+        // user denied the permission with prejudice after being linked to settings
+        USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14;
+        // permission was automatically revoked after one-time permission expired
+        AUTO_ONE_TIME_PERMISSION_REVOKED = 15;
+        // permission was automatically revoked for unused app
+        AUTO_UNUSED_APP_PERMISSION_REVOKED = 16;
     }
     // The result of the permission grant
     optional Result result = 6;
@@ -6922,8 +8026,58 @@
 }
 
 /**
- * State of a dangerous permission requested by a package
+ * Track Legacy DRM usage
+ * Logged from
+ *   frameworks/av/drm/drmserver/DrmManager.cpp
  */
+message MediametricsDrmManagerReported {
+    optional int64 timestamp_nanos = 1;
+    optional string package_name = 2;
+    optional int64 package_version_code = 3;
+    optional int64 media_apex_version = 4;
+
+    enum Method {
+        METHOD_NOT_FOUND       = -1;
+        GET_CONSTRAINTS        =  0;
+        GET_METADATA           =  1;
+        CAN_HANDLE             =  2;
+        PROCESS_DRM_INFO       =  3;
+        ACQUIRE_DRM_INFO       =  4;
+        SAVE_RIGHTS            =  5;
+        GET_ORIGINAL_MIME_TYPE =  6;
+        GET_DRM_OBJECT_TYPE    =  7;
+        CHECK_RIGHTS_STATUS    =  8;
+        REMOVE_RIGHTS          =  9;
+        REMOVE_ALL_RIGHTS      = 10;
+        OPEN_CONVERT_SESSION   = 11;
+        OPEN_DECRYPT_SESSION   = 12;
+    }
+
+    // plugin_id+description inform which Legacy DRM plugins are still in use on device
+    optional string plugin_id = 5;
+    optional string description = 6;
+    optional Method method = 7;
+    optional string mime_types = 8;
+
+    optional int64 get_constraints_count =  9;
+    optional int64 get_metadata_count = 10;
+    optional int64 can_handle_count = 11;
+    optional int64 process_drm_info_count = 12;
+    optional int64 acquire_drm_info_count = 13;
+    optional int64 save_rights_count = 14;
+    optional int64 get_original_mime_type_count = 15;
+    optional int64 get_drm_object_type_count = 16;
+    optional int64 check_rights_status_count = 17;
+    optional int64 remove_rights_count = 18;
+    optional int64 remove_all_rights_count = 19;
+    optional int64 open_convert_session_count = 20;
+    optional int64 open_decrypt_session_count = 21;
+}
+
+/**
+ * State of a dangerous permission requested by a package
+ * Pulled from: StatsCompanionService
+*/
 message DangerousPermissionState {
     // Name of the permission
     optional string permission_name = 1;
@@ -6955,7 +8109,8 @@
     optional string method_name = 2;
 
     // True if the package is preinstalled.
-    optional bool is_preinstalled = 3;
+    // Starting from Android 11, this boolean is not set and will always be false.
+    optional bool is_preinstalled = 3 [deprecated = true];
 
     // True if the package is privileged.
     // Starting from Android 11, this boolean is not set and will always be false.
@@ -7003,6 +8158,7 @@
         INSTALL_FAILURE_DOWNLOAD = 23;
         INSTALL_FAILURE_STATE_MISMATCH = 24;
         INSTALL_FAILURE_COMMIT = 25;
+        REBOOT_TRIGGERED = 26;
     }
     optional Status status = 4;
 }
@@ -7131,6 +8287,12 @@
 
     // CPU Vulkan implementation is in use.
     optional bool cpu_vulkan_in_use = 6;
+
+    // App is not doing pre-rotation correctly.
+    optional bool false_prerotation = 7;
+
+    // App creates GLESv1 context.
+    optional bool gles_1_in_use = 8;
 }
 
 /*
@@ -7139,11 +8301,27 @@
  * Pulled from StatsCompanionService.
  */
 message SystemIonHeapSize {
+    // Deprecated due to limited support of ion stats in debugfs.
+    // Use `IonHeapSize` instead.
+    option deprecated = true;
+
     // Size of the system ion heap in bytes.
+    // Read from debugfs.
     optional int64 size_in_bytes = 1;
 }
 
 /*
+ * Logs the total size of the ion heap.
+ *
+ * Pulled from StatsCompanionService.
+ */
+message IonHeapSize {
+    // Total size of all ion heaps in kilobytes.
+    // Read from: /sys/kernel/ion/total_heaps_kb.
+    optional int32 total_size_kb = 1;
+}
+
+/*
  * Logs the per-process size of the system ion heap.
  *
  * Pulled from StatsCompanionService.
@@ -7234,8 +8412,14 @@
  * Logged from the Intelligence mainline module.
  */
 message IntelligenceEventReported {
+  // The event type.
   optional android.stats.intelligence.EventType event_id = 1;
+  // Success, failure.
   optional android.stats.intelligence.Status status = 2;
+  // How many times the event occured (to report a batch of high frequency events).
+  optional int32 count = 3;
+  // How long the event took (sum of durations if count > 1)
+  optional int64 duration_millis = 4;
 }
 
 /**
@@ -7258,6 +8442,245 @@
 }
 
 /**
+ * Logs when Car User Hal is requested to switch/create/remove user.
+ *
+ * Logged from:
+ *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
+ */
+message CarUserHalModifyUserRequestReported {
+    // Request id for the request.
+    optional int32 request_id = 1;
+    // Request type.
+    enum RequestType {
+        UNKNOWN = 0;
+        // Car user manager requested user switch.
+        SWITCH_REQUEST_ANDROID = 1;
+        // OEM requested User switch.
+        SWITCH_REQUEST_OEM = 2;
+        // Hal switch requested after android switch using activity manager.
+        SWITCH_REQUEST_LEGACY = 3;
+        // Create User
+        CREATE_REQUEST = 4;
+        // Remove User
+        REMOVE_REQUEST = 5;
+    }
+    optional RequestType request_type = 2;
+    // Android User id of the current user which can only be 0, 10, 11 and so on.
+    // -1 if not available.
+    optional int32 user_id = 3;
+    // VHAL flags of the current user. (-1 if not available)
+    optional int32 user_flags = 4;
+    // Android User id of the target user for switch/create/remove. It can only
+    // be 0, 10, 11 and so on. -1 if not available.
+    optional int32 target_user_id = 5;
+    // VHAL flags of the target user for switch/create/remove. (-1 if not available)
+    optional int32 target_user_flags = 6;
+    // Request timeout Milliseconds (-1 if not available)
+    optional int32 timeout_millis = 7;
+}
+
+/**
+ * Logs when Car User Hal responds to switch/create user request.
+ *
+ * Logged from:
+ *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
+ */
+message CarUserHalModifyUserResponseReported {
+    // Request id of the request associated with the response.
+    optional int32 request_id = 1;
+    // Car user hal callback status.
+    enum CallbackStatus {
+        UNKNOWN = 0;
+        // Hal response was invalid.
+        INVALID = 1;
+        // Hal response was ok.
+        OK = 2;
+        // Hal timeout during set call.
+        HAL_SET_TIMEOUT = 3;
+        // Hal response timeout.
+        HAL_RESPONSE_TIMEOUT = 4;
+        // Hal responded with wrong info.
+        WRONG_HAL_RESPONSE = 5;
+        // Hal is processing multiple requests simultaneously.
+        CONCURRENT_OPERATION = 6;
+    }
+    optional CallbackStatus callback_status = 2;
+
+    // Hal request status for user switch/create/remove.
+    enum HalRequestStatus {
+        UNSPECIFIED = 0;
+        // Hal request for user switch/create is successful.
+        SUCCESS = 1;
+        // Hal request for user switch/create failed.
+        FAILURE = 2;
+    }
+    optional HalRequestStatus request_status = 3;
+}
+
+/**
+ * Logs when post switch response is posted to Car User Hal.
+ *
+ * Logged from:
+ *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
+ */
+message CarUserHalPostSwitchResponseReported {
+    // Request id.
+    optional int32 request_id = 1;
+
+    // Android user switch status.
+    enum UserSwitchStatus {
+        UNKNOWN = 0;
+        // Android user switch is successful.
+        SUCCESS = 1;
+        // Android user switch failed.
+        FAILURE = 2;
+    }
+    optional UserSwitchStatus switch_status = 2;
+}
+
+/**
+ * Logs when initial user information is requested from Car User Hal.
+ *
+ * Logged from:
+ *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
+ */
+message CarUserHalInitialUserInfoRequestReported {
+    // Request id for the request.
+    optional int32 request_id = 1;
+
+    // Request type for initial user information.
+    enum InitialUserInfoRequestType {
+        UNKNOWN = 0;
+        // At the first time Android was booted (or after a factory reset).
+        FIRST_BOOT = 1;
+        // At the first time Android was booted after the system was updated.
+        FIRST_BOOT_AFTER_OTA = 2;
+        // When Android was booted "from scratch".
+        COLD_BOOT = 3;
+        // When Android was resumed after the system was suspended to memory.
+        RESUME = 4;
+    }
+    optional InitialUserInfoRequestType request_type = 2;
+    // Request timeout Milliseconds (-1 if not available)
+    optional int32 timeout_millis = 3;
+}
+
+/**
+ * Logs when Car User Hal responds to initial user information requests.
+ *
+ * Logged from:
+ *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
+ */
+message CarUserHalInitialUserInfoResponseReported {
+    // Request id of the request associated with the response.
+    optional int32 request_id = 1;
+    // Car user hal callback status.
+    enum CallbackStatus {
+        UNKNOWN = 0;
+        // Hal response was invalid.
+        INVALID = 1;
+        // Hal response was ok.
+        OK = 2;
+        // Hal timeout during set call.
+        HAL_SET_TIMEOUT = 3;
+        // Hal response timeout.
+        HAL_RESPONSE_TIMEOUT = 4;
+        // Hal responded with wrong info.
+        WRONG_HAL_RESPONSE = 5;
+        // Hal is processing multiple requests simultaneously.
+        CONCURRENT_OPERATION = 6;
+    }
+    optional CallbackStatus callback_status = 2;
+    // Response for initial user information request.
+    enum InitialUserInfoResponseAction {
+        UNSPECIFIED = 0;
+        // Let the Android System decide what to do.
+        DEFAULT = 1;
+        // Switch to an existing Android user.
+        SWITCH = 2;
+        // Create a new Android user (and switch to it).
+        CREATE = 3;
+    }
+    optional InitialUserInfoResponseAction response_action = 3;
+    // Android User id of the target user which can only be 0, 10, 11 and so on.
+    // -1 if not available.
+    optional int32 target_user = 4;
+    // VHAL flags of the current user. (-1 if not available)
+    optional int32 target_user_flags = 5;
+    // User locales
+    optional string user_locales = 6;
+}
+
+/**
+ * Logs when set user association is requested from Car User Hal.
+ *
+ * Logged from:
+ *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
+ */
+message CarUserHalUserAssociationRequestReported {
+    // Request id for the request.
+    optional int32 request_id = 1;
+    // Request type.
+    enum RequestType {
+        UNKNOWN = 0;
+        // For setting user association information.
+        SET = 1;
+        // For getting user association information.
+        GET = 2;
+    }
+    optional RequestType request_type = 2;
+    // Android User id of the current user which can only be 0, 10, 11 and so on.
+    // -1 if not available.
+    optional int32 current_user_id = 3;
+    // VHAL flags of the current user. (-1 if not available)
+    optional int32 current_user_flags = 4;
+    // Number of the set associations requested.
+    optional int32 number_associations = 5;
+    // Concatenated string for the types from set associations request.
+    // This is a string converted from an array of integers.
+    optional string user_identification_association_types = 6;
+    // Concatenated string for the values from set associations request.
+    // This is a string converted from an array of integers.
+    optional string user_identification_association_values = 7;
+}
+
+/**
+ * Logs when Car User Hal responds to set user association requests.
+ *
+ * Logged from:
+ *   packages/services/Car/service/src/com/android/car/hal/UserHalService.java
+ */
+message CarUserHalSetUserAssociationResponseReported {
+    // Request id of the request associated with the response.
+    optional int32 request_id = 1;
+    // Car user hal callback status.
+    enum CallbackStatus {
+        UNKNOWN = 0;
+        // Hal response was invalid.
+        INVALID = 1;
+        // Hal response was ok.
+        OK = 2;
+        // Hal timeout during set call.
+        HAL_SET_TIMEOUT = 3;
+        // Hal response timeout.
+        HAL_RESPONSE_TIMEOUT = 4;
+        // Hal responded with wrong info.
+        WRONG_HAL_RESPONSE = 5;
+        // Hal is processing multiple requests simultaneously.
+        CONCURRENT_OPERATION = 6;
+    }
+    optional CallbackStatus callback_status = 2;
+    // Number of the set associations in the response.
+    optional int32 number_associations = 3;
+    // Concatenated string for the types from set associations request.
+    // This is a string converted from an array of integers.
+    optional string user_identification_association_types = 4;
+    // Concatenated string for the values from set associations request.
+    // This is a string converted from an array of integers.
+    optional string user_identification_association_values = 5;
+}
+
+/**
  * Logs whether GarageMode is entered.
  *
  * Logged from:
@@ -7275,11 +8698,11 @@
     // Uid of the package requesting the op
     optional int32 uid = 1 [(is_uid) = true];
 
-    // Nmae of the package performing the op
+    // Name of the package performing the op
     optional string package_name = 2;
 
-    // operation id; maps to the OP_* constants in AppOpsManager.java
-    optional int32 op_id = 3;
+    // operation id
+    optional android.app.AppOpEnum op_id = 3 [default = APP_OP_NONE];
 
     // The number of times the op was granted while the app was in the
     // foreground (only for trusted requests)
@@ -7304,6 +8727,58 @@
     // For long-running operations, total duration of the operation
     // while the app was in the background (only for trusted requests)
     optional int64 trusted_background_duration_millis = 9;
+
+    // Whether AppOps is guarded by Runtime permission
+    optional bool is_runtime_permission = 10;
+}
+
+/**
+ * Historical app ops data per package and attribution tag.
+ */
+message AttributedAppOps {
+    // Uid of the package requesting the op
+    optional int32 uid = 1 [(is_uid) = true];
+
+    // Name of the package performing the op
+    optional string package_name = 2;
+
+    // tag; provided by developer when accessing related API, limited at 50 chars by API.
+    // Attributions must be provided through manifest using <attribution> tag available in R and
+    // above.
+    optional string tag = 3;
+
+    // operation id
+    optional android.app.AppOpEnum op = 4 [default = APP_OP_NONE];
+
+    // The number of times the op was granted while the app was in the
+    // foreground (only for trusted requests)
+    optional int64 trusted_foreground_granted_count = 5;
+
+    // The number of times the op was granted while the app was in the
+    // background (only for trusted requests)
+    optional int64 trusted_background_granted_count = 6;
+
+    // The number of times the op was rejected while the app was in the
+    // foreground (only for trusted requests)
+    optional int64 trusted_foreground_rejected_count = 7;
+
+    // The number of times the op was rejected while the app was in the
+    // background (only for trusted requests)
+    optional int64 trusted_background_rejected_count = 8;
+
+    // For long-running operations, total duration of the operation
+    // while the app was in the foreground (only for trusted requests)
+    optional int64 trusted_foreground_duration_millis = 9;
+
+    // For long-running operations, total duration of the operation
+    // while the app was in the background (only for trusted requests)
+    optional int64 trusted_background_duration_millis = 10;
+
+    // Whether AppOps is guarded by Runtime permission
+    optional bool is_runtime_permission = 11;
+
+    // Sampling rate used on device, from 0 to 100
+    optional int32 sampling_rate = 12;
 }
 
 /**
@@ -7418,6 +8893,9 @@
 
     // Button clicked by user - same as bit flags in buttons_presented with only single bit set
     optional int32 button_clicked = 5;
+
+    // id which identifies single session of user interacting with permission controller
+    optional int64 session_id = 6;
 }
 
 /**
@@ -7470,6 +8948,28 @@
 
     // The result of the permission grant
     optional bool permission_granted = 6;
+
+    // State of Permission Flags after grant as per android.content.pm.PermissionFlags
+    optional int32 permission_flags = 7;
+
+    enum Button {
+        UNDEFINED = 0;
+        // Allow button
+        ALLOW = 1;
+        // Deny button
+        DENY = 2;
+        // Ask every time button
+        ASK_EVERY_TIME = 3;
+        // Allow all the time button
+        ALLOW_ALWAYS = 4;
+        // Allow only while using the app button
+        ALLOW_FOREGROUND = 5;
+        // Same is Deny button but shown in while in use dialog
+        DENY_FOREGROUND = 6;
+    }
+
+    // Button pressed in the dialog
+    optional Button button_pressed = 8;
 }
 
 /**
@@ -7490,7 +8990,8 @@
 }
 
 /**
-* Information about a AppPermissionsFragment viewed by user
+* Information about a AppPermissionGroupsFragment viewed by user. Fragment has been renamed, but
+* the log retains the old fragment name.
 */
 message AppPermissionsFragmentViewed {
     // id which identifies single session of user interacting with permission controller
@@ -7518,7 +9019,6 @@
     }
     optional Category category = 6;
 }
-
 /**
 * Information about a PermissionAppsFragment viewed by user.
 * Logged from ui/handheld/PermissionAppsFragment.java
@@ -7551,6 +9051,478 @@
 }
 
 /**
+* Log that the Auto Revoke notification has been clicked
+* Logged from ui/ManagePermissionsActivity
+*/
+message AutoRevokeNotificationClicked {
+    // id which identifies single session of user interacting with permission controller
+    optional int64 session_id = 1;
+}
+
+/**
+* Log that an app has been displayed on the auto revoke page, and lists one permission that was
+* auto revoked for it.
+* Logged from ui/handheld/AutoRevokeFragment
+*/
+message AutoRevokeFragmentAppViewed {
+    // id which identifies single session of user interacting with permission controller
+    optional int64 session_id = 1;
+
+    // UID of package for which permissions are viewed
+    optional int32 uid = 2 [(is_uid) = true];
+
+    // Name of package for which permissions are viewed
+    optional string package_name = 3;
+
+    // The name of a permission group that has been revoked
+    optional string permission_group_name = 4;
+
+    // The age of the app- more than three months old, or more than six months
+    enum Age {
+        UNDEFINED = 0;
+        NEWER_BUCKET = 1;
+        OLDER_BUCKET = 2;
+    }
+
+    // How long the app has been unused. Currently, newer bucket is 3 months, older is 6 months
+    optional Age age = 5;
+}
+
+/**
+* Log that the user has interacted with an app on the auto revoke fragment
+* Logged from ui/handheld/AutoRevokeFragment
+*/
+message AutoRevokedAppInteraction {
+    // id which identifies single session of user interacting with permission controller
+    optional int64 session_id = 1;
+
+    // UID of package for which permissions are viewed
+    optional int32 uid = 2 [(is_uid) = true];
+
+    // Name of package for which permissions are viewed
+    optional string package_name = 3;
+
+    enum Action {
+        UNDEFINED = 0;
+        REMOVE = 1;
+        OPEN = 2;
+        APP_INFO = 3;
+        PERMISSIONS = 4;
+        REMOVE_IN_SETTINGS = 5;
+        OPEN_IN_SETTINGS = 6;
+    }
+
+    // The action the user took to interact with the app
+    optional Action action = 4;
+}
+
+/**
+* Log that the AppPermissionGroupsFragment has been interacted with for the possible purposes of
+* auto revoke, or that the auto revoke switch has been changed
+* Logged from ui/handheld/AppPermissionGroupsFragment
+ */
+message AppPermissionGroupsFragmentAutoRevokeAction {
+    // id which identifies single session of user interacting with permission controller
+    optional int64 session_id = 1;
+
+    // UID of package for which permissions are viewed
+    optional int32 uid = 2 [(is_uid) = true];
+
+    // Name of package for which permissions are viewed
+    optional string package_name = 3;
+
+    enum Action {
+        UNDEFINED = 0;
+        OPENED_FOR_AUTO_REVOKE = 1;
+        OPENED_FROM_INTENT = 2;
+        SWITCH_ENABLED = 3;
+        SWITCH_DISABLED = 4;
+    }
+
+    // The action the user took to interact with the fragment
+    optional Action action = 4;
+}
+
+/**
+ * Logs when there is a smart selection related event.
+ * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
+ * Logged from: TextClassifierEventLogger.java
+ */
+message TextSelectionEvent {
+    // A session ID.
+    optional string session_id = 1;
+
+    // Event type of this event.
+    optional android.stats.textclassifier.EventType event_type = 2;
+
+    // Name of the annotator model that is involved in this event.
+    optional string model_name = 3;
+
+    // Type of widget that was involved in triggering this event.
+    optional android.stats.textclassifier.WidgetType widget_type = 4;
+
+    // Index of this event in a session.
+    optional int32 event_index = 5;
+
+    // Entity type that is involved.
+    optional string entity_type = 6;
+
+    // Relative word index of the start of the selection.
+    optional int32 relative_word_start_index = 7;
+
+    // Relative word (exclusive) index of the end of the selection.
+    optional int32 relative_word_end_index = 8;
+
+    // Relative word index of the start of the smart selection.
+    optional int32 relative_suggested_word_start_index = 9;
+
+    // Relative word (exclusive) index of the end of the smart selection.
+    optional int32 relative_suggested_word_end_index = 10;
+
+    // Name of source package.
+    optional string package_name = 11;
+
+    // Name of the LangID model that is involved in this event.
+    optional string langid_model_name = 12;
+}
+
+/**
+ * Logs when there is a smart linkify related event.
+ * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
+ * Logged from: TextClassifierEventLogger.java
+ */
+message TextLinkifyEvent {
+    // A session ID.
+    optional string session_id = 1;
+
+    // Event type of this event.
+    optional android.stats.textclassifier.EventType event_type = 2;
+
+    // Name of the annotator model that is involved in this event.
+    optional string model_name = 3;
+
+    // Type of widget that was involved in triggering this event.
+    optional android.stats.textclassifier.WidgetType widget_type = 4;
+
+    // Index of this event in a session.
+    optional int32 event_index = 5;
+
+    // Entity type that is involved.
+    optional string entity_type = 6;
+
+    // Number of links detected.
+    optional int32 num_links = 7;
+
+    // The total length of all links.
+    optional int32 linked_text_length = 8;
+
+    // Length of input text.
+    optional int32 text_length = 9;
+
+    // Time spent on generating links in ms.
+    optional int64 latency_millis = 10;
+
+    // Name of source package.
+    optional string package_name = 11;
+
+    // Name of the LangID model that is involved in this event.
+    optional string langid_model_name = 12;
+}
+
+/**
+ * Logs when there is a conversation actions related event.
+ * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
+ * Logged from: TextClassifierEventLogger.java
+ */
+message ConversationActionsEvent {
+    // A session ID.
+    optional string session_id = 1;
+
+    // Event type of this event.
+    optional android.stats.textclassifier.EventType event_type = 2;
+
+    // Name of the actions model that is involved in this event.
+    optional string model_name = 3;
+
+    // Type of widget that was involved in triggering this event.
+    optional android.stats.textclassifier.WidgetType widget_type = 4;
+
+    // The first entity type that is involved.
+    optional string first_entity_type = 5;
+
+    // The second entity type that is involved.
+    optional string second_entity_type = 6;
+
+    // The third entity type that is involved.
+    optional string third_entity_type = 7;
+
+    // The score of the first entity type.
+    optional float score = 8;
+
+    // Name of source package.
+    optional string package_name = 9;
+
+    // Name of the annotator model that is involved in this event.
+    optional string annotator_model_name = 10;
+
+    // Name of the LangID model that is involved in this event.
+    optional string langid_model_name = 11;
+}
+
+/**
+ * Logs when there is a language detection related event.
+ * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
+ * Logged from: TextClassifierEventLogger.java
+ */
+message LanguageDetectionEvent {
+    // A session ID.
+    optional string session_id = 1;
+
+    // Event type of this event.
+    optional android.stats.textclassifier.EventType event_type = 2;
+
+    // Name of the language detection model that is involved in this event.
+    optional string model_name = 3;
+
+    // Type of widget that was involved in triggering this event.
+    optional android.stats.textclassifier.WidgetType widget_type = 4;
+
+    // Detected language.
+    optional string language_tag = 5;
+
+    // Score of the detected language.
+    optional float score = 6;
+
+    // Position of this action.
+    optional int32 action_index = 7;
+
+    // Name of source package.
+    optional string package_name = 8;
+}
+
+/**
+ * Information about an OTA update attempt by update_engine.
+ * Logged from platform/system/update_engine/metrics_reporter_android.cc
+ */
+message UpdateEngineUpdateAttemptReported {
+    // The number of attempts for the update engine to apply a given payload.
+    optional int32 attempt_number = 1;
+
+    optional android.stats.otaupdate.PayloadType payload_type = 2;
+
+    // The total time in minutes for the update engine to apply a given payload.
+    // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and
+    // it's increased when the system is sleeping.
+    optional int32 duration_boottime_in_minutes = 3;
+
+    // The total time in minutes for the update engine to apply a given payload.
+    // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW;
+    // and it's not increased when the system is sleeping.
+    optional int32 duration_monotonic_in_minutes = 4;
+
+    // The size of the payload in MiBs.
+    optional int32 payload_size_mib = 5;
+
+    // The attempt result reported by the update engine for an OTA update.
+    optional android.stats.otaupdate.AttemptResult attempt_result = 6;
+
+    // The error code reported by the update engine after an OTA update attempt
+    // on A/B devices.
+    optional android.stats.otaupdate.ErrorCode error_code = 7;
+
+    // The build fingerprint of the source system. The value is read from a
+    // system property when the device takes the update. e.g.
+    // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys
+    optional string source_fingerprint = 8;
+
+    // Size of super partition.
+    optional int64 super_partition_size_bytes = 9;
+
+    // Size of current slot within the super partition.
+    optional int64 slot_size_bytes = 10;
+
+    // Free space available in the super partition.
+    optional int64 super_free_space_bytes = 11;
+}
+
+/**
+ * Information about all the attempts the device make before finishing the
+ * successful update.
+ * Logged from platform/system/update_engine/metrics_reporter_android.cc
+ */
+message UpdateEngineSuccessfulUpdateReported {
+    // The number of attempts for the update engine to apply the payload for a
+    // successful update.
+    optional int32 attempt_count = 1;
+
+    optional android.stats.otaupdate.PayloadType payload_type = 2;
+
+    optional int32 payload_size_mib = 3;
+
+    // The total number of bytes downloaded by update_engine since the last
+    // successful update.
+    optional int32 total_bytes_downloaded_mib = 4;
+
+    // The ratio in percentage of the over-downloaded bytes compared to the
+    // total bytes needed to successfully install the update. e.g. 200 if we
+    // download 200MiB in total for a 100MiB package.
+    optional int32 download_overhead_percentage = 5;
+
+    // The total time in minutes for the update engine to apply the payload for a
+    // successful update.
+    optional int32 total_duration_minutes = 6;
+
+    // The number of reboot of the device during a successful update.
+    optional int32 reboot_count = 7;
+}
+
+/**
+ * Reported when the RebootEscrow HAL has attempted to recover the escrowed
+ * key to indicate whether it was successful or not.
+ *
+ * Logged from:
+ *   frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java
+ */
+message RebootEscrowRecoveryReported {
+    optional bool successful = 1;
+}
+
+/**
+ * Global display pipeline metrics reported by SurfaceFlinger.
+ * Pulled from:
+ *    frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp
+ */
+message SurfaceflingerStatsGlobalInfo {
+    // Total number of frames presented during the tracing period
+    optional int64 total_frames = 1;
+    // Total number of frames missed
+    optional int64 missed_frames = 2;
+    // Total number of frames that fell back to client composition
+    optional int64 client_composition_frames = 3;
+    // Total time the display was turned on
+    optional int64 display_on_millis = 4;
+    // Total time that was spent performing animations.
+    // This is derived from the present-to-present layer histogram
+    optional int64 animation_millis = 5;
+    // Total number of event connections tracked by SurfaceFlinger at the time
+    // of this pull. If this number grows prohibitively large, then this can
+    // cause jank due to resource contention.
+    optional int32 event_connection_count = 6;
+    // Set of timings measured from when SurfaceFlinger began compositing a
+    // frame, until the frame was requested to be presented to the display. This
+    // measures SurfaceFlinger's total CPU walltime on the critical path per
+    // frame.
+    optional FrameTimingHistogram frame_duration = 7
+        [(android.os.statsd.log_mode) = MODE_BYTES];
+    // Set of timings measured from when SurfaceFlinger first began using the
+    // GPU to composite a frame, until the GPU has finished compositing that
+    // frame. This measures the total additional time SurfaceFlinger needed to
+    // perform due to falling back into GPU composition.
+    optional FrameTimingHistogram render_engine_timing = 8
+        [(android.os.statsd.log_mode) = MODE_BYTES];
+}
+
+/**
+ * Per-layer display pipeline metrics reported by SurfaceFlinger.
+ * The number of layers uploaded will be restricted due to size limitations.
+ * Pulled from:
+ *    frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp
+ */
+message SurfaceflingerStatsLayerInfo {
+    // The layer for this set of metrics
+    // For now we can infer that the package name is included in the layer
+    // name.
+    optional string layer_name = 1;
+    // Total number of frames presented
+    optional int64 total_frames = 2;
+    // Total number of dropped frames while latching a buffer for this layer.
+    optional int64 dropped_frames = 3;
+    // Set of timings measured between successive presentation timestamps.
+    optional FrameTimingHistogram present_to_present = 4
+        [(android.os.statsd.log_mode) = MODE_BYTES];
+    // Set of timings measured from when an app queued a buffer for
+    // presentation, until the buffer was actually presented to the
+    // display.
+    optional FrameTimingHistogram post_to_present = 5
+        [(android.os.statsd.log_mode) = MODE_BYTES];
+    // Set of timings measured from when a buffer is ready to be presented,
+    // until the buffer was actually presented to the display.
+    optional FrameTimingHistogram acquire_to_present = 6
+        [(android.os.statsd.log_mode) = MODE_BYTES];
+    // Set of timings measured from when a buffer was latched by
+    // SurfaceFlinger, until the buffer was presented to the display
+    optional FrameTimingHistogram latch_to_present = 7
+        [(android.os.statsd.log_mode) = MODE_BYTES];
+    // Set of timings measured from the desired presentation to the actual
+    // presentation time
+    optional FrameTimingHistogram desired_to_present = 8
+        [(android.os.statsd.log_mode) = MODE_BYTES];
+    // Set of timings measured from when an app queued a buffer for
+    // presentation, until the buffer was ready to be presented.
+    optional FrameTimingHistogram post_to_acquire = 9
+        [(android.os.statsd.log_mode) = MODE_BYTES];
+    // Frames missed latch because the acquire fence didn't fire
+    optional int64 late_acquire_frames = 10;
+    // Frames latched early because the desired present time was bad
+    optional int64 bad_desired_present_frames = 11;
+}
+
+/**
+ * Histogram of frame counts bucketed by time in milliseconds.
+ * Because of size limitations, we hard-cap the number of buckets, with
+ * buckets for corresponding to larger milliseconds being less precise.
+ */
+message FrameTimingHistogram {
+    // Timings in milliseconds that describes a set of histogram buckets
+    repeated int32 time_millis_buckets = 1;
+    // Number of frames that match to each time_millis, i.e. the bucket
+    // contents
+    // It's required that len(time_millis) == len(frame_count)
+    repeated int64 frame_counts = 2;
+}
+
+/**
+ * Janky event as reported by SurfaceFlinger.
+ * This event is intended to be consumed by a Perfetto subscriber for
+ * automated trace collection.
+ *
+ * Logged from:
+ *    frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp
+ */
+message DisplayJankReported {
+    // Informational field for how long the janky event lasted in milliseconds
+    optional int64 event_duration_millis = 1;
+    // Number of frame deadlines missed, where SurfaceFlinger failed to update
+    // the display on time.
+    optional int32 present_deadlines_missed = 2;
+}
+
+/**
+ * Information about camera facing and API level usage.
+ * Logged from:
+ *   frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java
+ */
+message CameraActionEvent {
+    // Camera session duration
+    optional int64 duration_millis = 1;
+
+    // Camera API level used
+    optional int32 api_level = 2;
+
+    // Name of client package
+    optional string package_name = 3;
+
+    // Camera facing
+    enum Facing {
+        UNKNOWN = 0;
+        BACK = 1;
+        FRONT = 2;
+        EXTERNAL = 3;
+    }
+    optional Facing facing = 4;
+}
+
+/**
  * Logs when a compatibility change is affecting an app.
  *
  * Logged from:
@@ -7583,6 +9555,7 @@
 
     // Where it was logged from.
     optional Source source = 4;
+
 }
 
 /**
@@ -7649,70 +9622,123 @@
 }
 
 /**
- * Information about an OTA update attempt by update_engine.
- * Logged from platform/system/update_engine/metrics_reporter_android.cc
- */
-message UpdateEngineUpdateAttemptReported {
-    // The number of attempts for the update engine to apply a given payload.
-    optional int32 attempt_number = 1;
+ * State of a dangerous permission requested by a package - sampled
+ * Pulled from: StatsCompanionService.java with data obtained from PackageManager API
+*/
+message DangerousPermissionStateSampled {
+    // Name of the permission
+    optional string permission_name = 1;
 
-    optional android.stats.otaupdate.PayloadType payload_type = 2;
+    // Uid of the package
+    optional int32 uid = 2 [(is_uid) = true];
 
-    // The total time in minutes for the update engine to apply a given payload.
-    // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and
-    // it's increased when the system is sleeping.
-    optional int32 duration_boottime_in_minutes = 3;
+    // If the permission is granted to the uid
+    optional bool is_granted = 3;
 
-    // The total time in minutes for the update engine to apply a given payload.
-    // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW;
-    // and it's not increased when the system is sleeping.
-    optional int32 duration_monotonic_in_minutes = 4;
-
-    // The size of the payload in MiBs.
-    optional int32 payload_size_mib = 5;
-
-    // The attempt result reported by the update engine for an OTA update.
-    optional android.stats.otaupdate.AttemptResult attempt_result = 6;
-
-    // The error code reported by the update engine after an OTA update attempt
-    // on A/B devices.
-    optional android.stats.otaupdate.ErrorCode error_code = 7;
-
-    // The build fingerprint of the source system. The value is read from a
-    // system property when the device takes the update. e.g.
-    // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys
-    optional string source_fingerprint = 8;
+    // Permission flags as per android.content.pm.PermissionFlags
+    optional int32 permission_flags = 4;
 }
 
 /**
- * Information about all the attempts the device make before finishing the
- * successful update.
- * Logged from platform/system/update_engine/metrics_reporter_android.cc
+ * HWUI stats for a given app.
  */
-message UpdateEngineSuccessfulUpdateReported {
-    // The number of attempts for the update engine to apply the payload for a
-    // successful update.
-    optional int32 attempt_count = 1;
+message GraphicsStats {
+    // The package name of the app
+    optional string package_name = 1;
 
-    optional android.stats.otaupdate.PayloadType payload_type = 2;
+    // The version code of the app
+    optional int64 version_code = 2;
 
-    optional int32 payload_size_mib = 3;
+    // The start & end timestamps in UTC as
+    // milliseconds since January 1, 1970
+    // Compatible with java.util.Date#setTime()
+    optional int64 start_millis = 3;
 
-    // The total number of bytes downloaded by update_engine since the last
-    // successful update.
-    optional int32 total_bytes_downloaded_mib = 4;
+    optional int64 end_millis = 4;
 
-    // The ratio in percentage of the over-downloaded bytes compared to the
-    // total bytes needed to successfully install the update. e.g. 200 if we
-    // download 200MiB in total for a 100MiB package.
-    optional int32 download_overhead_percentage = 5;
+    // HWUI renders pipeline type: GL (1) or Vulkan (2).
+    enum PipelineType {
+        UNKNOWN = 0;
+        GL = 1;
+        VULKAN = 2;
+    }
 
-    // The total time in minutes for the update engine to apply the payload for a
-    // successful update.
-    optional int32 total_duration_minutes = 6;
+    // HWUI renders pipeline type: GL or Vulkan.
+    optional PipelineType pipeline = 5;
 
-    // The number of reboot of the device during a successful update.
-    optional int32 reboot_count = 7;
+    // Distinct frame count.
+    optional int32 total_frames = 6;
+
+    // Number of "missed vsync" events.
+    optional int32 missed_vsync_count = 7;
+
+    // Number of frames in triple-buffering scenario (high input latency)
+    optional int32 high_input_latency_count = 8;
+
+    // Number of "slow UI thread" events.
+    optional int32 slow_ui_thread_count = 9;
+
+    // Number of "slow bitmap upload" events.
+    optional int32 slow_bitmap_upload_count = 10;
+
+    // Number of "slow draw" events.
+    optional int32 slow_draw_count = 11;
+
+    // Number of frames that missed their deadline (aka, visibly janked)
+    optional int32 missed_deadline_count = 12;
+
+    // The frame time histogram for the package
+    optional FrameTimingHistogram cpu_histogram = 13
+    [(android.os.statsd.log_mode) = MODE_BYTES];
+
+    // The gpu frame time histogram for the package
+    optional FrameTimingHistogram gpu_histogram = 14
+    [(android.os.statsd.log_mode) = MODE_BYTES];
+
+    // UI mainline module version.
+    optional int64 version_ui_module = 15;
+
+    // If true, these are HWUI stats for up to a 24h period for a given app from today.
+    // If false, these are HWUI stats for a 24h period for a given app from the last complete
+    // day (yesterday). Stats from yesterday stay constant, while stats from today may change as
+    // more apps are running / rendering.
+    optional bool is_today = 16;
+}
+
+/**
+ * Message related to dangerous (runtime) app ops access
+ */
+message RuntimeAppOpAccess {
+    // Uid of the package accessing app op
+    optional int32 uid = 1 [(is_uid) = true];
+
+    // Name of the package accessing app op
+    optional string package_name = 2;
+
+    // deprecated - set to empty string
+    optional string op_deprecated = 3 [deprecated = true];
+
+    // attribution_tag; provided by developer when accessing related API, limited at 50 chars by
+    // API. Attributions must be provided through manifest using <attribution> tag available in R
+    // and above.
+    optional string attribution_tag = 4;
+
+    // message related to app op access, limited to 600 chars by API
+    optional string message = 5;
+
+    enum SamplingStrategy {
+        DEFAULT = 0;
+        UNIFORM = 1;
+        RARELY_USED = 2;
+        BOOT_TIME_SAMPLING = 3;
+        UNIFORM_OPS = 4;
+    }
+
+    // sampling strategy used to collect this message
+    optional SamplingStrategy sampling_strategy = 6;
+
+    // operation id
+    optional android.app.AppOpEnum op = 7 [default = APP_OP_NONE];
 }
 
 /*
@@ -7755,6 +9781,274 @@
     optional UserEncryptionState user_encryption_state = 3;
 }
 
+/*
+ * Logs integrity check information during each install.
+ *
+ * Logged from:
+ *   frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
+ */
+message IntegrityCheckResultReported {
+    optional string package_name = 1;
+    optional string app_certificate_hash = 2;
+    optional int64 version_code = 3;
+    optional string installer_package_name = 4;
+    enum Response {
+        UNKNOWN = 0;
+        ALLOWED = 1;
+        REJECTED = 2;
+        FORCE_ALLOWED = 3;
+    }
+    optional Response response = 5;
+    // An estimate on the cause of the response. This will only be populated for
+    // REJECTED and FORCE_ALLOWED
+    optional bool caused_by_app_cert_rule = 6;
+    optional bool caused_by_installer_rule = 7;
+}
+
+/**
+ * Logs the information about the rules and the provider whenever rules are
+ * pushed into AppIntegrityManager.
+ *
+ * Logged from:
+ *   frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
+ */
+message IntegrityRulesPushed {
+    optional bool success = 1;
+    // Package name of the app that pushed the rules.
+    optional string rule_provider = 2;
+    // Version string of arbitrary format provided by the rule provider to
+    // identify the rules.
+    optional string rule_version = 3;
+}
+
+/**
+ * Logs when a cell broadcast message is received on the device.
+ *
+ * Logged from Cell Broadcast module and platform:
+ *   packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
+ *   packages/apps/CellBroadcastReceiver/
+ *   frameworks/opt/telephony/src/java/com/android/internal/telephony/CellBroadcastServiceManager.java
+ */
+message CellBroadcastMessageReported {
+    // The type of Cell Broadcast message
+    enum CbType {
+        UNKNOWN_TYPE = 0;
+        GSM = 1;
+        CDMA = 2;
+        CDMA_SPC = 3;
+    }
+
+    // The parts of the cell broadcast message pipeline
+    enum ReportSource {
+        UNKNOWN_SOURCE = 0;
+        FRAMEWORK = 1;
+        CB_SERVICE = 2;
+        CB_RECEIVER_APP = 3;
+    }
+
+    // GSM, CDMA, CDMA-SCP
+    optional CbType type = 1;
+
+    // The source of the report
+    optional ReportSource source = 2;
+}
+
+/**
+ * Logs when a cell broadcast message is filtered out, or otherwise intentionally not sent to CBR.
+ *
+ * Logged from CellBroadcastService module:
+ *   packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
+ */
+message CellBroadcastMessageFiltered {
+    enum FilterReason {
+        NOT_FILTERED = 0;
+        DUPLICATE_MESSAGE = 1;
+        GEOFENCED_MESSAGE = 2;
+        AREA_INFO_MESSAGE = 3;
+    }
+
+    // GSM, CDMA, CDMA-SCP
+    optional CellBroadcastMessageReported.CbType type = 1;
+
+    // The source of the report
+    optional FilterReason filter = 2;
+}
+
+/**
+ * Logs when an error occurs while handling a cell broadcast message;
+ *
+ * Logged from CellBroadcastService module:
+ *   packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
+ */
+message CellBroadcastMessageError {
+    // The type of error raised when trying to handle a cell broadcast message
+    enum ErrorType {
+        UNKNOWN_TYPE = 0;
+        CDMA_DECODING_ERROR = 1;
+        CDMA_SCP_EMPTY = 2;
+        CDMA_SCP_HANDLING_ERROR = 3;
+        GSM_INVALID_HEADER_LENGTH = 4;
+        GSM_UNSUPPORTED_HEADER_MESSAGE_TYPE = 5;
+        GSM_UNSUPPORTED_HEADER_DATA_CODING_SCHEME = 6;
+        GSM_INVALID_PDU = 7;
+        GSM_INVALID_GEO_FENCING_DATA = 8;
+        GSM_UMTS_INVALID_WAC = 9;
+        FAILED_TO_INSERT_TO_DB = 10;
+        UNEXPECTED_GEOMETRY_FROM_FWK = 11;
+        UNEXPECTED_GSM_MESSAGE_TYPE_FROM_FWK = 12;
+        UNEXPECTED_CDMA_MESSAGE_TYPE_FROM_FWK = 13;
+        UNEXPECTED_CDMA_SCP_MESSAGE_TYPE_FROM_FWK = 14;
+        NO_CONNECTION_TO_CB_SERVICE = 15;
+    }
+
+    // What kind of error occurred
+    optional ErrorType type = 1;
+
+    // Exception message (or log message) associated with the error (max 1000 chars)
+    optional string exception_message = 2;
+}
+
+/**
+ * Logs when a tune occurs through device's Frontend.
+ * This is atom ID 276.
+ *
+ * Logged from:
+ *   frameworks/base/media/java/android/media/tv/tuner/Tuner.java
+ */
+message TvTunerStateChanged {
+    enum State {
+        UNKNOWN = 0;
+        TUNING = 1; // Signal is tuned
+        LOCKED = 2;    // the signal is locked
+        NOT_LOCKED = 3; // the signal isn’t locked.
+        SIGNAL_LOST = 4; // the signal was locked, but is lost now.
+        SCANNING = 5; // the signal is scanned
+        SCAN_STOPPED = 6; // the scan is stopped.
+    }
+    // The uid of the application that sent this custom atom.
+    optional int32 uid = 1 [(is_uid) = true];
+    //  new state
+    optional State state = 2;
+}
+
+/**
+ * Logs the status of a dvr playback or record.
+ * This is atom ID 279.
+ *
+ * Logged from:
+ *   frameworks/base/media/java/android/media/tv/tuner/dvr
+ */
+message TvTunerDvrStatus {
+    enum Type {
+        UNKNOWN_TYPE = 0;
+        PLAYBACK = 1; // is a playback
+        RECORD = 2; // is a record
+    }
+    enum State {
+        UNKNOWN_STATE = 0;
+        STARTED = 1; // DVR is started
+        STOPPED = 2; // DVR is stopped
+    }
+    // The uid of the application that sent this custom atom.
+    optional int32 uid = 1 [(is_uid) = true];
+    // DVR type
+    optional Type type = 2;
+    //  DVR state
+    optional State state = 3;
+    //  Identify the segment of a record or playback
+    optional int32 segment_id = 4;
+    // indicate how many overflow or underflow happened between started to stopped
+    optional int32 overflow_underflow_count = 5;
+}
+
+/**
+ * Logs when a cas session opened through MediaCas.
+ * This is atom ID 280.
+ *
+ * Logged from:
+ *   frameworks/base/media/java/android/media/MediaCas.java
+ */
+message TvCasSessionOpenStatus {
+    enum State {
+        UNKNOWN = 0;
+        SUCCEEDED = 1; // indicate that the session is opened successfully.
+        FAILED = 2; // indicate that the session isn’t opened successfully.
+    }
+    // The uid of the application that sent this custom atom.
+    optional int32 uid = 1 [(is_uid) = true];
+    //  Cas system Id
+    optional int32 cas_system_id = 2;
+    // State of the session
+    optional State state = 3;
+}
+
+/**
+ * Logs for ContactsProvider general usage.
+ * This is atom ID 301.
+ *
+ * Logged from:
+ *   packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsProvider2.java
+ */
+message ContactsProviderStatusReported {
+    enum ApiType {
+        UNKNOWN_API = 0;
+        QUERY = 1;
+        // INSERT includes insert and bulkInsert, and inserts triggered by applyBatch.
+        INSERT = 2;
+        // UPDATE and DELETE includes update/delete and the ones triggered by applyBatch.
+        UPDATE = 3;
+        DELETE = 4;
+    }
+
+    enum ResultType {
+        UNKNOWN_RESULT = 0;
+        SUCCESS = 1;
+        FAIL = 2;
+        ILLEGAL_ARGUMENT = 3;
+        UNSUPPORTED_OPERATION = 4;
+    }
+
+    enum CallerType {
+        UNSPECIFIED_CALLER_TYPE = 0;
+        CALLER_IS_SYNC_ADAPTER = 1;
+        CALLER_IS_NOT_SYNC_ADAPTER = 2;
+    }
+
+    optional ApiType api_type = 1;
+    // Defined in
+    // packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsProvider2.java
+    optional int32 uri_type = 2;
+    optional CallerType caller_type = 3;
+    optional ResultType result_type = 4;
+    optional int32 result_count = 5;
+    optional int64 latency_micros = 6;
+}
+
+/**
+ * Logs when an app is frozen or unfrozen.
+ *
+ * Logged from:
+ *   frameworks/base/services/core/java/com/android/server/am/CachedAppOptimizer.java
+ */
+message AppFreezeChanged {
+    // The type of event.
+    enum Action {
+        UNKNOWN = 0;
+        FREEZE_APP = 1;
+        UNFREEZE_APP = 2;
+    }
+    optional Action action = 1;
+
+    // Pid of the process being frozen.
+    optional int32 pid = 2;
+
+    // Name of the process being frozen.
+    optional string process_name = 3;
+
+    // Time since last unfrozen.
+    optional int64 time_unfrozen_millis = 4;
+}
+
 /**
  * Pulls information for a single voice call.
  *
@@ -7906,6 +10200,808 @@
 }
 
 /**
+ * Logs gnss stats from location service provider
+ *
+ * Pulled from:
+ *  frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
+ */
+
+message GnssStats {
+    // Number of location reports since boot
+    optional int64 location_reports = 1;
+
+    // Total pulled reports of Location failures since boot
+    optional int64 location_failure_reports = 2;
+
+    // Number of time to first fix reports since boot
+    optional int64 time_to_first_fix_reports = 3;
+
+    // Total pulled reported time to first fix (in milli-seconds) since boot
+    optional int64 time_to_first_fix_millis = 4;
+
+    // Number of position accuracy reports since boot
+    optional int64 position_accuracy_reports = 5;
+
+    // Total pulled reported position accuracy (in meters) since boot
+    optional int64 position_accuracy_meters = 6;
+
+    // Number of top 4 average CN0 reports since boot
+    optional int64 top_four_average_cn0_reports = 7;
+
+    // Total pulled reported of top 4 average CN0 (dB-mHz) since boot
+    optional int64 top_four_average_cn0_db_mhz = 8;
+
+    // Number of l5 top 4 average CN0 reports since boot
+    optional int64 l5_top_four_average_cn0_reports = 9;
+
+    // Total pulled reported of l5 top 4 average CN0 (dB-mHz) since boot
+    optional int64 l5_top_four_average_cn0_db_mhz = 10;
+
+    // Total number of sv status messages reports since boot
+    optional int64 sv_status_reports = 11;
+
+    // Total number of sv status messages reports, where sv is used in fix since boot
+    optional int64 sv_status_reports_used_in_fix = 12;
+
+    // Total number of L5 sv status messages reports since boot
+    optional int64 l5_sv_status_reports = 13;
+
+    // Total number of L5 sv status messages reports, where sv is used in fix since boot
+    optional int64 l5_sv_status_reports_used_in_fix = 14;
+}
+
+/**
+ * Logs when an app is moved to a different standby bucket.
+ *
+ * Logged from:
+ *   frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/AppIdleHistory.java
+ */
+message AppStandbyBucketChanged {
+    optional string package_name = 1;
+
+    // Should be 0, 10, 11, 12, etc. where 0 is the owner. See UserHandle for more documentation.
+    optional int32 user_id = 2;
+
+    // These enum values match the constants defined in UsageStatsManager.java.
+    enum Bucket {
+        BUCKET_UNKNOWN = 0;
+        BUCKET_EXEMPTED = 5;
+        BUCKET_ACTIVE = 10;
+        BUCKET_WORKING_SET = 20;
+        BUCKET_FREQUENT = 30;
+        BUCKET_RARE = 40;
+        BUCKET_RESTRICTED = 45;
+        BUCKET_NEVER = 50;
+    }
+    optional Bucket bucket = 3;
+
+    enum MainReason {
+        MAIN_UNKNOWN = 0;
+        MAIN_DEFAULT = 0x0100;
+        MAIN_TIMEOUT = 0x0200;
+        MAIN_USAGE = 0x0300;
+        MAIN_FORCED_BY_USER = 0x0400;
+        MAIN_PREDICTED = 0x0500;
+        MAIN_FORCED_BY_SYSTEM = 0x0600;
+    }
+    optional MainReason main_reason = 4;
+
+    // A more detailed reason for the standby bucket change. The sub reason name is dependent on
+    // the main reason. Values are one of the REASON_SUB_XXX constants defined in
+    // UsageStatsManager.java.
+    optional int32 sub_reason = 5;
+}
+
+/**
+* Reports a started sharesheet transaction.
+*
+* Logged from:
+*   frameworks/base/core/java/com/android/internal/app/ChooserActivity.java
+*/
+message SharesheetStarted {
+    // The event_id (as for UiEventReported).
+    optional int32 event_id = 1;
+    // The calling app's package name.
+    optional string package_name = 2;
+    // An identifier to tie together multiple logs relating to the same share event
+    optional int32 instance_id = 3;
+    // The mime type of the share
+    optional string mime_type = 4;
+    // The number of direct targets the calling app is providing that will be shown.
+    optional int32 num_app_provided_direct_targets = 5;
+    // The number of app targets the calling app is providing that will be shown.
+    optional int32 num_app_provided_app_targets = 6;
+    // True if the share originates from the workprofile
+    optional bool is_workprofile = 7;
+
+    enum SharesheetPreviewType {  // Constants from ChooserActivity.java
+        CONTENT_PREVIEW_TYPE_UNKNOWN = 0;  // Default for proto 2 / 3 compatibility.
+        CONTENT_PREVIEW_IMAGE = 1;  // The preview shown in the sharesheet is an image.
+        CONTENT_PREVIEW_FILE = 2;  // The preview shown in the sharesheet is a file.
+        CONTENT_PREVIEW_TEXT = 3;  // The preview shown in the sharesheet is text.
+    }
+    // How the sharesheet preview is presented.
+    optional SharesheetPreviewType preview_type = 8;
+
+    enum ResolverActivityIntent { // Intents handled by ResolverActivity.java
+        INTENT_DEFAULT = 0;
+        INTENT_ACTION_VIEW = 1;
+        INTENT_ACTION_EDIT = 2;
+        INTENT_ACTION_SEND = 3;
+        INTENT_ACTION_SENDTO = 4;
+        INTENT_ACTION_SEND_MULTIPLE = 5;
+        INTENT_ACTION_IMAGE_CAPTURE = 6;
+        INTENT_ACTION_MAIN = 7;
+    }
+    // The intent being processed (only SEND and SEND_MULTIPLE are system sharesheet)
+    optional ResolverActivityIntent intent_type = 9;
+}
+
+/**
+ * Reports a ranking selection event.
+ *
+ * Logged from:
+ *   frameworks/base/core/java/com/android/internal/app/ChooserActivity.java (sharesheet)
+ */
+message RankingSelected {
+    // The event_id (as for UiEventReported).
+    optional int32 event_id = 1;
+    // The relevant app's package name (can be source or picked package).
+    optional string package_name = 2;
+    // An identifier to tie together multiple logs relating to the same share event.
+    optional int32 instance_id = 3;
+    // Which of the ranked targets got picked, default starting position 0.
+    optional int32 position_picked = 4;
+}
+
+/**
+ * Logs when TvSettings UI is interacted at.
+ *
+ * Logged from: packages/apps/TvSettings
+ */
+message TvSettingsUIInteracted {
+
+    /** The UI action category */
+    optional android.app.tvsettings.Action action = 1;
+
+    /** The ID of the entry that the users actioned on */
+    optional android.app.tvsettings.ItemId item_id = 2;
+}
+
+/**
+ * Logs information about a package installation using package installer V2 APIs.
+ *
+ * Logged from:
+ *      frameworks/base/services/core/java/com/android/server/pm/PackageInstallerSession.java
+ */
+message PackageInstallerV2Reported {
+    // Whether this installation uses Incremental File System
+    optional bool is_incremental = 1;
+    // Name of the package that is intended to be installed
+    optional string package_name = 2;
+    // The duration between when the install was requested to when the install has completed
+    optional int64 duration_millis = 3;
+    // Installation result in final integer, which are SystemApi's.
+    // Return_code 1 indicates success.
+    // For full list, see frameworks/base/core/java/android/content/pm/PackageManager.java
+    optional int32 return_code  = 4;
+    // Total size of the APKs installed for this package
+    optional int64 apks_size_bytes = 5;
+}
+
+/**
+ * Logs settings provider values.
+ *
+ * Use DeviceConfig.getProperties to get a list Setting key, query the data from content provider,
+ * then write the value to proto.
+ *
+ */
+message SettingSnapshot {
+
+    // Setting key
+    optional string name = 1;
+
+    enum SettingsValueType {
+        NOTASSIGNED = 0;
+        ASSIGNED_BOOL_TYPE = 1;
+        ASSIGNED_INT_TYPE = 2;
+        ASSIGNED_FLOAT_TYPE = 3;
+        ASSIGNED_STRING_TYPE = 4;
+    };
+    // Setting value type
+    optional SettingsValueType type = 2;
+
+    optional bool bool_value = 3;
+
+    optional int32 int_value = 4;
+
+    optional float float_value = 5;
+
+    optional string str_value = 6;
+
+    // Android user index. 0 for primary user, 10, 11 for secondary or profile user
+    optional int32 user_id = 7;
+}
+
+/**
+ * An event logged to indicate that a user journey is about to be performed. This atom includes
+ * relevant information about the users involved in the journey. A UserLifecycleEventOccurred event
+ * will immediately follow this atom which will describe the event(s) and its state.
+ *
+ * Logged from:
+ *   frameworks/base/services/core/java/com/android/server/am/UserController.java
+ *   frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java
+ */
+message UserLifecycleJourneyReported {
+    // An identifier to track a chain of user lifecycle events occurring (referenced in the
+    // UserLifecycleEventOccurred atom)
+    optional int64 session_id = 1;
+
+    // Indicates what type of user journey this session is related to
+    enum Journey {
+        UNKNOWN = 0; // Undefined user lifecycle journey
+        USER_SWITCH_UI = 1; // A user switch journey where a UI is shown
+        USER_SWITCH_FG = 2; // A user switch journey without a UI shown
+        USER_START = 3; // A user start journey
+        USER_CREATE = 4; // A user creation journey
+    }
+    optional Journey journey = 2;
+    // Which user the journey is originating from - could be -1 for certain phases (eg USER_CREATE)
+    // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest)
+    optional int32 origin_user = 3;
+    // Which user the journey is targeting
+    // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest)
+    optional int32 target_user = 4;
+
+    // What is the user type of the target user
+    // These should be in sync with USER_TYPE_* flags defined in UserManager.java
+    enum UserType {
+        TYPE_UNKNOWN = 0;
+        FULL_SYSTEM = 1;
+        FULL_SECONDARY = 2;
+        FULL_GUEST = 3;
+        FULL_DEMO = 4;
+        FULL_RESTRICTED = 5;
+        PROFILE_MANAGED = 6;
+        SYSTEM_HEADLESS = 7;
+    }
+    optional UserType user_type = 5;
+    // What are the flags attached to the target user
+    optional int32 user_flags = 6;
+}
+
+/**
+ * An event logged when a specific user lifecycle event is performed. These events should be
+ * correlated with a UserLifecycleJourneyReported atom via the session_id.
+ * Note: journeys can span over multiple events, hence some events may share a single session id.
+ *
+ * Logged from:
+ *   frameworks/base/services/core/java/com/android/server/am/UserController.java
+ *   frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java
+ */
+message UserLifecycleEventOccurred {
+    // An id which links back to user details (reported in the UserLifecycleJourneyReported atom)
+    optional int64 session_id = 1;
+    // The target user for this event (same as target_user in the UserLifecycleJourneyReported atom)
+    // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest)
+    optional int32 user_id = 2;
+
+    enum Event {
+        UNKNOWN = 0; // Indicates that the associated user journey timed-out or resulted in an error
+        SWITCH_USER = 1; // Indicates that this is a user switch event
+        START_USER = 2; // Indicates that this is a user start event
+        CREATE_USER = 3; // Indicates that this is a user create event
+        USER_RUNNING_LOCKED = 4; // Indicates that user is running in locked state
+        UNLOCKING_USER = 5; // Indicates that this is a user unlocking event
+        UNLOCKED_USER = 6; // Indicates that this is a user unlocked event
+    }
+    optional Event event = 3;
+
+    enum State {
+        NONE = 0; // Indicates the associated event has no start/end defined
+        BEGIN = 1;
+        FINISH = 2;
+    }
+    optional State state = 4; // Represents the state of an event (beginning/ending)
+}
+
+/**
+ * Logs when accessibility shortcut clicked.
+ *
+ * Logged from:
+ *   frameworks/base/services/accessibility/java/com/android/server/accessibility
+ */
+message AccessibilityShortcutReported {
+    // The accessibility feature(including installed a11y service, framework a11y feature,
+    // and installed a11y activity) package name that is assigned to the accessibility shortcut.
+    optional string package_name = 1;
+
+    // The definition of the accessibility shortcut.
+    // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto.
+    optional android.stats.accessibility.ShortcutType shortcut_type = 2;
+
+    // The definition of the service status.
+    // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto.
+    optional android.stats.accessibility.ServiceStatus service_status = 3;
+}
+
+/**
+ * Logs when accessibility service status changed.
+ *
+ * Logged from:
+ *   packages/apps/Settings/src/com/android/settings/accessibility
+ */
+message AccessibilityServiceReported {
+    // The accessibility service package name.
+    optional string package_name = 1;
+
+    // The definition of the service status.
+    // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto.
+    optional android.stats.accessibility.ServiceStatus service_status = 2;
+}
+
+/**
+ * Logs when display wake up.
+ *
+ * Logged from:
+ *   services/core/java/com/android/server/power/Notifier.java
+ */
+
+message DisplayWakeReported {
+    // Wake_up_reason code
+    // If LOWORD(wake_up_reason) = 0
+    //     reference to HIWORD(wake_up_reason) PowerManager.WAKE_REASON_XXX
+    //     else reference wake_up_reason to
+    //     services/core/java/com/android/server/power/Notifier.java#onWakeUp
+    optional int32 wake_up_reason = 1;
+}
+
+/**
+ * Logs app usage events.
+ */
+message AppUsageEventOccurred {
+    optional int32 uid = 1 [(is_uid) = true];
+    optional string package_name = 2;
+    optional string class_name = 3;
+
+    enum EventType {
+        NONE = 0;
+        MOVE_TO_FOREGROUND = 1;
+        MOVE_TO_BACKGROUND = 2;
+    }
+    optional EventType event_type = 4;
+}
+
+/*
+ * Quality metrics logged when EVS cameras are active.
+ *
+ * Logged from:
+ *  packages/services/Car/evs/manager/1.1/Enumerator.cpp
+ */
+message EvsUsageStatsReported {
+
+    // Camera identifier to distinguish the source camera device.  This is not
+    // globally unique and therefore cannot be used to identify the user and/or
+    // the device.
+    optional int32 device_id = 1;
+
+    // Peak number of clients during the service
+    optional int32 peak_num_clients = 2;
+
+    // Number of erroneous events during the service
+    optional int32 num_errors = 3;
+
+    // Round trip latency of the very first frame
+    optional int64 first_latency_millis = 4;
+
+    // Average frame round trip latency
+    optional float avg_latency_millis = 5;
+
+    // Peak frame round trip latency
+    optional int64 peak_latency_millis = 6;
+
+    // Total number of frames received
+    optional int64 total_frames = 7;
+
+    // Number of frames ignored
+    optional int64 ignored_frames = 8;
+
+    // Number of dropped frames to synchronize camera devices
+    optional int64 dropped_frames_to_sync = 9;
+
+    // The duration of the service
+    optional int64 duration_millis = 10;
+}
+
+/**
+ * Logs audio power usage stats.
+ *
+ * Pushed from:
+ *  frameworks/av/services/mediametrics/AudioPowerUsage.cpp
+ */
+message AudioPowerUsageDataReported {
+    /**
+     * Device used for input/output
+     *
+     * All audio devices please refer to below file:
+     * system/media/audio/include/system/audio-base.h
+     *
+     * Define our own enum values because we don't report all audio devices.
+     * Currently, we only report built-in audio devices such as handset, speaker,
+     * built-in mics, common audio devices such as wired headset, usb headset
+     * and bluetooth devices.
+     */
+    enum AudioDevice {
+        OUTPUT_EARPIECE         = 0x1; // handset
+        OUTPUT_SPEAKER          = 0x2; // dual speaker
+        OUTPUT_WIRED_HEADSET    = 0x4; // 3.5mm headset
+        OUTPUT_USB_HEADSET      = 0x8; // usb headset
+        OUTPUT_BLUETOOTH_SCO    = 0x10; // bluetooth sco
+        OUTPUT_BLUETOOTH_A2DP   = 0x20; // a2dp
+        OUTPUT_SPEAKER_SAFE     = 0x40; // bottom speaker
+
+        INPUT_DEVICE_BIT        = 0x40000000; // non-negative positive int32.
+        INPUT_BUILTIN_MIC       = 0x40000001; // buildin mic
+        INPUT_BUILTIN_BACK_MIC  = 0x40000002; // buildin back mic
+        INPUT_WIRED_HEADSET_MIC = 0x40000004; // 3.5mm headset mic
+        INPUT_USB_HEADSET_MIC   = 0x40000008; // usb headset mic
+        INPUT_BLUETOOTH_SCO     = 0x40000010; // bluetooth sco mic
+    }
+    optional AudioDevice audio_device = 1;
+
+    // Duration of the audio in seconds
+    optional int32 duration_secs = 2;
+
+    // Average volume (0 ... 1.0)
+    optional float average_volume = 3;
+
+    enum AudioType {
+        UNKNOWN_TYPE = 0;
+        VOICE_CALL_TYPE = 1; // voice call
+        VOIP_CALL_TYPE = 2; // voip call, including uplink and downlink
+        MEDIA_TYPE = 3; // music and system sound
+        RINGTONE_NOTIFICATION_TYPE = 4; // ringtone and notification
+        ALARM_TYPE = 5; // alarm type
+        // record type
+        CAMCORDER_TYPE = 6; // camcorder
+        RECORD_TYPE = 7;  // other recording
+    }
+    optional AudioType type = 4;
+}
+
+/**
+  * Pulls bytes transferred over WiFi and mobile networks sliced by uid, is_metered, and tag.
+  *
+  * Pulled from:
+  *   StatsPullAtomService, which uses NetworkStatsService to query NetworkStats.
+  */
+message BytesTransferByTagAndMetered {
+    optional int32 uid = 1 [(is_uid) = true];
+
+    optional bool is_metered = 2;
+
+    optional int32 tag = 3;
+
+    optional int64 rx_bytes = 4;
+
+    optional int64 rx_packets = 5;
+
+    optional int64 tx_bytes = 6;
+
+    optional int64 tx_packets = 7;
+}
+
+/*
+ * Logs when the Media Output Switcher finishes a media switch operation.
+ *
+ * Logged from:
+ *  packages/apps/Settings/src/com/android/settings/media/MediaOutputSliceWorker.java
+ */
+message MediaOutputOpSwitchReported {
+    // Source medium type before switching.
+    optional android.app.settings.mediaoutput.MediumType source = 1;
+
+    // Target medium type after switching.
+    optional android.app.settings.mediaoutput.MediumType target = 2;
+
+    // The result of switching.
+    optional android.app.settings.mediaoutput.SwitchResult result = 3;
+
+    // The detail code of a switching result.
+    optional android.app.settings.mediaoutput.SubResult subresult = 4;
+
+    /*
+     * The package name of a pre-installed app, whose media session is being switched.
+     */
+    optional string media_session_package_name = 5;
+
+    // The amount of available wired devices when a switching is being performed.
+    optional int32 available_wired_device_count = 6;
+
+    // The amount of available Bluetooth devices a switching is being performed.
+    optional int32 available_bt_device_count = 7;
+
+    // The amount of available remote devices when a switching is being performed.
+    optional int32 available_remote_device_count = 8;
+
+    // The amount of applied devices within a remote dynamic group after a switching is done.
+    optional int32 applied_device_count_within_remote_group = 9;
+}
+
+/**
+ * Logs when the Assistant is invoked.
+ *
+ * Logged from:
+ *   frameworks/base/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
+ */
+message AssistantInvocationReported {
+
+    // The event_id (as for UiEventReported).
+    optional int32 event_id = 1;
+
+    // The registered Assistant's uid and package (as for UiEventReported).
+    optional int32 uid = 2 [(is_uid) = true];
+    optional string package_name = 3;
+
+    // An identifier used to disambiguate which logs refer to a particular invocation of the
+    // Assistant  (as for UiEventReported).
+    optional int32 instance_id = 4;
+
+    // The state of the device at the time of invocation.
+    enum DeviceState {
+        UNKNOWN_DEVICE_STATE = 0;
+        AOD1 = 1;
+        AOD2 = 2;
+        BOUNCER = 3;
+        UNLOCKED_LOCKSCREEN = 4;
+        LAUNCHER_HOME = 5;
+        LAUNCHER_OVERVIEW = 6;
+        LAUNCHER_ALL_APPS = 7;
+        APP_DEFAULT = 8;
+        APP_IMMERSIVE = 9;
+        APP_FULLSCREEN = 10;
+    }
+    optional DeviceState device_state = 5;
+
+    // Whether the Assistant handles were showing at the time of invocation.
+    optional bool assistant_handles_showing = 6;
+}
+
+/**
+ * Logs when an AudioRecord finishes running on an audio device
+ *
+ * Logged from:
+ *   frameworks/av/services/mediametrics/AudioAnalytics.cpp
+ */
+message MediametricsAudioRecordDeviceUsageReported {
+    // The devices connected to this AudioRecord.
+    // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2".
+    // See lookup<INPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
+    // See audio_device_t in system/media/audio/include/system/audio-base.h
+    optional string devices = 1;
+
+    // The name of the remote device attached to the device, typically available for USB or BT.
+    // This may be empty for a fixed device, or separated by "|" if more than one.
+    optional string device_names = 2;
+
+    // The amount of time spent in the device as measured by the active track in AudioFlinger.
+    optional int64 device_time_nanos = 3;
+
+    // The audio data format used for encoding.
+    // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t
+    optional string encoding = 4;
+
+    // The client-server buffer framecount.
+    // The framecount is generally between 960 - 48000 for PCM encoding.
+    // The framecount represents raw buffer size in bytes for non-PCM encoding.
+    optional int32 frame_count = 5;
+
+    // The number of audio intervals (contiguous, continuous playbacks).
+    optional int32 interval_count = 6;
+
+    // The sample rate of the AudioRecord.
+    // A number generally between 8000-96000 (frames per second).
+    optional int32 sample_rate = 7;
+
+    // The audio input flags used to construct the AudioRecord.
+    // A string OR from system/media/audio/include/system/audio-base.h audio_input_flags_t
+    optional string flags = 8;
+
+    // The santized package name of the audio client associated with the AudioRecord.
+    // See getSanitizedPackageNameAndVersionCode() in
+    // frameworks/av/services/mediametrics/MediaMetricsService.cpp
+    optional string package_name = 9;
+
+    // The selected device id (nonzero if a non-default device is selected)
+    optional int32 selected_device_id = 10;
+
+    // The caller of the AudioRecord.
+    // See lookup<CALLER_NAME>() in frameworks/av/services/mediametrics/AudioTypes.cpp
+    optional string caller = 11;
+
+    // The audio source for AudioRecord.
+    // An enumeration from system/media/audio/include/system/audio-base.h audio_source_t
+    optional string source = 12;
+}
+
+/**
+ * Logs when an AudioThread finishes running on an audio device
+ *
+ * Logged from:
+ *   frameworks/av/services/mediametrics/AudioAnalytics.cpp
+ */
+message MediametricsAudioThreadDeviceUsageReported {
+    // The devices connected to this audio thread.
+    // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2".
+    // (for record threads):
+    // See lookup<INPUT_DEVICE> in frameworks/av/services/mediametrics/AudioTypes.cpp
+    // (for playback threads):
+    // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
+    // See audio_device_t in system/media/audio/include/system/audio-base.h
+    optional string devices = 1;
+
+    // The name of the remote device attached to the device, typically available for USB or BT.
+    // This may be empty for a fixed device, or separated by "|" if more than one.
+    optional string device_names = 2;
+
+    // The amount of time spent in the device as measured by the active track in AudioFlinger.
+    optional int64 device_time_nanos = 3;
+
+    // The audio data format used for encoding.
+    // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t
+    optional string encoding = 4;
+
+    // The framecount of the buffer delivered to (or from) the HAL.
+    // The framecount is generally ~960 for PCM encoding.
+    // The framecount represents raw buffer size in bytes for non-PCM encoding.
+    optional int32 frame_count = 5;
+
+    // The number of audio intervals (contiguous, continuous playbacks).
+    optional int32 interval_count = 6;
+
+    // The sample rate of the audio thread.
+    // A number generally between 8000-96000 (frames per second).
+    optional int32 sample_rate = 7;
+
+    // The audio flags used to construct the thread
+    // (for record threads):
+    // A string OR from system/media/audio/include/system/audio-base.h audio_input_flags_t
+    // (for playback threads):
+    // A string OR from system/media/audio/include/system/audio-base.h audio_output_flags_t
+    optional string flags = 8;
+
+    // The number of underruns encountered for a playback thread or the
+    // number of overruns encountered for a capture thread.
+    optional int32 xruns = 9;
+
+    // The type of thread
+    // A thread type enumeration from
+    // frameworks/av/mediametrics/services/Translate.h
+    optional string type = 10;
+}
+
+/**
+ * Logs when an AudioTrack finishes running on an audio device
+ *
+ * Logged from:
+ *   frameworks/av/services/mediametrics/AudioAnalytics.cpp
+ */
+message MediametricsAudioTrackDeviceUsageReported {
+    // The output devices connected to this AudioTrack.
+    // A string OR of various output device categories, e.g. "DEVICE1|DEVICE2".
+    // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
+    // See audio_device_t in system/media/audio/include/system/audio-base.h
+    optional string devices = 1;
+
+    // The name of the remote device attached to the device, typically available for USB or BT.
+    // This may be empty for a fixed device, or separated by "|" if more than one.
+    optional string device_names = 2;
+
+    // The amount of time spent in the device as measured by the active track in AudioFlinger.
+    optional int64 device_time_nanos = 3;
+
+    // The audio data format used for encoding.
+    // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t
+    optional string encoding = 4;
+
+    // The client-server buffer framecount.
+    // The framecount is generally between 960 - 48000 for PCM encoding.
+    // The framecount represents raw buffer size in bytes for non-PCM encoding.
+    // A static track (see traits) may have a very large framecount.
+    optional int32 frame_count = 5;
+
+    // The number of audio intervals (contiguous, continuous playbacks).
+    optional int32 interval_count = 6;
+
+    // The sample rate of the AudioTrack.
+    // A number generally between 8000-96000 (frames per second).
+    optional int32 sample_rate = 7;
+
+    // The audio flags used to construct the AudioTrack.
+    // A string OR from system/media/audio/include/system/audio-base.h audio_output_flags_t
+    optional string flags = 8;
+
+    // The number of underruns encountered.
+    optional int32 xruns = 9;
+
+    // The santized package name of the audio client associated with the AudioTrack.
+    // See getSanitizedPackageNameAndVersionCode() in
+    // frameworks/av/services/mediametrics/MediaMetricsService.cpp
+    optional string package_name = 10;
+
+    // The latency of the last sample in the buffer in milliseconds.
+    optional float device_latency_millis = 11;
+
+    // The startup time in milliseconds from start() to sample played.
+    optional float device_startup_millis = 12;
+
+    // The average volume of the track on the device [ 0.f - 1.f ]
+    optional float device_volume = 13;
+
+    // The selected device id (nonzero if a non-default device is selected)
+    optional int32 selected_device_id = 14;
+
+    // The stream_type category for the AudioTrack.
+    // An enumeration from system/media/audio/include/system/audio-base.h audio_stream_type_t
+    optional string stream_type = 15;
+
+    // The usage for the AudioTrack.
+    // An enumeration from system/media/audio/include/system/audio-base.h audio_usage_t
+    optional string usage = 16;
+
+    // The content type of the AudioTrack.
+    // An enumeration from system/media/audio/include/system/audio-base.h audio_content_type_t
+    optional string content_type = 17;
+
+    // The caller of the AudioTrack.
+    // See lookup<CALLER_NAME>() in frameworks/av/services/mediametrics/AudioTypes.cpp
+    optional string caller = 18;
+
+    // The traits of the AudioTrack.
+    // A string OR of different traits, may be empty string.
+    // Only "static" is supported for R.
+    // See lookup<TRACK_TRAITS>() in frameworks/av/services/mediametrics/AudioTypes.cpp
+    optional string traits = 19;
+}
+
+/**
+ * Logs the status of an audio device connection attempt.
+ *
+ * Logged from:
+ *   frameworks/av/services/mediametrics/AudioAnalytics.cpp
+ */
+message MediametricsAudioDeviceConnectionReported {
+    // The input devices represented by this report.
+    // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2".
+    // See lookup<INPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
+    // See audio_device_t in system/media/audio/include/system/audio-base.h
+    optional string input_devices = 1;
+
+    // The output devices represented by this report.
+    // A string OR of various output device categories.
+    // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
+    // See audio_device_t in system/media/audio/include/system/audio-base.h
+    optional string output_devices = 2;
+
+    // The name of the remote device attached to the device, typically available for USB or BT.
+    // This may be empty for a fixed device, or separated by "|" if more than one.
+    optional string device_names = 3;
+
+    // The result of the audio device connection.
+    // 0 indicates success: connection verified.
+    // 1 indicates unknown: connection not verified or not known if diverted properly.
+    // Other values indicate specific status.
+    // See DeviceConnectionResult in frameworks/av/services/mediametrics/AudioTypes.h
+    optional int32 result = 4;
+
+    // Average milliseconds of time to connect
+    optional float time_to_connect_millis = 5;
+
+    // Number of connections if aggregated statistics, otherwise 1.
+    optional int32 connection_count = 6;
+}
+
+/**
  * Logs: i) creation of different types of cryptographic keys in the keystore,
  * ii) operations performed using the keys,
  * iii) attestation of the keys
@@ -7999,9 +11095,9 @@
     optional KeyBlobUsageRequirements key_blob_usage_reqs = 11;
 
     enum Type {
-        KEY_OPERATION = 0;
-        KEY_CREATION = 1;
-        KEY_ATTESTATION = 2;
+        key_operation = 0;
+        key_creation = 1;
+        key_attestation = 2;
     }
     /** Key creation event, operation event or attestation event? */
     optional Type type = 12;
@@ -8012,3 +11108,72 @@
     /** Response code or error code */
     optional int32 error_code = 14;
 }
+
+// Blob Committer stats
+// Keep in sync between:
+//     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
+//     frameworks/base/cmds/statsd/src/atoms.proto
+message BlobCommitterProto {
+    // Committer app's uid
+    optional int32 uid = 1 [(is_uid) = true];
+
+    // Unix epoch timestamp of the commit in milliseconds
+    optional int64 commit_timestamp_millis = 2;
+
+    // Flags of what access types the committer has set for the Blob
+    optional int32 access_mode = 3;
+
+    // Number of packages that have been whitelisted for ACCESS_TYPE_WHITELIST
+    optional int32 num_whitelisted_package = 4;
+}
+
+// Blob Leasee stats
+// Keep in sync between:
+//     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
+//     frameworks/base/cmds/statsd/src/atoms.proto
+message BlobLeaseeProto {
+    // Leasee app's uid
+    optional int32 uid = 1 [(is_uid) = true];
+
+    // Unix epoch timestamp for lease expiration in milliseconds
+    optional int64 lease_expiry_timestamp_millis = 2;
+}
+
+// List of Blob Committers
+// Keep in sync between:
+//     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
+//     frameworks/base/cmds/statsd/src/atoms.proto
+message BlobCommitterListProto {
+    repeated BlobCommitterProto committer = 1;
+}
+
+// List of Blob Leasees
+// Keep in sync between:
+//     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
+//     frameworks/base/cmds/statsd/src/atoms.proto
+message BlobLeaseeListProto {
+    repeated BlobLeaseeProto leasee = 1;
+}
+
+/**
+ * Logs the current state of a Blob committed with BlobStoreManager
+ *
+ * Pulled from:
+ *  frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
+ */
+message BlobInfo {
+    // Id of the Blob
+    optional int64 blob_id = 1;
+
+    // Size of the Blob data
+    optional int64 size = 2;
+
+    // Unix epoch timestamp of the Blob's expiration in milliseconds
+    optional int64 expiry_timestamp_millis = 3;
+
+    // List of committers of this Blob
+    optional BlobCommitterListProto committers = 4;
+
+    // List of leasees of this Blob
+    optional BlobLeaseeListProto leasees = 5;
+}
diff --git a/stats/enums/app/enums.proto b/stats/enums/app/enums.proto
index 9abe923..bd5cb62 100644
--- a/stats/enums/app/enums.proto
+++ b/stats/enums/app/enums.proto
@@ -104,3 +104,107 @@
     PROCESS_STATE_NONEXISTENT = 1019;
 }
 
+// AppOpsManager.java - operation ids for logging
+enum AppOpEnum {
+    APP_OP_NONE = -1;
+    APP_OP_COARSE_LOCATION = 0;
+    APP_OP_FINE_LOCATION = 1;
+    APP_OP_GPS = 2;
+    APP_OP_VIBRATE = 3;
+    APP_OP_READ_CONTACTS = 4;
+    APP_OP_WRITE_CONTACTS = 5;
+    APP_OP_READ_CALL_LOG = 6;
+    APP_OP_WRITE_CALL_LOG = 7;
+    APP_OP_READ_CALENDAR = 8;
+    APP_OP_WRITE_CALENDAR = 9;
+    APP_OP_WIFI_SCAN = 10;
+    APP_OP_POST_NOTIFICATION = 11;
+    APP_OP_NEIGHBORING_CELLS = 12;
+    APP_OP_CALL_PHONE = 13;
+    APP_OP_READ_SMS = 14;
+    APP_OP_WRITE_SMS = 15;
+    APP_OP_RECEIVE_SMS = 16;
+    APP_OP_RECEIVE_EMERGENCY_SMS = 17;
+    APP_OP_RECEIVE_MMS = 18;
+    APP_OP_RECEIVE_WAP_PUSH = 19;
+    APP_OP_SEND_SMS = 20;
+    APP_OP_READ_ICC_SMS = 21;
+    APP_OP_WRITE_ICC_SMS = 22;
+    APP_OP_WRITE_SETTINGS = 23;
+    APP_OP_SYSTEM_ALERT_WINDOW = 24;
+    APP_OP_ACCESS_NOTIFICATIONS = 25;
+    APP_OP_CAMERA = 26;
+    APP_OP_RECORD_AUDIO = 27;
+    APP_OP_PLAY_AUDIO = 28;
+    APP_OP_READ_CLIPBOARD = 29;
+    APP_OP_WRITE_CLIPBOARD = 30;
+    APP_OP_TAKE_MEDIA_BUTTONS = 31;
+    APP_OP_TAKE_AUDIO_FOCUS = 32;
+    APP_OP_AUDIO_MASTER_VOLUME = 33;
+    APP_OP_AUDIO_VOICE_VOLUME = 34;
+    APP_OP_AUDIO_RING_VOLUME = 35;
+    APP_OP_AUDIO_MEDIA_VOLUME = 36;
+    APP_OP_AUDIO_ALARM_VOLUME = 37;
+    APP_OP_AUDIO_NOTIFICATION_VOLUME = 38;
+    APP_OP_AUDIO_BLUETOOTH_VOLUME = 39;
+    APP_OP_WAKE_LOCK = 40;
+    APP_OP_MONITOR_LOCATION = 41;
+    APP_OP_MONITOR_HIGH_POWER_LOCATION = 42;
+    APP_OP_GET_USAGE_STATS = 43;
+    APP_OP_MUTE_MICROPHONE = 44;
+    APP_OP_TOAST_WINDOW = 45;
+    APP_OP_PROJECT_MEDIA = 46;
+    APP_OP_ACTIVATE_VPN = 47;
+    APP_OP_WRITE_WALLPAPER = 48;
+    APP_OP_ASSIST_STRUCTURE = 49;
+    APP_OP_ASSIST_SCREENSHOT = 50;
+    APP_OP_READ_PHONE_STATE = 51;
+    APP_OP_ADD_VOICEMAIL = 52;
+    APP_OP_USE_SIP = 53;
+    APP_OP_PROCESS_OUTGOING_CALLS = 54;
+    APP_OP_USE_FINGERPRINT = 55;
+    APP_OP_BODY_SENSORS = 56;
+    APP_OP_READ_CELL_BROADCASTS = 57;
+    APP_OP_MOCK_LOCATION = 58;
+    APP_OP_READ_EXTERNAL_STORAGE = 59;
+    APP_OP_WRITE_EXTERNAL_STORAGE = 60;
+    APP_OP_TURN_SCREEN_ON = 61;
+    APP_OP_GET_ACCOUNTS = 62;
+    APP_OP_RUN_IN_BACKGROUND = 63;
+    APP_OP_AUDIO_ACCESSIBILITY_VOLUME = 64;
+    APP_OP_READ_PHONE_NUMBERS = 65;
+    APP_OP_REQUEST_INSTALL_PACKAGES = 66;
+    APP_OP_PICTURE_IN_PICTURE = 67;
+    APP_OP_INSTANT_APP_START_FOREGROUND = 68;
+    APP_OP_ANSWER_PHONE_CALLS = 69;
+    APP_OP_RUN_ANY_IN_BACKGROUND = 70;
+    APP_OP_CHANGE_WIFI_STATE = 71;
+    APP_OP_REQUEST_DELETE_PACKAGES = 72;
+    APP_OP_BIND_ACCESSIBILITY_SERVICE = 73;
+    APP_OP_ACCEPT_HANDOVER = 74;
+    APP_OP_MANAGE_IPSEC_TUNNELS = 75;
+    APP_OP_START_FOREGROUND = 76;
+    APP_OP_BLUETOOTH_SCAN = 77;
+    APP_OP_USE_BIOMETRIC = 78;
+    APP_OP_ACTIVITY_RECOGNITION = 79;
+    APP_OP_SMS_FINANCIAL_TRANSACTIONS = 80;
+    APP_OP_READ_MEDIA_AUDIO = 81;
+    APP_OP_WRITE_MEDIA_AUDIO = 82;
+    APP_OP_READ_MEDIA_VIDEO = 83;
+    APP_OP_WRITE_MEDIA_VIDEO = 84;
+    APP_OP_READ_MEDIA_IMAGES = 85;
+    APP_OP_WRITE_MEDIA_IMAGES = 86;
+    APP_OP_LEGACY_STORAGE = 87;
+    APP_OP_ACCESS_ACCESSIBILITY = 88;
+    APP_OP_READ_DEVICE_IDENTIFIERS = 89;
+    APP_OP_ACCESS_MEDIA_LOCATION = 90;
+    APP_OP_QUERY_ALL_PACKAGES = 91;
+    APP_OP_MANAGE_EXTERNAL_STORAGE = 92;
+    APP_OP_INTERACT_ACROSS_PROFILES = 93;
+    APP_OP_ACTIVATE_PLATFORM_VPN = 94;
+    APP_OP_LOADER_USAGE_STATS = 95;
+    APP_OP_DEPRECATED_1 = 96 [deprecated = true];
+    APP_OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED = 97;
+    APP_OP_AUTO_REVOKE_MANAGED_BY_INSTALLER = 98;
+    APP_OP_NO_ISOLATED_STORAGE = 99;
+}
diff --git a/stats/enums/app/job/enums.proto b/stats/enums/app/job/enums.proto
index f702b3e..41863bb 100644
--- a/stats/enums/app/job/enums.proto
+++ b/stats/enums/app/job/enums.proto
@@ -34,4 +34,5 @@
     STOP_REASON_TIMEOUT = 3;
     STOP_REASON_DEVICE_IDLE = 4;
     STOP_REASON_DEVICE_THERMAL = 5;
+    STOP_REASON_RESTRICTED_BUCKET = 6;
 }
diff --git a/stats/enums/app/media_output_enum.proto b/stats/enums/app/media_output_enum.proto
new file mode 100644
index 0000000..0d42fb7
--- /dev/null
+++ b/stats/enums/app/media_output_enum.proto
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+
+package android.app.settings.mediaoutput;
+option java_multiple_files = true;
+
+/**
+ * The medium type specified in an output switching operation.
+ */
+enum MediumType {
+    UNKNOWN_TYPE = 0;
+    BUILTIN_SPEAKER = 1;
+    WIRED_3POINT5_MM_AUDIO = 100;
+    WIRED_3POINT5_MM_HEADSET = 101;
+    WIRED_3POINT5_MM_HEADPHONES = 102;
+    USB_C_AUDIO = 200;
+    USB_C_DEVICE = 201;
+    USB_C_HEADSET = 202;
+    USB_C_ACCESSORY = 203;
+    USB_C_DOCK = 204;
+    USB_C_HDMI = 205;
+    BLUETOOTH = 300;
+    BLUETOOTH_HEARING_AID = 301;
+    BLUETOOTH_A2DP = 302;
+    REMOTE_SINGLE = 400;
+    REMOTE_TV = 401;
+    REMOTE_SPEAKER = 402;
+    REMOTE_GROUP = 500;
+    REMOTE_DYNAMIC_GROUP = 501;
+};
+
+/**
+ * The result of an output switching operation.
+ */
+enum SwitchResult {
+    ERROR = 0;
+    OK = 1;
+};
+
+/**
+ * The sub result of an output switching operation.
+ */
+enum SubResult {
+    UNKNOWN_ERROR = 0;
+    NO_ERROR = 1;
+    REJECTED = 2;
+    NETWORK_ERROR = 3;
+    ROUTE_NOT_AVAILABLE = 4;
+    INVALID_COMMAND = 5;
+}
diff --git a/stats/enums/app/settings_enums.proto b/stats/enums/app/settings_enums.proto
index 51266de..69b32c2 100644
--- a/stats/enums/app/settings_enums.proto
+++ b/stats/enums/app/settings_enums.proto
@@ -251,6 +251,9 @@
     // ACTION: Create a Settings shortcut item.
     ACTION_SETTINGS_CREATE_SHORTCUT = 829;
 
+    // ACTION: A tile in Settings information architecture is clicked
+    ACTION_SETTINGS_TILE_CLICK = 830;
+
     // ACTION: Settings advanced button is expanded
     ACTION_SETTINGS_ADVANCED_BUTTON_EXPAND = 834;
 
@@ -689,6 +692,29 @@
     // ACTION: Settings > Initialize Search bar > Verify Slice > Other exception
     ACTION_VERIFY_SLICE_OTHER_EXCEPTION = 1727;
 
+    // Custom tag to evaluate the consuming time of the Controller.updateState.
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACTION_CONTROLLER_UPDATE_STATE = 1728;
+
+    // Custom tag to evaluate the consuming time from onAttach to
+    // DashboardFragment.updatePreferenceStates.
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACTION_DASHBOARD_VISIBLE_TIME = 1729;
+
+    // ACTION: Allow "Access all files" for an app
+    APP_SPECIAL_PERMISSION_MANAGE_EXT_STRG_ALLOW = 1730;
+
+    // ACTION: Deny "Access all files" for an app
+    APP_SPECIAL_PERMISSION_MANAGE_EXT_STRG_DENY = 1731;
+
+    // ACTION: Battery feature usage
+    ACTION_BATTERY_OPTION_FEATURE_USAGE = 1732;
+
+    // ACTION: Battery feature runtime event
+    ACTION_BATTERY_OPTION_RUNTIME_EVENT = 1733;
+
     // ACTION: Settings > Developer Options > Toggle on Wireless debugging
     // CATEGORY: SETTINGS
     // OS: R
@@ -698,6 +724,26 @@
     // CATEGORY: SETTINGS
     // OS: R
     ACTION_ADB_WIRELESS_OFF = 1735;
+
+    // ACTION: Change Wi-Fi hotspot name
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACTION_SETTINGS_CHANGE_WIFI_HOTSPOT_NAME = 1736;
+
+    // ACTION: Change Wi-Fi hotspot password
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACTION_SETTINGS_CHANGE_WIFI_HOTSPOT_PASSWORD = 1737;
+
+    // ACTION: Settings > Security > Toggle on Confirm Sim deletion
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACTION_CONFIRM_SIM_DELETION_ON = 1738;
+
+    // ACTION: Settings > Security > Toggle off Confirm Sim deletion
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACTION_CONFIRM_SIM_DELETION_OFF = 1739;
 }
 
 /**
@@ -712,7 +758,7 @@
     // OS: 6.0
     ACCESSIBILITY = 2;
 
-    // OPEN: Settings > Accessibility > Captions
+    // OPEN: Settings > Accessibility > Captions preference
     // CATEGORY: SETTINGS
     // OS: 6.0
     ACCESSIBILITY_CAPTION_PROPERTIES = 3;
@@ -2421,17 +2467,154 @@
     // CATEGORY: SETTINGS
     // OS: Q
     SETTINGS_GESTURE_TAP = 1751;
+    // ---- End Q Constants, all Q constants go above this line ----
+    // OPEN: Settings > Network & Internet > Wi-Fi > Click new network
+    // CATEGORY: SETTINGS
+    // OS: R
+    SETTINGS_WIFI_CONFIGURE_NETWORK = 1800;
+
+    // OPEN: Settings > Accessibility > Magnification
+    // CATEGORY: SETTINGS
+    // OS: R
+    // Note: Shows up only when Magnify with shortcut is enabled
+    // and under accessibility button mode.
+    DIALOG_TOGGLE_SCREEN_MAGNIFICATION_ACCESSIBILITY_BUTTON = 1801;
+
+    // OPEN: Settings > Accessibility > Magnification
+    // CATEGORY: SETTINGS
+    // OS: R
+    // Note: Shows up only when Magnify with shortcut is enabled.
+    // and under gesture navigation mode.
+    DIALOG_TOGGLE_SCREEN_MAGNIFICATION_GESTURE_NAVIGATION = 1802;
 
     // OPEN: Settings > Security & screen lock -> Encryption & credentials > Install a certificate
     // CATEGORY: SETTINGS
     // OS: R
     INSTALL_CERTIFICATE_FROM_STORAGE = 1803;
 
+    // OPEN: Settings > Apps and notifications > Special app access > notification access >
+    // an app
+    // CATEGORY: SETTINGS
+    // OS: R
+    NOTIFICATION_ACCESS_DETAIL = 1804;
+
     // OPEN: Settings > Developer Options > Platform Compat
     // CATEGORY: SETTINGS
     // OS: R
     SETTINGS_PLATFORM_COMPAT_DASHBOARD = 1805;
 
+    // OPEN: Settings > Location -> Work profile tab
+    // CATEGORY: SETTINGS
+    // OS: R
+    LOCATION_WORK = 1806;
+
+    // OPEN: Settings > Account -> Work profile tab
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACCOUNT_WORK = 1807;
+
+    // OPEN: Settings > Developer Options > Bug report handler
+    // CATEGORY: SETTINGS
+    // OS: R
+    SETTINGS_BUGREPORT_HANDLER = 1808;
+
+    // Panel for adding Wi-Fi networks
+    // CATEGORY: SETTINGS
+    // OS: R
+    PANEL_ADD_WIFI_NETWORKS = 1809;
+
+    // OPEN: Settings > Accessibility > Enable the feature or shortcut > Show tutorial dialog
+    // CATEGORY: SETTINGS
+    // OS: R
+    DIALOG_ACCESSIBILITY_TUTORIAL = 1810;
+
+    // OPEN: Settings > Accessibility > Edit shortcut dialog
+    // CATEGORY: SETTINGS
+    // OS: R
+    DIALOG_ACCESSIBILITY_SERVICE_EDIT_SHORTCUT = 1812;
+
+    // OPEN: Settings > Accessibility > Magnification > Edit shortcut dialog
+    // CATEGORY: SETTINGS
+    // OS: R
+    DIALOG_MAGNIFICATION_EDIT_SHORTCUT = 1813;
+
+    // OPEN: Settings > Accessibility > Color correction > Edit shortcut dialog
+    // CATEGORY: SETTINGS
+    // OS: R
+    DIALOG_DALTONIZER_EDIT_SHORTCUT = 1814;
+
+    // OPEN: Settings > Accessibility > Magnification > Settings
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACCESSIBILITY_MAGNIFICATION_SETTINGS = 1815;
+
+    // OPEN: Settings > Accessibility > Magnification > Settings > Magnification area dialog
+    // CATEGORY: SETTINGS
+    // OS: R
+    DIALOG_MAGNIFICATION_CAPABILITY = 1816;
+
+    // OPEN: Settings > Accessibility > Color inversion
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACCESSIBILITY_COLOR_INVERSION_SETTINGS = 1817;
+
+    // OPEN: Settings > Accessibility > Color inversion > Edit shortcut dialog
+    // CATEGORY: SETTINGS
+    // OS: R
+    DIALOG_COLOR_INVERSION_EDIT_SHORTCUT = 1818;
+
+    // OPEN: Settings > Accessibility > Captions preference > Captions appearance
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACCESSIBILITY_CAPTION_APPEARANCE = 1819;
+
+    // OPEN: Settings > Accessibility > Captions preference > More options
+    // CATEGORY: SETTINGS
+    // OS: R
+    ACCESSIBILITY_CAPTION_MORE_OPTIONS = 1820;
+
+    // OPEN: Settings > Battery > Battery share
+    // CATEGORY: SETTINGS
+    // OS: R
+    FUELGAUGE_BATTERY_SHARE = 1821;
+
+    // OPEN: Settings -> Apps & Notifications -> Special App Access
+    // CATEGORY: SETTINGS
+    // OS: R
+    MANAGE_EXTERNAL_STORAGE = 1822;
+
+    // Open: Settings > DND > People
+    // OS: R
+    DND_PEOPLE = 1823;
+
+    // OPEN: Settings > Apps and notifications > App info > one of any app > Open by default
+    //       > Open supported links
+    // CATEGORY: SETTINGS
+    // OS: R
+    OPEN_SUPPORTED_LINKS = 1824;
+
+    // OPEN: Settings > Display > Dark theme > Set start time dialog
+    DIALOG_DARK_THEME_SET_START_TIME = 1825;
+
+    // OPEN: Settings > Display > Dark theme > Set end time dialog
+    DIALOG_DARK_THEME_SET_END_TIME = 1826;
+
+    // OPEN: Settings -> Sound -> Vibrate for calls
+    // CATEGORY: SETTINGS
+    // OS: R
+    VIBRATE_FOR_CALLS = 1827;
+
+    // OPEN: Settings > Connected devices > Connection preferences > NFC
+    // CATEGORY: SETTINGS
+    // OS: R
+    CONNECTION_DEVICE_ADVANCED_NFC = 1828;
+
+    // OPEN: Settings -> Apps & Notifications -> Special App Access
+    INTERACT_ACROSS_PROFILES = 1829;
+
+    // OPEN: Settings > Notifications > (app or conversations) > conversation
+    NOTIFICATION_CONVERSATION_SETTINGS = 1830;
+
     // OPEN: Settings > Developer Options > Wireless debugging
     // CATEGORY: SETTINGS
     // OS: R
@@ -2449,9 +2632,55 @@
     // OS: R
     ADB_WIRELESS_DEVICE_QR_PAIRING_DIALOG = 1833;
 
+    // OPEN: Settings > apps & notifications > notifications > conversations
+    // CATEGORY: SETTINGS
+    // OS: R
+    NOTIFICATION_CONVERSATION_LIST_SETTINGS = 1834;
+
+    // Panel for Media Output Group operation
+    // CATEGORY: SETTINGS
+    // OS: R
+    PANEL_MEDIA_OUTPUT_GROUP = 1835;
+
     // OPEN: Settings > Developer Options > Wireless debugging
     //   > Click on paired device
     // CATEGORY: SETTINGS
     // OS: R
     ADB_WIRELESS_DEVICE_DETAILS = 1836;
+
+    // Open: Settings > Sound > Do Not Disturb > People > Conversations
+    // OS: R
+    DND_CONVERSATIONS = 1837;
+
+    // Open: Settings > Sound > Do Not Disturb > People > Calls
+    // OS: R
+    DND_CALLS = 1838;
+
+    // Open: Settings > Sound > Do Not Disturb > People > Messages
+    // OS: R
+    DND_MESSAGES = 1839;
+
+    // Open: Settings > Sound > Do Not Disturb > Apps > <Choose App>
+    // OS: R
+    DND_APPS_BYPASSING = 1840;
+
+    // OPEN: Settings > Battery > Advanced battery option
+    // CATEGORY: SETTINGS
+    // OS: R
+    FUELGAUGE_ADVANCED_BATTERY_OPTION = 1842;
+
+    // OPEN: Settings > System > Gestures > Power menu
+    // CATEGORY: SETTINGS
+    // OS: R
+    POWER_MENU_SETTINGS = 1843;
+
+    // OPEN: Settings > System > Gestures > Power menu > Device controls
+    // CATEGORY: SETTINGS
+    // OS: R
+    DEVICE_CONTROLS_SETTINGS = 1844;
+
+    // OPEN: Settings > Sound > Media
+    // CATEGORY: SETTINGS
+    // OS: R
+    MEDIA_CONTROLS_SETTINGS = 1845;
 }
diff --git a/stats/enums/app/tvsettings_enums.proto b/stats/enums/app/tvsettings_enums.proto
new file mode 100644
index 0000000..31c5dd6
--- /dev/null
+++ b/stats/enums/app/tvsettings_enums.proto
@@ -0,0 +1,941 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+
+package android.app.tvsettings;
+option java_multiple_files = true;
+option java_outer_classname = "TvSettingsEnums";
+
+/** The performed action types */
+enum Action {
+
+    /**
+     * Denotes an unknown action. It is a filler that should generally be
+     * avoided.
+     */
+    ACTION_UNKNOWN = 0;
+
+    /**
+     * Denotes that a TvSettings page is being focused. (Previewing a page in
+     * two panel settings should NOT be considered as focusing on the page.)
+     */
+    PAGE_FOCUSED = 1;
+
+    /**
+     * Denotes that an entry (typically a leaf node of settings tree) is
+     * selected by a user.
+     */
+    ENTRY_SELECTED = 2;
+
+    /** Denotes that a toggle is clicked by a user. */
+    TOGGLE_INTERACTED = 3;
+
+    /**
+     * Denotes that a TvSettings page is being focused in the forward direction
+     * into the settings tree.
+     */
+    PAGE_FOCUSED_FORWARD = 4;
+
+    /**
+     * Denotes that a TvSettings page is being focused in the backward direction
+     * up the settings tree.
+     */
+    PAGE_FOCUSED_BACKWARD = 5;
+
+    /** Denotes that a toggle is turned on by a user. */
+    TOGGLED_ON = 6;
+
+    /** Denotes that a toggle is turned off by a user. */
+    TOGGLED_OFF = 7;
+
+}
+
+/**
+ * Ids for TvSettings focusable pages or actionable entries
+ *
+ * For details of the scheme, please refer to the "Definition of item_id" and
+ * "Evolve of item_id" sections in go/atv-settings-ww-logging-design.
+ */
+enum ItemId {
+
+    option allow_alias = true;
+
+    // Filler that should be avoided
+    UNKNOWN = 0x00000000;
+
+    // TvSettings
+    TV_SETTINGS_ROOT = 0x00000001;
+
+    // TvSettings unknown/default classic page
+    PAGE_CLASSIC_DEFAULT = 0x00000002;
+
+    // TvSettings unknown/default slice page
+    PAGE_SLICE_DEFAULT = 0x00000003;
+
+    // TvSettings unknown/default entry
+    ENTRY_DEFAULT = 0x00000004;
+
+    // TvSettings > Suggested settings entry
+    SUGGESTED_SETTINGS = 0x00000010;
+
+    // TvSettings > Quick Settings
+    QUICK_SETTINGS = 0x00000011;
+
+    // VERSION 1: Starting with Q
+    // These are ordered in depth-first search manner.
+
+    // TvSettings > Network & Internet
+    NETWORK = 0x11000000;
+
+    // TvSettings > Network & Internet > Wi-Fi (toggle)
+    NETWORK_WIFI_ON_OFF = 0x11100000;
+
+    // TvSettings > Network & Internet >
+    // [A connected network entry in available networks list]
+    NETWORK_AP_INFO = 0x11200000;
+
+    // TvSettings > Network & Internet >
+    // [A connected network entry in available networks list] > Proxy settings
+    NETWORK_AP_INFO_PROXY_SETTINGS = 0x11210000;
+
+    // TvSettings > Network & Internet >
+    // [A connected network entry in available networks list] > IP settings
+    NETWORK_AP_INFO_IP_SETTINGS = 0x11220000;
+
+    // TvSettings > Network & Internet >
+    // [A connected network entry in available networks list] > Forget network
+    NETWORK_AP_INFO_FORGET_NETWORK = 0x11230000;
+
+    // TvSettings > Network & Internet >
+    // [A not connected network entry in available networks list]
+    NETWORK_NOT_CONNECTED_AP = 0x11300000;
+
+    // TvSettings > Network & Internet > See all
+    NETWORK_SEE_ALL = 0x11400000;
+
+    // TvSettings > Network & Internet > See fewer
+    NETWORK_SEE_FEWER = 0x11500000;
+
+    // TvSettings > Network & Internet > Add new network
+    NETWORK_ADD_NEW_NETWORK = 0x11600000;
+
+    // TvSettings > Network & Internet > Scanning always available (toggle)
+    NETWORK_ALWAYS_SCANNING_NETWORKS = 0x11700000;
+
+    // TvSettings > Network & Internet > Proxy settings (in Ethernet category)
+    NETWORK_ETHERNET_PROXY_SETTINGS = 0x11800000;
+
+    // TvSettings > Network & Internet > IP settings (in Ethernet category)
+    NETWORK_ETHERNET_IP_SETTINGS = 0x11900000;
+
+    // TvSettings > Account & Sign In (Slice)
+    ACCOUNT_SLICE = 0x12000000;
+
+    // TvSettings > Account & Sign In (Slice) > [A regular account]
+    ACCOUNT_SLICE_REG_ACCOUNT = 0x12100000;
+
+    // TvSettings > Account & Sign In (Slice) > [A regular account] >
+    // Google Assistant
+    ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT = 0x12130000;
+
+    // TvSettings > Account & Sign In (Slice) > [A regular account] >
+    // Google Assistant > SafeSearch filter (toggle)
+    ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SAFE_SEARCH = 0x12131000;
+
+    // TvSettings > Account & Sign In (Slice) > [A regular account] >
+    // Google Assistant > Block offensive words (toggle)
+    ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_BLOCK_OFFENSIVE = 0x12132000;
+
+    // TvSettings > Account & Sign In (Slice) > [A regular account] >
+    // Google Assistant > Searchable apps
+    ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SEARCHABLE_APPS = 0x12133000;
+
+    // TvSettings > Account & Sign In (Slice) > [A regular account] >
+    // Google Assistant > Personal results (toggle)
+    ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_PERSONAL_RESULTS = 0x12134000;
+
+    // Reserving [0x12140000, 0x12190000] for possible future settings
+
+    // TvSettings > Account & Sign In (Slice) > [A regular account] > Remove
+    ACCOUNT_SLICE_REG_ACCOUNT_REMOVE = 0x121A0000;
+
+    // Reserving [0x12200000, 0x12900000] for possible future settings
+
+    // TvSettings > Account & Sign In (Slice) > Add account...
+    ACCOUNT_SLICE_ADD_ACCOUNT = 0x12A00000;
+
+    // TvSettings > Account & Sign In (Classic)
+    ACCOUNT_CLASSIC = 0x13000000;
+
+    // TvSettings > Account & Sign In (Classic) > [A regular account]
+    ACCOUNT_CLASSIC_REG_ACCOUNT = 0x13100000;
+
+    // TvSettings > Account & Sign In (Classic) > [A regular account] > Sync now
+    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_NOW = 0x13110000;
+
+    // TvSettings > Account & Sign In (Classic) > [A regular account] >
+    // Remove account
+    ACCOUNT_CLASSIC_REG_ACCOUNT_REMOVE_ACCOUNT = 0x13120000;
+
+    // TvSettings > Account & Sign In (Classic) > [A regular account] >
+    // [Choose synced apps] Calendar (toggle)
+    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_CALENDAR = 0x13130000;
+
+    // TvSettings > Account & Sign In (Classic) > [A regular account] >
+    // [Choose synced apps] Contacts (toggle)
+    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_CONTACTS = 0x13140000;
+
+    // TvSettings > Account & Sign In (Classic) > [A regular account] >
+    // [Choose synced apps] Google Play Movies & TV (toggle)
+    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_GPMT = 0x13150000;
+
+    // TvSettings > Account & Sign In (Classic) > [A regular account] >
+    // [Choose synced apps] Google Play Music (toggle)
+    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_GPM = 0x13160000;
+
+    // TvSettings > Account & Sign In (Classic) > [A regular account] >
+    // [Choose synced apps] People details (toggle)
+    ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_PEOPLE = 0x13170000;
+
+    // Reserving [0x13200000, 0x13900000] for possible future settings
+
+    // TvSettings > Account & Sign In (Classic) > Add account
+    ACCOUNT_CLASSIC_ADD_ACCOUNT = 0x13A00000;
+
+    // TvSettings > Display & Sound
+    DISPLAY_SOUND = 0x15000000;
+
+    // TvSettings > Display & Sound > Advanced display settings
+    DISPLAY_SOUND_ADVANCED_DISPLAY = 0x15100000;
+
+    // TvSettings > Display & Sound > Advanced display settings >
+    // Allow game mode (toggle)
+    DISPLAY_SOUND_ADVANCED_DISPLAY_GAME_MODE = 0x15110000;
+
+    // TvSettings > Display & Sound > System sounds (toggle)
+    DISPLAY_SOUND_SYSTEM_SOUNDS = 0x15200000;
+
+    // TvSettings > Display & Sound > Advanced sound settings
+    DISPLAY_SOUND_ADVANCED_SOUNDS = 0x15300000;
+
+    // TvSettings > Display & Sound > Advanced sound settings > Select formats
+    DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS = 0x15310000;
+
+    // TvSettings > Display & Sound > Advanced sound settings > Select formats >
+    // Auto...
+    DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS_AUTO = 0x15311000;
+
+    // TvSettings > Display & Sound > Advanced sound settings > Select formats >
+    // None...
+    DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS_NONE = 0x15312000;
+
+    // TvSettings > Display & Sound > Advanced sound settings > Select formats >
+    // Manual...
+    DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS_MANUAL = 0x15313000;
+
+    // TvSettings > Display & Sound > Advanced sound settings >
+    // Dolby AC-4 (toggle)
+    DISPLAY_SOUND_ADVANCED_SOUNDS_DAC4 = 0x15320000;
+
+    // TvSettings > Display & Sound > Advanced sound settings >
+    // Dolby Atmos in Dolby Digital Plus (toggle)
+    DISPLAY_SOUND_ADVANCED_SOUNDS_DADDP = 0x15330000;
+
+    // TvSettings > Display & Sound > Advanced sound settings >
+    // Dolby Digital (toggle)
+    DISPLAY_SOUND_ADVANCED_SOUNDS_DD = 0x15340000;
+
+    // TvSettings > Display & Sound > Advanced sound settings >
+    // Dolby Digital Plus (toggle)
+    DISPLAY_SOUND_ADVANCED_SOUNDS_DDP = 0x15350000;
+
+    // TvSettings > Display & Sound > Advanced sound settings > DTS (toggle)
+    DISPLAY_SOUND_ADVANCED_SOUNDS_DTS = 0x15360000;
+
+    // TvSettings > Display & Sound > Advanced sound settings > DTS-HD (toggle)
+    DISPLAY_SOUND_ADVANCED_SOUNDS_DTSHD = 0x15370000;
+
+    // TvSettings > Display & Sound > Advanced sound settings > AAC (toggle)
+    DISPLAY_SOUND_ADVANCED_SOUNDS_AAC = 0x15380000;
+
+    // TvSettings > Display & Sound > Advanced sound settings >
+    // Dolby TrueHD (toggle)
+    DISPLAY_SOUND_ADVANCED_SOUNDS_DTHD = 0x15390000;
+
+    // TvSettings > Apps
+    APPS = 0x16000000;
+
+    // TvSettings > Apps > See all apps
+    APPS_ALL_APPS = 0x16100000;
+
+    // TvSettings > Apps > See all apps > [An app entry]
+    APPS_ALL_APPS_APP_ENTRY = 0x16110000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Open
+    APPS_ALL_APPS_APP_ENTRY_OPEN = 0x16111000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Force stop
+    APPS_ALL_APPS_APP_ENTRY_FORCE_STOP = 0x16112000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Uninstall
+    APPS_ALL_APPS_APP_ENTRY_UNINSTALL = 0x16113000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Uninstall updates
+    APPS_ALL_APPS_APP_ENTRY_UNINSTALL_UPDATES = 0x16114000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Disable
+    APPS_ALL_APPS_APP_ENTRY_DISABLE = 0x16115000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Clear data
+    APPS_ALL_APPS_APP_ENTRY_CLEAR_DATA = 0x16116000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Clear cache
+    APPS_ALL_APPS_APP_ENTRY_CLEAR_CACHE = 0x16117000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Clear defaults
+    APPS_ALL_APPS_APP_ENTRY_CLEAR_DEFAULTS = 0x16118000;
+
+    // TvSettings > Apps > See all apps > [An app entry] >
+    // Notifications (toggle)
+    APPS_ALL_APPS_APP_ENTRY_NOTIFICATIONS = 0x16119000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Permissions
+    APPS_ALL_APPS_APP_ENTRY_PERMISSIONS = 0x1611A000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Enable
+    APPS_ALL_APPS_APP_ENTRY_ENABLE = 0x1611B000;
+
+    // TvSettings > Apps > See all apps > [An app entry] > Open source licenses
+    APPS_ALL_APPS_APP_ENTRY_LICENSES = 0x1611C000;
+
+    // TvSettings > Apps > See all apps > Show system apps
+    APPS_ALL_APPS_SHOW_SYSTEM_APPS = 0x16120000;
+
+    // TvSettings > Apps > App permissions
+    APPS_APP_PERMISSIONS = 0x16200000;
+
+    // TvSettings > Apps > App permission > Body sensors
+    APPS_APP_PERMISSIONS_BODY_SENSORS = 0x16210000;
+
+    // TvSettings > Apps > App permission > Calendar
+    APPS_APP_PERMISSIONS_CALENDAR = 0x16220000;
+
+    // TvSettings > Apps > App permission > Call logs
+    APPS_APP_PERMISSIONS_CALL_LOGS = 0x16230000;
+
+    // TvSettings > Apps > App permission > Camera
+    APPS_APP_PERMISSIONS_CAMERA = 0x16240000;
+
+    // TvSettings > Apps > App permission > Contacts
+    APPS_APP_PERMISSIONS_CONTACTS = 0x16250000;
+
+    // TvSettings > Apps > App permission > Location
+    APPS_APP_PERMISSIONS_LOCATION = 0x16260000;
+
+    // TvSettings > Apps > App permission > Microphone
+    APPS_APP_PERMISSIONS_MICROPHONE = 0x16270000;
+
+    // TvSettings > Apps > App permission > Phone
+    APPS_APP_PERMISSIONS_PHONE = 0x16280000;
+
+    // TvSettings > Apps > App permission > Physical activity
+    APPS_APP_PERMISSIONS_PHYSICAL_ACTIVITY = 0x16290000;
+
+    // TvSettings > Apps > App permission > SMS
+    APPS_APP_PERMISSIONS_SMS = 0x162A0000;
+
+    // TvSettings > Apps > App permission > Storage
+    APPS_APP_PERMISSIONS_STORAGE = 0x162B0000;
+
+    // TvSettings > Apps > App permission > Additional permissions
+    APPS_APP_PERMISSIONS_ADDITIONAL = 0x162C0000;
+
+    // TvSettings > Apps > App permission > Additional permissions >
+    // real all TV listings
+    APPS_APP_PERMISSIONS_ADDITIONAL_READ_TV_LISTINGS = 0x162C1000;
+
+    // TvSettings > Apps > App permission > Additional permissions >
+    // real instant messages
+    APPS_APP_PERMISSIONS_ADDITIONAL_READ_INSTANT_MESSAGES = 0x162C2000;
+
+    // TvSettings > Apps > App permission > Additional permissions >
+    // write instant messages
+    APPS_APP_PERMISSIONS_ADDITIONAL_WRITE_INSTANT_MESSAGES = 0x162C3000;
+
+    // TvSettings > Apps > Special app access
+    APPS_SPECIAL_APP_ACCESS = 0x16300000;
+
+    // TvSettings > Apps > Special app access > Energy optimization
+    APPS_SPECIAL_APP_ACCESS_ENERGY_OPTIMIZATION = 0x16310000;
+
+    // TvSettings > Apps > Special app access > Usage access
+    APPS_SPECIAL_APP_ACCESS_USAGE_ACCESS = 0x16320000;
+
+    // TvSettings > Apps > Special app access > Notification access
+    APPS_SPECIAL_APP_ACCESS_NOTIFICATION_ACCESS = 0x16330000;
+
+    // TvSettings > Apps > Special app access > Display over other apps
+    APPS_SPECIAL_APP_ACCESS_DISPLAY_OVER_OTHERS = 0x16340000;
+
+    // TvSettings > Apps > Special app access > Modify system settings
+    APPS_SPECIAL_APP_ACCESS_MODIFY_SYSTEM_SETTINGS = 0x16350000;
+
+    // TvSettings > Apps > Special app access > Picture-in-picture
+    APPS_SPECIAL_APP_ACCESS_PICTURE_IN_PICTURE = 0x16360000;
+
+    // TvSettings > Apps > Security & restrictions
+    APPS_SECURITY_RESTRICTIONS = 0x16400000;
+
+    // TvSettings > Apps > Security & restrictions > Unknown sources
+    APPS_SECURITY_RESTRICTIONS_UNKNOWN_SOURCES = 0x16410000;
+
+    // TvSettings > Apps > Security & restrictions > Verify apps (toggle)
+    APPS_SECURITY_RESTRICTIONS_VERIFY_APPS = 0x16420000;
+
+    // TvSettings > Apps > Security & restrictions > Create restricted profile
+    APPS_SECURITY_RESTRICTIONS_CREATE_PROFILE = 0x16430000;
+
+    // TvSettings > Apps > Security & restrictions > Enter restricted profile
+    APPS_SECURITY_RESTRICTIONS_ENTER_PROFILE = 0x16440000;
+
+    // TvSettings > Apps > Security & restrictions >
+    // Allowed apps (Restricted Profile)
+    APPS_SECURITY_RESTRICTIONS_PROFILE_ALLOWED_APPS = 0x16450000;
+
+    // TvSettings > Apps > Security & restrictions >
+    // Change pin (Restricted Profile)
+    APPS_SECURITY_RESTRICTIONS_PROFILE_CHANGE_PIN = 0x16460000;
+
+    // TvSettings > Apps > Security & restrictions >
+    // Delete restricted profile
+    APPS_SECURITY_RESTRICTIONS_DELETE_PROFILE = 0x16470000;
+
+    // TvSettings > Apps > Security & restrictions >
+    // Exit restricted profile
+    APPS_SECURITY_RESTRICTIONS_EXIT_PROFILE = 0x16480000;
+
+    // TvSettings > System (same as TvSettings > Device Preferences)
+    SYSTEM = 0x17000000;
+
+    // TvSettings > System > About
+    SYSTEM_ABOUT = 0x17100000;
+
+    // TvSettings > System > System update
+    SYSTEM_ABOUT_SYSTEM_UPDATE = 0x17110000;
+
+    // TvSettings > System > Device name
+    SYSTEM_ABOUT_DEVICE_NAME = 0x17120000;
+
+    // TvSettings > System > Factory reset
+    SYSTEM_ABOUT_FACTORY_RESET = 0x17130000;
+
+    // TvSettings > System > Status
+    SYSTEM_ABOUT_STATUS = 0x17140000;
+
+    // TvSettings > System > Legal information
+    SYSTEM_ABOUT_LEGAL_INFO = 0x17150000;
+
+    // TvSettings > System > Legal information > Open source licenses
+    SYSTEM_ABOUT_LEGAL_INFO_OPEN_SOURCE = 0x17151000;
+
+    // TvSettings > System > Legal information > Google legal
+    SYSTEM_ABOUT_LEGAL_INFO_GOOGLE_LEGAL = 0x17152000;
+
+    // TvSettings > System > Legal information > System WebView licenses
+    SYSTEM_ABOUT_LEGAL_INFO_SYSTEM_WEBVIEW = 0x17153000;
+
+    // TvSettings > System > Build
+    SYSTEM_ABOUT_BUILD = 0x17160000;
+
+    // TvSettings > System > Date & time
+    SYSTEM_DATE_TIME = 0x17200000;
+
+    // TvSettings > System > Date & time > Automatic data & time
+    SYSTEM_DATE_TIME_AUTOMATIC = 0x17210000;
+
+    // TvSettings > System > Date & time > Automatic data & time >
+    // Use network-provided time
+    SYSTEM_DATE_TIME_AUTOMATIC_USE_NETWORK_TIME = 0x17211000;
+
+    // TvSettings > System > Date & time > Automatic data & time > Off
+    SYSTEM_DATE_TIME_AUTOMATIC_OFF = 0x17212000;
+
+    // TvSettings > System > Date & time > Set date
+    SYSTEM_DATE_TIME_SET_DATE = 0x17220000;
+
+    // TvSettings > System > Date & time > Set time
+    SYSTEM_DATE_TIME_SET_TIME = 0x17230000;
+
+    // TvSettings > System > Date & time > Set time zone
+    SYSTEM_DATE_TIME_SET_TIME_ZONE = 0x17240000;
+
+    // TvSettings > System > Date & time > Set time zone > [A time zone button]
+    SYSTEM_DATE_TIME_SET_TIME_ZONE_BUTTON = 0x17241000;
+
+    // TvSettings > System > Date & time > Use 24-hour format (toggle)
+    SYSTEM_DATE_TIME_USE_24_HOUR_FORMAT = 0x17250000;
+
+    // TvSettings > System > Language
+    SYSTEM_LANGUAGE = 0x17300000;
+
+    // TvSettings > System > Language > [A language button]
+    SYSTEM_LANGUAGE_BUTTON = 0x17310000;
+
+    // TvSettings > System > Keyboard
+    SYSTEM_KEYBOARD = 0x17400000;
+
+    // TvSettings > System > Keyboard > Current keyboard
+    SYSTEM_KEYBOARD_CURRENT_KEYBOARD = 0x17410000;
+
+    // TvSettings > System > Keyboard > Gboard Settings
+    SYSTEM_KEYBOARD_GBOARD_SETTINGS = 0x17420000;
+
+    // TvSettings > System > Keyboard > Gboard Settings > Languages
+    SYSTEM_KEYBOARD_GBOARD_SETTINGS_LANGUAGES = 0x17421000;
+
+    // TvSettings > System > Keyboard > Gboard Settings > Terms of services
+    SYSTEM_KEYBOARD_GBOARD_SETTINGS_TOS = 0x17422000;
+
+    // TvSettings > System > Keyboard > Gboard Settings > Privacy policy
+    SYSTEM_KEYBOARD_GBOARD_SETTINGS_PRIVACY_POLICY = 0x17423000;
+
+    // TvSettings > System > Keyboard > Gboard Settings > Open source licenses
+    SYSTEM_KEYBOARD_GBOARD_SETTINGS_OPEN_SOURCE = 0x17424000;
+
+    // TvSettings > System > Keyboard > Gboard Settings >
+    // Share usage statistics (toggle)
+    SYSTEM_KEYBOARD_GBOARD_SETTINGS_SHARE_USAGE_STATS = 0x17425000;
+
+    // TvSettings > System > Keyboard > Manage keyboards
+    SYSTEM_KEYBOARD_MANAGE_KEYBOARDS = 0x17430000;
+
+    // TvSettings > System > Storage
+    SYSTEM_STORAGE = 0x17500000;
+
+    // TvSettings > System > Internal shared storage
+    SYSTEM_STORAGE_INTERNAL_STORAGE = 0x17510000;
+
+    // TvSettings > System > Internal shared storage > Apps
+    SYSTEM_STORAGE_INTERNAL_STORAGE_APPS = 0x17511000;
+
+    // TvSettings > System > Internal shared storage >
+    // Cached data (brings up "Clear cached data?" dialog upon click)
+    SYSTEM_STORAGE_INTERNAL_STORAGE_CACHED = 0x17512000;
+
+    // TvSettings > System > Energy saver
+    SYSTEM_ENERGYSAVER = 0x17700000;
+
+    // TvSettings > System > Energy saver > Turn off display after
+    SYSTEM_ENERGYSAVER_START_DELAY = 0x17710000;
+
+    // TvSettings > System > Energy saver > Turn off display after > 15 minutes
+    SYSTEM_ENERGYSAVER_START_DELAY_15M = 0x17711000;
+
+    // TvSettings > System > Energy saver > Turn off display after > 30 minutes
+    SYSTEM_ENERGYSAVER_START_DELAY_30M = 0x17712000;
+
+    // TvSettings > System > Energy saver > Turn off display after > 1 hour
+    SYSTEM_ENERGYSAVER_START_DELAY_1H = 0x17713000;
+
+    // TvSettings > System > Energy saver > Turn off display after > 3 hours
+    SYSTEM_ENERGYSAVER_START_DELAY_3H = 0x17714000;
+
+    // TvSettings > System > Energy saver > Turn off display after > 6 hours
+    SYSTEM_ENERGYSAVER_START_DELAY_6H = 0x17715000;
+
+    // TvSettings > System > Energy saver > Turn off display after > 12 hours
+    SYSTEM_ENERGYSAVER_START_DELAY_12H = 0x17716000;
+
+    // TvSettings > System > Energy saver > Turn off display after > Never
+    SYSTEM_ENERGYSAVER_START_DELAY_NEVER = 0x17717000;
+
+    // TvSettings > System > Accessibility
+    SYSTEM_A11Y = 0x17800000;
+
+    // TvSettings > System > Accessibility > Captions
+    SYSTEM_A11Y_CAPTIONS = 0x17810000;
+
+    // TvSettings > System > Accessibility > Captions > Display (toggle)
+    SYSTEM_A11Y_CAPTIONS_DISPLAY_ON_OFF = 0x17811000;
+
+    // TvSettings > System > Accessibility > Captions > Language
+    SYSTEM_A11Y_CAPTIONS_LANGUAGE = 0x17812000;
+
+    // TvSettings > System > Accessibility > Captions > Language > [A language]
+    SYSTEM_A11Y_CAPTIONS_LANGUAGE_BUTTON = 0x17812100;
+
+    // TvSettings > System > Accessibility > Captions > Text size
+    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE = 0x17813000;
+
+    // TvSettings > System > Accessibility > Captions > Text size > Very small
+    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_VERY_SMALL = 0x17813100;
+
+    // TvSettings > System > Accessibility > Captions > Text size > Small
+    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_SMALL = 0x17813200;
+
+    // TvSettings > System > Accessibility > Captions > Text size > Normal
+    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_NORMAL = 0x17813300;
+
+    // TvSettings > System > Accessibility > Captions > Text size > Large
+    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_LARGE = 0x17813400;
+
+    // TvSettings > System > Accessibility > Captions > Text size > Very large
+    SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_VERY_LARGE = 0x17813500;
+
+    // TvSettings > System > Accessibility > Captions >
+    // White on black (radio button)
+    SYSTEM_A11Y_CAPTIONS_WHITE_ON_BLACK = 0x17814000;
+
+    // TvSettings > System > Accessibility > Captions >
+    // Black on white (radio button)
+    SYSTEM_A11Y_CAPTIONS_BLACK_ON_WHITE = 0x17815000;
+
+    // TvSettings > System > Accessibility > Captions >
+    // Yellow on black (radio button)
+    SYSTEM_A11Y_CAPTIONS_YELLOW_ON_BLACK = 0x17816000;
+
+    // TvSettings > System > Accessibility > Captions >
+    // Yellow on blue (radio button)
+    SYSTEM_A11Y_CAPTIONS_YELLOW_ON_BLUE = 0x17817000;
+
+    // TvSettings > System > Accessibility > Captions > Custom
+    SYSTEM_A11Y_CAPTIONS_CUSTOM = 0x17818000;
+
+    // TvSettings > System > Accessibility > Captions > Custom > Font family
+    SYSTEM_A11Y_CAPTIONS_CUSTOM_FONT = 0x17818100;
+
+    // TvSettings > System > Accessibility > Captions > Custom > Text color
+    SYSTEM_A11Y_CAPTIONS_CUSTOM_TEXT_COLOR = 0x17818200;
+
+    // TvSettings > System > Accessibility > Captions > Custom > Text opacity
+    SYSTEM_A11Y_CAPTIONS_CUSTOM_TEXT_OPACITY = 0x17818300;
+
+    // TvSettings > System > Accessibility > Captions > Custom > Edge type
+    SYSTEM_A11Y_CAPTIONS_CUSTOM_EDGE_TYPE = 0x17818400;
+
+    // TvSettings > System > Accessibility > Captions > Custom > Edge color
+    SYSTEM_A11Y_CAPTIONS_CUSTOM_EDGE_COLOR = 0x17818500;
+
+    // TvSettings > System > Accessibility > Captions > Custom >
+    // Show background (toggle)
+    SYSTEM_A11Y_CAPTIONS_SHOW_BACKGROUND = 0x17818600;
+
+    // TvSettings > System > Accessibility > Captions > Custom >
+    // Background color
+    SYSTEM_A11Y_CAPTIONS_BACKGROUND_COLOR = 0x17818700;
+
+    // TvSettings > System > Accessibility > Captions > Custom >
+    // Background opacity
+    SYSTEM_A11Y_CAPTIONS_BACKGROUND_OPACITY = 0x17818800;
+
+    // TvSettings > System > Accessibility > Captions > Custom >
+    // Show window (toggle)
+    SYSTEM_A11Y_CAPTIONS_SHOW_WINDOW = 0x17818900;
+
+    // TvSettings > System > Accessibility > Captions > Custom > Window color
+    SYSTEM_A11Y_CAPTIONS_WINDOW_COLOR = 0x17818A00;
+
+    // TvSettings > System > Accessibility > Captions > Custom > Window opacity
+    SYSTEM_A11Y_CAPTIONS_WINDOW_OPACITY = 0x17818B00;
+
+    // TvSettings > System > Accessibility > High contrast text (toggle)
+    SYSTEM_A11Y_HIGH_CONTRAST_TEXT = 0x17820000;
+
+    // TvSettings > System > Accessibility > Text to speech
+    SYSTEM_A11Y_TTS = 0x17830000;
+
+    // TvSettings > System > Accessibility > Text to speech > [Select an engine]
+    SYSTEM_A11Y_TTS_ENGINE_SELECT = 0x17831000;
+
+    // TvSettings > System > Accessibility > Text to speech >
+    // Engine configuration
+    SYSTEM_A11Y_TTS_ENGINE_CONFIG = 0x17832000;
+
+    // TvSettings > System > Accessibility > Text to speech >
+    // Engine configuration > Language
+    SYSTEM_A11Y_TTS_ENGINE_CONFIG_LANGUAGE = 0x17832100;
+
+    // TvSettings > System > Accessibility > Text to speech >
+    // Engine configuration > Language > Button
+    SYSTEM_A11Y_TTS_ENGINE_CONFIG_LANGUAGE_CHOOSE_LANGUAGE = 0x17832110;
+
+    // TvSettings > System > Accessibility > Text to speech >
+    // Engine configuration > Settings for Google Text-to-speech Engine
+    SYSTEM_A11Y_TTS_ENGINE_CONFIG_SETTINGS_GTTS_ENGINE = 0x17832200;
+
+    // TvSettings > System > Accessibility > Text to speech >
+    // Engine configuration > Install voice data
+    SYSTEM_A11Y_TTS_ENGINE_CONFIG_INSTALL_VOICE_DATA = 0x17832300;
+
+    // TvSettings > System > Accessibility > Text to speech > Speech rate
+    SYSTEM_A11Y_TTS_SPEECH_RATE = 0x17833000;
+
+    // TvSettings > System > Accessibility > Text to speech >
+    // Listen to an example
+    SYSTEM_A11Y_TTS_LISTEN_EXAMPLE = 0x17834000;
+
+    // TvSettings > System > Accessibility > Accessibility shortcut
+    SYSTEM_A11Y_SHORTCUT = 0x17840000;
+
+    // TvSettings > System > Accessibility > Accessibility shortcut >
+    // Enable (toggle)
+    SYSTEM_A11Y_SHORTCUT_ON_OFF = 0x17841000;
+
+    // TvSettings > System > Accessibility > Accessibility shortcut >
+    // Shortcut services
+    SYSTEM_A11Y_SHORTCUT_SERVICE = 0x17842000;
+
+    // TvSettings > System > Accessibility > TalkBack
+    SYSTEM_A11Y_TALKBACK = 0x17850000;
+
+    // TvSettings > System > Accessibility > TalkBack > Enable (toggle)
+    SYSTEM_A11Y_TALKBACK_ON_OFF = 0x17851000;
+
+    // TvSettings > System > Accessibility > TalkBack > Configuration
+    SYSTEM_A11Y_TALKBACK_CONFIG = 0x17852000;
+
+    // TvSettings > System > Accessibility > Accessibility Menu
+    SYSTEM_A11Y_A11Y_MENU = 0x17860000;
+
+    // TvSettings > System > Accessibility > Accessibility Menu >
+    // Enable (toggle)
+    SYSTEM_A11Y_A11Y_MENU_ON_OFF = 0x17861000;
+
+    // TvSettings > System > Accessibility > Accessibility Menu > Configuration
+    SYSTEM_A11Y_A11Y_MENU_CONFIG = 0x17862000;
+
+    // TvSettings > System > Accessibility > Select to Speak
+    SYSTEM_A11Y_STS = 0x17870000;
+
+    // TvSettings > System > Accessibility > Select to Speak > Enable (toggle)
+    SYSTEM_A11Y_STS_ON_OFF = 0x17871000;
+
+    // TvSettings > System > Accessibility > Select to Speak > Configuration
+    SYSTEM_A11Y_STS_CONFIG = 0x17872000;
+
+    // TvSettings > System > Accessibility > Switch Access
+    SYSTEM_A11Y_SWITCH_ACCESS = 0x17880000;
+
+    // TvSettings > System > Accessibility > Switch Access > Enable (Toggle)
+    SYSTEM_A11Y_SWITCH_ACCESS_ON_OFF = 0x17881000;
+
+    // TvSettings > System > Accessibility > Switch Access > Configuration
+    SYSTEM_A11Y_SWITCH_ACCESS_CONFIG = 0x17882000;
+
+    // TvSettings > System > Reboot
+    SYSTEM_REBOOT = 0x17900000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings)
+    PREFERENCES_HOME_SCREEN = 0x17A00000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Customize channels
+    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS = 0x17A10000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Customize channels > Play Next
+    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN = 0x17A11000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Customize channels > Play Next > On (toggle)
+    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_ON_OFF = 0x17A11100;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Customize channels > Play Next > Google Play Movies & TV (toggle)
+    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_GPMT = 0x17A11200;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Customize channels > Play Next > Google Play Music (toggle)
+    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_GPM = 0x17A11300;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Customize channels > Play Next > Promotional channels (toggle)
+    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_PROMOTIONAL = 0x17A11400;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Customize channels > Home screen channels
+    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_HOME_SCREEN = 0x17A12000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Customize channels > Promotional channels
+    PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PROMOTIONAL = 0x17A13000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Enable video previews (toggle)
+    PREFERENCES_HOME_SCREEN_VIDEO_PREVIEWS = 0x17A20000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Enable audio previews (toggle)
+    PREFERENCES_HOME_SCREEN_AUDIO_PREVIEWS = 0x17A30000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Reorder apps
+    PREFERENCES_HOME_SCREEN_REORDER_APPS = 0x17A40000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Reorder games
+    PREFERENCES_HOME_SCREEN_REORDER_GAMES = 0x17A50000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Android TV Home open source licenses
+    PREFERENCES_HOME_SCREEN_ATVH_OPEN_SOURCE = 0x17A60000;
+
+    // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
+    // Android TV Core Services open source licenses
+    PREFERENCES_HOME_SCREEN_ATVCS_OPEN_SOURCE = 0x17A70000;
+
+    // TvSettings > Device Preferences > Google Assistant
+    PREFERENCES_ASSISTANT = 0x17B00000;
+
+    // TvSettings > Device Preferences > Google Assistant > Accounts
+    PREFERENCES_ASSISTANT_ACCOUNTS = 0x17B10000;
+
+    // TvSettings > Device Preferences > Google Assistant > Accept permissions
+    PREFERENCES_ASSISTANT_ACCEPT_PERMISSIONS = 0x17B20000;
+
+    // TvSettings > Device Preferences > Google Assistant > View permissions
+    PREFERENCES_ASSISTANT_VIEW_PERMISSIONS = 0x17B30000;
+
+    // TvSettings > Device Preferences > Google Assistant > Searchable apps
+    // (aliasing ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SEARCHABLE_APPS)
+    PREFERENCES_ASSISTANT_SEARCHABLE_APPS = 0x12133000;
+
+    // TvSettings > Device Preferences > Google Assistant > SafeSearch filter
+    // (aliasing ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SAFE_SEARCH)
+    PREFERENCES_ASSISTANT_SAFESEARCH_FILTER = 0x12131000;
+
+    // TvSettings > Device Preferences > Google Assistant >
+    // Block offensive words
+    // (aliasing ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_BLOCK_OFFENSIVE)
+    PREFERENCES_ASSISTANT_BLOCK_OFFENSIVE = 0x12132000;
+
+    // TvSettings > Device Preferences > Google Assistant > Open source licenses
+    PREFERENCES_ASSISTANT_OPEN_SOURCE = 0x17B40000;
+
+    // TvSettings > Device Preferences > Chromecast Android Shell
+    PREFERENCES_CHROMECAST_SHELL = 0x17C00000;
+
+    // TvSettings > Device Preferences > Chromecast Android Shell >
+    // Open source licenses
+    PREFERENCES_CHROMECAST_SHELL_OPEN_SOURCE = 0x17C10000;
+
+    // TvSettings > Device Preferences > Screen saver
+    PREFERENCES_SCREENSAVER = 0x17D00000;
+
+    // TvSettings > Device Preferences > Screen saver > Screen saver (chooser)
+    PREFERENCES_SCREENSAVER_CHOOSER = 0x17D10000;
+
+    // TvSettings > Device Preferences > Screen saver > Screen saver (chooser) >
+    // Turn screen off
+    PREFERENCES_SCREENSAVER_CHOOSER_SCREEN_OFF = 0x17D11000;
+
+    // TvSettings > Device Preferences > Screen saver > Screen saver (chooser) >
+    // Backdrop
+    PREFERENCES_SCREENSAVER_CHOOSER_BACKDROP = 0x17D12000;
+
+    // TvSettings > Device Preferences > Screen saver > Screen saver (chooser) >
+    // Colors
+    PREFERENCES_SCREENSAVER_CHOOSER_COLORS = 0x17D13000;
+
+    // TvSettings > Device Preferences > Screen saver > When to start
+    PREFERENCES_SCREENSAVER_START_DELAY = 0x17D20000;
+
+    // TvSettings > Device Preferences > Screen saver > When to start >
+    // 5 minutes
+    PREFERENCES_SCREENSAVER_START_DELAY_5M = 0x17D21000;
+
+    // TvSettings > Device Preferences > Screen saver > When to start >
+    // 15 minutes
+    PREFERENCES_SCREENSAVER_START_DELAY_15M = 0x17D22000;
+
+    // TvSettings > Device Preferences > Screen saver > When to start >
+    // 30 minutes
+    PREFERENCES_SCREENSAVER_START_DELAY_30M = 0x17D23000;
+
+    // TvSettings > Device Preferences > Screen saver > When to start >
+    // 1 hour
+    PREFERENCES_SCREENSAVER_START_DELAY_1H = 0x17D24000;
+
+    // TvSettings > Device Preferences > Screen saver > When to start >
+    // 2 hours
+    PREFERENCES_SCREENSAVER_START_DELAY_2H = 0x17D25000;
+
+    // TvSettings > Device Preferences > Screen saver > Start now
+    PREFERENCES_SCREENSAVER_START_NOW = 0x17D30000;
+
+    // TvSettings > Connected Devices (Slice)
+    CONNECTED_SLICE = 0x18000000;
+
+    // TvSettings > Connected Devices (Slice) > Connect remote or headphones
+    CONNECTED_SLICE_CONNECT_NEW_DEVICES = 0x18100000;
+
+    // TvSettings > Connected Devices (Slice) > [A connected device]
+    CONNECTED_SLICE_DEVICE_ENTRY = 0x18200000;
+
+    // TvSettings > Connected Devices (Slice) > [A connected device] >
+    // Remote update
+    CONNECTED_SLICE_DEVICE_ENTRY_UPDATE = 0x18210000;
+
+    // TvSettings > Connected Devices (Slice) > [A connected device] > Rename
+    CONNECTED_SLICE_DEVICE_ENTRY_RENAME = 0x18220000;
+
+    // TvSettings > Connected Devices (Slice) > [A connected device] > Forget
+    CONNECTED_SLICE_DEVICE_ENTRY_FORGET = 0x18230000;
+
+    // TvSettings > Connected Devices (Slice) > HDMI-CEC
+    CONNECTED_SLICE_HDMICEC = 0x18300000;
+
+    // TvSettings > Connected Devices (Slice) > HDMI-CEC > Enable (toggle)
+    CONNECTED_SLICE_HDMICEC_ON_OFF = 0x18310000;
+
+    // TvSettings > Connected Devices (aliasing CONNECTED_SLICE)
+    CONNECTED_CLASSIC = 0x18000000;
+
+    // TvSettings > Connected Devices > Connect remote
+    // (aliasing CONNECTED_SLICE_CONNECT_NEW_DEVICES)
+    CONNECTED_CLASSIC_CONNECT_REMOTE = 0x18100000;
+
+    // TvSettings > Connected Devices > [A connected device]
+    // (aliasing CONNECTED_SLICE_DEVICE_ENTRY)
+    CONNECTED_CLASSIC_DEVICE_ENTRY = 0x18200000;
+
+    // TvSettings > Connected Devices > [A connected device] > Update
+    // (aliasing CONNECTED_SLICE_DEVICE_ENTRY_UPDATE)
+    CONNECTED_CLASSIC_DEVICE_ENTRY_UPDATE = 0x18210000;
+
+    // TvSettings > Connected Devices > [A connected device] > Rename
+    // (aliasing CONNECTED_SLICE_DEVICE_ENTRY_RENAME)
+    CONNECTED_CLASSIC_DEVICE_ENTRY_RENAME = 0x18220000;
+
+    // TvSettings > Connected Devices > [A connected device] > Forget
+    // (aliasing CONNECTED_SLICE_DEVICE_ENTRY_FORGET)
+    CONNECTED_CLASSIC_DEVICE_ENTRY_FORGET = 0x18230000;
+
+    // TvSettings > Connected Devices > HDMI-CEC
+    // (aliasing CONNECTED_SLICE_HDMICEC)
+    CONNECTED_CLASSIC_HDMICEC = 0x18300000;
+
+    // TvSettings > Connected Devices > HDMI-CEC > Enable (toggle)
+    // (aliasing CONNECTED_SLICE_HDMICEC_ON_OFF)
+    CONNECTED_CLASSIC_HDMICEC_ON_OFF = 0x18310000;
+
+    // TvSettings > Help & Feedback
+    FEEDBACK = 0x19000000;
+
+    // TvSettings > Help & Feedback > Send feedback
+    FEEDBACK_SEND = 0x19100000;
+}
diff --git a/stats/enums/server/connectivity/data_stall_event.proto b/stats/enums/server/connectivity/data_stall_event.proto
index 23fcf6e..787074b 100644
--- a/stats/enums/server/connectivity/data_stall_event.proto
+++ b/stats/enums/server/connectivity/data_stall_event.proto
@@ -32,6 +32,7 @@
     AP_BAND_UNKNOWN = 0;
     AP_BAND_2GHZ = 1;
     AP_BAND_5GHZ = 2;
+    AP_BAND_6GHZ = 3;
 }
 
 // Refer to definition in TelephonyManager.java.
diff --git a/stats/enums/service/procstats_enum.proto b/stats/enums/service/procstats_enum.proto
index cc3fe5a..2abf373 100644
--- a/stats/enums/service/procstats_enum.proto
+++ b/stats/enums/service/procstats_enum.proto
@@ -76,3 +76,27 @@
     SERVICE_OPERATION_STATE_BOUND = 4;
     SERVICE_OPERATION_STATE_EXECUTING = 5;
 }
+
+// this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
+// and not frameworks/base/core/java/android/app/ActivityManager.java
+enum AggregatedProcessState {
+    AGGREGATED_PROCESS_STATE_UNKNOWN = 0;
+    // Persistent system process; PERSISTENT or PERSISTENT_UI in ActivityManager
+    AGGREGATED_PROCESS_STATE_PERSISTENT = 1;
+    // Top activity; actually any visible activity; TOP or TOP_SLEEPING in ActivityManager
+    AGGREGATED_PROCESS_STATE_TOP = 2;
+    // Bound top foreground process; BOUND_TOP or BOUND_FOREGROUND_SERVICE in ActivityManager
+    AGGREGATED_PROCESS_STATE_BOUND_TOP_OR_FGS = 3;
+    // Important foreground process; FOREGROUND_SERVICE in ActivityManager
+    AGGREGATED_PROCESS_STATE_FGS = 4;
+    // Important foreground process ; IMPORTANT_FOREGROUND in ActivityManager
+    AGGREGATED_PROCESS_STATE_IMPORTANT_FOREGROUND = 5;
+    // Various background processes; IMPORTANT_BACKGROUND, TRANSIENT_BACKGROUND, BACKUP, SERVICE,
+    // HEAVY_WEIGHT in ActivityManager
+    AGGREGATED_PROCESS_STATE_BACKGROUND = 6;
+    // Process running a receiver; RECEIVER in ActivityManager
+    AGGREGATED_PROCESS_STATE_RECEIVER = 7;
+    // Various cached processes; HOME, LAST_ACTIVITY, CACHED_ACTIVITY, CACHED_RECENT,
+    // CACHED_ACTIVITY_CLIENT, CACHED_EMPTY in ActivityManager
+    AGGREGATED_PROCESS_STATE_CACHED = 8;
+}
\ No newline at end of file
diff --git a/stats/enums/service/usb.proto b/stats/enums/service/usb.proto
index 2e1de79..40c5a85 100644
--- a/stats/enums/service/usb.proto
+++ b/stats/enums/service/usb.proto
@@ -32,6 +32,7 @@
     optional UsbPortManagerProto port_manager = 3;
     optional UsbAlsaManagerProto alsa_manager = 4;
     optional UsbSettingsManagerProto settings_manager = 5;
+    optional UsbPermissionsManagerProto permissions_manager = 6;
 }
 
 message UsbDeviceManagerProto {
@@ -309,26 +310,12 @@
     option (android.msg_privacy).dest = DEST_AUTOMATIC;
 
     optional int32 user_id = 1;
-    repeated UsbSettingsDevicePermissionProto device_permissions = 2;
-    repeated UsbSettingsAccessoryPermissionProto accessory_permissions = 3;
+    reserved 2; // previously device_permissions, now unused
+    reserved 3; // previously accessory_permissions, now unused
     repeated UsbDeviceAttachedActivities device_attached_activities = 4;
     repeated UsbAccessoryAttachedActivities accessory_attached_activities = 5;
 }
 
-message UsbSettingsDevicePermissionProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional string device_name = 1;
-    repeated int32 uids = 2;
-}
-
-message UsbSettingsAccessoryPermissionProto {
-    option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
-    optional string accessory_description = 1;
-    repeated int32 uids = 2;
-}
-
 message UsbProfileGroupSettingsManagerProto {
     option (android.msg_privacy).dest = DEST_AUTOMATIC;
 
@@ -345,6 +332,63 @@
     optional UserPackageProto user_package = 2;
 }
 
+message UsbPermissionsManagerProto {
+    option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+    repeated UsbUserPermissionsManagerProto user_permissions = 1;
+}
+
+message UsbUserPermissionsManagerProto {
+    option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+    optional int32 user_id = 1;
+
+    repeated UsbDevicePermissionProto device_permissions = 2;
+    repeated UsbAccessoryPermissionProto accessory_permissions = 3;
+
+    repeated UsbDevicePersistentPermissionProto device_persistent_permissions = 4;
+    repeated UsbAccessoryPersistentPermissionProto accessory_persistent_permissions = 5;
+}
+
+message UsbDevicePermissionProto {
+    option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+    // Name of device set by manufacturer
+    // All devices of the same model have the same name
+    optional string device_name = 1;
+    repeated int32 uids = 2;
+}
+
+message UsbAccessoryPermissionProto {
+    option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+    // Description of accessory set by manufacturer
+    // All accessories of the same model have the same description
+    optional string accessory_description = 1;
+    repeated int32 uids = 2;
+}
+
+message UsbDevicePersistentPermissionProto {
+    option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+    optional UsbDeviceFilterProto device_filter = 1;
+    repeated UsbUidPermissionProto permission_values = 2;
+}
+
+message UsbAccessoryPersistentPermissionProto {
+    option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+    optional UsbAccessoryFilterProto accessory_filter = 1;
+    repeated UsbUidPermissionProto permission_values = 2;
+}
+
+message UsbUidPermissionProto {
+    option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+    optional int32 uid = 1;
+    optional bool is_granted = 2;
+}
+
 message UsbDeviceFilterProto {
     option (android.msg_privacy).dest = DEST_AUTOMATIC;
 
diff --git a/stats/enums/stats/accessibility/accessibility_enums.proto b/stats/enums/stats/accessibility/accessibility_enums.proto
new file mode 100644
index 0000000..5118ad5
--- /dev/null
+++ b/stats/enums/stats/accessibility/accessibility_enums.proto
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+package android.stats.accessibility;
+option java_multiple_files = true;
+
+// The entry point of the accessibility shortcut.
+enum ShortcutType {
+  UNKNOWN_TYPE = 0;
+  A11Y_BUTTON = 1;
+  VOLUME_KEY = 2;
+  TRIPLE_TAP = 3;
+  A11Y_BUTTON_LONG_PRESS = 4;
+}
+
+// The service status code.
+enum ServiceStatus {
+  UNKNOWN = 0;
+  ENABLED = 1;
+  DISABLED = 2;
+}
\ No newline at end of file
diff --git a/stats/enums/stats/devicepolicy/device_policy_enums.proto b/stats/enums/stats/devicepolicy/device_policy_enums.proto
index 0821d14..7c1a049 100644
--- a/stats/enums/stats/devicepolicy/device_policy_enums.proto
+++ b/stats/enums/stats/devicepolicy/device_policy_enums.proto
@@ -113,9 +113,9 @@
   PROVISIONING_PREPROVISIONING_ACTIVITY_TIME_MS = 87;
   PROVISIONING_ENCRYPT_DEVICE_ACTIVITY_TIME_MS = 88;
   PROVISIONING_WEB_ACTIVITY_TIME_MS = 89;
-  PROVISIONING_TRAMPOLINE_ACTIVITY_TIME_MS = 90;
-  PROVISIONING_POST_ENCRYPTION_ACTIVITY_TIME_MS = 91;
-  PROVISIONING_FINALIZATION_ACTIVITY_TIME_MS = 92;
+  PROVISIONING_TRAMPOLINE_ACTIVITY_TIME_MS = 90 [deprecated=true];
+  PROVISIONING_POST_ENCRYPTION_ACTIVITY_TIME_MS = 91 [deprecated=true];
+  PROVISIONING_FINALIZATION_ACTIVITY_TIME_MS = 92 [deprecated=true];
   PROVISIONING_NETWORK_TYPE = 93;
   PROVISIONING_ACTION = 94;
   PROVISIONING_EXTRAS = 95;
@@ -151,4 +151,54 @@
   PROVISIONING_FLOW_TYPE = 124;
   CROSS_PROFILE_APPS_GET_TARGET_USER_PROFILES = 125;
   CROSS_PROFILE_APPS_START_ACTIVITY_AS_USER = 126;
+  SET_AUTO_TIME = 127;
+  SET_AUTO_TIME_ZONE = 128;
+  SET_USER_CONTROL_DISABLED_PACKAGES = 129;
+  SET_FACTORY_RESET_PROTECTION = 130;
+  SET_COMMON_CRITERIA_MODE = 131;
+  ALLOW_MODIFICATION_OF_ADMIN_CONFIGURED_NETWORKS = 132;
+  SET_TIME = 133;
+  SET_TIME_ZONE = 134;
+  SET_PERSONAL_APPS_SUSPENDED = 135;
+  SET_MANAGED_PROFILE_MAXIMUM_TIME_OFF = 136;
+  COMP_TO_ORG_OWNED_PO_MIGRATED = 137;
+  SET_CROSS_PROFILE_PACKAGES = 138;
+  SET_INTERACT_ACROSS_PROFILES_APP_OP = 139;
+  GET_CROSS_PROFILE_PACKAGES = 140;
+  CAN_REQUEST_INTERACT_ACROSS_PROFILES_TRUE = 141;
+  CAN_REQUEST_INTERACT_ACROSS_PROFILES_FALSE_NO_PROFILES = 142;
+  CAN_REQUEST_INTERACT_ACROSS_PROFILES_FALSE_WHITELIST = 143;
+  CAN_REQUEST_INTERACT_ACROSS_PROFILES_FALSE_PERMISSION = 144;
+  CAN_INTERACT_ACROSS_PROFILES_TRUE = 145;
+  CAN_INTERACT_ACROSS_PROFILES_FALSE_PERMISSION = 146;
+  CAN_INTERACT_ACROSS_PROFILES_FALSE_NO_PROFILES = 147;
+  CREATE_CROSS_PROFILE_INTENT = 148;
+  IS_MANAGED_PROFILE = 149;
+  START_ACTIVITY_BY_INTENT = 150;
+  BIND_CROSS_PROFILE_SERVICE = 151;
+  PROVISIONING_DPC_SETUP_STARTED = 152;
+  PROVISIONING_DPC_SETUP_COMPLETED = 153;
+  PROVISIONING_ORGANIZATION_OWNED_MANAGED_PROFILE = 154;
+  RESOLVER_CROSS_PROFILE_TARGET_OPENED = 155;
+  RESOLVER_SWITCH_TABS = 156;
+  RESOLVER_EMPTY_STATE_WORK_APPS_DISABLED = 157;
+  RESOLVER_EMPTY_STATE_NO_SHARING_TO_PERSONAL= 158;
+  RESOLVER_EMPTY_STATE_NO_SHARING_TO_WORK= 159;
+  RESOLVER_EMPTY_STATE_NO_APPS_RESOLVED= 160;
+  RESOLVER_AUTOLAUNCH_CROSS_PROFILE_TARGET = 161;
+  CROSS_PROFILE_SETTINGS_PAGE_LAUNCHED_FROM_APP = 162;
+  CROSS_PROFILE_SETTINGS_PAGE_LAUNCHED_FROM_SETTINGS = 163;
+  CROSS_PROFILE_SETTINGS_PAGE_ADMIN_RESTRICTED = 164;
+  CROSS_PROFILE_SETTINGS_PAGE_MISSING_WORK_APP = 165;
+  CROSS_PROFILE_SETTINGS_PAGE_MISSING_PERSONAL_APP = 166;
+  CROSS_PROFILE_SETTINGS_PAGE_MISSING_INSTALL_BANNER_INTENT = 167;
+  CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_CLICKED = 168;
+  CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_NO_INTENT_CLICKED  = 169;
+  CROSS_PROFILE_SETTINGS_PAGE_USER_CONSENTED = 170;
+  CROSS_PROFILE_SETTINGS_PAGE_USER_DECLINED_CONSENT = 171;
+  CROSS_PROFILE_SETTINGS_PAGE_PERMISSION_REVOKED = 172;
+  DOCSUI_EMPTY_STATE_NO_PERMISSION = 173;
+  DOCSUI_EMPTY_STATE_QUIET_MODE = 174;
+  DOCSUI_LAUNCH_OTHER_APP = 175;
+  DOCSUI_PICK_RESULT = 176;
 }
diff --git a/stats/enums/stats/docsui/docsui_enums.proto b/stats/enums/stats/docsui/docsui_enums.proto
index 655b5e3..5963f6a 100644
--- a/stats/enums/stats/docsui/docsui_enums.proto
+++ b/stats/enums/stats/docsui/docsui_enums.proto
@@ -56,6 +56,7 @@
     ROOT_VIDEOS = 9;
     ROOT_MTP = 10;
     ROOT_THIRD_PARTY_APP = 11;
+    ROOT_DOCUMENTS = 12;
 }
 
 enum ContextScope {
@@ -184,6 +185,8 @@
     TYPE_CHIP_DOCS = 4;
     TYPE_SEARCH_HISTORY = 5;
     TYPE_SEARCH_STRING = 6;
+    TYPE_CHIP_LARGE_FILES = 7;
+    TYPE_CHIP_FROM_THIS_WEEK = 8;
 }
 
 enum SearchMode {
diff --git a/stats/enums/stats/enums.proto b/stats/enums/stats/enums.proto
index 2320a01..8f8055e 100644
--- a/stats/enums/stats/enums.proto
+++ b/stats/enums/stats/enums.proto
@@ -22,4 +22,8 @@
 enum EventType {
   // Unknown.
   TYPE_UNKNOWN = 0;
+  CONTENT_SUGGESTIONS_CLASSIFY_CONTENT_CALL_SUCCEEDED = 1;
+  CONTENT_SUGGESTIONS_CLASSIFY_CONTENT_CALL_FAILED = 2;
+  CONTENT_SUGGESTIONS_SUGGEST_CONTENT_CALL_SUCCEEDED = 3;
+  CONTENT_SUGGESTIONS_SUGGEST_CONTENT_CALL_FAILED = 4;
 }
diff --git a/stats/enums/stats/launcher/launcher.proto b/stats/enums/stats/launcher/launcher.proto
index dbd0e03..fc177d5 100644
--- a/stats/enums/stats/launcher/launcher.proto
+++ b/stats/enums/stats/launcher/launcher.proto
@@ -32,10 +32,12 @@
 }
 
 enum LauncherState {
-    BACKGROUND = 0;
-    HOME = 1;
-    OVERVIEW = 2;
-    ALLAPPS = 3;
+    LAUNCHER_STATE_UNSPECIFIED = 0;
+    BACKGROUND = 1;
+    HOME = 2;
+    OVERVIEW = 3;
+    ALLAPPS = 4;
+    UNCHANGED = 5;
 }
 
 message LauncherTarget {
diff --git a/stats/enums/stats/mediametrics/mediametrics.proto b/stats/enums/stats/mediametrics/mediametrics.proto
index 34ed90a..9f0ff59 100644
--- a/stats/enums/stats/mediametrics/mediametrics.proto
+++ b/stats/enums/stats/mediametrics/mediametrics.proto
@@ -131,7 +131,7 @@
  * Logged from:
  *   frameworks/av/media/libstagefright/MediaCodec.cpp
  *   frameworks/av/services/mediaanalytics/statsd_codec.cpp
- * Next Tag: 21
+ * Next Tag: 26
  */
 message CodecData {
     optional string codec = 1;
@@ -154,6 +154,11 @@
     optional int64 latency_avg = 18;
     optional int64 latency_count = 19;
     optional int64 latency_unknown = 20;
+    optional int32 queue_input_buffer_error = 21;
+    optional int32 queue_secure_input_buffer_error = 22;
+    optional string bitrate_mode = 23;
+    optional int32 bitrate = 24;
+    optional int64 lifetime_millis = 25;
 }
 
 /**
diff --git a/stats/enums/stats/mediaprovider/mediaprovider_enums.proto b/stats/enums/stats/mediaprovider/mediaprovider_enums.proto
new file mode 100644
index 0000000..138782b
--- /dev/null
+++ b/stats/enums/stats/mediaprovider/mediaprovider_enums.proto
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+package android.stats.mediaprovider;
+option java_multiple_files = true;
+
+enum VolumeType {
+    // Volume is unknown
+    UNKNOWN = 0;
+    // Volume is MediaStore.VOLUME_INTERNAL
+    INTERNAL = 1;
+    // Volume is MediaStore.VOLUME_EXTERNAL_PRIMARY
+    EXTERNAL_PRIMARY = 2;
+    // Volume is non-primary external storage
+    EXTERNAL_OTHER = 3;
+}
diff --git a/stats/enums/stats/style/style_enums.proto b/stats/enums/stats/style/style_enums.proto
index 5b64d1e..f3f491f 100644
--- a/stats/enums/stats/style/style_enums.proto
+++ b/stats/enums/stats/style/style_enums.proto
@@ -36,6 +36,8 @@
     LIVE_WALLPAPER_DELETE_SUCCESS = 14;
     LIVE_WALLPAPER_DELETE_FAILED = 15;
     LIVE_WALLPAPER_APPLIED = 16;
+    LIVE_WALLPAPER_INFO_SELECT = 17;
+    LIVE_WALLPAPER_CUSTOMIZE_SELECT = 18;
 }
 
 enum LocationPreference {
diff --git a/stats/enums/stats/sysui/notification_enums.proto b/stats/enums/stats/sysui/notification_enums.proto
new file mode 100644
index 0000000..30bdeca
--- /dev/null
+++ b/stats/enums/stats/sysui/notification_enums.proto
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+
+package android.stats.sysui;
+
+// Enum used in NotificationReported and NotificationChannelModified atoms
+enum NotificationImportance {  // Constants from NotificationManager.java
+  IMPORTANCE_UNSPECIFIED = -1000;  // Should not occur for real notifications.
+  IMPORTANCE_NONE = 0;  // No importance: does not show in the shade.
+  IMPORTANCE_MIN = 1;  // Minimum to show in the shade.
+  IMPORTANCE_LOW = 2;  // Shows in shade, maybe status bar, no buzz/beep.
+  IMPORTANCE_DEFAULT = 3;  // Shows everywhere, makes noise, no heads-up.
+  IMPORTANCE_HIGH = 4;  // Shows everywhere, makes noise, heads-up, may full-screen.
+  IMPORTANCE_IMPORTANT_CONVERSATION = 5;  // High + isImportantConversation().
+}
diff --git a/stats/enums/stats/textclassifier/textclassifier_enums.proto b/stats/enums/stats/textclassifier/textclassifier_enums.proto
new file mode 100644
index 0000000..4be7b7c
--- /dev/null
+++ b/stats/enums/stats/textclassifier/textclassifier_enums.proto
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+package android.stats.textclassifier;
+option java_multiple_files = true;
+
+enum EventType {
+    TYPE_UNKNOWN = 0;
+    // User started a new selection.
+    SELECTION_STARTED = 1;
+    // User modified an existing selection.
+    SELECTION_MODIFIED = 2;
+    // Smart selection triggered for a single token (word).
+    SMART_SELECTION_SINGLE = 3;
+    // Smart selection triggered spanning multiple tokens (words).
+    SMART_SELECTION_MULTI = 4;
+    // Something else other than user or the default TextClassifier triggered a selection.
+    AUTO_SELECTION = 5;
+    // Smart actions shown to the user.
+    ACTIONS_SHOWN = 6;
+    // User clicked a link.
+    LINK_CLICKED = 7;
+    // User typed over the selection.
+    OVERTYPE = 8;
+    // User clicked on Copy action.
+    COPY_ACTION = 9;
+    // User clicked on Paste action.
+    PASTE_ACTION = 10;
+    // User clicked on Cut action.
+    CUT_ACTION = 11;
+    // User clicked on Share action.
+    SHARE_ACTION = 12;
+    // User clicked on a Smart action.
+    SMART_ACTION = 13;
+    // User dragged+dropped the selection.
+    SELECTION_DRAG = 14;
+    // Selection is destroyed.
+    SELECTION_DESTROYED = 15;
+    // User clicked on a custom action.
+    OTHER_ACTION = 16;
+    // User clicked on Select All action
+    SELECT_ALL = 17;
+    // User reset the smart selection.
+    SELECTION_RESET = 18;
+    // User composed a reply.
+    MANUAL_REPLY = 19;
+    // TextClassifier generated some actions
+    ACTIONS_GENERATED = 20;
+    // Some text links were generated
+    LINKS_GENERATED = 21;
+}
+
+enum WidgetType {
+    WIDGET_TYPE_UNKNOWN = 0;
+    // Standard TextView
+    WIDGET_TYPE_TEXTVIEW = 1;
+    // EditText
+    WIDGET_TYPE_EDITTEXT = 2;
+    // Not selectable textview
+    WIDGET_TYPE_UNSELECTABLE_TEXTVIEW = 3;
+    // Standard Webview
+    WIDGET_TYPE_WEBVIEW = 4;
+    // Editable TextView
+    WIDGET_TYPE_EDIT_WEBVIEW = 5;
+    // Custom text widget
+    WIDGET_TYPE_CUSTOM_TEXTVIEW = 6;
+    // Custom editable text widget.
+    WIDGET_TYPE_CUSTOM_EDITTEXT = 7;
+    // Non-selectable text widget.
+    WIDGET_TYPE_CUSTOM_UNSELECTABLE_TEXTVIEW = 8;
+    // Notification
+    WIDGET_TYPE_NOTIFICATION = 9;
+}