blob: cca6299b74b88cb38a4348b08518fa59defd2960 [file] [log] [blame]
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto2";
package android.os.statsd;
option java_package = "com.android.os";
option java_outer_classname = "AtomsProto";
import "frameworks/base/cmds/statsd/src/atom_field_options.proto";
import "frameworks/base/core/proto/android/app/enums.proto";
import "frameworks/base/core/proto/android/app/job/enums.proto";
import "frameworks/base/core/proto/android/app/settings_enums.proto";
import "frameworks/base/core/proto/android/app/media_output_enum.proto";
import "frameworks/base/core/proto/android/app/tvsettings_enums.proto";
import "frameworks/base/core/proto/android/bluetooth/a2dp/enums.proto";
import "frameworks/base/core/proto/android/bluetooth/enums.proto";
import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto";
import "frameworks/base/core/proto/android/bluetooth/hfp/enums.proto";
import "frameworks/base/core/proto/android/bluetooth/smp/enums.proto";
import "frameworks/base/core/proto/android/debug/enums.proto";
import "frameworks/base/core/proto/android/hardware/biometrics/enums.proto";
import "frameworks/base/core/proto/android/hardware/sensor/assist/enums.proto";
import "frameworks/base/core/proto/android/net/networkcapabilities.proto";
import "frameworks/base/core/proto/android/os/enums.proto";
import "frameworks/base/core/proto/android/server/connectivity/data_stall_event.proto";
import "frameworks/base/core/proto/android/server/enums.proto";
import "frameworks/base/core/proto/android/server/job/enums.proto";
import "frameworks/base/core/proto/android/server/location/enums.proto";
import "frameworks/base/core/proto/android/service/procstats_enum.proto";
import "frameworks/base/core/proto/android/service/usb.proto";
import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto";
import "frameworks/base/core/proto/android/stats/connectivity/tethering.proto";
import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto";
import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto";
import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto";
import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto";
import "frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto";
import "frameworks/base/core/proto/android/stats/enums.proto";
import "frameworks/base/core/proto/android/stats/intelligence/enums.proto";
import "frameworks/base/core/proto/android/stats/launcher/launcher.proto";
import "frameworks/base/core/proto/android/stats/location/location_enums.proto";
import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto";
import "frameworks/base/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto";
import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto";
import "frameworks/base/core/proto/android/stats/style/style_enums.proto";
import "frameworks/base/core/proto/android/stats/sysui/notification_enums.proto";
import "frameworks/base/core/proto/android/stats/tls/enums.proto";
import "frameworks/base/core/proto/android/telecomm/enums.proto";
import "frameworks/base/core/proto/android/telephony/enums.proto";
import "frameworks/base/core/proto/android/view/enums.proto";
import "frameworks/base/core/proto/android/wifi/enums.proto";
import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto";
import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto";
/**
* The primary atom class. This message defines all of the available
* 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) = "lmkd"];
PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"];
WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"];
LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"];
AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"];
ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"];
BootSequenceReported boot_sequence_reported = 57;
DaveyOccurred davey_occurred = 58 [(module) = "statsd"];
OverlayStateChanged overlay_state_changed =
59 [(module) = "framework", (module) = "statsdtest"];
ForegroundServiceStateChanged foreground_service_state_changed
= 60 [(module) = "framework"];
CallStateChanged call_state_changed =
61 [(module) = "telecom", (truncate_timestamp) = true];
KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"];
KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"];
KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"];
AppDied app_died = 65 [(module) = "framework"];
ResourceConfigurationChanged resource_configuration_changed = 66 [(module) = "framework"];
BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67 [(module) = "framework"];
BluetoothConnectionStateChanged bluetooth_connection_state_changed =
68 [(module) = "bluetooth"];
GpsSignalQualityChanged gps_signal_quality_changed = 69 [(module) = "framework"];
UsbConnectorStateChanged usb_connector_state_changed = 70 [(module) = "framework"];
SpeakerImpedanceReported speaker_impedance_reported = 71;
HardwareFailed hardware_failed = 72;
PhysicalDropDetected physical_drop_detected = 73;
ChargeCyclesReported charge_cycles_reported = 74;
MobileConnectionStateChanged mobile_connection_state_changed = 75 [(module) = "telephony"];
MobileRadioTechnologyChanged mobile_radio_technology_changed = 76 [(module) = "telephony"];
UsbDeviceAttached usb_device_attached = 77 [(module) = "framework"];
AppCrashOccurred app_crash_occurred = 78 [(module) = "framework", (module) = "statsdtest"];
ANROccurred anr_occurred = 79 [(module) = "framework"];
WTFOccurred wtf_occurred = 80 [(module) = "framework"];
LowMemReported low_mem_reported = 81 [(module) = "framework"];
GenericAtom generic_atom = 82;
KeyValuePairsAtom key_value_pairs_atom = 83 [(module) = "framework", (module) = "statsd"];
VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"];
DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"];
ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true];
BiometricAcquired biometric_acquired = 87 [(module) = "framework"];
BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"];
BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"];
UiEventReported ui_event_reported = 90 [(module) = "framework", (module) = "sysui"];
BatteryHealthSnapshot battery_health_snapshot = 91;
SlowIo slow_io = 92;
BatteryCausedShutdown battery_caused_shutdown = 93;
PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"];
PhoneStateChanged phone_state_changed = 95 [(module) = "framework"];
UserRestrictionChanged user_restriction_changed = 96;
SettingsUIChanged settings_ui_changed = 97 [(module) = "settings"];
ConnectivityStateChanged connectivity_state_changed = 98 [(module) = "framework"];
// TODO: service state change is very noisy shortly after boot, as well
// as at other transitions - coming out of doze, device plugged in, etc.
// Consider removing this if it becomes a problem
ServiceStateChanged service_state_changed = 99 [(module) = "framework"];
ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"];
FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"];
BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "statsd"];
DevicePolicyEvent device_policy_event = 103 [(module) = "framework"];
DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"];
DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported =
105 [(module) = "docsui"];
DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"];
DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"];
DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request =
108 [(module) = "docsui"];
DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"];
DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"];
DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"];
DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"];
WifiEnabledStateChanged wifi_enabled_state_changed = 113 [(module) = "framework"];
WifiRunningStateChanged wifi_running_state_changed = 114
[(module) = "framework", deprecated = true];
AppCompacted app_compacted = 115 [(module) = "framework"];
NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"];
DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported =
117 [(module) = "docsui"];
DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"];
DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"];
DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"];
DataStallEvent data_stall_event = 121 [(module) = "network_stack"];
RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"];
SignedConfigReported signed_config_reported = 123 [(module) = "framework"];
GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"];
BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event =
125 [(module) = "bluetooth"];
BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed =
126 [(module) = "bluetooth"];
BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed =
127 [(module) = "bluetooth"];
AppDowngraded app_downgraded = 128 [(module) = "framework"];
AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129;
LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"];
GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"];
GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"];
UsbPortOverheatEvent usb_port_overheat_event_reported = 133;
NfcErrorOccurred nfc_error_occurred = 134 [(module) = "nfc"];
NfcStateChanged nfc_state_changed = 135 [(module) = "nfc"];
NfcBeamOccurred nfc_beam_occurred = 136 [(module) = "nfc"];
NfcCardemulationOccurred nfc_cardemulation_occurred = 137 [(module) = "nfc"];
NfcTagOccurred nfc_tag_occurred = 138 [(module) = "nfc"];
NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139 [(module) = "nfc"];
SeStateChanged se_state_changed = 140 [(module) = "secure_element"];
SeOmapiReported se_omapi_reported = 141 [(module) = "secure_element"];
BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported =
142 [(module) = "framework"];
AttentionManagerServiceResultReported attention_manager_service_result_reported =
143 [(module) = "framework"];
AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"];
SpeechDspStatReported speech_dsp_stat_reported = 145;
UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"];
WatchdogRollbackOccurred watchdog_rollback_occurred =
147 [(module) = "framework", (module) = "statsd"];
BiometricSystemHealthIssueDetected biometric_system_health_issue_detected =
148 [(module) = "framework"];
BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"];
ScheduledJobConstraintChanged scheduled_job_constraint_changed =
150 [(module) = "framework"];
BluetoothActiveDeviceChanged bluetooth_active_device_changed =
151 [(module) = "bluetooth"];
BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed =
152 [(module) = "bluetooth"];
BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed =
153 [(module) = "bluetooth"];
BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed =
154 [(module) = "bluetooth"];
BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported =
155 [(module) = "bluetooth"];
BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported =
156 [(module) = "bluetooth"];
BluetoothDeviceRssiReported bluetooth_device_rssi_reported =
157 [(module) = "bluetooth"];
BluetoothDeviceFailedContactCounterReported
bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"];
BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported =
159 [(module) = "bluetooth"];
BluetoothHciTimeoutReported bluetooth_hci_timeout_reported =
160 [(module) = "bluetooth"];
BluetoothQualityReportReported bluetooth_quality_report_reported =
161 [(module) = "bluetooth"];
BluetoothDeviceInfoReported bluetooth_device_info_reported =
162 [(module) = "bluetooth"];
BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported =
163 [(module) = "bluetooth"];
BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported =
164 [(module) = "bluetooth"];
BluetoothBondStateChanged bluetooth_bond_state_changed =
165 [(module) = "bluetooth"];
BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported =
166 [(module) = "bluetooth"];
BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported =
167 [(module) = "bluetooth"];
ScreenTimeoutExtensionReported screen_timeout_extension_reported =
168 [(module) = "framework"];
ProcessStartTime process_start_time = 169 [(module) = "framework"];
PermissionGrantRequestResultReported permission_grant_request_result_reported =
170 [(module) = "permissioncontroller"];
BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
DeviceIdentifierAccessDenied device_identifier_access_denied =
172 [(module) = "telephony_common"];
BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"];
AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"];
AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"];
AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"];
TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"];
HiddenApiUsed hidden_api_used = 178 [(module) = "framework"];
StyleUIChanged style_ui_changed = 179 [(module) = "sysui"];
PrivacyIndicatorsInteracted privacy_indicators_interacted =
180 [(module) = "permissioncontroller"];
AppInstallOnExternalStorageReported app_install_on_external_storage_reported =
181 [(module) = "framework"];
NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"];
AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"];
BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"];
SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"];
TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"];
BluetoothClassOfDeviceReported bluetooth_class_of_device_reported =
187 [(module) = "bluetooth"];
IntelligenceEventReported intelligence_event_reported =
188 [(module) = "intelligence"];
ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed =
189 [(module) = "framework"];
RoleRequestResultReported role_request_result_reported =
190 [(module) = "permissioncontroller"];
MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191;
MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192;
MediametricsAudiothreadReported mediametrics_audiothread_reported = 193;
MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194;
MediametricsCodecReported mediametrics_codec_reported = 195;
MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196;
MediametricsExtractorReported mediametrics_extractor_reported = 197;
MediametricsMediadrmReported mediametrics_mediadrm_reported = 198;
MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199;
MediametricsRecorderReported mediametrics_recorder_reported = 200;
MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201;
CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"];
GarageModeInfo garage_mode_info = 204 [(module) = "car"];
TestAtomReported test_atom_reported = 205 [(module) = "cts"];
ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported =
206 [(module) = "framework"];
ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"];
ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"];
ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"];
LocationManagerApiUsageReported location_manager_api_usage_reported =
210 [(module) = "framework"];
ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported =
211 [(module) = "permissioncontroller"];
RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result =
212 [(module) = "permissioncontroller"];
GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions =
213 [(module) = "permissioncontroller"];
LocationAccessCheckNotificationAction location_access_check_notification_action =
214 [(module) = "permissioncontroller"];
AppPermissionFragmentActionReported app_permission_fragment_action_reported =
215 [(module) = "permissioncontroller"];
AppPermissionFragmentViewed app_permission_fragment_viewed =
216 [(module) = "permissioncontroller"];
AppPermissionsFragmentViewed app_permissions_fragment_viewed =
217 [(module) = "permissioncontroller"];
PermissionAppsFragmentViewed permission_apps_fragment_viewed =
218 [(module) = "permissioncontroller"];
TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"];
TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"];
ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"];
LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"];
ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"];
BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"];
UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225;
UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226;
CameraActionEvent camera_action_event = 227 [(module) = "framework"];
AppCompatibilityChangeReported app_compatibility_change_reported =
228 [(module) = "framework"];
PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"];
VmsClientConnectionStateChanged vms_client_connection_state_changed =
230 [(module) = "car"];
MediaProviderScanOccurred media_provider_scan_occurred = 233 [(module) = "mediaprovider"];
MediaContentDeleted media_content_deleted = 234 [(module) = "mediaprovider"];
MediaProviderPermissionRequested media_provider_permission_requested =
235 [(module) = "mediaprovider"];
MediaProviderSchemaChanged media_provider_schema_changed = 236 [(module) = "mediaprovider"];
MediaProviderIdleMaintenanceFinished media_provider_idle_maintenance_finished =
237 [(module) = "mediaprovider"];
RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"];
BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"];
BootTimeEventElapsedTime boot_time_event_elapsed_time_reported =
240 [(module) = "framework"];
BootTimeEventUtcTime boot_time_event_utc_time_reported = 241;
BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"];
UserspaceRebootReported userspace_reboot_reported = 243 [(module) = "framework"];
NotificationReported notification_reported = 244 [(module) = "framework"];
NotificationPanelReported notification_panel_reported = 245 [(module) = "sysui"];
NotificationChannelModified notification_channel_modified = 246 [(module) = "framework"];
IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"];
IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"];
CellBroadcastMessageReported cb_message_reported =
249 [(module) = "cellbroadcast"];
CellBroadcastMessageError cb_message_error =
250 [(module) = "cellbroadcast"];
WifiHealthStatReported wifi_health_stat_reported = 251 [(module) = "wifi"];
WifiFailureStatReported wifi_failure_stat_reported = 252 [(module) = "wifi"];
WifiConnectionResultReported wifi_connection_result_reported = 253 [(module) = "wifi"];
AppFreezeChanged app_freeze_changed = 254 [(module) = "framework"];
SnapshotMergeReported snapshot_merge_reported = 255;
ForegroundServiceAppOpSessionEnded foreground_service_app_op_session_ended =
256 [(module) = "framework"];
DisplayJankReported display_jank_reported = 257;
AppStandbyBucketChanged app_standby_bucket_changed = 258 [(module) = "framework"];
SharesheetStarted sharesheet_started = 259 [(module) = "framework"];
RankingSelected ranking_selected = 260 [(module) = "framework", (module) = "sysui"];
TvSettingsUIInteracted tvsettings_ui_interacted = 261 [(module) = "tv_settings"];
LauncherStaticLayout launcher_snapshot = 262 [(module) = "sysui"];
PackageInstallerV2Reported package_installer_v2_reported = 263 [(module) = "framework"];
UserLifecycleJourneyReported user_lifecycle_journey_reported = 264 [(module) = "framework"];
UserLifecycleEventOccurred user_lifecycle_event_occurred = 265 [(module) = "framework"];
AccessibilityShortcutReported accessibility_shortcut_reported =
266 [(module) = "framework"];
AccessibilityServiceReported accessibility_service_reported = 267 [(module) = "settings"];
DocsUIDragAndDropReported docs_ui_drag_and_drop_reported = 268 [(module) = "docsui"];
AppUsageEventOccurred app_usage_event_occurred = 269 [(module) = "framework"];
AutoRevokeNotificationClicked auto_revoke_notification_clicked =
270 [(module) = "permissioncontroller"];
AutoRevokeFragmentAppViewed auto_revoke_fragment_app_viewed =
271 [(module) = "permissioncontroller"];
AutoRevokedAppInteraction auto_revoked_app_interaction =
272 [(module) = "permissioncontroller", (module) = "settings"];
AppPermissionGroupsFragmentAutoRevokeAction
app_permission_groups_fragment_auto_revoke_action =
273 [(module) = "permissioncontroller"];
EvsUsageStatsReported evs_usage_stats_reported = 274 [(module) = "evs"];
AudioPowerUsageDataReported audio_power_usage_data_reported = 275;
TvTunerStateChanged tv_tuner_state_changed = 276 [(module) = "framework"];
MediaOutputOpSwitchReported mediaoutput_op_switch_reported =
277 [(module) = "settings"];
CellBroadcastMessageFiltered cb_message_filtered =
278 [(module) = "cellbroadcast"];
TvTunerDvrStatus tv_tuner_dvr_status = 279 [(module) = "framework"];
TvCasSessionOpenStatus tv_cas_session_open_status =
280 [(module) = "framework"];
AssistantInvocationReported assistant_invocation_reported = 281 [(module) = "framework"];
DisplayWakeReported display_wake_reported = 282 [(module) = "framework"];
CarUserHalModifyUserRequestReported car_user_hal_modify_user_request_reported =
283 [(module) = "car"];
CarUserHalModifyUserResponseReported car_user_hal_modify_user_response_reported =
284 [(module) = "car"];
CarUserHalPostSwitchResponseReported car_user_hal_post_switch_response_reported =
285 [(module) = "car"];
CarUserHalInitialUserInfoRequestReported car_user_hal_initial_user_info_request_reported =
286 [(module) = "car"];
CarUserHalInitialUserInfoResponseReported car_user_hal_initial_user_info_response_reported =
287 [(module) = "car"];
CarUserHalUserAssociationRequestReported car_user_hal_user_association_request_reported =
288 [(module) = "car"];
CarUserHalSetUserAssociationResponseReported car_user_hal_set_user_association_response_reported =
289 [(module) = "car"];
NetworkIpProvisioningReported network_ip_provisioning_reported =
290 [(module) = "network_stack"];
NetworkDhcpRenewReported network_dhcp_renew_reported = 291 [(module) = "network_stack"];
NetworkValidationReported network_validation_reported = 292 [(module) = "network_stack"];
NetworkStackQuirkReported network_stack_quirk_reported = 293 [(module) = "network_stack"];
MediametricsAudioRecordDeviceUsageReported mediametrics_audiorecorddeviceusage_reported =
294;
MediametricsAudioThreadDeviceUsageReported mediametrics_audiothreaddeviceusage_reported =
295;
MediametricsAudioTrackDeviceUsageReported mediametrics_audiotrackdeviceusage_reported =
296;
MediametricsAudioDeviceConnectionReported mediametrics_audiodeviceconnection_reported =
297;
BlobCommitted blob_committed = 298 [(module) = "framework"];
BlobLeased blob_leased = 299 [(module) = "framework"];
BlobOpened blob_opened = 300 [(module) = "framework"];
ContactsProviderStatusReported contacts_provider_status_reported = 301;
KeystoreKeyEventReported keystore_key_event_reported = 302;
NetworkTetheringReported network_tethering_reported =
303 [(module) = "network_tethering"];
ImeTouchReported ime_touch_reported = 304 [(module) = "sysui"];
TlsHandshakeReported tls_handshake_reported = 317 [(module) = "conscrypt"];
// StatsdStats tracks platform atoms with ids upto 500.
// Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
}
// Pulled events will start at field 10000.
// Next: 10084
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) = "statsdtest"];
CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"];
CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework", (module) = "statsdtest"];
CpuTimePerUidFreq cpu_time_per_uid_freq =
10010 [(module) = "framework", (module) = "statsd"];
WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"];
ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"];
BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"];
ProcessMemoryState process_memory_state = 10013 [(module) = "framework"];
SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"];
SystemUptime system_uptime = 10015 [(module) = "framework"];
CpuActiveTime cpu_active_time = 10016 [(module) = "framework", (module) = "statsdtest"];
CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"];
DiskSpace disk_space = 10018 [deprecated=true, (module) = "statsdtest"];
RemainingBatteryCapacity remaining_battery_capacity = 10019 [(module) = "framework"];
FullBatteryCapacity full_battery_capacity = 10020 [(module) = "framework"];
Temperature temperature = 10021 [(module) = "framework", (module) = "statsdtest"];
BinderCalls binder_calls = 10022 [(module) = "framework", (module) = "statsd"];
BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"];
LooperStats looper_stats = 10024 [(module) = "framework", (module) = "statsd"];
DiskStats disk_stats = 10025 [(module) = "framework"];
DirectoryUsage directory_usage = 10026 [(module) = "framework"];
AppSize app_size = 10027 [(module) = "framework"];
CategorySize category_size = 10028 [(module) = "framework"];
ProcStats proc_stats = 10029 [(module) = "framework"];
BatteryVoltage battery_voltage = 10030 [(module) = "framework"];
NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"];
DiskIo disk_io = 10032 [(module) = "framework"];
PowerProfile power_profile = 10033 [(module) = "framework"];
ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"];
ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"];
CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"];
OnDevicePowerMeasurement on_device_power_measurement = 10038;
DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"];
DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid =
10040 [(module) = "framework"];
DeviceCalculatedPowerBlameOther device_calculated_power_blame_other =
10041 [(module) = "framework"];
ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"];
BatteryLevel battery_level = 10043 [(module) = "framework"];
BuildInformation build_information = 10044 [(module) = "framework"];
BatteryCycleCount battery_cycle_count = 10045 [(module) = "framework"];
DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"];
DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"];
NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"];
RoleHolder role_holder = 10049 [(module) = "framework"];
DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"];
TrainInfo train_info = 10051 [(module) = "statsd"];
TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"];
ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"];
GpuStatsGlobalInfo gpu_stats_global_info = 10054;
GpuStatsAppInfo gpu_stats_app_info = 10055;
SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"];
AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"];
FaceSettings face_settings = 10058 [(module) = "framework"];
CoolingDevice cooling_device = 10059 [(module) = "framework"];
AppOps app_ops = 10060 [(module) = "framework"];
ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"];
SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062;
SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063;
ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"];
VmsClientStats vms_client_stats = 10065 [(module) = "car"];
NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"];
DangerousPermissionStateSampled dangerous_permission_state_sampled =
10067 [(module) = "framework"];
GraphicsStats graphics_stats = 10068;
RuntimeAppOpAccess runtime_app_op_access = 10069 [(module) = "framework"];
IonHeapSize ion_heap_size = 10070 [(module) = "framework"];
PackageNotificationPreferences package_notification_preferences =
10071 [(module) = "framework"];
PackageNotificationChannelPreferences package_notification_channel_preferences =
10072 [(module) = "framework"];
PackageNotificationChannelGroupPreferences package_notification_channel_group_preferences =
10073 [(module) = "framework"];
GnssStats gnss_stats = 10074 [(module) = "framework"];
AttributedAppOps attributed_app_ops = 10075 [(module) = "framework"];
VoiceCallSession voice_call_session = 10076 [(module) = "telephony"];
VoiceCallRatUsage voice_call_rat_usage = 10077 [(module) = "telephony"];
SimSlotState sim_slot_state = 10078 [(module) = "telephony"];
SupportedRadioAccessFamily supported_radio_access_family = 10079 [(module) = "telephony"];
SettingSnapshot setting_snapshot = 10080 [(module) = "framework"];
BlobInfo blob_info = 10081 [(module) = "framework"];
DataUsageBytesTransfer data_usage_bytes_transfer = 10082 [(module) = "framework"];
BytesTransferByTagAndMetered bytes_transfer_by_tag_and_metered =
10083 [(module) = "framework"];
DNDModeProto dnd_mode_rule = 10084 [(module) = "framework"];
GeneralExternalStorageAccessStats general_external_storage_access_stats =
10085 [(module) = "mediaprovider"];
}
// DO NOT USE field numbers above 100,000 in AOSP.
// Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use.
// Field numbers 200,000 and above are reserved for future use; do not use them at all.
reserved 10036;
}
/**
* This proto represents a node of an attribution chain.
* Note: All attribution chains are represented as a repeated field of type
* AttributionNode. It is understood that in such arrays, the order is that
* of calls, that is [A, B, C] if A calls B that calls C.
*/
message AttributionNode {
// The uid for a given element in the attribution chain.
optional int32 uid = 1;
// The (optional) string tag for an element in the attribution chain. If the
// element has no tag, it is encoded as an empty string.
optional string tag = 2;
}
message KeyValuePair {
optional int32 key = 1;
oneof value {
int32 value_int = 2;
int64 value_long = 3;
string value_str = 4;
float value_float = 5;
}
}
message KeyValuePairsAtom {
optional int32 uid = 1;
repeated KeyValuePair pairs = 2;
}
/*
* *****************************************************************************
* Below are all of the individual atoms that are logged by Android via statsd.
*
* RULES:
* - The field ids for each atom must start at 1, and count upwards by 1.
* Skipping field ids is not allowed.
* - These form an API, so renaming, renumbering or removing fields is
* not allowed between android releases. (This is not currently enforced,
* but there will be a tool to enforce this restriction).
* - The types must be built-in protocol buffer types, namely, no sub-messages
* are allowed (yet). The bytes type is also not allowed.
* - The CamelCase name of the message type should match the
* underscore_separated name as defined in Atom.
* - If an atom represents work that can be attributed to an app, there can
* be exactly one AttributionChain field. It must be field number 1.
* - A field that is a uid should be a string field, tagged with the [xxx]
* annotation. The generated code on android will be represented by UIDs,
* and those UIDs will be translated in xxx to those strings.
*
* CONVENTIONS:
* - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange.
* - If there is a UID, it goes first. Think in an object-oriented fashion.
* *****************************************************************************
*/
/**
* This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged.
* Logs when the Thermal service HAL notifies the throttling start/stop events.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
*/
message ThermalThrottlingStateChanged {
// The type of temperature being reported (CPU, GPU, SKIN, etc)
optional android.os.TemperatureTypeEnum sensor_type = 1;
// Throttling state, this field is DEPRECATED
enum State {
UNKNOWN = 0;
START = 1; // START indicated that throttling was triggered.
STOP = 2; // STOP indicates that throttling was cleared.
}
optional State state = 2;
optional float temperature = 3;
}
/**
* 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/base/core/proto/android/view/enums.proto.
optional android.view.DisplayStateEnum state = 1
[(state_field_option).exclusive_state = true, (state_field_option).nested = false];
}
/**
* Logs that the process state of the uid, as determined by ActivityManager
* (i.e. the highest process state of that uid's processes) has changed.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
*/
message UidProcessStateChanged {
optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true];
// The state, from frameworks/base/core/proto/android/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/base/core/proto/android/app/enums.proto.
optional android.app.ProcessStateEnum state = 4;
}
/**
* Logs when ActivityManagerService sleep state is changed.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java
*/
message ActivityManagerSleepStateChanged {
// TODO: import frameworks proto
enum State {
UNKNOWN = 0;
ASLEEP = 1;
AWAKE = 2;
}
optional State state = 1
[(state_field_option).exclusive_state = true, (state_field_option).nested = false];
}
/**
* Logs when system memory state changes.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
*/
message MemoryFactorStateChanged {
// TODO: import frameworks proto
enum State {
MEMORY_UNKNOWN = 0;
NORMAL = 1; // normal.
MODERATE = 2; // moderate memory pressure.
LOW = 3; // low memory.
CRITICAL = 4; // critical memory.
}
optional State factor = 1 [(state_field_option).exclusive_state = true];
}
/**
* Logs when app is using too much cpu, according to ActivityManagerService.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
*/
message ExcessiveCpuUsageReported {
optional int32 uid = 1;
optional string process_name = 2;
optional string package_name = 3;
// package version. TODO: remove this when validation is done
optional int64 version = 4;
}
/**
* Logs when a cached process is killed, along with its pss.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
*/
message CachedKillReported {
optional int32 uid = 1;
optional string process_name = 2;
optional string package_name = 3;
// TODO: remove this when validation is done
optional int64 version = 5;
optional int64 pss = 4;
}
/**
* Logs the change in wifi health.
*
* Logged from:
* frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDataStall.java
*/
message WifiHealthStatReported {
enum Band {
UNKNOWN = 0;
// All of 2.4GHz band
BAND_2G = 1;
// Frequencies in the range of [5150, 5250) GHz
BAND_5G_LOW = 2;
// Frequencies in the range of [5250, 5725) GHz
BAND_5G_MIDDLE = 3;
// Frequencies in the range of [5725, 5850) GHz
BAND_5G_HIGH = 4;
// Frequencies in the range of [5925, 6425) GHz
BAND_6G_LOW = 5;
// Frequencies in the range of [6425, 6875) GHz
BAND_6G_MIDDLE = 6;
// Frequencies in the range of [6875, 7125) GHz
BAND_6G_HIGH = 7;
}
// duration this stat is obtained over in milliseconds
optional int32 duration_millis = 1;
// whether wifi is classified as sufficient for the user's data traffic, determined
// by whether the calculated throughput exceeds the average demand within |duration_millis|
optional bool is_sufficient = 2;
// whether cellular data is available
optional bool is_cell_data_available = 3;
// the Band bucket the connected network is on
optional Band band = 4;
}
/**
* Logged when wifi detects a significant change in connection failure rate.
*
* Logged from: frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiHealthMonitor.java
*
*/
message WifiFailureStatReported {
enum AbnormalityType {
UNKNOWN = 0;
SIGNIFICANT_INCREASE = 1;
SIGNIFICANT_DECREASE = 2;
SIMPLY_HIGH = 3;
}
enum FailureType {
FAILURE_UNKNOWN = 0;
FAILURE_CONNECTION = 1;
FAILURE_ASSOCIATION_REJECTION = 2;
FAILURE_ASSOCIATION_TIMEOUT = 3;
FAILURE_AUTHENTICATION = 4;
FAILURE_NON_LOCAL_DISCONNECTION = 5;
FAILURE_SHORT_CONNECTION_DUE_TO_NON_LOCAL_DISCONNECTION = 6;
}
// Reason for uploading this stat
optional AbnormalityType abnormality_type = 1;
// The particular type of failure
optional FailureType failure_type = 2;
// How many times we have encountered this combination of AbnormalityType and FailureType
optional int32 failure_count = 3;
}
/**
* Logs whether a wifi connection is successful and reasons for failure if it isn't.
*
* Logged from:
* frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
*/
message WifiConnectionResultReported {
enum FailureCode {
FAILURE_UNKNOWN = 0;
FAILURE_ASSOCIATION_TIMEOUT = 1;
FAILURE_ASSOCIATION_REJECTION = 2;
FAILURE_AUTHENTICATION_GENERAL = 3;
FAILURE_AUTHENTICATION_EAP = 4;
FAILURE_DHCP = 5;
FAILURE_NETWORK_DISCONNECTION = 6;
FAILURE_ROAM_TIMEOUT = 7;
}
// true represents a successful connection
optional bool connection_result = 1;
// reason for the connection failure
optional FailureCode failure_code = 2;
// scan rssi before the connection attempt
optional int32 rssi = 3;
}
/**
* Logs when memory stats of a process is reported.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
*/
message ProcessMemoryStatReported {
optional int32 uid = 1;
optional string process_name = 2;
optional string package_name = 3;
//TODO: remove this when validation is done
optional int64 version = 9;
optional int64 pss = 4;
optional int64 uss = 5;
optional int64 rss = 6;
enum Type {
ADD_PSS_INTERNAL_SINGLE = 0;
ADD_PSS_INTERNAL_ALL_MEM = 1;
ADD_PSS_INTERNAL_ALL_POLL = 2;
ADD_PSS_EXTERNAL = 3;
ADD_PSS_EXTERNAL_SLOW = 4;
}
optional Type type = 7;
optional int64 duration_millis = 8;
}
/**
* Logs that a process started, finished, crashed, or ANRed.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
*/
message ProcessLifeCycleStateChanged {
optional int32 uid = 1 [(is_uid) = true];
// The process name (usually same as the app name).
optional string process_name = 2;
// What lifecycle state the process changed to.
// This enum is specific to atoms.proto.
enum State {
FINISHED = 0;
STARTED = 1;
CRASHED = 2;
}
optional State state = 3;
}
/**
* Logs when the ble scan state changes.
*
* Logged from:
* packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
*/
message BleScanStateChanged {
repeated AttributionNode attribution_node = 1
[(state_field_option).primary_field_first_uid = true];
enum State {
OFF = 0;
ON = 1;
// RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes).
RESET = 2;
}
optional State state = 2 [
(state_field_option).exclusive_state = true,
(state_field_option).default_state_value = 0 /* State.OFF */,
(state_field_option).trigger_state_reset_value = 2 /* State.RESET */,
(state_field_option).nested = true
];
// Does the scan have a filter.
optional bool is_filtered = 3 [(state_field_option).primary_field = true];
// Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally.
optional bool is_first_match = 4 [(state_field_option).primary_field = true];
// Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC).
optional bool is_opportunistic = 5 [(state_field_option).primary_field = true];
}
/**
* Logs reporting of a ble scan finding results.
*
* Logged from:
* packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
*/
// TODO: Consider also tracking per-scanner-id.
message BleScanResultReceived {
repeated AttributionNode attribution_node = 1;
// Number of ble scan results returned.
optional int32 num_results = 2;
}
/**
* Logs when a sensor state changes.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
*/
message SensorStateChanged {
repeated AttributionNode attribution_node = 1;
// The id (int) of the sensor.
optional int32 sensor_id = 2;
enum State {
OFF = 0;
ON = 1;
}
optional State state = 3;
}
/**
* Logs when GPS state changes.
*
* Logged from:
* frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
*/
message GpsScanStateChanged {
repeated AttributionNode attribution_node = 1;
enum State {
OFF = 0;
ON = 1;
}
optional State state = 2;
}
/**
* Logs when GPS signal quality.
*
* Logged from:
* /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
*/
message GpsSignalQualityChanged {
optional android.server.location.GpsSignalQualityEnum level = 1;
}
/**
* Logs when a sync manager sync state changes.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
*/
message SyncStateChanged {
repeated AttributionNode attribution_node = 1;
// Name of the sync (as named in the app). Can be chosen at run-time.
optional string sync_name = 2;
enum State {
OFF = 0;
ON = 1;
}
optional State state = 3;
}
/*
* Deferred job stats.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java
*/
message DeferredJobStatsReported {
repeated AttributionNode attribution_node = 1;
// Number of jobs deferred.
optional int32 num_jobs_deferred = 2;
// Time since the last job runs.
optional int64 time_since_last_job_millis = 3;
}
/**
* Logs when a job scheduler job state changes.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
*/
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 reason a job has stopped.
// This is only applicable when the state is FINISHED.
// The default value is STOP_REASON_UNKNOWN.
optional android.app.job.StopReasonEnum stop_reason = 4;
// The standby bucket of the app that scheduled the job. These match the framework constants
// defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is
// already assigned 0.
enum Bucket {
UNKNOWN = -1;
ACTIVE = 0;
WORKING_SET = 1;
FREQUENT = 2;
RARE = 3;
NEVER = 4;
RESTRICTED = 5;
}
optional Bucket standby_bucket = 5 [default = UNKNOWN];
// The job id (as assigned by the app).
optional int32 job_id = 6;
// One flag for each of the API constraints defined by Jobscheduler. Does not include implcit
// constraints as they are always assumed to be set.
optional bool has_charging_constraint = 7;
optional bool has_battery_not_low_constraint = 8;
optional bool has_storage_not_low_constraint = 9;
optional bool has_timing_delay_constraint = 10;
optional bool has_deadline_constraint = 11;
optional bool has_idle_constraint = 12;
optional bool has_connectivity_constraint = 13;
optional bool has_content_trigger_constraint = 14;
}
/**
* 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/base/core/proto/android/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/base/core/proto/android/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/base/core/proto/android/os/enums.proto.
optional android.os.BatteryPluggedStateEnum state = 1
[(state_field_option).exclusive_state = true, (state_field_option).nested = false];
}
/**
* Logs when an app's wakeup alarm fires.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
*/
message WakeupAlarmOccurred {
repeated AttributionNode attribution_node = 1;
// Name of the wakeup alarm.
optional string tag = 2;
// Name of source package (for historical reasons, since BatteryStats tracked it).
optional string package_name = 3;
// The App Standby bucket of the app that scheduled the alarm at the time the alarm fired.
optional AppStandbyBucketChanged.Bucket app_standby_bucket = 4;
}
/**
* Logs when an an app causes the mobile radio to change state.
* Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
*/
message MobileRadioPowerStateChanged {
repeated AttributionNode attribution_node = 1;
// Power state, from frameworks/base/core/proto/android/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/base/core/proto/android/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/base/core/proto/android/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/base/core/proto/android/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: "<EMPTY>".
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: "<EMPTY>" if not available.
optional string bootloader_reason = 1;
// Reason for system boot. Eg. bootloader, reboot,userrequested
// Default: "<EMPTY>" 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/base/core/proto/android/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/base/core/proto/android/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;
// This is when the user is being prompted to enter the password.
SHOWN = 2;
}
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;
}
/*
* Logs changes to the configuration of the device. The configuration is defined
* in frameworks/base/core/java/android/content/res/Configuration.java
* More documentation is at https://d.android.com/reference/android/content/res/Configuration.html
* Please go there to interpret the possible values each field can be.
*
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
*/
message ResourceConfigurationChanged {
// Bit mask of color capabilities of the screen.
// Contains information about the color gamut and hdr mode of the screen.
// See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode
optional int32 color_mode = 1;
// The target screen density being rendered to.
// See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi
optional int32 density_dpi = 2;
// Current user preference for the scaling factor for fonts,
// relative to the base density scaling.
// See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale
optional float font_scale = 3;
// Flag indicating whether the hard keyboard is hidden.
// See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden
optional int32 hard_keyboard_hidden = 4;
// The type of keyboard attached to the device.
// See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard
optional int32 keyboard = 5;
// Flag indicating whether any keyboard is available. Takes soft keyboards into account.
// See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden
optional int32 keyboard_hidden = 6;
// IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier.
// 0 if undefined.
// See: https://d.android.com/reference/android/content/res/Configuration.html#mcc
optional int32 mcc = 7;
// IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier.
// 0 if undefined. Note: the actual MNC may be 0, to check for this use the
// MNC_ZERO symbol defined in Configuration.java.
// See: https://d.android.com/reference/android/content/res/Configuration.html#mnc
optional int32 mnc = 8;
// The kind of navigation available on the device.
// See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation
optional int32 navigation = 9;
// Flag indicating whether the navigation is available.
// See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden
optional int32 navigation_hidden = 10;
// Overall orientation of the screen.
// See: https://d.android.com/reference/android/content/res/Configuration.html#orientation
optional int32 orientation = 11;
// The current height of the available screen space, in dp units.
// See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp
optional int32 screen_height_dp = 12;
// Bit mask of overall layout of the screen.
// Contains information about screen size, whether the screen is wider/taller
// than normal, whether the screen layout is right-tl-left or left-to-right,
// and whether the screen has a rounded shape.
// See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout
optional int32 screen_layout = 13;
// Current width of the available screen space, in dp units.
// See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp
optional int32 screen_width_dp = 14;
// The smallest screen size an application will see in normal operation.
// This is the smallest value of both screenWidthDp and screenHeightDp
// in portrait and landscape.
// See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp
optional int32 smallest_screen_width_dp = 15;
// The type of touch screen attached to the device.
// See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen
optional int32 touchscreen = 16;
// Bit mask of the ui mode.
// Contains information about the overall ui mode of the device.
// Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET
// Also contains information about whether the device is in night mode.
// See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode
optional int32 ui_mode = 17;
}
/**
* Logs changes in the connection state of the mobile radio.
*
* Logged from:
* frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java
*/
message MobileConnectionStateChanged {
// States are from the state machine DataConnection.java.
enum State {
UNKNOWN = 0;
// The connection is inactive, or disconnected.
INACTIVE = 1;
// The connection is being activated, or connecting.
ACTIVATING = 2;
// The connection is active, or connected.
ACTIVE = 3;
// The connection is disconnecting.
DISCONNECTING = 4;
// The connection is disconnecting after creating a connection.
DISCONNECTION_ERROR_CREATING_CONNECTION = 5;
}
optional State state = 1;
// For multi-sim phones, this distinguishes between the sim cards.
optional int32 sim_slot_index = 2;
// Used to identify the connection. Starts at 0 and increments by 1 for
// every new network created. Resets whenever the device reboots.
optional int32 data_connection_id = 3;
// A bitmask for the capabilities of this connection.
// Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS.
// Default value (if we have no information): 0
optional int64 capabilities = 4;
// If this connection has internet.
// This just checks if the DEFAULT bit of capabilities is set.
optional bool has_internet = 5;
}
/**
* Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA.
*
* Logged from:
* frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java
*/
message MobileRadioTechnologyChanged {
optional android.telephony.NetworkTypeEnum state = 1;
// For multi-sim phones, this distinguishes between the sim cards.
optional int32 sim_slot_index = 2;
}
/**
* Logs the VID and PID of any connected USB devices.
*
* Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present.
*
* Logged by Vendor.
*/
message UsbDeviceAttached {
optional int32 vid = 1;
optional int32 pid = 2;
optional bool has_audio = 3;
optional bool has_hid = 4;
optional bool has_storage = 5;
enum State {
STATE_DISCONNECTED = 0;
STATE_CONNECTED = 1;
}
optional State state = 6;
optional int64 last_connect_duration_millis = 7;
}
/**
* Logs when Bluetooth is enabled and disabled.
*
* Logged from:
* services/core/java/com/android/server/BluetoothManagerService.java
*/
message BluetoothEnabledStateChanged {
repeated AttributionNode attribution_node = 1;
// Whether or not bluetooth is enabled on the device.
enum State {
UNKNOWN = 0;
ENABLED = 1;
DISABLED = 2;
}
optional State state = 2;
// The reason for being enabled/disabled.
// Eg. Airplane mode, crash, application request.
optional android.bluetooth.EnableDisableReasonEnum reason = 3;
// If the reason is an application request, this will be the package name.
optional string pkg_name = 4;
}
/**
* Logs when profiles on a Bluetooth device connects and disconnects.
*
* Logged from:
* packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
*
* Next Tag: 6
*/
message BluetoothConnectionStateChanged {
// The state of the connection.
// Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
optional android.bluetooth.ConnectionStateEnum state = 1;
// An identifier that can be used to match connect and disconnect events.
// Currently is last two bytes of a hash of a device level ID and
// the mac address of the bluetooth device that is connected.
// Deprecated: use obfuscated_id instead, this one is always 0 for Q+
optional int32 obfuscated_id = 2 [deprecated = true];
// The profile that is connected. Eg. GATT, A2DP, HEADSET.
// From android.bluetooth.BluetoothAdapter.java
// Default: 0 when not used
optional int32 bt_profile = 3;
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 5;
}
/**
* Logs when a Bluetooth device connects and disconnects over ACL
*
* Logged from:
* packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
*
* Next Tag: 4
*/
message BluetoothAclConnectionStateChanged {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// The state of the connection.
// Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
optional android.bluetooth.ConnectionStateEnum state = 2;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 3;
}
/**
* Logs when a Bluetooth device connects and disconnects over SCO
*
* Logged from:
* packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
* packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java
*
* Next Tag: 5
*/
message BluetoothScoConnectionStateChanged {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// The state of the connection.
// Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
optional android.bluetooth.ConnectionStateEnum state = 2;
// Codec used for this SCO connection
// Default: UNKNOWN
optional android.bluetooth.hfp.ScoCodec codec = 3;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 4;
}
/**
* Logged when active device of a profile changes
*
* Logged from:
* packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
* packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java
* packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java
*/
message BluetoothActiveDeviceChanged {
// The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID
// From android.bluetooth.BluetoothProfile
optional int32 bt_profile = 1;
// An identifier that can be used to match events for this new active device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if there is no active device for this profile
optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES];
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 3;
}
// Logs when there is an event affecting Bluetooth device's link layer connection.
// - This event is triggered when there is a related HCI command or event
// - Users of this metrics can deduce Bluetooth device's connection state from these events
// - HCI commands are logged before the command is sent, after receiving command status, and after
// receiving command complete
// - HCI events are logged when they arrive
//
// Low level log from system/bt
//
// Bluetooth classic commands:
// - CMD_CREATE_CONNECTION
// - CMD_DISCONNECT
// - CMD_CREATE_CONNECTION_CANCEL
// - CMD_ACCEPT_CONNECTION_REQUEST
// - CMD_REJECT_CONNECTION_REQUEST
// - CMD_SETUP_ESCO_CONNECTION
// - CMD_ACCEPT_ESCO_CONNECTION
// - CMD_REJECT_ESCO_CONNECTION
// - CMD_ENH_SETUP_ESCO_CONNECTION
// - CMD_ENH_ACCEPT_ESCO_CONNECTION
//
// Bluetooth low energy commands:
// - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00]
// - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error]
// - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00]
// - CMD_BLE_CLEAR_WHITE_LIST
// - CMD_BLE_ADD_WHITE_LIST
// - CMD_BLE_REMOVE_WHITE_LIST
//
// Bluetooth classic events:
// - EVT_CONNECTION_COMP
// - EVT_CONNECTION_REQUEST
// - EVT_DISCONNECTION_COMP
// - EVT_ESCO_CONNECTION_COMP
// - EVT_ESCO_CONNECTION_CHANGED
//
// Bluetooth low energy meta events:
// - BLE_EVT_CONN_COMPLETE_EVT
// - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT
//
// Next tag: 10
message BluetoothLinkLayerConnectionEvent {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Connection handle of this connection if available
// Range: 0x0000 - 0x0EFF (12 bits)
// Default: 0xFFFF if the handle is unknown
optional int32 connection_handle = 2;
// Direction of the link
// Default: DIRECTION_UNKNOWN
optional android.bluetooth.DirectionEnum direction = 3;
// Type of this link
// Default: LINK_TYPE_UNKNOWN
optional android.bluetooth.LinkTypeEnum type = 4;
// Reason metadata for this link layer connection event, rules for interpretation:
// 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or
// EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case
// 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is
// set and valid, ignore hci_ble_event
// HCI command associated with this event
// Default: CMD_UNKNOWN
optional android.bluetooth.hci.CommandEnum hci_cmd = 5;
// HCI event associated with this event
// Default: EVT_UNKNOWN
optional android.bluetooth.hci.EventEnum hci_event = 6;
// HCI BLE meta event associated with this event
// Default: BLE_EVT_UNKNOWN
optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7;
// HCI command status code if this is triggerred by hci_cmd
// Default: STATUS_UNKNOWN
optional android.bluetooth.hci.StatusEnum cmd_status = 8;
// HCI reason code associated with this event
// Default: STATUS_UNKNOWN
optional android.bluetooth.hci.StatusEnum reason_code = 9;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 10;
}
/**
* Logs when a module is rolled back by Watchdog.
*
* Logged from: Rollback Manager
*/
message WatchdogRollbackOccurred {
enum RollbackType {
UNKNOWN = 0;
ROLLBACK_INITIATE = 1;
ROLLBACK_SUCCESS = 2;
ROLLBACK_FAILURE = 3;
ROLLBACK_BOOT_TRIGGERED = 4;
}
optional RollbackType rollback_type = 1;
optional string package_name = 2;
optional int32 package_version_code = 3;
enum RollbackReasonType {
REASON_UNKNOWN = 0;
REASON_NATIVE_CRASH = 1;
REASON_EXPLICIT_HEALTH_CHECK = 2;
REASON_APP_CRASH = 3;
REASON_APP_NOT_RESPONDING = 4;
REASON_NATIVE_CRASH_DURING_BOOT = 5;
}
optional RollbackReasonType rollback_reason = 4;
// Set by RollbackPackageHealthObserver to be the package that is failing when a rollback
// is initiated. Empty if the package is unknown.
optional string failing_package_name = 5;
optional TrainExperimentIds experiment_ids = 6 [(log_mode) = MODE_BYTES];
}
/**
* Logs when there is a change in Bluetooth A2DP playback state
*
* Logged from:
* packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
*/
message BluetoothA2dpPlaybackStateChanged {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Current playback state
// Default: PLAYBACK_STATE_UNKNOWN
optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2;
// Current audio coding mode
// Default: AUDIO_CODING_MODE_UNKNOWN
optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 4;
}
/**
* Logs when there is a change in A2DP codec config for a particular remote device
*
* Logged from:
* frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
* packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
*/
message BluetoothA2dpCodecConfigChanged {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
// Default SOURCE_CODEC_TYPE_INVALID
optional int32 codec_type = 2;
// Codec priroity, the higher the more preferred, -1 for disabled
// Default: CODEC_PRIORITY_DEFAULT
optional int32 codec_priority = 3;
// Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig
// Default: SAMPLE_RATE_NONE
optional int32 sample_rate = 4;
// Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig
// Default: BITS_PER_SAMPLE_NONE
optional int32 bits_per_sample = 5;
// Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig
// Default: CHANNEL_MODE_NONE
optional int32 channel_mode = 6;
// Codec specific values
// Default 0
optional int64 codec_specific_1 = 7;
optional int64 codec_specific_2 = 8;
optional int64 codec_specific_3 = 9;
optional int64 codec_specific_4 = 10;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 11;
}
/**
* Logs when there is a change in selectable A2DP codec capability for a paricular remote device
* Each codec's capability is logged separately due to statsd restriction
*
* Logged from:
* frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
* packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
*/
message BluetoothA2dpCodecCapabilityChanged {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
// Default SOURCE_CODEC_TYPE_INVALID
optional int32 codec_type = 2;
// Codec priroity, the higher the more preferred, -1 for disabled
// Default: CODEC_PRIORITY_DEFAULT
optional int32 codec_priority = 3;
// A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants
// in BluetoothCodecConfig
// Default: empty and SAMPLE_RATE_NONE for individual item
optional int32 sample_rate = 4;
// A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants
// in BluetoothCodecConfig
// Default: empty and BITS_PER_SAMPLE_NONE for individual item
optional int32 bits_per_sample = 5;
// A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in
// BluetoothCodecConfig
// Default: empty and CHANNEL_MODE_NONE for individual item
optional int32 channel_mode = 6;
// Codec specific values
// Default 0
optional int64 codec_specific_1 = 7;
optional int64 codec_specific_2 = 8;
optional int64 codec_specific_3 = 9;
optional int64 codec_specific_4 = 10;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 11;
}
/**
* Logs when A2DP failed to read from PCM source.
* This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding.
*
* Logged from:
* system/bt
*/
message BluetoothA2dpAudioUnderrunReported {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Encoding interval in nanoseconds
// Default: 0
optional int64 encoding_interval_nanos = 2;
// Number of bytes of PCM data that could not be read from the source
// Default: 0
optional int32 num_missing_pcm_bytes = 3;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 4;
}
/**
* Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit
* buffer queue is full and we have to drop data
*
* Logged from:
* system/bt
*/
message BluetoothA2dpAudioOverrunReported {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Encoding interval in nanoseconds
// Default: 0
optional int64 encoding_interval_nanos = 2;
// Number of buffers dropped in this event
// Each buffer is encoded in one encoding interval and consists of multiple encoded frames
// Default: 0
optional int32 num_dropped_buffers = 3;
// Number of encoded buffers dropped in this event
// Default 0
optional int32 num_dropped_encoded_frames = 4;
// Number of encoded bytes dropped in this event
// Default: 0
optional int32 num_dropped_encoded_bytes = 5;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 6;
}
/**
* Logs when we receive reports regarding a device's RSSI value
*
* Logged from:
* system/bt
*/
message BluetoothDeviceRssiReported {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Connection handle of this connection if available
// Range: 0x0000 - 0x0EFF (12 bits)
// Default: 0xFFFF if the handle is unknown
optional int32 connection_handle = 2;
// HCI command status code if this is triggerred by hci_cmd
// Default: STATUS_UNKNOWN
optional android.bluetooth.hci.StatusEnum hci_status = 3;
// BR/EDR
// Range: -128 ≤ N ≤ 127 (signed integer)
// Units: dB
// LE:
// Range: -127 to 20, 127 (signed integer)
// Units: dBm
// Invalid when an out of range value is reported
optional int32 rssi = 4;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 5;
}
/**
* Logs when we receive reports regarding how many consecutive failed contacts for a connection
*
* Logged from:
* system/bt
*/
message BluetoothDeviceFailedContactCounterReported {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Connection handle of this connection if available
// Range: 0x0000 - 0x0EFF (12 bits)
// Default: 0xFFFF if the handle is unknown
optional int32 connection_handle = 2;
// HCI command status code if this is triggerred by hci_cmd
// Default: STATUS_UNKNOWN
optional android.bluetooth.hci.StatusEnum cmd_status = 3;
// Number of consecutive failed contacts for a connection corresponding to the Handle
// Range: uint16_t, 0-0xFFFF
// Default: 0xFFFFF
optional int32 failed_contact_counter = 4;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 5;
}
/**
* Logs when we receive reports regarding the tranmit power level used for a specific connection
*
* Logged from:
* system/bt
*/
message BluetoothDeviceTxPowerLevelReported {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Connection handle of this connection if available
// Range: 0x0000 - 0x0EFF (12 bits)
// Default: 0xFFFF if the handle is unknown
optional int32 connection_handle = 2;
// HCI command status code if this is triggered by hci_cmd
// Default: STATUS_UNKNOWN
optional android.bluetooth.hci.StatusEnum hci_status = 3;
// Range: -30 ≤ N ≤ 20
// Units: dBm
// Invalid when an out of range value is reported
optional int32 transmit_power_level = 4;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 5;
}
/**
* Logs when Bluetooth controller failed to reply with command status within a timeout period after
* receiving an HCI command from the host
*
* Logged from: system/bt
*/
message BluetoothHciTimeoutReported {
// HCI command associated with this event
// Default: CMD_UNKNOWN
optional android.bluetooth.hci.CommandEnum hci_command = 1;
}
/**
* Logs when we receive Bluetooth Link Quality Report event from the controller
* See Android Bluetooth HCI specification for more details
*
* Note: all count and bytes field are counted since last event
*
* Logged from: system/bt
*/
message BluetoothQualityReportReported {
// Quality report ID
// Original type: uint8_t
// Default: BQR_ID_UNKNOWN
optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1;
// Packet type of the connection
// Original type: uint8_t
// Default: BQR_PACKET_TYPE_UNKNOWN
optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2;
// Connection handle of the connection
// Original type: uint16_t
optional int32 connection_handle = 3;
// Performing Role for the connection
// Original type: uint8_t
optional int32 connection_role = 4;
// Current Transmit Power Level for the connection. This value is the same as the controller's
// response to the HCI_Read_Transmit_Power_Level HCI command
// Original type: uint8_t
optional int32 tx_power_level = 5;
// Received Signal Strength Indication (RSSI) value for the connection. This value is an
// absolute receiver signal strength value
// Original type: int8_t
optional int32 rssi = 6;
// Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the
// channels used by the link currently
// Original type: uint8_t
optional int32 snr = 7;
// Indicates the number of unused channels in AFH_channel_map
// Original type: uint8_t
optional int32 unused_afh_channel_count = 8;
// Indicates the number of the channels which are interfered and quality is bad but are still
// selected for AFH
// Original type: uint8_t
optional int32 afh_select_unideal_channel_count = 9;
// Current Link Supervision Timeout Setting
// Unit: N * 0.3125 ms (1 Bluetooth Clock)
// Original type: uint16_t
optional int32 lsto = 10;
// Piconet Clock for the specified Connection_Handle. This value is the same as the controller's
// response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of
// 0x01 (Piconet Clock)
// Unit: N * 0.3125 ms (1 Bluetooth Clock)
// Original type: uint32_t
optional int64 connection_piconet_clock = 11;
// The count of retransmission
// Original type: uint32_t
optional int64 retransmission_count = 12;
// The count of no RX
// Original type: uint32_t
optional int64 no_rx_count = 13;
// The count of NAK (Negative Acknowledge)
// Original type: uint32_t
optional int64 nak_count = 14;
// Controller timestamp of last TX ACK
// Unit: N * 0.3125 ms (1 Bluetooth Clock)
// Original type: uint32_t
optional int64 last_tx_ack_timestamp = 15;
// The count of Flow-off (STOP)
// Original type: uint32_t
optional int64 flow_off_count = 16;
// Controller timestamp of last Flow-on (GO)
// Unit: N * 0.3125 ms (1 Bluetooth Clock)
// Original type: uint32_t
optional int64 last_flow_on_timestamp = 17;
// Buffer overflow count (how many bytes of TX data are dropped) since the last event
// Original type: uint32_t
optional int64 buffer_overflow_bytes = 18;
// Buffer underflow count (in byte) since last event
// Original type: uint32_t
optional int64 buffer_underflow_bytes = 19;
}
/**
* Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack
*
* Notes:
* - Each event can be partially filled as we might learn different pieces of device
* information at different time
* - Multiple device info events can be combined to give more complete picture
* - When multiple device info events tries to describe the same information, the
* later one wins
*
* Logged from:
* packages/apps/Bluetooth
*/
message BluetoothDeviceInfoReported {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Where is this device info obtained from
optional android.bluetooth.DeviceInfoSrcEnum source_type = 2;
// Name of the data source
// For EXTERNAL: package name of the data source
// For INTERNAL: null for general case, component name otherwise
optional string source_name = 3;
// Name of the manufacturer of this device
optional string manufacturer = 4;
// Model of this device
optional string model = 5;
// Hardware version of this device
optional string hardware_version = 6;
// Software version of this device
optional string software_version = 7;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 8;
}
/**
* Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote
* device, as documented by the Bluetooth Core HCI specification
* Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification
* Vol 2, Part E, Page 1118
*
* Logged from:
* system/bt
*/
message BluetoothRemoteVersionInfoReported {
// Connection handle of the connection
// Original type: uint16_t
optional int32 connection_handle = 1;
// HCI command status code
// Default: STATUS_UNKNOWN
optional android.bluetooth.hci.StatusEnum hci_status = 2;
// 1 byte Version of current LMP in the remote controller
optional int32 lmp_version = 3;
// 2 bytes LMP manufacturer code of the remote controller
// https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
optional int32 lmp_manufacturer_code = 4;
// 4 bytes subversion of the LMP in the remote controller
optional int32 lmp_subversion = 5;
}
/**
* Logs when certain Bluetooth SDP attributes are discovered
* Constant definitions are from:
* https://www.bluetooth.com/specifications/assigned-numbers/service-discovery
*
* Current logged attributes:
* - BluetoothProfileDescriptorList
* - Supported Features Bitmask
*
* Logged from:
* system/bt
*/
message BluetoothSdpAttributeReported {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes
// Original type: uint16_t
optional int32 protocol_uuid = 2;
// Short form UUIDs used to identify Bluetooth SDP attribute types
// Original type: uint16_t
optional int32 attribute_id = 3;
// Attribute value for the particular attribute
optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 5;
}
/**
* Logs when bond state of a Bluetooth device changes
*
* Logged from:
* frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
* packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
*/
message BluetoothBondStateChanged {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Preferred transport type to remote dual mode device
// Default: TRANSPORT_AUTO means no preference
optional android.bluetooth.TransportTypeEnum transport = 2;
// The type of this Bluetooth device (Classic, LE, or Dual mode)
// Default: UNKNOWN
optional android.bluetooth.DeviceTypeEnum type = 3;
// Current bond state (NONE, BONDING, BONDED)
// Default: BOND_STATE_UNKNOWN
optional android.bluetooth.BondStateEnum bond_state = 4;
// Bonding sub state
// Default: BOND_SUB_STATE_UNKNOWN
optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5;
// Unbond Reason
// Default: UNBOND_REASON_UNKNOWN
optional android.bluetooth.UnbondReasonEnum unbond_reason = 6;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 7;
}
/**
* Logs there is an event related Bluetooth classic pairing
*
* Logged from:
* system/bt
*/
message BluetoothClassicPairingEventReported {
// An identifier that can be used to match events for this device.
// Currently, this is a salted hash of the MAC address of this Bluetooth device.
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
// Default: null or empty if the device identifier is not known
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
// Connection handle of this connection if available
// Range: 0x0000 - 0x0EFF (12 bits)
// Default: 0xFFFF if the handle is unknown
optional int32 connection_handle = 2;
// HCI command associated with this event
// Default: CMD_UNKNOWN
optional android.bluetooth.hci.CommandEnum hci_cmd = 3;
// HCI event associated with this event
// Default: EVT_UNKNOWN
optional android.bluetooth.hci.EventEnum hci_event = 4;
// HCI command status code if this is triggerred by hci_cmd
// Default: STATUS_UNKNOWN
optional android.bluetooth.hci.StatusEnum cmd_status = 5;
// HCI reason code associated with this event
// Default: STATUS_UNKNOWN
optional android.bluetooth.hci.StatusEnum reason_code = 6;
// A status value related to this specific event
// Default: 0
optional int64 event_value = 7;
// An identifier that can be used to match events for this device.
// The incremental identifier is locally generated and guaranteed not derived
// from any globally unique hardware id.
// For paired devices, it stays consistent between Bluetooth toggling for the
// same remote device.
// For unpaired devices, it stays consistent within the same Bluetooth adapter
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 8;