diff options
Diffstat (limited to 'cmds/statsd/src/atoms.proto')
-rw-r--r-- | cmds/statsd/src/atoms.proto | 4093 |
1 files changed, 3629 insertions, 464 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index b8de3f0eff75..ab1d3cbd232f 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -24,6 +24,8 @@ import "frameworks/base/cmds/statsd/src/atom_field_options.proto"; 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/dnsresolver/dns_resolver.proto" 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 @@ message Atom { // 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 @@ message Atom { 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 ThermalThrottlingStateChanged { */ 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 @@ message ScreenStateChanged { * 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 @@ message ActivityManagerSleepStateChanged { 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 @@ message MemoryFactorStateChanged { 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 @@ message CachedKillReported { } /** + * 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 @@ message ProcessLifeCycleStateChanged { * 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 @@ message BleScanStateChanged { // 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 @@ message ScheduledJobStateChanged { 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 @@ message CameraStateChanged { * 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 @@ message WakelockStateChanged { 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 @@ message BatterySaverModeStateChanged { 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 @@ message BatterySaverModeStateChanged { * 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 @@ message DeviceIdleModeStateChanged { * 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 BatteryLevelChanged { */ 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 ChargingStateChanged { */ 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 @@ message WakeupAlarmOccurred { // 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 @@ message WifiEnabledStateChanged { } /** + * 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 @@ message WatchdogRollbackOccurred { 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 @@ message UsbConnectorStateChanged { 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 PhoneStateChanged { 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 @@ message ExclusionRectStateChanged { optional int32 duration_millis = 7; } +/** + * 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; + 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]; - optional bool is_swipe_up_enabled = 5; + 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 SettingsUIChanged { 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 @@ message AppCrashOccurred { 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 @@ message WTFOccurred { 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 @@ message PictureInPictureStateChanged { * 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 @@ message OverlayStateChanged { 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 @@ message ForegroundServiceStateChanged { 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 LmkKillOccurred { */ 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 @@ message GenericAtom { } /** + * 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 @@ message FlagFlipUpdateOccurred { /** * 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 @@ message BinaryPushStateChanged { 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 @@ message PrivacyIndicatorsInteracted { 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 @@ message VmsClientConnectionStateChanged { 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 @@ message BootTimeEventErrorCode { * 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 @@ message SnapshotMergeReported { // 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 @@ message MobileBytesTransferByFgBg { } /** + * 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 @@ message ProcessMemoryState { 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,67 +5404,52 @@ message ProcessMemoryState { // 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; + // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. + optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true]; } /* - * Logs the memory stats for a native process (from procfs). + * Logs the memory high-water mark for a process. * - * Pulled from StatsCompanionService for selected native processes. + * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) + * and for selected native processes. + * + * Pulling this atom resets high-water mark counters for all processes. */ -message NativeProcessMemoryState { +message ProcessMemoryHighWaterMark { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The process name. - // Value read from /proc/PID/cmdline. + // Usually package name or process cmdline. + // Provided by ActivityManagerService or 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; + // 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]; - // Anonymous page size plus swap size. Values are read from /proc/PID/status. - optional int32 anon_rss_and_swap_in_kilobytes = 9; + // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in + // /proc/PID/status. + optional int32 rss_high_water_mark_in_kilobytes = 4; } /* - * Logs the memory high-water mark for a process. + * Logs the memory stats for a process. * - * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) + * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService) * and for selected native processes. - * - * Pulling this atom resets high-water mark counters for all processes. */ -message ProcessMemoryHighWaterMark { +message ProcessMemorySnapshot { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; @@ -4601,9 +5458,29 @@ message ProcessMemoryHighWaterMark { // Provided by ActivityManagerService or read from /proc/PID/cmdline. optional string process_name = 2; - // 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; + // 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 RoleHolder { } message AggStats { - optional int64 min = 1; - - optional int64 average = 2; - - optional int64 max = 3; -} - + // These are all in byte resolution. + optional int64 min = 1 [deprecated = true]; + optional int64 average = 2 [deprecated = true]; + optional int64 max = 3 [deprecated = true]; + + // 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 @@ message ProcessStatsProto { // 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 @@ message ProcessStatsProto { // 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 ProcessStatsAvailablePagesProto { */ 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 @@ message NotificationRemoteViews { 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 @@ message ContentCaptureServiceEvents { 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 @@ message DocsUIPickResultReported { 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 @@ message PermissionGrantRequestResultReported { 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 @@ message PermissionGrantRequestResultReported { 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 @@ message MediametricsNuPlayerReported { } /** - * 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 @@ message DeviceIdentifierAccessDenied { 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 @@ message TrainInfo { INSTALL_FAILURE_DOWNLOAD = 23; INSTALL_FAILURE_STATE_MISMATCH = 24; INSTALL_FAILURE_COMMIT = 25; + REBOOT_TRIGGERED = 26; } optional Status status = 4; } @@ -7131,6 +8287,12 @@ message GpuStatsAppInfo { // 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 @@ message GpuStatsAppInfo { * 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 @@ message CoolingDevice { * 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 @@ message CarPowerStateChanged { } /** + * 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 @@ message AppOps { // 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 @@ message AppOps { // 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 @@ message GrantPermissionsActivityButtonActions { // 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 @@ message AppPermissionFragmentActionReported { // 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 @@ message AppPermissionFragmentViewed { } /** -* 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 @@ message AppPermissionsFragmentViewed { } optional Category category = 6; } - /** * Information about a PermissionAppsFragment viewed by user. * Logged from ui/handheld/PermissionAppsFragment.java @@ -7551,6 +9051,478 @@ message PermissionAppsFragmentViewed { } /** +* 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 @@ message AppCompatibilityChangeReported { // Where it was logged from. optional Source source = 4; + } /** @@ -7649,70 +9622,123 @@ message VmsClientStats { } /** - * Information about an OTA update attempt by update_engine. - * Logged from platform/system/update_engine/metrics_reporter_android.cc + * 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; + + // Uid of the package + optional int32 uid = 2 [(is_uid) = true]; + + // If the permission is granted to the uid + optional bool is_granted = 3; + + // Permission flags as per android.content.pm.PermissionFlags + optional int32 permission_flags = 4; +} + +/** + * HWUI stats for a given app. */ -message UpdateEngineUpdateAttemptReported { - // The number of attempts for the update engine to apply a given payload. - optional int32 attempt_number = 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; - // 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 start & end timestamps in UTC as + // milliseconds since January 1, 1970 + // Compatible with java.util.Date#setTime() + optional int64 start_millis = 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; + optional int64 end_millis = 4; - // The size of the payload in MiBs. - optional int32 payload_size_mib = 5; + // HWUI renders pipeline type: GL (1) or Vulkan (2). + enum PipelineType { + UNKNOWN = 0; + GL = 1; + VULKAN = 2; + } - // The attempt result reported by the update engine for an OTA update. - optional android.stats.otaupdate.AttemptResult attempt_result = 6; + // HWUI renders pipeline type: GL or Vulkan. + optional PipelineType pipeline = 5; - // 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; + // Distinct frame count. + optional int32 total_frames = 6; - // 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; + // 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; } /** - * Information about all the attempts the device make before finishing the - * successful update. - * Logged from platform/system/update_engine/metrics_reporter_android.cc + * Message related to dangerous (runtime) app ops access */ -message UpdateEngineSuccessfulUpdateReported { - // The number of attempts for the update engine to apply the payload for a - // successful update. - optional int32 attempt_count = 1; +message RuntimeAppOpAccess { + // Uid of the package accessing app op + optional int32 uid = 1 [(is_uid) = true]; - optional android.stats.otaupdate.PayloadType payload_type = 2; + // Name of the package accessing app op + optional string package_name = 2; - optional int32 payload_size_mib = 3; + // deprecated - set to empty string + optional string op_deprecated = 3 [deprecated = true]; - // The total number of bytes downloaded by update_engine since the last - // successful update. - optional int32 total_bytes_downloaded_mib = 4; + // 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; - // 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; + // message related to app op access, limited to 600 chars by API + optional string message = 5; - // The total time in minutes for the update engine to apply the payload for a - // successful update. - optional int32 total_duration_minutes = 6; + enum SamplingStrategy { + DEFAULT = 0; + UNIFORM = 1; + RARELY_USED = 2; + BOOT_TIME_SAMPLING = 3; + UNIFORM_OPS = 4; + } - // The number of reboot of the device during a successful update. - optional int32 reboot_count = 7; + // 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 @@ message UserspaceRebootReported { 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 @@ message SupportedRadioAccessFamily { } /** + * 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 @@ message KeystoreKeyEventReported { 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 @@ message KeystoreKeyEventReported { /** 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; +} |