/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto2"; package android.os.statsd; option java_package = "com.android.os"; option java_outer_classname = "AtomsProto"; import "frameworks/proto_logging/stats/atom_field_options.proto"; import "frameworks/proto_logging/stats/enums/app/enums.proto"; import "frameworks/proto_logging/stats/enums/app/job/enums.proto"; import "frameworks/proto_logging/stats/enums/app/settings_enums.proto"; import "frameworks/proto_logging/stats/enums/app/media_output_enum.proto"; import "frameworks/proto_logging/stats/enums/app/tvsettings_enums.proto"; import "frameworks/proto_logging/stats/enums/bluetooth/a2dp/enums.proto"; import "frameworks/proto_logging/stats/enums/bluetooth/enums.proto"; import "frameworks/proto_logging/stats/enums/bluetooth/hci/enums.proto"; import "frameworks/proto_logging/stats/enums/bluetooth/hfp/enums.proto"; import "frameworks/proto_logging/stats/enums/bluetooth/smp/enums.proto"; import "frameworks/proto_logging/stats/enums/debug/enums.proto"; import "frameworks/proto_logging/stats/enums/hardware/biometrics/enums.proto"; import "frameworks/proto_logging/stats/enums/hardware/sensor/assist/enums.proto"; import "frameworks/proto_logging/stats/enums/net/enums.proto"; import "frameworks/proto_logging/stats/enums/os/enums.proto"; import "frameworks/proto_logging/stats/enums/server/connectivity/data_stall_event.proto"; import "frameworks/proto_logging/stats/enums/server/enums.proto"; import "frameworks/proto_logging/stats/enums/server/job/enums.proto"; import "frameworks/proto_logging/stats/enums/server/location/enums.proto"; import "frameworks/proto_logging/stats/enums/service/enums.proto"; import "frameworks/proto_logging/stats/enums/service/procstats_enum.proto"; import "frameworks/proto_logging/stats/enums/stats/connectivity/network_stack.proto"; import "frameworks/proto_logging/stats/enums/stats/connectivity/tethering.proto"; import "frameworks/proto_logging/stats/enums/stats/dnsresolver/dns_resolver.proto"; import "frameworks/proto_logging/stats/enums/stats/devicepolicy/device_policy.proto"; import "frameworks/proto_logging/stats/enums/stats/devicepolicy/device_policy_enums.proto"; import "frameworks/proto_logging/stats/enums/stats/docsui/docsui_enums.proto"; import "frameworks/proto_logging/stats/enums/stats/accessibility/accessibility_enums.proto"; import "frameworks/proto_logging/stats/enums/stats/enums.proto"; import "frameworks/proto_logging/stats/enums/stats/hdmi/enums.proto"; import "frameworks/proto_logging/stats/enums/stats/intelligence/enums.proto"; import "frameworks/proto_logging/stats/enums/stats/launcher/launcher.proto"; import "frameworks/proto_logging/stats/enums/stats/location/location_enums.proto"; import "frameworks/proto_logging/stats/enums/stats/mediametrics/mediametrics.proto"; import "frameworks/proto_logging/stats/enums/stats/mediaprovider/mediaprovider_enums.proto"; import "frameworks/proto_logging/stats/enums/stats/storage/storage_enums.proto"; import "frameworks/proto_logging/stats/enums/stats/style/style_enums.proto"; import "frameworks/proto_logging/stats/enums/stats/sysui/notification_enums.proto"; import "frameworks/proto_logging/stats/enums/stats/tls/enums.proto"; import "frameworks/proto_logging/stats/enums/stats/tv/tif_enums.proto"; import "frameworks/proto_logging/stats/enums/stats/wm/enums.proto"; import "frameworks/proto_logging/stats/enums/system/security/keystore2/enums.proto"; import "frameworks/proto_logging/stats/enums/telecomm/enums.proto"; import "frameworks/proto_logging/stats/enums/telephony/enums.proto"; import "frameworks/proto_logging/stats/enums/view/enums.proto"; import "frameworks/proto_logging/stats/enums/wifi/enums.proto"; import "frameworks/proto_logging/stats/enums/stats/textclassifier/textclassifier_enums.proto"; import "frameworks/proto_logging/stats/enums/stats/otaupdate/updateengine_enums.proto"; import "frameworks/proto_logging/stats/message/mediametrics_message.proto"; /** * The primary atom class. This message defines all of the available * raw stats log events from the Android system, also known as "atoms." * * This field contains a single oneof with all of the available messages. * The stats-log-api-gen tool runs as part of the Android build and * generates the android.util.StatsLog class, which contains the constants * and methods that Android uses to log. * * This Atom class is not actually built into the Android system. * Instead, statsd on Android constructs these messages synthetically, * in the format defined here and in stats_log.proto. */ 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 [(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 [(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) = "framework"]; PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"]; WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"]; LmkStateChanged lmk_state_changed = 54 [(module) = "framework"]; 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 [(module) = "statsd", deprecated = true]; 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 [(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 [(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 [(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 [(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 [(module) = "framework"]; PhoneStateChanged phone_state_changed = 95 [(module) = "framework"]; UserRestrictionChanged user_restriction_changed = 96; 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 [(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 [(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 [(module) = "bluetooth"]; BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = 126 [(module) = "bluetooth"]; BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = 127 [(module) = "bluetooth"]; AppDowngraded app_downgraded = 128 [(module) = "framework"]; AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; 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 [(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 [(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) = "framework"]; ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150 [(module) = "framework"]; BluetoothActiveDeviceChanged bluetooth_active_device_changed = 151 [(module) = "bluetooth"]; BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = 152 [(module) = "bluetooth"]; BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = 153 [(module) = "bluetooth"]; BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = 154 [(module) = "bluetooth"]; BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = 155 [(module) = "bluetooth"]; BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = 156 [(module) = "bluetooth"]; BluetoothDeviceRssiReported bluetooth_device_rssi_reported = 157 [(module) = "bluetooth"]; BluetoothDeviceFailedContactCounterReported bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"]; BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = 159 [(module) = "bluetooth"]; BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = 160 [(module) = "bluetooth"]; BluetoothQualityReportReported bluetooth_quality_report_reported = 161 [(module) = "bluetooth"]; BluetoothDeviceInfoReported bluetooth_device_info_reported = 162 [(module) = "bluetooth"]; BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = 163 [(module) = "bluetooth"]; BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = 164 [(module) = "bluetooth"]; BluetoothBondStateChanged bluetooth_bond_state_changed = 165 [(module) = "bluetooth"]; BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = 166 [(module) = "bluetooth"]; BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 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 [(module) = "permissioncontroller"]; BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; 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 [(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 [(module) = "bluetooth"]; IntelligenceEventReported intelligence_event_reported = 188 [(module) = "intelligence"]; ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = 189 [(module) = "framework"]; RoleRequestResultReported role_request_result_reported = 190 [(module) = "permissioncontroller"]; MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191; MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192; MediametricsAudiothreadReported mediametrics_audiothread_reported = 193; MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194; MediametricsCodecReported mediametrics_codec_reported = 195; MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196; MediametricsExtractorReported mediametrics_extractor_reported = 197; MediametricsMediadrmReported mediametrics_mediadrm_reported = 198; MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199; MediametricsRecorderReported mediametrics_recorder_reported = 200; 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 [(module) = "permissioncontroller"]; RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = 212 [(module) = "permissioncontroller"]; GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions = 213 [(module) = "permissioncontroller"]; LocationAccessCheckNotificationAction location_access_check_notification_action = 214 [(module) = "permissioncontroller"]; AppPermissionFragmentActionReported app_permission_fragment_action_reported = 215 [(module) = "permissioncontroller"]; AppPermissionFragmentViewed app_permission_fragment_viewed = 216 [(module) = "permissioncontroller"]; AppPermissionsFragmentViewed app_permissions_fragment_viewed = 217 [(module) = "permissioncontroller"]; PermissionAppsFragmentViewed permission_apps_fragment_viewed = 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 [(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 [(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; ForegroundServiceAppOpSessionEnded foreground_service_app_op_session_ended = 256 [(module) = "framework"]; // DisplayJankReported was deprecated in Android 12+ DisplayJankReported display_jank_reported = 257 [deprecated = true]; 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) = "sysui"]; 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 [(module) = "network_tethering"]; ImeTouchReported ime_touch_reported = 304 [(module) = "sysui"]; UIInteractionFrameInfoReported ui_interaction_frame_info_reported = 305 [(module) = "framework"]; UIActionLatencyReported ui_action_latency_reported = 306 [(module) = "framework"]; WifiDisconnectReported wifi_disconnect_reported = 307 [(module) = "wifi"]; WifiConnectionStateChanged wifi_connection_state_changed = 308 [(module) = "wifi"]; HdmiCecActiveSourceChanged hdmi_cec_active_source_changed = 309 [(module) = "framework"]; HdmiCecMessageReported hdmi_cec_message_reported = 310 [(module) = "framework"]; AirplaneMode airplane_mode = 311 [(module) = "telephony"]; ModemRestart modem_restart = 312 [(module) = "telephony"]; CarrierIdMismatchReported carrier_id_mismatch_reported = 313 [(module) = "telephony"]; CarrierIdTableUpdated carrier_id_table_updated = 314 [(module) = "telephony"]; DataStallRecoveryReported data_stall_recovery_reported = 315 [(module) = "telephony"]; MediametricsMediaParserReported mediametrics_mediaparser_reported = 316; TlsHandshakeReported tls_handshake_reported = 317 [(module) = "conscrypt"]; TextClassifierApiUsageReported text_classifier_api_usage_reported = 318 [(module) = "textclassifier"]; CarWatchdogKillStatsReported car_watchdog_kill_stats_reported = 319 [(module) = "car"]; MediametricsPlaybackReported mediametrics_playback_reported = 320 [(module) = "media_metrics"]; MediaNetworkInfoChanged media_network_info_changed = 321 [(module) = "media_metrics"]; MediaPlaybackStateChanged media_playback_state_changed = 322 [(module) = "media_metrics"]; MediaPlaybackErrorReported media_playback_error_reported = 323 [(module) = "media_metrics"]; MediaPlaybackTrackChanged media_playback_track_changed = 324 [(module) = "media_metrics"]; WifiScanReported wifi_scan_reported = 325 [(module) = "wifi"]; WifiPnoScanReported wifi_pno_scan_reported = 326 [(module) = "wifi"]; TifTuneStateChanged tif_tune_changed = 327 [(module) = "framework"]; AutoRotateReported auto_rotate_reported = 328 [(module) = "framework"]; PerfettoTrigger perfetto_trigger = 329 [(module) = "perfetto"]; TranscodingData transcoding_data = 330 [(module) = "mediaprovider"]; ImsServiceEntitlementUpdated ims_service_entitlement_updated = 331 [(module) = "imsentitlement"]; ArtDatumReported art_datum_reported = 332 [(module) = "art"]; DeviceRotated device_rotated = 333 [(module) = "framework"]; SimSpecificSettingsRestored sim_specific_settings_restored = 334 [(module) = "telephony"]; PinStorageEvent pin_storage_event = 336 [(module) = "telephony"]; FaceDownReported face_down_reported = 337 [(module) = "framework"]; BluetoothHALCrashReasonReported bluetooth_hal_crash_reason_reported = 338 [(module) = "bluetooth"]; RebootEscrowPreparationReported reboot_escrow_preparation_reported = 339 [(module) = "framework"]; RebootEscrowLskfCaptureReported reboot_escrow_lskf_capture_reported = 340 [(module) = "framework"]; RebootEscrowRebootReported reboot_escrow_reboot_reported = 341 [(module) = "framework"]; BinderLatencyReported binder_latency_reported = 342 [(module) = "framework"]; MediametricsAAudioStreamReported mediametrics_aaudiostream_reported = 343; MediaTranscodingSessionEnded media_transcoding_session_ended = 344 [(module) = "media"]; MagnificationUsageReported magnification_usage_reported = 345 [(module) = "framework"]; MagnificationModeWithImeOnReported magnification_mode_with_ime_on_reported = 346 [(module) = "framework"]; AppSearchCallStatsReported app_search_call_stats_reported = 347 [(module) = "appsearch"]; AppSearchPutDocumentStatsReported app_search_put_document_stats_reported = 348 [(module) = "appsearch"]; DeviceControlChanged device_control_changed = 349 [(module) = "sysui"]; DeviceStateChanged device_state_changed = 350 [(module) = "framework"]; InputDeviceRegistered inputdevice_registered = 351 [(module) = "framework"]; SmartSpaceCardReported smartspace_card_reported = 352 [(module) = "sysui"]; AuthPromptAuthenticateInvoked auth_prompt_authenticate_invoked = 353 [(module) = "framework"]; AuthManagerCanAuthenticateInvoked auth_manager_can_authenticate_invoked = 354 [(module) = "framework"]; AuthEnrollActionInvoked auth_enroll_action_invoked = 355 [(module) = "framework"]; AuthDeprecatedAPIUsed auth_deprecated_api_used = 356 [(module) = "framework"]; UnattendedRebootOccurred unattended_reboot_occurred = 357 [(module) = "scheduling"]; LongRebootBlockingReported long_reboot_blocking_reported = 358 [(module) = "scheduling"]; LocationTimeZoneProviderStateChanged location_time_zone_provider_state_changed = 359 [(module) = "framework"]; // 360-363 are reserved. FdtrackEventOccurred fdtrack_event_occurred = 364 [(module) = "framework"]; TimeoutAutoExtendedReported timeout_auto_extended_reported = 365 [(module) = "framework"]; OdrefreshReported odrefresh_reported = 366 [(module) = "art"]; AlarmBatchDelivered alarm_batch_delivered = 367 [(module) = "framework"]; AlarmScheduled alarm_scheduled = 368 [(module) = "framework"]; CarWatchdogIoOveruseStatsReported car_watchdog_io_overuse_stats_reported = 369 [(module) = "car"]; UserLevelHibernationStateChanged user_level_hibernation_state_changed = 370 [(module) = "framework"]; AppSearchInitializeStatsReported app_search_initialize_stats_reported = 371 [(module) = "appsearch"]; AppSearchQueryStatsReported app_search_query_stats_reported = 372 [(module) = "appsearch"]; AppProcessDied app_process_died = 373 [(module) = "framework"]; NetworkIpReachabilityMonitorReported network_ip_reachability_monitor_reported = 374 [(module) = "network_stack"]; SlowInputEventReported slow_input_event_reported = 375 [(module) = "input"]; ANROccurredProcessingStarted anr_occurred_processing_started = 376 [(module) = "framework"]; AppSearchRemoveStatsReported app_search_remove_stats_reported = 377 [(module) = "appsearch"]; MediaCodecReported media_codec_reported = 378 [(module) = "framework"]; PermissionUsageFragmentInteraction permission_usage_fragment_interaction = 379 [(module) = "permissioncontroller"]; PermissionDetailsInteraction permission_details_interaction = 380 [(module) = "permissioncontroller"]; PrivacySensorToggleInteraction privacy_sensor_toggle_interaction = 381 [(module) = "framework"]; PrivacyToggleDialogInteraction privacy_toggle_dialog_interaction = 382 [(module) = "framework"]; AppSearchOptimizeStatsReported app_search_optimize_stats_reported = 383 [(module) = "appsearch"]; AppCompatStateChanged app_compat_state_changed = 386 [(module) = "framework"]; SizeCompatRestartButtonEventReported size_compat_restart_button_event_reported = 387 [(module) = "framework"]; SplitscreenUIChanged splitscreen_ui_changed = 388 [(module) = "framework"]; AccessibilityFloatingMenuUIChanged accessibility_floating_menu_ui_changed = 393 [(module) = "sysui"]; CameraCompatControlEventReported camera_compat_control_event_reported = 411 [(module) = "framework"]; // 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: 10146 oneof pulled { 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) = "framework", (module) = "statsdtest"]; 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 [(module) = "framework"]; 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 [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 [(module) = "hwui"]; 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", (truncate_timestamp) = true]; BytesTransferByTagAndMetered bytes_transfer_by_tag_and_metered = 10083 [(module) = "framework", (truncate_timestamp) = true]; DNDModeProto dnd_mode_rule = 10084 [(module) = "framework"]; GeneralExternalStorageAccessStats general_external_storage_access_stats = 10085 [(module) = "mediaprovider"]; IncomingSms incoming_sms = 10086 [(module) = "telephony"]; OutgoingSms outgoing_sms = 10087 [(module) = "telephony"]; CarrierIdTableVersion carrier_id_table_version = 10088 [(module) = "telephony"]; DataCallSession data_call_session = 10089 [(module) = "telephony"]; CellularServiceState cellular_service_state = 10090 [(module) = "telephony"]; CellularDataServiceSwitch cellular_data_service_switch = 10091 [(module) = "telephony"]; SystemMemory system_memory = 10092 [(module) = "framework"]; ImsRegistrationTermination ims_registration_termination = 10093 [(module) = "telephony"]; ImsRegistrationStats ims_registration_stats = 10094 [(module) = "telephony"]; CpuTimePerClusterFreq cpu_time_per_cluster_freq = 10095 [(module) = "framework"]; CpuCyclesPerUidCluster cpu_cycles_per_uid_cluster = 10096 [(module) = "framework"]; DeviceRotatedData device_rotated_data = 10097 [(module) = "framework"]; CpuCyclesPerThreadGroupCluster cpu_cycles_per_thread_group_cluster = 10098 [(module) = "framework"]; MediaDrmActivityInfo media_drm_activity_info = 10099; OemManagedBytesTransfer oem_managed_bytes_transfer = 10100 [(module) = "framework"]; GnssPowerStats gnss_power_stats = 10101 [(module) = "framework"]; TimeZoneDetectorState time_zone_detector_state = 10102 [(module) = "framework"]; Keystore2StorageStats keystore2_storage_stats = 10103 [(module) = "framework"]; RkpPoolStats rkp_pool_stats = 10104 [(module) = "framework"]; ProcessDmabufMemory process_dmabuf_memory = 10105 [(module) = "framework"]; PendingAlarmInfo pending_alarm_info = 10106 [(module) = "framework"]; UserLevelHibernatedApps user_level_hibernated_apps = 10107 [(module) = "framework"]; LauncherLayoutSnapshot launcher_layout_snapshot = 10108 [(module) = "sysui"]; GlobalHibernatedApps global_hibernated_apps = 10109 [(module) = "framework"]; InputEventLatencySketch input_event_latency_sketch = 10110 [(module) = "input"]; BatteryUsageStatsBeforeReset battery_usage_stats_before_reset = 10111 [(module) = "framework"]; BatteryUsageStatsSinceReset battery_usage_stats_since_reset = 10112 [(module) = "framework"]; BatteryUsageStatsSinceResetUsingPowerProfileModel battery_usage_stats_since_reset_using_power_profile_model = 10113 [(module) = "framework"]; InstalledIncrementalPackage installed_incremental_package = 10114 [(module) = "framework"]; TelephonyNetworkRequests telephony_network_requests = 10115 [(module) = "telephony"]; AppSearchStorageInfo app_search_storage_info = 10116 [(module) = "appsearch"]; VmStat vmstat = 10117 [(module) = "framework"]; Keystore2KeyCreationWithGeneralInfo keystore2_key_creation_with_general_info = 10118 [(module) = "framework"]; Keystore2KeyCreationWithAuthInfo keystore2_key_creation_with_auth_info = 10119 [(module) = "framework"]; Keystore2KeyCreationWithPurposeAndModesInfo keystore2_key_creation_with_purpose_and_modes_info = 10120 [(module) = "framework"]; Keystore2AtomWithOverflow keystore2_atom_with_overflow = 10121 [(module) = "framework"]; Keystore2KeyOperationWithPurposeAndModesInfo keystore2_key_operation_with_purpose_and_modes_info = 10122 [(module) = "framework"]; Keystore2KeyOperationWithGeneralInfo keystore2_key_operation_with_general_info = 10123 [(module) = "framework"]; RkpErrorStats rkp_error_stats = 10124 [(module) = "framework"]; Keystore2CrashStats keystore2_crash_stats = 10125 [(module) = "framework"]; AccessibilityShortcutStats accessibility_shortcut_stats = 10127 [(module) = "framework"]; AccessibilityFloatingMenuStats accessibility_floating_menu_stats = 10128 [(module) = "framework"]; CarWatchdogSystemIoUsageSummary car_watchdog_system_io_usage_summary = 10131 [(module) = "car"]; CarWatchdogUidIoUsageSummary car_watchdog_uid_io_usage_summary = 10132 [(module) = "car"]; ImsRegistrationFeatureTagStats ims_registration_feature_tag_stats = 10133 [(module) = "telephony"]; RcsClientProvisioningStats rcs_client_provisioning_stats = 10134 [(module) = "telephony"]; RcsAcsProvisioningStats rcs_acs_provisioning_stats = 10135 [(module) = "telephony"]; SipDelegateStats sip_delegate_stats = 10136 [(module) = "telephony"]; SipTransportFeatureTagStats sip_transport_feature_tag_stats = 10137 [(module) = "telephony"]; SipMessageResponse sip_message_response = 10138 [(module) = "telephony"]; SipTransportSession sip_transport_session = 10139 [(module) = "telephony"]; ImsDedicatedBearerListenerEvent ims_dedicated_bearer_listener_event = 10140 [(module) = "telephony"]; ImsDedicatedBearerEvent ims_dedicated_bearer_event = 10141 [(module) = "telephony"]; ImsRegistrationServiceDescStats ims_registration_service_desc_stats = 10142 [(module) = "telephony"]; UceEventStats uce_event_stats = 10143 [(module) = "telephony"]; PresenceNotifyEvent presence_notify_event = 10144 [(module) = "telephony"]; GbaEvent gba_event = 10145 [(module) = "telephony"]; } // 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 10008, 10036; } /** * This proto represents a node of an attribution chain. * Note: All attribution chains are represented as a repeated field of type * AttributionNode. It is understood that in such arrays, the order is that * of calls, that is [A, B, C] if A calls B that calls C. */ message AttributionNode { // The uid for a given element in the attribution chain. optional int32 uid = 1; // The (optional) string tag for an element in the attribution chain. If the // element has no tag, it is encoded as an empty string. optional string tag = 2; } message KeyValuePair { optional int32 key = 1; oneof value { int32 value_int = 2; int64 value_long = 3; string value_str = 4; float value_float = 5; } } message KeyValuePairsAtom { optional int32 uid = 1; repeated KeyValuePair pairs = 2; } /* * ***************************************************************************** * Below are all of the individual atoms that are logged by Android via statsd. * * RULES: * - The field ids for each atom must start at 1, and count upwards by 1. * Skipping field ids is not allowed. * - These form an API, so renaming, renumbering or removing fields is * not allowed between android releases. (This is not currently enforced, * but there will be a tool to enforce this restriction). * - The types must be built-in protocol buffer types, namely, no sub-messages * are allowed (yet). The bytes type is also not allowed. * - The CamelCase name of the message type should match the * underscore_separated name as defined in Atom. * - If an atom represents work that can be attributed to an app, there can * be exactly one AttributionChain field. It must be field number 1. * - A field that is a uid should be a string field, tagged with the [xxx] * annotation. The generated code on android will be represented by UIDs, * and those UIDs will be translated in xxx to those strings. * * CONVENTIONS: * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. * - If there is a UID, it goes first. Think in an object-oriented fashion. * ***************************************************************************** */ /** * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged. * Logs when the Thermal service HAL notifies the throttling start/stop events. * * Logged from: * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java */ message ThermalThrottlingStateChanged { // The type of temperature being reported (CPU, GPU, SKIN, etc) optional android.os.TemperatureTypeEnum sensor_type = 1; // Throttling state, this field is DEPRECATED enum State { UNKNOWN = 0; START = 1; // START indicated that throttling was triggered. STOP = 2; // STOP indicates that throttling was cleared. } optional State state = 2; optional float temperature = 3; } /** * Track transcoding service usage * Logged from: * packages/providers/MediaProvider/src/com/android/providers/media/TranscodeHelper.java * Next Tag: 14 */ message TranscodingData { // Reason that leads to the type of access. enum AccessReason { UNKNOWN = 0; SYSTEM_DEFAULT = 1; // Default option SYSTEM_CONFIG = 2; // Server-side/on-device config APP_MANIFEST = 3; // media_capabilites.xml APP_COMPAT = 4; // App compat framework APP_EXTRA = 5; // ApplicationMediaCapabilities API in open() } // Causes that leads to the failure of transcode. enum FailureCause { CAUSE_UNKNOWN = 0; TRANSCODING_SERVICE_ERROR = 1; // Error from transcoding service. TRANSCODING_CLIENT_TIMEOUT = 2; // Timeout from MediaProvider. TRANSCODING_SESSION_CANCELED = 3; // MediaProvider cancels the transcode. } enum AccessType { HEVC_WRITE = 1; READ_DIRECT = 2; READ_CACHE = 3; READ_TRANSCODE = 4; WRITE_CACHE = 5; // App trying to write to transcodeid avc file in cache, this is rare. AVC_WRITE = 6; } enum Result { SUCCESS = 0; FAIL = 1; UNDEFINED = 2; } optional string requestor_package = 1; optional AccessType access_type = 2; optional int64 file_size_bytes = 3; optional Result transcode_result = 4; optional int64 transcode_duration_millis = 5; // The duration of transcoding. optional int64 file_duration_millis = 6; // The duration of the video file. optional int64 file_framerate_fps = 7; // The framerate of the video file. optional AccessReason access_reason = 8; optional int64 width = 9; optional int64 height = 10; optional bool hit_anr = 11; optional FailureCause failure_cause = 12; // This field is valid only when fails. optional int64 transcoding_service_error_code = 13; // Error code from transcoding service. } /** * Logs when the screen state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message ScreenStateChanged { // New screen state, from frameworks/proto_logging/stats/enums/view/enums.proto. optional android.view.DisplayStateEnum state = 1 [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** * Logs that the process state of the uid, as determined by ActivityManager * (i.e. the highest process state of that uid's processes) has changed. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message UidProcessStateChanged { optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true]; // The state, from frameworks/proto_logging/stats/enums/app/enums.proto. optional android.app.ProcessStateEnum state = 2 [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** * Logs process state change of a process, as per the activity manager. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java */ message ProcessStateChanged { optional int32 uid = 1; optional string process_name = 2; optional string package_name = 3; // TODO: remove this when validation is done optional int64 version = 5; // The state, from frameworks/proto_logging/stats/enums/app/enums.proto. optional android.app.ProcessStateEnum state = 4; } /** * Logs when ActivityManagerService sleep state is changed. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java */ message ActivityManagerSleepStateChanged { // TODO: import frameworks proto enum State { UNKNOWN = 0; ASLEEP = 1; AWAKE = 2; } optional State state = 1 [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** * Logs when system memory state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message MemoryFactorStateChanged { // TODO: import frameworks proto enum State { MEMORY_UNKNOWN = 0; NORMAL = 1; // normal. MODERATE = 2; // moderate memory pressure. LOW = 3; // low memory. CRITICAL = 4; // critical memory. } optional State factor = 1 [(state_field_option).exclusive_state = true]; } /** * Logs when app is using too much cpu, according to ActivityManagerService. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message ExcessiveCpuUsageReported { optional int32 uid = 1; optional string process_name = 2; optional string package_name = 3; // package version. TODO: remove this when validation is done optional int64 version = 4; } /** * Logs when a cached process is killed, along with its pss. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message CachedKillReported { optional int32 uid = 1; optional string process_name = 2; optional string package_name = 3; // TODO: remove this when validation is done optional int64 version = 5; optional int64 pss = 4; } /** * 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 attempt was successful and reasons for failure if it wasn't. * * Logged from: * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMetrics.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; FAILURE_WRONG_PASSWORD = 8; } enum Trigger { UNKNOWN = 0; // Connection attempt was initiated manually. MANUAL = 1; // Automatic reconnection to the same network as connected previously. RECONNECT_SAME_NETWORK = 2; // Automatic reconnection to a saved network, but not the previous one. AUTOCONNECT_CONFIGURED_NETWORK = 3; // Automatic first connection attempt after device boot. AUTOCONNECT_BOOT = 4; } // 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; // Time taken by this connection attempt. optional int32 connection_attempt_duration_millis = 4; // Band bucket the connected network is on. optional android.net.wifi.WifiBandBucket band = 5; // Authentication type. optional android.net.wifi.WifiAuthType auth_type = 6; // What triggered this connection attempt. optional Trigger trigger = 7; // Whether this network was used (successfully connected to) previously. optional bool network_used = 8; // Time taken from the last successful connection (or device boot if that's the first one). optional int32 time_since_last_connection_seconds = 9; } /** * Logs when a Wifi connection drops. * * Logged from: * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMetrics.java */ message WifiDisconnectReported { enum FailureCode { UNKNOWN = 0; // Wifi supplicant failure reason codes (IEEE Std 802.11-2016, 9.4.1.7, Table 9-45). // See ISupplicantStaIfaceCallback.java:ReasonCode UNSPECIFIED = 1; PREV_AUTH_NOT_VALID = 2; DEAUTH_LEAVING = 3; DISASSOC_DUE_TO_INACTIVITY = 4; DISASSOC_AP_BUSY = 5; CLASS2_FRAME_FROM_NONAUTH_STA = 6; CLASS3_FRAME_FROM_NONASSOC_STA = 7; DISASSOC_STA_HAS_LEFT = 8; STA_REQ_ASSOC_WITHOUT_AUTH = 9; PWR_CAPABILITY_NOT_VALID = 10; SUPPORTED_CHANNEL_NOT_VALID = 11; BSS_TRANSITION_DISASSOC = 12; INVALID_IE = 13; MICHAEL_MIC_FAILURE = 14; FOURWAY_HANDSHAKE_TIMEOUT = 15; GROUP_KEY_UPDATE_TIMEOUT = 16; IE_IN_4WAY_DIFFERS = 17; GROUP_CIPHER_NOT_VALID = 18; PAIRWISE_CIPHER_NOT_VALID = 19; AKMP_NOT_VALID = 20; UNSUPPORTED_RSN_IE_VERSION = 21; INVALID_RSN_IE_CAPAB = 22; IEEE_802_1X_AUTH_FAILED = 23; CIPHER_SUITE_REJECTED = 24; TDLS_TEARDOWN_UNREACHABLE = 25; TDLS_TEARDOWN_UNSPECIFIED = 26; SSP_REQUESTED_DISASSOC = 27; NO_SSP_ROAMING_AGREEMENT = 28; BAD_CIPHER_OR_AKM = 29; NOT_AUTHORIZED_THIS_LOCATION = 30; SERVICE_CHANGE_PRECLUDES_TS = 31; UNSPECIFIED_QOS_REASON = 32; NOT_ENOUGH_BANDWIDTH = 33; DISASSOC_LOW_ACK = 34; EXCEEDED_TXOP = 35; STA_LEAVING = 36; END_TS_BA_DLS = 37; UNKNOWN_TS_BA = 38; TIMEOUT = 39; PEERKEY_MISMATCH = 45; AUTHORIZED_ACCESS_LIMIT_REACHED = 46; EXTERNAL_SERVICE_REQUIREMENTS = 47; INVALID_FT_ACTION_FRAME_COUNT = 48; INVALID_PMKID = 49; INVALID_MDE = 50; INVALID_FTE = 51; MESH_PEERING_CANCELLED = 52; MESH_MAX_PEERS = 53; MESH_CONFIG_POLICY_VIOLATION = 54; MESH_CLOSE_RCVD = 55; MESH_MAX_RETRIES = 56; MESH_CONFIRM_TIMEOUT = 57; MESH_INVALID_GTK = 58; MESH_INCONSISTENT_PARAMS = 59; MESH_INVALID_SECURITY_CAP = 60; MESH_PATH_ERROR_NO_PROXY_INFO = 61; MESH_PATH_ERROR_NO_FORWARDING_INFO = 62; MESH_PATH_ERROR_DEST_UNREACHABLE = 63; MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS = 64; MESH_CHANNEL_SWITCH_REGULATORY_REQ = 65; MESH_CHANNEL_SWITCH_UNSPECIFIED = 66; // ClientModeImpl error codes // Defined in /frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMetrics.java IFACE_DESTROYED = 10000; WIFI_DISABLED = 10001; SUPPLICANT_DISCONNECTED = 10002; CONNECTING_WATCHDOG_TIMER = 10003; ROAM_WATCHDOG_TIMER = 10004; } // How long the session lasted from successful connection to disconnect. optional int32 connected_duration_seconds = 1; // Reason for the disconnect. optional FailureCode failure_code = 2; // Band bucket the connected network was on. optional android.net.wifi.WifiBandBucket band = 3; // Authentication type. optional android.net.wifi.WifiAuthType auth_type = 4; // Last seen RSSI before the disconnect. optional int32 last_rssi = 5; // Last seen link speed before the disconnect. optional int32 last_link_speed = 6; } /** * Logs when Wifi connection is established or dropped. * * Logged from: * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMetrics.java */ message WifiConnectionStateChanged { optional bool is_connected = 1; // Band bucket the connected network was on. // Filled for both connected and disconnected cases. optional android.net.wifi.WifiBandBucket band = 2; // Authentication type. // Filled for both connected and disconnected cases. optional android.net.wifi.WifiAuthType auth_type = 3; } /** * Logs when memory stats of a process is reported. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java */ message ProcessMemoryStatReported { optional int32 uid = 1; optional string process_name = 2; optional string package_name = 3; //TODO: remove this when validation is done optional int64 version = 9; optional int64 pss = 4; optional int64 uss = 5; optional int64 rss = 6; enum Type { ADD_PSS_INTERNAL_SINGLE = 0; ADD_PSS_INTERNAL_ALL_MEM = 1; ADD_PSS_INTERNAL_ALL_POLL = 2; ADD_PSS_EXTERNAL = 3; ADD_PSS_EXTERNAL_SLOW = 4; } optional Type type = 7; optional int64 duration_millis = 8; } /** * Logs that a process started, finished, crashed, or ANRed. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message ProcessLifeCycleStateChanged { optional int32 uid = 1 [(is_uid) = true]; // The process name (usually same as the app name). optional string process_name = 2; // What lifecycle state the process changed to. // This enum is specific to atoms.proto. enum State { FINISHED = 0; STARTED = 1; CRASHED = 2; } optional State state = 3; } /** * Logs when the ble scan state changes. * * Logged from: * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java */ message BleScanStateChanged { repeated AttributionNode attribution_node = 1 [(state_field_option).primary_field_first_uid = true]; enum State { OFF = 0; ON = 1; // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). RESET = 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 [(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 [(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 [(state_field_option).primary_field = true]; } /** * Logs reporting of a ble scan finding results. * * Logged from: * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java */ // TODO: Consider also tracking per-scanner-id. message BleScanResultReceived { repeated AttributionNode attribution_node = 1; // Number of ble scan results returned. optional int32 num_results = 2; } /** * Logs when a sensor state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message SensorStateChanged { repeated AttributionNode attribution_node = 1; // The id (int) of the sensor. optional int32 sensor_id = 2; enum State { OFF = 0; ON = 1; } optional State state = 3; } /** * Logs when GPS state changes. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message GpsScanStateChanged { repeated AttributionNode attribution_node = 1; enum State { OFF = 0; ON = 1; } optional State state = 2; } /** * Logs when GPS signal quality. * * Logged from: * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java */ message GpsSignalQualityChanged { optional android.server.location.GpsSignalQualityEnum level = 1; } /** * Logs when a sync manager sync state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message SyncStateChanged { repeated AttributionNode attribution_node = 1; // Name of the sync (as named in the app). Can be chosen at run-time. optional string sync_name = 2; enum State { OFF = 0; ON = 1; } optional State state = 3; } /* * Deferred job stats. * * Logged from: * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java */ message DeferredJobStatsReported { repeated AttributionNode attribution_node = 1; // Number of jobs deferred. optional int32 num_jobs_deferred = 2; // Time since the last job runs. optional int64 time_since_last_job_millis = 3; } /** * Logs when a job scheduler job state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java * * Next tag: 18 */ message ScheduledJobStateChanged { repeated AttributionNode attribution_node = 1; // Name of the job (as named in the app) optional string job_name = 2; enum State { FINISHED = 0; STARTED = 1; SCHEDULED = 2; } optional State state = 3; // The internal reason a job has stopped. // This is only applicable when the state is FINISHED. // The default value is INTERNAL_STOP_REASON_UNKNOWN. optional android.app.job.InternalStopReasonEnum internal_stop_reason = 4; // The publicly returned reason onStopJob() was called. // This is only applicable when the state is FINISHED, but may be undefined if // JobService.onStopJob() was never called for the job. // The default value is STOP_REASON_UNDEFINED. optional android.app.job.StopReasonEnum public_stop_reason = 17; // The standby bucket of the app that scheduled the job. These match the framework constants // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is // already assigned 0. enum Bucket { UNKNOWN = -1; ACTIVE = 0; WORKING_SET = 1; 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; // True if the app has requested this run as an expedited job. optional bool is_requested_expedited_job = 15; // True if the job is running as an expedited job. Only valid for STARTED and FINISHED states. optional bool is_running_as_expedited_job = 16; } /** * Logs when the audio state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message AudioStateChanged { repeated AttributionNode attribution_node = 1; enum State { OFF = 0; ON = 1; // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). RESET = 2; } optional State state = 2; } /** * Logs when the video codec state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message MediaCodecStateChanged { repeated AttributionNode attribution_node = 1; enum State { OFF = 0; ON = 1; // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). RESET = 2; } optional State state = 2; } /** * Logs when the flashlight state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message FlashlightStateChanged { repeated AttributionNode attribution_node = 1; enum State { OFF = 0; ON = 1; // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). RESET = 2; } optional State state = 2; } /** * Logs when the camera state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message CameraStateChanged { repeated AttributionNode attribution_node = 1; enum State { OFF = 0; ON = 1; // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). RESET = 2; } optional State state = 2; } /** * Logs that the state of a wakelock (per app and per wakelock name) has changed. * * Logged from: * TODO */ message WakelockStateChanged { 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/proto_logging/stats/enums/os/enums.proto. 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 [(state_field_option).primary_field = true]; enum State { RELEASE = 0; ACQUIRE = 1; CHANGE_RELEASE = 2; CHANGE_ACQUIRE = 3; } optional State state = 4 [ (state_field_option).exclusive_state = true, (state_field_option).default_state_value = 0, (state_field_option).nested = true ]; } /** * Logs when a partial wakelock is considered 'long' (over 1 min). * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message LongPartialWakelockStateChanged { repeated AttributionNode attribution_node = 1; // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). optional string tag = 2; // TODO: I have no idea what this is. optional string history_tag = 3; enum State { OFF = 0; ON = 1; } optional State state = 4; } /** * Logs when the device is interactive, according to the PowerManager Notifier. * * Logged from: * frameworks/base/services/core/java/com/android/server/power/Notifier.java */ message InteractiveStateChanged { enum State { OFF = 0; ON = 1; } optional State state = 1; } /** * Logs Battery Saver state change. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message BatterySaverModeStateChanged { enum State { OFF = 0; ON = 1; } optional State state = 1 [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** * Logs Doze mode state change. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message DeviceIdleModeStateChanged { optional android.server.DeviceIdleModeEnum state = 1 [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** * Logs state change of Doze mode including maintenance windows. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message DeviceIdlingModeStateChanged { optional android.server.DeviceIdleModeEnum state = 1 [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** * Logs screen brightness level. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message ScreenBrightnessChanged { // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. optional int32 level = 1; } /** * Logs battery level (percent full, from 0 to 100). * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message BatteryLevelChanged { // Battery level. Should be in [0, 100]. optional int32 battery_level = 1; } /** * Logs change in charging status of the device. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message ChargingStateChanged { // State of the battery, from frameworks/proto_logging/stats/enums/os/enums.proto. optional android.os.BatteryStatusEnum state = 1 [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** * Logs whether the device is plugged in, and what power source it is using. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message PluggedStateChanged { // Whether the device is plugged in, from frameworks/proto_logging/stats/enums/os/enums.proto. optional android.os.BatteryPluggedStateEnum state = 1 [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** * Logs when an app's wakeup alarm fires. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message WakeupAlarmOccurred { repeated AttributionNode attribution_node = 1; // Name of the wakeup alarm. optional string tag = 2; // Name of source package (for historical reasons, since BatteryStats tracked it). optional string package_name = 3; // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired. optional AppStandbyBucketChanged.Bucket app_standby_bucket = 4; } /** * Logs when an an app causes the mobile radio to change state. * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. * * Logged from: * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java */ message MobileRadioPowerStateChanged { repeated AttributionNode attribution_node = 1; // Power state, from frameworks/proto_logging/stats/enums/telephony/enums.proto. optional android.telephony.DataConnectionPowerStateEnum state = 2; } /** * Logs when an an app causes the wifi radio to change state. * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. * * Logged from: * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java */ message WifiRadioPowerStateChanged { repeated AttributionNode attribution_node = 1; // Power state, from frameworks/proto_logging/stats/enums/telephony/enums.proto. optional android.telephony.DataConnectionPowerStateEnum state = 2; } /** * Logs kernel wakeup reasons and aborts. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message KernelWakeupReported { // Name of the kernel wakeup reason (or abort). optional string wakeup_reason_name = 1; // Duration (in microseconds) for the wake-up interrupt to be serviced. optional int64 duration_micros = 2; } /** * Logs when Wifi is toggled on/off. * Note that Wifi may still perform certain functions (e.g. location scanning) even when disabled. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message WifiEnabledStateChanged { enum State { OFF = 0; ON = 1; } optional State state = 1; } /** * 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. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java */ message WifiRunningStateChanged { repeated AttributionNode attribution_node = 1; enum State { OFF = 0; ON = 1; } optional State state = 2; } /** * Logs wifi locks held by an app. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message WifiLockStateChanged { repeated AttributionNode attribution_node = 1; enum State { OFF = 0; ON = 1; } optional State state = 2; // WifiLock type, from frameworks/proto_logging/stats/enums/wifi/enums.proto. optional android.net.wifi.WifiModeEnum mode = 3; } /** * Logs wifi signal strength changes. * * Logged from: * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java */ message WifiSignalStrengthChanged { // Signal strength, from frameworks/proto_logging/stats/enums/telephony/enums.proto. optional android.telephony.SignalStrengthEnum signal_strength = 1; } /** * Logs wifi scans performed by an app. * * Logged from: * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java */ message WifiScanStateChanged { repeated AttributionNode attribution_node = 1; enum State { OFF = 0; ON = 1; } optional State state = 2; } /** * Logs wifi multicast locks held by an app * * Logged from: * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java */ message WifiMulticastLockStateChanged { repeated AttributionNode attribution_node = 1; enum State { OFF = 0; ON = 1; } optional State state = 2; optional string tag = 3; } /** * Logs shutdown reason and duration on next boot. * * Logged from: * frameworks/base/core/java/com/android/server/BootReceiver.java */ message ShutdownSequenceReported { // True if shutdown is for a reboot. Default: false if we do not know. optional bool reboot = 1; // Reason for shutdown. Eg: userrequested. Default: "". optional string reason = 2; // Beginning of shutdown time in ms using wall clock time since unix epoch. // Default: 0 if no start time received. optional int64 start_time_millis = 3; // Duration of shutdown in ms. Default: 0 if no duration received. optional int64 duration_millis = 4; } /** * Logs boot reason and duration. * * Logged from: * system/core/bootstat/bootstat.cpp */ message BootSequenceReported { // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list // Default: "" if not available. optional string bootloader_reason = 1; // Reason for system boot. Eg. bootloader, reboot,userrequested // Default: "" if not available. optional string system_reason = 2; // End of boot time in ms from unix epoch using system wall clock. optional int64 end_time_millis = 3; // Total boot duration in ms. optional int64 total_duration_millis = 4; // Bootloader duration in ms. optional int64 bootloader_duration_millis = 5; // Time since last boot in ms. Default: 0 if not available. optional int64 time_since_last_boot = 6; } /** * Logs call state and disconnect cause (if applicable). * * Logged from: * packages/services/Telecomm/src/com/android/server/telecom/Call.java */ message CallStateChanged { // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. // From frameworks/proto_logging/stats/enums/telecomm/enums.proto. optional android.telecom.CallStateEnum call_state = 1; // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. // This value is only applicable when the call_state is DISCONNECTED, and // should always be UNKNOWN if the call_state is not DISCONNECTED. // From frameworks/proto_logging/stats/enums/telecomm/enums.proto. optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; // True if the call is self-managed, which are apps that use the // telecom infrastructure to make their own calls. optional bool self_managed = 3; // True if call is external. External calls are calls on connected Wear // devices but show up in Telecom so the user can pull them onto the device. optional bool external_call = 4; } /** * Logs keyguard state. The keyguard is the lock screen. * * Logged from: * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java */ message KeyguardStateChanged { enum State { UNKNOWN = 0; // The keyguard is hidden when the phone is unlocked. HIDDEN = 1; // The keyguard is shown when the phone is locked (screen turns off). SHOWN= 2; // The keyguard is occluded when something is overlaying the keyguard. // Eg. Opening the camera while on the lock screen. OCCLUDED = 3; } optional State state = 1; } /** * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and * prompts the user to enter a password (pattern, pin, etc). * * Logged from: * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java */ message KeyguardBouncerStateChanged { enum State { UNKNOWN = 0; // Bouncer is hidden, either as a result of successfully entering the // password, screen timing out, or user going back to lock screen. HIDDEN = 1; // The user is being prompted to enter the password and the keyguard is NOT in one // handed mode. SHOWN = 2; // The user is being prompted to enter the password and the keyguard shows in one // handed mode and left aligned. SHOWN_LEFT = 3; // The user is being prompted to enter the password and the keyguard shows in one // handed mode and right aligned. SHOWN_RIGHT = 4; // The keyguard switches to the left side while it is in one handed mode. SWITCH_LEFT = 5; // The keyguard switches to the right side while it is in one handed mode. SWITCH_RIGHT = 6; } optional State state = 1; } /** * Logs the result of entering a password into the keyguard bouncer. * * Logged from: * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java */ message KeyguardBouncerPasswordEntered { enum BouncerResult { UNKNOWN = 0; // The password entered was incorrect. FAILURE = 1; // The password entered was correct. SUCCESS = 2; } optional BouncerResult result = 1; enum BouncerSide { DEFAULT = 0; LEFT = 1; RIGHT = 2; } optional BouncerSide side = 2; } /* * Logs changes to the configuration of the device. The configuration is defined * in frameworks/base/core/java/android/content/res/Configuration.java * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html * Please go there to interpret the possible values each field can be. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message ResourceConfigurationChanged { // Bit mask of color capabilities of the screen. // Contains information about the color gamut and hdr mode of the screen. // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode optional int32 color_mode = 1; // The target screen density being rendered to. // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi optional int32 density_dpi = 2; // Current user preference for the scaling factor for fonts, // relative to the base density scaling. // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale optional float font_scale = 3; // Flag indicating whether the hard keyboard is hidden. // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden optional int32 hard_keyboard_hidden = 4; // The type of keyboard attached to the device. // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard optional int32 keyboard = 5; // Flag indicating whether any keyboard is available. Takes soft keyboards into account. // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden optional int32 keyboard_hidden = 6; // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. // 0 if undefined. // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc optional int32 mcc = 7; // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. // 0 if undefined. Note: the actual MNC may be 0, to check for this use the // MNC_ZERO symbol defined in Configuration.java. // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc optional int32 mnc = 8; // The kind of navigation available on the device. // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation optional int32 navigation = 9; // Flag indicating whether the navigation is available. // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden optional int32 navigation_hidden = 10; // Overall orientation of the screen. // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation optional int32 orientation = 11; // The current height of the available screen space, in dp units. // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp optional int32 screen_height_dp = 12; // Bit mask of overall layout of the screen. // Contains information about screen size, whether the screen is wider/taller // than normal, whether the screen layout is right-tl-left or left-to-right, // and whether the screen has a rounded shape. // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout optional int32 screen_layout = 13; // Current width of the available screen space, in dp units. // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp optional int32 screen_width_dp = 14; // The smallest screen size an application will see in normal operation. // This is the smallest value of both screenWidthDp and screenHeightDp // in portrait and landscape. // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp optional int32 smallest_screen_width_dp = 15; // The type of touch screen attached to the device. // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen optional int32 touchscreen = 16; // Bit mask of the ui mode. // Contains information about the overall ui mode of the device. // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET // Also contains information about whether the device is in night mode. // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode optional int32 ui_mode = 17; } /** * Logs changes in the connection state of the mobile radio. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java */ message MobileConnectionStateChanged { // States are from the state machine DataConnection.java. enum State { UNKNOWN = 0; // The connection is inactive, or disconnected. INACTIVE = 1; // The connection is being activated, or connecting. ACTIVATING = 2; // The connection is active, or connected. ACTIVE = 3; // The connection is disconnecting. DISCONNECTING = 4; // The connection is disconnecting after creating a connection. DISCONNECTION_ERROR_CREATING_CONNECTION = 5; } optional State state = 1; // For multi-sim phones, this distinguishes between the sim cards. optional int32 sim_slot_index = 2; // Used to identify the connection. Starts at 0 and increments by 1 for // every new network created. Resets whenever the device reboots. optional int32 data_connection_id = 3; // A bitmask for the capabilities of this connection. // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. // Default value (if we have no information): 0 optional int64 capabilities = 4; // If this connection has internet. // This just checks if the DEFAULT bit of capabilities is set. optional bool has_internet = 5; } /** * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java */ message MobileRadioTechnologyChanged { optional android.telephony.NetworkTypeEnum state = 1; // For multi-sim phones, this distinguishes between the sim cards. optional int32 sim_slot_index = 2; } /** * Logs the VID and PID of any connected USB devices. * * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. * * Logged by Vendor. */ message UsbDeviceAttached { optional int32 vid = 1; optional int32 pid = 2; optional bool has_audio = 3; optional bool has_hid = 4; optional bool has_storage = 5; enum State { STATE_DISCONNECTED = 0; STATE_CONNECTED = 1; } optional State state = 6; optional int64 last_connect_duration_millis = 7; } /** * Logs when Bluetooth is enabled and disabled. * * Logged from: * services/core/java/com/android/server/BluetoothManagerService.java */ message BluetoothEnabledStateChanged { repeated AttributionNode attribution_node = 1; // Whether or not bluetooth is enabled on the device. enum State { UNKNOWN = 0; ENABLED = 1; DISABLED = 2; } optional State state = 2; // The reason for being enabled/disabled. // Eg. Airplane mode, crash, application request. optional android.bluetooth.EnableDisableReasonEnum reason = 3; // If the reason is an application request, this will be the package name. optional string pkg_name = 4; } /** * Logs when profiles on a Bluetooth device connects and disconnects. * * Logged from: * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java * * Next Tag: 6 */ message BluetoothConnectionStateChanged { // The state of the connection. // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. optional android.bluetooth.ConnectionStateEnum state = 1; // An identifier that can be used to match connect and disconnect events. // Currently is last two bytes of a hash of a device level ID and // the mac address of the bluetooth device that is connected. // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ optional int32 obfuscated_id = 2 [deprecated = true]; // The profile that is connected. Eg. GATT, A2DP, HEADSET. // From android.bluetooth.BluetoothAdapter.java // Default: 0 when not used optional int32 bt_profile = 3; // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 5; } /** * Logs when a Bluetooth device connects and disconnects over ACL * * Logged from: * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java * * Next Tag: 4 */ message BluetoothAclConnectionStateChanged { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // The state of the connection. // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. optional android.bluetooth.ConnectionStateEnum state = 2; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 3; } /** * Logs when a Bluetooth device connects and disconnects over SCO * * Logged from: * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java * * Next Tag: 5 */ message BluetoothScoConnectionStateChanged { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // The state of the connection. // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. optional android.bluetooth.ConnectionStateEnum state = 2; // Codec used for this SCO connection // Default: UNKNOWN optional android.bluetooth.hfp.ScoCodec codec = 3; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 4; } /** * Logged when active device of a profile changes * * Logged from: * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java */ message BluetoothActiveDeviceChanged { // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID // From android.bluetooth.BluetoothProfile optional int32 bt_profile = 1; // An identifier that can be used to match events for this new active device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if there is no active device for this profile optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 3; } // Logs when there is an event affecting Bluetooth device's link layer connection. // - This event is triggered when there is a related HCI command or event // - Users of this metrics can deduce Bluetooth device's connection state from these events // - HCI commands are logged before the command is sent, after receiving command status, and after // receiving command complete // - HCI events are logged when they arrive // // Low level log from system/bt // // Bluetooth classic commands: // - CMD_CREATE_CONNECTION // - CMD_DISCONNECT // - CMD_CREATE_CONNECTION_CANCEL // - CMD_ACCEPT_CONNECTION_REQUEST // - CMD_REJECT_CONNECTION_REQUEST // - CMD_SETUP_ESCO_CONNECTION // - CMD_ACCEPT_ESCO_CONNECTION // - CMD_REJECT_ESCO_CONNECTION // - CMD_ENH_SETUP_ESCO_CONNECTION // - CMD_ENH_ACCEPT_ESCO_CONNECTION // // Bluetooth low energy commands: // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] // - CMD_BLE_CLEAR_WHITE_LIST // - CMD_BLE_ADD_WHITE_LIST // - CMD_BLE_REMOVE_WHITE_LIST // // Bluetooth classic events: // - EVT_CONNECTION_COMP // - EVT_CONNECTION_REQUEST // - EVT_DISCONNECTION_COMP // - EVT_ESCO_CONNECTION_COMP // - EVT_ESCO_CONNECTION_CHANGED // // Bluetooth low energy meta events: // - BLE_EVT_CONN_COMPLETE_EVT // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT // // Next tag: 10 message BluetoothLinkLayerConnectionEvent { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Connection handle of this connection if available // Range: 0x0000 - 0x0EFF (12 bits) // Default: 0xFFFF if the handle is unknown optional int32 connection_handle = 2; // Direction of the link // Default: DIRECTION_UNKNOWN optional android.bluetooth.DirectionEnum direction = 3; // Type of this link // Default: LINK_TYPE_UNKNOWN optional android.bluetooth.LinkTypeEnum type = 4; // Reason metadata for this link layer connection event, rules for interpretation: // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is // set and valid, ignore hci_ble_event // HCI command associated with this event // Default: CMD_UNKNOWN optional android.bluetooth.hci.CommandEnum hci_cmd = 5; // HCI event associated with this event // Default: EVT_UNKNOWN optional android.bluetooth.hci.EventEnum hci_event = 6; // HCI BLE meta event associated with this event // Default: BLE_EVT_UNKNOWN optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; // HCI command status code if this is triggerred by hci_cmd // Default: STATUS_UNKNOWN optional android.bluetooth.hci.StatusEnum cmd_status = 8; // HCI reason code associated with this event // Default: STATUS_UNKNOWN optional android.bluetooth.hci.StatusEnum reason_code = 9; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 10; } /** * Logs when a module is rolled back by Watchdog. * * Logged from: Rollback Manager */ message WatchdogRollbackOccurred { enum RollbackType { UNKNOWN = 0; ROLLBACK_INITIATE = 1; ROLLBACK_SUCCESS = 2; ROLLBACK_FAILURE = 3; ROLLBACK_BOOT_TRIGGERED = 4; } optional RollbackType rollback_type = 1; optional string package_name = 2; optional int32 package_version_code = 3; enum RollbackReasonType { REASON_UNKNOWN = 0; REASON_NATIVE_CRASH = 1; 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]; } /** * Logs when there is a change in Bluetooth A2DP playback state * * Logged from: * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java */ message BluetoothA2dpPlaybackStateChanged { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Current playback state // Default: PLAYBACK_STATE_UNKNOWN optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; // Current audio coding mode // Default: AUDIO_CODING_MODE_UNKNOWN optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 4; } /** * Logs when there is a change in A2DP codec config for a particular remote device * * Logged from: * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java */ message BluetoothA2dpCodecConfigChanged { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig // Default SOURCE_CODEC_TYPE_INVALID optional int32 codec_type = 2; // Codec priroity, the higher the more preferred, -1 for disabled // Default: CODEC_PRIORITY_DEFAULT optional int32 codec_priority = 3; // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig // Default: SAMPLE_RATE_NONE optional int32 sample_rate = 4; // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig // Default: BITS_PER_SAMPLE_NONE optional int32 bits_per_sample = 5; // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig // Default: CHANNEL_MODE_NONE optional int32 channel_mode = 6; // Codec specific values // Default 0 optional int64 codec_specific_1 = 7; optional int64 codec_specific_2 = 8; optional int64 codec_specific_3 = 9; optional int64 codec_specific_4 = 10; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 11; } /** * Logs when there is a change in selectable A2DP codec capability for a paricular remote device * Each codec's capability is logged separately due to statsd restriction * * Logged from: * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java */ message BluetoothA2dpCodecCapabilityChanged { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig // Default SOURCE_CODEC_TYPE_INVALID optional int32 codec_type = 2; // Codec priroity, the higher the more preferred, -1 for disabled // Default: CODEC_PRIORITY_DEFAULT optional int32 codec_priority = 3; // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants // in BluetoothCodecConfig // Default: empty and SAMPLE_RATE_NONE for individual item optional int32 sample_rate = 4; // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants // in BluetoothCodecConfig // Default: empty and BITS_PER_SAMPLE_NONE for individual item optional int32 bits_per_sample = 5; // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in // BluetoothCodecConfig // Default: empty and CHANNEL_MODE_NONE for individual item optional int32 channel_mode = 6; // Codec specific values // Default 0 optional int64 codec_specific_1 = 7; optional int64 codec_specific_2 = 8; optional int64 codec_specific_3 = 9; optional int64 codec_specific_4 = 10; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 11; } /** * Logs when A2DP failed to read from PCM source. * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. * * Logged from: * system/bt */ message BluetoothA2dpAudioUnderrunReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Encoding interval in nanoseconds // Default: 0 optional int64 encoding_interval_nanos = 2; // Number of bytes of PCM data that could not be read from the source // Default: 0 optional int32 num_missing_pcm_bytes = 3; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 4; } /** * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit * buffer queue is full and we have to drop data * * Logged from: * system/bt */ message BluetoothA2dpAudioOverrunReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Encoding interval in nanoseconds // Default: 0 optional int64 encoding_interval_nanos = 2; // Number of buffers dropped in this event // Each buffer is encoded in one encoding interval and consists of multiple encoded frames // Default: 0 optional int32 num_dropped_buffers = 3; // Number of encoded buffers dropped in this event // Default 0 optional int32 num_dropped_encoded_frames = 4; // Number of encoded bytes dropped in this event // Default: 0 optional int32 num_dropped_encoded_bytes = 5; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 6; } /** * Logs when we receive reports regarding a device's RSSI value * * Logged from: * system/bt */ message BluetoothDeviceRssiReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Connection handle of this connection if available // Range: 0x0000 - 0x0EFF (12 bits) // Default: 0xFFFF if the handle is unknown optional int32 connection_handle = 2; // HCI command status code if this is triggerred by hci_cmd // Default: STATUS_UNKNOWN optional android.bluetooth.hci.StatusEnum hci_status = 3; // BR/EDR // Range: -128 ≤ N ≤ 127 (signed integer) // Units: dB // LE: // Range: -127 to 20, 127 (signed integer) // Units: dBm // Invalid when an out of range value is reported optional int32 rssi = 4; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 5; } /** * Logs when we receive reports regarding how many consecutive failed contacts for a connection * * Logged from: * system/bt */ message BluetoothDeviceFailedContactCounterReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Connection handle of this connection if available // Range: 0x0000 - 0x0EFF (12 bits) // Default: 0xFFFF if the handle is unknown optional int32 connection_handle = 2; // HCI command status code if this is triggerred by hci_cmd // Default: STATUS_UNKNOWN optional android.bluetooth.hci.StatusEnum cmd_status = 3; // Number of consecutive failed contacts for a connection corresponding to the Handle // Range: uint16_t, 0-0xFFFF // Default: 0xFFFFF optional int32 failed_contact_counter = 4; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 5; } /** * Logs when we receive reports regarding the tranmit power level used for a specific connection * * Logged from: * system/bt */ message BluetoothDeviceTxPowerLevelReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Connection handle of this connection if available // Range: 0x0000 - 0x0EFF (12 bits) // Default: 0xFFFF if the handle is unknown optional int32 connection_handle = 2; // HCI command status code if this is triggered by hci_cmd // Default: STATUS_UNKNOWN optional android.bluetooth.hci.StatusEnum hci_status = 3; // Range: -30 ≤ N ≤ 20 // Units: dBm // Invalid when an out of range value is reported optional int32 transmit_power_level = 4; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 5; } /** * Logs when Bluetooth controller failed to reply with command status within a timeout period after * receiving an HCI command from the host * * Logged from: system/bt */ message BluetoothHciTimeoutReported { // HCI command associated with this event // Default: CMD_UNKNOWN optional android.bluetooth.hci.CommandEnum hci_command = 1; } /** * Logs when we receive Bluetooth Link Quality Report event from the controller * See Android Bluetooth HCI specification for more details * * Note: all count and bytes field are counted since last event * * Logged from: system/bt */ message BluetoothQualityReportReported { // Quality report ID // Original type: uint8_t // Default: BQR_ID_UNKNOWN optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; // Packet type of the connection // Original type: uint8_t // Default: BQR_PACKET_TYPE_UNKNOWN optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; // Connection handle of the connection // Original type: uint16_t optional int32 connection_handle = 3; // Performing Role for the connection // Original type: uint8_t optional int32 connection_role = 4; // Current Transmit Power Level for the connection. This value is the same as the controller's // response to the HCI_Read_Transmit_Power_Level HCI command // Original type: uint8_t optional int32 tx_power_level = 5; // Received Signal Strength Indication (RSSI) value for the connection. This value is an // absolute receiver signal strength value // Original type: int8_t optional int32 rssi = 6; // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the // channels used by the link currently // Original type: uint8_t optional int32 snr = 7; // Indicates the number of unused channels in AFH_channel_map // Original type: uint8_t optional int32 unused_afh_channel_count = 8; // Indicates the number of the channels which are interfered and quality is bad but are still // selected for AFH // Original type: uint8_t optional int32 afh_select_unideal_channel_count = 9; // Current Link Supervision Timeout Setting // Unit: N * 0.3125 ms (1 Bluetooth Clock) // Original type: uint16_t optional int32 lsto = 10; // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of // 0x01 (Piconet Clock) // Unit: N * 0.3125 ms (1 Bluetooth Clock) // Original type: uint32_t optional int64 connection_piconet_clock = 11; // The count of retransmission // Original type: uint32_t optional int64 retransmission_count = 12; // The count of no RX // Original type: uint32_t optional int64 no_rx_count = 13; // The count of NAK (Negative Acknowledge) // Original type: uint32_t optional int64 nak_count = 14; // Controller timestamp of last TX ACK // Unit: N * 0.3125 ms (1 Bluetooth Clock) // Original type: uint32_t optional int64 last_tx_ack_timestamp = 15; // The count of Flow-off (STOP) // Original type: uint32_t optional int64 flow_off_count = 16; // Controller timestamp of last Flow-on (GO) // Unit: N * 0.3125 ms (1 Bluetooth Clock) // Original type: uint32_t optional int64 last_flow_on_timestamp = 17; // Buffer overflow count (how many bytes of TX data are dropped) since the last event // Original type: uint32_t optional int64 buffer_overflow_bytes = 18; // Buffer underflow count (in byte) since last event // Original type: uint32_t optional int64 buffer_underflow_bytes = 19; } /** * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack * * Notes: * - Each event can be partially filled as we might learn different pieces of device * information at different time * - Multiple device info events can be combined to give more complete picture * - When multiple device info events tries to describe the same information, the * later one wins * * Logged from: * packages/apps/Bluetooth */ message BluetoothDeviceInfoReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Where is this device info obtained from optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; // Name of the data source // For EXTERNAL: package name of the data source // For INTERNAL: null for general case, component name otherwise optional string source_name = 3; // Name of the manufacturer of this device optional string manufacturer = 4; // Model of this device optional string model = 5; // Hardware version of this device optional string hardware_version = 6; // Software version of this device optional string software_version = 7; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 8; } /** * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote * device, as documented by the Bluetooth Core HCI specification * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification * Vol 2, Part E, Page 1118 * * Logged from: * system/bt */ message BluetoothRemoteVersionInfoReported { // Connection handle of the connection // Original type: uint16_t optional int32 connection_handle = 1; // HCI command status code // Default: STATUS_UNKNOWN optional android.bluetooth.hci.StatusEnum hci_status = 2; // 1 byte Version of current LMP in the remote controller optional int32 lmp_version = 3; // 2 bytes LMP manufacturer code of the remote controller // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers optional int32 lmp_manufacturer_code = 4; // 4 bytes subversion of the LMP in the remote controller optional int32 lmp_subversion = 5; } /** * Logs when certain Bluetooth SDP attributes are discovered * Constant definitions are from: * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery * * Current logged attributes: * - BluetoothProfileDescriptorList * - Supported Features Bitmask * * Logged from: * system/bt */ message BluetoothSdpAttributeReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes // Original type: uint16_t optional int32 protocol_uuid = 2; // Short form UUIDs used to identify Bluetooth SDP attribute types // Original type: uint16_t optional int32 attribute_id = 3; // Attribute value for the particular attribute optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 5; } /** * Logs when bond state of a Bluetooth device changes * * Logged from: * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java */ message BluetoothBondStateChanged { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Preferred transport type to remote dual mode device // Default: TRANSPORT_AUTO means no preference optional android.bluetooth.TransportTypeEnum transport = 2; // The type of this Bluetooth device (Classic, LE, or Dual mode) // Default: UNKNOWN optional android.bluetooth.DeviceTypeEnum type = 3; // Current bond state (NONE, BONDING, BONDED) // Default: BOND_STATE_UNKNOWN optional android.bluetooth.BondStateEnum bond_state = 4; // Bonding sub state // Default: BOND_SUB_STATE_UNKNOWN optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; // Unbond Reason // Default: UNBOND_REASON_UNKNOWN optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 7; } /** * Logs there is an event related Bluetooth classic pairing * * Logged from: * system/bt */ message BluetoothClassicPairingEventReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Connection handle of this connection if available // Range: 0x0000 - 0x0EFF (12 bits) // Default: 0xFFFF if the handle is unknown optional int32 connection_handle = 2; // HCI command associated with this event // Default: CMD_UNKNOWN optional android.bluetooth.hci.CommandEnum hci_cmd = 3; // HCI event associated with this event // Default: EVT_UNKNOWN optional android.bluetooth.hci.EventEnum hci_event = 4; // HCI command status code if this is triggerred by hci_cmd // Default: STATUS_UNKNOWN optional android.bluetooth.hci.StatusEnum cmd_status = 5; // HCI reason code associated with this event // Default: STATUS_UNKNOWN optional android.bluetooth.hci.StatusEnum reason_code = 6; // A status value related to this specific event // Default: 0 optional int64 event_value = 7; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 8; } /** * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) * * Logged from: * system/bt */ message BluetoothSmpPairingEventReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // SMP command sent or received over L2CAP // Default: CMD_UNKNOWN optional android.bluetooth.smp.CommandEnum smp_command = 2; // Whether this command is sent or received // Default: DIRECTION_UNKNOWN optional android.bluetooth.DirectionEnum direction = 3; // SMP failure reason code // Default: PAIRING_FAIL_REASON_DEFAULT optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 5; } /** * Logs when a Bluetooth socket’s connection state changed * * Logged from: * system/bt */ message BluetoothSocketConnectionStateChanged { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if this is a server listener socket optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Temporary port of this socket for the current connection or session only // Default 0 when unknown or don't care optional int32 port = 2; // Socket type as mentioned in // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java // Default: SOCKET_TYPE_UNKNOWN optional android.bluetooth.SocketTypeEnum type = 3; // Socket connection state // Default: SOCKET_CONNECTION_STATE_UNKNOWN optional android.bluetooth.SocketConnectionstateEnum state = 4; // Number of bytes sent to remote device during this connection optional int64 tx_bytes = 5; // Number of bytes received from remote device during this connection optional int64 rx_bytes = 6; // Socket owner's UID optional int32 uid = 7 [(is_uid) = true]; // Server port of this socket, if any. When both |server_port| and |port| fields are populated, // |port| must be spawned by |server_port| // Default 0 when unknown or don't care optional int32 server_port = 8; // Whether this is a server listener socket optional android.bluetooth.SocketRoleEnum is_server = 9; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 10; } /** * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection * * Logged from: * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java * */ message BluetoothClassOfDeviceReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if this is a server listener socket optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Class of Device (CoD) value including both Major, Minor device class and service class // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass // Default: 0 optional int32 class_of_device = 2; // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 3; } /** * Logs when there is a crash in hardware abstraction layer (HAL) * * Logged from: * system/bt * */ message BluetoothHALCrashReasonReported { // An identifier that can be used to match events for this device. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired devices, it stays consistent between Bluetooth toggling for the // same remote device. // For unpaired devices, it stays consistent within the same Bluetooth adapter // session for the same remote device. // Default: 0 if the device's metric id is unknown. optional int32 metric_id = 1; // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value // Hash algorithm: HMAC-SHA256 // Size: 32 byte // Default: null or empty if the device identifier is not known optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; // Bluetooth HAL crash reason error code. // Original type: uint8_t // Default: 0x00 (DEFAULT) optional int32 error_code = 3; // Bluetooth HAL crash reason vendor error code. // Original type: uint8_t // Default: 0x00 (DEFAULT) optional int32 vendor_error_code = 4; } /* Logs input device information when input device is registered with Android device. * Reported at when a new input device is found by EventHub. * * Logged from: * frameworks/native/services/inputflinger */ message InputDeviceRegistered { // The Input Device Name optional string name = 1; // The Input Device Vendor ID optional int32 vendor_id = 2; // The Input Device Product ID optional int32 product_id = 3; // The Input Device Version ID optional int32 version_id = 4; // The Input Device Bus ID optional int32 bus_id = 5; // The Input Device identifier generated from kernel device. // Hash algorithm: HMAC-SHA256 optional string obfuscated_id = 6; // The Input Device Classes optional int32 device_classes = 7; } /** * Logs when something is plugged into or removed from the USB-C connector. * * Logged from: * UsbService */ message UsbConnectorStateChanged { enum State { STATE_DISCONNECTED = 0; STATE_CONNECTED = 1; } 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; } /** * Logs the reported speaker impedance. * * Logged from: * Vendor audio implementation. */ message SpeakerImpedanceReported { optional int32 speaker_location = 1; optional int32 impedance = 2; } /** * Logs the report of a failed hardware. * * Logged from: * Vendor HALs. * */ message HardwareFailed { enum HardwareType { HARDWARE_FAILED_UNKNOWN = 0; HARDWARE_FAILED_MICROPHONE = 1; HARDWARE_FAILED_CODEC = 2; HARDWARE_FAILED_SPEAKER = 3; HARDWARE_FAILED_FINGERPRINT = 4; } optional HardwareType hardware_type = 1; /** * hardware_location allows vendors to differentiate between multiple instances of * the same hardware_type. The specific locations are vendor defined integers, * referring to board-specific numbering schemes. */ optional int32 hardware_location = 2; /** * failure_code is specific to the HardwareType of the failed hardware. * It should use one of the enum values defined below. */ enum HardwareErrorCode { UNKNOWN = 0; COMPLETE = 1; SPEAKER_HIGH_Z = 2; SPEAKER_SHORT = 3; FINGERPRINT_SENSOR_BROKEN = 4; FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; DEGRADE = 6; } optional int32 failure_code = 3; } /** * Log an event when the device has been physically dropped. * Reported from the /vendor partition. */ message PhysicalDropDetected { // Confidence that the event was actually a drop, 0 -> 100 optional int32 confidence_pctg = 1; // Peak acceleration of the drop, in 1/1000s of a g. optional int32 accel_peak_thousandths_g = 2; // Duration of freefall in ms optional int32 freefall_time_millis = 3; } /** * Log bucketed battery charge cycles. * * Each bucket represents cycles of the battery past * a given charge point. For example, if 10 cycle buckets are * initialized, bucket 1 is the lowest 1/10th of the battery, * and bucket 10 is 100%. * * Logged from: * /sys/class/power_supply/bms/cycle_count, via Vendor. */ message ChargeCyclesReported { optional int32 cycle_bucket_1 = 1; optional int32 cycle_bucket_2 = 2; optional int32 cycle_bucket_3 = 3; optional int32 cycle_bucket_4 = 4; optional int32 cycle_bucket_5 = 5; optional int32 cycle_bucket_6 = 6; optional int32 cycle_bucket_7 = 7; optional int32 cycle_bucket_8 = 8; optional int32 cycle_bucket_9 = 9; optional int32 cycle_bucket_10 = 10; } /** * Log battery health snapshot. * * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level * are snapshotted periodically over 24hrs. */ message BatteryHealthSnapshot { enum BatterySnapshotType { UNKNOWN = 0; MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. } optional BatterySnapshotType type = 1; // Temperature, in 1/10ths of degree C. optional int32 temperature_deci_celsius = 2; // Voltage Battery Voltage, in microVolts. optional int32 voltage_micro_volt = 3; // Current Battery current, in microAmps. optional int32 current_micro_amps = 4; // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. optional int32 open_circuit_micro_volt = 5; // Resistance Battery Resistance, in microOhms. optional int32 resistance_micro_ohm = 6; // Level Battery Level, as % of full. optional int32 level_percent = 7; } /** * Log slow I/O operations on the primary storage. */ message SlowIo { // Classifications of IO Operations. enum IoOperation { UNKNOWN = 0; READ = 1; WRITE = 2; UNMAP = 3; SYNC = 4; } optional IoOperation operation = 1; // The number of slow IO operations of this type over 24 hours. optional int32 count = 2; } /** * Log battery caused shutdown with the last recorded voltage. */ message BatteryCausedShutdown { // The last recorded battery voltage prior to shutdown. optional int32 last_recorded_micro_volt = 1; } /** * Logs when ThermalService receives throttling events. * * Logged from: * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java */ message ThermalThrottlingSeverityStateChanged { // The type of temperature being reported (CPU, GPU, SKIN, etc) optional android.os.TemperatureTypeEnum sensor_type = 1; // The name of the temperature source. Eg. CPU0 optional string sensor_name = 2; // Temperature in tenths of a degree C. // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. optional int32 temperature_deci_celsius = 3; // Relative severity of the throttling, see enum definition. optional android.os.ThrottlingSeverityEnum severity = 4; } /** * Logs the duration of a davey (jank of >=700ms) when it occurs * * Logged from: * frameworks/base/libs/hwui/JankTracker.cpp */ message DaveyOccurred { // The UID that logged this atom. optional int32 uid = 1 [(is_uid) = true]; // Amount of time it took to render the frame. Should be >=700ms. optional int64 jank_duration_millis = 2; } /** * Logs phone signal strength changes. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message PhoneSignalStrengthChanged { // Signal strength, from frameworks/proto_logging/stats/enums/telephony/enums.proto. optional android.telephony.SignalStrengthEnum signal_strength = 1; } /** * Logs when the phone state, sim state or signal strength changes * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message PhoneServiceStateChanged { optional android.telephony.ServiceStateEnum state = 1; optional android.telephony.SimStateEnum sim_state = 2; optional android.telephony.SignalStrengthEnum signal_strength = 3; } /** * Logs when the phone becomes on or off. * * Logged from: * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java */ message PhoneStateChanged { enum State { OFF = 0; ON = 1; } optional State state = 1; } 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; // 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 [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) // The score between 0 and 1 which is the prediction output for the Back Gesture model. optional float ml_model_score = 10; optional string package_name = 11; // The name of the top 100 most used package by all users. enum WindowHorizontalLocation { DEFAULT_LOCATION = 0; LEFT = 1; RIGHT = 2; } optional WindowHorizontalLocation x_location = 3 [deprecated = true]; } message ExclusionRectStateChanged { optional string component_name = 1; // if not available, simply packageName optional int32 requested_height = 2; // px optional int32 rejected_height = 3; // px enum WindowHorizontalLocation { DEFAULT_LOCATION = 0; LEFT = 1; RIGHT = 2; } optional WindowHorizontalLocation x_location = 4; optional bool landscape = 5; optional bool splitscreen = 6; 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 [deprecated = true]; optional android.stats.launcher.LauncherState src_state = 2; optional android.stats.launcher.LauncherState dst_state = 3; optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES, deprecated = true]; optional bool is_swipe_up_enabled = 5 [deprecated = true]; // The event id (e.g., app launch, drag and drop, long press) optional int32 event_id = 6; // The event's source or target id (e.g., icon, task, button) optional int32 target_id = 7; // If the target needs to be tracked, use this id field optional int32 instance_id = 8; optional int32 uid = 9 [(is_uid) = true]; optional string package_name = 10; optional string component_name = 11; // (x, y) coordinate and the index information of the target on the container optional int32 grid_x = 12 [default = -1]; optional int32 grid_y = 13 [default = -1]; optional int32 page_id = 14 [default = -2]; // e.g., folder icon's (x, y) location and index information on the workspace optional int32 grid_x_parent = 15 [default = -1]; optional int32 grid_y_parent = 16 [default = -1]; optional int32 page_id_parent = 17 [default = -2]; // e.g., SEARCHBOX_ALLAPPS, FOLDER_WORKSPACE optional int32 hierarchy = 18; optional bool is_work_profile = 19; // Used to store the predicted rank of the target optional int32 rank = 20 [default = -1]; // e.g., folderLabelState can be captured in the following two fields optional int32 from_state = 21; optional int32 to_state = 22; // e.g., autofilled or suggested texts that are not user entered optional string edittext = 23; // e.g., number of contents inside a container (e.g., icons inside a folder) optional int32 cardinality = 24; // Used to store features of the target (e.g. widget is reconfigurable, etc) optional int32 features = 25; } message SmartSpaceCardReported { // Different SmartSpace cards. enum CardType { UNKNOWN_CARD = 0; COMMUTE = 1; CALENDAR = 2; FLIGHT = 3; WEATHER = 4; WEATHER_ALERT = 5; AT_A_STORE_SHOPPING_LIST = 6; AT_A_STORE_LOYALTY_CARD = 7; HEADPHONE_RESUME_MEDIA = 8; HEADPHONE_MEDIA_RECOMMENDATIONS = 9; TIMER = 10; STOPWATCH = 11; FITNESS_ACTIVITY = 12; UPCOMING_REMINDER = 13; UPCOMING_BEDTIME = 14; TIME_TO_LEAVE = 15; PACKAGE_DELIVERED = 16; TIPS = 17; DOORBELL = 18; CROSS_DEVICE_TIMER = 19; } // The surface that SmartSpace card is shown. enum DisplaySurface { DEFAULT_SURFACE = 0; HOMESCREEN = 1; LOCKSCREEN = 2; AOD = 3; SHADE = 4; } // The event id (e.g., impression, click, longpress, dismiss) optional int32 event_id = 1; // Uniquely identifies a card. Should persist through updates. optional int32 instance_id = 2; // Uniquely identifies one of the possible types of the SmartSpace cards. // Deprecated. Please read card_type_id instead. optional CardType card_type = 3 [deprecated = true]; // Location of the card when the event occurred. optional DisplaySurface display_surface = 4; // The position of the card in the carousel when the event occurred. optional int32 rank = 5; // The number of cards shown to the user. optional int32 cardinality = 6; // Uniquely identifies one of the possible types of the SmartSpace cards. // To replace card_type. See go/smartspace-aster-metrics#card-type-id. optional int32 card_type_id = 7; // The app that the Smartspace card is tied to. optional int32 uid = 8 [(is_uid) = true]; // If multiple subcards are displayed simultaneously, the position of // the subcard that was interacted with. optional int32 interacted_subcard_rank = 9; // If multiple subcards are displayed simultaneously, the number of subcards // shown when the interaction occurred. optional int32 interacted_subcard_cardinality = 10; // The time it takes in ms from smartspace target is created to sysui receives // the target. optional int32 received_latency_millis = 11; } /** * 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]; // Used to store features of the target (e.g. widget is reconfigurable, etc) optional int32 features = 19; } /** * Used for logging launcher static elements using pulled atom. * * Logged from: * packages/apps/Launcher3 */ message LauncherLayoutSnapshot { // 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 item_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 container_id = 13; optional bool is_work_profile = 14; // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION optional int32 attribute_id = 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; optional int32 font_package_hash = 3; optional int32 shape_package_hash = 4; optional int32 clock_package_hash = 5; optional int32 launcher_grid = 6; optional int32 wallpaper_category_hash = 7; optional int32 wallpaper_id_hash = 8; optional int32 color_preference = 9; optional android.stats.style.LocationPreference location_preference = 10; optional android.stats.style.DatePreference date_preference = 11; optional android.stats.style.LaunchedPreference launched_preference = 12; } /** * Logs when Settings UI has changed. * * Logged from: * packages/apps/Settings */ message SettingsUIChanged { /** * Where this SettingsUIChange event comes from. For example, if * it's a PAGE_VISIBLE event, where the page is opened from. */ optional android.app.settings.PageId attribution = 1; /** * What the UI action is. */ optional android.app.settings.Action action = 2; /** * Where the action is happening */ optional android.app.settings.PageId page_id = 3; /** * What preference changed in this event. */ optional string changed_preference_key = 4; /** * The new value of the changed preference. */ optional int64 changed_preference_int_value = 5; } /** * Logs basic timing information about touch events. * Reported at most every 5 minutes while device is being interacted with. * * Logged from: * frameworks/native/services/inputflinger */ message TouchEventReported { /** * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, * and the standard deviation of the time spent processing touchscreen events * in the kernel and inputflinger. The units are microseconds. * * 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; // Maximum value optional float latency_max_micros = 2; // Average value optional float latency_mean_micros = 3; // Standard deviation optional float latency_stdev_micros = 4; // Number of touch events (input_event) in this report optional int32 count = 5; } /** * Logs slow input events. * The reports are rate-limited via a configurable server flag. * * Logged from: * frameworks/native/services/inputflinger */ message SlowInputEventReported { /** * This is logged when a slow input event occurs. The threshold for what is considered a slow * event is applied to the 'end_to_end' latency number, and is configurable via a server flag. * * The goal of this data is to identify the bottlenecks in processing of input events. * All of the *_micros fields below are durations. The start and end points for each value * are described in the comments. */ // Whether or not this is a DOWN event. If false, this is a MOVE event optional bool is_down = 1; // Start: the input event was created (touch events: the touch interrupt received in the driver) // End: the event was read in userspace (in EventHub) optional int32 event_to_read_micros = 2; // Start: the event was read in EventHub // End: the event was send to the app via the InputChannel (written to the socket) optional int32 read_to_deliver_micros = 3; // Start: the input event was sent to the app // End: the app consumed the input event optional int32 deliver_to_consume_micros = 4; // Start: the app consumed the event // End: the app's 'finishInputEvent' call was received in inputflinger // The end point can also be called "the app finished processing input event" optional int32 consume_to_finish_micros = 5; // Start: the app consumed the input event // End: the app produced a buffer optional int32 consume_to_gpu_complete_micros = 6; // Start: the app produced a buffer // End: the frame was shown on the display optional int32 gpu_complete_to_present_micros = 7; // The end-to-end touch latency // Start: the input event was created (touch events: the touch interrupt received in the driver) // End: the frame was presented on the display optional int32 end_to_end_micros = 8; // Since the last time this atom was reported, how many total events occurred? optional int32 num_events_since_last_report = 9; // Since the last time this atom was reported, how many slow events did not get reported // due to rate limiting? optional int32 num_skipped_slow_events_since_last_report = 10; } /** * Logs gesture classification and timing information for touch events. * * Logged from: * frameworks/base/core/java/android/view/GestureDetector.java * frameworks/base/core/java/android/view/View.java */ message TouchGestureClassified { // The source of the classification (e.g. Java class name). optional string source = 1; enum Classification { UNKNOWN_CLASSIFICATION = 0; SINGLE_TAP = 1; DOUBLE_TAP = 2; LONG_PRESS = 3; DEEP_PRESS = 4; SCROLL = 5; } // The classification of the gesture. optional Classification classification = 2; // The interval from the start of a touch event stream until the // classification was made. optional int32 latency_millis = 3; // The distance from the location of the first touch event to the // location of the touch event when the classification was made. optional float displacement_px = 4; } /** * Logs that a setting was updated. * Logged from: * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java * The tag and is_default allow resetting of settings to default values based on the specified * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. */ message SettingChanged { // The name of the setting. optional string setting = 1; // The change being imposed on this setting. May represent a number, eg "3". optional string value = 2; // The new value of this setting. For most settings, this is same as value. For some settings, // value is +X or -X where X represents an element in a set. For example, if the previous value // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. // The +/- feature is currently only used for location_providers_allowed. optional string new_value = 3; // The previous value of this setting. optional string prev_value = 4; // The tag used with the is_default for resetting sets of settings. This is generally null. optional string tag = 5; // True if this setting with tag should be resettable. optional bool is_default = 6; // The associated user (for multi-user feature). Defined in android/os/UserHandle.java optional int32 user = 7; enum ChangeReason { UPDATED = 1; // Updated can be an insertion or an update. DELETED = 2; } optional ChangeReason reason = 8; } /** * Logs activity going to foreground or background * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java */ message ActivityForegroundStateChanged { optional int32 uid = 1 [(is_uid) = true]; optional string pkg_name = 2; optional string class_name = 3; enum State { BACKGROUND = 0; FOREGROUND = 1; } optional State state = 4; } /** * Logs when a volume entered low Storage state. * Logged from: * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java */ message LowStorageStateChanged { // Volume that ran out of storage. optional string volume_description = 1; enum State { UNKNOWN = 0; OFF = 1; ON = 2; } optional State state = 2; } /** * Logs when an app is downgraded. * Logged from: * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java */ message AppDowngraded { optional string package_name = 1; // Size of the package (all data) before being downgraded. optional int64 size_in_bytes_before = 2; // Size of the package (all data) after being downgraded. optional int64 size_in_bytes_after = 3; optional bool aggressive = 4; } /** * Logs when an app is optimized after being downgraded. * Logged from: * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java */ message AppOptimizedAfterDowngraded { optional string package_name = 1; } /** * Logs whenever an app is installed on external storage. * Logged from: frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java */ message AppInstallOnExternalStorageReported { // The type of external storage. optional android.stats.storage.ExternalStorageType storage_type = 1; // The name of the package that is installed on the sd card. optional string package_name = 2; } /** * Logs when an app crashes. * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message AppCrashOccurred { optional int32 uid = 1 [(is_uid) = true]; optional string event_type = 2; // The name of the process. // system_server if it is not by an app optional string process_name = 3; // The pid if available. -1 means not available. optional int32 pid = 4; optional string package_name = 5; enum InstantApp { UNAVAILABLE = 0; FALSE = 1; TRUE = 2; } optional InstantApp is_instant_app = 6; enum ForegroundState { UNKNOWN = 0; BACKGROUND = 1; FOREGROUND = 2; } optional ForegroundState foreground_state = 7; optional android.server.ErrorSource error_source = 8; optional bool is_incremental = 9; optional float loading_progress = 10; optional int64 millis_since_oldest_pending_read = 11; // Status code to represent the health of the file system backing storage, as defined in // frameworks/base/core/java/android/os/incremental/IStorageHealthListener.aidl. // Value -1 if the app is not installed on Incremental optional int32 storage_health_code = 12; // Status code to represent the status of data loader, as defined in // frameworks/base/core/java/android/content/pm/IDataLoaderStatusListener.aidl. // Value -1 if the app is not installed on Incremental optional int32 data_loader_status_code = 13; // Whether read logs collection is enabled optional bool read_logs_enabled = 14; // Duration since last attempt to bind data loader. 0 means did not attempt to bind. // -1 means the app is not installed on Incremental. optional int64 millis_since_last_data_loader_bind = 15; // Delay for retrying to bind data loader. If not bound, it shows how soon it will be bound. optional int64 data_loader_bind_delay_millis = 16; // Total count of delayed reads, as reported by Incremental File System. optional int32 total_delayed_reads = 17; // Total count of failed reads (timeout or hash errors) as reported by Incremental File System. optional int32 total_failed_reads = 18; // UID of the process that tried to read a page from the app but failed. // This shows whether the read was initiated by the system, the app itself, or some other apps. // -1 means there was no read error or the app is not installed on Incremental. optional int32 last_read_error_uid = 19; // Duration since that last read failure. // -1 means there was no read error or the app is not installed on Incremental. optional int64 last_read_error_millis_since = 20; // Error code of last read failure. ETIME (value=62) for timeout, EBADMSG (value=74) for hash // and other positive values for other errors. -1 means app is not installed on Incremental. optional int32 last_read_error_code = 21; // Total duration of delayed reads in milliseconds optional int64 total_delayed_reads_duration_millis = 22; } /** * Logs when a WTF (What a Terrible Failure) happened. * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message WTFOccurred { optional int32 uid = 1 [(is_uid) = true]; optional string tag = 2; // The name of the process. // system_server if it is not by an app optional string process_name = 3; // The pid if available. -1 means not available. optional int32 pid = 4; optional android.server.ErrorSource error_source = 5; } /** * Logs when system server reports low memory. * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message LowMemReported { } /** * Logs when an app ANR (App Not Responding) occurs. * Logged from: * frameworks/base/services/core/java/com/android/server/am/AppErrors.java */ message ANROccurred { optional int32 uid = 1 [(is_uid) = true]; optional string process_name = 2; optional string short_component_name = 3; optional string reason = 4; enum InstantApp { UNAVAILABLE = 0; FALSE = 1; TRUE = 2; } optional InstantApp is_instant_app = 5; enum ForegroundState { UNKNOWN = 0; BACKGROUND = 1; FOREGROUND = 2; } optional ForegroundState foreground_state = 6; optional android.server.ErrorSource error_source = 7; optional string package_name = 8; optional bool is_incremental = 9; optional float loading_progress = 10; optional int64 millis_since_oldest_pending_read = 11; // Status code to represent the health of the file system backing storage, as defined in // frameworks/base/core/java/android/os/incremental/IStorageHealthListener.aidl. // Value -1 if the app is not installed on Incremental optional int32 storage_health_code = 12; // Status code to represent the status of data loader, as defined in // frameworks/base/core/java/android/content/pm/IDataLoaderStatusListener.aidl. // Value -1 if the app is not installed on Incremental optional int32 data_loader_status_code = 13; // Whether read logs collection is enabled optional bool read_logs_enabled = 14; // Duration since last attempt to bind data loader. 0 means did not attempt to bind. // -1 means the app is not installed on Incremental. optional int64 millis_since_last_data_loader_bind = 15; // Delay for retrying to bind data loader. If not bound, it shows how soon it will be bound. optional int64 data_loader_bind_delay_millis = 16; // Total count of delayed reads, as reported by Incremental File System. optional int32 total_delayed_reads = 17; // Total count of failed reads (timeout or hash errors) as reported by Incremental File System. optional int32 total_failed_reads = 18; // UID of the process that tried to read a page from the app but failed. // This shows whether the read was initiated by the system, the app itself, or some other apps. // -1 means there was no read error or the app is not installed on Incremental. optional int32 last_read_error_uid = 19; // Duration since that last read failure. // -1 means there was no read error or the app is not installed on Incremental. optional int64 last_read_error_millis_since = 20; // Error code of last read failure. ETIME (value=62) for timeout, EBADMSG (value=74) for hash // and other positive values for other errors. -1 means app is not installed on Incremental. optional int32 last_read_error_code = 21; // Total duration of delayed reads in milliseconds optional int64 total_delayed_reads_duration_millis = 22; } /** * Logs immediately after an app ANR (App Not Responding) occurs. In contrast, ANROccurred (the * atom above) logs some time (not necessarily immediately) after the ANR is detected. * Logged from: * frameworks/base/services/core/java/com/android/server/am/AppErrors.java */ message ANROccurredProcessingStarted { optional string process_name = 1; } /** * Logs when the vibrator state changes. * Logged from: * frameworks/base/services/core/java/com/android/server/VibratorService.java */ message VibratorStateChanged { repeated AttributionNode attribution_node = 1; enum State { OFF = 0; ON = 1; } optional State state = 2; // Duration (in milliseconds) requested to keep the vibrator on. // Only applicable for State == ON. optional int64 duration_millis = 3; } /* * Allows other apps to push events into statsd. * Logged from: * frameworks/base/core/java/android/util/StatsLog.java */ message AppBreadcrumbReported { // The uid of the application that sent this custom atom. optional int32 uid = 1 [(is_uid) = true]; // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). optional int32 label = 2; // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom // predicates for the metrics). enum State { UNKNOWN = 0; UNSPECIFIED = 1; // For events that are known to not represent START/STOP. STOP = 2; START = 3; } optional State state = 3; } /** * Logs the wall-clock time when a significant wall-clock time shift occurs. * For example, this could be due to the user manually changing the time. * * Logged from: * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java */ message WallClockTimeShifted { // New wall-clock time in milliseconds, according to System.currentTimeMillis(). optional int64 wall_clock_timestamp_millis = 1; } /** * Logs when statsd detects an anomaly. * * Logged from: * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp */ message AnomalyDetected { // Uid that owns the config whose anomaly detection alert fired. optional int32 config_uid = 1 [(is_uid) = true]; // Id of the config whose anomaly detection alert fired. optional int64 config_id = 2; // Id of the alert (i.e. name of the anomaly that was detected). optional int64 alert_id = 3; } message AppStartOccurred { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The app package name. optional string pkg_name = 2; enum TransitionType { UNKNOWN = 0; WARM = 1; HOT = 2; COLD = 3; RELAUNCH = 4; } // The transition type. optional TransitionType type = 3; // The activity name. optional string activity_name = 4; // The name of the calling app. Empty if not set. optional string calling_pkg_name = 5; // Whether the app is an instant app. optional bool is_instant_app = 6; // Device uptime when activity started. Deprecated: use activity_start_timestamp_millis instead. optional int64 activity_start_millis = 7 [deprecated = true]; optional android.app.AppTransitionReasonEnum reason = 8; optional int32 transition_delay_millis = 9; // -1 if not set. optional int32 starting_window_delay_millis = 10; // -1 if not set. optional int32 bind_application_delay_millis = 11; optional int32 windows_drawn_delay_millis = 12; // Empty if not set. optional string launch_token = 13; // The reason why the package was optimized. optional int32 package_optimization_compilation_reason = 14; // The compiler filter used when when the package was optimized. optional int32 package_optimization_compilation_filter = 15; enum SourceType { UNAVAILABLE = 0; LAUNCHER = 1; NOTIFICATION = 2; LOCKSCREEN = 3; RECENTS_ANIMATION = 4; } // The type of the startup source. optional SourceType source_type = 16; // The time from the startup source to the beginning of handling the startup event. // -1 means not available. optional int32 source_event_delay_millis = 17; // Whether the app is hibernating when it started optional bool is_hibernating = 18; // Whether the app is installed on Incremental File System. optional bool is_incremental = 19; // Whether the app is still being streamed. optional bool is_loading = 20; // The hash value of the activity name. optional int32 activity_name_hash = 21; // The timestamp(SystemClock#elapsedRealtime()) when starting activity. optional int64 activity_start_timestamp_millis = 22; } message AppStartCanceled { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The app package name. optional string pkg_name = 2; enum TransitionType { UNKNOWN = 0; WARM = 1; HOT = 2; COLD = 3; RELAUNCH = 4; } // The transition type. optional TransitionType type = 3; // The activity name. optional string activity_name = 4; } message AppStartFullyDrawn { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The app package name. optional string pkg_name = 2; enum TransitionType { UNKNOWN = 0; WITH_BUNDLE = 1; WITHOUT_BUNDLE = 2; } // The transition type. optional TransitionType type = 3; // The activity name. optional string activity_name = 4; optional bool transition_process_running = 5; // App startup time (until call to Activity#reportFullyDrawn()). optional int64 app_startup_time_millis = 6; // The reason why the package was optimized. optional int32 package_optimization_compilation_reason = 7; // The compiler filter used when when the package was optimized. optional int32 package_optimization_compilation_filter = 8; enum SourceType { UNAVAILABLE = 0; LAUNCHER = 1; NOTIFICATION = 2; LOCKSCREEN = 3; } // The type of the startup source. optional SourceType source_type = 9; // The time from the startup source to the beginning of handling the startup event. // -1 means not available. optional int32 source_event_delay_millis = 10; // Whether the app is installed on Incremental File System. optional bool is_incremental = 11; // Whether the app is still being streamed. optional bool is_loading = 12; // The hash value of the activity name. optional int32 activity_name_hash = 13; } /** * Logs when an app enters a different App Compat state. * * Logged from: * frameworks/base/services/core/java/com/android/server/wm/ActivityMetricsLogger.java */ message AppCompatStateChanged { // UID of the package whose state changed. optional int32 uid = 1 [(is_uid) = true]; enum State { UNKNOWN = 0; // The app is not visible or has been closed. NOT_VISIBLE = 1; // The app’s bounds aren’t letterboxed. NOT_LETTERBOXED = 2; // The app’s bounds are letterboxed because of size-compat-mode. LETTERBOXED_FOR_SIZE_COMPAT_MODE = 3; // The app’s bounds are letterboxed because of fixed orientation. LETTERBOXED_FOR_FIXED_ORIENTATION = 4; // The app’s bounds are letterboxed because of aspect ratio restrictions. LETTERBOXED_FOR_ASPECT_RATIO = 5; } // The state that was entered. optional State state = 2 [ (state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** * Logs events reported for the Size Compat restart button of an app. * * Logged from: * frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java */ message SizeCompatRestartButtonEventReported { // UID of the package that has the button. optional int32 uid = 1 [(is_uid) = true]; enum Event { UNKNOWN = 0; APPEARED = 1; CLICKED = 2; } // The event that was reported. optional Event event = 2; } /** * Logs events reported for the Camera App Compat control, which is used to * correct stretched viewfinder in apps that don't handle all possible * configurations, and changes between them, correctly. * * Logged from: * frameworks/base/services/core/java/com/android/server/wm/ActivityMetricsLogger.java */ message CameraCompatControlEventReported { // UID of the package that has the control. optional int32 uid = 1 [(is_uid) = true]; enum Event { UNKNOWN = 0; // Button to apply the treatment appeared. APPEARED_APPLY_TREATMENT = 1; // Button to revert the treatment appeared. APPEARED_REVERT_TREATMENT = 2; // Users clicked on the button to apply the treatment. CLICKED_APPLY_TREATMENT = 3; // Users clicked on the button to revert the treatment. CLICKED_REVERT_TREATMENT = 4; // Users clicked on the button to dismiss the control. CLICKED_DISMISS = 5; } // The event that was reported. optional Event event = 2; } /** * Logs a picture-in-picture action * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java */ message PictureInPictureStateChanged { // -1 if it is not available optional int32 uid = 1 [(is_uid) = true]; optional string short_name = 2; enum State { ENTERED = 1; EXPANDED_TO_FULL_SCREEN = 2; MINIMIZED = 3; DISMISSED = 4; } optional State state = 3; } /** * Logs overlay action * Logged from: * services/core/java/com/android/server/wm/Session.java */ message OverlayStateChanged { optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true]; optional string package_name = 2 [(state_field_option).primary_field = true]; optional bool using_alert_window = 3; enum State { ENTERED = 1; EXITED = 2; } 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 */ message ForegroundServiceStateChanged { optional int32 uid = 1 [(is_uid) = true]; // package_name + "/" + class_name optional string short_name = 2; enum State { ENTER = 1; EXIT = 2; DENIED = 3; } 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; // the reason why FGS is allowed or denied to start. The reason code is defined as // PowerExemptionManager#ReasonCode. optional int32 fgs_start_reason_code = 5; // FGS service's targetSdkVersion. optional int32 target_sdk_version = 6; // uid of the app that start/bind this service. optional int32 calling_uid = 7; // targetSdkVersion of the app that start/bind this service. optional int32 caller_target_sdk_version = 8; // uid of the app that set the temp-allowlist, INVALID_UID (-1) if not in any // temp-allowlist. optional int32 temp_allow_list_calling_uid = 9; // FGS notification was deferred. optional bool fgs_notification_deferred = 10; // FGS notification was shown before the FGS finishes, or it wasn't deferred in the first place. optional bool fgs_notification_shown = 11; // The duration from state ENTER to state EXIT. Only meaningful when the state is EXIT. optional int32 fgs_duration_ms = 12; // Number of times startForeground() is called on this service. optional int32 fgs_start_count = 13; // SHA-1 hashed short_name combined with ANDROID_ID. optional int32 short_name_hash = 14; } /** * 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; } /** * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky * behavior in its own uid. However, the metrics of these isolated uid's almost always should be * attributed back to the parent (host) uid. One example is Chrome. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message IsolatedUidChanged { // The host UID. Generally, we should attribute metrics from the isolated uid to the host uid. // NOTE: DO NOT annotate uid field in this atom. This atom is specially handled in statsd. // This field is ignored when event == REMOVED. optional int32 parent_uid = 1; optional int32 isolated_uid = 2; // We expect an isolated uid to be removed before if it's used for another parent uid. enum Event { REMOVED = 0; CREATED = 1; } optional Event event = 3; } /* * Logs the reception of an incoming network packet causing the main system to wake up for * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd * and processed by WakeupController.cpp. */ message PacketWakeupOccurred { // The uid owning the socket into which the packet was delivered, or -1 if the packet was // delivered nowhere. optional int32 uid = 1 [(is_uid) = true]; // The interface name on which the packet was received. optional string iface = 2; // The ethertype value of the packet. optional int32 ethertype = 3; // String representation of the destination MAC address of the packet. optional string destination_hardware_address = 4; // String representation of the source address of the packet if this was an IP packet. optional string source_ip = 5; // String representation of the destination address of the packet if this was an IP packet. optional string destination_ip = 6; // The value of the protocol field if this was an IPv4 packet or the value of the Next Header // field if this was an IPv6 packet. The range of possible values is the same for both IP // families. optional int32 ip_next_header = 7; // The source port if this was a TCP or UDP packet. optional int32 source_port = 8; // The destination port if this was a TCP or UDP packet. optional int32 destination_port = 9; } /* * Logs the memory stats for an app on startup. * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message AppStartMemoryStateCaptured { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The process name. optional string process_name = 2; // The activity name. optional string activity_name = 3; // # of page-faults optional int64 page_fault = 4; // # of major page-faults optional int64 page_major_fault = 5; // RSS optional int64 rss_in_bytes = 6; // CACHE optional int64 cache_in_bytes = 7; // SWAP optional int64 swap_in_bytes = 8; } /* * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries * for LMK event. * Logged from: * system/core/lmkd/lmkd.c */ message LmkStateChanged { enum State { UNKNOWN = 0; START = 1; STOP = 2; } optional State state = 1; } /* * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. * Logged from: * system/core/lmkd/lmkd.c */ message LmkKillOccurred { enum Reason { UNKNOWN = 0; PRESSURE_AFTER_KILL = 1; NOT_RESPONDING = 2; LOW_SWAP_AND_THRASHING = 3; LOW_MEM_AND_SWAP = 4; LOW_MEM_AND_THRASHING = 5; DIRECT_RECL_AND_THRASHING = 6; LOW_MEM_AND_SWAP_UTIL = 7; LOW_FILECACHE_AFTER_THRASHING = 8; } // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The process name. optional string process_name = 2; // oom adj score. optional int32 oom_adj_score = 3; // # of page-faults optional int64 page_fault = 4; // # of major page-faults optional int64 page_major_fault = 5; // RSS optional int64 rss_in_bytes = 6; // CACHE optional int64 cache_in_bytes = 7; // SWAP optional int64 swap_in_bytes = 8; // The elapsed real time of start of the process. optional int64 process_start_time_nanos = 9; // Min oom adj score considered by lmkd. optional int32 min_oom_score = 10; // Free physical memory on device at LMK time. optional int32 free_mem_kb = 11; // Free swap on device at LMK time. optional int32 free_swap_kb = 12; // What triggered the LMK event. optional Reason reason = 13; // Current thrashing levels (workingset_refaults/filecache in %). optional int32 thrashing = 14; // Max thrashing levels (workingset_refaults/filecache in %). optional int32 max_thrashing = 15; } /* * Logs when the ActivityManagerService detects that an app died. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message AppDied { // timestamp(elapsedRealtime) of record creation optional uint64 timestamp_millis = 1 [(state_field_option).exclusive_state = true]; } /** * An atom for generic metrics logging. Available from Android Q. */ message GenericAtom { // The uid of the application that sent this custom atom. optional int32 uid = 1 [(is_uid) = true]; // An event_id indicates the type of event. optional android.stats.EventType event_id = 2; } /** * 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 SystemUI Notifications.proto. enum NotificationSection { SECTION_UNKNOWN = 0; SECTION_HEADS_UP = 1; SECTION_MEDIA_CONTROLS = 2; SECTION_PEOPLE = 3; SECTION_ALERTING = 4; SECTION_SILENT = 5; SECTION_FOREGROUND_SERVICE = 6; } 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; // whether or not this channel represents a conversation optional bool is_conversation = 7; // Hash of app-assigned notification conversation id optional int32 conversation_id_hash = 8; // whether or not the user demoted this channel out of the conversation space optional bool is_conversation_demoted = 9; // whether this conversation is marked as being a priority optional bool is_conversation_priority = 10; } /** * Logs when a biometric acquire event occurs. * * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics */ message BiometricAcquired { // Biometric modality that was acquired. optional android.hardware.biometrics.ModalityEnum modality = 1; // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. optional int32 user = 2; // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. optional bool is_crypto = 3; // Action that the device is performing. Acquired messages are only expected for enroll and // authenticate. Other actions may indicate an error. optional android.hardware.biometrics.ActionEnum action = 4; // The client that this acquisition was received for. optional android.hardware.biometrics.ClientEnum client = 5; // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by Manager. optional int32 acquire_info = 6; // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. optional int32 acquire_info_vendor = 7; // Dictates if this message should trigger additional debugging. optional bool debug = 8; // The ID of the biometric sensor associated with this action. optional int32 sensor_id = 9; } /** * Logs when a biometric authentication event occurs. * * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics */ message BiometricAuthenticated { // Biometric modality that was used. optional android.hardware.biometrics.ModalityEnum modality = 1; // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java optional int32 user = 2; // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password // storage. optional bool is_crypto = 3; // The client that this acquisition was received for. optional android.hardware.biometrics.ClientEnum client = 4; // If authentication requires user confirmation. See BiometricPrompt's // setRequireConfirmation(bool) method. optional bool require_confirmation = 5; enum State { UNKNOWN = 0; REJECTED = 1; PENDING_CONFIRMATION = 2; CONFIRMED = 3; } // State of the current auth attempt. optional State state = 6; // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to // CONFIRMED. optional int64 latency_millis = 7; // Dictates if this message should trigger additional debugging. optional bool debug = 8; // The ID of the biometric sensor associated with this action. optional int32 sensor_id = 9; // The ambient light lux when authenticated. optional float ambient_light_lux = 10; } /** * Logs when a biometric error occurs. * * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics */ message BiometricErrorOccurred { // Biometric modality that was used. optional android.hardware.biometrics.ModalityEnum modality = 1; // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java optional int32 user = 2; // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. optional bool is_crypto = 3; // Action that the device is performing. optional android.hardware.biometrics.ActionEnum action = 4; // The client that this acquisition was received for. optional android.hardware.biometrics.ClientEnum client = 5; // Error constants. See constants defined by Manager. Enums won't work since errors // are unique to modality. optional int32 error_info = 6; // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined // by the vendor and not specified by the HIDL interface. optional int32 error_info_vendor = 7; // Dictates if this message should trigger additional debugging. optional bool debug = 8; // Time spent during the authentication attempt. optional int64 latency_millis = 9; // The ID of the biometric sensor associated with this action. optional int32 sensor_id = 10; } /** * Logs when a system health issue is detected. * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics */ message BiometricSystemHealthIssueDetected { // Biometric modality. optional android.hardware.biometrics.ModalityEnum modality = 1; // Type of issue detected. optional android.hardware.biometrics.IssueEnum issue = 2; // Dictates if this message should trigger additional debugging. optional bool debug = 3; // The ID of the biometric sensor associated with this action. optional int32 sensor_id = 4; } /** * Logs when a biometric enrollment occurs. * * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics */ message BiometricEnrolled { // Biometric modality that was used. optional android.hardware.biometrics.ModalityEnum modality = 1; // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java optional int32 user = 2; // The amount of time the enrollment took in milliseconds. optional int64 latency_millis = 3; // Whether or not the enrollment was successful. optional bool success = 4; // The ID of the biometric sensor associated with this action. optional int32 sensor_id = 5; // The ambient light lux when the user enrolled. optional float ambient_light_lux = 6; } /* * Logs when one of the BiometricPrompt#authenticate() method variants is called. * * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics * */ message AuthPromptAuthenticateInvoked { // Whether an explicit CryptoObject was passed to the biometric prompt. optional bool is_crypto = 1; // The value passed to setConfirmationRequired(boolean), or true if not set. optional bool is_confirmation_required = 2; // The value passed to setDeviceCredentialAllowed(boolean), or false if not set. optional bool is_credential_allowed = 3; // Whether a value was passed to setAllowedAuthenticators(int). optional bool is_allowed_authenticators_set = 4; // The value passed to setAllowedAuthenticators(int), if any. optional int32 allowed_authenticators = 5; } /* * Logs when one of the BiometricPrompt#canAuthenticate() method variants is called. * * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics * */ message AuthManagerCanAuthenticateInvoked { // Whether a bit field of allowed authenticator types was provided as an argument. optional bool is_allowed_authenticators_set = 1; // The bit field of allowed authenticator types provided, if any. optional int32 allowed_authenticators = 2; // The authentication status code that was returned. optional int32 result_code = 3; } /* * Logs when Biometric enrollment is requested via the ACTION_BIOMETRIC_ENROLL intent action. * * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics * */ message AuthEnrollActionInvoked { // Whether a Class 3 (strong) biometric was previously enrolled on this device. optional bool is_strong_biometric_enrolled = 1; // Whether a Class 2 (weak) biometric was previously enrolled on this device. optional bool is_weak_biometric_enrolled = 2; // Whether a PIN/pattern/password was previously enrolled on this device. optional bool is_device_credential_enrolled = 3; // Whether a bit field of allowed authenticator types was provided as an extra. optional bool is_allowed_authenticators_set = 4; // The bit field of allowed authenticator types provided, if any. optional int32 allowed_authenticators = 5; } /* * Logs when an application uses a deprecated biometric or authentication API feature. * * Logged from: * frameworks/base/services/core/java/com/android/server/biometrics */ message AuthDeprecatedAPIUsed { enum APIEnum { API_UNKNOWN = 0; // android.hardware.fingerprint.FingerprintManager#authenticate(CryptoObject, // CancellationSignal, int, AuthenticationCallback, Handler) API_FINGERPRINT_MANAGER_AUTHENTICATE = 1; // android.hardware.fingerprint.FingerprintManager#hasEnrolledFingerprints() API_FINGERPRINT_MANAGER_HAS_ENROLLED_FINGERPRINTS = 2; // android.hardware.fingerprint.FingerprintManager#isHardwareDetected() API_FINGERPRINT_MANAGER_IS_HARDWARE_DETECTED = 3; // android.hardware.biometrics.BiometricManager#canAuthenticate() API_BIOMETRIC_MANAGER_CAN_AUTHENTICATE = 4; } // The deprecated API feature that was used. optional APIEnum deprecated_api = 1; // The UID of the application that used the deprecated API. optional int32 app_uid = 2; // The target SDK version (API level) of the application that used the deprecated API. optional int32 target_sdk = 3; } /* * Logs when a flag flip update occurrs. Used for mainline modules that update via flag flips. */ message FlagFlipUpdateOccurred { // If the event is from a flag config package, specify the package name. optional string flag_flip_package_name = 1; // The order id of the package optional int64 order_id = 2; } /** * 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; } /* * Logs when a binary push state changes. * Logged by the installer via public api. */ message BinaryPushStateChanged { // Name of the train. optional string train_name = 1; // Version code for a "train" of packages that need to be installed atomically optional int64 train_version_code = 2; // After installation of this package, device requires a restart. optional bool requires_staging = 3; // Rollback should be enabled for this install. optional bool rollback_enabled = 4; // Requires low latency monitoring if possible. optional bool requires_low_latency_monitor = 5; enum State { UNKNOWN = 0; INSTALL_REQUESTED = 1; INSTALL_STARTED = 2; INSTALL_STAGED_NOT_READY = 3; INSTALL_STAGED_READY = 4; INSTALL_SUCCESS = 5; // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, // and INSTALL_FAILURE_COMMIT. INSTALL_FAILURE = 6 [deprecated = true]; // This enum is for installs that are manually cancelled via the Manual Update UI. INSTALL_CANCELLED = 7; INSTALLER_ROLLBACK_REQUESTED = 8; INSTALLER_ROLLBACK_INITIATED = 9; INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; INSTALLER_ROLLBACK_STAGED = 11; INSTALLER_ROLLBACK_STAGED_FAILURE = 12; INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; INSTALLER_ROLLBACK_SUCCESS = 15; INSTALLER_ROLLBACK_FAILURE = 16; INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; INSTALL_STAGED_CANCEL_REQUESTED = 20; INSTALL_STAGED_CANCEL_SUCCESS = 21; INSTALL_STAGED_CANCEL_FAILURE = 22; INSTALL_FAILURE_DOWNLOAD = 23; INSTALL_FAILURE_STATE_MISMATCH = 24; INSTALL_FAILURE_COMMIT = 25; REBOOT_TRIGGERED = 26; // Logged after INSTALL_REQUESTED for devices installing a train that // contains no module requiring reboot. REBOOT_NOT_REQUIRED = 27; // Logged after INSTALL_REQUESTED for devices that are installing a train // which requires reboot and eligible for soft restart. SOFT_RESTART_ELIGIBLE = 28; // Logged after INSTALL_REQUESTED for devices that are installing a train // which requires reboot and eligible for notification restart. NOTIFICATION_RESTART_ELIGIBLE = 29; // Logged after INSTALL_REQUESTED for devices that are installing a train // which requires reboot and not eligible for any reboot promotion strategy // (e.g. soft restart, notification restart). NO_REBOOT_PROMOTION_STRATEGY_ELIGIBLE = 30; REBOOT_TRIGGER_FAILURE = 31; } 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 */ message TestAtomReported { repeated AttributionNode attribution_node = 1; optional int32 int_field = 2; optional int64 long_field = 3; optional float float_field = 4; optional string string_field = 5; optional bool boolean_field = 6; enum State { UNKNOWN = 0; OFF = 1; ON = 2; } optional State state = 7; optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; } /** Represents USB port overheat event. */ message UsbPortOverheatEvent { /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ optional int32 plug_temperature_deci_c = 1; /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ optional int32 max_temperature_deci_c = 2; /* Time between USB plug event and overheat threshold trip, in seconds. */ optional int32 time_to_overheat_secs = 3; /* Time between overheat threshold trip and hysteresis, in seconds. */ optional int32 time_to_hysteresis_secs = 4; /* Time between hysteresis and active mitigation ending, in seconds. */ optional int32 time_to_inactive_secs = 5; }; /** * Logs total effective full charge and discharge cycles on a battery. * Here are some examples of one effective cycle: * 1) the battery charges from 0% to 100% and drains back to 0%, * 2) charging from 50% to 100% and draining back to 50% twice. * Pulled from: * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp */ message BatteryCycleCount { /* Number of total charge and discharge cycles on the system battery. */ optional int32 cycle_count = 1; } /** * Logs that external storage is mounted and information about it, the storage type (sd card/usb/ * others), its type (public or private) and the size in bytes. * Pulled from: * StatsCompanionService */ message ExternalStorageInfo { enum VolumeType { UNKNOWN = 0; PUBLIC = 1; PRIVATE = 2; OTHER = 3; } // The type of external storage. optional android.stats.storage.ExternalStorageType storage_type = 1; // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal. optional VolumeType volume_type = 2; // Total size of the sd card in bytes. optional int64 size_bytes = 3; } /* * Logs when a connection becomes available and lost. * Logged in StatsCompanionService.java */ message ConnectivityStateChanged { // Id of the network. optional int32 net_id = 1; enum State { UNKNOWN = 0; CONNECTED = 1; DISCONNECTED = 2; } // Connected state of a network. optional State state = 2; } /** * Logs when a service starts and stops. * Logged from: * services/core/java/com/android/server/am/ActiveServices.java */ message ServiceStateChanged { optional int32 uid = 1 [(is_uid) = true]; optional string package_name = 2; optional string service_name = 3; enum State { START = 1; STOP = 2; } optional State state = 4; } /** * Logs when a service is launched. * Logged from: * services/core/java/com/android/server/am/ActiveServices.java */ message ServiceLaunchReported { optional int32 uid = 1 [(is_uid) = true]; optional string package_name = 2; optional string service_name = 3; } /** * Logs when a hidden API is used. * * Logged from: * libcore/libart/src/main/java/dalvik/system/VMRuntime.java */ message HiddenApiUsed { // The uid of the app making the hidden access. optional int32 uid = 1 [(is_uid) = true]; // Signature of the method or field accessed. optional string signature = 2; enum AccessMethod { NONE = 0; REFLECTION = 1; JNI = 2; LINKING = 3; } // Type of access. optional AccessMethod access_method = 3; // Whether the access was prevented or not. optional bool access_denied = 4; } /** * Logs user interaction with the Privacy Indicators added in Q. In particular: * - When user sees privacy chip * - When user clicks privacy chip * - How does the user exit the Privacy Dialog * Logged from: * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java */ message PrivacyIndicatorsInteracted { enum Type { UNKNOWN = 0; CHIP_VIEWED = 1; CHIP_CLICKED = 2; reserved 3; // Used only in beta builds, never shipped DIALOG_DISMISS = 4; DIALOG_LINE_ITEM = 5; } optional Type type = 1 [(state_field_option).exclusive_state = true]; } /** * Logs information about a package that is moved from the internal to external storage and vice * versa. * It logs the package name, the type of the external storage where the package is installed * (if moved to external storage, or UNKNOWN if moved to internal storage), * and the move type: if it's from internal to external or the other way around. * * Logged from: frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java */ message AppMovedStorageReported { enum MoveType { UNKNOWN = 0; TO_EXTERNAL = 1; TO_INTERNAL = 2; } // The type of the external storage. optional android.stats.storage.ExternalStorageType external_storage_type = 1; // The type of move. optional MoveType move_type = 2; // The name of the package that was moved. optional string package_name = 3; } /** * Logs when system server watchdog occurs. * Logged from: * frameworks/base/services/core/java/com/android/server/Watchdog.java */ message SystemServerWatchdogOccurred { optional string subject = 1; } /** * Logs when new file added to tombstones. * Logged from: * frameworks/base/core/java/com/android/server/BootReceiver.java */ message TombStoneOccurred { } /* * Information about a role request * * Logged from: * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java */ message RoleRequestResultReported { // UID of application requesting the role optional int32 requesting_uid = 1; // Package name of application requesting the role optional string requesting_package_name = 2; // The role to be granted optional string role_name = 3; // The count of applications qualifying for the role optional int32 qualifying_count = 4; // UID of application current granted the role optional int32 current_uid = 5; // Package name of application current granted the role optional string current_package_name = 6; // UID of another application that user chose to grant the role to, instead of the requesting // application optional int32 granted_another_uid = 7; // Package name of another application that user chose to grant the role to, instead of the // requesting application optional string granted_another_package_name = 8; enum Result { UNDEFINED = 0; // role request was ignored IGNORED = 1; // role request was ignored because it's already granted IGNORED_ALREADY_GRANTED = 2; // role request was ignored because the application isn't qualified IGNORED_NOT_QUALIFIED = 3; // role request was ignored because user said it should be always denied IGNORED_USER_ALWAYS_DENIED = 4; // role was granted by user action USER_GRANTED = 5; // role was denied by user action USER_DENIED = 6; // role was denied by user granting another application the role USER_DENIED_GRANTED_ANOTHER = 7; // role was denied and set to be always denied by the user USER_DENIED_WITH_ALWAYS = 8; } // The result of the role request optional Result result = 9; } /** * Logs when a Vehicle Maps Service client's connection state has changed * * Logged from: * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java */ message VmsClientConnectionStateChanged { // The UID of the VMS client app optional int32 uid = 1 [(is_uid) = true]; enum State { UNKNOWN = 0; // Attempting to connect to the client CONNECTING = 1; // Client connection established CONNECTED = 2; // Client connection closed unexpectedly DISCONNECTED = 3; // Client connection closed by VMS TERMINATED = 4; // Error establishing the client connection CONNECTION_ERROR = 5; } 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 [(log_mode) = MODE_BYTES]; } /** * 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. * * Logged from: bootstat and various system server components. Check each enums for details. */ message BootTimeEventDuration { enum DurationEvent { UNKNOWN = 0; // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat. ABSOLUTE_BOOT_TIME = 1; // Bootloader's 1st stage execution time. // Logged from bootstat. BOOTLOADER_FIRST_STAGE_EXEC = 2; // Bootloader's 1st stage loading time. // Logged from bootstat. BOOTLOADER_FIRST_STAGE_LOAD = 3; // Bootloader's kernel loading time. // Logged from bootstat. BOOTLOADER_KERNEL_LOAD = 4; // Bootloader's 2nd stage execution time. // Logged from bootstat. BOOTLOADER_SECOND_STAGE_EXEC = 5; // Bootloader's 2nd stage loading time. // Logged from bootstat. BOOTLOADER_SECOND_STAGE_LOAD = 6; // Duration for Bootloader to show unlocked device's warning UI. This should not happen // for locked device. // Logged from bootstat. BOOTLOADER_UI_WAIT = 7; // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above. // Logged from bootstat. BOOTLOADER_TOTAL = 8; // Shutdown duration inside init for the reboot before the current boot up. // Logged from f/b/services/.../BootReceiver.java. SHUTDOWN_DURATION = 9; // Total time for mounting of disk devices during bootup. // Logged from f/b/services/.../BootReceiver.java. MOUNT_DEFAULT_DURATION = 10; // Total time for early stage mounting of disk devices during bootup. // Logged from f/b/services/.../BootReceiver.java. MOUNT_EARLY_DURATION = 11; // Total time for late stage mounting of disk devices during bootup. // Logged from f/b/services/.../BootReceiver.java. MOUNT_LATE_DURATION = 12; // Average time to scan non-system app after OTA // Logged from f/b/services/.../PackageManagerService.java OTA_PACKAGE_MANAGER_INIT_TIME = 13; // Time to initialize Package manager after OTA // Logged from f/b/services/.../PackageManagerService.java OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14; // Time to scan all system app from Package manager after OTA // Logged from f/b/services/.../PackageManagerService.java OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15; // Init's total time for cold boot stage. // Logged from bootstat. COLDBOOT_WAIT = 16; // Init's total time for initializing selinux. // Logged from bootstat. SELINUX_INIT = 17; // Time since last factory reset. // Logged from bootstat. FACTORY_RESET_TIME_SINCE_RESET = 18; // Init's total time spent for completing the 1st stage. // Logged from bootstat. ANDROID_INIT_STAGE_1 = 19; } // Type of the event. optional DurationEvent event = 1; // Duration of the event in ms. optional int64 duration_millis = 2; } /** * Represents the start of specific boot time event during bootup in ms. This is usually a time * since boot-up. * * Logged from: bootstat and various system server components. Check each enums for details. */ message BootTimeEventElapsedTime { enum ElapsedTimeEvent { UNKNOWN = 0; // Time when init starts 1st stage. Logged from bootstat. ANDROID_INIT_STAGE_1 = 1; // Time when sys.boot_completed prop is set. // Logged from bootstat. BOOT_COMPLETE = 2; // BOOT_COMPLETE for encrypted device. BOOT_COMPLETE_ENCRYPTION = 3; // BOOT_COMPLETE for device with no encryption. BOOT_COMPLETE_NO_ENCRYPTION = 4; // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time. BOOT_COMPLETE_POST_DECRYPT = 5; // BOOT_COMPLETE after factory reset. FACTORY_RESET_BOOT_COMPLETE = 6; // BOOT_COMPLETE_NO_ENCRYPTION after factory reset. FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7; // BOOT_COMPLETE_POST_DECRYPT after factory reset. FACTORY_RESET_BOOT_COMPLETE_POST_DECRYPT = 8; // BOOT_COMPLETE after OTA. OTA_BOOT_COMPLETE = 9; // BOOT_COMPLETE_NO_ENCRYPTION after OTA. OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10; // BOOT_COMPLETE_POST_DECRYPT after OTA. OTA_BOOT_COMPLETE_POST_DECRYPT = 11; // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast. // Logged from f/b/services/.../UserController.java FRAMEWORK_LOCKED_BOOT_COMPLETED = 12; // Time when the system starts sending BOOT_COMPLETED broadcast. // Logged from f/b/services/.../UserController.java FRAMEWORK_BOOT_COMPLETED = 13; // Time when the package manager starts init. // Logged from f/b/services/.../SystemServer.java PACKAGE_MANAGER_INIT_START = 14; // Time when package manager is ready // Logged from f/b/services/.../SystemServer.java PACKAGE_MANAGER_INIT_READY = 15; // Represents the time when user has entered unlock credential for system with user pin. // Logged from bootstat. POST_DECRYPT = 16; // Represents the start of zygote's init. // Logged from zygote itself. ZYGOTE_INIT_START = 17; // Represents the start of secondary zygote's init. // TODO: add logging to zygote SECONDARY_ZYGOTE_INIT_START = 18; // Represents the start of system server's init. // Logged from f/b/services/.../SystemServer.java SYSTEM_SERVER_INIT_START = 19; // Represents the completion of system server's init. // Logged from f/b/services/.../SystemServer.java SYSTEM_SERVER_READY = 20; // Represents the start of launcher during boot-up. // TODO: add logging LAUNCHER_START = 21; // Represents the completion of launcher's initial rendering. User can use other apps from // launcher from this point. // TODO: add logging LAUNCHER_SHOWN = 22; } // Type of the event. optional ElapsedTimeEvent event = 1; // Time since bootup for the event. // It should be acquired from SystemClock elapsedRealtime() call or equivalent. optional int64 time_millis = 2; } /** * Boot time events with UTC time. * * Logged from: bootstat and various system server components. Check each enums for details. */ message BootTimeEventUtcTime { enum UtcTimeEvent { UNKNOWN = 0; // Time of the bootstat's marking of 1st boot after the last factory reset. // Logged from bootstat. FACTORY_RESET_RESET_TIME = 1; // The time when bootstat records FACTORY_RESET_* events. This is close to // BOOT_COMPLETE time for the current bootup. // Logged from bootstat. FACTORY_RESET_CURRENT_TIME = 2; // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose. // Logged from bootstat. FACTORY_RESET_RECORD_VALUE = 3; } // Type of the event. optional UtcTimeEvent event = 1; // UTC time for the event. optional int64 utc_time_secs = 2; } /** * Boot time events representing specific error code during bootup. * Meaning of error code can be different per each event type. * * Logged from: bootstat and various system server components. Check each enums for details. */ message BootTimeEventErrorCode { enum ErrorCodeEvent { UNKNOWN = 0; // Linux error code for time() call to get the current UTC time. // Logged from bootstat. FACTORY_RESET_CURRENT_TIME_FAILURE = 1; // Represents UmountStat before the reboot for the current boot up. Error codes defined // as UMOUNT_STAT_* from init/reboot.cpp. // Logged from f/b/services/.../BootReceiver.java. SHUTDOWN_UMOUNT_STAT = 2; // Reprepsents fie system mounting error code of /data partition for the current boot. // Error codes defined as combination of FsStatFlags from system/core/fs_mgr/fs_mgr.cpp. // Logged from f/b/services/.../BootReceiver.java. FS_MGR_FS_STAT_DATA_PARTITION = 3; } // Type of the event. optional ErrorCodeEvent event = 1; // error code defined per each event type. // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of // FS_MGR_FS_STAT. optional int32 error_code = 2; } /** * Collects Virtual A/B statistics related to the use of dm-snapshot performed * after an OTA. * * Logged from: * - system/update_engine/cleanup_previous_update_action.cc */ message SnapshotMergeReported { // Keep in sync with // system/core/fs_mgr/libsnapshot/android/snapshot/snapshot.proto enum UpdateState { // No update or merge is in progress. NONE = 0; // An update is applying; snapshots may already exist. INITIATED = 1; // An update is pending, but has not been successfully booted yet. UNVERIFIED = 2; // The kernel is merging in the background. MERGING = 3; // Post-merge cleanup steps could not be completed due to a transient // error, but the next reboot will finish any pending operations. MERGE_NEEDS_REBOOT = 4; // Merging is complete, and needs to be acknowledged. MERGE_COMPLETED = 5; // Merging failed due to an unrecoverable error. MERGE_FAILED = 6; // The update was implicitly cancelled, either by a rollback or a flash // operation via fastboot. This state can only be returned by WaitForMerge. CANCELLED = 7; }; // Status codes correspond to specific failure conditions in // system/core/fs_mgr/libsnapshot/android/snapshot/snapshot.cpp // // Keep in sync with // system/core/fs_mgr/libsnapshot/android/snapshot/snapshot.proto enum MergeFailureCode { OK = 0; READ_STATUS = 1; GET_TABLE_INFO = 2; UNKNOWN_TABLE = 3; GET_TABLE_PARAMS = 4; ACTIVATE_NEW_TABLE = 5; ACQUIRE_LOCK = 6; LIST_SNAPSHOTS = 7; WRITE_STATUS = 8; UNKNOWN_TARGET_TYPE = 9; QUERY_SNAPSHOT_STATUS = 10; EXPECTED_MERGE_TARGET = 11; UNMERGED_SECTORS_AFTER_COMPLETION = 12; UNEXPECTED_MERGE_STATE = 13; }; // Status of the update after the merge attempts. optional UpdateState final_state = 1; // Time to complete a merge operation in milliseconds. // A negative value corresponds to the case in which the merge operation // was interrupted and resumed (e.g. in case of a system reboot during the // merge). optional int64 duration_millis = 2; // 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; // Whether the device enables Virtual A/B compression. optional bool vab_compression_enabled = 6; // Whether this update attempt uses Virtual A/B compression. optional bool vab_compression_used = 7; // Total size used by COWs, including /data and the super partition. optional int64 total_cow_size_bytes = 8; // Sum of the estimated COW fields in the OTA manifest. optional int64 estimated_cow_size_bytes = 9; // Time from boot to sys.boot_completed, in milliseconds. optional int32 boot_complete_time_millis = 10; // Time from sys.boot_completed to merge start, in milliseconds. optional int32 boot_complete_to_merge_start_time_millis = 11; optional MergeFailureCode merge_failure_code = 12; // Build fingerprint at the time the OTA was downloaded. optional string source_build_fingerprint = 13; // Build fingerprint at the time the merge was initiated. optional string target_build_fingerprint = 14; } /** * 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; } /** * Event to track Jank for various system interactions. * * Logged from: * frameworks/base/core/java/com/android/internal/jank/FrameTracker.java * * Next Tag: 41 */ message UIInteractionFrameInfoReported { enum InteractionType { UNKNOWN = 0; NOTIFICATION_SHADE_SWIPE = 1; SHADE_EXPAND_COLLAPSE_LOCK = 2; SHADE_SCROLL_FLING = 3; SHADE_ROW_EXPAND = 4; SHADE_ROW_SWIPE = 5; SHADE_QS_EXPAND_COLLAPSE = 6; SHADE_QS_SCROLL_SWIPE = 7; LAUNCHER_APP_LAUNCH_FROM_RECENTS = 8; LAUNCHER_APP_LAUNCH_FROM_ICON = 9; LAUNCHER_APP_CLOSE_TO_HOME = 10; LAUNCHER_APP_CLOSE_TO_PIP = 11; LAUNCHER_QUICK_SWITCH = 12; SHADE_HEADS_UP_APPEAR = 13; SHADE_HEADS_UP_DISAPPEAR = 14; SHADE_NOTIFICATION_ADD = 15; SHADE_NOTIFICATION_REMOVE = 16; SHADE_APP_LAUNCH = 17; LOCKSCREEN_PASSWORD_APPEAR = 18; LOCKSCREEN_PATTERN_APPEAR = 19; LOCKSCREEN_PIN_APPEAR = 20; LOCKSCREEN_PASSWORD_DISAPPEAR = 21; LOCKSCREEN_PATTERN_DISAPPEAR = 22; LOCKSCREEN_PIN_DISAPPEAR = 23; LOCKSCREEN_TRANSITION_FROM_AOD = 24; LOCKSCREEN_TRANSITION_TO_AOD = 25; LAUNCHER_OPEN_ALL_APPS = 26; LAUNCHER_ALL_APPS_SCROLL = 27; LAUNCHER_APP_LAUNCH_FROM_WIDGET = 28; SETTINGS_PAGE_SCROLL = 29; LOCKSCREEN_UNLOCK_ANIMATION = 30; SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON = 31; SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER = 32; SHADE_APP_LAUNCH_FROM_QS_TILE = 33; SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON = 34; STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP = 35; PIP_TRANSITION = 36; WALLPAPER_TRANSITION = 37; USER_SWITCH = 38; SPLASHSCREEN_AVD = 39; SPLASHSCREEN_EXIT_ANIM = 40; } optional InteractionType interaction_type = 1; // Number of frames rendered during the interaction. optional int64 total_frames = 2; // Number of frames that were skipped in rendering during the interaction. optional int64 missed_frames = 3; // Number of frames that were missed in Surface Flinger during the interaction. optional int64 sf_missed_frames = 5; // Number of frames that were missed in the app during the interaction. optional int64 app_missed_frames = 6; // Maximum time it took to render a single frame during the interaction. optional int64 max_frame_time_nanos = 4; } /** * Event to track various latencies in SystemUI. * * Logged from: * frameworks/base/core/java/com/android/internal/util/LatencyTracker.java */ message UIActionLatencyReported { enum ActionType { UNKNOWN = 0; ACTION_EXPAND_PANEL = 1; ACTION_TOGGLE_RECENTS = 2; ACTION_FINGERPRINT_WAKE_AND_UNLOCK = 3; ACTION_CHECK_CREDENTIAL = 4; ACTION_CHECK_CREDENTIAL_UNLOCKED = 5; ACTION_TURN_ON_SCREEN = 6; ACTION_ROTATE_SCREEN = 7; ACTION_FACE_WAKE_AND_UNLOCK = 8; ACTION_START_RECENTS_ANIMATION = 9; ACTION_ROTATE_SCREEN_CAMERA_CHECK = 10; ACTION_ROTATE_SCREEN_SENSOR = 11; ACTION_LOCKSCREEN_UNLOCK = 12; ACTION_USER_SWITCH = 13; } optional ActionType action = 1; optional int64 latency_millis = 2; } ////////////////////////////////////////////////////////////////////// // Pulled atoms below this line // ////////////////////////////////////////////////////////////////////// /** * Pulls bytes transferred via wifi (Sum of foreground and background usage). * * Pulled from: * StatsCompanionService (using BatteryStats to get which interfaces are wifi) */ message WifiBytesTransfer { optional int32 uid = 1 [(is_uid) = true]; optional int64 rx_bytes = 2; optional int64 rx_packets = 3; optional int64 tx_bytes = 4; optional int64 tx_packets = 5; } /** * Pulls bytes transferred via wifi (separated by foreground and background usage). * * Pulled from: * StatsCompanionService (using BatteryStats to get which interfaces are wifi) */ message WifiBytesTransferByFgBg { optional int32 uid = 1 [(is_uid) = true]; // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. optional bool is_foreground = 2; optional int64 rx_bytes = 3; optional int64 rx_packets = 4; optional int64 tx_bytes = 5; optional int64 tx_packets = 6; } /** * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). * * Pulled from: * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) */ message MobileBytesTransfer { optional int32 uid = 1 [(is_uid) = true]; optional int64 rx_bytes = 2; optional int64 rx_packets = 3; optional int64 tx_bytes = 4; optional int64 tx_packets = 5; } /** * Pulls bytes transferred via mobile networks (separated by foreground and background usage). * * Pulled from: * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) */ message MobileBytesTransferByFgBg { optional int32 uid = 1 [(is_uid) = true]; // 1 denotes foreground and 0 denotes background. This is called Set in // NetworkStats. optional bool is_foreground = 2; optional int64 rx_bytes = 3; optional int64 rx_packets = 4; optional int64 tx_bytes = 5; optional int64 tx_packets = 6; } /** * 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 OEM managed networks. Data is split up by which * type of OEM managed network it is, what transport it went over, and if it was * in the foreground or background. * * Pulled from: * StatsPullAtomService */ message OemManagedBytesTransfer { optional int32 uid = 1 [(is_uid) = true]; // 1 denotes foreground and 0 denotes background. This is called Set in // NetworkStats. optional bool is_foreground = 2; // Corresponds to the type of OEM managed network, see // {@link NetworkTemplate#OEM_MANAGED_ANY} and {@code NetworkIdentity#OEM_*}. optional int32 oem_managed_type = 3; // Corresponds to the type of transport the bytes were transferred over, see // {@link NetworkTemplate#transportToMatchRule} and // {@code NetworkCapabilities#TRANSPORT_*} optional int32 transport_type = 4; optional int64 rx_bytes = 5; optional int64 rx_packets = 6; optional int64 tx_bytes = 7; optional int64 tx_packets = 8; } /** * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. * * Pulled from: * StatsCompanionService */ message BluetoothBytesTransfer { optional int32 uid = 1 [(is_uid) = true]; optional int64 rx_bytes = 2; optional int64 tx_bytes = 3; } /** * Pulls the kernel wakelock durations. This atom is adapted from * android/internal/os/KernelWakelockStats.java * * Pulled from: * StatsCompanionService using KernelWakelockReader. */ message KernelWakelock { optional string name = 1; optional int32 count = 2; optional int32 version = 3; optional int64 time_micros = 4; } /** * Pulls power state information. * Pulled from: * frameworks/base/services/core/java/com/android/server/powerstats/StatsPullAtomCallbackImpl.java */ message SubsystemSleepState { // Subsystem name optional string subsystem_name = 1; // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the // powerEntityStateName from the corresponding PowerEntityStateInfo. optional string subname = 2; // The number of times it entered, or voted for entering the sleep state optional uint64 count = 3; // The length of time spent in, or spent voting for, the sleep state optional uint64 time_millis = 4; } /** * Pulls on-device power measurement information. * Pulled from: * frameworks/base/services/core/java/com/android/server/powerstats/StatsPullAtomCallbackImpl.java */ message OnDevicePowerMeasurement { // Name of the subsystem (to which the rail belongs). optional string subsystem_name = 1; // Rail name. The rail lies within the subsystem. optional string rail_name = 2; // Time (in ms since boot) at which the rail energy value was measured. // This may differ slightly from the time that statsd logs this information. optional uint64 measurement_timestamp_millis = 3; // Accumulated energy used via the rail since device boot in uWs. optional uint64 energy_microwatt_secs = 4; } /** * Pulls Cpu time per cluster per frequency. * This is tracked by the time_in_state eBPF program. */ message CpuTimePerClusterFreq { optional uint32 cluster = 1; optional uint32 freq_khz = 2; // Time spent at this frequency excluding sleep since tracking started. optional uint64 time_millis = 3; } /** * Pulls Cpu Time Per Uid. * Note that isolated process uid time should be attributed to host uids. */ message CpuTimePerUid { optional int32 uid = 1 [(is_uid) = true]; optional uint64 user_time_micros = 2; optional uint64 sys_time_micros = 3; } /** * Pulls Cpu Cycles Per Uid Per Cluster. * Note that uids are transformed to reduce the number of uploaded entries. Shared GIDs are * combined under single uid LAST_SHARED_APPLICATION_GID. Individual isolated uids are excluded * because they are recycled and removed from the underlying data source. All uids are normalized * to their base uids. */ message CpuCyclesPerUidCluster { optional int32 uid = 1 [(is_uid) = true]; optional int32 cluster = 2; // Megacycles, i.e. millions of cycles. optional int64 mcycles = 3; // Time excluding sleep since tracking started. optional int64 time_millis = 4; // Power estimate: time * average power for frequency / 1000. optional int64 power_profile_estimate = 5; } /** * Pulls Cpu Time Per Uid per frequency. * Note that uids are transformed to reduce the number of uploaded entries. Shared GIDs are * combined under single uid LAST_SHARED_APPLICATION_GID. Individual isolated uids are excluded * because they are recycled and removed from the underlying data source. All uids are normalized * to their base uids. */ message CpuTimePerUidFreq { optional int32 uid = 1 [(is_uid) = true]; optional uint32 freq_index = 2; optional uint64 time_millis = 3; } /** * Pulls Cpu Cycles Per ThreadGroup Per Cluster. * This is tracked by the time_in_state eBPF program. */ message CpuCyclesPerThreadGroupCluster { enum ThreadGroup { UNKNOWN_THREAD_GROUP = 0; // System server threads serving Binder calls. SYSTEM_SERVER_BINDER = 1; // All system server threads. SYSTEM_SERVER = 2; // All surface flinger threads. SURFACE_FLINGER = 3; } optional ThreadGroup thread_group = 1; optional int32 cluster = 2; // Megacycles, i.e. millions of cycles. optional int64 mcycles = 3; // Time excluding sleep since tracking started. optional int64 time_millis = 4; } /** * Pulls Wifi Controller Activity Energy Info */ message WifiActivityInfo { // timestamp(wall clock) of record creation optional uint64 timestamp_millis = 1; // stack reported state // TODO: replace this with proto enum optional int32 stack_state = 2; // tx time in millis optional uint64 controller_tx_time_millis = 3; // rx time in millis optional uint64 controller_rx_time_millis = 4; // idle time in millis optional uint64 controller_idle_time_millis = 5; // product of current(mA), voltage(V) and time(ms) optional uint64 controller_energy_used = 6; } /** * Pulls Modem Activity Energy Info */ message ModemActivityInfo { // timestamp(wall clock) of record creation optional uint64 timestamp_millis = 1; // sleep time in millis. optional uint64 sleep_time_millis = 2; // idle time in millis optional uint64 controller_idle_time_millis = 3; /** * Tx power index * index 0 = tx_power < 0dBm * index 1 = 0dBm < tx_power < 5dBm * index 2 = 5dBm < tx_power < 15dBm * index 3 = 15dBm < tx_power < 20dBm * index 4 = tx_power > 20dBm */ // tx time in ms at power level 0 optional uint64 controller_tx_time_pl0_millis = 4; // tx time in ms at power level 1 optional uint64 controller_tx_time_pl1_millis = 5; // tx time in ms at power level 2 optional uint64 controller_tx_time_pl2_millis = 6; // tx time in ms at power level 3 optional uint64 controller_tx_time_pl3_millis = 7; // tx time in ms at power level 4 optional uint64 controller_tx_time_pl4_millis = 8; // rx time in ms at power level 5 optional uint64 controller_rx_time_millis = 9; // product of current(mA), voltage(V) and time(ms) optional uint64 energy_used = 10 [deprecated=true]; } /** * Pulls Bluetooth Activity Energy Info * Note: BluetoothBytesTransfer is pulled at the same time from the controller. */ message BluetoothActivityInfo { // timestamp(wall clock) of record creation optional uint64 timestamp_millis = 1; // bluetooth stack state optional int32 bluetooth_stack_state = 2; // tx time in millis optional uint64 controller_tx_time_millis = 3; // rx time in millis optional uint64 controller_rx_time_millis = 4; // idle time in millis optional uint64 controller_idle_time_millis = 5; // product of current(mA), voltage(V) and time(ms) optional uint64 energy_used = 6; } /* * Logs the memory stats for a process. * * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). */ message ProcessMemoryState { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The process name. // Usually package name, "system" for system server. // Provided by ActivityManagerService. optional string process_name = 2; // Current OOM score adjustment. Value read from ProcessRecord. optional int32 oom_adj_score = 3; // # of page-faults optional int64 page_fault = 4; // # of major page-faults optional int64 page_major_fault = 5; // RSS // 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 // Value is read from memory.stat, field total_cache if per-app memory // cgroups are enabled. Otherwise, 0. optional int64 cache_in_bytes = 7; // SWAP // Value is read from memory.stat, field total_swap if per-app memory // cgroups are enabled. Otherwise, 0. optional int64 swap_in_bytes = 8; // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1. optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. optional int64 start_time_nanos = 10 [deprecated = true]; // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true]; } /* * Logs the memory high-water mark for a process. * * 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 ProcessMemoryHighWaterMark { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The process name. // Usually package name or process cmdline. // Provided by ActivityManagerService or read from /proc/PID/cmdline. optional string process_name = 2; // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is // computed by converting kilobytes to bytes. optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true]; // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in // /proc/PID/status. optional int32 rss_high_water_mark_in_kilobytes = 4; } /* * Logs the memory stats for a process. * * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService) * and for selected native processes. */ message ProcessMemorySnapshot { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The process name. // Usually package name or process cmdline. // Provided by ActivityManagerService or read from /proc/PID/cmdline. optional string process_name = 2; // The pid of the process. // Allows to disambiguate instances of the process. optional int32 pid = 3; // The current OOM score adjustment value. // Read from ProcessRecord for managed processes. // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones. optional int32 oom_score_adj = 4; // The current RSS of the process. // VmRSS from /proc/pid/status. optional int32 rss_in_kilobytes = 5; // The current anon RSS of the process. // RssAnon from /proc/pid/status. optional int32 anon_rss_in_kilobytes = 6; // The current swap size of the process. // VmSwap from /proc/pid/status. optional int32 swap_in_kilobytes = 7; // The sum of rss_in_kilobytes and swap_in_kilobytes. optional int32 anon_rss_and_swap_in_kilobytes = 8; } /* * Elapsed real time from SystemClock. */ message SystemElapsedRealtime { optional uint64 time_millis = 1; } /* * Up time from SystemClock. */ message SystemUptime { // Milliseconds since the system was booted. // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting // for external input). // It is not affected by clock scaling, idle, or other power saving mechanisms. optional uint64 uptime_millis = 1; } /* * Reads from /proc/uid_concurrent_active_time which has the format: * active: X (X is # cores) * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) * [uid1]: [time-0] [time-1] [time-2] ... ... * ... * Time-N means the CPU time a UID spent running concurrently with N other processes. * The file contains a monotonically increasing count of time for a single boot. */ message CpuActiveTime { optional int32 uid = 1 [(is_uid) = true]; optional uint64 time_millis = 2; } /** * Reads from /proc/uid_concurrent_policy_time which has the format: * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... * ... * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. * The file contains a monotonically increasing count of time for a single boot. */ message CpuClusterTime { optional int32 uid = 1 [(is_uid) = true]; optional int32 cluster_index = 2; optional uint64 time_millis = 3; } /* * Pulls free disk space, for data, system partition and temporary directory. */ message DiskSpace { // available bytes in data partition optional uint64 data_available_bytes = 1; // available bytes in system partition optional uint64 system_available_bytes = 2; // available bytes in download cache or temp directories optional uint64 temp_available_bytes = 3; } /** * Pulls battery coulomb counter, which is the remaining battery charge in uAh. * * Pulled from StatsCompanionService.java */ message RemainingBatteryCapacity { optional int32 charge_micro_ampere_hour = 1; } /** * Pulls battery capacity, which is the battery capacity when full in uAh. * Pulled from: * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp */ message FullBatteryCapacity { optional int32 capacity_micro_ampere_hour = 1; } /** * Pulls battery voltage. * Pulled from: * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp */ message BatteryVoltage { // The voltage of the battery, in millivolts. optional int32 voltage_millivolt = 1; } /** * Pulls battery level (percent full, from 0 to 100). * * Pulled from: * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp */ message BatteryLevel { // Battery level. Should be in [0, 100]. optional int32 battery_level = 1; } /** * Pulls the temperature of various parts of the device. * The units are tenths of a degree Celsius. Eg: 30.3C is reported as 303. * * Pulled from StatsCompanionService.java */ message Temperature { // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. optional android.os.TemperatureTypeEnum sensor_location = 1; // The name of the temperature source. Eg. CPU0 optional string sensor_name = 2; // Temperature in tenths of a degree C. // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. optional int32 temperature_deci_celsius = 3; // Relative severity of the throttling, see enum definition. optional android.os.ThrottlingSeverityEnum severity = 4; } /** * Pulls the statistics of calls to Binder. * * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one * config on the device. * * Next tag: 15 */ message BinderCalls { // UID of the process responsible for the binder transaction. It will be set if the process // executing the binder transaction attribute the transaction to another uid using // Binder.setThreadWorkSource(). // // If not set, the value will be -1. optional int32 uid = 1 [(is_uid) = true]; // UID of the process executing the binder transaction. optional int32 direct_caller_uid = 14; // Fully qualified class name of the API call. // // This is a system server class name. // // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid // gets recycled and we have isolated uids, we might attribute the data incorrectly. // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less // commonly used APIs. optional string service_class_name = 2; // Method name of the API call. It can also be a transaction code if we cannot // resolve it to a name. See Binder#getTransactionName. // // This is a system server method name. optional string service_method_name = 3; // Total number of API calls. optional int64 call_count = 4; // True if the screen was interactive PowerManager#isInteractive at the end of the call. optional bool screen_interactive = 13; // Total number of API calls we have data recorded for. If we collected data for all the calls, // call_count will be equal to recorded_call_count. // // If recorded_call_count is different than call_count, it means data collection has been // sampled. All the fields below will be sampled in this case. optional int64 recorded_call_count = 12; // Number of exceptions thrown by the API. optional int64 recorded_exception_count = 5; // Total latency of all API calls. // Average can be computed using total_latency_micros / recorded_call_count. optional int64 recorded_total_latency_micros = 6; // Maximum latency of one API call. optional int64 recorded_max_latency_micros = 7; // Total CPU usage of all API calls. // Average can be computed using total_cpu_micros / recorded_call_count. // Total can be computed using total_cpu_micros / recorded_call_count * call_count. optional int64 recorded_total_cpu_micros = 8; // Maximum CPU usage of one API call. optional int64 recorded_max_cpu_micros = 9; // Maximum parcel reply size of one API call. optional int64 recorded_max_reply_size_bytes = 10; // Maximum parcel request size of one API call. optional int64 recorded_max_request_size_bytes = 11; } /** * Pulls the statistics of exceptions during calls to Binder. * * Binder stats are cumulative from boot unless somebody reset the data using * > adb shell dumpsys binder_calls_stats --reset */ message BinderCallsExceptions { // Exception class name, e.g. java.lang.IllegalArgumentException. // // This is an exception class name thrown by the system server. optional string exception_class_name = 1; // Total number of exceptions. optional int64 exception_count = 2; } /** * Pulls the statistics of message dispatching on HandlerThreads. * * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one * config on the device. * * Next tag: 11 */ message LooperStats { // The uid that made a call to the System Server and caused the message to be enqueued. optional int32 uid = 1 [(is_uid) = true]; // Fully qualified class name of the handler target class. // // This field does not contain PII. This is a system server class name. optional string handler_class_name = 2; // The name of the thread that runs the Looper. // // This field does not contain PII. This is a system server thread name. optional string looper_thread_name = 3; // The name of the dispatched message. // // This field does not contain PII. This is a system server constant or class // name. optional string message_name = 4; // Total number of successfully dispatched messages. optional int64 message_count = 5; // Total number of messages that failed dispatching. optional int64 exception_count = 6; // Total number of processed messages we have data recorded for. If we // collected data for all the messages, message_count will be equal to // recorded_message_count. // // If recorded_message_count is different than message_count, it means data // collection has been sampled. The fields below will be sampled in this case. optional int64 recorded_message_count = 7; // Total latency of all processed messages. // Average can be computed using recorded_total_latency_micros / // recorded_message_count. optional int64 recorded_total_latency_micros = 8; // Total CPU usage of all processed message. // Average can be computed using recorded_total_cpu_micros / // recorded_message_count. Total can be computed using // recorded_total_cpu_micros / recorded_message_count * message_count. optional int64 recorded_total_cpu_micros = 9; // True if the screen was interactive PowerManager#isInteractive at the end of the call. optional bool screen_interactive = 10; // Max recorded CPU usage of all processed messages. optional int64 recorded_max_cpu_micros = 11; // Max recorded latency of all processed messages. optional int64 recorded_max_latency_micros = 12; // Total number of messages we tracked the dispatching delay for. If we // collected data for all the messages, message_count will be equal to // recorded_delay_message_count. // // If recorded_delay_message_count is different than message_count, it means data // collection has been sampled or/and not all messages specified the target dispatch time. // The fields below will be sampled in this case. optional int64 recorded_delay_message_count = 13; // Total dispatching delay of all processed messages. // Calculated as a difference between the target dispatching time (Message.when) // and the actual dispatching time. // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. optional int64 recorded_total_delay_millis = 14; // Max dispatching delay of all processed messages. // Calculated as a difference between the target dispatching time (Message.when) // and the actual dispatching time. optional int64 recorded_max_delay_millis = 15; } /** * Pulls disk information, such as write speed and latency. */ message DiskStats { // Time taken to open, write 512B to, and close a file. // -1 if error performing the check. optional int64 data_write_latency_millis = 1; optional bool file_based_encryption = 2; // Recent disk write speed in kB/s. // -1 if error querying storageed. // 0 if data is unavailable. optional int32 recent_disk_write_speed = 3; } /** * Free and total bytes of the Data, Cache, and System partition. */ message DirectoryUsage { enum Directory { UNKNOWN = 0; DATA = 1; CACHE = 2; SYSTEM = 3; } optional Directory directory = 1; optional int64 free_bytes = 2; optional int64 total_bytes = 3; } /** * Size of an application: apk size, data size, and cache size. * Reads from a cached file produced daily by DiskStatsLoggingService.java. * Information is only reported for apps with the primary user (user 0). * Sizes are aggregated by package name. */ message AppSize { // Including uids will involve modifying diskstats logic. optional string package_name = 1; // App size in bytes. -1 if unavailable. optional int64 app_size_bytes = 2; // App data size in bytes. -1 if unavailable. optional int64 app_data_size_bytes = 3; // App cache size in bytes. -1 if unavailable. optional int64 app_cache_size_bytes = 4; // Time that the cache file was produced. // Uses System.currentTimeMillis(), which is wall clock time. optional int64 cache_time_millis = 5; } /** * Size of a particular category. Eg: photos, videos. * Reads from a cached file produced daily by DiskStatsLoggingService.java. */ message CategorySize { enum Category { UNKNOWN = 0; APP_SIZE = 1; APP_DATA_SIZE = 2; APP_CACHE_SIZE = 3; PHOTOS = 4; VIDEOS = 5; AUDIO = 6; DOWNLOADS = 7; SYSTEM = 8; OTHER = 9; } optional Category category = 1; // Category size in bytes. optional int64 size_bytes = 2; // Time that the cache file was produced. // Uses System.currentTimeMillis(), which is wall clock time. optional int64 cache_time_millis = 3; } /** * Pulls per uid I/O stats. The stats are cumulative since boot. * * Read/write bytes are I/O events from a storage device * Read/write chars are data requested by read/write syscalls, and can be * satisfied by caching. * * Pulled from StatsCompanionService, which reads proc/uid_io/stats. */ message DiskIo { optional int32 uid = 1 [(is_uid) = true]; optional int64 fg_chars_read = 2; optional int64 fg_chars_write = 3; optional int64 fg_bytes_read = 4; optional int64 fg_bytes_write = 5; optional int64 bg_chars_read = 6; optional int64 bg_chars_write = 7; optional int64 bg_bytes_read = 8; optional int64 bg_bytes_write = 9; optional int64 fg_fsync = 10; optional int64 bg_fsync= 11; } /** * Pulls the number of fingerprints for each user. * * Pulled from StatsCompanionService, which queries Manager. */ message NumFingerprintsEnrolled { // The associated user. Eg: 0 for owners, 10+ for others. // Defined in android/os/UserHandle.java optional int32 user = 1; // Number of fingerprints registered to that user. optional int32 num_fingerprints_enrolled = 2; } /** * Pulls the number of faces for each user. * * Pulled from StatsCompanionService, which queries Manager. */ message NumFacesEnrolled { // The associated user. Eg: 0 for owners, 10+ for others. // Defined in android/os/UserHandle.java optional int32 user = 1; // Number of faces registered to that user. optional int32 num_faces_enrolled = 2; } /** * A mapping of role holder -> role */ message RoleHolder { // uid of the role holder optional int32 uid = 1 [(is_uid) = true]; // package name of the role holder optional string package_name = 2; // the role held optional string role = 3; } message AggStats { // 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 [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 [deprecated = true]; optional ProcessStateAggregated process_state_aggregated = 10; // Millisecond uptime duration spent in this state 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 [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 [deprecated = true]; // USS is memory shared between processes, divided evenly for accounting optional AggStats uss = 7 [deprecated = true]; // RSS is memory resident for this process optional AggStats rss = 8; } // Next Tag: 8 message ProcessStatsProto { // Name of process. optional string process = 1; // Uid of the process. optional int32 uid = 2 [(is_uid) = true]; // Information about how often kills occurred message Kill { // Count of excessive CPU kills optional int32 cpu = 1; // Count of kills when cached optional int32 cached = 2; // PSS stats during cached kill optional AggStats cached_pss = 3; } optional Kill kill = 3 [deprecated = true]; // Time and memory spent in various states. repeated ProcessStatsStateProto states = 5; // 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 { // Operate enum: Started, Foreground, Bound, Executing optional android.service.procstats.ServiceOperationState operation = 1; // Number of times the service was in this operation. optional int32 count = 2; // Information about a state the service can be in. message StateStats { // Screen state enum. optional android.service.procstats.ScreenState screen_state = 1; // Memory state enum. optional android.service.procstats.MemoryState memory_state = 2; // duration in milliseconds. optional int64 duration_millis = 3; // Millisecond elapsed realtime duration spent in this state optional int64 realtime_duration_millis = 4; } repeated StateStats state_stats = 3; } message PackageServiceStatsProto { // Name of service component. optional string service_name = 1; // The operation stats. // The package_name, package_uid, package_version, service_name will not be set to save space. repeated PackageServiceOperationStatsProto operation_stats = 2; } message PackageAssociationSourceProcessStatsProto { // Uid of the process. optional int32 process_uid = 1; // Process name. optional string process_name = 2; // Package name. optional string package_name = 7; // Total count of the times this association appeared. optional int32 total_count = 3; // Millisecond uptime total duration this association was around. optional int64 total_duration_millis = 4; // Total count of the times this association became actively impacting its target process. optional int32 active_count = 5; // Information on one source in this association. message StateStats { // Process state enum. optional android.service.procstats.ProcessState process_state = 1; // Millisecond uptime duration spent in this state optional int64 duration_millis = 2; // Millisecond elapsed realtime duration spent in this state optional int64 realtime_duration_mmillis = 3; } repeated StateStats active_state_stats = 6; } message PackageAssociationProcessStatsProto { // Name of the target component. optional string component_name = 1; // Information on one source in this association. repeated PackageAssociationSourceProcessStatsProto sources = 2; } message ProcessStatsPackageProto { // Name of package. optional string package = 1; // Uid of the package. optional int32 uid = 2; // Version of the package. optional int64 version = 3; // Stats for each process running with the package loaded in to it. repeated ProcessStatsProto process_stats = 4; // Stats for each of the package's services. repeated PackageServiceStatsProto service_stats = 5; // Stats for each association with the package. repeated PackageAssociationProcessStatsProto association_stats = 6; } message ProcessStatsSectionProto { // Elapsed realtime at start of report. optional int64 start_realtime_millis = 1; // Elapsed realtime at end of report. optional int64 end_realtime_millis = 2; // CPU uptime at start of report. optional int64 start_uptime_millis = 3; // CPU uptime at end of report. optional int64 end_uptime_millis = 4; // System runtime library. e.g. "libdvm.so", "libart.so". optional string runtime = 5; // whether kernel reports swapped pss. optional bool has_swapped_pss = 6; // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". enum Status { STATUS_UNKNOWN = 0; STATUS_COMPLETE = 1; STATUS_PARTIAL = 2; STATUS_SHUTDOWN = 3; STATUS_SYSPROPS = 4; } repeated Status status = 7; // Number of pages available of various types and sizes, representation fragmentation. repeated ProcessStatsAvailablePagesProto available_pages = 10; // Stats for each process. repeated ProcessStatsProto process_stats = 8; // Stats for each package. repeated ProcessStatsPackageProto package_stats = 9; } message ProcessStatsAvailablePagesProto { // Node these pages are in (as per /proc/pagetypeinfo) optional int32 node = 1; // Zone these pages are in (as per /proc/pagetypeinfo) optional string zone = 2; // Label for the type of these pages (as per /proc/pagetypeinfo) optional string label = 3; // Distribution of number of pages available by order size. First entry in array is // order 0, second is order 1, etc. Each order increase is a doubling of page size. repeated int32 pages_per_order = 4; } /** * Pulled from ProcessStatsService.java */ message ProcStats { optional ProcessStatsSectionProto proc_stats_section = 1 [(log_mode) = MODE_BYTES]; // 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; } /** * Pulled from ProcessStatsService.java */ message ProcStatsPkgProc { optional ProcessStatsSectionProto proc_stats_section = 1 [(log_mode) = MODE_BYTES]; } // Next Tag: 2 message PackageRemoteViewInfoProto { optional string package_name = 1; // add per-package additional info here (like channels) } // Next Tag: 2 message NotificationRemoteViewsProto { repeated PackageRemoteViewInfoProto package_remote_view_info = 1; } /** * Pulled from NotificationManagerService.java */ message NotificationRemoteViews { optional NotificationRemoteViewsProto notification_remote_views = 1 [(log_mode) = MODE_BYTES]; } /** * 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 [(log_mode) = MODE_BYTES]; } /** * 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; optional double cpu_idle = 2; optional double cpu_active = 3; message CpuCluster { optional int32 id = 1; optional double cluster_power = 2; optional int32 cores = 3; repeated int64 speed = 4; repeated double core_power = 5; } repeated CpuCluster cpu_cluster = 40; optional double wifi_scan = 4; optional double wifi_on = 5; optional double wifi_active = 6; optional double wifi_controller_idle = 7; optional double wifi_controller_rx = 8; optional double wifi_controller_tx = 9; repeated double wifi_controller_tx_levels = 10; optional double wifi_controller_operating_voltage = 11; optional double bluetooth_controller_idle = 12; optional double bluetooth_controller_rx = 13; optional double bluetooth_controller_tx = 14; optional double bluetooth_controller_operating_voltage = 15; optional double modem_controller_sleep = 16; optional double modem_controller_idle = 17; optional double modem_controller_rx = 18; repeated double modem_controller_tx = 19; optional double modem_controller_operating_voltage = 20; optional double gps_on = 21; repeated double gps_signal_quality_based = 22; optional double gps_operating_voltage = 23; optional double bluetooth_on = 24; optional double bluetooth_active = 25; optional double bluetooth_at_cmd = 26; optional double ambient_display = 27; optional double screen_on = 28; optional double radio_on = 29; optional double radio_scanning = 30; optional double radio_active = 31; optional double screen_full = 32; optional double audio = 33; optional double video = 34; optional double flashlight = 35; optional double memory = 36; optional double camera = 37; optional double wifi_batched_scan = 38; optional double battery_capacity = 39; } /** * power_profile.xml and other constants for power model calculations. * Pulled from PowerProfile.java */ message PowerProfile { optional PowerProfileProto power_profile = 1 [(log_mode) = MODE_BYTES]; } /** * Logs when a user restriction was added or removed. * * Logged from: * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java */ message UserRestrictionChanged { // The raw string of the user restriction as defined in UserManager. // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. optional string restriction = 1; // Whether the restriction is enabled or disabled. optional bool enabled = 2; } /** * Pulls process user time and system time. Puller takes a snapshot of all pids * in the system and returns cpu stats for those that are working at the time. * Dead pids will be dropped. Kernel processes are excluded. * Min cool-down is 5 sec. */ message ProcessCpuTime { optional int32 uid = 1 [(is_uid) = true]; optional string process_name = 2; // Process cpu time in user space, cumulative from boot/process start optional int64 user_time_millis = 3; // Process cpu time in system space, cumulative from boot/process start optional int64 system_time_millis = 4; } /** * Pulls the CPU usage for each thread. * * Read from /proc/$PID/task/$TID/time_in_state files. * * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and * time_in_state files not being present on some phones, have not been addressed. These should be * considered before a public release. */ message CpuTimePerThreadFreq { // UID that owns the process. optional int32 uid = 1 [(is_uid) = true]; // ID of the process. optional int32 process_id = 2; // ID of the thread. optional int32 thread_id = 3; // Name of the process taken from `/proc/$PID/cmdline`. optional string process_name = 4; // Name of the thread taken from `/proc/$PID/task/$TID/comm` optional string thread_name = 5; // Report eight different frequencies, and how much time is spent in each frequency. Frequencies // are given in KHz, and time is given in milliseconds since the thread started. All eight // frequencies are given here as the alternative is sending eight separate atoms. This method // significantly reduces the amount of data created optional int32 frequency1_khz = 6; optional int32 time1_millis = 7; optional int32 frequency2_khz = 8; optional int32 time2_millis = 9; optional int32 frequency3_khz = 10; optional int32 time3_millis = 11; optional int32 frequency4_khz = 12; optional int32 time4_millis = 13; optional int32 frequency5_khz = 14; optional int32 time5_millis = 15; optional int32 frequency6_khz = 16; optional int32 time6_millis = 17; optional int32 frequency7_khz = 18; optional int32 time7_millis = 19; optional int32 frequency8_khz = 20; optional int32 time8_millis = 21; } /** * Pulls information about the device's build. */ message BuildInformation { // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. optional string fingerprint = 1; // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. optional string brand = 2; // Build.PRODUCT. The name of the overall product. optional string product = 3; // Build.DEVICE. The name of the industrial design. optional string device = 4; // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". optional string version_release = 5; // Build.ID. E.g. a label like "M4-rc20". optional string id = 6; // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to // represent this build. optional string version_incremental = 7; // Build.TYPE. The type of build, like "user" or "eng". optional string type = 8; // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". optional string tags = 9; } /** * Logs information about mismatched caller for content capture. * * Logged from: * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java */ message ContentCaptureCallerMismatchReported { optional string intended_package = 1; optional string calling_package = 2; } /** * Logs information about content capture service events. * * Logged from: * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java */ message ContentCaptureServiceEvents { // The type of event. enum Event { UNKNOWN = 0; ON_CONNECTED = 1; ON_DISCONNECTED = 2; 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; ON_REMOTE_SERVICE_DIED = 16; } optional Event event = 1; // component/package of content capture service. optional string service_info = 2; // component/package of target. // it's a concatenated list of component/package for SET_WHITELIST event // separated by " ". optional string target_info = 3; } /** * Logs information about content capture session events. * * Logged from: * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java */ message ContentCaptureSessionEvents { // The type of event. enum Event { UNKNOWN = 0; ON_SESSION_STARTED = 1; ON_SESSION_FINISHED = 2; SESSION_NOT_CREATED = 3; } optional int32 session_id = 1; optional Event event = 2; // (n/a on session finished) optional int32 state_flags = 3; // component/package of content capture service. optional string service_info = 4; // component/package of app. // (n/a on session finished) optional string app_info = 5; optional bool is_child_session = 6; } /** * Logs information about session being flushed. * * Logged from: * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java */ message ContentCaptureFlushed { optional int32 session_id = 1; // component/package of content capture service. optional string service_info = 2; // component/package of app. optional string app_info = 3; // session start/finish events optional int32 child_session_started = 4; optional int32 child_session_finished = 5; // count of view events. optional int32 view_appeared_count = 6; optional int32 view_disappeared_count = 7; optional int32 view_text_changed_count = 8; // Flush stats. optional int32 max_events = 9; optional int32 idle_flush_freq = 10; optional int32 text_flush_freq = 11; optional int32 flush_reason = 12; } /** * Pulls on-device BatteryStats power use calculations for the overall device. */ message DeviceCalculatedPowerUse { // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since // BatteryStats last reset (i.e. roughly since device was last significantly charged). // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). optional int64 computed_power_nano_amp_secs = 1; } /** * Pulls on-device BatteryStats power use calculations broken down by uid. * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use * that is attributed to non-uid items. They must all be included to get the total power use. */ message DeviceCalculatedPowerBlameUid { // Uid being blamed. Note: isolated uids have already been mapped to host uid. optional int32 uid = 1 [(is_uid) = true]; // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since // BatteryStats last reset (i.e. roughly since device was last significantly charged). optional int64 power_nano_amp_secs = 2; } /** * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by * drain type. * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that * is attributed uids. They must all be included to get the total power use. */ message DeviceCalculatedPowerBlameOther { // The type of item whose power use is being reported. enum DrainType { AMBIENT_DISPLAY = 0; // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. BLUETOOTH = 2; CAMERA = 3; // Cell-standby CELL = 4; FLASHLIGHT = 5; IDLE = 6; MEMORY = 7; // Amount that total computed drain exceeded the drain estimated using the // battery level changes and capacity. OVERCOUNTED = 8; PHONE = 9; SCREEN = 10; // Amount that total computed drain was below the drain estimated using the // battery level changes and capacity. UNACCOUNTED = 11; // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. WIFI = 13; } optional DrainType drain_type = 1; // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since // BatteryStats last reset (i.e. roughly since device was last significantly charged). optional int64 power_nano_amp_secs = 2; } // Keep in sync with frameworks/base/core/proto/android/os/batteryusagestats.proto /** * Represents a device's BatteryUsageStats, with power usage information about the device * and each app. */ message BatteryUsageStatsAtomsProto { // The session start timestamp in UTC milliseconds since January 1, 1970, per Date#getTime(). // All data is no older than this time. optional int64 session_start_millis = 1; // The session end timestamp in UTC milliseconds since January 1, 1970, per Date#getTime(). // All data is no more recent than this time. optional int64 session_end_millis = 2; // Length that the reported data covered. This usually will be equal to the entire session, // session_end_millis - session_start_millis, but may not be if some data during this time frame // is missing. optional int64 session_duration_millis = 3; // Represents usage of a consumer, storing all of its power component usage. message BatteryConsumerData { // Total power consumed by this BatteryConsumer (including all of its PowerComponents). // May not equal the sum of the PowerComponentUsage due to under- or over-estimations. // Multiply by 1/36 to obtain mAh. optional int64 total_consumed_power_deci_coulombs = 1; // Represents power and time usage of a particular power component. message PowerComponentUsage { // Holds android.os.PowerComponentEnum, or custom component value between 1000 and 9999. // Evidently, if one attempts to write an int to an enum field that is out of range, it // is treated as 0, so we must make this an int32. optional int32 component = 1; // Power consumed by this component. Multiply by 1/36 to obtain mAh. optional int64 power_deci_coulombs = 2; optional int64 duration_millis = 3; } repeated PowerComponentUsage power_components = 2; } // Total power usage for the device during this session. optional BatteryConsumerData device_battery_consumer = 4; // Power usage by a uid during this session. message UidBatteryConsumer { optional int32 uid = 1 [(is_uid) = true]; optional BatteryConsumerData battery_consumer_data = 2; optional int64 time_in_foreground_millis = 3; optional int64 time_in_background_millis = 4; } repeated UidBatteryConsumer uid_battery_consumers = 5; // Sum of all discharge percentage point drops during the reported session. optional int32 session_discharge_percentage = 6; } /** * Pulls on-device BatteryStats on-battery power use calculations, in the form of BatteryUsageStats, * using the best data available. * * Includes the data since the last time statsd pulled this atom (i.e. since the * last-BatteryStats-reset-prior-to-last-statsd-pull) until the most recent BatteryStats reset. * * Does NOT include data after the most recent reset (use BatteryUsageStatsSinceReset too for that). * * Pulled from BatteryManager.getBatteryUsageStats(). */ message BatteryUsageStatsBeforeReset { optional BatteryUsageStatsAtomsProto battery_usage_stats = 1 [(log_mode) = MODE_BYTES]; } /** * Pulls on-device BatteryStats on-battery power use calculations, in the form of BatteryUsageStats, * using the best data available. * * Includes all data since the most recent BatteryStats reset event, but none prior to it. * * Pulled from BatteryManager.getBatteryUsageStats(). */ message BatteryUsageStatsSinceReset { optional BatteryUsageStatsAtomsProto battery_usage_stats = 1 [(log_mode) = MODE_BYTES]; } /** * Pulls on-device BatteryStats on-battery power use calculations, in the form of BatteryUsageStats, * using only PowerProfile Model data (even if better data is available). * * Includes all data since the most recent BatteryStats reset event, but none prior to it. * * @see android.os.BatteryUsageStatsQuery#FLAG_BATTERY_USAGE_STATS_POWER_PROFILE_MODEL * Pulled from BatteryManager.getBatteryUsageStats(). */ message BatteryUsageStatsSinceResetUsingPowerProfileModel { optional BatteryUsageStatsAtomsProto battery_usage_stats = 1 [(log_mode) = MODE_BYTES]; } /** * Logs device policy features. * * Logged from: * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ */ message DevicePolicyEvent { // The event id - unique for each event. optional android.stats.devicepolicy.EventId event_id = 1; // The admin package name. optional string admin_package_name = 2; // A generic integer parameter. optional int32 integer_value = 3; // A generic boolean parameter. optional bool boolean_value = 4; // A parameter specifying a time period in milliseconds. optional uint64 time_period_millis = 5; // A parameter specifying a list of package names, bundle extras or string parameters. optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; } /** * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUILaunchReported { optional android.stats.docsui.LaunchAction launch_action = 1; optional bool has_initial_uri = 2; optional android.stats.docsui.MimeType mime_type = 3; optional android.stats.docsui.Root initial_root = 4; } /** * Logs root/app visited event in file managers/picker. Call this when the user * taps on root/app in hamburger menu. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUIRootVisitedReported { optional android.stats.docsui.ContextScope scope = 1; optional android.stats.docsui.Root root = 2; } /** * Logs file operation stats. Call this when a file operation has completed. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUIFileOperationReported { optional android.stats.docsui.Provider provider = 1; optional android.stats.docsui.FileOperation file_op = 2; } /** * Logs file operation stats. Call this when a copy/move operation has completed with a specific * mode. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUIFileOperationCopyMoveModeReported { optional android.stats.docsui.FileOperation file_op = 1; optional android.stats.docsui.CopyMoveOpMode mode = 2; } /** * Logs file sub operation stats. Call this when a file operation has failed. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUIFileOperationFailureReported { optional android.stats.docsui.Authority authority = 1; optional android.stats.docsui.SubFileOperation sub_op = 2; } /** * Logs the cancellation of a file operation. Call this when a job is canceled * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUIFileOperationCanceledReported { optional android.stats.docsui.FileOperation file_op = 1; } /** * Logs startup time in milliseconds. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUIStartupMsReported { optional int32 startup_millis = 1; } /** * Logs the action that was started by user. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUIUserActionReported { optional android.stats.docsui.UserAction action = 1; } /** * Logs the invalid type when invalid scoped access is requested. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java */ message DocsUIInvalidScopedAccessRequestReported { optional android.stats.docsui.InvalidScopedAccess type = 1; } /** * Logs the package name that launches docsui picker mode. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUIPickerLaunchedFromReported { optional string package_name = 1; } /** * Logs the search type. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUISearchTypeReported { optional android.stats.docsui.SearchType search_type = 1; } /** * Logs the search mode. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUISearchModeReported { optional android.stats.docsui.SearchMode search_mode = 1; } /** * Logs the pick result information. * * Logged from: * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java */ message DocsUIPickResultReported { optional int32 total_action_count = 1; optional int64 duration_millis = 2; optional int32 file_count= 3; optional bool is_searching = 4; optional android.stats.docsui.Root picked_from = 5; optional android.stats.docsui.MimeType mime_type = 6; 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. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message AppCompacted { // The pid of the process being compacted. optional int32 pid = 1; // The name of the process being compacted. optional string process_name = 2; // The type of compaction. enum Action { UNKNOWN = 0; SOME = 1; FULL = 2; PERSISTENT = 3; BFGS = 4; } optional Action action = 3; // Total RSS in kilobytes consumed by the process prior to compaction. optional int64 before_rss_total_kilobytes = 4; // File RSS in kilobytes consumed by the process prior to compaction. optional int64 before_rss_file_kilobytes = 5; // Anonymous RSS in kilobytes consumed by the process prior to compaction. optional int64 before_rss_anon_kilobytes = 6; // Swap in kilobytes consumed by the process prior to compaction. optional int64 before_swap_kilobytes = 7; // Total RSS in kilobytes consumed by the process after compaction. optional int64 after_rss_total_kilobytes = 8; // File RSS in kilobytes consumed by the process after compaction. optional int64 after_rss_file_kilobytes = 9; // Anonymous RSS in kilobytes consumed by the process after compaction. optional int64 after_rss_anon_kilobytes = 10; // Swap in kilobytes consumed by the process after compaction. optional int64 after_swap_kilobytes = 11; // The time taken to perform compaction in milliseconds. optional int64 time_to_compact_millis = 12; // The last compaction action performed for this app. optional Action last_action = 13; // The last time that compaction was attempted on this process in milliseconds // since boot, not including sleep (see SystemClock.uptimeMillis()). optional int64 last_compact_timestamp_ms_since_boot = 14; // The "setAdj" (i.e. previous) oom_score_adj at the time of compaction. optional int32 oom_score_adj = 15; // The process state at the time of compaction. optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; // Free ZRAM in kilobytes before compaction. optional int64 before_zram_free_kilobytes = 17; // Free ZRAM in kilobytes after compaction. optional int64 after_zram_free_kilobytes = 18; } /** * Logs when a Tethering event occurs. * */ message NetworkTetheringReported { // tethering error code optional android.stats.connectivity.ErrorCode error_code = 1; // tethering downstream type optional android.stats.connectivity.DownstreamType downstream_type = 2; // transport type of upstream network optional android.stats.connectivity.UpstreamType upstream_type = 3; // The user type of Tethering optional android.stats.connectivity.UserType user_type= 4; } /** * Logs a DNS lookup operation initiated by the system resolver on behalf of an application * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). * * The NetworkDnsEventReported message represents the entire lookup operation, which may * result one or more queries to the recursive DNS resolvers. Those are individually logged * in DnsQueryEvents to enable computing error rates and network latency and timeouts * broken up by query type, transport, network interface, etc. */ message NetworkDnsEventReported { optional android.stats.dnsresolver.EventType event_type = 1; optional android.stats.dnsresolver.ReturnCode return_code = 2; // The latency in microseconds of the entire DNS lookup operation. optional int32 latency_micros = 3; // Only valid for event_type = EVENT_GETADDRINFO. optional int32 hints_ai_flags = 4; // Flags passed to android_res_nsend() defined in multinetwork.h // Only valid for event_type = EVENT_RESNSEND. optional int32 res_nsend_flags = 5; optional android.stats.dnsresolver.NetworkType network_type = 6; // The DNS over TLS mode on a specific netId. optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; // Additional pass-through fields opaque to statsd. // The DNS resolver Mainline module can add new fields here without requiring an OS update. optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom. optional int32 sampling_rate_denom = 9; } /** * logs the CapportApiData info * Logged from: * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java */ message CapportApiData { // The TTL of the network connection provided by captive portal optional int32 remaining_ttl_secs = 1; // The limit traffic data of the network connection provided by captive portal optional int32 remaining_bytes = 2; // Is portal url option included in the DHCP packet (Yes, No) optional bool has_portal_url = 3; // Is venue info (e.g. store info, maps, flight status) included (Yes, No) optional bool has_venue_info = 4; } /** * logs a network Probe Event * Logged from: * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java */ message ProbeEvent { // The probe type (http or https, or captive portal API...) optional android.stats.connectivity.ProbeType probe_type = 1; // The latency in microseconds of the probe event optional int32 latency_micros = 2; // The result of the probe event optional android.stats.connectivity.ProbeResult probe_result = 3; // The CaptivePortal API info optional CapportApiData capport_api_data = 4; } /** * log each ProbeEvent in ProbeEvents * Logged from: * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java */ message ProbeEvents { // Record probe event during the validation repeated ProbeEvent probe_event = 1; } /** * The DHCP (Dynamic Host Configuration Protocol) session info * Logged from: * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java */ message DhcpSession { // The DHCP Feature(s) enabled in this session repeated android.stats.connectivity.DhcpFeature used_features = 1; // The discover packet (re)transmit count optional int32 discover_count = 2; // The request packet (re)transmit count optional int32 request_count = 3; // The IPv4 address conflict count // (only be meaningful when duplicate address detection is enabled) optional int32 conflict_count = 4; // The DHCP packet parsing error code in this session // (defined in android.net.metrics.DhcpErrorEvent) repeated android.stats.connectivity.DhcpErrorCode error_code = 5; // The result of DHCP hostname transliteration optional android.stats.connectivity.HostnameTransResult ht_result = 6; } /** * Logs Network IP provisioning event * Logged from: * packages/modules/NetworkStack/src/com/android/networkstack/metrics/NetworkIpProvisioningMetrics.java */ message NetworkIpProvisioningReported { // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) optional android.stats.connectivity.TransportType transport_type = 1; // The latency in microseconds of IP Provisioning over IPV4 optional int32 ipv4_latency_micros = 2; // The latency in microseconds of IP Provisioning over IPV6 optional int32 ipv6_latency_micros = 3; // The time duration between provisioning start and end (success or failure) optional int64 provisioning_duration_micros = 4; // The specific disconnect reason for this IP provisioning optional android.stats.connectivity.DisconnectCode disconnect_code = 5; // Log DHCP session info (Only valid for IPv4) optional DhcpSession dhcp_session = 6 [(log_mode) = MODE_BYTES]; // The random number between 0 ~ 999 for sampling optional int32 random_number = 7; } /** * Logs Network DHCP Renew event * Logged from: * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java */ message NetworkDhcpRenewReported { // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) optional android.stats.connectivity.TransportType transport_type = 1; // The request packet (re)transmit count optional int32 request_count = 2; // The latency in microseconds of DHCP Renew optional int32 latency_micros = 3; // The DHCP error code is defined in android.net.metrics.DhcpErrorEvent optional android.stats.connectivity.DhcpErrorCode error_code = 4; // The result of DHCP renew optional android.stats.connectivity.DhcpRenewResult renew_result = 5; // The random number between 0 ~ 999 for sampling optional int32 random_number = 6; } /** * Logs Network Validation event * Logged from: * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java */ message NetworkValidationReported { // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) optional android.stats.connectivity.TransportType transport_type = 1; // Record each probe event optional ProbeEvents probe_events = 2 [(log_mode) = MODE_BYTES]; // The result of the network validation optional android.stats.connectivity.ValidationResult validation_result = 3; // The latency in microseconds of network validation optional int32 latency_micros = 4; // The validation index (the first validation attempt or second, third...) optional int32 validation_index = 5; // The random number between 0 ~ 999 for sampling optional int32 random_number = 6; } /** * Logs NetworkStack Quirk event * Logged from: * packages/modules/NetworkStack/src/com/android/networkstack/ */ message NetworkStackQuirkReported { // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) optional android.stats.connectivity.TransportType transport_type = 1; // Record each Quirk event optional android.stats.connectivity.NetworkQuirkEvent event = 2; } /** * Logs Neighbor Unreachability Detection event * Logged from: * packages/modules/NetworkStack/src/com/android/networkstack/metrics/NetworkIpReachabilityMonitorMetrics.java */ message NetworkIpReachabilityMonitorReported { // Neighbor Unreachability Detection event. optional android.stats.connectivity.NudEventType event_type = 1; // NUD probe based on IPv4 ARP or IPv6 ND packet. optional android.stats.connectivity.IpType ip_type = 2; // NUD neighbor type, default gateway, DNS server or both. optional android.stats.connectivity.NudNeighborType neighbor_type = 3; } /** * Logs when a data stall event occurs. * * Log from: * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java */ message DataStallEvent { // Data stall evaluation type. // See packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. optional int32 evaluation_type = 1; // See definition in data_stall_event.proto. optional com.android.server.connectivity.ProbeResult validation_result = 2; // See definition in data_stall_event.proto. optional android.net.Transport network_type = 3; // See definition in data_stall_event.proto. optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; // See definition in data_stall_event.proto. optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; // See definition in data_stall_event.proto. optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; // The tcp packets fail rate from the latest tcp polling. optional int32 tcp_fail_rate = 7; // Number of packets sent since the last received packet. optional int32 tcp_sent_since_last_recv = 8; } /* * Logs when RescueParty resets some set of experiment flags. * * Logged from: * frameworks/base/services/core/java/com/android/server/RescueParty.java */ message RescuePartyResetReported { // The rescue level of this reset. A value of 0 indicates missing or unknown level information. optional int32 rescue_level = 1; } /** * Logs when signed config is received from an APK, and if that config was applied successfully. * Logged from: * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java */ message SignedConfigReported { enum Type { UNKNOWN_TYPE = 0; GLOBAL_SETTINGS = 1; } optional Type type = 1; // The final status of the signed config received. enum Status { UNKNOWN_STATUS = 0; APPLIED = 1; BASE64_FAILURE_CONFIG = 2; BASE64_FAILURE_SIGNATURE = 3; SECURITY_EXCEPTION = 4; INVALID_CONFIG = 5; OLD_CONFIG = 6; SIGNATURE_CHECK_FAILED = 7; NOT_APPLICABLE = 8; SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; } optional Status status = 2; // The version of the signed config processed. optional int32 version = 3; // The package name that the config was extracted from. optional string from_package = 4; enum Key { NO_KEY = 0; DEBUG = 1; PRODUCTION = 2; } // Which key was used to verify the config. optional Key verified_with = 5; } /* * Logs GNSS Network-Initiated (NI) location events. * * Logged from: * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java */ message GnssNiEventReported { // The type of GnssNiEvent. enum EventType { UNKNOWN = 0; NI_REQUEST = 1; NI_RESPONSE = 2; } optional EventType event_type = 1; // An ID generated by HAL to associate NI notifications and UI responses. optional int32 notification_id = 2; // A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc. optional android.server.location.GnssNiType ni_type = 3; // NI requires notification. optional bool need_notify = 4; // NI requires verification. optional bool need_verify = 5; // NI requires privacy override, no notification/minimal trace. optional bool privacy_override = 6; // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in // seconds. optional int32 timeout = 7; // Default response when timeout. optional android.server.location.GnssUserResponseType default_response = 8; // String representing the requester of the network inititated location request. optional string requestor_id = 9; // Notification message text string representing the service(for eg. SUPL-service) who sent the // network initiated location request. optional string text = 10; // requestorId decoding scheme. optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; // Notification message text decoding scheme. optional android.server.location.GnssNiEncodingType text_encoding = 12; // True if SUPL ES is enabled. optional bool is_supl_es_enabled = 13; // True if GNSS location is enabled. optional bool is_location_enabled = 14; // GNSS NI responses which define the response in NI structures. optional android.server.location.GnssUserResponseType user_response = 15; } /** * Logs GNSS non-framework (NFW) location notification. * * Logged from: * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java */ message GnssNfwNotificationReported { // Package name of the Android proxy application representing the non-framework entity that // requested location. Set to empty string if unknown. optional string proxy_app_package_name = 1; // Protocol stack that initiated the non-framework location request. optional android.server.location.NfwProtocolStack protocol_stack = 2; // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, // set to empty string. This field is opaque to the framework and used for logging purposes. optional string other_protocol_stack_name = 3; // Source initiating/receiving the location information. optional android.server.location.NfwRequestor requestor = 4; // Identity of the endpoint receiving the location information. For example, carrier name, OEM // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework // and used for logging purposes. optional string requestor_id = 5; // Indicates whether location information was provided for this request. optional android.server.location.NfwResponseType response_type = 6; // True if the device is in user initiated emergency session. optional bool in_emergency_mode = 7; // True if cached location is provided. optional bool is_cached_location = 8; // True if proxy app permission mismatch between framework and GNSS HAL. optional bool is_permission_mismatched = 9; } /** * Logs GNSS configuration as defined in IGnssConfiguration.hal. * * Logged from: * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java */ message GnssConfigurationReported { // SUPL host name. optional string supl_host = 1; // SUPL port number. optional int32 supl_port = 2; // C2K host name. optional string c2k_host = 3; // C2K port number. optional int32 c2k_port = 4; // The SUPL version requested by Carrier. optional int32 supl_ver = 5; // The SUPL mode. optional android.server.location.SuplMode supl_mode = 6; // True if NI emergency SUPL restrictions is enabled. optional bool supl_es = 7; // LTE Positioning Profile settings optional android.server.location.LppProfile lpp_profile = 8; // Positioning protocol on A-Glonass system. optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; // True if emergency PDN is used. Otherwise, regular PDN is used. optional bool use_emergency_pdn_for_emergency_supl= 10; // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. optional android.server.location.GpsLock gps_lock = 11; // Number of seconds to extend the emergency session duration post emergency call. optional int32 es_extension_sec = 12; // The full list of package names of proxy Android applications representing the non-framework // location access entities (on/off the device) for which the framework user has granted // non-framework location access permission. The package names are concatenated in one string // with spaces as separators. optional string enabled_proxy_app_package_name_list = 13; } /** * Logs when a NFC device's error occurred. * Logged from: * system/nfc/src/nfc/nfc/nfc_ncif.cc * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java */ message NfcErrorOccurred { enum Type { UNKNOWN = 0; CMD_TIMEOUT = 1; ERROR_NOTIFICATION = 2; AID_OVERFLOW = 3; } optional Type type = 1; // If it's nci cmd timeout, log the timeout command. optional uint32 nci_cmd = 2; optional uint32 error_ntf_status_code = 3; } /** * Logs when a NFC device's state changed event * Logged from: * packages/apps/Nfc/src/com/android/nfc/NfcService.java */ message NfcStateChanged { enum State { UNKNOWN = 0; OFF = 1; ON = 2; ON_LOCKED = 3; // Secure Nfc enabled. CRASH_RESTART = 4; // NfcService watchdog timeout restart. } optional State state = 1; } /** * Logs when a NFC Beam Transaction occurred. * Logged from: * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java */ message NfcBeamOccurred { enum Operation { UNKNOWN = 0; SEND = 1; RECEIVE = 2; } optional Operation operation = 1; } /** * Logs when a NFC Card Emulation Transaction occurred. * Logged from: * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java */ message NfcCardemulationOccurred { enum Category { UNKNOWN = 0; HCE_PAYMENT = 1; HCE_OTHER = 2; OFFHOST = 3; } // Transaction belongs to HCE payment or HCE other category, or offhost. optional Category category = 1; // SeName from transaction: SIMx, eSEx, HCE, HCEF. optional string se_name = 2; } /** * Logs when a NFC Tag event occurred. * Logged from: * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java */ message NfcTagOccurred { enum Type { UNKNOWN = 0; URL = 1; BT_PAIRING = 2; PROVISION = 3; WIFI_CONNECT = 4; APP_LAUNCH = 5; OTHERS = 6; } optional Type type = 1; } /** * Logs when Hce transaction triggered * Logged from: * system/nfc/src/nfc/nfc/nfc_ncif.cc */ message NfcHceTransactionOccurred { // The latency period(in microseconds) it took for the first HCE data // exchange. optional uint32 latency_micros = 1; } /** * Logs when SecureElement state event changed * Logged from: * packages/apps/SecureElement/src/com/android/se/Terminal.java */ message SeStateChanged { enum State { UNKNOWN = 0; INITIALIZED = 1; DISCONNECTED = 2; CONNECTED = 3; HALCRASH = 4; } optional State state = 1; optional string state_change_reason = 2; // SIMx or eSEx. optional string terminal = 3; } /** * Information about a permission grant request */ message PermissionGrantRequestResultReported { // unique value identifying an API call. A API call might result in multiple of these atoms optional int64 request_id = 1; // UID of package requesting the permission grant optional int32 uid = 2 [(is_uid) = true]; // Name of package requesting the permission grant optional string package_name = 3; // The permission to be granted optional string permission_name = 4; // If the permission was explicitly requested via the API or added by the system optional bool is_implicit = 5; enum Result { UNDEFINED = 0; // permission request was ignored IGNORED = 1; // permission request was ignored because it was user fixed IGNORED_USER_FIXED = 2; // permission request was ignored because it was policy fixed IGNORED_POLICY_FIXED = 3; // permission was granted by user action USER_GRANTED = 4; // permission was automatically granted AUTO_GRANTED = 5; // permission was denied by user action USER_DENIED = 6; // permission was denied with prejudice by the user USER_DENIED_WITH_PREJUDICE = 7; // permission was automatically denied 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; } /** * Logs when Omapi API used * Logged from: * packages/apps/SecureElement/src/com/android/se/Terminal.java */ message SeOmapiReported { enum Operation { UNKNOWN = 0; OPEN_CHANNEL = 1; } optional Operation operation = 1; // SIMx or eSEx. optional string terminal = 2; optional string package_name = 3; } /** * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. * The dispatch latency is the dispatchClockTime - enqueueClockTime. * Logged from: * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java */ message BroadcastDispatchLatencyReported { optional int64 dispatch_latency_millis = 1; } /** * Logs AttentionManagerService attention check result. * * Logged from: * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java */ message AttentionManagerServiceResultReported { // See core/java/android/service/attention/AttentionService.java enum AttentionCheckResult { UNKNOWN = 20; ATTENTION_SUCCESS_ABSENT = 0; ATTENTION_SUCCESS_PRESENT = 1; ATTENTION_FAILURE_UNKNOWN = 2; ATTENTION_FAILURE_CANCELLED = 3; ATTENTION_FAILURE_PREEMPTED = 4; ATTENTION_FAILURE_TIMED_OUT = 5; ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; } optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; } /** * Logs when an adb connection changes state. * * Logged from: * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java */ message AdbConnectionChanged { // The last time this system connected via adb, or 0 if the 'always allow' option was not // previously selected for this system. optional int64 last_connection_time_millis = 1; // The time in ms within which a subsequent connection from an 'always allow' system is allowed // to reconnect via adb without user interaction. optional int64 auth_window_millis = 2; // The state of the adb connection from frameworks/proto_logging/stats/enums/debug/enums.proto. optional android.debug.AdbConnectionStateEnum state = 3; // True if the 'always allow' option was selected for this system. optional bool always_allow = 4; } /* * Logs the reported speech DSP status. * * Logged from: * Vendor audio implementation. */ message SpeechDspStatReported { // The total Speech DSP uptime in milliseconds. optional int32 total_uptime_millis = 1; // The total Speech DSP downtime in milliseconds. optional int32 total_downtime_millis = 2; optional int32 total_crash_count = 3; optional int32 total_recover_count = 4; } /** * Logs USB connector contaminant status. * * Logged from: USB Service. */ message UsbContaminantReported { optional string id = 1; optional android.service.ContaminantPresenceStatus status = 2; } /** * This atom is for debugging purpose. */ message DebugElapsedClock { // Monotically increasing value for each pull. optional int64 pull_count = 1; // Time from System.elapsedRealtime. optional int64 elapsed_clock_millis = 2; // Time from System.elapsedRealtime. optional int64 same_elapsed_clock_millis = 3; // Diff between current elapsed time and elapsed time from previous pull. optional int64 elapsed_clock_diff_millis = 4; enum Type { TYPE_UNKNOWN = 0; ALWAYS_PRESENT = 1; PRESENT_ON_ODD_PULLS = 2; } // Type of behavior for the pulled data. optional Type type = 5; } /** * This atom is for debugging purpose. */ message DebugFailingElapsedClock { // Monotically increasing value for each pull. optional int64 pull_count = 1; // Time from System.elapsedRealtime. optional int64 elapsed_clock_millis = 2; // Time from System.elapsedRealtime. optional int64 same_elapsed_clock_millis = 3; // Diff between current elapsed time and elapsed time from previous pull. optional int64 elapsed_clock_diff_millis = 4; } /** Logs System UI bubbles event changed. * * Logged from: * frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen */ message SplitscreenUIChanged { // User interactions with splitscreen enum Action { UNKNOWN_ACTION = 0; ENTER = 1; EXIT = 2; APP_CHANGE = 3; RESIZE = 4; SWAP = 5; } // The physical side on the device of the split enum Position { UNKNOWN_POSITION = 0; LEFT = 1; RIGHT = 2; TOP = 3; BOTTOM = 4; } // The reason for entering splitscreen enum EnterReason { UNKNOWN_ENTER = 0; OVERVIEW = 1; DRAG_LEFT = 2; DRAG_TOP = 3; DRAG_RIGHT = 4; DRAG_BOTTOM = 5; } // The reason for exiting splitscreen enum ExitReason { UNKNOWN_EXIT = 0; DRAG_DIVIDER = 1; RETURN_HOME = 2; SCREEN_LOCKED = 3; SCREEN_LOCKED_SHOW_ON_TOP = 4; DEVICE_FOLDED = 5; ROOT_TASK_VANISHED = 6; APP_FINISHED = 7; APP_DOES_NOT_SUPPORT_MULTIWINDOW = 8; } // The event action optional Action action = 1; // What triggered splitscreen (if the action is ENTER) optional EnterReason enter_reason = 2; // What triggered leaving splitscreen (if the action is EXIT) optional ExitReason exit_reason = 3; // The ratio of split between the main/side stages optional float split_ratio = 4; // Data about the main stage in split optional Position main_stage_position = 5; optional int32 main_stage_uid = 6 [(is_uid) = true]; // Data about the side stage in split optional Position side_stage_position = 7; optional int32 side_stage_uid = 8 [(is_uid) = true]; // The drag session id (if the enter_trigger was DRAG) optional int32 drag_instance_id = 9; // An identifier used to identify a splitscreen session optional int32 instance_id = 10; } /** Logs System UI bubbles event changed. * * Logged from: * frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles */ message BubbleUIChanged { // The app package that is posting the bubble. optional string package_name = 1; // The notification channel that is posting the bubble. optional string notification_channel = 2; // The notification id associated with the posted bubble. optional int32 notification_id = 3; // The position of the bubble within the bubble stack. optional int32 position = 4; // The total number of bubbles within the bubble stack. optional int32 total_number = 5; // User interactions with the bubble. enum Action { UNKNOWN = 0; POSTED = 1; UPDATED = 2; EXPANDED = 3; COLLAPSED = 4; DISMISSED = 5; STACK_DISMISSED = 6; STACK_MOVED = 7; HEADER_GO_TO_APP = 8; HEADER_GO_TO_SETTINGS = 9; PERMISSION_OPT_IN = 10; PERMISSION_OPT_OUT = 11; PERMISSION_DIALOG_SHOWN = 12; SWIPE_LEFT = 13; SWIPE_RIGHT = 14; STACK_EXPANDED = 15; FLYOUT = 16; } optional Action action = 6; // Normalized screen position of the bubble stack. The range is between 0 and 1. optional float normalized_x_position = 7; optional float normalized_y_position = 8; // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon. optional bool is_unread = 9; // Whether the bubble is an on-going one. optional bool is_ongoing = 10; // Whether the bubble is produced by an app running in foreground. // This is deprecated and the value should be ignored. optional bool is_foreground = 11 [deprecated = true]; } /** * Logs System UI bubbles developer errors. * * Logged from: * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java */ message BubbleDeveloperErrorReported { // The app package that is posting the bubble. optional string package_name = 1; // Bubble developer error type enums. enum Error { UNKNOWN = 0; ACTIVITY_INFO_MISSING = 1; ACTIVITY_INFO_NOT_RESIZABLE = 2; DOCUMENT_LAUNCH_NOT_ALWAYS = 3; } optional Error error = 2 [default = UNKNOWN]; } /** * Logs that a constraint for a scheduled job has changed. * * Logged from: * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java */ message ScheduledJobConstraintChanged { repeated AttributionNode attribution_node = 1; // Name of the job. optional string job_name = 2; optional com.android.server.job.ConstraintEnum constraint = 3; enum State { UNKNOWN = 0; UNSATISFIED = 1; SATISFIED = 2; } optional State state = 4; } /** * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check * returns true. * * Logged from: * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java */ message ScreenTimeoutExtensionReported { // Describes how many times in a row did the power manager reset the screen off timeout. optional uint32 consecutive_timeout_extended_count = 1; } /* * Logs number of milliseconds it takes to start a process. * The definition of app process start time is from the app launch time to * the time that Zygote finished forking the app process and loaded the * application package's java classes. * This metric is different from AppStartOccurred which is for foreground * activity only. * ProcessStartTime can report all processes (both foreground and background) * start time. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message ProcessStartTime { // The uid of the ProcessRecord. optional int32 uid = 1 [(is_uid) = true]; // The process pid. optional int32 pid = 2; // The process name. // Usually package name, "system" for system server. // Provided by ActivityManagerService. optional string process_name = 3; enum StartType { UNKNOWN = 0; WARM = 1; HOT = 2; COLD = 3; } // The start type. optional StartType type = 4; // The elapsed realtime at the start of the process. optional int64 process_start_time_millis = 5; // Number of milliseconds it takes to reach bind application. optional int32 bind_application_delay_millis = 6; // Number of milliseconds it takes to finish start of the process. optional int32 process_start_delay_millis = 7; // hostingType field in ProcessRecord, the component type such as "activity", // "service", "content provider", "broadcast" or other strings. optional string hosting_type = 8; // hostingNameStr field in ProcessRecord. The component class name that runs // in this process. optional string hosting_name = 9; } /** * Track Media Codec usage (nested proto version) * This atom is being deprecated in favor of MediaCodecReported which has a * flattened CodecData to enable field filtering. The data is identical * except MediaCodecReported also has the playback_duration field. * Logged from: * frameworks/av/media/libstagefright/MediaCodec.cpp * frameworks/av/services/mediaanalytics/statsd_codec.cpp */ message MediametricsCodecReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; optional android.stats.mediametrics_message.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; } /** * Track Media Codec usage * This atom is the new version of MediametricsCodecReported and has a * flattened CodecData to enable field filtering. The data is identical * except for the addition of the playback_duration field. * Logged from: * frameworks/av/media/libstagefright/MediaCodec.cpp * frameworks/av/services/mediaanalytics/statsd_codec.cpp */ message MediaCodecReported { optional int64 timestamp_nanos = 1; // The inclusion of package name in a metric should be carefully analyzed to // determine if it is absolutely necessary for system health. It is strongly // discouraged to collect the package name along with other metrics (e.g. // playback duration). optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; optional string codec = 5; optional string mime = 6; optional string mode = 7; optional int32 encoder = 8; optional int32 secure = 9; optional int32 width = 10; optional int32 height = 11; optional int32 rotation = 12; optional int32 crypto = 13; optional int32 profile = 14; optional int32 level = 15; optional int32 max_width = 16; optional int32 max_height = 17; optional int32 error_code = 18; optional string error_state = 19; optional int64 latency_max = 20; optional int64 latency_min = 21; optional int64 latency_avg = 22; optional int64 latency_count = 23; optional int64 latency_unknown = 24; optional int32 queue_input_buffer_error = 25; optional int32 queue_secure_input_buffer_error = 26; optional string bitrate_mode = 27; optional int32 bitrate = 28; optional int64 lifetime_millis = 29; optional int64 playback_duration_seconds = 30; optional string log_session_id = 31; optional int32 channel_count = 32; optional int32 sample_rate = 33; optional int64 video_encode_bytes = 34; optional int64 video_encode_frames = 35; optional int64 video_input_bytes = 36; optional int64 video_input_frames = 37; optional int64 video_encode_duration_us = 38; optional int32 color_format = 39; optional float frame_rate = 40; optional float capture_rate = 41; optional float operating_rate = 42; optional int32 priority = 43; optional int32 video_qp_i_min = 44; optional int32 video_qp_i_max = 45; optional int32 video_qp_p_min = 46; optional int32 video_qp_p_max = 47; optional int32 video_qp_b_min = 48; optional int32 video_qp_b_max = 49; optional int32 original_bitrate = 50; optional int32 shaping_enhanced = 51; optional int32 original_video_qp_i_min = 52; optional int32 original_video_qp_i_max = 53; optional int32 original_video_qp_p_min = 54; optional int32 original_video_qp_p_max = 55; optional int32 original_video_qp_b_min = 56; optional int32 original_video_qp_b_max = 57; // !!! WARNING // Keep synchronized with MediametricsCodecReported.CodecData in // mediametrics_message.proto. // Also keep AStatsEvent serialization synchronized in statsd_codec.cpp // !!! WARNING } /** * Track Media Extractor (pulling video/audio streams out of containers) usage * Logged from: * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp * frameworks/av/services/mediaanalytics/statsd_extractor.cpp */ message MediametricsExtractorReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; optional android.stats.mediametrics_message.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; } /** * Track MediaParser (parsing video/audio streams from containers) usage * Logged from: * * frameworks/av/services/mediametrics/statsd_mediaparser.cpp * frameworks/base/apex/media/framework/jni/android_media_MediaParserJNI.cpp */ message MediametricsMediaParserReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; // MediaParser specific data. /** * The name of the parser selected for parsing the media, or an empty string * if no parser was selected. */ optional string parser_name = 4; /** * Whether the parser was created by name. 1 represents true, and 0 * represents false. */ optional int32 created_by_name = 5; /** * The parser names in the sniffing pool separated by "|". */ optional string parser_pool = 6; /** * The fully qualified name of the last encountered exception, or an empty * string if no exception was encountered. */ optional string last_exception = 7; /** * The size of the parsed media in bytes, or -1 if unknown. Note this value * contains intentional random error to prevent media content * identification. */ optional int64 resource_byte_count = 8; /** * The duration of the media in milliseconds, or -1 if unknown. Note this * value contains intentional random error to prevent media content * identification. */ optional int64 duration_millis = 9; /** * The MIME types of the tracks separated by "|". */ optional string track_mime_types = 10; /** * The tracks' RFC 6381 codec strings separated by "|". */ optional string track_codecs = 11; /** * Concatenation of the parameters altered by the client, separated by "|". */ optional string altered_parameters = 12; /** * The video width in pixels, or -1 if unknown or not applicable. */ optional int32 video_width = 13; /** * The video height in pixels, or -1 if unknown or not applicable. */ optional int32 video_height = 14; /** * Session id for correlating playback metrics. */ optional string log_session_id = 15; } /** * Track how we arbitrate between microphone/input requests. * Logged from * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp */ message MediametricsAudiopolicyReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; optional android.stats.mediametrics_message.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; } /** * Track how we arbitrate between microphone requests. * Logged from * frameworks/av/media/libaudioclient/AudioRecord.cpp * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp */ message MediametricsAudiorecordReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; optional android.stats.mediametrics_message.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; // Android S // Metric log session id, a Base64Url encoded string of a randomly generated 128-bit integer. // An empty string means no session id is set. optional string log_session_id = 6; } /** * Track how we arbitrate between microphone/input requests. * Logged from * frameworks/av/media/libnblog/ReportPerformance.cpp * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp */ message MediametricsAudiothreadReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; optional android.stats.mediametrics_message.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; } /** * Track how we arbitrate between microphone/input requests. * Logged from * frameworks/av/media/libaudioclient/AudioTrack.cpp * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp */ message MediametricsAudiotrackReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; optional android.stats.mediametrics_message.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; // Android S // Metric log session id, a Base64Url encoded string of a randomly generated 128-bit integer. // An empty string means no session id is set. optional string log_session_id = 6; } /** * Track information about DRM framework performance * Logged from * frameworks/av/drm/libmediadrm/DrmHal.cpp * frameworks/av/services/mediaanalytics/statsd_drm.cpp */ message MediametricsMediadrmReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; // vendor+description tell about which DRM plugin is in use on this device optional string vendor = 5; optional string description = 6; // from frameworks/av/drm/libmediadrm/protos/metrics.proto optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; } /** * Track information about the widevine DRM plugin performance * Logged from * vendor/widevine/libwvdrmengine/cdm/metrics * frameworks/av/services/mediaanalytics/statsd_drm.cpp * * TODO b/182382094 -remove after migrated mediadrm metrics * reporting to statsd. */ message MediametricsDrmWidevineReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; } /** * Track information about recordings (e.g. camcorder) * Logged from * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp * frameworks/av/services/mediaanalytics/statsd_recorder.cpp */ message MediametricsRecorderReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; optional android.stats.mediametrics_message.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; } /** * Track Media Player usage * Logged from: * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp */ message MediametricsNuPlayerReported { optional int64 timestamp_nanos = 1; optional string package_name = 2; optional int64 package_version_code = 3; optional int64 media_apex_version = 4; optional android.stats.mediametrics_message.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; } /** * 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 all permission requested by a all package * Pulled from: StatsCompanionService */ message DangerousPermissionState { // Name of the permission optional string permission_name = 1; // Uid of the package optional int32 uid = 2 [(is_uid) = true]; // Package requesting the permission optional string package_name = 3; // If the permission is granted to the uid optional bool is_granted = 4; // Permission flags as per android.content.pm.PermissionFlags optional int32 permission_flags = 5; // Permission protection flags as per android.content.pm.PermissionInfo.ProtectionFlags optional int32 protection_flags = 6; } /** * Logs when a package is denied access to a device identifier based on the new access requirements. * * Logged from: * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java */ message DeviceIdentifierAccessDenied { // The name of the package denied access to the requested device identifier. optional string package_name = 1; // The name of the device identifier method the package attempted to invoke. optional string method_name = 2; // True if the package is preinstalled. // 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. optional bool is_priv_app = 4 [deprecated = true]; } /** * Pulls the ongoing mainline install train version code. * Pulled from StatsCompanionService */ message TrainInfo { optional int64 train_version_code = 1; optional TrainExperimentIds train_experiment_id = 2 [(log_mode) = MODE_BYTES]; optional string train_name = 3; enum Status { UNKNOWN = 0; INSTALL_REQUESTED = 1; INSTALL_STARTED = 2; INSTALL_STAGED_NOT_READY = 3; INSTALL_STAGED_READY = 4; INSTALL_SUCCESS = 5; // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, // and INSTALL_FAILURE_COMMIT. INSTALL_FAILURE = 6 [deprecated = true]; // This enum is for installs that are manually cancelled via the Manual Update UI. INSTALL_CANCELLED = 7; INSTALLER_ROLLBACK_REQUESTED = 8; INSTALLER_ROLLBACK_INITIATED = 9; INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; INSTALLER_ROLLBACK_STAGED = 11; INSTALLER_ROLLBACK_STAGED_FAILURE = 12; INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; INSTALLER_ROLLBACK_SUCCESS = 15; INSTALLER_ROLLBACK_FAILURE = 16; INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; INSTALL_STAGED_CANCEL_REQUESTED = 20; INSTALL_STAGED_CANCEL_SUCCESS = 21; INSTALL_STAGED_CANCEL_FAILURE = 22; INSTALL_FAILURE_DOWNLOAD = 23; INSTALL_FAILURE_STATE_MISMATCH = 24; INSTALL_FAILURE_COMMIT = 25; REBOOT_TRIGGERED = 26; } optional Status status = 4; } /** * Logs the gesture stage changed event. * * Logged from: * frameworks/base/packages/SystemUI/ */ message AssistGestureStageReported { optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; } /** * Logs the feedback type. * * Logged from: * frameworks/base/packages/SystemUI/ */ message AssistGestureFeedbackReported { // Whether or not the gesture was used. optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; } /** * Logs the progress. * * Logged from: * frameworks/base/packages/SystemUI/ */ message AssistGestureProgressReported { // [0,100] progress for the assist gesture. optional int32 progress = 1; } /* * Information about the time zone data on a device. */ message TimeZoneDataInfo { // A version identifier for the data set on device. e.g. "2018i" optional string tzdb_version = 1; } /** * Logs the GPU stats global health information. * * Logged from: * frameworks/native/services/gpuservice/gpustats/ */ message GpuStatsGlobalInfo { // Package name of the gpu driver. optional string driver_package_name = 1; // Version name of the gpu driver. optional string driver_version_name = 2; // Version code of the gpu driver. optional int64 driver_version_code = 3; // Build time of the gpu driver in UTC as seconds since January 1, 1970. optional int64 driver_build_time = 4; // Total count of the gl driver gets loaded. optional int64 gl_loading_count = 5; // Total count of the gl driver fails to be loaded. optional int64 gl_loading_failure_count = 6; // Total count of the Vulkan driver gets loaded. optional int64 vk_loading_count = 7; // Total count of the Vulkan driver fails to be loaded. optional int64 vk_loading_failure_count = 8; // Api version of the system Vulkan driver. optional int32 vulkan_version = 9; // Api version of the system CPU Vulkan driver. optional int32 cpu_vulkan_version = 10; // Api version of the system GLES driver. optional int32 gles_version = 11; // Total count of the angle driver gets loaded. optional int64 angle_loading_count = 12; // Total count of the angle driver fails to be loaded. optional int64 angle_loading_failure_count = 13; } /** * GPU driver loading time info. */ message GpuDriverLoadingTime { // List of all the driver loading times for this app. The list size is // capped at 50. repeated int64 driver_loading_time = 1; } /** * Logs the GPU stats per app health information. * * Logged from: * frameworks/native/services/gpuservice/gpustats/ */ message GpuStatsAppInfo { // Package name of the application that loads the gpu driver. Total number // of different packages is capped at 100. optional string app_package_name = 1; // Version code of the gpu driver this app loads. optional int64 driver_version_code = 2; // gl driver loading time info. optional GpuDriverLoadingTime gl_driver_loading_time = 3 [(android.os.statsd.log_mode) = MODE_BYTES]; // Vulkan driver loading time info. optional GpuDriverLoadingTime vk_driver_loading_time = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; // Angle driver loading time info. optional GpuDriverLoadingTime angle_driver_loading_time = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; // 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; } /* * Logs the size of the system ion heap. * * 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. */ message ProcessSystemIonHeapSize { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The process name (from /proc/PID/cmdline). optional string process_name = 2; // Sum of sizes of all allocations. optional int32 total_size_in_kilobytes = 3; // Number of allocations. optional int32 allocation_count = 4; // Size of the largest allocation. optional int32 max_size_in_kilobytes = 5; } /* * Logs system-wide (primarily kernel) memory stats. Sourced from * /proc/meminfo unless explicitly stated otherwise. * * Pulled from StatsCompanionService. */ message SystemMemory { // /proc/meminfo SUnreclaim optional int32 unreclaimable_slab_kb = 1; // /proc/meminfo VmallocUsed optional int32 vmalloc_used_kb = 2; // /proc/meminfo PageTables optional int32 page_tables_kb = 3; // /proc/meminfo KernelStack optional int32 kernel_stack_kb = 4; // Total unreclaimable ion. // Reported from os.Debug.getIonHeapsSizeKb (R+) optional int32 total_ion_kb = 5; // Measures for the amount of memory we could not account for. // Essentially points to kernel allocations (as all userspace allocs are // already tracked). // Device-specific. optional int32 unaccounted_kb = 6; // GPU kernel driver allocations. // Can overlap with ion memory. // Reported from os.Debug.getGpuTotalUsageKb (S+) optional int32 gpu_total_usage_kb = 7; // GPU kernel driver private allocations. // Does not overlap with ion memory // Computed as total usage - Debug.getGpuDmaBufUsageKb() // Only available on supported kernel versions (5.4+) optional int32 gpu_private_usage_kb = 8; // Total DMABUF memory allocations // Reported from os.Debug.getDmabufTotalExportedKb (S+) optional int32 dmabuf_total_exported_kb = 9; } /* * Log dmabuf memory retained by userspace processes. * Pulled from StatsPullAtomService. */ message ProcessDmabufMemory { // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; // The process name (from ActivityManager). optional string process_name = 2; // OOM adj score. optional int32 oom_adj_score = 3; // Size of dmabufs retained by the process. The buffers are either mapped, // retained via an fd, or both. // Only available on supported kernel versions (5.4+). When unavailable, set // to -1. optional int32 retained_dmabuf_kb = 4; // Number of buffers retained by the process (mapped / fd). // Only available on supported kernel versions (5.4+). When unavailable, set // to -1. optional int32 retained_dmabuf_count = 5; // Size of dmabufs mapped to the process address space. optional int32 mapped_dmabuf_kb = 6; // Number of dmabufs mapped to the process address space. optional int32 mapped_dmabuf_count = 7; } /** * Push network stack events. * * Log from: * frameworks/base/packages/NetworkStack/ */ message NetworkStackReported { // The id that indicates the event reported from NetworkStack. optional int32 event_id = 1; // The data for the reported events. optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES]; } /** * Logs the apps that are installed on the external storage. * Pulled from: * StatsCompanionService */ message AppsOnExternalStorageInfo { // The type of the external storage. optional android.stats.storage.ExternalStorageType external_storage_type = 1; // The name of the package that is installed on the external storage. optional string package_name = 2; } /** * Logs the settings related to Face. * Logged from: * frameworks/base/services/core/java/com/android/server/stats */ message FaceSettings { // Whether or not face unlock is allowed on Keyguard. optional bool unlock_keyguard_enabled = 1; // Whether or not face unlock dismisses the Keyguard. optional bool unlock_dismisses_keyguard = 2; // Whether or not face unlock requires attention. optional bool unlock_attention_required = 3; // Whether or not face unlock is allowed for apps (through BiometricPrompt). optional bool unlock_app_enabled = 4; // Whether or not face unlock always requires user confirmation. optional bool unlock_always_require_confirmation = 5; // Whether or not a diverse set of poses are required during enrollment. optional bool unlock_diversity_required = 6; } /** * Logs cooling devices maintained by the kernel. * * Pulled from StatsCompanionService.java */ message CoolingDevice { // The type of cooling device being reported. Eg. CPU, GPU... optional android.os.CoolingTypeEnum device_location = 1; // The name of the cooling device source. Eg. CPU0 optional string device_name = 2; // Current throttle state of the cooling device. The value can any unsigned // integer between 0 and max_state defined in its driver. 0 means device is // not in throttling, higher value means deeper throttling. optional int32 state = 3; } /** * Intelligence has several counter-type events that don't warrant a * full separate atom. These are primarily API call counters but also include * counters for feature usage and specific failure modes. * * 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; } /** * Logs when Car Power state changed. * * Logged from: * packages/services/Car/service/src/com/android/car/CarStatsLog.java */ message CarPowerStateChanged { // States come from CpmsState in CarPowerManagementService.java. enum State { WAIT_FOR_VHAL = 0; ON = 1; SHUTDOWN_PREPARE = 2; WAIT_FOR_FINISH = 3; SUSPEND = 4; SIMULATE_SLEEP = 5; } optional State state = 1; } /** * 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: * packages/services/Car/service/src/com/android/car/CarStatsLog.java */ message GarageModeInfo { // Whether GarageMode is entered. optional bool is_garage_mode = 1; } /** * Historical app ops data per package. */ message AppOps { // 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; // 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) optional int64 trusted_foreground_granted_count = 4; // 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 = 5; // 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 = 6; // 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 = 7; // 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 = 8; // 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 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; } /** * Location Manager API Usage information(e.g. API under usage, * API call's parameters). * Logged from: * frameworks/base/services/core/java/com/android/server/LocationManagerService.java */ message LocationManagerApiUsageReported { // Indicating if usage starts or usage ends. optional android.stats.location.UsageState state = 1; // LocationManagerService's API in use. // We can identify which API from LocationManager is // invoking current LMS API by the combination of // API parameter(e.g. is_listener_null, is_intent_null, // is_location_request_null) optional android.stats.location.LocationManagerServiceApi api_in_use = 2; // Name of the package calling the API. optional string calling_package_name = 3; // Type of the location provider. optional android.stats.location.ProviderType provider = 4; // Quality of the location request optional android.stats.location.LocationRequestQuality quality = 5; // The desired interval for active location updates, in milliseconds. // Bucketized to reduce cardinality. optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6; // Minimum distance between location updates, in meters. // Bucketized to reduce cardinality. optional android.stats.location.SmallestDisplacementBucket bucketized_smallest_displacement = 7; // The number of location updates. optional int64 num_updates = 8; // The request expiration time, in millisecond since boot. // Bucketized to reduce cardinality. optional android.stats.location.ExpirationBucket bucketized_expire_in = 9; // Type of Callback passed in for this API. optional android.stats.location.CallbackType callback_type = 10; // The radius of the central point of the alert // region, in meters. Only for API REQUEST_GEOFENCE. // Bucketized to reduce cardinality. optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11; // Activity Importance of API caller. // Categorized to 3 types that are interesting from location's perspective. optional android.stats.location.ActivityImportance activiy_importance = 12; // Attribution tag passed to this API. optional string attribution_tag = 13; } /** * Information about a permission grant or denial made by user inside ReviewPermissionsFragment */ message ReviewPermissionsFragmentResultReported { // unique value identifying a permission group change. A permission group change might result // in multiple of these atoms optional int64 change_id = 1; // UID of package the permission belongs to optional int32 uid = 2 [(is_uid) = true]; // Name of package the permission belongs to optional string package_name = 3; // The permission to be granted optional string permission_name = 4; // The result of the permission grant optional bool permission_granted = 5; } /** * Information about results of permission upgrade by RuntimePermissionsUpgradeController * Logged from: RuntimePermissionUpdgradeController */ message RuntimePermissionsUpgradeResult { // Permission granted as result of upgrade optional string permission_name = 1; // UID of package granted permission optional int32 uid = 2 [(is_uid) = true]; // Name of package granted permission optional string package_name = 3; } /** * Information about a buttons presented in GrantPermissionsActivty and choice made by user */ message GrantPermissionsActivityButtonActions { // Permission granted as result of upgrade optional string permission_group_name = 1; // UID of package granted permission optional int32 uid = 2 [(is_uid) = true]; // Name of package requesting permission optional string package_name = 3; // Buttons presented in the dialog - bit flags, bit numbers are in accordance with // LABEL_ constants in GrantPermissionActivity.java optional int32 buttons_presented = 4; // 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; // Target SDK of the package optional int32 target_sdk = 7; // Selected precision of the location permission - bit flags indicate which // locations were chosen optional int32 selected_precision = 8; } /** * Information about LocationAccessCheck notification presented to user */ message LocationAccessCheckNotificationAction { // id which identifies single session of user interacting with permission controller optional int64 session_id = 1; // Uid of package for which location access check is presented optional int32 package_uid = 2; // Name of package for which location access check is presented optional string package_name = 3; enum Result { UNDEFINED = 0; // notification was presented to the user NOTIFICATION_PRESENTED = 1; // notification was declined by the user NOTIFICATION_DECLINED = 2; // notification was clicked by the user NOTIFICATION_CLICKED = 3; } // View / interaction recorded optional Result result = 4; } /** * Information about a permission grant or revoke made by user inside AppPermissionFragment */ message AppPermissionFragmentActionReported { // id which identifies single session of user interacting with permission controller optional int64 session_id = 1; // unique value identifying a permission group change. A permission group change might result // in multiple of these atoms optional int64 change_id = 2; // UID of package the permission belongs to optional int32 uid = 3 [(is_uid) = true]; // Name of package the permission belongs to optional string package_name = 4; // The permission to be granted optional string permission_name = 5; // 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; // Switch button set to ON for location accuracy GRANT_FINE_LOCATION = 7; // Switch button set to OFF for location accuracy REVOKE_FINE_LOCATION = 8; } // Button pressed in the dialog optional Button button_pressed = 8; } /** * Information about a AppPermissionFragment viewed by user */ message AppPermissionFragmentViewed { // 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; // Permission group viewed optional string permission_group_name = 4; } /** * 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 optional int64 session_id = 1; // id which identifies single view as every view might have several logging records // with different package information attached optional int64 view_id = 2; // Permission group viewed optional string permission_group_name = 3; // UID of package for which permissions are viewed optional int32 uid = 4 [(is_uid) = true]; // Name of package for which permissions are viewed optional string package_name = 5; // Category in which permission is included enum Category { UNDEFINED = 0; ALLOWED = 1; ALLOWED_FOREGROUND = 2; DENIED = 3; } optional Category category = 6; } /** * Information about a PermissionAppsFragment viewed by user. * Logged from ui/handheld/PermissionAppsFragment.java */ message PermissionAppsFragmentViewed { // id which identifies single session of user interacting with permission controller optional int64 session_id = 1; // id which identifies single view as every view might have several logging records // with different package information attached optional int64 view_id = 2; // Permission group viewed optional string permission_group_name = 3; // UID of package for which permissions are viewed optional int32 uid = 4 [(is_uid) = true]; // Name of package for which permissions are viewed optional string package_name = 5; // Category in which app is included enum Category { UNDEFINED = 0; ALLOWED = 1; ALLOWED_FOREGROUND = 2; DENIED = 3; } optional Category category = 6; } /** * 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; // Whether the device enables Virtual A/B compression. optional bool vab_compression_enabled = 12; // Whether this update attempt uses Virtual A/B compression. optional bool vab_compression_used = 13; } /** * 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; // Whether on device verity computation is enabled optional bool fec_enabled = 8; // Whether on device hash tree computation is enabled optional bool hash_tree_enabled = 9; } /** * Reported when a client requests to prepare for resume on reboot. * * Logged from: * frameworks/base/services/core/java/com/android/server/recoverysystem/RecoverySystemService.java */ message RebootEscrowPreparationReported { enum Result { ROR_NEED_PREPARATION = 0; ROR_SKIP_PREPARATION_AND_NOTIFY = 1; ROR_SKIP_PREPARATION_NOT_NOTIFY = 2; } // The uid of the client who requests ror. optional int32 requesting_uid = 1 [(is_uid) = true]; optional Result result = 2; // The number of clients who has requested ror, including the current caller. optional int32 requested_client_count = 3; } /** * Reported when the lock screen knowledge factor is captured, while there are clients of * resume on reboot to notify. * * Logged from: * frameworks/base/services/core/java/com/android/server/recoverysystem/RecoverySystemService.java */ message RebootEscrowLskfCaptureReported { // The uid of the client to notify about the Lskf capture. optional int32 uid_to_notify = 1 [(is_uid) = true]; // The total number of clients who have requested ror. optional int32 requested_client_count = 2; // The duration between RoR request - current LSKF capture event. optional int32 duration_ror_requested_to_lskf_captured_seconds = 3; } /* Reported when a client (e.g. gmscore) requests to reboot with Resume on Reboot. * * Logged from: * frameworks/base/services/core/java/com/android/server/recoverysystem/RecoverySystemService.java */ message RebootEscrowRebootReported { optional int32 error_code = 1; // The uid of clients who requested the reboot optional int32 request_uid = 2 [(is_uid) = true]; // All clients that have prepared for RoR before this reboot optional int32 prepared_clients_count = 3; // The RoR request count for the client who requests reboot. optional int32 request_count = 4; // Whether the reboot request assumes a slot switch on a/b devices. optional bool slot_switch = 5; // True if the DeviceConfig shows the device is using server based RoR. optional bool server_based = 6; // The duration between last LSKF captured - reboot requests optional int32 duration_lskf_captured_to_reboot_seconds = 7; // The count of LSKF captured since preparation optional int32 lskf_captured_counts = 8; } /** * Logs stats for AppSearch function calls */ message AppSearchCallStatsReported { // The sampling interval for this specific type of stats // For example, sampling_interval=10 means that one out of every 10 stats was logged. optional int32 sampling_interval = 1; // # of previous skipped sample for this specific type of stats // We can't push atoms too closely, so some samples might be skipped // In order to extrapolate the counts, we need to save the number of skipped stats and add it back // For example, the true count of an event could be estimated as: // SUM(sampling_interval * (num_skipped_sample + 1)) as est_count optional int32 num_skipped_sample = 2; // Package UID of the application. optional int32 uid = 3 [(is_uid) = true]; // Hash of the database name within AppSearch optional int32 database = 4; // The status code for the call or internal state. // Needs to be sync with AppSearchResult#ResultCode in // frameworks/base/apex/appsearch/framework/java/android/app/appsearch/AppSearchResult.java optional int32 status_code = 5; // Overall time used for the end-to-end function call in AppSearch. // It doesn't include binder latency optional int32 total_latency_millis = 6; // Type of the function call value is in sync with // frameworks/base/apex/appsearch/service/java/com/android/server/appsearch/external/localstorage/stats/CallStats.java optional int32 call_type = 7; // Estimated binder latency (estimated as single-trip time * 2) optional int32 estimated_binder_latency_millis = 8; // Number of operations succeeded for batch operations. optional int32 num_operations_succeeded = 9; // Number of operations failed for batch operations. optional int32 num_operations_failed = 10; } /** * Logs detailed stats for putting a single document in AppSearch */ message AppSearchPutDocumentStatsReported { // The sampling interval for this specific type of stats // For example, sampling_interval=10 means that one out of every 10 stats was logged. optional int32 sampling_interval = 1; // # of previous skipped sample for this specific type of stats // We can't push atoms too closely, so some samples might be skipped // In order to extrapolate the counts, we need to save the number of skipped stats and add it back // For example, the true count of an event could be estimated as: // SUM(sampling_interval * (num_skipped_sample + 1)) as est_count optional int32 num_skipped_sample = 2; // Package UID of the application. optional int32 uid = 3 [(is_uid) = true]; // Hash of the database name within AppSearch optional int32 database = 4; // Needs to be sync with AppSearchResult#ResultCode in // frameworks/base/apex/appsearch/framework/java/android/app/appsearch/AppSearchResult.java optional int32 status_code = 5; // Overall time used for a put_document optional int32 total_latency_millis = 6; // Time used to generate a document proto from a Bundle. optional int32 generate_document_proto_latency_millis = 7; // Time used to rewrite types and namespaces in the document. optional int32 rewrite_document_types_latency_millis = 8; // Overall time used for the native function call. optional int32 native_latency_millis = 9; // Time used to store the document. optional int32 native_document_store_latency_millis = 10; // Time used to index the document. It doesn't include the time to // merge indices. optional int32 native_index_latency_millis = 11; // Time used to merge the indices. optional int32 native_index_merge_latency_millis = 12; // Document size in bytes. optional int32 native_document_size_bytes = 13; // Number of tokens added to the index. optional int32 native_num_tokens_indexed = 14; // Whether the max number of tokens exceeded. optional bool native_exceeded_max_num_tokens = 15; } /** * Logs detailed stats for AppSearch Initialize */ message AppSearchInitializeStatsReported { // The sampling interval for this specific type of stats // For example, sampling_interval=10 means that one out of every 10 stats was logged. optional int32 sampling_interval = 1; // # of previous skipped sample for this specific type of stats // We can't push atoms too closely, so some samples might be skipped // In order to extrapolate the counts, we need to save the number of skipped stats and add it back // For example, the true count of an event could be estimated as: // SUM(sampling_interval * (num_skipped_sample + 1)) as est_count optional int32 num_skipped_sample = 2; // Package UID of the application. optional int32 uid = 3 [(is_uid) = true]; // Initialize status code // Needs to be sync with AppSearchResult#ResultCode in // frameworks/base/apex/appsearch/framework/java/android/app/appsearch/AppSearchResult.java optional int32 status_code = 4; // Overall time used for initialization, not including binder latency. optional int32 total_latency_millis = 5; // Whether the initialize() detects desyncs. // Desync happens if we lose the visibility doc. optional bool has_desync = 6; // Time used to read and process the schema and namespaces. optional int32 prepare_schema_and_namespaces_latency_millis = 7; // Time used to read and process the visibility file. optional int32 prepare_visibility_file_latency_millis = 8; // Overall time used for the native function call. optional int32 native_latency_millis = 9; // Needs to be sync with RecoveryCause in google3/third_party/icing/proto/logging.proto optional int32 native_document_store_recovery_cause = 10; // Needs to be sync with RecoveryCause in google3/third_party/icing/proto/logging.proto optional int32 native_index_restoration_cause = 11; // Needs to be sync with RecoveryCause in google3/third_party/icing/proto/logging.proto optional int32 native_schema_store_recovery_cause = 12; // Time used to recover the document store. optional int32 native_document_store_recovery_latency_millis = 13; // Time used to restore the index. optional int32 native_index_restoration_latency_millis = 14; // Time used to recover the schema store. optional int32 native_schema_store_recovery_latency_millis = 15; // Needs to be sync with DocumentStoreDataStatus in google3/third_party/icing/proto/logging.proto optional int32 native_document_store_data_status = 16; // Number of documents currently in document store. Those may // include alive, deleted, and expired documents. optional int32 native_num_documents = 17; // Number of schema types currently in the schema store. optional int32 native_num_schema_types = 18; // Whether we had to reset the index, losing all data, during initialization. optional bool has_reset = 19; // The status code of the reset operation if has_reset is true. // Needs to be sync with AppSearchResult#ResultCode in // frameworks/base/apex/appsearch/framework/java/android/app/appsearch/AppSearchResult.java optional int32 reset_status_code = 20; } /** * Logs detailed stats for querying in AppSearch */ message AppSearchQueryStatsReported { // The sampling interval for this specific type of stats // For example, sampling_interval=10 means that one out of every 10 stats was logged. optional int32 sampling_interval = 1; // # of previous skipped sample for this specific type of stats // We can't push atoms too closely, so some samples might be skipped // In order to extrapolate the counts, we need to save the number of skipped stats and add it back // For example, the true count of an event could be estimated as: // SUM(sampling_interval * (num_skipped_sample + 1)) as est_count optional int32 num_skipped_sample = 2; // Package UID of the application. optional int32 uid = 3 [(is_uid) = true]; // Hash of the database name within AppSearch optional int32 database = 4; // Needs to be sync with AppSearchResult#ResultCode in // frameworks/base/apex/appsearch/framework/java/android/app/appsearch/AppSearchResult.java optional int32 status_code = 5; // Overall time used for query including estimated binder latency optional int32 total_latency_millis = 6; // Time used to rewrite the search spec. optional int32 rewrite_search_spec_latency_millis = 7; // Time used to rewrite the search results. optional int32 rewrite_search_result_latency_millis = 8; // Whether it is a global query. // Needs to be sync with QueryStats#VisibilityScope in // frameworks/base/apex/appsearch/service/java/com/android/server/appsearch/external/localstorage/stats/QueryStats.java optional int32 visibility_scope = 9; // Overall time used for the native function call. optional int32 native_latency_millis = 10; // Number of terms in the query string. optional int32 native_num_terms = 11; // Length of the query string. optional int32 native_query_length = 12; // Number of namespaces filtered. optional int32 native_num_namespaces_filtered = 13; // Number of schema types filtered. optional int32 native_num_schema_types_filtered = 14; // The requested number of results in one page. optional int32 native_requested_page_size = 15; // The actual number of results returned in the current page. optional int32 native_num_results_returned_current_page = 16; // Whether the function call is querying the first page. If it's // not, Icing will fetch the results from cache so that some steps // may be skipped. optional bool native_is_first_page = 17; // Time used to parse the query, including 2 parts: tokenizing and // transforming tokens into an iterator tree. optional int32 native_parse_query_latency_millis = 18; // Strategy of scoring and ranking. // Needs to be sync with RankingStrategy.Code in google3/third_party/icing/proto/scoring.proto optional int32 native_ranking_strategy = 19; // Number of documents scored. optional int32 native_num_documents_scored = 20; // Time used to score the raw results. optional int32 native_scoring_latency_millis = 21; // Time used to rank the scored results. optional int32 native_ranking_latency_millis = 22; // Time used to fetch the document protos. Note that it includes the // time to snippet if "native_num_results_with_snippets" is NOT zero. optional int32 native_document_retrieval_latency_millis = 23; // How many snippets are calculated. optional int32 native_num_results_with_snippets = 24; } /** * Logs detailed stats for remove in AppSearch */ message AppSearchRemoveStatsReported { // The sampling interval for this specific type of stats // For example, sampling_interval=10 means that one out of every 10 stats was logged. optional int32 sampling_interval = 1; // # of previous skipped sample for this specific type of stats // We can't push atoms too closely, so some samples might be skipped // In order to extrapolate the counts, we need to save the number of skipped stats and add it back // For example, the true count of an event could be estimated as: // SUM(sampling_interval * (num_skipped_sample + 1)) as est_count optional int32 num_previous_skipped_sample = 2; // Package UID of the application. optional int32 uid = 3 [(is_uid) = true]; // Hash of the database name within AppSearch optional int32 database = 4; // Needs to be sync with AppSearchResult#ResultCode in // frameworks/base/apex/appsearch/framework/java/android/app/appsearch/AppSearchResult.java optional int32 status_code = 5; // Overall time used for remove including the binder latency optional int32 total_latency_millis = 6; // Overall time used for the native function call. optional int32 native_latency_millis = 7; // Used to indicate what kind of delete(namespace, schemaType etc) calls deleteByQuery here. // Needs to be sync with external/icing/proto/icing/proto/logging.proto#DeleteStatsProto optional int32 native_delete_type = 8; // Number of documents deleted by this call. optional int32 native_num_documents_deleted = 9; } /** * Logs detailed stats for optimization in AppSearch. * * stats pushed from: * frameworks/base/apex/appsearch/service/java/com/android/server/appsearch/AppSearchManagerService.java * * Next tag: 14 */ message AppSearchOptimizeStatsReported { // The sampling interval for this specific type of stats // For example, sampling_interval=10 means that one out of every 10 stats was logged. optional int32 sampling_interval = 1; // # of previous skipped sample for this specific type of stats // We can't push atoms too closely, so some samples might be skipped // In order to extrapolate the counts, we need to save the number of skipped stats and add it back // For example, the true count of an event could be estimated as: // SUM(sampling_interval * (num_skipped_sample + 1)) as est_count optional int32 num_previous_skipped_sample = 2; // Needs to be sync with AppSearchResult#ResultCode in // frameworks/base/apex/appsearch/framework/java/android/app/appsearch/AppSearchResult.java optional int32 status_code = 3; // Overall time used for remove including the binder latency optional int32 total_latency_millis = 4; // Overall time used for the native function call. optional int32 native_latency_millis = 5; // Time used to optimize the document store in millis. optional int32 native_document_store_optimize_latency_millis = 6; // Time used to restore the index in millis. optional int32 native_index_restoration_latency_millis = 7; // Number of documents before the optimization. optional int32 native_num_original_documents = 8; // Number of documents deleted during the optimization. optional int32 native_num_deleted_documents = 9; // Number of documents expired during the optimization. optional int32 native_num_expired_documents = 10; // Size of storage in bytes before the optimization. optional int64 native_storage_size_before_bytes = 11; // Size of storage in bytes after the optimization. optional int64 native_storage_size_after_bytes = 12; // The amount of time in millis since the last optimization ran. optional int64 native_time_since_last_optimize_millis = 13; } // Reports information in external/icing/proto/icing/proto/storage.proto#DocumentStorageInfoProto // Next tag: 15 message AppSearchDocumentStorageInfo { // Total number of alive documents. optional int32 num_alive_documents = 1; // Total number of deleted documents. optional int32 num_deleted_documents = 2; // Total number of expired documents. optional int32 num_expired_documents = 3; // Total size of the document store in bytes. Will be set to -1 if an IO error // is encountered while calculating this field. optional int64 document_store_size_bytes = 4; // Total size of the ground truth in bytes. The ground truth may // include deleted or expired documents. Will be set to -1 if an IO error is // encountered while calculating this field. optional int64 document_log_size_bytes = 5; // Size of the key mapper in bytes. Will be set to -1 if an IO error is // encountered while calculating this field. optional int64 key_mapper_size_bytes = 6; // Size of the document id mapper in bytes. Will be set to -1 if an IO error // is encountered while calculating this field. optional int64 document_id_mapper_size_bytes = 7; // Size of the score cache in bytes. Will be set to -1 if an IO error is // encountered while calculating this field. optional int64 score_cache_size_bytes = 8; // Size of the filter cache in bytes. Will be set to -1 if an IO error is // encountered while calculating this field. optional int64 filter_cache_size_bytes = 9; // Size of the corpus mapper in bytes. Will be set to -1 if an IO error is // encountered while calculating this field. optional int64 corpus_mapper_size_bytes = 10; // Size of the corpus score cache in bytes. Will be set to -1 if an IO error // is encountered while calculating this field. optional int64 corpus_score_cache_size_bytes = 11; // Size of the namespace id mapper in bytes. Will be set to -1 if an IO error // is encountered while calculating this field. optional int64 namespace_id_mapper_size_bytes = 12; // Number of namespaces seen from the current documents. optional int32 num_namespaces = 13; // Storage information of each namespace is not included due to that it has string field. reserved 14; } // Reports information in external/icing/proto/icing/proto/storage.proto#SchemaStoreStorageInfoProto // Next tag: 5 message AppSearchSchemaStoreStorageInfo { // Size of the schema store in bytes. Will be set to -1 if an IO error is // encountered while calculating this field. optional int64 schema_store_size_bytes = 1; // Total number of schema types. optional int32 num_schema_types = 2; // Total number of all sections across all types optional int32 num_total_sections = 3; // Total number of types at the current section limit. optional int32 num_schema_types_sections_exhausted = 4; } // Reports information in external/icing/proto/icing/proto/storage.proto#IndexStorageInfoProto // Next tag: 9 message AppSearchIndexStorageInfo { // Total size of the index in bytes. Will be set to -1 if an IO error is // encountered while calculating this field. optional int64 index_size_bytes = 1; // Size of the lite index lexicon in bytes. Will be set to -1 if an IO error // is encountered while calculating this field. optional int64 lite_index_lexicon_size_bytes = 2; // Size of the lite index hit buffer in bytes. Will be set to -1 if an IO // error is encountered while calculating this field. optional int64 lite_index_hit_buffer_size_bytes = 3; // Size of the main index lexicon in bytes. Will be set to -1 if an IO error // is encountered while calculating this field. optional int64 main_index_lexicon_size_bytes = 4; // Size of the main index storage in bytes. Will be set to -1 if an IO error // is encountered while calculating this field. optional int64 main_index_storage_size_bytes = 5; // Size of one main index block in bytes. optional int64 main_index_block_size_bytes = 6; // Number of main index blocks. optional int32 num_blocks = 7; // Percentage of the main index blocks that are free, assuming // allocated blocks are fully used. optional float min_free_fraction = 8; } /** * Pulls information about storage information per user from AppSearch * * Pulled from: * frameworks/base/apex/appsearch/service/java/com/android/server/appsearch/AppSearchManagerService.java * * Next tag: 6 */ message AppSearchStorageInfo { // The associated user (for multi-user feature). Defined in android/os/UserHandle.java // This is mainly used as a dimension for the metric, but it can also tell us if // the StorageInfo is for a primary user or secondary user. optional int32 user = 1; // Total size of Icing’s storage in bytes. Will be set to -1 if an IO error is // encountered while calculating this field. optional int64 total_storage_size_bytes = 2; // Storage information of the document store. optional AppSearchDocumentStorageInfo document_storage_info = 3 [(android.os.statsd.log_mode) = MODE_BYTES]; // Storage information of the schema store. optional AppSearchSchemaStoreStorageInfo schema_store_storage_info = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; // Storage information of the index. optional AppSearchIndexStorageInfo index_storage_info = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; } /** * 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 { // Type of the resume on reboot backend provider. enum ServiceType { UNKNOWN = 0; HAL = 1; SERVER_BASED = 2; } // Whether the vbmeta digest of the current slot matches a precomputed value before reboot. enum VbmetaDigestStatus { MATCH_EXPECTED_SLOT = 0; MATCH_FALLBACK_SLOT = 1; MISMATCH = 2; } optional bool successful = 1; // The error code for escrow data recovery failure optional int32 error_code = 2; optional ServiceType type = 3; // Number of retries to unwrap the escrow key asynchronously. optional int32 get_escrow_key_retry_count = 4; // The duration between storing of reboot escrow key -> // use of reboot escrow key to unlock CE after reboot optional int32 duration_escrow_key_storage_to_unlock_seconds = 5; optional VbmetaDigestStatus vbmeta_digest_status = 6; // The duration between boot complete -> CE unlock optional int32 duration_boot_complete_to_unlock_seconds = 7; } /** * Global display pipeline metrics reported by SurfaceFlinger. * Metrics exist beginning in Android 11. * There is a copy of this proto in timestats_atoms.proto in SurfaceFlinger. * That proto must be updated if this atom is updated. * * Pulled from: * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp */ message SurfaceflingerStatsGlobalInfo { // Aggregated refresh rate buckets that layers were presenting at. Buckets // are defined in SurfaceFlinger and are tracked per device. // Introduced in Android 12. // This is intended to be used as a dimenstion in collecting per-refresh rate // jank statistics. optional int32 display_refresh_rate_bucket = 18; // Aggregated render rate buckets that layers were overridden to run at. // Buckets are defined in SurfaceFlinger and are tracked per device. // Introduced in Android 12. // This is intended to be used as a dimension in collecting per-render rate // jank statistics. optional int32 render_rate_bucket = 21; // Total number of frames presented during the tracing period // Note: This stat is not sliced by dimension. It will be duplicated for metrics // using render_rate_bucket as a dimension. optional int64 total_frames = 1; // Total number of frames missed // Note: This stat is not sliced by dimension. It will be duplicated for metrics // using render_rate_bucket as a dimension. optional int64 missed_frames = 2; // Total number of frames that fell back to client composition // Note: This stat is not sliced by dimension. It will be duplicated for metrics // using render_rate_bucket as a dimension. optional int64 client_composition_frames = 3; // Total time the display was turned on // Note: This stat is not sliced by dimension. It will be duplicated for metrics // using render_rate_bucket as a dimension. optional int64 display_on_millis = 4; // Total time that was spent performing animations. // This is derived from the present-to-present layer histogram. // Note: This stat is not sliced by dimension. It will be duplicated for metrics // using render_rate_bucket as a dimension. 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. // Note: This stat is not sliced by dimension. It will be duplicated for metrics // using render_rate_bucket as a dimension. 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. // Note: This stat is not sliced by dimension. It will be duplicated for metrics // using render_rate_bucket as a dimension. 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. // Note: This stat is not sliced by dimension. It will be duplicated for metrics // using render_rate_bucket as a dimension. optional FrameTimingHistogram render_engine_timing = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; // Number of frames where SF saw a frame, based on its frame timeline. // Frame timelines may include transactions without updating buffer contents. // Introduced in Android 12. optional int32 total_timeline_frames = 9; // Number of frames where SF saw a janky frame. // Introduced in Android 12. optional int32 total_janky_frames = 10; // Number of janky frames where SF spent a long time on the CPU. // Introduced in Android 12. optional int32 total_janky_frames_with_long_cpu = 11; // Number of janky frames where SF spent a long time on the GPU. // Introduced in Android 12. optional int32 total_janky_frames_with_long_gpu = 12; // Number of janky frames where SF missed the frame deadline, but there // was not an attributed reason (e.g., maybe HWC missed?) // Introduced in Android 12. optional int32 total_janky_frames_sf_unattributed = 13; // Number of janky frames where the app missed the frame deadline, but // there was not an attributed reason // Introduced in Android 12. optional int32 total_janky_frames_app_unattributed = 14; // Number of janky frames that were caused because of scheduling errors in // SF that resulted in early present (e.g., SF sending a buffer to the // composition engine earlier than expected, resulting in a present that is // one vsync early) // Introduced in Android 12. optional int32 total_janky_frames_sf_scheduling = 15; // Number of frames that were classified as jank because of possible drift in // vsync predictions. // Introduced in Android 12. optional int32 total_jank_frames_sf_prediction_error = 16; // Number of janky frames where the app was in a buffer stuffed state (more // than one buffer ready to be presented at the same vsync). Usually caused // when the first frame is unusually long, the following frames enter into a // stuffed state. // Introduced in Android 12. optional int32 total_jank_frames_app_buffer_stuffing = 17; // Buckets of timings in ms by which SurfaceFlinger's deadline was missed // while latching and presenting frames. // Introduced in Android 12. optional FrameTimingHistogram sf_deadline_misses = 19 [(android.os.statsd.log_mode) = MODE_BYTES]; // Buckets of timings in ms by which the Vsync prediction drifted, when // compared to the actual hardware vsync. // Introduced in Android 12. optional FrameTimingHistogram sf_prediction_errors = 20 [(android.os.statsd.log_mode) = MODE_BYTES]; // Next ID: 22 } /** * Per-layer display pipeline metrics reported by SurfaceFlinger. * Metrics exist beginning in Android 11. * The number of layers uploaded may be restricted due to size limitations. * There is a copy of this proto in timestats_atoms.proto in SurfaceFlinger. * That proto must be updated if this atom is updated. * * Pulled from: * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp */ message SurfaceflingerStatsLayerInfo { // UID of the application who submitted this layer for presentation // This is intended to be used as a dimension for surfacing rendering // statistics to applications. // Introduced in Android 12. optional int32 uid = 12 [(is_uid) = true]; // Refresh rate bucket that the layer was presenting at. Buckets are // defined in SurfaceFlinger and are tracked per device. // Introduced in Android 12. // This is intended to be used as a dimension in collecting per-refresh rate // jank statistics optional int32 display_refresh_rate_bucket = 22; // Render rate bucket that the layer was submitting frames at. Buckets are // defined in SurfaceFlinger and are tracked per device. // Introduced in Android 12. // This is intended to be used as a dimension in collecting per-render rate // jank statistics. optional int32 render_rate_bucket = 23; // Game modes are used only for integrating with GameManager. enum GameMode { GAME_MODE_UNSPECIFIED = 0; GAME_MODE_UNSUPPORTED = 1; GAME_MODE_STANDARD = 2; GAME_MODE_PERFORMANCE = 3; GAME_MODE_BATTERY = 4; } // Game mode that the layer was running at. Used to track user engagement // in different modes. The modes are defined in GameManager.java // All non-game layers will have this field set to UNSUPPORTED. // Introduced in Android 12 // This is intended to be used as a dimension in collecting per-game mode // fps and frame related metrics. optional GameMode game_mode = 26; // The layer for this set of metrics // In many scenarios the package name is included in the layer name, e.g., // layers created by Window Manager. But this is not a guarantee - in the // general case layer names are arbitrary debug names. 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; // Number of frames where SF saw a frame, based on its frame timeline. // Frame timelines may include transactions without updating buffer contents. // Introduced in Android 12. optional int32 total_timeline_frames = 13; // Number of frames where SF saw a janky frame. // Introduced in Android 12. optional int32 total_janky_frames = 14; // Number of janky frames where SF spent a long time on the CPU. // Introduced in Android 12. optional int32 total_janky_frames_with_long_cpu = 15; // Number of janky frames where SF spent a long time on the GPU. // Introduced in Android 12. optional int32 total_janky_frames_with_long_gpu = 16; // Number of janky frames where SF missed the frame deadline, but there // was not an attributed reason (e.g., maybe HWC missed?) // Introduced in Android 12. optional int32 total_janky_frames_sf_unattributed = 17; // Number of janky frames where the app missed the frame deadline, but // there was not an attributed reason // Introduced in Android 12. optional int32 total_janky_frames_app_unattributed = 18; // Number of janky frames that were caused because of scheduling errors in // SF that resulted in early present (e.g., SF sending a buffer to the // composition engine earlier than expected, resulting in a present that is // one vsync early) // Introduced in Android 12. optional int32 total_janky_frames_sf_scheduling = 19; // Number of frames that were classified as jank because of possible drift in // vsync predictions. // Introduced in Android 12. optional int32 total_jank_frames_sf_prediction_error = 20; // Number of janky frames where the app was in a buffer stuffed state (more // than one buffer ready to be presented at the same vsync). Usually caused // when the first frame is unusually long, the following frames enter into a // stuffed state. // Introduced in Android 12. optional int32 total_jank_frames_app_buffer_stuffing = 21; /** * Encapsulates the FrameRateVote information sent by the application while * calling setFrameRate. * Metrics exist beginning in Android 12. */ message SetFrameRateVote { // The desired frame rate the application wishes to run on. optional float frame_rate = 1; enum FrameRateCompatibility { FRAME_RATE_UNDEFINED = 0; FRAME_RATE_DEFAULT = 1; FRAME_RATE_EXACT_OR_MULTIPLE = 2; } // Specifies how to interpret the frame rate associated with the layer. // Defined in Layer.h optional FrameRateCompatibility frame_rate_compatibility = 2; enum Seamlessness { SEAMLESS_UNDEFINED = 0; SEAMLESS_SHOULD_BE_SEAMLESS = 1; SEAMLESS_NOT_REQUIRED = 2; } // Indicates whether seamless refresh rate switch is required or not. optional Seamlessness seamlessness = 3; } // The last frame rate vote set by the application. // Introduced in Android 12. optional SetFrameRateVote set_frame_rate_vote = 24 [(android.os.statsd.log_mode) = MODE_BYTES]; // Buckets of timings in ms by which the app deadline was missed while // submitting work for a frame. // Introduced in Android 12. optional FrameTimingHistogram app_deadline_misses = 25 [(android.os.statsd.log_mode) = MODE_BYTES]; // Next ID: 27 } /** * 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; } message CameraStreamProto { // The stream width (in pixels) optional int32 width = 1; // The stream height (in pixels) optional int32 height = 2; // The format of the stream optional int32 format = 3; // The dataspace of the stream optional int32 data_space = 4; // The usage flag of the stream optional int64 usage = 5; // The number of requests for this stream optional int64 request_count = 6; // The number of buffer error for this stream optional int64 error_count = 7; // The capture latency of first request for this stream optional int32 first_capture_latency_millis = 8; // The maximum number of hal buffers optional int32 max_hal_buffers = 9; // The maximum number of app buffers optional int32 max_app_buffers = 10; // Type of stream histogram // 1: Capture latency: bin size in milliseconds enum HistogramType { UNKNOWN = 0; CAPTURE_LATENCY = 1; } optional HistogramType histogram_type = 11; // The boundary values between histogram bins // Expected number of fields: 9 repeated float histogram_bins = 12; // The frame counts for each histogram bins // Expected number of fields: 10 repeated int64 histogram_counts = 13; } /** * 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 in milliseconds if action is SESSION. // 0 if action is OPEN or CLOSE. optional int64 duration_millis = 1; // Camera API level used. // 1 for camera1 API, and 2 for camera2 API. 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; // Camera ID optional string camera_id = 5; // Camera action type enum Action { UNKNOWN_ACTION = 0; OPEN = 1; CLOSE = 2; SESSION = 3; } optional Action action = 6; // Whether the client is accessing camera using ndk optional bool is_ndk = 7; // Action OPEN: Open latency // Action CLOSE: Close latency // Action SESSION: Camera session creation duration. // If this entry is reusing an existing session, the value is -1. optional int32 latency_millis = 8; // session type: 0 for normal mode, 1 for constrained high speed mode optional int32 operating_mode = 9; // If actioh is SESSION: number of internal reconfigurations // Else: 0 optional int32 internal_reconfig = 10; // Number of requests for this capture session. Only applicable to SESSION // action. optional int64 request_count = 11; // Number of result errors. Only applicable to SESSION action. optional int64 result_error_count = 12; // Whether the device runs into error state. optional bool device_error = 13; // If action is SESSION: Stream states // Else: stream_count = 0 optional int32 stream_count = 14; optional CameraStreamProto stream_1 = 15 [(log_mode) = MODE_BYTES]; optional CameraStreamProto stream_2 = 16 [(log_mode) = MODE_BYTES]; optional CameraStreamProto stream_3 = 17 [(log_mode) = MODE_BYTES]; optional CameraStreamProto stream_4 = 18 [(log_mode) = MODE_BYTES]; optional CameraStreamProto stream_5 = 19 [(log_mode) = MODE_BYTES]; } /** * Logs when a compatibility change is affecting an app. * * Logged from: * frameworks/base/core/java/android/app/AppCompatCallbacks.java and * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java */ message AppCompatibilityChangeReported { // The UID of the app being affected by the compatibilty change. optional int32 uid = 1 [(is_uid) = true]; // The ID of the change affecting the app. optional int64 change_id = 2; enum State { UNKNOWN_STATE = 0; ENABLED = 1; DISABLED = 2; LOGGED = 3; } // The state of the change - if logged from gating whether it was enabled or disabled, or just // logged otherwise. optional State state = 3; enum Source { UNKNOWN_SOURCE = 0; APP_PROCESS = 1; SYSTEM_SERVER = 2; } // Where it was logged from. optional Source source = 4; } /** * Logged from * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc * external/perfetto/src/tracing/service/tracing_service_impl.cc */ message PerfettoUploaded { // TODO(lalitm): many of the atoms below should be renamed to have a // "PERFETTO_CMD" prefix to make clear they are specific to perfetto_cmd. // This will be done after the server side is ready for this change. // Next id: 48. enum Event { PERFETTO_UNDEFINED = 0; // Checkpoints inside perfetto_cmd before tracing is finished. PERFETTO_TRACE_BEGIN = 1; PERFETTO_BACKGROUND_TRACE_BEGIN = 2; PERFETTO_ON_CONNECT = 3; // Guardrails inside perfetto_cmd before tracing is finished. PERFETTO_ON_TIMEOUT = 16; PERFETTO_CMD_USER_BUILD_TRACING_NOT_ALLOWED = 43; PERFETTO_CMD_FAILED_TO_INIT_GUARDRAIL_STATE = 44; PERFETTO_CMD_INVALID_GUARDRAIL_STATE = 45; PERFETTO_CMD_HIT_UPLOAD_LIMIT = 46; // Checkpoints inside traced. PERFETTO_TRACED_ENABLE_TRACING = 37; PERFETTO_TRACED_START_TRACING = 38; PERFETTO_TRACED_DISABLE_TRACING = 39; PERFETTO_TRACED_NOTIFY_TRACING_DISABLED = 40; // Trigger checkpoints inside traced. // These atoms are special because, along with the UUID, // they log the trigger name. PERFETTO_TRACED_TRIGGER_START_TRACING = 41; PERFETTO_TRACED_TRIGGER_STOP_TRACING = 42; // Guardrails inside traced. PERFETTO_TRACED_ENABLE_TRACING_EXISTING_TRACE_SESSION = 18; PERFETTO_TRACED_ENABLE_TRACING_TOO_LONG_TRACE = 19; PERFETTO_TRACED_ENABLE_TRACING_INVALID_TRIGGER_TIMEOUT = 20; PERFETTO_TRACED_ENABLE_TRACING_DURATION_WITH_TRIGGER = 21; PERFETTO_TRACED_ENABLE_TRACING_STOP_TRACING_WRITE_INTO_FILE = 22; PERFETTO_TRACED_ENABLE_TRACING_DUPLICATE_TRIGGER_NAME = 23; PERFETTO_TRACED_ENABLE_TRACING_INVALID_DEFERRED_START = 24; PERFETTO_TRACED_ENABLE_TRACING_INVALID_BUFFER_SIZE = 25; PERFETTO_TRACED_ENABLE_TRACING_BUFFER_SIZE_TOO_LARGE = 26; PERFETTO_TRACED_ENABLE_TRACING_TOO_MANY_BUFFERS = 27; PERFETTO_TRACED_ENABLE_TRACING_DUPLICATE_SESSION_NAME = 28; PERFETTO_TRACED_ENABLE_TRACING_SESSION_NAME_TOO_RECENT = 29; PERFETTO_TRACED_ENABLE_TRACING_TOO_MANY_SESSIONS_FOR_UID = 30; PERFETTO_TRACED_ENABLE_TRACING_TOO_MANY_CONCURRENT_SESSIONS = 31; PERFETTO_TRACED_ENABLE_TRACING_INVALID_FD_OUTPUT_FILE = 32; PERFETTO_TRACED_ENABLE_TRACING_FAILED_TO_CREATE_FILE = 33; PERFETTO_TRACED_ENABLE_TRACING_OOM = 34; PERFETTO_TRACED_ENABLE_TRACING_UNKNOWN_ERROR = 35; PERFETTO_TRACED_START_TRACING_INVALID_SESSION_STATE = 36; PERFETTO_TRACED_ENABLE_TRACING_INVALID_FILTER = 47; // Checkpoints inside perfetto_cmd after tracing has finished. PERFETTO_ON_TRACING_DISABLED = 4; PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; // Guardrails inside perfetto_cmd after tracing has finished. PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; // Deprecated as "success" is misleading; it simply means we were // able to communicate with incidentd. Will be removed once // incidentd is properly instrumented. PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9 [deprecated = true]; // Deprecated as has the potential to be too spammy. Will be // replaced with a whole new atom proto which uses a count metric // instead of the event metric used for this proto. PERFETTO_TRIGGER_BEGIN = 12 [deprecated = true]; PERFETTO_TRIGGER_SUCCESS = 13 [deprecated = true]; PERFETTO_TRIGGER_FAILURE = 14 [deprecated = true]; // Deprecated as too coarse grained to be useful. Will be replaced // with better broken down atoms as we do with traced. PERFETTO_HIT_GUARDRAILS = 15 [deprecated = true]; // Contained status of Dropbox uploads. Removed as Perfetto no // longer supports uploading traces using Dropbox. reserved 5, 6, 7; } // Which stage of the pipeline we are reporting from. optional Event event = 1; // UUID matching the one set inside the SystemInfo trace packet. optional int64 trace_uuid_lsb = 2; optional int64 trace_uuid_msb = 3; // For trigger checkpoints inside traced, contains the trigger name // associated with this trace UUID. optional string trigger_name = 4; } /** * Logged from * external/perfetto/src/tracing/service/tracing_service_impl.cc */ message PerfettoTrigger { enum Event { PERFETTO_UNDEFINED = 0; PERFETTO_CMD_TRIGGER = 1; PERFETTO_CMD_TRIGGER_FAIL = 2; PERFETTO_TRIGGER_PERFETTO_TRIGGER = 3; PERFETTO_TRIGGER_PERFETTO_TRIGGER_FAIL = 4; PERFETTO_TRACED_LIMIT_PROBABILITY = 5; PERFETTO_TRACED_LIMIT_MAX_PER_24_H = 6; PERFETTO_PROBES_PRODUCER_TRIGGER = 7; PERFETTO_PROBES_PRODUCER_TRIGGER_FAIL = 8; } // The event which fired. optional Event event = 1; // The name of the trigger which fired. optional string trigger_name = 2; } /** * Pulls client metrics on data transferred via Vehicle Maps Service. * Metrics are keyed by uid + layer. * * Pulled from: * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java */ message VmsClientStats { // UID of the VMS client app optional int32 uid = 1 [(is_uid) = true]; // VMS layer definition optional int32 layer_type = 2; optional int32 layer_channel = 3; optional int32 layer_version = 4; // Bytes and packets sent by the client for the layer optional int64 tx_bytes = 5; optional int64 tx_packets = 6; // Bytes and packets received by the client for the layer optional int64 rx_bytes = 7; optional int64 rx_packets = 8; // Bytes and packets dropped due to client error optional int64 dropped_bytes = 9; optional int64 dropped_packets = 10; } /** * State of a all 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; // Permission protection flags as per android.content.pm.PermissionInfo.ProtectionFlags optional int32 protection_flags = 5; } /** * HWUI stats for a given app. */ message GraphicsStats { // The package name of the app optional string package_name = 1; // The version code of the app optional int64 version_code = 2; // The start & end timestamps in UTC as // milliseconds since January 1, 1970 // Compatible with java.util.Date#setTime() optional int64 start_millis = 3; optional int64 end_millis = 4; // HWUI renders pipeline type: GL (1) or Vulkan (2). enum PipelineType { UNKNOWN = 0; GL = 1; VULKAN = 2; } // HWUI renders pipeline type: GL or Vulkan. optional PipelineType pipeline = 5; // Distinct frame count. optional int32 total_frames = 6; // Number of "missed vsync" events. optional int32 missed_vsync_count = 7; // Number of frames in triple-buffering scenario (high input latency) optional int32 high_input_latency_count = 8; // Number of "slow UI thread" events. optional int32 slow_ui_thread_count = 9; // Number of "slow bitmap upload" events. optional int32 slow_bitmap_upload_count = 10; // Number of "slow draw" events. optional int32 slow_draw_count = 11; // Number of frames that missed their deadline (aka, visibly janked) optional int32 missed_deadline_count = 12; // The frame time histogram for the package optional FrameTimingHistogram cpu_histogram = 13 [(android.os.statsd.log_mode) = MODE_BYTES]; // The gpu frame time histogram for the package optional FrameTimingHistogram gpu_histogram = 14 [(android.os.statsd.log_mode) = MODE_BYTES]; // UI mainline module version. optional int64 version_ui_module = 15; // If true, these are HWUI stats for up to a 24h period for a given app from today. // If false, these are HWUI stats for a 24h period for a given app from the last complete // day (yesterday). Stats from yesterday stay constant, while stats from today may change as // more apps are running / rendering. optional bool is_today = 16; } /** * Message related to dangerous (runtime) app ops access */ message RuntimeAppOpAccess { // Uid of the package accessing app op optional int32 uid = 1 [(is_uid) = true]; // Name of the package accessing app op optional string package_name = 2; // deprecated - set to empty string optional string op_deprecated = 3 [deprecated = true]; // attribution_tag; provided by developer when accessing related API, limited at 50 chars by // API. Attributions must be provided through manifest using tag available in R // and above. optional string attribution_tag = 4; // message related to app op access, limited to 600 chars by API optional string message = 5; enum SamplingStrategy { DEFAULT = 0; UNIFORM = 1; RARELY_USED = 2; BOOT_TIME_SAMPLING = 3; UNIFORM_OPS = 4; } // sampling strategy used to collect this message optional SamplingStrategy sampling_strategy = 6; // operation id optional android.app.AppOpEnum op = 7 [default = APP_OP_NONE]; } /* * Logs userspace reboot outcome and duration. * * Logged from: * frameworks/base/core/java/com/android/server/BootReceiver.java */ message UserspaceRebootReported { // Possible outcomes of userspace reboot. enum Outcome { // Default value in case platform failed to determine the outcome. OUTCOME_UNKNOWN = 0; // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot). SUCCESS = 1; // Userspace reboot shutdown sequence was aborted. FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2; // Remounting userdata into checkpointing mode failed. FAILED_USERDATA_REMOUNT = 3; // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard // reboot. FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4; } // Outcome of userspace reboot. Always set. optional Outcome outcome = 1; // Duration of userspace reboot in case it has a successful outcome. // Duration is measured as time between userspace reboot was initiated and until boot completed // (e.g. sys.boot_completed=1). optional int64 duration_millis = 2; // State of primary user's (user0) credential encryption storage. enum UserEncryptionState { // Default value. USER_ENCRYPTION_STATE_UNKNOWN = 0; // Credential encrypted storage is unlocked. UNLOCKED = 1; // Credential encrypted storage is locked. LOCKED = 2; } // State of primary user's encryption storage at the moment boot completed. Always set. 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; DISABLED_BY_OEM = 4; } // 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 TV Input Service Session changes tune state * This is atom ID 327. * * Logged from: * frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java */ message TifTuneStateChanged { // Tv Input Service uid, TV Player uid repeated AttributionNode attribution_node = 1 [ (state_field_option).primary_field_first_uid = true ]; optional android.stats.tv.TifTuneState state = 2 [ (state_field_option).exclusive_state = true, (state_field_option).default_state_value = 0, (state_field_option).nested = false ]; // This a globally unique 128 bit random number created by TvInputManagerService when // android.media.tv.TvInputManager#createSession is called. // It is has no device or user association. // See android.media.tv.TvInputService.onCreateSession(java.lang.String, java.lang.String) // WARNING: Any changes to this field should be carefully reviewed for privacy. // Inspect the code at // framework/base/cmds/statsd/src/atoms.proto // TifTuneState // frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java // logTuneStateChanged // BinderService.createSession // SessionState.sessionId optional string tif_session_id = 3 [(state_field_option).primary_field = true]; optional android.stats.tv.TifInputType type = 4; // The id of this TV Input, only unique to a given TV Input Service. // This is specifically NOT android.media.tv.TvInputInfo.getId() // which is a string that contains the package name of its TvInputService. optional int32 input_id = 5 [(state_field_option).primary_field = true]; // The HDMI port id // Only valid when type == HDMI optional int32 hdmi_port = 6 [(state_field_option).primary_field = true]; } /** * 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; CALL = 5; } // Method called for ApiType.CALL enum MethodCall { UNKNOWN_METHOD = 0; ADD_SIM_ACCOUNTS = 1; REMOVE_SIM_ACCOUNTS = 2; GET_SIM_ACCOUNTS = 3; } 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; } enum TaskType { UNKNOWN_TASK = 0; DANGLING_CONTACTS_CLEANUP_TASK = 1; } 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; optional TaskType task_type = 7; // Set when api_type == CALL optional MethodCall method_called = 8; } /** * 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. * * Each pull creates multiple atoms, one for each call. The sequence is randomized when pulled. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message VoiceCallSession { // Bearer (IMS or CS) when the call started. optional android.telephony.CallBearerEnum bearer_at_start = 1; // Bearer (IMS or CS) when the call ended. // The bearer may change during the call, e.g. due to SRVCC. optional android.telephony.CallBearerEnum bearer_at_end = 2; // Direction of the call (incoming or outgoing). optional android.telephony.CallDirectionEnum direction = 3; // Time spent setting up the call. optional android.telephony.CallSetupDurationEnum setup_duration = 4; // Whether the call ended before the setup was completed. optional bool setup_failed = 5; // IMS reason code or CS disconnect cause. // For IMS, see: frameworks/base/telephony/java/android/telephony/ims/ImsReasonInfo.java // For CS, see: frameworks/base/telephony/java/android/telephony/DisconnectCause.java optional int32 disconnect_reason_code = 6; // IMS extra code or CS precise disconnect cause. // For IMS, this code is vendor-specific // For CS, see: frameworks/base/telephony/java/android/telephony/PreciseDisconnectCause.java optional int32 disconnect_extra_code = 7; // IMS extra message or CS vendor cause. optional string disconnect_extra_message = 8; // Radio access technology (RAT) used when call started. optional android.telephony.NetworkTypeEnum rat_at_start = 9; // Radio access technology (RAT) used when call terminated. optional android.telephony.NetworkTypeEnum rat_at_end = 10; // Number of times RAT changed during the call. optional int64 rat_switch_count = 11; // A bitmask of all codecs used during the call. // See: frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/VoiceCallSessionStats.java optional int64 codec_bitmask = 12; // Number of other calls going on during call setup, for the same SIM slot. optional int32 concurrent_call_count_at_start = 13; // Number of other calls going on during call termination, for the same SIM slot. optional int32 concurrent_call_count_at_end = 14; // Index of the SIM used, 0 for single-SIM devices. optional int32 sim_slot_index = 15; // Whether the device was in multi-SIM mode (with multiple active SIM profiles). optional bool is_multi_sim = 16; // Whether the call was made with an eSIM profile. optional bool is_esim = 17; // Carrier ID of the SIM card. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 18; // Whether an SRVCC has been completed successfully for this call. optional bool srvcc_completed = 19; // Number of SRVCC failures. optional int64 srvcc_failure_count = 20; // Number of SRVCC cancellations. optional int64 srvcc_cancellation_count = 21; // Whether the Real-Time Text (RTT) was ever used in the call (rather than whether RTT was // enabled in the dialer's settings). optional bool rtt_enabled = 22; // Whether this was an emergency call. optional bool is_emergency = 23; // Whether the call was performed while roaming. optional bool is_roaming = 24; // A random number used as the dimension field to pull multiple atoms. optional int32 dimension = 25; // Signal strength at the end of the call. This value is applicable to both cellular and WiFi. optional android.telephony.SignalStrengthEnum signal_strength_at_end = 26; // Band at the end of the call. Value 0 is used if the band is unknown. // See GeranBands, UtranBands and EutranBands in IRadio interface, depending on the RAT at // the end of the call. optional int32 band_at_end = 27; // Time spent setting up the call in milliseconds. // The time is measured from dial to ringing for outgoing calls, and from answer to connected // for incoming calls. optional int32 setup_duration_millis = 28; // Main codec quality. The codec quality was equal to or greater than this value for at least // 70% of the call. optional android.telephony.CodecQuality main_codec_quality = 29; // Whether video was enabled at any point during the call. optional bool video_enabled = 30; // Radio access technology (RAT) used when call is connected. optional android.telephony.NetworkTypeEnum rat_at_connected = 31; // Whether the call was a conference call (applicable only for calls over IMS). optional bool is_multiparty = 32; } /** * Pulls voice call radio access technology (RAT) usage. * * Each pull creates multiple atoms, one for each carrier/RAT, the order of which is irrelevant to * time. The atom will be skipped if not enough data is available. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message VoiceCallRatUsage { // Carrier ID (https://source.android.com/devices/tech/config/carrierid). optional int32 carrier_id = 1; // Radio access technology. optional android.telephony.NetworkTypeEnum rat = 2; // Total duration that voice calls spent on this carrier and RAT, rounded to 5 minutes. optional int64 total_duration_seconds = 3; // Total number of calls using this carrier and RAT. // A call is counted once even if it used the RAT multiple times. optional int64 call_count = 4; } /** * Pulls amount of time spend in each cellular service state. * * Each pull creates multiple atoms, one for each SIM slot/carrier/RAT(including ENDC), the order of * which is irrelevant to time. If multi SIM settings changes during the period, durations will be * counted separately before and after the change. Airplane mode does not count towards durations. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message CellularServiceState { // Radio access technology (RAT) for voice. // NETWORK_TYPE_UNKNOWN when the device is out of service. // NETWORK_TYPE_IWLAN when the device is using VoWiFi. optional android.telephony.NetworkTypeEnum voice_rat = 1; // Radio access technology (RAT) for data. // NETWORK_TYPE_UNKNOWN when the device is out of service. // Only cellular RATs are valid and show where the device is camped. optional android.telephony.NetworkTypeEnum data_rat = 2; // Whether the device was in roaming (domestic or international) for voice. optional android.telephony.RoamingTypeEnum voice_roaming_type = 3; // Whether the device was in roaming (domestic or international) for data. optional android.telephony.RoamingTypeEnum data_roaming_type = 4; // Whether the device is on LTE and has access to NR NSA, i.e. cell supports 5G (ENDC) and UE // registration (attach/TAU) indicates ENDC is not restricted. optional bool is_endc = 5; // Index of the SIM used, 0 for single-SIM devices. optional int32 sim_slot_index = 6; // Whether the device was in multi-SIM mode (with multiple active SIM profiles). optional bool is_multi_sim = 7; // Carrier ID of the SIM card. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 8; // Total time spent in this service state, rounded to 5 minutes. optional int32 total_time_seconds = 9; } /** * Pulls the number of times cellular data service state switches. * * Each pull creates multiple atoms, one for each RAT combination, the order of which is irrelevant * to time. Switches for different SIM slots, carrier IDs, or multi-SIM settings are counted * separately. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message CellularDataServiceSwitch { // Cellular RAT of the DATA domain from where the switch occurred. optional android.telephony.NetworkTypeEnum rat_from = 1; // Cellular RAT of the DATA domain to where the switch occurred. optional android.telephony.NetworkTypeEnum rat_to = 2; // Index of the SIM used, 0 for single-SIM devices. optional int32 sim_slot_index = 3; // Whether the device was in multi-SIM mode (with multiple active SIM profiles). optional bool is_multi_sim = 4; // Carrier ID of the SIM card. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 5; // Number of switches from rat_from to rat_to. optional int32 switch_count = 6; } /** * Pulls the number of active SIM slots and SIMs/eSIM profiles. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message SimSlotState { // Number of active SIM slots (both physical and eSIM profiles) in the device. optional int32 active_slot_count = 1; // Number of SIM cards (both physical and active eSIM profiles). // This number is always equal to or less than the number of active SIM slots. optional int32 sim_count = 2; // Number of active eSIM profiles. // This number is always equal to or less than the number of SIMs. optional int32 esim_count = 3; } /** * Pulls supported cellular radio access technologies. * * This atom reports the capabilities of the device, rather than the network it has access to. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message SupportedRadioAccessFamily { // A bitmask of supported radio technologies. // See android.telephony.TelephonyManager.NetworkTypeBitMask. optional int64 network_type_bitmask = 1; } /** * Pulls information about network requests. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message TelephonyNetworkRequests { // Carrier ID of the SIM card. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 1; // Number of times the enterprise capability was requested. optional int32 enterprise_request_count = 2; // Number of times the enterprise capability was released. optional int32 enterprise_release_count = 3; } /** * Pulls information for a single incoming SMS. * * Each pull creates multiple atoms, one for each SMS. The sequence is randomized when pulled. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message IncomingSms { // Format of the SMS (3GPP or 3GPP2). optional android.telephony.SmsFormatEnum sms_format = 1; // Technology of the SMS (CS or IMS). optional android.telephony.SmsTechEnum sms_tech = 2; // Radio access technology (RAT) used for the SMS. It can be IWLAN in case of IMS. optional android.telephony.NetworkTypeEnum rat = 3; // Type the SMS. optional android.telephony.SmsTypeEnum sms_type = 4; // Number of total parts. optional int32 total_parts = 5; // Number of received parts (if smaller than total parts, the SMS was dropped). optional int32 received_parts = 6; // Indicates if the incoming SMS was blocked. optional bool blocked = 7; // Indicate a specific error handling the SMS optional android.telephony.SmsIncomingErrorEnum error = 8; // Whether the SMS was received while roaming. optional bool is_roaming = 9; // Index of the SIM used, 0 for single-SIM devices. optional int32 sim_slot_index = 10; // Whether the device was in multi-SIM mode (with multiple active SIM profiles). optional bool is_multi_sim = 11; // Whether the message was received with an eSIM profile. optional bool is_esim = 12; // Carrier ID of the SIM card used for the SMS. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 13; // Random message ID. optional int64 message_id = 14; } /** * Pulls information for a single outgoing SMS. * * Each pull creates multiple atoms, one for each SMS. The sequence is randomized when pulled. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message OutgoingSms { // Format of the SMS (3GPP or 3GPP2). optional android.telephony.SmsFormatEnum sms_format = 1; // Technology of the SMS (CS or IMS). optional android.telephony.SmsTechEnum sms_tech = 2; // Radio access technology (RAT) used for the SMS. It can be IWLAN in case of IMS. optional android.telephony.NetworkTypeEnum rat = 3; // Result of the SMS sending. optional android.telephony.SmsSendResultEnum send_result = 4; // Error code // For IMS technology, see @SmsManager.Result in // http://cs/android/frameworks/base/telephony/java/android/telephony/SmsManager.java // For CS technology: // - GSM format: see GsmSmsErrorCode (3GPP 27.005 clause 3.2.5) // - CDMA format: see CdmaSmsErrorCode (3GPP2 N.S0005 (IS-41-C) Table 171) optional int32 error_code = 5; // Whether the SMS was sent while roaming. optional bool is_roaming = 6; // Whether the default SMS application generated the SMS (regardless of which application). optional bool is_from_default_app = 7; // Index of the SIM used, 0 for single-SIM devices. optional int32 sim_slot_index = 8; // Whether the device was in multi-SIM mode (with multiple active SIM profiles). optional bool is_multi_sim = 9; // Whether the message was sent with an eSIM profile. optional bool is_esim = 10; // Carrier ID of the SIM card used for the SMS. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 11; // Random message ID. optional int64 message_id = 12; // Retry count: 0 for the first attempt and then increasing for each attempt. optional int32 retry_id = 13; } /** * Logs information about usage of airplane mode. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/AirplaneModeStats.java */ message AirplaneMode { // Status of airplane mode optional bool is_enabled = 1; // When is_enabled is false, indicates if this was a very short airplane mode toggle // (i.e. airplane mode was disabled after less than 10 seconds from enablement). optional bool short_toggle = 2; // Carrier ID of the SIM card. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 3; } /** * Logs information about modem restarts. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/ModemRestartStats.java */ message ModemRestart { // Software version of the modem, as provided by android.os.Build.getRadioVersion(). optional string baseband_version = 1; // Reason of the modem restart, as provided in the modemReset indication of IRadio HAL. optional string reason = 2; // Carrier ID of the first SIM card. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 3; } /** * Logs the SIM card details when the carrier ID match is not complete. * * The atom is pushed when a SIM card is initialized and the MCC/MNC is not present in the * carrier ID table, or the SIM card contains a GID1 value that is not present in the carrier ID * table. This atom is pushed only once for each type of SIM card. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/CarrierIdMatchStats.java */ message CarrierIdMismatchReported { // Matched carrier ID. The value -1 is used if no match is found. optional int32 carrier_id = 1; // MCC/MNC of the SIM card. optional string mcc_mnc = 2; // Group identifier (level 1) of the SIM card. optional string gid1 = 3; // SPN value of the SIM card. optional string spn = 4; // First record of the PNN in the SIM card. This field is populated only if the SPN is missing // or empty. optional string pnn = 5; } /** * Logs the version of the carrier ID matching table at first power up and when it is updated. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/CarrierIdMatchStats.java */ message CarrierIdTableUpdated { // Version of the CarrierId matching table. optional int32 table_version = 1; } /** * Pulls the version of the carrier ID matching table. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message CarrierIdTableVersion { // Version of the CarrierId matching table. optional int32 table_version = 1; } /** * Pulls information for a single data call session * * Each pull creates multiple atoms, one for each data call session. * The sequence is randomized when pulled. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message DataCallSession { // A random number to be used as dimension to capture multiple atoms optional int32 dimension = 1; // Whether the device was in multi-SIM mode (with multiple active SIM profiles). optional bool is_multi_sim = 2; // Whether the call was made with an eSIM profile. optional bool is_esim = 3; // Data profile of this call (for what purpose this call was made) optional android.telephony.DataProfileEnum profile = 4 [deprecated = true]; // APN type bitmask of the APN used: // @ApnType in frameworks/base/telephony/java/android/telephony/Annotation.java. optional int32 apn_type_bitmask = 5; // Carrier ID of the SIM // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 6; // Whether the subscription is roaming optional bool is_roaming = 7; // Data RAT when the call ended, can be IWLAN for IMS/MMS, otherwise should be WWAN PS RAT. // In the case that the connection hasn't ended yet, this field holds the current RAT. // In the case the call ended due to Out Of Service (OOS), // this field should be the last known RAT. optional android.telephony.NetworkTypeEnum rat_at_end = 8; // Was the data call ended due to OOS optional bool oos_at_end = 9; // Number of RAT switches during the data call optional int64 rat_switch_count = 10; // Whether the call is on an opportunistic subscription optional bool is_opportunistic = 11; // Packet data protocol used optional android.telephony.ApnProtocolEnum ip_type = 12; // Whether the data call terminated before being established optional bool setup_failed = 13; // Reason why the data call terminated, as in RIL_DataCallFailCause from ril.h optional int32 failure_cause = 14; // Suggested retry back-off timer value from RIL optional int32 suggested_retry_millis = 15; // Why the data call was deactivated // Set by telephony for MO deactivations (unrelated to failure_cause) optional android.telephony.DataDeactivateReasonEnum deactivate_reason = 16; // Duration of the data call, rounded into the closest 5 minutes. optional int64 duration_minutes = 17; // Whether the data call is still connected when the atom is collected. optional bool ongoing = 18; // Band at the end of the data call. Value 0 is used if the band is unknown. // See GeranBands, UtranBands and EutranBands in IRadio interface, depending // on the RAT at the end of the data call. optional int32 band_at_end = 19; } /** * Logs data stall recovery event * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DcTracker.java */ message DataStallRecoveryReported { // Carrier ID of the SIM // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 1; // Data RAT when the stall happened optional android.telephony.NetworkTypeEnum rat = 2; // Signal strength when stall happened optional android.telephony.SignalStrengthEnum signal_strength = 3; // Action taken to recover optional android.telephony.DataStallRecoveryActionEnum action = 4; // Whether the subscription is opportunistic optional bool is_opportunistic = 5; // Whether the device is in multi-SIM mode optional bool is_multi_sim = 6; // Band used when the stall/recovery took place. // Value 0 is used if the band is unknown. // See GeranBands, UtranBands and EutranBands in IRadio interface, depending // on the RAT used at the time. optional int32 band = 7; // Whether the data stall is recovered. optional bool recovered = 8; // The elapsed time between start of the data stall and result of current action. optional int32 duration_millis = 9; } /** * Pulls IMS registration terminations. * * Each pull generates multiple atoms, one for each termination condition happened during the day. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message ImsRegistrationTermination { // Carrier ID of the SIM used for IMS registration. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 1; // Whether the device is in multi-SIM mode when the registration terminated. optional bool is_multi_sim = 2; // Radio access technology (RAT) used by the registration when it terminated. // This can be IWLAN if IMS was registered over Wifi. optional android.telephony.NetworkTypeEnum rat_at_end = 3; // Whether the IMS registration failed before it was established. optional bool setup_failed = 4; // IMS reason code indicating the termination reason. // See: frameworks/base/telephony/java/android/telephony/ims/ImsReasonInfo.java optional int32 reason_code = 5; // IMS extra code indicating the termination reason. optional int32 extra_code = 6; // IMS extra message indicating the termination reason. // This string is truncated to 128 characters if its length exceeds the limit. optional string extra_message = 7; // Total number of instances of registration termination that matches the above conditions. optional int32 count = 8; } /** * Pulls IMS registration statistics. * * Each pull generates multiple atoms, one for each carrier, SIM slot, and radio access technology * (RAT) combination. Durations are aggregated from all registrations with matching criteria, * including ones that are currently active. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message ImsRegistrationStats { // Carrier ID of the SIM used for IMS registration. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 1; // Index of the SIM used, 0 for single-SIM devices. optional int32 sim_slot_index = 2; // Radio access technology (RAT) used by the registration. // This can be IWLAN if IMS was registered over Wifi. optional android.telephony.NetworkTypeEnum rat = 3; // Total time IMS was registered (connected time), rounded to 5 minutes. optional int32 registered_seconds = 4; // Durations that each feature (Voice, Video, UT, SMS) is capable (supported/enabled by the // network/device) and available (registered and ready to use). // All durations are rounded to 5 minutes and should be equal to or shorter than // registered_seconds. optional int32 voice_capable_seconds = 5; optional int32 voice_available_seconds = 6; optional int32 sms_capable_seconds = 7; optional int32 sms_available_seconds = 8; optional int32 video_capable_seconds = 9; optional int32 video_available_seconds = 10; optional int32 ut_capable_seconds = 11; optional int32 ut_available_seconds = 12; } /* * Logs information related to PIN storage and automatic PIN operations. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/PinStorage.java */ message PinStorageEvent { // The type of event. enum Event { UNKNOWN = 0; // The PIN was verified automatically successfully. PIN_VERIFICATION_SUCCESS = 1; // The PIN was verified automatically unsuccessfully. PIN_VERIFICATION_FAILURE = 2; // The PIN(s) was cached, but discarded after reboot (e.g. SIM not present after reboot). CACHED_PIN_DISCARDED = 3; // The PIN(s) was stored to be used after unattended reboot. PIN_STORED_FOR_VERIFICATION = 4; // The PIN(s) is not available for storage and will be required after unattended reboot. PIN_REQUIRED_AFTER_REBOOT = 5; // The PIN was not verified automatically because the SIM card did not match. PIN_VERIFICATION_SKIPPED_SIM_CARD_MISMATCH = 6; // The available PINs after reboot does not match the number of stored PINs before reboot. PIN_COUNT_NOT_MATCHING_AFTER_REBOOT = 7; // Error while decrypting the PIN PIN_DECRYPTION_ERROR = 8; // Error while encrypting the PIN PIN_ENCRYPTION_ERROR = 9; } optional Event event = 1; // Number of PINs stored or discarded. optional int32 number_of_pins = 2; // The caller package name optional string package_name = 3; } /** * Logs flip to screen off events. * * Logged from: * frameworks/opt/telephony/src/java/com/android/server/power/FaceDownDetector.java */ message FaceDownReported { enum Response{ UNKNOWN = 1; // The phone was flipped before the screen turns off. UNFLIP = 2; // User interacts with the screen after a face down is detected. USER_INTERACTION = 3; // A flip leads to screen turning off. This is the expected outcome. SCREEN_OFF = 4; } // Logs the action that occurs from a flip event, whether by user or system // action. optional Response face_down_response = 1; // After a flip is detected, how long until a system or user action occurs. optional int64 millis_since_flip = 2; // Difference between the flip time and when the timeout would otherwise // occur. optional int64 millis_until_normal_timeout = 3; // How quickly the user turns the screen back on after a flip event. // A low value may indicate a false negative. Logged only when Response is // SCREEN_OFF. optional int64 millis_until_next_screen_on = 4; } /** * Logs timeout extended events which occur from consecutive undims. * * Logged from: * frameworks/opt/telephony/src/java/com/android/server/power/ScreenUndimDetector.java */ message TimeoutAutoExtendedReported { enum Outcome { UNKNOWN = 0; POWER_BUTTON = 1; TIMEOUT = 2; } // Logs the action that occurs after timeout is extended from undim. optional Outcome outcome = 1; // Time from timeout extension to the outcome. optional int64 time_to_outcome_millis = 2; // Time of first interaction after undim if an interaction occurs. // -1 if no interaction occurs before screen turns off. optional int64 time_to_first_interaction_millis = 3; } /** * 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 power usage data from GNSS subsystem. * * Logged from: * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java */ message GnssPowerStats { // Relative precision of the alignment of the reported power stats measurement. optional int64 elapsed_realtime_uncertainty_nanos = 1; // Total GNSS energy consumption in micro-joules (or micro Watt-seconds). optional int64 total_energy_micro_joule = 2; // Total energy consumption in micro-joules (or micro Watt-seconds) for which the GNSS engine is // tracking signals of a single frequency band. optional int64 singleband_tracking_mode_energy_micro_joule = 3; // Total energy consumption in micro-joules (or micro Watt-seconds) for which the GNSS engine is // tracking signals of multiple frequency bands. optional int64 multiband_tracking_mode_energy_micro_joule = 4; // Total energy consumption in micro-joules (or micro Watt-seconds) for which the GNSS engine is // acquiring signals of a single frequency band. optional int64 singleband_acquisition_mode_energy_micro_joule = 5; // Total energy consumption in micro-joules (or micro Watt-seconds) for which the GNSS engine is // acquiring signals of multiple frequency bands. optional int64 multiband_acquisition_mode_energy_micro_joule = 6; // Total energy consumption in micro-joules (microWatt-seconds) for which the GNSS engine is // operating in each of the vendor-specific power modes. (Index 0) optional int64 vendor_specific_power_modes_energy_micro_joule_0 = 7; // Total energy consumption in micro-joules (microWatt-seconds) for which the GNSS engine is // operating in each of the vendor-specific power modes. (Index 1) optional int64 vendor_specific_power_modes_energy_micro_joule_1 = 8; // Total energy consumption in micro-joules (microWatt-seconds) for which the GNSS engine is // operating in each of the vendor-specific power modes. (Index 2) optional int64 vendor_specific_power_modes_energy_micro_joule_2 = 9; // Total energy consumption in micro-joules (microWatt-seconds) for which the GNSS engine is // operating in each of the vendor-specific power modes. (Index 3) optional int64 vendor_specific_power_modes_energy_micro_joule_3 = 10; // Total energy consumption in micro-joules (microWatt-seconds) for which the GNSS engine is // operating in each of the vendor-specific power modes. (Index 4) optional int64 vendor_specific_power_modes_energy_micro_joule_4 = 11; // Total energy consumption in micro-joules (microWatt-seconds) for which the GNSS engine is // operating in each of the vendor-specific power modes. (Index 5) optional int64 vendor_specific_power_modes_energy_micro_joule_5 = 12; // Total energy consumption in micro-joules (microWatt-seconds) for which the GNSS engine is // operating in each of the vendor-specific power modes. (Index 6) optional int64 vendor_specific_power_modes_energy_micro_joule_6 = 13; // Total energy consumption in micro-joules (microWatt-seconds) for which the GNSS engine is // operating in each of the vendor-specific power modes. (Index 7) optional int64 vendor_specific_power_modes_energy_micro_joule_7 = 14; // Total energy consumption in micro-joules (microWatt-seconds) for which the GNSS engine is // operating in each of the vendor-specific power modes. (Index 8) optional int64 vendor_specific_power_modes_energy_micro_joule_8 = 15; // Total energy consumption in micro-joules (microWatt-seconds) for which the GNSS engine is // operating in each of the vendor-specific power modes. (Index 9) optional int64 vendor_specific_power_modes_energy_micro_joule_9 = 16; } /** * 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; // UID of the package. -1 if the installation failed. optional int32 uid = 6 [(is_uid) = true]; } /** * 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; PROFILE_CLONE = 8; } 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/proto_logging/stats/enums/stats/accessibility/accessibility_enums.proto. optional android.stats.accessibility.ShortcutType shortcut_type = 2; // The definition of the service status. // From frameworks/proto_logging/stats/enums/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/proto_logging/stats/enums/stats/accessibility/accessibility_enums.proto. optional android.stats.accessibility.ServiceStatus service_status = 2; } /** * Logs when accessibility floating menu changed its position by user. * * Logged from: * frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu */ message AccessibilityFloatingMenuUIChanged { // Normalized screen position of the accessibility floating menu. The range is between 0 and 1. optional float normalized_x_position = 1; optional float normalized_y_position = 2; enum Orientation { UNKNOWN = 0; PORTRAIT = 1; LANDSCAPE = 2; } // Orientation of the device when accessibility floating menu changed. optional Orientation orientation = 3; } /** * Pulls accessibility shortcuts status. * * Pulled from: * StatsPullAtomService */ message AccessibilityShortcutStats { // The definition of the accessibility software shortcut. // From frameworks/proto_logging/stats/enums/stats/accessibility/accessibility_enums.proto. optional android.stats.accessibility.ShortcutType software_shortcut_type = 1; // Number of accessibility services in accessibility software shortcut. optional int32 software_shortcut_service_num = 2; // The definition of the accessibility hardware shortcut. // From frameworks/proto_logging/stats/enums/stats/accessibility/accessibility_enums.proto. optional android.stats.accessibility.ShortcutType hardware_shortcut_type = 3; // Number of accessibility services in accessibility hardware shortcut. optional int32 hardware_shortcut_service_num = 4; // The definition of the accessibility gesture shortcut. // From frameworks/proto_logging/stats/enums/stats/accessibility/accessibility_enums.proto. optional android.stats.accessibility.ShortcutType gesture_shortcut_type = 5; // Number of accessibility services in accessibility gesture shortcut. optional int32 gesture_shortcut_service_num = 6; } /** * Pulls accessibility floating menu status. * * Pulled from: * StatsPullAtomService */ message AccessibilityFloatingMenuStats { // Size of the accessibility floating menu. optional int32 size = 1; // Icon shape of the accessibility floating menu. optional int32 icon_type = 2; // Whether the accessibility floating menu is enable auto fade ability. optional bool fade_enabled = 3; // Opacity of the accessibility floating menu. The range is between 0 and 1. optional float opacity = 4; } /** * 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/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.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() 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() 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; // Android S // Metric log session id, a Base64Url encoded string of a randomly generated 128-bit integer. // An empty string means no session id is set. optional string log_session_id = 13; } /** * 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 in frameworks/av/services/mediametrics/AudioTypes.cpp // (for playback threads): // See lookup() 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() 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() 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() in frameworks/av/services/mediametrics/AudioTypes.cpp optional string traits = 19; // Android S // Metric log session id, a Base64Url encoded string of a randomly generated 128-bit integer. // An empty string means no session id is set. optional string log_session_id = 20; } /** * 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() 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() 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 * Logged from: system/security/keystore/key_event_log_handler.cpp */ message KeystoreKeyEventReported { enum Algorithm { /** Asymmetric algorithms. */ RSA = 1; // 2 removed, do not reuse. EC = 3; /** Block cipher algorithms */ AES = 32; TRIPLE_DES = 33; /** MAC algorithms */ HMAC = 128; }; /** Algorithm associated with the key */ optional Algorithm algorithm = 1; /** Size of the key */ optional int32 key_size = 2; enum KeyOrigin { /** Generated in keymaster. Should not exist outside the TEE. */ GENERATED = 0; /** Derived inside keymaster. Likely exists off-device. */ DERIVED = 1; /** Imported into keymaster. Existed as cleartext in Android. */ IMPORTED = 2; /** Keymaster did not record origin. */ UNKNOWN = 3; /** Securely imported into Keymaster. */ SECURELY_IMPORTED = 4; }; /* Logs whether the key was generated, imported, securely imported, or derived.*/ optional KeyOrigin key_origin = 3; enum HardwareAuthenticatorType { NONE = 0; PASSWORD = 1; FINGERPRINT = 2; // Additional entries must be powers of 2. }; /** * What auth types does this key require? If none, * then no auth required. */ optional HardwareAuthenticatorType user_auth_type = 4; /** * If user authentication is required, is the requirement time based? If it * is not time based then this field will not be used and the key is per * operation. Per operation keys must be user authenticated on each usage. */ optional int32 user_auth_key_timeout_secs = 5; /** * padding mode, digest, block_mode and purpose should ideally be repeated * fields. However, since statsd does not support repeated fields in * pushed atoms, they are represented using bitmaps. */ /** Track which padding mode is being used.*/ optional int32 padding_mode_bitmap = 6; /** Track which digest is being used. */ optional int32 digest_bitmap = 7; /** Track what block mode is being used (for encryption). */ optional int32 block_mode_bitmap = 8; /** Track what purpose is this key serving. */ optional int32 purpose_bitmap = 9; enum EcCurve { P_224 = 0; P_256 = 1; P_384 = 2; P_521 = 3; }; /** Which ec curve was selected if elliptic curve cryptography is in use **/ optional EcCurve ec_curve = 10; enum KeyBlobUsageRequirements { STANDALONE = 0; REQUIRES_FILE_SYSTEM = 1; }; /** Standalone or is a file system required */ optional KeyBlobUsageRequirements key_blob_usage_reqs = 11; enum Type { key_operation = 0; key_creation = 1; key_attestation = 2; } /** Key creation event, operation event or attestation event? */ optional Type type = 12; /** Was the key creation, operation, or attestation successful? */ optional bool was_successful = 13; /** Response code or error code */ optional int32 error_code = 14; } /** * Logs: key creation events with Algorithm, Origin, Error and Attestation info. * Logged from: system/security/keystore2/metrics.rs */ message Keystore2KeyCreationWithGeneralInfo { // Algorithm associated with the key optional android.system.security.keystore2.Algorithm algorithm = 1; // Size of the key, based on the algorithm used. optional int32 key_size = 2; enum EcCurve { // Unspecified takes 0. Other values are incremented by 1 compared to keymint spec. EC_CURVE_UNSPECIFIED = 0; P_224 = 1; P_256 = 2; P_384 = 3; P_521 = 4; }; // Which ec curve was selected if elliptic curve cryptography is in use optional EcCurve ec_curve = 3; enum KeyOrigin { // Unspecified takes 0. Other values are incremented by 1 compared to keymint spec. ORIGIN_UNSPECIFIED = 0; // Generated in keymaster. Should not exist outside the TEE. GENERATED = 1; // Derived inside keymaster. Likely exists off-device. DERIVED = 2; // Imported into keymaster. Existed as cleartext in Android. IMPORTED = 3; // Previously used for another purpose that is now obsolete. RESERVED = 4; // Securely imported into Keymaster. SECURELY_IMPORTED = 5; }; // Logs whether the key was generated, imported, securely imported, or derived. optional KeyOrigin key_origin = 4; /** * Response code (system/hardware/interfaces/keystore2/aidl/../ResponseCode.aidl) * or * error code (hardware/interfaces/security/keymint/aidl/../ErrorCode.aidl) */ optional int32 error_code = 5; // Indicates whether key attestation is requested in creation optional bool attestation_requested = 6; // Count of a particular combination of field values of this atom optional int32 count = 7; } /** * Logs: key creation events with authentication info. * Logged from: system/security/keystore2/metrics.rs */ message Keystore2KeyCreationWithAuthInfo { enum HardwareAuthenticatorType { // Unspecified takes 0. Other values are incremented by 1 compared to keymint spec. AUTH_TYPE_UNSPECIFIED = 0; NONE = 1; PASSWORD = 2; FINGERPRINT = 3; ANY = 5; }; /** * What auth types does this key require? If none, * then no auth required. */ optional HardwareAuthenticatorType user_auth_type = 1; /** * If user authentication is required, is the requirement time based? If it * is time based then this field indicates the base 10 logarithm of time out in seconds. * Logarithm is taken in order to reduce the cardinaltiy. */ optional int32 log_auth_timeout_seconds = 2; // Security level of the Keymint instance which creates the key. optional android.system.security.keystore2.SecurityLevelEnum security_level = 3; // Count of a particular combination of field values of this atom optional int32 count = 4; } /** * Logs: key creation events with purpose and modes info. * Logged from: system/security/keystore2/metrics.rs */ message Keystore2KeyCreationWithPurposeAndModesInfo { // Algorithm associated with the key optional android.system.security.keystore2.Algorithm algorithm = 1; /** * Track which purpose is being used. * Bitmap composition is given by KeyPurposeBitPosition enum * defined in system/security/keystore2/metrics.rs. */ optional int32 purpose_bitmap = 2; /** * Track which padding mode is being used. * Bitmap composition is given by PaddingModeBitPosition enum * defined in system/security/keystore2/metrics.rs. */ optional int32 padding_mode_bitmap = 3; /** * Track which digest is being used. * Bitmap composition is given by DigestBitPosition enum * defined in system/security/keystore2/metrics.rs. */ optional int32 digest_bitmap = 4; /** * Track which block mode is being used. * Bitmap composition is given by BlockModeBitPosition enum * defined in system/security/keystore2/metrics.rs. */ optional int32 block_mode_bitmap = 5; // Count of a particular combination of field values of this atom optional int32 count = 6; } /** * Logs the atom id of the atoms associated with key creation/operation events, that have reached * the maximum storage limit allocated for different atom objects of that atom, * in keystore in-memory store. * * Size of the storage bucket for each atom is limited considering their expected cardinaltity. * This limit may exceed if the dimensions of the atoms take a large number of unexpected * combinations. This atom is used to track such cases. */ message Keystore2AtomWithOverflow { // Atom id as defined in atoms.proto optional int32 atom_id = 1; // Count of the objects of this atom type that have overflowed. optional int32 count = 2; } /** * Logs: key operations events with purpose and modes info. * Logged from: system/security/keystore2/metrics.rs */ message Keystore2KeyOperationWithPurposeAndModesInfo { enum KeyPurpose { // Unspecified takes 0. Other values are incremented by 1 compared to keymint spec. KEY_PURPOSE_UNSPECIFIED = 0; // Usable with RSA, 3DES and AES keys. ENCRYPT = 1; // Usable with RSA, 3DES and AES keys. DECRYPT = 2; // Usable with RSA, EC and HMAC keys. SIGN = 3; // Usable with RSA, EC and HMAC keys. VERIFY = 4; // 5 is reserved // Usable with RSA keys. WRAP_KEY = 6; // Key Agreement, usable with EC keys. AGREE_KEY = 7; // Usable as an attestation signing key. ATTEST_KEY = 8; } // Purpose of the key operation optional KeyPurpose purpose = 1; /** * Track which padding mode is being used. * Bitmap composition is given by PaddingModeBitPosition enum * defined in system/security/keystore2/metrics.rs. */ optional int32 padding_mode_bitmap = 2; /** * Track which digest is being used. * Bitmap composition is given by DigestBitPosition enum * defined in system/security/keystore2/metrics.rs. */ optional int32 digest_bitmap = 3; /** * Track which block mode is being used. * Bitmap composition is given by BlockModeBitPosition enum * defined in system/security/keystore2/metrics.rs. */ optional int32 block_mode_bitmap = 4; // Count of a particular combination of field values of this atom optional int32 count = 5; } /** * Logs key operations events with outcome, error_code, security level and whether the key is * upgraded during the operation. * Logged from: system/security/keystore2/metrics.rs */ message Keystore2KeyOperationWithGeneralInfo { enum Outcome { OUTCOME_UNSPECIFIED = 0; DROPPED = 1; SUCCESS = 2; ABORT = 3; PRUNED = 4; ERROR = 5; } // Outcome of the operation optional Outcome outcome = 1; // Response code or error code in case of error outcome optional int32 error_code = 2; // Indicates whether the key was upgraded during the operation optional bool key_upgraded = 3; // Security level of the Keymint instance which performs the operation. optional android.system.security.keystore2.SecurityLevelEnum security_level = 4; // Count of a particular combination of field values of this atom optional int32 count = 5; } /** * Logs: Keystore 2 storage statistics. * Logged from: system/security/keystore2 */ message Keystore2StorageStats { enum Storage { STORAGE_UNSPECIFIED = 0; KEY_ENTRY = 1; KEY_ENTRY_ID_INDEX = 2; KEY_ENTRY_DOMAIN_NAMESPACE_INDEX = 3; BLOB_ENTRY = 4; BLOB_ENTRY_KEY_ENTRY_ID_INDEX = 5; KEY_PARAMETER = 6; KEY_PARAMETER_KEY_ENTRY_ID_INDEX = 7; KEY_METADATA = 8; KEY_METADATA_KEY_ENTRY_ID_INDEX = 9; GRANT = 10; AUTH_TOKEN = 11; BLOB_METADATA = 12; BLOB_METADATA_BLOB_ENTRY_ID_INDEX =13; METADATA = 14; DATABASE = 15; LEGACY_STORAGE = 16; } // Type of the storage (database table or legacy storage) of which the size is reported. optional Storage storage_type = 1; // Storage size in bytes optional int64 size = 2; // Unused space, in bytes. The total storage size may be larger, indicating // inefficiencies in the packing of data in the database. optional int64 unused_size = 3; } /** * Logs Remote Key Provisioning (RKP) related error events. * Logged from: system/security/keystore2 */ message RkpErrorStats { enum RkpError { RKP_ERROR_UNSPECIFIED = 0; // The key pool is out of keys. OUT_OF_KEYS = 1; // Falling back to factory provisioned keys during hybrid mode. FALL_BACK_DURING_HYBRID = 2; } // Type of the error event optional RkpError rkp_error = 1; // Count of a particular error occurred. optional int32 count = 2; } /** * Logs: Status of the attestation key pool related to * Remote Key Provisioning (RKP). * Logged from: system/security/keystore2 */ message RkpPoolStats { /** * Security level of the Keymint instance associated with the * attestation pool status. */ optional android.system.security.keystore2.SecurityLevelEnum security_level = 1; /** * The number of signed attestation certificate chains which are * expired. */ optional int32 expiring = 2; /** * The number of signed attestation certificate chains which have * not yet been assigned to an app. */ optional int32 unassigned = 3; /** * The number of signed attestation keys. */ optional int32 attested = 4; /** * The total number of attestation keys. */ optional int32 total = 5; } /** * Logs: Number of keystore2 crashes per-boot cycle. * Logged from: system/security/keystore2 */ message Keystore2CrashStats { optional int32 count_of_crash_events = 1; } // Blob Committer stats // Keep in sync between: // frameworks/proto_logging/stats/enums/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/proto_logging/stats/enums/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/proto_logging/stats/enums/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/proto_logging/stats/enums/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 [(log_mode) = MODE_BYTES]; // List of leasees of this Blob optional BlobLeaseeListProto leasees = 5 [(log_mode) = MODE_BYTES]; } /** * Logs when the HDMI CEC active source changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecAtomWriter.java */ message HdmiCecActiveSourceChanged { // The logical address of the active source. optional android.stats.hdmi.LogicalAddress active_source_logical_address = 1; // The physical address of the active source. Consists of four hexadecimal nibbles. // Examples: 0x1234, 0x0000 (root device). 0xFFFF represents an unknown or invalid address. // See section 8.7 in the HDMI 1.4b spec for details. optional int32 active_source_physical_address = 2; // The relationship between this device and the active source. optional android.stats.hdmi.PathRelationship local_relationship = 3; } /** * Logs when an HDMI CEC message is sent or received. * * Logged from: * frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecAtomWriter.java */ message HdmiCecMessageReported { // The calling uid of the application that caused this atom to be written. optional int32 uid = 1 [(is_uid) = true]; // Whether a HDMI CEC message is sent from this device, to this device, or neither. optional android.stats.hdmi.MessageDirection direction = 2; // The HDMI CEC logical address of the initiator. optional android.stats.hdmi.LogicalAddress initiator_logical_address = 3; // The HDMI CEC logical address of the destination. optional android.stats.hdmi.LogicalAddress destination_logical_address = 4; // The opcode of the message. Ranges from 0x00 to 0xFF. // For all values, see section "CEC 15 Message Descriptions" in the HDMI CEC 1.4b spec. optional int32 opcode = 5; // The result of attempting to send the message on its final retransmission attempt. // Only applicable to outgoing messages; set to SEND_MESSAGE_RESULT_UNKNOWN otherwise. optional android.stats.hdmi.SendMessageResult send_message_result = 6; // Fields specific to messages // The user control command that was received. optional android.stats.hdmi.UserControlPressedCommand user_control_pressed_command = 7; // Fields specific to messages // The opcode of the message that was feature aborted. // Set to 0x100 when unknown or not applicable. optional int32 feature_abort_opcode = 8; // The reason for the feature abort. optional android.stats.hdmi.FeatureAbortReason feature_abort_reason = 9; } /** * Logs when an auto rotate event occurs while smart auto rotate is enabled. */ message AutoRotateReported { enum Orientation { UNKNOWN = 0; DEPRECATED = 1; ROTATION_0 = 2; ROTATION_90 = 3; ROTATION_180 = 4; ROTATION_270 = 5; DISABLED = 6; UNAVAILABLE = 7; FAILURE = 8; } // Orientation of the device when a rotation was detected. optional Orientation current_orientation = 1; // The orientation of the phone after rotation before going through the recommendation service. optional Orientation proposed_orientation = 2; // Orientation recommended by the smart autorotate service component outside of the platform. It // may or may not match the proposed_orientation. Can be disabled or unavailable if the // recommendation service is disabled or unavailable. Will be unknown if the service failed. optional Orientation recommended_orientation = 3; // Time taken to calculate the rotation recommendation. optional int64 recommendation_process_duration_millis = 4; } /** * Logs when sensors only autorotate is triggered. Associated event can be a rotation preindication, * actual event or a "data ready to be pulled" indication. More info: go/autorotate-logging. * * Logged from: * platform/vendor/unbundled_google/packages/SystemUIGoogle/src/com/google/android/systemui/autorotate/DataLogger.java */ message DeviceRotated { // Timestamp of the event in millis. We log the timestamp explicitly since // data logging will follow the event logging and all these // will be joined with other logs such as rotation button clicked. optional int64 timestamp_millis = 1; // Device orientation optional android.stats.wm.Orientation proposed_orientation = 2; enum RotationEventType{ UNKNOWN = 0; // An early indication of device might be rotated. PREINDICATION = 1; // Device rotation is detected. ACTUAL_EVENT = 2; // Device rotated and the data associated with it is ready to be pulled. // This happens after the ACTUAL_EVENT since some data after the event is // also useful. DATA_READY = 3; } optional RotationEventType rotation_event_type = 3; } /** * Records the raw sensor data published by the device orientation debug sensor. The pull will be * configured to be conditioned on the {@code DeviceRotated} atom. * * Logged from: * platform/vendor/unbundled_google/packages/SystemUIGoogle/src/com/google/android/systemui/autorotate/DataLogger.java */ message DeviceRotatedData { // All the sensor data and timestamps used to calculate the orientation optional DeviceRotatedSensorData snapshot = 1 [(log_mode) = MODE_BYTES]; // Resulting orientation optional android.stats.wm.Orientation proposed_orientation = 2; } message DeviceRotatedSensorData { optional DeviceRotatedSensorHeader header = 1 [(log_mode) = MODE_BYTES]; repeated DeviceRotatedSensorSample sample = 2 [(log_mode) = MODE_BYTES]; } message DeviceRotatedSensorHeader { optional int64 timestamp_base_millis = 1; } message DeviceRotatedSensorSample{ optional int32 timestamp_offset_millis = 1; enum SensorType { UNKNOWN = 0; ACCEL = 1; GYRO = 2; } optional SensorType sensor_type = 2; optional float x_value = 3; optional float y_value = 4; optional float z_value = 5; } /** * Pushes TLS handshake counters from Conscrypt. * Pulled from: * external/conscrypt/common/src/main/java/org/conscrypt/ConscryptEngineSocket.java * external/conscrypt/common/src/main/java/org/conscrypt/ConscryptFileDescriptorSocket.java */ message TlsHandshakeReported { optional bool success = 1; optional android.stats.tls.Protocol protocol = 2; optional android.stats.tls.CipherSuite cipher_suite = 3; optional int32 handshake_duration_millis = 4; } /** * Logs when a TextClassifier API is invoked. * * See frameworks/base/core/java/android/view/textclassifier/TextClassifier.java * Logged from: external/libtextclassifier/java/ */ message TextClassifierApiUsageReported { enum ApiType { UNKNOWN_API = 0; SUGGEST_SELECTION = 1; CLASSIFY_TEXT = 2; GENERATE_LINKS = 3; DETECT_LANGUAGES = 4; SUGGEST_CONVERSATION_ACTIONS = 5; } optional ApiType api_type = 1; enum ResultType { UNKNOWN_RESULT = 0; SUCCESS = 1; FAIL = 2; } optional ResultType result_type = 2; optional int64 latency_millis = 3; optional string session_id = 4; } /** * Logs the current state of an application/process before it is killed. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Pushed from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogKillStatsReported { // Linux process uid for the package. optional int32 uid = 1 [(is_uid) = true]; // State of the uid when it was killed. enum UidState { UNKNOWN_UID_STATE = 0; BACKGROUND_MODE = 1; FOREGROUND_MODE = 2; } optional UidState uid_state = 2; // System state indicating whether the system was in normal mode or garage mode. enum SystemState { UNKNOWN_SYSTEM_STATE = 0; USER_INTERACTION_MODE = 1; USER_NO_INTERACTION_MODE = 2; GARAGE_MODE = 3; } optional SystemState system_state = 3; // Reason for killing the application. // Keep in sync with proto file at packages/services/Car/cpp/watchdog/proto enum KillReason { UNKNOWN_KILL_REASON = 0; KILLED_ON_ANR = 1; KILLED_ON_IO_OVERUSE = 2; KILLED_ON_MEMORY_OVERUSE = 3; } optional KillReason kill_reason = 4; // Stats of the processes owned by the application when the application was killed. // The process stack traces are not collected when the application was killed due to IO_OVERUSE. optional CarWatchdogProcessStats process_stats = 5 [(log_mode) = MODE_BYTES]; // The application's I/O overuse stats logged only when the kill reason is KILLED_ON_IO_OVERUSE. optional CarWatchdogIoOveruseStats io_overuse_stats = 6 [(log_mode) = MODE_BYTES]; } /** * Logs the I/O overuse stats for an application on detecting I/O overuse. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Pushed from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogIoOveruseStatsReported { // Linux process uid for the package. optional int32 uid = 1 [(is_uid) = true]; // The application's I/O overuse stats. optional CarWatchdogIoOveruseStats io_overuse_stats = 2 [(log_mode) = MODE_BYTES]; } /** * Logs I/O overuse stats for a package. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Logged from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogIoOveruseStats { enum Period { UNKNOWN_PERIOD = 0; DAILY = 1; WEEKLY = 2; } // Threshold and usage stats period. optional Period period = 1; // Threshold in-terms of write bytes defined for the package. optional CarWatchdogPerStateBytes threshold = 2; // Number of write bytes in each state for the specified period. optional CarWatchdogPerStateBytes written_bytes = 3; // Application or service uptime during the aforementioned period. optional uint64 uptime_millis = 4; }; /** * Logs bytes attributed to each application and system states. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Logged from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogPerStateBytes { // Number of bytes attributed to the application foreground. optional int64 foreground_bytes = 1; // Number of bytes attributed to the application background. optional int64 background_bytes = 2; // Number of bytes attributed to the garage mode. optional int64 garage_mode_bytes = 3; } /** * Logs each CarWatchdogProcessStat in CarWatchdogProcessStats. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Logged from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogProcessStats { // Records the stats of the processes owned by an application. repeated CarWatchdogProcessStat process_stat = 1; } /** * Logs a process's stats. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Logged from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogProcessStat { // Command name of the process. optional string process_name = 1; // Process uptime. optional uint64 uptime_millis = 2; // Number of major page faults caused by the process and its children. optional uint64 major_page_faults = 3; // Peak virtual memory size in kb. optional uint64 vm_peak_kb = 4; // Virtual memory size in kb. optional uint64 vm_size_kb = 5; // Peak resident set size (high water mark) in kb. optional uint64 vm_hwm_kb = 6; // Resident set size in kb. optional uint64 vm_rss_kb = 7; } /** * Logs total I/O usage summary for all applications and services running in the system. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Pulled from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogSystemIoUsageSummary { // I/O usage summary for the system. optional CarWatchdogIoUsageSummary io_usage_summary = 1 [(log_mode) = MODE_BYTES]; } /** * Logs I/O usage summary for an UID. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Pulled from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogUidIoUsageSummary { // UID of the application/service whose usage summary are recorded. optional int32 uid = 1 [(is_uid) = true]; // I/O usage summary for the UID. optional CarWatchdogIoUsageSummary io_usage_summary = 2 [(log_mode) = MODE_BYTES]; } /** * Logs I/O usage summary for a time period. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Pulled from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogIoUsageSummary { // Summary event time period. optional CarWatchdogEventTimePeriod event_time_period = 1; // Daily I/O usage summary for the period. Logs summary entries only for days with I/O usage. // The entries are ordered beginning from the event_time_period.start_time_millis. repeated CarWatchdogDailyIoUsageSummary daily_io_usage_summary = 2; } /** * Logs a car watchdog event's time period. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Pulled from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogEventTimePeriod { enum Period { UNKNOWN_PERIOD = 0; WEEKLY = 1; BIWEEKLY = 2; MONTHLY = 3; } // Start time of the event in milliseconds since epoch. optional uint64 start_time_millis = 1; // Period for the event. optional Period period = 2; } /** * Logs daily I/O usage summary. * * Keep in sync with proto file at * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto * * Pulled from: * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java */ message CarWatchdogDailyIoUsageSummary { // Total bytes written to disk during a day. optional CarWatchdogPerStateBytes written_bytes = 1; // Total uptime for the system or service or application during a day. optional uint64 uptime_millis = 2; // Total disk I/O overuses during a day. optional int32 overuse_count = 3; } /* * pushes Media playback information. * Logged from * frameworks/base/services/core/java/com/android/server/media/metrics/ * MediaMetricsManagerService.java */ message MediametricsPlaybackReported { optional int32 uid = 1 [(is_uid) = true]; // Randomly generated log session ID. A Base64 encoded hex string representing a // 128-bit integer. optional string log_session_id = 2; // The total length of the media in milliseconds. 0 for live contents. optional int64 media_duration_millis = 3; // Network, device, or mixed. optional android.stats.mediametrics.StreamSourceType stream_source = 4; // Stream type. DASH, HLS, etc optional android.stats.mediametrics.StreamType stream_type = 5; // Live, VOD, others optional android.stats.mediametrics.PlaybackType playback_type = 6; // DRM type optional android.stats.mediametrics.DrmType drm_type = 7; // Main, AD, others optional android.stats.mediametrics.ContentType content_type = 8; // Player name. E.g. ExoPlayer optional string player_name = 9; // Player version. E.g. 1.10.3e optional string player_version = 10; // Player related experiment IDs optional Experiments experiment_ids = 11 [(log_mode) = MODE_BYTES]; // Number of frames played. Dropped frames included. -1 means unknown. optional int32 video_frames_played = 12; // Number of frames dropped. -1 means unknown. optional int32 video_frames_dropped = 13; // Number of audio underruns. -1 means unknown. optional int32 audio_underrun_count = 14; // Total number of bytes read from the network optional int64 network_bytes_read = 15; // Total number of bytes read from on-device sources optional int64 local_bytes_read = 16; // Total transfer spent reading from the network in ms. // For parallel requests, the overlapping time intervals are counted only once. optional int64 network_transfer_duration_millis = 17; // A session ID generated from DRM to distinguish different DRM sessions. optional string drm_session_id = 18; } message MediaNetworkInfoChanged { // Randomly generated log session ID. A Base64 encoded hex string representing a // 128-bit integer. optional string log_session_id = 1; // New network type optional android.stats.mediametrics.NetworkType type = 2; // Network Start time, relative to playback creation time in millisecond. // It's in absolute time (e.g. always ticks even if the playback is paused). optional int64 time_since_playback_created_millis = 3; } message MediaPlaybackStateChanged { // Randomly generated log session ID. A Base64 encoded hex string representing a // 128-bit integer. optional string log_session_id = 1; // New playback state optional android.stats.mediametrics.PlaybackState playback_state = 2; // State change time, relative to playback creation time in millisecond. // It's in absolute time (e.g. always ticks even if the playback is paused). optional int64 time_since_playback_created_millis = 3; } message MediaPlaybackErrorReported { // Randomly generated log session ID. A Base64 encoded hex string representing a // 128-bit integer. optional string log_session_id = 1; // A shortened call stack of the error optional string exception_stack = 2; // Error code optional android.stats.mediametrics.PlaybackErrorCode error_code = 3; // Sub-code of error type specified by the error code. optional int32 sub_error_code = 4; // Error time, relative to playback creation time in millisecond. // It's in absolute time (e.g. always ticks even if the playback is paused). optional int64 time_since_playback_created_millis = 5; } message MediaPlaybackTrackChanged { // Randomly generated log session ID. A Base64 encoded hex string representing a // 128-bit integer. optional string log_session_id = 1; // The track is on or off after the change optional android.stats.mediametrics.TrackState state = 2; // The reason of the track change optional android.stats.mediametrics.TrackChangeReason reason = 3; // The MIME type of the container. E.g. video/mp4 optional string container_mime_type = 4; // The sample MIME type of the track. E.g. video/avc optional string sample_mime_type = 5; // Codec name optional string codec_name = 6; // Bits per second. 0 means unknown. optional int32 bitrate = 7; // Track change time, relative to playback creation time in millisecond. // It's in absolute time (e.g. always ticks even if the playback is paused). optional int64 time_since_playback_created_millis = 8; // Track type. Audio, Video, Text optional android.stats.mediametrics.TrackType type = 9; // 2-letter ISO 639-1 language code. optional string language = 10; // IETF BCP 47 optional language region subtag based on a two-letter country code optional string language_region = 11; // Number of channels optional int32 channel_count = 12; // Samples per second optional int32 sample_rate = 13; // The width of the video in pixels. optional int32 width = 14; // The height of the video in pixels. optional int32 height = 15; // Video frame rate in frames per second. optional float video_frame_rate = 16; } message Experiments { // Experiment IDs sent by the player. repeated int64 experiments = 1; } /** * Logs when a Wifi network scan happens. * * Logged from: * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMetrics.java */ message WifiScanReported { enum Type { TYPE_UNKNOWN = 0; // Single scan. TYPE_SINGLE = 1; // Background scan (deprecated, should not happen). TYPE_BACKGROUND = 2; } enum Result { RESULT_UNKNOWN = 0; // Failed to start scan. RESULT_FAILED_TO_START = 1; // The HAL reported a scan failure after the scan was started. RESULT_FAILED_TO_SCAN = 2; // Scan succeeded. RESULT_SUCCESS = 3; } enum Source { SOURCE_UNKNOWN = 0; // No work source set - not possible to determine the origin. SOURCE_NO_WORK_SOURCE = 1; // The Wifi stack. SOURCE_WIFI_STACK = 2; // GMS on behalf of some other app. SOURCE_GMS = 3; // Settings app. SOURCE_SETTINGS_APP = 4; // Other app directly. SOURCE_OTHER_APP = 5; } enum Importance { IMPORTANCE_UNKNOWN = 0; // Foreground app. Corresponds to the value of // ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND or less. IMPORTANCE_FOREGROUND = 1; // Foreground service. Corresponds to the value of // ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND_SERVICE IMPORTANCE_FOREGROUND_SERVICE = 2; // Everything else. IMPORTANCE_BACKGROUND = 3; } // Scan type optional Type type = 1; // Outcome: success/failure optional Result result = 2; // What initiated a scan. optional Source source = 3; // Process importance of the initiator. // This is only available for non-system calls. optional Importance importance = 4; // Time taken for the scan. optional int32 scan_duration_millis = 5; // Count of found networks. optional int32 count_networks_found = 6; } /** * Logs when a Wifi PNO (Preferred Network Offload) scan happens. * * Logged from: * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMetrics.java */ message WifiPnoScanReported { enum State { UNKNOWN = 0; // Scan started. STARTED = 1; // Scan failed to start (e.g. bad request, unsupported by hardware, etc). FAILED_TO_START = 2; // Scan completed and a network was found. // Note - due to implementation constraints, nothing is reported when a scan completes but // doesn't find any networks. FINISHED_NETWORKS_FOUND = 3; // Scan failed. FAILED = 4; } optional State state = 1; } /** * Logs when the entitlement configuration of an IMS service is queried/updated. * * Logged from: ImsServiceEntitlement app */ message ImsServiceEntitlementUpdated { // The purpose of entitlement query/update enum Purpose { UNKNOWN_PURPOSE = 0; // Initial service activation in foreground ACTIVATION = 1; // Updating service configuration in foreground UPDATE = 2; // Background polling for querying service entitlement POLLING = 3; } // The IMS services enum ServiceType { UNKNOWN_SERVICE = 0; VOWIFI = 1; VOLTE = 2; SMSOIP = 3; } // The result of activation enum AppResult { UNKNOWN_RESULT = 0; ENABLED = 1; DISABLED = 2; INCOMPATIBLE = 3; PROVISIONING = 4; SUCCESSFUL = 5; FAILED = 6; CANCELED = 7; TIMEOUT = 8; UNEXPECTED_RESULT = 9; } // The Android carrier ID for the carrier providing the IMS service. // This may not be the actual carrier of the device, e.g. a MVNO // may use the IMS service of its MNO. optional int64 carrier_id = 1; // The Android carrier ID of the actual carrier. // E.g. a MVNO may use its MNO's IMS service. In this case, // actual_carrier_id is the MVNO and carrier_id is the MNO. optional int64 actual_carrier_id = 2; // The purpose of this query/update. optional Purpose purpose = 3; // Which IMS service's entitlement status were queried/updated. optional ServiceType service_type = 4; // Result of this query/update. optional AppResult app_result = 5; // How long (in milliseconds) this query/update took. optional int64 duration_millis = 6; } // Indicates which compile filter was used for the package being loaded in an ART session. enum ArtCompileFilter { ART_COMPILATION_FILTER_ERROR = 1; ART_COMPILATION_FILTER_UNKNOWN = 2; ART_COMPILATION_FILTER_ASSUMED_VERIFIED = 3; ART_COMPILATION_FILTER_EXTRACT = 4; ART_COMPILATION_FILTER_VERIFY = 5; ART_COMPILATION_FILTER_QUICKEN = 6; ART_COMPILATION_FILTER_SPACE_PROFILE = 7; ART_COMPILATION_FILTER_SPACE = 8; ART_COMPILATION_FILTER_SPEED_PROFILE = 9; ART_COMPILATION_FILTER_SPEED = 10; ART_COMPILATION_FILTER_EVERYTHING_PROFILE = 11; ART_COMPILATION_FILTER_EVERYTHING = 12; ART_COMPILATION_FILTER_FAKE_RUN_FROM_APK = 13; ART_COMPILATION_FILTER_FAKE_RUN_FROM_APK_FALLBACK = 14; ART_COMPILATION_FILTER_FAKE_RUN_FROM_VDEX_FALLBACK = 15; } enum ArtCompilationReason { ART_COMPILATION_REASON_ERROR = 1; ART_COMPILATION_REASON_UNKNOWN = 2; ART_COMPILATION_REASON_FIRST_BOOT = 3; ART_COMPILATION_REASON_BOOT = 4; ART_COMPILATION_REASON_INSTALL = 5; ART_COMPILATION_REASON_BG_DEXOPT = 6; ART_COMPILATION_REASON_AB_OTA = 7; ART_COMPILATION_REASON_INACTIVE = 8; ART_COMPILATION_REASON_SHARED = 9; ART_COMPILATION_REASON_INSTALL_WITH_DEX_METADATA = 10; ART_COMPILATION_REASON_POST_BOOT = 11; ART_COMPILATION_REASON_INSTALL_FAST = 12; ART_COMPILATION_REASON_INSTALL_BULK = 13; ART_COMPILATION_REASON_INSTALL_BULK_SECONDARY = 14; ART_COMPILATION_REASON_INSTALL_BULK_DOWNGRADED = 15; ART_COMPILATION_REASON_INSTALL_BULK_SECONDARY_DOWNGRADED = 16; ART_COMPILATION_REASON_BOOT_AFTER_OTA = 17; ART_COMPILATION_REASON_PREBUILT = 18; ART_COMPILATION_REASON_CMDLINE = 19; } // Indicates which kind of measurement ART is reporting. // // Where it makes sense, the datum ID ends with the type of datum (counter or histogram) and the // units. // Note: Histograms are not yet reported by statsd. enum ArtDatumId { ART_DATUM_INVALID = 0; ART_DATUM_GC_WORLD_STOP_TIME_AVG_MICROS = 1; ART_DATUM_GC_YOUNG_GENERATION_COLLECTION_TIME_HISTO_MILLIS = 2; ART_DATUM_GC_YOUNG_GENERATION_COLLECTION_COUNT = 3; ART_DATUM_GC_FULL_HEAP_COLLECTION_TIME_HISTO_MILLIS = 4; ART_DATUM_GC_FULL_HEAP_COLLECTION_COUNT = 5; ART_DATUM_JIT_METHOD_COMPILE_TIME_MICROS = 6; ART_DATUM_AOT_COMPILE_TIME = 7; ART_DATUM_CLASS_VERIFICATION_TIME_COUNTER_MICROS = 8; ART_DATUM_CLASS_LOADING_TIME_COUNTER_MICROS = 9; // Metrics IDs for dex2oat. ART_DATUM_DEX2OAT_RESULT_CODE = 10; ART_DATUM_DEX2OAT_DEX_CODE_COUNTER_BYTES = 11; ART_DATUM_DEX2OAT_TOTAL_TIME_COUNTER_MILLIS = 12; ART_DATUM_DEX2OAT_VERIFY_DEX_FILE_TIME_COUNTER_MILLIS = 13; ART_DATUM_DEX2OAT_FAST_VERIFY_TIME_COUNTER_MILLIS = 14; ART_DATUM_DEX2OAT_RESOLVE_METHODS_AND_FIELDS_TIME_COUNTER_MILLIS = 15; ART_DATUM_CLASS_VERIFICATION_COUNT = 16; ART_DATUM_GC_TOTAL_BYTES_ALLOCATED = 17; ART_DATUM_GC_TOTAL_METADATA_SIZE_BYTES = 18 [deprecated=true]; ART_DATUM_GC_YOUNG_GENERATION_COLLECTION_THROUGHPUT_HISTO_MB_PER_SEC = 19; ART_DATUM_GC_FULL_HEAP_COLLECTION_THROUGHPUT_HISTO_MB_PER_SEC = 20; ART_DATUM_JIT_METHOD_COMPILE_COUNT = 21; ART_DATUM_GC_YOUNG_GENERATION_TRACING_THROUGHPUT_HISTO_MB_PER_SEC = 22; ART_DATUM_GC_FULL_HEAP_TRACING_THROUGHPUT_HISTO_MB_PER_SEC = 23; ART_DATUM_GC_YOUNG_GENERATION_COLLECTION_THROUGHPUT_AVG_MB_PER_SEC = 24; ART_DATUM_GC_FULL_HEAP_COLLECTION_THROUGHPUT_AVG_MB_PER_SEC = 25; ART_DATUM_GC_YOUNG_GENERATION_TRACING_THROUGHPUT_AVG_MB_PER_SEC = 26; ART_DATUM_GC_FULL_HEAP_TRACING_THROUGHPUT_AVG_MB_PER_SEC = 27; ART_DATUM_GC_TOTAL_COLLECTION_TIME_MS = 28; } // Indicates what class of thread the reported values apply to. enum ArtThreadType { ART_THREAD_MAIN = 1; ART_THREAD_BACKGROUND = 2; } // Indicates the type of dex metadata. enum ArtDexMetadataType { ART_DEX_METADATA_TYPE_UNKNOWN = 0; ART_DEX_METADATA_TYPE_PROFILE = 1; ART_DEX_METADATA_TYPE_VDEX = 2; ART_DEX_METADATA_TYPE_PROFILE_AND_VDEX = 3; ART_DEX_METADATA_TYPE_NONE = 4; ART_DEX_METADATA_TYPE_ERROR = 5; } // Indicates the type of the apk. enum ArtApkType { ART_APK_TYPE_UNKNOWN = 0; ART_APK_TYPE_BASE = 1; ART_APK_TYPE_SPLIT = 2; } // Indicates the ISA. enum ArtIsa { ART_ISA_UNKNOWN = 0; ART_ISA_ARM = 1; ART_ISA_ARM64 = 2; ART_ISA_X86 = 3; ART_ISA_X86_64 = 4; ART_ISA_MIPS = 5; ART_ISA_MIPS64 = 6; } message ArtDatumReported { // The session ID is used to correlate this report with others from the same ART instance. optional int64 session_id = 1; // The UID of the app that ART is running on behalf of. optional int32 uid = 2 [(is_uid) = true]; // What compiler filter the APK or DEX file was compiled with. optional ArtCompileFilter compile_filter = 3; // Why the package was compiled the way it was. optional ArtCompilationReason compilation_reason = 4; // The number of milliseconds since the ART runtime instance was started. optional int64 timestamp_millis = 5; // What kind of thread (UI or background) this metric corresponds to. optional ArtThreadType thread_type = 6; // Which counter this is that is being reported. optional ArtDatumId kind = 7; // The value of the counter. optional int64 value = 8; // The type of dex metadata optional ArtDexMetadataType dex_metadata_type = 9; // The type of the APK file. optional ArtApkType apk_type = 10; // The ISA of the device. optional ArtIsa isa = 11; } /** * Logged when a SIM-specific settings restore was attempted. * * Logged from: * packages/providers/TelephonyProvider/src/com/android/providers/telephony/TelephonyProvider.java */ message SimSpecificSettingsRestored { optional android.telephony.SimSpecfifcSettingsRestoreResult result = 1; // Indicates which restore flow was followed. optional android.telephony.SimSpecificSettingsRestoreCase restored_from_suw = 2; // Indicates which criteria was used to match the inserted SIM to backed up // SIM. Only relevant when result is SUCCESS optional android.telephony.SimSpecificSettingsRestoreMatchingCriteria matching_criteria = 3; } /** * The latency of Binder calls broken down by calling API and method name. * This is different from BinderCalls as it collects a histogram of the * latencies (to get more detailed data) not just the count, sum, and maximum. * * Logged from: * frameworks/base/core/java/com/android/internal/os/BinderLatencyObserver.java */ message BinderLatencyReported { message Dims { enum ProcessSource { UNKNOWN_PROCESS_SOURCE = 0; SYSTEM_SERVER = 1; TELEPHONY = 2; BLUETOOTH = 3; } enum ServiceClassName { UNKNOWN_CLASS = 0; } enum ServiceMethodName { UNKNOWN_METHOD = 0; } // Required. optional ProcessSource process_source = 1; // The class name of the API making the call to Binder. Enum value // is preferred as uses much less data to store. // This field does not contain PII. oneof service_class { ServiceClassName service_class_name_as_enum = 2; string service_class_name = 3; } // Method name of the API call. It can also be a transaction code if we // cannot resolve it to a name. See Binder#getTransactionName. Enum value // is preferred as uses much less data to store. // This field does not contain PII. oneof service_method { ServiceMethodName service_method_name_as_enum = 4; string service_method_name = 5; } } message ApiStats { // required. optional Dims dims = 1; // Indicates the first bucket that had any data. Allows omitting any empty // buckets at the start of the bucket list and thus save on data size. optional int32 first_bucket_index = 2; // Stores the count of samples for each bucket. The number of buckets and // their sizes are controlled server side with a flag. repeated int32 buckets = 3; } message RepeatedApiStats { repeated ApiStats api_stats = 1; } // The binder latency data broken down by the dimensions specified above. // The message wrapper is used for the repeated field as top level repeated // fields are not allowed. // MODE_BYTES is used as nested messages are not allowed otherwise. // Required. optional RepeatedApiStats repeated_api_stats = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // The fraction of samples that are recorded in the histogram. // Required. optional float sampling_rate = 2; // Indicates how many shards the APIs are divided in - e.g. for 3 every // 3rd API will be included in the data for this shard. // Required. optional int32 sharding_modulo = 3; // Params for histogram buckets. // The number of buckets the histogram should have. optional int32 bucket_count = 4; // The size (upper bound) of the first bucket (used to avoid creating an // excessive amount of small buckets). E.g. for first_bucket_size of 5, the // first bucket will be [0, 5) and the second will be [5, 5 * scaleFactor). optional int32 first_bucket_size = 5; // The rate in which each consecutive bucket increases (before rounding). // Implemented in: com.android.internal.os.BinderLatencyBuckets. optional float scale_factor = 6; } /** * Log audio device types that are used for input/output. * Next Tag: 2 */ message AudioDevice { // See audio_devices_t in system/media/audio/include/system/audio-hal-enums.h repeated int32 type = 1; } /** * Track information about AAudio Stream * Logged from * frameworks/av/services/mediametrics/AudioAnalytics.cpp */ message MediametricsAAudioStreamReported { // The implementation of aaudio. enum CallerPath { CALLER_PATH_UNKNOWN = 0; CALLER_PATH_LEGACY = 1; CALLER_PATH_MMAP = 2; } optional CallerPath path = 1; // The direction of the stream. // See aaudio_direction_t in frameworks/av/media/libaaudio/include/aaudio/AAudio.h // The Direction values are different from aaudio_direction_t to avoid having 0 at the first // value since first value will be used as default value. // See lookup in frameworks/av/services/mediametrics/AudioTypes.cpp // for conversion from aaudio_direction_t to Direction. enum Direction { // The direction is unknown. DIRECTION_UNKNOWN = 0; // Audio data will travel out of the device. DIRECTION_OUTPUT = 1; // Audio data will travel into the device. DIRECTION_INPUT = 2; } optional Direction direction = 2; // The amount read or written in one shot by the Mixer or DSP. optional int32 frames_per_burst = 3; // The number of frames that the buffer is used. optional int32 buffer_size = 4; // The allocated number of frames for the buffer. optional int32 buffer_capacity = 5; // The channel count of the aaudio stream. optional int32 channel_count = 6; // Total frames transferred (written or read) optional int64 total_frames_transferred = 7; // The performance mode. // See aaudio_performance_mode_t in frameworks/av/media/libaaudio/include/aaudio/AAudio.h enum PerformanceMode { // The performance mode is unknown. PERFORMANCE_MODE_UNKNOWN = 0; // No particular performance mode needs. Default. PERFORMANCE_MODE_NONE = 10; // Extending battery life is more important than low latency. PERFORMANCE_MODE_POWER_SAVING = 11; // Reducing latency is more important than battery life. PERFORMANCE_MODE_LOW_LATENCY = 12; } // The performance mode requested by the applications. optional PerformanceMode perf_mode_requested = 8; // The actual performance mode used by aaudio. optional PerformanceMode perf_mode_actual = 9; // The mode requested for sharing the device // See aaudio_sharing_mode_t in frameworks/av/media/libaaudio/include/aaudio/AAudio.h // The SharingMode values are different from aaudio_direction_t to avoid having 0 at the first // value since first value will be used as default value. // See lookup in frameworks/av/services/mediametrics/AudioTypes.cpp // for conversion from aaudio_sharing_mode_t to SharingMode. enum SharingMode { // The sharing mode is unknown SHARING_MODE_UNKNOWN = 0; // This will be the only stream using a particular source or sink. SHARING_MODE_EXCLUSIVE = 1; // Multiple application will be mixed by the AAudio server. SHARING_MODE_SHARED = 2; } optional SharingMode sharing = 10; // Approximate number of glitches. // Underrun on output stream. Overrun on input stream. optional int32 xrun_count = 11; // Devices that are used by the aaudio stream. optional AudioDevice types = 12 [(log_mode) = MODE_BYTES]; // Format request by the applications optional int32 format_app = 13; // Format processed by the framework optional int32 format_device = 14; // Android S metric log session id, a Base64Url encoded string representing a 128-bit integer. optional string log_session_id = 15; // The sample rate of the aaudio stream. optional int32 sample_rate = 16; // The content type of the aaudio stream. // An enumeration from system/media/audio/include/system/audio-hal-enums.h audio_content_type_t enum ContentType { CONTENT_TYPE_UNKNOWN = 0; CONTENT_TYPE_SPEECH = 1; CONTENT_TYPE_MUSIC = 2; CONTENT_TYPE_MOVIE = 3; CONTENT_TYPE_SONIFICATION = 4; CONTENT_TYPE_INVALID = -1; } optional ContentType content_type = 17; // The mode of sharing the device requested by the client. optional SharingMode sharing_requested = 18; } /** * Logs media transcoding session ended events. * * Logged from: * frameworks/av/media/libmediatranscoding/TranscoderWrapper.cpp */ message MediaTranscodingSessionEnded { enum Reason { UNKNOWN = 0; // Unused. FINISHED = 1; // Transcoding session finished successfully. ERROR = 2; // Transcoding session returned error while running. PAUSED = 3; // Transcoding session was paused, potentially failed. CANCELLED = 4; // Transcoding session was cancelled. START_FAILED = 5; // Transcoding session failed to start. RESUME_FAILED = 6; // Transcoding session failed to resume. CREATE_FAILED = 7; // Transcoder instance failed to crate. CONFIG_SRC_FAILED = 8; // Configure source failed. CONFIG_DST_FAILED = 9; // Configure destination failed. CONFIG_TRACK_FAILED = 10; // Configure track failed. OPEN_SRC_FD_FAILED = 11; // Open source fd failed. OPEN_DST_FD_FAILED = 12; // Open destination fd failed. NO_TRACKS = 13; // No tracks in source file. } // Reason for logging the atom. optional Reason reason = 1; // UID of client connecting to media transcoding service. optional int32 calling_uid = 2 [(is_uid) = true]; // Transcode session status flag (media_status_t). optional int32 transcode_status = 3; // Transcode speed as framerate, if status is success. optional int32 transcode_fps = 4; // Source video dimensions. optional int32 src_width = 5; optional int32 src_height = 6; // Source video codec information. optional string src_codec_type = 7; optional int32 src_profile = 8; optional int32 src_level = 9; // Source video framerate. optional int32 src_fps = 10; // Source video duration. optional int32 src_duration_millis = 11; // Whether source video is HDR. optional bool src_is_hdr = 12; // Destination video dimensions. optional int32 dst_width = 13; optional int32 dst_height = 14; // Destination video codec information. optional string dst_codec_type = 15; // Whether destination video is HDR. optional bool dst_is_hdr = 16; } /** Logs information about an unattended reboot that took place. This is logged * after the next boot, when the device is first unlocked. * * Logged from: * packages/modules/Scheduling/service/java/com/android/server/RebootReadinessLogger.java */ message UnattendedRebootOccurred { // Time between the reboot readiness state checks starting, and the device // becoming reboot-ready. optional int64 time_until_reboot_ready_millis= 1; // Time taken for the device to be unlocked (i.e. for the keyguard to be // gone) after an unattended reboot took place. optional int64 time_until_first_unlock_millis = 2; // Number of times the reboot was blocked by the device being interactive. optional int32 times_blocked_by_interactivity = 3; // Number of times the reboot was blocked by a callback registered by a // subsystem or a privileged app. optional int32 times_blocked_by_subsystems = 4; // Number of times the reboot was blocked by background app activity. optional int32 times_blocked_by_app_activity = 5; // Time until next user interaction with the device. optional int64 time_until_next_interaction_ms = 6; } /** * Logs information about an app uid or registered system component that has * been blocking the device from being reboot-ready for a long time. * * Logged from: * packages/modules/Scheduling/service/java/com/android/server/RebootReadinessLogger.java */ message LongRebootBlockingReported { enum RebootBlockReason { SYSTEM_COMPONENT = 1; APP_UID = 2; } // The reason why the reboot has been blocked. This is either a system // component that has registered a callback, or an app UID running in the // background. optional RebootBlockReason reboot_block_reason = 1; // Only one of the following two fields should be set, depending on the // RebootBlockReason. // The name supplied by a system component when it registered a callback // to block the reboot. optional string component_name = 2; // The uid of an app that is running in the background. optional int32 uid = 3; } /** * Logs the magnification activated mode and its duration of the usage * when the magnification is disabled. * * Logged from: * frameworks/base/services/accessibility/java/com/android/server/accessibility */ message MagnificationUsageReported { // The definition of the magnification mode. // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. optional android.stats.accessibility.MagnificationMode activated_mode = 1; // The duration of this magnification mode activation in milliseconds optional int64 duration_millis = 2; } /** * Logs the magnification activated mode when IME dialog shows on the screen. * * Logged from: * frameworks/base/services/accessibility/java/com/android/server/accessibility */ message MagnificationModeWithImeOnReported { // The definition of the magnification mode. // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. optional android.stats.accessibility.MagnificationMode activated_mode = 1; } /* * Reports a device controls user interaction * * Logged from: * frameworks/base/packages/SystemUI/src/com/android/systemui/controls/ControlsMetricsLoggerImpl.kt */ message DeviceControlChanged { // The event_id optional int32 event_id = 1; // An identifier to tie together multiple logs relating to the same controls session optional int32 instance_id = 2; // The type of device the user has interacted with (android.service.controls.DeviceTypes) optional int32 device_type = 3; // The service app uid. optional int32 uid = 4 [(is_uid) = true]; // Is the device locked while the action started optional bool is_locked = 5; } /** * This metric is collected at the end of playback * as a pulled atom. * * DrmHal::cleanup() { * // ... * reportFrameworkMetrics(reportPluginMetrics()); * // ... * } * This proto should be kept in-sync with * frameworks/av/drm/libmediadrm/protos/metrics.proto. */ message DrmFrameworkMetrics { // Attributes are associated with a recorded value. E.g. A counter may // represent a count of an operation returning a specific error code. The // error code will be an attribute. message Attributes { // Reserved for compatibility with logging proto. reserved 2 to 13; // A general purpose error code where 0 means OK. optional int32 error_code = 1; // Defined at ::android::hardware::drm::V1_0::KeyStatusType; optional uint32 key_status_type = 14; // Defined at ::android::hardware::drm::V1_0::EventType; optional uint32 event_type = 15; } // The Counter message is used to store a count value with an associated // Attribute. message Counter { optional uint64 count = 1; // Represents the attributes associated with this counter instance. optional Attributes attributes = 2; } // The DistributionMetric is meant to capture the moments of a normally // distributed (or approximately normal) value. message DistributionMetric { optional float min = 1; optional float max = 2; optional float mean = 3; optional double variance = 4; optional uint64 operation_count = 5; // Represents the attributes associated with this distribution metric // instance. optional Attributes attributes = 6; } message SessionLifetime { // Start time of the session in milliseconds since epoch. optional uint64 start_time_millis = 1; // End time of the session in milliseconds since epoch. optional uint64 end_time_millis = 2; } // The count of open session operations. Each instance has a specific error // code associated with it. repeated Counter open_session_counter = 1; // The count of close session operations. Each instance has a specific error // code associated with it. repeated Counter close_session_counter = 2; // Count and execution time of getKeyRequest calls. repeated DistributionMetric get_key_request_time_us = 3; // Count and execution time of provideKeyResponse calls. repeated DistributionMetric provide_key_response_time_us = 4; // Count of getProvisionRequest calls. repeated Counter get_provisioning_request_counter = 5; // Count of provideProvisionResponse calls. repeated Counter provide_provisioning_response_counter = 6; // Count of key status events broken out by status type. repeated Counter key_status_change_counter = 7; // Count of events broken out by event type repeated Counter event_callback_counter = 8; // Count getPropertyByteArray calls to retrieve the device unique id. repeated Counter get_device_unique_id_counter = 9; message SessionLifetimeEntry { optional string session_id = 1; optional SessionLifetime session_lifetime = 2; } // Session ids to lifetime (start and end time) map. // Session ids are strings of hex-encoded byte arrays. // This field is equivalent to the map // field in frameworks/av/drm/libmediadrm/protos/metrics.proto. repeated SessionLifetimeEntry session_lifetimes = 10; } /** * The metric is collected at the end of playback * as a pulled atom MediaDrmActivityInfo. * * The framework_metrics is defined in * frameworks/av/drm/libmediadrm/protos/metrics.proto. * * The format of vendor_metrics is MediaDrm plugin dependent. * * DrmHal::cleanup() { * // ... * reportFrameworkMetrics(reportPluginMetrics()); * // ... * } * * This pulled atom is then collected in * frameworks/av/services/mediametrics/MediaMetricsService.cpp. */ message MediaDrmActivityInfo { optional string package_name = 1; optional int64 package_version_code = 2; // vendor+description tell about which DRM plugin is in use on this device optional string vendor = 3; optional string description = 4; optional DrmFrameworkMetrics framework_metrics = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; optional bytes vendor_metrics = 6 [(android.os.statsd.log_mode) = MODE_BYTES]; } /* * Logged when hardware based user-configurable device state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/devicestate/DeviceStateManagerService.java */ message DeviceStateChanged { optional int32 new_device_state = 1 [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; optional bool boot_state = 2; } /* * An obfuscated, canonical form time zone suggestion for metrics use. * * The suggestion's time zone IDs (which relate to location) are obfuscated by * mapping them to an ordinal. When the ordinal is assigned consistently across * several objects (i.e. so the same time zone ID is always mapped to the same * ordinal), this allows comparisons between those objects. For example, we can * answer "did these two suggestions agree?", "does the suggestion match the * device's current time zone?", without leaking knowledge of location. Ordinals * are also significantly more compact than full IANA TZDB IDs, albeit highly * unstable and of limited use. */ message MetricsTimeZoneSuggestion { enum Type { UNKNOWN = 0; CERTAIN = 1; UNCERTAIN = 2; } optional Type type = 1; // The ordinals for time zone(s) in the suggestion. Always empty for // UNCERTAIN, and can be empty for CERTAIN, for example when the device is in // a disputed area / on an ocean. repeated int32 time_zone_ordinals = 2; } /* * Logs a snapshot of time zone detector state. * * Logged from: * frameworks/base/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java */ message TimeZoneDetectorState { // True if telephony-based time zone detection is supported on the device. optional bool telephony_supported = 1; // True if geo-based time zone detection is supported on the device. optional bool geo_supported = 2; // The current user's master location setting value. optional bool location_enabled = 3; // The current user's auto time zone detection enabled setting value. optional bool auto_detection_setting = 4; // The current user's geo detection enabled setting. optional bool geo_detection_setting = 5; enum DetectionMode { UNKNOWN = 0; MANUAL = 1; TELEPHONY = 2; GEO = 3; } // The functional / behavioral state for how time zones are currently determined on the device. // Avoids needing to duplicate the logic used. optional DetectionMode detection_mode = 6; // The device's current time zone ordinal (see MetricsTimeZoneSuggestion). optional int32 device_time_zone_ordinal = 7; // The latest suggestion received from the user, e.g. via SettingsUI (non-persistent). optional MetricsTimeZoneSuggestion latest_manual_suggestion = 8 [(log_mode) = MODE_BYTES]; // The latest telephony-derived suggestion (non-persistent). optional MetricsTimeZoneSuggestion latest_telephony_suggestion = 9 [(log_mode) = MODE_BYTES]; // The latest geo-derived suggestion (non-persistent). optional MetricsTimeZoneSuggestion latest_geo_suggestion = 10 [(log_mode) = MODE_BYTES]; } /* * Logs information about an individual location time zone provider's state. * * Logged from: * frameworks/base/services/core/java/com/android/server/location/timezone/ControllerImpl.java */ message LocationTimeZoneProviderStateChanged { // The index of the provider (primary = 0, secondary = 1) optional int32 provider_index = 1; enum State { // A placeholder for unknown values. UNKNOWN = 0; // The provider is initializing. INITIALIZING = 1; // The provider is certain of the time zone. CERTAIN = 2; // The provider is uncertain of the time zone. UNCERTAIN = 3; // The provider has been stopped. STOPPED = 4; // The provider has failed. PERM_FAILED = 5; // The provider has been destroyed. DESTROYED = 6; } // The state of the provider. optional State state = 2; } /* * Reports fdtrack state change. * * Logged from: * frameworks/base/services/java/com/android/server/SystemServer.java */ message FdtrackEventOccurred { enum FdtrackEventType { DISABLED = 1; ENABLED = 2; // Aborting because we're above the abort threshold. ABORTING = 3; } optional FdtrackEventType event = 1; optional int32 fd_count = 2; } /** * Pushed when delivering a batch of alarms. * * Logged from: * frameworks/base/apex/jobscheduler/service/java/com/android/server/alarm/MetricsHelper.java */ message AlarmBatchDelivered { optional int32 num_alarms = 1; optional int32 wakeups = 2; } /** * Pushed when an app schedules an alarm. * * Logged from: * frameworks/base/apex/jobscheduler/service/java/com/android/server/alarm/MetricsHelper.java */ message AlarmScheduled { optional int32 calling_uid = 1 [(is_uid) = true]; optional bool is_exact = 2; optional bool is_wakeup = 3; optional bool is_allow_while_idle = 4; optional bool is_alarm_clock = 5; optional bool is_repeating = 6; enum ReasonCode { NOT_APPLICABLE = 0; PERMISSION = 1; ALLOW_LIST = 2; CHANGE_DISABLED = 3; } optional ReasonCode exact_alarm_allowed_reason = 7; optional bool is_rtc = 8; // The state of the callingUid, from frameworks/proto_logging/stats/enums/app/enums.proto. optional android.app.ProcessStateEnum calling_process_state = 9; } /** * Logs statistics about pending alarms. * * Pulled from: * frameworks/base/apex/jobscheduler/service/java/com/android/server/alarm/MetricsHelper.java */ message PendingAlarmInfo { optional int32 num_total = 1; optional int32 num_exact = 2; optional int32 num_wakeup = 3; optional int32 num_allow_while_idle = 4; optional int32 num_prioritized = 5; optional int32 num_foreground_service = 6; optional int32 num_activity = 7; optional int32 num_service = 8; optional int32 num_listener = 9; optional int32 num_indefinite_future = 10; optional int32 num_repeating = 11; optional int32 num_alarm_clock = 12; optional int32 num_rtc = 13; } /* * Logs information about on-device refresh of ART AOT artifacts for boot classpath extensions * and system_server. * * Logged from: * art/odrefresh/odrefresh.cc */ message OdrefreshReported { optional int64 art_apex_version = 1; enum Trigger { // A placeholder for unknown values. TRIGGER_UNKNOWN = 0; // ART apex version has changed since time artifacts were generated. TRIGGER_APEX_VERSION_MISMATCH = 1; // Dex files on the boot classpath or system_server classpath have changed. TRIGGER_DEX_FILES_CHANGED = 2; // Missing artifacts. TRIGGER_MISSING_ARTIFACTS = 3; } optional Trigger trigger = 2; enum Stage { // A placeholder for unknown values. STAGE_UNKNOWN = 0; // Checking stage. STAGE_CHECK = 10; // Preparation for compilation. STAGE_PREPARATION = 20; // Compilation of primary boot classpath extensions. STAGE_PRIMARY_BOOT_CLASSPATH = 30; // Compilation of secondary boot classpath extensions. STAGE_SECONDARY_BOOT_CLASSPATH = 40; // Compilation of system_server classpath. STAGE_SYSTEM_SERVER_CLASSPATH = 50; // All stages completed. STAGE_COMPLETE = 60; } optional Stage stage_reached = 3; enum Status { // A placeholder for unknown values. STATUS_UNKNOWN = 0; // OK, no problems encountered. STATUS_OK = 1; // Insufficient space. STATUS_NO_SPACE = 2; // Storage operation failed. STATUS_IO_ERROR = 3; // Dex2oat reported an error. STATUS_DEX2OAT_ERROR = 4; // Time limit exceeded. STATUS_TIME_LIMIT_EXCEEDED = 5; // Failure creating staging area. STATUS_STAGING_FAILED = 6; // Installation of artifacts failed. STATUS_INSTALL_FAILED = 7; } optional Status status = 4; // Compilation time iof primary boot classpath extensions. optional int32 primary_bcp_compilation_seconds = 5; // Compilation time of secondary boot classpath extensions. optional int32 secondary_bcp_compilation_seconds = 6; // Compilation time of system_server classpath. optional int32 system_server_compilation_seconds = 7; // Cache space at start of update. optional int32 cache_space_free_start_mib = 8; // Cache space at end of update. optional int32 cache_space_free_end_mib = 9; }; /* * Logged when a package's user-level hibernation state changes. * Logged from: * frameworks/base/services/core/java/com/android/server/apphibernation/AppHibernationService.java */ message UserLevelHibernationStateChanged { // Name of the package that had its hibernation state change. optional string package_name = 1; // Android user id to which this event belongs. This can only be 0, 10, 11 and so on. optional int32 user_id = 2; // New hibernation state. True if hibernating, false otherwise optional bool is_hibernating = 3; } /* * Pull atom for the number of hibernated packages on the device for the given user. * Logged from: * frameworks/base/services/core/java/com/android/server/apphibernation/AppHibernationService.java */ message UserLevelHibernatedApps { // Total number of apps hibernated for the user optional int32 hibernated_app_count = 1; // Android user id of the queried user which can only be 0, 10, 11 and so on. optional int32 user_id = 2; } /** * Pull atom for total number of globally hibernated packages on the device and the storage savings * from these apps being hibernated. * Logged from: * frameworks/base/services/core/java/com/android/server/apphibernation/AppHibernationService.java */ message GlobalHibernatedApps { // Total number of apps in global hibernation optional int32 hibernated_app_count = 1; // Cumulative storage savings from apps being hibernated optional int64 storage_saved_mb = 2; } /* * Report the event of app process kills. * Logged from: * frameworks/base/services/core/java/com/android/server/am/AppExitInfoTracker.java */ message AppProcessDied { // Uid of the package of the dying process optional int32 uid = 1 [(is_uid) = true]; // Name of the dying process, it'll be omitted if the process name and package name are the same optional string process_name = 2; // The reason code of why the process dies optional android.app.AppExitReasonCode reason = 3; // The supplemental reason code of why the process dies optional android.app.AppExitSubReasonCode sub_reason = 4; // The importance of the process when it dies optional android.app.Importance importance = 5; // The last known PSS (in kB) of the process before it dies, could be 0. optional int32 pss = 6; // The last known RSS (in kB) of the process before it dies, could be 0. optional int32 rss = 7; } /** * Logs input event statistics. * Pulls the statistics. * * Logged from: * frameworks/native/services/inputflinger */ message InputEventLatencySketch { /** * The 'bytes' field is the serialized KLL sketch. It is to be deserialized into an object of * KLL proto, which would then be converted into a KLL sketch. The KLL sketch is a histogram * of the data. * * The goal of this data is to identify the bottlenecks in processing of input events. * All sketches measure durations in a streaming fashion. * The units are "hundreds of microseconds", or 0.1 ms. They are chosen like this in order * to reduce the occupied space. * The start and end points for each value are described in the comments. * * We distinguish between 'DOWN' event latency (when the pointer first goes down), and 'MOVE' * event latency, which characterizes the scrolling experience. */ // -------------------------- DOWN event sketches ------ START --------------------------------- // Start: the input event was created (touch events: the touch interrupt received in the driver) // End: the event was read in userspace (in EventHub) optional bytes event_to_read_100micros_down_sketch = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; // Start: the event was read in EventHub // End: the event was send to the app via the InputChannel (written to the socket) optional bytes read_to_deliver_100micros_down_sketch = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; // Start: the input event was sent to the app // End: the app consumed the input event optional bytes deliver_to_consume_100micros_down_sketch = 3 [(android.os.statsd.log_mode) = MODE_BYTES]; // Start: the app consumed the event // End: the app's 'finishInputEvent' call was received in inputflinger // The end point can also be called "the app finished processing input event" optional bytes consume_to_finish_100micros_down_sketch = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; // Start: the app consumed the input event // End: the app produced a buffer optional bytes consume_to_gpu_complete_100micros_down_sketch = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; // Start: the app produced a buffer // End: the frame was shown on the display optional bytes gpu_complete_to_present_100micros_down_sketch = 6 [(android.os.statsd.log_mode) = MODE_BYTES]; // The end-to-end touch latency // Start: the input event was created (touch events: the touch interrupt received in the driver) // End: the frame was presented on the display optional bytes end_to_end_100micros_down_sketch = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; // -------------------------- DOWN event sketches ------ END ----------------------------------- // -------------------------- MOVE event sketches ------ START --------------------------------- // Start: the input event was created (touch events: the touch interrupt received in the driver) // End: the event was read in userspace (in EventHub) optional bytes event_to_read_100micros_move_sketch = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; // Start: the event was read in EventHub // End: the event was send to the app via the InputChannel (written to the socket) optional bytes read_to_deliver_100micros_move_sketch = 9 [(android.os.statsd.log_mode) = MODE_BYTES]; // Start: the input event was sent to the app // End: the app consumed the input event optional bytes deliver_to_consume_100micros_move_sketch = 10 [(android.os.statsd.log_mode) = MODE_BYTES]; // Start: the app consumed the event // End: the app's 'finishInputEvent' call was received in inputflinger // The end point can also be called "the app finished processing input event" optional bytes consume_to_finish_100micros_move_sketch = 11 [(android.os.statsd.log_mode) = MODE_BYTES]; // Start: the app consumed the input event // End: the app produced a buffer optional bytes consume_to_gpu_complete_100micros_move_sketch = 12 [(android.os.statsd.log_mode) = MODE_BYTES]; // Start: the app produced a buffer // End: the frame was shown on the display optional bytes gpu_complete_to_present_100micros_move_sketch = 13 [(android.os.statsd.log_mode) = MODE_BYTES]; // The end-to-end touch latency // Start: the input event was created (touch events: the touch interrupt received in the driver) // End: the frame was presented on the display optional bytes end_to_end_100micros_move_sketch = 14 [(android.os.statsd.log_mode) = MODE_BYTES]; // -------------------------- MOVE event sketches ------ END ----------------------------------- } // Each pull creates multiple atoms. One for each incremental package. message InstalledIncrementalPackage { optional int32 uid = 1 [(is_uid) = true]; } /** * Memory management statistics pulled atom based on /proc/vmstat. * Logged from StatsPullAtomService. */ message VmStat { optional int32 oom_kill_count = 1; } /** * Log that the user has interacted with an app on the permission usage * fragment. * Logged from permission/debug/PermissionUsageV2Frament.kt */ message PermissionUsageFragmentInteraction { // id which identifies single session of user interacting with permission hub optional int64 session_id = 1; enum Action { UNDEFINED = 0; OPEN = 1; LOCATION_ACCESS_TIMELINE_VIEWED = 2; CAMERA_ACCESS_TIMELINE_VIEWED = 3; MICROPHONE_ACCESS_TIMELINE_VIEWED = 4; SHOW_SYSTEM_CLICKED = 5; SEE_OTHER_PERMISSIONS_CLICKED = 6; } // The action the user took to interact with the fragment optional Action action = 2; } /** * Log that the user has clicked on . * Logged from permission/debug/PermissionDetailsFragment.kt */ message PermissionDetailsInteraction { // id which identifies single session of user interacting with permission details fragment. optional int64 session_id = 1; // The name of a permission group whose details are viewed. optional string permission_group_name = 2; enum Action { UNDEFINED = 0; SHOW_SYSTEM_CLICKED = 1; INFO_ICON_CLICKED = 2; } // Package name for which the info icon was clicked. optional string package_name = 3; // The action the user took to interact with the fragment optional Action action = 4; } /** * Log that the user has toggled the sensor privacy. */ message PrivacySensorToggleInteraction { enum Sensor { SENSOR_UNKNOWN = 0; MICROPHONE = 1; CAMERA = 2; } // Sensor for which sensor privacy was toggled. optional Sensor sensor = 1; enum Action { ACTION_UNKNOWN = 0; TOGGLE_ON = 1; TOGGLE_OFF = 2; } // Action taken on sensor. optional Action action = 2; enum Source { SOURCE_UNKNOWN = 0; DIALOG = 1; SETTINGS = 2; QS_TILE = 3; } // Source for the toggling. optional Source source = 3; // Amount of time a user spent in the previous sensor privacy state in minutes. optional int64 time_in_previous_state_in_mins = 4; } message PrivacyToggleDialogInteraction { enum Action { ACTION_UNKNOWN = 0; ENABLE = 1; CANCEL = 2; } // Action taken on the toggle dialog. optional Action action = 1; // Name of the package for which the dialog was shown. optional string package_name = 2; } /** * Stats about each feature tag that was included in the registration. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message ImsRegistrationFeatureTagStats { // the carrier id associated with this SIP delegate // Used as a dimension optional int32 carrier_id = 1; // The slot id associated with this SIP delegate // Used as a dimension optional int32 slot_id = 2; // The name of the feature tag // used as a dimension optional android.telephony.ImsFeatureTag feature_tag_name = 3; // The underlying radio technology type associated with the feature tag // used as a dimension // See the ImsRegistrationImplBase#REGISTRATION_TECH* optional int32 registration_tech = 4; // The time this feature tag was registered, rounded to 5 minutes optional int32 registered_seconds = 5; } /** * Stats about the messaging client interacting with telephony * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message RcsClientProvisioningStats { enum EventType { EVENT_TYPE_UNSPECIFIED = 0; // The client sent its client params to the ACS service. CLIENT_PARAMS_SENT = 1; // The client has manually triggered reconfiguration TRIGGER_RCS_RECONFIGURATION = 2; // Default messaging application changed. DMA_CHANGED = 3; } // Carrier ID of the SIM used for IMS registration. // See https://source.android.com/devices/tech/config/carrierid. // Used as a dimension optional int32 carrier_id = 1; // Index of the SIM used, 0 for single-SIM devices. // Used as a dimension optional int32 slot_id = 2; // Used as a dimension optional EventType event = 3; // The number of times this event has occurred. optional int32 count = 4; } /** * Stats about the RCS provisioning via ACS * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message RcsAcsProvisioningStats { enum ResponseType { RESPONSE_TYPE_UNSPECIFIED = 0; // a provisioning request resulted in an error. ERROR = 1; // a provisioning request succeeded and provided an xml PROVISIONING_XML = 2; // a provisioning request has resulted in a "pre-provisioning" xml, which // means RCS is not provisioned and requires the user to intervene. PRE_PROVISIONING_XML = 3; } // Carrier ID of the SIM used for IMS registration. // See https://source.android.com/devices/tech/config/carrierid. // Used as a dimension optional int32 carrier_id = 1; // Index of the SIM used, 0 for single-SIM devices. // Used as a dimension optional int32 slot_id = 2; // The response code of provisioning if the provisioning resulted in // ResponseType.ERROR // Used as a dimension optional int32 response_code = 3; // used as a dimension. optional ResponseType response_type = 4; // Does the provisioning XML have single registration provisioned. // Populated if response_type is ResponseType.PROVISIONING_XML // used as a dimension optional bool is_single_registration_enabled = 5; // The number of times this event has occurred. optional int32 count = 6; // The amount of time in seconds that the device was in this state in total, rounded 5 minutes optional int32 state_timer_sec = 7; } /** * Metrics surrounding the lifetime of a SIP delegate created by applications. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message SipDelegateStats { // The random number identifier with this SIP delegate optional int32 dimension = 1; // The carrier id associated with this SIP delegate optional int32 carrier_id = 2; // The slot id associated with this SIP delegate optional int32 slot_id = 3; // The total uptime of this delegate, rounded 5 minutes optional int32 uptime_seconds = 4; // The reason why this SIP delegate was destroyed. // See the SipDelegateManager#SIP_DELEGATE_DESTROY_REASON* optional int32 destroy_reason = 5; } /** * Tracks each feature tag associated with the SipDelegates that are currently active. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message SipTransportFeatureTagStats { // the carrier id associated with this SIP delegate // Used as a dimension optional int32 carrier_id = 1; // The slot id associated with this SIP delegate // Used as a dimension optional int32 slot_id = 2; // The name of the feature tag // used as a dimension optional android.telephony.ImsFeatureTag feature_tag_name = 3; // The reason why this feature tag was denied on the SIP Transport // used as a dimension // Use SIP transport denied reason. // See the SipDelegateManager#DENIED_REASON* optional int32 sip_transport_denied_reason = 4; // The reason why this feature tag was associated with the SIP Transport but not // marked as deregistered. // used as a dimension // Use SIP transport deregistered reason. // See the DelegateRegistrationState#DEREGISTERING_REASON* optional int32 sip_transport_deregistered_reason = 5; // the time this feature tag was in this state, rounded 5 minutes optional int32 associated_seconds = 6; } /** * Tracks each SIP message and the response from either the app or network. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message SipMessageResponse { enum Direction { UNKNOWN = 0; INCOMING = 1; OUTGOING = 2; } // the carrier id associated with this SIP delegate // Used as a dimension optional int32 carrier_id = 1; // The slot id associated with this SIP delegate // Used as a dimension optional int32 slot_id = 2; // The SIP message method type (INVITE, MESSAGE, etc...) // used as a dimension optional android.telephony.SipRequestMethodType sip_message_method = 3; // The SIP message response code, used if this is a response to a request. // used as a dimension. optional int32 sip_message_response = 4; // The SIP message direction // used as a dimension optional Direction sip_message_direction = 5; // The response from the SIP stack to sending/receiving the message // used as a dimension // See the SipDelegateManager#MESSAGE_FAILURE_REASON* optional int32 message_error = 6; // The number of messages that fit this criteria. optional int32 count = 7; } /** * Tracks SIP sessions managed by the SIP transport. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message SipTransportSession { enum Direction { UNKNOWN = 0; INCOMING = 1; OUTGOING = 2; } // the carrier id associated with this SIP delegate // Used as a dimension optional int32 carrier_id = 1; // The slot id associated with this SIP delegate // Used as a dimension optional int32 slot_id = 2; // The SIP message method that started the session (INVITE, SUBSCRIBE, etc...) // used as a dimension optional android.telephony.SipRequestMethodType session_method = 3; // The SIP message direction // used as a dimension optional Direction sip_message_direction = 4; // The response from the SIP stack or network. // used as a dimension. optional int32 sip_response = 5; // The number of these sessions counted optional int32 session_count = 6; // The number of sessions that were started properly and did not require // the SIP transport to forcefully close them. optional int32 ended_gracefully_count = 7; } /** * Used to determine if there were dedicated bearers set up for a specific listener. * If not, this indicates that there may have been a network issue in the dedicated bearer setup. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message ImsDedicatedBearerListenerEvent { // Carrier ID of the SIM used for IMS registration. // See https://source.android.com/devices/tech/config/carrierid. // Used as a dimension optional int32 carrier_id = 1; // Index of the SIM used, 0 for single-SIM devices. // Used as a dimension optional int32 slot_id = 2; // Radio access technology (RAT) used by the registration when it terminated. // The value is either 4G or 5G. // Used as a dimension optional android.telephony.NetworkTypeEnum rat_at_end = 3; // QoS class identifier. // dimension optional int32 qci = 4; // True if there was a dedicated bearer established for this listener. // dimension optional bool dedicated_bearer_established = 5; // The count of listeners with this result. optional int32 event_count = 6; } /** * Logs information related to ims dedicated bearer which fulfills required qos and provides guaranteed service. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message ImsDedicatedBearerEvent { enum State { STATE_UNSPECIFIED = 0; STATE_ADDED = 1; STATE_MODIFIED = 2; STATE_DELETED = 3; } // Carrier ID of the SIM used for IMS registration. // See https://source.android.com/devices/tech/config/carrierid. // Used as a dimension optional int32 carrier_id = 1; // Index of the SIM used, 0 for single-SIM devices. // Used as a dimension optional int32 slot_id = 2; // Radio access technology (RAT) used by the registration when it terminated. // The value is either 4G or 5G. // Used as a dimension optional android.telephony.NetworkTypeEnum rat_at_end = 3; // Qos class identifier. // Used as a dimension optional int32 qci = 4; // Dedicated bearer state from the network. // Used as a dimension optional State bearer_state = 5; // Whether location connection information is received. // Used as a dimension optional bool local_connection_info_received = 6; // Whether remote connection information is received. // Used as a dimension optional bool remote_connection_info_received = 7; // Whether or not the QoS indication had listeners. // Used as a dimension optional bool has_listeners = 8; // The count that matches the above conditions. optional int32 count = 9; } /** * Stats about each ServiceDescription that was included in the PIDF XML sent to the network during publish. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message ImsRegistrationServiceDescStats { // Describe Service IDs will be included PUBLISH // See RcsContactPresenceTuple.java enum ServiceId { SERVICE_ID_UNSPECIFIED = 0; SERVICE_ID_CUSTOM = 1; SERVICE_ID_MMTEL = 2; SERVICE_ID_CHAT_V1 = 3; SERVICE_ID_CHAT_V2 = 4; SERVICE_ID_FT = 5; SERVICE_ID_FT_OVER_SMS = 6; SERVICE_ID_GEO_PUSH = 7; SERVICE_ID_GEO_PUSH_VIA_SMS = 8; SERVICE_ID_CALL_COMPOSER = 9; SERVICE_ID_POST_CALL = 10; SERVICE_ID_SHARED_MAP = 11; SERVICE_ID_SHARED_SKETCH = 12; SERVICE_ID_CHATBOT = 13; SERVICE_ID_CHATBOT_STANDALONE = 14; SERVICE_ID_CHATBOT_ROLE = 15; } // the carrier id associated with this SIP delegate // Used as a dimension optional int32 carrier_id = 1; // The slot id associated with this SIP delegate // Used as a dimension optional int32 slot_id = 2; // The service id portion of the ServiceDescription // used as a dimension optional ServiceId service_id_name = 3; // The version portion of the ServiceDescription // used as a dimension optional float service_id_version = 4; // The underlying radio technology type associated with the feature tag // used as a dimension // See the ImsRegistrationImplBase#REGISTRATION_TECH* optional int32 registration_tech = 5; // the time this feature tag was registered, rounded 5 minutes optional int32 published_seconds = 6; } /** * Stats related to UCE queries to the network * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message UceEventStats { enum MessageType { MESSAGE_TYPE_UNSPECIFIED = 0; PUBLISH = 1; SUBSCRIBE = 2; INCOMING_OPTION = 3; OUTGOING_OPTION = 4; } enum CommandCode { SERVICE_UNKNOWN = 0; GENERIC_FAILURE = 1; INVALID_PARAM = 2; FETCH_ERROR = 3; REQUEST_TIMEOUT = 4; INSUFFICIENT_MEMORY = 5; LOST_NETWORK_CONNECTION = 6; NOT_SUPPORTED = 7; NOT_FOUND = 8; SERVICE_UNAVAILABLE = 9; NO_CHANGE = 10; } // Carrier ID of the SIM used for IMS registration. // See https://source.android.com/devices/tech/config/carrierid. // Used as a dimension optional int32 carrier_id = 1; // Index of the SIM used, 0 for single-SIM devices. // Used as a dimension optional int32 slot_id = 2; // Used to identify the message type. // Used as a dimension optional MessageType type = 3; // Whether the UCE event is successfully finished. If false, the request to the // modem timed out and we sent a timeout error back to the requesting app. // Used as a dimension optional bool successful = 4; // The command error code for the Uce event. Not populated if the modem // accepted the request and delivered a network_response. // Used as a dimension optional CommandCode command_code = 5; // The network response code for the Uce event. Will not be populated if // command_code is present. // Used as a dimension optional int32 network_response = 6; // The count that matches the above conditions; optional int32 count = 7; } /** * Information related to a SIP NOTIFY event from modem. * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message PresenceNotifyEvent { // See RFC3265 Section 3.2.4 for more information about these subscription states. enum TerminatedReason { REASON_UNSPECIFIED = 0; // Not spec defined, the network returned a custom code that is not spec defined. REASON_CUSTOM = 1; REASON_DEACTIVATED = 2; REASON_PROBATION = 3; REASON_REJECTED = 4; REASON_TIMEOUT = 5; REASON_GIVEUP = 6; REASON_NORESOURCE = 7; } // Carrier ID of the SIM used for IMS registration. // See https://source.android.com/devices/tech/config/carrierid. // Used as a dimension optional int32 carrier_id = 1; // Index of the SIM used, 0 for single-SIM devices. // Used as a dimension optional int32 slot_id = 2; // The terminated reason associated with the subscription state. // Used as a dimension optional TerminatedReason reason = 3; // Whether or not the NOTIFY received contained at least one body with PIDF // content before moving to the terminated state. // Used as a dimension optional bool content_body_received = 4; // The count of PIDF info received that contained RCS caps. optional int32 rcs_caps_count = 5; // The count of PIDF info received that contained MMTEL caps. optional int32 mmtel_caps_count = 6; // The count of PIDF info received that contained no mmtel or RCS caps. optional int32 no_caps_count = 7; // The count that matches the above conditions; optional int32 count = 8; } /** * Tracks GBA requests from applications * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java */ message GbaEvent { enum FailedReason { UNKNOWN = 0; FEATURE_NOT_SUPPORTED = 1; FEATURE_NOT_READY = 2; NETWORK_FAILURE = 3; INCORRECT_NAF_ID = 4; SECURITY_PROTOCOL_NOT_SUPPORTED = 5; } // Carrier ID of the SIM used for IMS registration. // See https://source.android.com/devices/tech/config/carrierid. // Used as a dimension optional int32 carrier_id = 1; // Index of the SIM used, 0 for single-SIM devices. // Used as a dimension optional int32 slot_id = 2; // Whether the GBA event is successful. // Used as a dimension optional bool successful = 3; // Gba authentication failed reason. // Used as a dimension optional FailedReason failed_reason = 4; // The count that matches the above conditions. optional int32 count = 5; }