/* * 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 optimize_for = CODE_SIZE; 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/remoteprovisioner_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/app/wearsettings_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/leaudio/enums.proto"; import "frameworks/proto_logging/stats/enums/bluetooth/smp/enums.proto"; import "frameworks/proto_logging/stats/enums/contexthub/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/hotword/enums.proto"; import "frameworks/proto_logging/stats/enums/jank/enums.proto"; import "frameworks/proto_logging/stats/enums/media/audio/enums.proto"; import "frameworks/proto_logging/stats/enums/media/enums.proto"; import "frameworks/proto_logging/stats/enums/mms/enums.proto"; import "frameworks/proto_logging/stats/enums/nearby/enums.proto"; import "frameworks/proto_logging/stats/enums/net/enums.proto"; import "frameworks/proto_logging/stats/enums/neuralnetworks/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/display/enums.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/uwb/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; 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", (module) = "mediaprovider" ]; 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 [(module) = "bluetooth"]; 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", (module) = "wallpaper"]; 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", (module) = "statsdtest"]; 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", (module) = "mediaprovider" ]; 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"]; TextClassifierDownloadReported text_classifier_download_reported = 335 [(module) = "textclassifier"]; 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"]; NonA11yToolServiceWarningReported non_a11y_tool_service_warning_report = 384 [(module) = "framework"]; AppSearchSetSchemaStatsReported app_search_set_schema_stats_reported = 385 [(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"]; NetworkDnsHandshakeReported network_dns_handshake_reported = 389 [(module) = "resolv"]; BluetoothCodePathCounter bluetooth_code_path_counter = 390 [(module) = "bluetooth"]; BluetoothLeBatchScanReportDelay bluetooth_le_batch_scan_report_delay = 392 [(module) = "bluetooth"]; AccessibilityFloatingMenuUIChanged accessibility_floating_menu_ui_changed = 393 [(module) = "sysui"]; NeuralNetworksCompilationCompleted neuralnetworks_compilation_completed = 394 [(module) = "neuralnetworks"]; NeuralNetworksExecutionCompleted neuralnetworks_execution_completed = 395 [(module) = "neuralnetworks"]; NeuralNetworksCompilationFailed neuralnetworks_compilation_failed = 396 [(module) = "neuralnetworks"]; NeuralNetworksExecutionFailed neuralnetworks_execution_failed = 397 [(module) = "neuralnetworks"]; ContextHubBooted context_hub_booted = 398 [(module) = "contexthub"]; ContextHubRestarted context_hub_restarted = 399 [(module) = "contexthub"]; ContextHubLoadedNanoappSnapshotReported context_hub_loaded_nanoapp_snapshot_reported = 400 [(module) = "contexthub"]; ChreCodeDownloadTransacted chre_code_download_transacted = 401 [(module) = "contexthub"]; UwbSessionInitiated uwb_session_inited = 402 [(module) = "uwb"]; UwbSessionClosed uwb_session_closed = 403 [(module) = "uwb"]; UwbFirstRangingReceived uwb_first_ranging_received = 404 [(module) = "uwb"]; UwbRangingMeasurementReceived uwb_ranging_measurement_received = 405 [(module) = "uwb"]; TextClassifierDownloadWorkScheduled text_classifier_download_work_scheduled = 406 [(module) = "textclassifier"]; TextClassifierDownloadWorkCompleted text_classifier_download_work_completed = 407 [(module) = "textclassifier"]; ClipboardCleared clipboard_cleared = 408 [(module) = "framework"]; VmCreationRequested vm_creation_requested = 409 [(module) = "virtualizationservice"]; NearbyDeviceScanStateChanged nearby_device_scan_state_changed = 410 [(module) = "nearby"]; CameraCompatControlEventReported camera_compat_control_event_reported = 411 [(module) = "framework"]; ApplicationLocalesChanged application_locales_changed = 412 [(module) = "framework"]; MediametricsAudioTrackStatusReported mediametrics_audiotrackstatus_reported = 413; FoldStateDurationReported fold_state_duration_reported = 414 [(module) = "framework"]; LocationTimeZoneProviderControllerStateChanged location_time_zone_provider_controller_state_changed = 415 [(module) = "framework"]; DisplayHbmStateChanged display_hbm_state_changed = 416 [(module) = "framework"]; DisplayHbmBrightnessChanged display_hbm_brightness_changed = 417 [(module) = "framework"]; PersistentUriPermissionsFlushed persistent_uri_permissions_flushed = 418 [(module) = "framework"]; EarlyBootCompOsArtifactsCheckReported early_boot_comp_os_artifacts_check_reported = 419 [(module) = "art"]; VBMetaDigestReported vbmeta_digest_reported = 420 [(module) = "framework"]; ApexInfoGathered apex_info_gathered = 421 [(module) = "framework"]; PvmInfoGathered pvm_info_gathered = 422 [(module) = "framework"]; WearSettingsUIInteracted wear_settings_ui_interacted = 423 [(module) = "wear_settings"]; TracingServiceReportEvent tracing_service_report_event = 424 [(module) = "framework"]; MediametricsAudioRecordStatusReported mediametrics_audiorecordstatus_reported = 425; LauncherLatency launcher_latency = 426 [(module) = "sysui"]; DropboxEntryDropped dropbox_entry_dropped = 427 [(module) = "framework"]; WifiP2pConnectionReported wifi_p2p_connection_reported = 428 [(module) = "wifi"]; GameStateChanged game_state_changed = 429 [(module) = "framework"]; HotwordDetectorCreateRequested hotword_detector_create_requested = 430 [(module) = "framework"]; HotwordDetectionServiceInitResultReported hotword_detection_service_init_result_reported = 431 [(module) = "framework"]; HotwordDetectionServiceRestarted hotword_detection_service_restarted = 432 [(module) = "framework"]; HotwordDetectorKeyphraseTriggered hotword_detector_keyphrase_triggered = 433 [(module) = "framework"]; HotwordDetectorEvents hotword_detector_events = 434 [(module) = "framework"]; // 435, 436 not been used in this branch. BootCompletedBroadcastCompletionLatencyReported boot_completed_broadcast_completion_latency_reported = 437 [(module) = "framework"]; ContactsIndexerUpdateStatsReported contacts_indexer_update_stats_reported = 440 [(module) = "appsearch"]; AppBackgroundRestrictionsInfo app_background_restrictions_info = 441 [(module) = "framework"]; MmsSmsProviderGetThreadIdFailed mms_sms_provider_get_thread_id_failed = 442 [(module) = "telephony"]; MmsSmsDatabaseHelperOnUpgradeFailed mms_sms_database_helper_on_upgrade_failed = 443 [(module) = "telephony"]; PermissionReminderNotificationInteracted permission_reminder_notification_interacted = 444 [(module) = "permissioncontroller"]; RecentPermissionDecisionsInteracted recent_permission_decisions_interacted = 445 [(module) = "permissioncontroller"]; GnssPsdsDownloadReported gnss_psds_download_reported = 446 [(module) = "framework"]; LeAudioConnectionSessionReported le_audio_connection_session_reported = 447 [(module) = "bluetooth"]; LeAudioBroadcastSessionReported le_audio_broadcast_session_reported = 448 [(module) = "bluetooth"]; DreamUiEventReported dream_ui_event_reported = 449 [(module) = "framework"]; TaskManagerEventReported task_manager_event_reported = 450 [(module) = "sysui"]; CdmAssociationAction cdm_association_action = 451 [(module) = "framework"]; MagnificationTripleTapAndHoldActivatedSessionReported magnification_triple_tap_and_hold_activated_session_reported = 452 [(module) = "framework"]; MagnificationFollowTypingFocusActivatedSessionReported magnification_follow_typing_focus_activated_session_reported = 453 [(module) = "framework"]; AccessibilityTextReadingOptionsChanged accessibility_text_reading_options_changed = 454 [(module) = "settings"]; WifiSetupFailureCrashReported wifi_setup_failure_crash_reported = 455 [(module) = "wifi"]; UwbDeviceErrorReported uwb_device_error_reported = 456 [(module) = "uwb"]; IsolatedCompilationScheduled isolated_compilation_scheduled = 457 [(module) = "art"]; IsolatedCompilationEnded isolated_compilation_ended = 458 [(module) = "art"]; OnsOpportunisticEsimProvisioningComplete ons_opportunistic_esim_provisioning_complete = 459 [(module) = "ons"]; TelephonyAnomalyDetected telephony_anomaly_detected = 461 [(module) = "telephony"]; LetterboxPositionChanged letterbox_position_changed = 462 [(module) = "framework"]; RemoteKeyProvisioningAttempt remote_key_provisioning_attempt = 463 [(module) = "remoteprovisioner"]; RemoteKeyProvisioningNetworkInfo remote_key_provisioning_network_info = 464 [(module) = "remoteprovisioner"]; RemoteKeyProvisioningTiming remote_key_provisioning_timing = 465 [(module) = "remoteprovisioner"]; MediaOutputOpInteractionReported mediaoutput_op_interaction_report = 466 [(module) = "sysui"]; BackgroundDexoptJobEnded background_dexopt_job_ended = 467 [(module) = "art"]; SyncExemptionOccurred sync_exemption_occurred = 468 [(module) = "framework"]; AutofillPresentationEventReported autofill_presentation_event_reported = 469 [(module) = "framework"]; DockStateChanged dock_state_changed = 470 [(module) = "framework"]; BroadcastDeliveryEventReported broadcast_delivery_event_reported = 475 [(module) = "framework"]; ServiceRequestEventReported service_request_event_reported = 476 [(module) = "framework"]; ProviderAcquisitionEventReported provider_acquisition_event_reported = 477 [(module) = "framework"]; BluetoothDeviceNameReported bluetooth_device_name_reported = 478 [(module) = "bluetooth"]; VibrationReported vibration_reported = 487 [(module) = "framework"]; // reserved 492 DisplayBrightnessChanged display_brightness_changed = 494 [(module) = "framework"]; ActivityActionBlocked activity_action_blocked = 495 [(module) = "framework"]; AmbientBrightnessStatsReported ambient_brightness_stats_reported = 507 [(module) = "framework"]; MediametricsSpatializerCapabilitiesReported mediametrics_spatializercapabilities_reported = 508; MediametricsSpatializerDeviceEnabledReported mediametrics_spatializerdeviceenabled_reported = 509; MediametricsHeadTrackerDeviceEnabledReported mediametrics_headtrackerdeviceenabled_reported = 510; MediametricsHeadTrackerDeviceSupportedReported mediametrics_headtrackerdevicesupported_reported = 511; HearingAidInfoReported hearing_aid_info_reported = 513 [(module) = "framework"]; DeviceWideJobConstraintChanged device_wide_job_constraint_changed = 514 [(module) = "framework"]; IwlanSetupDataCallResultReported iwlan_setup_data_call_result_reported = 519 [(module) = "iwlan"]; IwlanPdnDisconnectedReasonReported iwlan_pdn_disconnected_reason_reported = 520 [(module) = "iwlan"]; AirplaneModeSessionReported airplane_mode_session_reported = 521 [(module) = "wifi", (module) = "bluetooth"]; BluetoothDisconnectionReasonReported bluetooth_disconnection_reason_reported = 529 [(module) = "bluetooth"]; BluetoothLocalVersionsReported bluetooth_local_versions_reported = 530 [(module) = "bluetooth"]; BluetoothRemoteSupportedFeaturesReported bluetooth_remote_supported_features_reported = 531 [(module) = "bluetooth"]; BluetoothLocalSupportedFeaturesReported bluetooth_local_supported_features_reported = 532 [(module) = "bluetooth"]; BluetoothGattAppInfo bluetooth_gatt_app_info = 533 [(module) = "bluetooth"]; LauncherImpressionEvent launcher_impression_event = 547 [(module) = "sysui"]; BrightnessConfigurationUpdated brightness_configuration_updated = 534 [(module) = "framework"]; PerformanceHintSessionReported performance_hint_session_reported = 574 [(module) = "framework"]; HotwordAudioEgressEventReported hotword_audio_egress_event_reported = 578 [(module) = "framework"]; // StatsdStats tracks platform atoms with ids upto 750. // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value. } // Pushed atom extensions. // The atom definitions are under atoms//_extension_atoms.proto extensions 613; // BluetoothHashedDeviceNameReported bluetooth_hashed_device_name_reported extensions 614; // BluetoothL2capCocClientConnection bluetooth_l2cap_coc_client_connection extensions 615; // BluetoothL2capCocServerConnection bluetooth_l2cap_coc_server_connection extensions 631; // FullScreenIntentLaunched full_screen_intent_launched extensions 632; // BalAllowed bal_allowed extensions 656; // BluetoothLeSessionConnected bluetooth_le_session_connected extensions 9999; // Atom9999 atom_9999 // Pulled events will start at field 10000. // Next: 10175 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"]; 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", deprecated = true]; 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"]; VendorApexInfo vendor_apex_info = 10126 [(module) = "framework"]; AccessibilityShortcutStats accessibility_shortcut_stats = 10127 [(module) = "framework"]; AccessibilityFloatingMenuStats accessibility_floating_menu_stats = 10128 [(module) = "framework"]; DataUsageBytesTransferV2 data_usage_bytes_transfer_v2 = 10129 [(module) = "framework", (truncate_timestamp) = true]; MediaCapabilities media_capabilities = 10130 [(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"]; PerSimStatus per_sim_status = 10146 [(module) = "telephony"]; GpuWorkPerUid gpu_work_per_uid = 10147; PersistentUriPermissionsAmountPerPackage persistent_uri_permissions_amount_per_package = 10148 [(module) = "framework"]; SignedPartitionInfo signed_partition_info = 10149 [(module) = "framework"]; PinnedFileSizesPerPackage pinned_file_sizes_per_package = 10150 [(module) = "framework"]; PendingIntentsPerPackage pending_intents_per_package = 10151 [(module) = "framework"]; UserInfo user_info = 10152 [(module) = "framework"]; TelephonyNetworkRequestsV2 telephony_network_requests_v2 = 10153 [(module) = "telephony"]; DeviceTelephonyProperties device_telephony_properties = 10154 [(module) = "telephony"]; RemoteKeyProvisioningErrorCounts remote_key_provisioning_error_counts = 10155 [(module) = "remoteprovisioner"]; IncomingMms incoming_mms = 10157 [(module) = "mms"]; OutgoingMms outgoing_mms = 10158 [(module) = "mms"]; MultiUserInfo multi_user_info = 10160 [(module) = "framework"]; ProcessState process_state = 10171 [(module) = "framework"]; ProcessAssociation process_association = 10172 [(module) = "framework"]; ADPFSystemComponentInfo adpf_system_component_info = 10173 [(module) = "framework"]; NotificationMemoryUse notification_memory_use = 10174 [(module) = "sysui"]; } // 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 83, 360 to 363, 492, 10008, 10036, 10040, 10041; } /** * 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; } /* * ***************************************************************************** * 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]; } /** * Part of the go/activity-security project. Logs information about activity * starts which would be blocked as part of the project. * * Logged from: * - frameworks/base/services/core/java/com/android/server/wm/ActivityStarter.java */ message ActivityActionBlocked { optional int32 caller_uid = 1 [(is_uid) = true]; optional string caller_activity_class_name = 2; optional int32 target_task_top_activity_uid = 3 [(is_uid) = true]; optional string target_task_top_activity_class_name = 4; optional bool target_task_is_different = 5; optional int32 target_activity_uid = 6 [(is_uid) = true]; optional string target_activity_class_name = 7; optional string target_intent_action = 8; optional int32 target_intent_flags = 9; } /** * 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 how long a process was in each of the states. */ message ProcessState { optional int32 uid = 1 [(is_uid) = true]; optional string process_name = 2; // Measurement period. Can be used as denominator. // The gauge duration is not representative because we want uptime and also // the measurement usually ends at a time earlier than pull time. optional int32 measurement_start_uptime_seconds = 3; optional int32 measurement_end_uptime_seconds = 4; optional int32 measurement_duration_uptime_seconds = 5; // Individual state breakdowns, summing up to total process runtime. // Flattening (instead of a dimensions - value pair) for two reasons: // 1. Makes metric filtering possible (can pull the entire process data based // on a specific value. // 2. More efficient to encode (proto id serves as dimension). optional int32 top_seconds = 6; optional int32 fgs_seconds = 7; optional int32 bound_top_seconds = 8; optional int32 bound_fgs_seconds = 9; optional int32 important_foreground_seconds = 10; optional int32 cached_seconds = 11; optional int32 frozen_seconds = 12; optional int32 other_seconds = 13; } /** * Logs association between processes. */ message ProcessAssociation { optional int32 client_uid = 1 [(is_uid) = true]; // If we only care about the package name name we do not need to upload this // (even though we should add it to the atom for filtering / sharding) optional string client_process = 2; optional int32 service_uid = 3 [(is_uid) = true]; optional string service_name = 4; optional string service_process = 10; // Measurement period. Can be used as denominator. // The gauge duration is not representative because we want uptime and also // the measurement usually ends at a time earlier than pull time. optional int32 measurement_start_uptime_seconds = 5; optional int32 measurement_end_uptime_seconds = 6; optional int32 measurement_duration_uptime_seconds = 7; optional int32 duration_seconds = 8; // Number of times this association was established. optional int32 count = 9; } /** * 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; } /** * Logged when wifi peer to peer connection happens */ message WifiP2pConnectionReported { enum Type { UNSPECIFIED = 0; // fresh new connection. FRESH = 1; // reinvoke a group. REINVOKE = 2; // create a group with the current device as the group owner locally. LOCAL = 3; // create a group or join a group with config. FAST = 4; } enum FailureCode { // Failure is unknown. UNKNOWN = 0; // No failure. NONE = 1; // Timeout for current connecting request. TIMEOUT = 2; // The connecting request is canceled by the user. CANCEL = 3; // Provision discovery failure, e.g. no pin code, timeout, rejected by the peer. PROV_DISC_FAIL = 4; // Invitation failure, e.g. rejected by the peer. INVITATION_FAIL = 5; // Incoming request is rejected by the user. USER_REJECT = 6; // New connection request is issued before ending previous connecting request. NEW_CONNECTION_ATTEMPT = 7; } enum GroupRole { GROUP_UNKNOWN = 0; GROUP_OWNER = 1; GROUP_CLIENT = 2; } // Type of the connection. optional Type type = 1; // Duration to connect in millis. optional int32 latency_ms= 2; // Duration to connect in step size of 200 millis. optional int32 latency_200ms= 3; // Failure code optional FailureCode failure_code = 4; // Group role. This could be unknown with connect() call when the WifiConfig doesn't have the // credential. optional GroupRole group_role = 5; } /** * Logged when wifi setup failure or crash reported */ message WifiSetupFailureCrashReported { enum Type { UNKNOWN = 0; // Wifi HAL crash HAL_CRASH = 1; // Wificond crash WIFICOND_CRASH = 2; // Supplicant crash SUPPLICANT_CRASH = 3; // hostapd crash HOSTAPD_CRASH = 4; // HAL error on WifiNative.setupInterfaceForClientMode CLIENT_FAILURE_HAL = 5; // Wificond error on WifiNative.setupInterfaceForClientMode CLIENT_FAILURE_WIFICOND = 6; // Supplicant error on WifiNative.setupInterfaceForClientMode CLIENT_FAILURE_SUPPLICANT = 7; // HAL error on WifiNative.setupInterfaceForSoftApMode SOFT_AP_FAILURE_HAL = 8; // Wificond error on WifiNative.setupInterfaceForSoftApMode SOFT_AP_FAILURE_WIFICOND = 9; // Hostapd error on WifiNative.setupInterfaceForSoftApMode SOFT_AP_FAILURE_HOSTAPD = 10; } // Type of failure optional Type type= 1; } /** * 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; // Keep in sync with // frameworks/base/services/core/java/com/android/server/am/ProcessProfileRecord.java enum HostingComponentType { HOSTING_COMPONENT_TYPE_EMPTY = 0x0; HOSTING_COMPONENT_TYPE_SYSTEM = 0x0001; HOSTING_COMPONENT_TYPE_PERSISTENT = 0x0002; HOSTING_COMPONENT_TYPE_BACKUP = 0x0004; HOSTING_COMPONENT_TYPE_INSTRUMENTATION = 0x0008; HOSTING_COMPONENT_TYPE_ACTIVITY = 0x0010; HOSTING_COMPONENT_TYPE_BROADCAST_RECEIVER = 0x0020; HOSTING_COMPONENT_TYPE_PROVIDER = 0x0040; HOSTING_COMPONENT_TYPE_STARTED_SERVICE = 0x0080; HOSTING_COMPONENT_TYPE_FOREGROUND_SERVICE = 0x0100; HOSTING_COMPONENT_TYPE_BOUND_SERVICE = 0x0200; } // The types of the components this process is hosting at the moment this // snapshot is taken. // See the available types in HostingComponentType above. optional int32 current_hosting_component_types = 10; // The historical types of the components this process is or was hosting // since it's born. // See the available types in HostingComponentType above. optional int32 historical_hosting_component_types = 11; } /** * 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/job/JobSchedulerService.java * frameworks/base/services/core/java/com/android/server/job/JobServiceContext.java * * Next tag: 22 */ 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 implicit // 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; optional bool is_prefetch = 18; // 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; // The priority set by the app (via JobInfo.Builder.setPriority()). optional int32 requested_priority = 19; // The priority JobScheduler ran the job at. Only valid for STARTED and FINISHED states. optional int32 effective_priority = 20; // Number of times JobScheduler has tried to run this particular job. This value is incremented // when a job is stopped and rescheduled for various reasons (lost network, constraints no // longer satisfied, etc). For periodic jobs, this value is reset after a successful run. optional int32 num_previous_attempts = 21; } /** * 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 whether the device is docked, and what type of dock it is using. * * Logged from: * services/core/java/com/android/server/power/PowerManagerService.java */ message DockStateChanged { // The device dock state, from frameworks/proto_logging/stats/enums/server/enums.proto. optional android.server.DockStateEnum 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; // An index to group connection events by session. It's a counter generated by // each profile. e.g. Gatt server generate such id to identify Gatt apps optional int32 session_index = 6; // An identifier that indicates the connection failure reason optional int32 connection_reason = 7; } /** * 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; // Used transport of this event. optional android.bluetooth.TransportTypeEnum transport = 4; } /** * 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; // A flag indicating if the MAC address of the remote device is public or // random. optional android.bluetooth.AddressTypeEnum address_type = 9; // The first byte of MAC address optional int32 byte1 = 10; // The second byte of MAC address optional int32 byte2 = 11; // The third byte of MAC address optional int32 byte3 = 12; } /** * 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 the user created Bluetooth device's name. * It is pushed at Bluetooth pairing and connection. * The metric will only be collected from dogfooders. * * Logged from: * packages/modules/Bluetooth */ message BluetoothDeviceNameReported { // 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; // Name of the Bluetooth device. It is created by the user. optional string device_name = 2; } /** * 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 when an LE Audio connection session ended * * Logged from: * packages/modules/Bluetooth * */ message LeAudioConnectionSessionReported { // Size of this CSIS group optional int32 group_size = 1; // An identifier that can be used to match events for this CSIS group. // The incremental identifier is locally generated and guaranteed not derived // from any globally unique hardware id. // For paired groups, it stays consistent between Bluetooth toggling for the // same remote group. // For unpaired groups, it stays consistent within the same Bluetooth adapter // session for the same remote group. // Default: 0 if the group's metric id is unknown. optional int32 group_metric_id = 2; // Total duration of this LeAudioConnectionSession optional int64 duration_nanos = 3; // Connecting timestamp offset to the beginning of this session of each device session repeated int64 device_connecting_offset_nanos = 4; // Connected timestamp offset to the beginning of this session of each device session repeated int64 device_connected_offset_nanos = 5; // Duration of each device session repeated int64 device_connection_duration_nanos = 6; // Connection status of each device session repeated android.bluetooth.leaudio.ConnectionStatus device_connection_status = 7; // Disconnection status of each device session repeated android.bluetooth.leaudio.ConnectionStatus device_disconnection_status = 8; // 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. repeated int32 device_metric_id = 9; // Streaming beginning timestamp offset to the beginning of this session repeated int64 streaming_session_offset_nanos = 10; // Streaming ending timestamp offset to the beginning of this session repeated int64 streaming_session_duration_nanos = 11; // Streaming context type of each steaming session repeated android.bluetooth.leaudio.ContextType streaming_context_type = 12; } /** * Logs when an LE Audio broadcast session ended * * Logged from: * packages/modules/Bluetooth * */ message LeAudioBroadcastSessionReported { // Broadcast duration optional int64 duration_nanos = 1; } /* 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 the counter is incremented * * Logged from: * system/bt * packages/apps/Bluetooth * */ message BluetoothCodePathCounter { // Keys of events with enum ranges to be defined optional android.bluetooth.CodePathCounterKeyEnum key = 1; // Number of frequency of events optional int64 number = 2; } /** * Logs when an application attempts to start a Bluetooth Low Energy scan. * It only happens when the scan is initiated and does not repeatedly call * while the scan is running. * * Logged from: * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/GattService.java * */ message BluetoothLeBatchScanReportDelay { optional int32 application_uid = 1; optional int64 application_report_delay_millis = 2; } message BluetoothLocalVersionsReported { // Chip Manufacturer name optional int32 lmp_manufacturer_name = 1; // LMP Version optional int32 lmp_version = 2; // LMP Subversion optional int32 lmp_subversion = 3; // HCI Version optional int32 hci_version = 4; // HCI Revision optional int32 hci_revision = 5; } message BluetoothRemoteSupportedFeaturesReported { // 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; // Page of the feature bit masks optional int32 page = 2; // Bit mask of features optional int64 features_page2 = 3; // Connection handle of this connection if available // Range: 0x0000 - 0x0EFF (12 bits) // Default: 0xFFFF if the handle is unknown optional int32 connection_handle = 4; } message BluetoothLocalSupportedFeaturesReported { // Page of the feature bit masks optional int32 page_num = 1; // Bit mask of features optional int64 features_page = 2; } message BluetoothDisconnectionReasonReported { // Disconnection reason optional int32 reason = 1; // 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 = 2; // Connection handle of this connection if available // Range: 0x0000 - 0x0EFF (12 bits) // Default: 0xFFFF if the handle is unknown optional int32 connection_handle = 3; } message BluetoothGattAppInfo { // An index to group connection events by session. It's a counter generated by // each profile. e.g. Gatt server generate such id to identify Gatt apps optional int32 session_index = 1; // 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 = 2; // UID of the GATT app optional int32 uid = 3 [(is_uid) = true]; } /** * 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 [deprecated = true]; 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; // Used to store on-device search related features of the target // (e.g. spell-corrected query etc) optional int32 search_attributes = 26; // List of attributes attached to the event. optional LauncherAttributes attributes = 27 [(log_mode) = MODE_BYTES]; } message LauncherAttributes{ // Integer value of item attribute enum // (e.g. SUGGESTED_LABEL, ALL_APPS_SEARCH_RESULT_SETTING etc) repeated int32 item_attributes = 1; } message SmartSpaceCardReported { // Different SmartSpace cards. // DEPRECATED CardType enum. Use SmartspaceTarget.mFeatureType, which matches the list from: // google3/java/com/google/android/apps/miphone/aiai/echo/smartspace/Constants.kt enum CardType { option deprecated = true; 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; DREAM_OVERLAY = 5; } // 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]; // This represents the interacted subaction for the given card. optional int32 interacted_subcard_rank = 9; // This represents the number of displayed subactions on the given card when a subaction click // 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; // The sub cards. optional SmartSpaceSubcards subcards_info = 12 [(log_mode) = MODE_BYTES]; // Holds all the dimensions for this event. See go/ss-dimensional-logging for details. optional SmartspaceCardDimensionalInfo dimensional_info = 13 [(log_mode) = MODE_BYTES]; } // Holds all the dimensions tied to a Smartspace event. message SmartspaceCardDimensionalInfo { repeated SmartspaceFeatureDimension feature_dimensions = 1; } message SmartspaceFeatureDimension { // This maps to an enum value in Android System Intelligence. optional int32 feature_dimension_id = 1; // The value for this dimension. optional int32 feature_dimension_value = 2; } /** * This message represents information about any SmartSpace subcards. * Logged from * vendor/unbundled_google/packages/SystemUIGoogle/bcsmartspace/src/com/google/android/systemui/smartspace/BcSmartspaceLogger.java * vendor/unbundled_google/packages/NexusLauncher/src/com/google/android/apps/nexuslauncher/qsb/SmartspaceViewContainer.java * Next Tag: 3 */ message SmartSpaceSubcards { // List of subcards. repeated SmartSpaceCardMetadata subcards = 1; // The index of the clicked subcard, if applicable. // This index is 1 indexed as opposed to 0 indexed due to sint32 encoding // limitation when using -1 as a default. // Default will be 0 to denote that no subcard was clicked. // Please note this has no information about whether the primary card was // clicked or not. Basically if this has the value 0, just ignore this field. optional int32 clicked_subcard_index = 2; } /** * This message represents metadata for a SmartSpace card. * Logged from * vendor/unbundled_google/packages/SystemUIGoogle/bcsmartspace/src/com/google/android/systemui/smartspace/BcSmartspaceLogger.java * vendor/unbundled_google/packages/NexusLauncher/src/com/google/android/apps/nexuslauncher/qsb/SmartspaceViewContainer.java * Next Tag: 3 */ message SmartSpaceCardMetadata { // Uniquely identifies a card. Should persist through updates. optional int32 instance_id = 1; // The type of the card. optional int32 card_type_id = 2; } /** * 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; // List of attributes attached to the event. optional LauncherAttributes attributes = 20 [(log_mode) = MODE_BYTES]; } /** * 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]; // List of attributes attached to the event. optional LauncherAttributes attributes = 19 [(log_mode) = MODE_BYTES]; optional bool is_kids_mode = 20; } /** * 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; optional android.stats.style.EffectPreference effect_preference = 13; optional int32 effect_id_hash = 14; optional int32 lock_wallpaper_category_hash = 15; optional int32 lock_wallpaper_id_hash = 16; optional int32 first_launch_date_since_setup = 17; optional int32 first_wallpaper_apply_date_since_setup = 18; optional int32 app_launch_count = 19; optional int32 color_variant = 20; optional int64 time_elapsed_millis = 21; optional int32 effect_status_code = 22; } /** * 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/vibrator/VibratorManagerService.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; } /** * Logs vibration request. * Logged from: * frameworks/base/services/core/java/com/android/server/vibrator/VibratorManagerService.java */ // Next tag: 26 message VibrationReported { repeated AttributionNode attribution_node = 1; enum VibrationType { UNKNOWN = 0; SINGLE = 1; REPEATED = 2; EXTERNAL = 3; } // Vibration identifiers for aggregation. optional VibrationType vibration_type = 2; // One of VibrationAttributes.USAGE_* constant values. optional int32 vibration_usage = 3; optional int32 vibration_status = 4; // Vibration completion causes. // Flag indicating if the vibration was canceled by the same process // or superseded/canceled by another vibration from the same process. optional bool ended_by_same_uid = 5; // Usage value of the vibration that superseded/canceled this one. optional int32 ended_by_usage = 6; // Usage value of the vibration that was superseded/canceled by this one. optional int32 interrupted_usage = 7; // Vibration execution counters. optional int32 repeat_count = 8; // Total duration of this vibration at the service, including setup and cleanup. optional int64 vibration_duration_millis = 9; // Total duration the vibrator motor was active with non-zero amplitude. optional int64 vibrator_on_duration_millis = 10; // Delta between the incoming binder call to vibrate and the first step in the // vibration conductor (closest measure of starting HAL interactions). optional int64 start_latency_millis = 11; // Delta between the HAL reporting the last vibrate operation has completed and // vibrator service has finished the vibration and become idle. optional int64 end_latency_millis = 12; // Vibrator hardware HAL API interaction counters. // The majority of vibrations will populate only a couple of the fields below. optional int32 hal_compose_count = 13; optional int32 hal_compose_pwle_count = 14; optional int32 hal_on_count = 15; optional int32 hal_off_count = 16; optional int32 hal_perform_count = 17; optional int32 hal_set_amplitude_count = 18; optional int32 hal_set_external_control_count = 19; // Vibrator hardware HAL API constants used (deduped). // Values from CompositionPrimitive.aidl successfully triggered by this vibration at least once. repeated int32 hal_supported_composition_primitives_used = 20; // Values from Effect.aidl triggered by this vibration at least once. repeated int32 hal_supported_effects_used = 21; // Values from CompositionPrimitive.aidl triggered but not supported by the device. repeated int32 hal_unsupported_composition_primitives_used = 22; // Values from Effect.aidl triggered but not supported by the device. repeated int32 hal_unsupported_effects_used = 23; // Vibrator hardware HAL argument sizes (total). optional int32 hal_composition_size = 24; optional int32 hal_pwle_size = 25; } /* * 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; /** * The process state of apps, keep in sync with * frameworks/base/core/java/android/app/ActivityManager.java */ enum AppProcessState { PROCESS_STATE_UNKNOWN = -1; PROCESS_STATE_PERSISTENT = 0; PROCESS_STATE_PERSISTENT_UI = 1; PROCESS_STATE_TOP = 2; PROCESS_STATE_BOUND_TOP = 3; PROCESS_STATE_FOREGROUND_SERVICE = 4; PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 5; PROCESS_STATE_IMPORTANT_FOREGROUND = 6; PROCESS_STATE_IMPORTANT_BACKGROUND = 7; PROCESS_STATE_TRANSIENT_BACKGROUND = 8; PROCESS_STATE_BACKUP = 9; PROCESS_STATE_SERVICE = 10; PROCESS_STATE_RECEIVER = 11; PROCESS_STATE_TOP_SLEEPING = 12; PROCESS_STATE_HEAVY_WEIGHT = 13; PROCESS_STATE_HOME = 14; PROCESS_STATE_LAST_ACTIVITY = 15; PROCESS_STATE_CACHED_ACTIVITY = 16; PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 17; PROCESS_STATE_CACHED_RECENT = 18; PROCESS_STATE_CACHED_EMPTY = 19; PROCESS_STATE_NONEXISTENT = 20; } // The process state of the launching activity prior to the launch. optional AppProcessState process_state = 23; // The oom adj score of the launching activity prior to the launch. optional int32 process_oom_adj = 24; } 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 [(state_field_option).primary_field = true, (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; } // Position of the letterbox enum Position { UNKNOWN_POSITION = 0; NOT_LETTERBOXED_POSITION = 1; CENTER = 2; LEFT = 3; RIGHT = 4; TOP = 5; BOTTOM = 6; } // The state that was entered. optional State state = 2 [ (state_field_option).exclusive_state = true, (state_field_option).nested = false]; optional Position letterbox_position = 3; } /** * Logs when an app that is letterboxed changes position. * * Logged from: * frameworks/base/services/core/java/com/android/server/wm/ActivityMetricsLogger.java */ message LetterboxPositionChanged { // UID of the package that is letterboxed. optional int32 uid = 1 [(is_uid) = true]; // The new position of the letterbox enum PositionChange { UNKNOWN = 0; CENTER_TO_LEFT = 1; LEFT_TO_CENTER = 2; CENTER_TO_RIGHT= 3; RIGHT_TO_CENTER = 4; CENTER_TO_TOP = 5; TOP_TO_CENTER = 6; CENTER_TO_BOTTOM = 7; BOTTOM_TO_CENTER = 8; } optional PositionChange position_change = 2; } /** * 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; // Whether this FGS package had permission to notify the user. optional bool fgs_has_notification_permission = 15; // Keep in sync with frameworks/base/core/java/android/content/pm/ServiceInfo.java enum ForegroundServiceType { FOREGROUND_SERVICE_TYPE_NONE = 0; FOREGROUND_SERVICE_TYPE_DATA_SYNC = 0x0001; // 1 << 0 FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK = 0x0002; // 1 << 1 FOREGROUND_SERVICE_TYPE_PHONE_CALL = 0x0004; //1 << 2 FOREGROUND_SERVICE_TYPE_LOCATION = 0x0008; // 1 << 3 FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE = 0x0010; // 1 << 4 FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION = 0x0020; // 1 << 5 FOREGROUND_SERVICE_TYPE_CAMERA = 0x0040; // 1 << 6 FOREGROUND_SERVICE_TYPE_MICROPHONE = 0x0080; // 1 << 7 } // The foreground service types, must be one or a combination of the types // in the ForegroundServiceType above. optional int32 fgs_types = 16; } /** * 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; // How many active foreground services across the system optional int32 total_foreground_services = 16; // How many processes hosting foreground services optional int32 procs_with_foreground_services = 17; } /* * 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; } /** * Atom for logging Dream user interaction and impression events. * * Logged from: * frameworks/base/services/core/java/com/android/server/ */ message DreamUiEventReported { // The event's source or target uid, if applicable. optional int32 uid = 1 [(is_uid) = true]; // The event_id (as for UiEventReported). optional int32 event_id = 2; // 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 = 3; // The name of the dream component, which identifies the type of the dream. optional string dream_component_name = 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; // Fields for tracking ongoing and foreground service notifications optional bool is_ongoing = 22; optional bool is_foreground_service = 23; // Fields to know about the timeout for notifications. optional int64 timeout_millis = 24; } 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; } /** * Snapshot of notification memory use aggregated per-package and per-style. * One message for each notification style of each package showing notifications. * Logged from * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging */ message NotificationMemoryUse { // UID if the application (can be mapped to package and version) optional int32 uid = 1; // Integer enum value showing aggregated notification style. optional int32 style = 2; // Number of notifications that were aggregated into this metric. optional int32 count = 3; // Number of notifications with actually inflated views in this metric. optional int32 countWithInflatedViews = 4; // Memory use of small icon Bitmaps in KB. optional int32 smallIconObject = 5; // Count of notifications with small icons as bitmaps. optional int32 smallIconBitmapCount = 6; // Memory use of large icon Bitmaps in KB. optional int32 largeIconObject = 7; // Count of notifications with large icons as bitmaps. optional int32 largeIconBitmapCount = 8; // Memory use of big picture style Bitmaps in KB. optional int32 bigPictureObject = 9; // Count of notifications with big picture images as bitmaps. optional int32 bigPictureBitmapCount = 10; // Complete memory use of extras in Notification object, in KB. optional int32 extras = 11; // Memory use of extenders in KB. optional int32 extenders = 12; // Combined memory use of small icon drawables in views, in KB. optional int32 smallIconViews = 13; // Combined memory use of large icon drawables in views, in KB. optional int32 largeIconViews = 14; // Combined memory use of system icon drawables in views, in KB. optional int32 systemIconViews = 15; // Combined memory use of style drawables (e.g. BigPicture) in views, in KB. optional int32 styleViews = 16; // Combined memory use of custom view drawables in views, in KB. optional int32 customViews = 17; // Extra memory used due to usage of software bitmaps, in KB. optional int32 softwareBitmaps = 18; // How many notifications were actually ever shown to the user. optional int32 seenCount = 19; } /** * Logged when notification are dismissed. If multiple notifications are dismissed together, * this is only logged once per style per UID. * Logged from * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging */ message NotificationDismissed { // UID if the application (can be mapped to package and version) optional int32 uid = 1 [(is_uid) = true]; // Integer enum value showing aggregated notification style. optional android.stats.sysui.NotificationStyle style = 2; // Reason for dismissal, based on REASON_ constants in // frameworks/base/core/java/android/service/notification/NotificationListenerService.java optional int32 reason = 3; // Number of notifications dismissed. optional int32 count = 4; // Memory use of Notification object being dismissed, in KB. optional int32 notificationObjectMemoryUse = 5; // Memory use of Notification views being dismissed, in KB. optional int32 notificationViewMemoryUse = 6; // Current memory use of SystemUI, RSS Anon in KB. optional int32 systemUiMemoryUse = 7; } /** * 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; // The ID of the session this event occurred in (if any) optional int32 session_id = 10; // The type of session (i.e. CUJ) optional android.hardware.biometrics.SessionTypeEnum session_type = 11; // If the AoD was on when this event occurred. optional bool is_aod = 12; } /** * 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; // The ID of the session this event occurred in (if any) optional int32 session_id = 11; // The type of session (i.e. CUJ) optional android.hardware.biometrics.SessionTypeEnum session_type = 12; // If the AoD was on when this event occurred. optional bool is_aod = 13; } /** * 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; // The ID of the session this event occurred in (if any) optional int32 session_id = 11; // The type of session (i.e. CUJ) optional android.hardware.biometrics.SessionTypeEnum session_type = 12; // If the AoD was on when this event occurred. optional bool is_aod = 13; } /** * 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; // Logged after INSTALL_REQUESTED for devices installing a train which // requires reboot and eligible for unattended reboot. UNATTENDED_REBOOT_ELIGIBLE = 32; // Logged when Phonesky trys to prepare LSKF. LSKF_PREPARATION_INITITATED = 33; // Logged when LSKF preparation succeeded. LSKF_PREPARATION_SUCCESS = 34; // Logged when LSKF preparation failed. LSKF_PREPARATION_FAILURE = 35; // Logged when Phonesky cannot schedule reboot job on a unattended reboot // eligible device. UNATTENDED_REBOOT_NOT_TRIGGERED = 36; // Logged when SIM PIN recovery preparation succeeded. SIM_PIN_PREPARATION_SUCCESS = 37; // Logged when SIM PIN recovery preparation failed. SIM_PIN_PREPARATION_FAILURE = 38 [deprecated = true]; // Logged when unattended reboot is aborted and falls back to organic // reboot. UNATTENDED_REBOOT_ABORT = 39; // Logged when Phonesky re-prepares LSKF. LSKF_PREPARATION_RETRY = 40; // Logged when the device doesn’t support checkpoint and cannot stage // multiple sessions. CHECKPOINT_NOT_SUPPORTED = 41; // Logged when Phonesky instructs Android platform to monitor reboot // readiness signal. PENDING_REBOOT_MARKED = 42; // Logged when Phonesky instructs Android platform to stop monitoring reboot // readiness signal. PENDING_REBOOT_CANCELLED = 43 [deprecated = true]; // Logged when Phonesky receives reboot readiness broadcast and the device // is ready to reboot. SIGNAL_READY_TO_REBOOT_RECEIVED = 44; // Logged when Phonesky receives reboot readiness broadcast and the device // is not ready to reboot. SIGNAL_NOT_READY_TO_REBOOT_RECEIVED = 45; // Logged when Phonesky cancels an untracked train. UNTRACKED_TRAIN_CANCELLED = 46; } optional State state = 6; // Possible experiment ids for monitoring this push. optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; // Index of the Android User. E.g. 0 for primary profile, 10, 11, 12 // for guest and secondary profiles. Not PII. optional int32 user_id = 8; // Log additional info for a state when needed. // When state = REBOOT_TRIGGERED, this field logs the reboot type: // USERSPACE_REBOOT = 1. // FORCED_REBOOT = 2. // NOTIFICATION_RESTART_REBOOT = 3. // UNATTENDED_REBOOT_SECURED_AND_SIM_PIN = 4. // UNATTENDED_REBOOT_SECURED_NO_SIM_PIN = 5. // UNATTENDED_REBOOT_UNSECURED_AND_SIM_PIN = 6. // UNATTENDED_REBOOT_UNSECURED_NO_SIM_PIN = 7. // When state = INSTALL_FAILURE, this field logs the Install errors related // statusCode // When state = UNATTENDED_REBOOT_ABORT, this field logs the cancellation // reason: // LSKF_RETRY_EXCEED_MAXIMUM = 1. // SIM_PIN_NOT_PREPARED = 2. // When state = UNATTENDED_REBOOT_ELIGIBLE, this field logs the cancellation // reason: // UNATTENDED_REBOOT_SECURED_AND_SIM_PIN = 1. // UNATTENDED_REBOOT_SECURED_NO_SIM_PIN = 2. // UNATTENDED_REBOOT_UNSECURED_AND_SIM_PIN = 3. // UNATTENDED_REBOOT_UNSECURED_NO_SIM_PIN = 4. // When state = UNATTENDED_REBOOT_NOT_TRIGGERED, this field logs the // cancellation reason: // LSKF_NOT_PREPARED = 1. // REBOOT_NOT_READY = 2. // When state = PENDING_REBOOT_CANCELLED, this field logs the cancellation // reason: // LSKF_NOT_PREPARED = 1. // NO_STAGED_TRAIN = 2. // HAS_SIM_PIN_AND_SIM_PIN_STORAGE_DISABLED = 3. 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]; repeated int32 repeated_int_field = 9; repeated int64 repeated_long_field = 10; repeated float repeated_float_field = 11; repeated string repeated_string_field = 12; repeated bool repeated_boolean_field = 13; repeated State repeated_enum_field = 14; } /** 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; } /** * The type of process start. It's the same as ProcessStartTime.StartType but we * can't re-type that for background compatibility. */ enum ProcessStartType { PROCESS_START_TYPE_UNKNOWN = 0; PROCESS_START_TYPE_WARM = 1; PROCESS_START_TYPE_HOT = 2; PROCESS_START_TYPE_COLD = 3; } /** * Logs when a service request is made. * Logged from: * services/core/java/com/android/server/am/ActiveServices.java */ message ServiceRequestEventReported { /** The package uid of the service host. */ optional int32 uid = 1 [(is_uid) = true]; /** The package uid of the service launch request. */ optional int32 requester_uid = 2 [(is_uid) = true]; /** The action name of the service request. */ optional string action_name = 3; /** * The types of the requests to the service. */ enum RequestType { UNKNOWN = 0; START = 1; BIND = 2; } /** The type of the current request to the service.*/ optional RequestType request_type = 4; /** Whether or not it's requested to start as a foreground service. */ optional bool fg_required = 5; /** The start type of the host process. */ optional ProcessStartType proc_start_type = 6; } /** * Logs indicating a broadcast is being delivered to a receiver. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java */ message BroadcastDeliveryEventReported { /** The package uid of the broadcast receiver. */ optional int32 uid = 1 [(is_uid) = true]; /** The package uid of the broadcast sender. */ optional int32 sender_uid = 2 [(is_uid) = true]; /** The action name of the broadcast. */ optional string action_name = 3; /** * The types of the broadcast receivers. */ enum ReceiverType { UNKNOWN = 0; RUNTIME = 1; MANIFEST = 2; } /** The type of the current broadcast receiver. */ optional ReceiverType receiver_type = 4; /** The start type of the host process. */ optional ProcessStartType proc_start_type = 5; /** The delay in ms from enqueue to dispatch of this intent to the set of receivers. */ optional int64 dispatch_delay = 6; /** The delay in ms from beginning of dispatch to this specific receiver. */ optional int64 receive_delay = 7; /** The delay in ms from dispatch to finish the handling of this intent. */ optional int64 finish_delay = 8; } /** * Logs indicating a client is requesting to acquire a provider, * this doesn't include the case where the provider has been installed in the * client's process space and it's just increasing a ref count. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/ContentProviderHelper.java */ message ProviderAcquisitionEventReported { /** The package uid of the content provider host. */ optional int32 uid = 1 [(is_uid) = true]; /** The package uid of the content provider client who makes the request. */ optional int32 client_uid = 2 [(is_uid) = true]; /** The start type of the host process. */ optional ProcessStartType proc_start_type = 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; GET_COW_PATH_CONSISTENCY_CHECK = 14; OPEN_COW_CONSISTENCY_CHECK = 15; PARSE_COW_CONSISTENCY_CHECK = 16; OPEN_COW_DIRECT_CONSISTENCY_CHECK = 17; MEM_ALIGN_CONSISTENCY_CHECK = 18; DIRECT_READ_CONSISTENCY_CHECK = 19; WRONG_MERGE_COUNT_CONSISTENCY_CHECK = 20; }; // 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: 8 */ message UIInteractionFrameInfoReported { optional android.jank.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; // Maximum number of successive frames missed. optional int64 max_successive_missed_frames = 7; } /** * Event to track various latencies in SystemUI. * * Logged from: * frameworks/base/core/java/com/android/internal/util/LatencyTracker.java */ message UIActionLatencyReported { optional android.jank.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; } /** * Note: This is a copy from DataUsageBytesTransfer and add a metered field. * TODO: DataUsageBytesTransfer should be eventually replaced with DataUsageBytesTransferV2. * * 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 DataUsageBytesTransferV2 { // 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 DSS_ALL state indicates the record is // combined regardless of the boolean value in its field. enum DataSubscriptionState { DSS_UNKNOWN = 0; // For server side backward compatibility. DSS_ALL = 1; DSS_OPPORTUNISTIC = 2; DSS_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; // Enumeration of metered states. enum MeteredState { METERED_UNKNOWN = 0; METERED_ALL = 1; METERED_NO = 2; METERED_YES = 3; } // Mark the reported data is metered or non-metered, and METERED_ALL indicates the record is // combined across metered data. optional MeteredState metered = 12; } /** * 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; // GPU memory usage as measured by the kernel tracepoints // Equivalent to dumpsys gpu --gpumem optional int32 gpu_memory_kb = 9; // Whether or not this process is hosting one or more foregound services. optional bool has_foreground_services = 10; } /* * 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, System, and Metadata partitions. */ message DirectoryUsage { enum Directory { UNKNOWN = 0; DATA = 1; CACHE = 2; SYSTEM = 3; METADATA = 4; } 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; // Indicates if the package importance was set by the user (rather than system default). optional bool user_set_importance = 5; } /** * 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 " ". // Deprecated: should not log app package optional string target_info = 3 [deprecated = true]; // The number of packages in the allow list optional int32 set_allowlist_package_count = 4; // The number of activities in the allow list optional int32 set_allowlist_activity_count = 5; } /** * 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) // Deprecated: should not log app package optional string app_info = 5 [deprecated = true]; 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. // Deprecated: should not log app package optional string app_info = 3 [deprecated = true]; // 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; } // 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; // Represents a slice of power attribution, e.g. "cpu while in the background" // or "wifi when running a background service". Queries that care about // PowerComponentUsage slices need to be aware of all supported dimensions. // There are no roll-ups included in the slices - it is up to the clients // of this data to aggregate values as needed. message PowerComponentUsageSlice { optional PowerComponentUsage power_component = 1; enum ProcessState { UNSPECIFIED = 0; FOREGROUND = 1; BACKGROUND = 2; FOREGROUND_SERVICE = 3; } optional ProcessState process_state = 2; } repeated PowerComponentUsageSlice slices = 3; } // 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; // Total amount of time battery was discharging during the reported session optional int64 discharge_duration_millis = 7; } /** * 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; } /** * The NetworkDnsHandshakeReported message describes a DoT or DoH handshake operation along with * its result, cause, network latency, TLS version, etc. * */ message NetworkDnsHandshakeReported { optional android.stats.dnsresolver.Protocol protocol = 1; optional android.stats.dnsresolver.HandshakeResult result = 2; optional android.stats.dnsresolver.HandshakeCause cause = 3; optional android.stats.dnsresolver.NetworkType network_type = 4; optional android.stats.dnsresolver.PrivateDnsModes private_dns_mode = 5; // The latency in microseconds of the entire handshake operation. optional int32 latency_micros = 6; // Sent packets in bytes. optional int32 bytes_sent = 7; // Received packets in bytes. optional int32 bytes_received = 8; // Number of round-trips. optional int32 round_trips = 9; // True if TLS session cache hit. optional bool tls_session_cache_hit = 10; // 2 = TLS 1.2, 3 = TLS 1.3 optional int32 tls_version = 11; // True if the handshake requires verifying the private DNS provider hostname. optional bool hostname_verification = 12; // Only present when protocol = PROTO_DOH. optional int32 quic_version = 13; optional int32 server_index = 14; // The sampling-rate of this event is 1/sampling_rate_denom. optional int32 sampling_rate_denom = 15; } /** * 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 GNSS PSDS downloads as defined in IGnssPsds.aidl. * * Logged from: * frameworks/base/services/core/java/com/android/server/location/gnss/GnssPsdsDownloader.java */ message GnssPsdsDownloadReported { // PSDS type as defined in PsdsType.aidl optional int32 psds_type = 1; } /** * 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 [ (state_field_option).exclusive_state = true, (state_field_option).nested = false ]; } /** * 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; // Deprecated, use LAUNCHER DRAG_LEFT = 2; DRAG_TOP = 3; DRAG_RIGHT = 4; DRAG_BOTTOM = 5; LAUNCHER = 6; MULTI_INSTANCE = 7; NOTIFICATIONS = 8; } // 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; CHILD_TASK_ENTER_PIP = 9; RECREATE_SPLIT = 10; FULLSCREEN_SHORTCUT = 11; } // 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 job-specific constraint for a scheduled job has changed. * DeviceWideJobConstraintChanged will cover constraints that are normally the same for all jobs. * * 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 that a device-state-level JobScheduler constraint has changed. This doesn't take individual * job or app characteristics into account. Individual jobs may have a different satisfaction value * based on special policies. Individual job constraints (eg. connectivity or prefetch) are not * logged in this atom. * * Logged from: * frameworks/base/services/core/java/com/android/server/job/controllers/<*>.java */ message DeviceWideJobConstraintChanged { optional com.android.server.job.ConstraintEnum constraint = 1; enum State { UNKNOWN = 0; UNSATISFIED = 1; SATISFIED = 2; } optional State state = 2 [ (state_field_option).exclusive_state = true, (state_field_option).nested = false ]; } /** * 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. // Do not fetch this field from device to save storage space, use uid field induced // package name as process name. 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. // deprecatd by enum type field hosting_type_id to reduce storage space usage by // string type. // Do not fetch this field from device to save storage space. optional string hosting_type = 8 [deprecated = true]; // hostingNameStr field in ProcessRecord. The component class name that runs // in this process. // Do not fetch this field from device to save storage space. optional string hosting_name = 9; // Broadcast action name. optional string broadcast_action_name = 10; enum HostingTypeId { HOSTING_TYPE_UNKNOWN = 0; HOSTING_TYPE_ACTIVITY = 1; HOSTING_TYPE_ADDED_APPLICATION = 2; HOSTING_TYPE_BACKUP = 3; HOSTING_TYPE_BROADCAST = 4; HOSTING_TYPE_CONTENT_PROVIDER = 5; HOSTING_TYPE_LINK_FAIL = 6; HOSTING_TYPE_ON_HOLD = 7; HOSTING_TYPE_NEXT_ACTIVITY = 8; HOSTING_TYPE_NEXT_TOP_ACTIVITY = 9; HOSTING_TYPE_RESTART = 10; HOSTING_TYPE_SERVICE = 11; HOSTING_TYPE_SYSTEM = 12; HOSTING_TYPE_TOP_ACTIVITY = 13; HOSTING_TYPE_EMPTY = 14; } optional HostingTypeId hosting_type_id = 11; enum TriggerType { TRIGGER_TYPE_UNKNOWN = 0; TRIGGER_TYPE_ALARM = 1; TRIGGER_TYPE_PUSH_MESSAGE = 2; TRIGGER_TYPE_PUSH_MESSAGE_OVER_QUOTA = 3; TRIGGER_TYPE_JOB = 4; } optional TriggerType trigger_type = 12; } /** * 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; // The name of the codec. // eg. `OMX.google.aac.decoder` optional string codec = 5; // The mime type. e.g. "audio/vorbis" optional string mime = 6; // The codec mode. i.e. video or audio. optional string mode = 7; // 1 if this is an encoder, 0 if this is a decoder. optional int32 encoder = 8; // 0, 1 optional int32 secure = 9; // The video width in pixels. optional int32 width = 10; // The video height in pixels. optional int32 height = 11; // The rotation of the video in degrees // 0, 90, 180, 270 optional int32 rotation = 12; // 1 if the codec uses crypto/drm, 0 otherwise. optional int32 crypto = 13; // The codec profile. The values are dependent on the codec type. // 0..n optional int32 profile = 14; // The coding level. The values are dependent on the codec type. // 0..n optional int32 level = 15; // The maximum allowed width during a particular codec session. // 0..n optional int32 max_width = 16; // The maximum allowed height during a particular codec session. // 0..n optional int32 max_height = 17; // Indicating which error condition caused the codec to reset to an // uninitialized state. optional int32 error_code = 18; // The error state. // The emitted values are descriptive: UNINITIALIZED, INITIALIZING, // INITIALIZED, CONFIGURING, CONFIGURED, STARTING, STARTED, FLUSHING, FLUSHED, // STOPPING, and RELEASING. // In the event of an internal codec error setting the state outside of these // values, the invalid value will be encoded as a string (e.g., “17”). optional string error_state = 19; // The max latency in us. // The latency is from the time when the MediaCodec sends the ‘raw’ frame to // the media codec service to when the decoded frame arrives back in // MediaCodec’s possession. optional int64 latency_max = 20; // The min latency in us. optional int64 latency_min = 21; // The average latency in us. optional int64 latency_avg = 22; // The number of buffers included in the avg/min/max calculation above. optional int64 latency_count = 23; // The number of packets received back from the code where a latency could not // be determined, and therefore they aren't included in the avg/min/max // calculations above. optional int64 latency_unknown = 24; // Error returned by queueInputBuffer. optional int32 queue_input_buffer_error = 25; // Error returned by queueSecureInputBuffer. optional int32 queue_secure_input_buffer_error = 26; // These modes are primarily for videos. // CQ = constant quality // CBR = constant bit rate // VBR = variable bitrate optional string bitrate_mode = 27; optional int32 bitrate = 28; // 0..n 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; optional int32 config_color_standard = 58; optional int32 config_color_range = 59; optional int32 config_color_transfer = 60; optional int32 parsed_color_standard = 61; optional int32 parsed_color_range = 62; optional int32 parsed_color_transfer = 63; optional int32 hdr_static_info = 64; optional int32 hdr_10_plus_info = 65; optional int32 hdr_format = 66; // !!! 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; // ANGLE in use for the app. optional bool angle_in_use = 9; } /* * 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; // Total shmem allocations optional int32 shmem_kb = 10; } /* * 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 [deprecated = true]; // Number of dmabufs mapped to the process address space. optional int32 mapped_dmabuf_count = 7 [deprecated = true]; // Size of dmabufs mapped to the process address space that are also // mapped to the SurfaceFlinger address space. This indicates memory // being used by graphics compositing layers. If this data row pertains // to SurfaceFlinger itself, then the below field holds the size of all // dmabuifs that are shared with any other process. The delta between // this field and retained_dmabuf_kb, above, is private dmabufs that // SurfaceFlinger is holding but are not shared with other processes. optional int32 surfaceflinger_shared_dmabuf_kb = 8; // As above, but total number of all dmabufs shared with SurfaceFlinger. optional int32 surfaceflinger_shared_dmabuf_count = 9; } /** * 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; // Number of actual API calls reported in this atom. optional int32 num_reported_calls = 11; } /** * 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; } /** * Logs detailed stats for setting schema in AppSearch. * * stats pushed from: * frameworks/base/apex/appsearch/service/java/com/android/server/appsearch/AppSearchManagerService.java * * Next tag: 20 */ message AppSearchSetSchemaStatsReported { // 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 setting schema including the binder latency optional int32 total_latency_millis = 6; // Number of newly added schema types optional int32 new_type_count = 7; // Number of deleted schema types optional int32 deleted_type_count = 8; // Number of compatible schema type changes optional int32 compatible_type_change_count = 9; // Number of index-incompatible schema type changes optional int32 index_incompatible_type_change_count = 10; // Number of backwards-incompatible schema type changes optional int32 backwards_incompatible_type_change_count = 11; // Whether schema migration is executed during setting schema optional bool has_schema_migration = 12; // Overall time used for getting schema during schema migration optional int32 schema_migration_get_schema_latency_millis = 13; // Overall time used for querying and transforming documents during schema migration optional int32 schema_migration_query_and_transform_latency_millis = 14; // Overall time used for first setSchema during schema migration optional int32 schema_migration_first_set_schema_latency_millis = 15; // Overall time used for second setSchema during schema migration optional int32 schema_migration_second_set_schema_latency_millis = 16; // Overall time used for saving documents during schema migration optional int32 schema_migration_save_document_latency_millis = 17; // Number of migrated documents during schema migration optional int32 schema_migration_migrated_document_count = 18; // Number of saved documents during schema migration optional int32 schema_migration_saved_document_count = 19; } // 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 AppSearch Contacts Indexer syncs the contacts data from CP2 to AppSearch * * Reported from: * packages/modules/AppSearch/service/java/com/android/server/appsearch/contactsindexer/ContactsIndexerManagerService.java * * Next tag: 11 */ message ContactsIndexerUpdateStatsReported { enum UpdateType { UNKNOWN = 0; DELTA = 1; FULL = 2; } // Type of the update optional UpdateType update_type = 1; // Latency for the update in millis optional int32 total_latency_millis = 2; // Status code to indicate whether the insert new contacts, or update // existing contacts succeeds, or fails and why // In case of success, it only contains OK. // In case of failures, it contains all the possible errors we get. repeated int32 update_status_codes = 3; // Status code to indicate whether the delete succeeds, or fails and why // In case of success, it only contains OK. // In case of failures, it contains all the possible errors we get. repeated int32 delete_status_codes = 4; // Number of new contacts to be updated. optional int32 number_of_new_contacts_to_be_updated = 5; // Number of old and new contacts has been successfully updated. optional int32 number_of_contacts_update_succeeded = 6; // Number of old contacts has been successfully deleted. optional int32 number_of_contacts_delete_succeeded = 7; // Number of old contacts skipped during this update due to no // significant change. optional int32 number_of_contacts_update_skipped = 8; // Number of old and new contacts failed to be updated optional int32 number_of_contacts_update_failed = 9; // Number of old contacts failed to be deleted optional int32 number_of_contacts_delete_failed = 10; } /** * 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; // The dynamic range profile of the stream optional int64 dynamic_range_profile = 14; // The stream use case optional int64 stream_use_case = 15; } /** * 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]; // User tag string for this session optional string user_tag = 20; // Video stabilization mode // Original type: uint8_t optional int32 video_stabilization_mode = 21 [default = -1]; } /** * 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 state exists because of legacy reasons (i.e. these values existed // before go/perfetto-monitoring was a thing). // Next id: 52. 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; PERFETTO_TRACED_ENABLE_TRACING_OOB_TARGET_BUFFER = 48; // Checkpoints inside perfetto_cmd after tracing has finished. PERFETTO_ON_TRACING_DISABLED = 4; PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; PERFETTO_CMD_FW_REPORT_BEGIN = 49; // Will be removed once incidentd is no longer used. PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; // Guardrails inside perfetto_cmd after tracing has finished. PERFETTO_CMD_FW_REPORT_EMPTY_TRACE = 50; // Will be removed once incidentd is no longer used. PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; // "Successful" terminal states inside perfetto_cmd. PERFETTO_CMD_FW_REPORT_HANDOFF = 51; // Deprecated as "success" is misleading; it simply means we were // able to communicate with incidentd. Will be removed once // incidentd is no longer used. PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9 [deprecated = true]; // Contained trigger begin/success/failure. Replaced by // |PerfettoTriggerAtom| to allow aggregation using a count metric // and reduce spam. reserved 12, 13, 14; // Contained that a guardrail in perfetto_cmd was hit. Replaced with // kCmd* guardrails. reserved 15; // 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; // The list of reason should be kept in sync with @OomAdjReason in OomAdjuster.java. enum OomAdjReason { NONE = 0; ACTIVITY = 1; FINISH_RECEIVER = 2; START_RECEIVER = 3; BIND_SERVICE = 4; UNBIND_SERVICE = 5; START_SERVICE = 6; GET_PROVIDER = 7; REMOVE_PROVIDER = 8; UI_VISIBILITY = 9; ALLOWLIST = 10; PROCESS_BEGIN = 11; PROCESS_END = 12; } optional OomAdjReason unfreeze_reason = 5; } /** * 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; // Duration after the call was connected. optional android.telephony.CallDuration call_duration = 33; // Last known Radio access technology (RAT). optional android.telephony.NetworkTypeEnum last_known_rat = 34; } /** * 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 not in-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 not in-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; // Whether the device is in limited service (only emergency voice // call available). Voice and data RAT will be recorded as // NETWORK_TYPE_UNKNOWN in this case. optional bool is_emergency_only = 10; } /** * 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 may be greater than the number of active SIM slots, if multiple profiles are // enabled on the same eUICC. 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 the status of device-level telephony properties. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message DeviceTelephonyProperties { // True if the device adopts the data stack came out in T optional bool using_t_data_stack = 1; } /** * This atom is deprecated starting in T, use TelephonyNetworkRequestsV2 instead. * * 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 about network requests. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message TelephonyNetworkRequestsV2 { enum NetworkCapability { // Unknown capability was requested. UNKNOWN = 0; // Low latency capability (URLLC) was requested. PRIORITIZE_LATENCY = 1; // High bandwidth capability (EMBB) was requested. PRIORITIZE_BANDWIDTH = 2; // CBS (Carrier Branded Services) capability was requested. CBS = 3; // Enterprise capability was requested. ENTERPRISE = 4; } // Carrier ID of the SIM card. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 1; // The capability that was requested. optional NetworkCapability capability = 2; // Number of times the capability was requested. optional int32 request_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. // If the value of count is greater than 1, the message_id represents only one of the messages. optional int64 message_id = 14; // Number of messages with the same properties (see message_id for exception) optional int32 count = 15; } /** * 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. // If the value of count is greater than 1, the message_id represents only one of the messages. optional int64 message_id = 12; // Retry count: 0 for the first attempt and then increasing for each attempt. // If the value of count is greater than 1, the retry_id represents the value associated with // the message defined by message_id. optional int32 retry_id = 13; // Time in milliseconds to complete the SMS send to the network. // If the value of count is greater than 1, this field measures the average time interval. optional int64 interval_millis = 14; // Number of messages with the same properties (see message_id, retry_id and latency_millis for // exceptions) optional int32 count = 15; } /** * 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; // Reason why the data call handover failed, as in RIL_DataCallFailCause from ril.h repeated int32 handover_failure_causes = 20; // For each int32, the lower 16 bits represent the source RAT while the upper 16 bits indicate // the target RAT of the failed handover. repeated int32 handover_failure_rat = 21; } /** * Logs data stall recovery event * * Logged from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/data/ * DataStallRecoveryManager.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; // The data stall recovered reason. Available from Android T. optional android.telephony.DataStallRecoveredReason reason = 10; // Signal strength of the other phone if DSDS when stall happened. // SIGNAL_STRENGTH_NONE_OR_UNKNOWN(0) if single SIM. optional android.telephony.SignalStrengthEnum other_phone_signal_strength = 11; // PS WWAN Network Registration state of the other phone if DSDS when stall happened. // REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING(0) if single SIM. optional android.telephony.NetworkRegistrationState other_phone_reg_state = 12; // PS WWAN Network Registration state of the default phone when data stall. optional android.telephony.NetworkRegistrationState phone_reg_state = 13; // collect the first validation after recovery when data stall occurs. optional bool is_first_validation_after_recovery = 14; // The phone id when doing the recovery action. optional int32 phone_id = 15; // The elapsed time of current action. optional int32 duration_millis_of_current_action = 16; } /** * 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 * packages/modules/IntentResolver/java/src/com/android/intentresolver/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; // The number of custom actions that the calling app has provided. optional int32 num_provided_custom_actions = 10; // True if the calling app has provided an action for share modification. optional bool modify_share_action_provided = 11; } /** * Reports a ranking selection event. * * Logged from: * frameworks/base/core/java/com/android/internal/app/ChooserActivity.java (sharesheet) * packages/modules/IntentResolver/java/src/com/android/intentresolver/ChooserActivity.java */ 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; // Whether the selected target is pinned. optional bool is_pinned = 5; } /** * 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 USER_STOP = 5; // A user stop journey USER_REMOVE = 6; // A user removal 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 STOP_USER = 7; // Indicates that this is a user stop event REMOVE_USER = 8; // Indicates that this is a user removal 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) } /** * The UserInfo information about an Android user (as used in UserManager multiuser). * * This will be pulled from * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java */ message UserInfo { // The @UserIdInt userId of the user optional int32 user_id = 1; // The type of user, if AOSP-defined, such as {@link UserManager#USER_TYPE_PROFILE_MANAGED} optional UserLifecycleJourneyReported.UserType user_type = 2; // The type of user if not AOSP-defined. Will be empty if user_type is not TYPE_UNKNOWN. optional string user_type_custom = 3; // The @UserInfoFlag UserInfo flags of user. optional int32 user_flags = 4; // Wall-clock time in milliseconds when user was created, according to System.currentTimeMillis optional int64 creation_time_millis = 5; // Wall-clock time in milliseconds when user last entered the state of STATE_RUNNING_UNLOCKED, // according to System.currentTimeMillis optional int64 last_logged_in_time_millis = 6; // True if user is currently running and unlocked optional bool is_user_running_unlocked = 7; } /** * The MultiUserInfo information about maximum supported users on the device. * * This will be pulled from * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java */ message MultiUserInfo { // Maximum users supported on the device optional int32 max_supported_users = 1; // Whether multi user setting is on. optional bool multi_user_setting_on = 2; } /** * 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; // Minimum volume duration of the audio in seconds optional int32 minimum_volume_duration_secs = 5; // Minimum volume (0 ... 1.0) optional float minimum_volume = 6; // Maximum volume duration of the audio in seconds optional int32 maximum_volume_duration_secs = 7; // Maximum volume (0 ... 1.0) optional float maximum_volume = 8; } /** * Logs the Spatializer capability when the Spatializer is created. * * We expect this to occur only once on a healthy system, * when audioserver is initialized. * * On devices that do not support spatialization, * SpatializerLevel returns SPATIALIZER_LEVEL_NONE only. * * Logged from: * frameworks/av/services/mediametrics/AudioAnalytics.cpp */ message MediametricsSpatializerCapabilitiesReported { // Available head tracking modes repeated android.media.audio.HeadTrackingMode head_tracking_modes = 1; // Available spatializer levels repeated android.media.audio.SpatializerLevel spatializer_levels = 2; // Available spatializer modes repeated android.media.audio.SpatializerMode spatializer_modes = 3; // Available channel masks, with each channel position bitwise ORed. // One or more bits from // system/media/audio/include/system/audio-hal-enums.h // audio_channel_mask_t, representing the channel configuration // of AudioTrack data. // // Generally the most populated channel_mask is selected for use. repeated int64 channel_masks = 4; } /** * Logs when Spatializer is enabled or disabled for a device. * * The event field indicates the reason for enabling or disabling: * through the Settings UI, startup/boot, or new device detection. * * The presence of this message indicates that the audio device type * supports Spatialization; this is generally a fixed * property of the platform and depends if the device type is considered * BINAURAL or TRANSAURAL, and the Spatializer support for it. * * This logs existing saved state on BOOT and changes afterwards. * Due to rpc to the MediaMetrics service which generates the atom, * the timestamp of the atom may have a slight delay. * * Logged from: * frameworks/av/services/mediametrics/AudioAnalytics.cpp */ message MediametricsSpatializerDeviceEnabledReported { // Device type enumeration, e.g. BUILTIN_SPEAKER, BT_A2DP, etc. optional android.media.audio.AudioDeviceInfoType type = 1; // The event field indicates the reason for enabling or disabling: // NORMAL: from Settings UI. // BOOT: on startup/boot. // FIRST: on new device detection. optional android.media.audio.SpatializerSettingEvent event = 2; // Whether the spatializer is enabled on that device. // This triggers only on a change of state. // If multiple devices share the same type (e.g. bluetooth headsets), // they will register separate messages. optional bool enabled = 3; } /** * Logs whether the HeadTracker is enabled for a device. * * This only changes if there is a HeadTracker associated with the device. * * This logs existing saved state on BOOT and changes afterwards. * Due to rpc to the MediaMetrics service which generates the atom, * the timestamp of the atom may have a slight delay. * * Logged from: * frameworks/av/services/mediametrics/AudioAnalytics.cpp */ message MediametricsHeadTrackerDeviceEnabledReported { // Device type enumeration, e.g. BUILTIN_SPEAKER, BT_A2DP, etc. optional android.media.audio.AudioDeviceInfoType type = 1; // The event field indicates the reason for enabling or disabling: // NORMAL: from Settings UI. // BOOT: on startup/boot. // FIRST: on new device detection. optional android.media.audio.SpatializerSettingEvent event = 2; // Whether the head tracker was enabled or disabled on that device. // This triggers only on a change of state. // If multiple devices share the same type (e.g. bluetooth headsets), // they will register separate messages. optional bool enabled = 3; } /** * Logs whether the HeadTracker is supported for a device. * * Generally a fixed property of the device, but it is possible * that the HeadTracker sensor might be turned off * or be temporarily unavailable. * * This logs existing saved state on BOOT and changes afterwards. * Due to rpc to the MediaMetrics service which generates the atom, * the timestamp of the atom may have a slight delay. * * Logged from: * frameworks/av/services/mediametrics/AudioAnalytics.cpp */ message MediametricsHeadTrackerDeviceSupportedReported { // Device type enumeration, e.g. BUILTIN_SPEAKER, BT_A2DP, etc. optional android.media.audio.AudioDeviceInfoType type = 1; // The event field indicates the reason for enabling or disabling: // NORMAL: on sensor change. // BOOT: on startup/boot. // FIRST: on new device detection. optional android.media.audio.SpatializerSettingEvent event = 2; // Whether the head tracker is supported on that device. // This triggers only on a change of state. // If multiple devices share the same type (e.g. bluetooth headsets), // they will register separate messages. optional bool supported = 3; } /** * 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 user interact with Media Output Switcher. * * Logged from: * packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java */ message MediaOutputOpInteractionReported { /** * The type of interaction with the output switch dialog. */ enum InteractionType { EXPANSION = 0; ADJUST_VOLUME = 1; STOP_CASTING = 2; } // Type of interaction. optional InteractionType interaction_type = 1; // Type of device that interaction with. optional android.app.settings.mediaoutput.MediumType target = 2; // The package name of an application whose media session is being switched. optional string media_session_package_name= 3; } /** * 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 the status of an AudioRecord operation. * * Logged from: * frameworks/av/services/mediametrics/AudioAnalytics.cpp */ message MediametricsAudioRecordStatusReported { // General status code for categorization of status. optional android.media.Status status = 1; // Status or error message, e.g. logcat. optional string debug_message = 2; // Supplemental status subcode for AudioRecord. optional int32 status_subcode = 3; // Uid associated with the AudioRecord. optional int32 uid = 4 [(is_uid) = true]; // The AudioRecord event. optional android.media.audio.AudioRecordEvent event = 5; // Requested AudioRecord flags, with each flag bitwise ORed. // One or more bits from system/media/audio/include/system/audio-hal-enums.h // audio_input_flags_t optional int32 input_flags = 6; // An enumeration from system/media/audio/include/system/audio-hal-enums.h // audio_source_t, representing the input source for the AudioRecord. optional android.media.audio.Source source = 7; // An enumeration from system/media/audio/include/system/audio-hal-enums.h // audio_format_t, representing the encoding of the AudioRecord data. optional android.media.audio.Encoding encoding = 8; // Channel mask, with each channel position bitwise ORed. // One or more bits from system/media/audio/include/system/audio-hal-enums.h // audio_channel_mask_t, representing the input channel configuration // of AudioRecord data. optional int64 channel_mask = 9; // The size of the AudioRecord buffer in frames. // If an error occurs during creation, this may be a small integer requested size // as AudioFlinger is entitled to increase this as required. optional int32 buffer_frame_count = 10; // Sample rate in Hz. optional int32 sample_rate = 11; } /** * Logs the status of an AudioTrack operation. * * Logged from: * frameworks/av/services/mediametrics/AudioAnalytics.cpp */ message MediametricsAudioTrackStatusReported { // General status code for categorization of status. optional android.media.Status status = 1; // Status or error message, e.g. logcat. optional string debug_message = 2; // Supplemental status subcode for AudioTrack. optional int32 status_subcode = 3; // Uid associated with track optional int32 uid = 4 [(is_uid) = true]; // The AudioTrack event. optional android.media.audio.AudioTrackEvent event = 5; // Requested AudioTrack flags, with each flag bitwise ORed. // One or more bits from system/media/audio/include/system/audio-hal-enums.h // audio_output_flags_t optional int32 output_flags = 6; // An enumeration from system/media/audio/include/system/audio-hal-enums.h // audio_content_type_t, representing the content type of the AudioTrack. optional android.media.audio.ContentType content_type = 7; // An enumeration from system/media/audio/include/system/audio-hal-enums.h // audio_usage_t, representing the use case for the AudioTrack. optional android.media.audio.Usage usage = 8; // An enumeration from system/media/audio/include/system/audio-hal-enums.h // audio_format_t, representing the encoding of the AudioTrack data. optional android.media.audio.Encoding encoding = 9; // Channel mask, with each channel position bitwise ORed. // One or more bits from system/media/audio/include/system/audio-hal-enums.h // audio_channel_mask_t, representing the channel configuration of AudioTrack data. optional int64 channel_mask = 10; // The size of the AudioTrack buffer in frames. // If an error occurs during creation, this may be a small integer requested size // as AudioFlinger is entitled to increase this as required. optional int32 buffer_frame_count = 11; // Sample rate in Hz. optional int32 sample_rate = 12; // Playback speed, nominal 1.f representing 1x. optional float speed = 13; // Playback pitch, nominal 1.f representing 1x. optional float pitch = 14; } /** * 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; CURVE_25519 = 5; }; // 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; /** * Security level of the IRemotelyProvisionedComponent. */ optional android.system.security.keystore2.SecurityLevelEnum security_level = 3; } /** * 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 when TextClassifier Model Downloader finishes a download task. * * Currently we create a downlaod task for each new manifest to download. * * Logged from: external/libtextclassifier/java/ */ message TextClassifierDownloadReported { // The model type to download enum ModelType { UNKNOWN_MODEL_TYPE = 0; ANNOTATOR = 1; LANG_ID = 2; ACTIONS_SUGGESTIONS = 3; } optional ModelType model_type = 1; // The file type to download enum FileType { UNKNOWN_FILE_TYPE = 0; MANIFEST = 1; MODEL = 2; } // Deprecated: now manifest and model files are downloaded together. optional FileType file_type = 2; // The status of the download enum DownloadStatus { UNKNOWN_STATUS = 0; SCHEDULED = 1; SUCCEEDED = 2; FAILED_AND_RETRY = 3; FAILED_AND_ABORT = 4; } optional DownloadStatus download_status = 3; // The public GStatic url we used to download the model. Contains locale info. optional string url_suffix = 4; // Failure reason, only set if this is for a failure status enum FailureReason { reserved 1, 8, 9; UNKNOWN_FAILURE_REASON = 0; FAILED_TO_DOWNLOAD_SERVICE_CONN_BROKEN = 2; FAILED_TO_DOWNLOAD_404_ERROR = 3; FAILED_TO_DOWNLOAD_OTHER = 4; DOWNLOADED_FILE_MISSING = 5; FAILED_TO_PARSE_MANIFEST = 6; FAILED_TO_VALIDATE_MODEL = 7; } optional FailureReason failure_reason = 5; // How many attempts we have tried for the same task at a terminal status (i.e. SUCCEEDED or // FAILED_AND_ABORT). optional int32 run_attempt_count = 6; // Custom failure code for downloader lib internal failures (E.g. 404 error). optional int32 downloader_lib_failure_code = 7; // Time elapsed for the whole download task optional int64 download_duration_millis = 8; // The id of the WorkManager work that launched this download. optional int64 work_id = 9; } /** * Logs when TextClassifier Model Downloader schedules a WorkManager work. * * Logged from: external/libtextclassifier/java/ */ message TextClassifierDownloadWorkScheduled { optional int64 work_id = 1; enum ReasonToSchedule { UNKNOWN_REASON_TO_SCHEDULE = 0; TCS_STARTED = 1; LOCALE_SETTINGS_CHANGED = 2; DEVICE_CONFIG_UPDATED = 3; } optional ReasonToSchedule reason_to_schedule = 2; optional bool failed_to_schedule = 3; } /** * Logs when TextClassifier Model Downloader finishes a WorkManager work. * * A WorkManager work includes one or more downlad tasks. We log this atom when * all tasks finished. The work_id can be used to join work log and task logs. * * Logged from: external/libtextclassifier/java/ */ message TextClassifierDownloadWorkCompleted { optional int64 work_id = 1; enum WorkResult { UNKNOWN_WORK_RESULT = 0; SUCCESS_MODEL_DOWNLOADED = 1; SUCCESS_NO_UPDATE_AVAILABLE = 2; FAILURE_MODEL_DOWNLOADER_DISABLED = 3; FAILURE_MAX_RUN_ATTEMPT_REACHED = 4; RETRY_MODEL_DOWNLOAD_FAILED = 5; RETRY_RUNTIME_EXCEPTION = 6; RETRY_STOPPED_BY_OS = 7; } optional WorkResult work_result = 2; // How many attempts we have tried for this work. optional int32 run_attempt_count = 3; optional int64 work_scheduled_to_started_duration_millis = 4; optional int64 work_started_to_ended_duration_millis = 5; } /** * Logs telemetry for Android Virtualization framework * * On CreateVM requests, an atom is pushed that records what hypervisor is being used. * the protected status of the new VM, and if the VM creation succeeded * Logged from: packages/modules/Virtualization/ */ message VmCreationRequested { enum Hypervisor { UNKNOWN = 0; PKVM = 1; OTHER = 2; } optional Hypervisor hypervisor = 1; // Is the VM started in protected mode? optional bool is_protected = 2; // Did the VM creation succeed optional bool creation_succeeded = 3; // Binder exception Code thrown by createVm request optional int32 binder_exception_code = 4; } /** * Logs telemetry for Early boot CompOsArtifacts checks (done by odsign) * * odsign is a binary that runs during early boot. One of its responsibility is * to check if the device can use compOS and check if so, validate the compos * generated artifacts. An atom is pushed on each such check. Note: We only * push an atom from devices/configurations that can use compOs. */ message EarlyBootCompOsArtifactsCheckReported { // Are the current Artifacts okay (This check is done by odrefresh). // (current_artifacts_ok == true) => compilationRequired is false optional bool current_artifacts_ok = 1; // Has CompOs generated any Artifacts optional bool comp_os_pending_artifacts_exists = 2; // The device will be using CompOs generated artifacts. Note: the value of // this is meaningless if current_artifacts_ok = true optional bool use_comp_os_generated_artifacts = 3; } /** * Logs telemetry when Isolation compilation job is scheduled. * * The atoms are sent by IsolatedCompilationService (fragment of system_server) * when apex are staged and need compilation. */ message IsolatedCompilationScheduled { enum Result { SCHEDULING_RESULT_UNKNOWN = 0; SCHEDULING_FAILURE = 1; SCHEDULING_SUCCESS = 2; } optional Result scheduling_result = 1; } /** * Logs telemetry Isolation compilation completion. * * The atoms is sent by IsolatedCompilationService by compilation ends * and contain results/timings of compilation */ message IsolatedCompilationEnded { enum Result { RESULT_UNKNOWN = 0; RESULT_SUCCESS = 1; RESULT_UNKNOWN_FAILURE = 2; RESULT_FAILED_TO_START = 3; RESULT_JOB_CANCELED = 4; RESULT_COMPILATION_FAILED = 5; RESULT_UNEXPECTED_COMPILATION_RESULT = 6; RESULT_COMPOSD_DIED = 7; } // Time between compilation job starts to when it ends. // Note: this does not include the time between compilation job being scheduled (or when apex is staged) // and it actually starting optional int64 compilation_time_millis = 1; // Result of compilation optional Result compilation_result = 2; } /** * 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]; // Start time of the event in milliseconds since epoch. // Note: This field must be a top-level field as it is used to slice the metrics. optional int64 start_time_millis = 2; } /** * 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]; // Start time of the event in milliseconds since epoch. // Note: This field must be a top-level field as it is used to slice the metrics. optional int64 start_time_millis = 3; } /** * 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; } // Deprecated field - Start time of the event in milliseconds since epoch. optional uint64 start_time_millis = 1 [deprecated = true]; // 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; // When the network info change occurred relative to playback creation // time in milliseconds. // It is 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; // When the state change occurred relative to playback creation time in // milliseconds. // It is 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; // When the error occurred relative to playback creation time in millisecond. // It is 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; // When the track change occurred, relative to playback creation time in // millisecond. // It is 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 an airplane mode session happens. * * Logged from: * packages/modules/Wifi/service/java/com/android/server/wifi/WifiMetrics.java * packages/modules/Bluetooth/service/java/com/android/server/bluetooth/BluetoothAirplaneModeListener.java */ message AirplaneModeSessionReported { enum PackageName { WIFI = 0; BLUETOOTH = 1; } // Module recording the airplane mode session optional PackageName package_name = 1; // State of the module before entering airplane mode // False - module off // True - module on optional bool previous_state = 2; // State of the module at the beginning of airplane mode optional bool entering_state = 3; // State of the module at the end of airplane mode optional bool exiting_state = 4; // Whether the user has activated the feature by // toggling the module in airplane mode optional bool feature_active = 5; // Whether the user toggled the module during current airplane mode optional bool user_toggled = 6; // Whether the user toggled the module within one minute optional bool user_toggled_within_minute = 7; // Whether media profile was connected before entering airplane mode // Only applicable to the Bluetooth module optional bool media_profile_connected = 8; } /** * 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_UNSPECIFIED = 0; 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_UNSPECIFIED = 0; 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; ART_COMPILATION_REASON_VDEX = 20; } // 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_UNKNOWN = 0; 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; WIFI = 4; } 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; } /** * Logs the duration for the magnification session which is activated by the triple tap and * hold gesture. * * Logged from: * frameworks/base/services/accessibility/java/com/android/server/accessibility */ message MagnificationTripleTapAndHoldActivatedSessionReported { // The duration of the triple tap and hold activated session in milliseconds optional int64 duration_millis = 1; } /** * Logs the duration for the following typing focus activated session. * * Logged from: * frameworks/base/services/accessibility/java/com/android/server/accessibility */ message MagnificationFollowTypingFocusActivatedSessionReported { // The duration of the following typing focus activated session in milliseconds optional int64 duration_millis = 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; } /* * 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; } /* * Logged when device folded state changes. * * Logged from: * frameworks/base/packages/SystemUI/src/com/android/systemui/unfold/FoldStateLogger.kt */ message FoldStateDurationReported { enum State { UNKNOWN = 0; OPEN = 1; CLOSED = 2; HALF_OPEN = 3; } optional State start_state = 1; optional State end_state = 2; optional int64 duration_millis = 3; } /** * 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]; } /* * A canonical form time zone suggestion for metrics 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. // // 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 unstable // and of limited use. repeated int32 time_zone_ordinals = 2; // The actual time zone ID(s) in the suggestion. Similar to time_zone_ordinals // but contains the actual string IDs. // // This information is only captured / reported for some devices based on the // value of a server side flag, i.e. it could be enabled for internal testers. // Therefore the list can be empty even when time_zone_ordinals is populated. // // When enabled, see time_zone_ordinals for the expected number of values. repeated string time_zone_ids = 3; } /* * 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]; // True if fallback to telephony time zone detection is supported on the device. optional bool telephony_time_zone_fallback_supported = 11; // The device's current time zone ID (see MetricsTimeZoneSuggestion). optional string device_time_zone_id = 12; // True if enhanced metrics collection is enabled. optional bool enhanced_metrics_collection_enabled = 13; // True if the device may run geolocation time zone detection in the // background. This is the raw server flag value, not the value after // considering other state like the user's "use location" setting that also // affects runtime behavior. See LocationTimeZoneProviderController for // details. optional bool geo_detection_run_in_background_enabled = 14; } /* * Logs information about an individual location time zone provider's state. * * Logged from: * frameworks/base/services/core/java/com/android/server/timezonedetector/location/RealProviderMetricsLogger.java */ message LocationTimeZoneProviderStateChanged { // The index of the provider (primary = 0, secondary = 1) optional int32 provider_index = 1 [(state_field_option).primary_field = true]; 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 [(state_field_option).exclusive_state = true]; } /* * Logs information about the location time zone provider controller's state. * * Logged from: * frameworks/base/services/core/java/com/android/server/timezonedetector/location/RealControllerMetricsLogger.java */ message LocationTimeZoneProviderControllerStateChanged { enum State { // A placeholder for unknown values. UNKNOWN = 0; // The providers are initializing. PROVIDERS_INITIALIZING = 1; // The controller is / has been stopped. STOPPED = 2; // The controller is started and is initializing. INITIALIZING = 3; // The controller is started and is certain of the time zone. CERTAIN = 4; // The controller is started and is uncertain of the time zone. UNCERTAIN = 5; // The controller has been destroyed. DESTROYED = 6; // The controller has failed. FAILED = 7; } // The state of the provider. optional State state = 1; } /* * 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 { // The total number of alarms delivered in the batch. optional int32 num_alarms = 1; // The number of wakeup alarms delivered in the batch. optional int32 wakeups = 2; // A list of uids receiving the alarm delivery. repeated int32 uids = 3 [(is_uid) = true]; // The number of alarms delivered to each of the {@link uids} above. repeated int32 num_alarms_per_uid = 4; // The number of wakeup alarms delivered to each of the {@link uids} above. repeated int32 num_wakeups_per_uid = 5; } /** * 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; POLICY_PERMISSION = 4; } 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; // Whether or not this process is hosting one or more foregound services. optional bool has_foreground_services = 8; } /** * 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; } message VendorApexInfo { optional string package_name = 1; optional string version_code = 2; optional string version_name = 3; optional string source_dir = 4; optional string signing_certs_hash = 5; optional string file_hash = 6; } /** * Logs the non-a11yTool service warning status and its duration of the usage. * * Logged from: * frameworks/base/services/accessibility/java/com/android/server/accessibility * packages/apps/Settings */ message NonA11yToolServiceWarningReported { // Package name of the non-a11yTool service. optional string package_name = 1; // Warning status of the non-a11yTool service. optional android.stats.accessibility.WarningStatus status = 2; // Duration between status in milliseconds. optional int64 duration_millis = 3; } message MediaCapabilities { message AudioEncodings { repeated android.stats.mediametrics.AudioEncoding audio_encodings = 1; } message HdrFormats { repeated android.stats.mediametrics.HdrFormat hdr_formats = 1; } message DisplayMode { optional int32 height = 1; optional int32 width = 2; optional float refresh_rate = 3; optional int32 seamless_refresh_rates_group_id = 4; } message DisplayModes { repeated DisplayMode display_modes = 1; } // Surround sound capabilities // List of surround sound encodings supported by this device optional AudioEncodings surround_encodings = 1 [(log_mode) = MODE_BYTES]; // List of surround sound encodings supported by the sink device optional AudioEncodings sink_surround_encodings = 2 [(log_mode) = MODE_BYTES]; // List of supported surround sound encodings disabled by user optional AudioEncodings user_disabled_surround_encodings = 3 [(log_mode) = MODE_BYTES]; // List of unsupported surround sound encodings enabled by user optional AudioEncodings user_enabled_surround_encodings = 4 [(log_mode) = MODE_BYTES]; // The surround sound output mode chosen by user optional android.stats.mediametrics.EncodedSurroundOutputMode surround_output_mode = 5; // Display capabilities // List of HDR display formats supported by the sink device optional HdrFormats sink_hdr_formats = 6 [(log_mode) = MODE_BYTES]; // List of modes supported by the sink device. Each mode has height, width, refresh rate and a list // of refresh-rates between which a seamless switch is possible. optional DisplayModes sink_display_modes = 7 [(log_mode) = MODE_BYTES]; // The HDCP level with which the display is connected optional int32 hdcp_level = 8; // Display settings // The Match content refresh rate user preference optional android.stats.mediametrics.MatchContentFrameRatePreference match_content_refresh_rate_preference = 9; // List of HDR formats disabled by the user optional HdrFormats user_disabled_hdr_formats = 10 [(log_mode) = MODE_BYTES]; // The resolution height selected by the user optional int32 user_preferred_resolution_height = 11; // The resolution width selected by the user optional int32 user_preferred_resolution_width = 12; // The refresh rate selected by the user optional float user_preferred_refresh_rate = 13; // Whether the user has disabled auto low latency mode optional bool has_user_disabled_allm = 14; } /** * Logs when NNAPI model is compiled successfully * Logged from * modules/NeuralNetworks/runtime/TelemetryStatsd.cpp */ message NeuralNetworksCompilationCompleted { // Linux process uid for the package. optional int32 uid = 1 [(is_uid) = true]; // id which identifies single session of client interacting with NNAPI runtime optional int32 session_id = 2; // NNAPI mainline module version. optional int64 version_nnapi_module = 3; // An identifier that can be used to match events for ML model architecture. // Hash is generated from model operations and operands definition, but not weights. // Hash algorithm: HMAC-SHA256 // Size: 32 byte optional bytes model_arch_hash = 4 [(log_mode) = MODE_BYTES]; // Device driver identifier used by this compilation. // NeuralNetworks models are compiled/prepared for one or more device drivers (e.g., DSP, GPU, // TPU, CPU). The device driver identifier is a concatenation of [device driver name, =, and // device driver version]. If multiple device drivers are used, all device driver identifiers // are sorted and concatenated with comma as a separator. optional string device_id = 5; // Type of tensors used for inputs optional android.neuralnetworks.DataClass input_data_class = 6; // Type of tensors used for outputs optional android.neuralnetworks.DataClass output_data_class = 7; // Did the compilation had to fallback to cpu due to an error? optional bool fallback_to_cpu_from_error = 8; // Did client name target devices explicitly? optional bool introspection_enabled = 9; // Was cache enabled? optional bool cache_enabled = 10; // Was control flow used in the model? optional bool has_control_flow = 11; // Whether there exists a partition boundary in the compilation that has dynamic size optional bool has_dynamic_temporaries = 12; // Time taken to compile a model optional int64 compilation_time_sum_millis = 13; optional int64 compilation_time_min_millis = 14; optional int64 compilation_time_max_millis = 15; optional int64 compilation_time_sum_squared_millis = 16; optional int32 compilation_time_count = 17; // How many times this atom occurred locally before being pushed. optional int32 count = 18; // model_arch_hash compressed to 64 bits by bitwise-xor each 64 chunk of model_arch_hash. optional int64 model_arch_hash_64 = 19; } /** * Logs when NNAPI model fails compilation * Logged from * modules/NeuralNetworks/runtime/TelemetryStatsd.cpp */ message NeuralNetworksCompilationFailed { // Linux process uid for the package. optional int32 uid = 1 [(is_uid) = true]; // id which identifies single session of client interacting with NNAPI runtime optional int32 session_id = 2; // NNAPI mainline module version. optional int64 version_nnapi_module = 3; // An identifier that can be used to match events for ML model architecture. // Hash is generated from model operations and operands definition, but not weights. // Hash algorithm: HMAC-SHA256 // Size: 32 byte optional bytes model_arch_hash = 4 [(log_mode) = MODE_BYTES]; // Device driver identifier used by this compilation. // NeuralNetworks models are compiled/prepared for one or more device drivers (e.g., DSP, GPU, // TPU, CPU). The device driver identifier is a concatenation of [device driver name, =, and // device driver version]. If multiple device drivers are used, all device driver identifiers // are sorted and concatenated with comma as a separator. optional string device_id = 5; // Type of tensors used for inputs optional android.neuralnetworks.DataClass input_data_class = 6; // Type of tensors used for outputs optional android.neuralnetworks.DataClass output_data_class = 7; // Error code returned by compilation call optional android.neuralnetworks.ResultCode error_code = 8; // Did client name target devices explicitly? optional bool introspection_enabled = 9; // Was cache enabled? optional bool cache_enabled = 10; // Was control flow used in the model? optional bool has_control_flow = 11; // Whether there exists a partition boundary in the compilation that has dynamic size optional bool has_dynamic_temporaries = 12; // How many times this atom occurred locally before being pushed. optional int32 count = 13; // model_arch_hash compressed to 64 bits by bitwise-xor each 64 chunk of model_arch_hash. optional int64 model_arch_hash_64 = 14; } /** * Logs when NNAPI model is executed successfully * * Logged from * modules/NeuralNetworks/runtime/TelemetryStatsd.cpp */ message NeuralNetworksExecutionCompleted { // Linux process uid for the package. optional int32 uid = 1 [(is_uid) = true]; // id which identifies single session of client interacting with NNAPI runtime optional int32 session_id = 2; // NNAPI mainline module version. optional int64 version_nnapi_module = 3; // An identifier that can be used to match events for ML model architecture. // Hash is generated from model operations and operands definition, but not weights. // Hash algorithm: HMAC-SHA256 // Size: 32 byte optional bytes model_arch_hash = 4 [(log_mode) = MODE_BYTES]; // Device driver identifier used by this execution. // NeuralNetworks models are executed on one or more device drivers (e.g., DSP, GPU, TPU, CPU). // The device driver identifier is a concatenation of [device driver name, =, and device driver // version]. If multiple device drivers are used, all device driver identifiers are sorted and // concatenated with comma as a separator. optional string device_id = 5; // Execution mode optional android.neuralnetworks.Mode mode = 6; // Type of tensors used for inputs optional android.neuralnetworks.DataClass input_data_class = 7; // Type of tensors used for outputs optional android.neuralnetworks.DataClass output_data_class = 8; // Did client name target devices explicitly? optional bool introspection_enabled = 9; // Was cache enabled? optional bool cache_enabled = 10; // Was control flow used in the model? optional bool has_control_flow = 11; // Whether there exists a partition boundary in the compilation that has dynamic size optional bool has_dynamic_temporaries = 12; // Time taken to execute from runtime, including runtime/ipc overhead optional int64 duration_runtime_sum_micros = 13; optional int64 duration_runtime_min_micros = 14; optional int64 duration_runtime_max_micros = 15; optional int64 duration_runtime_sum_squared_micros = 16; optional int32 duration_runtime_count = 17; // Time taken to execute in the driver, excluding runtime/ipc overhead optional int64 duration_driver_sum_micros = 18; optional int64 duration_driver_min_micros = 19; optional int64 duration_driver_max_micros = 20; optional int64 duration_driver_sum_squared_micros = 21; optional int32 duration_driver_count = 22; // Time taken to execute on the hardware, excluding driver overhead optional int64 duration_hardware_sum_micros = 23; optional int64 duration_hardware_min_micros = 24; optional int64 duration_hardware_max_micros = 25; optional int64 duration_hardware_sum_squared_micros = 26; optional int32 duration_hardware_count = 27; // How many times this atom occurred locally before being pushed. optional int32 count = 28; // model_arch_hash compressed to 64 bits by bitwise-xor each 64 chunk of model_arch_hash. optional int64 model_arch_hash_64 = 29; } /** * Logs when NNAPI model fails execution * Logged from * modules/NeuralNetworks/runtime/TelemetryStatsd.cpp */ message NeuralNetworksExecutionFailed { // Linux process uid for the package. optional int32 uid = 1 [(is_uid) = true]; // id which identifies single session of client interacting with NNAPI runtime optional int32 session_id = 2; // NNAPI mainline module version. optional int64 version_nnapi_module = 3; // An identifier that can be used to match events for ML model architecture. // Hash is generated from model operations and operands definition, but not weights. // Hash algorithm: HMAC-SHA256 // Size: 32 byte optional bytes model_arch_hash = 4 [(log_mode) = MODE_BYTES]; // Device driver identifier used by this execution. // NeuralNetworks models are executed on one or more device drivers (e.g., DSP, GPU, TPU, CPU). // The device driver identifier is a concatenation of [device driver name, =, and device driver // version]. If multiple device drivers are used, all device driver identifiers are sorted and // concatenated with comma as a separator. optional string device_id = 5; // Execution mode optional android.neuralnetworks.Mode mode = 6; // Type of tensors used for inputs optional android.neuralnetworks.DataClass input_data_class = 7; // Type of tensors used for outputs optional android.neuralnetworks.DataClass output_data_class = 8; // Error code returned by execution call optional android.neuralnetworks.ResultCode error_code = 9; // Did client name target devices explicitly? optional bool introspection_enabled = 10; // Was cache enabled? optional bool cache_enabled = 11; // Was control flow used in the model? optional bool has_control_flow = 12; // Whether there exists a partition boundary in the compilation that has dynamic size optional bool has_dynamic_temporaries = 13; // How many times this atom occurred locally before being pushed. optional int32 count = 14; // model_arch_hash compressed to 64 bits by bitwise-xor each 64 chunk of model_arch_hash. optional int64 model_arch_hash_64 = 15; } /** * Logs boot-time info for a Context Hub. */ message ContextHubBooted { // The amount of time it took the framework to connect to CHRE/Context Hub HAL // since the framework has booted. optional int64 boot_time_nanos = 1; // The number of Context Hub instances found on this system. optional int32 num_context_hubs = 2; } /** * Logs Context Hub restart events (e.g. crashes). */ message ContextHubRestarted { // The duration of time between the last time Context Hub restart and this event. // This should use the SystemClock.elapsedRealTime() API. optional int64 elapsed_time_millis_since_boot = 1; // The ID of the Context Hub that has restarted (zero-indexed). optional int32 context_hub_id = 2; } /** * Logs a snapshot of all the nanoapps loaded on this Context Hub. */ message ContextHubLoadedNanoappSnapshotReported { // The ID of the Context Hub the snapshot is for (zero-indexed). optional int32 context_hub_id = 1; // The nanoapp this snapshot is for. The nanoapp ID is the 64-bit unique identifier // for the application, and the version is the semantic versioning (https://semver.org) // used to determine the software version. optional int64 nanoapp_id = 2; optional int32 nanoapp_version = 3; } /** * Logs details of a dynamic CHRE nanoapp code download transaction. */ message ChreCodeDownloadTransacted { enum Type { TYPE_UNKNOWN = 0; TYPE_LOAD = 1; TYPE_UNLOAD = 2; } // The ID/version of the nanoapp this code download was for. optional int64 nanoapp_id = 1; optional int32 nanoapp_version = 2; // The type of code download transaction. optional Type transaction_type = 3; // The result of this transaction. optional android.contexthub.ContextHubTransactionResult transaction_result = 4; } /** * 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; } /* * Logs details of initiated UWB ranging session * Logged from packages/modules/Uwb/service/java/com/android/server/uwb/UwbMetrics.java */ message UwbSessionInitiated { // UWB profiles optional android.uwb.Profile profile = 1; // Scrambled timestamp sequence (STS) Type optional android.uwb.Sts sts = 2; // Was it an initiator as opposed to responder? optional bool is_initiator = 3; // Was it a controller as opposed to controlee? optional bool is_controller = 4; // Was the discovery done by the framework? optional bool is_discovered_by_framework = 5; // Was it out-of-band connection as opposed to in-band connection? // Note that this field is ignored if is_discovered_by_framework is false. optional bool is_out_of_band = 6; // UWB channel 5, 6, 9, etc. optional int32 channel = 7; // The status code of session initialization. optional android.uwb.Status status = 8; // Initialization latency in ms if is_discovered_by_framework is true. optional int32 latency_ms = 9; // Initialization latency in step size of 200 ms if is_discovered_by_framework is true. optional int32 latency_200ms = 10; } /* * Logs details of closed UWB ranging session * Logged from packages/modules/Uwb/service/java/com/android/server/uwb/UwbMetrics.java */ message UwbSessionClosed { // UWB profiles optional android.uwb.Profile profile = 1; // Scrambled timestamp sequence (STS) Type optional android.uwb.Sts sts = 2; // Was it an initiator as opposed to responder? optional bool is_initiator = 3; // Was it a controller as opposed to controlee? optional bool is_controller = 4; // Was the connection done by the app as opposed to by the framework? optional bool is_framework_initiated = 5; // Was it out-of-band connection as opposed to in-band connection? // Note that this field is ignored if is_framework_initiated is false. optional bool is_out_of_band = 6; // Session active duration in seconds optional int32 duration_sec = 7; // Session active duration bucket optional android.uwb.DurationBucket duration_bucket = 8; // Total ranging measurement count optional int32 ranging_count = 9; // Valid ranging measurement count optional int32 valid_ranging_count = 10; // Ranging measurement count bucket. optional android.uwb.CountBucket ranging_count_bucket = 11; // Valid ranging measurement count bucket. optional android.uwb.CountBucket valid_ranging_count_bucket = 12; // Ranging start count optional int32 start_count = 13; // Ranging start failure count optional int32 start_failure_count = 14; // Ranging start without valid ranging result count optional int32 start_no_valid_report_count = 15; } /* * Log that the ranging measurement is received * Logged from packages/modules/Uwb/service/java/com/android/server/uwb/UwbMetrics.java */ message UwbRangingMeasurementReceived { // UWB profiles optional android.uwb.Profile profile = 1; // None-Line-of-sight (LOS) indication optional android.uwb.Nlos nlos = 2; // Was the distance valid? optional bool is_distance_valid = 3; // The distance measurement in centimeters. optional int32 distance_cm = 4; // The distance measurement in step size of 50 cm optional int32 distance_50cm = 5; // RSSI of ranging report, in dBm optional int32 rssi = 6; // Was azimuth angle valid? optional bool is_azimuth_valid = 7; // The azimuth angle measurement in degrees. optional int32 azimuth_degree = 8; // The azimuth angle measurement in step size of 10 degree. optional int32 azimuth_10degree = 9; // The figure of merit of azimuth angle measurement. optional int32 azimuth_fom = 10; // Was elevation angle valid? optional bool is_elevation_valid = 11; // The elevation angle measurement in degrees. optional int32 elevation_degree = 12; // The elevation angle measurement in step size of 10 degree. optional int32 elevation_10degree = 13; // The figure of merit of elevation angle measurement. optional int32 elevation_fom = 14; } /* * Log that the first ranging measurement is received * Logged from packages/modules/Uwb/service/java/com/android/server/uwb/UwbMetrics.java */ message UwbFirstRangingReceived { // UWB profiles optional android.uwb.Profile profile = 1; // The latency between the ranging start/resume and 1st ranging measurement, in ms. optional int32 latency_ms = 2; // The ranging latency in 200ms. optional int32 latency_200ms = 3; } /* * Log that UWB device error is detected * Logged from packages/modules/Uwb/service/java/com/android/server/uwb/UwbMetrics.java */ message UwbDeviceErrorReported { enum Type { UNKNOWN = 0; // Initialization error INIT_ERROR = 1; // Device status error DEVICE_STATUS_ERROR = 2; // UCI generic error UCI_GENERIC_ERROR = 3; } // Error type optional Type type= 1; } /** * Log that the clipboard has been cleared * Logged from frameworks/base/services/core/java/android/content/ClipboardAutoWipeService.java */ message ClipboardCleared { enum Source { SOURCE_UNKNOWN = 0; AUTO_CLEAR = 1; } // Source of the wipe optional Source source = 1; } /** * Pulls status for a SIM. * * Each pull creates multiple atoms, one for each SIM. The atom holds the status for a SIM that's * sensitive per carrier. The atom would be aggregated per carrier for analysis. * * Pulled from: * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java */ message PerSimStatus { enum WfcMode { UNKNOWN = 0; WIFI_ONLY = 1; CELLULAR_PREFERRED = 2; WIFI_PREFERRED = 3; } enum SimVoltageClass { VOLTAGE_CLASS_UNKNOWN = 0; VOLTAGE_CLASS_A = 1; VOLTAGE_CLASS_B = 2; VOLTAGE_CLASS_C = 3; } // Index of the SIM, 0 for single-SIM devices. optional int32 sim_slot_index = 1; // Carrier ID of the SIM. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 2; // Indicates whether phone number source UICC provides a phone number // and whether it agrees with other sources: // - 0: no number provided // - a positive integer (> 0): sources providing the same phone number // shall use the same integer. The integer shall start from 1, and // for each new unique source the next integer (2, 3, …) is used. // This way, the raw phone number cannot be derived from the value of // this field. // This also allows a quick check of conflicts: any field > 1 means conflict, // and the max means the count of unique phone numbers. optional int32 phone_number_source_uicc = 3; // Indicates whether phone number source CARRIER provides a phone number // and whether it agrees with other sources. // See field phone_number_source_uicc. optional int32 phone_number_source_carrier = 4; // Indicates whether phone number source IMS provides a phone number // and whether it agrees with other sources. // See field phone_number_source_uicc. optional int32 phone_number_source_ims = 5; // Indicates whether VoLTE is enabled optional bool volte_enabled = 6; // Indicates whether WFC is enabled optional bool wfc_enabled = 7; // Indicates the user's WFC mode optional WfcMode wfc_mode = 8; // Indicates the user's WFC mode when roaming optional WfcMode wfc_roaming_mode = 9; // Indicates the user's setting for video calling. optional bool video_calling_enabled = 10; // Indicates if data roaming is enabled optional bool data_roaming_enabled = 11; // Indicates the list of networks allowed by the user. Bitmask is encoded as // TelephonyManager#NetworkTypeBitMask. optional int64 allowed_networks_by_user = 12; // Indicates if 2G is disabled by the user using the "Allow 2G" toggle optional bool is_2g_disabled = 13; // Indicates if PIN1 of the SIM card is enabled optional bool is_pin1_enabled = 14; // Indicates the lowest voltage class supported by the SIM optional SimVoltageClass sim_voltage_class = 15; // APN type bitmask of the APNs added or modified by user: // @ApnType in frameworks/base/telephony/java/android/telephony/Annotation.java. optional int32 user_modified_apn_type_bitmask = 16; // Indicates the unmetered networks // Bitmask is encoded as TelephonyManager#NetworkTypeBitMask. optional int64 unmetered_networks = 17; } /* * Logs Device Scan State events generated by Nearby Scan API. */ message NearbyDeviceScanStateChanged { // Uid of the client that triggers the Nearby scan. optional int32 uid = 1 [(is_uid) = true]; // Scan start timestamp as session id. optional int64 scan_session_id = 2; // Scan state. optional android.nearby.NearbyScanState scan_state = 3; // Scan type. optional android.nearby.NearbyScanType scan_type = 4; // Medium that this device was discovered/lost. optional android.nearby.NearbyNetworkMedium network_medium = 5; // Received Signal Strength Indication (RSSI) value of the device discovered/lost. optional int32 rssi = 6; // Model of the device discovered/lost. optional string scanned_device_model = 7; // Manufacturer of the device discovered/lost. optional string scanned_device_manufacturer = 8; } /** * Logs when locales of an application are changed. * Logged from * frameworks/base/services/core/java/com/android/server/locales/LocaleManagerService.java */ message ApplicationLocalesChanged { // The uid which invoked this update. The locales for an application // could be changed from the in-app picker OR from the settings UI. optional int32 calling_uid = 1 [(is_uid) = true]; // The uid for which the locale change is being done. optional int32 target_uid = 2 [(is_uid) = true]; // The new locales for the target package. A comma separated list of BCP 47 // locale identifiers, compatible with LocaleList#forLanguageTags. optional string new_locales = 3; // The previous locales for the target package. A comma separated list of // BCP 47 locale identifiers, compatible with LocaleList#forLanguageTags. optional string prev_locales = 4; // Application locales changed status. enum Status { // A placeholder for unspecified values. STATUS_UNSPECIFIED = 0; // New locales were committed. CONFIG_COMMITTED = 1; // Likely because no change is required. CONFIG_UNCOMMITTED = 2; // Failed because the target package is invalid. FAILURE_INVALID_TARGET_PACKAGE = 3; // Failed because the calling package does not have the required permission. FAILURE_PERMISSION_ABSENT = 4; } optional Status status = 5; } /* Logs when the display HBM state changes. * * Logged from: * frameworks/base/services/core/java/com/android/server/display/HighBrightnessModeController.java */ message DisplayHbmStateChanged { optional int32 display_id = 1; // New HBM state optional android.server.display.HbmState state = 2; // The reason the state changes. optional android.server.display.HbmStateTransitionReason reason = 3; } /* * Logs when the display HBM brightness changes. * Logged from: * frameworks/base/services/core/java/com/android/server/display/AutomaticBrightnessControllerjava */ message DisplayHbmBrightnessChanged { optional int32 display_id = 1; // display brightness optional float brightness = 2; } /** * Per-UID time spent running work on the GPU. * * Each pull creates multiple atoms, one per (GPU ID, UID) pair, for at most 10 * randomly selected UIDs. * * Pulled from: * frameworks/native/services/gpuservice/gpuwork/GpuWork.cpp */ message GpuWorkPerUid { // The UID (i.e. app id) that scheduled work on the GPU. optional int32 uid = 1 [(is_uid) = true]; // The GPU ID for which we have work information. optional int32 gpu_id = 2; // The time duration (in seconds) over which this data was collected (most // likely 24 hours). optional int32 time_duration_seconds = 3; // The total amount of time (in milliseconds) the GPU spent running work for // |uid|. optional int32 total_active_duration_millis = 4; // The total amount of time (in milliseconds) the GPU was inactive while // running "continuous" work for |uid|. This is estimated by adding up the // duration of the small gaps between GPU work for |uid|. optional int32 total_inactive_duration_millis = 5; } /** * Logs when entries are dropped in DropBox and the reason for the drop. * * Logged from: frameworks/base/services/ */ message DropboxEntryDropped { // Explains at which stage of the DropBox workflow the entry was dropped. enum DropReason { UNKNOWN = 0; CLEARING_DATA = 3; AGED = 4; WRITE_FAILURE = 5; reserved 1, 2; } optional DropReason drop_reason = 1; // Tag describing the type of dropbox entry. optional string tag = 2; // The age (millis) of the dropped dropbox entry. optional int64 age_millis = 3; } message PersistentUriPermissionsFlushed { // Current amount of persistent uri permissions overall optional int32 permissions_flushed_amount = 1; } message PersistentUriPermissionsAmountPerPackage { // The uid persistent uri permissions amount reported for optional int32 uid = 1 [(is_uid) = true]; // Current amount of persistent uri permissions for this package optional int32 amount = 2; } /** * VBMeta Digest cryptographically encapsulates the composition of signed images or partitions of * a particular build. * * Logs when boot is complete. * Pushed from: * frameworks/base/services/core/java/com/android/server/BinaryTransparencyService.java */ message VBMetaDigestReported { // the hex encoded string of VBMeta Digest value optional string vbmeta_digest = 1; } /** * APEXs can either be signed by Google or OEMs. This atom captures basic metadata of APEXs * pre-installed on a build or a device. * * Logs when boot is complete. * Pushed from: * frameworks/base/services/core/java/com/android/server/BinaryTransparencyService.java */ message ApexInfoGathered { // APEX package names are determined by OEMs optional string package_name = 1; // the version code of the APEX optional int64 version_code = 2; // the hex encoded SHA256 digest of the APEX file optional string sha256_digest = 3; } /** * PVM is protected virtual machine. This atom captures the notion of a container * that describes a virtual machine. * * Will be pushed from: * frameworks/base/services/core/java/com/android/server/BinaryTransparencyService.java */ message PvmInfoGathered { // PVM names are determined by OEMs optional string name = 1; // an int describing the version of the VM optional int64 version = 2; // the hex encoded SHA256 digest of the pvm descriptor file optional string sha256_digest = 3; } /** * This will be pulled from * frameworks/base/services/core/java/com/android/server/BinaryTransparencyService.java */ message SignedPartitionInfo { // partition name (e.g. vendor, product) is determined by OEM optional string partition_name = 1; // the hex encoded SHA256 digest of the partition image file optional string sha256_digest = 2; } /** * Logs when Wear Settings UI is interacted with */ message WearSettingsUIInteracted { /** The UI action category */ optional android.app.wearsettings.Action action = 1; /** The ID of the entry that the users actioned on. */ optional android.app.wearsettings.ItemId item_id = 2; } message TracingServiceReportEvent { enum Event { TRACING_SERVICE_REPORT_UNDEFINED = 0; // Checkpoints inside TracingServiceProxy. TRACING_SERVICE_REPORT_BEGIN = 1; TRACING_SERVICE_REPORT_SVC_HANDOFF = 2; // Guardrails inside TracingServiceProxy. TRACING_SERVICE_REPORT_BIND_PERM_INCORRECT = 3; TRACING_SERVICE_REPORT_SVC_PERM_MISSING = 4; TRACING_SERVICE_REPORT_SVC_COMM_ERROR = 5; } // Which stage of the pipeline we are reporting from. optional Event event = 1; // UUID of the trace. optional int64 trace_uuid_lsb = 2; optional int64 trace_uuid_msb = 3; } /** Pulled from PinnerService. */ message PinnedFileSizesPerPackage { // If the file is pinned but not as part of a specific pinned app, // this will be set to 1000 - the value of system_server. optional int32 uid = 1 [(is_uid) = true]; // Consists of only the pinned file's filename, not its full path; for example // Given a pinned file at ‘/vendor/lib64/libCB.so’, then this field will be // Determined to have have the value ‘libCB.so’. optional string filename = 2; // The size of the pinned file, in kilobytes. optional int32 size_kb = 3; } /** Pulled from PendingIntentController. */ message PendingIntentsPerPackage { // The UID of the app that sent the PendingIntent. optional int32 uid = 1 [(is_uid) = true]; // The total number of currently active PendingIntents belonging to this uid. optional int32 pending_intent_count = 2; // The total size of all currently active PendingIntents belonging to this uid, in kilobytes. optional int32 pending_intent_total_bundle_size_kb = 3; } /** * Logs for Launcher latency. Uses KLL to reduce the data pression * * Logged from: * vendor/unbundled_google/packages/NexusLauncher */ message LauncherLatency { // The event id generated from go/uievents optional int32 event_id = 1; // The instance id to track multiple partial durations or parellel running durations optional int32 instance_id = 2; optional int32 package_id = 3; optional int64 latency_in_millis = 4; optional int32 type = 5; optional int32 query_length = 6 [default = -1]; optional int32 sub_event_type = 7; } /** * Logs for Launcher Impression logging. * * Logged from: * vendor/unbundled_google/packages/NexusLauncher */ message LauncherImpressionEvent { // The event id generated from go/uievents optional int32 event_id = 1; // The instance id to track multiple partial impression event. optional int32 instance_id = 2; // The state defines the surface where the impression is being logged. optional int32 state = 3; optional int32 query_length = 4 [default = -1]; // ResultType of the search result as defined in frameworks/libs/systemui/searchuilib/src/com/android/app/search/ResultType.java repeated int32 result_type = 5; // Number of results of corresponding result_type. repeated int32 result_count = 6; // If the corresponding result_type is above or below keyboard. // If 50% of result is visible, then is_above_keyboard = true repeated bool is_above_keyboard = 7; } /* * Logs changes to game state set by game applications via GameService. */ message GameStateChanged { enum State { // Game mode is unknown. MODE_UNKNOWN = 0; // The game is not in active play, e.g.e the user is using a game menu. MODE_NONE = 1; // The game is in active, but interruptible, game play. MODE_GAMEPLAY_INTERRUPTIBLE = 2; // The game is in active user play mode, which cannot be interrupted. MODE_GAMEPLAY_UNINTERRUPTIBLE = 3; // The current content shown is not gameplay related (e.g. an ad). MODE_CONTENT = 4; } // Provided to ensure package is available even with UID sharing. optional string package_name = 1; // The UID (i.e. app id). optional int32 uid = 2 [(is_uid) = true]; // Whether the device enabled performance boost when the state was changed. optional bool boost_enabled = 3; // This includes a top-level state for the game. optional State state = 4; // Indicates if the game is loading assets/resources/compiling/etc. optional bool is_loading = 5; // A developer-selected enum, for example to indicate level or scene. optional int32 label = 6; // A developer-supplied enum, e.g. to indicate the current quality level. optional int32 quality = 7; } /** * Logs information related to creating hotword detector. */ message HotwordDetectorCreateRequested { // The type of detector. optional android.hotword.HotwordDetectorType detector_type = 1; // True if the detector is created successfully. optional bool is_created_done = 2; // The UID for which assistant application is active. optional int32 uid = 3 [(is_uid) = true]; } /** * Logs information related to hotword detection service init result. */ message HotwordDetectionServiceInitResultReported { // The type of detector. optional android.hotword.HotwordDetectorType detector_type = 1; // The result of initialization. enum Result { // Indicates that the service was initialized successfully. CALLBACK_INIT_STATE_SUCCESS = 0; // Indicates that the service was not initialized successfully. CALLBACK_INIT_STATE_ERROR = 1; // Indicates that the callback was invoked without init state. CALLBACK_INIT_STATE_UNKNOWN_NO_VALUE = 2; // Indicates that the callback was invoked, but the init state value exceeded // the defined maximum. CALLBACK_INIT_STATE_UNKNOWN_OVER_MAX_CUSTOM_VALUE = 3; // Indicates that the callback was not invoked within timeout. CALLBACK_INIT_STATE_UNKNOWN_TIMEOUT = 4; } optional Result result = 2; // The UID for which assistant application is active. optional int32 uid = 3 [(is_uid) = true]; } /** * Logs information related to restarting hotword detection service. */ message HotwordDetectionServiceRestarted { // The type of detector. optional android.hotword.HotwordDetectorType detector_type = 1; // The reason for restarting service. enum Reason { // UNKNOWN value. UNKNOWN = 0; // Indicates that the service was restarted due to audio service died. AUDIO_SERVICE_DIED = 1; // Indicates that the service was restarted regularly. SCHEDULE = 2; // Indicates that the service was restarted due to service crashed. CRASH = 3; } optional Reason reason = 2; // The UID for which assistant application is active. optional int32 uid = 3 [(is_uid) = true]; } /** * Logs information related to keyphrase trigger. */ message HotwordDetectorKeyphraseTriggered { // The type of detector. optional android.hotword.HotwordDetectorType detector_type = 1; // The result of detection. enum Result { // Indicates that the system got the keyphrase from DSP. KEYPHRASE_TRIGGER = 0; // Indicates that the system can not inform the service to verify the keyphrase. FAILED_TO_INFORM_SERVICE = 1; // Indicates that the callback was not invoked within timeout after informing // the service. DETECT_TIMEOUT = 2; // Indicates that the system got the exception after informing the service. DETECT_EXCEPTION = 3; // Indicates that the service crashed. SERVICE_CRASH = 4; // Indicates that the keyphrase was detected. DETECTED = 5; // Indicates that the keyphrase was not detected. REJECTED = 6; // Indicates that the system got the unexpected detected callback. DETECT_UNEXPECTED_CALLBACK = 7; // Indicates that the system got the security exception when handling detected callback. DETECT_SECURITY_EXCEPTION = 8; // Indicates that the system got the unexpected rejected callback. REJECT_UNEXPECTED_CALLBACK = 9; // Indicates that the system called rejected callback when the trusted process was // restarted. REJECTED_FROM_RESTART = 10; } // What result after detecting. optional Result result = 2; // The UID for which assistant application is active. optional int32 uid = 3 [(is_uid) = true]; } /** * Logs information related to hotword detector events. */ message HotwordDetectorEvents { // The type of detector. optional android.hotword.HotwordDetectorType detector_type = 1; // The type of event. enum Event { // UNKNOWN value. UNKNOWN = 0; // Indicates that the system requested to bind the service. REQUEST_BIND_SERVICE = 1; // Indicates that the system connected the service successfully. ON_CONNECTED = 2; // Indicates that the system failed to bind the service. REQUEST_BIND_SERVICE_FAIL = 3; // Indicates that the system called the updateState function of service. REQUEST_UPDATE_STATE = 4; // Indicates that the callback was not invoked within timeout after calling // the updateState function of service. CALLBACK_UPDATE_STATE_AFTER_TIMEOUT = 5; // Indicates that no starting recognition after creating the detector. DID_NOT_CALL_START_RECOGNITION = 6; // Indicates that the system disconnected the service. ON_DISCONNECTED = 7; // Indicates that the application called the updateState function. APP_REQUEST_UPDATE_STATE = 8; // Indicates that starting to listen software detection. START_SOFTWARE_DETECTION = 9; // Indicates that starting to listen external source detection. START_EXTERNAL_SOURCE_DETECTION = 10; // Indicates that the external source detection was detected. EXTERNAL_SOURCE_DETECTED = 11; // Indicates that the external source detection was not detected. EXTERNAL_SOURCE_REJECTED = 12; // Indicates that the system got the security exception when handling external // source detected callback. EXTERNAL_SOURCE_DETECT_SECURITY_EXCEPTION = 13; // Indicates that the callback onStatusReported was not invoked successfully. CALLBACK_ON_STATUS_REPORTED_EXCEPTION = 14; // Indicates that the callback onError was not invoked successfully. CALLBACK_ON_ERROR_EXCEPTION = 15; // Indicates that the callback onRejected was not invoked successfully. CALLBACK_ON_REJECTED_EXCEPTION = 16; // Indicates that the callback onDetected was not invoked successfully. CALLBACK_ON_DETECTED_EXCEPTION = 17; // Indicates that the callback onProcessRestarted was not invoked successfully. CALLBACK_ON_PROCESS_RESTARTED_EXCEPTION = 18; // Indicates that the updateState was not invoked successfully. CALL_UPDATE_STATE_EXCEPTION = 19; // Indicates that the audio egress starts. AUDIO_EGRESS_START = 20; // Indicates that the audio egress ends. AUDIO_EGRESS_END = 21; // Indicates that the audio egress got interrupted exception. AUDIO_EGRESS_INTERRUPTED_EXCEPTION = 22; // Indicates that the client is not granted permission to access audio // egress. AUDIO_EGRESS_NO_PERMISSION = 23; // Indicates that the client is inactive over a period of time. AUDIO_EGRESS_INACTIVE_CLIENT = 24; // Indicates that the HotwordDetectionService is inactive over a period // of time. AUDIO_EGRESS_INACTIVE_HOTWORD_DETECTION_SERVICE = 25; // Indicates that the list of audio stream is empty. AUDIO_EGRESS_EMPTY_AUDIO_STREAM_LIST = 26; // Indicates that there is no data from the system audio stream. AUDIO_EGRESS_SOURCE_IS_EMPTY = 27; // Indicates that the copy buffer size the client sets is illegal. AUDIO_EGRESS_ILLEGAL_COPY_BUFFER_SIZE = 28; // Indicates that the audio egress is closed with error from the system. AUDIO_EGRESS_CLOSE_ERROR_FROM_SYSTEM = 29; // Indicates that the audio egress is closed with error from the client // side. AUDIO_EGRESS_CLOSE_ERROR_FROM_CLIENT = 30; // Indicates that the audio egress is closed with error from the // HotwordDetectionService. AUDIO_EGRESS_CLOSE_ERROR_FROM_HOTWORD_DETECTION_SERVICE = 31; } optional Event event = 2; // The UID for which assistant application is active. optional int32 uid = 3 [(is_uid) = true]; } /** * Log the duration of executing all receivers of LOCKED_BOOT_COMPLETED or BOOT_COMPLETED broadcast. * The dispatch latency is the dispatchTime - enqueueTime. * The completion latency is the completeTime - enqueueTime. * Logged from: * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java */ message BootCompletedBroadcastCompletionLatencyReported { enum Event { UNKNOWN = 0; LOCKED_BOOT_COMPLETED = 1; BOOT_COMPLETED = 2; } optional Event event = 1; // from enqueueTime to dispatchTime. optional int32 dispatch_latency_uptime_millis = 2; // from enqueueTime to completeTime. optional int32 complete_latency_uptime_millis = 3; // from enqueueRealTime to dispatchRealTime. optional int32 dispatch_latency_realtime_millis = 4; // from enqueueRealTime to completeRealTime. optional int32 complete_latency_realtime_millis = 5; optional int32 user_id = 6; optional UserLifecycleJourneyReported.UserType user_type = 7; } /** * Logs information about app background restrictions. * * Logged from: * frameworks/base/services/core/java/com/android/server/am/AppRestrictionController.java */ message AppBackgroundRestrictionsInfo { // the uid of the app. optional int32 uid = 1 [(is_uid) = true]; enum RestrictionLevel { LEVEL_UNKNOWN = 0; LEVEL_UNRESTRICTED = 1; LEVEL_EXEMPTED = 2; LEVEL_ADAPTIVE_BUCKET = 3; LEVEL_RESTRICTED_BUCKET = 4; LEVEL_BACKGROUND_RESTRICTED = 5; LEVEL_HIBERNATION = 6; } // indicates the app background restriction level. optional RestrictionLevel restriction_level = 2; enum Threshold { THRESHOLD_UNKNOWN = 0; THRESHOLD_RESTRICTED = 1; // app was background restricted by the system. THRESHOLD_USER = 2; // app was background restricted by user action. } // indicates which threshold caused the app to be put into bg restriction. optional Threshold threshold = 3; enum StateTracker { UNKNOWN_TRACKER = 0; BATTERY_TRACKER = 1; BATTERY_EXEMPTION_TRACKER = 2; FGS_TRACKER = 3; MEDIA_SESSION_TRACKER = 4; PERMISSION_TRACKER = 5; BROADCAST_EVENTS_TRACKER = 6; BIND_SERVICE_EVENTS_TRACKER = 7; } // indicates the reason/tracker which caused the app to hit the threshold. optional StateTracker tracker = 4; message FgsTrackerInfo { // indicates whether an fgs notification was visible for this app or not. optional bool fgs_notification_visible = 1; // total FGS duration for this app. optional int64 fgs_duration = 2; } optional FgsTrackerInfo fgs_tracker_info = 5 [(log_mode) = MODE_BYTES]; message BatteryTrackerInfo { // total battery usage within last 24h (1/10000th) optional int32 battery_24h = 1; // background battery usage (1/10000th) optional int32 battery_usage_background = 2; // FGS battery usage (1/10000th) optional int32 battery_usage_fgs = 3; // Foreground battery usage (1/10000th) optional int32 battery_usage_foreground = 4; // Cached battery usage (1/10000th) optional int32 battery_usage_cached = 5; } optional BatteryTrackerInfo battery_tracker_info = 6 [(log_mode) = MODE_BYTES]; message BroadcastEventsTrackerInfo { // the number of broadcasts sent by this app. optional int32 broadcasts_sent = 1; } optional BroadcastEventsTrackerInfo broadcast_events_tracker_info = 7 [(log_mode) = MODE_BYTES]; message BindServiceEventsTrackerInfo { // the number of bind service requests by this app. optional int32 bind_service_requests = 1; } optional BindServiceEventsTrackerInfo bind_service_events_tracker_info = 8 [(log_mode) = MODE_BYTES]; // The reasons listed below are defined in PowerExemptionManager.java enum ExemptionReason { // range 0-9 is reserved for default reasons REASON_UNKNOWN = 0; REASON_DENIED = 1; REASON_OTHER = 2; // range 10-49 is reserved for BG-FGS-launch allowed proc states REASON_PROC_STATE_PERSISTENT = 10; REASON_PROC_STATE_PERSISTENT_UI = 11; REASON_PROC_STATE_TOP = 12; REASON_PROC_STATE_BTOP = 13; REASON_PROC_STATE_FGS = 14; REASON_PROC_STATE_BFGS = 15; // range 50-99 is reserved for BG-FGS-launch allowed reasons REASON_UID_VISIBLE = 50; REASON_SYSTEM_UID = 51; REASON_ACTIVITY_STARTER = 52; REASON_START_ACTIVITY_FLAG = 53; REASON_FGS_BINDING = 54; REASON_DEVICE_OWNER = 55; REASON_PROFILE_OWNER = 56; REASON_COMPANION_DEVICE_MANAGER = 57; REASON_BACKGROUND_ACTIVITY_PERMISSION = 58; REASON_BACKGROUND_FGS_PERMISSION = 59; REASON_INSTR_BACKGROUND_ACTIVITY_PERMISSION = 60; REASON_INSTR_BACKGROUND_FGS_PERMISSION = 61; REASON_SYSTEM_ALERT_WINDOW_PERMISSION = 62; REASON_DEVICE_DEMO_MODE = 63; REASON_ALLOWLISTED_PACKAGE = 65; REASON_APPOP = 66; REASON_ACTIVITY_VISIBILITY_GRACE_PERIOD = 67; REASON_OP_ACTIVATE_VPN = 68; REASON_OP_ACTIVATE_PLATFORM_VPN = 69; REASON_TEMP_ALLOWED_WHILE_IN_USE = 70; REASON_CURRENT_INPUT_METHOD = 71; // range 100-199 is reserved for public reasons REASON_GEOFENCING = 100; REASON_PUSH_MESSAGING = 101; REASON_PUSH_MESSAGING_OVER_QUOTA = 102; REASON_ACTIVITY_RECOGNITION = 103; REASON_ACCOUNT_TRANSFER = 104; // range 200-299 is reserved for broadcast actions REASON_BOOT_COMPLETED = 200; REASON_PRE_BOOT_COMPLETED = 201; REASON_LOCKED_BOOT_COMPLETED = 202; REASON_BLUETOOTH_BROADCAST = 203; REASON_TIMEZONE_CHANGED = 204; REASON_TIME_CHANGED = 205; REASON_LOCALE_CHANGED = 206; REASON_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED = 207; REASON_REFRESH_SAFETY_SOURCES = 208; // range 300-399 is reserved for other internal reasons REASON_SYSTEM_ALLOW_LISTED = 300; REASON_ALARM_MANAGER_ALARM_CLOCK = 301; REASON_ALARM_MANAGER_WHILE_IDLE = 302; REASON_SERVICE_LAUNCH = 303; REASON_KEY_CHAIN = 304; REASON_PACKAGE_VERIFIER = 305; REASON_SYNC_MANAGER = 306; REASON_DOMAIN_VERIFICATION_V1 = 307; REASON_DOMAIN_VERIFICATION_V2 = 308; REASON_VPN = 309; REASON_NOTIFICATION_SERVICE = 310; REASON_PACKAGE_REPLACED = 311; REASON_LOCATION_PROVIDER = 312; REASON_MEDIA_BUTTON = 313; REASON_EVENT_SMS = 314; REASON_EVENT_MMS = 315; REASON_SHELL = 316; REASON_MEDIA_SESSION_CALLBACK = 317; REASON_ROLE_DIALER = 318; REASON_ROLE_EMERGENCY = 319; REASON_SYSTEM_MODULE = 320; REASON_CARRIER_PRIVILEGED_APP = 321; REASON_DPO_PROTECTED_APP = 322; REASON_DISALLOW_APPS_CONTROL = 323; REASON_ACTIVE_DEVICE_ADMIN = 324; // app requested to be exempt REASON_OPT_OUT_REQUESTED = 1000; } // indicates if the app is exempt from background restrictions and the reason if applicable. optional ExemptionReason exemption_reason = 9; enum OptimizationLevel { UNKNOWN = 0; OPTIMIZED = 1; BACKGROUND_RESTRICTED = 2; NOT_OPTIMIZED = 3; } // the user choice for the optimization level of the app. optional OptimizationLevel opt_level = 10; enum TargetSdk { SDK_UNKNOWN = 0; SDK_PRE_S = 1; SDK_S = 2; SDK_T = 3; } // indicates the target sdk level for this app. optional TargetSdk target_sdk = 11; // indicates if the current device is a low ram device. optional bool low_mem_device = 12; // indicates previous background restriction level. optional RestrictionLevel previous_restriction_level = 13; } /** * Log that the permission reminder notification has been displayed or clicked. */ message PermissionReminderNotificationInteracted { // id which identifies single session of user interacting with permission // controller optional int64 session_id = 1; enum Result { UNDEFINED = 0; // notification was presented to the user NOTIFICATION_PRESENTED = 1; // notification was clicked by the user NOTIFICATION_CLICKED = 2; } // View / interaction recorded optional Result result = 2; } /** * Log that the user has interacted with the permission decision screen. */ message RecentPermissionDecisionsInteracted { // id which identifies single session of user interacting with permission // controller optional int64 session_id = 1; enum Action { ACTION_UNKNOWN = 0; SCREEN_VIEWED = 1; REVIEW_DECISION = 2; VIEW_ALL_CLICKED = 3; } // Action taken on the recent permission decisions page. optional Action action = 2; // Uid of the package for the permission decision being reviewed optional int32 uid = 3 [(is_uid) = true]; // Name of the permission for the permission decision being reviewed. optional string permission_group_name = 4; } /** * Logs failure reason when MmsSmsProvider#getThreadId fails to return a threadId */ message MmsSmsProviderGetThreadIdFailed { enum FailureCode { FAILURE_UNKNOWN = 0; // Did not return a threadId due to recipients being passed in FAILURE_NO_RECIPIENTS = 1; FAILURE_FIND_OR_CREATE_THREAD_ID_SQL = 2; // Found more than one threadId for the given of recipients FAILURE_MULTIPLE_THREAD_IDS_FOUND = 3; } optional FailureCode failure_code = 1; } /** * Logs failure reason when MmsSmsDatabaseHelperOnUpgradeFailed fails on an upgrade step */ message MmsSmsDatabaseHelperOnUpgradeFailed { enum FailureCode { FAILURE_UNKNOWN = 0; FAILURE_IO_EXCEPTION = 1; FAILURE_SECURITY_EXCEPTION = 2; FAILURE_SQL_EXCEPTION = 3; } // Database version being upgraded from optional int32 old_version = 1; // Database version being upgraded to optional int32 current_version = 2; // Version number of the database upgrade step that failed optional int32 upgrade_failed_to_version = 3; optional FailureCode failure_code = 4; } /** * Logs for task manager events * * Logged from SystemUI */ message TaskManagerEventReported { enum Event { VIEWED = 1; STOPPED = 2; } optional int32 uid = 1 [(is_uid) = true]; optional Event event = 2; optional int64 time_running_ms = 3; } /** Log for autofill events. This captures events till the view goes out of * focus. For each auttofilled view going out of focus, and coming back, a * separate event would be generated. * * Logged from: * frameworks/base/services/autofill/java/com/android/server/autofill/ */ message AutofillPresentationEventReported { enum PresentationEventResult { NONE_SHOWN_UNKNOWN_REASON = 0; // Includes reasons where losses can be partial: eg: IME not showing // certain datasets, while others are filtered out because user // started typing. So, it can either refer to a set of mixed of // known or unknown reasons. ANY_SHOWN = 1; // This is counter to the event name, but we need it in order to get // overall success rate. // Below ones corresponds to no presentation getting shown NONE_SHOWN_VIEW_FOCUS_CHANGED = 2; // User action leads to focus getting shifted to another field NONE_SHOWN_VIEW_CHANGED = 3; // This would also include if view becomes invisible. NONE_SHOWN_ACTIVITY_FINISHED = 4; // Eg: User pressed back NONE_SHOWN_REQUEST_TIMEOUT = 5; // Autofill provider didn't respond in the given time. NONE_SHOWN_SESSION_COMMITTED_PREMATURELY = 6; // Session was prematurely committed. This can happen due to various // reasons, eg: app developers calling commit() earlier than when // they should. NONE_SHOWN_FILL_REQUEST_FAILED = 7; // Autofill provider request failed. Different from timeout. NONE_SHOWN_NO_FOCUS = 8; // Autofill provider request was triggered pre-focus. User never // focussed on autofillable fields. This can happen for FillDialog // where we trigger fill request at layout time. } // Id number which increases for each subsequent request. optional int32 request_id = 1; // SessionId to aggregate requests within a session, and see overall // performance. optional int32 session_id = 2; // Result of autofill event. optional PresentationEventResult presentation_event_result = 3; // Count of datasets that should've been available for display. If the request // times out, this won't be populated. optional int32 available_count = 4; // Count of datasets that are shown to the user. optional int32 count_shown = 5; // Count of datasets that are eligible to be shown to the user, but aren't // shown because user started typing already, and the results were filtered. // If the user starts typing, dataset isn't shown at the moment, but then the // user deletes text, and the dataset becomes visible, it would count as // shown, and not as filtered out. optional int32 count_filtered_user_typing = 6; // Count of datasets that aren't shown because IME didn't use datasets at all. optional int32 count_not_shown_unused_by_ime = 7; // Count of datasets that are eligible to be shown to the user, but aren't // shown because display didn't show them (probably user didn't scroll to see // the view). The dataset was requested by display, but not shown. optional int32 count_not_shown_never_visible = 8; // How the dataset is supposed to be shown to the user optional AutofillDisplayPresentationType display_presentation_type = 9; // Autofill Service Provider's uid optional int32 autofill_service_uid = 10 [(is_uid) = true]; // Inline suggestion host's uid. Populated only when // AutofillDisplayPresentationType = INLINE optional int32 inline_suggestion_host_uid = 11 [(is_uid) = true]; // Whether a new request was triggered or alternatively served from cached // response. optional bool is_request_triggered = 12; // Timestamps are in milliseconds, relative to when the Session was created // For example, if timestamp has a value = 100, the event was triggered // 100ms after the session was created. // Since these are relative to Session creation, you can subtract events to // get the latency duration between events. // t1 = 100 // t2 = 300 // duration = t2 - t1 = 200ms // ------------------------------------------------------------------------ // Timestamp of when FillRequest is sent to Autofill provider // This is also the latency of when a field is focused to Framework sending a FillRequest optional int32 fill_request_sent_timestamp_ms = 13; // Timestamp of when Autofill provider returns a FillResponse // The latency of the Autofill provider IPC can be calculated // by fillResponseReceivedTimestampMs - fillRequestSentTimestampMs optional int32 fill_response_received_timestamp_ms = 14; // Timestamp of when FillResponse is sent to the IME/Dropdown handler/Fill Dialog UI // The latency of processing provider FillResponse to when suggestions are sent to be rendered // can be calculated by suggestionSentTimestampMs - fillResponseReceivedTimestampMs optional int32 suggestion_sent_timestamp_ms = 15; // Timestamp of when the suggestion is shown // The latency of showing suggestions can be calculated by // suggestionPresentedTimestampMs - suggestionSentTimestampMs optional int32 suggestion_presented_timestamp_ms = 16; } // Tells how Autofill dataset was/will-be displayed. enum AutofillDisplayPresentationType { UNKNOWN_AUTOFILL_DISPLAY_PRESENTATION_TYPE = 0; MENU = 1; // aka drop-down INLINE = 2; // shown via IME DIALOG = 3; // aka Bottom-sheet dialog } /** * Logs when text and reading options changed. * * Logged from: * packages/apps/Settings/src/com/android/settings/accessibility */ message AccessibilityTextReadingOptionsChanged { // The item name of the accessibility feature "Text and Reading Options". optional android.stats.accessibility.TextReadingOption name = 1; // The status value of the item of the accessibility feature "Text and Reading Options". optional int32 value = 2; // The entry point from which page. optional android.stats.accessibility.TextReadingEntry entry_point = 3; } /** Log the CompanionDeviceManager associations are created by various device * profiles * * Logged from: * frameworks/base/services/companion/java/com/android/server/companion/ * CompanionDeviceManagerService.java */ message CdmAssociationAction { enum Action { UNKNOWN = 0; CREATED = 1; REMOVED = 2; } enum DeviceProfile{ DEVICE_PROFILE_NULL = 0; DEVICE_PROFILE_WATCH = 1; DEVICE_PROFILE_APP_STREAMING = 2; DEVICE_PROFILE_AUTO_PROJECTION = 3; DEVICE_PROFILE_COMPUTER = 4; } // Action taken on the CDM association been created by companion apps. optional Action action = 1; // Name of the CDM Association Request profiles. optional DeviceProfile device_profile = 2; } /** * Logs when a telephony anomaly is reported. * * Logged from: * frameworks/base/telephony/java/android/telephony/AnomalyReporter.java */ message TelephonyAnomalyDetected { // Carrier ID of the SIM card. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 1; // UUID of the anomaly, as generated by android.telephony.AnomalyReporter optional int64 event_id_lsb = 2; optional int64 event_id_msb = 3; } /** * Logs information about sync exemptions when they occur. * * Logged from: * frameworks/base/services/core/java/com/android/server/content/ContentService.java */ message SyncExemptionOccurred { optional int32 uid = 1 [(is_uid) = true]; // the uid of the app. enum ProcState { UNKNOWN = 0; PERSISTENT = 1; PERSISTENT_UI = 2; TOP = 3; BOUND_TOP = 4; FOREGROUND_SERVICE = 5; BOUND_FOREGROUND_SERVICE = 6; IMPORTANT_FOREGROUND = 7; IMPORTANT_BACKGROUND = 8; TRANSIENT_BACKGROUND = 9; BACKUP = 10; SERVICE = 11; RECEIVER = 12; TOP_SLEEPING = 13; HEAVY_WEIGHT = 14; HOME = 15; LAST_ACTIVITY = 16; CACHED_ACTIVITY = 17; CACHED_ACTIVITY_CLIENT = 18; CACHED_RECENT = 19; CACHED_EMPTY = 20; } optional ProcState proc_state = 2; // the proc state of the app when the exemption occurred. optional bool is_uid_active = 3; // was the uid active when the exemption occurred. optional AppBackgroundRestrictionsInfo.RestrictionLevel restriction_level = 4; } // Logs when the remote key provisioner application is invoked, either // due to a periodically scheduled job, due to an attestation key being // consumed from the pool, or when the system has detected that it's // completely out of attestation keys. // // Logged from: // packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/ message RemoteKeyProvisioningAttempt { // The reason for the provisioning attempt. enum Cause { CAUSE_UNKNOWN = 0; SCHEDULED = 1; // A scheduled job issued the request KEY_CONSUMED = 2; // A provisioned key was consumed from the pool OUT_OF_KEYS = 3; // The system is out of keys } optional Cause cause = 1; // The name of the remotely provisioned component for whom keys are being // generated and certified. The string value is determined by the vendor, // and is fixed for the lifetime of the device. The number of unique string // values on a given device is determined by how many remotely provisioned // component HALs are on a given device. Typically, this is 2-3 HALs. optional string remotely_provisioned_component = 2; // The uptime of the device, organized into time ranges of interest. enum UpTime { UPTIME_UNKNOWN = 0; LESS_THAN_5_MINUTES = 1; BETWEEN_5_AND_60_MINUTES = 2; MORE_THAN_60_MINUTES = 3; } optional UpTime uptime = 3; // The state of remote provisioning enablement enum Enablement { ENABLEMENT_UNKNOWN = 0; ENABLED_WITH_FALLBACK = 1; ENABLED_RKP_ONLY = 2; DISABLED = 3; } optional Enablement enablement = 4; // If the key pool is completely exhausted, this is set to true. Typically, // we do not expect to see a pool with no spare keys available. optional bool is_key_pool_empty = 5; // Indicates success or failure of the provisioning attempt. optional com.android.remoteprovisioner.RemoteKeyProvisioningStatus status = 6; } // Logs that correlate remote key provisioning status with the active // network for the given provisioning attempt. // // Logged from: // packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/ message RemoteKeyProvisioningNetworkInfo { // The network transport, according ConnectivityManager::getActiveNetwork(). optional android.stats.connectivity.TransportType transport_type = 1; // Indicates success or failure of the provisioning attempt. optional com.android.remoteprovisioner.RemoteKeyProvisioningStatus status = 2; // If an HTTP error was received, this contains the code. Else, contains 200. optional int32 http_status_error = 3; } // Logs indicating timing data to understand how long the remote provisioner is // taking to perform various sub-tasks. This is intended to be used with KLL metrics. // // Logged from: // packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/ message RemoteKeyProvisioningTiming { // Time spent waiting on the RKP service to reply. optional int32 server_wait_millis = 1; // Time spent waiting on internal binder calls to the provisioning service. optional int32 binder_wait_millis = 2; // Time spent waiting on the serialization lock. optional int32 lock_wait_millis = 3; // Total time spent processing the attempt. optional int32 total_processing_time = 4; // The network transport, according ConnectivityManager::getActiveNetwork(). optional android.stats.connectivity.TransportType transport_type = 5; // The name of the remotely provisioned component for whom keys are being // generated and certified. The string value is determined by the vendor, // and is fixed for the lifetime of the device. The number of unique string // values on a given device is determined by how many remotely provisioned // component HALs are on a given device. Typically, this is 2-3 HALs. optional string remotely_provisioned_component = 6; } // Counters that track how many errors we're seeing on the device for the // given boot. // // Logged from: // packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/ message RemoteKeyProvisioningErrorCounts { // The total number of RKP attempts there have been this boot. optional int32 total_count = 1; // How many errors this device has encountered this boot. optional int32 error_count = 2; // How many bytes of data have been sent that resulted in errors. These // bytes count against an error budget, so it's important to track. optional int32 error_bytes = 3; } /* * Pushed atom logged by ONS service. */ message OnsOpportunisticEsimProvisioningComplete { enum ResultCode { // Unknown RESULT_UNKNOWN = 0; // Operation was successful. RESULT_SUCCESS = 1; // Device capabilities not met such as eSIM and MultiSIM not supported. RESULT_DEVICE_NOT_CAPABLE = 2; // Internet connection is not available while trying to download opportunistic eSIM. RESULT_INTERNET_NOT_AVAILABLE = 3; // Error occurred while switching device from Single to MultiSIM mode. RESULT_SWITCH_TO_MULTISIM_FAILED = 4; // Connection error occurred while downloading opportunistic eSIM from SMDP server. RESULT_CONNECTION_ERROR = 5; // Download failed because there is no sufficient storage available in eUICC memory. RESULT_MEMORY_FULL = 6; // Installation of downloaded eSIM failed. RESULT_INSTALL_ESIM_PROFILE_FAILED = 7; // Unresolvable errors such as Invalid SMDP address or activation code. RESULT_UNRESOLVABLE_ERROR = 8; // Auto provisioning disabled RESULT_AUTO_PROVISIONING_DISABLED = 9; // eSIM provisioning failed RESULT_ESIM_PROVISIONING_FAILED = 10; } // CBRS carrier id. Filled only while reporting failure cases. optional int32 carrier_id = 1; // carrier id of the opportunistic eSIM downloaded from the SMDP server. // Filled only while reporting failure cases. optional int32 opportunistic_esim_carrier_id = 2; // Flag to indicate that the data connection was used for downloading. optional bool is_mobile_data_used = 3; // Error code occurred during the above operation. optional ResultCode error_code = 4; // Retry count of the above operation. optional int32 retry_count = 5; // Detailed error code. optional int32 detailed_error_code = 6; } /** * Logs when a background dexopt job is ended. * * Logged from: * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java */ message BackgroundDexoptJobEnded { // Corresponds to `BackgroundDexOptService.Status`, except for // `STATUS_JOB_FINISHED`. enum Status { STATUS_UNKNOWN = 0; // The job has finished. This value is used even if some packages have // failed compilation during the job. (Corresponds to either // `BackgroundDexOptService.Status.STATUS_OK` or // `BackgroundDexOptService.Status.STATUS_DEX_OPT_FAILED`.) STATUS_JOB_FINISHED = 1; STATUS_ABORT_BY_CANCELLATION = 2; STATUS_ABORT_NO_SPACE_LEFT = 3; STATUS_ABORT_THERMAL = 4; STATUS_ABORT_BATTERY = 5; } optional Status status = 1; // If `status` is `STATUS_ABORT_BY_CANCELLATION`, the reason of the // cancellation. optional android.app.job.StopReasonEnum cancellation_reason = 2; // The duration of the job run, in milliseconds, not counting time spent in // sleep. optional int64 duration_ms = 3; // The duration of the job run, in milliseconds, including time spent in // sleep. optional int64 duration_including_sleep_ms = 4; } /** * Pulls information for a single incoming MMS. * * Each pull creates multiple atoms, one for each MMS. * The sequence is randomized when pulled. * * Pulled from: * packages/services/Mms/src/com/android/mms/service/metrics/MmsMetricsCollector.java */ message IncomingMms { // Radio access technology (RAT) used for downloading the MMS. // It can be IWLAN in case of IMS. // RAT is logged at the end of the download. optional android.telephony.NetworkTypeEnum rat = 1; // Indicate a specific result handling the MMS. optional android.mms.MmsResultEnum result = 2; // Roaming type when MMS was received. optional android.telephony.RoamingTypeEnum roaming = 3; // Index of the SIM used, 0 for single-SIM devices. optional int32 sim_slot_index = 4; // Whether the device was in multi-SIM mode (with multiple active SIM profiles). optional bool is_multi_sim = 5; // Whether the MMS was received with an eSIM profile. optional bool is_esim = 6; // Carrier ID of the SIM card used for the MMS. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 7; // Average time in milliseconds to download MMS from the network. optional int64 avg_interval_millis = 8; // Total number of MMS having same configuration. optional int64 mms_count = 9; // Retry count: 0 for the first attempt and then increasing for each attempt. optional int32 retry_id = 10; // Whether MmsService or carrier app downloaded the MMS from the network. optional bool handled_by_carrier_app = 11; } /** * Pulls information for a single outgoing MMS. * * Each pull creates multiple atoms, one for each MMS. * The sequence is randomized when pulled. * * Pulled from: * packages/services/Mms/src/com/android/mms/service/metrics/MmsMetricsCollector.java */ message OutgoingMms { // Radio access technology (RAT) used for uploading the MMS. // It can be IWLAN in case of IMS. // RAT is logged at the end of the upload. optional android.telephony.NetworkTypeEnum rat = 1; // Indicate a specific result handling the MMS. optional android.mms.MmsResultEnum result = 2; // Roaming type when MMS was received. optional android.telephony.RoamingTypeEnum roaming = 3; // Index of the SIM used, 0 for single-SIM devices. optional int32 sim_slot_index = 4; // Whether the device was in multi-SIM mode (with multiple active SIM profiles). optional bool is_multi_sim = 5; // Whether the MMS was sent with an eSIM profile. optional bool is_esim = 6; // Carrier ID of the SIM card used for the MMS. // See https://source.android.com/devices/tech/config/carrierid. optional int32 carrier_id = 7; // Average time in milliseconds to download MMS from the network. optional int64 avg_interval_millis = 8; // Total number of MMS having same configuration. optional int64 mms_count = 9; // Whether the default MMS application sent the MMS (regardless of which application). optional bool is_from_default_app = 10; // Retry count: 0 for the first attempt and then increasing for each attempt. optional int32 retry_id = 11; // Whether MmsService or carrier app uploaded the MMS to the network. optional bool handled_by_carrier_app = 12; } // Logs Display Brightness change events. message DisplayBrightnessChanged { enum Reason { REASON_UNKNOWN = 0; REASON_MANUAL = 1; } // Display brightness before the brightness event, in nits. optional float initial_nits = 1; // Display brightness after the brightness event, in nits. optional float end_nits = 2; // Estimated ambient light, in lux. optional float lux = 3; // Physical display id, with format $ADAPTER_PREFIX:$ID, in this case // "local:$PHYSICAL_ID". optional string physical_display_id = 4; // Whether the short term model was active at the time of the event. optional bool short_term_model_active = 5; // The factor to adjust the screen brightness in low power mode in the range // 0 (screen off) to 1 (no change). // If not applied, this is set to -1. optional float power_brightness_factor = 6; // The level of Reduce Bright Colors (RBC) intensity, the range is [0, 100]. // If RBC is not enabled, this is set to -1; optional int32 reduce_bright_colors_strength = 7; // Max nits value when High Brightness Mode (HBM) is enabled. // If HBM is not enabled, this is set to -1; optional float hbm_current_max = 8; // Thermal throttling cap. // If thermal throttling not enabled, this is -1. optional float thermal_throttling_cap = 9; // Whether adaptive brightness is enabled. optional bool adaptive_brightness_enabled = 10; // Reason that triggered the brightness event to occur. optional Reason reason = 11; } /** * Logs information when a hearing aid is bonded * * Logged from: * frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/ * CachedBluetoothDevice.java */ message HearingAidInfoReported { // The device mode of the bonded hearing aid // Mode definition for hearing aids. See {@link BluetoothHearingAid}. enum DeviceMode { MODE_UNKNOWN = -1; MONAURAL = 0; BINAURAL = 1; } optional DeviceMode device_mode = 1; // The device side of the bonded hearing aid // Side definition for hearing aids. See {@link BluetoothHearingAid}. enum DeviceSide { SIDE_UNKNOWN = -1; LEFT = 0; RIGHT = 1; } optional DeviceSide device_side = 2; // The entry page id where the bonding process starts enum BondEntry { PAGE_UNKNOWN = -1; CONNECTED_DEVICES = 0; ACCESSIBILITY_HEARING_AIDS = 1; ACCESSIBILITY_HEARING_AID_PAIR_ANOTHER = 2; BLUETOOTH = 3; } optional BondEntry bond_entry = 3; } // Logs daily ambient brightness stats. message AmbientBrightnessStatsReported { // How much time was spent in each of the buckets, in seconds. repeated float bucket_size_seconds = 1; // Ambient brightness values for creating bucket boundaries from. repeated float bucket_boundary_lux = 2; } /** * Logs the Brightness Configuration pushed by the long term model. The Brightness Configuration is * expressed as a curve where each point is a pair of ambient light (lux) and the corresponding * screen brightness (nits). * * Logged from: * frameworks/base/services/core/java/com/android/server/display/DisplayManagerService.java */ message BrightnessConfigurationUpdated { // Array of ambient light values (in lux) to define the configuration. repeated float lux = 1; // Array of screen brightness values (in nits) corresponding to the lux // values above. repeated float nits = 2; // Physical display id, with format $ADAPTER_PREFIX:$ID, in this case // "local:$PHYSICAL_ID". optional string physical_display_id = 3; } /** * Logs when Iwlan responds the setup data call request. * * Logged from: * packages/services/Iwlan/src/com/google/android/iwlan/IwlanDataService.java */ message IwlanSetupDataCallResultReported { enum IwlanError { NO_ERROR = 0; IKE_PROTOCOL_EXCEPTION = 1; IKE_INTERNAL_IO_EXCEPTION = 2; IKE_GENERIC_EXCEPTION = 3; EPDG_SELECTOR_SERVER_SELECTION_FAILED = 4; TUNNEL_TRANSFORM_FAILED = 5; SIM_NOT_READY_EXCEPTION = 6; NETWORK_FAILURE = 7; UNKNOWN_EXCEPTION = 8; } // Setup data call apn type // See go/apntypedefinition optional int32 apn_type = 1; // Is the request for handover optional bool is_handover = 2; // ePDG server address optional string epdg_server_address = 3; // If the request type is handover, record the source network type // See // frameworks/base/telephony/java/android/telephony/TelephonyManager.java optional int32 source_rat = 4; // If the request type is handover, record the source network roaming status optional bool is_cellular_roaming = 5; // Is network connected optional bool is_network_connected = 6; // Default network transport type // See // packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java optional int32 transport_type = 7; // Setup result optional int32 setup_request_result = 8; // Iwlan error code if setup failed optional IwlanError iwlan_error = 9; // Data call fail cause // See // frameworks/base/telephony/java/android/telephony/DataFailCause.java optional int32 data_call_fail_cause = 10; // Setup request processing duration optional int32 processing_duration_millis = 11; // Time for doing ePDG server selection through DNS query of FQDNs optional int32 epdg_server_selection_duration_millis = 12; // Time for establishing IKE tunnel optional int32 ike_tunnel_establishment_duration_millis = 13; // Tunnel State // See // packages/services/Iwlan/src/com/google/android/iwlan/IwlanDataService.java optional int32 tunnel_state = 14; // Handover failure mode // See // frameworks/base/telephony/java/android/telephony/data/DataCallResponse.java optional int32 handover_failure_mode = 15; // Retry duration optional int32 retry_duration_millis = 16; // Iwlan error wrapped exception classname optional string iwlan_error_wrapped_classname = 17; // Iwlan error wrapped exception 1st line of stack trace optional string iwlan_error_wrapped_stack_first_frame = 18; } /** * Logs when Iwlan reports IWLAN PDN disconnected without deactivation request. * * Logged from: * packages/services/Iwlan/src/com/google/android/iwlan/IwlanDataService.java */ message IwlanPdnDisconnectedReasonReported { // Disconnection cause // See // frameworks/base/telephony/java/android/telephony/DataFailCause.java optional int32 cause = 1; // Is network connected optional bool is_network_connected = 2; // default network transport type // See // packages/services/Iwlan/src/com/google/android/iwlan/IwlanDataService.java optional int32 transport_type = 3; // Wifi signal level optional int32 wifi_signal_level = 4; } /** * Logs information related to audio egress in hotword. */ message HotwordAudioEgressEventReported { // The type of detector. optional android.hotword.HotwordDetectorType detector_type = 1; // The type of event. enum Event { // UNKNOWN value. UNKNOWN = 0; // Indicates that the audio egress started. STARTED = 1; // Indicates that the audio egress ended. ENDED = 2; // Indicates that the audio egress got interrupted exception. INTERRUPTED_EXCEPTION = 3; // Indicates that the client is not granted permission to access audio egress. NO_PERMISSION = 4; // Indicates that the client is inactive over a period of time. INACTIVE_CLIENT = 5; // Indicates that the HotwordDetectionService is inactive over a period // of time. INACTIVE_HOTWORD_DETECTION_SERVICE = 6; // Indicates that the list of audio stream is empty. EMPTY_AUDIO_STREAM_LIST = 7; // Indicates that there is no data from the system audio stream. SOURCE_IS_EMPTY = 8; // Indicates that the copy buffer size the client sets is illegal. ILLEGAL_COPY_BUFFER_SIZE = 9; // Indicates that the audio egress is closed with error from the system. CLOSE_ERROR_FROM_SYSTEM = 10; // Indicates that the audio egress is closed with error from the client side. CLOSE_ERROR_FROM_CLIENT = 11; // Indicates that the audio egress is closed with error from the // HotwordDetectionService. CLOSE_ERROR_FROM_HOTWORD_DETECTION_SERVICE = 12; } optional Event event = 2; // The UID for which the assistant application is active. optional int32 uid = 3 [(is_uid) = true]; // The number of bytes egressed in audio stream optional int32 egressed_stream_size_bytes = 4; // The number of bytes egressed in metadata bundle optional int32 egressed_metadata_bundle_size_bytes = 5; // The count of audio streams optional int32 stream_count = 6; } /** * Logs information related to Android Dynamic Performance Framework (ADPF). */ message PerformanceHintSessionReported { // UID of the package. optional int32 package_uid = 1 [(is_uid) = true]; // Unique ID of the hint session. optional int64 session_id = 2; // Hint session target duration, in nanoseconds. optional int64 target_duration_ns = 3; // Number of threads affected by this session optional int32 tid_count = 4; } message ADPFSystemComponentInfo { // True if SurfaceFlinger CPU hint is enabled on the device. optional bool surfaceflinger_cpu_hint_enabled = 1; // True if HWUI hint is enabled on the device. optional bool hwui_hint_enabled = 2; }