Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | syntax = "proto2"; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 18 | |
| 19 | package android.os.statsd; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 20 | option java_package = "com.android.os"; |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 21 | option java_outer_classname = "AtomsProto"; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 22 | |
Yao Chen | 9c1debe | 2018-02-19 14:39:19 -0800 | [diff] [blame] | 23 | import "frameworks/base/cmds/statsd/src/atom_field_options.proto"; |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 24 | import "frameworks/base/core/proto/android/app/enums.proto"; |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 25 | import "frameworks/base/core/proto/android/app/job/enums.proto"; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 26 | import "frameworks/base/core/proto/android/app/settings_enums.proto"; |
Zhen Sun | 0bec8d4 | 2020-03-25 17:17:29 -0700 | [diff] [blame] | 27 | import "frameworks/base/core/proto/android/app/tvsettings_enums.proto"; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 28 | import "frameworks/base/core/proto/android/bluetooth/a2dp/enums.proto"; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 29 | import "frameworks/base/core/proto/android/bluetooth/enums.proto"; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 30 | import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto"; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 31 | import "frameworks/base/core/proto/android/bluetooth/hfp/enums.proto"; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 32 | import "frameworks/base/core/proto/android/bluetooth/smp/enums.proto"; |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 33 | import "frameworks/base/core/proto/android/debug/enums.proto"; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 34 | import "frameworks/base/core/proto/android/hardware/biometrics/enums.proto"; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 35 | import "frameworks/base/core/proto/android/hardware/sensor/assist/enums.proto"; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 36 | import "frameworks/base/core/proto/android/net/networkcapabilities.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 37 | import "frameworks/base/core/proto/android/os/enums.proto"; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 38 | import "frameworks/base/core/proto/android/server/connectivity/data_stall_event.proto"; |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 39 | import "frameworks/base/core/proto/android/server/enums.proto"; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 40 | import "frameworks/base/core/proto/android/server/job/enums.proto"; |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 41 | import "frameworks/base/core/proto/android/server/location/enums.proto"; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 42 | import "frameworks/base/core/proto/android/service/procstats_enum.proto"; |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 43 | import "frameworks/base/core/proto/android/service/usb.proto"; |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 44 | import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto"; |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 45 | import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 46 | import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto"; |
| 47 | import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto"; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 48 | import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto"; |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 49 | import "frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto"; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 50 | import "frameworks/base/core/proto/android/stats/enums.proto"; |
| 51 | import "frameworks/base/core/proto/android/stats/intelligence/enums.proto"; |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 52 | import "frameworks/base/core/proto/android/stats/launcher/launcher.proto"; |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 53 | import "frameworks/base/core/proto/android/stats/location/location_enums.proto"; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 54 | import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto"; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 55 | import "frameworks/base/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto"; |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 56 | import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto"; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 57 | import "frameworks/base/core/proto/android/stats/style/style_enums.proto"; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 58 | import "frameworks/base/core/proto/android/stats/sysui/notification_enums.proto"; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 59 | import "frameworks/base/core/proto/android/telecomm/enums.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 60 | import "frameworks/base/core/proto/android/telephony/enums.proto"; |
| 61 | import "frameworks/base/core/proto/android/view/enums.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 62 | import "frameworks/base/core/proto/android/wifi/enums.proto"; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 63 | import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto"; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 64 | import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto"; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 65 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 66 | /** |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 67 | * The master atom class. This message defines all of the available |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 68 | * raw stats log events from the Android system, also known as "atoms." |
| 69 | * |
| 70 | * This field contains a single oneof with all of the available messages. |
| 71 | * The stats-log-api-gen tool runs as part of the Android build and |
| 72 | * generates the android.util.StatsLog class, which contains the constants |
| 73 | * and methods that Android uses to log. |
| 74 | * |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 75 | * This Atom class is not actually built into the Android system. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 76 | * Instead, statsd on Android constructs these messages synthetically, |
| 77 | * in the format defined here and in stats_log.proto. |
| 78 | */ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 79 | message Atom { |
| 80 | // Pushed atoms start at 2. |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 81 | oneof pushed { |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 82 | // For StatsLog reasons, 1 is illegal and will not work. Must start at 2. |
tsaichristine | a3d2ed8 | 2020-03-19 20:53:36 -0700 | [diff] [blame] | 83 | BleScanStateChanged ble_scan_state_changed = 2 |
| 84 | [(module) = "bluetooth", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 85 | ProcessStateChanged process_state_changed = 3 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 86 | BleScanResultReceived ble_scan_result_received = 4 [(module) = "bluetooth"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 87 | SensorStateChanged sensor_state_changed = |
| 88 | 5 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 89 | GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 90 | SyncStateChanged sync_state_changed = 7 [(module) = "framework", (module) = "statsdtest"]; |
| 91 | ScheduledJobStateChanged scheduled_job_state_changed = |
| 92 | 8 [(module) = "framework", (module) = "statsdtest"]; |
| 93 | ScreenBrightnessChanged screen_brightness_changed = |
| 94 | 9 [(module) = "framework", (module) = "statsdtest"]; |
| 95 | WakelockStateChanged wakelock_state_changed = |
| 96 | 10 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 97 | LongPartialWakelockStateChanged long_partial_wakelock_state_changed = |
| 98 | 11 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 99 | MobileRadioPowerStateChanged mobile_radio_power_state_changed = |
| 100 | 12 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 101 | WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(module) = "framework"]; |
| 102 | ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = |
| 103 | 14 [(module) = "framework"]; |
| 104 | MemoryFactorStateChanged memory_factor_state_changed = 15 [(module) = "framework"]; |
| 105 | ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16 [(module) = "framework"]; |
| 106 | CachedKillReported cached_kill_reported = 17 [(module) = "framework"]; |
| 107 | ProcessMemoryStatReported process_memory_stat_reported = 18 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 108 | LauncherUIChanged launcher_event = 19 [(module) = "sysui"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 109 | BatterySaverModeStateChanged battery_saver_mode_state_changed = |
| 110 | 20 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 111 | DeviceIdleModeStateChanged device_idle_mode_state_changed = 21 [(module) = "framework"]; |
| 112 | DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 113 | AudioStateChanged audio_state_changed = |
| 114 | 23 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 115 | MediaCodecStateChanged media_codec_state_changed = 24 [(module) = "framework"]; |
| 116 | CameraStateChanged camera_state_changed = 25 [(module) = "framework"]; |
| 117 | FlashlightStateChanged flashlight_state_changed = 26 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 118 | UidProcessStateChanged uid_process_state_changed = |
| 119 | 27 [(module) = "framework", (module) = "statsdtest"]; |
| 120 | ProcessLifeCycleStateChanged process_life_cycle_state_changed = |
| 121 | 28 [(module) = "framework", (module) = "statsdtest"]; |
| 122 | ScreenStateChanged screen_state_changed = |
| 123 | 29 [(module) = "framework", (module) = "statsdtest"]; |
| 124 | BatteryLevelChanged battery_level_changed = |
| 125 | 30 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 126 | ChargingStateChanged charging_state_changed = 31 [(module) = "framework"]; |
tsaichristine | 1449fa4 | 2020-01-02 12:12:05 -0800 | [diff] [blame] | 127 | PluggedStateChanged plugged_state_changed = 32 |
| 128 | [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 129 | InteractiveStateChanged interactive_state_changed = 33 [(module) = "framework"]; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 130 | TouchEventReported touch_event_reported = 34; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 131 | WakeupAlarmOccurred wakeup_alarm_occurred = 35 [(module) = "framework"]; |
| 132 | KernelWakeupReported kernel_wakeup_reported = 36 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 133 | WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"]; |
| 134 | WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"]; |
| 135 | WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 136 | PhoneSignalStrengthChanged phone_signal_strength_changed = |
| 137 | 40 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 138 | SettingChanged setting_changed = 41 [(module) = "framework"]; |
| 139 | ActivityForegroundStateChanged activity_foreground_state_changed = |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 140 | 42 [(module) = "framework", (module) = "statsdtest"]; |
| 141 | IsolatedUidChanged isolated_uid_changed = |
| 142 | 43 [(module) = "framework", (module) = "statsd", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 143 | PacketWakeupOccurred packet_wakeup_occurred = 44 [(module) = "framework"]; |
| 144 | WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 145 | AnomalyDetected anomaly_detected = 46 [(module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 146 | AppBreadcrumbReported app_breadcrumb_reported = |
Muhammad Qureshi | cefc882 | 2020-02-09 11:46:23 -0800 | [diff] [blame] | 147 | 47 [(allow_from_any_uid) = true, (module) = "statsd"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 148 | AppStartOccurred app_start_occurred = 48 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 149 | AppStartCanceled app_start_canceled = 49 [(module) = "framework"]; |
| 150 | AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"]; |
Muhammad Qureshi | 79f068c | 2019-12-20 06:55:57 -0800 | [diff] [blame] | 151 | LmkKillOccurred lmk_kill_occurred = 51 [(module) = "lmkd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 152 | PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 153 | WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"]; |
Muhammad Qureshi | 79f068c | 2019-12-20 06:55:57 -0800 | [diff] [blame] | 154 | LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 155 | AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"]; |
| 156 | ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"]; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 157 | BootSequenceReported boot_sequence_reported = 57; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 158 | DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true, (module) = "statsd"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 159 | OverlayStateChanged overlay_state_changed = |
| 160 | 59 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 161 | ForegroundServiceStateChanged foreground_service_state_changed |
| 162 | = 60 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 163 | CallStateChanged call_state_changed = |
| 164 | 61 [(module) = "telecom", (truncate_timestamp) = true]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 165 | KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"]; |
| 166 | KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"]; |
| 167 | KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 168 | AppDied app_died = 65 [(module) = "framework"]; |
| 169 | ResourceConfigurationChanged resource_configuration_changed = 66 [(module) = "framework"]; |
| 170 | BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 171 | BluetoothConnectionStateChanged bluetooth_connection_state_changed = |
| 172 | 68 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 173 | GpsSignalQualityChanged gps_signal_quality_changed = 69 [(module) = "framework"]; |
| 174 | UsbConnectorStateChanged usb_connector_state_changed = 70 [(module) = "framework"]; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 175 | SpeakerImpedanceReported speaker_impedance_reported = 71; |
| 176 | HardwareFailed hardware_failed = 72; |
| 177 | PhysicalDropDetected physical_drop_detected = 73; |
| 178 | ChargeCyclesReported charge_cycles_reported = 74; |
Muhammad Qureshi | a4efed8 | 2020-01-23 13:53:51 -0800 | [diff] [blame] | 179 | MobileConnectionStateChanged mobile_connection_state_changed = 75 [(module) = "telephony"]; |
| 180 | MobileRadioTechnologyChanged mobile_radio_technology_changed = 76 [(module) = "telephony"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 181 | UsbDeviceAttached usb_device_attached = 77 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 182 | AppCrashOccurred app_crash_occurred = 78 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 183 | ANROccurred anr_occurred = 79 [(module) = "framework"]; |
| 184 | WTFOccurred wtf_occurred = 80 [(module) = "framework"]; |
| 185 | LowMemReported low_mem_reported = 81 [(module) = "framework"]; |
Howard Ro | cb767f6 | 2018-06-19 19:58:05 -0700 | [diff] [blame] | 186 | GenericAtom generic_atom = 82; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 187 | KeyValuePairsAtom key_value_pairs_atom = |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 188 | 83 [(allow_from_any_uid) = true, (module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 189 | VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"]; |
| 190 | DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"]; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 191 | ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 192 | BiometricAcquired biometric_acquired = 87 [(module) = "framework"]; |
| 193 | BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"]; |
| 194 | BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"]; |
| 195 | UiEventReported ui_event_reported = 90 [(module) = "framework"]; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 196 | BatteryHealthSnapshot battery_health_snapshot = 91; |
| 197 | SlowIo slow_io = 92; |
| 198 | BatteryCausedShutdown battery_caused_shutdown = 93; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 199 | PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"]; |
| 200 | PhoneStateChanged phone_state_changed = 95 [(module) = "framework"]; |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 201 | UserRestrictionChanged user_restriction_changed = 96; |
Muhammad Qureshi | 9afad81 | 2020-01-23 15:04:59 -0800 | [diff] [blame] | 202 | SettingsUIChanged settings_ui_changed = 97 [(module) = "settings"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 203 | ConnectivityStateChanged connectivity_state_changed = 98 [(module) = "framework"]; |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 204 | // TODO: service state change is very noisy shortly after boot, as well |
| 205 | // as at other transitions - coming out of doze, device plugged in, etc. |
| 206 | // Consider removing this if it becomes a problem |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 207 | ServiceStateChanged service_state_changed = 99 [(module) = "framework"]; |
| 208 | ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"]; |
| 209 | FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"]; |
Muhammad Qureshi | cefc882 | 2020-02-09 11:46:23 -0800 | [diff] [blame] | 210 | BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 211 | DevicePolicyEvent device_policy_event = 103 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 212 | DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"]; |
| 213 | DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported = |
| 214 | 105 [(module) = "docsui"]; |
| 215 | DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"]; |
| 216 | DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"]; |
| 217 | DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request = |
| 218 | 108 [(module) = "docsui"]; |
| 219 | DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"]; |
| 220 | DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"]; |
| 221 | DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"]; |
| 222 | DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 223 | WifiEnabledStateChanged wifi_enabled_state_changed = 113 [(module) = "framework"]; |
tsaichristine | cecebdc | 2020-02-04 14:05:56 -0800 | [diff] [blame] | 224 | WifiRunningStateChanged wifi_running_state_changed = 114 |
| 225 | [(module) = "framework", deprecated = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 226 | AppCompacted app_compacted = 115 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 227 | NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"]; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 228 | DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 229 | 117 [(module) = "docsui"]; |
| 230 | DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"]; |
| 231 | DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"]; |
| 232 | DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"]; |
| 233 | DataStallEvent data_stall_event = 121 [(module) = "network_stack"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 234 | RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"]; |
| 235 | SignedConfigReported signed_config_reported = 123 [(module) = "framework"]; |
| 236 | GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 237 | BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = |
| 238 | 125 [(module) = "bluetooth"]; |
| 239 | BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = |
| 240 | 126 [(module) = "bluetooth"]; |
| 241 | BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = |
| 242 | 127 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 243 | AppDowngraded app_downgraded = 128 [(module) = "framework"]; |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 244 | AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 245 | LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"]; |
| 246 | GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"]; |
| 247 | GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"]; |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 248 | UsbPortOverheatEvent usb_port_overheat_event_reported = 133; |
Muhammad Qureshi | f9a5ab0 | 2020-01-25 19:43:27 -0800 | [diff] [blame] | 249 | NfcErrorOccurred nfc_error_occurred = 134 [(module) = "nfc"]; |
| 250 | NfcStateChanged nfc_state_changed = 135 [(module) = "nfc"]; |
| 251 | NfcBeamOccurred nfc_beam_occurred = 136 [(module) = "nfc"]; |
| 252 | NfcCardemulationOccurred nfc_cardemulation_occurred = 137 [(module) = "nfc"]; |
| 253 | NfcTagOccurred nfc_tag_occurred = 138 [(module) = "nfc"]; |
| 254 | NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139 [(module) = "nfc"]; |
Muhammad Qureshi | 70dfeb4 | 2020-01-24 20:11:44 -0800 | [diff] [blame] | 255 | SeStateChanged se_state_changed = 140 [(module) = "secure_element"]; |
| 256 | SeOmapiReported se_omapi_reported = 141 [(module) = "secure_element"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 257 | BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = |
| 258 | 142 [(module) = "framework"]; |
| 259 | AttentionManagerServiceResultReported attention_manager_service_result_reported = |
| 260 | 143 [(module) = "framework"]; |
| 261 | AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"]; |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 262 | SpeechDspStatReported speech_dsp_stat_reported = 145; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 263 | UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 264 | WatchdogRollbackOccurred watchdog_rollback_occurred = |
| 265 | 147 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 266 | BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = |
| 267 | 148 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 268 | BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 269 | ScheduledJobConstraintChanged scheduled_job_constraint_changed = |
| 270 | 150 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 271 | BluetoothActiveDeviceChanged bluetooth_active_device_changed = |
| 272 | 151 [(module) = "bluetooth"]; |
| 273 | BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = |
| 274 | 152 [(module) = "bluetooth"]; |
| 275 | BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = |
| 276 | 153 [(module) = "bluetooth"]; |
| 277 | BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = |
| 278 | 154 [(module) = "bluetooth"]; |
| 279 | BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = |
| 280 | 155 [(module) = "bluetooth"]; |
| 281 | BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = |
| 282 | 156 [(module) = "bluetooth"]; |
| 283 | BluetoothDeviceRssiReported bluetooth_device_rssi_reported = |
| 284 | 157 [(module) = "bluetooth"]; |
| 285 | BluetoothDeviceFailedContactCounterReported |
| 286 | bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"]; |
| 287 | BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = |
| 288 | 159 [(module) = "bluetooth"]; |
| 289 | BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = |
| 290 | 160 [(module) = "bluetooth"]; |
| 291 | BluetoothQualityReportReported bluetooth_quality_report_reported = |
| 292 | 161 [(module) = "bluetooth"]; |
| 293 | BluetoothDeviceInfoReported bluetooth_device_info_reported = |
| 294 | 162 [(module) = "bluetooth"]; |
| 295 | BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = |
| 296 | 163 [(module) = "bluetooth"]; |
| 297 | BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = |
| 298 | 164 [(module) = "bluetooth"]; |
| 299 | BluetoothBondStateChanged bluetooth_bond_state_changed = |
| 300 | 165 [(module) = "bluetooth"]; |
| 301 | BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = |
| 302 | 166 [(module) = "bluetooth"]; |
| 303 | BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = |
| 304 | 167 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 305 | ScreenTimeoutExtensionReported screen_timeout_extension_reported = |
| 306 | 168 [(module) = "framework"]; |
| 307 | ProcessStartTime process_start_time = 169 [(module) = "framework"]; |
Philip P. Moltmann | b2f0c77 | 2019-04-11 14:41:21 -0700 | [diff] [blame] | 308 | PermissionGrantRequestResultReported permission_grant_request_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 309 | 170 [(module) = "permissioncontroller"]; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 310 | BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; |
Muhammad Qureshi | ed8bca0 | 2020-01-24 16:07:49 -0800 | [diff] [blame] | 311 | DeviceIdentifierAccessDenied device_identifier_access_denied = |
| 312 | 172 [(module) = "telephony_common"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 313 | BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"]; |
Muhammad Qureshi | 76b2524 | 2020-01-25 19:02:08 -0800 | [diff] [blame] | 314 | AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"]; |
| 315 | AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"]; |
| 316 | AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 317 | TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"]; |
| 318 | HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true, (module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 319 | StyleUIChanged style_ui_changed = 179 [(module) = "sysui"]; |
Joel Galenson | 6f41b106 | 2019-04-16 12:22:41 -0700 | [diff] [blame] | 320 | PrivacyIndicatorsInteracted privacy_indicators_interacted = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 321 | 180 [(module) = "permissioncontroller"]; |
| 322 | AppInstallOnExternalStorageReported app_install_on_external_storage_reported = |
| 323 | 181 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 324 | NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 325 | AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"]; |
| 326 | BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"]; |
| 327 | SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"]; |
| 328 | TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 329 | BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = |
| 330 | 187 [(module) = "bluetooth"]; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 331 | IntelligenceEventReported intelligence_event_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 332 | 188 [(module) = "intelligence"]; |
| 333 | ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = |
| 334 | 189 [(module) = "framework"]; |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 335 | RoleRequestResultReported role_request_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 336 | 190 [(module) = "permissioncontroller"]; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 337 | MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191; |
| 338 | MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192; |
| 339 | MediametricsAudiothreadReported mediametrics_audiothread_reported = 193; |
| 340 | MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194; |
| 341 | MediametricsCodecReported mediametrics_codec_reported = 195; |
| 342 | MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196; |
| 343 | MediametricsExtractorReported mediametrics_extractor_reported = 197; |
| 344 | MediametricsMediadrmReported mediametrics_mediadrm_reported = 198; |
| 345 | MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199; |
| 346 | MediametricsRecorderReported mediametrics_recorder_reported = 200; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 347 | MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 348 | CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"]; |
| 349 | GarageModeInfo garage_mode_info = 204 [(module) = "car"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 350 | TestAtomReported test_atom_reported = 205 [(module) = "cts"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 351 | ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = |
| 352 | 206 [(module) = "framework"]; |
| 353 | ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"]; |
| 354 | ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"]; |
| 355 | ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"]; |
| 356 | LocationManagerApiUsageReported location_manager_api_usage_reported = |
| 357 | 210 [(module) = "framework"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 358 | ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 359 | 211 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 360 | RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 361 | 212 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 362 | GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 363 | 213 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 364 | LocationAccessCheckNotificationAction location_access_check_notification_action = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 365 | 214 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 366 | AppPermissionFragmentActionReported app_permission_fragment_action_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 367 | 215 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 368 | AppPermissionFragmentViewed app_permission_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 369 | 216 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 370 | AppPermissionsFragmentViewed app_permissions_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 371 | 217 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 372 | PermissionAppsFragmentViewed permission_apps_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 373 | 218 [(module) = "permissioncontroller"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 374 | TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"]; |
| 375 | TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"]; |
| 376 | ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"]; |
| 377 | LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 378 | ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 379 | BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"]; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 380 | UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225; |
| 381 | UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 382 | CameraActionEvent camera_action_event = 227 [(module) = "framework"]; |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 383 | AppCompatibilityChangeReported app_compatibility_change_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 384 | 228 [(allow_from_any_uid) = true, (module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 385 | PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"]; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 386 | VmsClientConnectionStateChanged vms_client_connection_state_changed = |
| 387 | 230 [(module) = "car"]; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 388 | MediaProviderScanOccurred media_provider_scan_occurred = 233 [(module) = "mediaprovider"]; |
| 389 | MediaContentDeleted media_content_deleted = 234 [(module) = "mediaprovider"]; |
| 390 | MediaProviderPermissionRequested media_provider_permission_requested = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 391 | 235 [(module) = "mediaprovider"]; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 392 | MediaProviderSchemaChanged media_provider_schema_changed = 236 [(module) = "mediaprovider"]; |
| 393 | MediaProviderIdleMaintenanceFinished media_provider_idle_maintenance_finished = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 394 | 237 [(module) = "mediaprovider"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 395 | RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"]; |
| 396 | BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"]; |
| 397 | BootTimeEventElapsedTime boot_time_event_elapsed_time_reported = |
| 398 | 240 [(module) = "framework"]; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 399 | BootTimeEventUtcTime boot_time_event_utc_time_reported = 241; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 400 | BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"]; |
Nikita Ioffe | 779d6be | 2020-02-06 23:17:17 +0000 | [diff] [blame] | 401 | UserspaceRebootReported userspace_reboot_reported = 243 [(module) = "framework"]; |
Muhammad Qureshi | 550b84c | 2020-02-03 14:17:59 -0800 | [diff] [blame] | 402 | NotificationReported notification_reported = 244 [(module) = "framework"]; |
Will Brockman | 7fb7944 | 2020-02-27 14:34:24 -0500 | [diff] [blame] | 403 | NotificationPanelReported notification_panel_reported = 245 [(module) = "sysui"]; |
| 404 | NotificationChannelModified notification_channel_modified = 246 [(module) = "framework"]; |
Muhammad Qureshi | e2b2432 | 2020-01-28 10:54:17 -0800 | [diff] [blame] | 405 | IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"]; |
| 406 | IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"]; |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 407 | CellBroadcastMessageReported cb_message_reported = |
| 408 | 249 [(module) = "cellbroadcast"]; |
| 409 | CellBroadcastMessageError cb_message_error = |
| 410 | 250 [(module) = "cellbroadcast"]; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 411 | WifiHealthStatReported wifi_health_stat_reported = 251 [(module) = "wifi"]; |
| 412 | WifiFailureStatReported wifi_failure_stat_reported = 252 [(module) = "wifi"]; |
| 413 | WifiConnectionResultReported wifi_connection_result_reported = 253 [(module) = "wifi"]; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 414 | AppFreezeChanged app_freeze_changed = 254 [(module) = "framework"]; |
Alessio Balsini | 628fb8d | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 415 | SnapshotMergeReported snapshot_merge_reported = 255; |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 416 | ForegroundServiceAppOpSessionEnded foreground_service_app_op_session_ended = |
| 417 | 256 [(module) = "framework"]; |
Alec Mouri | 5ac3262 | 2020-02-06 08:44:25 -0800 | [diff] [blame] | 418 | DisplayJankReported display_jank_reported = 257; |
Kweku Adams | 1275213 | 2020-02-18 15:36:48 -0800 | [diff] [blame] | 419 | AppStandbyBucketChanged app_standby_bucket_changed = 258 [(module) = "framework"]; |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 420 | SharesheetStarted sharesheet_started = 259 [(module) = "framework"]; |
| 421 | RankingSelected ranking_selected = 260 [(module) = "framework"]; |
Zhen Sun | 7dbb51a | 2020-04-07 16:05:12 -0700 | [diff] [blame] | 422 | TvSettingsUIInteracted tvsettings_ui_interacted = 261 [(module) = "tv_settings"]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 423 | LauncherStaticLayout launcher_snapshot = 262 [(module) = "sysui"]; |
Songchun Fan | c296cf7 | 2020-03-31 18:38:52 -0700 | [diff] [blame] | 424 | PackageInstallerV2Reported package_installer_v2_reported = 263 [(module) = "framework"]; |
Varun Shah | acb5634 | 2019-12-18 11:45:38 -0800 | [diff] [blame] | 425 | UserLifecycleJourneyReported user_lifecycle_journey_reported = 264 [(module) = "framework"]; |
| 426 | UserLifecycleEventOccurred user_lifecycle_event_occurred = 265 [(module) = "framework"]; |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 427 | AccessibilityShortcutReported accessibility_shortcut_reported = |
| 428 | 266 [(module) = "framework"]; |
jasonwshsu | 7b1be3e | 2020-04-27 15:21:07 +0800 | [diff] [blame] | 429 | AccessibilityServiceReported accessibility_service_reported = 267 [(module) = "settings"]; |
Diksha Gohlyan | b96b2f4 | 2020-04-30 09:20:42 -0700 | [diff] [blame] | 430 | DocsUIDragAndDropReported docs_ui_drag_and_drop_reported = 268 [(module) = "docsui"]; |
Jonathan Nguyen | 8d8ff53 | 2020-05-07 18:11:15 -0700 | [diff] [blame] | 431 | AppUsageEventOccurred app_usage_event_occurred = 269 [(module) = "framework"]; |
Nate Myren | e8f912bb | 2020-04-30 10:41:38 -0700 | [diff] [blame] | 432 | AutoRevokeNotificationClicked auto_revoke_notification_clicked = |
| 433 | 270 [(module) = "permissioncontroller"]; |
| 434 | AutoRevokeFragmentAppViewed auto_revoke_fragment_app_viewed = |
| 435 | 271 [(module) = "permissioncontroller"]; |
| 436 | AutoRevokedAppInteraction auto_revoked_app_interaction = |
| 437 | 272 [(module) = "permissioncontroller", (module) = "settings"]; |
| 438 | AppPermissionGroupsFragmentAutoRevokeAction |
| 439 | app_permission_groups_fragment_auto_revoke_action = |
| 440 | 273 [(module) = "permissioncontroller"]; |
Changyeon Jo | 51ae358 | 2020-04-14 09:41:00 -0700 | [diff] [blame] | 441 | EvsUsageStatsReported evs_usage_stats_reported = 274 [(module) = "evs"]; |
Robert Lee | cccdc15 | 2020-04-23 13:22:46 +0800 | [diff] [blame] | 442 | AudioPowerUsageDataReported audio_power_usage_data_reported = 275; |
Anton Hansson | 5a48e4b | 2020-02-06 14:50:35 +0000 | [diff] [blame] | 443 | SdkExtensionStatus sdk_extension_status = 354; |
Muhammad Qureshi | cdf291d | 2020-04-15 17:13:12 -0700 | [diff] [blame] | 444 | |
| 445 | // StatsdStats tracks platform atoms with ids upto 500. |
| 446 | // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 447 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 448 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 449 | // Pulled events will start at field 10000. |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 450 | // Next: 10080 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 451 | oneof pulled { |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 452 | WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"]; |
| 453 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 454 | MobileBytesTransfer mobile_bytes_transfer = |
| 455 | 10002 [(module) = "framework", (truncate_timestamp) = true]; |
| 456 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = |
| 457 | 10003 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 458 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"]; |
| 459 | KernelWakelock kernel_wakelock = 10004 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 460 | SubsystemSleepState subsystem_sleep_state = 10005 [(module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 461 | CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 462 | CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework", (module) = "statsdtest"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 463 | CpuTimePerUidFreq cpu_time_per_uid_freq = |
| 464 | 10010 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 465 | WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"]; |
| 466 | ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"]; |
| 467 | BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"]; |
| 468 | ProcessMemoryState process_memory_state = 10013 [(module) = "framework"]; |
| 469 | SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"]; |
Muhammad Qureshi | b635b3a | 2020-04-22 20:57:41 -0700 | [diff] [blame] | 470 | SystemUptime system_uptime = 10015 [(module) = "framework"]; |
tsaichristine | a3d2ed8 | 2020-03-19 20:53:36 -0700 | [diff] [blame] | 471 | CpuActiveTime cpu_active_time = 10016 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | b635b3a | 2020-04-22 20:57:41 -0700 | [diff] [blame] | 472 | CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 473 | DiskSpace disk_space = 10018 [deprecated=true, (module) = "statsdtest"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 474 | RemainingBatteryCapacity remaining_battery_capacity = 10019 [(module) = "framework"]; |
| 475 | FullBatteryCapacity full_battery_capacity = 10020 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 476 | Temperature temperature = 10021 [(module) = "framework", (module) = "statsdtest"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 477 | BinderCalls binder_calls = 10022 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 478 | BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 479 | LooperStats looper_stats = 10024 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 480 | DiskStats disk_stats = 10025 [(module) = "framework"]; |
| 481 | DirectoryUsage directory_usage = 10026 [(module) = "framework"]; |
| 482 | AppSize app_size = 10027 [(module) = "framework"]; |
| 483 | CategorySize category_size = 10028 [(module) = "framework"]; |
| 484 | ProcStats proc_stats = 10029 [(module) = "framework"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 485 | BatteryVoltage battery_voltage = 10030 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 486 | NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"]; |
| 487 | DiskIo disk_io = 10032 [(module) = "framework"]; |
| 488 | PowerProfile power_profile = 10033 [(module) = "framework"]; |
| 489 | ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"]; |
| 490 | ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"]; |
| 491 | CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"]; |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 492 | OnDevicePowerMeasurement on_device_power_measurement = 10038; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 493 | DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"]; |
| 494 | DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = |
| 495 | 10040 [(module) = "framework"]; |
| 496 | DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = |
| 497 | 10041 [(module) = "framework"]; |
| 498 | ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"]; |
Jeffrey Huang | 9a3c1b6 | 2020-01-27 17:33:13 -0800 | [diff] [blame] | 499 | BatteryLevel battery_level = 10043 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 500 | BuildInformation build_information = 10044 [(module) = "framework"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 501 | BatteryCycleCount battery_cycle_count = 10045 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 502 | DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"]; |
| 503 | DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"]; |
| 504 | NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"]; |
| 505 | RoleHolder role_holder = 10049 [(module) = "framework"]; |
| 506 | DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 507 | TrainInfo train_info = 10051 [(module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 508 | TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"]; |
| 509 | ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 510 | GpuStatsGlobalInfo gpu_stats_global_info = 10054; |
| 511 | GpuStatsAppInfo gpu_stats_app_info = 10055; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 512 | SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"]; |
| 513 | AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"]; |
| 514 | FaceSettings face_settings = 10058 [(module) = "framework"]; |
| 515 | CoolingDevice cooling_device = 10059 [(module) = "framework"]; |
| 516 | AppOps app_ops = 10060 [(module) = "framework"]; |
| 517 | ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"]; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 518 | SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062; |
| 519 | SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 520 | ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"]; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 521 | VmsClientStats vms_client_stats = 10065 [(module) = "car"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 522 | NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"]; |
| 523 | DangerousPermissionStateSampled dangerous_permission_state_sampled = |
| 524 | 10067 [(module) = "framework"]; |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 525 | GraphicsStats graphics_stats = 10068; |
Stanislav Zholnin | 88c6f32 | 2020-01-29 14:48:11 +0000 | [diff] [blame] | 526 | RuntimeAppOpAccess runtime_app_op_access = 10069 [(module) = "framework"]; |
Kenny Root | 6c218db | 2020-02-02 17:43:44 +0000 | [diff] [blame] | 527 | IonHeapSize ion_heap_size = 10070 [(module) = "framework"]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 528 | PackageNotificationPreferences package_notification_preferences = |
| 529 | 10071 [(module) = "framework"]; |
| 530 | PackageNotificationChannelPreferences package_notification_channel_preferences = |
| 531 | 10072 [(module) = "framework"]; |
| 532 | PackageNotificationChannelGroupPreferences package_notification_channel_group_preferences = |
| 533 | 10073 [(module) = "framework"]; |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 534 | GnssStats gnss_stats = 10074 [(module) = "framework"]; |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 535 | AttributedAppOps attributed_app_ops = 10075 [(module) = "framework"]; |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 536 | VoiceCallSession voice_call_session = 10076 [(module) = "telephony"]; |
| 537 | VoiceCallRatUsage voice_call_rat_usage = 10077 [(module) = "telephony"]; |
| 538 | SimSlotState sim_slot_state = 10078 [(module) = "telephony"]; |
| 539 | SupportedRadioAccessFamily supported_radio_access_family = 10079 [(module) = "telephony"]; |
Raff Tsai | ea4db18 | 2020-03-06 07:45:43 +0800 | [diff] [blame] | 540 | SettingSnapshot setting_snapshot = 10080 [(module) = "framework"]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 541 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 542 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 543 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 544 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 545 | // Field numbers 200,000 and above are reserved for future use; do not use them at all. |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 546 | |
| 547 | reserved 10036; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 548 | } |
| 549 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 550 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 551 | * This proto represents a node of an attribution chain. |
| 552 | * Note: All attribution chains are represented as a repeated field of type |
| 553 | * AttributionNode. It is understood that in such arrays, the order is that |
| 554 | * of calls, that is [A, B, C] if A calls B that calls C. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 555 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 556 | message AttributionNode { |
| 557 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 558 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 559 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 560 | // The (optional) string tag for an element in the attribution chain. If the |
| 561 | // element has no tag, it is encoded as an empty string. |
| 562 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 563 | } |
| 564 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 565 | message KeyValuePair { |
| 566 | optional int32 key = 1; |
| 567 | oneof value { |
Howard Ro | 4078dd4 | 2018-09-27 17:41:08 -0700 | [diff] [blame] | 568 | int32 value_int = 2; |
| 569 | int64 value_long = 3; |
| 570 | string value_str = 4; |
| 571 | float value_float = 5; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 572 | } |
| 573 | } |
| 574 | |
| 575 | message KeyValuePairsAtom { |
| 576 | optional int32 uid = 1; |
| 577 | repeated KeyValuePair pairs = 2; |
| 578 | } |
| 579 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 580 | /* |
| 581 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 582 | * Below are all of the individual atoms that are logged by Android via statsd. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 583 | * |
| 584 | * RULES: |
| 585 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 586 | * Skipping field ids is not allowed. |
| 587 | * - These form an API, so renaming, renumbering or removing fields is |
| 588 | * not allowed between android releases. (This is not currently enforced, |
| 589 | * but there will be a tool to enforce this restriction). |
| 590 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 591 | * are allowed (yet). The bytes type is also not allowed. |
| 592 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 593 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 594 | * - If an atom represents work that can be attributed to an app, there can |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 595 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 596 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 597 | * annotation. The generated code on android will be represented by UIDs, |
| 598 | * and those UIDs will be translated in xxx to those strings. |
| 599 | * |
| 600 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 601 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 602 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 603 | * ***************************************************************************** |
| 604 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 605 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 606 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 607 | * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 608 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 609 | * |
| 610 | * Logged from: |
| 611 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 612 | */ |
| 613 | message ThermalThrottlingStateChanged { |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 614 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 615 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 616 | |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 617 | // Throttling state, this field is DEPRECATED |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 618 | enum State { |
| 619 | UNKNOWN = 0; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 620 | START = 1; // START indicated that throttling was triggered. |
| 621 | STOP = 2; // STOP indicates that throttling was cleared. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 622 | } |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 623 | optional State state = 2; |
| 624 | |
| 625 | optional float temperature = 3; |
| 626 | } |
| 627 | |
| 628 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 629 | * Logs when the screen state changes. |
| 630 | * |
| 631 | * Logged from: |
| 632 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 633 | */ |
| 634 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 635 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 636 | optional android.view.DisplayStateEnum state = 1 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 637 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 638 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 639 | |
| 640 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 641 | * Logs that the process state of the uid, as determined by ActivityManager |
| 642 | * (i.e. the highest process state of that uid's processes) has changed. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 643 | * |
| 644 | * Logged from: |
| 645 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 646 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 647 | message UidProcessStateChanged { |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 648 | optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 649 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 650 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 651 | optional android.app.ProcessStateEnum state = 2 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 652 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 653 | } |
| 654 | |
| 655 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 656 | * Logs process state change of a process, as per the activity manager. |
| 657 | * |
| 658 | * Logged from: |
| 659 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 660 | */ |
| 661 | message ProcessStateChanged { |
| 662 | optional int32 uid = 1; |
| 663 | optional string process_name = 2; |
| 664 | optional string package_name = 3; |
| 665 | // TODO: remove this when validation is done |
| 666 | optional int64 version = 5; |
| 667 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 668 | optional android.app.ProcessStateEnum state = 4; |
| 669 | } |
| 670 | |
| 671 | /** |
| 672 | * Logs when ActivityManagerService sleep state is changed. |
| 673 | * |
| 674 | * Logged from: |
| 675 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 676 | */ |
| 677 | message ActivityManagerSleepStateChanged { |
| 678 | // TODO: import frameworks proto |
| 679 | enum State { |
| 680 | UNKNOWN = 0; |
| 681 | ASLEEP = 1; |
| 682 | AWAKE = 2; |
| 683 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 684 | optional State state = 1 |
| 685 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 686 | } |
| 687 | |
| 688 | /** |
| 689 | * Logs when system memory state changes. |
| 690 | * |
| 691 | * Logged from: |
| 692 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 693 | */ |
| 694 | message MemoryFactorStateChanged { |
| 695 | // TODO: import frameworks proto |
| 696 | enum State { |
| 697 | MEMORY_UNKNOWN = 0; |
| 698 | NORMAL = 1; // normal. |
| 699 | MODERATE = 2; // moderate memory pressure. |
| 700 | LOW = 3; // low memory. |
| 701 | CRITICAL = 4; // critical memory. |
| 702 | |
| 703 | } |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 704 | optional State factor = 1 [(state_field_option).exclusive_state = true]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 705 | } |
| 706 | |
| 707 | /** |
| 708 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 709 | * |
| 710 | * Logged from: |
| 711 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 712 | */ |
| 713 | message ExcessiveCpuUsageReported { |
| 714 | optional int32 uid = 1; |
| 715 | optional string process_name = 2; |
| 716 | optional string package_name = 3; |
| 717 | // package version. TODO: remove this when validation is done |
| 718 | optional int64 version = 4; |
| 719 | } |
| 720 | |
| 721 | /** |
| 722 | * Logs when a cached process is killed, along with its pss. |
| 723 | * |
| 724 | * Logged from: |
| 725 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 726 | */ |
| 727 | message CachedKillReported { |
| 728 | optional int32 uid = 1; |
| 729 | optional string process_name = 2; |
| 730 | optional string package_name = 3; |
| 731 | // TODO: remove this when validation is done |
| 732 | optional int64 version = 5; |
| 733 | optional int64 pss = 4; |
| 734 | } |
| 735 | |
| 736 | /** |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 737 | * Logs the change in wifi health. |
| 738 | * |
| 739 | * Logged from: |
| 740 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDataStall.java |
| 741 | */ |
| 742 | message WifiHealthStatReported { |
xshu | 39bfd93 | 2020-02-14 15:49:24 -0800 | [diff] [blame] | 743 | enum Band { |
| 744 | UNKNOWN = 0; |
| 745 | // All of 2.4GHz band |
| 746 | BAND_2G = 1; |
| 747 | // Frequencies in the range of [5150, 5250) GHz |
| 748 | BAND_5G_LOW = 2; |
| 749 | // Frequencies in the range of [5250, 5725) GHz |
| 750 | BAND_5G_MIDDLE = 3; |
| 751 | // Frequencies in the range of [5725, 5850) GHz |
| 752 | BAND_5G_HIGH = 4; |
| 753 | // Frequencies in the range of [5925, 6425) GHz |
| 754 | BAND_6G_LOW = 5; |
| 755 | // Frequencies in the range of [6425, 6875) GHz |
| 756 | BAND_6G_MIDDLE = 6; |
| 757 | // Frequencies in the range of [6875, 7125) GHz |
| 758 | BAND_6G_HIGH = 7; |
| 759 | } |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 760 | // duration this stat is obtained over in milliseconds |
| 761 | optional int32 duration_millis = 1; |
| 762 | // whether wifi is classified as sufficient for the user's data traffic, determined |
| 763 | // by whether the calculated throughput exceeds the average demand within |duration_millis| |
| 764 | optional bool is_sufficient = 2; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 765 | // whether cellular data is available |
xshu | 39bfd93 | 2020-02-14 15:49:24 -0800 | [diff] [blame] | 766 | optional bool is_cell_data_available = 3; |
| 767 | // the Band bucket the connected network is on |
| 768 | optional Band band = 4; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 769 | } |
| 770 | |
| 771 | /** |
| 772 | * Logged when wifi detects a significant change in connection failure rate. |
| 773 | * |
| 774 | * Logged from: frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiHealthMonitor.java |
| 775 | * |
| 776 | */ |
| 777 | message WifiFailureStatReported { |
| 778 | enum AbnormalityType { |
| 779 | UNKNOWN = 0; |
| 780 | SIGNIFICANT_INCREASE = 1; |
| 781 | SIGNIFICANT_DECREASE = 2; |
| 782 | SIMPLY_HIGH = 3; |
| 783 | } |
| 784 | enum FailureType { |
| 785 | FAILURE_UNKNOWN = 0; |
| 786 | FAILURE_CONNECTION = 1; |
| 787 | FAILURE_ASSOCIATION_REJECTION = 2; |
| 788 | FAILURE_ASSOCIATION_TIMEOUT = 3; |
| 789 | FAILURE_AUTHENTICATION = 4; |
| 790 | FAILURE_NON_LOCAL_DISCONNECTION = 5; |
| 791 | FAILURE_SHORT_CONNECTION_DUE_TO_NON_LOCAL_DISCONNECTION = 6; |
| 792 | } |
| 793 | // Reason for uploading this stat |
| 794 | optional AbnormalityType abnormality_type = 1; |
| 795 | // The particular type of failure |
| 796 | optional FailureType failure_type = 2; |
| 797 | // How many times we have encountered this combination of AbnormalityType and FailureType |
| 798 | optional int32 failure_count = 3; |
| 799 | } |
| 800 | |
| 801 | /** |
| 802 | * Logs whether a wifi connection is successful and reasons for failure if it isn't. |
| 803 | * |
| 804 | * Logged from: |
| 805 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
| 806 | */ |
| 807 | message WifiConnectionResultReported { |
| 808 | enum FailureCode { |
| 809 | FAILURE_UNKNOWN = 0; |
| 810 | FAILURE_ASSOCIATION_TIMEOUT = 1; |
| 811 | FAILURE_ASSOCIATION_REJECTION = 2; |
| 812 | FAILURE_AUTHENTICATION_GENERAL = 3; |
| 813 | FAILURE_AUTHENTICATION_EAP = 4; |
| 814 | FAILURE_DHCP = 5; |
| 815 | FAILURE_NETWORK_DISCONNECTION = 6; |
| 816 | FAILURE_ROAM_TIMEOUT = 7; |
| 817 | } |
| 818 | // true represents a successful connection |
| 819 | optional bool connection_result = 1; |
| 820 | // reason for the connection failure |
| 821 | optional FailureCode failure_code = 2; |
| 822 | // scan rssi before the connection attempt |
| 823 | optional int32 rssi = 3; |
| 824 | } |
| 825 | |
| 826 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 827 | * Logs when memory stats of a process is reported. |
| 828 | * |
| 829 | * Logged from: |
| 830 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 831 | */ |
| 832 | message ProcessMemoryStatReported { |
| 833 | optional int32 uid = 1; |
| 834 | optional string process_name = 2; |
| 835 | optional string package_name = 3; |
| 836 | //TODO: remove this when validation is done |
| 837 | optional int64 version = 9; |
| 838 | optional int64 pss = 4; |
| 839 | optional int64 uss = 5; |
| 840 | optional int64 rss = 6; |
| 841 | enum Type { |
| 842 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 843 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 844 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 845 | ADD_PSS_EXTERNAL = 3; |
| 846 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 847 | } |
| 848 | optional Type type = 7; |
Muhammad Qureshi | dda7320 | 2019-03-07 13:54:20 -0800 | [diff] [blame] | 849 | optional int64 duration_millis = 8; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 850 | } |
| 851 | |
| 852 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 853 | * Logs that a process started, finished, crashed, or ANRed. |
| 854 | * |
| 855 | * Logged from: |
| 856 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 857 | */ |
| 858 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 859 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 860 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 861 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 862 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 863 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 864 | // What lifecycle state the process changed to. |
| 865 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 866 | enum State { |
| 867 | FINISHED = 0; |
| 868 | STARTED = 1; |
| 869 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 870 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 871 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 872 | } |
| 873 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 874 | /** |
| 875 | * Logs when the ble scan state changes. |
| 876 | * |
| 877 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 878 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 879 | */ |
| 880 | message BleScanStateChanged { |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 881 | repeated AttributionNode attribution_node = 1 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 882 | [(state_field_option).primary_field_first_uid = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 883 | |
| 884 | enum State { |
| 885 | OFF = 0; |
| 886 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 887 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 888 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 889 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 890 | optional State state = 2 [ |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 891 | (state_field_option).exclusive_state = true, |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 892 | (state_field_option).default_state_value = 0 /* State.OFF */, |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 893 | (state_field_option).trigger_state_reset_value = 2 /* State.RESET */, |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 894 | (state_field_option).nested = true |
| 895 | ]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 896 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 897 | // Does the scan have a filter. |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 898 | optional bool is_filtered = 3 [(state_field_option).primary_field = true]; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 899 | // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally. |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 900 | optional bool is_first_match = 4 [(state_field_option).primary_field = true]; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 901 | // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC). |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 902 | optional bool is_opportunistic = 5 [(state_field_option).primary_field = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 903 | } |
| 904 | |
| 905 | /** |
| 906 | * Logs reporting of a ble scan finding results. |
| 907 | * |
| 908 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 909 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 910 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 911 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 912 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 913 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 914 | |
| 915 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 916 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 917 | } |
| 918 | |
| 919 | /** |
| 920 | * Logs when a sensor state changes. |
| 921 | * |
| 922 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 923 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 924 | */ |
| 925 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 926 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 927 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 928 | // The id (int) of the sensor. |
| 929 | optional int32 sensor_id = 2; |
| 930 | |
| 931 | enum State { |
| 932 | OFF = 0; |
| 933 | ON = 1; |
| 934 | } |
| 935 | optional State state = 3; |
| 936 | } |
| 937 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 938 | /** |
| 939 | * Logs when GPS state changes. |
| 940 | * |
| 941 | * Logged from: |
| 942 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 943 | */ |
| 944 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 945 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 946 | |
| 947 | enum State { |
| 948 | OFF = 0; |
| 949 | ON = 1; |
| 950 | } |
| 951 | optional State state = 2; |
| 952 | } |
| 953 | |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 954 | /** |
| 955 | * Logs when GPS signal quality. |
| 956 | * |
| 957 | * Logged from: |
| 958 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 959 | */ |
| 960 | message GpsSignalQualityChanged { |
| 961 | optional android.server.location.GpsSignalQualityEnum level = 1; |
| 962 | } |
| 963 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 964 | |
| 965 | /** |
| 966 | * Logs when a sync manager sync state changes. |
| 967 | * |
| 968 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 969 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 970 | */ |
| 971 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 972 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 973 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 974 | // Name of the sync (as named in the app). Can be chosen at run-time. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 975 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 976 | |
| 977 | enum State { |
| 978 | OFF = 0; |
| 979 | ON = 1; |
| 980 | } |
| 981 | optional State state = 3; |
| 982 | } |
| 983 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 984 | /* |
| 985 | * Deferred job stats. |
| 986 | * |
| 987 | * Logged from: |
| 988 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 989 | */ |
| 990 | message DeferredJobStatsReported { |
| 991 | repeated AttributionNode attribution_node = 1; |
| 992 | |
| 993 | // Number of jobs deferred. |
| 994 | optional int32 num_jobs_deferred = 2; |
| 995 | |
| 996 | // Time since the last job runs. |
| 997 | optional int64 time_since_last_job_millis = 3; |
| 998 | } |
| 999 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1000 | /** |
| 1001 | * Logs when a job scheduler job state changes. |
| 1002 | * |
| 1003 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1004 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1005 | */ |
| 1006 | message ScheduledJobStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1007 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1008 | |
| 1009 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1010 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1011 | |
| 1012 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 1013 | FINISHED = 0; |
| 1014 | STARTED = 1; |
| 1015 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1016 | } |
| 1017 | optional State state = 3; |
| 1018 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 1019 | // The reason a job has stopped. |
| 1020 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1021 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 1022 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 1023 | |
| 1024 | // The standby bucket of the app that scheduled the job. These match the framework constants |
| 1025 | // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is |
| 1026 | // already assigned 0. |
| 1027 | enum Bucket { |
| 1028 | UNKNOWN = -1; |
| 1029 | ACTIVE = 0; |
| 1030 | WORKING_SET = 1; |
| 1031 | FREQUENT = 2; |
| 1032 | RARE = 3; |
| 1033 | NEVER = 4; |
Kweku Adams | ae9d6be | 2020-01-14 16:10:14 -0800 | [diff] [blame] | 1034 | RESTRICTED = 5; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 1035 | } |
| 1036 | optional Bucket standby_bucket = 5 [default = UNKNOWN]; |
| 1037 | |
| 1038 | // The job id (as assigned by the app). |
| 1039 | optional int32 job_id = 6; |
Suprabh Shukla | 1b5778d | 2020-02-18 16:39:02 -0800 | [diff] [blame] | 1040 | |
| 1041 | // One flag for each of the API constraints defined by Jobscheduler. Does not include implcit |
| 1042 | // constraints as they are always assumed to be set. |
| 1043 | optional bool has_charging_constraint = 7; |
| 1044 | optional bool has_battery_not_low_constraint = 8; |
| 1045 | optional bool has_storage_not_low_constraint = 9; |
| 1046 | optional bool has_timing_delay_constraint = 10; |
| 1047 | optional bool has_deadline_constraint = 11; |
| 1048 | optional bool has_idle_constraint = 12; |
| 1049 | optional bool has_connectivity_constraint = 13; |
| 1050 | optional bool has_content_trigger_constraint = 14; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1051 | } |
| 1052 | |
| 1053 | /** |
| 1054 | * Logs when the audio state changes. |
| 1055 | * |
| 1056 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1057 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1058 | */ |
| 1059 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1060 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1061 | |
| 1062 | enum State { |
| 1063 | OFF = 0; |
| 1064 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1065 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 1066 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1067 | } |
| 1068 | optional State state = 2; |
| 1069 | } |
| 1070 | |
| 1071 | /** |
| 1072 | * Logs when the video codec state changes. |
| 1073 | * |
| 1074 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1075 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1076 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1077 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1078 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1079 | |
| 1080 | enum State { |
| 1081 | OFF = 0; |
| 1082 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1083 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 1084 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1085 | } |
| 1086 | optional State state = 2; |
| 1087 | } |
| 1088 | |
| 1089 | /** |
| 1090 | * Logs when the flashlight state changes. |
| 1091 | * |
| 1092 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1093 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1094 | */ |
| 1095 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1096 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1097 | |
| 1098 | enum State { |
| 1099 | OFF = 0; |
| 1100 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1101 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 1102 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1103 | } |
| 1104 | optional State state = 2; |
| 1105 | } |
| 1106 | |
| 1107 | /** |
| 1108 | * Logs when the camera state changes. |
| 1109 | * |
| 1110 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1111 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1112 | */ |
| 1113 | message CameraStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1114 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1115 | |
| 1116 | enum State { |
| 1117 | OFF = 0; |
| 1118 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1119 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 1120 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1121 | } |
| 1122 | optional State state = 2; |
| 1123 | } |
| 1124 | |
| 1125 | /** |
| 1126 | * Logs that the state of a wakelock (per app and per wakelock name) has changed. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1127 | * |
| 1128 | * Logged from: |
| 1129 | * TODO |
| 1130 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 1131 | message WakelockStateChanged { |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 1132 | repeated AttributionNode attribution_node = 1 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1133 | [(state_field_option).primary_field_first_uid = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1134 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1135 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 1136 | // From frameworks/base/core/proto/android/os/enums.proto. |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1137 | optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).primary_field = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1138 | |
| 1139 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1140 | optional string tag = 3 [(state_field_option).primary_field = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1141 | |
| 1142 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 1143 | RELEASE = 0; |
| 1144 | ACQUIRE = 1; |
| 1145 | CHANGE_RELEASE = 2; |
| 1146 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1147 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 1148 | optional State state = 4 [ |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1149 | (state_field_option).exclusive_state = true, |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 1150 | (state_field_option).default_state_value = 0, |
| 1151 | (state_field_option).nested = true |
| 1152 | ]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1153 | } |
| 1154 | |
| 1155 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1156 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 1157 | * |
| 1158 | * Logged from: |
| 1159 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1160 | */ |
| 1161 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1162 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1163 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1164 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 1165 | optional string tag = 2; |
| 1166 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1167 | // TODO: I have no idea what this is. |
| 1168 | optional string history_tag = 3; |
| 1169 | |
| 1170 | enum State { |
| 1171 | OFF = 0; |
| 1172 | ON = 1; |
| 1173 | } |
| 1174 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1175 | } |
| 1176 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1177 | /** |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 1178 | * Logs when the device is interactive, according to the PowerManager Notifier. |
| 1179 | * |
| 1180 | * Logged from: |
| 1181 | * frameworks/base/services/core/java/com/android/server/power/Notifier.java |
| 1182 | */ |
| 1183 | message InteractiveStateChanged { |
| 1184 | enum State { |
| 1185 | OFF = 0; |
| 1186 | ON = 1; |
| 1187 | } |
| 1188 | optional State state = 1; |
| 1189 | } |
| 1190 | |
| 1191 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1192 | * Logs Battery Saver state change. |
| 1193 | * |
| 1194 | * Logged from: |
| 1195 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1196 | */ |
| 1197 | message BatterySaverModeStateChanged { |
| 1198 | enum State { |
| 1199 | OFF = 0; |
| 1200 | ON = 1; |
| 1201 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 1202 | optional State state = 1 |
| 1203 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1204 | } |
| 1205 | |
| 1206 | /** |
| 1207 | * Logs Doze mode state change. |
| 1208 | * |
| 1209 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1210 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1211 | */ |
| 1212 | message DeviceIdleModeStateChanged { |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 1213 | optional android.server.DeviceIdleModeEnum state = 1 |
| 1214 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1215 | } |
| 1216 | |
| 1217 | |
| 1218 | /** |
| 1219 | * Logs state change of Doze mode including maintenance windows. |
| 1220 | * |
| 1221 | * Logged from: |
| 1222 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1223 | */ |
| 1224 | message DeviceIdlingModeStateChanged { |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 1225 | optional android.server.DeviceIdleModeEnum state = 1 |
| 1226 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1227 | } |
| 1228 | |
| 1229 | /** |
| 1230 | * Logs screen brightness level. |
| 1231 | * |
| 1232 | * Logged from: |
| 1233 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1234 | */ |
| 1235 | message ScreenBrightnessChanged { |
| 1236 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 1237 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1238 | } |
| 1239 | |
| 1240 | /** |
| 1241 | * Logs battery level (percent full, from 0 to 100). |
| 1242 | * |
| 1243 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1244 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1245 | */ |
| 1246 | message BatteryLevelChanged { |
| 1247 | // Battery level. Should be in [0, 100]. |
| 1248 | optional int32 battery_level = 1; |
| 1249 | } |
| 1250 | |
| 1251 | /** |
| 1252 | * Logs change in charging status of the device. |
| 1253 | * |
| 1254 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1255 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1256 | */ |
| 1257 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1258 | // State of the battery, from frameworks/base/core/proto/android/os/enums.proto. |
| 1259 | optional android.os.BatteryStatusEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1260 | } |
| 1261 | |
| 1262 | /** |
| 1263 | * Logs whether the device is plugged in, and what power source it is using. |
| 1264 | * |
| 1265 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1266 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1267 | */ |
| 1268 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1269 | // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto. |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 1270 | optional android.os.BatteryPluggedStateEnum state = 1 |
| 1271 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1272 | } |
| 1273 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1274 | /** |
| 1275 | * Logs when an app's wakeup alarm fires. |
| 1276 | * |
| 1277 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1278 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1279 | */ |
| 1280 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1281 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1282 | |
| 1283 | // Name of the wakeup alarm. |
| 1284 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame] | 1285 | |
| 1286 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 1287 | optional string package_name = 3; |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1288 | |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1289 | // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired. |
Kweku Adams | 1275213 | 2020-02-18 15:36:48 -0800 | [diff] [blame] | 1290 | optional AppStandbyBucketChanged.Bucket app_standby_bucket = 4; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1291 | } |
| 1292 | |
| 1293 | /** |
| 1294 | * Logs when an an app causes the mobile radio to change state. |
| 1295 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 1296 | * |
| 1297 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1298 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1299 | */ |
| 1300 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1301 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1302 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1303 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1304 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1305 | } |
| 1306 | |
| 1307 | /** |
| 1308 | * Logs when an an app causes the wifi radio to change state. |
| 1309 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 1310 | * |
| 1311 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1312 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1313 | */ |
| 1314 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1315 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1316 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1317 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1318 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1319 | } |
| 1320 | |
| 1321 | /** |
| 1322 | * Logs kernel wakeup reasons and aborts. |
| 1323 | * |
| 1324 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 1325 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1326 | */ |
| 1327 | message KernelWakeupReported { |
| 1328 | // Name of the kernel wakeup reason (or abort). |
| 1329 | optional string wakeup_reason_name = 1; |
| 1330 | |
| 1331 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1332 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1333 | } |
| 1334 | |
| 1335 | /** |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1336 | * Logs when Wifi is toggled on/off. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1337 | * Note that Wifi may still perform certain functions (e.g. location scanning) even when disabled. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1338 | * |
| 1339 | * Logged from: |
| 1340 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1341 | */ |
| 1342 | message WifiEnabledStateChanged { |
| 1343 | enum State { |
| 1344 | OFF = 0; |
| 1345 | ON = 1; |
| 1346 | } |
| 1347 | optional State state = 1; |
| 1348 | } |
| 1349 | |
| 1350 | /** |
tsaichristine | cecebdc | 2020-02-04 14:05:56 -0800 | [diff] [blame] | 1351 | * This atom is deprecated starting in R. |
| 1352 | * |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1353 | * Logs when an app causes Wifi to run. In this context, 'to run' means to use Wifi Client Mode. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1354 | * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'. |
| 1355 | * Note that Wifi Scanning is monitored separately in WifiScanStateChanged. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1356 | * |
| 1357 | * Logged from: |
| 1358 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1359 | */ |
| 1360 | message WifiRunningStateChanged { |
| 1361 | repeated AttributionNode attribution_node = 1; |
| 1362 | |
| 1363 | enum State { |
| 1364 | OFF = 0; |
| 1365 | ON = 1; |
| 1366 | } |
| 1367 | optional State state = 2; |
| 1368 | } |
| 1369 | |
| 1370 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1371 | * Logs wifi locks held by an app. |
| 1372 | * |
| 1373 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1374 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1375 | */ |
| 1376 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1377 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1378 | |
| 1379 | enum State { |
| 1380 | OFF = 0; |
| 1381 | ON = 1; |
| 1382 | } |
| 1383 | optional State state = 2; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 1384 | |
| 1385 | // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto. |
| 1386 | optional android.net.wifi.WifiModeEnum mode = 3; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1387 | } |
| 1388 | |
| 1389 | /** |
| 1390 | * Logs wifi signal strength changes. |
| 1391 | * |
| 1392 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1393 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1394 | */ |
| 1395 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1396 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1397 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1398 | } |
| 1399 | |
| 1400 | /** |
| 1401 | * Logs wifi scans performed by an app. |
| 1402 | * |
| 1403 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1404 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1405 | */ |
| 1406 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1407 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1408 | |
| 1409 | enum State { |
| 1410 | OFF = 0; |
| 1411 | ON = 1; |
| 1412 | } |
| 1413 | optional State state = 2; |
| 1414 | } |
| 1415 | |
| 1416 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1417 | * Logs wifi multicast locks held by an app |
| 1418 | * |
| 1419 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1420 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1421 | */ |
| 1422 | message WifiMulticastLockStateChanged { |
| 1423 | repeated AttributionNode attribution_node = 1; |
| 1424 | |
| 1425 | enum State { |
| 1426 | OFF = 0; |
| 1427 | ON = 1; |
| 1428 | } |
| 1429 | optional State state = 2; |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1430 | |
| 1431 | optional string tag = 3; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1432 | } |
| 1433 | |
| 1434 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1435 | * Logs shutdown reason and duration on next boot. |
| 1436 | * |
| 1437 | * Logged from: |
| 1438 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 1439 | */ |
| 1440 | message ShutdownSequenceReported { |
| 1441 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 1442 | optional bool reboot = 1; |
| 1443 | |
| 1444 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 1445 | optional string reason = 2; |
| 1446 | |
| 1447 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 1448 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1449 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1450 | |
| 1451 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1452 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1453 | } |
| 1454 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1455 | |
| 1456 | /** |
| 1457 | * Logs boot reason and duration. |
| 1458 | * |
| 1459 | * Logged from: |
| 1460 | * system/core/bootstat/bootstat.cpp |
| 1461 | */ |
| 1462 | message BootSequenceReported { |
| 1463 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 1464 | // Default: "<EMPTY>" if not available. |
| 1465 | optional string bootloader_reason = 1; |
| 1466 | |
| 1467 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 1468 | // Default: "<EMPTY>" if not available. |
| 1469 | optional string system_reason = 2; |
| 1470 | |
| 1471 | // End of boot time in ms from unix epoch using system wall clock. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1472 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1473 | |
| 1474 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1475 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1476 | |
| 1477 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1478 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1479 | |
| 1480 | // Time since last boot in ms. Default: 0 if not available. |
| 1481 | optional int64 time_since_last_boot = 6; |
| 1482 | } |
| 1483 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 1484 | |
| 1485 | /** |
| 1486 | * Logs call state and disconnect cause (if applicable). |
| 1487 | * |
| 1488 | * Logged from: |
| 1489 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 1490 | */ |
| 1491 | message CallStateChanged { |
| 1492 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 1493 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1494 | optional android.telecom.CallStateEnum call_state = 1; |
| 1495 | |
| 1496 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 1497 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 1498 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 1499 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1500 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 1501 | |
| 1502 | // True if the call is self-managed, which are apps that use the |
| 1503 | // telecom infrastructure to make their own calls. |
| 1504 | optional bool self_managed = 3; |
| 1505 | |
| 1506 | // True if call is external. External calls are calls on connected Wear |
| 1507 | // devices but show up in Telecom so the user can pull them onto the device. |
| 1508 | optional bool external_call = 4; |
| 1509 | } |
| 1510 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1511 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1512 | * Logs keyguard state. The keyguard is the lock screen. |
| 1513 | * |
| 1514 | * Logged from: |
| 1515 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 1516 | */ |
| 1517 | message KeyguardStateChanged { |
| 1518 | enum State { |
| 1519 | UNKNOWN = 0; |
| 1520 | // The keyguard is hidden when the phone is unlocked. |
| 1521 | HIDDEN = 1; |
| 1522 | // The keyguard is shown when the phone is locked (screen turns off). |
| 1523 | SHOWN= 2; |
| 1524 | // The keyguard is occluded when something is overlaying the keyguard. |
| 1525 | // Eg. Opening the camera while on the lock screen. |
| 1526 | OCCLUDED = 3; |
| 1527 | } |
| 1528 | optional State state = 1; |
| 1529 | } |
| 1530 | |
| 1531 | /** |
| 1532 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 1533 | * prompts the user to enter a password (pattern, pin, etc). |
| 1534 | * |
| 1535 | * Logged from: |
| 1536 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 1537 | */ |
| 1538 | |
| 1539 | message KeyguardBouncerStateChanged { |
| 1540 | enum State { |
| 1541 | UNKNOWN = 0; |
| 1542 | // Bouncer is hidden, either as a result of successfully entering the |
| 1543 | // password, screen timing out, or user going back to lock screen. |
| 1544 | HIDDEN = 1; |
| 1545 | // This is when the user is being prompted to enter the password. |
| 1546 | SHOWN = 2; |
| 1547 | } |
| 1548 | optional State state = 1; |
| 1549 | } |
| 1550 | |
| 1551 | /** |
| 1552 | * Logs the result of entering a password into the keyguard bouncer. |
| 1553 | * |
| 1554 | * Logged from: |
| 1555 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 1556 | */ |
| 1557 | message KeyguardBouncerPasswordEntered { |
| 1558 | enum BouncerResult { |
| 1559 | UNKNOWN = 0; |
| 1560 | // The password entered was incorrect. |
| 1561 | FAILURE = 1; |
| 1562 | // The password entered was correct. |
| 1563 | SUCCESS = 2; |
| 1564 | } |
| 1565 | optional BouncerResult result = 1; |
| 1566 | } |
| 1567 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1568 | /* |
| 1569 | * Logs changes to the configuration of the device. The configuration is defined |
| 1570 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 1571 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1572 | * Please go there to interpret the possible values each field can be. |
| 1573 | * |
| 1574 | * Logged from: |
| 1575 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1576 | */ |
| 1577 | message ResourceConfigurationChanged { |
| 1578 | // Bit mask of color capabilities of the screen. |
| 1579 | // Contains information about the color gamut and hdr mode of the screen. |
| 1580 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1581 | optional int32 color_mode = 1; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1582 | |
| 1583 | // The target screen density being rendered to. |
| 1584 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1585 | optional int32 density_dpi = 2; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1586 | |
| 1587 | // Current user preference for the scaling factor for fonts, |
| 1588 | // relative to the base density scaling. |
| 1589 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1590 | optional float font_scale = 3; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1591 | |
| 1592 | // Flag indicating whether the hard keyboard is hidden. |
| 1593 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1594 | optional int32 hard_keyboard_hidden = 4; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1595 | |
| 1596 | // The type of keyboard attached to the device. |
| 1597 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1598 | optional int32 keyboard = 5; |
| 1599 | |
| 1600 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1601 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1602 | optional int32 keyboard_hidden = 6; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1603 | |
| 1604 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1605 | // 0 if undefined. |
| 1606 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1607 | optional int32 mcc = 7; |
| 1608 | |
| 1609 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1610 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1611 | // MNC_ZERO symbol defined in Configuration.java. |
| 1612 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1613 | optional int32 mnc = 8; |
| 1614 | |
| 1615 | // The kind of navigation available on the device. |
| 1616 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1617 | optional int32 navigation = 9; |
| 1618 | |
| 1619 | // Flag indicating whether the navigation is available. |
| 1620 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1621 | optional int32 navigation_hidden = 10; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1622 | |
| 1623 | // Overall orientation of the screen. |
| 1624 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1625 | optional int32 orientation = 11; |
| 1626 | |
| 1627 | // The current height of the available screen space, in dp units. |
| 1628 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1629 | optional int32 screen_height_dp = 12; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1630 | |
| 1631 | // Bit mask of overall layout of the screen. |
| 1632 | // Contains information about screen size, whether the screen is wider/taller |
| 1633 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1634 | // and whether the screen has a rounded shape. |
| 1635 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1636 | optional int32 screen_layout = 13; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1637 | |
| 1638 | // Current width of the available screen space, in dp units. |
| 1639 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1640 | optional int32 screen_width_dp = 14; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1641 | |
| 1642 | // The smallest screen size an application will see in normal operation. |
| 1643 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1644 | // in portrait and landscape. |
| 1645 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1646 | optional int32 smallest_screen_width_dp = 15; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1647 | |
| 1648 | // The type of touch screen attached to the device. |
| 1649 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1650 | optional int32 touchscreen = 16; |
| 1651 | |
| 1652 | // Bit mask of the ui mode. |
| 1653 | // Contains information about the overall ui mode of the device. |
| 1654 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1655 | // Also contains information about whether the device is in night mode. |
| 1656 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1657 | optional int32 ui_mode = 17; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1658 | } |
| 1659 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1660 | |
| 1661 | /** |
| 1662 | * Logs changes in the connection state of the mobile radio. |
| 1663 | * |
| 1664 | * Logged from: |
| 1665 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1666 | */ |
| 1667 | message MobileConnectionStateChanged { |
| 1668 | // States are from the state machine DataConnection.java. |
| 1669 | enum State { |
| 1670 | UNKNOWN = 0; |
| 1671 | // The connection is inactive, or disconnected. |
| 1672 | INACTIVE = 1; |
| 1673 | // The connection is being activated, or connecting. |
| 1674 | ACTIVATING = 2; |
| 1675 | // The connection is active, or connected. |
| 1676 | ACTIVE = 3; |
| 1677 | // The connection is disconnecting. |
| 1678 | DISCONNECTING = 4; |
| 1679 | // The connection is disconnecting after creating a connection. |
| 1680 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1681 | } |
| 1682 | optional State state = 1; |
| 1683 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1684 | optional int32 sim_slot_index = 2; |
| 1685 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1686 | // every new network created. Resets whenever the device reboots. |
| 1687 | optional int32 data_connection_id = 3; |
| 1688 | // A bitmask for the capabilities of this connection. |
| 1689 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1690 | // Default value (if we have no information): 0 |
| 1691 | optional int64 capabilities = 4; |
| 1692 | // If this connection has internet. |
| 1693 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1694 | optional bool has_internet = 5; |
| 1695 | } |
| 1696 | |
| 1697 | /** |
| 1698 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1699 | * |
| 1700 | * Logged from: |
| 1701 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1702 | */ |
| 1703 | message MobileRadioTechnologyChanged { |
| 1704 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1705 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1706 | optional int32 sim_slot_index = 2; |
| 1707 | } |
| 1708 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1709 | /** |
| 1710 | * Logs the VID and PID of any connected USB devices. |
| 1711 | * |
| 1712 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1713 | * |
| 1714 | * Logged by Vendor. |
| 1715 | */ |
| 1716 | message UsbDeviceAttached { |
| 1717 | optional int32 vid = 1; |
| 1718 | optional int32 pid = 2; |
| 1719 | optional bool has_audio = 3; |
| 1720 | optional bool has_hid = 4; |
| 1721 | optional bool has_storage = 5; |
Badhri Jagan Sridharan | 5ec629f | 2018-11-16 15:39:22 -0800 | [diff] [blame] | 1722 | enum State { |
| 1723 | STATE_DISCONNECTED = 0; |
| 1724 | STATE_CONNECTED = 1; |
| 1725 | } |
| 1726 | optional State state = 6; |
Badhri Jagan Sridharan | c2c54a2 | 2018-12-14 14:41:26 -0800 | [diff] [blame] | 1727 | optional int64 last_connect_duration_millis = 7; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1728 | } |
| 1729 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1730 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1731 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1732 | * Logs when Bluetooth is enabled and disabled. |
| 1733 | * |
| 1734 | * Logged from: |
| 1735 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1736 | */ |
| 1737 | message BluetoothEnabledStateChanged { |
| 1738 | repeated AttributionNode attribution_node = 1; |
| 1739 | // Whether or not bluetooth is enabled on the device. |
| 1740 | enum State { |
| 1741 | UNKNOWN = 0; |
| 1742 | ENABLED = 1; |
| 1743 | DISABLED = 2; |
| 1744 | } |
| 1745 | optional State state = 2; |
| 1746 | // The reason for being enabled/disabled. |
| 1747 | // Eg. Airplane mode, crash, application request. |
| 1748 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1749 | // If the reason is an application request, this will be the package name. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1750 | optional string pkg_name = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1751 | } |
| 1752 | |
| 1753 | /** |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1754 | * Logs when profiles on a Bluetooth device connects and disconnects. |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1755 | * |
| 1756 | * Logged from: |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1757 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 1758 | * |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1759 | * Next Tag: 6 |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1760 | */ |
| 1761 | message BluetoothConnectionStateChanged { |
| 1762 | // The state of the connection. |
| 1763 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1764 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1765 | // An identifier that can be used to match connect and disconnect events. |
| 1766 | // Currently is last two bytes of a hash of a device level ID and |
| 1767 | // the mac address of the bluetooth device that is connected. |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1768 | // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1769 | optional int32 obfuscated_id = 2 [deprecated = true]; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1770 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1771 | // From android.bluetooth.BluetoothAdapter.java |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1772 | // Default: 0 when not used |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1773 | optional int32 bt_profile = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1774 | // An identifier that can be used to match events for this device. |
| 1775 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1776 | // Salt: Randomly generated 256 bit value |
| 1777 | // Hash algorithm: HMAC-SHA256 |
| 1778 | // Size: 32 byte |
| 1779 | // Default: null or empty if the device identifier is not known |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1780 | optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1781 | // An identifier that can be used to match events for this device. |
| 1782 | // The incremental identifier is locally generated and guaranteed not derived |
| 1783 | // from any globally unique hardware id. |
| 1784 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1785 | // same remote device. |
| 1786 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1787 | // session for the same remote device. |
| 1788 | // Default: 0 if the device's metric id is unknown. |
| 1789 | optional int32 metric_id = 5; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1790 | } |
| 1791 | |
| 1792 | /** |
| 1793 | * Logs when a Bluetooth device connects and disconnects over ACL |
| 1794 | * |
| 1795 | * Logged from: |
| 1796 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1797 | * |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1798 | * Next Tag: 4 |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1799 | */ |
| 1800 | message BluetoothAclConnectionStateChanged { |
| 1801 | // An identifier that can be used to match events for this device. |
| 1802 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1803 | // Salt: Randomly generated 256 bit value |
| 1804 | // Hash algorithm: HMAC-SHA256 |
| 1805 | // Size: 32 byte |
| 1806 | // Default: null or empty if the device identifier is not known |
| 1807 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1808 | // The state of the connection. |
| 1809 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1810 | optional android.bluetooth.ConnectionStateEnum state = 2; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1811 | // An identifier that can be used to match events for this device. |
| 1812 | // The incremental identifier is locally generated and guaranteed not derived |
| 1813 | // from any globally unique hardware id. |
| 1814 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1815 | // same remote device. |
| 1816 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1817 | // session for the same remote device. |
| 1818 | // Default: 0 if the device's metric id is unknown. |
| 1819 | optional int32 metric_id = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1820 | } |
| 1821 | |
| 1822 | /** |
| 1823 | * Logs when a Bluetooth device connects and disconnects over SCO |
| 1824 | * |
| 1825 | * Logged from: |
| 1826 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java |
| 1827 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java |
| 1828 | * |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1829 | * Next Tag: 5 |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1830 | */ |
| 1831 | message BluetoothScoConnectionStateChanged { |
| 1832 | // An identifier that can be used to match events for this device. |
| 1833 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1834 | // Salt: Randomly generated 256 bit value |
| 1835 | // Hash algorithm: HMAC-SHA256 |
| 1836 | // Size: 32 byte |
| 1837 | // Default: null or empty if the device identifier is not known |
| 1838 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1839 | // The state of the connection. |
| 1840 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1841 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1842 | // Codec used for this SCO connection |
| 1843 | // Default: UNKNOWN |
| 1844 | optional android.bluetooth.hfp.ScoCodec codec = 3; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1845 | // An identifier that can be used to match events for this device. |
| 1846 | // The incremental identifier is locally generated and guaranteed not derived |
| 1847 | // from any globally unique hardware id. |
| 1848 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1849 | // same remote device. |
| 1850 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1851 | // session for the same remote device. |
| 1852 | // Default: 0 if the device's metric id is unknown. |
| 1853 | optional int32 metric_id = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1854 | } |
| 1855 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1856 | /** |
| 1857 | * Logged when active device of a profile changes |
| 1858 | * |
| 1859 | * Logged from: |
| 1860 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1861 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java |
| 1862 | * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java |
| 1863 | */ |
| 1864 | message BluetoothActiveDeviceChanged { |
| 1865 | // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID |
| 1866 | // From android.bluetooth.BluetoothProfile |
| 1867 | optional int32 bt_profile = 1; |
| 1868 | // An identifier that can be used to match events for this new active device. |
| 1869 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1870 | // Salt: Randomly generated 256 bit value |
| 1871 | // Hash algorithm: HMAC-SHA256 |
| 1872 | // Size: 32 byte |
| 1873 | // Default: null or empty if there is no active device for this profile |
| 1874 | optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1875 | // An identifier that can be used to match events for this device. |
| 1876 | // The incremental identifier is locally generated and guaranteed not derived |
| 1877 | // from any globally unique hardware id. |
| 1878 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1879 | // same remote device. |
| 1880 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1881 | // session for the same remote device. |
| 1882 | // Default: 0 if the device's metric id is unknown. |
| 1883 | optional int32 metric_id = 3; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1884 | } |
| 1885 | |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1886 | // Logs when there is an event affecting Bluetooth device's link layer connection. |
| 1887 | // - This event is triggered when there is a related HCI command or event |
| 1888 | // - Users of this metrics can deduce Bluetooth device's connection state from these events |
| 1889 | // - HCI commands are logged before the command is sent, after receiving command status, and after |
| 1890 | // receiving command complete |
| 1891 | // - HCI events are logged when they arrive |
| 1892 | // |
| 1893 | // Low level log from system/bt |
| 1894 | // |
| 1895 | // Bluetooth classic commands: |
| 1896 | // - CMD_CREATE_CONNECTION |
| 1897 | // - CMD_DISCONNECT |
| 1898 | // - CMD_CREATE_CONNECTION_CANCEL |
| 1899 | // - CMD_ACCEPT_CONNECTION_REQUEST |
| 1900 | // - CMD_REJECT_CONNECTION_REQUEST |
| 1901 | // - CMD_SETUP_ESCO_CONNECTION |
| 1902 | // - CMD_ACCEPT_ESCO_CONNECTION |
| 1903 | // - CMD_REJECT_ESCO_CONNECTION |
| 1904 | // - CMD_ENH_SETUP_ESCO_CONNECTION |
| 1905 | // - CMD_ENH_ACCEPT_ESCO_CONNECTION |
| 1906 | // |
| 1907 | // Bluetooth low energy commands: |
| 1908 | // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] |
| 1909 | // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] |
| 1910 | // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] |
| 1911 | // - CMD_BLE_CLEAR_WHITE_LIST |
| 1912 | // - CMD_BLE_ADD_WHITE_LIST |
| 1913 | // - CMD_BLE_REMOVE_WHITE_LIST |
| 1914 | // |
| 1915 | // Bluetooth classic events: |
| 1916 | // - EVT_CONNECTION_COMP |
| 1917 | // - EVT_CONNECTION_REQUEST |
| 1918 | // - EVT_DISCONNECTION_COMP |
| 1919 | // - EVT_ESCO_CONNECTION_COMP |
| 1920 | // - EVT_ESCO_CONNECTION_CHANGED |
| 1921 | // |
| 1922 | // Bluetooth low energy meta events: |
| 1923 | // - BLE_EVT_CONN_COMPLETE_EVT |
| 1924 | // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT |
| 1925 | // |
| 1926 | // Next tag: 10 |
| 1927 | message BluetoothLinkLayerConnectionEvent { |
| 1928 | // An identifier that can be used to match events for this device. |
| 1929 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1930 | // Salt: Randomly generated 256 bit value |
| 1931 | // Hash algorithm: HMAC-SHA256 |
| 1932 | // Size: 32 byte |
| 1933 | // Default: null or empty if the device identifier is not known |
| 1934 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1935 | // Connection handle of this connection if available |
| 1936 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1937 | // Default: 0xFFFF if the handle is unknown |
| 1938 | optional int32 connection_handle = 2; |
| 1939 | // Direction of the link |
| 1940 | // Default: DIRECTION_UNKNOWN |
| 1941 | optional android.bluetooth.DirectionEnum direction = 3; |
| 1942 | // Type of this link |
| 1943 | // Default: LINK_TYPE_UNKNOWN |
| 1944 | optional android.bluetooth.LinkTypeEnum type = 4; |
| 1945 | |
| 1946 | // Reason metadata for this link layer connection event, rules for interpretation: |
| 1947 | // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or |
| 1948 | // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case |
| 1949 | // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is |
| 1950 | // set and valid, ignore hci_ble_event |
| 1951 | |
| 1952 | // HCI command associated with this event |
| 1953 | // Default: CMD_UNKNOWN |
| 1954 | optional android.bluetooth.hci.CommandEnum hci_cmd = 5; |
| 1955 | // HCI event associated with this event |
| 1956 | // Default: EVT_UNKNOWN |
| 1957 | optional android.bluetooth.hci.EventEnum hci_event = 6; |
| 1958 | // HCI BLE meta event associated with this event |
| 1959 | // Default: BLE_EVT_UNKNOWN |
| 1960 | optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; |
| 1961 | // HCI command status code if this is triggerred by hci_cmd |
| 1962 | // Default: STATUS_UNKNOWN |
| 1963 | optional android.bluetooth.hci.StatusEnum cmd_status = 8; |
| 1964 | // HCI reason code associated with this event |
| 1965 | // Default: STATUS_UNKNOWN |
| 1966 | optional android.bluetooth.hci.StatusEnum reason_code = 9; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1967 | // An identifier that can be used to match events for this device. |
| 1968 | // The incremental identifier is locally generated and guaranteed not derived |
| 1969 | // from any globally unique hardware id. |
| 1970 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1971 | // same remote device. |
| 1972 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1973 | // session for the same remote device. |
| 1974 | // Default: 0 if the device's metric id is unknown. |
| 1975 | optional int32 metric_id = 10; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1976 | } |
| 1977 | |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1978 | /** |
| 1979 | * Logs when a module is rolled back by Watchdog. |
| 1980 | * |
| 1981 | * Logged from: Rollback Manager |
| 1982 | */ |
| 1983 | message WatchdogRollbackOccurred { |
| 1984 | enum RollbackType { |
| 1985 | UNKNOWN = 0; |
| 1986 | ROLLBACK_INITIATE = 1; |
| 1987 | ROLLBACK_SUCCESS = 2; |
| 1988 | ROLLBACK_FAILURE = 3; |
Howard Ro | e4d6fed | 2019-03-04 16:54:19 -0800 | [diff] [blame] | 1989 | ROLLBACK_BOOT_TRIGGERED = 4; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1990 | } |
| 1991 | optional RollbackType rollback_type = 1; |
| 1992 | |
| 1993 | optional string package_name = 2; |
| 1994 | |
| 1995 | optional int32 package_version_code = 3; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 1996 | |
| 1997 | enum RollbackReasonType { |
| 1998 | REASON_UNKNOWN = 0; |
| 1999 | REASON_NATIVE_CRASH = 1; |
| 2000 | REASON_EXPLICIT_HEALTH_CHECK = 2; |
| 2001 | REASON_APP_CRASH = 3; |
| 2002 | REASON_APP_NOT_RESPONDING = 4; |
Gavin Corkery | 3285d22 | 2020-01-17 19:24:22 +0000 | [diff] [blame] | 2003 | REASON_NATIVE_CRASH_DURING_BOOT = 5; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 2004 | } |
| 2005 | optional RollbackReasonType rollback_reason = 4; |
| 2006 | |
| 2007 | // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback |
| 2008 | // is initiated. Empty if the package is unknown. |
| 2009 | optional string failing_package_name = 5; |
Jonathan Nguyen | 703c42f | 2020-02-04 15:54:26 -0800 | [diff] [blame] | 2010 | |
| 2011 | optional TrainExperimentIds experiment_ids = 6 [(log_mode) = MODE_BYTES]; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 2012 | } |
| 2013 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2014 | /** |
| 2015 | * Logs when there is a change in Bluetooth A2DP playback state |
| 2016 | * |
| 2017 | * Logged from: |
| 2018 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 2019 | */ |
| 2020 | message BluetoothA2dpPlaybackStateChanged { |
| 2021 | // An identifier that can be used to match events for this device. |
| 2022 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2023 | // Salt: Randomly generated 256 bit value |
| 2024 | // Hash algorithm: HMAC-SHA256 |
| 2025 | // Size: 32 byte |
| 2026 | // Default: null or empty if the device identifier is not known |
| 2027 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2028 | // Current playback state |
| 2029 | // Default: PLAYBACK_STATE_UNKNOWN |
| 2030 | optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; |
| 2031 | // Current audio coding mode |
| 2032 | // Default: AUDIO_CODING_MODE_UNKNOWN |
| 2033 | optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2034 | // An identifier that can be used to match events for this device. |
| 2035 | // The incremental identifier is locally generated and guaranteed not derived |
| 2036 | // from any globally unique hardware id. |
| 2037 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2038 | // same remote device. |
| 2039 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2040 | // session for the same remote device. |
| 2041 | // Default: 0 if the device's metric id is unknown. |
| 2042 | optional int32 metric_id = 4; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2043 | } |
| 2044 | |
| 2045 | /** |
| 2046 | * Logs when there is a change in A2DP codec config for a particular remote device |
| 2047 | * |
| 2048 | * Logged from: |
| 2049 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 2050 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 2051 | */ |
| 2052 | message BluetoothA2dpCodecConfigChanged { |
| 2053 | // An identifier that can be used to match events for this device. |
| 2054 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2055 | // Salt: Randomly generated 256 bit value |
| 2056 | // Hash algorithm: HMAC-SHA256 |
| 2057 | // Size: 32 byte |
| 2058 | // Default: null or empty if the device identifier is not known |
| 2059 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2060 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 2061 | // Default SOURCE_CODEC_TYPE_INVALID |
| 2062 | optional int32 codec_type = 2; |
| 2063 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 2064 | // Default: CODEC_PRIORITY_DEFAULT |
| 2065 | optional int32 codec_priority = 3; |
| 2066 | // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig |
| 2067 | // Default: SAMPLE_RATE_NONE |
| 2068 | optional int32 sample_rate = 4; |
| 2069 | // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig |
| 2070 | // Default: BITS_PER_SAMPLE_NONE |
| 2071 | optional int32 bits_per_sample = 5; |
| 2072 | // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig |
| 2073 | // Default: CHANNEL_MODE_NONE |
| 2074 | optional int32 channel_mode = 6; |
| 2075 | // Codec specific values |
| 2076 | // Default 0 |
| 2077 | optional int64 codec_specific_1 = 7; |
| 2078 | optional int64 codec_specific_2 = 8; |
| 2079 | optional int64 codec_specific_3 = 9; |
| 2080 | optional int64 codec_specific_4 = 10; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2081 | // An identifier that can be used to match events for this device. |
| 2082 | // The incremental identifier is locally generated and guaranteed not derived |
| 2083 | // from any globally unique hardware id. |
| 2084 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2085 | // same remote device. |
| 2086 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2087 | // session for the same remote device. |
| 2088 | // Default: 0 if the device's metric id is unknown. |
| 2089 | optional int32 metric_id = 11; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2090 | } |
| 2091 | |
| 2092 | /** |
| 2093 | * Logs when there is a change in selectable A2DP codec capability for a paricular remote device |
| 2094 | * Each codec's capability is logged separately due to statsd restriction |
| 2095 | * |
| 2096 | * Logged from: |
| 2097 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 2098 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 2099 | */ |
| 2100 | message BluetoothA2dpCodecCapabilityChanged { |
| 2101 | // An identifier that can be used to match events for this device. |
| 2102 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2103 | // Salt: Randomly generated 256 bit value |
| 2104 | // Hash algorithm: HMAC-SHA256 |
| 2105 | // Size: 32 byte |
| 2106 | // Default: null or empty if the device identifier is not known |
| 2107 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2108 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 2109 | // Default SOURCE_CODEC_TYPE_INVALID |
| 2110 | optional int32 codec_type = 2; |
| 2111 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 2112 | // Default: CODEC_PRIORITY_DEFAULT |
| 2113 | optional int32 codec_priority = 3; |
| 2114 | // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants |
| 2115 | // in BluetoothCodecConfig |
| 2116 | // Default: empty and SAMPLE_RATE_NONE for individual item |
| 2117 | optional int32 sample_rate = 4; |
| 2118 | // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants |
| 2119 | // in BluetoothCodecConfig |
| 2120 | // Default: empty and BITS_PER_SAMPLE_NONE for individual item |
| 2121 | optional int32 bits_per_sample = 5; |
| 2122 | // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in |
| 2123 | // BluetoothCodecConfig |
| 2124 | // Default: empty and CHANNEL_MODE_NONE for individual item |
| 2125 | optional int32 channel_mode = 6; |
| 2126 | // Codec specific values |
| 2127 | // Default 0 |
| 2128 | optional int64 codec_specific_1 = 7; |
| 2129 | optional int64 codec_specific_2 = 8; |
| 2130 | optional int64 codec_specific_3 = 9; |
| 2131 | optional int64 codec_specific_4 = 10; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2132 | // An identifier that can be used to match events for this device. |
| 2133 | // The incremental identifier is locally generated and guaranteed not derived |
| 2134 | // from any globally unique hardware id. |
| 2135 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2136 | // same remote device. |
| 2137 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2138 | // session for the same remote device. |
| 2139 | // Default: 0 if the device's metric id is unknown. |
| 2140 | optional int32 metric_id = 11; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2141 | } |
| 2142 | |
| 2143 | /** |
| 2144 | * Logs when A2DP failed to read from PCM source. |
| 2145 | * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. |
| 2146 | * |
| 2147 | * Logged from: |
| 2148 | * system/bt |
| 2149 | */ |
| 2150 | message BluetoothA2dpAudioUnderrunReported { |
| 2151 | // An identifier that can be used to match events for this device. |
| 2152 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2153 | // Salt: Randomly generated 256 bit value |
| 2154 | // Hash algorithm: HMAC-SHA256 |
| 2155 | // Size: 32 byte |
| 2156 | // Default: null or empty if the device identifier is not known |
| 2157 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2158 | // Encoding interval in nanoseconds |
| 2159 | // Default: 0 |
| 2160 | optional int64 encoding_interval_nanos = 2; |
| 2161 | // Number of bytes of PCM data that could not be read from the source |
| 2162 | // Default: 0 |
| 2163 | optional int32 num_missing_pcm_bytes = 3; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2164 | // An identifier that can be used to match events for this device. |
| 2165 | // The incremental identifier is locally generated and guaranteed not derived |
| 2166 | // from any globally unique hardware id. |
| 2167 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2168 | // same remote device. |
| 2169 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2170 | // session for the same remote device. |
| 2171 | // Default: 0 if the device's metric id is unknown. |
| 2172 | optional int32 metric_id = 4; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2173 | } |
| 2174 | |
| 2175 | /** |
| 2176 | * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit |
| 2177 | * buffer queue is full and we have to drop data |
| 2178 | * |
| 2179 | * Logged from: |
| 2180 | * system/bt |
| 2181 | */ |
| 2182 | message BluetoothA2dpAudioOverrunReported { |
| 2183 | // An identifier that can be used to match events for this device. |
| 2184 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2185 | // Salt: Randomly generated 256 bit value |
| 2186 | // Hash algorithm: HMAC-SHA256 |
| 2187 | // Size: 32 byte |
| 2188 | // Default: null or empty if the device identifier is not known |
| 2189 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2190 | // Encoding interval in nanoseconds |
| 2191 | // Default: 0 |
| 2192 | optional int64 encoding_interval_nanos = 2; |
| 2193 | // Number of buffers dropped in this event |
| 2194 | // Each buffer is encoded in one encoding interval and consists of multiple encoded frames |
| 2195 | // Default: 0 |
| 2196 | optional int32 num_dropped_buffers = 3; |
| 2197 | // Number of encoded buffers dropped in this event |
| 2198 | // Default 0 |
| 2199 | optional int32 num_dropped_encoded_frames = 4; |
| 2200 | // Number of encoded bytes dropped in this event |
| 2201 | // Default: 0 |
| 2202 | optional int32 num_dropped_encoded_bytes = 5; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2203 | // An identifier that can be used to match events for this device. |
| 2204 | // The incremental identifier is locally generated and guaranteed not derived |
| 2205 | // from any globally unique hardware id. |
| 2206 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2207 | // same remote device. |
| 2208 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2209 | // session for the same remote device. |
| 2210 | // Default: 0 if the device's metric id is unknown. |
| 2211 | optional int32 metric_id = 6; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2212 | } |
| 2213 | |
| 2214 | /** |
| 2215 | * Logs when we receive reports regarding a device's RSSI value |
| 2216 | * |
| 2217 | * Logged from: |
| 2218 | * system/bt |
| 2219 | */ |
| 2220 | message BluetoothDeviceRssiReported { |
| 2221 | // An identifier that can be used to match events for this device. |
| 2222 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2223 | // Salt: Randomly generated 256 bit value |
| 2224 | // Hash algorithm: HMAC-SHA256 |
| 2225 | // Size: 32 byte |
| 2226 | // Default: null or empty if the device identifier is not known |
| 2227 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2228 | // Connection handle of this connection if available |
| 2229 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2230 | // Default: 0xFFFF if the handle is unknown |
| 2231 | optional int32 connection_handle = 2; |
| 2232 | // HCI command status code if this is triggerred by hci_cmd |
| 2233 | // Default: STATUS_UNKNOWN |
| 2234 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 2235 | // BR/EDR |
| 2236 | // Range: -128 ≤ N ≤ 127 (signed integer) |
| 2237 | // Units: dB |
| 2238 | // LE: |
| 2239 | // Range: -127 to 20, 127 (signed integer) |
| 2240 | // Units: dBm |
| 2241 | // Invalid when an out of range value is reported |
| 2242 | optional int32 rssi = 4; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2243 | // An identifier that can be used to match events for this device. |
| 2244 | // The incremental identifier is locally generated and guaranteed not derived |
| 2245 | // from any globally unique hardware id. |
| 2246 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2247 | // same remote device. |
| 2248 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2249 | // session for the same remote device. |
| 2250 | // Default: 0 if the device's metric id is unknown. |
| 2251 | optional int32 metric_id = 5; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2252 | } |
| 2253 | |
| 2254 | /** |
| 2255 | * Logs when we receive reports regarding how many consecutive failed contacts for a connection |
| 2256 | * |
| 2257 | * Logged from: |
| 2258 | * system/bt |
| 2259 | */ |
| 2260 | message BluetoothDeviceFailedContactCounterReported { |
| 2261 | // An identifier that can be used to match events for this device. |
| 2262 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2263 | // Salt: Randomly generated 256 bit value |
| 2264 | // Hash algorithm: HMAC-SHA256 |
| 2265 | // Size: 32 byte |
| 2266 | // Default: null or empty if the device identifier is not known |
| 2267 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2268 | // Connection handle of this connection if available |
| 2269 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2270 | // Default: 0xFFFF if the handle is unknown |
| 2271 | optional int32 connection_handle = 2; |
| 2272 | // HCI command status code if this is triggerred by hci_cmd |
| 2273 | // Default: STATUS_UNKNOWN |
| 2274 | optional android.bluetooth.hci.StatusEnum cmd_status = 3; |
| 2275 | // Number of consecutive failed contacts for a connection corresponding to the Handle |
| 2276 | // Range: uint16_t, 0-0xFFFF |
| 2277 | // Default: 0xFFFFF |
| 2278 | optional int32 failed_contact_counter = 4; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2279 | // An identifier that can be used to match events for this device. |
| 2280 | // The incremental identifier is locally generated and guaranteed not derived |
| 2281 | // from any globally unique hardware id. |
| 2282 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2283 | // same remote device. |
| 2284 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2285 | // session for the same remote device. |
| 2286 | // Default: 0 if the device's metric id is unknown. |
| 2287 | optional int32 metric_id = 5; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2288 | } |
| 2289 | |
| 2290 | /** |
| 2291 | * Logs when we receive reports regarding the tranmit power level used for a specific connection |
| 2292 | * |
| 2293 | * Logged from: |
| 2294 | * system/bt |
| 2295 | */ |
| 2296 | message BluetoothDeviceTxPowerLevelReported { |
| 2297 | // An identifier that can be used to match events for this device. |
| 2298 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2299 | // Salt: Randomly generated 256 bit value |
| 2300 | // Hash algorithm: HMAC-SHA256 |
| 2301 | // Size: 32 byte |
| 2302 | // Default: null or empty if the device identifier is not known |
| 2303 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2304 | // Connection handle of this connection if available |
| 2305 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2306 | // Default: 0xFFFF if the handle is unknown |
| 2307 | optional int32 connection_handle = 2; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2308 | // HCI command status code if this is triggered by hci_cmd |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2309 | // Default: STATUS_UNKNOWN |
| 2310 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 2311 | // Range: -30 ≤ N ≤ 20 |
| 2312 | // Units: dBm |
| 2313 | // Invalid when an out of range value is reported |
| 2314 | optional int32 transmit_power_level = 4; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2315 | // An identifier that can be used to match events for this device. |
| 2316 | // The incremental identifier is locally generated and guaranteed not derived |
| 2317 | // from any globally unique hardware id. |
| 2318 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2319 | // same remote device. |
| 2320 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2321 | // session for the same remote device. |
| 2322 | // Default: 0 if the device's metric id is unknown. |
| 2323 | optional int32 metric_id = 5; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2324 | } |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 2325 | |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 2326 | /** |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2327 | * Logs when Bluetooth controller failed to reply with command status within a timeout period after |
| 2328 | * receiving an HCI command from the host |
| 2329 | * |
| 2330 | * Logged from: system/bt |
| 2331 | */ |
| 2332 | message BluetoothHciTimeoutReported { |
| 2333 | // HCI command associated with this event |
| 2334 | // Default: CMD_UNKNOWN |
| 2335 | optional android.bluetooth.hci.CommandEnum hci_command = 1; |
| 2336 | } |
| 2337 | |
| 2338 | /** |
| 2339 | * Logs when we receive Bluetooth Link Quality Report event from the controller |
| 2340 | * See Android Bluetooth HCI specification for more details |
| 2341 | * |
| 2342 | * Note: all count and bytes field are counted since last event |
| 2343 | * |
| 2344 | * Logged from: system/bt |
| 2345 | */ |
| 2346 | message BluetoothQualityReportReported { |
| 2347 | // Quality report ID |
| 2348 | // Original type: uint8_t |
| 2349 | // Default: BQR_ID_UNKNOWN |
| 2350 | optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; |
| 2351 | // Packet type of the connection |
| 2352 | // Original type: uint8_t |
| 2353 | // Default: BQR_PACKET_TYPE_UNKNOWN |
| 2354 | optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; |
| 2355 | // Connection handle of the connection |
| 2356 | // Original type: uint16_t |
| 2357 | optional int32 connection_handle = 3; |
| 2358 | // Performing Role for the connection |
| 2359 | // Original type: uint8_t |
| 2360 | optional int32 connection_role = 4; |
| 2361 | // Current Transmit Power Level for the connection. This value is the same as the controller's |
| 2362 | // response to the HCI_Read_Transmit_Power_Level HCI command |
| 2363 | // Original type: uint8_t |
| 2364 | optional int32 tx_power_level = 5; |
| 2365 | // Received Signal Strength Indication (RSSI) value for the connection. This value is an |
| 2366 | // absolute receiver signal strength value |
| 2367 | // Original type: int8_t |
| 2368 | optional int32 rssi = 6; |
| 2369 | // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the |
| 2370 | // channels used by the link currently |
| 2371 | // Original type: uint8_t |
| 2372 | optional int32 snr = 7; |
| 2373 | // Indicates the number of unused channels in AFH_channel_map |
| 2374 | // Original type: uint8_t |
| 2375 | optional int32 unused_afh_channel_count = 8; |
| 2376 | // Indicates the number of the channels which are interfered and quality is bad but are still |
| 2377 | // selected for AFH |
| 2378 | // Original type: uint8_t |
| 2379 | optional int32 afh_select_unideal_channel_count = 9; |
| 2380 | // Current Link Supervision Timeout Setting |
| 2381 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2382 | // Original type: uint16_t |
| 2383 | optional int32 lsto = 10; |
| 2384 | // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's |
| 2385 | // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of |
| 2386 | // 0x01 (Piconet Clock) |
| 2387 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2388 | // Original type: uint32_t |
| 2389 | optional int64 connection_piconet_clock = 11; |
| 2390 | // The count of retransmission |
| 2391 | // Original type: uint32_t |
| 2392 | optional int64 retransmission_count = 12; |
| 2393 | // The count of no RX |
| 2394 | // Original type: uint32_t |
| 2395 | optional int64 no_rx_count = 13; |
| 2396 | // The count of NAK (Negative Acknowledge) |
| 2397 | // Original type: uint32_t |
| 2398 | optional int64 nak_count = 14; |
| 2399 | // Controller timestamp of last TX ACK |
| 2400 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2401 | // Original type: uint32_t |
| 2402 | optional int64 last_tx_ack_timestamp = 15; |
| 2403 | // The count of Flow-off (STOP) |
| 2404 | // Original type: uint32_t |
| 2405 | optional int64 flow_off_count = 16; |
| 2406 | // Controller timestamp of last Flow-on (GO) |
| 2407 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2408 | // Original type: uint32_t |
| 2409 | optional int64 last_flow_on_timestamp = 17; |
| 2410 | // Buffer overflow count (how many bytes of TX data are dropped) since the last event |
| 2411 | // Original type: uint32_t |
| 2412 | optional int64 buffer_overflow_bytes = 18; |
| 2413 | // Buffer underflow count (in byte) since last event |
| 2414 | // Original type: uint32_t |
| 2415 | optional int64 buffer_underflow_bytes = 19; |
| 2416 | } |
| 2417 | |
| 2418 | /** |
| 2419 | * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack |
| 2420 | * |
| 2421 | * Notes: |
| 2422 | * - Each event can be partially filled as we might learn different pieces of device |
| 2423 | * information at different time |
| 2424 | * - Multiple device info events can be combined to give more complete picture |
| 2425 | * - When multiple device info events tries to describe the same information, the |
| 2426 | * later one wins |
| 2427 | * |
| 2428 | * Logged from: |
| 2429 | * packages/apps/Bluetooth |
| 2430 | */ |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 2431 | message BluetoothDeviceInfoReported { |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2432 | // An identifier that can be used to match events for this device. |
| 2433 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2434 | // Salt: Randomly generated 256 bit value |
| 2435 | // Hash algorithm: HMAC-SHA256 |
| 2436 | // Size: 32 byte |
| 2437 | // Default: null or empty if the device identifier is not known |
| 2438 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2439 | // Where is this device info obtained from |
| 2440 | optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; |
| 2441 | // Name of the data source |
| 2442 | // For EXTERNAL: package name of the data source |
| 2443 | // For INTERNAL: null for general case, component name otherwise |
| 2444 | optional string source_name = 3; |
| 2445 | // Name of the manufacturer of this device |
| 2446 | optional string manufacturer = 4; |
| 2447 | // Model of this device |
| 2448 | optional string model = 5; |
| 2449 | // Hardware version of this device |
| 2450 | optional string hardware_version = 6; |
| 2451 | // Software version of this device |
| 2452 | optional string software_version = 7; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2453 | // An identifier that can be used to match events for this device. |
| 2454 | // The incremental identifier is locally generated and guaranteed not derived |
| 2455 | // from any globally unique hardware id. |
| 2456 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2457 | // same remote device. |
| 2458 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2459 | // session for the same remote device. |
| 2460 | // Default: 0 if the device's metric id is unknown. |
| 2461 | optional int32 metric_id = 8; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2462 | } |
| 2463 | |
| 2464 | /** |
| 2465 | * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote |
| 2466 | * device, as documented by the Bluetooth Core HCI specification |
| 2467 | * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification |
| 2468 | * Vol 2, Part E, Page 1118 |
| 2469 | * |
| 2470 | * Logged from: |
| 2471 | * system/bt |
| 2472 | */ |
| 2473 | message BluetoothRemoteVersionInfoReported { |
| 2474 | // Connection handle of the connection |
| 2475 | // Original type: uint16_t |
| 2476 | optional int32 connection_handle = 1; |
| 2477 | // HCI command status code |
| 2478 | // Default: STATUS_UNKNOWN |
| 2479 | optional android.bluetooth.hci.StatusEnum hci_status = 2; |
| 2480 | // 1 byte Version of current LMP in the remote controller |
| 2481 | optional int32 lmp_version = 3; |
| 2482 | // 2 bytes LMP manufacturer code of the remote controller |
| 2483 | // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers |
| 2484 | optional int32 lmp_manufacturer_code = 4; |
| 2485 | // 4 bytes subversion of the LMP in the remote controller |
| 2486 | optional int32 lmp_subversion = 5; |
| 2487 | } |
| 2488 | |
| 2489 | /** |
| 2490 | * Logs when certain Bluetooth SDP attributes are discovered |
| 2491 | * Constant definitions are from: |
| 2492 | * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery |
| 2493 | * |
| 2494 | * Current logged attributes: |
| 2495 | * - BluetoothProfileDescriptorList |
| 2496 | * - Supported Features Bitmask |
| 2497 | * |
| 2498 | * Logged from: |
| 2499 | * system/bt |
| 2500 | */ |
| 2501 | message BluetoothSdpAttributeReported { |
| 2502 | // An identifier that can be used to match events for this device. |
| 2503 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2504 | // Salt: Randomly generated 256 bit value |
| 2505 | // Hash algorithm: HMAC-SHA256 |
| 2506 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2507 | // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes |
| 2508 | // Original type: uint16_t |
| 2509 | optional int32 protocol_uuid = 2; |
| 2510 | // Short form UUIDs used to identify Bluetooth SDP attribute types |
| 2511 | // Original type: uint16_t |
| 2512 | optional int32 attribute_id = 3; |
| 2513 | // Attribute value for the particular attribute |
| 2514 | optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2515 | // An identifier that can be used to match events for this device. |
| 2516 | // The incremental identifier is locally generated and guaranteed not derived |
| 2517 | // from any globally unique hardware id. |
| 2518 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2519 | // same remote device. |
| 2520 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2521 | // session for the same remote device. |
| 2522 | // Default: 0 if the device's metric id is unknown. |
| 2523 | optional int32 metric_id = 5; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2524 | } |
| 2525 | |
| 2526 | /** |
| 2527 | * Logs when bond state of a Bluetooth device changes |
| 2528 | * |
| 2529 | * Logged from: |
| 2530 | * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| 2531 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2532 | */ |
| 2533 | message BluetoothBondStateChanged { |
| 2534 | // An identifier that can be used to match events for this device. |
| 2535 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2536 | // Salt: Randomly generated 256 bit value |
| 2537 | // Hash algorithm: HMAC-SHA256 |
| 2538 | // Size: 32 byte |
| 2539 | // Default: null or empty if the device identifier is not known |
| 2540 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2541 | // Preferred transport type to remote dual mode device |
| 2542 | // Default: TRANSPORT_AUTO means no preference |
| 2543 | optional android.bluetooth.TransportTypeEnum transport = 2; |
| 2544 | // The type of this Bluetooth device (Classic, LE, or Dual mode) |
| 2545 | // Default: UNKNOWN |
| 2546 | optional android.bluetooth.DeviceTypeEnum type = 3; |
| 2547 | // Current bond state (NONE, BONDING, BONDED) |
| 2548 | // Default: BOND_STATE_UNKNOWN |
| 2549 | optional android.bluetooth.BondStateEnum bond_state = 4; |
| 2550 | // Bonding sub state |
| 2551 | // Default: BOND_SUB_STATE_UNKNOWN |
| 2552 | optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; |
| 2553 | // Unbond Reason |
| 2554 | // Default: UNBOND_REASON_UNKNOWN |
| 2555 | optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2556 | // An identifier that can be used to match events for this device. |
| 2557 | // The incremental identifier is locally generated and guaranteed not derived |
| 2558 | // from any globally unique hardware id. |
| 2559 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2560 | // same remote device. |
| 2561 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2562 | // session for the same remote device. |
| 2563 | // Default: 0 if the device's metric id is unknown. |
| 2564 | optional int32 metric_id = 7; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2565 | } |
| 2566 | |
| 2567 | /** |
| 2568 | * Logs there is an event related Bluetooth classic pairing |
| 2569 | * |
| 2570 | * Logged from: |
| 2571 | * system/bt |
| 2572 | */ |
| 2573 | message BluetoothClassicPairingEventReported { |
| 2574 | // An identifier that can be used to match events for this device. |
| 2575 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2576 | // Salt: Randomly generated 256 bit value |
| 2577 | // Hash algorithm: HMAC-SHA256 |
| 2578 | // Size: 32 byte |
| 2579 | // Default: null or empty if the device identifier is not known |
| 2580 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2581 | // Connection handle of this connection if available |
| 2582 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2583 | // Default: 0xFFFF if the handle is unknown |
| 2584 | optional int32 connection_handle = 2; |
| 2585 | // HCI command associated with this event |
| 2586 | // Default: CMD_UNKNOWN |
| 2587 | optional android.bluetooth.hci.CommandEnum hci_cmd = 3; |
| 2588 | // HCI event associated with this event |
| 2589 | // Default: EVT_UNKNOWN |
| 2590 | optional android.bluetooth.hci.EventEnum hci_event = 4; |
| 2591 | // HCI command status code if this is triggerred by hci_cmd |
| 2592 | // Default: STATUS_UNKNOWN |
| 2593 | optional android.bluetooth.hci.StatusEnum cmd_status = 5; |
| 2594 | // HCI reason code associated with this event |
| 2595 | // Default: STATUS_UNKNOWN |
| 2596 | optional android.bluetooth.hci.StatusEnum reason_code = 6; |
Jack He | 3b25983 | 2019-03-20 03:47:29 -0700 | [diff] [blame] | 2597 | // A status value related to this specific event |
| 2598 | // Default: 0 |
| 2599 | optional int64 event_value = 7; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2600 | // An identifier that can be used to match events for this device. |
| 2601 | // The incremental identifier is locally generated and guaranteed not derived |
| 2602 | // from any globally unique hardware id. |
| 2603 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2604 | // same remote device. |
| 2605 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2606 | // session for the same remote device. |
| 2607 | // Default: 0 if the device's metric id is unknown. |
| 2608 | optional int32 metric_id = 8; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2609 | } |
| 2610 | |
| 2611 | /** |
| 2612 | * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) |
| 2613 | * |
| 2614 | * Logged from: |
| 2615 | * system/bt |
| 2616 | */ |
| 2617 | message BluetoothSmpPairingEventReported { |
| 2618 | // An identifier that can be used to match events for this device. |
| 2619 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2620 | // Salt: Randomly generated 256 bit value |
| 2621 | // Hash algorithm: HMAC-SHA256 |
| 2622 | // Size: 32 byte |
| 2623 | // Default: null or empty if the device identifier is not known |
| 2624 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2625 | // SMP command sent or received over L2CAP |
| 2626 | // Default: CMD_UNKNOWN |
| 2627 | optional android.bluetooth.smp.CommandEnum smp_command = 2; |
| 2628 | // Whether this command is sent or received |
| 2629 | // Default: DIRECTION_UNKNOWN |
| 2630 | optional android.bluetooth.DirectionEnum direction = 3; |
| 2631 | // SMP failure reason code |
| 2632 | // Default: PAIRING_FAIL_REASON_DEFAULT |
| 2633 | optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2634 | // An identifier that can be used to match events for this device. |
| 2635 | // The incremental identifier is locally generated and guaranteed not derived |
| 2636 | // from any globally unique hardware id. |
| 2637 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2638 | // same remote device. |
| 2639 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2640 | // session for the same remote device. |
| 2641 | // Default: 0 if the device's metric id is unknown. |
| 2642 | optional int32 metric_id = 5; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2643 | } |
| 2644 | |
| 2645 | /** |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2646 | * Logs when a Bluetooth socket’s connection state changed |
| 2647 | * |
| 2648 | * Logged from: |
| 2649 | * system/bt |
| 2650 | */ |
| 2651 | message BluetoothSocketConnectionStateChanged { |
| 2652 | // An identifier that can be used to match events for this device. |
| 2653 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2654 | // Salt: Randomly generated 256 bit value |
| 2655 | // Hash algorithm: HMAC-SHA256 |
| 2656 | // Size: 32 byte |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2657 | // Default: null or empty if this is a server listener socket |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2658 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2659 | // Temporary port of this socket for the current connection or session only |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2660 | // Default 0 when unknown or don't care |
| 2661 | optional int32 port = 2; |
| 2662 | // Socket type as mentioned in |
| 2663 | // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java |
| 2664 | // Default: SOCKET_TYPE_UNKNOWN |
| 2665 | optional android.bluetooth.SocketTypeEnum type = 3; |
| 2666 | // Socket connection state |
| 2667 | // Default: SOCKET_CONNECTION_STATE_UNKNOWN |
| 2668 | optional android.bluetooth.SocketConnectionstateEnum state = 4; |
| 2669 | // Number of bytes sent to remote device during this connection |
| 2670 | optional int64 tx_bytes = 5; |
| 2671 | // Number of bytes received from remote device during this connection |
| 2672 | optional int64 rx_bytes = 6; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2673 | // Socket owner's UID |
| 2674 | optional int32 uid = 7 [(is_uid) = true]; |
| 2675 | // Server port of this socket, if any. When both |server_port| and |port| fields are populated, |
| 2676 | // |port| must be spawned by |server_port| |
| 2677 | // Default 0 when unknown or don't care |
| 2678 | optional int32 server_port = 8; |
| 2679 | // Whether this is a server listener socket |
| 2680 | optional android.bluetooth.SocketRoleEnum is_server = 9; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2681 | // An identifier that can be used to match events for this device. |
| 2682 | // The incremental identifier is locally generated and guaranteed not derived |
| 2683 | // from any globally unique hardware id. |
| 2684 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2685 | // same remote device. |
| 2686 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2687 | // session for the same remote device. |
| 2688 | // Default: 0 if the device's metric id is unknown. |
| 2689 | optional int32 metric_id = 10; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2690 | } |
| 2691 | |
| 2692 | /** |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2693 | * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection |
| 2694 | * |
| 2695 | * Logged from: |
| 2696 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2697 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 2698 | * |
| 2699 | */ |
| 2700 | message BluetoothClassOfDeviceReported { |
| 2701 | // An identifier that can be used to match events for this device. |
| 2702 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2703 | // Salt: Randomly generated 256 bit value |
| 2704 | // Hash algorithm: HMAC-SHA256 |
| 2705 | // Size: 32 byte |
| 2706 | // Default: null or empty if this is a server listener socket |
| 2707 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2708 | // Class of Device (CoD) value including both Major, Minor device class and service class |
| 2709 | // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband |
| 2710 | // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass |
| 2711 | // Default: 0 |
| 2712 | optional int32 class_of_device = 2; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2713 | // An identifier that can be used to match events for this device. |
| 2714 | // The incremental identifier is locally generated and guaranteed not derived |
| 2715 | // from any globally unique hardware id. |
| 2716 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2717 | // same remote device. |
| 2718 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2719 | // session for the same remote device. |
| 2720 | // Default: 0 if the device's metric id is unknown. |
| 2721 | optional int32 metric_id = 3; |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2722 | } |
| 2723 | |
| 2724 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2725 | * Logs when something is plugged into or removed from the USB-C connector. |
| 2726 | * |
| 2727 | * Logged from: |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2728 | * UsbService |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2729 | */ |
| 2730 | message UsbConnectorStateChanged { |
| 2731 | enum State { |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2732 | STATE_DISCONNECTED = 0; |
| 2733 | STATE_CONNECTED = 1; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2734 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 2735 | optional State state = 1 |
| 2736 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
| 2737 | optional string id = 2 [(state_field_option).primary_field = true]; |
Badhri Jagan Sridharan | faf6207 | 2018-11-16 17:17:03 -0800 | [diff] [blame] | 2738 | // Last active session in ms. |
| 2739 | // 0 when the port is in connected state. |
| 2740 | optional int64 last_connect_duration_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2741 | } |
| 2742 | |
| 2743 | /** |
| 2744 | * Logs the reported speaker impedance. |
| 2745 | * |
| 2746 | * Logged from: |
| 2747 | * Vendor audio implementation. |
| 2748 | */ |
| 2749 | message SpeakerImpedanceReported { |
| 2750 | optional int32 speaker_location = 1; |
| 2751 | optional int32 impedance = 2; |
| 2752 | } |
| 2753 | |
| 2754 | /** |
| 2755 | * Logs the report of a failed hardware. |
| 2756 | * |
| 2757 | * Logged from: |
| 2758 | * Vendor HALs. |
| 2759 | * |
| 2760 | */ |
| 2761 | message HardwareFailed { |
| 2762 | enum HardwareType { |
| 2763 | HARDWARE_FAILED_UNKNOWN = 0; |
| 2764 | HARDWARE_FAILED_MICROPHONE = 1; |
| 2765 | HARDWARE_FAILED_CODEC = 2; |
| 2766 | HARDWARE_FAILED_SPEAKER = 3; |
| 2767 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 2768 | } |
| 2769 | optional HardwareType hardware_type = 1; |
| 2770 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2771 | /** |
| 2772 | * hardware_location allows vendors to differentiate between multiple instances of |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2773 | * the same hardware_type. The specific locations are vendor defined integers, |
| 2774 | * referring to board-specific numbering schemes. |
| 2775 | */ |
| 2776 | optional int32 hardware_location = 2; |
| 2777 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2778 | /** |
| 2779 | * failure_code is specific to the HardwareType of the failed hardware. |
| 2780 | * It should use one of the enum values defined below. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2781 | */ |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2782 | enum HardwareErrorCode { |
| 2783 | UNKNOWN = 0; |
| 2784 | COMPLETE = 1; |
| 2785 | SPEAKER_HIGH_Z = 2; |
| 2786 | SPEAKER_SHORT = 3; |
| 2787 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 2788 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
Maggie White | b76cebc | 2019-02-05 15:21:29 -0800 | [diff] [blame] | 2789 | DEGRADE = 6; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2790 | } |
| 2791 | optional int32 failure_code = 3; |
| 2792 | } |
| 2793 | |
| 2794 | /** |
| 2795 | * Log an event when the device has been physically dropped. |
| 2796 | * Reported from the /vendor partition. |
| 2797 | */ |
| 2798 | message PhysicalDropDetected { |
| 2799 | // Confidence that the event was actually a drop, 0 -> 100 |
| 2800 | optional int32 confidence_pctg = 1; |
| 2801 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 2802 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 2803 | // Duration of freefall in ms |
| 2804 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2805 | } |
| 2806 | |
| 2807 | /** |
| 2808 | * Log bucketed battery charge cycles. |
| 2809 | * |
| 2810 | * Each bucket represents cycles of the battery past |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2811 | * a given charge point. For example, if 10 cycle buckets are |
| 2812 | * initialized, bucket 1 is the lowest 1/10th of the battery, |
| 2813 | * and bucket 10 is 100%. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2814 | * |
| 2815 | * Logged from: |
| 2816 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 2817 | */ |
| 2818 | message ChargeCyclesReported { |
| 2819 | optional int32 cycle_bucket_1 = 1; |
| 2820 | optional int32 cycle_bucket_2 = 2; |
| 2821 | optional int32 cycle_bucket_3 = 3; |
| 2822 | optional int32 cycle_bucket_4 = 4; |
| 2823 | optional int32 cycle_bucket_5 = 5; |
| 2824 | optional int32 cycle_bucket_6 = 6; |
| 2825 | optional int32 cycle_bucket_7 = 7; |
| 2826 | optional int32 cycle_bucket_8 = 8; |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2827 | optional int32 cycle_bucket_9 = 9; |
| 2828 | optional int32 cycle_bucket_10 = 10; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2829 | } |
| 2830 | |
| 2831 | /** |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2832 | * Log battery health snapshot. |
| 2833 | * |
| 2834 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 2835 | * are snapshotted periodically over 24hrs. |
| 2836 | */ |
| 2837 | message BatteryHealthSnapshot { |
| 2838 | enum BatterySnapshotType { |
| 2839 | UNKNOWN = 0; |
| 2840 | MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 2841 | MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 2842 | MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 2843 | MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 2844 | MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 2845 | MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 2846 | MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 2847 | MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 2848 | MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 2849 | MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 2850 | AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 2851 | } |
| 2852 | optional BatterySnapshotType type = 1; |
| 2853 | // Temperature, in 1/10ths of degree C. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2854 | optional int32 temperature_deci_celsius = 2; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2855 | // Voltage Battery Voltage, in microVolts. |
| 2856 | optional int32 voltage_micro_volt = 3; |
| 2857 | // Current Battery current, in microAmps. |
| 2858 | optional int32 current_micro_amps = 4; |
| 2859 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 2860 | optional int32 open_circuit_micro_volt = 5; |
| 2861 | // Resistance Battery Resistance, in microOhms. |
| 2862 | optional int32 resistance_micro_ohm = 6; |
| 2863 | // Level Battery Level, as % of full. |
| 2864 | optional int32 level_percent = 7; |
| 2865 | } |
| 2866 | |
| 2867 | /** |
| 2868 | * Log slow I/O operations on the primary storage. |
| 2869 | */ |
| 2870 | message SlowIo { |
| 2871 | // Classifications of IO Operations. |
| 2872 | enum IoOperation { |
| 2873 | UNKNOWN = 0; |
| 2874 | READ = 1; |
| 2875 | WRITE = 2; |
| 2876 | UNMAP = 3; |
| 2877 | SYNC = 4; |
| 2878 | } |
| 2879 | optional IoOperation operation = 1; |
| 2880 | |
| 2881 | // The number of slow IO operations of this type over 24 hours. |
| 2882 | optional int32 count = 2; |
| 2883 | } |
| 2884 | |
| 2885 | /** |
| 2886 | * Log battery caused shutdown with the last recorded voltage. |
| 2887 | */ |
| 2888 | message BatteryCausedShutdown { |
| 2889 | // The last recorded battery voltage prior to shutdown. |
| 2890 | optional int32 last_recorded_micro_volt = 1; |
| 2891 | } |
| 2892 | |
| 2893 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 2894 | * Logs when ThermalService receives throttling events. |
| 2895 | * |
| 2896 | * Logged from: |
| 2897 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 2898 | */ |
| 2899 | message ThermalThrottlingSeverityStateChanged { |
| 2900 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
| 2901 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 2902 | |
| 2903 | // The name of the temperature source. Eg. CPU0 |
| 2904 | optional string sensor_name = 2; |
| 2905 | |
| 2906 | // Temperature in tenths of a degree C. |
| 2907 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
| 2908 | optional int32 temperature_deci_celsius = 3; |
| 2909 | |
| 2910 | // Relative severity of the throttling, see enum definition. |
| 2911 | optional android.os.ThrottlingSeverityEnum severity = 4; |
| 2912 | } |
| 2913 | |
| 2914 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2915 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 2916 | * |
| 2917 | * Logged from: |
| 2918 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 2919 | */ |
| 2920 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2921 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2922 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2923 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2924 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2925 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2926 | } |
| 2927 | |
| 2928 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2929 | * Logs phone signal strength changes. |
| 2930 | * |
| 2931 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2932 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2933 | */ |
| 2934 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 2935 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 2936 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2937 | } |
| 2938 | |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 2939 | |
| 2940 | /** |
| 2941 | * Logs when the phone state, sim state or signal strength changes |
| 2942 | * |
| 2943 | * Logged from: |
| 2944 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2945 | */ |
| 2946 | message PhoneServiceStateChanged { |
| 2947 | optional android.telephony.ServiceStateEnum state = 1; |
| 2948 | optional android.telephony.SimStateEnum sim_state = 2; |
| 2949 | optional android.telephony.SignalStrengthEnum signal_strength = 3; |
| 2950 | } |
| 2951 | |
| 2952 | /** |
| 2953 | * Logs when the phone becomes on or off. |
| 2954 | * |
| 2955 | * Logged from: |
| 2956 | * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java |
| 2957 | */ |
| 2958 | message PhoneStateChanged { |
| 2959 | enum State { |
| 2960 | OFF = 0; |
| 2961 | ON = 1; |
| 2962 | } |
| 2963 | optional State state = 1; |
| 2964 | } |
| 2965 | |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 2966 | message BackGesture { |
| 2967 | enum BackType { |
Maryam Karimzadehgan | 4f9ab82 | 2020-03-09 14:51:07 -0700 | [diff] [blame] | 2968 | DEFAULT_BACK_TYPE = 0; |
| 2969 | COMPLETED = 1; |
| 2970 | COMPLETED_REJECTED = 2; // successful because coming from rejected area |
| 2971 | INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area |
| 2972 | INCOMPLETE = 4; // Unsuccessful, for reasons other than below. |
| 2973 | INCOMPLETE_FAR_FROM_EDGE = 5; // Unsuccessful, far from the edge. |
| 2974 | INCOMPLETE_MULTI_TOUCH = 6; // Unsuccessful, multi touch. |
| 2975 | INCOMPLETE_LONG_PRESS = 7; // Unsuccessful, long press. |
| 2976 | INCOMPLETE_VERTICAL_MOVE = 8; // Unsuccessful, move vertically. |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 2977 | } |
| 2978 | optional BackType type = 1; |
| 2979 | |
Maryam Karimzadehgan | 4f9ab82 | 2020-03-09 14:51:07 -0700 | [diff] [blame] | 2980 | optional int32 y_coordinate = 2 [deprecated = true]; // y coordinate for ACTION_DOWN event |
| 2981 | optional int32 start_x = 4; // X coordinate for ACTION_DOWN event. |
| 2982 | optional int32 start_y = 5; // Y coordinate for ACTION_DOWN event. |
| 2983 | optional int32 end_x = 6; // X coordinate for ACTION_MOVE event. |
| 2984 | optional int32 end_y = 7; // Y coordinate for ACTION_MOVE event. |
| 2985 | optional int32 left_boundary = 8; // left edge width + left inset |
| 2986 | optional int32 right_boundary = 9; // screen width - (right edge width + right inset) |
| 2987 | |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 2988 | enum WindowHorizontalLocation { |
| 2989 | DEFAULT_LOCATION = 0; |
| 2990 | LEFT = 1; |
| 2991 | RIGHT = 2; |
| 2992 | } |
Maryam Karimzadehgan | 4f9ab82 | 2020-03-09 14:51:07 -0700 | [diff] [blame] | 2993 | optional WindowHorizontalLocation x_location = 3 [deprecated = true]; |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 2994 | } |
| 2995 | |
| 2996 | message ExclusionRectStateChanged { |
| 2997 | optional string component_name = 1; // if not available, simply packageName |
| 2998 | optional int32 requested_height = 2; // px |
| 2999 | optional int32 rejected_height = 3; // px |
| 3000 | |
| 3001 | enum WindowHorizontalLocation { |
| 3002 | DEFAULT_LOCATION = 0; |
| 3003 | LEFT = 1; |
| 3004 | RIGHT = 2; |
| 3005 | } |
| 3006 | optional WindowHorizontalLocation x_location = 4; |
| 3007 | optional bool landscape = 5; |
| 3008 | optional bool splitscreen = 6; |
| 3009 | optional int32 duration_millis = 7; |
| 3010 | } |
| 3011 | |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3012 | /** |
| 3013 | * Logs when Launcher (HomeScreen) UI has changed or was interacted. |
| 3014 | * |
| 3015 | * Logged from: |
| 3016 | * packages/apps/Launcher3 |
| 3017 | */ |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 3018 | message LauncherUIChanged { |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3019 | optional android.stats.launcher.LauncherAction action = 1 [deprecated = true]; |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 3020 | optional android.stats.launcher.LauncherState src_state = 2; |
| 3021 | optional android.stats.launcher.LauncherState dst_state = 3; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3022 | optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES, deprecated = true]; |
| 3023 | optional bool is_swipe_up_enabled = 5 [deprecated = true]; |
| 3024 | |
| 3025 | // The event id (e.g., app launch, drag and drop, long press) |
| 3026 | optional int32 event_id = 6; |
| 3027 | // The event's source or target id (e.g., icon, task, button) |
| 3028 | optional int32 target_id = 7; |
| 3029 | // If the target needs to be tracked, use this id field |
| 3030 | optional int32 instance_id = 8; |
| 3031 | optional int32 uid = 9 [(is_uid) = true]; |
| 3032 | optional string package_name = 10; |
| 3033 | optional string component_name = 11; |
| 3034 | |
| 3035 | // (x, y) coordinate and the index information of the target on the container |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3036 | optional int32 grid_x = 12 [default = -1]; |
| 3037 | optional int32 grid_y = 13 [default = -1]; |
| 3038 | optional int32 page_id = 14 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3039 | |
| 3040 | // e.g., folder icon's (x, y) location and index information on the workspace |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3041 | optional int32 grid_x_parent = 15 [default = -1]; |
| 3042 | optional int32 grid_y_parent = 16 [default = -1]; |
| 3043 | optional int32 page_id_parent = 17 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3044 | |
| 3045 | // e.g., SEARCHBOX_ALLAPPS, FOLDER_WORKSPACE |
| 3046 | optional int32 hierarchy = 18; |
| 3047 | |
| 3048 | optional bool is_work_profile = 19; |
| 3049 | |
| 3050 | // Used to store the predicted rank of the target |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3051 | optional int32 rank = 20 [default = -1]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3052 | |
| 3053 | // e.g., folderLabelState can be captured in the following two fields |
| 3054 | optional int32 from_state = 21; |
| 3055 | optional int32 to_state = 22; |
| 3056 | |
| 3057 | // e.g., autofilled or suggested texts that are not user entered |
| 3058 | optional string edittext = 23; |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3059 | |
| 3060 | // e.g., number of contents inside a container (e.g., icons inside a folder) |
| 3061 | optional int32 cardinality = 24; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 3062 | } |
| 3063 | |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3064 | /** |
| 3065 | * Used for snapshot of the HomeScreen UI elements |
| 3066 | * |
| 3067 | * Logged from: |
| 3068 | * packages/apps/Launcher3 |
| 3069 | */ |
| 3070 | message LauncherStaticLayout { |
| 3071 | // The event id (e.g., snapshot, drag and drop) |
| 3072 | optional int32 event_id = 1; |
| 3073 | // The event's source or target id (e.g., icon, shortcut, widget) |
| 3074 | optional int32 target_id = 2; |
| 3075 | // If the target needs to be tracked, use this id field |
| 3076 | optional int32 instance_id = 3; |
| 3077 | optional int32 uid = 4 [(is_uid) = true]; |
| 3078 | optional string package_name = 5; |
| 3079 | optional string component_name = 6; |
| 3080 | |
| 3081 | // (x, y) coordinate and the index information of the target on the container |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3082 | optional int32 grid_x = 7 [default = -1]; |
| 3083 | optional int32 grid_y = 8 [default = -1]; |
| 3084 | optional int32 page_id = 9 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3085 | |
| 3086 | // e.g., folder icon's (x, y) location and index information on the workspace |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3087 | // e.g., when used with widgets target, use these values for (span_x, span_y) |
| 3088 | optional int32 grid_x_parent = 10 [default = -1]; |
| 3089 | optional int32 grid_y_parent = 11 [default = -1]; |
| 3090 | optional int32 page_id_parent = 12 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3091 | |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3092 | // UNKNOWN = 0 |
| 3093 | // HOTSEAT = 1 |
| 3094 | // WORKSPACE = 2 |
| 3095 | // FOLDER_HOTSEAT = 3 |
| 3096 | // FOLDER_WORKSPACE = 4 |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3097 | optional int32 hierarchy = 13; |
| 3098 | |
| 3099 | optional bool is_work_profile = 14; |
| 3100 | |
| 3101 | // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION |
| 3102 | optional int32 origin = 15; |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3103 | |
| 3104 | // e.g., number of icons inside a folder |
| 3105 | optional int32 cardinality = 16; |
| 3106 | |
| 3107 | // e.g., (x, y) span of the widget inside homescreen grid system |
| 3108 | optional int32 span_x = 17 [default = 1]; |
| 3109 | optional int32 span_y = 18 [default = 1]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3110 | } |
| 3111 | |
| 3112 | /** |
| 3113 | * Logs when Wallpaper or ThemePicker UI has changed. |
| 3114 | * |
| 3115 | * Logged from: |
| 3116 | * packages/apps/ThemePicker |
| 3117 | * packages/apps/WallpaperPicker2 |
| 3118 | */ |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 3119 | message StyleUIChanged { |
| 3120 | optional android.stats.style.Action action = 1; |
| 3121 | optional int32 color_package_hash = 2; |
| 3122 | optional int32 font_package_hash = 3; |
| 3123 | optional int32 shape_package_hash = 4; |
| 3124 | optional int32 clock_package_hash = 5; |
| 3125 | optional int32 launcher_grid = 6; |
| 3126 | optional int32 wallpaper_category_hash = 7; |
| 3127 | optional int32 wallpaper_id_hash = 8; |
Kunhung Li | 286c52f | 2019-05-21 20:10:43 +0800 | [diff] [blame] | 3128 | optional int32 color_preference = 9; |
| 3129 | optional android.stats.style.LocationPreference location_preference = 10; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 3130 | } |
| 3131 | |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3132 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3133 | * Logs when Settings UI has changed. |
| 3134 | * |
| 3135 | * Logged from: |
| 3136 | * packages/apps/Settings |
| 3137 | */ |
| 3138 | message SettingsUIChanged { |
| 3139 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3140 | * Where this SettingsUIChange event comes from. For example, if |
| 3141 | * it's a PAGE_VISIBLE event, where the page is opened from. |
| 3142 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 3143 | optional android.app.settings.PageId attribution = 1; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3144 | |
| 3145 | /** |
| 3146 | * What the UI action is. |
| 3147 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 3148 | optional android.app.settings.Action action = 2; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3149 | |
| 3150 | /** |
| 3151 | * Where the action is happening |
| 3152 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 3153 | optional android.app.settings.PageId page_id = 3; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3154 | |
| 3155 | /** |
| 3156 | * What preference changed in this event. |
| 3157 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 3158 | optional string changed_preference_key = 4; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3159 | |
| 3160 | /** |
| 3161 | * The new value of the changed preference. |
| 3162 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 3163 | optional int64 changed_preference_int_value = 5; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3164 | } |
| 3165 | |
| 3166 | /** |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3167 | * Logs basic timing information about touch events. |
| 3168 | * Reported at most every 5 minutes while device is being interacted with. |
| 3169 | * |
| 3170 | * Logged from: |
| 3171 | * frameworks/native/services/inputflinger |
| 3172 | */ |
| 3173 | message TouchEventReported { |
| 3174 | /** |
| 3175 | * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 3176 | * and the standard deviation of the time spent processing touchscreen events |
| 3177 | * in the kernel and inputflinger. The units are microseconds. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3178 | * |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 3179 | * On supported devices, the starting point is taken during the hard interrupt inside the |
| 3180 | * kernel touch driver. On all other devices, the starting point is taken inside |
| 3181 | * the kernel's input event subsystem upon receipt of the input event. |
| 3182 | * The ending point is taken inside InputDispatcher, just after the input event |
| 3183 | * is sent to the app. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3184 | */ |
| 3185 | // Minimum value |
| 3186 | optional float latency_min_micros = 1; |
| 3187 | // Maximum value |
| 3188 | optional float latency_max_micros = 2; |
| 3189 | // Average value |
| 3190 | optional float latency_mean_micros = 3; |
| 3191 | // Standard deviation |
| 3192 | optional float latency_stdev_micros = 4; |
Siarhei Vishniakou | ca954f9 | 2019-03-22 16:41:14 -0700 | [diff] [blame] | 3193 | // Number of touch events (input_event) in this report |
| 3194 | optional int32 count = 5; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3195 | } |
| 3196 | |
| 3197 | /** |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 3198 | * Logs gesture classification and timing information for touch events. |
| 3199 | * |
| 3200 | * Logged from: |
| 3201 | * frameworks/base/core/java/android/view/GestureDetector.java |
| 3202 | * frameworks/base/core/java/android/view/View.java |
| 3203 | */ |
| 3204 | message TouchGestureClassified { |
| 3205 | // The source of the classification (e.g. Java class name). |
| 3206 | optional string source = 1; |
| 3207 | |
| 3208 | enum Classification { |
| 3209 | UNKNOWN_CLASSIFICATION = 0; |
| 3210 | SINGLE_TAP = 1; |
| 3211 | DOUBLE_TAP = 2; |
| 3212 | LONG_PRESS = 3; |
| 3213 | DEEP_PRESS = 4; |
| 3214 | SCROLL = 5; |
| 3215 | } |
| 3216 | // The classification of the gesture. |
| 3217 | optional Classification classification = 2; |
| 3218 | |
| 3219 | // The interval from the start of a touch event stream until the |
| 3220 | // classification was made. |
| 3221 | optional int32 latency_millis = 3; |
| 3222 | |
| 3223 | // The distance from the location of the first touch event to the |
| 3224 | // location of the touch event when the classification was made. |
| 3225 | optional float displacement_px = 4; |
| 3226 | } |
| 3227 | |
| 3228 | /** |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3229 | * Logs that a setting was updated. |
| 3230 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 3231 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3232 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 3233 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 3234 | */ |
| 3235 | message SettingChanged { |
| 3236 | // The name of the setting. |
| 3237 | optional string setting = 1; |
| 3238 | |
| 3239 | // The change being imposed on this setting. May represent a number, eg "3". |
| 3240 | optional string value = 2; |
| 3241 | |
| 3242 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 3243 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 3244 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 3245 | // The +/- feature is currently only used for location_providers_allowed. |
| 3246 | optional string new_value = 3; |
| 3247 | |
| 3248 | // The previous value of this setting. |
| 3249 | optional string prev_value = 4; |
| 3250 | |
| 3251 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 3252 | optional string tag = 5; |
| 3253 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 3254 | // True if this setting with tag should be resettable. |
| 3255 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3256 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 3257 | // The associated user (for multi-user feature). Defined in android/os/UserHandle.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3258 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 3259 | |
| 3260 | enum ChangeReason { |
| 3261 | UPDATED = 1; // Updated can be an insertion or an update. |
| 3262 | DELETED = 2; |
| 3263 | } |
| 3264 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3265 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 3266 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3267 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 3268 | * Logs activity going to foreground or background |
| 3269 | * |
| 3270 | * Logged from: |
| 3271 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 3272 | */ |
| 3273 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3274 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 3275 | optional string pkg_name = 2; |
| 3276 | optional string class_name = 3; |
| 3277 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3278 | enum State { |
| 3279 | BACKGROUND = 0; |
| 3280 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 3281 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3282 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 3283 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3284 | |
| 3285 | /** |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 3286 | * Logs when a volume entered low Storage state. |
| 3287 | * Logged from: |
| 3288 | * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java |
| 3289 | */ |
| 3290 | message LowStorageStateChanged { |
| 3291 | // Volume that ran out of storage. |
| 3292 | optional string volume_description = 1; |
| 3293 | |
| 3294 | enum State { |
| 3295 | UNKNOWN = 0; |
| 3296 | OFF = 1; |
| 3297 | ON = 2; |
| 3298 | } |
| 3299 | optional State state = 2; |
| 3300 | } |
| 3301 | |
| 3302 | /** |
| 3303 | * Logs when an app is downgraded. |
| 3304 | * Logged from: |
| 3305 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 3306 | */ |
| 3307 | message AppDowngraded { |
| 3308 | optional string package_name = 1; |
| 3309 | // Size of the package (all data) before being downgraded. |
| 3310 | optional int64 size_in_bytes_before = 2; |
| 3311 | // Size of the package (all data) after being downgraded. |
| 3312 | optional int64 size_in_bytes_after = 3; |
| 3313 | |
| 3314 | optional bool aggressive = 4; |
| 3315 | } |
| 3316 | |
| 3317 | /** |
| 3318 | * Logs when an app is optimized after being downgraded. |
| 3319 | * Logged from: |
| 3320 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 3321 | */ |
| 3322 | message AppOptimizedAfterDowngraded { |
| 3323 | optional string package_name = 1; |
| 3324 | } |
| 3325 | |
| 3326 | /** |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 3327 | * Logs whenever an app is installed on external storage. |
| 3328 | * Logged from: |
| 3329 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 3330 | */ |
| 3331 | message AppInstallOnExternalStorageReported { |
| 3332 | // The type of external storage. |
| 3333 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 3334 | // The name of the package that is installed on the sd card. |
| 3335 | optional string package_name = 2; |
| 3336 | } |
| 3337 | |
| 3338 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3339 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3340 | * Logged from: |
| 3341 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3342 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3343 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3344 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3345 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3346 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3347 | |
| 3348 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3349 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3350 | optional string process_name = 3; |
| 3351 | |
| 3352 | // The pid if available. -1 means not available. |
Howard Ro | 8e05174 | 2020-03-20 15:07:20 -0700 | [diff] [blame] | 3353 | optional int32 pid = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 3354 | |
| 3355 | optional string package_name = 5; |
| 3356 | |
| 3357 | enum InstantApp { |
| 3358 | UNAVAILABLE = 0; |
| 3359 | FALSE = 1; |
| 3360 | TRUE = 2; |
| 3361 | } |
| 3362 | optional InstantApp is_instant_app = 6; |
| 3363 | |
| 3364 | enum ForegroundState { |
| 3365 | UNKNOWN = 0; |
| 3366 | BACKGROUND = 1; |
| 3367 | FOREGROUND = 2; |
| 3368 | } |
| 3369 | optional ForegroundState foreground_state = 7; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3370 | |
| 3371 | optional android.server.ErrorSource error_source = 8; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3372 | } |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3373 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3374 | /** |
| 3375 | * Logs when a WTF (What a Terrible Failure) happened. |
| 3376 | * Logged from: |
| 3377 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3378 | */ |
| 3379 | message WTFOccurred { |
| 3380 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3381 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3382 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3383 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3384 | // The name of the process. |
| 3385 | // system_server if it is not by an app |
| 3386 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 3387 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3388 | // The pid if available. -1 means not available. |
Howard Ro | 8e05174 | 2020-03-20 15:07:20 -0700 | [diff] [blame] | 3389 | optional int32 pid = 4; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3390 | |
| 3391 | optional android.server.ErrorSource error_source = 5; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3392 | } |
| 3393 | |
| 3394 | /** |
| 3395 | * Logs when system server reports low memory. |
| 3396 | * Logged from: |
| 3397 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3398 | */ |
| 3399 | message LowMemReported { |
| 3400 | } |
| 3401 | |
| 3402 | /** |
| 3403 | * Logs when an app ANR (App Not Responding) occurs. |
| 3404 | * Logged from: |
| 3405 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 3406 | */ |
| 3407 | message ANROccurred { |
| 3408 | optional int32 uid = 1 [(is_uid) = true]; |
| 3409 | |
| 3410 | optional string process_name = 2; |
| 3411 | |
| 3412 | optional string short_component_name = 3; |
| 3413 | |
| 3414 | optional string reason = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 3415 | |
| 3416 | enum InstantApp { |
| 3417 | UNAVAILABLE = 0; |
| 3418 | FALSE = 1; |
| 3419 | TRUE = 2; |
| 3420 | } |
| 3421 | optional InstantApp is_instant_app = 5; |
| 3422 | |
| 3423 | enum ForegroundState { |
| 3424 | UNKNOWN = 0; |
| 3425 | BACKGROUND = 1; |
| 3426 | FOREGROUND = 2; |
| 3427 | } |
| 3428 | optional ForegroundState foreground_state = 6; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3429 | |
| 3430 | optional android.server.ErrorSource error_source = 7; |
| 3431 | |
| 3432 | optional string package_name = 8; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3433 | } |
| 3434 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 3435 | /** |
| 3436 | * Logs when the vibrator state changes. |
| 3437 | * Logged from: |
| 3438 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 3439 | */ |
| 3440 | message VibratorStateChanged { |
| 3441 | repeated AttributionNode attribution_node = 1; |
| 3442 | |
| 3443 | enum State { |
| 3444 | OFF = 0; |
| 3445 | ON = 1; |
| 3446 | } |
| 3447 | optional State state = 2; |
| 3448 | |
| 3449 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 3450 | // Only applicable for State == ON. |
| 3451 | optional int64 duration_millis = 3; |
| 3452 | } |
| 3453 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3454 | /* |
| 3455 | * Allows other apps to push events into statsd. |
| 3456 | * Logged from: |
| 3457 | * frameworks/base/core/java/android/util/StatsLog.java |
| 3458 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3459 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3460 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3461 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3462 | |
| 3463 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 3464 | optional int32 label = 2; |
| 3465 | |
| 3466 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 3467 | // predicates for the metrics). |
| 3468 | enum State { |
| 3469 | UNKNOWN = 0; |
| 3470 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 3471 | STOP = 2; |
| 3472 | START = 3; |
| 3473 | } |
| 3474 | optional State state = 3; |
| 3475 | } |
| 3476 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3477 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 3478 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 3479 | * For example, this could be due to the user manually changing the time. |
| 3480 | * |
| 3481 | * Logged from: |
| 3482 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 3483 | */ |
| 3484 | message WallClockTimeShifted { |
| 3485 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 3486 | optional int64 wall_clock_timestamp_millis = 1; |
| 3487 | } |
| 3488 | |
| 3489 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3490 | * Logs when statsd detects an anomaly. |
| 3491 | * |
| 3492 | * Logged from: |
| 3493 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 3494 | */ |
| 3495 | message AnomalyDetected { |
| 3496 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3497 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3498 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 3499 | // Id of the config whose anomaly detection alert fired. |
| 3500 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3501 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 3502 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 3503 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3504 | } |
| 3505 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3506 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3507 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3508 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3509 | |
| 3510 | // The app package name. |
| 3511 | optional string pkg_name = 2; |
| 3512 | |
| 3513 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3514 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3515 | WARM = 1; |
| 3516 | HOT = 2; |
| 3517 | COLD = 3; |
| 3518 | } |
| 3519 | // The transition type. |
| 3520 | optional TransitionType type = 3; |
| 3521 | |
| 3522 | // The activity name. |
| 3523 | optional string activity_name = 4; |
| 3524 | |
| 3525 | // The name of the calling app. Empty if not set. |
| 3526 | optional string calling_pkg_name = 5; |
| 3527 | |
| 3528 | // Whether the app is an instant app. |
| 3529 | optional bool is_instant_app = 6; |
| 3530 | |
| 3531 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3532 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3533 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 3534 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3535 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3536 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3537 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3538 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3539 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3540 | optional int32 bind_application_delay_millis = 11; |
| 3541 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3542 | |
| 3543 | // Empty if not set. |
| 3544 | optional string launch_token = 13; |
| 3545 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3546 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3547 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3548 | |
| 3549 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3550 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3551 | } |
| 3552 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3553 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3554 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3555 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3556 | |
| 3557 | // The app package name. |
| 3558 | optional string pkg_name = 2; |
| 3559 | |
| 3560 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3561 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3562 | WARM = 1; |
| 3563 | HOT = 2; |
| 3564 | COLD = 3; |
| 3565 | } |
| 3566 | // The transition type. |
| 3567 | optional TransitionType type = 3; |
| 3568 | |
| 3569 | // The activity name. |
| 3570 | optional string activity_name = 4; |
| 3571 | } |
| 3572 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3573 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3574 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3575 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3576 | |
| 3577 | // The app package name. |
| 3578 | optional string pkg_name = 2; |
| 3579 | |
| 3580 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3581 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3582 | WITH_BUNDLE = 1; |
| 3583 | WITHOUT_BUNDLE = 2; |
| 3584 | } |
| 3585 | // The transition type. |
| 3586 | optional TransitionType type = 3; |
| 3587 | |
| 3588 | // The activity name. |
| 3589 | optional string activity_name = 4; |
| 3590 | |
| 3591 | optional bool transition_process_running = 5; |
| 3592 | |
| 3593 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3594 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3595 | } |
| 3596 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3597 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3598 | * Logs a picture-in-picture action |
| 3599 | * Logged from: |
| 3600 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3601 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 3602 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 3603 | */ |
| 3604 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3605 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3606 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3607 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3608 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3609 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3610 | enum State { |
| 3611 | ENTERED = 1; |
| 3612 | EXPANDED_TO_FULL_SCREEN = 2; |
| 3613 | MINIMIZED = 3; |
| 3614 | DISMISSED = 4; |
| 3615 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3616 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3617 | } |
| 3618 | |
| 3619 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3620 | * Logs overlay action |
| 3621 | * Logged from: |
| 3622 | * services/core/java/com/android/server/wm/Session.java |
| 3623 | */ |
| 3624 | message OverlayStateChanged { |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 3625 | optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3626 | |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 3627 | optional string package_name = 2 [(state_field_option).primary_field = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3628 | |
| 3629 | optional bool using_alert_window = 3; |
| 3630 | |
| 3631 | enum State { |
| 3632 | ENTERED = 1; |
| 3633 | EXITED = 2; |
| 3634 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 3635 | optional State state = 4 |
| 3636 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3637 | } |
| 3638 | |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3639 | /** |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3640 | * Logs foreground service starts and stops. |
| 3641 | * Note that this is not when a service starts or stops, but when it is |
| 3642 | * considered foreground. |
| 3643 | * Logged from |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3644 | * frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3645 | */ |
| 3646 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3647 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3648 | // package_name + "/" + class_name |
| 3649 | optional string short_name = 2; |
| 3650 | |
| 3651 | enum State { |
| 3652 | ENTER = 1; |
| 3653 | EXIT = 2; |
| 3654 | } |
| 3655 | optional State state = 3; |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3656 | |
| 3657 | // Whether the fgs is allowed while-in-use permissions, i.e. is considered 'in-use' to the user. |
| 3658 | // (If the fgs was started while the app wasn't TOP it usually will be denied these permissions) |
| 3659 | optional bool allow_while_in_use_permission = 4; |
| 3660 | } |
| 3661 | |
| 3662 | /** |
| 3663 | * Logs the number of times a uid accesses a sensitive AppOp during a foreground service session. |
| 3664 | * A foreground service session is any continuous period during which the uid holds at least one |
| 3665 | * foreground service; the atom will be pushed when the uid no longer holds any foreground services. |
| 3666 | * Accesses initiated while the uid is in the TOP state are ignored. |
| 3667 | * Sessions with no attempted accesses are not logged. |
| 3668 | * Logged from |
| 3669 | * frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 3670 | */ |
| 3671 | message ForegroundServiceAppOpSessionEnded { |
| 3672 | optional int32 uid = 1 [(is_uid) = true]; |
| 3673 | |
| 3674 | // The operation's name. |
Stanislav Zholnin | 48811ee | 2020-03-03 16:15:55 +0000 | [diff] [blame] | 3675 | // Only following four ops are logged |
| 3676 | // COARSE_LOCATION = 0 |
| 3677 | // FINE_LOCATION = 1 |
| 3678 | // CAMERA = 26 |
| 3679 | // RECORD_AUDIO = 27 |
| 3680 | optional android.app.AppOpEnum app_op_name = 2 [default = APP_OP_NONE]; |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3681 | |
| 3682 | // The uid's permission mode for accessing the AppOp during this fgs session. |
| 3683 | enum Mode { |
| 3684 | MODE_UNKNOWN = 0; |
| 3685 | MODE_ALLOWED = 1; // Always allowed |
| 3686 | MODE_IGNORED = 2; // Denied |
| 3687 | MODE_FOREGROUND = 3; // Allow-while-in-use (or allowed-one-time) |
| 3688 | } |
| 3689 | optional Mode app_op_mode = 3; |
| 3690 | |
| 3691 | // Number of times this AppOp was requested and allowed. |
| 3692 | optional int32 count_ops_accepted = 4; |
| 3693 | // Number of times this AppOp was requested but denied. |
| 3694 | optional int32 count_ops_rejected = 5; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3695 | } |
| 3696 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3697 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3698 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 3699 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 3700 | * attributed back to the parent (host) uid. One example is Chrome. |
| 3701 | * |
| 3702 | * Logged from: |
| 3703 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 3704 | */ |
| 3705 | message IsolatedUidChanged { |
| 3706 | // The host UID. Generally, we should attribute metrics from the isolated uid to the host uid. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3707 | // NOTE: DO NOT annotate uid field in this atom. This atom is specially handled in statsd. |
Bookatz | 3c64886 | 2018-05-25 13:32:43 -0700 | [diff] [blame] | 3708 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3709 | optional int32 parent_uid = 1; |
| 3710 | |
| 3711 | optional int32 isolated_uid = 2; |
| 3712 | |
| 3713 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 3714 | enum Event { |
| 3715 | REMOVED = 0; |
| 3716 | CREATED = 1; |
| 3717 | } |
| 3718 | optional Event event = 3; |
| 3719 | } |
| 3720 | |
| 3721 | /* |
| 3722 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 3723 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 3724 | * and processed by WakeupController.cpp. |
| 3725 | */ |
| 3726 | message PacketWakeupOccurred { |
| 3727 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 3728 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3729 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3730 | // The interface name on which the packet was received. |
| 3731 | optional string iface = 2; |
| 3732 | // The ethertype value of the packet. |
| 3733 | optional int32 ethertype = 3; |
| 3734 | // String representation of the destination MAC address of the packet. |
| 3735 | optional string destination_hardware_address = 4; |
| 3736 | // String representation of the source address of the packet if this was an IP packet. |
| 3737 | optional string source_ip = 5; |
| 3738 | // String representation of the destination address of the packet if this was an IP packet. |
| 3739 | optional string destination_ip = 6; |
| 3740 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 3741 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 3742 | // families. |
| 3743 | optional int32 ip_next_header = 7; |
| 3744 | // The source port if this was a TCP or UDP packet. |
| 3745 | optional int32 source_port = 8; |
| 3746 | // The destination port if this was a TCP or UDP packet. |
| 3747 | optional int32 destination_port = 9; |
| 3748 | } |
| 3749 | |
| 3750 | /* |
| 3751 | * Logs the memory stats for an app on startup. |
| 3752 | * Logged from: |
| 3753 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3754 | */ |
| 3755 | message AppStartMemoryStateCaptured { |
| 3756 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3757 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3758 | |
| 3759 | // The process name. |
| 3760 | optional string process_name = 2; |
| 3761 | |
| 3762 | // The activity name. |
| 3763 | optional string activity_name = 3; |
| 3764 | |
| 3765 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3766 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3767 | |
| 3768 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3769 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3770 | |
| 3771 | // RSS |
| 3772 | optional int64 rss_in_bytes = 6; |
| 3773 | |
| 3774 | // CACHE |
| 3775 | optional int64 cache_in_bytes = 7; |
| 3776 | |
| 3777 | // SWAP |
| 3778 | optional int64 swap_in_bytes = 8; |
| 3779 | } |
| 3780 | |
| 3781 | /* |
| 3782 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 3783 | * for LMK event. |
| 3784 | * Logged from: |
| 3785 | * system/core/lmkd/lmkd.c |
| 3786 | */ |
| 3787 | message LmkStateChanged { |
| 3788 | enum State { |
| 3789 | UNKNOWN = 0; |
| 3790 | START = 1; |
| 3791 | STOP = 2; |
| 3792 | } |
| 3793 | optional State state = 1; |
| 3794 | } |
| 3795 | |
| 3796 | /* |
| 3797 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 3798 | * Logged from: |
| 3799 | * system/core/lmkd/lmkd.c |
| 3800 | */ |
| 3801 | message LmkKillOccurred { |
| 3802 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3803 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3804 | |
| 3805 | // The process name. |
| 3806 | optional string process_name = 2; |
| 3807 | |
| 3808 | // oom adj score. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3809 | optional int32 oom_adj_score = 3; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3810 | |
| 3811 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3812 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3813 | |
| 3814 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3815 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3816 | |
| 3817 | // RSS |
| 3818 | optional int64 rss_in_bytes = 6; |
| 3819 | |
| 3820 | // CACHE |
| 3821 | optional int64 cache_in_bytes = 7; |
| 3822 | |
| 3823 | // SWAP |
| 3824 | optional int64 swap_in_bytes = 8; |
Jim Blackler | 8593d1f | 2018-11-21 15:24:48 +0000 | [diff] [blame] | 3825 | |
| 3826 | // The elapsed real time of start of the process. |
| 3827 | optional int64 process_start_time_nanos = 9; |
Suren Baghdasaryan | 1fbaa1f | 2019-03-04 11:09:31 -0800 | [diff] [blame] | 3828 | |
| 3829 | // Min oom adj score considered by lmkd. |
| 3830 | optional int32 min_oom_score = 10; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3831 | } |
| 3832 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3833 | /* |
| 3834 | * Logs when the ActivityManagerService detects that an app died. |
| 3835 | * |
| 3836 | * Logged from: |
| 3837 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3838 | */ |
| 3839 | message AppDied { |
| 3840 | // timestamp(elapsedRealtime) of record creation |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 3841 | optional uint64 timestamp_millis = 1 [(state_field_option).exclusive_state = true]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3842 | } |
| 3843 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3844 | /** |
| 3845 | * An atom for generic metrics logging. Available from Android Q. |
| 3846 | */ |
| 3847 | message GenericAtom { |
| 3848 | // The uid of the application that sent this custom atom. |
| 3849 | optional int32 uid = 1 [(is_uid) = true]; |
| 3850 | |
| 3851 | // An event_id indicates the type of event. |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 3852 | optional android.stats.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3853 | } |
| 3854 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3855 | /** |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3856 | * Atom for simple logging of user interaction and impression events, such as "the user touched |
| 3857 | * this button" or "this dialog was displayed". |
| 3858 | * Keep the UI event stream clean: don't use for system or background events. |
| 3859 | * Log using the UiEventLogger wrapper - don't write with the StatsLog API directly. |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3860 | * |
| 3861 | * Logged from: |
| 3862 | * frameworks/base/services/core/java/com/android/server/ |
| 3863 | * frameworks/base/packages/SystemUI/src/com/android/systemui/ |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3864 | */ |
| 3865 | message UiEventReported { |
| 3866 | // The event_id. |
| 3867 | optional int32 event_id = 1; |
| 3868 | // The event's source or target uid and package, if applicable. |
| 3869 | // For example, the package posting a notification, or the destination package of a share. |
| 3870 | optional int32 uid = 2 [(is_uid) = true]; |
| 3871 | optional string package_name = 3; |
Will Brockman | 12282ac | 2019-12-20 09:37:42 -0500 | [diff] [blame] | 3872 | // An identifier used to disambiguate which logs refer to a particular instance of some |
| 3873 | // UI element. Useful when there might be multiple instances simultaneously active. |
| 3874 | optional int32 instance_id = 4; |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3875 | } |
| 3876 | |
| 3877 | /** |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3878 | * Reports a notification was created or updated. |
| 3879 | * |
| 3880 | * Logged from: |
| 3881 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 3882 | */ |
| 3883 | message NotificationReported { |
| 3884 | // The event_id (as for UiEventReported). |
| 3885 | optional int32 event_id = 1; |
| 3886 | // The notifying app's uid and package. |
| 3887 | optional int32 uid = 2 [(is_uid) = true]; |
| 3888 | optional string package_name = 3; |
| 3889 | // A small system-assigned identifier for the notification. |
| 3890 | // Locally probably-unique, but expect collisions across users and/or days. |
| 3891 | optional int32 instance_id = 4; |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3892 | optional int32 notification_id_hash = 5; // Small hash of the app-assigned notif ID + tag |
| 3893 | optional int32 channel_id_hash = 6; // Small hash of app-assigned channel ID |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3894 | |
| 3895 | // Grouping information |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3896 | optional int32 group_id_hash = 7; // Small hash of the group ID of the notification |
| 3897 | optional int32 group_instance_id = 8; // Instance_id of the group-summary notification |
| 3898 | optional bool is_group_summary = 9; // Tags the group-summary notification |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3899 | |
| 3900 | // Attributes |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3901 | optional string category = 10; // App-assigned notification category (API-defined strings) |
| 3902 | optional int32 style = 11; // App-assigned notification style |
| 3903 | optional int32 num_people = 12; // Number of Person records attached to the notification |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3904 | |
| 3905 | // Ordering, importance and interruptiveness |
| 3906 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3907 | optional int32 position = 13; // Position in NotificationManager's list |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3908 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3909 | optional android.stats.sysui.NotificationImportance importance = 14; |
| 3910 | optional int32 alerting = 15; // Bitfield, 1=buzz 2=beep 4=blink |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3911 | |
| 3912 | enum NotificationImportanceExplanation { |
| 3913 | IMPORTANCE_EXPLANATION_UNKNOWN = 0; |
| 3914 | IMPORTANCE_EXPLANATION_APP = 1; // App-specified channel importance. |
| 3915 | IMPORTANCE_EXPLANATION_USER = 2; // User-specified channel importance. |
| 3916 | IMPORTANCE_EXPLANATION_ASST = 3; // Notification Assistant override. |
| 3917 | IMPORTANCE_EXPLANATION_SYSTEM = 4; // System override. |
| 3918 | // Like _APP, but based on pre-channels priority signal. |
| 3919 | IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5; |
| 3920 | } |
| 3921 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3922 | optional NotificationImportanceExplanation importance_source = 16; |
| 3923 | optional android.stats.sysui.NotificationImportance importance_initial = 17; |
| 3924 | optional NotificationImportanceExplanation importance_initial_source = 18; |
| 3925 | optional android.stats.sysui.NotificationImportance importance_asst = 19; |
| 3926 | optional int32 assistant_hash = 20; |
| 3927 | optional float assistant_ranking_score = 21; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3928 | } |
| 3929 | |
| 3930 | message Notification { |
| 3931 | // The notifying app's uid and package. |
| 3932 | optional int32 uid = 1 [(is_uid) = true]; |
| 3933 | optional string package_name = 2; |
| 3934 | // A small system-assigned identifier for the notification. |
| 3935 | optional int32 instance_id = 3; |
| 3936 | |
| 3937 | // Grouping information. |
| 3938 | optional int32 group_instance_id = 4; |
| 3939 | optional bool is_group_summary = 5; |
| 3940 | |
| 3941 | // The section of the shade that the notification is in. |
| 3942 | // See NotificationSectionsManager.PriorityBucket. |
| 3943 | enum NotificationSection { |
| 3944 | SECTION_UNKNOWN = 0; |
Will Brockman | e375384 | 2020-03-03 16:29:34 -0500 | [diff] [blame] | 3945 | SECTION_HEADS_UP = 1; |
Will Brockman | cec88ed | 2020-04-27 13:11:02 -0400 | [diff] [blame] | 3946 | SECTION_MEDIA_CONTROLS = 2; |
| 3947 | SECTION_PEOPLE = 3; |
| 3948 | SECTION_ALERTING = 4; |
| 3949 | SECTION_SILENT = 5; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3950 | } |
| 3951 | optional NotificationSection section = 6; |
| 3952 | } |
| 3953 | |
| 3954 | message NotificationList { |
| 3955 | repeated Notification notifications = 1; // An ordered sequence of notifications. |
| 3956 | } |
| 3957 | |
| 3958 | /** |
| 3959 | * Reports a notification panel was displayed, e.g. from the lockscreen or status bar. |
| 3960 | * |
| 3961 | * Logged from: |
| 3962 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
| 3963 | */ |
| 3964 | message NotificationPanelReported { |
| 3965 | // The event_id (as for UiEventReported). |
| 3966 | optional int32 event_id = 1; |
| 3967 | optional int32 num_notifications = 2; |
| 3968 | // The notifications in the panel, in the order that they appear there. |
| 3969 | optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES]; |
| 3970 | } |
| 3971 | |
| 3972 | /** |
| 3973 | * Reports a notification channel, or channel group, was created, updated, or deleted. |
| 3974 | * |
| 3975 | * Logged from: |
| 3976 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 3977 | */ |
| 3978 | message NotificationChannelModified { |
| 3979 | // The event_id (as for UiEventReported). |
| 3980 | optional int32 event_id = 1; |
| 3981 | // The notifying app's uid and package. |
| 3982 | optional int32 uid = 2 [(is_uid) = true]; |
| 3983 | optional string package_name = 3; |
Will Brockman | 7fb7944 | 2020-02-27 14:34:24 -0500 | [diff] [blame] | 3984 | // Hash of app-assigned notification channel ID or channel-group ID |
| 3985 | optional int32 channel_id_hash = 4; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3986 | // Previous importance setting, if applicable |
| 3987 | optional android.stats.sysui.NotificationImportance old_importance = 5; |
| 3988 | // New importance setting |
| 3989 | optional android.stats.sysui.NotificationImportance importance = 6; |
| 3990 | } |
| 3991 | |
| 3992 | |
| 3993 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3994 | * Logs when a biometric acquire event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3995 | * |
| 3996 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3997 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3998 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3999 | message BiometricAcquired { |
| 4000 | // Biometric modality that was acquired. |
| 4001 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4002 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. |
| 4003 | optional int32 user = 2; |
| 4004 | // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 4005 | optional bool is_crypto = 3; |
| 4006 | // Action that the device is performing. Acquired messages are only expected for enroll and |
| 4007 | // authenticate. Other actions may indicate an error. |
| 4008 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 4009 | // The client that this acquisition was received for. |
| 4010 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 4011 | // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager. |
| 4012 | optional int32 acquire_info = 6; |
| 4013 | // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. |
| 4014 | optional int32 acquire_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4015 | // Dictates if this message should trigger additional debugging. |
| 4016 | optional bool debug = 8; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4017 | } |
| 4018 | |
| 4019 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4020 | * Logs when a biometric authentication event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4021 | * |
| 4022 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4023 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4024 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4025 | message BiometricAuthenticated { |
| 4026 | // Biometric modality that was used. |
| 4027 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4028 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 4029 | optional int32 user = 2; |
| 4030 | // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password |
| 4031 | // storage. |
| 4032 | optional bool is_crypto = 3; |
| 4033 | // The client that this acquisition was received for. |
| 4034 | optional android.hardware.biometrics.ClientEnum client = 4; |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 4035 | // If authentication requires user confirmation. See BiometricPrompt's |
| 4036 | // setRequireConfirmation(bool) method. |
| 4037 | optional bool require_confirmation = 5; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4038 | |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4039 | enum State { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4040 | UNKNOWN = 0; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4041 | REJECTED = 1; |
| 4042 | PENDING_CONFIRMATION = 2; |
| 4043 | CONFIRMED = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4044 | } |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4045 | |
| 4046 | // State of the current auth attempt. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 4047 | optional State state = 6; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4048 | // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is |
| 4049 | // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to |
| 4050 | // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to |
| 4051 | // CONFIRMED. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 4052 | optional int64 latency_millis = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4053 | // Dictates if this message should trigger additional debugging. |
| 4054 | optional bool debug = 8; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4055 | } |
| 4056 | |
| 4057 | /** |
| 4058 | * Logs when a biometric error occurs. |
| 4059 | * |
| 4060 | * Logged from: |
| 4061 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 4062 | */ |
| 4063 | message BiometricErrorOccurred { |
| 4064 | // Biometric modality that was used. |
| 4065 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4066 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 4067 | optional int32 user = 2; |
| 4068 | // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 4069 | optional bool is_crypto = 3; |
| 4070 | // Action that the device is performing. |
| 4071 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 4072 | // The client that this acquisition was received for. |
| 4073 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 4074 | // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors |
| 4075 | // are unique to modality. |
| 4076 | optional int32 error_info = 6; |
| 4077 | // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined |
| 4078 | // by the vendor and not specified by the HIDL interface. |
| 4079 | optional int32 error_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4080 | // Dictates if this message should trigger additional debugging. |
| 4081 | optional bool debug = 8; |
Kevin Chyn | 7fca236 | 2019-06-20 17:20:42 -0700 | [diff] [blame] | 4082 | // Time spent during the authentication attempt. |
| 4083 | optional int64 latency_millis = 9; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4084 | } |
| 4085 | |
| 4086 | /** |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 4087 | * Logs when a system health issue is detected. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4088 | * Logged from: |
| 4089 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 4090 | */ |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 4091 | message BiometricSystemHealthIssueDetected { |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4092 | // Biometric modality. |
| 4093 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 4094 | // Type of issue detected. |
| 4095 | optional android.hardware.biometrics.IssueEnum issue = 2; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4096 | // Dictates if this message should trigger additional debugging. |
| 4097 | optional bool debug = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4098 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 4099 | |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 4100 | /** |
| 4101 | * Logs when a biometric enrollment occurs. |
| 4102 | * |
| 4103 | * Logged from: |
| 4104 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 4105 | */ |
| 4106 | message BiometricEnrolled { |
| 4107 | // Biometric modality that was used. |
| 4108 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4109 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 4110 | optional int32 user = 2; |
| 4111 | // The amount of time the enrollment took in milliseconds. |
| 4112 | optional int64 latency_millis = 3; |
| 4113 | // Whether or not the enrollment was successful. |
| 4114 | optional bool success = 4; |
| 4115 | } |
| 4116 | |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4117 | /* |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 4118 | * Logs when a flag flip update occurrs. Used for mainline modules that update via flag flips. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4119 | */ |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 4120 | message FlagFlipUpdateOccurred { |
| 4121 | // If the event is from a flag config package, specify the package name. |
| 4122 | optional string flag_flip_package_name = 1; |
| 4123 | |
| 4124 | // The order id of the package |
| 4125 | optional int64 order_id = 2; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4126 | } |
| 4127 | |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 4128 | /** |
| 4129 | * Potential experiment ids that goes with a train install. |
Jonathan Nguyen | a0e6de1 | 2020-01-28 18:33:55 -0800 | [diff] [blame] | 4130 | * Should be kept in sync with experiment_ids.proto. |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 4131 | */ |
| 4132 | message TrainExperimentIds { |
| 4133 | repeated int64 experiment_id = 1; |
| 4134 | } |
| 4135 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4136 | /* |
| 4137 | * Logs when a binary push state changes. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4138 | * Logged by the installer via public api. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4139 | */ |
| 4140 | message BinaryPushStateChanged { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4141 | // Name of the train. |
| 4142 | optional string train_name = 1; |
| 4143 | // Version code for a "train" of packages that need to be installed atomically |
| 4144 | optional int64 train_version_code = 2; |
| 4145 | // After installation of this package, device requires a restart. |
| 4146 | optional bool requires_staging = 3; |
| 4147 | // Rollback should be enabled for this install. |
| 4148 | optional bool rollback_enabled = 4; |
| 4149 | // Requires low latency monitoring if possible. |
| 4150 | optional bool requires_low_latency_monitor = 5; |
| 4151 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4152 | enum State { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4153 | UNKNOWN = 0; |
| 4154 | INSTALL_REQUESTED = 1; |
| 4155 | INSTALL_STARTED = 2; |
| 4156 | INSTALL_STAGED_NOT_READY = 3; |
| 4157 | INSTALL_STAGED_READY = 4; |
| 4158 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 4159 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 4160 | // and INSTALL_FAILURE_COMMIT. |
| 4161 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 4162 | // This enum is for installs that are manually cancelled via the Manual Update UI. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4163 | INSTALL_CANCELLED = 7; |
| 4164 | INSTALLER_ROLLBACK_REQUESTED = 8; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 4165 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 4166 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 4167 | INSTALLER_ROLLBACK_STAGED = 11; |
| 4168 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 4169 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 4170 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 4171 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 4172 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 4173 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 4174 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 4175 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 4176 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 4177 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 4178 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 4179 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 4180 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 4181 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 4182 | REBOOT_TRIGGERED = 26; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4183 | } |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4184 | optional State state = 6; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 4185 | // Possible experiment ids for monitoring this push. |
| 4186 | optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; |
| 4187 | // user id |
| 4188 | optional int32 user_id = 8; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 4189 | optional int32 reason = 9; |
Jonathan Nguyen | 703c42f | 2020-02-04 15:54:26 -0800 | [diff] [blame] | 4190 | // Whether or not this is a rollback event |
| 4191 | optional bool is_rollback = 10; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4192 | } |
| 4193 | |
Tej Singh | c920308 | 2019-05-03 13:42:23 -0700 | [diff] [blame] | 4194 | /* Test atom, is not logged anywhere */ |
| 4195 | message TestAtomReported { |
| 4196 | repeated AttributionNode attribution_node = 1; |
| 4197 | optional int32 int_field = 2; |
| 4198 | optional int64 long_field = 3; |
| 4199 | optional float float_field = 4; |
| 4200 | optional string string_field = 5; |
| 4201 | optional bool boolean_field = 6; |
| 4202 | enum State { |
| 4203 | UNKNOWN = 0; |
| 4204 | OFF = 1; |
| 4205 | ON = 2; |
| 4206 | } |
| 4207 | optional State state = 7; |
| 4208 | optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 4209 | } |
| 4210 | |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 4211 | /** Represents USB port overheat event. */ |
| 4212 | message UsbPortOverheatEvent { |
| 4213 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 4214 | optional int32 plug_temperature_deci_c = 1; |
| 4215 | |
| 4216 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ |
| 4217 | optional int32 max_temperature_deci_c = 2; |
| 4218 | |
| 4219 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 4220 | optional int32 time_to_overheat_secs = 3; |
| 4221 | |
| 4222 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 4223 | optional int32 time_to_hysteresis_secs = 4; |
| 4224 | |
| 4225 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 4226 | optional int32 time_to_inactive_secs = 5; |
| 4227 | }; |
| 4228 | |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 4229 | /** |
| 4230 | * Logs total effective full charge and discharge cycles on a battery. |
| 4231 | * Here are some examples of one effective cycle: |
| 4232 | * 1) the battery charges from 0% to 100% and drains back to 0%, |
| 4233 | * 2) charging from 50% to 100% and draining back to 50% twice. |
| 4234 | * Pulled from: |
| 4235 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4236 | */ |
| 4237 | message BatteryCycleCount { |
| 4238 | /* Number of total charge and discharge cycles on the system battery. */ |
| 4239 | optional int32 cycle_count = 1; |
| 4240 | } |
| 4241 | |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4242 | /** |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4243 | * Logs that external storage is mounted and information about it, the storage type (sd card/usb/ |
| 4244 | * others), its type (public or private) and the size in bytes. |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4245 | * Pulled from: |
| 4246 | * StatsCompanionService |
| 4247 | */ |
| 4248 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4249 | message ExternalStorageInfo { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4250 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4251 | enum VolumeType { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4252 | UNKNOWN = 0; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4253 | PUBLIC = 1; |
| 4254 | PRIVATE = 2; |
| 4255 | OTHER = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4256 | } |
| 4257 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4258 | // The type of external storage. |
| 4259 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 4260 | // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal. |
| 4261 | optional VolumeType volume_type = 2; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4262 | // Total size of the sd card in bytes. |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4263 | optional int64 size_bytes = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4264 | } |
| 4265 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4266 | /* |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4267 | * Logs when a connection becomes available and lost. |
| 4268 | * Logged in StatsCompanionService.java |
| 4269 | */ |
| 4270 | message ConnectivityStateChanged { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 4271 | // Id of the network. |
| 4272 | optional int32 net_id = 1; |
| 4273 | |
| 4274 | enum State { |
| 4275 | UNKNOWN = 0; |
| 4276 | CONNECTED = 1; |
| 4277 | DISCONNECTED = 2; |
| 4278 | } |
| 4279 | // Connected state of a network. |
| 4280 | optional State state = 2; |
| 4281 | } |
| 4282 | |
| 4283 | /** |
| 4284 | * Logs when a service starts and stops. |
| 4285 | * Logged from: |
| 4286 | * services/core/java/com/android/server/am/ActiveServices.java |
| 4287 | */ |
| 4288 | message ServiceStateChanged { |
| 4289 | |
| 4290 | optional int32 uid = 1 [(is_uid) = true]; |
| 4291 | |
| 4292 | optional string package_name = 2; |
| 4293 | |
| 4294 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4295 | |
| 4296 | enum State { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 4297 | START = 1; |
| 4298 | STOP = 2; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4299 | } |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 4300 | |
| 4301 | optional State state = 4; |
| 4302 | } |
| 4303 | |
| 4304 | /** |
| 4305 | * Logs when a service is launched. |
| 4306 | * Logged from: |
| 4307 | * services/core/java/com/android/server/am/ActiveServices.java |
| 4308 | */ |
| 4309 | message ServiceLaunchReported { |
| 4310 | |
| 4311 | optional int32 uid = 1 [(is_uid) = true]; |
| 4312 | |
| 4313 | optional string package_name = 2; |
| 4314 | |
| 4315 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4316 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 4317 | |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 4318 | /** |
| 4319 | * Logs when a hidden API is used. |
| 4320 | * |
| 4321 | * Logged from: |
| 4322 | * libcore/libart/src/main/java/dalvik/system/VMRuntime.java |
| 4323 | */ |
| 4324 | message HiddenApiUsed { |
| 4325 | // The uid of the app making the hidden access. |
| 4326 | optional int32 uid = 1 [(is_uid) = true]; |
| 4327 | |
| 4328 | // Signature of the method or field accessed. |
| 4329 | optional string signature = 2; |
| 4330 | |
| 4331 | enum AccessMethod { |
| 4332 | NONE = 0; |
| 4333 | REFLECTION = 1; |
| 4334 | JNI = 2; |
| 4335 | LINKING = 3; |
| 4336 | } |
| 4337 | |
| 4338 | // Type of access. |
| 4339 | optional AccessMethod access_method = 3; |
| 4340 | |
| 4341 | // Whether the access was prevented or not. |
| 4342 | optional bool access_denied = 4; |
| 4343 | } |
| 4344 | |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 4345 | /** |
| 4346 | * Logs user interaction with the Privacy Indicators added in Q. In particular: |
| 4347 | * - When user sees privacy chip |
| 4348 | * - When user clicks privacy chip |
| 4349 | * - How does the user exit the Privacy Dialog |
| 4350 | * Logged from: |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 4351 | * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java |
| 4352 | */ |
| 4353 | message PrivacyIndicatorsInteracted { |
| 4354 | |
| 4355 | enum Type { |
| 4356 | UNKNOWN = 0; |
| 4357 | CHIP_VIEWED = 1; |
| 4358 | CHIP_CLICKED = 2; |
| 4359 | DIALOG_PRIVACY_SETTINGS = 3; |
| 4360 | DIALOG_DISMISS = 4; |
| 4361 | DIALOG_LINE_ITEM = 5; |
| 4362 | } |
| 4363 | |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 4364 | optional Type type = 1 [(state_field_option).exclusive_state = true]; |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 4365 | |
| 4366 | // Used if the type is LINE_ITEM |
| 4367 | optional string package_name = 2; |
| 4368 | } |
| 4369 | |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 4370 | /** |
| 4371 | * Logs information about a package that is moved from the internal to external storage and vice |
| 4372 | * versa. |
| 4373 | * It logs the package name, the type of the external storage where the package is installed |
| 4374 | * (if moved to external storage, or UNKNOWN if moved to internal storage), |
| 4375 | * and the move type: if it's from internal to external or the other way around. |
| 4376 | * |
| 4377 | * Logged from: |
| 4378 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 4379 | */ |
| 4380 | message AppMovedStorageReported { |
| 4381 | enum MoveType { |
| 4382 | UNKNOWN = 0; |
| 4383 | TO_EXTERNAL = 1; |
| 4384 | TO_INTERNAL = 2; |
| 4385 | } |
| 4386 | // The type of the external storage. |
| 4387 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 4388 | // The type of move. |
| 4389 | optional MoveType move_type = 2; |
| 4390 | // The name of the package that was moved. |
| 4391 | optional string package_name = 3; |
| 4392 | } |
| 4393 | |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 4394 | /** |
| 4395 | * Logs when system server watchdog occurs. |
| 4396 | * Logged from: |
| 4397 | * frameworks/base/services/core/java/com/android/server/Watchdog.java |
| 4398 | */ |
| 4399 | message SystemServerWatchdogOccurred { |
| 4400 | optional string subject = 1; |
| 4401 | } |
| 4402 | |
| 4403 | /** |
| 4404 | * Logs when new file added to tombstones. |
| 4405 | * Logged from: |
| 4406 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 4407 | */ |
| 4408 | message TombStoneOccurred { |
| 4409 | } |
| 4410 | |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 4411 | /* |
| 4412 | * Information about a role request |
| 4413 | * |
| 4414 | * Logged from: |
| 4415 | * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java |
| 4416 | */ |
| 4417 | message RoleRequestResultReported { |
| 4418 | // UID of application requesting the role |
| 4419 | optional int32 requesting_uid = 1; |
| 4420 | |
| 4421 | // Package name of application requesting the role |
| 4422 | optional string requesting_package_name = 2; |
| 4423 | |
| 4424 | // The role to be granted |
| 4425 | optional string role_name = 3; |
| 4426 | |
| 4427 | // The count of applications qualifying for the role |
| 4428 | optional int32 qualifying_count = 4; |
| 4429 | |
| 4430 | // UID of application current granted the role |
| 4431 | optional int32 current_uid = 5; |
| 4432 | |
| 4433 | // Package name of application current granted the role |
| 4434 | optional string current_package_name = 6; |
| 4435 | |
| 4436 | // UID of another application that user chose to grant the role to, instead of the requesting |
| 4437 | // application |
| 4438 | optional int32 granted_another_uid = 7; |
| 4439 | |
| 4440 | // Package name of another application that user chose to grant the role to, instead of the |
| 4441 | // requesting application |
| 4442 | optional string granted_another_package_name = 8; |
| 4443 | |
| 4444 | enum Result { |
| 4445 | UNDEFINED = 0; |
| 4446 | // role request was ignored |
| 4447 | IGNORED = 1; |
| 4448 | // role request was ignored because it's already granted |
| 4449 | IGNORED_ALREADY_GRANTED = 2; |
| 4450 | // role request was ignored because the application isn't qualified |
| 4451 | IGNORED_NOT_QUALIFIED = 3; |
| 4452 | // role request was ignored because user said it should be always denied |
| 4453 | IGNORED_USER_ALWAYS_DENIED = 4; |
| 4454 | // role was granted by user action |
| 4455 | USER_GRANTED = 5; |
| 4456 | // role was denied by user action |
| 4457 | USER_DENIED = 6; |
| 4458 | // role was denied by user granting another application the role |
| 4459 | USER_DENIED_GRANTED_ANOTHER = 7; |
| 4460 | // role was denied and set to be always denied by the user |
| 4461 | USER_DENIED_WITH_ALWAYS = 8; |
| 4462 | } |
| 4463 | // The result of the role request |
| 4464 | optional Result result = 9; |
| 4465 | } |
| 4466 | |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 4467 | /** |
| 4468 | * Logs when a Vehicle Maps Service client's connection state has changed |
| 4469 | * |
| 4470 | * Logged from: |
| 4471 | * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java |
| 4472 | */ |
| 4473 | message VmsClientConnectionStateChanged { |
| 4474 | // The UID of the VMS client app |
| 4475 | optional int32 uid = 1 [(is_uid) = true]; |
| 4476 | |
| 4477 | enum State { |
| 4478 | UNKNOWN = 0; |
| 4479 | // Attempting to connect to the client |
| 4480 | CONNECTING = 1; |
| 4481 | // Client connection established |
| 4482 | CONNECTED = 2; |
| 4483 | // Client connection closed unexpectedly |
| 4484 | DISCONNECTED = 3; |
| 4485 | // Client connection closed by VMS |
| 4486 | TERMINATED = 4; |
| 4487 | // Error establishing the client connection |
| 4488 | CONNECTION_ERROR = 5; |
| 4489 | } |
| 4490 | |
| 4491 | optional State state = 2; |
| 4492 | } |
| 4493 | |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4494 | /** |
| 4495 | * Logs when MediaProvider has successfully finished scanning a storage volume. |
| 4496 | * |
| 4497 | * Logged from: |
| 4498 | * packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java |
| 4499 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4500 | message MediaProviderScanOccurred { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4501 | enum Reason { |
| 4502 | // Scan triggered due to unknown reason |
| 4503 | UNKNOWN = 0; |
| 4504 | // Scan triggered due to storage volume being mounted |
| 4505 | MOUNTED = 1; |
| 4506 | // Scan triggered due to explicit user action or app request |
| 4507 | DEMAND = 2; |
| 4508 | // Scan triggered due to idle maintenance |
| 4509 | IDLE = 3; |
| 4510 | } |
| 4511 | |
| 4512 | // Volume type that this event pertains to |
| 4513 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4514 | // Reason why this scan was triggered |
| 4515 | optional Reason reason = 2; |
| 4516 | // Total number of files scanned |
| 4517 | optional int64 item_count = 3; |
| 4518 | // Duration of scan, normalized per file |
| 4519 | optional float normalized_duration_millis = 4; |
| 4520 | // Number of database inserts, normalized per file |
| 4521 | optional float normalized_insert_count = 5; |
| 4522 | // Number of database updates, normalized per file |
| 4523 | optional float normalized_update_count = 6; |
| 4524 | // Number of database deletes, normalized per file |
| 4525 | optional float normalized_delete_count = 7; |
| 4526 | } |
| 4527 | |
| 4528 | /** |
| 4529 | * Logs when an app has asked MediaProvider to delete media belonging to the user. |
| 4530 | * |
| 4531 | * Logged from: |
| 4532 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4533 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4534 | message MediaContentDeleted { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4535 | // Volume type that this event pertains to |
| 4536 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4537 | // UID of app that requested deletion |
| 4538 | optional int32 uid = 2 [(is_uid) = true]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4539 | // Number of items that were deleted |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4540 | optional int32 item_count = 3; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4541 | } |
| 4542 | |
| 4543 | /** |
| 4544 | * Logs when an app has asked MediaProvider to grant them access to media belonging to the user. |
| 4545 | * |
| 4546 | * Logged from: |
| 4547 | * packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java |
| 4548 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4549 | message MediaProviderPermissionRequested { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4550 | enum Result { |
| 4551 | UNKNOWN = 0; |
| 4552 | USER_GRANTED = 1; |
| 4553 | AUTO_GRANTED = 2; |
| 4554 | USER_DENIED = 3; |
| 4555 | USER_DENIED_WITH_PREJUDICE = 4; |
| 4556 | AUTO_DENIED = 5; |
| 4557 | } |
| 4558 | |
| 4559 | // Volume type that this event pertains to |
| 4560 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4561 | // UID of app that requested permission |
| 4562 | optional int32 uid = 2 [(is_uid) = true]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4563 | // Number of items that were requested |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4564 | optional int32 item_count = 3; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4565 | // Result of this request |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4566 | optional Result result = 4; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4567 | } |
| 4568 | |
| 4569 | /** |
| 4570 | * Logs when MediaProvider has finished upgrading or downgrading its database schema. |
| 4571 | * |
| 4572 | * Logged from: |
| 4573 | * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java |
| 4574 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4575 | message MediaProviderSchemaChanged { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4576 | // Volume type that this event pertains to |
| 4577 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4578 | // Old database version code |
| 4579 | optional int32 version_from = 2; |
| 4580 | // New database version code |
| 4581 | optional int32 version_to = 3; |
| 4582 | // Total number of files in database |
| 4583 | optional int64 item_count = 4; |
| 4584 | // Duration of schema change, normalized per file |
| 4585 | optional float normalized_duration_millis = 5; |
| 4586 | } |
| 4587 | |
| 4588 | /** |
| 4589 | * Logs when MediaProvider has finished an idle maintenance job. |
| 4590 | * |
| 4591 | * Logged from: |
| 4592 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4593 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4594 | message MediaProviderIdleMaintenanceFinished { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4595 | // Volume type that this event pertains to |
| 4596 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4597 | |
| 4598 | // Total number of files in database |
| 4599 | optional int64 item_count = 2; |
| 4600 | // Duration of idle maintenance, normalized per file |
| 4601 | optional float normalized_duration_millis = 3; |
| 4602 | // Number of thumbnails found to be stale, normalized per file |
| 4603 | optional float normalized_stale_thumbnails = 4; |
| 4604 | // Number of items found to be expired, normalized per file |
| 4605 | optional float normalized_expired_media = 5; |
| 4606 | } |
| 4607 | |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4608 | /** |
| 4609 | * Represents boot time event with duration in ms. |
| 4610 | * |
| 4611 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4612 | */ |
| 4613 | message BootTimeEventDuration { |
| 4614 | enum DurationEvent { |
| 4615 | UNKNOWN = 0; |
| 4616 | // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat. |
| 4617 | ABSOLUTE_BOOT_TIME = 1; |
| 4618 | // Bootloader's 1st stage execution time. |
| 4619 | // Logged from bootstat. |
| 4620 | BOOTLOADER_FIRST_STAGE_EXEC = 2; |
| 4621 | // Bootloader's 1st stage loading time. |
| 4622 | // Logged from bootstat. |
| 4623 | BOOTLOADER_FIRST_STAGE_LOAD = 3; |
| 4624 | // Bootloader's kernel loading time. |
| 4625 | // Logged from bootstat. |
| 4626 | BOOTLOADER_KERNEL_LOAD = 4; |
| 4627 | // Bootloader's 2nd stage execution time. |
| 4628 | // Logged from bootstat. |
| 4629 | BOOTLOADER_SECOND_STAGE_EXEC = 5; |
| 4630 | // Bootloader's 2nd stage loading time. |
| 4631 | // Logged from bootstat. |
| 4632 | BOOTLOADER_SECOND_STAGE_LOAD = 6; |
| 4633 | // Duration for Bootloader to show unlocked device's warning UI. This should not happen |
| 4634 | // for locked device. |
| 4635 | // Logged from bootstat. |
| 4636 | BOOTLOADER_UI_WAIT = 7; |
| 4637 | // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above. |
| 4638 | // Logged from bootstat. |
| 4639 | BOOTLOADER_TOTAL = 8; |
| 4640 | // Shutdown duration inside init for the reboot before the current boot up. |
| 4641 | // Logged from f/b/services/.../BootReceiver.java. |
| 4642 | SHUTDOWN_DURATION = 9; |
| 4643 | // Total time for mounting of disk devices during bootup. |
| 4644 | // Logged from f/b/services/.../BootReceiver.java. |
| 4645 | MOUNT_DEFAULT_DURATION = 10; |
| 4646 | // Total time for early stage mounting of disk devices during bootup. |
| 4647 | // Logged from f/b/services/.../BootReceiver.java. |
| 4648 | MOUNT_EARLY_DURATION = 11; |
| 4649 | // Total time for late stage mounting of disk devices during bootup. |
| 4650 | // Logged from f/b/services/.../BootReceiver.java. |
| 4651 | MOUNT_LATE_DURATION = 12; |
| 4652 | // Average time to scan non-system app after OTA |
| 4653 | // Logged from f/b/services/.../PackageManagerService.java |
| 4654 | OTA_PACKAGE_MANAGER_INIT_TIME = 13; |
| 4655 | // Time to initialize Package manager after OTA |
| 4656 | // Logged from f/b/services/.../PackageManagerService.java |
| 4657 | OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14; |
| 4658 | // Time to scan all system app from Package manager after OTA |
| 4659 | // Logged from f/b/services/.../PackageManagerService.java |
| 4660 | OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15; |
| 4661 | // Init's total time for cold boot stage. |
| 4662 | // Logged from bootstat. |
| 4663 | COLDBOOT_WAIT = 16; |
| 4664 | // Init's total time for initializing selinux. |
| 4665 | // Logged from bootstat. |
| 4666 | SELINUX_INIT = 17; |
| 4667 | // Time since last factory reset. |
| 4668 | // Logged from bootstat. |
| 4669 | FACTORY_RESET_TIME_SINCE_RESET = 18; |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4670 | // Init's total time spent for completing the 1st stage. |
| 4671 | // Logged from bootstat. |
| 4672 | ANDROID_INIT_STAGE_1 = 19; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4673 | } |
| 4674 | |
| 4675 | // Type of the event. |
| 4676 | optional DurationEvent event = 1; |
| 4677 | // Duration of the event in ms. |
| 4678 | optional int64 duration_millis = 2; |
| 4679 | } |
| 4680 | |
| 4681 | /** |
| 4682 | * Represents the start of specific boot time event during bootup in ms. This is usually a time |
| 4683 | * since boot-up. |
| 4684 | * |
| 4685 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4686 | */ |
| 4687 | message BootTimeEventElapsedTime { |
| 4688 | enum ElapsedTimeEvent { |
| 4689 | UNKNOWN = 0; |
| 4690 | // Time when init starts 1st stage. Logged from bootstat. |
| 4691 | ANDROID_INIT_STAGE_1 = 1; |
| 4692 | // Time when sys.boot_completed prop is set. |
| 4693 | // Logged from bootstat. |
| 4694 | BOOT_COMPLETE = 2; |
| 4695 | // BOOT_COMPLETE for encrypted device. |
| 4696 | BOOT_COMPLETE_ENCRYPTION = 3; |
| 4697 | // BOOT_COMPLETE for device with no encryption. |
| 4698 | BOOT_COMPLETE_NO_ENCRYPTION = 4; |
| 4699 | // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time. |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4700 | BOOT_COMPLETE_POST_DECRYPT = 5; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4701 | // BOOT_COMPLETE after factory reset. |
| 4702 | FACTORY_RESET_BOOT_COMPLETE = 6; |
| 4703 | // BOOT_COMPLETE_NO_ENCRYPTION after factory reset. |
| 4704 | FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7; |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4705 | // BOOT_COMPLETE_POST_DECRYPT after factory reset. |
| 4706 | FACTORY_RESET_BOOT_COMPLETE_POST_DECRYPT = 8; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4707 | // BOOT_COMPLETE after OTA. |
| 4708 | OTA_BOOT_COMPLETE = 9; |
| 4709 | // BOOT_COMPLETE_NO_ENCRYPTION after OTA. |
| 4710 | OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10; |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4711 | // BOOT_COMPLETE_POST_DECRYPT after OTA. |
| 4712 | OTA_BOOT_COMPLETE_POST_DECRYPT = 11; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4713 | // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast. |
| 4714 | // Logged from f/b/services/.../UserController.java |
| 4715 | FRAMEWORK_LOCKED_BOOT_COMPLETED = 12; |
| 4716 | // Time when the system starts sending BOOT_COMPLETED broadcast. |
| 4717 | // Logged from f/b/services/.../UserController.java |
| 4718 | FRAMEWORK_BOOT_COMPLETED = 13; |
| 4719 | // Time when the package manager starts init. |
| 4720 | // Logged from f/b/services/.../SystemServer.java |
| 4721 | PACKAGE_MANAGER_INIT_START = 14; |
| 4722 | // Time when package manager is ready |
| 4723 | // Logged from f/b/services/.../SystemServer.java |
| 4724 | PACKAGE_MANAGER_INIT_READY = 15; |
| 4725 | // Represents the time when user has entered unlock credential for system with user pin. |
| 4726 | // Logged from bootstat. |
| 4727 | POST_DECRYPT = 16; |
| 4728 | // Represents the start of zygote's init. |
| 4729 | // Logged from zygote itself. |
| 4730 | ZYGOTE_INIT_START = 17; |
| 4731 | // Represents the start of secondary zygote's init. |
| 4732 | // TODO: add logging to zygote |
| 4733 | SECONDARY_ZYGOTE_INIT_START = 18; |
| 4734 | // Represents the start of system server's init. |
| 4735 | // Logged from f/b/services/.../SystemServer.java |
| 4736 | SYSTEM_SERVER_INIT_START = 19; |
| 4737 | // Represents the completion of system server's init. |
| 4738 | // Logged from f/b/services/.../SystemServer.java |
| 4739 | SYSTEM_SERVER_READY = 20; |
| 4740 | // Represents the start of launcher during boot-up. |
| 4741 | // TODO: add logging |
| 4742 | LAUNCHER_START = 21; |
| 4743 | // Represents the completion of launcher's initial rendering. User can use other apps from |
| 4744 | // launcher from this point. |
| 4745 | // TODO: add logging |
| 4746 | LAUNCHER_SHOWN = 22; |
| 4747 | } |
| 4748 | |
| 4749 | // Type of the event. |
| 4750 | optional ElapsedTimeEvent event = 1; |
| 4751 | // Time since bootup for the event. |
| 4752 | // It should be acquired from SystemClock elapsedRealtime() call or equivalent. |
| 4753 | optional int64 time_millis = 2; |
| 4754 | } |
| 4755 | |
| 4756 | /** |
| 4757 | * Boot time events with UTC time. |
| 4758 | * |
| 4759 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4760 | */ |
| 4761 | message BootTimeEventUtcTime { |
| 4762 | enum UtcTimeEvent { |
| 4763 | UNKNOWN = 0; |
| 4764 | // Time of the bootstat's marking of 1st boot after the last factory reset. |
| 4765 | // Logged from bootstat. |
| 4766 | FACTORY_RESET_RESET_TIME = 1; |
| 4767 | // The time when bootstat records FACTORY_RESET_* events. This is close to |
| 4768 | // BOOT_COMPLETE time for the current bootup. |
| 4769 | // Logged from bootstat. |
| 4770 | FACTORY_RESET_CURRENT_TIME = 2; |
| 4771 | // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose. |
| 4772 | // Logged from bootstat. |
| 4773 | FACTORY_RESET_RECORD_VALUE = 3; |
| 4774 | } |
| 4775 | |
| 4776 | // Type of the event. |
| 4777 | optional UtcTimeEvent event = 1; |
| 4778 | // UTC time for the event. |
| 4779 | optional int64 utc_time_secs = 2; |
| 4780 | } |
| 4781 | |
| 4782 | /** |
| 4783 | * Boot time events representing specific error code during bootup. |
| 4784 | * Meaning of error code can be different per each event type. |
| 4785 | * |
| 4786 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4787 | */ |
| 4788 | message BootTimeEventErrorCode { |
| 4789 | enum ErrorCodeEvent { |
| 4790 | UNKNOWN = 0; |
| 4791 | // Linux error code for time() call to get the current UTC time. |
| 4792 | // Logged from bootstat. |
| 4793 | FACTORY_RESET_CURRENT_TIME_FAILURE = 1; |
| 4794 | // Represents UmountStat before the reboot for the current boot up. Error codes defined |
| 4795 | // as UMOUNT_STAT_* from init/reboot.cpp. |
| 4796 | // Logged from f/b/services/.../BootReceiver.java. |
| 4797 | SHUTDOWN_UMOUNT_STAT = 2; |
Keun young Park | df1534d | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4798 | // Reprepsents fie system mounting error code of /data partition for the current boot. |
| 4799 | // Error codes defined as combination of FsStatFlags from system/core/fs_mgr/fs_mgr.cpp. |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4800 | // Logged from f/b/services/.../BootReceiver.java. |
Keun young Park | df1534d | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4801 | FS_MGR_FS_STAT_DATA_PARTITION = 3; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4802 | } |
| 4803 | |
| 4804 | // Type of the event. |
| 4805 | optional ErrorCodeEvent event = 1; |
| 4806 | // error code defined per each event type. |
| 4807 | // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of |
| 4808 | // FS_MGR_FS_STAT. |
| 4809 | optional int32 error_code = 2; |
| 4810 | } |
| 4811 | |
Alessio Balsini | 628fb8d | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 4812 | /** |
| 4813 | * Collects Virtual A/B statistics related to the use of dm-snapshot performed |
| 4814 | * after an OTA. |
| 4815 | * |
| 4816 | * Logged from: |
Yifan Hong | 36137f0 | 2020-03-11 10:35:08 -0700 | [diff] [blame] | 4817 | * - system/update_engine/cleanup_previous_update_action.cc |
Alessio Balsini | 628fb8d | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 4818 | */ |
| 4819 | message SnapshotMergeReported { |
| 4820 | // Keep in sync with |
| 4821 | // system/core/fs_mgr/libsnapshot/android/snapshot/snapshot.proto |
| 4822 | enum UpdateState { |
| 4823 | // No update or merge is in progress. |
| 4824 | NONE = 0; |
| 4825 | // An update is applying; snapshots may already exist. |
| 4826 | INITIATED = 1; |
| 4827 | // An update is pending, but has not been successfully booted yet. |
| 4828 | UNVERIFIED = 2; |
| 4829 | // The kernel is merging in the background. |
| 4830 | MERGING = 3; |
| 4831 | // Post-merge cleanup steps could not be completed due to a transient |
| 4832 | // error, but the next reboot will finish any pending operations. |
| 4833 | MERGE_NEEDS_REBOOT = 4; |
| 4834 | // Merging is complete, and needs to be acknowledged. |
| 4835 | MERGE_COMPLETED = 5; |
| 4836 | // Merging failed due to an unrecoverable error. |
| 4837 | MERGE_FAILED = 6; |
| 4838 | // The update was implicitly cancelled, either by a rollback or a flash |
| 4839 | // operation via fastboot. This state can only be returned by WaitForMerge. |
| 4840 | CANCELLED = 7; |
| 4841 | }; |
| 4842 | |
| 4843 | // Status of the update after the merge attempts. |
| 4844 | optional UpdateState final_state = 1; |
| 4845 | |
| 4846 | // Time to complete a merge operation in milliseconds. |
| 4847 | // A negative value corresponds to the case in which the merge operation |
| 4848 | // was interrupted and resumed (e.g. in case of a system reboot during the |
| 4849 | // merge). |
| 4850 | optional int64 duration_millis = 2; |
| 4851 | |
| 4852 | // Number of reboots that occurred after issuing and before completing the |
| 4853 | // merge of all the snapshot devices. |
| 4854 | optional int32 intermediate_reboots = 3; |
| 4855 | } |
| 4856 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4857 | ////////////////////////////////////////////////////////////////////// |
| 4858 | // Pulled atoms below this line // |
| 4859 | ////////////////////////////////////////////////////////////////////// |
| 4860 | |
| 4861 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4862 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 4863 | * |
| 4864 | * Pulled from: |
| 4865 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 4866 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4867 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4868 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4869 | |
| 4870 | optional int64 rx_bytes = 2; |
| 4871 | |
| 4872 | optional int64 rx_packets = 3; |
| 4873 | |
| 4874 | optional int64 tx_bytes = 4; |
| 4875 | |
| 4876 | optional int64 tx_packets = 5; |
| 4877 | } |
| 4878 | |
| 4879 | /** |
| 4880 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 4881 | * |
| 4882 | * Pulled from: |
| 4883 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 4884 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4885 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4886 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4887 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4888 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 4889 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4890 | |
| 4891 | optional int64 rx_bytes = 3; |
| 4892 | |
| 4893 | optional int64 rx_packets = 4; |
| 4894 | |
| 4895 | optional int64 tx_bytes = 5; |
| 4896 | |
| 4897 | optional int64 tx_packets = 6; |
| 4898 | } |
| 4899 | |
| 4900 | /** |
| 4901 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 4902 | * |
| 4903 | * Pulled from: |
| 4904 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 4905 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4906 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4907 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4908 | |
| 4909 | optional int64 rx_bytes = 2; |
| 4910 | |
| 4911 | optional int64 rx_packets = 3; |
| 4912 | |
| 4913 | optional int64 tx_bytes = 4; |
| 4914 | |
| 4915 | optional int64 tx_packets = 5; |
| 4916 | } |
| 4917 | |
| 4918 | /** |
| 4919 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 4920 | * |
| 4921 | * Pulled from: |
| 4922 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 4923 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4924 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4925 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4926 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4927 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 4928 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4929 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4930 | |
| 4931 | optional int64 rx_bytes = 3; |
| 4932 | |
| 4933 | optional int64 rx_packets = 4; |
| 4934 | |
| 4935 | optional int64 tx_bytes = 5; |
| 4936 | |
| 4937 | optional int64 tx_packets = 6; |
| 4938 | } |
| 4939 | |
| 4940 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4941 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 4942 | * |
| 4943 | * Pulled from: |
| 4944 | * StatsCompanionService |
| 4945 | */ |
| 4946 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4947 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4948 | |
| 4949 | optional int64 rx_bytes = 2; |
| 4950 | |
| 4951 | optional int64 tx_bytes = 3; |
| 4952 | } |
| 4953 | |
| 4954 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4955 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 4956 | * android/internal/os/KernelWakelockStats.java |
| 4957 | * |
| 4958 | * Pulled from: |
| 4959 | * StatsCompanionService using KernelWakelockReader. |
| 4960 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4961 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4962 | optional string name = 1; |
| 4963 | |
| 4964 | optional int32 count = 2; |
| 4965 | |
| 4966 | optional int32 version = 3; |
| 4967 | |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4968 | optional int64 time_micros = 4; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4969 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4970 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4971 | /** |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4972 | * Pulls low power state information. If power.stats HAL is not available, this |
| 4973 | * includes platform and subsystem sleep state information, |
| 4974 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState |
| 4975 | * as defined in: |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4976 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4977 | * hardware/interfaces/power/1.1/types.hal |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4978 | * If power.stats HAL is available, this includes PowerEntityStateResidencyResult |
| 4979 | * as defined in: |
| 4980 | * hardware/interfaces/power/stats/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4981 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4982 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4983 | // Subsystem name |
| 4984 | optional string subsystem_name = 1; |
| 4985 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 4986 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4987 | // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the |
| 4988 | // powerEntityStateName from the corresponding PowerEntityStateInfo. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4989 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 4990 | // The number of times it entered, or voted for entering the sleep state |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4991 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 4992 | // The length of time spent in, or spent voting for, the sleep state |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4993 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 4994 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4995 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4996 | /** |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 4997 | * Pulls on-device power measurement information. |
| 4998 | * Data defined by hardware/interfaces/power/stats/1.0/types.hal. |
| 4999 | * Pulled from: |
| 5000 | * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp |
| 5001 | */ |
| 5002 | message OnDevicePowerMeasurement { |
| 5003 | // Name of the subsystem (to which the rail belongs). |
| 5004 | optional string subsystem_name = 1; |
| 5005 | |
| 5006 | // Rail name. The rail lies within the subsystem. |
| 5007 | optional string rail_name = 2; |
| 5008 | |
| 5009 | // Time (in ms since boot) at which the rail energy value was measured. |
| 5010 | // This may differ slightly from the time that statsd logs this information. |
| 5011 | optional uint64 measurement_timestamp_millis = 3; |
| 5012 | |
| 5013 | // Accumulated energy used via the rail since device boot in uWs. |
| 5014 | optional uint64 energy_microwatt_secs = 4; |
| 5015 | } |
| 5016 | |
| 5017 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5018 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 5019 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 5020 | * starts from highest to lowest. The value should be monotonically |
| 5021 | * increasing since boot. However, if there is a cpu |
| 5022 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5023 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5024 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5025 | optional uint32 cluster = 1; |
| 5026 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5027 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5028 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5029 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5030 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5031 | * Pulls Cpu Time Per Uid. |
| 5032 | * Note that isolated process uid time should be attributed to host uids. |
| 5033 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5034 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5035 | optional int32 uid = 1 [(is_uid) = true]; |
Misha Wagner | 6bc6c91 | 2018-11-16 13:19:54 +0000 | [diff] [blame] | 5036 | optional uint64 user_time_micros = 2; |
| 5037 | optional uint64 sys_time_micros = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5038 | } |
| 5039 | |
| 5040 | /** |
| 5041 | * Pulls Cpu Time Per Uid per frequency. |
| 5042 | * Note that isolated process uid time should be attributed to host uids. |
| 5043 | * For each uid, we order the time by descending frequencies. |
| 5044 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5045 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5046 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 5047 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5048 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5049 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 5050 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5051 | /** |
| 5052 | * Pulls Wifi Controller Activity Energy Info |
| 5053 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 5054 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5055 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5056 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5057 | // stack reported state |
| 5058 | // TODO: replace this with proto enum |
| 5059 | optional int32 stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5060 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5061 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5062 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5063 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5064 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5065 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5066 | // product of current(mA), voltage(V) and time(ms) |
| 5067 | optional uint64 controller_energy_used = 6; |
| 5068 | } |
| 5069 | |
| 5070 | /** |
| 5071 | * Pulls Modem Activity Energy Info |
| 5072 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5073 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5074 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5075 | optional uint64 timestamp_millis = 1; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5076 | // sleep time in millis. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5077 | optional uint64 sleep_time_millis = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5078 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5079 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5080 | /** |
| 5081 | * Tx power index |
| 5082 | * index 0 = tx_power < 0dBm |
| 5083 | * index 1 = 0dBm < tx_power < 5dBm |
| 5084 | * index 2 = 5dBm < tx_power < 15dBm |
| 5085 | * index 3 = 15dBm < tx_power < 20dBm |
| 5086 | * index 4 = tx_power > 20dBm |
| 5087 | */ |
| 5088 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5089 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5090 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5091 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5092 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5093 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5094 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5095 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5096 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5097 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5098 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5099 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5100 | // product of current(mA), voltage(V) and time(ms) |
Chen Xu | 7322e4a | 2019-09-07 15:51:22 -0700 | [diff] [blame] | 5101 | optional uint64 energy_used = 10 [deprecated=true]; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 5102 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 5103 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5104 | /** |
| 5105 | * Pulls Bluetooth Activity Energy Info |
| 5106 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 5107 | */ |
| 5108 | message BluetoothActivityInfo { |
| 5109 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5110 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5111 | // bluetooth stack state |
| 5112 | optional int32 bluetooth_stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5113 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5114 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5115 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5116 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5117 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5118 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5119 | // product of current(mA), voltage(V) and time(ms) |
| 5120 | optional uint64 energy_used = 6; |
| 5121 | } |
| 5122 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 5123 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5124 | * Logs the memory stats for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5125 | * |
| 5126 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5127 | */ |
| 5128 | message ProcessMemoryState { |
| 5129 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5130 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5131 | |
| 5132 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5133 | // Usually package name, "system" for system server. |
| 5134 | // Provided by ActivityManagerService. |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5135 | optional string process_name = 2; |
| 5136 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5137 | // Current OOM score adjustment. Value read from ProcessRecord. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5138 | optional int32 oom_adj_score = 3; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5139 | |
| 5140 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5141 | optional int64 page_fault = 4; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5142 | |
| 5143 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5144 | optional int64 page_major_fault = 5; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5145 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5146 | // RSS |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5147 | // Value is read from memory.stat, field total_rss if per-app memory |
| 5148 | // cgroups are enabled. Otherwise, value from /proc/pid/stat. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5149 | optional int64 rss_in_bytes = 6; |
| 5150 | |
| 5151 | // CACHE |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5152 | // Value is read from memory.stat, field total_cache if per-app memory |
| 5153 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5154 | optional int64 cache_in_bytes = 7; |
| 5155 | |
| 5156 | // SWAP |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5157 | // Value is read from memory.stat, field total_swap if per-app memory |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5158 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5159 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | aaf6089 | 2018-09-12 13:04:30 +0100 | [diff] [blame] | 5160 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5161 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5162 | optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; |
Rafal Slawik | 272a816 | 2018-11-01 15:12:28 +0000 | [diff] [blame] | 5163 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5164 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 5165 | optional int64 start_time_nanos = 10 [deprecated = true]; |
Ioannis Ilkos | 466ad6c | 2019-06-18 17:42:00 +0100 | [diff] [blame] | 5166 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5167 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 5168 | optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true]; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 5169 | } |
| 5170 | |
| 5171 | /* |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5172 | * Logs the memory high-water mark for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5173 | * |
| 5174 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) |
| 5175 | * and for selected native processes. |
Rafal Slawik | 44b8814 | 2018-12-15 16:48:09 +0000 | [diff] [blame] | 5176 | * |
| 5177 | * Pulling this atom resets high-water mark counters for all processes. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5178 | */ |
| 5179 | message ProcessMemoryHighWaterMark { |
| 5180 | // The uid if available. -1 means not available. |
| 5181 | optional int32 uid = 1 [(is_uid) = true]; |
| 5182 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5183 | // The process name. |
| 5184 | // Usually package name or process cmdline. |
| 5185 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5186 | optional string process_name = 2; |
| 5187 | |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 5188 | // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is |
| 5189 | // computed by converting kilobytes to bytes. |
| 5190 | optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true]; |
| 5191 | |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5192 | // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in |
| 5193 | // /proc/PID/status. |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 5194 | optional int32 rss_high_water_mark_in_kilobytes = 4; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5195 | } |
| 5196 | |
| 5197 | /* |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 5198 | * Logs the memory stats for a process. |
| 5199 | * |
| 5200 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService) |
| 5201 | * and for selected native processes. |
| 5202 | */ |
| 5203 | message ProcessMemorySnapshot { |
| 5204 | // The uid if available. -1 means not available. |
| 5205 | optional int32 uid = 1 [(is_uid) = true]; |
| 5206 | |
| 5207 | // The process name. |
| 5208 | // Usually package name or process cmdline. |
| 5209 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
| 5210 | optional string process_name = 2; |
| 5211 | |
| 5212 | // The pid of the process. |
| 5213 | // Allows to disambiguate instances of the process. |
| 5214 | optional int32 pid = 3; |
| 5215 | |
| 5216 | // The current OOM score adjustment value. |
| 5217 | // Read from ProcessRecord for managed processes. |
| 5218 | // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones. |
| 5219 | optional int32 oom_score_adj = 4; |
| 5220 | |
| 5221 | // The current RSS of the process. |
| 5222 | // VmRSS from /proc/pid/status. |
| 5223 | optional int32 rss_in_kilobytes = 5; |
| 5224 | |
| 5225 | // The current anon RSS of the process. |
| 5226 | // RssAnon from /proc/pid/status. |
| 5227 | optional int32 anon_rss_in_kilobytes = 6; |
| 5228 | |
| 5229 | // The current swap size of the process. |
| 5230 | // VmSwap from /proc/pid/status. |
| 5231 | optional int32 swap_in_kilobytes = 7; |
| 5232 | |
| 5233 | // The sum of rss_in_kilobytes and swap_in_kilobytes. |
| 5234 | optional int32 anon_rss_and_swap_in_kilobytes = 8; |
| 5235 | } |
| 5236 | |
| 5237 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5238 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5239 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5240 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5241 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5242 | } |
| 5243 | |
| 5244 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5245 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5246 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5247 | message SystemUptime { |
| 5248 | // Milliseconds since the system was booted. |
| 5249 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 5250 | // for external input). |
| 5251 | // It is not affected by clock scaling, idle, or other power saving mechanisms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5252 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5253 | } |
| 5254 | |
| 5255 | /* |
| 5256 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 5257 | * active: X (X is # cores) |
| 5258 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 5259 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 5260 | * ... |
| 5261 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 5262 | * The file contains a monotonically increasing count of time for a single boot. |
| 5263 | */ |
| 5264 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5265 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 5266 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5267 | } |
| 5268 | |
| 5269 | /** |
| 5270 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 5271 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 5272 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 5273 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 5274 | * ... |
| 5275 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 5276 | * The file contains a monotonically increasing count of time for a single boot. |
| 5277 | */ |
| 5278 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5279 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 5280 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5281 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 5282 | } |
| 5283 | |
| 5284 | /* |
| 5285 | * Pulls free disk space, for data, system partition and temporary directory. |
| 5286 | */ |
| 5287 | message DiskSpace { |
| 5288 | // available bytes in data partition |
| 5289 | optional uint64 data_available_bytes = 1; |
| 5290 | // available bytes in system partition |
| 5291 | optional uint64 system_available_bytes = 2; |
| 5292 | // available bytes in download cache or temp directories |
| 5293 | optional uint64 temp_available_bytes = 3; |
| 5294 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5295 | |
| 5296 | /** |
| 5297 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 9876a3b | 2019-01-11 14:28:35 -0800 | [diff] [blame] | 5298 | * |
| 5299 | * Pulled from StatsCompanionService.java |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5300 | */ |
| 5301 | message RemainingBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5302 | optional int32 charge_micro_ampere_hour = 1; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5303 | } |
| 5304 | |
| 5305 | /** |
| 5306 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5307 | * Pulled from: |
| 5308 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5309 | */ |
| 5310 | message FullBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5311 | optional int32 capacity_micro_ampere_hour = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5312 | } |
| 5313 | |
| 5314 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 5315 | * Pulls battery voltage. |
| 5316 | * Pulled from: |
| 5317 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 5318 | */ |
| 5319 | message BatteryVoltage { |
| 5320 | // The voltage of the battery, in millivolts. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5321 | optional int32 voltage_millivolt = 1; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 5322 | } |
| 5323 | |
| 5324 | /** |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 5325 | * Pulls battery level (percent full, from 0 to 100). |
| 5326 | * |
| 5327 | * Pulled from: |
| 5328 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 5329 | */ |
| 5330 | message BatteryLevel { |
| 5331 | // Battery level. Should be in [0, 100]. |
| 5332 | optional int32 battery_level = 1; |
| 5333 | } |
| 5334 | |
| 5335 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 5336 | * Pulls the temperature of various parts of the device. |
| 5337 | * The units are tenths of a degree Celsius. Eg: 30.3C is reported as 303. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5338 | * |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 5339 | * Pulled from StatsCompanionService.java |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5340 | */ |
| 5341 | message Temperature { |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 5342 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5343 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 5344 | |
| 5345 | // The name of the temperature source. Eg. CPU0 |
| 5346 | optional string sensor_name = 2; |
| 5347 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 5348 | // Temperature in tenths of a degree C. |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 5349 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5350 | optional int32 temperature_deci_celsius = 3; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 5351 | |
| 5352 | // Relative severity of the throttling, see enum definition. |
| 5353 | optional android.os.ThrottlingSeverityEnum severity = 4; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 5354 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 5355 | |
| 5356 | /** |
| 5357 | * Pulls the statistics of calls to Binder. |
| 5358 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 5359 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 5360 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 5361 | * |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 5362 | * Next tag: 15 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 5363 | */ |
| 5364 | message BinderCalls { |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 5365 | // UID of the process responsible for the binder transaction. It will be set if the process |
| 5366 | // executing the binder transaction attribute the transaction to another uid using |
| 5367 | // Binder.setThreadWorkSource(). |
| 5368 | // |
| 5369 | // If not set, the value will be -1. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 5370 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 5371 | // UID of the process executing the binder transaction. |
| 5372 | optional int32 direct_caller_uid = 14; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 5373 | // Fully qualified class name of the API call. |
| 5374 | // |
| 5375 | // This is a system server class name. |
| 5376 | // |
| 5377 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 5378 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 5379 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 5380 | // commonly used APIs. |
| 5381 | optional string service_class_name = 2; |
| 5382 | // Method name of the API call. It can also be a transaction code if we cannot |
| 5383 | // resolve it to a name. See Binder#getTransactionName. |
| 5384 | // |
| 5385 | // This is a system server method name. |
| 5386 | optional string service_method_name = 3; |
| 5387 | // Total number of API calls. |
| 5388 | optional int64 call_count = 4; |
| 5389 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 5390 | optional bool screen_interactive = 13; |
| 5391 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 5392 | // call_count will be equal to recorded_call_count. |
| 5393 | // |
| 5394 | // If recorded_call_count is different than call_count, it means data collection has been |
| 5395 | // sampled. All the fields below will be sampled in this case. |
| 5396 | optional int64 recorded_call_count = 12; |
| 5397 | // Number of exceptions thrown by the API. |
| 5398 | optional int64 recorded_exception_count = 5; |
| 5399 | // Total latency of all API calls. |
| 5400 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 5401 | optional int64 recorded_total_latency_micros = 6; |
| 5402 | // Maximum latency of one API call. |
| 5403 | optional int64 recorded_max_latency_micros = 7; |
| 5404 | // Total CPU usage of all API calls. |
| 5405 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 5406 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 5407 | optional int64 recorded_total_cpu_micros = 8; |
| 5408 | // Maximum CPU usage of one API call. |
| 5409 | optional int64 recorded_max_cpu_micros = 9; |
| 5410 | // Maximum parcel reply size of one API call. |
| 5411 | optional int64 recorded_max_reply_size_bytes = 10; |
| 5412 | // Maximum parcel request size of one API call. |
| 5413 | optional int64 recorded_max_request_size_bytes = 11; |
| 5414 | } |
| 5415 | |
| 5416 | /** |
| 5417 | * Pulls the statistics of exceptions during calls to Binder. |
| 5418 | * |
| 5419 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 5420 | * > adb shell dumpsys binder_calls_stats --reset |
| 5421 | */ |
| 5422 | message BinderCallsExceptions { |
| 5423 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 5424 | // |
| 5425 | // This is an exception class name thrown by the system server. |
| 5426 | optional string exception_class_name = 1; |
| 5427 | // Total number of exceptions. |
| 5428 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 5429 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5430 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5431 | /** |
| 5432 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 5433 | * |
| 5434 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 5435 | * config on the device. |
| 5436 | * |
| 5437 | * Next tag: 11 |
| 5438 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5439 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 5440 | // The uid that made a call to the System Server and caused the message to be enqueued. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5441 | optional int32 uid = 1 [(is_uid) = true]; |
| 5442 | |
| 5443 | // Fully qualified class name of the handler target class. |
| 5444 | // |
| 5445 | // This field does not contain PII. This is a system server class name. |
| 5446 | optional string handler_class_name = 2; |
| 5447 | |
| 5448 | // The name of the thread that runs the Looper. |
| 5449 | // |
| 5450 | // This field does not contain PII. This is a system server thread name. |
| 5451 | optional string looper_thread_name = 3; |
| 5452 | |
| 5453 | // The name of the dispatched message. |
| 5454 | // |
| 5455 | // This field does not contain PII. This is a system server constant or class |
| 5456 | // name. |
| 5457 | optional string message_name = 4; |
| 5458 | |
| 5459 | // Total number of successfully dispatched messages. |
| 5460 | optional int64 message_count = 5; |
| 5461 | |
| 5462 | // Total number of messages that failed dispatching. |
| 5463 | optional int64 exception_count = 6; |
| 5464 | |
| 5465 | // Total number of processed messages we have data recorded for. If we |
| 5466 | // collected data for all the messages, message_count will be equal to |
| 5467 | // recorded_message_count. |
| 5468 | // |
| 5469 | // If recorded_message_count is different than message_count, it means data |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 5470 | // collection has been sampled. The fields below will be sampled in this case. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5471 | optional int64 recorded_message_count = 7; |
| 5472 | |
| 5473 | // Total latency of all processed messages. |
| 5474 | // Average can be computed using recorded_total_latency_micros / |
| 5475 | // recorded_message_count. |
| 5476 | optional int64 recorded_total_latency_micros = 8; |
| 5477 | |
| 5478 | // Total CPU usage of all processed message. |
| 5479 | // Average can be computed using recorded_total_cpu_micros / |
| 5480 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5481 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5482 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5483 | |
| 5484 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 5485 | optional bool screen_interactive = 10; |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 5486 | |
| 5487 | // Max recorded CPU usage of all processed messages. |
| 5488 | optional int64 recorded_max_cpu_micros = 11; |
| 5489 | |
| 5490 | // Max recorded latency of all processed messages. |
| 5491 | optional int64 recorded_max_latency_micros = 12; |
| 5492 | |
| 5493 | // Total number of messages we tracked the dispatching delay for. If we |
| 5494 | // collected data for all the messages, message_count will be equal to |
| 5495 | // recorded_delay_message_count. |
| 5496 | // |
| 5497 | // If recorded_delay_message_count is different than message_count, it means data |
| 5498 | // collection has been sampled or/and not all messages specified the target dispatch time. |
| 5499 | // The fields below will be sampled in this case. |
| 5500 | optional int64 recorded_delay_message_count = 13; |
| 5501 | |
| 5502 | // Total dispatching delay of all processed messages. |
| 5503 | // Calculated as a difference between the target dispatching time (Message.when) |
| 5504 | // and the actual dispatching time. |
| 5505 | // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. |
| 5506 | optional int64 recorded_total_delay_millis = 14; |
| 5507 | |
| 5508 | // Max dispatching delay of all processed messages. |
| 5509 | // Calculated as a difference between the target dispatching time (Message.when) |
| 5510 | // and the actual dispatching time. |
| 5511 | optional int64 recorded_max_delay_millis = 15; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5512 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 5513 | |
| 5514 | /** |
| 5515 | * Pulls disk information, such as write speed and latency. |
| 5516 | */ |
| 5517 | message DiskStats { |
| 5518 | // Time taken to open, write 512B to, and close a file. |
| 5519 | // -1 if error performing the check. |
| 5520 | optional int64 data_write_latency_millis = 1; |
| 5521 | |
| 5522 | optional bool file_based_encryption = 2; |
| 5523 | |
| 5524 | // Recent disk write speed in kB/s. |
| 5525 | // -1 if error querying storageed. |
| 5526 | // 0 if data is unavailable. |
| 5527 | optional int32 recent_disk_write_speed = 3; |
| 5528 | } |
| 5529 | |
| 5530 | |
| 5531 | /** |
| 5532 | * Free and total bytes of the Data, Cache, and System partition. |
| 5533 | */ |
| 5534 | message DirectoryUsage { |
| 5535 | enum Directory { |
| 5536 | UNKNOWN = 0; |
| 5537 | DATA = 1; |
| 5538 | CACHE = 2; |
| 5539 | SYSTEM = 3; |
| 5540 | } |
| 5541 | optional Directory directory = 1; |
| 5542 | optional int64 free_bytes = 2; |
| 5543 | optional int64 total_bytes = 3; |
| 5544 | } |
| 5545 | |
| 5546 | |
| 5547 | /** |
| 5548 | * Size of an application: apk size, data size, and cache size. |
| 5549 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 5550 | * Information is only reported for apps with the primary user (user 0). |
| 5551 | * Sizes are aggregated by package name. |
| 5552 | */ |
| 5553 | message AppSize { |
| 5554 | // Including uids will involve modifying diskstats logic. |
| 5555 | optional string package_name = 1; |
| 5556 | // App size in bytes. -1 if unavailable. |
| 5557 | optional int64 app_size_bytes = 2; |
| 5558 | // App data size in bytes. -1 if unavailable. |
| 5559 | optional int64 app_data_size_bytes = 3; |
| 5560 | // App cache size in bytes. -1 if unavailable. |
| 5561 | optional int64 app_cache_size_bytes = 4; |
| 5562 | // Time that the cache file was produced. |
| 5563 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 5564 | optional int64 cache_time_millis = 5; |
| 5565 | } |
| 5566 | |
| 5567 | |
| 5568 | /** |
| 5569 | * Size of a particular category. Eg: photos, videos. |
| 5570 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 5571 | */ |
| 5572 | message CategorySize { |
| 5573 | enum Category { |
| 5574 | UNKNOWN = 0; |
| 5575 | APP_SIZE = 1; |
| 5576 | APP_DATA_SIZE = 2; |
| 5577 | APP_CACHE_SIZE = 3; |
| 5578 | PHOTOS = 4; |
| 5579 | VIDEOS = 5; |
| 5580 | AUDIO = 6; |
| 5581 | DOWNLOADS = 7; |
| 5582 | SYSTEM = 8; |
| 5583 | OTHER = 9; |
| 5584 | } |
| 5585 | optional Category category = 1; |
| 5586 | // Category size in bytes. |
| 5587 | optional int64 size_bytes = 2; |
| 5588 | // Time that the cache file was produced. |
| 5589 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 5590 | optional int64 cache_time_millis = 3; |
| 5591 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5592 | |
| 5593 | /** |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 5594 | * Pulls per uid I/O stats. The stats are cumulative since boot. |
| 5595 | * |
| 5596 | * Read/write bytes are I/O events from a storage device |
| 5597 | * Read/write chars are data requested by read/write syscalls, and can be |
| 5598 | * satisfied by caching. |
| 5599 | * |
| 5600 | * Pulled from StatsCompanionService, which reads proc/uid_io/stats. |
| 5601 | */ |
| 5602 | message DiskIo { |
| 5603 | optional int32 uid = 1 [(is_uid) = true]; |
| 5604 | optional int64 fg_chars_read = 2; |
| 5605 | optional int64 fg_chars_write = 3; |
| 5606 | optional int64 fg_bytes_read = 4; |
| 5607 | optional int64 fg_bytes_write = 5; |
| 5608 | optional int64 bg_chars_read = 6; |
| 5609 | optional int64 bg_chars_write = 7; |
| 5610 | optional int64 bg_bytes_read = 8; |
| 5611 | optional int64 bg_bytes_write = 9; |
| 5612 | optional int64 fg_fsync = 10; |
| 5613 | optional int64 bg_fsync= 11; |
| 5614 | } |
| 5615 | |
| 5616 | |
| 5617 | /** |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5618 | * Pulls the number of fingerprints for each user. |
| 5619 | * |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 5620 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5621 | */ |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5622 | message NumFingerprintsEnrolled { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5623 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5624 | // Defined in android/os/UserHandle.java |
| 5625 | optional int32 user = 1; |
| 5626 | // Number of fingerprints registered to that user. |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5627 | optional int32 num_fingerprints_enrolled = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5628 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5629 | |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5630 | /** |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5631 | * Pulls the number of faces for each user. |
| 5632 | * |
| 5633 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
| 5634 | */ |
| 5635 | message NumFacesEnrolled { |
| 5636 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5637 | // Defined in android/os/UserHandle.java |
| 5638 | optional int32 user = 1; |
| 5639 | // Number of faces registered to that user. |
| 5640 | optional int32 num_faces_enrolled = 2; |
| 5641 | } |
| 5642 | /** |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5643 | * A mapping of role holder -> role |
| 5644 | */ |
| 5645 | message RoleHolder { |
| 5646 | // uid of the role holder |
| 5647 | optional int32 uid = 1 [(is_uid) = true]; |
| 5648 | |
| 5649 | // package name of the role holder |
| 5650 | optional string package_name = 2; |
| 5651 | |
| 5652 | // the role held |
| 5653 | optional string role = 3; |
| 5654 | } |
| 5655 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5656 | message AggStats { |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5657 | // These are all in byte resolution. |
| 5658 | optional int64 min = 1 [deprecated = true]; |
| 5659 | optional int64 average = 2 [deprecated = true]; |
| 5660 | optional int64 max = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5661 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5662 | // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above |
| 5663 | // int64 fields. |
| 5664 | optional int32 mean_kb = 4; |
| 5665 | optional int32 max_kb = 5; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5666 | } |
| 5667 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5668 | // A reduced subset of process states; reducing the number of possible states allows more |
| 5669 | // aggressive device-side aggregation of statistics and hence reduces metric upload size. |
| 5670 | enum ProcessStateAggregated { |
| 5671 | PROCESS_STATE_UNKNOWN = 0; |
| 5672 | // Persistent system process. |
| 5673 | PROCESS_STATE_PERSISTENT = 1; |
| 5674 | // Top activity; actually any visible activity. |
| 5675 | PROCESS_STATE_TOP = 2; |
| 5676 | // Process binding to top or a foreground service. |
| 5677 | PROCESS_STATE_BOUND_TOP_OR_FGS = 3; |
| 5678 | // Processing running a foreground service. |
| 5679 | PROCESS_STATE_FGS = 4; |
| 5680 | // Important foreground process (ime, wallpaper, etc). |
| 5681 | PROCESS_STATE_IMPORTANT_FOREGROUND = 5; |
| 5682 | // Important background process. |
| 5683 | PROCESS_STATE_BACKGROUND = 6; |
| 5684 | // Process running a receiver. |
| 5685 | PROCESS_STATE_RECEIVER = 7; |
| 5686 | // All kinds of cached processes. |
| 5687 | PROCESS_STATE_CACHED = 8; |
| 5688 | } |
| 5689 | |
| 5690 | // Next tag: 13 |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5691 | message ProcessStatsStateProto { |
| 5692 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5693 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5694 | optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5695 | |
| 5696 | // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java |
| 5697 | // and not frameworks/base/core/java/android/app/ActivityManager.java |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5698 | optional android.service.procstats.ProcessState process_state = 3 [deprecated = true]; |
| 5699 | |
| 5700 | optional ProcessStateAggregated process_state_aggregated = 10; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5701 | |
| 5702 | // Millisecond uptime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5703 | optional int64 duration_millis = 4 [deprecated = true]; |
| 5704 | // Same as above, but with minute resolution so it fits into an int32. |
| 5705 | optional int32 duration_minutes = 11; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5706 | |
| 5707 | // Millisecond elapsed realtime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5708 | optional int64 realtime_duration_millis = 9 [deprecated = true]; |
| 5709 | // Same as above, but with minute resolution so it fits into an int32. |
| 5710 | optional int32 realtime_duration_minutes = 12; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5711 | |
| 5712 | // # of samples taken |
| 5713 | optional int32 sample_size = 5; |
| 5714 | |
| 5715 | // PSS is memory reserved for this process |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5716 | optional AggStats pss = 6 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5717 | |
| 5718 | // USS is memory shared between processes, divided evenly for accounting |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5719 | optional AggStats uss = 7 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5720 | |
| 5721 | // RSS is memory resident for this process |
| 5722 | optional AggStats rss = 8; |
| 5723 | } |
| 5724 | |
Jing Ji | 060d686 | 2020-04-13 19:36:31 -0700 | [diff] [blame] | 5725 | // Next Tag: 8 |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5726 | message ProcessStatsProto { |
| 5727 | // Name of process. |
| 5728 | optional string process = 1; |
| 5729 | |
| 5730 | // Uid of the process. |
| 5731 | optional int32 uid = 2; |
| 5732 | |
| 5733 | // Information about how often kills occurred |
| 5734 | message Kill { |
| 5735 | // Count of excessive CPU kills |
| 5736 | optional int32 cpu = 1; |
| 5737 | |
| 5738 | // Count of kills when cached |
| 5739 | optional int32 cached = 2; |
| 5740 | |
| 5741 | // PSS stats during cached kill |
| 5742 | optional AggStats cached_pss = 3; |
| 5743 | } |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5744 | optional Kill kill = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5745 | |
| 5746 | // Time and memory spent in various states. |
| 5747 | repeated ProcessStatsStateProto states = 5; |
| 5748 | |
| 5749 | // Total time process has been running... screen_state, memory_state, and process_state |
| 5750 | // will not be set. |
| 5751 | optional ProcessStatsStateProto total_running_state = 6; |
Jing Ji | 060d686 | 2020-04-13 19:36:31 -0700 | [diff] [blame] | 5752 | |
| 5753 | // Association data for this process in this state; |
| 5754 | // each entry here is one association. |
| 5755 | repeated ProcessStatsAssociationProto assocs = 7; |
| 5756 | } |
| 5757 | |
| 5758 | // Next Tag: 5 |
| 5759 | message ProcessStatsAssociationProto { |
| 5760 | // Procss Name of the associated process (client process of service binding) |
| 5761 | optional string assoc_process_name = 1; |
| 5762 | |
| 5763 | // Package Name of the associated package (client package of service binding) |
| 5764 | optional string assoc_package_name = 2; |
| 5765 | |
| 5766 | // Total count of the times this association (service binding) appeared. |
| 5767 | optional int32 total_count = 3; |
| 5768 | |
| 5769 | // Uptime total duration in seconds this association (service binding) was around. |
| 5770 | optional int32 total_duration_secs = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5771 | } |
| 5772 | |
| 5773 | message PackageServiceOperationStatsProto { |
| 5774 | // Operate enum: Started, Foreground, Bound, Executing |
| 5775 | optional android.service.procstats.ServiceOperationState operation = 1; |
| 5776 | |
| 5777 | // Number of times the service was in this operation. |
| 5778 | optional int32 count = 2; |
| 5779 | |
| 5780 | // Information about a state the service can be in. |
| 5781 | message StateStats { |
| 5782 | // Screen state enum. |
| 5783 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5784 | // Memory state enum. |
| 5785 | optional android.service.procstats.MemoryState memory_state = 2; |
| 5786 | |
| 5787 | // duration in milliseconds. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5788 | optional int64 duration_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5789 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5790 | optional int64 realtime_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5791 | } |
| 5792 | repeated StateStats state_stats = 3; |
| 5793 | } |
| 5794 | |
| 5795 | message PackageServiceStatsProto { |
| 5796 | // Name of service component. |
| 5797 | optional string service_name = 1; |
| 5798 | |
| 5799 | // The operation stats. |
| 5800 | // The package_name, package_uid, package_version, service_name will not be set to save space. |
| 5801 | repeated PackageServiceOperationStatsProto operation_stats = 2; |
| 5802 | } |
| 5803 | |
| 5804 | message PackageAssociationSourceProcessStatsProto { |
| 5805 | // Uid of the process. |
| 5806 | optional int32 process_uid = 1; |
| 5807 | // Process name. |
| 5808 | optional string process_name = 2; |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5809 | // Package name. |
| 5810 | optional string package_name = 7; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5811 | // Total count of the times this association appeared. |
| 5812 | optional int32 total_count = 3; |
| 5813 | |
| 5814 | // Millisecond uptime total duration this association was around. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5815 | optional int64 total_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5816 | |
| 5817 | // Total count of the times this association became actively impacting its target process. |
| 5818 | optional int32 active_count = 5; |
| 5819 | |
| 5820 | // Information on one source in this association. |
| 5821 | message StateStats { |
| 5822 | // Process state enum. |
| 5823 | optional android.service.procstats.ProcessState process_state = 1; |
| 5824 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5825 | optional int64 duration_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5826 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5827 | optional int64 realtime_duration_mmillis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5828 | } |
| 5829 | repeated StateStats active_state_stats = 6; |
| 5830 | } |
| 5831 | |
| 5832 | message PackageAssociationProcessStatsProto { |
| 5833 | // Name of the target component. |
| 5834 | optional string component_name = 1; |
| 5835 | // Information on one source in this association. |
| 5836 | repeated PackageAssociationSourceProcessStatsProto sources = 2; |
| 5837 | } |
| 5838 | |
| 5839 | |
| 5840 | message ProcessStatsPackageProto { |
| 5841 | // Name of package. |
| 5842 | optional string package = 1; |
| 5843 | |
| 5844 | // Uid of the package. |
| 5845 | optional int32 uid = 2; |
| 5846 | |
| 5847 | // Version of the package. |
| 5848 | optional int64 version = 3; |
| 5849 | |
| 5850 | // Stats for each process running with the package loaded in to it. |
| 5851 | repeated ProcessStatsProto process_stats = 4; |
| 5852 | |
| 5853 | // Stats for each of the package's services. |
| 5854 | repeated PackageServiceStatsProto service_stats = 5; |
| 5855 | |
| 5856 | // Stats for each association with the package. |
| 5857 | repeated PackageAssociationProcessStatsProto association_stats = 6; |
| 5858 | } |
| 5859 | |
| 5860 | message ProcessStatsSectionProto { |
| 5861 | // Elapsed realtime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5862 | optional int64 start_realtime_millis = 1; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5863 | |
| 5864 | // Elapsed realtime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5865 | optional int64 end_realtime_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5866 | |
| 5867 | // CPU uptime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5868 | optional int64 start_uptime_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5869 | |
| 5870 | // CPU uptime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5871 | optional int64 end_uptime_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5872 | |
| 5873 | // System runtime library. e.g. "libdvm.so", "libart.so". |
| 5874 | optional string runtime = 5; |
| 5875 | |
| 5876 | // whether kernel reports swapped pss. |
| 5877 | optional bool has_swapped_pss = 6; |
| 5878 | |
| 5879 | // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". |
| 5880 | enum Status { |
| 5881 | STATUS_UNKNOWN = 0; |
| 5882 | STATUS_COMPLETE = 1; |
| 5883 | STATUS_PARTIAL = 2; |
| 5884 | STATUS_SHUTDOWN = 3; |
| 5885 | STATUS_SYSPROPS = 4; |
| 5886 | } |
| 5887 | repeated Status status = 7; |
| 5888 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5889 | // Number of pages available of various types and sizes, representation fragmentation. |
| 5890 | repeated ProcessStatsAvailablePagesProto available_pages = 10; |
| 5891 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5892 | // Stats for each process. |
| 5893 | repeated ProcessStatsProto process_stats = 8; |
| 5894 | |
| 5895 | // Stats for each package. |
| 5896 | repeated ProcessStatsPackageProto package_stats = 9; |
| 5897 | } |
| 5898 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5899 | message ProcessStatsAvailablePagesProto { |
| 5900 | // Node these pages are in (as per /proc/pagetypeinfo) |
| 5901 | optional int32 node = 1; |
| 5902 | |
| 5903 | // Zone these pages are in (as per /proc/pagetypeinfo) |
| 5904 | optional string zone = 2; |
| 5905 | |
| 5906 | // Label for the type of these pages (as per /proc/pagetypeinfo) |
| 5907 | optional string label = 3; |
| 5908 | |
| 5909 | // Distribution of number of pages available by order size. First entry in array is |
| 5910 | // order 0, second is order 1, etc. Each order increase is a doubling of page size. |
| 5911 | repeated int32 pages_per_order = 4; |
| 5912 | } |
| 5913 | |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5914 | /** |
| 5915 | * Pulled from ProcessStatsService.java |
| 5916 | */ |
| 5917 | message ProcStats { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5918 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 5919 | } |
| 5920 | |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 5921 | /** |
| 5922 | * Pulled from ProcessStatsService.java |
| 5923 | */ |
| 5924 | message ProcStatsPkgProc { |
| 5925 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 5926 | } |
| 5927 | |
Chris Wren | cdea3b7 | 2019-11-22 16:58:17 -0500 | [diff] [blame] | 5928 | // Next Tag: 2 |
| 5929 | message PackageRemoteViewInfoProto { |
| 5930 | optional string package_name = 1; |
| 5931 | // add per-package additional info here (like channels) |
| 5932 | } |
| 5933 | |
| 5934 | // Next Tag: 2 |
| 5935 | message NotificationRemoteViewsProto { |
| 5936 | repeated PackageRemoteViewInfoProto package_remote_view_info = 1; |
| 5937 | } |
| 5938 | |
| 5939 | /** |
| 5940 | * Pulled from NotificationManagerService.java |
| 5941 | */ |
| 5942 | message NotificationRemoteViews { |
| 5943 | optional NotificationRemoteViewsProto notification_remote_views = 1; |
| 5944 | } |
| 5945 | |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 5946 | /** |
| 5947 | * Atom that contains a list of a package's preferences, pulled from NotificationManagerService.java |
| 5948 | */ |
| 5949 | message PackageNotificationPreferences { |
| 5950 | // Uid under which the package is installed. |
Muhammad Qureshi | 22e52da | 2020-03-30 21:14:21 -0700 | [diff] [blame] | 5951 | optional int32 uid = 1 [(is_uid) = true]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 5952 | // Notification importance, which specifies when and how a notification is displayed. |
| 5953 | // Specified under core/java/android/app/NotificationManager.java. |
| 5954 | optional int32 importance = 2; |
| 5955 | // Lockscreen visibility as set by the user. |
| 5956 | optional int32 visibility = 3; |
| 5957 | // Bitfield mask indicating what fields were locked by the user (see LockableAppfields in |
| 5958 | // PreferencesHelper.java) |
| 5959 | optional int32 user_locked_fields = 4; |
| 5960 | } |
| 5961 | |
| 5962 | /** |
| 5963 | * Atom that contains a list of a package's channel preferences, pulled from |
| 5964 | * NotificationManagerService.java. |
| 5965 | */ |
| 5966 | message PackageNotificationChannelPreferences { |
| 5967 | // Uid under which the package is installed. |
Muhammad Qureshi | 22e52da | 2020-03-30 21:14:21 -0700 | [diff] [blame] | 5968 | optional int32 uid = 1 [(is_uid) = true]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 5969 | // Channel's ID. Should always be available. |
| 5970 | optional string channel_id = 2; |
| 5971 | // Channel's name. Should always be available. |
| 5972 | optional string channel_name = 3; |
| 5973 | // Channel's description. Optionally set by the channel creator. |
| 5974 | optional string description = 4; |
| 5975 | // Notification importance, which specifies when and how a notification is displayed. Specified |
| 5976 | // under core/java/android/app/NotificationManager.java. |
| 5977 | optional int32 importance = 5; |
| 5978 | // Bitmask representing which fields have been set by the user. See field bitmask descriptions |
| 5979 | // at core/java/android/app/NotificationChannel.java |
| 5980 | optional int32 user_locked_fields = 6; |
| 5981 | // Indicates if the channel was deleted by the app. |
| 5982 | optional bool is_deleted = 7; |
| 5983 | } |
| 5984 | |
| 5985 | /** |
| 5986 | * Atom that contains a list of a package's channel group preferences, pulled from |
| 5987 | * NotificationManagerService.java. |
| 5988 | */ |
| 5989 | message PackageNotificationChannelGroupPreferences { |
| 5990 | // Uid under which the package is installed. |
Muhammad Qureshi | 22e52da | 2020-03-30 21:14:21 -0700 | [diff] [blame] | 5991 | optional int32 uid = 1 [(is_uid) = true]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 5992 | // Channel Group's ID. Should always be available. |
| 5993 | optional string group_id = 2; |
| 5994 | // Channel Group's name. Should always be available. |
| 5995 | optional string group_name = 3; |
| 5996 | // Channel Group's description. Optionally set by group creator. |
| 5997 | optional string description = 4; |
| 5998 | // Indicates if notifications from this channel group are blocked. |
| 5999 | optional bool is_blocked = 5; |
| 6000 | // Bitmask representing which fields have been set by the user. See field bitmask descriptions |
| 6001 | // at core/java/android/app/NotificationChannelGroup.java |
| 6002 | optional int32 user_locked_fields = 6; |
| 6003 | } |
| 6004 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6005 | message PowerProfileProto { |
| 6006 | optional double cpu_suspend = 1; |
| 6007 | |
| 6008 | optional double cpu_idle = 2; |
| 6009 | |
| 6010 | optional double cpu_active = 3; |
| 6011 | |
| 6012 | message CpuCluster { |
| 6013 | optional int32 id = 1; |
| 6014 | optional double cluster_power = 2; |
| 6015 | optional int32 cores = 3; |
| 6016 | repeated int64 speed = 4; |
| 6017 | repeated double core_power = 5; |
| 6018 | } |
| 6019 | |
| 6020 | repeated CpuCluster cpu_cluster = 40; |
| 6021 | |
| 6022 | optional double wifi_scan = 4; |
| 6023 | |
| 6024 | optional double wifi_on = 5; |
| 6025 | |
| 6026 | optional double wifi_active = 6; |
| 6027 | |
| 6028 | optional double wifi_controller_idle = 7; |
| 6029 | |
| 6030 | optional double wifi_controller_rx = 8; |
| 6031 | |
| 6032 | optional double wifi_controller_tx = 9; |
| 6033 | |
| 6034 | repeated double wifi_controller_tx_levels = 10; |
| 6035 | |
| 6036 | optional double wifi_controller_operating_voltage = 11; |
| 6037 | |
| 6038 | optional double bluetooth_controller_idle = 12; |
| 6039 | |
| 6040 | optional double bluetooth_controller_rx = 13; |
| 6041 | |
| 6042 | optional double bluetooth_controller_tx = 14; |
| 6043 | |
| 6044 | optional double bluetooth_controller_operating_voltage = 15; |
| 6045 | |
| 6046 | optional double modem_controller_sleep = 16; |
| 6047 | |
| 6048 | optional double modem_controller_idle = 17; |
| 6049 | |
| 6050 | optional double modem_controller_rx = 18; |
| 6051 | |
| 6052 | repeated double modem_controller_tx = 19; |
| 6053 | |
| 6054 | optional double modem_controller_operating_voltage = 20; |
| 6055 | |
| 6056 | optional double gps_on = 21; |
| 6057 | |
| 6058 | repeated double gps_signal_quality_based = 22; |
| 6059 | |
| 6060 | optional double gps_operating_voltage = 23; |
| 6061 | |
| 6062 | optional double bluetooth_on = 24; |
| 6063 | |
| 6064 | optional double bluetooth_active = 25; |
| 6065 | |
| 6066 | optional double bluetooth_at_cmd = 26; |
| 6067 | |
| 6068 | optional double ambient_display = 27; |
| 6069 | |
| 6070 | optional double screen_on = 28; |
| 6071 | |
| 6072 | optional double radio_on = 29; |
| 6073 | |
| 6074 | optional double radio_scanning = 30; |
| 6075 | |
| 6076 | optional double radio_active = 31; |
| 6077 | |
| 6078 | optional double screen_full = 32; |
| 6079 | |
| 6080 | optional double audio = 33; |
| 6081 | |
| 6082 | optional double video = 34; |
| 6083 | |
| 6084 | optional double flashlight = 35; |
| 6085 | |
| 6086 | optional double memory = 36; |
| 6087 | |
| 6088 | optional double camera = 37; |
| 6089 | |
| 6090 | optional double wifi_batched_scan = 38; |
| 6091 | |
| 6092 | optional double battery_capacity = 39; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 6093 | } |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 6094 | |
| 6095 | /** |
| 6096 | * power_profile.xml and other constants for power model calculations. |
| 6097 | * Pulled from PowerProfile.java |
| 6098 | */ |
| 6099 | message PowerProfile { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6100 | optional PowerProfileProto power_profile = 1; |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 6101 | } |
Chenjie Yu | b35b5f7 | 2018-10-13 23:25:11 -0700 | [diff] [blame] | 6102 | |
| 6103 | /** |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 6104 | * Logs when a user restriction was added or removed. |
| 6105 | * |
| 6106 | * Logged from: |
| 6107 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 6108 | */ |
| 6109 | message UserRestrictionChanged { |
| 6110 | // The raw string of the user restriction as defined in UserManager. |
| 6111 | // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. |
| 6112 | optional string restriction = 1; |
| 6113 | // Whether the restriction is enabled or disabled. |
| 6114 | optional bool enabled = 2; |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 6115 | } |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 6116 | |
| 6117 | /** |
| 6118 | * Pulls process user time and system time. Puller takes a snapshot of all pids |
| 6119 | * in the system and returns cpu stats for those that are working at the time. |
| 6120 | * Dead pids will be dropped. Kernel processes are excluded. |
| 6121 | * Min cool-down is 5 sec. |
| 6122 | */ |
| 6123 | message ProcessCpuTime { |
| 6124 | optional int32 uid = 1 [(is_uid) = true]; |
| 6125 | |
| 6126 | optional string process_name = 2; |
| 6127 | // Process cpu time in user space, cumulative from boot/process start |
| 6128 | optional int64 user_time_millis = 3; |
| 6129 | // Process cpu time in system space, cumulative from boot/process start |
| 6130 | optional int64 system_time_millis = 4; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 6131 | } |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6132 | |
| 6133 | /** |
| 6134 | * Pulls the CPU usage for each thread. |
| 6135 | * |
| 6136 | * Read from /proc/$PID/task/$TID/time_in_state files. |
| 6137 | * |
| 6138 | * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and |
| 6139 | * time_in_state files not being present on some phones, have not been addressed. These should be |
| 6140 | * considered before a public release. |
| 6141 | */ |
| 6142 | message CpuTimePerThreadFreq { |
| 6143 | // UID that owns the process. |
| 6144 | optional int32 uid = 1 [(is_uid) = true]; |
| 6145 | // ID of the process. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 6146 | optional int32 process_id = 2; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6147 | // ID of the thread. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 6148 | optional int32 thread_id = 3; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6149 | // Name of the process taken from `/proc/$PID/cmdline`. |
| 6150 | optional string process_name = 4; |
| 6151 | // Name of the thread taken from `/proc/$PID/task/$TID/comm` |
| 6152 | optional string thread_name = 5; |
Misha Wagner | fde6958 | 2018-11-28 13:26:32 +0000 | [diff] [blame] | 6153 | |
| 6154 | // Report eight different frequencies, and how much time is spent in each frequency. Frequencies |
| 6155 | // are given in KHz, and time is given in milliseconds since the thread started. All eight |
| 6156 | // frequencies are given here as the alternative is sending eight separate atoms. This method |
| 6157 | // significantly reduces the amount of data created |
| 6158 | optional int32 frequency1_khz = 6; |
| 6159 | optional int32 time1_millis = 7; |
| 6160 | optional int32 frequency2_khz = 8; |
| 6161 | optional int32 time2_millis = 9; |
| 6162 | optional int32 frequency3_khz = 10; |
| 6163 | optional int32 time3_millis = 11; |
| 6164 | optional int32 frequency4_khz = 12; |
| 6165 | optional int32 time4_millis = 13; |
| 6166 | optional int32 frequency5_khz = 14; |
| 6167 | optional int32 time5_millis = 15; |
| 6168 | optional int32 frequency6_khz = 16; |
| 6169 | optional int32 time6_millis = 17; |
| 6170 | optional int32 frequency7_khz = 18; |
| 6171 | optional int32 time7_millis = 19; |
| 6172 | optional int32 frequency8_khz = 20; |
| 6173 | optional int32 time8_millis = 21; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6174 | } |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6175 | |
| 6176 | /** |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 6177 | * Pulls information about the device's build. |
| 6178 | */ |
| 6179 | message BuildInformation { |
| 6180 | // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. |
| 6181 | // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. |
| 6182 | optional string fingerprint = 1; |
| 6183 | |
| 6184 | // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. |
| 6185 | optional string brand = 2; |
| 6186 | |
| 6187 | // Build.PRODUCT. The name of the overall product. |
| 6188 | optional string product = 3; |
| 6189 | |
| 6190 | // Build.DEVICE. The name of the industrial design. |
| 6191 | optional string device = 4; |
| 6192 | |
| 6193 | // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". |
| 6194 | optional string version_release = 5; |
| 6195 | |
| 6196 | // Build.ID. E.g. a label like "M4-rc20". |
| 6197 | optional string id = 6; |
| 6198 | |
| 6199 | // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to |
| 6200 | // represent this build. |
| 6201 | optional string version_incremental = 7; |
| 6202 | |
| 6203 | // Build.TYPE. The type of build, like "user" or "eng". |
| 6204 | optional string type = 8; |
| 6205 | |
| 6206 | // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". |
| 6207 | optional string tags = 9; |
| 6208 | } |
| 6209 | |
| 6210 | /** |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 6211 | * Logs information about mismatched caller for content capture. |
| 6212 | * |
| 6213 | * Logged from: |
| 6214 | * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java |
| 6215 | */ |
| 6216 | message ContentCaptureCallerMismatchReported { |
| 6217 | optional string intended_package = 1; |
| 6218 | optional string calling_package = 2; |
| 6219 | } |
| 6220 | |
| 6221 | /** |
| 6222 | * Logs information about content capture service events. |
| 6223 | * |
| 6224 | * Logged from: |
| 6225 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 6226 | */ |
| 6227 | message ContentCaptureServiceEvents { |
| 6228 | // The type of event. |
| 6229 | enum Event { |
| 6230 | UNKNOWN = 0; |
| 6231 | ON_CONNECTED = 1; |
| 6232 | ON_DISCONNECTED = 2; |
| 6233 | SET_WHITELIST = 3; |
| 6234 | SET_DISABLED = 4; |
| 6235 | ON_USER_DATA_REMOVED = 5; |
| 6236 | } |
| 6237 | optional Event event = 1; |
| 6238 | // component/package of content capture service. |
| 6239 | optional string service_info = 2; |
| 6240 | // component/package of target. |
| 6241 | // it's a concatenated list of component/package for SET_WHITELIST event |
| 6242 | // separated by " ". |
| 6243 | optional string target_info = 3; |
| 6244 | } |
| 6245 | |
| 6246 | /** |
| 6247 | * Logs information about content capture session events. |
| 6248 | * |
| 6249 | * Logged from: |
| 6250 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 6251 | */ |
| 6252 | message ContentCaptureSessionEvents { |
| 6253 | // The type of event. |
| 6254 | enum Event { |
| 6255 | UNKNOWN = 0; |
| 6256 | ON_SESSION_STARTED = 1; |
| 6257 | ON_SESSION_FINISHED = 2; |
| 6258 | SESSION_NOT_CREATED = 3; |
| 6259 | } |
| 6260 | optional int32 session_id = 1; |
| 6261 | optional Event event = 2; |
| 6262 | // (n/a on session finished) |
| 6263 | optional int32 state_flags = 3; |
| 6264 | // component/package of content capture service. |
| 6265 | optional string service_info = 4; |
| 6266 | // component/package of app. |
| 6267 | // (n/a on session finished) |
| 6268 | optional string app_info = 5; |
| 6269 | optional bool is_child_session = 6; |
| 6270 | } |
| 6271 | |
| 6272 | /** |
| 6273 | * Logs information about session being flushed. |
| 6274 | * |
| 6275 | * Logged from: |
| 6276 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 6277 | */ |
| 6278 | message ContentCaptureFlushed { |
| 6279 | optional int32 session_id = 1; |
| 6280 | // component/package of content capture service. |
| 6281 | optional string service_info = 2; |
| 6282 | // component/package of app. |
| 6283 | optional string app_info = 3; |
| 6284 | // session start/finish events |
| 6285 | optional int32 child_session_started = 4; |
| 6286 | optional int32 child_session_finished = 5; |
| 6287 | // count of view events. |
| 6288 | optional int32 view_appeared_count = 6; |
| 6289 | optional int32 view_disappeared_count = 7; |
| 6290 | optional int32 view_text_changed_count = 8; |
| 6291 | |
| 6292 | // Flush stats. |
| 6293 | optional int32 max_events = 9; |
| 6294 | optional int32 idle_flush_freq = 10; |
| 6295 | optional int32 text_flush_freq = 11; |
| 6296 | optional int32 flush_reason = 12; |
| 6297 | } |
| 6298 | |
| 6299 | /** |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6300 | * Pulls on-device BatteryStats power use calculations for the overall device. |
| 6301 | */ |
| 6302 | message DeviceCalculatedPowerUse { |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 6303 | // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 6304 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 6305 | // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). |
| 6306 | optional int64 computed_power_nano_amp_secs = 1; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6307 | } |
| 6308 | |
| 6309 | /** |
| 6310 | * Pulls on-device BatteryStats power use calculations broken down by uid. |
| 6311 | * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use |
| 6312 | * that is attributed to non-uid items. They must all be included to get the total power use. |
| 6313 | */ |
| 6314 | message DeviceCalculatedPowerBlameUid { |
| 6315 | // Uid being blamed. Note: isolated uids have already been mapped to host uid. |
| 6316 | optional int32 uid = 1 [(is_uid) = true]; |
| 6317 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 6318 | // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 6319 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 6320 | optional int64 power_nano_amp_secs = 2; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6321 | } |
| 6322 | |
| 6323 | /** |
| 6324 | * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by |
| 6325 | * drain type. |
| 6326 | * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that |
| 6327 | * is attributed uids. They must all be included to get the total power use. |
| 6328 | */ |
| 6329 | message DeviceCalculatedPowerBlameOther { |
| 6330 | // The type of item whose power use is being reported. |
| 6331 | enum DrainType { |
| 6332 | AMBIENT_DISPLAY = 0; |
| 6333 | // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. |
| 6334 | BLUETOOTH = 2; |
| 6335 | CAMERA = 3; |
| 6336 | // Cell-standby |
| 6337 | CELL = 4; |
| 6338 | FLASHLIGHT = 5; |
| 6339 | IDLE = 6; |
| 6340 | MEMORY = 7; |
| 6341 | // Amount that total computed drain exceeded the drain estimated using the |
| 6342 | // battery level changes and capacity. |
| 6343 | OVERCOUNTED = 8; |
| 6344 | PHONE = 9; |
| 6345 | SCREEN = 10; |
| 6346 | // Amount that total computed drain was below the drain estimated using the |
| 6347 | // battery level changes and capacity. |
| 6348 | UNACCOUNTED = 11; |
| 6349 | // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. |
| 6350 | WIFI = 13; |
| 6351 | } |
| 6352 | optional DrainType drain_type = 1; |
| 6353 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 6354 | // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 6355 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 6356 | optional int64 power_nano_amp_secs = 2; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 6357 | } |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 6358 | |
| 6359 | /** |
| 6360 | * Logs device policy features. |
| 6361 | * |
| 6362 | * Logged from: |
| 6363 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 6364 | * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ |
| 6365 | */ |
| 6366 | message DevicePolicyEvent { |
| 6367 | // The event id - unique for each event. |
| 6368 | optional android.stats.devicepolicy.EventId event_id = 1; |
| 6369 | // The admin package name. |
| 6370 | optional string admin_package_name = 2; |
| 6371 | // A generic integer parameter. |
| 6372 | optional int32 integer_value = 3; |
| 6373 | // A generic boolean parameter. |
| 6374 | optional bool boolean_value = 4; |
| 6375 | // A parameter specifying a time period in milliseconds. |
| 6376 | optional uint64 time_period_millis = 5; |
| 6377 | // A parameter specifying a list of package names, bundle extras or string parameters. |
| 6378 | optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; |
| 6379 | } |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 6380 | |
| 6381 | /** |
| 6382 | * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. |
| 6383 | * |
| 6384 | * Logged from: |
| 6385 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6386 | */ |
| 6387 | message DocsUILaunchReported { |
| 6388 | optional android.stats.docsui.LaunchAction launch_action = 1; |
| 6389 | optional bool has_initial_uri = 2; |
| 6390 | optional android.stats.docsui.MimeType mime_type = 3; |
| 6391 | optional android.stats.docsui.Root initial_root = 4; |
| 6392 | } |
| 6393 | |
| 6394 | /** |
| 6395 | * Logs root/app visited event in file managers/picker. Call this when the user |
| 6396 | * taps on root/app in hamburger menu. |
| 6397 | * |
| 6398 | * Logged from: |
| 6399 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6400 | */ |
| 6401 | message DocsUIRootVisitedReported { |
| 6402 | optional android.stats.docsui.ContextScope scope = 1; |
| 6403 | optional android.stats.docsui.Root root = 2; |
| 6404 | } |
| 6405 | |
| 6406 | /** |
| 6407 | * Logs file operation stats. Call this when a file operation has completed. |
| 6408 | * |
| 6409 | * Logged from: |
| 6410 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6411 | */ |
| 6412 | message DocsUIFileOperationReported { |
| 6413 | optional android.stats.docsui.Provider provider = 1; |
| 6414 | optional android.stats.docsui.FileOperation file_op = 2; |
| 6415 | } |
| 6416 | |
| 6417 | /** |
| 6418 | * Logs file operation stats. Call this when a copy/move operation has completed with a specific |
| 6419 | * mode. |
| 6420 | * |
| 6421 | * Logged from: |
| 6422 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6423 | */ |
| 6424 | message DocsUIFileOperationCopyMoveModeReported { |
| 6425 | optional android.stats.docsui.FileOperation file_op = 1; |
| 6426 | optional android.stats.docsui.CopyMoveOpMode mode = 2; |
| 6427 | } |
| 6428 | |
| 6429 | |
| 6430 | /** |
| 6431 | * Logs file sub operation stats. Call this when a file operation has failed. |
| 6432 | * |
| 6433 | * Logged from: |
| 6434 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6435 | */ |
| 6436 | message DocsUIFileOperationFailureReported { |
| 6437 | optional android.stats.docsui.Authority authority = 1; |
| 6438 | optional android.stats.docsui.SubFileOperation sub_op = 2; |
| 6439 | } |
| 6440 | |
| 6441 | /** |
| 6442 | * Logs the cancellation of a file operation. Call this when a job is canceled |
| 6443 | * |
| 6444 | * Logged from: |
| 6445 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6446 | */ |
| 6447 | message DocsUIFileOperationCanceledReported { |
| 6448 | optional android.stats.docsui.FileOperation file_op = 1; |
| 6449 | } |
| 6450 | |
| 6451 | /** |
| 6452 | * Logs startup time in milliseconds. |
| 6453 | * |
| 6454 | * Logged from: |
| 6455 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6456 | */ |
| 6457 | message DocsUIStartupMsReported { |
| 6458 | optional int32 startup_millis = 1; |
| 6459 | } |
| 6460 | |
| 6461 | /** |
| 6462 | * Logs the action that was started by user. |
| 6463 | * |
| 6464 | * Logged from: |
| 6465 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6466 | */ |
| 6467 | message DocsUIUserActionReported { |
| 6468 | optional android.stats.docsui.UserAction action = 1; |
| 6469 | } |
| 6470 | |
| 6471 | /** |
| 6472 | * Logs the invalid type when invalid scoped access is requested. |
| 6473 | * |
| 6474 | * Logged from: |
| 6475 | * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java |
| 6476 | */ |
| 6477 | message DocsUIInvalidScopedAccessRequestReported { |
| 6478 | optional android.stats.docsui.InvalidScopedAccess type = 1; |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 6479 | } |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6480 | |
| 6481 | /** |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 6482 | * Logs the package name that launches docsui picker mode. |
| 6483 | * |
| 6484 | * Logged from: |
| 6485 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6486 | */ |
| 6487 | message DocsUIPickerLaunchedFromReported { |
| 6488 | optional string package_name = 1; |
| 6489 | } |
| 6490 | |
| 6491 | /** |
| 6492 | * Logs the search type. |
| 6493 | * |
| 6494 | * Logged from: |
| 6495 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6496 | */ |
| 6497 | message DocsUISearchTypeReported { |
| 6498 | optional android.stats.docsui.SearchType search_type = 1; |
| 6499 | } |
| 6500 | |
| 6501 | /** |
| 6502 | * Logs the search mode. |
| 6503 | * |
| 6504 | * Logged from: |
| 6505 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6506 | */ |
| 6507 | message DocsUISearchModeReported { |
| 6508 | optional android.stats.docsui.SearchMode search_mode = 1; |
| 6509 | } |
| 6510 | |
| 6511 | /** |
| 6512 | * Logs the pick result information. |
| 6513 | * |
| 6514 | * Logged from: |
| 6515 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6516 | */ |
| 6517 | message DocsUIPickResultReported { |
| 6518 | optional int32 total_action_count = 1; |
| 6519 | optional int64 duration_millis = 2; |
| 6520 | optional int32 file_count= 3; |
| 6521 | optional bool is_searching = 4; |
| 6522 | optional android.stats.docsui.Root picked_from = 5; |
| 6523 | optional android.stats.docsui.MimeType mime_type = 6; |
| 6524 | optional int32 repeatedly_pick_times = 7; |
| 6525 | } |
| 6526 | |
Diksha Gohlyan | b96b2f4 | 2020-04-30 09:20:42 -0700 | [diff] [blame] | 6527 | /** Logs the drag and drop of files. |
| 6528 | |
| 6529 | * Logged from: |
| 6530 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6531 | */ |
| 6532 | message DocsUIDragAndDropReported { |
| 6533 | optional bool drag_initiated_from_docsui = 1; |
| 6534 | } |
| 6535 | |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 6536 | /** |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6537 | * Logs when an app's memory is compacted. |
| 6538 | * |
| 6539 | * Logged from: |
| 6540 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 6541 | */ |
| 6542 | message AppCompacted { |
| 6543 | // The pid of the process being compacted. |
| 6544 | optional int32 pid = 1; |
| 6545 | |
| 6546 | // The name of the process being compacted. |
| 6547 | optional string process_name = 2; |
| 6548 | |
| 6549 | // The type of compaction. |
| 6550 | enum Action { |
| 6551 | UNKNOWN = 0; |
| 6552 | SOME = 1; |
| 6553 | FULL = 2; |
Ben Murdoch | 35c1420 | 2019-04-09 11:00:53 +0100 | [diff] [blame] | 6554 | PERSISTENT = 3; |
| 6555 | BFGS = 4; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6556 | } |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 6557 | optional Action action = 3; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6558 | |
| 6559 | // Total RSS in kilobytes consumed by the process prior to compaction. |
| 6560 | optional int64 before_rss_total_kilobytes = 4; |
| 6561 | |
| 6562 | // File RSS in kilobytes consumed by the process prior to compaction. |
| 6563 | optional int64 before_rss_file_kilobytes = 5; |
| 6564 | |
| 6565 | // Anonymous RSS in kilobytes consumed by the process prior to compaction. |
| 6566 | optional int64 before_rss_anon_kilobytes = 6; |
| 6567 | |
| 6568 | // Swap in kilobytes consumed by the process prior to compaction. |
| 6569 | optional int64 before_swap_kilobytes = 7; |
| 6570 | |
| 6571 | // Total RSS in kilobytes consumed by the process after compaction. |
| 6572 | optional int64 after_rss_total_kilobytes = 8; |
| 6573 | |
| 6574 | // File RSS in kilobytes consumed by the process after compaction. |
| 6575 | optional int64 after_rss_file_kilobytes = 9; |
| 6576 | |
| 6577 | // Anonymous RSS in kilobytes consumed by the process after compaction. |
| 6578 | optional int64 after_rss_anon_kilobytes = 10; |
| 6579 | |
| 6580 | // Swap in kilobytes consumed by the process after compaction. |
| 6581 | optional int64 after_swap_kilobytes = 11; |
| 6582 | |
| 6583 | // The time taken to perform compaction in milliseconds. |
| 6584 | optional int64 time_to_compact_millis = 12; |
| 6585 | |
| 6586 | // The last compaction action performed for this app. |
| 6587 | optional Action last_action = 13; |
| 6588 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 6589 | // The last time that compaction was attempted on this process in milliseconds |
| 6590 | // since boot, not including sleep (see SystemClock.uptimeMillis()). |
| 6591 | optional int64 last_compact_timestamp_ms_since_boot = 14; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6592 | |
Ben Murdoch | 885c21b | 2019-03-15 18:02:04 +0000 | [diff] [blame] | 6593 | // The "setAdj" (i.e. previous) oom_score_adj at the time of compaction. |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 6594 | optional int32 oom_score_adj = 15; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6595 | |
| 6596 | // The process state at the time of compaction. |
| 6597 | optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; |
Ben Murdoch | fdc5593 | 2019-01-30 10:43:15 +0000 | [diff] [blame] | 6598 | |
| 6599 | // Free ZRAM in kilobytes before compaction. |
| 6600 | optional int64 before_zram_free_kilobytes = 17; |
| 6601 | |
| 6602 | // Free ZRAM in kilobytes after compaction. |
| 6603 | optional int64 after_zram_free_kilobytes = 18; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6604 | } |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6605 | |
| 6606 | /** |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6607 | * Logs a DNS lookup operation initiated by the system resolver on behalf of an application |
| 6608 | * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). |
| 6609 | * |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6610 | * The NetworkDnsEventReported message represents the entire lookup operation, which may |
| 6611 | * result one or more queries to the recursive DNS resolvers. Those are individually logged |
| 6612 | * in DnsQueryEvents to enable computing error rates and network latency and timeouts |
| 6613 | * broken up by query type, transport, network interface, etc. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6614 | */ |
| 6615 | message NetworkDnsEventReported { |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6616 | optional android.stats.dnsresolver.EventType event_type = 1; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6617 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6618 | optional android.stats.dnsresolver.ReturnCode return_code = 2; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6619 | |
| 6620 | // The latency in microseconds of the entire DNS lookup operation. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6621 | optional int32 latency_micros = 3; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6622 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6623 | // Only valid for event_type = EVENT_GETADDRINFO. |
| 6624 | optional int32 hints_ai_flags = 4; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6625 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6626 | // Flags passed to android_res_nsend() defined in multinetwork.h |
| 6627 | // Only valid for event_type = EVENT_RESNSEND. |
| 6628 | optional int32 res_nsend_flags = 5; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6629 | |
lifr | ad9becc | 2019-05-20 11:04:41 +0800 | [diff] [blame] | 6630 | optional android.stats.dnsresolver.NetworkType network_type = 6; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6631 | |
| 6632 | // The DNS over TLS mode on a specific netId. |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6633 | optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6634 | |
| 6635 | // Additional pass-through fields opaque to statsd. |
| 6636 | // The DNS resolver Mainline module can add new fields here without requiring an OS update. |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6637 | optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; |
lifr | 2b9fab7 | 2019-07-20 15:28:28 +0800 | [diff] [blame] | 6638 | |
| 6639 | // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom. |
| 6640 | optional int32 sampling_rate_denom = 9; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6641 | } |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 6642 | |
| 6643 | /** |
| 6644 | * Logs when a data stall event occurs. |
| 6645 | * |
| 6646 | * Log from: |
| 6647 | * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 6648 | */ |
| 6649 | message DataStallEvent { |
| 6650 | // Data stall evaluation type. |
| 6651 | // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 6652 | // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. |
| 6653 | optional int32 evaluation_type = 1; |
| 6654 | // See definition in data_stall_event.proto. |
| 6655 | optional com.android.server.connectivity.ProbeResult validation_result = 2; |
| 6656 | // See definition in data_stall_event.proto. |
| 6657 | optional android.net.NetworkCapabilitiesProto.Transport network_type = 3; |
| 6658 | // See definition in data_stall_event.proto. |
| 6659 | optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; |
| 6660 | // See definition in data_stall_event.proto. |
| 6661 | optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; |
| 6662 | // See definition in data_stall_event.proto. |
| 6663 | optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; |
| 6664 | } |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 6665 | |
| 6666 | /* |
| 6667 | * Logs when RescueParty resets some set of experiment flags. |
| 6668 | * |
| 6669 | * Logged from: |
| 6670 | * frameworks/base/services/core/java/com/android/server/RescueParty.java |
| 6671 | */ |
| 6672 | message RescuePartyResetReported { |
| 6673 | // The rescue level of this reset. A value of 0 indicates missing or unknown level information. |
| 6674 | optional int32 rescue_level = 1; |
| 6675 | } |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 6676 | |
| 6677 | /** |
| 6678 | * Logs when signed config is received from an APK, and if that config was applied successfully. |
| 6679 | * Logged from: |
| 6680 | * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java |
| 6681 | */ |
| 6682 | message SignedConfigReported { |
| 6683 | enum Type { |
| 6684 | UNKNOWN_TYPE = 0; |
| 6685 | GLOBAL_SETTINGS = 1; |
| 6686 | } |
| 6687 | optional Type type = 1; |
| 6688 | |
| 6689 | // The final status of the signed config received. |
| 6690 | enum Status { |
| 6691 | UNKNOWN_STATUS = 0; |
| 6692 | APPLIED = 1; |
| 6693 | BASE64_FAILURE_CONFIG = 2; |
| 6694 | BASE64_FAILURE_SIGNATURE = 3; |
| 6695 | SECURITY_EXCEPTION = 4; |
| 6696 | INVALID_CONFIG = 5; |
| 6697 | OLD_CONFIG = 6; |
| 6698 | SIGNATURE_CHECK_FAILED = 7; |
| 6699 | NOT_APPLICABLE = 8; |
Mathew Inwood | 610d096 | 2019-01-15 11:50:28 +0000 | [diff] [blame] | 6700 | SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 6701 | } |
| 6702 | optional Status status = 2; |
| 6703 | |
| 6704 | // The version of the signed config processed. |
| 6705 | optional int32 version = 3; |
| 6706 | |
| 6707 | // The package name that the config was extracted from. |
| 6708 | optional string from_package = 4; |
| 6709 | |
| 6710 | enum Key { |
| 6711 | NO_KEY = 0; |
| 6712 | DEBUG = 1; |
| 6713 | PRODUCTION = 2; |
| 6714 | } |
| 6715 | // Which key was used to verify the config. |
| 6716 | optional Key verified_with = 5; |
| 6717 | } |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6718 | |
| 6719 | /* |
| 6720 | * Logs GNSS Network-Initiated (NI) location events. |
| 6721 | * |
| 6722 | * Logged from: |
| 6723 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 6724 | */ |
| 6725 | message GnssNiEventReported { |
| 6726 | // The type of GnssNiEvent. |
| 6727 | enum EventType { |
| 6728 | UNKNOWN = 0; |
| 6729 | NI_REQUEST = 1; |
| 6730 | NI_RESPONSE = 2; |
| 6731 | } |
| 6732 | optional EventType event_type = 1; |
| 6733 | |
| 6734 | // An ID generated by HAL to associate NI notifications and UI responses. |
| 6735 | optional int32 notification_id = 2; |
| 6736 | |
| 6737 | // A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6738 | optional android.server.location.GnssNiType ni_type = 3; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6739 | |
| 6740 | // NI requires notification. |
| 6741 | optional bool need_notify = 4; |
| 6742 | |
| 6743 | // NI requires verification. |
| 6744 | optional bool need_verify = 5; |
| 6745 | |
| 6746 | // NI requires privacy override, no notification/minimal trace. |
| 6747 | optional bool privacy_override = 6; |
| 6748 | |
| 6749 | // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in |
| 6750 | // seconds. |
| 6751 | optional int32 timeout = 7; |
| 6752 | |
| 6753 | // Default response when timeout. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6754 | optional android.server.location.GnssUserResponseType default_response = 8; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6755 | |
| 6756 | // String representing the requester of the network inititated location request. |
| 6757 | optional string requestor_id = 9; |
| 6758 | |
| 6759 | // Notification message text string representing the service(for eg. SUPL-service) who sent the |
| 6760 | // network initiated location request. |
| 6761 | optional string text = 10; |
| 6762 | |
| 6763 | // requestorId decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6764 | optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6765 | |
| 6766 | // Notification message text decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6767 | optional android.server.location.GnssNiEncodingType text_encoding = 12; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6768 | |
| 6769 | // True if SUPL ES is enabled. |
| 6770 | optional bool is_supl_es_enabled = 13; |
| 6771 | |
| 6772 | // True if GNSS location is enabled. |
| 6773 | optional bool is_location_enabled = 14; |
| 6774 | |
| 6775 | // GNSS NI responses which define the response in NI structures. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6776 | optional android.server.location.GnssUserResponseType user_response = 15; |
| 6777 | } |
| 6778 | |
| 6779 | /** |
| 6780 | * Logs GNSS non-framework (NFW) location notification. |
| 6781 | * |
| 6782 | * Logged from: |
| 6783 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 6784 | */ |
| 6785 | message GnssNfwNotificationReported { |
| 6786 | // Package name of the Android proxy application representing the non-framework entity that |
| 6787 | // requested location. Set to empty string if unknown. |
| 6788 | optional string proxy_app_package_name = 1; |
| 6789 | |
| 6790 | // Protocol stack that initiated the non-framework location request. |
| 6791 | optional android.server.location.NfwProtocolStack protocol_stack = 2; |
| 6792 | |
| 6793 | // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, |
| 6794 | // set to empty string. This field is opaque to the framework and used for logging purposes. |
| 6795 | optional string other_protocol_stack_name = 3; |
| 6796 | |
| 6797 | // Source initiating/receiving the location information. |
| 6798 | optional android.server.location.NfwRequestor requestor = 4; |
| 6799 | |
| 6800 | // Identity of the endpoint receiving the location information. For example, carrier name, OEM |
| 6801 | // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework |
| 6802 | // and used for logging purposes. |
| 6803 | optional string requestor_id = 5; |
| 6804 | |
| 6805 | // Indicates whether location information was provided for this request. |
| 6806 | optional android.server.location.NfwResponseType response_type = 6; |
| 6807 | |
| 6808 | // True if the device is in user initiated emergency session. |
| 6809 | optional bool in_emergency_mode = 7; |
| 6810 | |
| 6811 | // True if cached location is provided. |
| 6812 | optional bool is_cached_location = 8; |
| 6813 | |
| 6814 | // True if proxy app permission mismatch between framework and GNSS HAL. |
| 6815 | optional bool is_permission_mismatched = 9; |
| 6816 | } |
| 6817 | |
| 6818 | /** |
| 6819 | * Logs GNSS configuration as defined in IGnssConfiguration.hal. |
| 6820 | * |
| 6821 | * Logged from: |
| 6822 | * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java |
| 6823 | */ |
| 6824 | message GnssConfigurationReported { |
| 6825 | // SUPL host name. |
| 6826 | optional string supl_host = 1; |
| 6827 | |
| 6828 | // SUPL port number. |
| 6829 | optional int32 supl_port = 2; |
| 6830 | |
| 6831 | // C2K host name. |
| 6832 | optional string c2k_host = 3; |
| 6833 | |
| 6834 | // C2K port number. |
| 6835 | optional int32 c2k_port = 4; |
| 6836 | |
| 6837 | // The SUPL version requested by Carrier. |
| 6838 | optional int32 supl_ver = 5; |
| 6839 | |
| 6840 | // The SUPL mode. |
| 6841 | optional android.server.location.SuplMode supl_mode = 6; |
| 6842 | |
| 6843 | // True if NI emergency SUPL restrictions is enabled. |
| 6844 | optional bool supl_es = 7; |
| 6845 | |
| 6846 | // LTE Positioning Profile settings |
| 6847 | optional android.server.location.LppProfile lpp_profile = 8; |
| 6848 | |
| 6849 | // Positioning protocol on A-Glonass system. |
| 6850 | optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; |
| 6851 | |
| 6852 | // True if emergency PDN is used. Otherwise, regular PDN is used. |
| 6853 | optional bool use_emergency_pdn_for_emergency_supl= 10; |
| 6854 | |
| 6855 | // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. |
| 6856 | optional android.server.location.GpsLock gps_lock = 11; |
| 6857 | |
| 6858 | // Number of seconds to extend the emergency session duration post emergency call. |
| 6859 | optional int32 es_extension_sec = 12; |
| 6860 | |
| 6861 | // The full list of package names of proxy Android applications representing the non-framework |
| 6862 | // location access entities (on/off the device) for which the framework user has granted |
| 6863 | // non-framework location access permission. The package names are concatenated in one string |
| 6864 | // with spaces as separators. |
| 6865 | optional string enabled_proxy_app_package_name_list = 13; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6866 | } |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6867 | |
| 6868 | /** |
| 6869 | * Logs when a NFC device's error occurred. |
| 6870 | * Logged from: |
| 6871 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 6872 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java |
| 6873 | */ |
| 6874 | message NfcErrorOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6875 | enum Type { |
| 6876 | UNKNOWN = 0; |
| 6877 | CMD_TIMEOUT = 1; |
| 6878 | ERROR_NOTIFICATION = 2; |
| 6879 | AID_OVERFLOW = 3; |
| 6880 | } |
| 6881 | optional Type type = 1; |
| 6882 | // If it's nci cmd timeout, log the timeout command. |
| 6883 | optional uint32 nci_cmd = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6884 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6885 | optional uint32 error_ntf_status_code = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6886 | } |
| 6887 | |
| 6888 | /** |
| 6889 | * Logs when a NFC device's state changed event |
| 6890 | * Logged from: |
| 6891 | * packages/apps/Nfc/src/com/android/nfc/NfcService.java |
| 6892 | */ |
| 6893 | message NfcStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6894 | enum State { |
| 6895 | UNKNOWN = 0; |
| 6896 | OFF = 1; |
| 6897 | ON = 2; |
| 6898 | ON_LOCKED = 3; // Secure Nfc enabled. |
| 6899 | CRASH_RESTART = 4; // NfcService watchdog timeout restart. |
| 6900 | } |
| 6901 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6902 | } |
| 6903 | |
| 6904 | /** |
| 6905 | * Logs when a NFC Beam Transaction occurred. |
| 6906 | * Logged from: |
| 6907 | * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java |
| 6908 | */ |
| 6909 | message NfcBeamOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6910 | enum Operation { |
| 6911 | UNKNOWN = 0; |
| 6912 | SEND = 1; |
| 6913 | RECEIVE = 2; |
| 6914 | } |
| 6915 | optional Operation operation = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6916 | } |
| 6917 | |
| 6918 | /** |
| 6919 | * Logs when a NFC Card Emulation Transaction occurred. |
| 6920 | * Logged from: |
| 6921 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java |
| 6922 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java |
| 6923 | */ |
| 6924 | message NfcCardemulationOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6925 | enum Category { |
| 6926 | UNKNOWN = 0; |
| 6927 | HCE_PAYMENT = 1; |
| 6928 | HCE_OTHER = 2; |
| 6929 | OFFHOST = 3; |
| 6930 | } |
| 6931 | // Transaction belongs to HCE payment or HCE other category, or offhost. |
| 6932 | optional Category category = 1; |
| 6933 | // SeName from transaction: SIMx, eSEx, HCE, HCEF. |
| 6934 | optional string se_name = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6935 | } |
| 6936 | |
| 6937 | /** |
| 6938 | * Logs when a NFC Tag event occurred. |
| 6939 | * Logged from: |
| 6940 | * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java |
| 6941 | */ |
| 6942 | message NfcTagOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6943 | enum Type { |
| 6944 | UNKNOWN = 0; |
| 6945 | URL = 1; |
| 6946 | BT_PAIRING = 2; |
| 6947 | PROVISION = 3; |
| 6948 | WIFI_CONNECT = 4; |
| 6949 | APP_LAUNCH = 5; |
| 6950 | OTHERS = 6; |
| 6951 | } |
| 6952 | optional Type type = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6953 | } |
| 6954 | |
| 6955 | /** |
| 6956 | * Logs when Hce transaction triggered |
| 6957 | * Logged from: |
| 6958 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 6959 | */ |
| 6960 | message NfcHceTransactionOccurred { |
| 6961 | // The latency period(in microseconds) it took for the first HCE data |
| 6962 | // exchange. |
| 6963 | optional uint32 latency_micros = 1; |
| 6964 | } |
| 6965 | |
| 6966 | /** |
| 6967 | * Logs when SecureElement state event changed |
| 6968 | * Logged from: |
| 6969 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 6970 | */ |
| 6971 | message SeStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6972 | enum State { |
| 6973 | UNKNOWN = 0; |
| 6974 | INITIALIZED = 1; |
| 6975 | DISCONNECTED = 2; |
| 6976 | CONNECTED = 3; |
| 6977 | HALCRASH = 4; |
| 6978 | } |
| 6979 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6980 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6981 | optional string state_change_reason = 2; |
| 6982 | // SIMx or eSEx. |
| 6983 | optional string terminal = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6984 | } |
| 6985 | |
| 6986 | /** |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6987 | * Information about a permission grant request |
| 6988 | */ |
| 6989 | message PermissionGrantRequestResultReported { |
| 6990 | // unique value identifying an API call. A API call might result in multiple of these atoms |
| 6991 | optional int64 request_id = 1; |
| 6992 | |
| 6993 | // UID of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 6994 | optional int32 uid = 2 [(is_uid) = true]; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6995 | |
| 6996 | // Name of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 6997 | optional string package_name = 3; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6998 | |
| 6999 | // The permission to be granted |
| 7000 | optional string permission_name = 4; |
| 7001 | |
| 7002 | // If the permission was explicitly requested via the API or added by the system |
| 7003 | optional bool is_implicit = 5; |
| 7004 | |
| 7005 | enum Result { |
| 7006 | UNDEFINED = 0; |
| 7007 | // permission request was ignored |
| 7008 | IGNORED = 1; |
| 7009 | // permission request was ignored because it was user fixed |
| 7010 | IGNORED_USER_FIXED = 2; |
| 7011 | // permission request was ignored because it was policy fixed |
| 7012 | IGNORED_POLICY_FIXED = 3; |
| 7013 | // permission was granted by user action |
| 7014 | USER_GRANTED = 4; |
| 7015 | // permission was automatically granted |
| 7016 | AUTO_GRANTED = 5; |
| 7017 | // permission was denied by user action |
| 7018 | USER_DENIED = 6; |
| 7019 | // permission was denied with prejudice by the user |
| 7020 | USER_DENIED_WITH_PREJUDICE = 7; |
| 7021 | // permission was automatically denied |
| 7022 | AUTO_DENIED = 8; |
Svet Ganov | d8eb8b2 | 2019-04-05 18:52:08 -0700 | [diff] [blame] | 7023 | // permission request was ignored because permission is restricted |
| 7024 | IGNORED_RESTRICTED_PERMISSION = 9; |
Stanislav Zholnin | 066aefb | 2019-10-17 18:40:33 +0100 | [diff] [blame] | 7025 | // one time permission was granted by user action |
| 7026 | USER_GRANTED_ONE_TIME = 10; |
Stanislav Zholnin | 8fde4fb | 2019-12-06 19:06:08 +0000 | [diff] [blame] | 7027 | // user ignored request by leaving the request screen without choosing any option |
| 7028 | USER_IGNORED = 11; |
Evan Severson | 7c1cc8a | 2019-12-17 14:36:17 -0800 | [diff] [blame] | 7029 | // user granted the permission after being linked to settings |
| 7030 | USER_GRANTED_IN_SETTINGS = 12; |
| 7031 | // user denied the permission after being linked to settings |
| 7032 | USER_DENIED_IN_SETTINGS = 13; |
| 7033 | // user denied the permission with prejudice after being linked to settings |
| 7034 | USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14; |
| 7035 | // permission was automatically revoked after one-time permission expired |
| 7036 | AUTO_ONE_TIME_PERMISSION_REVOKED = 15; |
Eugene Susla | 6db4be5 | 2020-01-09 11:02:09 -0800 | [diff] [blame] | 7037 | // permission was automatically revoked for unused app |
| 7038 | AUTO_UNUSED_APP_PERMISSION_REVOKED = 16; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 7039 | } |
| 7040 | // The result of the permission grant |
| 7041 | optional Result result = 6; |
| 7042 | } |
| 7043 | |
| 7044 | /** |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7045 | * Logs when Omapi API used |
| 7046 | * Logged from: |
| 7047 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 7048 | */ |
| 7049 | message SeOmapiReported { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7050 | enum Operation { |
| 7051 | UNKNOWN = 0; |
| 7052 | OPEN_CHANNEL = 1; |
| 7053 | } |
| 7054 | optional Operation operation = 1; |
| 7055 | // SIMx or eSEx. |
| 7056 | optional string terminal = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7057 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7058 | optional string package_name = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7059 | } |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 7060 | |
| 7061 | /** |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 7062 | * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. |
| 7063 | * The dispatch latency is the dispatchClockTime - enqueueClockTime. |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 7064 | * Logged from: |
| 7065 | * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java |
| 7066 | */ |
| 7067 | message BroadcastDispatchLatencyReported { |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 7068 | optional int64 dispatch_latency_millis = 1; |
| 7069 | } |
| 7070 | |
| 7071 | /** |
| 7072 | * Logs AttentionManagerService attention check result. |
| 7073 | * |
| 7074 | * Logged from: |
| 7075 | * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java |
| 7076 | */ |
| 7077 | message AttentionManagerServiceResultReported { |
| 7078 | // See core/java/android/service/attention/AttentionService.java |
| 7079 | enum AttentionCheckResult { |
| 7080 | UNKNOWN = 20; |
| 7081 | ATTENTION_SUCCESS_ABSENT = 0; |
| 7082 | ATTENTION_SUCCESS_PRESENT = 1; |
Alex Salo | dd028ba | 2019-04-17 13:33:49 -0700 | [diff] [blame] | 7083 | ATTENTION_FAILURE_UNKNOWN = 2; |
| 7084 | ATTENTION_FAILURE_CANCELLED = 3; |
| 7085 | ATTENTION_FAILURE_PREEMPTED = 4; |
| 7086 | ATTENTION_FAILURE_TIMED_OUT = 5; |
| 7087 | ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 7088 | } |
| 7089 | optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 7090 | } |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 7091 | |
| 7092 | /** |
| 7093 | * Logs when an adb connection changes state. |
| 7094 | * |
| 7095 | * Logged from: |
| 7096 | * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java |
| 7097 | */ |
| 7098 | message AdbConnectionChanged { |
| 7099 | // The last time this system connected via adb, or 0 if the 'always allow' option was not |
| 7100 | // previously selected for this system. |
| 7101 | optional int64 last_connection_time_millis = 1; |
| 7102 | |
| 7103 | // The time in ms within which a subsequent connection from an 'always allow' system is allowed |
| 7104 | // to reconnect via adb without user interaction. |
| 7105 | optional int64 auth_window_millis = 2; |
| 7106 | |
| 7107 | // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto. |
| 7108 | optional android.debug.AdbConnectionStateEnum state = 3; |
| 7109 | |
| 7110 | // True if the 'always allow' option was selected for this system. |
| 7111 | optional bool always_allow = 4; |
| 7112 | } |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 7113 | |
| 7114 | /* |
| 7115 | * Logs the reported speech DSP status. |
| 7116 | * |
| 7117 | * Logged from: |
| 7118 | * Vendor audio implementation. |
| 7119 | */ |
| 7120 | message SpeechDspStatReported { |
| 7121 | // The total Speech DSP uptime in milliseconds. |
| 7122 | optional int32 total_uptime_millis = 1; |
| 7123 | // The total Speech DSP downtime in milliseconds. |
| 7124 | optional int32 total_downtime_millis = 2; |
| 7125 | optional int32 total_crash_count = 3; |
| 7126 | optional int32 total_recover_count = 4; |
| 7127 | } |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 7128 | |
| 7129 | /** |
| 7130 | * Logs USB connector contaminant status. |
| 7131 | * |
| 7132 | * Logged from: USB Service. |
| 7133 | */ |
| 7134 | message UsbContaminantReported { |
| 7135 | optional string id = 1; |
| 7136 | optional android.service.usb.ContaminantPresenceStatus status = 2; |
| 7137 | } |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 7138 | |
| 7139 | /** |
| 7140 | * This atom is for debugging purpose. |
| 7141 | */ |
| 7142 | message DebugElapsedClock { |
| 7143 | // Monotically increasing value for each pull. |
| 7144 | optional int64 pull_count = 1; |
| 7145 | // Time from System.elapsedRealtime. |
| 7146 | optional int64 elapsed_clock_millis = 2; |
| 7147 | // Time from System.elapsedRealtime. |
| 7148 | optional int64 same_elapsed_clock_millis = 3; |
| 7149 | // Diff between current elapsed time and elapsed time from previous pull. |
| 7150 | optional int64 elapsed_clock_diff_millis = 4; |
| 7151 | |
| 7152 | enum Type { |
| 7153 | TYPE_UNKNOWN = 0; |
| 7154 | ALWAYS_PRESENT = 1; |
| 7155 | PRESENT_ON_ODD_PULLS = 2; |
| 7156 | } |
| 7157 | // Type of behavior for the pulled data. |
| 7158 | optional Type type = 5; |
| 7159 | } |
| 7160 | |
| 7161 | /** |
| 7162 | * This atom is for debugging purpose. |
| 7163 | */ |
| 7164 | message DebugFailingElapsedClock { |
| 7165 | // Monotically increasing value for each pull. |
| 7166 | optional int64 pull_count = 1; |
| 7167 | // Time from System.elapsedRealtime. |
| 7168 | optional int64 elapsed_clock_millis = 2; |
| 7169 | // Time from System.elapsedRealtime. |
| 7170 | optional int64 same_elapsed_clock_millis = 3; |
| 7171 | // Diff between current elapsed time and elapsed time from previous pull. |
| 7172 | optional int64 elapsed_clock_diff_millis = 4; |
| 7173 | } |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7174 | |
| 7175 | /** Logs System UI bubbles event changed. |
| 7176 | * |
| 7177 | * Logged from: |
| 7178 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles |
| 7179 | */ |
| 7180 | message BubbleUIChanged { |
| 7181 | |
| 7182 | // The app package that is posting the bubble. |
| 7183 | optional string package_name = 1; |
| 7184 | |
| 7185 | // The notification channel that is posting the bubble. |
| 7186 | optional string notification_channel = 2; |
| 7187 | |
| 7188 | // The notification id associated with the posted bubble. |
| 7189 | optional int32 notification_id = 3; |
| 7190 | |
| 7191 | // The position of the bubble within the bubble stack. |
| 7192 | optional int32 position = 4; |
| 7193 | |
| 7194 | // The total number of bubbles within the bubble stack. |
| 7195 | optional int32 total_number = 5; |
| 7196 | |
| 7197 | // User interactions with the bubble. |
| 7198 | enum Action { |
| 7199 | UNKNOWN = 0; |
| 7200 | POSTED = 1; |
| 7201 | UPDATED = 2; |
| 7202 | EXPANDED = 3; |
| 7203 | COLLAPSED = 4; |
| 7204 | DISMISSED = 5; |
| 7205 | STACK_DISMISSED = 6; |
| 7206 | STACK_MOVED = 7; |
| 7207 | HEADER_GO_TO_APP = 8; |
| 7208 | HEADER_GO_TO_SETTINGS = 9; |
| 7209 | PERMISSION_OPT_IN = 10; |
| 7210 | PERMISSION_OPT_OUT = 11; |
Steven Wu | a62cb6a | 2019-02-15 17:12:51 -0500 | [diff] [blame] | 7211 | PERMISSION_DIALOG_SHOWN = 12; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7212 | SWIPE_LEFT = 13; |
| 7213 | SWIPE_RIGHT = 14; |
Steven Wu | a254dab | 2019-01-29 11:30:39 -0500 | [diff] [blame] | 7214 | STACK_EXPANDED = 15; |
Steven Wu | 1684f2d | 2019-04-11 14:10:42 -0400 | [diff] [blame] | 7215 | FLYOUT = 16; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7216 | } |
| 7217 | optional Action action = 6; |
| 7218 | |
| 7219 | // Normalized screen position of the bubble stack. The range is between 0 and 1. |
| 7220 | optional float normalized_x_position = 7; |
| 7221 | optional float normalized_y_position = 8; |
Steven Wu | 45e38ae | 2019-03-25 16:16:59 -0400 | [diff] [blame] | 7222 | |
| 7223 | // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon. |
| 7224 | optional bool is_unread = 9; |
Steven Wu | 8ba8ca9 | 2019-04-11 10:47:42 -0400 | [diff] [blame] | 7225 | |
| 7226 | // Whether the bubble is an on-going one. |
| 7227 | optional bool is_ongoing = 10; |
| 7228 | |
| 7229 | // Whether the bubble is produced by an app running in foreground. |
Mady Mellor | daa0a66 | 2019-06-24 16:42:35 -0700 | [diff] [blame] | 7230 | // This is deprecated and the value should be ignored. |
| 7231 | optional bool is_foreground = 11 [deprecated = true]; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7232 | } |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 7233 | |
| 7234 | /** |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 7235 | * Logs System UI bubbles developer errors. |
| 7236 | * |
| 7237 | * Logged from: |
| 7238 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java |
| 7239 | */ |
| 7240 | message BubbleDeveloperErrorReported { |
| 7241 | |
| 7242 | // The app package that is posting the bubble. |
| 7243 | optional string package_name = 1; |
| 7244 | |
| 7245 | // Bubble developer error type enums. |
| 7246 | enum Error { |
| 7247 | UNKNOWN = 0; |
| 7248 | ACTIVITY_INFO_MISSING = 1; |
| 7249 | ACTIVITY_INFO_NOT_RESIZABLE = 2; |
| 7250 | DOCUMENT_LAUNCH_NOT_ALWAYS = 3; |
| 7251 | } |
| 7252 | optional Error error = 2 [default = UNKNOWN]; |
| 7253 | } |
| 7254 | |
| 7255 | /** |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 7256 | * Logs that a constraint for a scheduled job has changed. |
| 7257 | * |
| 7258 | * Logged from: |
| 7259 | * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java |
| 7260 | */ |
| 7261 | message ScheduledJobConstraintChanged { |
| 7262 | repeated AttributionNode attribution_node = 1; |
| 7263 | |
| 7264 | // Name of the job. |
| 7265 | optional string job_name = 2; |
| 7266 | |
| 7267 | optional com.android.server.job.ConstraintEnum constraint = 3; |
| 7268 | |
| 7269 | enum State { |
Kweku Adams | e8db3ab | 2019-02-27 14:30:34 -0800 | [diff] [blame] | 7270 | UNKNOWN = 0; |
| 7271 | UNSATISFIED = 1; |
| 7272 | SATISFIED = 2; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 7273 | } |
| 7274 | optional State state = 4; |
| 7275 | } |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7276 | |
| 7277 | /** |
| 7278 | * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check |
| 7279 | * returns true. |
| 7280 | * |
| 7281 | * Logged from: |
| 7282 | * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java |
| 7283 | */ |
| 7284 | message ScreenTimeoutExtensionReported { |
| 7285 | // Describes how many times in a row did the power manager reset the screen off timeout. |
| 7286 | optional uint32 consecutive_timeout_extended_count = 1; |
| 7287 | } |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 7288 | |
| 7289 | /* |
| 7290 | * Logs number of milliseconds it takes to start a process. |
| 7291 | * The definition of app process start time is from the app launch time to |
| 7292 | * the time that Zygote finished forking the app process and loaded the |
| 7293 | * application package's java classes. |
| 7294 | |
| 7295 | * This metric is different from AppStartOccurred which is for foreground |
| 7296 | * activity only. |
| 7297 | |
| 7298 | * ProcessStartTime can report all processes (both foreground and background) |
| 7299 | * start time. |
| 7300 | * |
| 7301 | * Logged from: |
| 7302 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 7303 | */ |
| 7304 | message ProcessStartTime { |
| 7305 | // The uid of the ProcessRecord. |
| 7306 | optional int32 uid = 1 [(is_uid) = true]; |
| 7307 | |
| 7308 | // The process pid. |
| 7309 | optional int32 pid = 2; |
| 7310 | |
| 7311 | // The process name. |
| 7312 | // Usually package name, "system" for system server. |
| 7313 | // Provided by ActivityManagerService. |
| 7314 | optional string process_name = 3; |
| 7315 | |
| 7316 | enum StartType { |
| 7317 | UNKNOWN = 0; |
| 7318 | WARM = 1; |
| 7319 | HOT = 2; |
| 7320 | COLD = 3; |
| 7321 | } |
| 7322 | |
| 7323 | // The start type. |
| 7324 | optional StartType type = 4; |
| 7325 | |
| 7326 | // The elapsed realtime at the start of the process. |
| 7327 | optional int64 process_start_time_millis = 5; |
| 7328 | |
| 7329 | // Number of milliseconds it takes to reach bind application. |
| 7330 | optional int32 bind_application_delay_millis = 6; |
| 7331 | |
| 7332 | // Number of milliseconds it takes to finish start of the process. |
| 7333 | optional int32 process_start_delay_millis = 7; |
| 7334 | |
| 7335 | // hostingType field in ProcessRecord, the component type such as "activity", |
| 7336 | // "service", "content provider", "broadcast" or other strings. |
| 7337 | optional string hosting_type = 8; |
| 7338 | |
| 7339 | // hostingNameStr field in ProcessRecord. The component class name that runs |
| 7340 | // in this process. |
| 7341 | optional string hosting_name = 9; |
| 7342 | } |
| 7343 | |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 7344 | /** |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 7345 | * Track Media Codec usage |
| 7346 | * Logged from: |
| 7347 | * frameworks/av/media/libstagefright/MediaCodec.cpp |
| 7348 | * frameworks/av/services/mediaanalytics/statsd_codec.cpp |
| 7349 | */ |
| 7350 | message MediametricsCodecReported { |
| 7351 | optional int64 timestamp_nanos = 1; |
| 7352 | optional string package_name = 2; |
| 7353 | optional int64 package_version_code = 3; |
| 7354 | optional int64 media_apex_version = 4; |
| 7355 | |
| 7356 | optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7357 | } |
| 7358 | |
| 7359 | /** |
| 7360 | * Track Media Extractor (pulling video/audio streams out of containers) usage |
| 7361 | * Logged from: |
| 7362 | * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp |
| 7363 | * frameworks/av/services/mediaanalytics/statsd_extractor.cpp |
| 7364 | */ |
| 7365 | message MediametricsExtractorReported { |
| 7366 | optional int64 timestamp_nanos = 1; |
| 7367 | optional string package_name = 2; |
| 7368 | optional int64 package_version_code = 3; |
| 7369 | optional int64 media_apex_version = 4; |
| 7370 | |
| 7371 | optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7372 | } |
| 7373 | |
| 7374 | /** |
| 7375 | * Track how we arbitrate between microphone/input requests. |
| 7376 | * Logged from |
| 7377 | * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp |
| 7378 | * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp |
| 7379 | */ |
| 7380 | message MediametricsAudiopolicyReported { |
| 7381 | optional int64 timestamp_nanos = 1; |
| 7382 | optional string package_name = 2; |
| 7383 | optional int64 package_version_code = 3; |
| 7384 | optional int64 media_apex_version = 4; |
| 7385 | |
| 7386 | optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7387 | } |
| 7388 | |
| 7389 | /** |
| 7390 | * Track how we arbitrate between microphone requests. |
| 7391 | * Logged from |
| 7392 | * frameworks/av/media/libaudioclient/AudioRecord.cpp |
| 7393 | * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp |
| 7394 | */ |
| 7395 | message MediametricsAudiorecordReported { |
| 7396 | optional int64 timestamp_nanos = 1; |
| 7397 | optional string package_name = 2; |
| 7398 | optional int64 package_version_code = 3; |
| 7399 | optional int64 media_apex_version = 4; |
| 7400 | |
| 7401 | optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7402 | } |
| 7403 | |
| 7404 | /** |
| 7405 | * Track how we arbitrate between microphone/input requests. |
| 7406 | * Logged from |
| 7407 | * frameworks/av/media/libnblog/ReportPerformance.cpp |
| 7408 | * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp |
| 7409 | */ |
| 7410 | message MediametricsAudiothreadReported { |
| 7411 | optional int64 timestamp_nanos = 1; |
| 7412 | optional string package_name = 2; |
| 7413 | optional int64 package_version_code = 3; |
| 7414 | optional int64 media_apex_version = 4; |
| 7415 | |
| 7416 | optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7417 | } |
| 7418 | |
| 7419 | /** |
| 7420 | * Track how we arbitrate between microphone/input requests. |
| 7421 | * Logged from |
| 7422 | * frameworks/av/media/libaudioclient/AudioTrack.cpp |
| 7423 | * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp |
| 7424 | */ |
| 7425 | message MediametricsAudiotrackReported { |
| 7426 | optional int64 timestamp_nanos = 1; |
| 7427 | optional string package_name = 2; |
| 7428 | optional int64 package_version_code = 3; |
| 7429 | optional int64 media_apex_version = 4; |
| 7430 | |
| 7431 | optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7432 | } |
| 7433 | |
| 7434 | /** |
| 7435 | * Track information about DRM framework performance |
| 7436 | * Logged from |
| 7437 | * frameworks/av/drm/libmediadrm/DrmHal.cpp |
| 7438 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 7439 | */ |
| 7440 | message MediametricsMediadrmReported { |
| 7441 | optional int64 timestamp_nanos = 1; |
| 7442 | optional string package_name = 2; |
| 7443 | optional int64 package_version_code = 3; |
| 7444 | optional int64 media_apex_version = 4; |
| 7445 | |
| 7446 | // vendor+description tell about which DRM plugin is in use on this device |
| 7447 | optional string vendor = 5; |
| 7448 | optional string description = 6; |
| 7449 | // from frameworks/av/drm/libmediadrm/protos/metrics.proto |
| 7450 | optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7451 | } |
| 7452 | |
| 7453 | /** |
| 7454 | * Track information about the widevine DRM plugin performance |
| 7455 | * Logged from |
| 7456 | * vendor/widevine/libwvdrmengine/cdm/metrics |
| 7457 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 7458 | */ |
| 7459 | message MediametricsDrmWidevineReported { |
| 7460 | optional int64 timestamp_nanos = 1; |
| 7461 | optional string package_name = 2; |
| 7462 | optional int64 package_version_code = 3; |
| 7463 | optional int64 media_apex_version = 4; |
| 7464 | |
| 7465 | optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7466 | } |
| 7467 | |
| 7468 | /** |
| 7469 | * Track information about recordings (e.g. camcorder) |
| 7470 | * Logged from |
| 7471 | * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp |
| 7472 | * frameworks/av/services/mediaanalytics/statsd_recorder.cpp |
| 7473 | */ |
| 7474 | message MediametricsRecorderReported { |
| 7475 | optional int64 timestamp_nanos = 1; |
| 7476 | optional string package_name = 2; |
| 7477 | optional int64 package_version_code = 3; |
| 7478 | optional int64 media_apex_version = 4; |
| 7479 | |
| 7480 | optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7481 | } |
| 7482 | |
| 7483 | /** |
| 7484 | * Track Media Player usage |
| 7485 | * Logged from: |
| 7486 | * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp |
| 7487 | * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp |
| 7488 | */ |
| 7489 | message MediametricsNuPlayerReported { |
| 7490 | optional int64 timestamp_nanos = 1; |
| 7491 | optional string package_name = 2; |
| 7492 | optional int64 package_version_code = 3; |
| 7493 | optional int64 media_apex_version = 4; |
| 7494 | |
| 7495 | optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7496 | } |
| 7497 | |
| 7498 | /** |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 7499 | * Track Legacy DRM usage |
| 7500 | * Logged from |
| 7501 | * frameworks/av/drm/drmserver/DrmManager.cpp |
| 7502 | */ |
| 7503 | message MediametricsDrmManagerReported { |
| 7504 | optional int64 timestamp_nanos = 1; |
| 7505 | optional string package_name = 2; |
| 7506 | optional int64 package_version_code = 3; |
| 7507 | optional int64 media_apex_version = 4; |
| 7508 | |
| 7509 | enum Method { |
| 7510 | METHOD_NOT_FOUND = -1; |
| 7511 | GET_CONSTRAINTS = 0; |
| 7512 | GET_METADATA = 1; |
| 7513 | CAN_HANDLE = 2; |
| 7514 | PROCESS_DRM_INFO = 3; |
| 7515 | ACQUIRE_DRM_INFO = 4; |
| 7516 | SAVE_RIGHTS = 5; |
| 7517 | GET_ORIGINAL_MIME_TYPE = 6; |
| 7518 | GET_DRM_OBJECT_TYPE = 7; |
| 7519 | CHECK_RIGHTS_STATUS = 8; |
| 7520 | REMOVE_RIGHTS = 9; |
| 7521 | REMOVE_ALL_RIGHTS = 10; |
| 7522 | OPEN_CONVERT_SESSION = 11; |
| 7523 | OPEN_DECRYPT_SESSION = 12; |
| 7524 | } |
| 7525 | |
| 7526 | // plugin_id+description inform which Legacy DRM plugins are still in use on device |
| 7527 | optional string plugin_id = 5; |
| 7528 | optional string description = 6; |
| 7529 | optional Method method = 7; |
| 7530 | optional string mime_types = 8; |
Robert Shih | ec8e60c | 2020-02-08 15:20:39 -0800 | [diff] [blame] | 7531 | |
| 7532 | optional int64 get_constraints_count = 9; |
| 7533 | optional int64 get_metadata_count = 10; |
| 7534 | optional int64 can_handle_count = 11; |
| 7535 | optional int64 process_drm_info_count = 12; |
| 7536 | optional int64 acquire_drm_info_count = 13; |
| 7537 | optional int64 save_rights_count = 14; |
| 7538 | optional int64 get_original_mime_type_count = 15; |
| 7539 | optional int64 get_drm_object_type_count = 16; |
| 7540 | optional int64 check_rights_status_count = 17; |
| 7541 | optional int64 remove_rights_count = 18; |
| 7542 | optional int64 remove_all_rights_count = 19; |
| 7543 | optional int64 open_convert_session_count = 20; |
| 7544 | optional int64 open_decrypt_session_count = 21; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 7545 | } |
| 7546 | |
| 7547 | /** |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 7548 | * State of a dangerous permission requested by a package |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 7549 | * Pulled from: StatsCompanionService |
| 7550 | */ |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 7551 | message DangerousPermissionState { |
| 7552 | // Name of the permission |
| 7553 | optional string permission_name = 1; |
| 7554 | |
| 7555 | // Uid of the package |
| 7556 | optional int32 uid = 2 [(is_uid) = true]; |
| 7557 | |
| 7558 | // Package requesting the permission |
| 7559 | optional string package_name = 3; |
| 7560 | |
| 7561 | // If the permission is granted to the uid |
| 7562 | optional bool is_granted = 4; |
Stanislav Zholnin | 75c3fd1 | 2019-05-21 13:10:51 +0100 | [diff] [blame] | 7563 | |
| 7564 | // Permission flags as per android.content.pm.PermissionFlags |
| 7565 | optional int32 permission_flags = 5; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 7566 | } |
| 7567 | |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 7568 | /** |
| 7569 | * Logs when a package is denied access to a device identifier based on the new access requirements. |
| 7570 | * |
| 7571 | * Logged from: |
| 7572 | * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java |
| 7573 | */ |
| 7574 | message DeviceIdentifierAccessDenied { |
| 7575 | // The name of the package denied access to the requested device identifier. |
| 7576 | optional string package_name = 1; |
| 7577 | |
| 7578 | // The name of the device identifier method the package attempted to invoke. |
| 7579 | optional string method_name = 2; |
| 7580 | |
| 7581 | // True if the package is preinstalled. |
Meng Wang | e8953ae | 2020-01-29 10:38:58 -0800 | [diff] [blame] | 7582 | // Starting from Android 11, this boolean is not set and will always be false. |
| 7583 | optional bool is_preinstalled = 3 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 7584 | |
| 7585 | // True if the package is privileged. |
Sooraj Sasindran | 22b53f4 | 2019-11-27 15:57:33 -0800 | [diff] [blame] | 7586 | // Starting from Android 11, this boolean is not set and will always be false. |
| 7587 | optional bool is_priv_app = 4 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 7588 | } |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 7589 | |
| 7590 | /** |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 7591 | * Pulls the ongoing mainline install train version code. |
| 7592 | * Pulled from StatsCompanionService |
| 7593 | */ |
| 7594 | message TrainInfo { |
| 7595 | optional int64 train_version_code = 1; |
| 7596 | |
| 7597 | optional TrainExperimentIds train_experiment_id = 2; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 7598 | |
| 7599 | optional string train_name = 3; |
| 7600 | |
| 7601 | enum Status { |
| 7602 | UNKNOWN = 0; |
| 7603 | INSTALL_REQUESTED = 1; |
| 7604 | INSTALL_STARTED = 2; |
| 7605 | INSTALL_STAGED_NOT_READY = 3; |
| 7606 | INSTALL_STAGED_READY = 4; |
| 7607 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 7608 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 7609 | // and INSTALL_FAILURE_COMMIT. |
| 7610 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 7611 | // This enum is for installs that are manually cancelled via the Manual Update UI. |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 7612 | INSTALL_CANCELLED = 7; |
| 7613 | INSTALLER_ROLLBACK_REQUESTED = 8; |
| 7614 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 7615 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 7616 | INSTALLER_ROLLBACK_STAGED = 11; |
| 7617 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 7618 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 7619 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 7620 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 7621 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 7622 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 7623 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 7624 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 7625 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 7626 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 7627 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 7628 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 7629 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 7630 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 7631 | REBOOT_TRIGGERED = 26; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 7632 | } |
| 7633 | optional Status status = 4; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 7634 | } |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 7635 | |
| 7636 | /** |
| 7637 | * Logs the gesture stage changed event. |
| 7638 | * |
| 7639 | * Logged from: |
| 7640 | * frameworks/base/packages/SystemUI/ |
| 7641 | */ |
| 7642 | message AssistGestureStageReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 7643 | optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 7644 | } |
| 7645 | |
| 7646 | /** |
| 7647 | * Logs the feedback type. |
| 7648 | * |
| 7649 | * Logged from: |
| 7650 | * frameworks/base/packages/SystemUI/ |
| 7651 | */ |
| 7652 | message AssistGestureFeedbackReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 7653 | // Whether or not the gesture was used. |
| 7654 | optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 7655 | } |
| 7656 | |
| 7657 | /** |
| 7658 | * Logs the progress. |
| 7659 | * |
| 7660 | * Logged from: |
| 7661 | * frameworks/base/packages/SystemUI/ |
| 7662 | */ |
| 7663 | message AssistGestureProgressReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 7664 | // [0,100] progress for the assist gesture. |
| 7665 | optional int32 progress = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 7666 | } |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 7667 | |
| 7668 | /* |
| 7669 | * Information about the time zone data on a device. |
| 7670 | */ |
| 7671 | message TimeZoneDataInfo { |
| 7672 | // A version identifier for the data set on device. e.g. "2018i" |
| 7673 | optional string tzdb_version = 1; |
| 7674 | } |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7675 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7676 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7677 | * Logs the GPU stats global health information. |
| 7678 | * |
| 7679 | * Logged from: |
| 7680 | * frameworks/native/services/gpuservice/gpustats/ |
| 7681 | */ |
| 7682 | message GpuStatsGlobalInfo { |
| 7683 | // Package name of the gpu driver. |
| 7684 | optional string driver_package_name = 1; |
| 7685 | |
| 7686 | // Version name of the gpu driver. |
| 7687 | optional string driver_version_name = 2; |
| 7688 | |
| 7689 | // Version code of the gpu driver. |
| 7690 | optional int64 driver_version_code = 3; |
| 7691 | |
| 7692 | // Build time of the gpu driver in UTC as seconds since January 1, 1970. |
| 7693 | optional int64 driver_build_time = 4; |
| 7694 | |
| 7695 | // Total count of the gl driver gets loaded. |
| 7696 | optional int64 gl_loading_count = 5; |
| 7697 | |
| 7698 | // Total count of the gl driver fails to be loaded. |
| 7699 | optional int64 gl_loading_failure_count = 6; |
| 7700 | |
| 7701 | // Total count of the Vulkan driver gets loaded. |
| 7702 | optional int64 vk_loading_count = 7; |
| 7703 | |
| 7704 | // Total count of the Vulkan driver fails to be loaded. |
| 7705 | optional int64 vk_loading_failure_count = 8; |
Yiwei Zhang | 63852d2a | 2019-05-06 19:31:20 -0700 | [diff] [blame] | 7706 | |
| 7707 | // Api version of the system Vulkan driver. |
| 7708 | optional int32 vulkan_version = 9; |
| 7709 | |
| 7710 | // Api version of the system CPU Vulkan driver. |
| 7711 | optional int32 cpu_vulkan_version = 10; |
| 7712 | |
| 7713 | // Api version of the system GLES driver. |
| 7714 | optional int32 gles_version = 11; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 7715 | |
| 7716 | // Total count of the angle driver gets loaded. |
| 7717 | optional int64 angle_loading_count = 12; |
| 7718 | |
| 7719 | // Total count of the angle driver fails to be loaded. |
| 7720 | optional int64 angle_loading_failure_count = 13; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7721 | } |
| 7722 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7723 | /** |
| 7724 | * GPU driver loading time info. |
| 7725 | */ |
| 7726 | message GpuDriverLoadingTime { |
| 7727 | // List of all the driver loading times for this app. The list size is |
| 7728 | // capped at 50. |
| 7729 | repeated int64 driver_loading_time = 1; |
| 7730 | } |
| 7731 | |
| 7732 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7733 | * Logs the GPU stats per app health information. |
| 7734 | * |
| 7735 | * Logged from: |
| 7736 | * frameworks/native/services/gpuservice/gpustats/ |
| 7737 | */ |
| 7738 | message GpuStatsAppInfo { |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7739 | // Package name of the application that loads the gpu driver. Total number |
| 7740 | // of different packages is capped at 100. |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7741 | optional string app_package_name = 1; |
| 7742 | |
| 7743 | // Version code of the gpu driver this app loads. |
| 7744 | optional int64 driver_version_code = 2; |
| 7745 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7746 | // gl driver loading time info. |
| 7747 | optional GpuDriverLoadingTime gl_driver_loading_time = 3 |
| 7748 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7749 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7750 | // Vulkan driver loading time info. |
| 7751 | optional GpuDriverLoadingTime vk_driver_loading_time = 4 |
| 7752 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 7753 | |
| 7754 | // Angle driver loading time info. |
| 7755 | optional GpuDriverLoadingTime angle_driver_loading_time = 5 |
| 7756 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 7c70930 | 2019-05-09 15:00:46 -0700 | [diff] [blame] | 7757 | |
| 7758 | // CPU Vulkan implementation is in use. |
| 7759 | optional bool cpu_vulkan_in_use = 6; |
Yiwei Zhang | a763861 | 2019-07-03 17:34:12 -0700 | [diff] [blame] | 7760 | |
| 7761 | // App is not doing pre-rotation correctly. |
| 7762 | optional bool false_prerotation = 7; |
Yiwei Zhang | f02cf6b | 2019-12-20 14:51:07 -0800 | [diff] [blame] | 7763 | |
| 7764 | // App creates GLESv1 context. |
| 7765 | optional bool gles_1_in_use = 8; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7766 | } |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7767 | |
| 7768 | /* |
| 7769 | * Logs the size of the system ion heap. |
| 7770 | * |
| 7771 | * Pulled from StatsCompanionService. |
| 7772 | */ |
| 7773 | message SystemIonHeapSize { |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7774 | // Deprecated due to limited support of ion stats in debugfs. |
| 7775 | // Use `IonHeapSize` instead. |
| 7776 | option deprecated = true; |
| 7777 | |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7778 | // Size of the system ion heap in bytes. |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7779 | // Read from debugfs. |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7780 | optional int64 size_in_bytes = 1; |
| 7781 | } |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7782 | |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 7783 | /* |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7784 | * Logs the total size of the ion heap. |
| 7785 | * |
| 7786 | * Pulled from StatsCompanionService. |
| 7787 | */ |
| 7788 | message IonHeapSize { |
| 7789 | // Total size of all ion heaps in kilobytes. |
| 7790 | // Read from: /sys/kernel/ion/total_heaps_kb. |
| 7791 | optional int32 total_size_kb = 1; |
| 7792 | } |
| 7793 | |
| 7794 | /* |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 7795 | * Logs the per-process size of the system ion heap. |
| 7796 | * |
| 7797 | * Pulled from StatsCompanionService. |
| 7798 | */ |
| 7799 | message ProcessSystemIonHeapSize { |
| 7800 | // The uid if available. -1 means not available. |
| 7801 | optional int32 uid = 1 [(is_uid) = true]; |
| 7802 | |
| 7803 | // The process name (from /proc/PID/cmdline). |
| 7804 | optional string process_name = 2; |
| 7805 | |
| 7806 | // Sum of sizes of all allocations. |
| 7807 | optional int32 total_size_in_kilobytes = 3; |
| 7808 | |
| 7809 | // Number of allocations. |
| 7810 | optional int32 allocation_count = 4; |
| 7811 | |
| 7812 | // Size of the largest allocation. |
| 7813 | optional int32 max_size_in_kilobytes = 5; |
| 7814 | } |
| 7815 | |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7816 | /** |
| 7817 | * Push network stack events. |
| 7818 | * |
| 7819 | * Log from: |
| 7820 | * frameworks/base/packages/NetworkStack/ |
| 7821 | */ |
| 7822 | message NetworkStackReported { |
Chiachang Wang | 729d267 | 2019-03-27 17:33:52 +0800 | [diff] [blame] | 7823 | // The id that indicates the event reported from NetworkStack. |
| 7824 | optional int32 event_id = 1; |
| 7825 | // The data for the reported events. |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7826 | optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES]; |
| 7827 | } |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 7828 | |
| 7829 | /** |
| 7830 | * Logs the apps that are installed on the external storage. |
| 7831 | * Pulled from: |
| 7832 | * StatsCompanionService |
| 7833 | */ |
| 7834 | message AppsOnExternalStorageInfo { |
| 7835 | // The type of the external storage. |
| 7836 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 7837 | // The name of the package that is installed on the external storage. |
| 7838 | optional string package_name = 2; |
| 7839 | } |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 7840 | |
| 7841 | /** |
| 7842 | * Logs the settings related to Face. |
| 7843 | * Logged from: |
| 7844 | * frameworks/base/services/core/java/com/android/server/stats |
| 7845 | */ |
| 7846 | message FaceSettings { |
| 7847 | // Whether or not face unlock is allowed on Keyguard. |
| 7848 | optional bool unlock_keyguard_enabled = 1; |
| 7849 | // Whether or not face unlock dismisses the Keyguard. |
| 7850 | optional bool unlock_dismisses_keyguard = 2; |
| 7851 | // Whether or not face unlock requires attention. |
| 7852 | optional bool unlock_attention_required = 3; |
| 7853 | // Whether or not face unlock is allowed for apps (through BiometricPrompt). |
| 7854 | optional bool unlock_app_enabled = 4; |
| 7855 | // Whether or not face unlock always requires user confirmation. |
| 7856 | optional bool unlock_always_require_confirmation = 5; |
| 7857 | // Whether or not a diverse set of poses are required during enrollment. |
| 7858 | optional bool unlock_diversity_required = 6; |
| 7859 | } |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 7860 | |
| 7861 | /** |
| 7862 | * Logs cooling devices maintained by the kernel. |
| 7863 | * |
| 7864 | * Pulled from StatsCompanionService.java |
| 7865 | */ |
| 7866 | message CoolingDevice { |
| 7867 | // The type of cooling device being reported. Eg. CPU, GPU... |
| 7868 | optional android.os.CoolingTypeEnum device_location = 1; |
| 7869 | // The name of the cooling device source. Eg. CPU0 |
| 7870 | optional string device_name = 2; |
| 7871 | // Current throttle state of the cooling device. The value can any unsigned |
| 7872 | // integer between 0 and max_state defined in its driver. 0 means device is |
| 7873 | // not in throttling, higher value means deeper throttling. |
| 7874 | optional int32 state = 3; |
| 7875 | } |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7876 | |
| 7877 | /** |
| 7878 | * Intelligence has several counter-type events that don't warrant a |
| 7879 | * full separate atom. These are primarily API call counters but also include |
| 7880 | * counters for feature usage and specific failure modes. |
| 7881 | * |
| 7882 | * Logged from the Intelligence mainline module. |
| 7883 | */ |
| 7884 | message IntelligenceEventReported { |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7885 | // The event type. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7886 | optional android.stats.intelligence.EventType event_id = 1; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7887 | // Success, failure. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7888 | optional android.stats.intelligence.Status status = 2; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7889 | // How many times the event occured (to report a batch of high frequency events). |
| 7890 | optional int32 count = 3; |
Ben Blount | e3223f3d | 2019-05-02 22:49:03 -0700 | [diff] [blame] | 7891 | // How long the event took (sum of durations if count > 1) |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7892 | optional int64 duration_millis = 4; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7893 | } |
Andrew T Nguyen | ee615d6 | 2019-05-01 14:40:19 -0700 | [diff] [blame] | 7894 | |
| 7895 | /** |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 7896 | * Logs when Car Power state changed. |
| 7897 | * |
| 7898 | * Logged from: |
| 7899 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 7900 | */ |
| 7901 | message CarPowerStateChanged { |
| 7902 | // States come from CpmsState in CarPowerManagementService.java. |
| 7903 | enum State { |
| 7904 | WAIT_FOR_VHAL = 0; |
| 7905 | ON = 1; |
| 7906 | SHUTDOWN_PREPARE = 2; |
| 7907 | WAIT_FOR_FINISH = 3; |
| 7908 | SUSPEND = 4; |
| 7909 | SIMULATE_SLEEP = 5; |
| 7910 | } |
| 7911 | optional State state = 1; |
| 7912 | } |
| 7913 | |
| 7914 | /** |
| 7915 | * Logs whether GarageMode is entered. |
| 7916 | * |
| 7917 | * Logged from: |
| 7918 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 7919 | */ |
| 7920 | message GarageModeInfo { |
| 7921 | // Whether GarageMode is entered. |
| 7922 | optional bool is_garage_mode = 1; |
| 7923 | } |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7924 | |
| 7925 | /** |
| 7926 | * Historical app ops data per package. |
| 7927 | */ |
| 7928 | message AppOps { |
| 7929 | // Uid of the package requesting the op |
| 7930 | optional int32 uid = 1 [(is_uid) = true]; |
| 7931 | |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 7932 | // Name of the package performing the op |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7933 | optional string package_name = 2; |
| 7934 | |
Stanislav Zholnin | 48811ee | 2020-03-03 16:15:55 +0000 | [diff] [blame] | 7935 | // operation id |
| 7936 | optional android.app.AppOpEnum op_id = 3 [default = APP_OP_NONE]; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7937 | |
| 7938 | // The number of times the op was granted while the app was in the |
| 7939 | // foreground (only for trusted requests) |
| 7940 | optional int64 trusted_foreground_granted_count = 4; |
| 7941 | |
| 7942 | // The number of times the op was granted while the app was in the |
| 7943 | // background (only for trusted requests) |
| 7944 | optional int64 trusted_background_granted_count = 5; |
| 7945 | |
| 7946 | // The number of times the op was rejected while the app was in the |
| 7947 | // foreground (only for trusted requests) |
| 7948 | optional int64 trusted_foreground_rejected_count = 6; |
| 7949 | |
| 7950 | // The number of times the op was rejected while the app was in the |
| 7951 | // background (only for trusted requests) |
| 7952 | optional int64 trusted_background_rejected_count = 7; |
| 7953 | |
| 7954 | // For long-running operations, total duration of the operation |
| 7955 | // while the app was in the foreground (only for trusted requests) |
| 7956 | optional int64 trusted_foreground_duration_millis = 8; |
| 7957 | |
| 7958 | // For long-running operations, total duration of the operation |
| 7959 | // while the app was in the background (only for trusted requests) |
| 7960 | optional int64 trusted_background_duration_millis = 9; |
Stanislav Zholnin | 42d710e | 2019-11-28 13:11:54 +0000 | [diff] [blame] | 7961 | |
| 7962 | // Whether AppOps is guarded by Runtime permission |
| 7963 | optional bool is_runtime_permission = 10; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7964 | } |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 7965 | |
| 7966 | /** |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 7967 | * Historical app ops data per package and attribution tag. |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 7968 | */ |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 7969 | message AttributedAppOps { |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 7970 | // Uid of the package requesting the op |
| 7971 | optional int32 uid = 1 [(is_uid) = true]; |
| 7972 | |
| 7973 | // Name of the package performing the op |
| 7974 | optional string package_name = 2; |
| 7975 | |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 7976 | // tag; provided by developer when accessing related API, limited at 50 chars by API. |
| 7977 | // Attributions must be provided through manifest using <attribution> tag available in R and |
| 7978 | // above. |
| 7979 | optional string tag = 3; |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 7980 | |
Stanislav Zholnin | 48811ee | 2020-03-03 16:15:55 +0000 | [diff] [blame] | 7981 | // operation id |
| 7982 | optional android.app.AppOpEnum op = 4 [default = APP_OP_NONE]; |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 7983 | |
| 7984 | // The number of times the op was granted while the app was in the |
| 7985 | // foreground (only for trusted requests) |
| 7986 | optional int64 trusted_foreground_granted_count = 5; |
| 7987 | |
| 7988 | // The number of times the op was granted while the app was in the |
| 7989 | // background (only for trusted requests) |
| 7990 | optional int64 trusted_background_granted_count = 6; |
| 7991 | |
| 7992 | // The number of times the op was rejected while the app was in the |
| 7993 | // foreground (only for trusted requests) |
| 7994 | optional int64 trusted_foreground_rejected_count = 7; |
| 7995 | |
| 7996 | // The number of times the op was rejected while the app was in the |
| 7997 | // background (only for trusted requests) |
| 7998 | optional int64 trusted_background_rejected_count = 8; |
| 7999 | |
| 8000 | // For long-running operations, total duration of the operation |
| 8001 | // while the app was in the foreground (only for trusted requests) |
| 8002 | optional int64 trusted_foreground_duration_millis = 9; |
| 8003 | |
| 8004 | // For long-running operations, total duration of the operation |
| 8005 | // while the app was in the background (only for trusted requests) |
| 8006 | optional int64 trusted_background_duration_millis = 10; |
| 8007 | |
| 8008 | // Whether AppOps is guarded by Runtime permission |
| 8009 | optional bool is_runtime_permission = 11; |
Stanislav Zholnin | 5919913 | 2020-03-06 14:19:25 +0000 | [diff] [blame] | 8010 | |
| 8011 | // Sampling rate used on device, from 0 to 100 |
| 8012 | optional int32 sampling_rate = 12; |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 8013 | } |
| 8014 | |
| 8015 | /** |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 8016 | * Location Manager API Usage information(e.g. API under usage, |
| 8017 | * API call's parameters). |
| 8018 | * Logged from: |
| 8019 | * frameworks/base/services/core/java/com/android/server/LocationManagerService.java |
| 8020 | */ |
| 8021 | message LocationManagerApiUsageReported { |
| 8022 | |
| 8023 | // Indicating if usage starts or usage ends. |
| 8024 | optional android.stats.location.UsageState state = 1; |
| 8025 | |
| 8026 | // LocationManagerService's API in use. |
| 8027 | // We can identify which API from LocationManager is |
| 8028 | // invoking current LMS API by the combination of |
| 8029 | // API parameter(e.g. is_listener_null, is_intent_null, |
| 8030 | // is_location_request_null) |
| 8031 | optional android.stats.location.LocationManagerServiceApi api_in_use = 2; |
| 8032 | |
| 8033 | // Name of the package calling the API. |
| 8034 | optional string calling_package_name = 3; |
| 8035 | |
| 8036 | // Type of the location provider. |
| 8037 | optional android.stats.location.ProviderType provider = 4; |
| 8038 | |
| 8039 | // Quality of the location request |
| 8040 | optional android.stats.location.LocationRequestQuality quality = 5; |
| 8041 | |
| 8042 | // The desired interval for active location updates, in milliseconds. |
| 8043 | // Bucketized to reduce cardinality. |
| 8044 | optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6; |
| 8045 | |
| 8046 | // Minimum distance between location updates, in meters. |
| 8047 | // Bucketized to reduce cardinality. |
| 8048 | optional android.stats.location.SmallestDisplacementBucket |
| 8049 | bucketized_smallest_displacement = 7; |
| 8050 | |
| 8051 | // The number of location updates. |
| 8052 | optional int64 num_updates = 8; |
| 8053 | |
| 8054 | // The request expiration time, in millisecond since boot. |
| 8055 | // Bucketized to reduce cardinality. |
| 8056 | optional android.stats.location.ExpirationBucket |
| 8057 | bucketized_expire_in = 9; |
| 8058 | |
| 8059 | // Type of Callback passed in for this API. |
| 8060 | optional android.stats.location.CallbackType callback_type = 10; |
| 8061 | |
| 8062 | // The radius of the central point of the alert |
| 8063 | // region, in meters. Only for API REQUEST_GEOFENCE. |
| 8064 | // Bucketized to reduce cardinality. |
| 8065 | optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11; |
| 8066 | |
| 8067 | // Activity Importance of API caller. |
| 8068 | // Categorized to 3 types that are interesting from location's perspective. |
| 8069 | optional android.stats.location.ActivityImportance activiy_importance = 12; |
| 8070 | } |
Stanislav Zholnin | 3d215df1 | 2019-06-05 16:48:20 +0100 | [diff] [blame] | 8071 | |
| 8072 | /** |
| 8073 | * Information about a permission grant or denial made by user inside ReviewPermissionsFragment |
| 8074 | */ |
| 8075 | message ReviewPermissionsFragmentResultReported { |
| 8076 | // unique value identifying a permission group change. A permission group change might result |
| 8077 | // in multiple of these atoms |
| 8078 | optional int64 change_id = 1; |
| 8079 | |
| 8080 | // UID of package the permission belongs to |
| 8081 | optional int32 uid = 2 [(is_uid) = true]; |
| 8082 | |
| 8083 | // Name of package the permission belongs to |
| 8084 | optional string package_name = 3; |
| 8085 | |
| 8086 | // The permission to be granted |
| 8087 | optional string permission_name = 4; |
| 8088 | |
| 8089 | // The result of the permission grant |
| 8090 | optional bool permission_granted = 5; |
| 8091 | } |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 8092 | |
| 8093 | /** |
| 8094 | * Information about results of permission upgrade by RuntimePermissionsUpgradeController |
| 8095 | * Logged from: RuntimePermissionUpdgradeController |
| 8096 | */ |
| 8097 | message RuntimePermissionsUpgradeResult { |
| 8098 | // Permission granted as result of upgrade |
| 8099 | optional string permission_name = 1; |
| 8100 | |
| 8101 | // UID of package granted permission |
| 8102 | optional int32 uid = 2 [(is_uid) = true]; |
| 8103 | |
| 8104 | // Name of package granted permission |
| 8105 | optional string package_name = 3; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 8106 | } |
| 8107 | |
| 8108 | /** |
| 8109 | * Information about a buttons presented in GrantPermissionsActivty and choice made by user |
| 8110 | */ |
| 8111 | message GrantPermissionsActivityButtonActions { |
| 8112 | // Permission granted as result of upgrade |
| 8113 | optional string permission_group_name = 1; |
| 8114 | |
| 8115 | // UID of package granted permission |
| 8116 | optional int32 uid = 2 [(is_uid) = true]; |
| 8117 | |
| 8118 | // Name of package requesting permission |
| 8119 | optional string package_name = 3; |
| 8120 | |
| 8121 | // Buttons presented in the dialog - bit flags, bit numbers are in accordance with |
| 8122 | // LABEL_ constants in GrantPermissionActivity.java |
| 8123 | optional int32 buttons_presented = 4; |
| 8124 | |
| 8125 | // Button clicked by user - same as bit flags in buttons_presented with only single bit set |
| 8126 | optional int32 button_clicked = 5; |
Evan Severson | 5dfc091 | 2020-02-06 14:50:23 -0800 | [diff] [blame] | 8127 | |
| 8128 | // id which identifies single session of user interacting with permission controller |
| 8129 | optional int64 session_id = 6; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 8130 | } |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 8131 | |
| 8132 | /** |
| 8133 | * Information about LocationAccessCheck notification presented to user |
| 8134 | */ |
| 8135 | message LocationAccessCheckNotificationAction { |
| 8136 | |
| 8137 | // id which identifies single session of user interacting with permission controller |
| 8138 | optional int64 session_id = 1; |
| 8139 | |
| 8140 | // Uid of package for which location access check is presented |
| 8141 | optional int32 package_uid = 2; |
| 8142 | |
| 8143 | // Name of package for which location access check is presented |
| 8144 | optional string package_name = 3; |
| 8145 | |
| 8146 | enum Result { |
| 8147 | UNDEFINED = 0; |
| 8148 | // notification was presented to the user |
| 8149 | NOTIFICATION_PRESENTED = 1; |
| 8150 | // notification was declined by the user |
| 8151 | NOTIFICATION_DECLINED = 2; |
| 8152 | // notification was clicked by the user |
| 8153 | NOTIFICATION_CLICKED = 3; |
| 8154 | } |
| 8155 | |
| 8156 | // View / interaction recorded |
| 8157 | optional Result result = 4; |
| 8158 | } |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 8159 | |
| 8160 | /** |
| 8161 | * Information about a permission grant or revoke made by user inside AppPermissionFragment |
| 8162 | */ |
| 8163 | message AppPermissionFragmentActionReported { |
| 8164 | // id which identifies single session of user interacting with permission controller |
| 8165 | optional int64 session_id = 1; |
| 8166 | |
| 8167 | // unique value identifying a permission group change. A permission group change might result |
| 8168 | // in multiple of these atoms |
| 8169 | optional int64 change_id = 2; |
| 8170 | |
| 8171 | // UID of package the permission belongs to |
| 8172 | optional int32 uid = 3 [(is_uid) = true]; |
| 8173 | |
| 8174 | // Name of package the permission belongs to |
| 8175 | optional string package_name = 4; |
| 8176 | |
| 8177 | // The permission to be granted |
| 8178 | optional string permission_name = 5; |
| 8179 | |
| 8180 | // The result of the permission grant |
| 8181 | optional bool permission_granted = 6; |
Stanislav Zholnin | 126da0c | 2020-01-28 16:50:43 +0000 | [diff] [blame] | 8182 | |
| 8183 | // State of Permission Flags after grant as per android.content.pm.PermissionFlags |
| 8184 | optional int32 permission_flags = 7; |
| 8185 | |
| 8186 | enum Button { |
| 8187 | UNDEFINED = 0; |
| 8188 | // Allow button |
| 8189 | ALLOW = 1; |
| 8190 | // Deny button |
| 8191 | DENY = 2; |
| 8192 | // Ask every time button |
| 8193 | ASK_EVERY_TIME = 3; |
| 8194 | // Allow all the time button |
| 8195 | ALLOW_ALWAYS = 4; |
| 8196 | // Allow only while using the app button |
| 8197 | ALLOW_FOREGROUND = 5; |
| 8198 | // Same is Deny button but shown in while in use dialog |
| 8199 | DENY_FOREGROUND = 6; |
| 8200 | } |
| 8201 | |
| 8202 | // Button pressed in the dialog |
| 8203 | optional Button button_pressed = 8; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 8204 | } |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 8205 | |
| 8206 | /** |
| 8207 | * Information about a AppPermissionFragment viewed by user |
| 8208 | */ |
| 8209 | message AppPermissionFragmentViewed { |
| 8210 | // id which identifies single session of user interacting with permission controller |
| 8211 | optional int64 session_id = 1; |
| 8212 | |
| 8213 | // UID of package for which permissions are viewed |
| 8214 | optional int32 uid = 2 [(is_uid) = true]; |
| 8215 | |
| 8216 | // Name of package for which permissions are viewed |
| 8217 | optional string package_name = 3; |
| 8218 | |
| 8219 | // Permission group viewed |
| 8220 | optional string permission_group_name = 4; |
| 8221 | } |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 8222 | |
| 8223 | /** |
Nate Myren | e8f912bb | 2020-04-30 10:41:38 -0700 | [diff] [blame] | 8224 | * Information about a AppPermissionGroupsFragment viewed by user. Fragment has been renamed, but |
| 8225 | * the log retains the old fragment name. |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 8226 | */ |
| 8227 | message AppPermissionsFragmentViewed { |
| 8228 | // id which identifies single session of user interacting with permission controller |
| 8229 | optional int64 session_id = 1; |
| 8230 | |
| 8231 | // id which identifies single view as every view might have several logging records |
| 8232 | // with different package information attached |
| 8233 | optional int64 view_id = 2; |
| 8234 | |
| 8235 | // Permission group viewed |
| 8236 | optional string permission_group_name = 3; |
| 8237 | |
| 8238 | // UID of package for which permissions are viewed |
| 8239 | optional int32 uid = 4 [(is_uid) = true]; |
| 8240 | |
| 8241 | // Name of package for which permissions are viewed |
| 8242 | optional string package_name = 5; |
| 8243 | |
| 8244 | // Category in which permission is included |
| 8245 | enum Category { |
| 8246 | UNDEFINED = 0; |
| 8247 | ALLOWED = 1; |
| 8248 | ALLOWED_FOREGROUND = 2; |
| 8249 | DENIED = 3; |
| 8250 | } |
| 8251 | optional Category category = 6; |
| 8252 | } |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 8253 | /** |
| 8254 | * Information about a PermissionAppsFragment viewed by user. |
| 8255 | * Logged from ui/handheld/PermissionAppsFragment.java |
| 8256 | */ |
| 8257 | message PermissionAppsFragmentViewed { |
| 8258 | // id which identifies single session of user interacting with permission controller |
| 8259 | optional int64 session_id = 1; |
| 8260 | |
| 8261 | // id which identifies single view as every view might have several logging records |
| 8262 | // with different package information attached |
| 8263 | optional int64 view_id = 2; |
| 8264 | |
| 8265 | // Permission group viewed |
| 8266 | optional string permission_group_name = 3; |
| 8267 | |
| 8268 | // UID of package for which permissions are viewed |
| 8269 | optional int32 uid = 4 [(is_uid) = true]; |
| 8270 | |
| 8271 | // Name of package for which permissions are viewed |
| 8272 | optional string package_name = 5; |
| 8273 | |
| 8274 | // Category in which app is included |
| 8275 | enum Category { |
| 8276 | UNDEFINED = 0; |
| 8277 | ALLOWED = 1; |
| 8278 | ALLOWED_FOREGROUND = 2; |
| 8279 | DENIED = 3; |
| 8280 | } |
| 8281 | optional Category category = 6; |
| 8282 | } |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 8283 | |
| 8284 | /** |
Nate Myren | e8f912bb | 2020-04-30 10:41:38 -0700 | [diff] [blame] | 8285 | * Log that the Auto Revoke notification has been clicked |
| 8286 | * Logged from ui/ManagePermissionsActivity |
| 8287 | */ |
| 8288 | message AutoRevokeNotificationClicked { |
| 8289 | // id which identifies single session of user interacting with permission controller |
| 8290 | optional int64 session_id = 1; |
| 8291 | } |
| 8292 | |
| 8293 | /** |
| 8294 | * Log that an app has been displayed on the auto revoke page, and lists one permission that was |
| 8295 | * auto revoked for it. |
| 8296 | * Logged from ui/handheld/AutoRevokeFragment |
| 8297 | */ |
| 8298 | message AutoRevokeFragmentAppViewed { |
| 8299 | // id which identifies single session of user interacting with permission controller |
| 8300 | optional int64 session_id = 1; |
| 8301 | |
| 8302 | // UID of package for which permissions are viewed |
| 8303 | optional int32 uid = 2 [(is_uid) = true]; |
| 8304 | |
| 8305 | // Name of package for which permissions are viewed |
| 8306 | optional string package_name = 3; |
| 8307 | |
| 8308 | // The name of a permission group that has been revoked |
| 8309 | optional string permission_group_name = 4; |
| 8310 | |
| 8311 | // The age of the app- more than three months old, or more than six months |
| 8312 | enum Age { |
| 8313 | UNDEFINED = 0; |
| 8314 | NEWER_BUCKET = 1; |
| 8315 | OLDER_BUCKET = 2; |
| 8316 | } |
| 8317 | |
| 8318 | // How long the app has been unused. Currently, newer bucket is 3 months, older is 6 months |
| 8319 | optional Age age = 5; |
| 8320 | } |
| 8321 | |
| 8322 | /** |
| 8323 | * Log that the user has interacted with an app on the auto revoke fragment |
| 8324 | * Logged from ui/handheld/AutoRevokeFragment |
| 8325 | */ |
| 8326 | message AutoRevokedAppInteraction { |
| 8327 | // id which identifies single session of user interacting with permission controller |
| 8328 | optional int64 session_id = 1; |
| 8329 | |
| 8330 | // UID of package for which permissions are viewed |
| 8331 | optional int32 uid = 2 [(is_uid) = true]; |
| 8332 | |
| 8333 | // Name of package for which permissions are viewed |
| 8334 | optional string package_name = 3; |
| 8335 | |
| 8336 | enum Action { |
| 8337 | UNDEFINED = 0; |
| 8338 | REMOVE = 1; |
| 8339 | OPEN = 2; |
| 8340 | APP_INFO = 3; |
| 8341 | PERMISSIONS = 4; |
| 8342 | REMOVE_IN_SETTINGS = 5; |
| 8343 | OPEN_IN_SETTINGS = 6; |
| 8344 | } |
| 8345 | |
| 8346 | // The action the user took to interact with the app |
| 8347 | optional Action action = 4; |
| 8348 | } |
| 8349 | |
| 8350 | /** |
| 8351 | * Log that the AppPermissionGroupsFragment has been interacted with for the possible purposes of |
| 8352 | * auto revoke, or that the auto revoke switch has been changed |
| 8353 | * Logged from ui/handheld/AppPermissionGroupsFragment |
| 8354 | */ |
| 8355 | message AppPermissionGroupsFragmentAutoRevokeAction { |
| 8356 | // id which identifies single session of user interacting with permission controller |
| 8357 | optional int64 session_id = 1; |
| 8358 | |
| 8359 | // UID of package for which permissions are viewed |
| 8360 | optional int32 uid = 2 [(is_uid) = true]; |
| 8361 | |
| 8362 | // Name of package for which permissions are viewed |
| 8363 | optional string package_name = 3; |
| 8364 | |
| 8365 | enum Action { |
| 8366 | UNDEFINED = 0; |
| 8367 | OPENED_FOR_AUTO_REVOKE = 1; |
| 8368 | OPENED_FROM_INTENT = 2; |
| 8369 | SWITCH_ENABLED = 3; |
| 8370 | SWITCH_DISABLED = 4; |
| 8371 | } |
| 8372 | |
| 8373 | // The action the user took to interact with the fragment |
| 8374 | optional Action action = 4; |
| 8375 | } |
| 8376 | |
| 8377 | /** |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 8378 | * Logs when there is a smart selection related event. |
| 8379 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 8380 | * Logged from: TextClassifierEventLogger.java |
| 8381 | */ |
| 8382 | message TextSelectionEvent { |
| 8383 | // A session ID. |
| 8384 | optional string session_id = 1; |
| 8385 | |
| 8386 | // Event type of this event. |
| 8387 | optional android.stats.textclassifier.EventType event_type = 2; |
| 8388 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 8389 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 8390 | optional string model_name = 3; |
| 8391 | |
| 8392 | // Type of widget that was involved in triggering this event. |
| 8393 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 8394 | |
| 8395 | // Index of this event in a session. |
| 8396 | optional int32 event_index = 5; |
| 8397 | |
| 8398 | // Entity type that is involved. |
| 8399 | optional string entity_type = 6; |
| 8400 | |
| 8401 | // Relative word index of the start of the selection. |
| 8402 | optional int32 relative_word_start_index = 7; |
| 8403 | |
| 8404 | // Relative word (exclusive) index of the end of the selection. |
| 8405 | optional int32 relative_word_end_index = 8; |
| 8406 | |
| 8407 | // Relative word index of the start of the smart selection. |
| 8408 | optional int32 relative_suggested_word_start_index = 9; |
| 8409 | |
| 8410 | // Relative word (exclusive) index of the end of the smart selection. |
| 8411 | optional int32 relative_suggested_word_end_index = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 8412 | |
| 8413 | // Name of source package. |
| 8414 | optional string package_name = 11; |
Tony Mak | 2c00495 | 2020-03-27 17:16:47 +0000 | [diff] [blame] | 8415 | |
| 8416 | // Name of the LangID model that is involved in this event. |
| 8417 | optional string langid_model_name = 12; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 8418 | } |
| 8419 | |
| 8420 | /** |
| 8421 | * Logs when there is a smart linkify related event. |
| 8422 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 8423 | * Logged from: TextClassifierEventLogger.java |
| 8424 | */ |
| 8425 | message TextLinkifyEvent { |
| 8426 | // A session ID. |
| 8427 | optional string session_id = 1; |
| 8428 | |
| 8429 | // Event type of this event. |
| 8430 | optional android.stats.textclassifier.EventType event_type = 2; |
| 8431 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 8432 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 8433 | optional string model_name = 3; |
| 8434 | |
| 8435 | // Type of widget that was involved in triggering this event. |
| 8436 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 8437 | |
| 8438 | // Index of this event in a session. |
| 8439 | optional int32 event_index = 5; |
| 8440 | |
| 8441 | // Entity type that is involved. |
| 8442 | optional string entity_type = 6; |
| 8443 | |
| 8444 | // Number of links detected. |
| 8445 | optional int32 num_links = 7; |
| 8446 | |
| 8447 | // The total length of all links. |
| 8448 | optional int32 linked_text_length = 8; |
| 8449 | |
| 8450 | // Length of input text. |
| 8451 | optional int32 text_length = 9; |
| 8452 | |
| 8453 | // Time spent on generating links in ms. |
| 8454 | optional int64 latency_millis = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 8455 | |
| 8456 | // Name of source package. |
| 8457 | optional string package_name = 11; |
Tony Mak | 2c00495 | 2020-03-27 17:16:47 +0000 | [diff] [blame] | 8458 | |
| 8459 | // Name of the LangID model that is involved in this event. |
| 8460 | optional string langid_model_name = 12; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 8461 | } |
| 8462 | |
| 8463 | /** |
| 8464 | * Logs when there is a conversation actions related event. |
| 8465 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 8466 | * Logged from: TextClassifierEventLogger.java |
| 8467 | */ |
| 8468 | message ConversationActionsEvent { |
| 8469 | // A session ID. |
| 8470 | optional string session_id = 1; |
| 8471 | |
| 8472 | // Event type of this event. |
| 8473 | optional android.stats.textclassifier.EventType event_type = 2; |
| 8474 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 8475 | // Name of the actions model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 8476 | optional string model_name = 3; |
| 8477 | |
| 8478 | // Type of widget that was involved in triggering this event. |
| 8479 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 8480 | |
| 8481 | // The first entity type that is involved. |
| 8482 | optional string first_entity_type = 5; |
| 8483 | |
| 8484 | // The second entity type that is involved. |
| 8485 | optional string second_entity_type = 6; |
| 8486 | |
| 8487 | // The third entity type that is involved. |
| 8488 | optional string third_entity_type = 7; |
| 8489 | |
| 8490 | // The score of the first entity type. |
| 8491 | optional float score = 8; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 8492 | |
| 8493 | // Name of source package. |
| 8494 | optional string package_name = 9; |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 8495 | |
| 8496 | // Name of the annotator model that is involved in this event. |
| 8497 | optional string annotator_model_name = 10; |
Tony Mak | 2c00495 | 2020-03-27 17:16:47 +0000 | [diff] [blame] | 8498 | |
| 8499 | // Name of the LangID model that is involved in this event. |
| 8500 | optional string langid_model_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 8501 | } |
| 8502 | |
| 8503 | /** |
| 8504 | * Logs when there is a language detection related event. |
| 8505 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 8506 | * Logged from: TextClassifierEventLogger.java |
| 8507 | */ |
| 8508 | message LanguageDetectionEvent { |
| 8509 | // A session ID. |
| 8510 | optional string session_id = 1; |
| 8511 | |
| 8512 | // Event type of this event. |
| 8513 | optional android.stats.textclassifier.EventType event_type = 2; |
| 8514 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 8515 | // Name of the language detection model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 8516 | optional string model_name = 3; |
| 8517 | |
| 8518 | // Type of widget that was involved in triggering this event. |
| 8519 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 8520 | |
| 8521 | // Detected language. |
| 8522 | optional string language_tag = 5; |
| 8523 | |
| 8524 | // Score of the detected language. |
| 8525 | optional float score = 6; |
| 8526 | |
| 8527 | // Position of this action. |
| 8528 | optional int32 action_index = 7; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 8529 | |
| 8530 | // Name of source package. |
| 8531 | optional string package_name = 8; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 8532 | } |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 8533 | |
| 8534 | /** |
| 8535 | * Information about an OTA update attempt by update_engine. |
| 8536 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 8537 | */ |
| 8538 | message UpdateEngineUpdateAttemptReported { |
| 8539 | // The number of attempts for the update engine to apply a given payload. |
| 8540 | optional int32 attempt_number = 1; |
| 8541 | |
| 8542 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 8543 | |
| 8544 | // The total time in minutes for the update engine to apply a given payload. |
| 8545 | // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and |
| 8546 | // it's increased when the system is sleeping. |
| 8547 | optional int32 duration_boottime_in_minutes = 3; |
| 8548 | |
| 8549 | // The total time in minutes for the update engine to apply a given payload. |
| 8550 | // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW; |
| 8551 | // and it's not increased when the system is sleeping. |
| 8552 | optional int32 duration_monotonic_in_minutes = 4; |
| 8553 | |
| 8554 | // The size of the payload in MiBs. |
| 8555 | optional int32 payload_size_mib = 5; |
| 8556 | |
| 8557 | // The attempt result reported by the update engine for an OTA update. |
| 8558 | optional android.stats.otaupdate.AttemptResult attempt_result = 6; |
| 8559 | |
| 8560 | // The error code reported by the update engine after an OTA update attempt |
| 8561 | // on A/B devices. |
| 8562 | optional android.stats.otaupdate.ErrorCode error_code = 7; |
| 8563 | |
| 8564 | // The build fingerprint of the source system. The value is read from a |
| 8565 | // system property when the device takes the update. e.g. |
| 8566 | // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys |
| 8567 | optional string source_fingerprint = 8; |
| 8568 | } |
| 8569 | |
| 8570 | /** |
| 8571 | * Information about all the attempts the device make before finishing the |
| 8572 | * successful update. |
| 8573 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 8574 | */ |
| 8575 | message UpdateEngineSuccessfulUpdateReported { |
| 8576 | // The number of attempts for the update engine to apply the payload for a |
| 8577 | // successful update. |
| 8578 | optional int32 attempt_count = 1; |
| 8579 | |
| 8580 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 8581 | |
| 8582 | optional int32 payload_size_mib = 3; |
| 8583 | |
| 8584 | // The total number of bytes downloaded by update_engine since the last |
| 8585 | // successful update. |
| 8586 | optional int32 total_bytes_downloaded_mib = 4; |
| 8587 | |
| 8588 | // The ratio in percentage of the over-downloaded bytes compared to the |
| 8589 | // total bytes needed to successfully install the update. e.g. 200 if we |
| 8590 | // download 200MiB in total for a 100MiB package. |
| 8591 | optional int32 download_overhead_percentage = 5; |
| 8592 | |
| 8593 | // The total time in minutes for the update engine to apply the payload for a |
| 8594 | // successful update. |
| 8595 | optional int32 total_duration_minutes = 6; |
| 8596 | |
| 8597 | // The number of reboot of the device during a successful update. |
| 8598 | optional int32 reboot_count = 7; |
| 8599 | } |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 8600 | |
| 8601 | /** |
Kenny Root | 4eacaaa | 2020-01-08 20:48:13 -0800 | [diff] [blame] | 8602 | * Reported when the RebootEscrow HAL has attempted to recover the escrowed |
| 8603 | * key to indicate whether it was successful or not. |
| 8604 | * |
| 8605 | * Logged from: |
| 8606 | * frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java |
| 8607 | */ |
| 8608 | message RebootEscrowRecoveryReported { |
| 8609 | optional bool successful = 1; |
| 8610 | } |
| 8611 | |
| 8612 | /** |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 8613 | * Global display pipeline metrics reported by SurfaceFlinger. |
| 8614 | * Pulled from: |
| 8615 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 8616 | */ |
| 8617 | message SurfaceflingerStatsGlobalInfo { |
| 8618 | // Total number of frames presented during the tracing period |
| 8619 | optional int64 total_frames = 1; |
| 8620 | // Total number of frames missed |
| 8621 | optional int64 missed_frames = 2; |
| 8622 | // Total number of frames that fell back to client composition |
| 8623 | optional int64 client_composition_frames = 3; |
| 8624 | // Total time the display was turned on |
| 8625 | optional int64 display_on_millis = 4; |
| 8626 | // Total time that was spent performing animations. |
| 8627 | // This is derived from the present-to-present layer histogram |
| 8628 | optional int64 animation_millis = 5; |
Alec Mouri | a262245 | 2020-02-10 17:46:50 -0800 | [diff] [blame] | 8629 | // Total number of event connections tracked by SurfaceFlinger at the time |
| 8630 | // of this pull. If this number grows prohibitively large, then this can |
| 8631 | // cause jank due to resource contention. |
| 8632 | optional int32 event_connection_count = 6; |
Alec Mouri | bb55b7f | 2020-02-12 17:35:01 -0800 | [diff] [blame] | 8633 | // Set of timings measured from when SurfaceFlinger began compositing a |
| 8634 | // frame, until the frame was requested to be presented to the display. This |
| 8635 | // measures SurfaceFlinger's total CPU walltime on the critical path per |
| 8636 | // frame. |
| 8637 | optional FrameTimingHistogram frame_duration = 7 |
| 8638 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8639 | // Set of timings measured from when SurfaceFlinger first began using the |
| 8640 | // GPU to composite a frame, until the GPU has finished compositing that |
| 8641 | // frame. This measures the total additional time SurfaceFlinger needed to |
| 8642 | // perform due to falling back into GPU composition. |
| 8643 | optional FrameTimingHistogram render_engine_timing = 8 |
| 8644 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 8645 | } |
| 8646 | |
| 8647 | /** |
| 8648 | * Per-layer display pipeline metrics reported by SurfaceFlinger. |
| 8649 | * The number of layers uploaded will be restricted due to size limitations. |
| 8650 | * Pulled from: |
| 8651 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 8652 | */ |
| 8653 | message SurfaceflingerStatsLayerInfo { |
| 8654 | // The layer for this set of metrics |
| 8655 | // For now we can infer that the package name is included in the layer |
| 8656 | // name. |
| 8657 | optional string layer_name = 1; |
| 8658 | // Total number of frames presented |
| 8659 | optional int64 total_frames = 2; |
| 8660 | // Total number of dropped frames while latching a buffer for this layer. |
| 8661 | optional int64 dropped_frames = 3; |
| 8662 | // Set of timings measured between successive presentation timestamps. |
| 8663 | optional FrameTimingHistogram present_to_present = 4 |
| 8664 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8665 | // Set of timings measured from when an app queued a buffer for |
| 8666 | // presentation, until the buffer was actually presented to the |
| 8667 | // display. |
| 8668 | optional FrameTimingHistogram post_to_present = 5 |
| 8669 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8670 | // Set of timings measured from when a buffer is ready to be presented, |
| 8671 | // until the buffer was actually presented to the display. |
| 8672 | optional FrameTimingHistogram acquire_to_present = 6 |
| 8673 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8674 | // Set of timings measured from when a buffer was latched by |
| 8675 | // SurfaceFlinger, until the buffer was presented to the display |
| 8676 | optional FrameTimingHistogram latch_to_present = 7 |
| 8677 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8678 | // Set of timings measured from the desired presentation to the actual |
| 8679 | // presentation time |
| 8680 | optional FrameTimingHistogram desired_to_present = 8 |
| 8681 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8682 | // Set of timings measured from when an app queued a buffer for |
| 8683 | // presentation, until the buffer was ready to be presented. |
| 8684 | optional FrameTimingHistogram post_to_acquire = 9 |
| 8685 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 59cdc901 | 2020-02-10 10:58:39 -0800 | [diff] [blame] | 8686 | // Frames missed latch because the acquire fence didn't fire |
| 8687 | optional int64 late_acquire_frames = 10; |
| 8688 | // Frames latched early because the desired present time was bad |
| 8689 | optional int64 bad_desired_present_frames = 11; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 8690 | } |
| 8691 | |
| 8692 | /** |
| 8693 | * Histogram of frame counts bucketed by time in milliseconds. |
| 8694 | * Because of size limitations, we hard-cap the number of buckets, with |
| 8695 | * buckets for corresponding to larger milliseconds being less precise. |
| 8696 | */ |
| 8697 | message FrameTimingHistogram { |
| 8698 | // Timings in milliseconds that describes a set of histogram buckets |
| 8699 | repeated int32 time_millis_buckets = 1; |
| 8700 | // Number of frames that match to each time_millis, i.e. the bucket |
| 8701 | // contents |
| 8702 | // It's required that len(time_millis) == len(frame_count) |
| 8703 | repeated int64 frame_counts = 2; |
| 8704 | } |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 8705 | |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 8706 | /** |
Alec Mouri | 5ac3262 | 2020-02-06 08:44:25 -0800 | [diff] [blame] | 8707 | * Janky event as reported by SurfaceFlinger. |
| 8708 | * This event is intended to be consumed by a Perfetto subscriber for |
| 8709 | * automated trace collection. |
| 8710 | * |
| 8711 | * Logged from: |
| 8712 | * frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp |
| 8713 | */ |
| 8714 | message DisplayJankReported { |
| 8715 | // Informational field for how long the janky event lasted in milliseconds |
| 8716 | optional int64 event_duration_millis = 1; |
| 8717 | // Number of frame deadlines missed, where SurfaceFlinger failed to update |
| 8718 | // the display on time. |
| 8719 | optional int32 present_deadlines_missed = 2; |
| 8720 | } |
| 8721 | |
| 8722 | /** |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 8723 | * Information about camera facing and API level usage. |
| 8724 | * Logged from: |
| 8725 | * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java |
| 8726 | */ |
| 8727 | message CameraActionEvent { |
| 8728 | // Camera session duration |
Emilian Peev | 6ea6fe9 | 2020-02-24 15:31:34 -0800 | [diff] [blame] | 8729 | optional int64 duration_millis = 1; |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 8730 | |
| 8731 | // Camera API level used |
| 8732 | optional int32 api_level = 2; |
| 8733 | |
| 8734 | // Name of client package |
| 8735 | optional string package_name = 3; |
| 8736 | |
| 8737 | // Camera facing |
| 8738 | enum Facing { |
| 8739 | UNKNOWN = 0; |
| 8740 | BACK = 1; |
| 8741 | FRONT = 2; |
| 8742 | EXTERNAL = 3; |
| 8743 | } |
| 8744 | optional Facing facing = 4; |
| 8745 | } |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 8746 | |
| 8747 | /** |
| 8748 | * Logs when a compatibility change is affecting an app. |
| 8749 | * |
| 8750 | * Logged from: |
| 8751 | * frameworks/base/core/java/android/app/AppCompatCallbacks.java and |
| 8752 | * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java |
| 8753 | */ |
| 8754 | message AppCompatibilityChangeReported { |
| 8755 | // The UID of the app being affected by the compatibilty change. |
| 8756 | optional int32 uid = 1 [(is_uid) = true]; |
| 8757 | |
| 8758 | // The ID of the change affecting the app. |
| 8759 | optional int64 change_id = 2; |
| 8760 | |
| 8761 | enum State { |
| 8762 | UNKNOWN_STATE = 0; |
| 8763 | ENABLED = 1; |
| 8764 | DISABLED = 2; |
| 8765 | LOGGED = 3; |
| 8766 | } |
| 8767 | |
| 8768 | // The state of the change - if logged from gating whether it was enabled or disabled, or just |
| 8769 | // logged otherwise. |
| 8770 | optional State state = 3; |
| 8771 | |
| 8772 | enum Source { |
| 8773 | UNKNOWN_SOURCE = 0; |
| 8774 | APP_PROCESS = 1; |
| 8775 | SYSTEM_SERVER = 2; |
| 8776 | } |
| 8777 | |
| 8778 | // Where it was logged from. |
| 8779 | optional Source source = 4; |
| 8780 | |
| 8781 | } |
Hector Dearman | 40579f6 | 2019-11-01 13:19:30 +0000 | [diff] [blame] | 8782 | |
| 8783 | /** |
| 8784 | * Logged from |
| 8785 | * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc |
| 8786 | */ |
| 8787 | message PerfettoUploaded { |
| 8788 | enum Event { |
| 8789 | PERFETTO_UNDEFINED = 0; |
| 8790 | PERFETTO_TRACE_BEGIN = 1; |
| 8791 | PERFETTO_BACKGROUND_TRACE_BEGIN = 2; |
| 8792 | PERFETTO_ON_CONNECT = 3; |
| 8793 | PERFETTO_ON_TRACING_DISABLED = 4; |
| 8794 | PERFETTO_UPLOAD_DROPBOX_BEGIN = 5; |
| 8795 | PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6; |
| 8796 | PERFETTO_UPLOAD_DROPBOX_FAILURE = 7; |
| 8797 | PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; |
| 8798 | PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9; |
| 8799 | PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; |
| 8800 | PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; |
| 8801 | PERFETTO_TRIGGER_BEGIN = 12; |
| 8802 | PERFETTO_TRIGGER_SUCCESS = 13; |
| 8803 | PERFETTO_TRIGGER_FAILURE = 14; |
| 8804 | PERFETTO_HIT_GUARDRAILS = 15; |
| 8805 | PERFETTO_ON_TIMEOUT = 16; |
| 8806 | PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; |
| 8807 | } |
| 8808 | |
| 8809 | // Which stage of the pipeline we are reporting from. |
| 8810 | optional Event event = 1; |
| 8811 | |
| 8812 | // UUID matching the one set inside the SystemInfo trace packet. |
| 8813 | optional int64 trace_uuid_lsb = 2; |
| 8814 | optional int64 trace_uuid_msb = 3; |
| 8815 | } |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 8816 | |
| 8817 | /** |
| 8818 | * Pulls client metrics on data transferred via Vehicle Maps Service. |
| 8819 | * Metrics are keyed by uid + layer. |
| 8820 | * |
| 8821 | * Pulled from: |
| 8822 | * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java |
| 8823 | */ |
| 8824 | message VmsClientStats { |
| 8825 | // UID of the VMS client app |
| 8826 | optional int32 uid = 1 [(is_uid) = true]; |
| 8827 | |
| 8828 | // VMS layer definition |
| 8829 | optional int32 layer_type = 2; |
| 8830 | optional int32 layer_channel = 3; |
| 8831 | optional int32 layer_version = 4; |
| 8832 | |
| 8833 | // Bytes and packets sent by the client for the layer |
| 8834 | optional int64 tx_bytes = 5; |
| 8835 | optional int64 tx_packets = 6; |
| 8836 | |
| 8837 | // Bytes and packets received by the client for the layer |
| 8838 | optional int64 rx_bytes = 7; |
| 8839 | optional int64 rx_packets = 8; |
| 8840 | |
| 8841 | // Bytes and packets dropped due to client error |
| 8842 | optional int64 dropped_bytes = 9; |
| 8843 | optional int64 dropped_packets = 10; |
| 8844 | } |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 8845 | |
| 8846 | /** |
| 8847 | * State of a dangerous permission requested by a package - sampled |
| 8848 | * Pulled from: StatsCompanionService.java with data obtained from PackageManager API |
| 8849 | */ |
| 8850 | message DangerousPermissionStateSampled { |
| 8851 | // Name of the permission |
| 8852 | optional string permission_name = 1; |
| 8853 | |
| 8854 | // Uid of the package |
| 8855 | optional int32 uid = 2 [(is_uid) = true]; |
| 8856 | |
| 8857 | // If the permission is granted to the uid |
| 8858 | optional bool is_granted = 3; |
| 8859 | |
| 8860 | // Permission flags as per android.content.pm.PermissionFlags |
| 8861 | optional int32 permission_flags = 4; |
| 8862 | } |
| 8863 | |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 8864 | /** |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 8865 | * HWUI stats for a given app. |
| 8866 | */ |
| 8867 | message GraphicsStats { |
| 8868 | // The package name of the app |
| 8869 | optional string package_name = 1; |
| 8870 | |
| 8871 | // The version code of the app |
| 8872 | optional int64 version_code = 2; |
| 8873 | |
| 8874 | // The start & end timestamps in UTC as |
| 8875 | // milliseconds since January 1, 1970 |
| 8876 | // Compatible with java.util.Date#setTime() |
Stan Iliev | b651719 | 2020-02-18 10:12:42 -0500 | [diff] [blame] | 8877 | optional int64 start_millis = 3; |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 8878 | |
Stan Iliev | b651719 | 2020-02-18 10:12:42 -0500 | [diff] [blame] | 8879 | optional int64 end_millis = 4; |
| 8880 | |
| 8881 | // HWUI renders pipeline type: GL (1) or Vulkan (2). |
| 8882 | enum PipelineType { |
| 8883 | UNKNOWN = 0; |
| 8884 | GL = 1; |
| 8885 | VULKAN = 2; |
| 8886 | } |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 8887 | |
| 8888 | // HWUI renders pipeline type: GL or Vulkan. |
| 8889 | optional PipelineType pipeline = 5; |
| 8890 | |
| 8891 | // Distinct frame count. |
| 8892 | optional int32 total_frames = 6; |
| 8893 | |
| 8894 | // Number of "missed vsync" events. |
| 8895 | optional int32 missed_vsync_count = 7; |
| 8896 | |
| 8897 | // Number of frames in triple-buffering scenario (high input latency) |
| 8898 | optional int32 high_input_latency_count = 8; |
| 8899 | |
| 8900 | // Number of "slow UI thread" events. |
| 8901 | optional int32 slow_ui_thread_count = 9; |
| 8902 | |
| 8903 | // Number of "slow bitmap upload" events. |
| 8904 | optional int32 slow_bitmap_upload_count = 10; |
| 8905 | |
| 8906 | // Number of "slow draw" events. |
| 8907 | optional int32 slow_draw_count = 11; |
| 8908 | |
| 8909 | // Number of frames that missed their deadline (aka, visibly janked) |
| 8910 | optional int32 missed_deadline_count = 12; |
| 8911 | |
| 8912 | // The frame time histogram for the package |
| 8913 | optional FrameTimingHistogram cpu_histogram = 13 |
| 8914 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8915 | |
| 8916 | // The gpu frame time histogram for the package |
| 8917 | optional FrameTimingHistogram gpu_histogram = 14 |
| 8918 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8919 | |
| 8920 | // UI mainline module version. |
| 8921 | optional int64 version_ui_module = 15; |
| 8922 | |
| 8923 | // If true, these are HWUI stats for up to a 24h period for a given app from today. |
| 8924 | // If false, these are HWUI stats for a 24h period for a given app from the last complete |
| 8925 | // day (yesterday). Stats from yesterday stay constant, while stats from today may change as |
| 8926 | // more apps are running / rendering. |
| 8927 | optional bool is_today = 16; |
| 8928 | } |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8929 | |
| 8930 | /** |
| 8931 | * Message related to dangerous (runtime) app ops access |
| 8932 | */ |
Stanislav Zholnin | 88c6f32 | 2020-01-29 14:48:11 +0000 | [diff] [blame] | 8933 | message RuntimeAppOpAccess { |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8934 | // Uid of the package accessing app op |
| 8935 | optional int32 uid = 1 [(is_uid) = true]; |
| 8936 | |
| 8937 | // Name of the package accessing app op |
| 8938 | optional string package_name = 2; |
| 8939 | |
Stanislav Zholnin | 3a2a6e4 | 2020-03-30 10:44:51 +0100 | [diff] [blame] | 8940 | // deprecated - set to empty string |
| 8941 | optional string op_deprecated = 3 [deprecated = true]; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8942 | |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 8943 | // attribution_tag; provided by developer when accessing related API, limited at 50 chars by |
Stanislav Zholnin | 3a2a6e4 | 2020-03-30 10:44:51 +0100 | [diff] [blame] | 8944 | // API. Attributions must be provided through manifest using <attribution> tag available in R |
| 8945 | // and above. |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 8946 | optional string attribution_tag = 4; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8947 | |
| 8948 | // message related to app op access, limited to 600 chars by API |
| 8949 | optional string message = 5; |
| 8950 | |
| 8951 | enum SamplingStrategy { |
| 8952 | DEFAULT = 0; |
| 8953 | UNIFORM = 1; |
| 8954 | RARELY_USED = 2; |
Stanislav Zholnin | 4c32385 | 2020-03-04 18:03:24 +0000 | [diff] [blame] | 8955 | BOOT_TIME_SAMPLING = 3; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8956 | } |
| 8957 | |
| 8958 | // sampling strategy used to collect this message |
| 8959 | optional SamplingStrategy sampling_strategy = 6; |
Stanislav Zholnin | 3a2a6e4 | 2020-03-30 10:44:51 +0100 | [diff] [blame] | 8960 | |
| 8961 | // operation id |
| 8962 | optional android.app.AppOpEnum op = 7 [default = APP_OP_NONE]; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8963 | } |
| 8964 | |
Nikita Ioffe | 41dd57e | 2020-01-10 16:05:08 +0000 | [diff] [blame] | 8965 | /* |
| 8966 | * Logs userspace reboot outcome and duration. |
| 8967 | * |
| 8968 | * Logged from: |
| 8969 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 8970 | */ |
| 8971 | message UserspaceRebootReported { |
| 8972 | // Possible outcomes of userspace reboot. |
| 8973 | enum Outcome { |
| 8974 | // Default value in case platform failed to determine the outcome. |
| 8975 | OUTCOME_UNKNOWN = 0; |
| 8976 | // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot). |
| 8977 | SUCCESS = 1; |
| 8978 | // Userspace reboot shutdown sequence was aborted. |
| 8979 | FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2; |
| 8980 | // Remounting userdata into checkpointing mode failed. |
| 8981 | FAILED_USERDATA_REMOUNT = 3; |
| 8982 | // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard |
| 8983 | // reboot. |
| 8984 | FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4; |
| 8985 | } |
| 8986 | // Outcome of userspace reboot. Always set. |
| 8987 | optional Outcome outcome = 1; |
| 8988 | // Duration of userspace reboot in case it has a successful outcome. |
| 8989 | // Duration is measured as time between userspace reboot was initiated and until boot completed |
| 8990 | // (e.g. sys.boot_completed=1). |
| 8991 | optional int64 duration_millis = 2; |
| 8992 | // State of primary user's (user0) credential encryption storage. |
| 8993 | enum UserEncryptionState { |
| 8994 | // Default value. |
| 8995 | USER_ENCRYPTION_STATE_UNKNOWN = 0; |
| 8996 | // Credential encrypted storage is unlocked. |
| 8997 | UNLOCKED = 1; |
| 8998 | // Credential encrypted storage is locked. |
| 8999 | LOCKED = 2; |
| 9000 | } |
| 9001 | // State of primary user's encryption storage at the moment boot completed. Always set. |
| 9002 | optional UserEncryptionState user_encryption_state = 3; |
| 9003 | } |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 9004 | |
| 9005 | /* |
| 9006 | * Logs integrity check information during each install. |
| 9007 | * |
| 9008 | * Logged from: |
| 9009 | * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java |
| 9010 | */ |
| 9011 | message IntegrityCheckResultReported { |
| 9012 | optional string package_name = 1; |
| 9013 | optional string app_certificate_hash = 2; |
Omer Nebil Yaveroglu | 0ade854 | 2020-01-24 12:47:46 +0000 | [diff] [blame] | 9014 | optional int64 version_code = 3; |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 9015 | optional string installer_package_name = 4; |
| 9016 | enum Response { |
| 9017 | UNKNOWN = 0; |
| 9018 | ALLOWED = 1; |
| 9019 | REJECTED = 2; |
| 9020 | FORCE_ALLOWED = 3; |
| 9021 | } |
| 9022 | optional Response response = 5; |
| 9023 | // An estimate on the cause of the response. This will only be populated for |
| 9024 | // REJECTED and FORCE_ALLOWED |
| 9025 | optional bool caused_by_app_cert_rule = 6; |
| 9026 | optional bool caused_by_installer_rule = 7; |
| 9027 | } |
| 9028 | |
| 9029 | /** |
| 9030 | * Logs the information about the rules and the provider whenever rules are |
| 9031 | * pushed into AppIntegrityManager. |
| 9032 | * |
| 9033 | * Logged from: |
| 9034 | * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java |
| 9035 | */ |
| 9036 | message IntegrityRulesPushed { |
| 9037 | optional bool success = 1; |
| 9038 | // Package name of the app that pushed the rules. |
| 9039 | optional string rule_provider = 2; |
| 9040 | // Version string of arbitrary format provided by the rule provider to |
| 9041 | // identify the rules. |
| 9042 | optional string rule_version = 3; |
| 9043 | } |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9044 | |
| 9045 | /** |
| 9046 | * Logs when a cell broadcast message is received on the device. |
| 9047 | * |
| 9048 | * Logged from CellBroadcastService module: |
| 9049 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
| 9050 | */ |
| 9051 | message CellBroadcastMessageReported { |
| 9052 | // The type of Cell Broadcast message |
| 9053 | enum CbType { |
| 9054 | UNKNOWN_TYPE = 0; |
| 9055 | GSM = 1; |
| 9056 | CDMA = 2; |
| 9057 | CDMA_SPC = 3; |
| 9058 | } |
| 9059 | |
| 9060 | // GSM, CDMA, CDMA-SCP |
| 9061 | optional CbType type = 1; |
| 9062 | } |
| 9063 | |
| 9064 | /** |
| 9065 | * Logs when an error occurs while handling a cell broadcast message; |
| 9066 | * |
| 9067 | * Logged from CellBroadcastService module: |
| 9068 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
| 9069 | */ |
| 9070 | message CellBroadcastMessageError { |
| 9071 | // The type of error raised when trying to handle a cell broadcast message |
| 9072 | enum ErrorType { |
| 9073 | UNKNOWN_TYPE = 0; |
| 9074 | CDMA_DECODING_ERROR = 1; |
| 9075 | CDMA_SCP_EMPTY = 2; |
| 9076 | CDMA_SCP_HANDLING_ERROR = 3; |
| 9077 | GSM_INVALID_HEADER_LENGTH = 4; |
| 9078 | GSM_UNSUPPORTED_HEADER_MESSAGE_TYPE = 5; |
| 9079 | GSM_UNSUPPORTED_HEADER_DATA_CODING_SCHEME = 6; |
| 9080 | GSM_INVALID_PDU = 7; |
| 9081 | GSM_INVALID_GEO_FENCING_DATA = 8; |
| 9082 | GSM_UMTS_INVALID_WAC = 9; |
| 9083 | FAILED_TO_INSERT_TO_DB = 10; |
| 9084 | UNEXPECTED_GEOMETRY_FROM_FWK = 11; |
| 9085 | UNEXPECTED_GSM_MESSAGE_TYPE_FROM_FWK = 12; |
| 9086 | UNEXPECTED_CDMA_MESSAGE_TYPE_FROM_FWK = 13; |
| 9087 | UNEXPECTED_CDMA_SCP_MESSAGE_TYPE_FROM_FWK = 14; |
| 9088 | } |
| 9089 | |
| 9090 | // What kind of error occurred |
| 9091 | optional ErrorType type = 1; |
| 9092 | |
| 9093 | // Exception message (or log message) associated with the error (max 1000 chars) |
| 9094 | optional string exception_message = 2; |
| 9095 | } |
Anton Hansson | 5a48e4b | 2020-02-06 14:50:35 +0000 | [diff] [blame] | 9096 | |
| 9097 | /** |
| 9098 | * Logs when the SDK Extensions test app has polled the current version. |
| 9099 | * This is atom ID 354. |
| 9100 | * |
| 9101 | * Logged from: |
| 9102 | * vendor/google_testing/integration/packages/apps/SdkExtensionsTestApp/ |
| 9103 | */ |
| 9104 | message SdkExtensionStatus { |
| 9105 | enum ApiCallStatus { |
| 9106 | CALL_NOT_ATTEMPTED = 0; |
| 9107 | CALL_SUCCESSFUL = 1; |
| 9108 | CALL_FAILED = 2; |
| 9109 | } |
| 9110 | |
| 9111 | optional ApiCallStatus result = 1; |
| 9112 | |
| 9113 | // The R extension version, i.e. android.os.ext.SdkExtension.getExtensionVersion(R). |
| 9114 | optional int32 r_extension_version = 2; |
| 9115 | |
| 9116 | // A number identifying which particular symbol's call failed, if any. 0 means no missing symbol. |
| 9117 | // "Failed" here can mean a symbol that wasn't meant to be visible was, or the other way around. |
| 9118 | optional int32 failed_call_symbol = 3; |
| 9119 | } |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 9120 | |
| 9121 | /** |
| 9122 | * Logs when an app is frozen or unfrozen. |
| 9123 | * |
| 9124 | * Logged from: |
| 9125 | * frameworks/base/services/core/java/com/android/server/am/CachedAppOptimizer.java |
| 9126 | */ |
| 9127 | message AppFreezeChanged { |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 9128 | // The type of event. |
| 9129 | enum Action { |
| 9130 | UNKNOWN = 0; |
| 9131 | FREEZE_APP = 1; |
| 9132 | UNFREEZE_APP = 2; |
| 9133 | } |
| 9134 | optional Action action = 1; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 9135 | |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 9136 | // Pid of the process being frozen. |
| 9137 | optional int32 pid = 2; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 9138 | |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 9139 | // Name of the process being frozen. |
| 9140 | optional string process_name = 3; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 9141 | |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 9142 | // Time since last unfrozen. |
| 9143 | optional int64 time_unfrozen_millis = 4; |
| 9144 | } |
| 9145 | |
| 9146 | /** |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 9147 | * Pulls information for a single voice call. |
| 9148 | * |
| 9149 | * Each pull creates multiple atoms, one for each call. The sequence is randomized when pulled. |
| 9150 | * |
| 9151 | * Pulled from: |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 9152 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 9153 | */ |
| 9154 | message VoiceCallSession { |
| 9155 | // Bearer (IMS or CS) when the call started. |
| 9156 | optional android.telephony.CallBearerEnum bearer_at_start = 1; |
| 9157 | |
| 9158 | // Bearer (IMS or CS) when the call ended. |
| 9159 | // The bearer may change during the call, e.g. due to SRVCC. |
| 9160 | optional android.telephony.CallBearerEnum bearer_at_end = 2; |
| 9161 | |
| 9162 | // Direction of the call (incoming or outgoing). |
| 9163 | optional android.telephony.CallDirectionEnum direction = 3; |
| 9164 | |
| 9165 | // Time spent setting up the call. |
| 9166 | optional android.telephony.CallSetupDurationEnum setup_duration = 4; |
| 9167 | |
| 9168 | // Whether the call ended before the setup was completed. |
| 9169 | optional bool setup_failed = 5; |
| 9170 | |
| 9171 | // IMS reason code or CS disconnect cause. |
| 9172 | // For IMS, see: frameworks/base/telephony/java/android/telephony/ims/ImsReasonInfo.java |
| 9173 | // For CS, see: frameworks/base/telephony/java/android/telephony/DisconnectCause.java |
| 9174 | optional int32 disconnect_reason_code = 6; |
| 9175 | |
| 9176 | // IMS extra code or CS precise disconnect cause. |
| 9177 | // For IMS, this code is vendor-specific |
| 9178 | // For CS, see: frameworks/base/telephony/java/android/telephony/PreciseDisconnectCause.java |
| 9179 | optional int32 disconnect_extra_code = 7; |
| 9180 | |
| 9181 | // IMS extra message or CS vendor cause. |
| 9182 | optional string disconnect_extra_message = 8; |
| 9183 | |
| 9184 | // Radio access technology (RAT) used when call started. |
| 9185 | optional android.telephony.NetworkTypeEnum rat_at_start = 9; |
| 9186 | |
| 9187 | // Radio access technology (RAT) used when call terminated. |
| 9188 | optional android.telephony.NetworkTypeEnum rat_at_end = 10; |
| 9189 | |
| 9190 | // Number of times RAT changed during the call. |
| 9191 | optional int64 rat_switch_count = 11; |
| 9192 | |
| 9193 | // A bitmask of all codecs used during the call. |
| 9194 | // See: frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/VoiceCallSessionStats.java |
| 9195 | optional int64 codec_bitmask = 12; |
| 9196 | |
| 9197 | // Number of other calls going on during call setup, for the same SIM slot. |
| 9198 | optional int32 concurrent_call_count_at_start = 13; |
| 9199 | |
| 9200 | // Number of other calls going on during call termination, for the same SIM slot. |
| 9201 | optional int32 concurrent_call_count_at_end = 14; |
| 9202 | |
| 9203 | // Index of the SIM is used, 0 for single-SIM devices. |
| 9204 | optional int32 sim_slot_index = 15; |
| 9205 | |
| 9206 | // Whether the device was in multi-SIM mode (with multiple active SIM profiles). |
| 9207 | optional bool is_multi_sim = 16; |
| 9208 | |
| 9209 | // Whether the call was made with an eSIM profile. |
| 9210 | optional bool is_esim = 17; |
| 9211 | |
| 9212 | // Carrier ID of the SIM card. |
| 9213 | // See https://source.android.com/devices/tech/config/carrierid. |
| 9214 | optional int32 carrier_id = 18; |
| 9215 | |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 9216 | // Whether an SRVCC has been completed successfully for this call. |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 9217 | optional bool srvcc_completed = 19; |
| 9218 | |
| 9219 | // Number of SRVCC failures. |
| 9220 | optional int64 srvcc_failure_count = 20; |
| 9221 | |
| 9222 | // Number of SRVCC cancellations. |
| 9223 | optional int64 srvcc_cancellation_count = 21; |
| 9224 | |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 9225 | // Whether the Real-Time Text (RTT) was ever used in the call (rather than whether RTT was |
| 9226 | // enabled in the dialer's settings). |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 9227 | optional bool rtt_enabled = 22; |
| 9228 | |
| 9229 | // Whether this was an emergency call. |
| 9230 | optional bool is_emergency = 23; |
| 9231 | |
| 9232 | // Whether the call was performed while roaming. |
| 9233 | optional bool is_roaming = 24; |
Chi Zhang | 8bf81df | 2020-05-01 11:23:28 -0700 | [diff] [blame] | 9234 | |
| 9235 | // A random number used as the dimension field to pull multiple atoms. |
| 9236 | optional int32 dimension = 25; |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 9237 | } |
| 9238 | |
| 9239 | /** |
| 9240 | * Pulls voice call radio access technology (RAT) usage. |
| 9241 | * |
| 9242 | * Each pull creates multiple atoms, one for each carrier/RAT, the order of which is irrelevant to |
| 9243 | * time. The atom will be skipped if not enough data is available. |
| 9244 | * |
| 9245 | * Pulled from: |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 9246 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 9247 | */ |
| 9248 | message VoiceCallRatUsage { |
| 9249 | // Carrier ID (https://source.android.com/devices/tech/config/carrierid). |
| 9250 | optional int32 carrier_id = 1; |
| 9251 | |
| 9252 | // Radio access technology. |
| 9253 | optional android.telephony.NetworkTypeEnum rat = 2; |
| 9254 | |
| 9255 | // Total duration that voice calls spent on this carrier and RAT. |
| 9256 | optional int64 total_duration_seconds = 3; |
| 9257 | |
| 9258 | // Total number of calls using this carrier and RAT. |
| 9259 | // A call is counted once even if it used the RAT multiple times. |
| 9260 | optional int64 call_count = 4; |
| 9261 | } |
| 9262 | |
| 9263 | /** |
| 9264 | * Pulls the number of active SIM slots and SIMs/eSIM profiles. |
| 9265 | * |
| 9266 | * Pulled from: |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 9267 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 9268 | */ |
| 9269 | message SimSlotState { |
| 9270 | // Number of active SIM slots (both physical and eSIM profiles) in the device. |
| 9271 | optional int32 active_slot_count = 1; |
| 9272 | |
| 9273 | // Number of SIM cards (both physical and active eSIM profiles). |
| 9274 | // This number is always equal to or less than the number of active SIM slots. |
| 9275 | optional int32 sim_count = 2; |
| 9276 | |
| 9277 | // Number of active eSIM profiles. |
| 9278 | // This number is always equal to or less than the number of SIMs. |
| 9279 | optional int32 esim_count = 3; |
| 9280 | } |
| 9281 | |
| 9282 | /** |
| 9283 | * Pulls supported cellular radio access technologies. |
| 9284 | * |
| 9285 | * This atom reports the capabilities of the device, rather than the network it has access to. |
| 9286 | * |
| 9287 | * Pulled from: |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 9288 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 9289 | */ |
| 9290 | message SupportedRadioAccessFamily { |
| 9291 | // A bitmask of supported radio technologies. |
| 9292 | // See android.telephony.TelephonyManager.NetworkTypeBitMask. |
| 9293 | optional int64 network_type_bitmask = 1; |
| 9294 | } |
| 9295 | |
| 9296 | /** |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 9297 | * Logs gnss stats from location service provider |
| 9298 | * |
| 9299 | * Pulled from: |
| 9300 | * frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 9301 | */ |
| 9302 | |
| 9303 | message GnssStats { |
| 9304 | // Number of location reports since boot |
| 9305 | optional int64 location_reports = 1; |
| 9306 | |
| 9307 | // Total pulled reports of Location failures since boot |
| 9308 | optional int64 location_failure_reports = 2; |
| 9309 | |
| 9310 | // Number of time to first fix reports since boot |
| 9311 | optional int64 time_to_first_fix_reports = 3; |
| 9312 | |
| 9313 | // Total pulled reported time to first fix (in milli-seconds) since boot |
| 9314 | optional int64 time_to_first_fix_milli_s = 4; |
| 9315 | |
| 9316 | // Number of position accuracy reports since boot |
| 9317 | optional int64 position_accuracy_reports = 5; |
| 9318 | |
| 9319 | // Total pulled reported position accuracy (in meters) since boot |
| 9320 | optional int64 position_accuracy_meters = 6; |
| 9321 | |
| 9322 | // Number of top 4 average CN0 reports since boot |
| 9323 | optional int64 top_four_average_cn0_reports = 7; |
| 9324 | |
| 9325 | // Total pulled reported of top 4 average CN0 (dB-mHz) since boot |
| 9326 | optional int64 top_four_average_cn0_db_mhz = 8; |
| 9327 | |
| 9328 | // Number of l5 top 4 average CN0 reports since boot |
| 9329 | optional int64 l5_top_four_average_cn0_reports = 9; |
| 9330 | |
| 9331 | // Total pulled reported of l5 top 4 average CN0 (dB-mHz) since boot |
| 9332 | optional int64 l5_top_four_average_cn0_db_mhz = 10; |
| 9333 | |
| 9334 | // Total number of sv status messages reports since boot |
| 9335 | optional int64 sv_status_reports = 11; |
| 9336 | |
| 9337 | // Total number of sv status messages reports, where sv is used in fix since boot |
| 9338 | optional int64 sv_status_reports_used_in_fix = 12; |
| 9339 | |
| 9340 | // Total number of L5 sv status messages reports since boot |
| 9341 | optional int64 l5_sv_status_reports = 13; |
| 9342 | |
| 9343 | // Total number of L5 sv status messages reports, where sv is used in fix since boot |
| 9344 | optional int64 l5_sv_status_reports_used_in_fix = 14; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 9345 | } |
Kweku Adams | 1275213 | 2020-02-18 15:36:48 -0800 | [diff] [blame] | 9346 | |
| 9347 | /** |
| 9348 | * Logs when an app is moved to a different standby bucket. |
| 9349 | * |
| 9350 | * Logged from: |
| 9351 | * frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/AppIdleHistory.java |
| 9352 | */ |
| 9353 | message AppStandbyBucketChanged { |
| 9354 | optional string package_name = 1; |
| 9355 | |
| 9356 | // Should be 0, 10, 11, 12, etc. where 0 is the owner. See UserHandle for more documentation. |
| 9357 | optional int32 user_id = 2; |
| 9358 | |
| 9359 | // These enum values match the constants defined in UsageStatsManager.java. |
| 9360 | enum Bucket { |
| 9361 | BUCKET_UNKNOWN = 0; |
| 9362 | BUCKET_EXEMPTED = 5; |
| 9363 | BUCKET_ACTIVE = 10; |
| 9364 | BUCKET_WORKING_SET = 20; |
| 9365 | BUCKET_FREQUENT = 30; |
| 9366 | BUCKET_RARE = 40; |
| 9367 | BUCKET_RESTRICTED = 45; |
| 9368 | BUCKET_NEVER = 50; |
| 9369 | } |
| 9370 | optional Bucket bucket = 3; |
| 9371 | |
| 9372 | enum MainReason { |
| 9373 | MAIN_UNKNOWN = 0; |
| 9374 | MAIN_DEFAULT = 0x0100; |
| 9375 | MAIN_TIMEOUT = 0x0200; |
| 9376 | MAIN_USAGE = 0x0300; |
| 9377 | MAIN_FORCED_BY_USER = 0x0400; |
| 9378 | MAIN_PREDICTED = 0x0500; |
| 9379 | MAIN_FORCED_BY_SYSTEM = 0x0600; |
| 9380 | } |
| 9381 | optional MainReason main_reason = 4; |
| 9382 | |
| 9383 | // A more detailed reason for the standby bucket change. The sub reason name is dependent on |
| 9384 | // the main reason. Values are one of the REASON_SUB_XXX constants defined in |
| 9385 | // UsageStatsManager.java. |
| 9386 | optional int32 sub_reason = 5; |
| 9387 | } |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 9388 | |
| 9389 | /** |
| 9390 | * Reports a started sharesheet transaction. |
| 9391 | * |
| 9392 | * Logged from: |
| 9393 | * frameworks/base/core/java/com/android/internal/app/ChooserActivity.java |
| 9394 | */ |
| 9395 | message SharesheetStarted { |
| 9396 | // The event_id (as for UiEventReported). |
| 9397 | optional int32 event_id = 1; |
| 9398 | // The calling app's package name. |
| 9399 | optional string package_name = 2; |
| 9400 | // An identifier to tie together multiple logs relating to the same share event |
| 9401 | optional int32 instance_id = 3; |
| 9402 | // The mime type of the share |
| 9403 | optional string mime_type = 4; |
| 9404 | // The number of direct targets the calling app is providing that will be shown. |
| 9405 | optional int32 num_app_provided_direct_targets = 5; |
| 9406 | // The number of app targets the calling app is providing that will be shown. |
| 9407 | optional int32 num_app_provided_app_targets = 6; |
| 9408 | // True if the share originates from the workprofile |
| 9409 | optional bool is_workprofile = 7; |
| 9410 | |
| 9411 | enum SharesheetPreviewType { // Constants from ChooserActivity.java |
Susi Kharraz-Post | 3ddadd8 | 2020-04-13 08:09:15 -0400 | [diff] [blame] | 9412 | CONTENT_PREVIEW_TYPE_UNKNOWN = 0; // Default for proto 2 / 3 compatibility. |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 9413 | CONTENT_PREVIEW_IMAGE = 1; // The preview shown in the sharesheet is an image. |
| 9414 | CONTENT_PREVIEW_FILE = 2; // The preview shown in the sharesheet is a file. |
| 9415 | CONTENT_PREVIEW_TEXT = 3; // The preview shown in the sharesheet is text. |
| 9416 | } |
| 9417 | // How the sharesheet preview is presented. |
Susi Kharraz-Post | 3ddadd8 | 2020-04-13 08:09:15 -0400 | [diff] [blame] | 9418 | optional SharesheetPreviewType preview_type = 8; |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 9419 | |
| 9420 | enum ResolverActivityIntent { // Intents handled by ResolverActivity.java |
| 9421 | INTENT_DEFAULT = 0; |
| 9422 | INTENT_ACTION_VIEW = 1; |
| 9423 | INTENT_ACTION_EDIT = 2; |
| 9424 | INTENT_ACTION_SEND = 3; |
| 9425 | INTENT_ACTION_SENDTO = 4; |
| 9426 | INTENT_ACTION_SEND_MULTIPLE = 5; |
| 9427 | INTENT_ACTION_IMAGE_CAPTURE = 6; |
| 9428 | INTENT_ACTION_MAIN = 7; |
| 9429 | } |
| 9430 | // The intent being processed (only SEND and SEND_MULTIPLE are system sharesheet) |
Susi Kharraz-Post | 3ddadd8 | 2020-04-13 08:09:15 -0400 | [diff] [blame] | 9431 | optional ResolverActivityIntent intent_type = 9; |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 9432 | } |
| 9433 | |
| 9434 | /** |
| 9435 | * Reports a ranking selection event. |
| 9436 | * |
| 9437 | * Logged from: |
| 9438 | * frameworks/base/core/java/com/android/internal/app/ChooserActivity.java (sharesheet) |
| 9439 | */ |
| 9440 | message RankingSelected { |
| 9441 | // The event_id (as for UiEventReported). |
| 9442 | optional int32 event_id = 1; |
| 9443 | // The relevant app's package name (can be source or picked package). |
| 9444 | optional string package_name = 2; |
| 9445 | // An identifier to tie together multiple logs relating to the same share event. |
| 9446 | optional int32 instance_id = 3; |
| 9447 | // Which of the ranked targets got picked, default starting position 0. |
| 9448 | optional int32 position_picked = 4; |
| 9449 | } |
Raff Tsai | ea4db18 | 2020-03-06 07:45:43 +0800 | [diff] [blame] | 9450 | |
| 9451 | /** |
Zhen Sun | 0bec8d4 | 2020-03-25 17:17:29 -0700 | [diff] [blame] | 9452 | * Logs when TvSettings UI is interacted at. |
| 9453 | * |
| 9454 | * Logged from: packages/apps/TvSettings |
| 9455 | */ |
| 9456 | message TvSettingsUIInteracted { |
| 9457 | |
| 9458 | /** The UI action category */ |
| 9459 | optional android.app.tvsettings.Action action = 1; |
| 9460 | |
| 9461 | /** The ID of the entry that the users actioned on */ |
| 9462 | optional android.app.tvsettings.ItemId item_id = 2; |
| 9463 | |
| 9464 | /** Additional information (e.g., navigation direction on page focused) */ |
| 9465 | optional string additional_info = 3; |
| 9466 | } |
| 9467 | |
| 9468 | /** |
Songchun Fan | c296cf7 | 2020-03-31 18:38:52 -0700 | [diff] [blame] | 9469 | * Logs information about a package installation using package installer V2 APIs. |
| 9470 | * |
| 9471 | * Logged from: |
| 9472 | * frameworks/base/services/core/java/com/android/server/pm/PackageInstallerSession.java |
| 9473 | */ |
| 9474 | message PackageInstallerV2Reported { |
| 9475 | // Whether this installation uses Incremental File System |
| 9476 | optional bool is_incremental = 1; |
| 9477 | // Name of the package that is intended to be installed |
| 9478 | optional string package_name = 2; |
| 9479 | // The duration between when the install was requested to when the install has completed |
| 9480 | optional int64 duration_millis = 3; |
| 9481 | // Installation result in final integer, which are SystemApi's. |
| 9482 | // Return_code 1 indicates success. |
| 9483 | // For full list, see frameworks/base/core/java/android/content/pm/PackageManager.java |
| 9484 | optional int32 return_code = 4; |
Songchun Fan | aff0dce | 2020-04-29 15:23:40 -0700 | [diff] [blame] | 9485 | // Total size of the APKs installed for this package |
| 9486 | optional int64 apks_size_bytes = 5; |
Songchun Fan | c296cf7 | 2020-03-31 18:38:52 -0700 | [diff] [blame] | 9487 | } |
| 9488 | |
| 9489 | /** |
Raff Tsai | ea4db18 | 2020-03-06 07:45:43 +0800 | [diff] [blame] | 9490 | * Logs settings provider values. |
| 9491 | * |
| 9492 | * Use DeviceConfig.getProperties to get a list Setting key, query the data from content provider, |
| 9493 | * then write the value to proto. |
| 9494 | * |
| 9495 | */ |
| 9496 | message SettingSnapshot { |
| 9497 | |
| 9498 | // Setting key |
| 9499 | optional string name = 1; |
| 9500 | |
| 9501 | enum SettingsValueType { |
| 9502 | NOTASSIGNED = 0; |
| 9503 | ASSIGNED_BOOL_TYPE = 1; |
| 9504 | ASSIGNED_INT_TYPE = 2; |
| 9505 | ASSIGNED_FLOAT_TYPE = 3; |
| 9506 | ASSIGNED_STRING_TYPE = 4; |
| 9507 | }; |
| 9508 | // Setting value type |
| 9509 | optional SettingsValueType type = 2; |
| 9510 | |
| 9511 | optional bool bool_value = 3; |
| 9512 | |
| 9513 | optional int32 int_value = 4; |
| 9514 | |
| 9515 | optional float float_value = 5; |
| 9516 | |
| 9517 | optional string str_value = 6; |
| 9518 | |
| 9519 | // Android user index. 0 for primary user, 10, 11 for secondary or profile user |
| 9520 | optional int32 user_id = 7; |
| 9521 | } |
Varun Shah | acb5634 | 2019-12-18 11:45:38 -0800 | [diff] [blame] | 9522 | |
| 9523 | /** |
| 9524 | * An event logged to indicate that a user journey is about to be performed. This atom includes |
| 9525 | * relevant information about the users involved in the journey. A UserLifecycleEventOccurred event |
| 9526 | * will immediately follow this atom which will describe the event(s) and its state. |
| 9527 | * |
| 9528 | * Logged from: |
| 9529 | * frameworks/base/services/core/java/com/android/server/am/UserController.java |
| 9530 | * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java |
| 9531 | */ |
| 9532 | message UserLifecycleJourneyReported { |
| 9533 | // An identifier to track a chain of user lifecycle events occurring (referenced in the |
| 9534 | // UserLifecycleEventOccurred atom) |
| 9535 | optional int64 session_id = 1; |
| 9536 | |
| 9537 | // Indicates what type of user journey this session is related to |
| 9538 | enum Journey { |
| 9539 | UNKNOWN = 0; // Undefined user lifecycle journey |
| 9540 | USER_SWITCH_UI = 1; // A user switch journey where a UI is shown |
| 9541 | USER_SWITCH_FG = 2; // A user switch journey without a UI shown |
| 9542 | USER_START = 3; // A user start journey |
| 9543 | USER_CREATE = 4; // A user creation journey |
| 9544 | } |
| 9545 | optional Journey journey = 2; |
| 9546 | // Which user the journey is originating from - could be -1 for certain phases (eg USER_CREATE) |
| 9547 | // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest) |
| 9548 | optional int32 origin_user = 3; |
| 9549 | // Which user the journey is targeting |
| 9550 | // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest) |
| 9551 | optional int32 target_user = 4; |
| 9552 | |
| 9553 | // What is the user type of the target user |
| 9554 | // These should be in sync with USER_TYPE_* flags defined in UserManager.java |
| 9555 | enum UserType { |
| 9556 | TYPE_UNKNOWN = 0; |
| 9557 | FULL_SYSTEM = 1; |
| 9558 | FULL_SECONDARY = 2; |
| 9559 | FULL_GUEST = 3; |
| 9560 | FULL_DEMO = 4; |
| 9561 | FULL_RESTRICTED = 5; |
| 9562 | PROFILE_MANAGED = 6; |
| 9563 | SYSTEM_HEADLESS = 7; |
| 9564 | } |
| 9565 | optional UserType user_type = 5; |
| 9566 | // What are the flags attached to the target user |
| 9567 | optional int32 user_flags = 6; |
| 9568 | } |
| 9569 | |
| 9570 | /** |
| 9571 | * An event logged when a specific user lifecycle event is performed. These events should be |
| 9572 | * correlated with a UserLifecycleJourneyReported atom via the session_id. |
| 9573 | * Note: journeys can span over multiple events, hence some events may share a single session id. |
| 9574 | * |
| 9575 | * Logged from: |
| 9576 | * frameworks/base/services/core/java/com/android/server/am/UserController.java |
| 9577 | * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java |
| 9578 | */ |
| 9579 | message UserLifecycleEventOccurred { |
| 9580 | // An id which links back to user details (reported in the UserLifecycleJourneyReported atom) |
| 9581 | optional int64 session_id = 1; |
| 9582 | // The target user for this event (same as target_user in the UserLifecycleJourneyReported atom) |
| 9583 | // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest) |
| 9584 | optional int32 user_id = 2; |
| 9585 | |
| 9586 | enum Event { |
| 9587 | UNKNOWN = 0; // Indicates that the associated user journey timed-out or resulted in an error |
| 9588 | SWITCH_USER = 1; // Indicates that this is a user switch event |
| 9589 | START_USER = 2; // Indicates that this is a user start event |
| 9590 | CREATE_USER = 3; // Indicates that this is a user create event |
| 9591 | } |
| 9592 | optional Event event = 3; |
| 9593 | |
| 9594 | enum State { |
| 9595 | NONE = 0; // Indicates the associated event has no start/end defined |
| 9596 | BEGIN = 1; |
| 9597 | FINISH = 2; |
| 9598 | } |
| 9599 | optional State state = 4; // Represents the state of an event (beginning/ending) |
| 9600 | } |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 9601 | |
| 9602 | /** |
| 9603 | * Logs when accessibility shortcut clicked. |
| 9604 | * |
| 9605 | * Logged from: |
jasonwshsu | 7b1be3e | 2020-04-27 15:21:07 +0800 | [diff] [blame] | 9606 | * frameworks/base/services/accessibility/java/com/android/server/accessibility |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 9607 | */ |
| 9608 | message AccessibilityShortcutReported { |
| 9609 | // The accessibility feature(including installed a11y service, framework a11y feature, |
| 9610 | // and installed a11y activity) package name that is assigned to the accessibility shortcut. |
| 9611 | optional string package_name = 1; |
| 9612 | |
| 9613 | // The definition of the accessibility shortcut. |
| 9614 | // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. |
| 9615 | optional android.stats.accessibility.ShortcutType shortcut_type = 2; |
| 9616 | |
| 9617 | // The definition of the service status. |
| 9618 | // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. |
| 9619 | optional android.stats.accessibility.ServiceStatus service_status = 3; |
| 9620 | } |
| 9621 | |
| 9622 | /** |
| 9623 | * Logs when accessibility service status changed. |
| 9624 | * |
| 9625 | * Logged from: |
jasonwshsu | 7b1be3e | 2020-04-27 15:21:07 +0800 | [diff] [blame] | 9626 | * packages/apps/Settings/src/com/android/settings/accessibility |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 9627 | */ |
| 9628 | message AccessibilityServiceReported { |
| 9629 | // The accessibility service package name. |
| 9630 | optional string package_name = 1; |
| 9631 | |
| 9632 | // The definition of the service status. |
| 9633 | // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. |
| 9634 | optional android.stats.accessibility.ServiceStatus service_status = 2; |
| 9635 | } |
Jonathan Nguyen | 8d8ff53 | 2020-05-07 18:11:15 -0700 | [diff] [blame] | 9636 | |
| 9637 | /** |
| 9638 | * Logs app usage events. |
| 9639 | */ |
| 9640 | message AppUsageEventOccurred { |
| 9641 | optional int32 uid = 1 [(is_uid) = true]; |
| 9642 | optional string package_name = 2; |
| 9643 | optional string class_name = 3; |
| 9644 | |
| 9645 | enum EventType { |
| 9646 | NONE = 0; |
| 9647 | MOVE_TO_FOREGROUND = 1; |
| 9648 | MOVE_TO_BACKGROUND = 2; |
| 9649 | } |
| 9650 | optional EventType event_type = 4; |
| 9651 | } |
Changyeon Jo | 51ae358 | 2020-04-14 09:41:00 -0700 | [diff] [blame] | 9652 | |
| 9653 | /* |
| 9654 | * Quality metrics logged when EVS cameras are active. |
| 9655 | * |
| 9656 | * Logged from: |
| 9657 | * packages/services/Car/evs/manager/1.1/Enumerator.cpp |
| 9658 | */ |
| 9659 | message EvsUsageStatsReported { |
| 9660 | |
| 9661 | // Camera identifier to distinguish the source camera device. This is not |
| 9662 | // globally unique and therefore cannot be used to identify the user and/or |
| 9663 | // the device. |
| 9664 | optional int32 device_id = 1; |
| 9665 | |
| 9666 | // Peak number of clients during the service |
| 9667 | optional int32 peak_num_clients = 2; |
| 9668 | |
| 9669 | // Number of erroneous events during the service |
| 9670 | optional int32 num_errors = 3; |
| 9671 | |
| 9672 | // Round trip latency of the very first frame |
| 9673 | optional int64 first_latency_millis = 4; |
| 9674 | |
| 9675 | // Average frame round trip latency |
| 9676 | optional float avg_latency_millis = 5; |
| 9677 | |
| 9678 | // Peak frame round trip latency |
| 9679 | optional int64 peak_latency_millis = 6; |
| 9680 | |
| 9681 | // Total number of frames received |
| 9682 | optional int64 total_frames = 7; |
| 9683 | |
| 9684 | // Number of frames ignored |
| 9685 | optional int64 ignored_frames = 8; |
| 9686 | |
| 9687 | // Number of dropped frames to synchronize camera devices |
| 9688 | optional int64 dropped_frames_to_sync = 9; |
| 9689 | |
| 9690 | // The duration of the service |
| 9691 | optional int64 duration_millis = 10; |
| 9692 | } |
Robert Lee | cccdc15 | 2020-04-23 13:22:46 +0800 | [diff] [blame] | 9693 | |
| 9694 | /** |
| 9695 | * Logs audio power usage stats. |
| 9696 | * |
| 9697 | * Pushed from: |
| 9698 | * frameworks/av/services/mediametrics/AudioPowerUsage.cpp |
| 9699 | */ |
| 9700 | message AudioPowerUsageDataReported { |
| 9701 | /** |
| 9702 | * Device used for input/output |
| 9703 | * |
| 9704 | * All audio devices please refer to below file: |
| 9705 | * system/media/audio/include/system/audio-base.h |
| 9706 | * |
| 9707 | * Define our own enum values because we don't report all audio devices. |
| 9708 | * Currently, we only report built-in audio devices such as handset, speaker, |
| 9709 | * built-in mics, common audio devices such as wired headset, usb headset |
| 9710 | * and bluetooth devices. |
| 9711 | */ |
| 9712 | enum AudioDevice { |
| 9713 | OUTPUT_EARPIECE = 0x1; // handset |
| 9714 | OUTPUT_SPEAKER = 0x2; // dual speaker |
| 9715 | OUTPUT_WIRED_HEADSET = 0x4; // 3.5mm headset |
| 9716 | OUTPUT_USB_HEADSET = 0x8; // usb headset |
| 9717 | OUTPUT_BLUETOOTH_SCO = 0x10; // bluetooth sco |
| 9718 | OUTPUT_BLUETOOTH_A2DP = 0x20; // a2dp |
| 9719 | OUTPUT_SPEAKER_SAFE = 0x40; // bottom speaker |
| 9720 | |
| 9721 | INPUT_DEVICE_BIT = 0x40000000; // non-negative positive int32. |
| 9722 | INPUT_BUILTIN_MIC = 0x40000001; // buildin mic |
| 9723 | INPUT_BUILTIN_BACK_MIC = 0x40000002; // buildin back mic |
| 9724 | INPUT_WIRED_HEADSET_MIC = 0x40000004; // 3.5mm headset mic |
| 9725 | INPUT_USB_HEADSET_MIC = 0x40000008; // usb headset mic |
| 9726 | INPUT_BLUETOOTH_SCO = 0x40000010; // bluetooth sco mic |
| 9727 | } |
| 9728 | optional AudioDevice audio_device = 1; |
| 9729 | |
| 9730 | // Duration of the audio in seconds |
| 9731 | optional int32 duration_secs = 2; |
| 9732 | |
| 9733 | // Average volume (0 ... 1.0) |
| 9734 | optional float average_volume = 3; |
| 9735 | |
| 9736 | enum AudioType { |
| 9737 | UNKNOWN_TYPE = 0; |
| 9738 | VOICE_CALL_TYPE = 1; // voice call |
| 9739 | VOIP_CALL_TYPE = 2; // voip call, including uplink and downlink |
| 9740 | MEDIA_TYPE = 3; // music and system sound |
| 9741 | RINGTONE_NOTIFICATION_TYPE = 4; // ringtone and notification |
| 9742 | ALARM_TYPE = 5; // alarm type |
| 9743 | // record type |
| 9744 | CAMCORDER_TYPE = 6; // camcorder |
| 9745 | RECORD_TYPE = 7; // other recording |
| 9746 | } |
| 9747 | optional AudioType type = 4; |
| 9748 | } |