blob: e7ff27dbc62cb9a13a801b35957e9ba0c222951a [file] [log] [blame]
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -07001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -070018
19package android.os.statsd;
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -070020option java_package = "com.android.os";
Stefan Lafonae2df012017-11-14 09:17:21 -080021option java_outer_classname = "AtomsProto";
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -070022
Yao Chen9c1debe2018-02-19 14:39:19 -080023import "frameworks/base/cmds/statsd/src/atom_field_options.proto";
Bookatzdb026a22018-01-10 19:01:56 -080024import "frameworks/base/core/proto/android/app/enums.proto";
Tej Singh33a412b2018-03-16 18:43:59 -070025import "frameworks/base/core/proto/android/app/job/enums.proto";
Ben Blount763a5d52019-04-10 11:48:58 -070026import "frameworks/base/core/proto/android/app/settings_enums.proto";
Jack Hec27040a2019-01-09 20:54:41 -080027import "frameworks/base/core/proto/android/bluetooth/a2dp/enums.proto";
Tej Singh5d991e12018-03-09 19:48:11 -080028import "frameworks/base/core/proto/android/bluetooth/enums.proto";
Jack Heab86dbd22018-12-18 15:43:27 -080029import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto";
Jack Hed9837c82019-01-09 01:19:13 -080030import "frameworks/base/core/proto/android/bluetooth/hfp/enums.proto";
Jack He1021a612019-01-20 21:22:46 -080031import "frameworks/base/core/proto/android/bluetooth/smp/enums.proto";
Michael Groover9e7b06e2018-12-28 19:55:51 -080032import "frameworks/base/core/proto/android/debug/enums.proto";
Kevin Chyn1741a072019-01-17 11:54:40 -080033import "frameworks/base/core/proto/android/hardware/biometrics/enums.proto";
joshmccloskey8c3322e2019-01-09 18:25:57 -080034import "frameworks/base/core/proto/android/hardware/sensor/assist/enums.proto";
Chiachang Wangf6bedc22019-01-14 11:54:32 +080035import "frameworks/base/core/proto/android/net/networkcapabilities.proto";
Bookatz1a1b0462018-01-12 11:47:03 -080036import "frameworks/base/core/proto/android/os/enums.proto";
Chiachang Wangf6bedc22019-01-14 11:54:32 +080037import "frameworks/base/core/proto/android/server/connectivity/data_stall_event.proto";
Bookatz8bdae8d2018-01-16 11:24:30 -080038import "frameworks/base/core/proto/android/server/enums.proto";
Kweku Adams8845d012018-12-11 20:06:45 -080039import "frameworks/base/core/proto/android/server/job/enums.proto";
Bookatz48d362e2018-11-06 15:49:08 -080040import "frameworks/base/core/proto/android/server/location/enums.proto";
Yangsteraf9aee72018-10-12 09:26:16 -070041import "frameworks/base/core/proto/android/service/procstats_enum.proto";
Badhri Jagan Sridharan129c7292019-01-14 21:18:25 -080042import "frameworks/base/core/proto/android/service/usb.proto";
Chiachang Wang0e88ebf2019-03-21 10:18:07 +080043import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto";
lifr1f74b052019-04-16 22:16:30 +080044import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto";
Bookatz11257ca2018-12-05 18:22:39 -080045import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto";
46import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto";
Ben Blount763a5d52019-04-10 11:48:58 -070047import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto";
48import "frameworks/base/core/proto/android/stats/enums.proto";
49import "frameworks/base/core/proto/android/stats/intelligence/enums.proto";
Yao Chen8c433862018-10-24 14:09:20 -070050import "frameworks/base/core/proto/android/stats/launcher/launcher.proto";
Hongyi Zhang700137e2019-05-23 21:19:36 -070051import "frameworks/base/core/proto/android/stats/location/location_enums.proto";
Ray Essick8ab04df2019-02-15 11:01:02 -080052import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto";
Jeff Sharkey6bd21572019-11-15 20:45:33 -070053import "frameworks/base/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto";
Carmen Agimof6688a352019-01-30 19:36:04 +000054import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto";
Hyunyoung Song80adf6be2019-01-30 09:59:30 -080055import "frameworks/base/core/proto/android/stats/style/style_enums.proto";
Will Brockman079fdaa2020-01-12 16:45:03 -050056import "frameworks/base/core/proto/android/stats/sysui/notification_enums.proto";
Tej Singhc477d9c2018-02-05 18:31:39 -080057import "frameworks/base/core/proto/android/telecomm/enums.proto";
Bookatz1a1b0462018-01-12 11:47:03 -080058import "frameworks/base/core/proto/android/telephony/enums.proto";
59import "frameworks/base/core/proto/android/view/enums.proto";
Bookatz11257ca2018-12-05 18:22:39 -080060import "frameworks/base/core/proto/android/wifi/enums.proto";
Tony Make2b1b672019-07-29 16:59:47 +010061import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto";
Tianjie Xu167c3db2019-07-22 14:25:14 -070062import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto";
Joe Onorato62c220b2017-11-18 20:32:56 -080063
Yao Chend54f9dd2017-10-17 17:37:48 +000064/**
Stefan Lafonae2df012017-11-14 09:17:21 -080065 * The master atom class. This message defines all of the available
Yao Chend54f9dd2017-10-17 17:37:48 +000066 * raw stats log events from the Android system, also known as "atoms."
67 *
68 * This field contains a single oneof with all of the available messages.
69 * The stats-log-api-gen tool runs as part of the Android build and
70 * generates the android.util.StatsLog class, which contains the constants
71 * and methods that Android uses to log.
72 *
Stefan Lafonae2df012017-11-14 09:17:21 -080073 * This Atom class is not actually built into the Android system.
Yao Chend54f9dd2017-10-17 17:37:48 +000074 * Instead, statsd on Android constructs these messages synthetically,
75 * in the format defined here and in stats_log.proto.
76 */
Stefan Lafonae2df012017-11-14 09:17:21 -080077message Atom {
78 // Pushed atoms start at 2.
David Chenc8a43242017-10-17 16:23:28 -070079 oneof pushed {
Bookatzc1a050a2017-10-10 15:49:28 -070080 // For StatsLog reasons, 1 is illegal and will not work. Must start at 2.
Muhammad Qureshi100d2b62020-01-23 10:30:41 -080081 BleScanStateChanged ble_scan_state_changed = 2 [(module) = "bluetooth"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -080082 ProcessStateChanged process_state_changed = 3 [(module) = "framework"];
Muhammad Qureshi100d2b62020-01-23 10:30:41 -080083 BleScanResultReceived ble_scan_result_received = 4 [(module) = "bluetooth"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -080084 SensorStateChanged sensor_state_changed = 5 [(module) = "framework"];
85 GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"];
86 SyncStateChanged sync_state_changed = 7 [(module) = "framework"];
87 ScheduledJobStateChanged scheduled_job_state_changed = 8 [(module) = "framework"];
88 ScreenBrightnessChanged screen_brightness_changed = 9 [(module) = "framework"];
89 WakelockStateChanged wakelock_state_changed = 10 [(module) = "framework"];
90 LongPartialWakelockStateChanged long_partial_wakelock_state_changed =
91 11 [(module) = "framework"];
92 MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12 [(module) = "framework"];
93 WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(module) = "framework"];
94 ActivityManagerSleepStateChanged activity_manager_sleep_state_changed =
95 14 [(module) = "framework"];
96 MemoryFactorStateChanged memory_factor_state_changed = 15 [(module) = "framework"];
97 ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16 [(module) = "framework"];
98 CachedKillReported cached_kill_reported = 17 [(module) = "framework"];
99 ProcessMemoryStatReported process_memory_stat_reported = 18 [(module) = "framework"];
Muhammad Qureshi9bced7d2020-01-16 15:22:12 -0800100 LauncherUIChanged launcher_event = 19 [(module) = "sysui"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800101 BatterySaverModeStateChanged battery_saver_mode_state_changed = 20 [(module) = "framework"];
102 DeviceIdleModeStateChanged device_idle_mode_state_changed = 21 [(module) = "framework"];
103 DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22 [(module) = "framework"];
104 AudioStateChanged audio_state_changed = 23 [(module) = "framework"];
105 MediaCodecStateChanged media_codec_state_changed = 24 [(module) = "framework"];
106 CameraStateChanged camera_state_changed = 25 [(module) = "framework"];
107 FlashlightStateChanged flashlight_state_changed = 26 [(module) = "framework"];
108 UidProcessStateChanged uid_process_state_changed = 27 [(module) = "framework"];
109 ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28 [(module) = "framework"];
110 ScreenStateChanged screen_state_changed = 29 [(module) = "framework"];
111 BatteryLevelChanged battery_level_changed = 30 [(module) = "framework"];
112 ChargingStateChanged charging_state_changed = 31 [(module) = "framework"];
113 PluggedStateChanged plugged_state_changed = 32 [(module) = "framework"];
114 InteractiveStateChanged interactive_state_changed = 33 [(module) = "framework"];
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -0800115 TouchEventReported touch_event_reported = 34;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800116 WakeupAlarmOccurred wakeup_alarm_occurred = 35 [(module) = "framework"];
117 KernelWakeupReported kernel_wakeup_reported = 36 [(module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800118 WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"];
119 WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"];
120 WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800121 PhoneSignalStrengthChanged phone_signal_strength_changed = 40 [(module) = "framework"];
122 SettingChanged setting_changed = 41 [(module) = "framework"];
123 ActivityForegroundStateChanged activity_foreground_state_changed =
124 42 [(module) = "framework"];
125 IsolatedUidChanged isolated_uid_changed = 43 [(module) = "framework"];
126 PacketWakeupOccurred packet_wakeup_occurred = 44 [(module) = "framework"];
127 WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"];
Bookatz8fcd09a2017-12-18 13:01:10 -0800128 AnomalyDetected anomaly_detected = 46;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800129 AppBreadcrumbReported app_breadcrumb_reported =
130 47 [(allow_from_any_uid) = true, (module) = "framework"];
131 AppStartOccurred app_start_occurred = 48 [(module) = "framework"];
132 AppStartCanceled app_start_canceled = 49 [(module) = "framework"];
133 AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"];
Muhammad Qureshi79f068c2019-12-20 06:55:57 -0800134 LmkKillOccurred lmk_kill_occurred = 51 [(module) = "lmkd"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800135 PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800136 WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"];
Muhammad Qureshi79f068c2019-12-20 06:55:57 -0800137 LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800138 AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"];
139 ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"];
Tej Singh6483ea42018-01-25 17:45:49 -0800140 BootSequenceReported boot_sequence_reported = 57;
Andrei Oneada01ea52019-01-30 15:28:36 +0000141 DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800142 OverlayStateChanged overlay_state_changed = 59 [(module) = "framework"];
143 ForegroundServiceStateChanged foreground_service_state_changed
144 = 60 [(module) = "framework"];
Muhammad Qureshidbe9e812020-01-25 07:41:39 -0800145 CallStateChanged call_state_changed = 61 [(module) = "telecom"];
Muhammad Qureshi9bced7d2020-01-16 15:22:12 -0800146 KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"];
147 KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"];
148 KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800149 AppDied app_died = 65 [(module) = "framework"];
150 ResourceConfigurationChanged resource_configuration_changed = 66 [(module) = "framework"];
151 BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67 [(module) = "framework"];
Muhammad Qureshi100d2b62020-01-23 10:30:41 -0800152 BluetoothConnectionStateChanged bluetooth_connection_state_changed =
153 68 [(module) = "bluetooth"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800154 GpsSignalQualityChanged gps_signal_quality_changed = 69 [(module) = "framework"];
155 UsbConnectorStateChanged usb_connector_state_changed = 70 [(module) = "framework"];
Andrew Chant28d627e2018-02-22 15:17:05 -0800156 SpeakerImpedanceReported speaker_impedance_reported = 71;
157 HardwareFailed hardware_failed = 72;
158 PhysicalDropDetected physical_drop_detected = 73;
159 ChargeCyclesReported charge_cycles_reported = 74;
Muhammad Qureshia4efed82020-01-23 13:53:51 -0800160 MobileConnectionStateChanged mobile_connection_state_changed = 75 [(module) = "telephony"];
161 MobileRadioTechnologyChanged mobile_radio_technology_changed = 76 [(module) = "telephony"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800162 UsbDeviceAttached usb_device_attached = 77 [(module) = "framework"];
163 AppCrashOccurred app_crash_occurred = 78 [(module) = "framework"];
164 ANROccurred anr_occurred = 79 [(module) = "framework"];
165 WTFOccurred wtf_occurred = 80 [(module) = "framework"];
166 LowMemReported low_mem_reported = 81 [(module) = "framework"];
Howard Rocb767f62018-06-19 19:58:05 -0700167 GenericAtom generic_atom = 82;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800168 KeyValuePairsAtom key_value_pairs_atom =
169 83 [(allow_from_any_uid) = true, (module) = "framework"];
170 VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"];
171 DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"];
Tej Singha72344992019-04-17 18:55:08 -0700172 ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800173 BiometricAcquired biometric_acquired = 87 [(module) = "framework"];
174 BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"];
175 BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"];
176 UiEventReported ui_event_reported = 90 [(module) = "framework"];
Howard Roa46b6582018-09-18 16:45:02 -0700177 BatteryHealthSnapshot battery_health_snapshot = 91;
178 SlowIo slow_io = 92;
179 BatteryCausedShutdown battery_caused_shutdown = 93;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800180 PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"];
181 PhoneStateChanged phone_state_changed = 95 [(module) = "framework"];
arangelovd5db50e2018-10-12 20:24:39 +0100182 UserRestrictionChanged user_restriction_changed = 96;
Muhammad Qureshi9afad812020-01-23 15:04:59 -0800183 SettingsUIChanged settings_ui_changed = 97 [(module) = "settings"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800184 ConnectivityStateChanged connectivity_state_changed = 98 [(module) = "framework"];
Chenjie Yu75b3c492018-10-06 21:45:19 -0700185 // TODO: service state change is very noisy shortly after boot, as well
186 // as at other transitions - coming out of doze, device plugged in, etc.
187 // Consider removing this if it becomes a problem
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800188 ServiceStateChanged service_state_changed = 99 [(module) = "framework"];
189 ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"];
190 FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"];
191 BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "framework"];
192 DevicePolicyEvent device_policy_event = 103 [(module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800193 DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"];
194 DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported =
195 105 [(module) = "docsui"];
196 DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"];
197 DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"];
198 DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request =
199 108 [(module) = "docsui"];
200 DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"];
201 DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"];
202 DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"];
203 DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800204 WifiEnabledStateChanged wifi_enabled_state_changed = 113 [(module) = "framework"];
tsaichristinececebdc2020-02-04 14:05:56 -0800205 WifiRunningStateChanged wifi_running_state_changed = 114
206 [(module) = "framework", deprecated = true];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800207 AppCompacted app_compacted = 115 [(module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800208 NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"];
shawnlin9a1392a2019-04-09 16:21:17 +0800209 DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported =
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800210 117 [(module) = "docsui"];
211 DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"];
212 DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"];
213 DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"];
214 DataStallEvent data_stall_event = 121 [(module) = "network_stack"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800215 RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"];
216 SignedConfigReported signed_config_reported = 123 [(module) = "framework"];
217 GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"];
Muhammad Qureshi100d2b62020-01-23 10:30:41 -0800218 BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event =
219 125 [(module) = "bluetooth"];
220 BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed =
221 126 [(module) = "bluetooth"];
222 BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed =
223 127 [(module) = "bluetooth"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800224 AppDowngraded app_downgraded = 128 [(module) = "framework"];
Felix Lopez Luisd95346a2018-12-12 10:32:32 +0000225 AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800226 LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"];
227 GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"];
228 GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"];
Maggie Whitefc1aa592018-11-28 21:55:23 -0800229 UsbPortOverheatEvent usb_port_overheat_event_reported = 133;
Muhammad Qureshif9a5ab02020-01-25 19:43:27 -0800230 NfcErrorOccurred nfc_error_occurred = 134 [(module) = "nfc"];
231 NfcStateChanged nfc_state_changed = 135 [(module) = "nfc"];
232 NfcBeamOccurred nfc_beam_occurred = 136 [(module) = "nfc"];
233 NfcCardemulationOccurred nfc_cardemulation_occurred = 137 [(module) = "nfc"];
234 NfcTagOccurred nfc_tag_occurred = 138 [(module) = "nfc"];
235 NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139 [(module) = "nfc"];
Muhammad Qureshi70dfeb42020-01-24 20:11:44 -0800236 SeStateChanged se_state_changed = 140 [(module) = "secure_element"];
237 SeOmapiReported se_omapi_reported = 141 [(module) = "secure_element"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800238 BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported =
239 142 [(module) = "framework"];
240 AttentionManagerServiceResultReported attention_manager_service_result_reported =
241 143 [(module) = "framework"];
242 AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"];
Carter Hsub8fd1e92019-01-11 15:24:45 +0800243 SpeechDspStatReported speech_dsp_stat_reported = 145;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800244 UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"];
245 WatchdogRollbackOccurred watchdog_rollback_occurred = 147 [(module) = "framework"];
246 BiometricSystemHealthIssueDetected biometric_system_health_issue_detected =
247 148 [(module) = "framework"];
Muhammad Qureshi9bced7d2020-01-16 15:22:12 -0800248 BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800249 ScheduledJobConstraintChanged scheduled_job_constraint_changed =
250 150 [(module) = "framework"];
Muhammad Qureshi100d2b62020-01-23 10:30:41 -0800251 BluetoothActiveDeviceChanged bluetooth_active_device_changed =
252 151 [(module) = "bluetooth"];
253 BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed =
254 152 [(module) = "bluetooth"];
255 BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed =
256 153 [(module) = "bluetooth"];
257 BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed =
258 154 [(module) = "bluetooth"];
259 BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported =
260 155 [(module) = "bluetooth"];
261 BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported =
262 156 [(module) = "bluetooth"];
263 BluetoothDeviceRssiReported bluetooth_device_rssi_reported =
264 157 [(module) = "bluetooth"];
265 BluetoothDeviceFailedContactCounterReported
266 bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"];
267 BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported =
268 159 [(module) = "bluetooth"];
269 BluetoothHciTimeoutReported bluetooth_hci_timeout_reported =
270 160 [(module) = "bluetooth"];
271 BluetoothQualityReportReported bluetooth_quality_report_reported =
272 161 [(module) = "bluetooth"];
273 BluetoothDeviceInfoReported bluetooth_device_info_reported =
274 162 [(module) = "bluetooth"];
275 BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported =
276 163 [(module) = "bluetooth"];
277 BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported =
278 164 [(module) = "bluetooth"];
279 BluetoothBondStateChanged bluetooth_bond_state_changed =
280 165 [(module) = "bluetooth"];
281 BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported =
282 166 [(module) = "bluetooth"];
283 BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported =
284 167 [(module) = "bluetooth"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800285 ScreenTimeoutExtensionReported screen_timeout_extension_reported =
286 168 [(module) = "framework"];
287 ProcessStartTime process_start_time = 169 [(module) = "framework"];
Philip P. Moltmannb2f0c772019-04-11 14:41:21 -0700288 PermissionGrantRequestResultReported permission_grant_request_result_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800289 170 [(module) = "permissioncontroller"];
Jack He815cdba2019-01-30 17:24:55 -0800290 BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
Muhammad Qureshied8bca02020-01-24 16:07:49 -0800291 DeviceIdentifierAccessDenied device_identifier_access_denied =
292 172 [(module) = "telephony_common"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800293 BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"];
Muhammad Qureshi76b25242020-01-25 19:02:08 -0800294 AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"];
295 AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"];
296 AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800297 TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"];
298 HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true, (module) = "framework"];
Muhammad Qureshi9bced7d2020-01-16 15:22:12 -0800299 StyleUIChanged style_ui_changed = 179 [(module) = "sysui"];
Joel Galenson6f41b1062019-04-16 12:22:41 -0700300 PrivacyIndicatorsInteracted privacy_indicators_interacted =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800301 180 [(module) = "permissioncontroller"];
302 AppInstallOnExternalStorageReported app_install_on_external_storage_reported =
303 181 [(module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800304 NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800305 AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"];
306 BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"];
307 SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"];
308 TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"];
Muhammad Qureshi100d2b62020-01-23 10:30:41 -0800309 BluetoothClassOfDeviceReported bluetooth_class_of_device_reported =
310 187 [(module) = "bluetooth"];
Ben Blount763a5d52019-04-10 11:48:58 -0700311 IntelligenceEventReported intelligence_event_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800312 188 [(module) = "intelligence"];
313 ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed =
314 189 [(module) = "framework"];
Hai Zhang5d3328d2019-04-13 21:25:06 +0800315 RoleRequestResultReported role_request_result_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800316 190 [(module) = "permissioncontroller"];
Ray Essick8ab04df2019-02-15 11:01:02 -0800317 MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191;
318 MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192;
319 MediametricsAudiothreadReported mediametrics_audiothread_reported = 193;
320 MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194;
321 MediametricsCodecReported mediametrics_codec_reported = 195;
322 MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196;
323 MediametricsExtractorReported mediametrics_extractor_reported = 197;
324 MediametricsMediadrmReported mediametrics_mediadrm_reported = 198;
325 MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199;
326 MediametricsRecorderReported mediametrics_recorder_reported = 200;
Robert Shiha4beed32019-08-19 14:15:23 -0700327 MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201;
Muhammad Qureshi4ba4bac2020-01-25 23:48:53 -0800328 CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"];
329 GarageModeInfo garage_mode_info = 204 [(module) = "car"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800330 TestAtomReported test_atom_reported = 205 [(module) = "cts"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800331 ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported =
332 206 [(module) = "framework"];
333 ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"];
334 ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"];
335 ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"];
336 LocationManagerApiUsageReported location_manager_api_usage_reported =
337 210 [(module) = "framework"];
Stanislav Zholninbdf620b2019-06-06 22:38:33 +0100338 ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800339 211 [(module) = "permissioncontroller"];
Stanislav Zholnin247d1b72019-06-06 21:28:44 +0100340 RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800341 212 [(module) = "permissioncontroller"];
Stanislav Zholninbdf620b2019-06-06 22:38:33 +0100342 GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800343 213 [(module) = "permissioncontroller"];
Stanislav Zholnin375e2ab2019-05-29 13:07:35 +0100344 LocationAccessCheckNotificationAction location_access_check_notification_action =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800345 214 [(module) = "permissioncontroller"];
Stanislav Zholnin3e0f9bc2019-05-23 19:03:55 +0100346 AppPermissionFragmentActionReported app_permission_fragment_action_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800347 215 [(module) = "permissioncontroller"];
Stanislav Zholninc9dda9e2019-06-02 20:50:13 +0100348 AppPermissionFragmentViewed app_permission_fragment_viewed =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800349 216 [(module) = "permissioncontroller"];
Stanislav Zholnindc3e2b32019-06-06 18:10:14 +0100350 AppPermissionsFragmentViewed app_permissions_fragment_viewed =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800351 217 [(module) = "permissioncontroller"];
Stanislav Zholnin32a89c12019-06-04 14:59:21 +0100352 PermissionAppsFragmentViewed permission_apps_fragment_viewed =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800353 218 [(module) = "permissioncontroller"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800354 TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"];
355 TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"];
356 ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"];
357 LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800358 ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"];
Muhammad Qureshi9bced7d2020-01-16 15:22:12 -0800359 BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"];
Tianjie Xu167c3db2019-07-22 14:25:14 -0700360 UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225;
361 UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800362 CameraActionEvent camera_action_event = 227 [(module) = "framework"];
atrost01a20932019-08-28 15:40:37 +0100363 AppCompatibilityChangeReported app_compatibility_change_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800364 228 [(allow_from_any_uid) = true, (module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800365 PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"];
Muhammad Qureshi4ba4bac2020-01-25 23:48:53 -0800366 VmsClientConnectionStateChanged vms_client_connection_state_changed =
367 230 [(module) = "car"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800368 MediaProviderScanEvent media_provider_scan_event = 233 [(module) = "mediaprovider"];
369 MediaProviderDeletionEvent media_provider_deletion_event = 234 [(module) = "mediaprovider"];
Jeff Sharkey6bd21572019-11-15 20:45:33 -0700370 MediaProviderPermissionEvent media_provider_permission_event =
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800371 235 [(module) = "mediaprovider"];
372 MediaProviderSchemaChange media_provider_schema_change = 236 [(module) = "mediaprovider"];
Jeff Sharkey6bd21572019-11-15 20:45:33 -0700373 MediaProviderIdleMaintenance media_provider_idle_maintenance =
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800374 237 [(module) = "mediaprovider"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800375 RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"];
376 BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"];
377 BootTimeEventElapsedTime boot_time_event_elapsed_time_reported =
378 240 [(module) = "framework"];
Keun young Park3e033cb2019-12-18 11:27:35 -0800379 BootTimeEventUtcTime boot_time_event_utc_time_reported = 241;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800380 BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"];
Nikita Ioffe41dd57e2020-01-10 16:05:08 +0000381 UserspaceRebootReported userspace_reboot_reported = 243;
Muhammad Qureshi550b84c2020-02-03 14:17:59 -0800382 NotificationReported notification_reported = 244 [(module) = "framework"];
Will Brockman079fdaa2020-01-12 16:45:03 -0500383 NotificationPanelReported notification_panel_reported = 245;
384 NotificationChannelModified notification_panel_modified = 246;
Muhammad Qureshie2b24322020-01-28 10:54:17 -0800385 IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"];
386 IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"];
Jordan Liubedfa702019-12-20 15:08:45 -0800387 CellBroadcastMessageReported cb_message_reported =
388 249 [(module) = "cellbroadcast"];
389 CellBroadcastMessageError cb_message_error =
390 250 [(module) = "cellbroadcast"];
xshu2c3d9e42019-09-26 17:54:02 -0700391 WifiHealthStatReported wifi_health_stat_reported = 251 [(module) = "wifi"];
392 WifiFailureStatReported wifi_failure_stat_reported = 252 [(module) = "wifi"];
393 WifiConnectionResultReported wifi_connection_result_reported = 253 [(module) = "wifi"];
Yao Chend54f9dd2017-10-17 17:37:48 +0000394 }
David Chenc8a43242017-10-17 16:23:28 -0700395
David Chen6e3e6cb2018-01-03 16:14:06 -0800396 // Pulled events will start at field 10000.
Rafal Slawikbdd5a502020-01-14 14:14:29 +0000397 // Next: 10071
David Chenc8a43242017-10-17 16:23:28 -0700398 oneof pulled {
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800399 WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"];
400 WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"];
401 MobileBytesTransfer mobile_bytes_transfer = 10002 [(module) = "framework"];
402 MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003 [(module) = "framework"];
403 BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"];
404 KernelWakelock kernel_wakelock = 10004 [(module) = "framework"];
Chenjie Yuc8b7f222018-01-11 23:25:57 -0800405 SubsystemSleepState subsystem_sleep_state = 10005;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800406 CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"];
407 CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework"];
408 CpuTimePerUidFreq cpu_time_per_uid_freq = 10010 [(module) = "framework"];
409 WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"];
410 ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"];
411 BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"];
412 ProcessMemoryState process_memory_state = 10013 [(module) = "framework"];
413 SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"];
414 SystemUptime system_uptime = 10015 [(module) = "framework"];
415 CpuActiveTime cpu_active_time = 10016 [(module) = "framework"];
416 CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"];
Tej Singh86dc9db2018-09-06 00:39:57 +0000417 DiskSpace disk_space = 10018 [deprecated=true];
Jeffrey Huang43f4d262020-01-30 14:03:31 -0800418 RemainingBatteryCapacity remaining_battery_capacity = 10019 [(module) = "framework"];
419 FullBatteryCapacity full_battery_capacity = 10020 [(module) = "framework"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800420 Temperature temperature = 10021 [(module) = "framework"];
421 BinderCalls binder_calls = 10022 [(module) = "framework"];
422 BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"];
423 LooperStats looper_stats = 10024 [(module) = "framework"];
424 DiskStats disk_stats = 10025 [(module) = "framework"];
425 DirectoryUsage directory_usage = 10026 [(module) = "framework"];
426 AppSize app_size = 10027 [(module) = "framework"];
427 CategorySize category_size = 10028 [(module) = "framework"];
428 ProcStats proc_stats = 10029 [(module) = "framework"];
Jeffrey Huang43f4d262020-01-30 14:03:31 -0800429 BatteryVoltage battery_voltage = 10030 [(module) = "framework"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800430 NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"];
431 DiskIo disk_io = 10032 [(module) = "framework"];
432 PowerProfile power_profile = 10033 [(module) = "framework"];
433 ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"];
434 ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"];
435 CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"];
Bookatz92da2832018-11-01 18:10:03 -0700436 OnDevicePowerMeasurement on_device_power_measurement = 10038;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800437 DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"];
438 DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid =
439 10040 [(module) = "framework"];
440 DeviceCalculatedPowerBlameOther device_calculated_power_blame_other =
441 10041 [(module) = "framework"];
442 ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"];
Jeffrey Huang9a3c1b62020-01-27 17:33:13 -0800443 BatteryLevel battery_level = 10043 [(module) = "framework"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800444 BuildInformation build_information = 10044 [(module) = "framework"];
Jeffrey Huang43f4d262020-01-30 14:03:31 -0800445 BatteryCycleCount battery_cycle_count = 10045 [(module) = "framework"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800446 DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"];
447 DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"];
448 NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"];
449 RoleHolder role_holder = 10049 [(module) = "framework"];
450 DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"];
Chenjie Yue13f44a2019-02-07 17:51:38 -0800451 TrainInfo train_info = 10051;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800452 TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"];
453 ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"];
Yiwei Zhang5c81b632019-03-01 15:39:46 -0800454 GpuStatsGlobalInfo gpu_stats_global_info = 10054;
455 GpuStatsAppInfo gpu_stats_app_info = 10055;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800456 SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"];
457 AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"];
458 FaceSettings face_settings = 10058 [(module) = "framework"];
459 CoolingDevice cooling_device = 10059 [(module) = "framework"];
460 AppOps app_ops = 10060 [(module) = "framework"];
461 ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"];
Alec Mourie088e762019-07-02 13:10:55 -0700462 SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062;
463 SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800464 ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"];
Muhammad Qureshi4ba4bac2020-01-25 23:48:53 -0800465 VmsClientStats vms_client_stats = 10065 [(module) = "car"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800466 NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"];
467 DangerousPermissionStateSampled dangerous_permission_state_sampled =
468 10067 [(module) = "framework"];
Stan Iliev637ba5e2019-08-16 13:43:08 -0400469 GraphicsStats graphics_stats = 10068;
Stanislav Zholnin88c6f322020-01-29 14:48:11 +0000470 RuntimeAppOpAccess runtime_app_op_access = 10069 [(module) = "framework"];
Kenny Root6c218db2020-02-02 17:43:44 +0000471 IonHeapSize ion_heap_size = 10070 [(module) = "framework"];
David Chenc8a43242017-10-17 16:23:28 -0700472 }
yroa1fe77c2018-02-26 14:22:54 -0800473
Bookatz76aafcf2018-09-17 16:17:10 -0700474 // DO NOT USE field numbers above 100,000 in AOSP.
475 // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use.
476 // Field numbers 200,000 and above are reserved for future use; do not use them at all.
Rafal Slawik203c3db2019-09-25 19:53:01 +0100477
478 reserved 10036;
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700479}
480
Yao Chend54f9dd2017-10-17 17:37:48 +0000481/**
Yangster-mac20877162017-12-22 17:19:39 -0800482 * This proto represents a node of an attribution chain.
483 * Note: All attribution chains are represented as a repeated field of type
484 * AttributionNode. It is understood that in such arrays, the order is that
485 * of calls, that is [A, B, C] if A calls B that calls C.
Yao Chend54f9dd2017-10-17 17:37:48 +0000486 */
Yangster-mac20877162017-12-22 17:19:39 -0800487message AttributionNode {
488 // The uid for a given element in the attribution chain.
Yangster-mac7604aea2017-12-11 22:55:49 -0800489 optional int32 uid = 1;
Yangster-mac7604aea2017-12-11 22:55:49 -0800490
Yangster-mac20877162017-12-22 17:19:39 -0800491 // The (optional) string tag for an element in the attribution chain. If the
492 // element has no tag, it is encoded as an empty string.
493 optional string tag = 2;
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700494}
495
Yangster-mac48b3d622018-08-18 12:38:11 -0700496message KeyValuePair {
497 optional int32 key = 1;
498 oneof value {
Howard Ro4078dd42018-09-27 17:41:08 -0700499 int32 value_int = 2;
500 int64 value_long = 3;
501 string value_str = 4;
502 float value_float = 5;
Yangster-mac48b3d622018-08-18 12:38:11 -0700503 }
504}
505
506message KeyValuePairsAtom {
507 optional int32 uid = 1;
508 repeated KeyValuePair pairs = 2;
509}
510
Yao Chend54f9dd2017-10-17 17:37:48 +0000511/*
512 * *****************************************************************************
yrode4ca102017-11-15 22:57:24 -0800513 * Below are all of the individual atoms that are logged by Android via statsd.
Yao Chend54f9dd2017-10-17 17:37:48 +0000514 *
515 * RULES:
516 * - The field ids for each atom must start at 1, and count upwards by 1.
517 * Skipping field ids is not allowed.
518 * - These form an API, so renaming, renumbering or removing fields is
519 * not allowed between android releases. (This is not currently enforced,
520 * but there will be a tool to enforce this restriction).
521 * - The types must be built-in protocol buffer types, namely, no sub-messages
522 * are allowed (yet). The bytes type is also not allowed.
523 * - The CamelCase name of the message type should match the
Stefan Lafonae2df012017-11-14 09:17:21 -0800524 * underscore_separated name as defined in Atom.
Yao Chend54f9dd2017-10-17 17:37:48 +0000525 * - If an atom represents work that can be attributed to an app, there can
Yangster-mac7604aea2017-12-11 22:55:49 -0800526 * be exactly one AttributionChain field. It must be field number 1.
Yao Chend54f9dd2017-10-17 17:37:48 +0000527 * - A field that is a uid should be a string field, tagged with the [xxx]
528 * annotation. The generated code on android will be represented by UIDs,
529 * and those UIDs will be translated in xxx to those strings.
530 *
531 * CONVENTIONS:
Bookatzc1a050a2017-10-10 15:49:28 -0700532 * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange.
Yao Chend54f9dd2017-10-17 17:37:48 +0000533 * - If there is a UID, it goes first. Think in an object-oriented fashion.
534 * *****************************************************************************
535 */
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700536
Yao Chend54f9dd2017-10-17 17:37:48 +0000537/**
Tej Singha72344992019-04-17 18:55:08 -0700538 * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged.
Yangster-mace16189a2018-08-26 12:20:16 -0700539 * Logs when the Thermal service HAL notifies the throttling start/stop events.
540 *
541 * Logged from:
542 * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
543 */
544message ThermalThrottlingStateChanged {
Maggie White442b6312019-04-05 16:26:44 -0700545 // The type of temperature being reported (CPU, GPU, SKIN, etc)
Yangster-mace16189a2018-08-26 12:20:16 -0700546 optional android.os.TemperatureTypeEnum sensor_type = 1;
547
Maggie White442b6312019-04-05 16:26:44 -0700548 // Throttling state, this field is DEPRECATED
Yangster-mace16189a2018-08-26 12:20:16 -0700549 enum State {
550 UNKNOWN = 0;
Maggie White442b6312019-04-05 16:26:44 -0700551 START = 1; // START indicated that throttling was triggered.
552 STOP = 2; // STOP indicates that throttling was cleared.
Yangster-mace16189a2018-08-26 12:20:16 -0700553 }
Yangster-mace16189a2018-08-26 12:20:16 -0700554 optional State state = 2;
555
556 optional float temperature = 3;
557}
558
559/**
Yao Chend54f9dd2017-10-17 17:37:48 +0000560 * Logs when the screen state changes.
561 *
562 * Logged from:
563 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
564 */
565message ScreenStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -0800566 // New screen state, from frameworks/base/core/proto/android/view/enums.proto.
tsaichristine5adc7e02020-01-14 17:07:39 -0800567 optional android.view.DisplayStateEnum state = 1
568 [(state_field_option).option = EXCLUSIVE_STATE, (state_field_option).nested = false];
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700569}
Yao Chend54f9dd2017-10-17 17:37:48 +0000570
571/**
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700572 * Logs that the process state of the uid, as determined by ActivityManager
573 * (i.e. the highest process state of that uid's processes) has changed.
Yao Chend54f9dd2017-10-17 17:37:48 +0000574 *
575 * Logged from:
576 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
577 */
Bookatzc1a050a2017-10-10 15:49:28 -0700578message UidProcessStateChanged {
tsaichristine5adc7e02020-01-14 17:07:39 -0800579 optional int32 uid = 1 [(state_field_option).option = PRIMARY_FIELD, (is_uid) = true];
Yao Chend54f9dd2017-10-17 17:37:48 +0000580
Bookatzdb026a22018-01-10 19:01:56 -0800581 // The state, from frameworks/base/core/proto/android/app/enums.proto.
tsaichristine5adc7e02020-01-14 17:07:39 -0800582 optional android.app.ProcessStateEnum state = 2
583 [(state_field_option).option = EXCLUSIVE_STATE, (state_field_option).nested = false];
Yao Chend54f9dd2017-10-17 17:37:48 +0000584}
585
586/**
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700587 * Logs process state change of a process, as per the activity manager.
588 *
589 * Logged from:
590 * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
591 */
592message ProcessStateChanged {
593 optional int32 uid = 1;
594 optional string process_name = 2;
595 optional string package_name = 3;
596 // TODO: remove this when validation is done
597 optional int64 version = 5;
598 // The state, from frameworks/base/core/proto/android/app/enums.proto.
599 optional android.app.ProcessStateEnum state = 4;
600}
601
602/**
603 * Logs when ActivityManagerService sleep state is changed.
604 *
605 * Logged from:
606 * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java
607 */
608message ActivityManagerSleepStateChanged {
609 // TODO: import frameworks proto
610 enum State {
611 UNKNOWN = 0;
612 ASLEEP = 1;
613 AWAKE = 2;
614 }
tsaichristine5adc7e02020-01-14 17:07:39 -0800615 optional State state = 1 [(state_field_option).option = EXCLUSIVE_STATE];
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700616}
617
618/**
619 * Logs when system memory state changes.
620 *
621 * Logged from:
622 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
623 */
624message MemoryFactorStateChanged {
625 // TODO: import frameworks proto
626 enum State {
627 MEMORY_UNKNOWN = 0;
628 NORMAL = 1; // normal.
629 MODERATE = 2; // moderate memory pressure.
630 LOW = 3; // low memory.
631 CRITICAL = 4; // critical memory.
632
633 }
tsaichristine5adc7e02020-01-14 17:07:39 -0800634 optional State factor = 1 [(state_field_option).option = EXCLUSIVE_STATE];
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700635}
636
637/**
638 * Logs when app is using too much cpu, according to ActivityManagerService.
639 *
640 * Logged from:
641 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
642 */
643message ExcessiveCpuUsageReported {
644 optional int32 uid = 1;
645 optional string process_name = 2;
646 optional string package_name = 3;
647 // package version. TODO: remove this when validation is done
648 optional int64 version = 4;
649}
650
651/**
652 * Logs when a cached process is killed, along with its pss.
653 *
654 * Logged from:
655 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
656 */
657message CachedKillReported {
658 optional int32 uid = 1;
659 optional string process_name = 2;
660 optional string package_name = 3;
661 // TODO: remove this when validation is done
662 optional int64 version = 5;
663 optional int64 pss = 4;
664}
665
666/**
xshu2c3d9e42019-09-26 17:54:02 -0700667 * Logs the change in wifi health.
668 *
669 * Logged from:
670 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDataStall.java
671 */
672message WifiHealthStatReported {
673 // duration this stat is obtained over in milliseconds
674 optional int32 duration_millis = 1;
675 // whether wifi is classified as sufficient for the user's data traffic, determined
676 // by whether the calculated throughput exceeds the average demand within |duration_millis|
677 optional bool is_sufficient = 2;
678 // whether the calculated throughput is exceeds the minimum required for typical usage
679 optional bool is_throughput_good = 3;
680 // whether cellular data is available
681 optional bool is_cell_data_available = 4;
682 // the WLAN channel the connected network is on (ie. 2412)
683 optional int32 frequency = 5;
684}
685
686/**
687 * Logged when wifi detects a significant change in connection failure rate.
688 *
689 * Logged from: frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiHealthMonitor.java
690 *
691 */
692message WifiFailureStatReported {
693 enum AbnormalityType {
694 UNKNOWN = 0;
695 SIGNIFICANT_INCREASE = 1;
696 SIGNIFICANT_DECREASE = 2;
697 SIMPLY_HIGH = 3;
698 }
699 enum FailureType {
700 FAILURE_UNKNOWN = 0;
701 FAILURE_CONNECTION = 1;
702 FAILURE_ASSOCIATION_REJECTION = 2;
703 FAILURE_ASSOCIATION_TIMEOUT = 3;
704 FAILURE_AUTHENTICATION = 4;
705 FAILURE_NON_LOCAL_DISCONNECTION = 5;
706 FAILURE_SHORT_CONNECTION_DUE_TO_NON_LOCAL_DISCONNECTION = 6;
707 }
708 // Reason for uploading this stat
709 optional AbnormalityType abnormality_type = 1;
710 // The particular type of failure
711 optional FailureType failure_type = 2;
712 // How many times we have encountered this combination of AbnormalityType and FailureType
713 optional int32 failure_count = 3;
714}
715
716/**
717 * Logs whether a wifi connection is successful and reasons for failure if it isn't.
718 *
719 * Logged from:
720 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
721 */
722message WifiConnectionResultReported {
723 enum FailureCode {
724 FAILURE_UNKNOWN = 0;
725 FAILURE_ASSOCIATION_TIMEOUT = 1;
726 FAILURE_ASSOCIATION_REJECTION = 2;
727 FAILURE_AUTHENTICATION_GENERAL = 3;
728 FAILURE_AUTHENTICATION_EAP = 4;
729 FAILURE_DHCP = 5;
730 FAILURE_NETWORK_DISCONNECTION = 6;
731 FAILURE_ROAM_TIMEOUT = 7;
732 }
733 // true represents a successful connection
734 optional bool connection_result = 1;
735 // reason for the connection failure
736 optional FailureCode failure_code = 2;
737 // scan rssi before the connection attempt
738 optional int32 rssi = 3;
739}
740
741/**
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700742 * Logs when memory stats of a process is reported.
743 *
744 * Logged from:
745 * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
746 */
747message ProcessMemoryStatReported {
748 optional int32 uid = 1;
749 optional string process_name = 2;
750 optional string package_name = 3;
751 //TODO: remove this when validation is done
752 optional int64 version = 9;
753 optional int64 pss = 4;
754 optional int64 uss = 5;
755 optional int64 rss = 6;
756 enum Type {
757 ADD_PSS_INTERNAL_SINGLE = 0;
758 ADD_PSS_INTERNAL_ALL_MEM = 1;
759 ADD_PSS_INTERNAL_ALL_POLL = 2;
760 ADD_PSS_EXTERNAL = 3;
761 ADD_PSS_EXTERNAL_SLOW = 4;
762 }
763 optional Type type = 7;
Muhammad Qureshidda73202019-03-07 13:54:20 -0800764 optional int64 duration_millis = 8;
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700765}
766
767/**
Bookatzc1a050a2017-10-10 15:49:28 -0700768 * Logs that a process started, finished, crashed, or ANRed.
769 *
770 * Logged from:
771 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
772 */
773message ProcessLifeCycleStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -0700774 optional int32 uid = 1 [(is_uid) = true];
Bookatzc1a050a2017-10-10 15:49:28 -0700775
David Chen0b5c90c2018-01-25 16:51:49 -0800776 // The process name (usually same as the app name).
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800777 optional string process_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700778
Bookatzddccf0a2017-11-28 16:48:14 -0800779 // What lifecycle state the process changed to.
780 // This enum is specific to atoms.proto.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800781 enum State {
782 FINISHED = 0;
783 STARTED = 1;
784 CRASHED = 2;
Bookatzddccf0a2017-11-28 16:48:14 -0800785 }
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800786 optional State state = 3;
Bookatzc1a050a2017-10-10 15:49:28 -0700787}
788
Bookatzc1a050a2017-10-10 15:49:28 -0700789/**
790 * Logs when the ble scan state changes.
791 *
792 * Logged from:
Bookatz17a879d2018-03-28 15:05:28 -0700793 * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
Bookatzc1a050a2017-10-10 15:49:28 -0700794 */
795message BleScanStateChanged {
tsaichristine5adc7e02020-01-14 17:07:39 -0800796 repeated AttributionNode attribution_node = 1
797 [(state_field_option).option = PRIMARY_FIELD_FIRST_UID];
Bookatzc1a050a2017-10-10 15:49:28 -0700798
799 enum State {
800 OFF = 0;
801 ON = 1;
Bookatze5ec0b42018-03-26 13:34:56 -0700802 // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes).
803 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700804 }
tsaichristine5adc7e02020-01-14 17:07:39 -0800805 optional State state = 2 [
806 (state_field_option).option = EXCLUSIVE_STATE,
807 (state_field_option).default_state_value = 0 /* State.OFF */,
808 (state_field_option).reset_state_value = 2 /* State.RESET */,
809 (state_field_option).nested = true
810 ];
Bookatzc1a050a2017-10-10 15:49:28 -0700811
Bookatze5ec0b42018-03-26 13:34:56 -0700812 // Does the scan have a filter.
tsaichristine5adc7e02020-01-14 17:07:39 -0800813 optional bool is_filtered = 3 [(state_field_option).option = PRIMARY_FIELD];
Bookatze5ec0b42018-03-26 13:34:56 -0700814 // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally.
tsaichristine5adc7e02020-01-14 17:07:39 -0800815 optional bool is_first_match = 4 [(state_field_option).option = PRIMARY_FIELD];
Bookatze5ec0b42018-03-26 13:34:56 -0700816 // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC).
tsaichristine5adc7e02020-01-14 17:07:39 -0800817 optional bool is_opportunistic = 5 [(state_field_option).option = PRIMARY_FIELD];
Bookatzc1a050a2017-10-10 15:49:28 -0700818}
819
820/**
821 * Logs reporting of a ble scan finding results.
822 *
823 * Logged from:
Bookatzae6738e2018-09-13 11:38:56 -0700824 * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
Bookatzc1a050a2017-10-10 15:49:28 -0700825 */
Bookatzae6738e2018-09-13 11:38:56 -0700826// TODO: Consider also tracking per-scanner-id.
Bookatzc1a050a2017-10-10 15:49:28 -0700827message BleScanResultReceived {
Yangster-macafad8c62018-01-05 22:30:49 -0800828 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700829
830 // Number of ble scan results returned.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800831 optional int32 num_results = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700832}
833
834/**
835 * Logs when a sensor state changes.
836 *
837 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700838 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700839 */
840message SensorStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800841 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700842
Bookatzc1a050a2017-10-10 15:49:28 -0700843 // The id (int) of the sensor.
844 optional int32 sensor_id = 2;
845
846 enum State {
847 OFF = 0;
848 ON = 1;
849 }
850 optional State state = 3;
851}
852
Bookatzc1a050a2017-10-10 15:49:28 -0700853/**
854 * Logs when GPS state changes.
855 *
856 * Logged from:
857 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
858 */
859message GpsScanStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800860 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700861
862 enum State {
863 OFF = 0;
864 ON = 1;
865 }
866 optional State state = 2;
867}
868
Bookatz48d362e2018-11-06 15:49:08 -0800869/**
870 * Logs when GPS signal quality.
871 *
872 * Logged from:
873 * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
874 */
875message GpsSignalQualityChanged {
876 optional android.server.location.GpsSignalQualityEnum level = 1;
877}
878
Bookatzc1a050a2017-10-10 15:49:28 -0700879
880/**
881 * Logs when a sync manager sync state changes.
882 *
883 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700884 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700885 */
886message SyncStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800887 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700888
David Chen0b5c90c2018-01-25 16:51:49 -0800889 // Name of the sync (as named in the app). Can be chosen at run-time.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800890 optional string sync_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700891
892 enum State {
893 OFF = 0;
894 ON = 1;
895 }
896 optional State state = 3;
897}
898
Yangster-mac96353002018-09-05 11:18:55 -0700899/*
900 * Deferred job stats.
901 *
902 * Logged from:
903 * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java
904*/
905message DeferredJobStatsReported {
906 repeated AttributionNode attribution_node = 1;
907
908 // Number of jobs deferred.
909 optional int32 num_jobs_deferred = 2;
910
911 // Time since the last job runs.
912 optional int64 time_since_last_job_millis = 3;
913}
914
Bookatzc1a050a2017-10-10 15:49:28 -0700915/**
916 * Logs when a job scheduler job state changes.
917 *
918 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700919 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700920 */
921message ScheduledJobStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800922 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700923
924 // Name of the job (as named in the app)
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800925 optional string job_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700926
927 enum State {
Tej Singhd5747a62018-01-08 20:57:35 -0800928 FINISHED = 0;
929 STARTED = 1;
930 SCHEDULED = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700931 }
932 optional State state = 3;
933
Tej Singh33a412b2018-03-16 18:43:59 -0700934 // The reason a job has stopped.
935 // This is only applicable when the state is FINISHED.
Bookatz235343d2018-03-26 13:03:50 -0700936 // The default value is STOP_REASON_UNKNOWN.
Tej Singh33a412b2018-03-16 18:43:59 -0700937 optional android.app.job.StopReasonEnum stop_reason = 4;
Ben Murdoch741e3352019-05-09 11:27:28 +0100938
939 // The standby bucket of the app that scheduled the job. These match the framework constants
940 // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is
941 // already assigned 0.
942 enum Bucket {
943 UNKNOWN = -1;
944 ACTIVE = 0;
945 WORKING_SET = 1;
946 FREQUENT = 2;
947 RARE = 3;
948 NEVER = 4;
Kweku Adamsae9d6be2020-01-14 16:10:14 -0800949 RESTRICTED = 5;
Ben Murdoch741e3352019-05-09 11:27:28 +0100950 }
951 optional Bucket standby_bucket = 5 [default = UNKNOWN];
952
953 // The job id (as assigned by the app).
954 optional int32 job_id = 6;
Bookatzc1a050a2017-10-10 15:49:28 -0700955}
956
957/**
958 * Logs when the audio state changes.
959 *
960 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700961 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700962 */
963message AudioStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800964 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700965
966 enum State {
967 OFF = 0;
968 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700969 // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes).
970 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700971 }
972 optional State state = 2;
973}
974
975/**
976 * Logs when the video codec state changes.
977 *
978 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700979 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700980 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800981message MediaCodecStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800982 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700983
984 enum State {
985 OFF = 0;
986 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700987 // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes).
988 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700989 }
990 optional State state = 2;
991}
992
993/**
994 * Logs when the flashlight state changes.
995 *
996 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700997 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700998 */
999message FlashlightStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001000 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -07001001
1002 enum State {
1003 OFF = 0;
1004 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -07001005 // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes).
1006 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -07001007 }
1008 optional State state = 2;
1009}
1010
1011/**
1012 * Logs when the camera state changes.
1013 *
1014 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -07001015 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -07001016 */
1017message CameraStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001018 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -07001019
1020 enum State {
1021 OFF = 0;
1022 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -07001023 // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes).
1024 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -07001025 }
1026 optional State state = 2;
1027}
1028
1029/**
1030 * Logs that the state of a wakelock (per app and per wakelock name) has changed.
Yao Chend54f9dd2017-10-17 17:37:48 +00001031 *
1032 * Logged from:
1033 * TODO
1034 */
Bookatzd6746242017-10-24 18:39:35 -07001035message WakelockStateChanged {
tsaichristineed615642020-01-02 12:53:41 -08001036 repeated AttributionNode attribution_node = 1
1037 [(state_field_option).option = PRIMARY_FIELD_FIRST_UID];
Yao Chend54f9dd2017-10-17 17:37:48 +00001038
Bookatz1a1b0462018-01-12 11:47:03 -08001039 // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock.
1040 // From frameworks/base/core/proto/android/os/enums.proto.
tsaichristine5adc7e02020-01-14 17:07:39 -08001041 optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).option = PRIMARY_FIELD];
tsaichristineed615642020-01-02 12:53:41 -08001042 ;
Bookatzc1a050a2017-10-10 15:49:28 -07001043
1044 // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
tsaichristine5adc7e02020-01-14 17:07:39 -08001045 optional string tag = 3 [(state_field_option).option = PRIMARY_FIELD];
Bookatzc1a050a2017-10-10 15:49:28 -07001046
1047 enum State {
Yangster-maccfdf3a42017-12-06 13:42:38 -08001048 RELEASE = 0;
1049 ACQUIRE = 1;
1050 CHANGE_RELEASE = 2;
1051 CHANGE_ACQUIRE = 3;
Bookatzc1a050a2017-10-10 15:49:28 -07001052 }
tsaichristine5adc7e02020-01-14 17:07:39 -08001053 optional State state = 4 [
1054 (state_field_option).option = EXCLUSIVE_STATE,
1055 (state_field_option).default_state_value = 0,
1056 (state_field_option).nested = true
1057 ];
Bookatzc1a050a2017-10-10 15:49:28 -07001058}
1059
1060/**
Bookatzc1a050a2017-10-10 15:49:28 -07001061 * Logs when a partial wakelock is considered 'long' (over 1 min).
1062 *
1063 * Logged from:
1064 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
1065 */
1066message LongPartialWakelockStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001067 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -07001068
Yao Chend54f9dd2017-10-17 17:37:48 +00001069 // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
1070 optional string tag = 2;
1071
Bookatzc1a050a2017-10-10 15:49:28 -07001072 // TODO: I have no idea what this is.
1073 optional string history_tag = 3;
1074
1075 enum State {
1076 OFF = 0;
1077 ON = 1;
1078 }
1079 optional State state = 4;
Yao Chend54f9dd2017-10-17 17:37:48 +00001080}
1081
Bookatzc1a050a2017-10-10 15:49:28 -07001082/**
Bookatza66083f2018-09-20 17:24:00 -07001083 * Logs when the device is interactive, according to the PowerManager Notifier.
1084 *
1085 * Logged from:
1086 * frameworks/base/services/core/java/com/android/server/power/Notifier.java
1087 */
1088message InteractiveStateChanged {
1089 enum State {
1090 OFF = 0;
1091 ON = 1;
1092 }
1093 optional State state = 1;
1094}
1095
1096/**
Bookatzc1a050a2017-10-10 15:49:28 -07001097 * Logs Battery Saver state change.
1098 *
1099 * Logged from:
1100 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
1101 */
1102message BatterySaverModeStateChanged {
1103 enum State {
1104 OFF = 0;
1105 ON = 1;
1106 }
1107 optional State state = 1;
1108}
1109
1110/**
1111 * Logs Doze mode state change.
1112 *
1113 * Logged from:
Bookatzddccf0a2017-11-28 16:48:14 -08001114 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatzc1a050a2017-10-10 15:49:28 -07001115 */
1116message DeviceIdleModeStateChanged {
Bookatz8bdae8d2018-01-16 11:24:30 -08001117 optional android.server.DeviceIdleModeEnum state = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001118}
1119
1120
1121/**
1122 * Logs state change of Doze mode including maintenance windows.
1123 *
1124 * Logged from:
1125 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
1126 */
1127message DeviceIdlingModeStateChanged {
Bookatz8bdae8d2018-01-16 11:24:30 -08001128 optional android.server.DeviceIdleModeEnum state = 1;
Bookatzc1a050a2017-10-10 15:49:28 -07001129}
1130
1131/**
1132 * Logs screen brightness level.
1133 *
1134 * Logged from:
1135 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
1136 */
1137message ScreenBrightnessChanged {
1138 // Screen brightness level. Should be in [-1, 255] according to PowerManager.java.
1139 optional int32 level = 1;
Bookatz8c6571b2017-10-24 15:04:41 -07001140}
1141
1142/**
1143 * Logs battery level (percent full, from 0 to 100).
1144 *
1145 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001146 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -07001147 */
1148message BatteryLevelChanged {
1149 // Battery level. Should be in [0, 100].
1150 optional int32 battery_level = 1;
1151}
1152
1153/**
1154 * Logs change in charging status of the device.
1155 *
1156 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001157 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -07001158 */
1159message ChargingStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08001160 // State of the battery, from frameworks/base/core/proto/android/os/enums.proto.
1161 optional android.os.BatteryStatusEnum state = 1;
Bookatz8c6571b2017-10-24 15:04:41 -07001162}
1163
1164/**
1165 * Logs whether the device is plugged in, and what power source it is using.
1166 *
1167 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001168 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -07001169 */
1170message PluggedStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08001171 // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto.
1172 optional android.os.BatteryPluggedStateEnum state = 1;
Bookatz8c6571b2017-10-24 15:04:41 -07001173}
1174
Bookatz8c6571b2017-10-24 15:04:41 -07001175/**
1176 * Logs when an app's wakeup alarm fires.
1177 *
1178 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001179 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
Bookatz8c6571b2017-10-24 15:04:41 -07001180 */
1181message WakeupAlarmOccurred {
Yangster-macafad8c62018-01-05 22:30:49 -08001182 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001183
1184 // Name of the wakeup alarm.
1185 optional string tag = 2;
Bookatzcaf2293e2018-09-23 13:07:43 -07001186
1187 // Name of source package (for historical reasons, since BatteryStats tracked it).
1188 optional string package_name = 3;
Ben Murdoch3389f1522019-05-21 15:05:34 +01001189
1190 // These enum values match the STANDBY_BUCKET_XXX constants defined in UsageStatsManager.java.
1191 enum Bucket {
1192 UNKNOWN = 0;
1193 EXEMPTED = 5;
1194 ACTIVE = 10;
1195 WORKING_SET = 20;
1196 FREQUENT = 30;
1197 RARE = 40;
1198 NEVER = 50;
1199 }
1200 // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired.
1201 optional Bucket app_standby_bucket = 4;
Bookatzddccf0a2017-11-28 16:48:14 -08001202}
1203
1204/**
1205 * Logs when an an app causes the mobile radio to change state.
1206 * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio.
1207 *
1208 * Logged from:
Bookatz0b028b12018-05-31 16:51:17 -07001209 * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
Bookatzddccf0a2017-11-28 16:48:14 -08001210 */
1211message MobileRadioPowerStateChanged {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08001212 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001213
Bookatz1a1b0462018-01-12 11:47:03 -08001214 // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
1215 optional android.telephony.DataConnectionPowerStateEnum state = 2;
Bookatzddccf0a2017-11-28 16:48:14 -08001216}
1217
1218/**
1219 * Logs when an an app causes the wifi radio to change state.
1220 * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio.
1221 *
1222 * Logged from:
Bookatz0b028b12018-05-31 16:51:17 -07001223 * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
Bookatzddccf0a2017-11-28 16:48:14 -08001224 */
1225message WifiRadioPowerStateChanged {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08001226 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001227
Bookatz1a1b0462018-01-12 11:47:03 -08001228 // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
1229 optional android.telephony.DataConnectionPowerStateEnum state = 2;
Bookatz8c6571b2017-10-24 15:04:41 -07001230}
1231
1232/**
1233 * Logs kernel wakeup reasons and aborts.
1234 *
1235 * Logged from:
Bookatz56585ca2018-09-07 11:38:45 -07001236 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -07001237 */
1238message KernelWakeupReported {
1239 // Name of the kernel wakeup reason (or abort).
1240 optional string wakeup_reason_name = 1;
1241
1242 // Duration (in microseconds) for the wake-up interrupt to be serviced.
David Chen0b5c90c2018-01-25 16:51:49 -08001243 optional int64 duration_micros = 2;
Bookatze5885242017-10-24 20:10:31 -07001244}
1245
1246/**
Bookatzda1798c2018-12-13 14:16:00 -08001247 * Logs when Wifi is toggled on/off.
Bookatza0a1f8a2018-12-17 12:28:32 -08001248 * Note that Wifi may still perform certain functions (e.g. location scanning) even when disabled.
Bookatzda1798c2018-12-13 14:16:00 -08001249 *
1250 * Logged from:
1251 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
1252 */
1253message WifiEnabledStateChanged {
1254 enum State {
1255 OFF = 0;
1256 ON = 1;
1257 }
1258 optional State state = 1;
1259}
1260
1261/**
tsaichristinececebdc2020-02-04 14:05:56 -08001262 * This atom is deprecated starting in R.
1263 *
Bookatzda1798c2018-12-13 14:16:00 -08001264 * Logs when an app causes Wifi to run. In this context, 'to run' means to use Wifi Client Mode.
Bookatza0a1f8a2018-12-17 12:28:32 -08001265 * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'.
1266 * Note that Wifi Scanning is monitored separately in WifiScanStateChanged.
Bookatzda1798c2018-12-13 14:16:00 -08001267 *
1268 * Logged from:
1269 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
1270 */
1271message WifiRunningStateChanged {
1272 repeated AttributionNode attribution_node = 1;
1273
1274 enum State {
1275 OFF = 0;
1276 ON = 1;
1277 }
1278 optional State state = 2;
1279}
1280
1281/**
Bookatze5885242017-10-24 20:10:31 -07001282 * Logs wifi locks held by an app.
1283 *
1284 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001285 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatze5885242017-10-24 20:10:31 -07001286 */
1287message WifiLockStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001288 repeated AttributionNode attribution_node = 1;
Bookatze5885242017-10-24 20:10:31 -07001289
1290 enum State {
1291 OFF = 0;
1292 ON = 1;
1293 }
1294 optional State state = 2;
Bookatz11257ca2018-12-05 18:22:39 -08001295
1296 // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto.
1297 optional android.net.wifi.WifiModeEnum mode = 3;
Bookatze5885242017-10-24 20:10:31 -07001298}
1299
1300/**
1301 * Logs wifi signal strength changes.
1302 *
1303 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001304 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
Bookatze5885242017-10-24 20:10:31 -07001305 */
1306message WifiSignalStrengthChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08001307 // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
1308 optional android.telephony.SignalStrengthEnum signal_strength = 1;
Bookatze5885242017-10-24 20:10:31 -07001309}
1310
1311/**
1312 * Logs wifi scans performed by an app.
1313 *
1314 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001315 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
Bookatze5885242017-10-24 20:10:31 -07001316 */
1317message WifiScanStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001318 repeated AttributionNode attribution_node = 1;
Bookatze5885242017-10-24 20:10:31 -07001319
1320 enum State {
1321 OFF = 0;
1322 ON = 1;
1323 }
1324 optional State state = 2;
1325}
1326
1327/**
Tej Singh4503e102018-01-04 14:35:01 -08001328 * Logs wifi multicast locks held by an app
1329 *
1330 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001331 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java
Tej Singh4503e102018-01-04 14:35:01 -08001332 */
1333message WifiMulticastLockStateChanged {
1334 repeated AttributionNode attribution_node = 1;
1335
1336 enum State {
1337 OFF = 0;
1338 ON = 1;
1339 }
1340 optional State state = 2;
Bookatz819ea832018-11-28 16:53:31 -08001341
1342 optional string tag = 3;
Tej Singh4503e102018-01-04 14:35:01 -08001343}
1344
1345/**
Tej Singh1ea42892018-01-19 09:27:00 -08001346 * Logs shutdown reason and duration on next boot.
1347 *
1348 * Logged from:
1349 * frameworks/base/core/java/com/android/server/BootReceiver.java
1350 */
1351message ShutdownSequenceReported {
1352 // True if shutdown is for a reboot. Default: false if we do not know.
1353 optional bool reboot = 1;
1354
1355 // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>".
1356 optional string reason = 2;
1357
1358 // Beginning of shutdown time in ms using wall clock time since unix epoch.
1359 // Default: 0 if no start time received.
David Chen0b5c90c2018-01-25 16:51:49 -08001360 optional int64 start_time_millis = 3;
Tej Singh1ea42892018-01-19 09:27:00 -08001361
1362 // Duration of shutdown in ms. Default: 0 if no duration received.
David Chen0b5c90c2018-01-25 16:51:49 -08001363 optional int64 duration_millis = 4;
Tej Singh1ea42892018-01-19 09:27:00 -08001364}
1365
Tej Singh6483ea42018-01-25 17:45:49 -08001366
1367/**
1368 * Logs boot reason and duration.
1369 *
1370 * Logged from:
1371 * system/core/bootstat/bootstat.cpp
1372 */
1373message BootSequenceReported {
1374 // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list
1375 // Default: "<EMPTY>" if not available.
1376 optional string bootloader_reason = 1;
1377
1378 // Reason for system boot. Eg. bootloader, reboot,userrequested
1379 // Default: "<EMPTY>" if not available.
1380 optional string system_reason = 2;
1381
1382 // End of boot time in ms from unix epoch using system wall clock.
David Chen0b5c90c2018-01-25 16:51:49 -08001383 optional int64 end_time_millis = 3;
Tej Singh6483ea42018-01-25 17:45:49 -08001384
1385 // Total boot duration in ms.
David Chen0b5c90c2018-01-25 16:51:49 -08001386 optional int64 total_duration_millis = 4;
Tej Singh6483ea42018-01-25 17:45:49 -08001387
1388 // Bootloader duration in ms.
David Chen0b5c90c2018-01-25 16:51:49 -08001389 optional int64 bootloader_duration_millis = 5;
Tej Singh6483ea42018-01-25 17:45:49 -08001390
1391 // Time since last boot in ms. Default: 0 if not available.
1392 optional int64 time_since_last_boot = 6;
1393}
1394
Tej Singhc477d9c2018-02-05 18:31:39 -08001395
1396/**
1397 * Logs call state and disconnect cause (if applicable).
1398 *
1399 * Logged from:
1400 * packages/services/Telecomm/src/com/android/server/telecom/Call.java
1401 */
1402message CallStateChanged {
1403 // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED.
1404 // From frameworks/base/core/proto/android/telecomm/enums.proto.
1405 optional android.telecom.CallStateEnum call_state = 1;
1406
1407 // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY.
1408 // This value is only applicable when the call_state is DISCONNECTED, and
1409 // should always be UNKNOWN if the call_state is not DISCONNECTED.
1410 // From frameworks/base/core/proto/android/telecomm/enums.proto.
1411 optional android.telecom.DisconnectCauseEnum disconnect_cause = 2;
1412
1413 // True if the call is self-managed, which are apps that use the
1414 // telecom infrastructure to make their own calls.
1415 optional bool self_managed = 3;
1416
1417 // True if call is external. External calls are calls on connected Wear
1418 // devices but show up in Telecom so the user can pull them onto the device.
1419 optional bool external_call = 4;
1420}
1421
Tej Singh1ea42892018-01-19 09:27:00 -08001422/**
Tej Singhdd7bd352018-02-09 19:33:15 -08001423 * Logs keyguard state. The keyguard is the lock screen.
1424 *
1425 * Logged from:
1426 * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
1427 */
1428message KeyguardStateChanged {
1429 enum State {
1430 UNKNOWN = 0;
1431 // The keyguard is hidden when the phone is unlocked.
1432 HIDDEN = 1;
1433 // The keyguard is shown when the phone is locked (screen turns off).
1434 SHOWN= 2;
1435 // The keyguard is occluded when something is overlaying the keyguard.
1436 // Eg. Opening the camera while on the lock screen.
1437 OCCLUDED = 3;
1438 }
1439 optional State state = 1;
1440}
1441
1442/**
1443 * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and
1444 * prompts the user to enter a password (pattern, pin, etc).
1445 *
1446 * Logged from:
1447 * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
1448 */
1449
1450message KeyguardBouncerStateChanged {
1451 enum State {
1452 UNKNOWN = 0;
1453 // Bouncer is hidden, either as a result of successfully entering the
1454 // password, screen timing out, or user going back to lock screen.
1455 HIDDEN = 1;
1456 // This is when the user is being prompted to enter the password.
1457 SHOWN = 2;
1458 }
1459 optional State state = 1;
1460}
1461
1462/**
1463 * Logs the result of entering a password into the keyguard bouncer.
1464 *
1465 * Logged from:
1466 * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
1467 */
1468message KeyguardBouncerPasswordEntered {
1469 enum BouncerResult {
1470 UNKNOWN = 0;
1471 // The password entered was incorrect.
1472 FAILURE = 1;
1473 // The password entered was correct.
1474 SUCCESS = 2;
1475 }
1476 optional BouncerResult result = 1;
1477}
1478
Tej Singha883b372018-02-15 11:30:01 -08001479/*
1480 * Logs changes to the configuration of the device. The configuration is defined
1481 * in frameworks/base/core/java/android/content/res/Configuration.java
1482 * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html
1483 * Please go there to interpret the possible values each field can be.
1484 *
1485 * Logged from:
1486 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
1487 */
1488message ResourceConfigurationChanged {
1489 // Bit mask of color capabilities of the screen.
1490 // Contains information about the color gamut and hdr mode of the screen.
1491 // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode
Yangster-maca8a30442018-10-13 23:46:34 -07001492 optional int32 color_mode = 1;
Tej Singha883b372018-02-15 11:30:01 -08001493
1494 // The target screen density being rendered to.
1495 // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi
Yangster-maca8a30442018-10-13 23:46:34 -07001496 optional int32 density_dpi = 2;
Tej Singha883b372018-02-15 11:30:01 -08001497
1498 // Current user preference for the scaling factor for fonts,
1499 // relative to the base density scaling.
1500 // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale
Yangster-maca8a30442018-10-13 23:46:34 -07001501 optional float font_scale = 3;
Tej Singha883b372018-02-15 11:30:01 -08001502
1503 // Flag indicating whether the hard keyboard is hidden.
1504 // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001505 optional int32 hard_keyboard_hidden = 4;
Tej Singha883b372018-02-15 11:30:01 -08001506
1507 // The type of keyboard attached to the device.
1508 // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard
1509 optional int32 keyboard = 5;
1510
1511 // Flag indicating whether any keyboard is available. Takes soft keyboards into account.
1512 // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001513 optional int32 keyboard_hidden = 6;
Tej Singha883b372018-02-15 11:30:01 -08001514
1515 // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier.
1516 // 0 if undefined.
1517 // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc
1518 optional int32 mcc = 7;
1519
1520 // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier.
1521 // 0 if undefined. Note: the actual MNC may be 0, to check for this use the
1522 // MNC_ZERO symbol defined in Configuration.java.
1523 // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc
1524 optional int32 mnc = 8;
1525
1526 // The kind of navigation available on the device.
1527 // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation
1528 optional int32 navigation = 9;
1529
1530 // Flag indicating whether the navigation is available.
1531 // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001532 optional int32 navigation_hidden = 10;
Tej Singha883b372018-02-15 11:30:01 -08001533
1534 // Overall orientation of the screen.
1535 // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation
1536 optional int32 orientation = 11;
1537
1538 // The current height of the available screen space, in dp units.
1539 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp
Yangster-maca8a30442018-10-13 23:46:34 -07001540 optional int32 screen_height_dp = 12;
Tej Singha883b372018-02-15 11:30:01 -08001541
1542 // Bit mask of overall layout of the screen.
1543 // Contains information about screen size, whether the screen is wider/taller
1544 // than normal, whether the screen layout is right-tl-left or left-to-right,
1545 // and whether the screen has a rounded shape.
1546 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout
Yangster-maca8a30442018-10-13 23:46:34 -07001547 optional int32 screen_layout = 13;
Tej Singha883b372018-02-15 11:30:01 -08001548
1549 // Current width of the available screen space, in dp units.
1550 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp
Yangster-maca8a30442018-10-13 23:46:34 -07001551 optional int32 screen_width_dp = 14;
Tej Singha883b372018-02-15 11:30:01 -08001552
1553 // The smallest screen size an application will see in normal operation.
1554 // This is the smallest value of both screenWidthDp and screenHeightDp
1555 // in portrait and landscape.
1556 // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp
Yangster-maca8a30442018-10-13 23:46:34 -07001557 optional int32 smallest_screen_width_dp = 15;
Tej Singha883b372018-02-15 11:30:01 -08001558
1559 // The type of touch screen attached to the device.
1560 // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen
1561 optional int32 touchscreen = 16;
1562
1563 // Bit mask of the ui mode.
1564 // Contains information about the overall ui mode of the device.
1565 // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET
1566 // Also contains information about whether the device is in night mode.
1567 // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode
Yangster-maca8a30442018-10-13 23:46:34 -07001568 optional int32 ui_mode = 17;
Tej Singha883b372018-02-15 11:30:01 -08001569}
1570
Tej Singheee317b2018-03-07 19:28:05 -08001571
1572/**
1573 * Logs changes in the connection state of the mobile radio.
1574 *
1575 * Logged from:
1576 * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java
1577 */
1578message MobileConnectionStateChanged {
1579 // States are from the state machine DataConnection.java.
1580 enum State {
1581 UNKNOWN = 0;
1582 // The connection is inactive, or disconnected.
1583 INACTIVE = 1;
1584 // The connection is being activated, or connecting.
1585 ACTIVATING = 2;
1586 // The connection is active, or connected.
1587 ACTIVE = 3;
1588 // The connection is disconnecting.
1589 DISCONNECTING = 4;
1590 // The connection is disconnecting after creating a connection.
1591 DISCONNECTION_ERROR_CREATING_CONNECTION = 5;
1592 }
1593 optional State state = 1;
1594 // For multi-sim phones, this distinguishes between the sim cards.
1595 optional int32 sim_slot_index = 2;
1596 // Used to identify the connection. Starts at 0 and increments by 1 for
1597 // every new network created. Resets whenever the device reboots.
1598 optional int32 data_connection_id = 3;
1599 // A bitmask for the capabilities of this connection.
1600 // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS.
1601 // Default value (if we have no information): 0
1602 optional int64 capabilities = 4;
1603 // If this connection has internet.
1604 // This just checks if the DEFAULT bit of capabilities is set.
1605 optional bool has_internet = 5;
1606}
1607
1608/**
1609 * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA.
1610 *
1611 * Logged from:
1612 * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java
1613 */
1614message MobileRadioTechnologyChanged {
1615 optional android.telephony.NetworkTypeEnum state = 1;
1616 // For multi-sim phones, this distinguishes between the sim cards.
1617 optional int32 sim_slot_index = 2;
1618}
1619
Andrew Chantb56388b2018-03-22 21:07:33 -07001620/**
1621 * Logs the VID and PID of any connected USB devices.
1622 *
1623 * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present.
1624 *
1625 * Logged by Vendor.
1626 */
1627message UsbDeviceAttached {
1628 optional int32 vid = 1;
1629 optional int32 pid = 2;
1630 optional bool has_audio = 3;
1631 optional bool has_hid = 4;
1632 optional bool has_storage = 5;
Badhri Jagan Sridharan5ec629f2018-11-16 15:39:22 -08001633 enum State {
1634 STATE_DISCONNECTED = 0;
1635 STATE_CONNECTED = 1;
1636 }
1637 optional State state = 6;
Badhri Jagan Sridharanc2c54a22018-12-14 14:41:26 -08001638 optional int64 last_connect_duration_millis = 7;
Andrew Chantb56388b2018-03-22 21:07:33 -07001639}
1640
Tej Singheee317b2018-03-07 19:28:05 -08001641
Tej Singhdd7bd352018-02-09 19:33:15 -08001642/**
Tej Singh5d991e12018-03-09 19:48:11 -08001643 * Logs when Bluetooth is enabled and disabled.
1644 *
1645 * Logged from:
1646 * services/core/java/com/android/server/BluetoothManagerService.java
1647 */
1648message BluetoothEnabledStateChanged {
1649 repeated AttributionNode attribution_node = 1;
1650 // Whether or not bluetooth is enabled on the device.
1651 enum State {
1652 UNKNOWN = 0;
1653 ENABLED = 1;
1654 DISABLED = 2;
1655 }
1656 optional State state = 2;
1657 // The reason for being enabled/disabled.
1658 // Eg. Airplane mode, crash, application request.
1659 optional android.bluetooth.EnableDisableReasonEnum reason = 3;
1660 // If the reason is an application request, this will be the package name.
Yangster-maca8a30442018-10-13 23:46:34 -07001661 optional string pkg_name = 4;
Tej Singh5d991e12018-03-09 19:48:11 -08001662}
1663
1664/**
Jack Hed9837c82019-01-09 01:19:13 -08001665 * Logs when profiles on a Bluetooth device connects and disconnects.
Tej Singh5d991e12018-03-09 19:48:11 -08001666 *
1667 * Logged from:
Jack Hed9837c82019-01-09 01:19:13 -08001668 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
1669 *
1670 * Next Tag: 5
Tej Singh5d991e12018-03-09 19:48:11 -08001671 */
1672message BluetoothConnectionStateChanged {
1673 // The state of the connection.
1674 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1675 optional android.bluetooth.ConnectionStateEnum state = 1;
1676 // An identifier that can be used to match connect and disconnect events.
1677 // Currently is last two bytes of a hash of a device level ID and
1678 // the mac address of the bluetooth device that is connected.
Jack Hed9837c82019-01-09 01:19:13 -08001679 // Deprecated: use obfuscated_id instead, this one is always 0 for Q+
Jack Heac33c992019-04-03 16:08:21 -07001680 optional int32 obfuscated_id = 2 [deprecated = true];
Tej Singh5d991e12018-03-09 19:48:11 -08001681 // The profile that is connected. Eg. GATT, A2DP, HEADSET.
1682 // From android.bluetooth.BluetoothAdapter.java
Jack Hed9837c82019-01-09 01:19:13 -08001683 // Default: 0 when not used
Tej Singh5d991e12018-03-09 19:48:11 -08001684 optional int32 bt_profile = 3;
Jack Hed9837c82019-01-09 01:19:13 -08001685 // An identifier that can be used to match events for this device.
1686 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1687 // Salt: Randomly generated 256 bit value
1688 // Hash algorithm: HMAC-SHA256
1689 // Size: 32 byte
1690 // Default: null or empty if the device identifier is not known
Jack Heac33c992019-04-03 16:08:21 -07001691 optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
Jack Hed9837c82019-01-09 01:19:13 -08001692}
1693
1694/**
1695 * Logs when a Bluetooth device connects and disconnects over ACL
1696 *
1697 * Logged from:
1698 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
1699 *
1700 * Next Tag: 3
1701 */
1702message BluetoothAclConnectionStateChanged {
1703 // An identifier that can be used to match events for this device.
1704 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1705 // Salt: Randomly generated 256 bit value
1706 // Hash algorithm: HMAC-SHA256
1707 // Size: 32 byte
1708 // Default: null or empty if the device identifier is not known
1709 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1710 // The state of the connection.
1711 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1712 optional android.bluetooth.ConnectionStateEnum state = 2;
1713}
1714
1715/**
1716 * Logs when a Bluetooth device connects and disconnects over SCO
1717 *
1718 * Logged from:
1719 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
1720 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java
1721 *
1722 * Next Tag: 4
1723 */
1724message BluetoothScoConnectionStateChanged {
1725 // An identifier that can be used to match events for this device.
1726 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1727 // Salt: Randomly generated 256 bit value
1728 // Hash algorithm: HMAC-SHA256
1729 // Size: 32 byte
1730 // Default: null or empty if the device identifier is not known
1731 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1732 // The state of the connection.
1733 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1734 optional android.bluetooth.ConnectionStateEnum state = 2;
1735 // Codec used for this SCO connection
1736 // Default: UNKNOWN
1737 optional android.bluetooth.hfp.ScoCodec codec = 3;
Tej Singh5d991e12018-03-09 19:48:11 -08001738}
1739
Jack Hec27040a2019-01-09 20:54:41 -08001740/**
1741 * Logged when active device of a profile changes
1742 *
1743 * Logged from:
1744 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1745 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java
1746 * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java
1747 */
1748message BluetoothActiveDeviceChanged {
1749 // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID
1750 // From android.bluetooth.BluetoothProfile
1751 optional int32 bt_profile = 1;
1752 // An identifier that can be used to match events for this new active device.
1753 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1754 // Salt: Randomly generated 256 bit value
1755 // Hash algorithm: HMAC-SHA256
1756 // Size: 32 byte
1757 // Default: null or empty if there is no active device for this profile
1758 optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES];
1759}
1760
Jack Heab86dbd22018-12-18 15:43:27 -08001761// Logs when there is an event affecting Bluetooth device's link layer connection.
1762// - This event is triggered when there is a related HCI command or event
1763// - Users of this metrics can deduce Bluetooth device's connection state from these events
1764// - HCI commands are logged before the command is sent, after receiving command status, and after
1765// receiving command complete
1766// - HCI events are logged when they arrive
1767//
1768// Low level log from system/bt
1769//
1770// Bluetooth classic commands:
1771// - CMD_CREATE_CONNECTION
1772// - CMD_DISCONNECT
1773// - CMD_CREATE_CONNECTION_CANCEL
1774// - CMD_ACCEPT_CONNECTION_REQUEST
1775// - CMD_REJECT_CONNECTION_REQUEST
1776// - CMD_SETUP_ESCO_CONNECTION
1777// - CMD_ACCEPT_ESCO_CONNECTION
1778// - CMD_REJECT_ESCO_CONNECTION
1779// - CMD_ENH_SETUP_ESCO_CONNECTION
1780// - CMD_ENH_ACCEPT_ESCO_CONNECTION
1781//
1782// Bluetooth low energy commands:
1783// - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00]
1784// - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error]
1785// - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00]
1786// - CMD_BLE_CLEAR_WHITE_LIST
1787// - CMD_BLE_ADD_WHITE_LIST
1788// - CMD_BLE_REMOVE_WHITE_LIST
1789//
1790// Bluetooth classic events:
1791// - EVT_CONNECTION_COMP
1792// - EVT_CONNECTION_REQUEST
1793// - EVT_DISCONNECTION_COMP
1794// - EVT_ESCO_CONNECTION_COMP
1795// - EVT_ESCO_CONNECTION_CHANGED
1796//
1797// Bluetooth low energy meta events:
1798// - BLE_EVT_CONN_COMPLETE_EVT
1799// - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT
1800//
1801// Next tag: 10
1802message BluetoothLinkLayerConnectionEvent {
1803 // An identifier that can be used to match events for this device.
1804 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1805 // Salt: Randomly generated 256 bit value
1806 // Hash algorithm: HMAC-SHA256
1807 // Size: 32 byte
1808 // Default: null or empty if the device identifier is not known
1809 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1810 // Connection handle of this connection if available
1811 // Range: 0x0000 - 0x0EFF (12 bits)
1812 // Default: 0xFFFF if the handle is unknown
1813 optional int32 connection_handle = 2;
1814 // Direction of the link
1815 // Default: DIRECTION_UNKNOWN
1816 optional android.bluetooth.DirectionEnum direction = 3;
1817 // Type of this link
1818 // Default: LINK_TYPE_UNKNOWN
1819 optional android.bluetooth.LinkTypeEnum type = 4;
1820
1821 // Reason metadata for this link layer connection event, rules for interpretation:
1822 // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or
1823 // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case
1824 // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is
1825 // set and valid, ignore hci_ble_event
1826
1827 // HCI command associated with this event
1828 // Default: CMD_UNKNOWN
1829 optional android.bluetooth.hci.CommandEnum hci_cmd = 5;
1830 // HCI event associated with this event
1831 // Default: EVT_UNKNOWN
1832 optional android.bluetooth.hci.EventEnum hci_event = 6;
1833 // HCI BLE meta event associated with this event
1834 // Default: BLE_EVT_UNKNOWN
1835 optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7;
1836 // HCI command status code if this is triggerred by hci_cmd
1837 // Default: STATUS_UNKNOWN
1838 optional android.bluetooth.hci.StatusEnum cmd_status = 8;
1839 // HCI reason code associated with this event
1840 // Default: STATUS_UNKNOWN
1841 optional android.bluetooth.hci.StatusEnum reason_code = 9;
1842}
1843
Howard Roe103fe22019-01-17 16:52:16 -08001844/**
1845 * Logs when a module is rolled back by Watchdog.
1846 *
1847 * Logged from: Rollback Manager
1848 */
1849message WatchdogRollbackOccurred {
1850 enum RollbackType {
1851 UNKNOWN = 0;
1852 ROLLBACK_INITIATE = 1;
1853 ROLLBACK_SUCCESS = 2;
1854 ROLLBACK_FAILURE = 3;
Howard Roe4d6fed2019-03-04 16:54:19 -08001855 ROLLBACK_BOOT_TRIGGERED = 4;
Howard Roe103fe22019-01-17 16:52:16 -08001856 }
1857 optional RollbackType rollback_type = 1;
1858
1859 optional string package_name = 2;
1860
1861 optional int32 package_version_code = 3;
Gavin Corkerydd1daba2019-11-27 19:11:13 +00001862
1863 enum RollbackReasonType {
1864 REASON_UNKNOWN = 0;
1865 REASON_NATIVE_CRASH = 1;
1866 REASON_EXPLICIT_HEALTH_CHECK = 2;
1867 REASON_APP_CRASH = 3;
1868 REASON_APP_NOT_RESPONDING = 4;
Gavin Corkery3285d222020-01-17 19:24:22 +00001869 REASON_NATIVE_CRASH_DURING_BOOT = 5;
Gavin Corkerydd1daba2019-11-27 19:11:13 +00001870 }
1871 optional RollbackReasonType rollback_reason = 4;
1872
1873 // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback
1874 // is initiated. Empty if the package is unknown.
1875 optional string failing_package_name = 5;
Howard Roe103fe22019-01-17 16:52:16 -08001876}
1877
Jack Hec27040a2019-01-09 20:54:41 -08001878/**
1879 * Logs when there is a change in Bluetooth A2DP playback state
1880 *
1881 * Logged from:
1882 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1883 */
1884message BluetoothA2dpPlaybackStateChanged {
1885 // An identifier that can be used to match events for this device.
1886 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1887 // Salt: Randomly generated 256 bit value
1888 // Hash algorithm: HMAC-SHA256
1889 // Size: 32 byte
1890 // Default: null or empty if the device identifier is not known
1891 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1892 // Current playback state
1893 // Default: PLAYBACK_STATE_UNKNOWN
1894 optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2;
1895 // Current audio coding mode
1896 // Default: AUDIO_CODING_MODE_UNKNOWN
1897 optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3;
1898}
1899
1900/**
1901 * Logs when there is a change in A2DP codec config for a particular remote device
1902 *
1903 * Logged from:
1904 * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
1905 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1906 */
1907message BluetoothA2dpCodecConfigChanged {
1908 // An identifier that can be used to match events for this device.
1909 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1910 // Salt: Randomly generated 256 bit value
1911 // Hash algorithm: HMAC-SHA256
1912 // Size: 32 byte
1913 // Default: null or empty if the device identifier is not known
1914 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1915 // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
1916 // Default SOURCE_CODEC_TYPE_INVALID
1917 optional int32 codec_type = 2;
1918 // Codec priroity, the higher the more preferred, -1 for disabled
1919 // Default: CODEC_PRIORITY_DEFAULT
1920 optional int32 codec_priority = 3;
1921 // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig
1922 // Default: SAMPLE_RATE_NONE
1923 optional int32 sample_rate = 4;
1924 // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig
1925 // Default: BITS_PER_SAMPLE_NONE
1926 optional int32 bits_per_sample = 5;
1927 // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig
1928 // Default: CHANNEL_MODE_NONE
1929 optional int32 channel_mode = 6;
1930 // Codec specific values
1931 // Default 0
1932 optional int64 codec_specific_1 = 7;
1933 optional int64 codec_specific_2 = 8;
1934 optional int64 codec_specific_3 = 9;
1935 optional int64 codec_specific_4 = 10;
1936}
1937
1938/**
1939 * Logs when there is a change in selectable A2DP codec capability for a paricular remote device
1940 * Each codec's capability is logged separately due to statsd restriction
1941 *
1942 * Logged from:
1943 * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
1944 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1945 */
1946message BluetoothA2dpCodecCapabilityChanged {
1947 // An identifier that can be used to match events for this device.
1948 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1949 // Salt: Randomly generated 256 bit value
1950 // Hash algorithm: HMAC-SHA256
1951 // Size: 32 byte
1952 // Default: null or empty if the device identifier is not known
1953 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1954 // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
1955 // Default SOURCE_CODEC_TYPE_INVALID
1956 optional int32 codec_type = 2;
1957 // Codec priroity, the higher the more preferred, -1 for disabled
1958 // Default: CODEC_PRIORITY_DEFAULT
1959 optional int32 codec_priority = 3;
1960 // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants
1961 // in BluetoothCodecConfig
1962 // Default: empty and SAMPLE_RATE_NONE for individual item
1963 optional int32 sample_rate = 4;
1964 // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants
1965 // in BluetoothCodecConfig
1966 // Default: empty and BITS_PER_SAMPLE_NONE for individual item
1967 optional int32 bits_per_sample = 5;
1968 // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in
1969 // BluetoothCodecConfig
1970 // Default: empty and CHANNEL_MODE_NONE for individual item
1971 optional int32 channel_mode = 6;
1972 // Codec specific values
1973 // Default 0
1974 optional int64 codec_specific_1 = 7;
1975 optional int64 codec_specific_2 = 8;
1976 optional int64 codec_specific_3 = 9;
1977 optional int64 codec_specific_4 = 10;
1978}
1979
1980/**
1981 * Logs when A2DP failed to read from PCM source.
1982 * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding.
1983 *
1984 * Logged from:
1985 * system/bt
1986 */
1987message BluetoothA2dpAudioUnderrunReported {
1988 // An identifier that can be used to match events for this device.
1989 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1990 // Salt: Randomly generated 256 bit value
1991 // Hash algorithm: HMAC-SHA256
1992 // Size: 32 byte
1993 // Default: null or empty if the device identifier is not known
1994 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1995 // Encoding interval in nanoseconds
1996 // Default: 0
1997 optional int64 encoding_interval_nanos = 2;
1998 // Number of bytes of PCM data that could not be read from the source
1999 // Default: 0
2000 optional int32 num_missing_pcm_bytes = 3;
2001}
2002
2003/**
2004 * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit
2005 * buffer queue is full and we have to drop data
2006 *
2007 * Logged from:
2008 * system/bt
2009 */
2010message BluetoothA2dpAudioOverrunReported {
2011 // An identifier that can be used to match events for this device.
2012 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2013 // Salt: Randomly generated 256 bit value
2014 // Hash algorithm: HMAC-SHA256
2015 // Size: 32 byte
2016 // Default: null or empty if the device identifier is not known
2017 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2018 // Encoding interval in nanoseconds
2019 // Default: 0
2020 optional int64 encoding_interval_nanos = 2;
2021 // Number of buffers dropped in this event
2022 // Each buffer is encoded in one encoding interval and consists of multiple encoded frames
2023 // Default: 0
2024 optional int32 num_dropped_buffers = 3;
2025 // Number of encoded buffers dropped in this event
2026 // Default 0
2027 optional int32 num_dropped_encoded_frames = 4;
2028 // Number of encoded bytes dropped in this event
2029 // Default: 0
2030 optional int32 num_dropped_encoded_bytes = 5;
2031}
2032
2033/**
2034 * Logs when we receive reports regarding a device's RSSI value
2035 *
2036 * Logged from:
2037 * system/bt
2038 */
2039message BluetoothDeviceRssiReported {
2040 // An identifier that can be used to match events for this device.
2041 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2042 // Salt: Randomly generated 256 bit value
2043 // Hash algorithm: HMAC-SHA256
2044 // Size: 32 byte
2045 // Default: null or empty if the device identifier is not known
2046 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2047 // Connection handle of this connection if available
2048 // Range: 0x0000 - 0x0EFF (12 bits)
2049 // Default: 0xFFFF if the handle is unknown
2050 optional int32 connection_handle = 2;
2051 // HCI command status code if this is triggerred by hci_cmd
2052 // Default: STATUS_UNKNOWN
2053 optional android.bluetooth.hci.StatusEnum hci_status = 3;
2054 // BR/EDR
2055 // Range: -128 ≤ N ≤ 127 (signed integer)
2056 // Units: dB
2057 // LE:
2058 // Range: -127 to 20, 127 (signed integer)
2059 // Units: dBm
2060 // Invalid when an out of range value is reported
2061 optional int32 rssi = 4;
2062}
2063
2064/**
2065 * Logs when we receive reports regarding how many consecutive failed contacts for a connection
2066 *
2067 * Logged from:
2068 * system/bt
2069 */
2070message BluetoothDeviceFailedContactCounterReported {
2071 // An identifier that can be used to match events for this device.
2072 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2073 // Salt: Randomly generated 256 bit value
2074 // Hash algorithm: HMAC-SHA256
2075 // Size: 32 byte
2076 // Default: null or empty if the device identifier is not known
2077 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2078 // Connection handle of this connection if available
2079 // Range: 0x0000 - 0x0EFF (12 bits)
2080 // Default: 0xFFFF if the handle is unknown
2081 optional int32 connection_handle = 2;
2082 // HCI command status code if this is triggerred by hci_cmd
2083 // Default: STATUS_UNKNOWN
2084 optional android.bluetooth.hci.StatusEnum cmd_status = 3;
2085 // Number of consecutive failed contacts for a connection corresponding to the Handle
2086 // Range: uint16_t, 0-0xFFFF
2087 // Default: 0xFFFFF
2088 optional int32 failed_contact_counter = 4;
2089}
2090
2091/**
2092 * Logs when we receive reports regarding the tranmit power level used for a specific connection
2093 *
2094 * Logged from:
2095 * system/bt
2096 */
2097message BluetoothDeviceTxPowerLevelReported {
2098 // An identifier that can be used to match events for this device.
2099 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2100 // Salt: Randomly generated 256 bit value
2101 // Hash algorithm: HMAC-SHA256
2102 // Size: 32 byte
2103 // Default: null or empty if the device identifier is not known
2104 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2105 // Connection handle of this connection if available
2106 // Range: 0x0000 - 0x0EFF (12 bits)
2107 // Default: 0xFFFF if the handle is unknown
2108 optional int32 connection_handle = 2;
Jack He1021a612019-01-20 21:22:46 -08002109 // HCI command status code if this is triggered by hci_cmd
Jack Hec27040a2019-01-09 20:54:41 -08002110 // Default: STATUS_UNKNOWN
2111 optional android.bluetooth.hci.StatusEnum hci_status = 3;
2112 // Range: -30 ≤ N ≤ 20
2113 // Units: dBm
2114 // Invalid when an out of range value is reported
2115 optional int32 transmit_power_level = 4;
2116}
Jack Heab86dbd22018-12-18 15:43:27 -08002117
Tej Singh5d991e12018-03-09 19:48:11 -08002118/**
Jack He1021a612019-01-20 21:22:46 -08002119 * Logs when Bluetooth controller failed to reply with command status within a timeout period after
2120 * receiving an HCI command from the host
2121 *
2122 * Logged from: system/bt
2123 */
2124message BluetoothHciTimeoutReported {
2125 // HCI command associated with this event
2126 // Default: CMD_UNKNOWN
2127 optional android.bluetooth.hci.CommandEnum hci_command = 1;
2128}
2129
2130/**
2131 * Logs when we receive Bluetooth Link Quality Report event from the controller
2132 * See Android Bluetooth HCI specification for more details
2133 *
2134 * Note: all count and bytes field are counted since last event
2135 *
2136 * Logged from: system/bt
2137 */
2138message BluetoothQualityReportReported {
2139 // Quality report ID
2140 // Original type: uint8_t
2141 // Default: BQR_ID_UNKNOWN
2142 optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1;
2143 // Packet type of the connection
2144 // Original type: uint8_t
2145 // Default: BQR_PACKET_TYPE_UNKNOWN
2146 optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2;
2147 // Connection handle of the connection
2148 // Original type: uint16_t
2149 optional int32 connection_handle = 3;
2150 // Performing Role for the connection
2151 // Original type: uint8_t
2152 optional int32 connection_role = 4;
2153 // Current Transmit Power Level for the connection. This value is the same as the controller's
2154 // response to the HCI_Read_Transmit_Power_Level HCI command
2155 // Original type: uint8_t
2156 optional int32 tx_power_level = 5;
2157 // Received Signal Strength Indication (RSSI) value for the connection. This value is an
2158 // absolute receiver signal strength value
2159 // Original type: int8_t
2160 optional int32 rssi = 6;
2161 // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the
2162 // channels used by the link currently
2163 // Original type: uint8_t
2164 optional int32 snr = 7;
2165 // Indicates the number of unused channels in AFH_channel_map
2166 // Original type: uint8_t
2167 optional int32 unused_afh_channel_count = 8;
2168 // Indicates the number of the channels which are interfered and quality is bad but are still
2169 // selected for AFH
2170 // Original type: uint8_t
2171 optional int32 afh_select_unideal_channel_count = 9;
2172 // Current Link Supervision Timeout Setting
2173 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
2174 // Original type: uint16_t
2175 optional int32 lsto = 10;
2176 // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's
2177 // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of
2178 // 0x01 (Piconet Clock)
2179 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
2180 // Original type: uint32_t
2181 optional int64 connection_piconet_clock = 11;
2182 // The count of retransmission
2183 // Original type: uint32_t
2184 optional int64 retransmission_count = 12;
2185 // The count of no RX
2186 // Original type: uint32_t
2187 optional int64 no_rx_count = 13;
2188 // The count of NAK (Negative Acknowledge)
2189 // Original type: uint32_t
2190 optional int64 nak_count = 14;
2191 // Controller timestamp of last TX ACK
2192 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
2193 // Original type: uint32_t
2194 optional int64 last_tx_ack_timestamp = 15;
2195 // The count of Flow-off (STOP)
2196 // Original type: uint32_t
2197 optional int64 flow_off_count = 16;
2198 // Controller timestamp of last Flow-on (GO)
2199 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
2200 // Original type: uint32_t
2201 optional int64 last_flow_on_timestamp = 17;
2202 // Buffer overflow count (how many bytes of TX data are dropped) since the last event
2203 // Original type: uint32_t
2204 optional int64 buffer_overflow_bytes = 18;
2205 // Buffer underflow count (in byte) since last event
2206 // Original type: uint32_t
2207 optional int64 buffer_underflow_bytes = 19;
2208}
2209
2210/**
2211 * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack
2212 *
2213 * Notes:
2214 * - Each event can be partially filled as we might learn different pieces of device
2215 * information at different time
2216 * - Multiple device info events can be combined to give more complete picture
2217 * - When multiple device info events tries to describe the same information, the
2218 * later one wins
2219 *
2220 * Logged from:
2221 * packages/apps/Bluetooth
2222 */
Jack Heaea26982019-04-04 11:19:48 -07002223message BluetoothDeviceInfoReported {
Jack He1021a612019-01-20 21:22:46 -08002224 // An identifier that can be used to match events for this device.
2225 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2226 // Salt: Randomly generated 256 bit value
2227 // Hash algorithm: HMAC-SHA256
2228 // Size: 32 byte
2229 // Default: null or empty if the device identifier is not known
2230 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2231 // Where is this device info obtained from
2232 optional android.bluetooth.DeviceInfoSrcEnum source_type = 2;
2233 // Name of the data source
2234 // For EXTERNAL: package name of the data source
2235 // For INTERNAL: null for general case, component name otherwise
2236 optional string source_name = 3;
2237 // Name of the manufacturer of this device
2238 optional string manufacturer = 4;
2239 // Model of this device
2240 optional string model = 5;
2241 // Hardware version of this device
2242 optional string hardware_version = 6;
2243 // Software version of this device
2244 optional string software_version = 7;
2245}
2246
2247/**
2248 * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote
2249 * device, as documented by the Bluetooth Core HCI specification
2250 * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification
2251 * Vol 2, Part E, Page 1118
2252 *
2253 * Logged from:
2254 * system/bt
2255 */
2256message BluetoothRemoteVersionInfoReported {
2257 // Connection handle of the connection
2258 // Original type: uint16_t
2259 optional int32 connection_handle = 1;
2260 // HCI command status code
2261 // Default: STATUS_UNKNOWN
2262 optional android.bluetooth.hci.StatusEnum hci_status = 2;
2263 // 1 byte Version of current LMP in the remote controller
2264 optional int32 lmp_version = 3;
2265 // 2 bytes LMP manufacturer code of the remote controller
2266 // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
2267 optional int32 lmp_manufacturer_code = 4;
2268 // 4 bytes subversion of the LMP in the remote controller
2269 optional int32 lmp_subversion = 5;
2270}
2271
2272/**
2273 * Logs when certain Bluetooth SDP attributes are discovered
2274 * Constant definitions are from:
2275 * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery
2276 *
2277 * Current logged attributes:
2278 * - BluetoothProfileDescriptorList
2279 * - Supported Features Bitmask
2280 *
2281 * Logged from:
2282 * system/bt
2283 */
2284message BluetoothSdpAttributeReported {
2285 // An identifier that can be used to match events for this device.
2286 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2287 // Salt: Randomly generated 256 bit value
2288 // Hash algorithm: HMAC-SHA256
2289 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2290 // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes
2291 // Original type: uint16_t
2292 optional int32 protocol_uuid = 2;
2293 // Short form UUIDs used to identify Bluetooth SDP attribute types
2294 // Original type: uint16_t
2295 optional int32 attribute_id = 3;
2296 // Attribute value for the particular attribute
2297 optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
2298}
2299
2300/**
2301 * Logs when bond state of a Bluetooth device changes
2302 *
2303 * Logged from:
2304 * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
2305 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
2306 */
2307message BluetoothBondStateChanged {
2308 // An identifier that can be used to match events for this device.
2309 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2310 // Salt: Randomly generated 256 bit value
2311 // Hash algorithm: HMAC-SHA256
2312 // Size: 32 byte
2313 // Default: null or empty if the device identifier is not known
2314 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2315 // Preferred transport type to remote dual mode device
2316 // Default: TRANSPORT_AUTO means no preference
2317 optional android.bluetooth.TransportTypeEnum transport = 2;
2318 // The type of this Bluetooth device (Classic, LE, or Dual mode)
2319 // Default: UNKNOWN
2320 optional android.bluetooth.DeviceTypeEnum type = 3;
2321 // Current bond state (NONE, BONDING, BONDED)
2322 // Default: BOND_STATE_UNKNOWN
2323 optional android.bluetooth.BondStateEnum bond_state = 4;
2324 // Bonding sub state
2325 // Default: BOND_SUB_STATE_UNKNOWN
2326 optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5;
2327 // Unbond Reason
2328 // Default: UNBOND_REASON_UNKNOWN
2329 optional android.bluetooth.UnbondReasonEnum unbond_reason = 6;
2330}
2331
2332/**
2333 * Logs there is an event related Bluetooth classic pairing
2334 *
2335 * Logged from:
2336 * system/bt
2337 */
2338message BluetoothClassicPairingEventReported {
2339 // An identifier that can be used to match events for this device.
2340 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2341 // Salt: Randomly generated 256 bit value
2342 // Hash algorithm: HMAC-SHA256
2343 // Size: 32 byte
2344 // Default: null or empty if the device identifier is not known
2345 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2346 // Connection handle of this connection if available
2347 // Range: 0x0000 - 0x0EFF (12 bits)
2348 // Default: 0xFFFF if the handle is unknown
2349 optional int32 connection_handle = 2;
2350 // HCI command associated with this event
2351 // Default: CMD_UNKNOWN
2352 optional android.bluetooth.hci.CommandEnum hci_cmd = 3;
2353 // HCI event associated with this event
2354 // Default: EVT_UNKNOWN
2355 optional android.bluetooth.hci.EventEnum hci_event = 4;
2356 // HCI command status code if this is triggerred by hci_cmd
2357 // Default: STATUS_UNKNOWN
2358 optional android.bluetooth.hci.StatusEnum cmd_status = 5;
2359 // HCI reason code associated with this event
2360 // Default: STATUS_UNKNOWN
2361 optional android.bluetooth.hci.StatusEnum reason_code = 6;
Jack He3b259832019-03-20 03:47:29 -07002362 // A status value related to this specific event
2363 // Default: 0
2364 optional int64 event_value = 7;
Jack He1021a612019-01-20 21:22:46 -08002365}
2366
2367/**
2368 * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP)
2369 *
2370 * Logged from:
2371 * system/bt
2372 */
2373message BluetoothSmpPairingEventReported {
2374 // An identifier that can be used to match events for this device.
2375 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2376 // Salt: Randomly generated 256 bit value
2377 // Hash algorithm: HMAC-SHA256
2378 // Size: 32 byte
2379 // Default: null or empty if the device identifier is not known
2380 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2381 // SMP command sent or received over L2CAP
2382 // Default: CMD_UNKNOWN
2383 optional android.bluetooth.smp.CommandEnum smp_command = 2;
2384 // Whether this command is sent or received
2385 // Default: DIRECTION_UNKNOWN
2386 optional android.bluetooth.DirectionEnum direction = 3;
2387 // SMP failure reason code
2388 // Default: PAIRING_FAIL_REASON_DEFAULT
2389 optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4;
2390}
2391
2392/**
Jack He815cdba2019-01-30 17:24:55 -08002393 * Logs when a Bluetooth socket’s connection state changed
2394 *
2395 * Logged from:
2396 * system/bt
2397 */
2398message BluetoothSocketConnectionStateChanged {
2399 // An identifier that can be used to match events for this device.
2400 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2401 // Salt: Randomly generated 256 bit value
2402 // Hash algorithm: HMAC-SHA256
2403 // Size: 32 byte
Jack Hee4ae0e72019-02-07 13:52:45 -08002404 // Default: null or empty if this is a server listener socket
Jack He815cdba2019-01-30 17:24:55 -08002405 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
Jack Hee4ae0e72019-02-07 13:52:45 -08002406 // Temporary port of this socket for the current connection or session only
Jack He815cdba2019-01-30 17:24:55 -08002407 // Default 0 when unknown or don't care
2408 optional int32 port = 2;
2409 // Socket type as mentioned in
2410 // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
2411 // Default: SOCKET_TYPE_UNKNOWN
2412 optional android.bluetooth.SocketTypeEnum type = 3;
2413 // Socket connection state
2414 // Default: SOCKET_CONNECTION_STATE_UNKNOWN
2415 optional android.bluetooth.SocketConnectionstateEnum state = 4;
2416 // Number of bytes sent to remote device during this connection
2417 optional int64 tx_bytes = 5;
2418 // Number of bytes received from remote device during this connection
2419 optional int64 rx_bytes = 6;
Jack Hee4ae0e72019-02-07 13:52:45 -08002420 // Socket owner's UID
2421 optional int32 uid = 7 [(is_uid) = true];
2422 // Server port of this socket, if any. When both |server_port| and |port| fields are populated,
2423 // |port| must be spawned by |server_port|
2424 // Default 0 when unknown or don't care
2425 optional int32 server_port = 8;
2426 // Whether this is a server listener socket
2427 optional android.bluetooth.SocketRoleEnum is_server = 9;
Jack He815cdba2019-01-30 17:24:55 -08002428}
2429
2430/**
Jack He71426802019-04-02 13:32:52 -07002431 * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection
2432 *
2433 * Logged from:
2434 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
2435 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
2436 *
2437 */
2438message BluetoothClassOfDeviceReported {
2439 // An identifier that can be used to match events for this device.
2440 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2441 // Salt: Randomly generated 256 bit value
2442 // Hash algorithm: HMAC-SHA256
2443 // Size: 32 byte
2444 // Default: null or empty if this is a server listener socket
2445 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2446 // Class of Device (CoD) value including both Major, Minor device class and service class
2447 // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband
2448 // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass
2449 // Default: 0
2450 optional int32 class_of_device = 2;
2451}
2452
2453/**
Andrew Chant28d627e2018-02-22 15:17:05 -08002454 * Logs when something is plugged into or removed from the USB-C connector.
2455 *
2456 * Logged from:
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002457 * UsbService
Andrew Chant28d627e2018-02-22 15:17:05 -08002458 */
2459message UsbConnectorStateChanged {
2460 enum State {
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002461 STATE_DISCONNECTED = 0;
2462 STATE_CONNECTED = 1;
Andrew Chant28d627e2018-02-22 15:17:05 -08002463 }
2464 optional State state = 1;
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002465 optional string id = 2;
Badhri Jagan Sridharanfaf62072018-11-16 17:17:03 -08002466 // Last active session in ms.
2467 // 0 when the port is in connected state.
2468 optional int64 last_connect_duration_millis = 3;
Andrew Chant28d627e2018-02-22 15:17:05 -08002469}
2470
2471/**
2472 * Logs the reported speaker impedance.
2473 *
2474 * Logged from:
2475 * Vendor audio implementation.
2476 */
2477message SpeakerImpedanceReported {
2478 optional int32 speaker_location = 1;
2479 optional int32 impedance = 2;
2480}
2481
2482/**
2483 * Logs the report of a failed hardware.
2484 *
2485 * Logged from:
2486 * Vendor HALs.
2487 *
2488 */
2489message HardwareFailed {
2490 enum HardwareType {
2491 HARDWARE_FAILED_UNKNOWN = 0;
2492 HARDWARE_FAILED_MICROPHONE = 1;
2493 HARDWARE_FAILED_CODEC = 2;
2494 HARDWARE_FAILED_SPEAKER = 3;
2495 HARDWARE_FAILED_FINGERPRINT = 4;
2496 }
2497 optional HardwareType hardware_type = 1;
2498
Maggie White6dcd8572019-01-31 14:11:50 -08002499 /**
2500 * hardware_location allows vendors to differentiate between multiple instances of
Andrew Chant28d627e2018-02-22 15:17:05 -08002501 * the same hardware_type. The specific locations are vendor defined integers,
2502 * referring to board-specific numbering schemes.
2503 */
2504 optional int32 hardware_location = 2;
2505
Maggie White6dcd8572019-01-31 14:11:50 -08002506 /**
2507 * failure_code is specific to the HardwareType of the failed hardware.
2508 * It should use one of the enum values defined below.
Andrew Chant28d627e2018-02-22 15:17:05 -08002509 */
Maggie White6dcd8572019-01-31 14:11:50 -08002510 enum HardwareErrorCode {
2511 UNKNOWN = 0;
2512 COMPLETE = 1;
2513 SPEAKER_HIGH_Z = 2;
2514 SPEAKER_SHORT = 3;
2515 FINGERPRINT_SENSOR_BROKEN = 4;
2516 FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5;
Maggie Whiteb76cebc2019-02-05 15:21:29 -08002517 DEGRADE = 6;
Andrew Chant28d627e2018-02-22 15:17:05 -08002518 }
2519 optional int32 failure_code = 3;
2520}
2521
2522/**
2523 * Log an event when the device has been physically dropped.
2524 * Reported from the /vendor partition.
2525 */
2526message PhysicalDropDetected {
2527 // Confidence that the event was actually a drop, 0 -> 100
2528 optional int32 confidence_pctg = 1;
2529 // Peak acceleration of the drop, in 1/1000s of a g.
2530 optional int32 accel_peak_thousandths_g = 2;
Andrew Chantb56388b2018-03-22 21:07:33 -07002531 // Duration of freefall in ms
2532 optional int32 freefall_time_millis = 3;
Andrew Chant28d627e2018-02-22 15:17:05 -08002533}
2534
2535/**
2536 * Log bucketed battery charge cycles.
2537 *
2538 * Each bucket represents cycles of the battery past
Maggie White38c9d322018-11-20 10:07:52 -08002539 * a given charge point. For example, if 10 cycle buckets are
2540 * initialized, bucket 1 is the lowest 1/10th of the battery,
2541 * and bucket 10 is 100%.
Andrew Chant28d627e2018-02-22 15:17:05 -08002542 *
2543 * Logged from:
2544 * /sys/class/power_supply/bms/cycle_count, via Vendor.
2545 */
2546message ChargeCyclesReported {
2547 optional int32 cycle_bucket_1 = 1;
2548 optional int32 cycle_bucket_2 = 2;
2549 optional int32 cycle_bucket_3 = 3;
2550 optional int32 cycle_bucket_4 = 4;
2551 optional int32 cycle_bucket_5 = 5;
2552 optional int32 cycle_bucket_6 = 6;
2553 optional int32 cycle_bucket_7 = 7;
2554 optional int32 cycle_bucket_8 = 8;
Maggie White38c9d322018-11-20 10:07:52 -08002555 optional int32 cycle_bucket_9 = 9;
2556 optional int32 cycle_bucket_10 = 10;
Andrew Chant28d627e2018-02-22 15:17:05 -08002557}
2558
2559/**
Howard Roa46b6582018-09-18 16:45:02 -07002560 * Log battery health snapshot.
2561 *
2562 * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level
2563 * are snapshotted periodically over 24hrs.
2564 */
2565message BatteryHealthSnapshot {
2566 enum BatterySnapshotType {
2567 UNKNOWN = 0;
2568 MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs.
2569 MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs.
2570 MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs.
2571 MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs.
2572 MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs.
2573 MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs.
2574 MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs.
2575 MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs.
2576 MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs.
2577 MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs.
2578 AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs.
2579 }
2580 optional BatterySnapshotType type = 1;
2581 // Temperature, in 1/10ths of degree C.
Yangster-maca8a30442018-10-13 23:46:34 -07002582 optional int32 temperature_deci_celsius = 2;
Howard Roa46b6582018-09-18 16:45:02 -07002583 // Voltage Battery Voltage, in microVolts.
2584 optional int32 voltage_micro_volt = 3;
2585 // Current Battery current, in microAmps.
2586 optional int32 current_micro_amps = 4;
2587 // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts.
2588 optional int32 open_circuit_micro_volt = 5;
2589 // Resistance Battery Resistance, in microOhms.
2590 optional int32 resistance_micro_ohm = 6;
2591 // Level Battery Level, as % of full.
2592 optional int32 level_percent = 7;
2593}
2594
2595/**
2596 * Log slow I/O operations on the primary storage.
2597 */
2598message SlowIo {
2599 // Classifications of IO Operations.
2600 enum IoOperation {
2601 UNKNOWN = 0;
2602 READ = 1;
2603 WRITE = 2;
2604 UNMAP = 3;
2605 SYNC = 4;
2606 }
2607 optional IoOperation operation = 1;
2608
2609 // The number of slow IO operations of this type over 24 hours.
2610 optional int32 count = 2;
2611}
2612
2613/**
2614 * Log battery caused shutdown with the last recorded voltage.
2615 */
2616message BatteryCausedShutdown {
2617 // The last recorded battery voltage prior to shutdown.
2618 optional int32 last_recorded_micro_volt = 1;
2619}
2620
2621/**
Tej Singha72344992019-04-17 18:55:08 -07002622 * Logs when ThermalService receives throttling events.
2623 *
2624 * Logged from:
2625 * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
2626 */
2627message ThermalThrottlingSeverityStateChanged {
2628 // The type of temperature being reported (CPU, GPU, SKIN, etc)
2629 optional android.os.TemperatureTypeEnum sensor_type = 1;
2630
2631 // The name of the temperature source. Eg. CPU0
2632 optional string sensor_name = 2;
2633
2634 // Temperature in tenths of a degree C.
2635 // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
2636 optional int32 temperature_deci_celsius = 3;
2637
2638 // Relative severity of the throttling, see enum definition.
2639 optional android.os.ThrottlingSeverityEnum severity = 4;
2640}
2641
2642/**
Tej Singhbb8554a2018-01-26 11:59:14 -08002643 * Logs the duration of a davey (jank of >=700ms) when it occurs
2644 *
2645 * Logged from:
2646 * frameworks/base/libs/hwui/JankTracker.cpp
2647 */
2648message DaveyOccurred {
David Chen77ef6712018-02-23 18:23:42 -08002649 // The UID that logged this atom.
Yao Chenc40a19d2018-03-15 16:48:25 -07002650 optional int32 uid = 1 [(is_uid) = true];
David Chen77ef6712018-02-23 18:23:42 -08002651
Tej Singhbb8554a2018-01-26 11:59:14 -08002652 // Amount of time it took to render the frame. Should be >=700ms.
David Chen77ef6712018-02-23 18:23:42 -08002653 optional int64 jank_duration_millis = 2;
Tej Singhbb8554a2018-01-26 11:59:14 -08002654}
2655
2656/**
Bookatze5885242017-10-24 20:10:31 -07002657 * Logs phone signal strength changes.
2658 *
2659 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07002660 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatze5885242017-10-24 20:10:31 -07002661 */
2662message PhoneSignalStrengthChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08002663 // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
2664 optional android.telephony.SignalStrengthEnum signal_strength = 1;
David Chenc28b2bb2017-10-24 12:52:52 -07002665}
2666
Yangster4ccebea2018-10-09 17:09:02 -07002667
2668/**
2669 * Logs when the phone state, sim state or signal strength changes
2670 *
2671 * Logged from:
2672 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
2673 */
2674message PhoneServiceStateChanged {
2675 optional android.telephony.ServiceStateEnum state = 1;
2676 optional android.telephony.SimStateEnum sim_state = 2;
2677 optional android.telephony.SignalStrengthEnum signal_strength = 3;
2678}
2679
2680/**
2681 * Logs when the phone becomes on or off.
2682 *
2683 * Logged from:
2684 * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java
2685 */
2686message PhoneStateChanged {
2687 enum State {
2688 OFF = 0;
2689 ON = 1;
2690 }
2691 optional State state = 1;
2692}
2693
Hyunyoung Song2ecb8862019-07-09 09:19:25 -07002694message BackGesture {
2695 enum BackType {
2696 DEFAULT_BACK_TYPE = 0;
2697 COMPLETED = 1;
2698 COMPLETED_REJECTED = 2; // successful because coming from rejected area
2699 INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area
2700 INCOMPLETE = 4;
2701 }
2702 optional BackType type = 1;
2703
2704 optional int32 y_coordinate = 2; // y coordinate for ACTION_DOWN event
2705 enum WindowHorizontalLocation {
2706 DEFAULT_LOCATION = 0;
2707 LEFT = 1;
2708 RIGHT = 2;
2709 }
2710 optional WindowHorizontalLocation x_location = 3;
2711}
2712
2713message ExclusionRectStateChanged {
2714 optional string component_name = 1; // if not available, simply packageName
2715 optional int32 requested_height = 2; // px
2716 optional int32 rejected_height = 3; // px
2717
2718 enum WindowHorizontalLocation {
2719 DEFAULT_LOCATION = 0;
2720 LEFT = 1;
2721 RIGHT = 2;
2722 }
2723 optional WindowHorizontalLocation x_location = 4;
2724 optional bool landscape = 5;
2725 optional bool splitscreen = 6;
2726 optional int32 duration_millis = 7;
2727}
2728
Hyunyoung Songc6d6b772018-10-17 13:35:32 -07002729message LauncherUIChanged {
Yao Chen8c433862018-10-24 14:09:20 -07002730 optional android.stats.launcher.LauncherAction action = 1;
2731 optional android.stats.launcher.LauncherState src_state = 2;
2732 optional android.stats.launcher.LauncherState dst_state = 3;
2733 optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES];
Hyunyoung Songc6d6b772018-10-17 13:35:32 -07002734 optional bool is_swipe_up_enabled = 5;
2735}
2736
Hyunyoung Song80adf6be2019-01-30 09:59:30 -08002737message StyleUIChanged {
2738 optional android.stats.style.Action action = 1;
2739 optional int32 color_package_hash = 2;
2740 optional int32 font_package_hash = 3;
2741 optional int32 shape_package_hash = 4;
2742 optional int32 clock_package_hash = 5;
2743 optional int32 launcher_grid = 6;
2744 optional int32 wallpaper_category_hash = 7;
2745 optional int32 wallpaper_id_hash = 8;
Kunhung Li286c52f2019-05-21 20:10:43 +08002746 optional int32 color_preference = 9;
2747 optional android.stats.style.LocationPreference location_preference = 10;
Hyunyoung Song80adf6be2019-01-30 09:59:30 -08002748}
2749
David Chenc28b2bb2017-10-24 12:52:52 -07002750/**
Fan Zhang916c13b2018-10-16 22:49:45 -07002751 * Logs when Settings UI has changed.
2752 *
2753 * Logged from:
2754 * packages/apps/Settings
2755 */
2756message SettingsUIChanged {
2757 /**
Fan Zhang916c13b2018-10-16 22:49:45 -07002758 * Where this SettingsUIChange event comes from. For example, if
2759 * it's a PAGE_VISIBLE event, where the page is opened from.
2760 */
Fan Zhangf837b8e2018-10-23 12:38:30 -07002761 optional android.app.settings.PageId attribution = 1;
Fan Zhang916c13b2018-10-16 22:49:45 -07002762
2763 /**
2764 * What the UI action is.
2765 */
Fan Zhangf837b8e2018-10-23 12:38:30 -07002766 optional android.app.settings.Action action = 2;
Fan Zhang916c13b2018-10-16 22:49:45 -07002767
2768 /**
2769 * Where the action is happening
2770 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002771 optional android.app.settings.PageId page_id = 3;
Fan Zhang916c13b2018-10-16 22:49:45 -07002772
2773 /**
2774 * What preference changed in this event.
2775 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002776 optional string changed_preference_key = 4;
Fan Zhang916c13b2018-10-16 22:49:45 -07002777
2778 /**
2779 * The new value of the changed preference.
2780 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002781 optional int64 changed_preference_int_value = 5;
Fan Zhang916c13b2018-10-16 22:49:45 -07002782}
2783
2784/**
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002785 * Logs basic timing information about touch events.
2786 * Reported at most every 5 minutes while device is being interacted with.
2787 *
2788 * Logged from:
2789 * frameworks/native/services/inputflinger
2790 */
2791message TouchEventReported {
2792 /**
2793 * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean,
Siarhei Vishniakou20d23c02019-08-15 19:32:34 -05002794 * and the standard deviation of the time spent processing touchscreen events
2795 * in the kernel and inputflinger. The units are microseconds.
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002796 *
Siarhei Vishniakou20d23c02019-08-15 19:32:34 -05002797 * On supported devices, the starting point is taken during the hard interrupt inside the
2798 * kernel touch driver. On all other devices, the starting point is taken inside
2799 * the kernel's input event subsystem upon receipt of the input event.
2800 * The ending point is taken inside InputDispatcher, just after the input event
2801 * is sent to the app.
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002802 */
2803 // Minimum value
2804 optional float latency_min_micros = 1;
2805 // Maximum value
2806 optional float latency_max_micros = 2;
2807 // Average value
2808 optional float latency_mean_micros = 3;
2809 // Standard deviation
2810 optional float latency_stdev_micros = 4;
Siarhei Vishniakouca954f92019-03-22 16:41:14 -07002811 // Number of touch events (input_event) in this report
2812 optional int32 count = 5;
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002813}
2814
2815/**
Philip Quinn0eded622019-01-29 12:46:28 -08002816 * Logs gesture classification and timing information for touch events.
2817 *
2818 * Logged from:
2819 * frameworks/base/core/java/android/view/GestureDetector.java
2820 * frameworks/base/core/java/android/view/View.java
2821 */
2822message TouchGestureClassified {
2823 // The source of the classification (e.g. Java class name).
2824 optional string source = 1;
2825
2826 enum Classification {
2827 UNKNOWN_CLASSIFICATION = 0;
2828 SINGLE_TAP = 1;
2829 DOUBLE_TAP = 2;
2830 LONG_PRESS = 3;
2831 DEEP_PRESS = 4;
2832 SCROLL = 5;
2833 }
2834 // The classification of the gesture.
2835 optional Classification classification = 2;
2836
2837 // The interval from the start of a touch event stream until the
2838 // classification was made.
2839 optional int32 latency_millis = 3;
2840
2841 // The distance from the location of the first touch event to the
2842 // location of the touch event when the classification was made.
2843 optional float displacement_px = 4;
2844}
2845
2846/**
David Chenc28b2bb2017-10-24 12:52:52 -07002847 * Logs that a setting was updated.
2848 * Logged from:
David Chenbd789912018-03-16 17:19:55 -07002849 * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
David Chenc28b2bb2017-10-24 12:52:52 -07002850 * The tag and is_default allow resetting of settings to default values based on the specified
2851 * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details.
2852 */
2853message SettingChanged {
2854 // The name of the setting.
2855 optional string setting = 1;
2856
2857 // The change being imposed on this setting. May represent a number, eg "3".
2858 optional string value = 2;
2859
2860 // The new value of this setting. For most settings, this is same as value. For some settings,
2861 // value is +X or -X where X represents an element in a set. For example, if the previous value
2862 // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C.
2863 // The +/- feature is currently only used for location_providers_allowed.
2864 optional string new_value = 3;
2865
2866 // The previous value of this setting.
2867 optional string prev_value = 4;
2868
2869 // The tag used with the is_default for resetting sets of settings. This is generally null.
2870 optional string tag = 5;
2871
Bookatz90867622018-01-31 15:05:57 -08002872 // True if this setting with tag should be resettable.
2873 optional bool is_default = 6;
David Chenc28b2bb2017-10-24 12:52:52 -07002874
David Chenbd789912018-03-16 17:19:55 -07002875 // The associated user (for multi-user feature). Defined in android/os/UserHandle.java
David Chenc28b2bb2017-10-24 12:52:52 -07002876 optional int32 user = 7;
David Chenbd789912018-03-16 17:19:55 -07002877
2878 enum ChangeReason {
2879 UPDATED = 1; // Updated can be an insertion or an update.
2880 DELETED = 2;
2881 }
2882 optional ChangeReason reason = 8;
David Chenc28b2bb2017-10-24 12:52:52 -07002883}
Chenjie Yub3dda412017-10-24 13:41:59 -07002884
Chenjie Yu05013b32017-11-21 10:21:41 -08002885/**
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002886 * Logs activity going to foreground or background
2887 *
2888 * Logged from:
2889 * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java
2890 */
2891message ActivityForegroundStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -07002892 optional int32 uid = 1 [(is_uid) = true];
Yangster-mac20877162017-12-22 17:19:39 -08002893 optional string pkg_name = 2;
2894 optional string class_name = 3;
2895
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002896 enum State {
2897 BACKGROUND = 0;
2898 FOREGROUND = 1;
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002899 }
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002900 optional State state = 4;
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002901}
David Chenc8a43242017-10-17 16:23:28 -07002902
2903/**
Felix Lopez Luisd95346a2018-12-12 10:32:32 +00002904 * Logs when a volume entered low Storage state.
2905 * Logged from:
2906 * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java
2907 */
2908message LowStorageStateChanged {
2909 // Volume that ran out of storage.
2910 optional string volume_description = 1;
2911
2912 enum State {
2913 UNKNOWN = 0;
2914 OFF = 1;
2915 ON = 2;
2916 }
2917 optional State state = 2;
2918}
2919
2920/**
2921 * Logs when an app is downgraded.
2922 * Logged from:
2923 * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
2924 */
2925message AppDowngraded {
2926 optional string package_name = 1;
2927 // Size of the package (all data) before being downgraded.
2928 optional int64 size_in_bytes_before = 2;
2929 // Size of the package (all data) after being downgraded.
2930 optional int64 size_in_bytes_after = 3;
2931
2932 optional bool aggressive = 4;
2933}
2934
2935/**
2936 * Logs when an app is optimized after being downgraded.
2937 * Logged from:
2938 * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
2939 */
2940message AppOptimizedAfterDowngraded {
2941 optional string package_name = 1;
2942}
2943
2944/**
Carmen Agimof6688a352019-01-30 19:36:04 +00002945 * Logs whenever an app is installed on external storage.
2946 * Logged from:
2947 frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
2948 */
2949message AppInstallOnExternalStorageReported {
2950 // The type of external storage.
2951 optional android.stats.storage.ExternalStorageType storage_type = 1;
2952 // The name of the package that is installed on the sd card.
2953 optional string package_name = 2;
2954}
2955
2956/**
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002957 * Logs when an app crashes.
David Chen9e3808c2017-11-20 17:25:34 -08002958 * Logged from:
2959 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2960 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002961message AppCrashOccurred {
Yao Chenc40a19d2018-03-15 16:48:25 -07002962 optional int32 uid = 1 [(is_uid) = true];
David Chen9e3808c2017-11-20 17:25:34 -08002963
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002964 optional string event_type = 2;
David Chen9e3808c2017-11-20 17:25:34 -08002965
2966 // The name of the process.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002967 // system_server if it is not by an app
David Chen9e3808c2017-11-20 17:25:34 -08002968 optional string process_name = 3;
2969
2970 // The pid if available. -1 means not available.
David Chen6e3e6cb2018-01-03 16:14:06 -08002971 optional sint32 pid = 4;
Chenjie Yuf17bf62f2018-04-02 14:22:19 -07002972
2973 optional string package_name = 5;
2974
2975 enum InstantApp {
2976 UNAVAILABLE = 0;
2977 FALSE = 1;
2978 TRUE = 2;
2979 }
2980 optional InstantApp is_instant_app = 6;
2981
2982 enum ForegroundState {
2983 UNKNOWN = 0;
2984 BACKGROUND = 1;
2985 FOREGROUND = 2;
2986 }
2987 optional ForegroundState foreground_state = 7;
Yang Lu732d6382018-11-05 07:53:12 -08002988
2989 optional android.server.ErrorSource error_source = 8;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002990}
David Chen9e3808c2017-11-20 17:25:34 -08002991
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002992/**
2993 * Logs when a WTF (What a Terrible Failure) happened.
2994 * Logged from:
2995 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2996 */
2997message WTFOccurred {
2998 optional int32 uid = 1 [(is_uid) = true];
David Chen9e3808c2017-11-20 17:25:34 -08002999
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003000 optional string tag = 2;
David Chen9e3808c2017-11-20 17:25:34 -08003001
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003002 // The name of the process.
3003 // system_server if it is not by an app
3004 optional string process_name = 3;
David Chen6e3e6cb2018-01-03 16:14:06 -08003005
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003006 // The pid if available. -1 means not available.
3007 optional sint32 pid = 4;
Yang Lu732d6382018-11-05 07:53:12 -08003008
3009 optional android.server.ErrorSource error_source = 5;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003010}
3011
3012/**
3013 * Logs when system server reports low memory.
3014 * Logged from:
3015 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3016 */
3017message LowMemReported {
3018}
3019
3020/**
3021 * Logs when an app ANR (App Not Responding) occurs.
3022 * Logged from:
3023 * frameworks/base/services/core/java/com/android/server/am/AppErrors.java
3024 */
3025message ANROccurred {
3026 optional int32 uid = 1 [(is_uid) = true];
3027
3028 optional string process_name = 2;
3029
3030 optional string short_component_name = 3;
3031
3032 optional string reason = 4;
Chenjie Yuf17bf62f2018-04-02 14:22:19 -07003033
3034 enum InstantApp {
3035 UNAVAILABLE = 0;
3036 FALSE = 1;
3037 TRUE = 2;
3038 }
3039 optional InstantApp is_instant_app = 5;
3040
3041 enum ForegroundState {
3042 UNKNOWN = 0;
3043 BACKGROUND = 1;
3044 FOREGROUND = 2;
3045 }
3046 optional ForegroundState foreground_state = 6;
Yang Lu732d6382018-11-05 07:53:12 -08003047
3048 optional android.server.ErrorSource error_source = 7;
3049
3050 optional string package_name = 8;
David Chen9e3808c2017-11-20 17:25:34 -08003051}
3052
Bookatza7020bd2018-08-28 16:29:35 -07003053/**
3054 * Logs when the vibrator state changes.
3055 * Logged from:
3056 * frameworks/base/services/core/java/com/android/server/VibratorService.java
3057 */
3058message VibratorStateChanged {
3059 repeated AttributionNode attribution_node = 1;
3060
3061 enum State {
3062 OFF = 0;
3063 ON = 1;
3064 }
3065 optional State state = 2;
3066
3067 // Duration (in milliseconds) requested to keep the vibrator on.
3068 // Only applicable for State == ON.
3069 optional int64 duration_millis = 3;
3070}
3071
David Chen0a368b22017-12-06 16:28:16 -08003072/*
3073 * Allows other apps to push events into statsd.
3074 * Logged from:
3075 * frameworks/base/core/java/android/util/StatsLog.java
3076 */
David Chen0b5c90c2018-01-25 16:51:49 -08003077message AppBreadcrumbReported {
David Chen0a368b22017-12-06 16:28:16 -08003078 // The uid of the application that sent this custom atom.
Yao Chenc40a19d2018-03-15 16:48:25 -07003079 optional int32 uid = 1 [(is_uid) = true];
David Chen0a368b22017-12-06 16:28:16 -08003080
3081 // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16).
3082 optional int32 label = 2;
3083
3084 // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom
3085 // predicates for the metrics).
3086 enum State {
3087 UNKNOWN = 0;
3088 UNSPECIFIED = 1; // For events that are known to not represent START/STOP.
3089 STOP = 2;
3090 START = 3;
3091 }
3092 optional State state = 3;
3093}
3094
David Chen9e3808c2017-11-20 17:25:34 -08003095/**
Bookatz7948c872018-09-04 12:58:33 -07003096 * Logs the wall-clock time when a significant wall-clock time shift occurs.
3097 * For example, this could be due to the user manually changing the time.
3098 *
3099 * Logged from:
3100 * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java
3101 */
3102message WallClockTimeShifted {
3103 // New wall-clock time in milliseconds, according to System.currentTimeMillis().
3104 optional int64 wall_clock_timestamp_millis = 1;
3105}
3106
3107/**
Bookatz8fcd09a2017-12-18 13:01:10 -08003108 * Logs when statsd detects an anomaly.
3109 *
3110 * Logged from:
3111 * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp
3112 */
3113message AnomalyDetected {
3114 // Uid that owns the config whose anomaly detection alert fired.
Yao Chenc40a19d2018-03-15 16:48:25 -07003115 optional int32 config_uid = 1 [(is_uid) = true];
Bookatz8fcd09a2017-12-18 13:01:10 -08003116
Yangster-mac94e197c2018-01-02 16:03:03 -08003117 // Id of the config whose anomaly detection alert fired.
3118 optional int64 config_id = 2;
Bookatz8fcd09a2017-12-18 13:01:10 -08003119
Yangster-mac94e197c2018-01-02 16:03:03 -08003120 // Id of the alert (i.e. name of the anomaly that was detected).
3121 optional int64 alert_id = 3;
Bookatz8fcd09a2017-12-18 13:01:10 -08003122}
3123
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003124message AppStartOccurred {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003125 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003126 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003127
3128 // The app package name.
3129 optional string pkg_name = 2;
3130
3131 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003132 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003133 WARM = 1;
3134 HOT = 2;
3135 COLD = 3;
3136 }
3137 // The transition type.
3138 optional TransitionType type = 3;
3139
3140 // The activity name.
3141 optional string activity_name = 4;
3142
3143 // The name of the calling app. Empty if not set.
3144 optional string calling_pkg_name = 5;
3145
3146 // Whether the app is an instant app.
3147 optional bool is_instant_app = 6;
3148
3149 // Device uptime when activity started.
David Chen0b5c90c2018-01-25 16:51:49 -08003150 optional int64 activity_start_millis = 7;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003151
Bookatz80d11a02018-01-16 10:46:35 -08003152 optional android.app.AppTransitionReasonEnum reason = 8;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003153
David Chen0b5c90c2018-01-25 16:51:49 -08003154 optional int32 transition_delay_millis = 9;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003155 // -1 if not set.
David Chen0b5c90c2018-01-25 16:51:49 -08003156 optional int32 starting_window_delay_millis = 10;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003157 // -1 if not set.
David Chen0b5c90c2018-01-25 16:51:49 -08003158 optional int32 bind_application_delay_millis = 11;
3159 optional int32 windows_drawn_delay_millis = 12;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003160
3161 // Empty if not set.
3162 optional string launch_token = 13;
3163
Calin Juravle759fbda2018-02-20 19:52:30 +00003164 // The compiler filter used when when the package was optimized.
Calin Juravlea86783b2018-03-21 14:25:59 -07003165 optional int32 package_optimization_compilation_filter = 14;
Calin Juravle759fbda2018-02-20 19:52:30 +00003166
3167 // The reason why the package was optimized.
Calin Juravlea86783b2018-03-21 14:25:59 -07003168 optional int32 package_optimization_compilation_reason = 15;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003169}
3170
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003171message AppStartCanceled {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003172 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003173 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003174
3175 // The app package name.
3176 optional string pkg_name = 2;
3177
3178 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003179 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003180 WARM = 1;
3181 HOT = 2;
3182 COLD = 3;
3183 }
3184 // The transition type.
3185 optional TransitionType type = 3;
3186
3187 // The activity name.
3188 optional string activity_name = 4;
3189}
3190
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003191message AppStartFullyDrawn {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003192 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003193 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003194
3195 // The app package name.
3196 optional string pkg_name = 2;
3197
3198 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003199 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003200 WITH_BUNDLE = 1;
3201 WITHOUT_BUNDLE = 2;
3202 }
3203 // The transition type.
3204 optional TransitionType type = 3;
3205
3206 // The activity name.
3207 optional string activity_name = 4;
3208
3209 optional bool transition_process_running = 5;
3210
3211 // App startup time (until call to Activity#reportFullyDrawn()).
David Chen0b5c90c2018-01-25 16:51:49 -08003212 optional int64 app_startup_time_millis = 6;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003213}
3214
Bookatz8fcd09a2017-12-18 13:01:10 -08003215/**
Chenjie Yu52cacc62017-12-08 18:11:45 -08003216 * Logs a picture-in-picture action
3217 * Logged from:
3218 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3219 * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java
3220 * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
3221 */
3222message PictureInPictureStateChanged {
Chenjie Yuae9fdf042018-02-15 10:19:32 -08003223 // -1 if it is not available
Yao Chenc40a19d2018-03-15 16:48:25 -07003224 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yu52cacc62017-12-08 18:11:45 -08003225
Chenjie Yuae9fdf042018-02-15 10:19:32 -08003226 optional string short_name = 2;
Chenjie Yu52cacc62017-12-08 18:11:45 -08003227
Chenjie Yu52cacc62017-12-08 18:11:45 -08003228 enum State {
3229 ENTERED = 1;
3230 EXPANDED_TO_FULL_SCREEN = 2;
3231 MINIMIZED = 3;
3232 DISMISSED = 4;
3233 }
Chenjie Yuae9fdf042018-02-15 10:19:32 -08003234 optional State state = 3;
Chenjie Yu52cacc62017-12-08 18:11:45 -08003235}
3236
3237/**
Chenjie Yue8904192017-12-08 19:12:57 -08003238 * Logs overlay action
3239 * Logged from:
3240 * services/core/java/com/android/server/wm/Session.java
3241 */
3242message OverlayStateChanged {
tsaichristine5adc7e02020-01-14 17:07:39 -08003243 optional int32 uid = 1 [(state_field_option).option = PRIMARY_FIELD, (is_uid) = true];
Chenjie Yue8904192017-12-08 19:12:57 -08003244
tsaichristine5adc7e02020-01-14 17:07:39 -08003245 optional string package_name = 2 [(state_field_option).option = PRIMARY_FIELD];
Chenjie Yue8904192017-12-08 19:12:57 -08003246
3247 optional bool using_alert_window = 3;
3248
3249 enum State {
3250 ENTERED = 1;
3251 EXITED = 2;
3252 }
tsaichristine5adc7e02020-01-14 17:07:39 -08003253 optional State state = 4 [
3254 (state_field_option).option = EXCLUSIVE_STATE,
3255 (state_field_option).nested = false,
3256 (state_field_option).default_state_value = 2
3257 ];
Chenjie Yue8904192017-12-08 19:12:57 -08003258}
3259
Chenjie Yuccfe6452018-01-30 11:33:21 -08003260/*
3261 * Logs foreground service starts and stops.
3262 * Note that this is not when a service starts or stops, but when it is
3263 * considered foreground.
3264 * Logged from
3265 * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
3266 */
3267message ForegroundServiceStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -07003268 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuccfe6452018-01-30 11:33:21 -08003269 // package_name + "/" + class_name
3270 optional string short_name = 2;
3271
3272 enum State {
3273 ENTER = 1;
3274 EXIT = 2;
3275 }
3276 optional State state = 3;
3277}
3278
Chenjie Yue8904192017-12-08 19:12:57 -08003279/**
Chenjie Yubbcbc602018-02-05 16:51:52 -08003280 * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky
3281 * behavior in its own uid. However, the metrics of these isolated uid's almost always should be
3282 * attributed back to the parent (host) uid. One example is Chrome.
3283 *
3284 * Logged from:
3285 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
3286 */
3287message IsolatedUidChanged {
3288 // The host UID. Generally, we should attribute metrics from the isolated uid to the host uid.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003289 // NOTE: DO NOT annotate uid field in this atom. This atom is specially handled in statsd.
Bookatz3c648862018-05-25 13:32:43 -07003290 // This field is ignored when event == REMOVED.
Chenjie Yubbcbc602018-02-05 16:51:52 -08003291 optional int32 parent_uid = 1;
3292
3293 optional int32 isolated_uid = 2;
3294
3295 // We expect an isolated uid to be removed before if it's used for another parent uid.
3296 enum Event {
3297 REMOVED = 0;
3298 CREATED = 1;
3299 }
3300 optional Event event = 3;
3301}
3302
3303/*
3304 * Logs the reception of an incoming network packet causing the main system to wake up for
3305 * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd
3306 * and processed by WakeupController.cpp.
3307 */
3308message PacketWakeupOccurred {
3309 // The uid owning the socket into which the packet was delivered, or -1 if the packet was
3310 // delivered nowhere.
Yao Chenc40a19d2018-03-15 16:48:25 -07003311 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08003312 // The interface name on which the packet was received.
3313 optional string iface = 2;
3314 // The ethertype value of the packet.
3315 optional int32 ethertype = 3;
3316 // String representation of the destination MAC address of the packet.
3317 optional string destination_hardware_address = 4;
3318 // String representation of the source address of the packet if this was an IP packet.
3319 optional string source_ip = 5;
3320 // String representation of the destination address of the packet if this was an IP packet.
3321 optional string destination_ip = 6;
3322 // The value of the protocol field if this was an IPv4 packet or the value of the Next Header
3323 // field if this was an IPv6 packet. The range of possible values is the same for both IP
3324 // families.
3325 optional int32 ip_next_header = 7;
3326 // The source port if this was a TCP or UDP packet.
3327 optional int32 source_port = 8;
3328 // The destination port if this was a TCP or UDP packet.
3329 optional int32 destination_port = 9;
3330}
3331
3332/*
3333 * Logs the memory stats for an app on startup.
3334 * Logged from:
3335 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3336 */
3337message AppStartMemoryStateCaptured {
3338 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003339 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08003340
3341 // The process name.
3342 optional string process_name = 2;
3343
3344 // The activity name.
3345 optional string activity_name = 3;
3346
3347 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003348 optional int64 page_fault = 4;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003349
3350 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003351 optional int64 page_major_fault = 5;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003352
3353 // RSS
3354 optional int64 rss_in_bytes = 6;
3355
3356 // CACHE
3357 optional int64 cache_in_bytes = 7;
3358
3359 // SWAP
3360 optional int64 swap_in_bytes = 8;
3361}
3362
3363/*
3364 * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries
3365 * for LMK event.
3366 * Logged from:
3367 * system/core/lmkd/lmkd.c
3368 */
3369message LmkStateChanged {
3370 enum State {
3371 UNKNOWN = 0;
3372 START = 1;
3373 STOP = 2;
3374 }
3375 optional State state = 1;
3376}
3377
3378/*
3379 * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure.
3380 * Logged from:
3381 * system/core/lmkd/lmkd.c
3382 */
3383message LmkKillOccurred {
3384 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003385 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08003386
3387 // The process name.
3388 optional string process_name = 2;
3389
3390 // oom adj score.
Yangster-maca8a30442018-10-13 23:46:34 -07003391 optional int32 oom_adj_score = 3;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003392
3393 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003394 optional int64 page_fault = 4;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003395
3396 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003397 optional int64 page_major_fault = 5;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003398
3399 // RSS
3400 optional int64 rss_in_bytes = 6;
3401
3402 // CACHE
3403 optional int64 cache_in_bytes = 7;
3404
3405 // SWAP
3406 optional int64 swap_in_bytes = 8;
Jim Blackler8593d1f2018-11-21 15:24:48 +00003407
3408 // The elapsed real time of start of the process.
3409 optional int64 process_start_time_nanos = 9;
Suren Baghdasaryan1fbaa1f2019-03-04 11:09:31 -08003410
3411 // Min oom adj score considered by lmkd.
3412 optional int32 min_oom_score = 10;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003413}
3414
Rajeev Kumar51b54602018-03-01 12:18:26 -08003415/*
3416 * Logs when the ActivityManagerService detects that an app died.
3417 *
3418 * Logged from:
3419 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3420 */
3421message AppDied {
3422 // timestamp(elapsedRealtime) of record creation
tsaichristine5adc7e02020-01-14 17:07:39 -08003423 optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE_STATE];
Rajeev Kumar51b54602018-03-01 12:18:26 -08003424}
3425
Howard Ro21a039c2018-08-06 14:55:47 -07003426/**
3427 * An atom for generic metrics logging. Available from Android Q.
3428 */
3429message GenericAtom {
3430 // The uid of the application that sent this custom atom.
3431 optional int32 uid = 1 [(is_uid) = true];
3432
3433 // An event_id indicates the type of event.
Howard Ro9a862de2018-10-11 16:03:33 -07003434 optional android.stats.EventType event_id = 2;
Howard Ro21a039c2018-08-06 14:55:47 -07003435}
3436
Tej Singhd6d6d772018-09-05 17:41:25 -07003437/**
Will Brockmanfbaa7912019-10-24 15:15:09 -04003438 * Atom for simple logging of user interaction and impression events, such as "the user touched
3439 * this button" or "this dialog was displayed".
3440 * Keep the UI event stream clean: don't use for system or background events.
3441 * Log using the UiEventLogger wrapper - don't write with the StatsLog API directly.
Will Brockman079fdaa2020-01-12 16:45:03 -05003442 *
3443 * Logged from:
3444 * frameworks/base/services/core/java/com/android/server/
3445 * frameworks/base/packages/SystemUI/src/com/android/systemui/
Will Brockmanfbaa7912019-10-24 15:15:09 -04003446 */
3447message UiEventReported {
3448 // The event_id.
3449 optional int32 event_id = 1;
3450 // The event's source or target uid and package, if applicable.
3451 // For example, the package posting a notification, or the destination package of a share.
3452 optional int32 uid = 2 [(is_uid) = true];
3453 optional string package_name = 3;
Will Brockman12282ac2019-12-20 09:37:42 -05003454 // An identifier used to disambiguate which logs refer to a particular instance of some
3455 // UI element. Useful when there might be multiple instances simultaneously active.
3456 optional int32 instance_id = 4;
Will Brockmanfbaa7912019-10-24 15:15:09 -04003457}
3458
3459/**
Will Brockman079fdaa2020-01-12 16:45:03 -05003460 * Reports a notification was created or updated.
3461 *
3462 * Logged from:
3463 * frameworks/base/services/core/java/com/android/server/notification/
3464 */
3465message NotificationReported {
3466 // The event_id (as for UiEventReported).
3467 optional int32 event_id = 1;
3468 // The notifying app's uid and package.
3469 optional int32 uid = 2 [(is_uid) = true];
3470 optional string package_name = 3;
3471 // A small system-assigned identifier for the notification.
3472 // Locally probably-unique, but expect collisions across users and/or days.
3473 optional int32 instance_id = 4;
3474 // The app-assigned notification ID and tag
3475 optional int32 notification_id = 5;
3476 optional string notification_tag = 6;
3477 optional string channel_id = 7; // App-assigned channel ID
3478
3479 // Grouping information
3480 optional string group_id = 8; // Group the notification currently belongs to
3481 optional int32 group_instance_id = 9; // Instance_id of the group-summary notification
3482 optional bool is_group_summary = 10; // Tags the group-summary notification
3483
3484 // Attributes
3485 optional string category = 11; // App-assigned notification category (API-defined strings)
3486 optional int32 style = 12; // App-assigned notification style
3487 optional int32 num_people = 13; // Number of Person records attached to the notification
3488
3489 // Ordering, importance and interruptiveness
3490
3491 optional int32 position = 14; // Position in NotificationManager's list
3492
3493 optional android.stats.sysui.NotificationImportance importance = 15;
3494 optional int32 alerting = 16; // Bitfield, 1=buzz 2=beep 4=blink
3495
3496 enum NotificationImportanceExplanation {
3497 IMPORTANCE_EXPLANATION_UNKNOWN = 0;
3498 IMPORTANCE_EXPLANATION_APP = 1; // App-specified channel importance.
3499 IMPORTANCE_EXPLANATION_USER = 2; // User-specified channel importance.
3500 IMPORTANCE_EXPLANATION_ASST = 3; // Notification Assistant override.
3501 IMPORTANCE_EXPLANATION_SYSTEM = 4; // System override.
3502 // Like _APP, but based on pre-channels priority signal.
3503 IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5;
3504 }
3505
3506 optional NotificationImportanceExplanation importance_source = 17;
3507 optional android.stats.sysui.NotificationImportance importance_initial = 18;
3508 optional NotificationImportanceExplanation importance_initial_source = 19;
3509 optional android.stats.sysui.NotificationImportance importance_asst = 20;
3510 optional int32 assistant_hash = 21;
3511 optional float assistant_ranking_score = 22;
3512}
3513
3514message Notification {
3515 // The notifying app's uid and package.
3516 optional int32 uid = 1 [(is_uid) = true];
3517 optional string package_name = 2;
3518 // A small system-assigned identifier for the notification.
3519 optional int32 instance_id = 3;
3520
3521 // Grouping information.
3522 optional int32 group_instance_id = 4;
3523 optional bool is_group_summary = 5;
3524
3525 // The section of the shade that the notification is in.
3526 // See NotificationSectionsManager.PriorityBucket.
3527 enum NotificationSection {
3528 SECTION_UNKNOWN = 0;
3529 SECTION_PEOPLE = 1;
3530 SECTION_ALERTING = 2;
3531 SECTION_SILENT = 3;
3532 }
3533 optional NotificationSection section = 6;
3534}
3535
3536message NotificationList {
3537 repeated Notification notifications = 1; // An ordered sequence of notifications.
3538}
3539
3540/**
3541 * Reports a notification panel was displayed, e.g. from the lockscreen or status bar.
3542 *
3543 * Logged from:
3544 * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
3545 */
3546message NotificationPanelReported {
3547 // The event_id (as for UiEventReported).
3548 optional int32 event_id = 1;
3549 optional int32 num_notifications = 2;
3550 // The notifications in the panel, in the order that they appear there.
3551 optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES];
3552}
3553
3554/**
3555 * Reports a notification channel, or channel group, was created, updated, or deleted.
3556 *
3557 * Logged from:
3558 * frameworks/base/services/core/java/com/android/server/notification/
3559 */
3560message NotificationChannelModified {
3561 // The event_id (as for UiEventReported).
3562 optional int32 event_id = 1;
3563 // The notifying app's uid and package.
3564 optional int32 uid = 2 [(is_uid) = true];
3565 optional string package_name = 3;
3566 // App-assigned notification channel ID or channel-group ID
3567 optional string channel_id = 4;
3568 // Previous importance setting, if applicable
3569 optional android.stats.sysui.NotificationImportance old_importance = 5;
3570 // New importance setting
3571 optional android.stats.sysui.NotificationImportance importance = 6;
3572}
3573
3574
3575/**
Kevin Chyn1741a072019-01-17 11:54:40 -08003576 * Logs when a biometric acquire event occurs.
Tej Singhd6d6d772018-09-05 17:41:25 -07003577 *
3578 * Logged from:
Kevin Chyn1741a072019-01-17 11:54:40 -08003579 * frameworks/base/services/core/java/com/android/server/biometrics
Tej Singhd6d6d772018-09-05 17:41:25 -07003580 */
Kevin Chyn1741a072019-01-17 11:54:40 -08003581message BiometricAcquired {
3582 // Biometric modality that was acquired.
3583 optional android.hardware.biometrics.ModalityEnum modality = 1;
3584 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java.
3585 optional int32 user = 2;
3586 // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage.
3587 optional bool is_crypto = 3;
3588 // Action that the device is performing. Acquired messages are only expected for enroll and
3589 // authenticate. Other actions may indicate an error.
3590 optional android.hardware.biometrics.ActionEnum action = 4;
3591 // The client that this acquisition was received for.
3592 optional android.hardware.biometrics.ClientEnum client = 5;
3593 // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager.
3594 optional int32 acquire_info = 6;
3595 // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR.
3596 optional int32 acquire_info_vendor = 7;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003597 // Dictates if this message should trigger additional debugging.
3598 optional bool debug = 8;
Tej Singhd6d6d772018-09-05 17:41:25 -07003599}
3600
3601/**
Kevin Chyn1741a072019-01-17 11:54:40 -08003602 * Logs when a biometric authentication event occurs.
Tej Singhd6d6d772018-09-05 17:41:25 -07003603 *
3604 * Logged from:
Kevin Chyn1741a072019-01-17 11:54:40 -08003605 * frameworks/base/services/core/java/com/android/server/biometrics
Tej Singhd6d6d772018-09-05 17:41:25 -07003606 */
Kevin Chyn1741a072019-01-17 11:54:40 -08003607message BiometricAuthenticated {
3608 // Biometric modality that was used.
3609 optional android.hardware.biometrics.ModalityEnum modality = 1;
3610 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3611 optional int32 user = 2;
3612 // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password
3613 // storage.
3614 optional bool is_crypto = 3;
3615 // The client that this acquisition was received for.
3616 optional android.hardware.biometrics.ClientEnum client = 4;
Kevin Chyndb77e132019-01-29 13:30:41 -08003617 // If authentication requires user confirmation. See BiometricPrompt's
3618 // setRequireConfirmation(bool) method.
3619 optional bool require_confirmation = 5;
Tej Singhd6d6d772018-09-05 17:41:25 -07003620
Kevin Chyn1741a072019-01-17 11:54:40 -08003621 enum State {
Tej Singhd6d6d772018-09-05 17:41:25 -07003622 UNKNOWN = 0;
Kevin Chyn1741a072019-01-17 11:54:40 -08003623 REJECTED = 1;
3624 PENDING_CONFIRMATION = 2;
3625 CONFIRMED = 3;
Tej Singhd6d6d772018-09-05 17:41:25 -07003626 }
Kevin Chyn1741a072019-01-17 11:54:40 -08003627
3628 // State of the current auth attempt.
Kevin Chyndb77e132019-01-29 13:30:41 -08003629 optional State state = 6;
Kevin Chyn1741a072019-01-17 11:54:40 -08003630 // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is
3631 // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to
3632 // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to
3633 // CONFIRMED.
Kevin Chyndb77e132019-01-29 13:30:41 -08003634 optional int64 latency_millis = 7;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003635 // Dictates if this message should trigger additional debugging.
3636 optional bool debug = 8;
Kevin Chyn1741a072019-01-17 11:54:40 -08003637}
3638
3639/**
3640 * Logs when a biometric error occurs.
3641 *
3642 * Logged from:
3643 * frameworks/base/services/core/java/com/android/server/biometrics
3644 */
3645message BiometricErrorOccurred {
3646 // Biometric modality that was used.
3647 optional android.hardware.biometrics.ModalityEnum modality = 1;
3648 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3649 optional int32 user = 2;
3650 // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage.
3651 optional bool is_crypto = 3;
3652 // Action that the device is performing.
3653 optional android.hardware.biometrics.ActionEnum action = 4;
3654 // The client that this acquisition was received for.
3655 optional android.hardware.biometrics.ClientEnum client = 5;
3656 // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors
3657 // are unique to modality.
3658 optional int32 error_info = 6;
3659 // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined
3660 // by the vendor and not specified by the HIDL interface.
3661 optional int32 error_info_vendor = 7;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003662 // Dictates if this message should trigger additional debugging.
3663 optional bool debug = 8;
Kevin Chyn7fca2362019-06-20 17:20:42 -07003664 // Time spent during the authentication attempt.
3665 optional int64 latency_millis = 9;
Kevin Chyn1741a072019-01-17 11:54:40 -08003666}
3667
3668/**
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003669 * Logs when a system health issue is detected.
Kevin Chyn1741a072019-01-17 11:54:40 -08003670 * Logged from:
3671 * frameworks/base/services/core/java/com/android/server/biometrics
3672 */
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003673message BiometricSystemHealthIssueDetected {
Kevin Chyn1741a072019-01-17 11:54:40 -08003674 // Biometric modality.
3675 optional android.hardware.biometrics.ModalityEnum modality = 1;
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003676 // Type of issue detected.
3677 optional android.hardware.biometrics.IssueEnum issue = 2;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003678 // Dictates if this message should trigger additional debugging.
3679 optional bool debug = 3;
Tej Singhd6d6d772018-09-05 17:41:25 -07003680}
Howard Ro688ae182018-09-25 00:09:36 -07003681
joshmccloskey6f952b22019-03-25 20:59:35 -07003682/**
3683 * Logs when a biometric enrollment occurs.
3684 *
3685 * Logged from:
3686 * frameworks/base/services/core/java/com/android/server/biometrics
3687 */
3688message BiometricEnrolled {
3689 // Biometric modality that was used.
3690 optional android.hardware.biometrics.ModalityEnum modality = 1;
3691 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3692 optional int32 user = 2;
3693 // The amount of time the enrollment took in milliseconds.
3694 optional int64 latency_millis = 3;
3695 // Whether or not the enrollment was successful.
3696 optional bool success = 4;
3697}
3698
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003699/*
Tej Singh0d176952019-01-16 19:10:54 -08003700 * Logs when a flag flip update occurrs. Used for mainline modules that update via flag flips.
Yangster-macb89807e2018-11-15 21:10:57 -08003701 */
Tej Singh0d176952019-01-16 19:10:54 -08003702message FlagFlipUpdateOccurred {
3703 // If the event is from a flag config package, specify the package name.
3704 optional string flag_flip_package_name = 1;
3705
3706 // The order id of the package
3707 optional int64 order_id = 2;
Yangster-macb89807e2018-11-15 21:10:57 -08003708}
3709
Chenjie Yu6b1667c2019-01-18 10:09:33 -08003710/**
3711 * Potential experiment ids that goes with a train install.
Jonathan Nguyena0e6de12020-01-28 18:33:55 -08003712 * Should be kept in sync with experiment_ids.proto.
Chenjie Yu6b1667c2019-01-18 10:09:33 -08003713 */
3714message TrainExperimentIds {
3715 repeated int64 experiment_id = 1;
3716}
3717
Yangster-macb89807e2018-11-15 21:10:57 -08003718/*
3719 * Logs when a binary push state changes.
Chenjie Yu8366c712019-01-16 20:48:30 -08003720 * Logged by the installer via public api.
Yangster-macb89807e2018-11-15 21:10:57 -08003721 */
3722message BinaryPushStateChanged {
Chenjie Yu8366c712019-01-16 20:48:30 -08003723 // Name of the train.
3724 optional string train_name = 1;
3725 // Version code for a "train" of packages that need to be installed atomically
3726 optional int64 train_version_code = 2;
3727 // After installation of this package, device requires a restart.
3728 optional bool requires_staging = 3;
3729 // Rollback should be enabled for this install.
3730 optional bool rollback_enabled = 4;
3731 // Requires low latency monitoring if possible.
3732 optional bool requires_low_latency_monitor = 5;
3733
Yangster-macb89807e2018-11-15 21:10:57 -08003734 enum State {
Chenjie Yu8366c712019-01-16 20:48:30 -08003735 UNKNOWN = 0;
3736 INSTALL_REQUESTED = 1;
3737 INSTALL_STARTED = 2;
3738 INSTALL_STAGED_NOT_READY = 3;
3739 INSTALL_STAGED_READY = 4;
3740 INSTALL_SUCCESS = 5;
Tej Singh403fe472019-04-30 12:54:21 -07003741 // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH,
3742 // and INSTALL_FAILURE_COMMIT.
3743 INSTALL_FAILURE = 6 [deprecated = true];
3744 // This enum is for installs that are manually cancelled via the Manual Update UI.
Chenjie Yu8366c712019-01-16 20:48:30 -08003745 INSTALL_CANCELLED = 7;
3746 INSTALLER_ROLLBACK_REQUESTED = 8;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08003747 INSTALLER_ROLLBACK_INITIATED = 9;
3748 INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
3749 INSTALLER_ROLLBACK_STAGED = 11;
3750 INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
3751 INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
3752 INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
3753 INSTALLER_ROLLBACK_SUCCESS = 15;
3754 INSTALLER_ROLLBACK_FAILURE = 16;
Howard Ro174ed562019-04-07 22:17:58 -07003755 INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17;
3756 INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18;
3757 INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19;
3758 INSTALL_STAGED_CANCEL_REQUESTED = 20;
3759 INSTALL_STAGED_CANCEL_SUCCESS = 21;
3760 INSTALL_STAGED_CANCEL_FAILURE = 22;
Tej Singh403fe472019-04-30 12:54:21 -07003761 INSTALL_FAILURE_DOWNLOAD = 23;
3762 INSTALL_FAILURE_STATE_MISMATCH = 24;
3763 INSTALL_FAILURE_COMMIT = 25;
Jonathan Nguyen5886a712020-01-16 10:34:21 -08003764 REBOOT_TRIGGERED = 26;
Yangster-macb89807e2018-11-15 21:10:57 -08003765 }
Chenjie Yu8366c712019-01-16 20:48:30 -08003766 optional State state = 6;
Chenjie Yu6b1667c2019-01-18 10:09:33 -08003767 // Possible experiment ids for monitoring this push.
3768 optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES];
3769 // user id
3770 optional int32 user_id = 8;
Jonathan Nguyen5886a712020-01-16 10:34:21 -08003771 optional int32 reason = 9;
Yangster-macb89807e2018-11-15 21:10:57 -08003772}
3773
Tej Singhc9203082019-05-03 13:42:23 -07003774/* Test atom, is not logged anywhere */
3775message TestAtomReported {
3776 repeated AttributionNode attribution_node = 1;
3777 optional int32 int_field = 2;
3778 optional int64 long_field = 3;
3779 optional float float_field = 4;
3780 optional string string_field = 5;
3781 optional bool boolean_field = 6;
3782 enum State {
3783 UNKNOWN = 0;
3784 OFF = 1;
3785 ON = 2;
3786 }
3787 optional State state = 7;
3788 optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES];
3789}
3790
Maggie Whitefc1aa592018-11-28 21:55:23 -08003791/** Represents USB port overheat event. */
3792message UsbPortOverheatEvent {
3793 /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */
3794 optional int32 plug_temperature_deci_c = 1;
3795
3796 /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */
3797 optional int32 max_temperature_deci_c = 2;
3798
3799 /* Time between USB plug event and overheat threshold trip, in seconds. */
3800 optional int32 time_to_overheat_secs = 3;
3801
3802 /* Time between overheat threshold trip and hysteresis, in seconds. */
3803 optional int32 time_to_hysteresis_secs = 4;
3804
3805 /* Time between hysteresis and active mitigation ending, in seconds. */
3806 optional int32 time_to_inactive_secs = 5;
3807};
3808
Maggie White8735b852019-01-18 11:40:49 -08003809/**
3810 * Logs total effective full charge and discharge cycles on a battery.
3811 * Here are some examples of one effective cycle:
3812 * 1) the battery charges from 0% to 100% and drains back to 0%,
3813 * 2) charging from 50% to 100% and draining back to 50% twice.
3814 * Pulled from:
3815 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
3816 */
3817message BatteryCycleCount {
3818 /* Number of total charge and discharge cycles on the system battery. */
3819 optional int32 cycle_count = 1;
3820}
3821
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003822/**
Carmen Agimof12dec122019-03-06 16:14:38 +00003823 * Logs that external storage is mounted and information about it, the storage type (sd card/usb/
3824 * others), its type (public or private) and the size in bytes.
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003825 * Pulled from:
3826 * StatsCompanionService
3827 */
3828
Carmen Agimof12dec122019-03-06 16:14:38 +00003829message ExternalStorageInfo {
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003830
Carmen Agimof12dec122019-03-06 16:14:38 +00003831 enum VolumeType {
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003832 UNKNOWN = 0;
Carmen Agimof12dec122019-03-06 16:14:38 +00003833 PUBLIC = 1;
3834 PRIVATE = 2;
3835 OTHER = 3;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003836 }
3837
Carmen Agimof12dec122019-03-06 16:14:38 +00003838 // The type of external storage.
3839 optional android.stats.storage.ExternalStorageType storage_type = 1;
3840 // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal.
3841 optional VolumeType volume_type = 2;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003842 // Total size of the sd card in bytes.
Carmen Agimof12dec122019-03-06 16:14:38 +00003843 optional int64 size_bytes = 3;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003844}
3845
Yangster-macb89807e2018-11-15 21:10:57 -08003846/*
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003847 * Logs when a connection becomes available and lost.
3848 * Logged in StatsCompanionService.java
3849 */
3850message ConnectivityStateChanged {
Chenjie Yu75b3c492018-10-06 21:45:19 -07003851 // Id of the network.
3852 optional int32 net_id = 1;
3853
3854 enum State {
3855 UNKNOWN = 0;
3856 CONNECTED = 1;
3857 DISCONNECTED = 2;
3858 }
3859 // Connected state of a network.
3860 optional State state = 2;
3861}
3862
3863/**
3864 * Logs when a service starts and stops.
3865 * Logged from:
3866 * services/core/java/com/android/server/am/ActiveServices.java
3867 */
3868message ServiceStateChanged {
3869
3870 optional int32 uid = 1 [(is_uid) = true];
3871
3872 optional string package_name = 2;
3873
3874 optional string service_name = 3;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003875
3876 enum State {
Chenjie Yu75b3c492018-10-06 21:45:19 -07003877 START = 1;
3878 STOP = 2;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003879 }
Chenjie Yu75b3c492018-10-06 21:45:19 -07003880
3881 optional State state = 4;
3882}
3883
3884/**
3885 * Logs when a service is launched.
3886 * Logged from:
3887 * services/core/java/com/android/server/am/ActiveServices.java
3888 */
3889message ServiceLaunchReported {
3890
3891 optional int32 uid = 1 [(is_uid) = true];
3892
3893 optional string package_name = 2;
3894
3895 optional string service_name = 3;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003896}
Howard Ro688ae182018-09-25 00:09:36 -07003897
Andrei Onea4ad6d0c2019-02-08 13:54:12 +00003898/**
3899 * Logs when a hidden API is used.
3900 *
3901 * Logged from:
3902 * libcore/libart/src/main/java/dalvik/system/VMRuntime.java
3903 */
3904message HiddenApiUsed {
3905 // The uid of the app making the hidden access.
3906 optional int32 uid = 1 [(is_uid) = true];
3907
3908 // Signature of the method or field accessed.
3909 optional string signature = 2;
3910
3911 enum AccessMethod {
3912 NONE = 0;
3913 REFLECTION = 1;
3914 JNI = 2;
3915 LINKING = 3;
3916 }
3917
3918 // Type of access.
3919 optional AccessMethod access_method = 3;
3920
3921 // Whether the access was prevented or not.
3922 optional bool access_denied = 4;
3923}
3924
Fabian Kozynskibfd6d852019-02-15 15:08:16 -05003925/**
3926 * Logs user interaction with the Privacy Indicators added in Q. In particular:
3927 * - When user sees privacy chip
3928 * - When user clicks privacy chip
3929 * - How does the user exit the Privacy Dialog
3930 * Logged from:
Fabian Kozynskibfd6d852019-02-15 15:08:16 -05003931 * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
3932 */
3933message PrivacyIndicatorsInteracted {
3934
3935 enum Type {
3936 UNKNOWN = 0;
3937 CHIP_VIEWED = 1;
3938 CHIP_CLICKED = 2;
3939 DIALOG_PRIVACY_SETTINGS = 3;
3940 DIALOG_DISMISS = 4;
3941 DIALOG_LINE_ITEM = 5;
3942 }
3943
tsaichristine5adc7e02020-01-14 17:07:39 -08003944 optional Type type = 1 [(state_field_option).option = EXCLUSIVE_STATE];
Fabian Kozynskibfd6d852019-02-15 15:08:16 -05003945
3946 // Used if the type is LINE_ITEM
3947 optional string package_name = 2;
3948}
3949
Carmen Agimof6dcc5032019-03-01 16:20:09 +00003950/**
3951 * Logs information about a package that is moved from the internal to external storage and vice
3952 * versa.
3953 * It logs the package name, the type of the external storage where the package is installed
3954 * (if moved to external storage, or UNKNOWN if moved to internal storage),
3955 * and the move type: if it's from internal to external or the other way around.
3956 *
3957 * Logged from:
3958 frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
3959 */
3960message AppMovedStorageReported {
3961 enum MoveType {
3962 UNKNOWN = 0;
3963 TO_EXTERNAL = 1;
3964 TO_INTERNAL = 2;
3965 }
3966 // The type of the external storage.
3967 optional android.stats.storage.ExternalStorageType external_storage_type = 1;
3968 // The type of move.
3969 optional MoveType move_type = 2;
3970 // The name of the package that was moved.
3971 optional string package_name = 3;
3972}
3973
jianjin8f2dee02019-03-29 14:03:08 -07003974/**
3975 * Logs when system server watchdog occurs.
3976 * Logged from:
3977 * frameworks/base/services/core/java/com/android/server/Watchdog.java
3978 */
3979message SystemServerWatchdogOccurred {
3980 optional string subject = 1;
3981}
3982
3983/**
3984 * Logs when new file added to tombstones.
3985 * Logged from:
3986 * frameworks/base/core/java/com/android/server/BootReceiver.java
3987 */
3988message TombStoneOccurred {
3989}
3990
Hai Zhang5d3328d2019-04-13 21:25:06 +08003991/*
3992 * Information about a role request
3993 *
3994 * Logged from:
3995 * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java
3996 */
3997message RoleRequestResultReported {
3998 // UID of application requesting the role
3999 optional int32 requesting_uid = 1;
4000
4001 // Package name of application requesting the role
4002 optional string requesting_package_name = 2;
4003
4004 // The role to be granted
4005 optional string role_name = 3;
4006
4007 // The count of applications qualifying for the role
4008 optional int32 qualifying_count = 4;
4009
4010 // UID of application current granted the role
4011 optional int32 current_uid = 5;
4012
4013 // Package name of application current granted the role
4014 optional string current_package_name = 6;
4015
4016 // UID of another application that user chose to grant the role to, instead of the requesting
4017 // application
4018 optional int32 granted_another_uid = 7;
4019
4020 // Package name of another application that user chose to grant the role to, instead of the
4021 // requesting application
4022 optional string granted_another_package_name = 8;
4023
4024 enum Result {
4025 UNDEFINED = 0;
4026 // role request was ignored
4027 IGNORED = 1;
4028 // role request was ignored because it's already granted
4029 IGNORED_ALREADY_GRANTED = 2;
4030 // role request was ignored because the application isn't qualified
4031 IGNORED_NOT_QUALIFIED = 3;
4032 // role request was ignored because user said it should be always denied
4033 IGNORED_USER_ALWAYS_DENIED = 4;
4034 // role was granted by user action
4035 USER_GRANTED = 5;
4036 // role was denied by user action
4037 USER_DENIED = 6;
4038 // role was denied by user granting another application the role
4039 USER_DENIED_GRANTED_ANOTHER = 7;
4040 // role was denied and set to be always denied by the user
4041 USER_DENIED_WITH_ALWAYS = 8;
4042 }
4043 // The result of the role request
4044 optional Result result = 9;
4045}
4046
Mark Tabrya824a642019-11-05 12:26:12 -08004047/**
4048 * Logs when a Vehicle Maps Service client's connection state has changed
4049 *
4050 * Logged from:
4051 * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java
4052 */
4053message VmsClientConnectionStateChanged {
4054 // The UID of the VMS client app
4055 optional int32 uid = 1 [(is_uid) = true];
4056
4057 enum State {
4058 UNKNOWN = 0;
4059 // Attempting to connect to the client
4060 CONNECTING = 1;
4061 // Client connection established
4062 CONNECTED = 2;
4063 // Client connection closed unexpectedly
4064 DISCONNECTED = 3;
4065 // Client connection closed by VMS
4066 TERMINATED = 4;
4067 // Error establishing the client connection
4068 CONNECTION_ERROR = 5;
4069 }
4070
4071 optional State state = 2;
4072}
4073
Jeff Sharkey6bd21572019-11-15 20:45:33 -07004074/**
4075 * Logs when MediaProvider has successfully finished scanning a storage volume.
4076 *
4077 * Logged from:
4078 * packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java
4079 */
4080message MediaProviderScanEvent {
4081 enum Reason {
4082 // Scan triggered due to unknown reason
4083 UNKNOWN = 0;
4084 // Scan triggered due to storage volume being mounted
4085 MOUNTED = 1;
4086 // Scan triggered due to explicit user action or app request
4087 DEMAND = 2;
4088 // Scan triggered due to idle maintenance
4089 IDLE = 3;
4090 }
4091
4092 // Volume type that this event pertains to
4093 optional android.stats.mediaprovider.VolumeType volume_type = 1;
4094 // Reason why this scan was triggered
4095 optional Reason reason = 2;
4096 // Total number of files scanned
4097 optional int64 item_count = 3;
4098 // Duration of scan, normalized per file
4099 optional float normalized_duration_millis = 4;
4100 // Number of database inserts, normalized per file
4101 optional float normalized_insert_count = 5;
4102 // Number of database updates, normalized per file
4103 optional float normalized_update_count = 6;
4104 // Number of database deletes, normalized per file
4105 optional float normalized_delete_count = 7;
4106}
4107
4108/**
4109 * Logs when an app has asked MediaProvider to delete media belonging to the user.
4110 *
4111 * Logged from:
4112 * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
4113 */
4114message MediaProviderDeletionEvent {
4115 // Volume type that this event pertains to
4116 optional android.stats.mediaprovider.VolumeType volume_type = 1;
4117 // Device timestamp when this deletion event occurred
4118 optional int64 timestamp_millis = 2;
4119 // App that requested deletion
4120 optional string package_name = 3;
4121 // Number of items that were deleted
4122 optional int32 item_count = 4;
4123}
4124
4125/**
4126 * Logs when an app has asked MediaProvider to grant them access to media belonging to the user.
4127 *
4128 * Logged from:
4129 * packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java
4130 */
4131message MediaProviderPermissionEvent {
4132 enum Result {
4133 UNKNOWN = 0;
4134 USER_GRANTED = 1;
4135 AUTO_GRANTED = 2;
4136 USER_DENIED = 3;
4137 USER_DENIED_WITH_PREJUDICE = 4;
4138 AUTO_DENIED = 5;
4139 }
4140
4141 // Volume type that this event pertains to
4142 optional android.stats.mediaprovider.VolumeType volume_type = 1;
4143 // Device timestamp when this permission event occurred
4144 optional int64 timestamp_millis = 2;
4145 // App that requested permission
4146 optional string package_name = 3;
4147 // Number of items that were requested
4148 optional int32 item_count = 4;
4149 // Result of this request
4150 optional Result result = 5;
4151}
4152
4153/**
4154 * Logs when MediaProvider has finished upgrading or downgrading its database schema.
4155 *
4156 * Logged from:
4157 * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java
4158 */
4159message MediaProviderSchemaChange {
4160 // Volume type that this event pertains to
4161 optional android.stats.mediaprovider.VolumeType volume_type = 1;
4162 // Old database version code
4163 optional int32 version_from = 2;
4164 // New database version code
4165 optional int32 version_to = 3;
4166 // Total number of files in database
4167 optional int64 item_count = 4;
4168 // Duration of schema change, normalized per file
4169 optional float normalized_duration_millis = 5;
4170}
4171
4172/**
4173 * Logs when MediaProvider has finished an idle maintenance job.
4174 *
4175 * Logged from:
4176 * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
4177 */
4178message MediaProviderIdleMaintenance {
4179 // Volume type that this event pertains to
4180 optional android.stats.mediaprovider.VolumeType volume_type = 1;
4181
4182 // Total number of files in database
4183 optional int64 item_count = 2;
4184 // Duration of idle maintenance, normalized per file
4185 optional float normalized_duration_millis = 3;
4186 // Number of thumbnails found to be stale, normalized per file
4187 optional float normalized_stale_thumbnails = 4;
4188 // Number of items found to be expired, normalized per file
4189 optional float normalized_expired_media = 5;
4190}
4191
Keun young Park3e033cb2019-12-18 11:27:35 -08004192/**
4193 * Represents boot time event with duration in ms.
4194 *
4195 * Logged from: bootstat and various system server components. Check each enums for details.
4196 */
4197message BootTimeEventDuration {
4198 enum DurationEvent {
4199 UNKNOWN = 0;
4200 // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat.
4201 ABSOLUTE_BOOT_TIME = 1;
4202 // Bootloader's 1st stage execution time.
4203 // Logged from bootstat.
4204 BOOTLOADER_FIRST_STAGE_EXEC = 2;
4205 // Bootloader's 1st stage loading time.
4206 // Logged from bootstat.
4207 BOOTLOADER_FIRST_STAGE_LOAD = 3;
4208 // Bootloader's kernel loading time.
4209 // Logged from bootstat.
4210 BOOTLOADER_KERNEL_LOAD = 4;
4211 // Bootloader's 2nd stage execution time.
4212 // Logged from bootstat.
4213 BOOTLOADER_SECOND_STAGE_EXEC = 5;
4214 // Bootloader's 2nd stage loading time.
4215 // Logged from bootstat.
4216 BOOTLOADER_SECOND_STAGE_LOAD = 6;
4217 // Duration for Bootloader to show unlocked device's warning UI. This should not happen
4218 // for locked device.
4219 // Logged from bootstat.
4220 BOOTLOADER_UI_WAIT = 7;
4221 // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above.
4222 // Logged from bootstat.
4223 BOOTLOADER_TOTAL = 8;
4224 // Shutdown duration inside init for the reboot before the current boot up.
4225 // Logged from f/b/services/.../BootReceiver.java.
4226 SHUTDOWN_DURATION = 9;
4227 // Total time for mounting of disk devices during bootup.
4228 // Logged from f/b/services/.../BootReceiver.java.
4229 MOUNT_DEFAULT_DURATION = 10;
4230 // Total time for early stage mounting of disk devices during bootup.
4231 // Logged from f/b/services/.../BootReceiver.java.
4232 MOUNT_EARLY_DURATION = 11;
4233 // Total time for late stage mounting of disk devices during bootup.
4234 // Logged from f/b/services/.../BootReceiver.java.
4235 MOUNT_LATE_DURATION = 12;
4236 // Average time to scan non-system app after OTA
4237 // Logged from f/b/services/.../PackageManagerService.java
4238 OTA_PACKAGE_MANAGER_INIT_TIME = 13;
4239 // Time to initialize Package manager after OTA
4240 // Logged from f/b/services/.../PackageManagerService.java
4241 OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14;
4242 // Time to scan all system app from Package manager after OTA
4243 // Logged from f/b/services/.../PackageManagerService.java
4244 OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15;
4245 // Init's total time for cold boot stage.
4246 // Logged from bootstat.
4247 COLDBOOT_WAIT = 16;
4248 // Init's total time for initializing selinux.
4249 // Logged from bootstat.
4250 SELINUX_INIT = 17;
4251 // Time since last factory reset.
4252 // Logged from bootstat.
4253 FACTORY_RESET_TIME_SINCE_RESET = 18;
Keun young Parka5a696a2020-02-03 09:42:36 -08004254 // Init's total time spent for completing the 1st stage.
4255 // Logged from bootstat.
4256 ANDROID_INIT_STAGE_1 = 19;
Keun young Park3e033cb2019-12-18 11:27:35 -08004257 }
4258
4259 // Type of the event.
4260 optional DurationEvent event = 1;
4261 // Duration of the event in ms.
4262 optional int64 duration_millis = 2;
4263}
4264
4265/**
4266 * Represents the start of specific boot time event during bootup in ms. This is usually a time
4267 * since boot-up.
4268 *
4269 * Logged from: bootstat and various system server components. Check each enums for details.
4270 */
4271message BootTimeEventElapsedTime {
4272 enum ElapsedTimeEvent {
4273 UNKNOWN = 0;
4274 // Time when init starts 1st stage. Logged from bootstat.
4275 ANDROID_INIT_STAGE_1 = 1;
4276 // Time when sys.boot_completed prop is set.
4277 // Logged from bootstat.
4278 BOOT_COMPLETE = 2;
4279 // BOOT_COMPLETE for encrypted device.
4280 BOOT_COMPLETE_ENCRYPTION = 3;
4281 // BOOT_COMPLETE for device with no encryption.
4282 BOOT_COMPLETE_NO_ENCRYPTION = 4;
4283 // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time.
Keun young Parka5a696a2020-02-03 09:42:36 -08004284 BOOT_COMPLETE_POST_DECRYPT = 5;
Keun young Park3e033cb2019-12-18 11:27:35 -08004285 // BOOT_COMPLETE after factory reset.
4286 FACTORY_RESET_BOOT_COMPLETE = 6;
4287 // BOOT_COMPLETE_NO_ENCRYPTION after factory reset.
4288 FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7;
Keun young Parka5a696a2020-02-03 09:42:36 -08004289 // BOOT_COMPLETE_POST_DECRYPT after factory reset.
4290 FACTORY_RESET_BOOT_COMPLETE_POST_DECRYPT = 8;
Keun young Park3e033cb2019-12-18 11:27:35 -08004291 // BOOT_COMPLETE after OTA.
4292 OTA_BOOT_COMPLETE = 9;
4293 // BOOT_COMPLETE_NO_ENCRYPTION after OTA.
4294 OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10;
Keun young Parka5a696a2020-02-03 09:42:36 -08004295 // BOOT_COMPLETE_POST_DECRYPT after OTA.
4296 OTA_BOOT_COMPLETE_POST_DECRYPT = 11;
Keun young Park3e033cb2019-12-18 11:27:35 -08004297 // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast.
4298 // Logged from f/b/services/.../UserController.java
4299 FRAMEWORK_LOCKED_BOOT_COMPLETED = 12;
4300 // Time when the system starts sending BOOT_COMPLETED broadcast.
4301 // Logged from f/b/services/.../UserController.java
4302 FRAMEWORK_BOOT_COMPLETED = 13;
4303 // Time when the package manager starts init.
4304 // Logged from f/b/services/.../SystemServer.java
4305 PACKAGE_MANAGER_INIT_START = 14;
4306 // Time when package manager is ready
4307 // Logged from f/b/services/.../SystemServer.java
4308 PACKAGE_MANAGER_INIT_READY = 15;
4309 // Represents the time when user has entered unlock credential for system with user pin.
4310 // Logged from bootstat.
4311 POST_DECRYPT = 16;
4312 // Represents the start of zygote's init.
4313 // Logged from zygote itself.
4314 ZYGOTE_INIT_START = 17;
4315 // Represents the start of secondary zygote's init.
4316 // TODO: add logging to zygote
4317 SECONDARY_ZYGOTE_INIT_START = 18;
4318 // Represents the start of system server's init.
4319 // Logged from f/b/services/.../SystemServer.java
4320 SYSTEM_SERVER_INIT_START = 19;
4321 // Represents the completion of system server's init.
4322 // Logged from f/b/services/.../SystemServer.java
4323 SYSTEM_SERVER_READY = 20;
4324 // Represents the start of launcher during boot-up.
4325 // TODO: add logging
4326 LAUNCHER_START = 21;
4327 // Represents the completion of launcher's initial rendering. User can use other apps from
4328 // launcher from this point.
4329 // TODO: add logging
4330 LAUNCHER_SHOWN = 22;
4331 }
4332
4333 // Type of the event.
4334 optional ElapsedTimeEvent event = 1;
4335 // Time since bootup for the event.
4336 // It should be acquired from SystemClock elapsedRealtime() call or equivalent.
4337 optional int64 time_millis = 2;
4338}
4339
4340/**
4341 * Boot time events with UTC time.
4342 *
4343 * Logged from: bootstat and various system server components. Check each enums for details.
4344 */
4345message BootTimeEventUtcTime {
4346 enum UtcTimeEvent {
4347 UNKNOWN = 0;
4348 // Time of the bootstat's marking of 1st boot after the last factory reset.
4349 // Logged from bootstat.
4350 FACTORY_RESET_RESET_TIME = 1;
4351 // The time when bootstat records FACTORY_RESET_* events. This is close to
4352 // BOOT_COMPLETE time for the current bootup.
4353 // Logged from bootstat.
4354 FACTORY_RESET_CURRENT_TIME = 2;
4355 // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose.
4356 // Logged from bootstat.
4357 FACTORY_RESET_RECORD_VALUE = 3;
4358 }
4359
4360 // Type of the event.
4361 optional UtcTimeEvent event = 1;
4362 // UTC time for the event.
4363 optional int64 utc_time_secs = 2;
4364}
4365
4366/**
4367 * Boot time events representing specific error code during bootup.
4368 * Meaning of error code can be different per each event type.
4369 *
4370 * Logged from: bootstat and various system server components. Check each enums for details.
4371 */
4372message BootTimeEventErrorCode {
4373 enum ErrorCodeEvent {
4374 UNKNOWN = 0;
4375 // Linux error code for time() call to get the current UTC time.
4376 // Logged from bootstat.
4377 FACTORY_RESET_CURRENT_TIME_FAILURE = 1;
4378 // Represents UmountStat before the reboot for the current boot up. Error codes defined
4379 // as UMOUNT_STAT_* from init/reboot.cpp.
4380 // Logged from f/b/services/.../BootReceiver.java.
4381 SHUTDOWN_UMOUNT_STAT = 2;
Keun young Parkdf1534d2020-01-13 18:55:31 -08004382 // Reprepsents fie system mounting error code of /data partition for the current boot.
4383 // Error codes defined as combination of FsStatFlags from system/core/fs_mgr/fs_mgr.cpp.
Keun young Park3e033cb2019-12-18 11:27:35 -08004384 // Logged from f/b/services/.../BootReceiver.java.
Keun young Parkdf1534d2020-01-13 18:55:31 -08004385 FS_MGR_FS_STAT_DATA_PARTITION = 3;
Keun young Park3e033cb2019-12-18 11:27:35 -08004386 }
4387
4388 // Type of the event.
4389 optional ErrorCodeEvent event = 1;
4390 // error code defined per each event type.
4391 // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of
4392 // FS_MGR_FS_STAT.
4393 optional int32 error_code = 2;
4394}
4395
Chenjie Yubbcbc602018-02-05 16:51:52 -08004396//////////////////////////////////////////////////////////////////////
4397// Pulled atoms below this line //
4398//////////////////////////////////////////////////////////////////////
4399
4400/**
David Chenc8a43242017-10-17 16:23:28 -07004401 * Pulls bytes transferred via wifi (Sum of foreground and background usage).
4402 *
4403 * Pulled from:
4404 * StatsCompanionService (using BatteryStats to get which interfaces are wifi)
4405 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004406message WifiBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07004407 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07004408
4409 optional int64 rx_bytes = 2;
4410
4411 optional int64 rx_packets = 3;
4412
4413 optional int64 tx_bytes = 4;
4414
4415 optional int64 tx_packets = 5;
4416}
4417
4418/**
4419 * Pulls bytes transferred via wifi (separated by foreground and background usage).
4420 *
4421 * Pulled from:
4422 * StatsCompanionService (using BatteryStats to get which interfaces are wifi)
4423 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004424message WifiBytesTransferByFgBg {
Yao Chenc40a19d2018-03-15 16:48:25 -07004425 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07004426
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08004427 // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats.
4428 optional bool is_foreground = 2;
David Chenc8a43242017-10-17 16:23:28 -07004429
4430 optional int64 rx_bytes = 3;
4431
4432 optional int64 rx_packets = 4;
4433
4434 optional int64 tx_bytes = 5;
4435
4436 optional int64 tx_packets = 6;
4437}
4438
4439/**
4440 * Pulls bytes transferred via mobile networks (Sum of foreground and background usage).
4441 *
4442 * Pulled from:
4443 * StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
4444 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004445message MobileBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07004446 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07004447
4448 optional int64 rx_bytes = 2;
4449
4450 optional int64 rx_packets = 3;
4451
4452 optional int64 tx_bytes = 4;
4453
4454 optional int64 tx_packets = 5;
4455}
4456
4457/**
4458 * Pulls bytes transferred via mobile networks (separated by foreground and background usage).
4459 *
4460 * Pulled from:
4461 * StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
4462 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004463message MobileBytesTransferByFgBg {
Yao Chenc40a19d2018-03-15 16:48:25 -07004464 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07004465
Yao Chenc40a19d2018-03-15 16:48:25 -07004466 // 1 denotes foreground and 0 denotes background. This is called Set in
4467 // NetworkStats.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08004468 optional bool is_foreground = 2;
David Chenc8a43242017-10-17 16:23:28 -07004469
4470 optional int64 rx_bytes = 3;
4471
4472 optional int64 rx_packets = 4;
4473
4474 optional int64 tx_bytes = 5;
4475
4476 optional int64 tx_packets = 6;
4477}
4478
4479/**
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004480 * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller.
4481 *
4482 * Pulled from:
4483 * StatsCompanionService
4484 */
4485message BluetoothBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07004486 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004487
4488 optional int64 rx_bytes = 2;
4489
4490 optional int64 tx_bytes = 3;
4491}
4492
4493/**
David Chenc8a43242017-10-17 16:23:28 -07004494 * Pulls the kernel wakelock durations. This atom is adapted from
4495 * android/internal/os/KernelWakelockStats.java
4496 *
4497 * Pulled from:
4498 * StatsCompanionService using KernelWakelockReader.
4499 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004500message KernelWakelock {
David Chenc8a43242017-10-17 16:23:28 -07004501 optional string name = 1;
4502
4503 optional int32 count = 2;
4504
4505 optional int32 version = 3;
4506
Yangster-maca8a30442018-10-13 23:46:34 -07004507 optional int64 time_micros = 4;
David Chenc8a43242017-10-17 16:23:28 -07004508}
Chenjie Yu5305e1d2017-10-31 13:49:36 -07004509
Chenjie Yu05013b32017-11-21 10:21:41 -08004510/**
Benjamin Schwartz51329b72018-12-06 10:48:03 -08004511 * Pulls low power state information. If power.stats HAL is not available, this
4512 * includes platform and subsystem sleep state information,
4513 * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState
4514 * as defined in:
Chenjie Yu5305e1d2017-10-31 13:49:36 -07004515 * hardware/interfaces/power/1.0/types.hal
Chenjie Yu5305e1d2017-10-31 13:49:36 -07004516 * hardware/interfaces/power/1.1/types.hal
Benjamin Schwartz51329b72018-12-06 10:48:03 -08004517 * If power.stats HAL is available, this includes PowerEntityStateResidencyResult
4518 * as defined in:
4519 * hardware/interfaces/power/stats/1.0/types.hal
Chenjie Yu5305e1d2017-10-31 13:49:36 -07004520 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004521message SubsystemSleepState {
Chenjie Yubbcbc602018-02-05 16:51:52 -08004522 // Subsystem name
4523 optional string subsystem_name = 1;
4524 // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty.
4525 // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name.
Benjamin Schwartz51329b72018-12-06 10:48:03 -08004526 // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the
4527 // powerEntityStateName from the corresponding PowerEntityStateInfo.
Chenjie Yubbcbc602018-02-05 16:51:52 -08004528 optional string subname = 2;
Chenjie Yuc8b7f222018-01-11 23:25:57 -08004529 // The number of times it entered, or voted for entering the sleep state
Chenjie Yubbcbc602018-02-05 16:51:52 -08004530 optional uint64 count = 3;
Chenjie Yuc8b7f222018-01-11 23:25:57 -08004531 // The length of time spent in, or spent voting for, the sleep state
David Chen0b5c90c2018-01-25 16:51:49 -08004532 optional uint64 time_millis = 4;
David Chen21582962017-11-01 17:32:46 -07004533}
Chenjie Yu7f8def92017-11-03 09:33:15 -07004534
Chenjie Yu05013b32017-11-21 10:21:41 -08004535/**
Bookatz92da2832018-11-01 18:10:03 -07004536 * Pulls on-device power measurement information.
4537 * Data defined by hardware/interfaces/power/stats/1.0/types.hal.
4538 * Pulled from:
4539 * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp
4540 */
4541message OnDevicePowerMeasurement {
4542 // Name of the subsystem (to which the rail belongs).
4543 optional string subsystem_name = 1;
4544
4545 // Rail name. The rail lies within the subsystem.
4546 optional string rail_name = 2;
4547
4548 // Time (in ms since boot) at which the rail energy value was measured.
4549 // This may differ slightly from the time that statsd logs this information.
4550 optional uint64 measurement_timestamp_millis = 3;
4551
4552 // Accumulated energy used via the rail since device boot in uWs.
4553 optional uint64 energy_microwatt_secs = 4;
4554}
4555
4556/**
Chenjie Yu7f8def92017-11-03 09:33:15 -07004557 * Pulls Cpu time per frequency.
Chenjie Yu1ee9b742018-01-10 16:02:57 -08004558 * Pulls the time the cpu spend on the frequency index. Frequency index
4559 * starts from highest to lowest. The value should be monotonically
4560 * increasing since boot. However, if there is a cpu
4561 * hotplug event, the value would be reset as well.
Chenjie Yu7f8def92017-11-03 09:33:15 -07004562 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004563message CpuTimePerFreq {
Chenjie Yu7f8def92017-11-03 09:33:15 -07004564 optional uint32 cluster = 1;
4565 optional uint32 freq_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08004566 optional uint64 time_millis = 3;
Chenjie Yu7f8def92017-11-03 09:33:15 -07004567}
Chenjie Yue33bc3b2017-11-06 17:56:44 -08004568
Chenjie Yu05013b32017-11-21 10:21:41 -08004569/**
Chenjie Yue33bc3b2017-11-06 17:56:44 -08004570 * Pulls Cpu Time Per Uid.
4571 * Note that isolated process uid time should be attributed to host uids.
4572 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004573message CpuTimePerUid {
Yao Chenc40a19d2018-03-15 16:48:25 -07004574 optional int32 uid = 1 [(is_uid) = true];
Misha Wagner6bc6c912018-11-16 13:19:54 +00004575 optional uint64 user_time_micros = 2;
4576 optional uint64 sys_time_micros = 3;
Chenjie Yue33bc3b2017-11-06 17:56:44 -08004577}
4578
4579/**
4580 * Pulls Cpu Time Per Uid per frequency.
4581 * Note that isolated process uid time should be attributed to host uids.
4582 * For each uid, we order the time by descending frequencies.
4583 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004584message CpuTimePerUidFreq {
Yao Chenc40a19d2018-03-15 16:48:25 -07004585 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08004586 optional uint32 freq_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08004587 optional uint64 time_millis = 3;
Chenjie Yue33bc3b2017-11-06 17:56:44 -08004588}
Hugo Benichi884970e2017-11-14 22:42:46 +09004589
Chenjie Yu05013b32017-11-21 10:21:41 -08004590/**
4591 * Pulls Wifi Controller Activity Energy Info
4592 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08004593message WifiActivityInfo {
Chenjie Yu05013b32017-11-21 10:21:41 -08004594 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08004595 optional uint64 timestamp_millis = 1;
Chenjie Yu05013b32017-11-21 10:21:41 -08004596 // stack reported state
4597 // TODO: replace this with proto enum
4598 optional int32 stack_state = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07004599 // tx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004600 optional uint64 controller_tx_time_millis = 3;
Yangster-maca8a30442018-10-13 23:46:34 -07004601 // rx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004602 optional uint64 controller_rx_time_millis = 4;
Yangster-maca8a30442018-10-13 23:46:34 -07004603 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004604 optional uint64 controller_idle_time_millis = 5;
Chenjie Yu05013b32017-11-21 10:21:41 -08004605 // product of current(mA), voltage(V) and time(ms)
4606 optional uint64 controller_energy_used = 6;
4607}
4608
4609/**
4610 * Pulls Modem Activity Energy Info
4611 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004612message ModemActivityInfo {
Chenjie Yu05013b32017-11-21 10:21:41 -08004613 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08004614 optional uint64 timestamp_millis = 1;
Yangster-maca8a30442018-10-13 23:46:34 -07004615 // sleep time in millis.
David Chen0b5c90c2018-01-25 16:51:49 -08004616 optional uint64 sleep_time_millis = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07004617 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004618 optional uint64 controller_idle_time_millis = 3;
Chenjie Yu05013b32017-11-21 10:21:41 -08004619 /**
4620 * Tx power index
4621 * index 0 = tx_power < 0dBm
4622 * index 1 = 0dBm < tx_power < 5dBm
4623 * index 2 = 5dBm < tx_power < 15dBm
4624 * index 3 = 15dBm < tx_power < 20dBm
4625 * index 4 = tx_power > 20dBm
4626 */
4627 // tx time in ms at power level 0
David Chen0b5c90c2018-01-25 16:51:49 -08004628 optional uint64 controller_tx_time_pl0_millis = 4;
Chenjie Yu05013b32017-11-21 10:21:41 -08004629 // tx time in ms at power level 1
David Chen0b5c90c2018-01-25 16:51:49 -08004630 optional uint64 controller_tx_time_pl1_millis = 5;
Chenjie Yu05013b32017-11-21 10:21:41 -08004631 // tx time in ms at power level 2
David Chen0b5c90c2018-01-25 16:51:49 -08004632 optional uint64 controller_tx_time_pl2_millis = 6;
Chenjie Yu05013b32017-11-21 10:21:41 -08004633 // tx time in ms at power level 3
David Chen0b5c90c2018-01-25 16:51:49 -08004634 optional uint64 controller_tx_time_pl3_millis = 7;
Chenjie Yu05013b32017-11-21 10:21:41 -08004635 // tx time in ms at power level 4
David Chen0b5c90c2018-01-25 16:51:49 -08004636 optional uint64 controller_tx_time_pl4_millis = 8;
Chenjie Yu05013b32017-11-21 10:21:41 -08004637 // rx time in ms at power level 5
David Chen0b5c90c2018-01-25 16:51:49 -08004638 optional uint64 controller_rx_time_millis = 9;
Chenjie Yu05013b32017-11-21 10:21:41 -08004639 // product of current(mA), voltage(V) and time(ms)
Chen Xu7322e4a2019-09-07 15:51:22 -07004640 optional uint64 energy_used = 10 [deprecated=true];
Joe Onorato62c220b2017-11-18 20:32:56 -08004641}
Rajeev Kumar508a9bf2018-01-18 15:49:11 -08004642
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004643/**
4644 * Pulls Bluetooth Activity Energy Info
4645 * Note: BluetoothBytesTransfer is pulled at the same time from the controller.
4646 */
4647message BluetoothActivityInfo {
4648 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08004649 optional uint64 timestamp_millis = 1;
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004650 // bluetooth stack state
4651 optional int32 bluetooth_stack_state = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07004652 // tx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004653 optional uint64 controller_tx_time_millis = 3;
Yangster-maca8a30442018-10-13 23:46:34 -07004654 // rx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004655 optional uint64 controller_rx_time_millis = 4;
Yangster-maca8a30442018-10-13 23:46:34 -07004656 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004657 optional uint64 controller_idle_time_millis = 5;
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004658 // product of current(mA), voltage(V) and time(ms)
4659 optional uint64 energy_used = 6;
4660}
4661
Rajeev Kumar508a9bf2018-01-18 15:49:11 -08004662/*
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004663 * Logs the memory stats for a process.
Rafal Slawikda51b932018-12-13 16:31:33 +00004664 *
4665 * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService).
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004666 */
4667message ProcessMemoryState {
4668 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07004669 optional int32 uid = 1 [(is_uid) = true];
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004670
4671 // The process name.
Rafal Slawikda51b932018-12-13 16:31:33 +00004672 // Usually package name, "system" for system server.
4673 // Provided by ActivityManagerService.
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004674 optional string process_name = 2;
4675
Rafal Slawikda51b932018-12-13 16:31:33 +00004676 // Current OOM score adjustment. Value read from ProcessRecord.
Yangster-maca8a30442018-10-13 23:46:34 -07004677 optional int32 oom_adj_score = 3;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004678
4679 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07004680 optional int64 page_fault = 4;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004681
4682 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07004683 optional int64 page_major_fault = 5;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004684
Rajeev Kumar90235992018-01-29 11:06:48 -08004685 // RSS
Rafal Slawik203c3db2019-09-25 19:53:01 +01004686 // Value is read from memory.stat, field total_rss if per-app memory
4687 // cgroups are enabled. Otherwise, value from /proc/pid/stat.
Rajeev Kumar90235992018-01-29 11:06:48 -08004688 optional int64 rss_in_bytes = 6;
4689
4690 // CACHE
Rafal Slawikda51b932018-12-13 16:31:33 +00004691 // Value is read from memory.stat, field total_cache if per-app memory
4692 // cgroups are enabled. Otherwise, 0.
Rajeev Kumar90235992018-01-29 11:06:48 -08004693 optional int64 cache_in_bytes = 7;
4694
4695 // SWAP
Rafal Slawikda51b932018-12-13 16:31:33 +00004696 // Value is read from memory.stat, field total_swap if per-app memory
Rafal Slawik203c3db2019-09-25 19:53:01 +01004697 // cgroups are enabled. Otherwise, 0.
Rajeev Kumar90235992018-01-29 11:06:48 -08004698 optional int64 swap_in_bytes = 8;
Rafal Slawikaaf60892018-09-12 13:04:30 +01004699
Rafal Slawik203c3db2019-09-25 19:53:01 +01004700 // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1.
Rafal Slawik3bea8952018-11-15 12:39:33 +00004701 optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true];
Rafal Slawik272a8162018-11-01 15:12:28 +00004702
Rafal Slawik203c3db2019-09-25 19:53:01 +01004703 // Deprecated: use ProcessMemorySnapshot atom instead. Always -1.
4704 optional int64 start_time_nanos = 10 [deprecated = true];
Ioannis Ilkos466ad6c2019-06-18 17:42:00 +01004705
Rafal Slawik203c3db2019-09-25 19:53:01 +01004706 // Deprecated: use ProcessMemorySnapshot atom instead. Always -1.
4707 optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true];
Rafal Slawik08621582018-10-15 14:53:07 +01004708}
4709
4710/*
Rafal Slawik3bea8952018-11-15 12:39:33 +00004711 * Logs the memory high-water mark for a process.
Rafal Slawikda51b932018-12-13 16:31:33 +00004712 *
4713 * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie)
4714 * and for selected native processes.
Rafal Slawik44b88142018-12-15 16:48:09 +00004715 *
4716 * Pulling this atom resets high-water mark counters for all processes.
Rafal Slawik3bea8952018-11-15 12:39:33 +00004717 */
4718message ProcessMemoryHighWaterMark {
4719 // The uid if available. -1 means not available.
4720 optional int32 uid = 1 [(is_uid) = true];
4721
Rafal Slawikda51b932018-12-13 16:31:33 +00004722 // The process name.
4723 // Usually package name or process cmdline.
4724 // Provided by ActivityManagerService or read from /proc/PID/cmdline.
Rafal Slawik3bea8952018-11-15 12:39:33 +00004725 optional string process_name = 2;
4726
Rafal Slawik239b6802019-09-09 18:46:01 +01004727 // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is
4728 // computed by converting kilobytes to bytes.
4729 optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true];
4730
Rafal Slawik3bea8952018-11-15 12:39:33 +00004731 // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in
4732 // /proc/PID/status.
Rafal Slawik239b6802019-09-09 18:46:01 +01004733 optional int32 rss_high_water_mark_in_kilobytes = 4;
Rafal Slawik3bea8952018-11-15 12:39:33 +00004734}
4735
4736/*
Rafal Slawik7efcefb2019-09-20 11:16:20 +01004737 * Logs the memory stats for a process.
4738 *
4739 * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService)
4740 * and for selected native processes.
4741 */
4742message ProcessMemorySnapshot {
4743 // The uid if available. -1 means not available.
4744 optional int32 uid = 1 [(is_uid) = true];
4745
4746 // The process name.
4747 // Usually package name or process cmdline.
4748 // Provided by ActivityManagerService or read from /proc/PID/cmdline.
4749 optional string process_name = 2;
4750
4751 // The pid of the process.
4752 // Allows to disambiguate instances of the process.
4753 optional int32 pid = 3;
4754
4755 // The current OOM score adjustment value.
4756 // Read from ProcessRecord for managed processes.
4757 // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones.
4758 optional int32 oom_score_adj = 4;
4759
4760 // The current RSS of the process.
4761 // VmRSS from /proc/pid/status.
4762 optional int32 rss_in_kilobytes = 5;
4763
4764 // The current anon RSS of the process.
4765 // RssAnon from /proc/pid/status.
4766 optional int32 anon_rss_in_kilobytes = 6;
4767
4768 // The current swap size of the process.
4769 // VmSwap from /proc/pid/status.
4770 optional int32 swap_in_kilobytes = 7;
4771
4772 // The sum of rss_in_kilobytes and swap_in_kilobytes.
4773 optional int32 anon_rss_and_swap_in_kilobytes = 8;
4774}
4775
4776/*
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004777 * Elapsed real time from SystemClock.
Chenjie Yu9da105b2018-01-13 12:41:08 -08004778 */
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004779message SystemElapsedRealtime {
David Chen0b5c90c2018-01-25 16:51:49 -08004780 optional uint64 time_millis = 1;
Chenjie Yu9da105b2018-01-13 12:41:08 -08004781}
4782
4783/*
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004784 * Up time from SystemClock.
Chenjie Yu9da105b2018-01-13 12:41:08 -08004785 */
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004786message SystemUptime {
4787 // Milliseconds since the system was booted.
4788 // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting
4789 // for external input).
4790 // It is not affected by clock scaling, idle, or other power saving mechanisms.
David Chen0b5c90c2018-01-25 16:51:49 -08004791 optional uint64 uptime_millis = 1;
Chenjie Yu9da105b2018-01-13 12:41:08 -08004792}
4793
4794/*
4795 * Reads from /proc/uid_concurrent_active_time which has the format:
4796 * active: X (X is # cores)
4797 * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores)
4798 * [uid1]: [time-0] [time-1] [time-2] ... ...
4799 * ...
4800 * Time-N means the CPU time a UID spent running concurrently with N other processes.
4801 * The file contains a monotonically increasing count of time for a single boot.
4802 */
4803message CpuActiveTime {
Yao Chenc40a19d2018-03-15 16:48:25 -07004804 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08004805 optional uint64 time_millis = 2;
Chenjie Yu9da105b2018-01-13 12:41:08 -08004806}
4807
4808/**
4809 * Reads from /proc/uid_concurrent_policy_time which has the format:
4810 * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4)
4811 * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
4812 * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
4813 * ...
4814 * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes.
4815 * The file contains a monotonically increasing count of time for a single boot.
4816 */
4817message CpuClusterTime {
Yao Chenc40a19d2018-03-15 16:48:25 -07004818 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08004819 optional int32 cluster_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08004820 optional uint64 time_millis = 3;
Chenjie Yu937d7422018-01-10 16:37:53 -08004821}
4822
4823/*
4824 * Pulls free disk space, for data, system partition and temporary directory.
4825 */
4826message DiskSpace {
4827 // available bytes in data partition
4828 optional uint64 data_available_bytes = 1;
4829 // available bytes in system partition
4830 optional uint64 system_available_bytes = 2;
4831 // available bytes in download cache or temp directories
4832 optional uint64 temp_available_bytes = 3;
4833}
Tej Singhbf972d92018-01-10 20:51:13 -08004834
4835/**
4836 * Pulls battery coulomb counter, which is the remaining battery charge in uAh.
Tej Singh9876a3b2019-01-11 14:28:35 -08004837 *
4838 * Pulled from StatsCompanionService.java
Tej Singhbf972d92018-01-10 20:51:13 -08004839 */
4840message RemainingBatteryCapacity {
Yangster-maca8a30442018-10-13 23:46:34 -07004841 optional int32 charge_micro_ampere_hour = 1;
Tej Singhbf972d92018-01-10 20:51:13 -08004842}
4843
4844/**
4845 * Pulls battery capacity, which is the battery capacity when full in uAh.
Tej Singh40298312018-02-16 00:15:09 -08004846 * Pulled from:
4847 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
Tej Singhbf972d92018-01-10 20:51:13 -08004848 */
4849message FullBatteryCapacity {
Yangster-maca8a30442018-10-13 23:46:34 -07004850 optional int32 capacity_micro_ampere_hour = 1;
Tej Singh40298312018-02-16 00:15:09 -08004851}
4852
4853/**
Bookatz17f0d8a2018-09-13 12:56:32 -07004854 * Pulls battery voltage.
4855 * Pulled from:
4856 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
4857 */
4858message BatteryVoltage {
4859 // The voltage of the battery, in millivolts.
Yangster-maca8a30442018-10-13 23:46:34 -07004860 optional int32 voltage_millivolt = 1;
Bookatz17f0d8a2018-09-13 12:56:32 -07004861}
4862
4863/**
Tej Singhb1dbc8b2018-11-19 15:49:47 -08004864 * Pulls battery level (percent full, from 0 to 100).
4865 *
4866 * Pulled from:
4867 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
4868 */
4869message BatteryLevel {
4870 // Battery level. Should be in [0, 100].
4871 optional int32 battery_level = 1;
4872}
4873
4874/**
Tej Singhd89137e2018-03-26 14:51:40 -07004875 * Pulls the temperature of various parts of the device.
4876 * The units are tenths of a degree Celsius. Eg: 30.3C is reported as 303.
Tej Singh40298312018-02-16 00:15:09 -08004877 *
Maggie White442b6312019-04-05 16:26:44 -07004878 * Pulled from StatsCompanionService.java
Tej Singh40298312018-02-16 00:15:09 -08004879 */
4880message Temperature {
Tej Singhb6070b92018-12-19 19:00:12 -08004881 // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_.
Tej Singh40298312018-02-16 00:15:09 -08004882 optional android.os.TemperatureTypeEnum sensor_location = 1;
4883
4884 // The name of the temperature source. Eg. CPU0
4885 optional string sensor_name = 2;
4886
Tej Singhd89137e2018-03-26 14:51:40 -07004887 // Temperature in tenths of a degree C.
Tej Singhb6070b92018-12-19 19:00:12 -08004888 // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
Yangster-maca8a30442018-10-13 23:46:34 -07004889 optional int32 temperature_deci_celsius = 3;
Maggie White442b6312019-04-05 16:26:44 -07004890
4891 // Relative severity of the throttling, see enum definition.
4892 optional android.os.ThrottlingSeverityEnum severity = 4;
yroa1fe77c2018-02-26 14:22:54 -08004893}
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01004894
4895/**
4896 * Pulls the statistics of calls to Binder.
4897 *
Olivier Gaillardd25f7a82018-09-12 14:28:48 +01004898 * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one
4899 * config on the device.
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01004900 *
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00004901 * Next tag: 15
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01004902 */
4903message BinderCalls {
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00004904 // UID of the process responsible for the binder transaction. It will be set if the process
4905 // executing the binder transaction attribute the transaction to another uid using
4906 // Binder.setThreadWorkSource().
4907 //
4908 // If not set, the value will be -1.
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01004909 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00004910 // UID of the process executing the binder transaction.
4911 optional int32 direct_caller_uid = 14;
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01004912 // Fully qualified class name of the API call.
4913 //
4914 // This is a system server class name.
4915 //
4916 // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid
4917 // gets recycled and we have isolated uids, we might attribute the data incorrectly.
4918 // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less
4919 // commonly used APIs.
4920 optional string service_class_name = 2;
4921 // Method name of the API call. It can also be a transaction code if we cannot
4922 // resolve it to a name. See Binder#getTransactionName.
4923 //
4924 // This is a system server method name.
4925 optional string service_method_name = 3;
4926 // Total number of API calls.
4927 optional int64 call_count = 4;
4928 // True if the screen was interactive PowerManager#isInteractive at the end of the call.
4929 optional bool screen_interactive = 13;
4930 // Total number of API calls we have data recorded for. If we collected data for all the calls,
4931 // call_count will be equal to recorded_call_count.
4932 //
4933 // If recorded_call_count is different than call_count, it means data collection has been
4934 // sampled. All the fields below will be sampled in this case.
4935 optional int64 recorded_call_count = 12;
4936 // Number of exceptions thrown by the API.
4937 optional int64 recorded_exception_count = 5;
4938 // Total latency of all API calls.
4939 // Average can be computed using total_latency_micros / recorded_call_count.
4940 optional int64 recorded_total_latency_micros = 6;
4941 // Maximum latency of one API call.
4942 optional int64 recorded_max_latency_micros = 7;
4943 // Total CPU usage of all API calls.
4944 // Average can be computed using total_cpu_micros / recorded_call_count.
4945 // Total can be computed using total_cpu_micros / recorded_call_count * call_count.
4946 optional int64 recorded_total_cpu_micros = 8;
4947 // Maximum CPU usage of one API call.
4948 optional int64 recorded_max_cpu_micros = 9;
4949 // Maximum parcel reply size of one API call.
4950 optional int64 recorded_max_reply_size_bytes = 10;
4951 // Maximum parcel request size of one API call.
4952 optional int64 recorded_max_request_size_bytes = 11;
4953}
4954
4955/**
4956 * Pulls the statistics of exceptions during calls to Binder.
4957 *
4958 * Binder stats are cumulative from boot unless somebody reset the data using
4959 * > adb shell dumpsys binder_calls_stats --reset
4960 */
4961message BinderCallsExceptions {
4962 // Exception class name, e.g. java.lang.IllegalArgumentException.
4963 //
4964 // This is an exception class name thrown by the system server.
4965 optional string exception_class_name = 1;
4966 // Total number of exceptions.
4967 optional int64 exception_count = 2;
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01004968}
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004969
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01004970/**
4971 * Pulls the statistics of message dispatching on HandlerThreads.
4972 *
4973 * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one
4974 * config on the device.
4975 *
4976 * Next tag: 11
4977 */
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004978message LooperStats {
Marcin Oczeretkoec758722018-09-12 12:53:47 +01004979 // The uid that made a call to the System Server and caused the message to be enqueued.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004980 optional int32 uid = 1 [(is_uid) = true];
4981
4982 // Fully qualified class name of the handler target class.
4983 //
4984 // This field does not contain PII. This is a system server class name.
4985 optional string handler_class_name = 2;
4986
4987 // The name of the thread that runs the Looper.
4988 //
4989 // This field does not contain PII. This is a system server thread name.
4990 optional string looper_thread_name = 3;
4991
4992 // The name of the dispatched message.
4993 //
4994 // This field does not contain PII. This is a system server constant or class
4995 // name.
4996 optional string message_name = 4;
4997
4998 // Total number of successfully dispatched messages.
4999 optional int64 message_count = 5;
5000
5001 // Total number of messages that failed dispatching.
5002 optional int64 exception_count = 6;
5003
5004 // Total number of processed messages we have data recorded for. If we
5005 // collected data for all the messages, message_count will be equal to
5006 // recorded_message_count.
5007 //
5008 // If recorded_message_count is different than message_count, it means data
Marcin Oczeretkoc06331a2018-10-02 13:00:38 +01005009 // collection has been sampled. The fields below will be sampled in this case.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01005010 optional int64 recorded_message_count = 7;
5011
5012 // Total latency of all processed messages.
5013 // Average can be computed using recorded_total_latency_micros /
5014 // recorded_message_count.
5015 optional int64 recorded_total_latency_micros = 8;
5016
5017 // Total CPU usage of all processed message.
5018 // Average can be computed using recorded_total_cpu_micros /
5019 // recorded_message_count. Total can be computed using
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01005020 // recorded_total_cpu_micros / recorded_message_count * message_count.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01005021 optional int64 recorded_total_cpu_micros = 9;
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01005022
5023 // True if the screen was interactive PowerManager#isInteractive at the end of the call.
5024 optional bool screen_interactive = 10;
Marcin Oczeretkoc06331a2018-10-02 13:00:38 +01005025
5026 // Max recorded CPU usage of all processed messages.
5027 optional int64 recorded_max_cpu_micros = 11;
5028
5029 // Max recorded latency of all processed messages.
5030 optional int64 recorded_max_latency_micros = 12;
5031
5032 // Total number of messages we tracked the dispatching delay for. If we
5033 // collected data for all the messages, message_count will be equal to
5034 // recorded_delay_message_count.
5035 //
5036 // If recorded_delay_message_count is different than message_count, it means data
5037 // collection has been sampled or/and not all messages specified the target dispatch time.
5038 // The fields below will be sampled in this case.
5039 optional int64 recorded_delay_message_count = 13;
5040
5041 // Total dispatching delay of all processed messages.
5042 // Calculated as a difference between the target dispatching time (Message.when)
5043 // and the actual dispatching time.
5044 // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count.
5045 optional int64 recorded_total_delay_millis = 14;
5046
5047 // Max dispatching delay of all processed messages.
5048 // Calculated as a difference between the target dispatching time (Message.when)
5049 // and the actual dispatching time.
5050 optional int64 recorded_max_delay_millis = 15;
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01005051}
Tej Singh86dc9db2018-09-06 00:39:57 +00005052
5053/**
5054 * Pulls disk information, such as write speed and latency.
5055 */
5056message DiskStats {
5057 // Time taken to open, write 512B to, and close a file.
5058 // -1 if error performing the check.
5059 optional int64 data_write_latency_millis = 1;
5060
5061 optional bool file_based_encryption = 2;
5062
5063 // Recent disk write speed in kB/s.
5064 // -1 if error querying storageed.
5065 // 0 if data is unavailable.
5066 optional int32 recent_disk_write_speed = 3;
5067}
5068
5069
5070/**
5071 * Free and total bytes of the Data, Cache, and System partition.
5072 */
5073message DirectoryUsage {
5074 enum Directory {
5075 UNKNOWN = 0;
5076 DATA = 1;
5077 CACHE = 2;
5078 SYSTEM = 3;
5079 }
5080 optional Directory directory = 1;
5081 optional int64 free_bytes = 2;
5082 optional int64 total_bytes = 3;
5083}
5084
5085
5086/**
5087 * Size of an application: apk size, data size, and cache size.
5088 * Reads from a cached file produced daily by DiskStatsLoggingService.java.
5089 * Information is only reported for apps with the primary user (user 0).
5090 * Sizes are aggregated by package name.
5091 */
5092message AppSize {
5093 // Including uids will involve modifying diskstats logic.
5094 optional string package_name = 1;
5095 // App size in bytes. -1 if unavailable.
5096 optional int64 app_size_bytes = 2;
5097 // App data size in bytes. -1 if unavailable.
5098 optional int64 app_data_size_bytes = 3;
5099 // App cache size in bytes. -1 if unavailable.
5100 optional int64 app_cache_size_bytes = 4;
5101 // Time that the cache file was produced.
5102 // Uses System.currentTimeMillis(), which is wall clock time.
5103 optional int64 cache_time_millis = 5;
5104}
5105
5106
5107/**
5108 * Size of a particular category. Eg: photos, videos.
5109 * Reads from a cached file produced daily by DiskStatsLoggingService.java.
5110 */
5111message CategorySize {
5112 enum Category {
5113 UNKNOWN = 0;
5114 APP_SIZE = 1;
5115 APP_DATA_SIZE = 2;
5116 APP_CACHE_SIZE = 3;
5117 PHOTOS = 4;
5118 VIDEOS = 5;
5119 AUDIO = 6;
5120 DOWNLOADS = 7;
5121 SYSTEM = 8;
5122 OTHER = 9;
5123 }
5124 optional Category category = 1;
5125 // Category size in bytes.
5126 optional int64 size_bytes = 2;
5127 // Time that the cache file was produced.
5128 // Uses System.currentTimeMillis(), which is wall clock time.
5129 optional int64 cache_time_millis = 3;
5130}
Tej Singhd6d6d772018-09-05 17:41:25 -07005131
5132/**
Tej Singhe7726dc2018-09-21 11:42:12 -07005133 * Pulls per uid I/O stats. The stats are cumulative since boot.
5134 *
5135 * Read/write bytes are I/O events from a storage device
5136 * Read/write chars are data requested by read/write syscalls, and can be
5137 * satisfied by caching.
5138 *
5139 * Pulled from StatsCompanionService, which reads proc/uid_io/stats.
5140 */
5141message DiskIo {
5142 optional int32 uid = 1 [(is_uid) = true];
5143 optional int64 fg_chars_read = 2;
5144 optional int64 fg_chars_write = 3;
5145 optional int64 fg_bytes_read = 4;
5146 optional int64 fg_bytes_write = 5;
5147 optional int64 bg_chars_read = 6;
5148 optional int64 bg_chars_write = 7;
5149 optional int64 bg_bytes_read = 8;
5150 optional int64 bg_bytes_write = 9;
5151 optional int64 fg_fsync = 10;
5152 optional int64 bg_fsync= 11;
5153}
5154
5155
5156/**
Tej Singhd6d6d772018-09-05 17:41:25 -07005157 * Pulls the number of fingerprints for each user.
5158 *
Kevin Chyn1741a072019-01-17 11:54:40 -08005159 * Pulled from StatsCompanionService, which queries <Biometric>Manager.
Tej Singhd6d6d772018-09-05 17:41:25 -07005160 */
joshmccloskey5dcb4082019-02-26 15:28:37 -08005161message NumFingerprintsEnrolled {
Tej Singhd6d6d772018-09-05 17:41:25 -07005162 // The associated user. Eg: 0 for owners, 10+ for others.
5163 // Defined in android/os/UserHandle.java
5164 optional int32 user = 1;
5165 // Number of fingerprints registered to that user.
joshmccloskey5dcb4082019-02-26 15:28:37 -08005166 optional int32 num_fingerprints_enrolled = 2;
Tej Singhd6d6d772018-09-05 17:41:25 -07005167}
Chenjie Yu12e5e672018-09-14 15:54:59 -07005168
Philip P. Moltmann70b42ae2019-01-29 16:24:19 -08005169/**
joshmccloskey5dcb4082019-02-26 15:28:37 -08005170 * Pulls the number of faces for each user.
5171 *
5172 * Pulled from StatsCompanionService, which queries <Biometric>Manager.
5173 */
5174message NumFacesEnrolled {
5175 // The associated user. Eg: 0 for owners, 10+ for others.
5176 // Defined in android/os/UserHandle.java
5177 optional int32 user = 1;
5178 // Number of faces registered to that user.
5179 optional int32 num_faces_enrolled = 2;
5180}
5181/**
Philip P. Moltmann70b42ae2019-01-29 16:24:19 -08005182 * A mapping of role holder -> role
5183 */
5184message RoleHolder {
5185 // uid of the role holder
5186 optional int32 uid = 1 [(is_uid) = true];
5187
5188 // package name of the role holder
5189 optional string package_name = 2;
5190
5191 // the role held
5192 optional string role = 3;
5193}
5194
Yangsteraf9aee72018-10-12 09:26:16 -07005195message AggStats {
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005196 // These are all in byte resolution.
5197 optional int64 min = 1 [deprecated = true];
5198 optional int64 average = 2 [deprecated = true];
5199 optional int64 max = 3 [deprecated = true];
Yangsteraf9aee72018-10-12 09:26:16 -07005200
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005201 // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above
5202 // int64 fields.
5203 optional int32 mean_kb = 4;
5204 optional int32 max_kb = 5;
Yangsteraf9aee72018-10-12 09:26:16 -07005205}
5206
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005207// A reduced subset of process states; reducing the number of possible states allows more
5208// aggressive device-side aggregation of statistics and hence reduces metric upload size.
5209enum ProcessStateAggregated {
5210 PROCESS_STATE_UNKNOWN = 0;
5211 // Persistent system process.
5212 PROCESS_STATE_PERSISTENT = 1;
5213 // Top activity; actually any visible activity.
5214 PROCESS_STATE_TOP = 2;
5215 // Process binding to top or a foreground service.
5216 PROCESS_STATE_BOUND_TOP_OR_FGS = 3;
5217 // Processing running a foreground service.
5218 PROCESS_STATE_FGS = 4;
5219 // Important foreground process (ime, wallpaper, etc).
5220 PROCESS_STATE_IMPORTANT_FOREGROUND = 5;
5221 // Important background process.
5222 PROCESS_STATE_BACKGROUND = 6;
5223 // Process running a receiver.
5224 PROCESS_STATE_RECEIVER = 7;
5225 // All kinds of cached processes.
5226 PROCESS_STATE_CACHED = 8;
5227}
5228
5229// Next tag: 13
Yangsteraf9aee72018-10-12 09:26:16 -07005230message ProcessStatsStateProto {
5231 optional android.service.procstats.ScreenState screen_state = 1;
5232
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005233 optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true];
Yangsteraf9aee72018-10-12 09:26:16 -07005234
5235 // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
5236 // and not frameworks/base/core/java/android/app/ActivityManager.java
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005237 optional android.service.procstats.ProcessState process_state = 3 [deprecated = true];
5238
5239 optional ProcessStateAggregated process_state_aggregated = 10;
Yangsteraf9aee72018-10-12 09:26:16 -07005240
5241 // Millisecond uptime duration spent in this state
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005242 optional int64 duration_millis = 4 [deprecated = true];
5243 // Same as above, but with minute resolution so it fits into an int32.
5244 optional int32 duration_minutes = 11;
Yangsteraf9aee72018-10-12 09:26:16 -07005245
5246 // Millisecond elapsed realtime duration spent in this state
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005247 optional int64 realtime_duration_millis = 9 [deprecated = true];
5248 // Same as above, but with minute resolution so it fits into an int32.
5249 optional int32 realtime_duration_minutes = 12;
Yangsteraf9aee72018-10-12 09:26:16 -07005250
5251 // # of samples taken
5252 optional int32 sample_size = 5;
5253
5254 // PSS is memory reserved for this process
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005255 optional AggStats pss = 6 [deprecated = true];
Yangsteraf9aee72018-10-12 09:26:16 -07005256
5257 // USS is memory shared between processes, divided evenly for accounting
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005258 optional AggStats uss = 7 [deprecated = true];
Yangsteraf9aee72018-10-12 09:26:16 -07005259
5260 // RSS is memory resident for this process
5261 optional AggStats rss = 8;
5262}
5263
5264// Next Tag: 7
5265message ProcessStatsProto {
5266 // Name of process.
5267 optional string process = 1;
5268
5269 // Uid of the process.
5270 optional int32 uid = 2;
5271
5272 // Information about how often kills occurred
5273 message Kill {
5274 // Count of excessive CPU kills
5275 optional int32 cpu = 1;
5276
5277 // Count of kills when cached
5278 optional int32 cached = 2;
5279
5280 // PSS stats during cached kill
5281 optional AggStats cached_pss = 3;
5282 }
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005283 optional Kill kill = 3 [deprecated = true];
Yangsteraf9aee72018-10-12 09:26:16 -07005284
5285 // Time and memory spent in various states.
5286 repeated ProcessStatsStateProto states = 5;
5287
5288 // Total time process has been running... screen_state, memory_state, and process_state
5289 // will not be set.
5290 optional ProcessStatsStateProto total_running_state = 6;
5291}
5292
5293message PackageServiceOperationStatsProto {
5294 // Operate enum: Started, Foreground, Bound, Executing
5295 optional android.service.procstats.ServiceOperationState operation = 1;
5296
5297 // Number of times the service was in this operation.
5298 optional int32 count = 2;
5299
5300 // Information about a state the service can be in.
5301 message StateStats {
5302 // Screen state enum.
5303 optional android.service.procstats.ScreenState screen_state = 1;
5304 // Memory state enum.
5305 optional android.service.procstats.MemoryState memory_state = 2;
5306
5307 // duration in milliseconds.
Yangster-maca8a30442018-10-13 23:46:34 -07005308 optional int64 duration_millis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07005309 // Millisecond elapsed realtime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07005310 optional int64 realtime_duration_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07005311 }
5312 repeated StateStats state_stats = 3;
5313}
5314
5315message PackageServiceStatsProto {
5316 // Name of service component.
5317 optional string service_name = 1;
5318
5319 // The operation stats.
5320 // The package_name, package_uid, package_version, service_name will not be set to save space.
5321 repeated PackageServiceOperationStatsProto operation_stats = 2;
5322}
5323
5324message PackageAssociationSourceProcessStatsProto {
5325 // Uid of the process.
5326 optional int32 process_uid = 1;
5327 // Process name.
5328 optional string process_name = 2;
Chenjie Yub2ecc792019-01-17 10:27:26 -08005329 // Package name.
5330 optional string package_name = 7;
Yangsteraf9aee72018-10-12 09:26:16 -07005331 // Total count of the times this association appeared.
5332 optional int32 total_count = 3;
5333
5334 // Millisecond uptime total duration this association was around.
Yangster-maca8a30442018-10-13 23:46:34 -07005335 optional int64 total_duration_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07005336
5337 // Total count of the times this association became actively impacting its target process.
5338 optional int32 active_count = 5;
5339
5340 // Information on one source in this association.
5341 message StateStats {
5342 // Process state enum.
5343 optional android.service.procstats.ProcessState process_state = 1;
5344 // Millisecond uptime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07005345 optional int64 duration_millis = 2;
Yangsteraf9aee72018-10-12 09:26:16 -07005346 // Millisecond elapsed realtime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07005347 optional int64 realtime_duration_mmillis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07005348 }
5349 repeated StateStats active_state_stats = 6;
5350}
5351
5352message PackageAssociationProcessStatsProto {
5353 // Name of the target component.
5354 optional string component_name = 1;
5355 // Information on one source in this association.
5356 repeated PackageAssociationSourceProcessStatsProto sources = 2;
5357}
5358
5359
5360message ProcessStatsPackageProto {
5361 // Name of package.
5362 optional string package = 1;
5363
5364 // Uid of the package.
5365 optional int32 uid = 2;
5366
5367 // Version of the package.
5368 optional int64 version = 3;
5369
5370 // Stats for each process running with the package loaded in to it.
5371 repeated ProcessStatsProto process_stats = 4;
5372
5373 // Stats for each of the package's services.
5374 repeated PackageServiceStatsProto service_stats = 5;
5375
5376 // Stats for each association with the package.
5377 repeated PackageAssociationProcessStatsProto association_stats = 6;
5378}
5379
5380message ProcessStatsSectionProto {
5381 // Elapsed realtime at start of report.
Yangster-maca8a30442018-10-13 23:46:34 -07005382 optional int64 start_realtime_millis = 1;
Yangsteraf9aee72018-10-12 09:26:16 -07005383
5384 // Elapsed realtime at end of report.
Yangster-maca8a30442018-10-13 23:46:34 -07005385 optional int64 end_realtime_millis = 2;
Yangsteraf9aee72018-10-12 09:26:16 -07005386
5387 // CPU uptime at start of report.
Yangster-maca8a30442018-10-13 23:46:34 -07005388 optional int64 start_uptime_millis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07005389
5390 // CPU uptime at end of report.
Yangster-maca8a30442018-10-13 23:46:34 -07005391 optional int64 end_uptime_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07005392
5393 // System runtime library. e.g. "libdvm.so", "libart.so".
5394 optional string runtime = 5;
5395
5396 // whether kernel reports swapped pss.
5397 optional bool has_swapped_pss = 6;
5398
5399 // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops".
5400 enum Status {
5401 STATUS_UNKNOWN = 0;
5402 STATUS_COMPLETE = 1;
5403 STATUS_PARTIAL = 2;
5404 STATUS_SHUTDOWN = 3;
5405 STATUS_SYSPROPS = 4;
5406 }
5407 repeated Status status = 7;
5408
Chenjie Yub2ecc792019-01-17 10:27:26 -08005409 // Number of pages available of various types and sizes, representation fragmentation.
5410 repeated ProcessStatsAvailablePagesProto available_pages = 10;
5411
Yangsteraf9aee72018-10-12 09:26:16 -07005412 // Stats for each process.
5413 repeated ProcessStatsProto process_stats = 8;
5414
5415 // Stats for each package.
5416 repeated ProcessStatsPackageProto package_stats = 9;
5417}
5418
Chenjie Yub2ecc792019-01-17 10:27:26 -08005419message ProcessStatsAvailablePagesProto {
5420 // Node these pages are in (as per /proc/pagetypeinfo)
5421 optional int32 node = 1;
5422
5423 // Zone these pages are in (as per /proc/pagetypeinfo)
5424 optional string zone = 2;
5425
5426 // Label for the type of these pages (as per /proc/pagetypeinfo)
5427 optional string label = 3;
5428
5429 // Distribution of number of pages available by order size. First entry in array is
5430 // order 0, second is order 1, etc. Each order increase is a doubling of page size.
5431 repeated int32 pages_per_order = 4;
5432}
5433
Chenjie Yu12e5e672018-09-14 15:54:59 -07005434/**
5435 * Pulled from ProcessStatsService.java
5436 */
5437message ProcStats {
Yangsteraf9aee72018-10-12 09:26:16 -07005438 optional ProcessStatsSectionProto proc_stats_section = 1;
5439}
5440
Chenjie Yuf910b7802019-01-11 16:08:20 -08005441/**
5442 * Pulled from ProcessStatsService.java
5443 */
5444message ProcStatsPkgProc {
5445 optional ProcessStatsSectionProto proc_stats_section = 1;
5446}
5447
Chris Wrencdea3b72019-11-22 16:58:17 -05005448// Next Tag: 2
5449message PackageRemoteViewInfoProto {
5450 optional string package_name = 1;
5451 // add per-package additional info here (like channels)
5452}
5453
5454// Next Tag: 2
5455message NotificationRemoteViewsProto {
5456 repeated PackageRemoteViewInfoProto package_remote_view_info = 1;
5457}
5458
5459/**
5460 * Pulled from NotificationManagerService.java
5461 */
5462message NotificationRemoteViews {
5463 optional NotificationRemoteViewsProto notification_remote_views = 1;
5464}
5465
Yangsteraf9aee72018-10-12 09:26:16 -07005466message PowerProfileProto {
5467 optional double cpu_suspend = 1;
5468
5469 optional double cpu_idle = 2;
5470
5471 optional double cpu_active = 3;
5472
5473 message CpuCluster {
5474 optional int32 id = 1;
5475 optional double cluster_power = 2;
5476 optional int32 cores = 3;
5477 repeated int64 speed = 4;
5478 repeated double core_power = 5;
5479 }
5480
5481 repeated CpuCluster cpu_cluster = 40;
5482
5483 optional double wifi_scan = 4;
5484
5485 optional double wifi_on = 5;
5486
5487 optional double wifi_active = 6;
5488
5489 optional double wifi_controller_idle = 7;
5490
5491 optional double wifi_controller_rx = 8;
5492
5493 optional double wifi_controller_tx = 9;
5494
5495 repeated double wifi_controller_tx_levels = 10;
5496
5497 optional double wifi_controller_operating_voltage = 11;
5498
5499 optional double bluetooth_controller_idle = 12;
5500
5501 optional double bluetooth_controller_rx = 13;
5502
5503 optional double bluetooth_controller_tx = 14;
5504
5505 optional double bluetooth_controller_operating_voltage = 15;
5506
5507 optional double modem_controller_sleep = 16;
5508
5509 optional double modem_controller_idle = 17;
5510
5511 optional double modem_controller_rx = 18;
5512
5513 repeated double modem_controller_tx = 19;
5514
5515 optional double modem_controller_operating_voltage = 20;
5516
5517 optional double gps_on = 21;
5518
5519 repeated double gps_signal_quality_based = 22;
5520
5521 optional double gps_operating_voltage = 23;
5522
5523 optional double bluetooth_on = 24;
5524
5525 optional double bluetooth_active = 25;
5526
5527 optional double bluetooth_at_cmd = 26;
5528
5529 optional double ambient_display = 27;
5530
5531 optional double screen_on = 28;
5532
5533 optional double radio_on = 29;
5534
5535 optional double radio_scanning = 30;
5536
5537 optional double radio_active = 31;
5538
5539 optional double screen_full = 32;
5540
5541 optional double audio = 33;
5542
5543 optional double video = 34;
5544
5545 optional double flashlight = 35;
5546
5547 optional double memory = 36;
5548
5549 optional double camera = 37;
5550
5551 optional double wifi_batched_scan = 38;
5552
5553 optional double battery_capacity = 39;
Chenjie Yu12e5e672018-09-14 15:54:59 -07005554}
Chenjie Yuab530202018-09-26 12:39:20 -07005555
5556/**
5557 * power_profile.xml and other constants for power model calculations.
5558 * Pulled from PowerProfile.java
5559 */
5560message PowerProfile {
Yangsteraf9aee72018-10-12 09:26:16 -07005561 optional PowerProfileProto power_profile = 1;
Howard Ro9a862de2018-10-11 16:03:33 -07005562}
Chenjie Yub35b5f72018-10-13 23:25:11 -07005563
5564/**
arangelovd5db50e2018-10-12 20:24:39 +01005565 * Logs when a user restriction was added or removed.
5566 *
5567 * Logged from:
5568 * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
5569 */
5570message UserRestrictionChanged {
5571 // The raw string of the user restriction as defined in UserManager.
5572 // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS.
5573 optional string restriction = 1;
5574 // Whether the restriction is enabled or disabled.
5575 optional bool enabled = 2;
Howard Ro183c2bd2018-10-18 13:52:10 -07005576}
Yangster-mac308ea0c2018-10-22 13:10:25 -07005577
5578/**
5579 * Pulls process user time and system time. Puller takes a snapshot of all pids
5580 * in the system and returns cpu stats for those that are working at the time.
5581 * Dead pids will be dropped. Kernel processes are excluded.
5582 * Min cool-down is 5 sec.
5583 */
5584message ProcessCpuTime {
5585 optional int32 uid = 1 [(is_uid) = true];
5586
5587 optional string process_name = 2;
5588 // Process cpu time in user space, cumulative from boot/process start
5589 optional int64 user_time_millis = 3;
5590 // Process cpu time in system space, cumulative from boot/process start
5591 optional int64 system_time_millis = 4;
Rafal Slawikbf67d072018-10-23 11:07:54 +01005592}
Misha Wagner5a51e002018-10-03 15:04:09 +01005593
5594/**
5595 * Pulls the CPU usage for each thread.
5596 *
5597 * Read from /proc/$PID/task/$TID/time_in_state files.
5598 *
5599 * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and
5600 * time_in_state files not being present on some phones, have not been addressed. These should be
5601 * considered before a public release.
5602 */
5603message CpuTimePerThreadFreq {
5604 // UID that owns the process.
5605 optional int32 uid = 1 [(is_uid) = true];
5606 // ID of the process.
Misha Wagnerdfa548c2018-11-16 11:18:00 +00005607 optional int32 process_id = 2;
Misha Wagner5a51e002018-10-03 15:04:09 +01005608 // ID of the thread.
Misha Wagnerdfa548c2018-11-16 11:18:00 +00005609 optional int32 thread_id = 3;
Misha Wagner5a51e002018-10-03 15:04:09 +01005610 // Name of the process taken from `/proc/$PID/cmdline`.
5611 optional string process_name = 4;
5612 // Name of the thread taken from `/proc/$PID/task/$TID/comm`
5613 optional string thread_name = 5;
Misha Wagnerfde69582018-11-28 13:26:32 +00005614
5615 // Report eight different frequencies, and how much time is spent in each frequency. Frequencies
5616 // are given in KHz, and time is given in milliseconds since the thread started. All eight
5617 // frequencies are given here as the alternative is sending eight separate atoms. This method
5618 // significantly reduces the amount of data created
5619 optional int32 frequency1_khz = 6;
5620 optional int32 time1_millis = 7;
5621 optional int32 frequency2_khz = 8;
5622 optional int32 time2_millis = 9;
5623 optional int32 frequency3_khz = 10;
5624 optional int32 time3_millis = 11;
5625 optional int32 frequency4_khz = 12;
5626 optional int32 time4_millis = 13;
5627 optional int32 frequency5_khz = 14;
5628 optional int32 time5_millis = 15;
5629 optional int32 frequency6_khz = 16;
5630 optional int32 time6_millis = 17;
5631 optional int32 frequency7_khz = 18;
5632 optional int32 time7_millis = 19;
5633 optional int32 frequency8_khz = 20;
5634 optional int32 time8_millis = 21;
Misha Wagner5a51e002018-10-03 15:04:09 +01005635}
Bookatz75ee60422018-11-09 12:27:37 -08005636
5637/**
Bookatz366a4432018-11-20 09:42:33 -08005638 * Pulls information about the device's build.
5639 */
5640message BuildInformation {
5641 // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse.
5642 // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags.
5643 optional string fingerprint = 1;
5644
5645 // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated.
5646 optional string brand = 2;
5647
5648 // Build.PRODUCT. The name of the overall product.
5649 optional string product = 3;
5650
5651 // Build.DEVICE. The name of the industrial design.
5652 optional string device = 4;
5653
5654 // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas".
5655 optional string version_release = 5;
5656
5657 // Build.ID. E.g. a label like "M4-rc20".
5658 optional string id = 6;
5659
5660 // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to
5661 // represent this build.
5662 optional string version_incremental = 7;
5663
5664 // Build.TYPE. The type of build, like "user" or "eng".
5665 optional string type = 8;
5666
5667 // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug".
5668 optional string tags = 9;
5669}
5670
5671/**
Adam He420947c2019-01-23 15:59:09 -08005672 * Logs information about mismatched caller for content capture.
5673 *
5674 * Logged from:
5675 * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java
5676 */
5677message ContentCaptureCallerMismatchReported {
5678 optional string intended_package = 1;
5679 optional string calling_package = 2;
5680}
5681
5682/**
5683 * Logs information about content capture service events.
5684 *
5685 * Logged from:
5686 * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
5687 */
5688message ContentCaptureServiceEvents {
5689 // The type of event.
5690 enum Event {
5691 UNKNOWN = 0;
5692 ON_CONNECTED = 1;
5693 ON_DISCONNECTED = 2;
5694 SET_WHITELIST = 3;
5695 SET_DISABLED = 4;
5696 ON_USER_DATA_REMOVED = 5;
5697 }
5698 optional Event event = 1;
5699 // component/package of content capture service.
5700 optional string service_info = 2;
5701 // component/package of target.
5702 // it's a concatenated list of component/package for SET_WHITELIST event
5703 // separated by " ".
5704 optional string target_info = 3;
5705}
5706
5707/**
5708 * Logs information about content capture session events.
5709 *
5710 * Logged from:
5711 * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
5712 */
5713message ContentCaptureSessionEvents {
5714 // The type of event.
5715 enum Event {
5716 UNKNOWN = 0;
5717 ON_SESSION_STARTED = 1;
5718 ON_SESSION_FINISHED = 2;
5719 SESSION_NOT_CREATED = 3;
5720 }
5721 optional int32 session_id = 1;
5722 optional Event event = 2;
5723 // (n/a on session finished)
5724 optional int32 state_flags = 3;
5725 // component/package of content capture service.
5726 optional string service_info = 4;
5727 // component/package of app.
5728 // (n/a on session finished)
5729 optional string app_info = 5;
5730 optional bool is_child_session = 6;
5731}
5732
5733/**
5734 * Logs information about session being flushed.
5735 *
5736 * Logged from:
5737 * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
5738 */
5739message ContentCaptureFlushed {
5740 optional int32 session_id = 1;
5741 // component/package of content capture service.
5742 optional string service_info = 2;
5743 // component/package of app.
5744 optional string app_info = 3;
5745 // session start/finish events
5746 optional int32 child_session_started = 4;
5747 optional int32 child_session_finished = 5;
5748 // count of view events.
5749 optional int32 view_appeared_count = 6;
5750 optional int32 view_disappeared_count = 7;
5751 optional int32 view_text_changed_count = 8;
5752
5753 // Flush stats.
5754 optional int32 max_events = 9;
5755 optional int32 idle_flush_freq = 10;
5756 optional int32 text_flush_freq = 11;
5757 optional int32 flush_reason = 12;
5758}
5759
5760/**
Bookatz75ee60422018-11-09 12:27:37 -08005761 * Pulls on-device BatteryStats power use calculations for the overall device.
5762 */
5763message DeviceCalculatedPowerUse {
Bookatz3dbc13a2018-12-21 12:16:51 -08005764 // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
5765 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
5766 // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()).
5767 optional int64 computed_power_nano_amp_secs = 1;
Bookatz75ee60422018-11-09 12:27:37 -08005768}
5769
5770/**
5771 * Pulls on-device BatteryStats power use calculations broken down by uid.
5772 * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use
5773 * that is attributed to non-uid items. They must all be included to get the total power use.
5774 */
5775message DeviceCalculatedPowerBlameUid {
5776 // Uid being blamed. Note: isolated uids have already been mapped to host uid.
5777 optional int32 uid = 1 [(is_uid) = true];
5778
Bookatz3dbc13a2018-12-21 12:16:51 -08005779 // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
5780 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
5781 optional int64 power_nano_amp_secs = 2;
Bookatz75ee60422018-11-09 12:27:37 -08005782}
5783
5784/**
5785 * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by
5786 * drain type.
5787 * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that
5788 * is attributed uids. They must all be included to get the total power use.
5789 */
5790message DeviceCalculatedPowerBlameOther {
5791 // The type of item whose power use is being reported.
5792 enum DrainType {
5793 AMBIENT_DISPLAY = 0;
5794 // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid.
5795 BLUETOOTH = 2;
5796 CAMERA = 3;
5797 // Cell-standby
5798 CELL = 4;
5799 FLASHLIGHT = 5;
5800 IDLE = 6;
5801 MEMORY = 7;
5802 // Amount that total computed drain exceeded the drain estimated using the
5803 // battery level changes and capacity.
5804 OVERCOUNTED = 8;
5805 PHONE = 9;
5806 SCREEN = 10;
5807 // Amount that total computed drain was below the drain estimated using the
5808 // battery level changes and capacity.
5809 UNACCOUNTED = 11;
5810 // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported.
5811 WIFI = 13;
5812 }
5813 optional DrainType drain_type = 1;
5814
Bookatz3dbc13a2018-12-21 12:16:51 -08005815 // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
5816 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
5817 optional int64 power_nano_amp_secs = 2;
Rafal Slawik3bea8952018-11-15 12:39:33 +00005818}
arangelov4e994062018-11-13 16:12:38 +00005819
5820/**
5821 * Logs device policy features.
5822 *
5823 * Logged from:
5824 * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
5825 * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/
5826 */
5827message DevicePolicyEvent {
5828 // The event id - unique for each event.
5829 optional android.stats.devicepolicy.EventId event_id = 1;
5830 // The admin package name.
5831 optional string admin_package_name = 2;
5832 // A generic integer parameter.
5833 optional int32 integer_value = 3;
5834 // A generic boolean parameter.
5835 optional bool boolean_value = 4;
5836 // A parameter specifying a time period in milliseconds.
5837 optional uint64 time_period_millis = 5;
5838 // A parameter specifying a list of package names, bundle extras or string parameters.
5839 optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES];
5840}
shawnlinea5b66b2018-11-13 15:05:29 +08005841
5842/**
5843 * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up.
5844 *
5845 * Logged from:
5846 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5847 */
5848message DocsUILaunchReported {
5849 optional android.stats.docsui.LaunchAction launch_action = 1;
5850 optional bool has_initial_uri = 2;
5851 optional android.stats.docsui.MimeType mime_type = 3;
5852 optional android.stats.docsui.Root initial_root = 4;
5853}
5854
5855/**
5856 * Logs root/app visited event in file managers/picker. Call this when the user
5857 * taps on root/app in hamburger menu.
5858 *
5859 * Logged from:
5860 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5861 */
5862message DocsUIRootVisitedReported {
5863 optional android.stats.docsui.ContextScope scope = 1;
5864 optional android.stats.docsui.Root root = 2;
5865}
5866
5867/**
5868 * Logs file operation stats. Call this when a file operation has completed.
5869 *
5870 * Logged from:
5871 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5872 */
5873message DocsUIFileOperationReported {
5874 optional android.stats.docsui.Provider provider = 1;
5875 optional android.stats.docsui.FileOperation file_op = 2;
5876}
5877
5878/**
5879 * Logs file operation stats. Call this when a copy/move operation has completed with a specific
5880 * mode.
5881 *
5882 * Logged from:
5883 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5884 */
5885message DocsUIFileOperationCopyMoveModeReported {
5886 optional android.stats.docsui.FileOperation file_op = 1;
5887 optional android.stats.docsui.CopyMoveOpMode mode = 2;
5888}
5889
5890
5891/**
5892 * Logs file sub operation stats. Call this when a file operation has failed.
5893 *
5894 * Logged from:
5895 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5896 */
5897message DocsUIFileOperationFailureReported {
5898 optional android.stats.docsui.Authority authority = 1;
5899 optional android.stats.docsui.SubFileOperation sub_op = 2;
5900}
5901
5902/**
5903* Logs the cancellation of a file operation. Call this when a job is canceled
5904*
5905* Logged from:
5906* package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5907*/
5908message DocsUIFileOperationCanceledReported {
5909 optional android.stats.docsui.FileOperation file_op = 1;
5910}
5911
5912/**
5913 * Logs startup time in milliseconds.
5914 *
5915 * Logged from:
5916 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5917 */
5918message DocsUIStartupMsReported {
5919 optional int32 startup_millis = 1;
5920}
5921
5922/**
5923 * Logs the action that was started by user.
5924 *
5925 * Logged from:
5926 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5927 */
5928message DocsUIUserActionReported {
5929 optional android.stats.docsui.UserAction action = 1;
5930}
5931
5932/**
5933 * Logs the invalid type when invalid scoped access is requested.
5934 *
5935 * Logged from:
5936 * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java
5937 */
5938message DocsUIInvalidScopedAccessRequestReported {
5939 optional android.stats.docsui.InvalidScopedAccess type = 1;
Rafal Slawikda51b932018-12-13 16:31:33 +00005940}
Ben Murdochbab399f62018-12-06 11:01:38 +00005941
5942/**
shawnlina75e82d2019-01-07 10:31:12 +08005943 * Logs the package name that launches docsui picker mode.
5944 *
5945 * Logged from:
5946 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5947 */
5948message DocsUIPickerLaunchedFromReported {
5949 optional string package_name = 1;
5950}
5951
5952/**
5953 * Logs the search type.
5954 *
5955 * Logged from:
5956 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5957 */
5958message DocsUISearchTypeReported {
5959 optional android.stats.docsui.SearchType search_type = 1;
5960}
5961
5962/**
5963 * Logs the search mode.
5964 *
5965 * Logged from:
5966 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5967 */
5968message DocsUISearchModeReported {
5969 optional android.stats.docsui.SearchMode search_mode = 1;
5970}
5971
5972/**
5973 * Logs the pick result information.
5974 *
5975 * Logged from:
5976 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5977 */
5978message DocsUIPickResultReported {
5979 optional int32 total_action_count = 1;
5980 optional int64 duration_millis = 2;
5981 optional int32 file_count= 3;
5982 optional bool is_searching = 4;
5983 optional android.stats.docsui.Root picked_from = 5;
5984 optional android.stats.docsui.MimeType mime_type = 6;
5985 optional int32 repeatedly_pick_times = 7;
5986}
5987
5988/**
Ben Murdochbab399f62018-12-06 11:01:38 +00005989 * Logs when an app's memory is compacted.
5990 *
5991 * Logged from:
5992 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
5993 */
5994message AppCompacted {
5995 // The pid of the process being compacted.
5996 optional int32 pid = 1;
5997
5998 // The name of the process being compacted.
5999 optional string process_name = 2;
6000
6001 // The type of compaction.
6002 enum Action {
6003 UNKNOWN = 0;
6004 SOME = 1;
6005 FULL = 2;
Ben Murdoch35c14202019-04-09 11:00:53 +01006006 PERSISTENT = 3;
6007 BFGS = 4;
Ben Murdochbab399f62018-12-06 11:01:38 +00006008 }
Ben Murdoch01720b82018-12-19 18:03:44 +00006009 optional Action action = 3;
Ben Murdochbab399f62018-12-06 11:01:38 +00006010
6011 // Total RSS in kilobytes consumed by the process prior to compaction.
6012 optional int64 before_rss_total_kilobytes = 4;
6013
6014 // File RSS in kilobytes consumed by the process prior to compaction.
6015 optional int64 before_rss_file_kilobytes = 5;
6016
6017 // Anonymous RSS in kilobytes consumed by the process prior to compaction.
6018 optional int64 before_rss_anon_kilobytes = 6;
6019
6020 // Swap in kilobytes consumed by the process prior to compaction.
6021 optional int64 before_swap_kilobytes = 7;
6022
6023 // Total RSS in kilobytes consumed by the process after compaction.
6024 optional int64 after_rss_total_kilobytes = 8;
6025
6026 // File RSS in kilobytes consumed by the process after compaction.
6027 optional int64 after_rss_file_kilobytes = 9;
6028
6029 // Anonymous RSS in kilobytes consumed by the process after compaction.
6030 optional int64 after_rss_anon_kilobytes = 10;
6031
6032 // Swap in kilobytes consumed by the process after compaction.
6033 optional int64 after_swap_kilobytes = 11;
6034
6035 // The time taken to perform compaction in milliseconds.
6036 optional int64 time_to_compact_millis = 12;
6037
6038 // The last compaction action performed for this app.
6039 optional Action last_action = 13;
6040
Ben Murdoch01720b82018-12-19 18:03:44 +00006041 // The last time that compaction was attempted on this process in milliseconds
6042 // since boot, not including sleep (see SystemClock.uptimeMillis()).
6043 optional int64 last_compact_timestamp_ms_since_boot = 14;
Ben Murdochbab399f62018-12-06 11:01:38 +00006044
Ben Murdoch885c21b2019-03-15 18:02:04 +00006045 // The "setAdj" (i.e. previous) oom_score_adj at the time of compaction.
Ben Murdoch01720b82018-12-19 18:03:44 +00006046 optional int32 oom_score_adj = 15;
Ben Murdochbab399f62018-12-06 11:01:38 +00006047
6048 // The process state at the time of compaction.
6049 optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN];
Ben Murdochfdc55932019-01-30 10:43:15 +00006050
6051 // Free ZRAM in kilobytes before compaction.
6052 optional int64 before_zram_free_kilobytes = 17;
6053
6054 // Free ZRAM in kilobytes after compaction.
6055 optional int64 after_zram_free_kilobytes = 18;
Ben Murdochbab399f62018-12-06 11:01:38 +00006056}
lifr157fc552018-12-12 16:38:04 +08006057
6058/**
lifrb6b90b62019-03-29 00:40:17 +08006059 * Logs a DNS lookup operation initiated by the system resolver on behalf of an application
6060 * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName().
6061 *
lifr1f74b052019-04-16 22:16:30 +08006062 * The NetworkDnsEventReported message represents the entire lookup operation, which may
6063 * result one or more queries to the recursive DNS resolvers. Those are individually logged
6064 * in DnsQueryEvents to enable computing error rates and network latency and timeouts
6065 * broken up by query type, transport, network interface, etc.
lifr157fc552018-12-12 16:38:04 +08006066 */
6067message NetworkDnsEventReported {
lifr1f74b052019-04-16 22:16:30 +08006068 optional android.stats.dnsresolver.EventType event_type = 1;
lifr157fc552018-12-12 16:38:04 +08006069
lifr1f74b052019-04-16 22:16:30 +08006070 optional android.stats.dnsresolver.ReturnCode return_code = 2;
lifrb6b90b62019-03-29 00:40:17 +08006071
6072 // The latency in microseconds of the entire DNS lookup operation.
lifr157fc552018-12-12 16:38:04 +08006073 optional int32 latency_micros = 3;
lifrb6b90b62019-03-29 00:40:17 +08006074
lifr1f74b052019-04-16 22:16:30 +08006075 // Only valid for event_type = EVENT_GETADDRINFO.
6076 optional int32 hints_ai_flags = 4;
lifrb6b90b62019-03-29 00:40:17 +08006077
lifr1f74b052019-04-16 22:16:30 +08006078 // Flags passed to android_res_nsend() defined in multinetwork.h
6079 // Only valid for event_type = EVENT_RESNSEND.
6080 optional int32 res_nsend_flags = 5;
lifrb6b90b62019-03-29 00:40:17 +08006081
lifrad9becc2019-05-20 11:04:41 +08006082 optional android.stats.dnsresolver.NetworkType network_type = 6;
lifrb6b90b62019-03-29 00:40:17 +08006083
6084 // The DNS over TLS mode on a specific netId.
lifr1f74b052019-04-16 22:16:30 +08006085 optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7;
lifrb6b90b62019-03-29 00:40:17 +08006086
6087 // Additional pass-through fields opaque to statsd.
6088 // The DNS resolver Mainline module can add new fields here without requiring an OS update.
lifr1f74b052019-04-16 22:16:30 +08006089 optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES];
lifr2b9fab72019-07-20 15:28:28 +08006090
6091 // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom.
6092 optional int32 sampling_rate_denom = 9;
lifr157fc552018-12-12 16:38:04 +08006093}
Chiachang Wangf6bedc22019-01-14 11:54:32 +08006094
6095/**
6096 * Logs when a data stall event occurs.
6097 *
6098 * Log from:
6099 * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java
6100 */
6101message DataStallEvent {
6102 // Data stall evaluation type.
6103 // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java
6104 // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*.
6105 optional int32 evaluation_type = 1;
6106 // See definition in data_stall_event.proto.
6107 optional com.android.server.connectivity.ProbeResult validation_result = 2;
6108 // See definition in data_stall_event.proto.
6109 optional android.net.NetworkCapabilitiesProto.Transport network_type = 3;
6110 // See definition in data_stall_event.proto.
6111 optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES];
6112 // See definition in data_stall_event.proto.
6113 optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES];
6114 // See definition in data_stall_event.proto.
6115 optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES];
6116}
Christian Brunschenf86039e2018-12-21 12:26:14 +00006117
6118/*
6119 * Logs when RescueParty resets some set of experiment flags.
6120 *
6121 * Logged from:
6122 * frameworks/base/services/core/java/com/android/server/RescueParty.java
6123 */
6124message RescuePartyResetReported {
6125 // The rescue level of this reset. A value of 0 indicates missing or unknown level information.
6126 optional int32 rescue_level = 1;
6127}
Mathew Inwoodb375be52019-01-04 11:36:25 +00006128
6129/**
6130 * Logs when signed config is received from an APK, and if that config was applied successfully.
6131 * Logged from:
6132 * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java
6133 */
6134message SignedConfigReported {
6135 enum Type {
6136 UNKNOWN_TYPE = 0;
6137 GLOBAL_SETTINGS = 1;
6138 }
6139 optional Type type = 1;
6140
6141 // The final status of the signed config received.
6142 enum Status {
6143 UNKNOWN_STATUS = 0;
6144 APPLIED = 1;
6145 BASE64_FAILURE_CONFIG = 2;
6146 BASE64_FAILURE_SIGNATURE = 3;
6147 SECURITY_EXCEPTION = 4;
6148 INVALID_CONFIG = 5;
6149 OLD_CONFIG = 6;
6150 SIGNATURE_CHECK_FAILED = 7;
6151 NOT_APPLICABLE = 8;
Mathew Inwood610d0962019-01-15 11:50:28 +00006152 SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9;
Mathew Inwoodb375be52019-01-04 11:36:25 +00006153 }
6154 optional Status status = 2;
6155
6156 // The version of the signed config processed.
6157 optional int32 version = 3;
6158
6159 // The package name that the config was extracted from.
6160 optional string from_package = 4;
6161
6162 enum Key {
6163 NO_KEY = 0;
6164 DEBUG = 1;
6165 PRODUCTION = 2;
6166 }
6167 // Which key was used to verify the config.
6168 optional Key verified_with = 5;
6169}
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006170
6171/*
6172 * Logs GNSS Network-Initiated (NI) location events.
6173 *
6174 * Logged from:
6175 * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
6176 */
6177message GnssNiEventReported {
6178 // The type of GnssNiEvent.
6179 enum EventType {
6180 UNKNOWN = 0;
6181 NI_REQUEST = 1;
6182 NI_RESPONSE = 2;
6183 }
6184 optional EventType event_type = 1;
6185
6186 // An ID generated by HAL to associate NI notifications and UI responses.
6187 optional int32 notification_id = 2;
6188
6189 // A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08006190 optional android.server.location.GnssNiType ni_type = 3;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006191
6192 // NI requires notification.
6193 optional bool need_notify = 4;
6194
6195 // NI requires verification.
6196 optional bool need_verify = 5;
6197
6198 // NI requires privacy override, no notification/minimal trace.
6199 optional bool privacy_override = 6;
6200
6201 // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in
6202 // seconds.
6203 optional int32 timeout = 7;
6204
6205 // Default response when timeout.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08006206 optional android.server.location.GnssUserResponseType default_response = 8;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006207
6208 // String representing the requester of the network inititated location request.
6209 optional string requestor_id = 9;
6210
6211 // Notification message text string representing the service(for eg. SUPL-service) who sent the
6212 // network initiated location request.
6213 optional string text = 10;
6214
6215 // requestorId decoding scheme.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08006216 optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006217
6218 // Notification message text decoding scheme.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08006219 optional android.server.location.GnssNiEncodingType text_encoding = 12;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006220
6221 // True if SUPL ES is enabled.
6222 optional bool is_supl_es_enabled = 13;
6223
6224 // True if GNSS location is enabled.
6225 optional bool is_location_enabled = 14;
6226
6227 // GNSS NI responses which define the response in NI structures.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08006228 optional android.server.location.GnssUserResponseType user_response = 15;
6229}
6230
6231/**
6232 * Logs GNSS non-framework (NFW) location notification.
6233 *
6234 * Logged from:
6235 * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
6236 */
6237message GnssNfwNotificationReported {
6238 // Package name of the Android proxy application representing the non-framework entity that
6239 // requested location. Set to empty string if unknown.
6240 optional string proxy_app_package_name = 1;
6241
6242 // Protocol stack that initiated the non-framework location request.
6243 optional android.server.location.NfwProtocolStack protocol_stack = 2;
6244
6245 // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise,
6246 // set to empty string. This field is opaque to the framework and used for logging purposes.
6247 optional string other_protocol_stack_name = 3;
6248
6249 // Source initiating/receiving the location information.
6250 optional android.server.location.NfwRequestor requestor = 4;
6251
6252 // Identity of the endpoint receiving the location information. For example, carrier name, OEM
6253 // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework
6254 // and used for logging purposes.
6255 optional string requestor_id = 5;
6256
6257 // Indicates whether location information was provided for this request.
6258 optional android.server.location.NfwResponseType response_type = 6;
6259
6260 // True if the device is in user initiated emergency session.
6261 optional bool in_emergency_mode = 7;
6262
6263 // True if cached location is provided.
6264 optional bool is_cached_location = 8;
6265
6266 // True if proxy app permission mismatch between framework and GNSS HAL.
6267 optional bool is_permission_mismatched = 9;
6268}
6269
6270/**
6271 * Logs GNSS configuration as defined in IGnssConfiguration.hal.
6272 *
6273 * Logged from:
6274 * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java
6275 */
6276message GnssConfigurationReported {
6277 // SUPL host name.
6278 optional string supl_host = 1;
6279
6280 // SUPL port number.
6281 optional int32 supl_port = 2;
6282
6283 // C2K host name.
6284 optional string c2k_host = 3;
6285
6286 // C2K port number.
6287 optional int32 c2k_port = 4;
6288
6289 // The SUPL version requested by Carrier.
6290 optional int32 supl_ver = 5;
6291
6292 // The SUPL mode.
6293 optional android.server.location.SuplMode supl_mode = 6;
6294
6295 // True if NI emergency SUPL restrictions is enabled.
6296 optional bool supl_es = 7;
6297
6298 // LTE Positioning Profile settings
6299 optional android.server.location.LppProfile lpp_profile = 8;
6300
6301 // Positioning protocol on A-Glonass system.
6302 optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9;
6303
6304 // True if emergency PDN is used. Otherwise, regular PDN is used.
6305 optional bool use_emergency_pdn_for_emergency_supl= 10;
6306
6307 // Configurations of how GPS functionalities should be locked when user turns off GPS On setting.
6308 optional android.server.location.GpsLock gps_lock = 11;
6309
6310 // Number of seconds to extend the emergency session duration post emergency call.
6311 optional int32 es_extension_sec = 12;
6312
6313 // The full list of package names of proxy Android applications representing the non-framework
6314 // location access entities (on/off the device) for which the framework user has granted
6315 // non-framework location access permission. The package names are concatenated in one string
6316 // with spaces as separators.
6317 optional string enabled_proxy_app_package_name_list = 13;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006318}
Jack Yu95b64f32018-12-13 18:26:11 +08006319
6320/**
6321 * Logs when a NFC device's error occurred.
6322 * Logged from:
6323 * system/nfc/src/nfc/nfc/nfc_ncif.cc
6324 * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java
6325 */
6326message NfcErrorOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08006327 enum Type {
6328 UNKNOWN = 0;
6329 CMD_TIMEOUT = 1;
6330 ERROR_NOTIFICATION = 2;
6331 AID_OVERFLOW = 3;
6332 }
6333 optional Type type = 1;
6334 // If it's nci cmd timeout, log the timeout command.
6335 optional uint32 nci_cmd = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08006336
Alex Salod7c3eef2019-01-25 14:43:27 -08006337 optional uint32 error_ntf_status_code = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08006338}
6339
6340/**
6341 * Logs when a NFC device's state changed event
6342 * Logged from:
6343 * packages/apps/Nfc/src/com/android/nfc/NfcService.java
6344 */
6345message NfcStateChanged {
Alex Salod7c3eef2019-01-25 14:43:27 -08006346 enum State {
6347 UNKNOWN = 0;
6348 OFF = 1;
6349 ON = 2;
6350 ON_LOCKED = 3; // Secure Nfc enabled.
6351 CRASH_RESTART = 4; // NfcService watchdog timeout restart.
6352 }
6353 optional State state = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08006354}
6355
6356/**
6357 * Logs when a NFC Beam Transaction occurred.
6358 * Logged from:
6359 * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
6360 */
6361message NfcBeamOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08006362 enum Operation {
6363 UNKNOWN = 0;
6364 SEND = 1;
6365 RECEIVE = 2;
6366 }
6367 optional Operation operation = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08006368}
6369
6370/**
6371 * Logs when a NFC Card Emulation Transaction occurred.
6372 * Logged from:
6373 * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java
6374 * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java
6375 */
6376message NfcCardemulationOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08006377 enum Category {
6378 UNKNOWN = 0;
6379 HCE_PAYMENT = 1;
6380 HCE_OTHER = 2;
6381 OFFHOST = 3;
6382 }
6383 // Transaction belongs to HCE payment or HCE other category, or offhost.
6384 optional Category category = 1;
6385 // SeName from transaction: SIMx, eSEx, HCE, HCEF.
6386 optional string se_name = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08006387}
6388
6389/**
6390 * Logs when a NFC Tag event occurred.
6391 * Logged from:
6392 * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java
6393 */
6394message NfcTagOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08006395 enum Type {
6396 UNKNOWN = 0;
6397 URL = 1;
6398 BT_PAIRING = 2;
6399 PROVISION = 3;
6400 WIFI_CONNECT = 4;
6401 APP_LAUNCH = 5;
6402 OTHERS = 6;
6403 }
6404 optional Type type = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08006405}
6406
6407/**
6408 * Logs when Hce transaction triggered
6409 * Logged from:
6410 * system/nfc/src/nfc/nfc/nfc_ncif.cc
6411 */
6412message NfcHceTransactionOccurred {
6413 // The latency period(in microseconds) it took for the first HCE data
6414 // exchange.
6415 optional uint32 latency_micros = 1;
6416}
6417
6418/**
6419 * Logs when SecureElement state event changed
6420 * Logged from:
6421 * packages/apps/SecureElement/src/com/android/se/Terminal.java
6422 */
6423message SeStateChanged {
Alex Salod7c3eef2019-01-25 14:43:27 -08006424 enum State {
6425 UNKNOWN = 0;
6426 INITIALIZED = 1;
6427 DISCONNECTED = 2;
6428 CONNECTED = 3;
6429 HALCRASH = 4;
6430 }
6431 optional State state = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08006432
Alex Salod7c3eef2019-01-25 14:43:27 -08006433 optional string state_change_reason = 2;
6434 // SIMx or eSEx.
6435 optional string terminal = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08006436}
6437
6438/**
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08006439 * Information about a permission grant request
6440 */
6441message PermissionGrantRequestResultReported {
6442 // unique value identifying an API call. A API call might result in multiple of these atoms
6443 optional int64 request_id = 1;
6444
6445 // UID of package requesting the permission grant
Stanislav Zholnine8d073b2019-11-25 17:49:21 +00006446 optional int32 uid = 2 [(is_uid) = true];
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08006447
6448 // Name of package requesting the permission grant
Stanislav Zholnine8d073b2019-11-25 17:49:21 +00006449 optional string package_name = 3;
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08006450
6451 // The permission to be granted
6452 optional string permission_name = 4;
6453
6454 // If the permission was explicitly requested via the API or added by the system
6455 optional bool is_implicit = 5;
6456
6457 enum Result {
6458 UNDEFINED = 0;
6459 // permission request was ignored
6460 IGNORED = 1;
6461 // permission request was ignored because it was user fixed
6462 IGNORED_USER_FIXED = 2;
6463 // permission request was ignored because it was policy fixed
6464 IGNORED_POLICY_FIXED = 3;
6465 // permission was granted by user action
6466 USER_GRANTED = 4;
6467 // permission was automatically granted
6468 AUTO_GRANTED = 5;
6469 // permission was denied by user action
6470 USER_DENIED = 6;
6471 // permission was denied with prejudice by the user
6472 USER_DENIED_WITH_PREJUDICE = 7;
6473 // permission was automatically denied
6474 AUTO_DENIED = 8;
Svet Ganovd8eb8b22019-04-05 18:52:08 -07006475 // permission request was ignored because permission is restricted
6476 IGNORED_RESTRICTED_PERMISSION = 9;
Stanislav Zholnin066aefb2019-10-17 18:40:33 +01006477 // one time permission was granted by user action
6478 USER_GRANTED_ONE_TIME = 10;
Stanislav Zholnin8fde4fb2019-12-06 19:06:08 +00006479 // user ignored request by leaving the request screen without choosing any option
6480 USER_IGNORED = 11;
Evan Severson7c1cc8a2019-12-17 14:36:17 -08006481 // user granted the permission after being linked to settings
6482 USER_GRANTED_IN_SETTINGS = 12;
6483 // user denied the permission after being linked to settings
6484 USER_DENIED_IN_SETTINGS = 13;
6485 // user denied the permission with prejudice after being linked to settings
6486 USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14;
6487 // permission was automatically revoked after one-time permission expired
6488 AUTO_ONE_TIME_PERMISSION_REVOKED = 15;
Eugene Susla6db4be52020-01-09 11:02:09 -08006489 // permission was automatically revoked for unused app
6490 AUTO_UNUSED_APP_PERMISSION_REVOKED = 16;
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08006491 }
6492 // The result of the permission grant
6493 optional Result result = 6;
6494}
6495
6496/**
Jack Yu95b64f32018-12-13 18:26:11 +08006497 * Logs when Omapi API used
6498 * Logged from:
6499 * packages/apps/SecureElement/src/com/android/se/Terminal.java
6500 */
6501message SeOmapiReported {
Alex Salod7c3eef2019-01-25 14:43:27 -08006502 enum Operation {
6503 UNKNOWN = 0;
6504 OPEN_CHANNEL = 1;
6505 }
6506 optional Operation operation = 1;
6507 // SIMx or eSEx.
6508 optional string terminal = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08006509
Alex Salod7c3eef2019-01-25 14:43:27 -08006510 optional string package_name = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08006511}
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08006512
6513/**
Alex Saloa060aee2019-01-21 14:36:41 -08006514 * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED.
6515 * The dispatch latency is the dispatchClockTime - enqueueClockTime.
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08006516 * Logged from:
6517 * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
6518 */
6519message BroadcastDispatchLatencyReported {
Alex Saloa060aee2019-01-21 14:36:41 -08006520 optional int64 dispatch_latency_millis = 1;
6521}
6522
6523/**
6524 * Logs AttentionManagerService attention check result.
6525 *
6526 * Logged from:
6527 * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java
6528 */
6529message AttentionManagerServiceResultReported {
6530 // See core/java/android/service/attention/AttentionService.java
6531 enum AttentionCheckResult {
6532 UNKNOWN = 20;
6533 ATTENTION_SUCCESS_ABSENT = 0;
6534 ATTENTION_SUCCESS_PRESENT = 1;
Alex Salodd028ba2019-04-17 13:33:49 -07006535 ATTENTION_FAILURE_UNKNOWN = 2;
6536 ATTENTION_FAILURE_CANCELLED = 3;
6537 ATTENTION_FAILURE_PREEMPTED = 4;
6538 ATTENTION_FAILURE_TIMED_OUT = 5;
6539 ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6;
Alex Saloa060aee2019-01-21 14:36:41 -08006540 }
6541 optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN];
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08006542}
Michael Groover9e7b06e2018-12-28 19:55:51 -08006543
6544/**
6545 * Logs when an adb connection changes state.
6546 *
6547 * Logged from:
6548 * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java
6549 */
6550message AdbConnectionChanged {
6551 // The last time this system connected via adb, or 0 if the 'always allow' option was not
6552 // previously selected for this system.
6553 optional int64 last_connection_time_millis = 1;
6554
6555 // The time in ms within which a subsequent connection from an 'always allow' system is allowed
6556 // to reconnect via adb without user interaction.
6557 optional int64 auth_window_millis = 2;
6558
6559 // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto.
6560 optional android.debug.AdbConnectionStateEnum state = 3;
6561
6562 // True if the 'always allow' option was selected for this system.
6563 optional bool always_allow = 4;
6564}
Carter Hsub8fd1e92019-01-11 15:24:45 +08006565
6566/*
6567 * Logs the reported speech DSP status.
6568 *
6569 * Logged from:
6570 * Vendor audio implementation.
6571 */
6572message SpeechDspStatReported {
6573 // The total Speech DSP uptime in milliseconds.
6574 optional int32 total_uptime_millis = 1;
6575 // The total Speech DSP downtime in milliseconds.
6576 optional int32 total_downtime_millis = 2;
6577 optional int32 total_crash_count = 3;
6578 optional int32 total_recover_count = 4;
6579}
Badhri Jagan Sridharan129c7292019-01-14 21:18:25 -08006580
6581/**
6582 * Logs USB connector contaminant status.
6583 *
6584 * Logged from: USB Service.
6585 */
6586message UsbContaminantReported {
6587 optional string id = 1;
6588 optional android.service.usb.ContaminantPresenceStatus status = 2;
6589}
Olivier Gaillard18d452202019-01-22 15:03:41 +00006590
6591/**
6592 * This atom is for debugging purpose.
6593 */
6594message DebugElapsedClock {
6595 // Monotically increasing value for each pull.
6596 optional int64 pull_count = 1;
6597 // Time from System.elapsedRealtime.
6598 optional int64 elapsed_clock_millis = 2;
6599 // Time from System.elapsedRealtime.
6600 optional int64 same_elapsed_clock_millis = 3;
6601 // Diff between current elapsed time and elapsed time from previous pull.
6602 optional int64 elapsed_clock_diff_millis = 4;
6603
6604 enum Type {
6605 TYPE_UNKNOWN = 0;
6606 ALWAYS_PRESENT = 1;
6607 PRESENT_ON_ODD_PULLS = 2;
6608 }
6609 // Type of behavior for the pulled data.
6610 optional Type type = 5;
6611}
6612
6613/**
6614 * This atom is for debugging purpose.
6615 */
6616message DebugFailingElapsedClock {
6617 // Monotically increasing value for each pull.
6618 optional int64 pull_count = 1;
6619 // Time from System.elapsedRealtime.
6620 optional int64 elapsed_clock_millis = 2;
6621 // Time from System.elapsedRealtime.
6622 optional int64 same_elapsed_clock_millis = 3;
6623 // Diff between current elapsed time and elapsed time from previous pull.
6624 optional int64 elapsed_clock_diff_millis = 4;
6625}
Steven Wuacef6bb2019-01-23 14:21:17 -05006626
6627/** Logs System UI bubbles event changed.
6628 *
6629 * Logged from:
6630 * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles
6631 */
6632message BubbleUIChanged {
6633
6634 // The app package that is posting the bubble.
6635 optional string package_name = 1;
6636
6637 // The notification channel that is posting the bubble.
6638 optional string notification_channel = 2;
6639
6640 // The notification id associated with the posted bubble.
6641 optional int32 notification_id = 3;
6642
6643 // The position of the bubble within the bubble stack.
6644 optional int32 position = 4;
6645
6646 // The total number of bubbles within the bubble stack.
6647 optional int32 total_number = 5;
6648
6649 // User interactions with the bubble.
6650 enum Action {
6651 UNKNOWN = 0;
6652 POSTED = 1;
6653 UPDATED = 2;
6654 EXPANDED = 3;
6655 COLLAPSED = 4;
6656 DISMISSED = 5;
6657 STACK_DISMISSED = 6;
6658 STACK_MOVED = 7;
6659 HEADER_GO_TO_APP = 8;
6660 HEADER_GO_TO_SETTINGS = 9;
6661 PERMISSION_OPT_IN = 10;
6662 PERMISSION_OPT_OUT = 11;
Steven Wua62cb6a2019-02-15 17:12:51 -05006663 PERMISSION_DIALOG_SHOWN = 12;
Steven Wuacef6bb2019-01-23 14:21:17 -05006664 SWIPE_LEFT = 13;
6665 SWIPE_RIGHT = 14;
Steven Wua254dab2019-01-29 11:30:39 -05006666 STACK_EXPANDED = 15;
Steven Wu1684f2d52019-04-11 14:10:42 -04006667 FLYOUT = 16;
Steven Wuacef6bb2019-01-23 14:21:17 -05006668 }
6669 optional Action action = 6;
6670
6671 // Normalized screen position of the bubble stack. The range is between 0 and 1.
6672 optional float normalized_x_position = 7;
6673 optional float normalized_y_position = 8;
Steven Wu45e38ae2019-03-25 16:16:59 -04006674
6675 // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon.
6676 optional bool is_unread = 9;
Steven Wu8ba8ca92019-04-11 10:47:42 -04006677
6678 // Whether the bubble is an on-going one.
6679 optional bool is_ongoing = 10;
6680
6681 // Whether the bubble is produced by an app running in foreground.
Mady Mellordaa0a662019-06-24 16:42:35 -07006682 // This is deprecated and the value should be ignored.
6683 optional bool is_foreground = 11 [deprecated = true];
Steven Wuacef6bb2019-01-23 14:21:17 -05006684}
Kweku Adams8845d012018-12-11 20:06:45 -08006685
6686/**
Steven Wu552f63f2019-02-05 13:41:36 -05006687 * Logs System UI bubbles developer errors.
6688 *
6689 * Logged from:
6690 * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
6691 */
6692message BubbleDeveloperErrorReported {
6693
6694 // The app package that is posting the bubble.
6695 optional string package_name = 1;
6696
6697 // Bubble developer error type enums.
6698 enum Error {
6699 UNKNOWN = 0;
6700 ACTIVITY_INFO_MISSING = 1;
6701 ACTIVITY_INFO_NOT_RESIZABLE = 2;
6702 DOCUMENT_LAUNCH_NOT_ALWAYS = 3;
6703 }
6704 optional Error error = 2 [default = UNKNOWN];
6705}
6706
6707/**
Kweku Adams8845d012018-12-11 20:06:45 -08006708 * Logs that a constraint for a scheduled job has changed.
6709 *
6710 * Logged from:
6711 * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java
6712 */
6713message ScheduledJobConstraintChanged {
6714 repeated AttributionNode attribution_node = 1;
6715
6716 // Name of the job.
6717 optional string job_name = 2;
6718
6719 optional com.android.server.job.ConstraintEnum constraint = 3;
6720
6721 enum State {
Kweku Adamse8db3ab2019-02-27 14:30:34 -08006722 UNKNOWN = 0;
6723 UNSATISFIED = 1;
6724 SATISFIED = 2;
Kweku Adams8845d012018-12-11 20:06:45 -08006725 }
6726 optional State state = 4;
6727}
Alex Salod7c3eef2019-01-25 14:43:27 -08006728
6729/**
6730 * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check
6731 * returns true.
6732 *
6733 * Logged from:
6734 * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
6735 */
6736message ScreenTimeoutExtensionReported {
6737 // Describes how many times in a row did the power manager reset the screen off timeout.
6738 optional uint32 consecutive_timeout_extended_count = 1;
6739}
Hui Yu885aca12019-01-10 17:11:34 -08006740
6741/*
6742* Logs number of milliseconds it takes to start a process.
6743* The definition of app process start time is from the app launch time to
6744* the time that Zygote finished forking the app process and loaded the
6745* application package's java classes.
6746
6747* This metric is different from AppStartOccurred which is for foreground
6748* activity only.
6749
6750* ProcessStartTime can report all processes (both foreground and background)
6751* start time.
6752*
6753* Logged from:
6754* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
6755*/
6756message ProcessStartTime {
6757 // The uid of the ProcessRecord.
6758 optional int32 uid = 1 [(is_uid) = true];
6759
6760 // The process pid.
6761 optional int32 pid = 2;
6762
6763 // The process name.
6764 // Usually package name, "system" for system server.
6765 // Provided by ActivityManagerService.
6766 optional string process_name = 3;
6767
6768 enum StartType {
6769 UNKNOWN = 0;
6770 WARM = 1;
6771 HOT = 2;
6772 COLD = 3;
6773 }
6774
6775 // The start type.
6776 optional StartType type = 4;
6777
6778 // The elapsed realtime at the start of the process.
6779 optional int64 process_start_time_millis = 5;
6780
6781 // Number of milliseconds it takes to reach bind application.
6782 optional int32 bind_application_delay_millis = 6;
6783
6784 // Number of milliseconds it takes to finish start of the process.
6785 optional int32 process_start_delay_millis = 7;
6786
6787 // hostingType field in ProcessRecord, the component type such as "activity",
6788 // "service", "content provider", "broadcast" or other strings.
6789 optional string hosting_type = 8;
6790
6791 // hostingNameStr field in ProcessRecord. The component class name that runs
6792 // in this process.
6793 optional string hosting_name = 9;
6794}
6795
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08006796/**
Ray Essick8ab04df2019-02-15 11:01:02 -08006797 * Track Media Codec usage
6798 * Logged from:
6799 * frameworks/av/media/libstagefright/MediaCodec.cpp
6800 * frameworks/av/services/mediaanalytics/statsd_codec.cpp
6801 */
6802message MediametricsCodecReported {
6803 optional int64 timestamp_nanos = 1;
6804 optional string package_name = 2;
6805 optional int64 package_version_code = 3;
6806 optional int64 media_apex_version = 4;
6807
6808 optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6809}
6810
6811/**
6812 * Track Media Extractor (pulling video/audio streams out of containers) usage
6813 * Logged from:
6814 * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp
6815 * frameworks/av/services/mediaanalytics/statsd_extractor.cpp
6816 */
6817message MediametricsExtractorReported {
6818 optional int64 timestamp_nanos = 1;
6819 optional string package_name = 2;
6820 optional int64 package_version_code = 3;
6821 optional int64 media_apex_version = 4;
6822
6823 optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6824}
6825
6826/**
6827 * Track how we arbitrate between microphone/input requests.
6828 * Logged from
6829 * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
6830 * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp
6831 */
6832message MediametricsAudiopolicyReported {
6833 optional int64 timestamp_nanos = 1;
6834 optional string package_name = 2;
6835 optional int64 package_version_code = 3;
6836 optional int64 media_apex_version = 4;
6837
6838 optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6839}
6840
6841/**
6842 * Track how we arbitrate between microphone requests.
6843 * Logged from
6844 * frameworks/av/media/libaudioclient/AudioRecord.cpp
6845 * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp
6846 */
6847message MediametricsAudiorecordReported {
6848 optional int64 timestamp_nanos = 1;
6849 optional string package_name = 2;
6850 optional int64 package_version_code = 3;
6851 optional int64 media_apex_version = 4;
6852
6853 optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6854}
6855
6856/**
6857 * Track how we arbitrate between microphone/input requests.
6858 * Logged from
6859 * frameworks/av/media/libnblog/ReportPerformance.cpp
6860 * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp
6861 */
6862message MediametricsAudiothreadReported {
6863 optional int64 timestamp_nanos = 1;
6864 optional string package_name = 2;
6865 optional int64 package_version_code = 3;
6866 optional int64 media_apex_version = 4;
6867
6868 optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6869}
6870
6871/**
6872 * Track how we arbitrate between microphone/input requests.
6873 * Logged from
6874 * frameworks/av/media/libaudioclient/AudioTrack.cpp
6875 * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp
6876 */
6877message MediametricsAudiotrackReported {
6878 optional int64 timestamp_nanos = 1;
6879 optional string package_name = 2;
6880 optional int64 package_version_code = 3;
6881 optional int64 media_apex_version = 4;
6882
6883 optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6884}
6885
6886/**
6887 * Track information about DRM framework performance
6888 * Logged from
6889 * frameworks/av/drm/libmediadrm/DrmHal.cpp
6890 * frameworks/av/services/mediaanalytics/statsd_drm.cpp
6891 */
6892message MediametricsMediadrmReported {
6893 optional int64 timestamp_nanos = 1;
6894 optional string package_name = 2;
6895 optional int64 package_version_code = 3;
6896 optional int64 media_apex_version = 4;
6897
6898 // vendor+description tell about which DRM plugin is in use on this device
6899 optional string vendor = 5;
6900 optional string description = 6;
6901 // from frameworks/av/drm/libmediadrm/protos/metrics.proto
6902 optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES];
6903}
6904
6905/**
6906 * Track information about the widevine DRM plugin performance
6907 * Logged from
6908 * vendor/widevine/libwvdrmengine/cdm/metrics
6909 * frameworks/av/services/mediaanalytics/statsd_drm.cpp
6910 */
6911message MediametricsDrmWidevineReported {
6912 optional int64 timestamp_nanos = 1;
6913 optional string package_name = 2;
6914 optional int64 package_version_code = 3;
6915 optional int64 media_apex_version = 4;
6916
6917 optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6918}
6919
6920/**
6921 * Track information about recordings (e.g. camcorder)
6922 * Logged from
6923 * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp
6924 * frameworks/av/services/mediaanalytics/statsd_recorder.cpp
6925 */
6926message MediametricsRecorderReported {
6927 optional int64 timestamp_nanos = 1;
6928 optional string package_name = 2;
6929 optional int64 package_version_code = 3;
6930 optional int64 media_apex_version = 4;
6931
6932 optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6933}
6934
6935/**
6936 * Track Media Player usage
6937 * Logged from:
6938 * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
6939 * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp
6940 */
6941message MediametricsNuPlayerReported {
6942 optional int64 timestamp_nanos = 1;
6943 optional string package_name = 2;
6944 optional int64 package_version_code = 3;
6945 optional int64 media_apex_version = 4;
6946
6947 optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6948}
6949
6950/**
Robert Shiha4beed32019-08-19 14:15:23 -07006951 * Track Legacy DRM usage
6952 * Logged from
6953 * frameworks/av/drm/drmserver/DrmManager.cpp
6954 */
6955message MediametricsDrmManagerReported {
6956 optional int64 timestamp_nanos = 1;
6957 optional string package_name = 2;
6958 optional int64 package_version_code = 3;
6959 optional int64 media_apex_version = 4;
6960
6961 enum Method {
6962 METHOD_NOT_FOUND = -1;
6963 GET_CONSTRAINTS = 0;
6964 GET_METADATA = 1;
6965 CAN_HANDLE = 2;
6966 PROCESS_DRM_INFO = 3;
6967 ACQUIRE_DRM_INFO = 4;
6968 SAVE_RIGHTS = 5;
6969 GET_ORIGINAL_MIME_TYPE = 6;
6970 GET_DRM_OBJECT_TYPE = 7;
6971 CHECK_RIGHTS_STATUS = 8;
6972 REMOVE_RIGHTS = 9;
6973 REMOVE_ALL_RIGHTS = 10;
6974 OPEN_CONVERT_SESSION = 11;
6975 OPEN_DECRYPT_SESSION = 12;
6976 }
6977
6978 // plugin_id+description inform which Legacy DRM plugins are still in use on device
6979 optional string plugin_id = 5;
6980 optional string description = 6;
6981 optional Method method = 7;
6982 optional string mime_types = 8;
6983}
6984
6985/**
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08006986 * State of a dangerous permission requested by a package
Stanislav Zholninccb82e42019-11-29 18:59:49 +00006987 * Pulled from: StatsCompanionService
6988*/
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08006989message DangerousPermissionState {
6990 // Name of the permission
6991 optional string permission_name = 1;
6992
6993 // Uid of the package
6994 optional int32 uid = 2 [(is_uid) = true];
6995
6996 // Package requesting the permission
6997 optional string package_name = 3;
6998
6999 // If the permission is granted to the uid
7000 optional bool is_granted = 4;
Stanislav Zholnin75c3fd12019-05-21 13:10:51 +01007001
7002 // Permission flags as per android.content.pm.PermissionFlags
7003 optional int32 permission_flags = 5;
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08007004}
7005
Michael Groover4a0ca942019-01-24 17:41:25 -08007006/**
7007 * Logs when a package is denied access to a device identifier based on the new access requirements.
7008 *
7009 * Logged from:
7010 * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
7011 */
7012message DeviceIdentifierAccessDenied {
7013 // The name of the package denied access to the requested device identifier.
7014 optional string package_name = 1;
7015
7016 // The name of the device identifier method the package attempted to invoke.
7017 optional string method_name = 2;
7018
7019 // True if the package is preinstalled.
Meng Wange8953ae2020-01-29 10:38:58 -08007020 // Starting from Android 11, this boolean is not set and will always be false.
7021 optional bool is_preinstalled = 3 [deprecated = true];
Michael Groover4a0ca942019-01-24 17:41:25 -08007022
7023 // True if the package is privileged.
Sooraj Sasindran22b53f42019-11-27 15:57:33 -08007024 // Starting from Android 11, this boolean is not set and will always be false.
7025 optional bool is_priv_app = 4 [deprecated = true];
Michael Groover4a0ca942019-01-24 17:41:25 -08007026}
Chenjie Yue13f44a2019-02-07 17:51:38 -08007027
7028/**
Chenjie Yue13f44a2019-02-07 17:51:38 -08007029 * Pulls the ongoing mainline install train version code.
7030 * Pulled from StatsCompanionService
7031 */
7032message TrainInfo {
7033 optional int64 train_version_code = 1;
7034
7035 optional TrainExperimentIds train_experiment_id = 2;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08007036
7037 optional string train_name = 3;
7038
7039 enum Status {
7040 UNKNOWN = 0;
7041 INSTALL_REQUESTED = 1;
7042 INSTALL_STARTED = 2;
7043 INSTALL_STAGED_NOT_READY = 3;
7044 INSTALL_STAGED_READY = 4;
7045 INSTALL_SUCCESS = 5;
Tej Singh403fe472019-04-30 12:54:21 -07007046 // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH,
7047 // and INSTALL_FAILURE_COMMIT.
7048 INSTALL_FAILURE = 6 [deprecated = true];
7049 // This enum is for installs that are manually cancelled via the Manual Update UI.
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08007050 INSTALL_CANCELLED = 7;
7051 INSTALLER_ROLLBACK_REQUESTED = 8;
7052 INSTALLER_ROLLBACK_INITIATED = 9;
7053 INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
7054 INSTALLER_ROLLBACK_STAGED = 11;
7055 INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
7056 INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
7057 INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
7058 INSTALLER_ROLLBACK_SUCCESS = 15;
7059 INSTALLER_ROLLBACK_FAILURE = 16;
Howard Ro174ed562019-04-07 22:17:58 -07007060 INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17;
7061 INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18;
7062 INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19;
7063 INSTALL_STAGED_CANCEL_REQUESTED = 20;
7064 INSTALL_STAGED_CANCEL_SUCCESS = 21;
7065 INSTALL_STAGED_CANCEL_FAILURE = 22;
Tej Singh403fe472019-04-30 12:54:21 -07007066 INSTALL_FAILURE_DOWNLOAD = 23;
7067 INSTALL_FAILURE_STATE_MISMATCH = 24;
7068 INSTALL_FAILURE_COMMIT = 25;
Jonathan Nguyen5886a712020-01-16 10:34:21 -08007069 REBOOT_TRIGGERED = 26;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08007070 }
7071 optional Status status = 4;
Chenjie Yue13f44a2019-02-07 17:51:38 -08007072}
joshmccloskey8c3322e2019-01-09 18:25:57 -08007073
7074/**
7075 * Logs the gesture stage changed event.
7076 *
7077 * Logged from:
7078 * frameworks/base/packages/SystemUI/
7079 */
7080message AssistGestureStageReported {
joshmccloskey99f39012019-02-20 14:45:08 -08007081 optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08007082}
7083
7084/**
7085 * Logs the feedback type.
7086 *
7087 * Logged from:
7088 * frameworks/base/packages/SystemUI/
7089 */
7090message AssistGestureFeedbackReported {
joshmccloskey99f39012019-02-20 14:45:08 -08007091 // Whether or not the gesture was used.
7092 optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08007093}
7094
7095/**
7096 * Logs the progress.
7097 *
7098 * Logged from:
7099 * frameworks/base/packages/SystemUI/
7100 */
7101message AssistGestureProgressReported {
joshmccloskey99f39012019-02-20 14:45:08 -08007102 // [0,100] progress for the assist gesture.
7103 optional int32 progress = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08007104}
Neil Fullerdb14b482019-02-05 19:44:44 +00007105
7106/*
7107 * Information about the time zone data on a device.
7108 */
7109message TimeZoneDataInfo {
7110 // A version identifier for the data set on device. e.g. "2018i"
7111 optional string tzdb_version = 1;
7112}
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007113
Yiwei Zhang4fb92892019-03-04 14:29:25 -08007114/**
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007115 * Logs the GPU stats global health information.
7116 *
7117 * Logged from:
7118 * frameworks/native/services/gpuservice/gpustats/
7119 */
7120message GpuStatsGlobalInfo {
7121 // Package name of the gpu driver.
7122 optional string driver_package_name = 1;
7123
7124 // Version name of the gpu driver.
7125 optional string driver_version_name = 2;
7126
7127 // Version code of the gpu driver.
7128 optional int64 driver_version_code = 3;
7129
7130 // Build time of the gpu driver in UTC as seconds since January 1, 1970.
7131 optional int64 driver_build_time = 4;
7132
7133 // Total count of the gl driver gets loaded.
7134 optional int64 gl_loading_count = 5;
7135
7136 // Total count of the gl driver fails to be loaded.
7137 optional int64 gl_loading_failure_count = 6;
7138
7139 // Total count of the Vulkan driver gets loaded.
7140 optional int64 vk_loading_count = 7;
7141
7142 // Total count of the Vulkan driver fails to be loaded.
7143 optional int64 vk_loading_failure_count = 8;
Yiwei Zhang63852d2a2019-05-06 19:31:20 -07007144
7145 // Api version of the system Vulkan driver.
7146 optional int32 vulkan_version = 9;
7147
7148 // Api version of the system CPU Vulkan driver.
7149 optional int32 cpu_vulkan_version = 10;
7150
7151 // Api version of the system GLES driver.
7152 optional int32 gles_version = 11;
Yiwei Zhanga0f5fef2019-05-08 16:30:47 -07007153
7154 // Total count of the angle driver gets loaded.
7155 optional int64 angle_loading_count = 12;
7156
7157 // Total count of the angle driver fails to be loaded.
7158 optional int64 angle_loading_failure_count = 13;
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007159}
7160
Yiwei Zhang4fb92892019-03-04 14:29:25 -08007161/**
7162 * GPU driver loading time info.
7163 */
7164message GpuDriverLoadingTime {
7165 // List of all the driver loading times for this app. The list size is
7166 // capped at 50.
7167 repeated int64 driver_loading_time = 1;
7168}
7169
7170/**
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007171 * Logs the GPU stats per app health information.
7172 *
7173 * Logged from:
7174 * frameworks/native/services/gpuservice/gpustats/
7175 */
7176message GpuStatsAppInfo {
Yiwei Zhang4fb92892019-03-04 14:29:25 -08007177 // Package name of the application that loads the gpu driver. Total number
7178 // of different packages is capped at 100.
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007179 optional string app_package_name = 1;
7180
7181 // Version code of the gpu driver this app loads.
7182 optional int64 driver_version_code = 2;
7183
Yiwei Zhang4fb92892019-03-04 14:29:25 -08007184 // gl driver loading time info.
7185 optional GpuDriverLoadingTime gl_driver_loading_time = 3
7186 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007187
Yiwei Zhang4fb92892019-03-04 14:29:25 -08007188 // Vulkan driver loading time info.
7189 optional GpuDriverLoadingTime vk_driver_loading_time = 4
7190 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhanga0f5fef2019-05-08 16:30:47 -07007191
7192 // Angle driver loading time info.
7193 optional GpuDriverLoadingTime angle_driver_loading_time = 5
7194 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhang7c709302019-05-09 15:00:46 -07007195
7196 // CPU Vulkan implementation is in use.
7197 optional bool cpu_vulkan_in_use = 6;
Yiwei Zhanga7638612019-07-03 17:34:12 -07007198
7199 // App is not doing pre-rotation correctly.
7200 optional bool false_prerotation = 7;
Yiwei Zhangf02cf6b2019-12-20 14:51:07 -08007201
7202 // App creates GLESv1 context.
7203 optional bool gles_1_in_use = 8;
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007204}
Rafal Slawikd4e87572019-03-12 13:08:38 +00007205
7206/*
7207 * Logs the size of the system ion heap.
7208 *
7209 * Pulled from StatsCompanionService.
7210 */
7211message SystemIonHeapSize {
Rafal Slawikbdd5a502020-01-14 14:14:29 +00007212 // Deprecated due to limited support of ion stats in debugfs.
7213 // Use `IonHeapSize` instead.
7214 option deprecated = true;
7215
Rafal Slawikd4e87572019-03-12 13:08:38 +00007216 // Size of the system ion heap in bytes.
Rafal Slawikbdd5a502020-01-14 14:14:29 +00007217 // Read from debugfs.
Rafal Slawikd4e87572019-03-12 13:08:38 +00007218 optional int64 size_in_bytes = 1;
7219}
Chiachang Wang0e88ebf2019-03-21 10:18:07 +08007220
Rafal Slawik77987ed2019-06-17 12:28:23 +01007221/*
Rafal Slawikbdd5a502020-01-14 14:14:29 +00007222 * Logs the total size of the ion heap.
7223 *
7224 * Pulled from StatsCompanionService.
7225 */
7226message IonHeapSize {
7227 // Total size of all ion heaps in kilobytes.
7228 // Read from: /sys/kernel/ion/total_heaps_kb.
7229 optional int32 total_size_kb = 1;
7230}
7231
7232/*
Rafal Slawik77987ed2019-06-17 12:28:23 +01007233 * Logs the per-process size of the system ion heap.
7234 *
7235 * Pulled from StatsCompanionService.
7236 */
7237message ProcessSystemIonHeapSize {
7238 // The uid if available. -1 means not available.
7239 optional int32 uid = 1 [(is_uid) = true];
7240
7241 // The process name (from /proc/PID/cmdline).
7242 optional string process_name = 2;
7243
7244 // Sum of sizes of all allocations.
7245 optional int32 total_size_in_kilobytes = 3;
7246
7247 // Number of allocations.
7248 optional int32 allocation_count = 4;
7249
7250 // Size of the largest allocation.
7251 optional int32 max_size_in_kilobytes = 5;
7252}
7253
Chiachang Wang0e88ebf2019-03-21 10:18:07 +08007254/**
7255 * Push network stack events.
7256 *
7257 * Log from:
7258 * frameworks/base/packages/NetworkStack/
7259 */
7260message NetworkStackReported {
Chiachang Wang729d2672019-03-27 17:33:52 +08007261 // The id that indicates the event reported from NetworkStack.
7262 optional int32 event_id = 1;
7263 // The data for the reported events.
Chiachang Wang0e88ebf2019-03-21 10:18:07 +08007264 optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES];
7265}
Carmen Agimofa769c152019-03-04 14:39:14 +00007266
7267/**
7268 * Logs the apps that are installed on the external storage.
7269 * Pulled from:
7270 * StatsCompanionService
7271 */
7272message AppsOnExternalStorageInfo {
7273 // The type of the external storage.
7274 optional android.stats.storage.ExternalStorageType external_storage_type = 1;
7275 // The name of the package that is installed on the external storage.
7276 optional string package_name = 2;
7277}
joshmccloskey34c1f8e2019-04-11 14:06:43 -07007278
7279/**
7280 * Logs the settings related to Face.
7281 * Logged from:
7282 * frameworks/base/services/core/java/com/android/server/stats
7283 */
7284message FaceSettings {
7285 // Whether or not face unlock is allowed on Keyguard.
7286 optional bool unlock_keyguard_enabled = 1;
7287 // Whether or not face unlock dismisses the Keyguard.
7288 optional bool unlock_dismisses_keyguard = 2;
7289 // Whether or not face unlock requires attention.
7290 optional bool unlock_attention_required = 3;
7291 // Whether or not face unlock is allowed for apps (through BiometricPrompt).
7292 optional bool unlock_app_enabled = 4;
7293 // Whether or not face unlock always requires user confirmation.
7294 optional bool unlock_always_require_confirmation = 5;
7295 // Whether or not a diverse set of poses are required during enrollment.
7296 optional bool unlock_diversity_required = 6;
7297}
Maggie White442b6312019-04-05 16:26:44 -07007298
7299/**
7300 * Logs cooling devices maintained by the kernel.
7301 *
7302 * Pulled from StatsCompanionService.java
7303 */
7304message CoolingDevice {
7305 // The type of cooling device being reported. Eg. CPU, GPU...
7306 optional android.os.CoolingTypeEnum device_location = 1;
7307 // The name of the cooling device source. Eg. CPU0
7308 optional string device_name = 2;
7309 // Current throttle state of the cooling device. The value can any unsigned
7310 // integer between 0 and max_state defined in its driver. 0 means device is
7311 // not in throttling, higher value means deeper throttling.
7312 optional int32 state = 3;
7313}
Ben Blount763a5d52019-04-10 11:48:58 -07007314
7315/**
7316 * Intelligence has several counter-type events that don't warrant a
7317 * full separate atom. These are primarily API call counters but also include
7318 * counters for feature usage and specific failure modes.
7319 *
7320 * Logged from the Intelligence mainline module.
7321 */
7322message IntelligenceEventReported {
Ben Blount3658fa72019-04-22 17:31:40 -07007323 // The event type.
Ben Blount763a5d52019-04-10 11:48:58 -07007324 optional android.stats.intelligence.EventType event_id = 1;
Ben Blount3658fa72019-04-22 17:31:40 -07007325 // Success, failure.
Ben Blount763a5d52019-04-10 11:48:58 -07007326 optional android.stats.intelligence.Status status = 2;
Ben Blount3658fa72019-04-22 17:31:40 -07007327 // How many times the event occured (to report a batch of high frequency events).
7328 optional int32 count = 3;
Ben Blounte3223f3d2019-05-02 22:49:03 -07007329 // How long the event took (sum of durations if count > 1)
Ben Blount3658fa72019-04-22 17:31:40 -07007330 optional int64 duration_millis = 4;
Ben Blount763a5d52019-04-10 11:48:58 -07007331}
Andrew T Nguyenee615d62019-05-01 14:40:19 -07007332
7333/**
Yuncheol Heod1a85d22019-05-08 17:13:42 -07007334 * Logs when Car Power state changed.
7335 *
7336 * Logged from:
7337 * packages/services/Car/service/src/com/android/car/CarStatsLog.java
7338 */
7339message CarPowerStateChanged {
7340 // States come from CpmsState in CarPowerManagementService.java.
7341 enum State {
7342 WAIT_FOR_VHAL = 0;
7343 ON = 1;
7344 SHUTDOWN_PREPARE = 2;
7345 WAIT_FOR_FINISH = 3;
7346 SUSPEND = 4;
7347 SIMULATE_SLEEP = 5;
7348 }
7349 optional State state = 1;
7350}
7351
7352/**
7353 * Logs whether GarageMode is entered.
7354 *
7355 * Logged from:
7356 * packages/services/Car/service/src/com/android/car/CarStatsLog.java
7357 */
7358message GarageModeInfo {
7359 // Whether GarageMode is entered.
7360 optional bool is_garage_mode = 1;
7361}
Martijn Coenencd95d462019-04-25 17:09:45 +02007362
7363/**
7364 * Historical app ops data per package.
7365 */
7366message AppOps {
7367 // Uid of the package requesting the op
7368 optional int32 uid = 1 [(is_uid) = true];
7369
Stanislav Zholnin606454c2019-11-27 15:31:49 +00007370 // Name of the package performing the op
Martijn Coenencd95d462019-04-25 17:09:45 +02007371 optional string package_name = 2;
7372
7373 // operation id; maps to the OP_* constants in AppOpsManager.java
7374 optional int32 op_id = 3;
7375
7376 // The number of times the op was granted while the app was in the
7377 // foreground (only for trusted requests)
7378 optional int64 trusted_foreground_granted_count = 4;
7379
7380 // The number of times the op was granted while the app was in the
7381 // background (only for trusted requests)
7382 optional int64 trusted_background_granted_count = 5;
7383
7384 // The number of times the op was rejected while the app was in the
7385 // foreground (only for trusted requests)
7386 optional int64 trusted_foreground_rejected_count = 6;
7387
7388 // The number of times the op was rejected while the app was in the
7389 // background (only for trusted requests)
7390 optional int64 trusted_background_rejected_count = 7;
7391
7392 // For long-running operations, total duration of the operation
7393 // while the app was in the foreground (only for trusted requests)
7394 optional int64 trusted_foreground_duration_millis = 8;
7395
7396 // For long-running operations, total duration of the operation
7397 // while the app was in the background (only for trusted requests)
7398 optional int64 trusted_background_duration_millis = 9;
Stanislav Zholnin42d710e2019-11-28 13:11:54 +00007399
7400 // Whether AppOps is guarded by Runtime permission
7401 optional bool is_runtime_permission = 10;
Martijn Coenencd95d462019-04-25 17:09:45 +02007402}
Hongyi Zhang700137e2019-05-23 21:19:36 -07007403
7404/**
7405 * Location Manager API Usage information(e.g. API under usage,
7406 * API call's parameters).
7407 * Logged from:
7408 * frameworks/base/services/core/java/com/android/server/LocationManagerService.java
7409 */
7410message LocationManagerApiUsageReported {
7411
7412 // Indicating if usage starts or usage ends.
7413 optional android.stats.location.UsageState state = 1;
7414
7415 // LocationManagerService's API in use.
7416 // We can identify which API from LocationManager is
7417 // invoking current LMS API by the combination of
7418 // API parameter(e.g. is_listener_null, is_intent_null,
7419 // is_location_request_null)
7420 optional android.stats.location.LocationManagerServiceApi api_in_use = 2;
7421
7422 // Name of the package calling the API.
7423 optional string calling_package_name = 3;
7424
7425 // Type of the location provider.
7426 optional android.stats.location.ProviderType provider = 4;
7427
7428 // Quality of the location request
7429 optional android.stats.location.LocationRequestQuality quality = 5;
7430
7431 // The desired interval for active location updates, in milliseconds.
7432 // Bucketized to reduce cardinality.
7433 optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6;
7434
7435 // Minimum distance between location updates, in meters.
7436 // Bucketized to reduce cardinality.
7437 optional android.stats.location.SmallestDisplacementBucket
7438 bucketized_smallest_displacement = 7;
7439
7440 // The number of location updates.
7441 optional int64 num_updates = 8;
7442
7443 // The request expiration time, in millisecond since boot.
7444 // Bucketized to reduce cardinality.
7445 optional android.stats.location.ExpirationBucket
7446 bucketized_expire_in = 9;
7447
7448 // Type of Callback passed in for this API.
7449 optional android.stats.location.CallbackType callback_type = 10;
7450
7451 // The radius of the central point of the alert
7452 // region, in meters. Only for API REQUEST_GEOFENCE.
7453 // Bucketized to reduce cardinality.
7454 optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11;
7455
7456 // Activity Importance of API caller.
7457 // Categorized to 3 types that are interesting from location's perspective.
7458 optional android.stats.location.ActivityImportance activiy_importance = 12;
7459}
Stanislav Zholnin3d215df12019-06-05 16:48:20 +01007460
7461/**
7462 * Information about a permission grant or denial made by user inside ReviewPermissionsFragment
7463 */
7464message ReviewPermissionsFragmentResultReported {
7465 // unique value identifying a permission group change. A permission group change might result
7466 // in multiple of these atoms
7467 optional int64 change_id = 1;
7468
7469 // UID of package the permission belongs to
7470 optional int32 uid = 2 [(is_uid) = true];
7471
7472 // Name of package the permission belongs to
7473 optional string package_name = 3;
7474
7475 // The permission to be granted
7476 optional string permission_name = 4;
7477
7478 // The result of the permission grant
7479 optional bool permission_granted = 5;
7480}
Stanislav Zholnin247d1b72019-06-06 21:28:44 +01007481
7482/**
7483* Information about results of permission upgrade by RuntimePermissionsUpgradeController
7484* Logged from: RuntimePermissionUpdgradeController
7485*/
7486message RuntimePermissionsUpgradeResult {
7487 // Permission granted as result of upgrade
7488 optional string permission_name = 1;
7489
7490 // UID of package granted permission
7491 optional int32 uid = 2 [(is_uid) = true];
7492
7493 // Name of package granted permission
7494 optional string package_name = 3;
Stanislav Zholninbdf620b2019-06-06 22:38:33 +01007495}
7496
7497/**
7498* Information about a buttons presented in GrantPermissionsActivty and choice made by user
7499*/
7500message GrantPermissionsActivityButtonActions {
7501 // Permission granted as result of upgrade
7502 optional string permission_group_name = 1;
7503
7504 // UID of package granted permission
7505 optional int32 uid = 2 [(is_uid) = true];
7506
7507 // Name of package requesting permission
7508 optional string package_name = 3;
7509
7510 // Buttons presented in the dialog - bit flags, bit numbers are in accordance with
7511 // LABEL_ constants in GrantPermissionActivity.java
7512 optional int32 buttons_presented = 4;
7513
7514 // Button clicked by user - same as bit flags in buttons_presented with only single bit set
7515 optional int32 button_clicked = 5;
7516}
Stanislav Zholnin375e2ab2019-05-29 13:07:35 +01007517
7518/**
7519 * Information about LocationAccessCheck notification presented to user
7520 */
7521message LocationAccessCheckNotificationAction {
7522
7523 // id which identifies single session of user interacting with permission controller
7524 optional int64 session_id = 1;
7525
7526 // Uid of package for which location access check is presented
7527 optional int32 package_uid = 2;
7528
7529 // Name of package for which location access check is presented
7530 optional string package_name = 3;
7531
7532 enum Result {
7533 UNDEFINED = 0;
7534 // notification was presented to the user
7535 NOTIFICATION_PRESENTED = 1;
7536 // notification was declined by the user
7537 NOTIFICATION_DECLINED = 2;
7538 // notification was clicked by the user
7539 NOTIFICATION_CLICKED = 3;
7540 }
7541
7542 // View / interaction recorded
7543 optional Result result = 4;
7544}
Stanislav Zholnin3e0f9bc2019-05-23 19:03:55 +01007545
7546/**
7547 * Information about a permission grant or revoke made by user inside AppPermissionFragment
7548 */
7549message AppPermissionFragmentActionReported {
7550 // id which identifies single session of user interacting with permission controller
7551 optional int64 session_id = 1;
7552
7553 // unique value identifying a permission group change. A permission group change might result
7554 // in multiple of these atoms
7555 optional int64 change_id = 2;
7556
7557 // UID of package the permission belongs to
7558 optional int32 uid = 3 [(is_uid) = true];
7559
7560 // Name of package the permission belongs to
7561 optional string package_name = 4;
7562
7563 // The permission to be granted
7564 optional string permission_name = 5;
7565
7566 // The result of the permission grant
7567 optional bool permission_granted = 6;
Stanislav Zholnin126da0c2020-01-28 16:50:43 +00007568
7569 // State of Permission Flags after grant as per android.content.pm.PermissionFlags
7570 optional int32 permission_flags = 7;
7571
7572 enum Button {
7573 UNDEFINED = 0;
7574 // Allow button
7575 ALLOW = 1;
7576 // Deny button
7577 DENY = 2;
7578 // Ask every time button
7579 ASK_EVERY_TIME = 3;
7580 // Allow all the time button
7581 ALLOW_ALWAYS = 4;
7582 // Allow only while using the app button
7583 ALLOW_FOREGROUND = 5;
7584 // Same is Deny button but shown in while in use dialog
7585 DENY_FOREGROUND = 6;
7586 }
7587
7588 // Button pressed in the dialog
7589 optional Button button_pressed = 8;
Stanislav Zholnin3e0f9bc2019-05-23 19:03:55 +01007590}
Stanislav Zholninc9dda9e2019-06-02 20:50:13 +01007591
7592/**
7593* Information about a AppPermissionFragment viewed by user
7594*/
7595message AppPermissionFragmentViewed {
7596 // id which identifies single session of user interacting with permission controller
7597 optional int64 session_id = 1;
7598
7599 // UID of package for which permissions are viewed
7600 optional int32 uid = 2 [(is_uid) = true];
7601
7602 // Name of package for which permissions are viewed
7603 optional string package_name = 3;
7604
7605 // Permission group viewed
7606 optional string permission_group_name = 4;
7607}
Stanislav Zholnindc3e2b32019-06-06 18:10:14 +01007608
7609/**
7610* Information about a AppPermissionsFragment viewed by user
7611*/
7612message AppPermissionsFragmentViewed {
7613 // id which identifies single session of user interacting with permission controller
7614 optional int64 session_id = 1;
7615
7616 // id which identifies single view as every view might have several logging records
7617 // with different package information attached
7618 optional int64 view_id = 2;
7619
7620 // Permission group viewed
7621 optional string permission_group_name = 3;
7622
7623 // UID of package for which permissions are viewed
7624 optional int32 uid = 4 [(is_uid) = true];
7625
7626 // Name of package for which permissions are viewed
7627 optional string package_name = 5;
7628
7629 // Category in which permission is included
7630 enum Category {
7631 UNDEFINED = 0;
7632 ALLOWED = 1;
7633 ALLOWED_FOREGROUND = 2;
7634 DENIED = 3;
7635 }
7636 optional Category category = 6;
7637}
Stanislav Zholnin32a89c12019-06-04 14:59:21 +01007638
7639/**
7640* Information about a PermissionAppsFragment viewed by user.
7641* Logged from ui/handheld/PermissionAppsFragment.java
7642*/
7643message PermissionAppsFragmentViewed {
7644 // id which identifies single session of user interacting with permission controller
7645 optional int64 session_id = 1;
7646
7647 // id which identifies single view as every view might have several logging records
7648 // with different package information attached
7649 optional int64 view_id = 2;
7650
7651 // Permission group viewed
7652 optional string permission_group_name = 3;
7653
7654 // UID of package for which permissions are viewed
7655 optional int32 uid = 4 [(is_uid) = true];
7656
7657 // Name of package for which permissions are viewed
7658 optional string package_name = 5;
7659
7660 // Category in which app is included
7661 enum Category {
7662 UNDEFINED = 0;
7663 ALLOWED = 1;
7664 ALLOWED_FOREGROUND = 2;
7665 DENIED = 3;
7666 }
7667 optional Category category = 6;
7668}
Tony Make2b1b672019-07-29 16:59:47 +01007669
7670/**
7671 * Logs when there is a smart selection related event.
7672 * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
7673 * Logged from: TextClassifierEventLogger.java
7674 */
7675message TextSelectionEvent {
7676 // A session ID.
7677 optional string session_id = 1;
7678
7679 // Event type of this event.
7680 optional android.stats.textclassifier.EventType event_type = 2;
7681
Tony Mak9c84bd22019-12-09 07:27:25 +00007682 // Name of the annotator model that is involved in this event.
Tony Make2b1b672019-07-29 16:59:47 +01007683 optional string model_name = 3;
7684
7685 // Type of widget that was involved in triggering this event.
7686 optional android.stats.textclassifier.WidgetType widget_type = 4;
7687
7688 // Index of this event in a session.
7689 optional int32 event_index = 5;
7690
7691 // Entity type that is involved.
7692 optional string entity_type = 6;
7693
7694 // Relative word index of the start of the selection.
7695 optional int32 relative_word_start_index = 7;
7696
7697 // Relative word (exclusive) index of the end of the selection.
7698 optional int32 relative_word_end_index = 8;
7699
7700 // Relative word index of the start of the smart selection.
7701 optional int32 relative_suggested_word_start_index = 9;
7702
7703 // Relative word (exclusive) index of the end of the smart selection.
7704 optional int32 relative_suggested_word_end_index = 10;
Tony Mak98b59f02019-08-07 11:50:58 +01007705
7706 // Name of source package.
7707 optional string package_name = 11;
Tony Make2b1b672019-07-29 16:59:47 +01007708}
7709
7710/**
7711 * Logs when there is a smart linkify related event.
7712 * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
7713 * Logged from: TextClassifierEventLogger.java
7714 */
7715message TextLinkifyEvent {
7716 // A session ID.
7717 optional string session_id = 1;
7718
7719 // Event type of this event.
7720 optional android.stats.textclassifier.EventType event_type = 2;
7721
Tony Mak9c84bd22019-12-09 07:27:25 +00007722 // Name of the annotator model that is involved in this event.
Tony Make2b1b672019-07-29 16:59:47 +01007723 optional string model_name = 3;
7724
7725 // Type of widget that was involved in triggering this event.
7726 optional android.stats.textclassifier.WidgetType widget_type = 4;
7727
7728 // Index of this event in a session.
7729 optional int32 event_index = 5;
7730
7731 // Entity type that is involved.
7732 optional string entity_type = 6;
7733
7734 // Number of links detected.
7735 optional int32 num_links = 7;
7736
7737 // The total length of all links.
7738 optional int32 linked_text_length = 8;
7739
7740 // Length of input text.
7741 optional int32 text_length = 9;
7742
7743 // Time spent on generating links in ms.
7744 optional int64 latency_millis = 10;
Tony Mak98b59f02019-08-07 11:50:58 +01007745
7746 // Name of source package.
7747 optional string package_name = 11;
Tony Make2b1b672019-07-29 16:59:47 +01007748}
7749
7750/**
7751 * Logs when there is a conversation actions related event.
7752 * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
7753 * Logged from: TextClassifierEventLogger.java
7754 */
7755message ConversationActionsEvent {
7756 // A session ID.
7757 optional string session_id = 1;
7758
7759 // Event type of this event.
7760 optional android.stats.textclassifier.EventType event_type = 2;
7761
Tony Mak9c84bd22019-12-09 07:27:25 +00007762 // Name of the actions model that is involved in this event.
Tony Make2b1b672019-07-29 16:59:47 +01007763 optional string model_name = 3;
7764
7765 // Type of widget that was involved in triggering this event.
7766 optional android.stats.textclassifier.WidgetType widget_type = 4;
7767
7768 // The first entity type that is involved.
7769 optional string first_entity_type = 5;
7770
7771 // The second entity type that is involved.
7772 optional string second_entity_type = 6;
7773
7774 // The third entity type that is involved.
7775 optional string third_entity_type = 7;
7776
7777 // The score of the first entity type.
7778 optional float score = 8;
Tony Mak98b59f02019-08-07 11:50:58 +01007779
7780 // Name of source package.
7781 optional string package_name = 9;
Tony Mak9c84bd22019-12-09 07:27:25 +00007782
7783 // Name of the annotator model that is involved in this event.
7784 optional string annotator_model_name = 10;
Tony Make2b1b672019-07-29 16:59:47 +01007785}
7786
7787/**
7788 * Logs when there is a language detection related event.
7789 * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
7790 * Logged from: TextClassifierEventLogger.java
7791 */
7792message LanguageDetectionEvent {
7793 // A session ID.
7794 optional string session_id = 1;
7795
7796 // Event type of this event.
7797 optional android.stats.textclassifier.EventType event_type = 2;
7798
Tony Mak9c84bd22019-12-09 07:27:25 +00007799 // Name of the language detection model that is involved in this event.
Tony Make2b1b672019-07-29 16:59:47 +01007800 optional string model_name = 3;
7801
7802 // Type of widget that was involved in triggering this event.
7803 optional android.stats.textclassifier.WidgetType widget_type = 4;
7804
7805 // Detected language.
7806 optional string language_tag = 5;
7807
7808 // Score of the detected language.
7809 optional float score = 6;
7810
7811 // Position of this action.
7812 optional int32 action_index = 7;
Tony Mak98b59f02019-08-07 11:50:58 +01007813
7814 // Name of source package.
7815 optional string package_name = 8;
Tony Make2b1b672019-07-29 16:59:47 +01007816}
Tianjie Xu167c3db2019-07-22 14:25:14 -07007817
7818/**
7819 * Information about an OTA update attempt by update_engine.
7820 * Logged from platform/system/update_engine/metrics_reporter_android.cc
7821 */
7822message UpdateEngineUpdateAttemptReported {
7823 // The number of attempts for the update engine to apply a given payload.
7824 optional int32 attempt_number = 1;
7825
7826 optional android.stats.otaupdate.PayloadType payload_type = 2;
7827
7828 // The total time in minutes for the update engine to apply a given payload.
7829 // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and
7830 // it's increased when the system is sleeping.
7831 optional int32 duration_boottime_in_minutes = 3;
7832
7833 // The total time in minutes for the update engine to apply a given payload.
7834 // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW;
7835 // and it's not increased when the system is sleeping.
7836 optional int32 duration_monotonic_in_minutes = 4;
7837
7838 // The size of the payload in MiBs.
7839 optional int32 payload_size_mib = 5;
7840
7841 // The attempt result reported by the update engine for an OTA update.
7842 optional android.stats.otaupdate.AttemptResult attempt_result = 6;
7843
7844 // The error code reported by the update engine after an OTA update attempt
7845 // on A/B devices.
7846 optional android.stats.otaupdate.ErrorCode error_code = 7;
7847
7848 // The build fingerprint of the source system. The value is read from a
7849 // system property when the device takes the update. e.g.
7850 // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys
7851 optional string source_fingerprint = 8;
7852}
7853
7854/**
7855 * Information about all the attempts the device make before finishing the
7856 * successful update.
7857 * Logged from platform/system/update_engine/metrics_reporter_android.cc
7858 */
7859message UpdateEngineSuccessfulUpdateReported {
7860 // The number of attempts for the update engine to apply the payload for a
7861 // successful update.
7862 optional int32 attempt_count = 1;
7863
7864 optional android.stats.otaupdate.PayloadType payload_type = 2;
7865
7866 optional int32 payload_size_mib = 3;
7867
7868 // The total number of bytes downloaded by update_engine since the last
7869 // successful update.
7870 optional int32 total_bytes_downloaded_mib = 4;
7871
7872 // The ratio in percentage of the over-downloaded bytes compared to the
7873 // total bytes needed to successfully install the update. e.g. 200 if we
7874 // download 200MiB in total for a 100MiB package.
7875 optional int32 download_overhead_percentage = 5;
7876
7877 // The total time in minutes for the update engine to apply the payload for a
7878 // successful update.
7879 optional int32 total_duration_minutes = 6;
7880
7881 // The number of reboot of the device during a successful update.
7882 optional int32 reboot_count = 7;
7883}
Alec Mourie088e762019-07-02 13:10:55 -07007884
7885/**
Kenny Root4eacaaa2020-01-08 20:48:13 -08007886 * Reported when the RebootEscrow HAL has attempted to recover the escrowed
7887 * key to indicate whether it was successful or not.
7888 *
7889 * Logged from:
7890 * frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java
7891 */
7892message RebootEscrowRecoveryReported {
7893 optional bool successful = 1;
7894}
7895
7896/**
Alec Mourie088e762019-07-02 13:10:55 -07007897 * Global display pipeline metrics reported by SurfaceFlinger.
7898 * Pulled from:
7899 * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp
7900 */
7901message SurfaceflingerStatsGlobalInfo {
7902 // Total number of frames presented during the tracing period
7903 optional int64 total_frames = 1;
7904 // Total number of frames missed
7905 optional int64 missed_frames = 2;
7906 // Total number of frames that fell back to client composition
7907 optional int64 client_composition_frames = 3;
7908 // Total time the display was turned on
7909 optional int64 display_on_millis = 4;
7910 // Total time that was spent performing animations.
7911 // This is derived from the present-to-present layer histogram
7912 optional int64 animation_millis = 5;
7913}
7914
7915/**
7916 * Per-layer display pipeline metrics reported by SurfaceFlinger.
7917 * The number of layers uploaded will be restricted due to size limitations.
7918 * Pulled from:
7919 * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp
7920 */
7921message SurfaceflingerStatsLayerInfo {
7922 // The layer for this set of metrics
7923 // For now we can infer that the package name is included in the layer
7924 // name.
7925 optional string layer_name = 1;
7926 // Total number of frames presented
7927 optional int64 total_frames = 2;
7928 // Total number of dropped frames while latching a buffer for this layer.
7929 optional int64 dropped_frames = 3;
7930 // Set of timings measured between successive presentation timestamps.
7931 optional FrameTimingHistogram present_to_present = 4
7932 [(android.os.statsd.log_mode) = MODE_BYTES];
7933 // Set of timings measured from when an app queued a buffer for
7934 // presentation, until the buffer was actually presented to the
7935 // display.
7936 optional FrameTimingHistogram post_to_present = 5
7937 [(android.os.statsd.log_mode) = MODE_BYTES];
7938 // Set of timings measured from when a buffer is ready to be presented,
7939 // until the buffer was actually presented to the display.
7940 optional FrameTimingHistogram acquire_to_present = 6
7941 [(android.os.statsd.log_mode) = MODE_BYTES];
7942 // Set of timings measured from when a buffer was latched by
7943 // SurfaceFlinger, until the buffer was presented to the display
7944 optional FrameTimingHistogram latch_to_present = 7
7945 [(android.os.statsd.log_mode) = MODE_BYTES];
7946 // Set of timings measured from the desired presentation to the actual
7947 // presentation time
7948 optional FrameTimingHistogram desired_to_present = 8
7949 [(android.os.statsd.log_mode) = MODE_BYTES];
7950 // Set of timings measured from when an app queued a buffer for
7951 // presentation, until the buffer was ready to be presented.
7952 optional FrameTimingHistogram post_to_acquire = 9
7953 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhang59cdc9012020-02-10 10:58:39 -08007954 // Frames missed latch because the acquire fence didn't fire
7955 optional int64 late_acquire_frames = 10;
7956 // Frames latched early because the desired present time was bad
7957 optional int64 bad_desired_present_frames = 11;
Alec Mourie088e762019-07-02 13:10:55 -07007958}
7959
7960/**
7961 * Histogram of frame counts bucketed by time in milliseconds.
7962 * Because of size limitations, we hard-cap the number of buckets, with
7963 * buckets for corresponding to larger milliseconds being less precise.
7964 */
7965message FrameTimingHistogram {
7966 // Timings in milliseconds that describes a set of histogram buckets
7967 repeated int32 time_millis_buckets = 1;
7968 // Number of frames that match to each time_millis, i.e. the bucket
7969 // contents
7970 // It's required that len(time_millis) == len(frame_count)
7971 repeated int64 frame_counts = 2;
7972}
Emilian Peev6729f372019-08-29 09:14:09 -07007973
Emilian Peev6729f372019-08-29 09:14:09 -07007974/**
7975 * Information about camera facing and API level usage.
7976 * Logged from:
7977 * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java
7978 */
7979message CameraActionEvent {
7980 // Camera session duration
7981 optional int64 duration = 1;
7982
7983 // Camera API level used
7984 optional int32 api_level = 2;
7985
7986 // Name of client package
7987 optional string package_name = 3;
7988
7989 // Camera facing
7990 enum Facing {
7991 UNKNOWN = 0;
7992 BACK = 1;
7993 FRONT = 2;
7994 EXTERNAL = 3;
7995 }
7996 optional Facing facing = 4;
7997}
atrost01a20932019-08-28 15:40:37 +01007998
7999/**
8000 * Logs when a compatibility change is affecting an app.
8001 *
8002 * Logged from:
8003 * frameworks/base/core/java/android/app/AppCompatCallbacks.java and
8004 * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java
8005 */
8006message AppCompatibilityChangeReported {
8007 // The UID of the app being affected by the compatibilty change.
8008 optional int32 uid = 1 [(is_uid) = true];
8009
8010 // The ID of the change affecting the app.
8011 optional int64 change_id = 2;
8012
8013 enum State {
8014 UNKNOWN_STATE = 0;
8015 ENABLED = 1;
8016 DISABLED = 2;
8017 LOGGED = 3;
8018 }
8019
8020 // The state of the change - if logged from gating whether it was enabled or disabled, or just
8021 // logged otherwise.
8022 optional State state = 3;
8023
8024 enum Source {
8025 UNKNOWN_SOURCE = 0;
8026 APP_PROCESS = 1;
8027 SYSTEM_SERVER = 2;
8028 }
8029
8030 // Where it was logged from.
8031 optional Source source = 4;
8032
8033}
Hector Dearman40579f62019-11-01 13:19:30 +00008034
8035/**
8036 * Logged from
8037 * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc
8038 */
8039message PerfettoUploaded {
8040 enum Event {
8041 PERFETTO_UNDEFINED = 0;
8042 PERFETTO_TRACE_BEGIN = 1;
8043 PERFETTO_BACKGROUND_TRACE_BEGIN = 2;
8044 PERFETTO_ON_CONNECT = 3;
8045 PERFETTO_ON_TRACING_DISABLED = 4;
8046 PERFETTO_UPLOAD_DROPBOX_BEGIN = 5;
8047 PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6;
8048 PERFETTO_UPLOAD_DROPBOX_FAILURE = 7;
8049 PERFETTO_UPLOAD_INCIDENT_BEGIN = 8;
8050 PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9;
8051 PERFETTO_UPLOAD_INCIDENT_FAILURE = 10;
8052 PERFETTO_FINALIZE_TRACE_AND_EXIT = 11;
8053 PERFETTO_TRIGGER_BEGIN = 12;
8054 PERFETTO_TRIGGER_SUCCESS = 13;
8055 PERFETTO_TRIGGER_FAILURE = 14;
8056 PERFETTO_HIT_GUARDRAILS = 15;
8057 PERFETTO_ON_TIMEOUT = 16;
8058 PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17;
8059 }
8060
8061 // Which stage of the pipeline we are reporting from.
8062 optional Event event = 1;
8063
8064 // UUID matching the one set inside the SystemInfo trace packet.
8065 optional int64 trace_uuid_lsb = 2;
8066 optional int64 trace_uuid_msb = 3;
8067}
Mark Tabrya824a642019-11-05 12:26:12 -08008068
8069/**
8070 * Pulls client metrics on data transferred via Vehicle Maps Service.
8071 * Metrics are keyed by uid + layer.
8072 *
8073 * Pulled from:
8074 * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java
8075 */
8076message VmsClientStats {
8077 // UID of the VMS client app
8078 optional int32 uid = 1 [(is_uid) = true];
8079
8080 // VMS layer definition
8081 optional int32 layer_type = 2;
8082 optional int32 layer_channel = 3;
8083 optional int32 layer_version = 4;
8084
8085 // Bytes and packets sent by the client for the layer
8086 optional int64 tx_bytes = 5;
8087 optional int64 tx_packets = 6;
8088
8089 // Bytes and packets received by the client for the layer
8090 optional int64 rx_bytes = 7;
8091 optional int64 rx_packets = 8;
8092
8093 // Bytes and packets dropped due to client error
8094 optional int64 dropped_bytes = 9;
8095 optional int64 dropped_packets = 10;
8096}
Stanislav Zholninccb82e42019-11-29 18:59:49 +00008097
8098/**
8099 * State of a dangerous permission requested by a package - sampled
8100 * Pulled from: StatsCompanionService.java with data obtained from PackageManager API
8101*/
8102message DangerousPermissionStateSampled {
8103 // Name of the permission
8104 optional string permission_name = 1;
8105
8106 // Uid of the package
8107 optional int32 uid = 2 [(is_uid) = true];
8108
8109 // If the permission is granted to the uid
8110 optional bool is_granted = 3;
8111
8112 // Permission flags as per android.content.pm.PermissionFlags
8113 optional int32 permission_flags = 4;
8114}
8115
Stan Iliev637ba5e2019-08-16 13:43:08 -04008116/**
8117 * HWUI renders pipeline type: GL (0) or Vulkan (1).
8118 */
8119enum PipelineType {
8120 GL = 0;
8121 VULKAN = 1;
8122}
8123
8124/**
8125 * HWUI stats for a given app.
8126 */
8127message GraphicsStats {
8128 // The package name of the app
8129 optional string package_name = 1;
8130
8131 // The version code of the app
8132 optional int64 version_code = 2;
8133
8134 // The start & end timestamps in UTC as
8135 // milliseconds since January 1, 1970
8136 // Compatible with java.util.Date#setTime()
8137 optional int64 stats_start = 3;
8138
8139 optional int64 stats_end = 4;
8140
8141 // HWUI renders pipeline type: GL or Vulkan.
8142 optional PipelineType pipeline = 5;
8143
8144 // Distinct frame count.
8145 optional int32 total_frames = 6;
8146
8147 // Number of "missed vsync" events.
8148 optional int32 missed_vsync_count = 7;
8149
8150 // Number of frames in triple-buffering scenario (high input latency)
8151 optional int32 high_input_latency_count = 8;
8152
8153 // Number of "slow UI thread" events.
8154 optional int32 slow_ui_thread_count = 9;
8155
8156 // Number of "slow bitmap upload" events.
8157 optional int32 slow_bitmap_upload_count = 10;
8158
8159 // Number of "slow draw" events.
8160 optional int32 slow_draw_count = 11;
8161
8162 // Number of frames that missed their deadline (aka, visibly janked)
8163 optional int32 missed_deadline_count = 12;
8164
8165 // The frame time histogram for the package
8166 optional FrameTimingHistogram cpu_histogram = 13
8167 [(android.os.statsd.log_mode) = MODE_BYTES];
8168
8169 // The gpu frame time histogram for the package
8170 optional FrameTimingHistogram gpu_histogram = 14
8171 [(android.os.statsd.log_mode) = MODE_BYTES];
8172
8173 // UI mainline module version.
8174 optional int64 version_ui_module = 15;
8175
8176 // If true, these are HWUI stats for up to a 24h period for a given app from today.
8177 // If false, these are HWUI stats for a 24h period for a given app from the last complete
8178 // day (yesterday). Stats from yesterday stay constant, while stats from today may change as
8179 // more apps are running / rendering.
8180 optional bool is_today = 16;
8181}
Stanislav Zholnin606454c2019-11-27 15:31:49 +00008182
8183/**
8184 * Message related to dangerous (runtime) app ops access
8185 */
Stanislav Zholnin88c6f322020-01-29 14:48:11 +00008186message RuntimeAppOpAccess {
Stanislav Zholnin606454c2019-11-27 15:31:49 +00008187 // Uid of the package accessing app op
8188 optional int32 uid = 1 [(is_uid) = true];
8189
8190 // Name of the package accessing app op
8191 optional string package_name = 2;
8192
Stanislav Zholnin88c6f322020-01-29 14:48:11 +00008193 // operation string id per OPSTR_ constants in AppOpsManager.java
8194 optional string op = 3;
Stanislav Zholnin606454c2019-11-27 15:31:49 +00008195
8196 // feature id; provided by developer when accessing related API, limited at 50 chars by API.
8197 // Features must be provided through manifest using <feature> tag available in R and above.
8198 optional string feature_id = 4;
8199
8200 // message related to app op access, limited to 600 chars by API
8201 optional string message = 5;
8202
8203 enum SamplingStrategy {
8204 DEFAULT = 0;
8205 UNIFORM = 1;
8206 RARELY_USED = 2;
8207 }
8208
8209 // sampling strategy used to collect this message
8210 optional SamplingStrategy sampling_strategy = 6;
8211}
8212
Nikita Ioffe41dd57e2020-01-10 16:05:08 +00008213/*
8214 * Logs userspace reboot outcome and duration.
8215 *
8216 * Logged from:
8217 * frameworks/base/core/java/com/android/server/BootReceiver.java
8218 */
8219message UserspaceRebootReported {
8220 // Possible outcomes of userspace reboot.
8221 enum Outcome {
8222 // Default value in case platform failed to determine the outcome.
8223 OUTCOME_UNKNOWN = 0;
8224 // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot).
8225 SUCCESS = 1;
8226 // Userspace reboot shutdown sequence was aborted.
8227 FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2;
8228 // Remounting userdata into checkpointing mode failed.
8229 FAILED_USERDATA_REMOUNT = 3;
8230 // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard
8231 // reboot.
8232 FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4;
8233 }
8234 // Outcome of userspace reboot. Always set.
8235 optional Outcome outcome = 1;
8236 // Duration of userspace reboot in case it has a successful outcome.
8237 // Duration is measured as time between userspace reboot was initiated and until boot completed
8238 // (e.g. sys.boot_completed=1).
8239 optional int64 duration_millis = 2;
8240 // State of primary user's (user0) credential encryption storage.
8241 enum UserEncryptionState {
8242 // Default value.
8243 USER_ENCRYPTION_STATE_UNKNOWN = 0;
8244 // Credential encrypted storage is unlocked.
8245 UNLOCKED = 1;
8246 // Credential encrypted storage is locked.
8247 LOCKED = 2;
8248 }
8249 // State of primary user's encryption storage at the moment boot completed. Always set.
8250 optional UserEncryptionState user_encryption_state = 3;
8251}
Omer Nebil Yaveroglu06b969a2020-01-23 11:10:38 +00008252
8253/*
8254 * Logs integrity check information during each install.
8255 *
8256 * Logged from:
8257 * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
8258 */
8259message IntegrityCheckResultReported {
8260 optional string package_name = 1;
8261 optional string app_certificate_hash = 2;
Omer Nebil Yaveroglu0ade8542020-01-24 12:47:46 +00008262 optional int64 version_code = 3;
Omer Nebil Yaveroglu06b969a2020-01-23 11:10:38 +00008263 optional string installer_package_name = 4;
8264 enum Response {
8265 UNKNOWN = 0;
8266 ALLOWED = 1;
8267 REJECTED = 2;
8268 FORCE_ALLOWED = 3;
8269 }
8270 optional Response response = 5;
8271 // An estimate on the cause of the response. This will only be populated for
8272 // REJECTED and FORCE_ALLOWED
8273 optional bool caused_by_app_cert_rule = 6;
8274 optional bool caused_by_installer_rule = 7;
8275}
8276
8277/**
8278 * Logs the information about the rules and the provider whenever rules are
8279 * pushed into AppIntegrityManager.
8280 *
8281 * Logged from:
8282 * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
8283 */
8284message IntegrityRulesPushed {
8285 optional bool success = 1;
8286 // Package name of the app that pushed the rules.
8287 optional string rule_provider = 2;
8288 // Version string of arbitrary format provided by the rule provider to
8289 // identify the rules.
8290 optional string rule_version = 3;
8291}
Jordan Liubedfa702019-12-20 15:08:45 -08008292
8293/**
8294 * Logs when a cell broadcast message is received on the device.
8295 *
8296 * Logged from CellBroadcastService module:
8297 * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
8298 */
8299message CellBroadcastMessageReported {
8300 // The type of Cell Broadcast message
8301 enum CbType {
8302 UNKNOWN_TYPE = 0;
8303 GSM = 1;
8304 CDMA = 2;
8305 CDMA_SPC = 3;
8306 }
8307
8308 // GSM, CDMA, CDMA-SCP
8309 optional CbType type = 1;
8310}
8311
8312/**
8313 * Logs when an error occurs while handling a cell broadcast message;
8314 *
8315 * Logged from CellBroadcastService module:
8316 * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
8317 */
8318message CellBroadcastMessageError {
8319 // The type of error raised when trying to handle a cell broadcast message
8320 enum ErrorType {
8321 UNKNOWN_TYPE = 0;
8322 CDMA_DECODING_ERROR = 1;
8323 CDMA_SCP_EMPTY = 2;
8324 CDMA_SCP_HANDLING_ERROR = 3;
8325 GSM_INVALID_HEADER_LENGTH = 4;
8326 GSM_UNSUPPORTED_HEADER_MESSAGE_TYPE = 5;
8327 GSM_UNSUPPORTED_HEADER_DATA_CODING_SCHEME = 6;
8328 GSM_INVALID_PDU = 7;
8329 GSM_INVALID_GEO_FENCING_DATA = 8;
8330 GSM_UMTS_INVALID_WAC = 9;
8331 FAILED_TO_INSERT_TO_DB = 10;
8332 UNEXPECTED_GEOMETRY_FROM_FWK = 11;
8333 UNEXPECTED_GSM_MESSAGE_TYPE_FROM_FWK = 12;
8334 UNEXPECTED_CDMA_MESSAGE_TYPE_FROM_FWK = 13;
8335 UNEXPECTED_CDMA_SCP_MESSAGE_TYPE_FROM_FWK = 14;
8336 }
8337
8338 // What kind of error occurred
8339 optional ErrorType type = 1;
8340
8341 // Exception message (or log message) associated with the error (max 1000 chars)
8342 optional string exception_message = 2;
8343}