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"; |
Robert Luo | 2f52f04 | 2020-05-11 16:39:24 +0800 | [diff] [blame] | 27 | import "frameworks/base/core/proto/android/app/media_output_enum.proto"; |
Zhen Sun | 0bec8d4 | 2020-03-25 17:17:29 -0700 | [diff] [blame] | 28 | import "frameworks/base/core/proto/android/app/tvsettings_enums.proto"; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 29 | import "frameworks/base/core/proto/android/bluetooth/a2dp/enums.proto"; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 30 | import "frameworks/base/core/proto/android/bluetooth/enums.proto"; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 31 | import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto"; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 32 | import "frameworks/base/core/proto/android/bluetooth/hfp/enums.proto"; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 33 | import "frameworks/base/core/proto/android/bluetooth/smp/enums.proto"; |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 34 | import "frameworks/base/core/proto/android/debug/enums.proto"; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 35 | import "frameworks/base/core/proto/android/hardware/biometrics/enums.proto"; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 36 | import "frameworks/base/core/proto/android/hardware/sensor/assist/enums.proto"; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 37 | import "frameworks/base/core/proto/android/net/networkcapabilities.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 38 | import "frameworks/base/core/proto/android/os/enums.proto"; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 39 | import "frameworks/base/core/proto/android/server/connectivity/data_stall_event.proto"; |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 40 | import "frameworks/base/core/proto/android/server/enums.proto"; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 41 | import "frameworks/base/core/proto/android/server/job/enums.proto"; |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 42 | import "frameworks/base/core/proto/android/server/location/enums.proto"; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 43 | import "frameworks/base/core/proto/android/service/procstats_enum.proto"; |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 44 | import "frameworks/base/core/proto/android/service/usb.proto"; |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 45 | import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto"; |
lifr | 8d9850d | 2020-04-27 23:03:25 +0800 | [diff] [blame] | 46 | import "frameworks/base/core/proto/android/stats/connectivity/tethering.proto"; |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 47 | import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 48 | import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto"; |
| 49 | import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto"; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 50 | import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto"; |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 51 | import "frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto"; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 52 | import "frameworks/base/core/proto/android/stats/enums.proto"; |
| 53 | import "frameworks/base/core/proto/android/stats/intelligence/enums.proto"; |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 54 | import "frameworks/base/core/proto/android/stats/launcher/launcher.proto"; |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 55 | import "frameworks/base/core/proto/android/stats/location/location_enums.proto"; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 56 | import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto"; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 57 | import "frameworks/base/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto"; |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 58 | import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto"; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 59 | import "frameworks/base/core/proto/android/stats/style/style_enums.proto"; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 60 | import "frameworks/base/core/proto/android/stats/sysui/notification_enums.proto"; |
Nikita Iashchenko | ff64fd0 | 2020-11-02 08:10:45 +0000 | [diff] [blame] | 61 | import "frameworks/base/core/proto/android/stats/tls/enums.proto"; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 62 | import "frameworks/base/core/proto/android/telecomm/enums.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 63 | import "frameworks/base/core/proto/android/telephony/enums.proto"; |
| 64 | import "frameworks/base/core/proto/android/view/enums.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 65 | import "frameworks/base/core/proto/android/wifi/enums.proto"; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 66 | import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto"; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 67 | import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto"; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 68 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 69 | /** |
Kelly Rossmoyer | 4c8a97a | 2020-07-29 21:02:54 +0000 | [diff] [blame] | 70 | * The primary atom class. This message defines all of the available |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 71 | * raw stats log events from the Android system, also known as "atoms." |
| 72 | * |
| 73 | * This field contains a single oneof with all of the available messages. |
| 74 | * The stats-log-api-gen tool runs as part of the Android build and |
| 75 | * generates the android.util.StatsLog class, which contains the constants |
| 76 | * and methods that Android uses to log. |
| 77 | * |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 78 | * This Atom class is not actually built into the Android system. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 79 | * Instead, statsd on Android constructs these messages synthetically, |
| 80 | * in the format defined here and in stats_log.proto. |
| 81 | */ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 82 | message Atom { |
| 83 | // Pushed atoms start at 2. |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 84 | oneof pushed { |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 85 | // 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] | 86 | BleScanStateChanged ble_scan_state_changed = 2 |
| 87 | [(module) = "bluetooth", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 88 | ProcessStateChanged process_state_changed = 3 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 89 | BleScanResultReceived ble_scan_result_received = 4 [(module) = "bluetooth"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 90 | SensorStateChanged sensor_state_changed = |
| 91 | 5 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 92 | GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 93 | SyncStateChanged sync_state_changed = 7 [(module) = "framework", (module) = "statsdtest"]; |
| 94 | ScheduledJobStateChanged scheduled_job_state_changed = |
| 95 | 8 [(module) = "framework", (module) = "statsdtest"]; |
| 96 | ScreenBrightnessChanged screen_brightness_changed = |
| 97 | 9 [(module) = "framework", (module) = "statsdtest"]; |
| 98 | WakelockStateChanged wakelock_state_changed = |
| 99 | 10 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 100 | LongPartialWakelockStateChanged long_partial_wakelock_state_changed = |
| 101 | 11 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 102 | MobileRadioPowerStateChanged mobile_radio_power_state_changed = |
| 103 | 12 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 104 | WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(module) = "framework"]; |
| 105 | ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = |
| 106 | 14 [(module) = "framework"]; |
| 107 | MemoryFactorStateChanged memory_factor_state_changed = 15 [(module) = "framework"]; |
| 108 | ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16 [(module) = "framework"]; |
| 109 | CachedKillReported cached_kill_reported = 17 [(module) = "framework"]; |
| 110 | ProcessMemoryStatReported process_memory_stat_reported = 18 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 111 | LauncherUIChanged launcher_event = 19 [(module) = "sysui"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 112 | BatterySaverModeStateChanged battery_saver_mode_state_changed = |
| 113 | 20 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 114 | DeviceIdleModeStateChanged device_idle_mode_state_changed = 21 [(module) = "framework"]; |
| 115 | DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 116 | AudioStateChanged audio_state_changed = |
| 117 | 23 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 118 | MediaCodecStateChanged media_codec_state_changed = 24 [(module) = "framework"]; |
| 119 | CameraStateChanged camera_state_changed = 25 [(module) = "framework"]; |
| 120 | FlashlightStateChanged flashlight_state_changed = 26 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 121 | UidProcessStateChanged uid_process_state_changed = |
| 122 | 27 [(module) = "framework", (module) = "statsdtest"]; |
| 123 | ProcessLifeCycleStateChanged process_life_cycle_state_changed = |
| 124 | 28 [(module) = "framework", (module) = "statsdtest"]; |
| 125 | ScreenStateChanged screen_state_changed = |
| 126 | 29 [(module) = "framework", (module) = "statsdtest"]; |
| 127 | BatteryLevelChanged battery_level_changed = |
| 128 | 30 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 129 | ChargingStateChanged charging_state_changed = 31 [(module) = "framework"]; |
tsaichristine | 1449fa4 | 2020-01-02 12:12:05 -0800 | [diff] [blame] | 130 | PluggedStateChanged plugged_state_changed = 32 |
| 131 | [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 132 | InteractiveStateChanged interactive_state_changed = 33 [(module) = "framework"]; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 133 | TouchEventReported touch_event_reported = 34; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 134 | WakeupAlarmOccurred wakeup_alarm_occurred = 35 [(module) = "framework"]; |
| 135 | KernelWakeupReported kernel_wakeup_reported = 36 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 136 | WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"]; |
| 137 | WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"]; |
| 138 | WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 139 | PhoneSignalStrengthChanged phone_signal_strength_changed = |
| 140 | 40 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 141 | SettingChanged setting_changed = 41 [(module) = "framework"]; |
| 142 | ActivityForegroundStateChanged activity_foreground_state_changed = |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 143 | 42 [(module) = "framework", (module) = "statsdtest"]; |
| 144 | IsolatedUidChanged isolated_uid_changed = |
| 145 | 43 [(module) = "framework", (module) = "statsd", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 146 | PacketWakeupOccurred packet_wakeup_occurred = 44 [(module) = "framework"]; |
| 147 | WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 148 | AnomalyDetected anomaly_detected = 46 [(module) = "statsd"]; |
Muhammad Qureshi | 741d318 | 2020-06-18 18:28:21 -0700 | [diff] [blame] | 149 | AppBreadcrumbReported app_breadcrumb_reported = 47 [(module) = "statsd"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 150 | AppStartOccurred app_start_occurred = 48 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 151 | AppStartCanceled app_start_canceled = 49 [(module) = "framework"]; |
| 152 | AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"]; |
Muhammad Qureshi | 79f068c | 2019-12-20 06:55:57 -0800 | [diff] [blame] | 153 | LmkKillOccurred lmk_kill_occurred = 51 [(module) = "lmkd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 154 | PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 155 | WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"]; |
Muhammad Qureshi | 79f068c | 2019-12-20 06:55:57 -0800 | [diff] [blame] | 156 | LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 157 | AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"]; |
| 158 | ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"]; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 159 | BootSequenceReported boot_sequence_reported = 57; |
Muhammad Qureshi | 741d318 | 2020-06-18 18:28:21 -0700 | [diff] [blame] | 160 | DaveyOccurred davey_occurred = 58 [(module) = "statsd"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 161 | OverlayStateChanged overlay_state_changed = |
| 162 | 59 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 163 | ForegroundServiceStateChanged foreground_service_state_changed |
| 164 | = 60 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 165 | CallStateChanged call_state_changed = |
| 166 | 61 [(module) = "telecom", (truncate_timestamp) = true]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 167 | KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"]; |
| 168 | KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"]; |
| 169 | KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 170 | AppDied app_died = 65 [(module) = "framework"]; |
| 171 | ResourceConfigurationChanged resource_configuration_changed = 66 [(module) = "framework"]; |
| 172 | BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67 [(module) = "framework"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 173 | BluetoothConnectionStateChanged bluetooth_connection_state_changed = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 174 | 68 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 175 | GpsSignalQualityChanged gps_signal_quality_changed = 69 [(module) = "framework"]; |
| 176 | UsbConnectorStateChanged usb_connector_state_changed = 70 [(module) = "framework"]; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 177 | SpeakerImpedanceReported speaker_impedance_reported = 71; |
| 178 | HardwareFailed hardware_failed = 72; |
| 179 | PhysicalDropDetected physical_drop_detected = 73; |
| 180 | ChargeCyclesReported charge_cycles_reported = 74; |
Muhammad Qureshi | a4efed8 | 2020-01-23 13:53:51 -0800 | [diff] [blame] | 181 | MobileConnectionStateChanged mobile_connection_state_changed = 75 [(module) = "telephony"]; |
| 182 | MobileRadioTechnologyChanged mobile_radio_technology_changed = 76 [(module) = "telephony"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 183 | UsbDeviceAttached usb_device_attached = 77 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 184 | AppCrashOccurred app_crash_occurred = 78 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 185 | ANROccurred anr_occurred = 79 [(module) = "framework"]; |
| 186 | WTFOccurred wtf_occurred = 80 [(module) = "framework"]; |
| 187 | LowMemReported low_mem_reported = 81 [(module) = "framework"]; |
Howard Ro | cb767f6 | 2018-06-19 19:58:05 -0700 | [diff] [blame] | 188 | GenericAtom generic_atom = 82; |
Muhammad Qureshi | 741d318 | 2020-06-18 18:28:21 -0700 | [diff] [blame] | 189 | KeyValuePairsAtom key_value_pairs_atom = 83 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 190 | VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"]; |
| 191 | DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"]; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 192 | ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 193 | BiometricAcquired biometric_acquired = 87 [(module) = "framework"]; |
| 194 | BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"]; |
| 195 | BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"]; |
thiruram | 70b0843 | 2020-06-09 18:44:02 -0700 | [diff] [blame] | 196 | UiEventReported ui_event_reported = 90 [(module) = "framework", (module) = "sysui"]; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 197 | BatteryHealthSnapshot battery_health_snapshot = 91; |
| 198 | SlowIo slow_io = 92; |
| 199 | BatteryCausedShutdown battery_caused_shutdown = 93; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 200 | PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"]; |
| 201 | PhoneStateChanged phone_state_changed = 95 [(module) = "framework"]; |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 202 | UserRestrictionChanged user_restriction_changed = 96; |
Muhammad Qureshi | 9afad81 | 2020-01-23 15:04:59 -0800 | [diff] [blame] | 203 | SettingsUIChanged settings_ui_changed = 97 [(module) = "settings"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 204 | ConnectivityStateChanged connectivity_state_changed = 98 [(module) = "framework"]; |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 205 | // TODO: service state change is very noisy shortly after boot, as well |
| 206 | // as at other transitions - coming out of doze, device plugged in, etc. |
| 207 | // Consider removing this if it becomes a problem |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 208 | ServiceStateChanged service_state_changed = 99 [(module) = "framework"]; |
| 209 | ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"]; |
| 210 | FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"]; |
Muhammad Qureshi | cefc882 | 2020-02-09 11:46:23 -0800 | [diff] [blame] | 211 | BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 212 | DevicePolicyEvent device_policy_event = 103 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 213 | DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"]; |
| 214 | DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported = |
| 215 | 105 [(module) = "docsui"]; |
| 216 | DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"]; |
| 217 | DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"]; |
| 218 | DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request = |
| 219 | 108 [(module) = "docsui"]; |
| 220 | DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"]; |
| 221 | DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"]; |
| 222 | DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"]; |
| 223 | DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 224 | WifiEnabledStateChanged wifi_enabled_state_changed = 113 [(module) = "framework"]; |
tsaichristine | cecebdc | 2020-02-04 14:05:56 -0800 | [diff] [blame] | 225 | WifiRunningStateChanged wifi_running_state_changed = 114 |
| 226 | [(module) = "framework", deprecated = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 227 | AppCompacted app_compacted = 115 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 228 | NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"]; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 229 | DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 230 | 117 [(module) = "docsui"]; |
| 231 | DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"]; |
| 232 | DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"]; |
| 233 | DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"]; |
| 234 | DataStallEvent data_stall_event = 121 [(module) = "network_stack"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 235 | RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"]; |
| 236 | SignedConfigReported signed_config_reported = 123 [(module) = "framework"]; |
| 237 | GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 238 | BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 239 | 125 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 240 | BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 241 | 126 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 242 | BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 243 | 127 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 244 | AppDowngraded app_downgraded = 128 [(module) = "framework"]; |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 245 | AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 246 | LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"]; |
| 247 | GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"]; |
| 248 | GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"]; |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 249 | UsbPortOverheatEvent usb_port_overheat_event_reported = 133; |
Muhammad Qureshi | f9a5ab0 | 2020-01-25 19:43:27 -0800 | [diff] [blame] | 250 | NfcErrorOccurred nfc_error_occurred = 134 [(module) = "nfc"]; |
| 251 | NfcStateChanged nfc_state_changed = 135 [(module) = "nfc"]; |
| 252 | NfcBeamOccurred nfc_beam_occurred = 136 [(module) = "nfc"]; |
| 253 | NfcCardemulationOccurred nfc_cardemulation_occurred = 137 [(module) = "nfc"]; |
| 254 | NfcTagOccurred nfc_tag_occurred = 138 [(module) = "nfc"]; |
| 255 | NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139 [(module) = "nfc"]; |
Muhammad Qureshi | 70dfeb4 | 2020-01-24 20:11:44 -0800 | [diff] [blame] | 256 | SeStateChanged se_state_changed = 140 [(module) = "secure_element"]; |
| 257 | SeOmapiReported se_omapi_reported = 141 [(module) = "secure_element"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 258 | BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = |
| 259 | 142 [(module) = "framework"]; |
| 260 | AttentionManagerServiceResultReported attention_manager_service_result_reported = |
| 261 | 143 [(module) = "framework"]; |
| 262 | AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"]; |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 263 | SpeechDspStatReported speech_dsp_stat_reported = 145; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 264 | UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 265 | WatchdogRollbackOccurred watchdog_rollback_occurred = |
| 266 | 147 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 267 | BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = |
| 268 | 148 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 269 | BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 270 | ScheduledJobConstraintChanged scheduled_job_constraint_changed = |
| 271 | 150 [(module) = "framework"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 272 | BluetoothActiveDeviceChanged bluetooth_active_device_changed = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 273 | 151 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 274 | BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 275 | 152 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 276 | BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 277 | 153 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 278 | BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 279 | 154 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 280 | BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 281 | 155 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 282 | BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 283 | 156 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 284 | BluetoothDeviceRssiReported bluetooth_device_rssi_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 285 | 157 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 286 | BluetoothDeviceFailedContactCounterReported |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 287 | bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 288 | BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 289 | 159 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 290 | BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 291 | 160 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 292 | BluetoothQualityReportReported bluetooth_quality_report_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 293 | 161 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 294 | BluetoothDeviceInfoReported bluetooth_device_info_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 295 | 162 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 296 | BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 297 | 163 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 298 | BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 299 | 164 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 300 | BluetoothBondStateChanged bluetooth_bond_state_changed = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 301 | 165 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 302 | BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 303 | 166 [(module) = "bluetooth"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 304 | BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 305 | 167 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 306 | ScreenTimeoutExtensionReported screen_timeout_extension_reported = |
| 307 | 168 [(module) = "framework"]; |
| 308 | ProcessStartTime process_start_time = 169 [(module) = "framework"]; |
Philip P. Moltmann | b2f0c77 | 2019-04-11 14:41:21 -0700 | [diff] [blame] | 309 | PermissionGrantRequestResultReported permission_grant_request_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 310 | 170 [(module) = "permissioncontroller"]; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 311 | BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; |
Muhammad Qureshi | ed8bca0 | 2020-01-24 16:07:49 -0800 | [diff] [blame] | 312 | DeviceIdentifierAccessDenied device_identifier_access_denied = |
| 313 | 172 [(module) = "telephony_common"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 314 | BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"]; |
Muhammad Qureshi | 76b2524 | 2020-01-25 19:02:08 -0800 | [diff] [blame] | 315 | AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"]; |
| 316 | AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"]; |
| 317 | AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 318 | TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"]; |
Muhammad Qureshi | 741d318 | 2020-06-18 18:28:21 -0700 | [diff] [blame] | 319 | HiddenApiUsed hidden_api_used = 178 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 320 | StyleUIChanged style_ui_changed = 179 [(module) = "sysui"]; |
Joel Galenson | 6f41b106 | 2019-04-16 12:22:41 -0700 | [diff] [blame] | 321 | PrivacyIndicatorsInteracted privacy_indicators_interacted = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 322 | 180 [(module) = "permissioncontroller"]; |
| 323 | AppInstallOnExternalStorageReported app_install_on_external_storage_reported = |
| 324 | 181 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 325 | NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 326 | AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"]; |
| 327 | BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"]; |
| 328 | SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"]; |
| 329 | TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"]; |
Muhammad Qureshi | 4530b43 | 2020-01-23 11:55:28 -0800 | [diff] [blame] | 330 | BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 331 | 187 [(module) = "bluetooth"]; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 332 | IntelligenceEventReported intelligence_event_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 333 | 188 [(module) = "intelligence"]; |
| 334 | ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = |
| 335 | 189 [(module) = "framework"]; |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 336 | RoleRequestResultReported role_request_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 337 | 190 [(module) = "permissioncontroller"]; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 338 | MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191; |
| 339 | MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192; |
| 340 | MediametricsAudiothreadReported mediametrics_audiothread_reported = 193; |
| 341 | MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194; |
| 342 | MediametricsCodecReported mediametrics_codec_reported = 195; |
| 343 | MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196; |
| 344 | MediametricsExtractorReported mediametrics_extractor_reported = 197; |
| 345 | MediametricsMediadrmReported mediametrics_mediadrm_reported = 198; |
| 346 | MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199; |
| 347 | MediametricsRecorderReported mediametrics_recorder_reported = 200; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 348 | MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 349 | CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"]; |
| 350 | GarageModeInfo garage_mode_info = 204 [(module) = "car"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 351 | TestAtomReported test_atom_reported = 205 [(module) = "cts"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 352 | ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = |
| 353 | 206 [(module) = "framework"]; |
| 354 | ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"]; |
| 355 | ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"]; |
| 356 | ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"]; |
| 357 | LocationManagerApiUsageReported location_manager_api_usage_reported = |
| 358 | 210 [(module) = "framework"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 359 | ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 360 | 211 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 361 | RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 362 | 212 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 363 | GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 364 | 213 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 365 | LocationAccessCheckNotificationAction location_access_check_notification_action = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 366 | 214 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 367 | AppPermissionFragmentActionReported app_permission_fragment_action_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 368 | 215 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 369 | AppPermissionFragmentViewed app_permission_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 370 | 216 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 371 | AppPermissionsFragmentViewed app_permissions_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 372 | 217 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 373 | PermissionAppsFragmentViewed permission_apps_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 374 | 218 [(module) = "permissioncontroller"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 375 | TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"]; |
| 376 | TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"]; |
| 377 | ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"]; |
| 378 | LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 379 | ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 380 | BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"]; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 381 | UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225; |
| 382 | UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 383 | CameraActionEvent camera_action_event = 227 [(module) = "framework"]; |
atrost | 1516d52 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 384 | AppCompatibilityChangeReported app_compatibility_change_reported = |
Muhammad Qureshi | 741d318 | 2020-06-18 18:28:21 -0700 | [diff] [blame] | 385 | 228 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 386 | PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"]; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 387 | VmsClientConnectionStateChanged vms_client_connection_state_changed = |
| 388 | 230 [(module) = "car"]; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 389 | MediaProviderScanOccurred media_provider_scan_occurred = 233 [(module) = "mediaprovider"]; |
| 390 | MediaContentDeleted media_content_deleted = 234 [(module) = "mediaprovider"]; |
| 391 | MediaProviderPermissionRequested media_provider_permission_requested = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 392 | 235 [(module) = "mediaprovider"]; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 393 | MediaProviderSchemaChanged media_provider_schema_changed = 236 [(module) = "mediaprovider"]; |
| 394 | MediaProviderIdleMaintenanceFinished media_provider_idle_maintenance_finished = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 395 | 237 [(module) = "mediaprovider"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 396 | RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"]; |
| 397 | BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"]; |
| 398 | BootTimeEventElapsedTime boot_time_event_elapsed_time_reported = |
| 399 | 240 [(module) = "framework"]; |
Keun young Park | bc3ce00 | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 400 | BootTimeEventUtcTime boot_time_event_utc_time_reported = 241; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 401 | BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"]; |
Nikita Ioffe | 779d6be | 2020-02-06 23:17:17 +0000 | [diff] [blame] | 402 | UserspaceRebootReported userspace_reboot_reported = 243 [(module) = "framework"]; |
Muhammad Qureshi | 550b84c | 2020-02-03 14:17:59 -0800 | [diff] [blame] | 403 | NotificationReported notification_reported = 244 [(module) = "framework"]; |
Will Brockman | 7fb7944 | 2020-02-27 14:34:24 -0500 | [diff] [blame] | 404 | NotificationPanelReported notification_panel_reported = 245 [(module) = "sysui"]; |
| 405 | NotificationChannelModified notification_channel_modified = 246 [(module) = "framework"]; |
Muhammad Qureshi | e2b2432 | 2020-01-28 10:54:17 -0800 | [diff] [blame] | 406 | IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"]; |
| 407 | IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"]; |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 408 | CellBroadcastMessageReported cb_message_reported = |
| 409 | 249 [(module) = "cellbroadcast"]; |
| 410 | CellBroadcastMessageError cb_message_error = |
| 411 | 250 [(module) = "cellbroadcast"]; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 412 | WifiHealthStatReported wifi_health_stat_reported = 251 [(module) = "wifi"]; |
| 413 | WifiFailureStatReported wifi_failure_stat_reported = 252 [(module) = "wifi"]; |
| 414 | WifiConnectionResultReported wifi_connection_result_reported = 253 [(module) = "wifi"]; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 415 | AppFreezeChanged app_freeze_changed = 254 [(module) = "framework"]; |
Alessio Balsini | 1550470 | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 416 | SnapshotMergeReported snapshot_merge_reported = 255; |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 417 | ForegroundServiceAppOpSessionEnded foreground_service_app_op_session_ended = |
| 418 | 256 [(module) = "framework"]; |
Alec Mouri | 5ac3262 | 2020-02-06 08:44:25 -0800 | [diff] [blame] | 419 | DisplayJankReported display_jank_reported = 257; |
Kweku Adams | 1275213 | 2020-02-18 15:36:48 -0800 | [diff] [blame] | 420 | AppStandbyBucketChanged app_standby_bucket_changed = 258 [(module) = "framework"]; |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 421 | SharesheetStarted sharesheet_started = 259 [(module) = "framework"]; |
thiruram | 70b0843 | 2020-06-09 18:44:02 -0700 | [diff] [blame] | 422 | RankingSelected ranking_selected = 260 [(module) = "framework", (module) = "sysui"]; |
Zhen Sun | 7dbb51a | 2020-04-07 16:05:12 -0700 | [diff] [blame] | 423 | TvSettingsUIInteracted tvsettings_ui_interacted = 261 [(module) = "tv_settings"]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 424 | LauncherStaticLayout launcher_snapshot = 262 [(module) = "sysui"]; |
Songchun Fan | c296cf7 | 2020-03-31 18:38:52 -0700 | [diff] [blame] | 425 | PackageInstallerV2Reported package_installer_v2_reported = 263 [(module) = "framework"]; |
Varun Shah | acb5634 | 2019-12-18 11:45:38 -0800 | [diff] [blame] | 426 | UserLifecycleJourneyReported user_lifecycle_journey_reported = 264 [(module) = "framework"]; |
| 427 | UserLifecycleEventOccurred user_lifecycle_event_occurred = 265 [(module) = "framework"]; |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 428 | AccessibilityShortcutReported accessibility_shortcut_reported = |
| 429 | 266 [(module) = "framework"]; |
jasonwshsu | 7b1be3e | 2020-04-27 15:21:07 +0800 | [diff] [blame] | 430 | AccessibilityServiceReported accessibility_service_reported = 267 [(module) = "settings"]; |
Diksha Gohlyan | b96b2f4 | 2020-04-30 09:20:42 -0700 | [diff] [blame] | 431 | DocsUIDragAndDropReported docs_ui_drag_and_drop_reported = 268 [(module) = "docsui"]; |
Jonathan Nguyen | 8d8ff53 | 2020-05-07 18:11:15 -0700 | [diff] [blame] | 432 | AppUsageEventOccurred app_usage_event_occurred = 269 [(module) = "framework"]; |
Nate Myren | e8f912bb | 2020-04-30 10:41:38 -0700 | [diff] [blame] | 433 | AutoRevokeNotificationClicked auto_revoke_notification_clicked = |
| 434 | 270 [(module) = "permissioncontroller"]; |
| 435 | AutoRevokeFragmentAppViewed auto_revoke_fragment_app_viewed = |
| 436 | 271 [(module) = "permissioncontroller"]; |
| 437 | AutoRevokedAppInteraction auto_revoked_app_interaction = |
| 438 | 272 [(module) = "permissioncontroller", (module) = "settings"]; |
| 439 | AppPermissionGroupsFragmentAutoRevokeAction |
| 440 | app_permission_groups_fragment_auto_revoke_action = |
| 441 | 273 [(module) = "permissioncontroller"]; |
Changyeon Jo | 51ae358 | 2020-04-14 09:41:00 -0700 | [diff] [blame] | 442 | EvsUsageStatsReported evs_usage_stats_reported = 274 [(module) = "evs"]; |
Robert Lee | cccdc15 | 2020-04-23 13:22:46 +0800 | [diff] [blame] | 443 | AudioPowerUsageDataReported audio_power_usage_data_reported = 275; |
Henry Fang | e316ab6 | 2020-04-21 18:43:14 -0700 | [diff] [blame] | 444 | TvTunerStateChanged tv_tuner_state_changed = 276 [(module) = "framework"]; |
Robert Luo | 2f52f04 | 2020-05-11 16:39:24 +0800 | [diff] [blame] | 445 | MediaOutputOpSwitchReported mediaoutput_op_switch_reported = |
| 446 | 277 [(module) = "settings"]; |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 447 | CellBroadcastMessageFiltered cb_message_filtered = |
| 448 | 278 [(module) = "cellbroadcast"]; |
Henry Fang | 1ae85bb | 2020-05-28 18:07:03 -0700 | [diff] [blame] | 449 | TvTunerDvrStatus tv_tuner_dvr_status = 279 [(module) = "framework"]; |
Henry Fang | fd40c07 | 2020-06-01 14:59:17 -0700 | [diff] [blame] | 450 | TvCasSessionOpenStatus tv_cas_session_open_status = |
| 451 | 280 [(module) = "framework"]; |
Govinda Wasserman | e464028 | 2020-04-30 09:30:56 -0400 | [diff] [blame] | 452 | AssistantInvocationReported assistant_invocation_reported = 281 [(module) = "framework"]; |
Denny cy Lee | ca62fc4 | 2020-05-28 18:13:07 +0800 | [diff] [blame] | 453 | DisplayWakeReported display_wake_reported = 282 [(module) = "framework"]; |
Mayank Garg | da5ca01 | 2020-05-14 00:23:53 -0700 | [diff] [blame] | 454 | CarUserHalModifyUserRequestReported car_user_hal_modify_user_request_reported = |
| 455 | 283 [(module) = "car"]; |
| 456 | CarUserHalModifyUserResponseReported car_user_hal_modify_user_response_reported = |
| 457 | 284 [(module) = "car"]; |
| 458 | CarUserHalPostSwitchResponseReported car_user_hal_post_switch_response_reported = |
| 459 | 285 [(module) = "car"]; |
| 460 | CarUserHalInitialUserInfoRequestReported car_user_hal_initial_user_info_request_reported = |
| 461 | 286 [(module) = "car"]; |
| 462 | CarUserHalInitialUserInfoResponseReported car_user_hal_initial_user_info_response_reported = |
| 463 | 287 [(module) = "car"]; |
| 464 | CarUserHalUserAssociationRequestReported car_user_hal_user_association_request_reported = |
| 465 | 288 [(module) = "car"]; |
| 466 | CarUserHalSetUserAssociationResponseReported car_user_hal_set_user_association_response_reported = |
| 467 | 289 [(module) = "car"]; |
lifr | 1cc318d | 2020-03-19 21:58:30 +0800 | [diff] [blame] | 468 | NetworkIpProvisioningReported network_ip_provisioning_reported = |
| 469 | 290 [(module) = "network_stack"]; |
| 470 | NetworkDhcpRenewReported network_dhcp_renew_reported = 291 [(module) = "network_stack"]; |
| 471 | NetworkValidationReported network_validation_reported = 292 [(module) = "network_stack"]; |
| 472 | NetworkStackQuirkReported network_stack_quirk_reported = 293 [(module) = "network_stack"]; |
Andy Hung | 48cffa3 | 2020-05-01 09:54:02 -0700 | [diff] [blame] | 473 | MediametricsAudioRecordDeviceUsageReported mediametrics_audiorecorddeviceusage_reported = |
| 474 | 294; |
| 475 | MediametricsAudioThreadDeviceUsageReported mediametrics_audiothreaddeviceusage_reported = |
| 476 | 295; |
| 477 | MediametricsAudioTrackDeviceUsageReported mediametrics_audiotrackdeviceusage_reported = |
| 478 | 296; |
| 479 | MediametricsAudioDeviceConnectionReported mediametrics_audiodeviceconnection_reported = |
| 480 | 297; |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 481 | BlobCommitted blob_committed = 298 [(module) = "framework"]; |
| 482 | BlobLeased blob_leased = 299 [(module) = "framework"]; |
| 483 | BlobOpened blob_opened = 300 [(module) = "framework"]; |
Tingting Wang | b4ecadb | 2020-04-27 15:34:45 +0000 | [diff] [blame] | 484 | ContactsProviderStatusReported contacts_provider_status_reported = 301; |
Hasini Gunasinghe | 68d7e94 | 2020-05-21 16:17:30 +0000 | [diff] [blame] | 485 | KeystoreKeyEventReported keystore_key_event_reported = 302; |
lifr | 8abf3a7 | 2020-06-13 11:24:34 +0800 | [diff] [blame] | 486 | NetworkTetheringReported network_tethering_reported = |
| 487 | 303 [(module) = "network_tethering"]; |
Maryam | de784e5 | 2020-06-22 11:46:48 -0700 | [diff] [blame] | 488 | ImeTouchReported ime_touch_reported = 304 [(module) = "sysui"]; |
Nikita Iashchenko | ff64fd0 | 2020-11-02 08:10:45 +0000 | [diff] [blame] | 489 | TlsHandshakeReported tls_handshake_reported = 317 [(module) = "conscrypt"]; |
Muhammad Qureshi | cdf291d | 2020-04-15 17:13:12 -0700 | [diff] [blame] | 490 | |
| 491 | // StatsdStats tracks platform atoms with ids upto 500. |
| 492 | // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 493 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 494 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 495 | // Pulled events will start at field 10000. |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 496 | // Next: 10084 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 497 | oneof pulled { |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 498 | WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"]; |
| 499 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 500 | MobileBytesTransfer mobile_bytes_transfer = |
| 501 | 10002 [(module) = "framework", (truncate_timestamp) = true]; |
| 502 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = |
| 503 | 10003 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 504 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"]; |
| 505 | KernelWakelock kernel_wakelock = 10004 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 506 | SubsystemSleepState subsystem_sleep_state = 10005 [(module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 507 | CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 508 | CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework", (module) = "statsdtest"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 509 | CpuTimePerUidFreq cpu_time_per_uid_freq = |
| 510 | 10010 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 511 | WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"]; |
| 512 | ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"]; |
| 513 | BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"]; |
| 514 | ProcessMemoryState process_memory_state = 10013 [(module) = "framework"]; |
| 515 | SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"]; |
Muhammad Qureshi | b635b3a | 2020-04-22 20:57:41 -0700 | [diff] [blame] | 516 | SystemUptime system_uptime = 10015 [(module) = "framework"]; |
tsaichristine | a3d2ed8 | 2020-03-19 20:53:36 -0700 | [diff] [blame] | 517 | CpuActiveTime cpu_active_time = 10016 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | b635b3a | 2020-04-22 20:57:41 -0700 | [diff] [blame] | 518 | CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 519 | DiskSpace disk_space = 10018 [deprecated=true, (module) = "statsdtest"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 520 | RemainingBatteryCapacity remaining_battery_capacity = 10019 [(module) = "framework"]; |
| 521 | FullBatteryCapacity full_battery_capacity = 10020 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 522 | Temperature temperature = 10021 [(module) = "framework", (module) = "statsdtest"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 523 | BinderCalls binder_calls = 10022 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 524 | BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 525 | LooperStats looper_stats = 10024 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 526 | DiskStats disk_stats = 10025 [(module) = "framework"]; |
| 527 | DirectoryUsage directory_usage = 10026 [(module) = "framework"]; |
| 528 | AppSize app_size = 10027 [(module) = "framework"]; |
| 529 | CategorySize category_size = 10028 [(module) = "framework"]; |
| 530 | ProcStats proc_stats = 10029 [(module) = "framework"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 531 | BatteryVoltage battery_voltage = 10030 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 532 | NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"]; |
| 533 | DiskIo disk_io = 10032 [(module) = "framework"]; |
| 534 | PowerProfile power_profile = 10033 [(module) = "framework"]; |
| 535 | ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"]; |
| 536 | ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"]; |
| 537 | CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"]; |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 538 | OnDevicePowerMeasurement on_device_power_measurement = 10038; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 539 | DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"]; |
| 540 | DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = |
| 541 | 10040 [(module) = "framework"]; |
| 542 | DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = |
| 543 | 10041 [(module) = "framework"]; |
| 544 | ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"]; |
Jeffrey Huang | 9a3c1b6 | 2020-01-27 17:33:13 -0800 | [diff] [blame] | 545 | BatteryLevel battery_level = 10043 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 546 | BuildInformation build_information = 10044 [(module) = "framework"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 547 | BatteryCycleCount battery_cycle_count = 10045 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 548 | DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"]; |
| 549 | DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"]; |
| 550 | NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"]; |
| 551 | RoleHolder role_holder = 10049 [(module) = "framework"]; |
| 552 | DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 553 | TrainInfo train_info = 10051 [(module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 554 | TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"]; |
| 555 | ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 556 | GpuStatsGlobalInfo gpu_stats_global_info = 10054; |
| 557 | GpuStatsAppInfo gpu_stats_app_info = 10055; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 558 | SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"]; |
| 559 | AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"]; |
| 560 | FaceSettings face_settings = 10058 [(module) = "framework"]; |
| 561 | CoolingDevice cooling_device = 10059 [(module) = "framework"]; |
| 562 | AppOps app_ops = 10060 [(module) = "framework"]; |
| 563 | ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"]; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 564 | SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062; |
| 565 | SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 566 | ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"]; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 567 | VmsClientStats vms_client_stats = 10065 [(module) = "car"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 568 | NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"]; |
| 569 | DangerousPermissionStateSampled dangerous_permission_state_sampled = |
| 570 | 10067 [(module) = "framework"]; |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 571 | GraphicsStats graphics_stats = 10068; |
Stanislav Zholnin | 88c6f32 | 2020-01-29 14:48:11 +0000 | [diff] [blame] | 572 | RuntimeAppOpAccess runtime_app_op_access = 10069 [(module) = "framework"]; |
Kenny Root | 6c218db | 2020-02-02 17:43:44 +0000 | [diff] [blame] | 573 | IonHeapSize ion_heap_size = 10070 [(module) = "framework"]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 574 | PackageNotificationPreferences package_notification_preferences = |
| 575 | 10071 [(module) = "framework"]; |
| 576 | PackageNotificationChannelPreferences package_notification_channel_preferences = |
| 577 | 10072 [(module) = "framework"]; |
| 578 | PackageNotificationChannelGroupPreferences package_notification_channel_group_preferences = |
| 579 | 10073 [(module) = "framework"]; |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 580 | GnssStats gnss_stats = 10074 [(module) = "framework"]; |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 581 | AttributedAppOps attributed_app_ops = 10075 [(module) = "framework"]; |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 582 | VoiceCallSession voice_call_session = 10076 [(module) = "telephony"]; |
| 583 | VoiceCallRatUsage voice_call_rat_usage = 10077 [(module) = "telephony"]; |
| 584 | SimSlotState sim_slot_state = 10078 [(module) = "telephony"]; |
| 585 | SupportedRadioAccessFamily supported_radio_access_family = 10079 [(module) = "telephony"]; |
Raff Tsai | ea4db18 | 2020-03-06 07:45:43 +0800 | [diff] [blame] | 586 | SettingSnapshot setting_snapshot = 10080 [(module) = "framework"]; |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 587 | BlobInfo blob_info = 10081 [(module) = "framework"]; |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 588 | DataUsageBytesTransfer data_usage_bytes_transfer = 10082 [(module) = "framework"]; |
Ruchir Rastogi | 56579cb | 2020-05-14 10:44:19 -0700 | [diff] [blame] | 589 | BytesTransferByTagAndMetered bytes_transfer_by_tag_and_metered = |
| 590 | 10083 [(module) = "framework"]; |
Chris Wren | 9316569 | 2020-05-15 16:12:41 -0400 | [diff] [blame] | 591 | DNDModeProto dnd_mode_rule = 10084 [(module) = "framework"]; |
shafik | bb20605 | 2020-06-17 14:49:31 +0100 | [diff] [blame] | 592 | GeneralExternalStorageAccessStats general_external_storage_access_stats = |
| 593 | 10085 [(module) = "mediaprovider"]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 594 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 595 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 596 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 597 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 598 | // 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] | 599 | |
| 600 | reserved 10036; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 601 | } |
| 602 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 603 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 604 | * This proto represents a node of an attribution chain. |
| 605 | * Note: All attribution chains are represented as a repeated field of type |
| 606 | * AttributionNode. It is understood that in such arrays, the order is that |
| 607 | * 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] | 608 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 609 | message AttributionNode { |
| 610 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 611 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 612 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 613 | // The (optional) string tag for an element in the attribution chain. If the |
| 614 | // element has no tag, it is encoded as an empty string. |
| 615 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 616 | } |
| 617 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 618 | message KeyValuePair { |
| 619 | optional int32 key = 1; |
| 620 | oneof value { |
Howard Ro | 4078dd4 | 2018-09-27 17:41:08 -0700 | [diff] [blame] | 621 | int32 value_int = 2; |
| 622 | int64 value_long = 3; |
| 623 | string value_str = 4; |
| 624 | float value_float = 5; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 625 | } |
| 626 | } |
| 627 | |
| 628 | message KeyValuePairsAtom { |
| 629 | optional int32 uid = 1; |
| 630 | repeated KeyValuePair pairs = 2; |
| 631 | } |
| 632 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 633 | /* |
| 634 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 635 | * 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] | 636 | * |
| 637 | * RULES: |
| 638 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 639 | * Skipping field ids is not allowed. |
| 640 | * - These form an API, so renaming, renumbering or removing fields is |
| 641 | * not allowed between android releases. (This is not currently enforced, |
| 642 | * but there will be a tool to enforce this restriction). |
| 643 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 644 | * are allowed (yet). The bytes type is also not allowed. |
| 645 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 646 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 647 | * - 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] | 648 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 649 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 650 | * annotation. The generated code on android will be represented by UIDs, |
| 651 | * and those UIDs will be translated in xxx to those strings. |
| 652 | * |
| 653 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 654 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 655 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 656 | * ***************************************************************************** |
| 657 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 658 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 659 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 660 | * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 661 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 662 | * |
| 663 | * Logged from: |
| 664 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 665 | */ |
| 666 | message ThermalThrottlingStateChanged { |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 667 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 668 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 669 | |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 670 | // Throttling state, this field is DEPRECATED |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 671 | enum State { |
| 672 | UNKNOWN = 0; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 673 | START = 1; // START indicated that throttling was triggered. |
| 674 | STOP = 2; // STOP indicates that throttling was cleared. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 675 | } |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 676 | optional State state = 2; |
| 677 | |
| 678 | optional float temperature = 3; |
| 679 | } |
| 680 | |
| 681 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 682 | * Logs when the screen state changes. |
| 683 | * |
| 684 | * Logged from: |
| 685 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 686 | */ |
| 687 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 688 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 689 | optional android.view.DisplayStateEnum state = 1 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 690 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 691 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 692 | |
| 693 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 694 | * Logs that the process state of the uid, as determined by ActivityManager |
| 695 | * (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] | 696 | * |
| 697 | * Logged from: |
| 698 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 699 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 700 | message UidProcessStateChanged { |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 701 | 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] | 702 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 703 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 704 | optional android.app.ProcessStateEnum state = 2 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 705 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 706 | } |
| 707 | |
| 708 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 709 | * Logs process state change of a process, as per the activity manager. |
| 710 | * |
| 711 | * Logged from: |
| 712 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 713 | */ |
| 714 | message ProcessStateChanged { |
| 715 | optional int32 uid = 1; |
| 716 | optional string process_name = 2; |
| 717 | optional string package_name = 3; |
| 718 | // TODO: remove this when validation is done |
| 719 | optional int64 version = 5; |
| 720 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 721 | optional android.app.ProcessStateEnum state = 4; |
| 722 | } |
| 723 | |
| 724 | /** |
| 725 | * Logs when ActivityManagerService sleep state is changed. |
| 726 | * |
| 727 | * Logged from: |
| 728 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 729 | */ |
| 730 | message ActivityManagerSleepStateChanged { |
| 731 | // TODO: import frameworks proto |
| 732 | enum State { |
| 733 | UNKNOWN = 0; |
| 734 | ASLEEP = 1; |
| 735 | AWAKE = 2; |
| 736 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 737 | optional State state = 1 |
| 738 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 739 | } |
| 740 | |
| 741 | /** |
| 742 | * Logs when system memory state changes. |
| 743 | * |
| 744 | * Logged from: |
| 745 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 746 | */ |
| 747 | message MemoryFactorStateChanged { |
| 748 | // TODO: import frameworks proto |
| 749 | enum State { |
| 750 | MEMORY_UNKNOWN = 0; |
| 751 | NORMAL = 1; // normal. |
| 752 | MODERATE = 2; // moderate memory pressure. |
| 753 | LOW = 3; // low memory. |
| 754 | CRITICAL = 4; // critical memory. |
| 755 | |
| 756 | } |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 757 | optional State factor = 1 [(state_field_option).exclusive_state = true]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 758 | } |
| 759 | |
| 760 | /** |
| 761 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 762 | * |
| 763 | * Logged from: |
| 764 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 765 | */ |
| 766 | message ExcessiveCpuUsageReported { |
| 767 | optional int32 uid = 1; |
| 768 | optional string process_name = 2; |
| 769 | optional string package_name = 3; |
| 770 | // package version. TODO: remove this when validation is done |
| 771 | optional int64 version = 4; |
| 772 | } |
| 773 | |
| 774 | /** |
| 775 | * Logs when a cached process is killed, along with its pss. |
| 776 | * |
| 777 | * Logged from: |
| 778 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 779 | */ |
| 780 | message CachedKillReported { |
| 781 | optional int32 uid = 1; |
| 782 | optional string process_name = 2; |
| 783 | optional string package_name = 3; |
| 784 | // TODO: remove this when validation is done |
| 785 | optional int64 version = 5; |
| 786 | optional int64 pss = 4; |
| 787 | } |
| 788 | |
| 789 | /** |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 790 | * Logs the change in wifi health. |
| 791 | * |
| 792 | * Logged from: |
| 793 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDataStall.java |
| 794 | */ |
| 795 | message WifiHealthStatReported { |
xshu | 39bfd93 | 2020-02-14 15:49:24 -0800 | [diff] [blame] | 796 | enum Band { |
| 797 | UNKNOWN = 0; |
| 798 | // All of 2.4GHz band |
| 799 | BAND_2G = 1; |
| 800 | // Frequencies in the range of [5150, 5250) GHz |
| 801 | BAND_5G_LOW = 2; |
| 802 | // Frequencies in the range of [5250, 5725) GHz |
| 803 | BAND_5G_MIDDLE = 3; |
| 804 | // Frequencies in the range of [5725, 5850) GHz |
| 805 | BAND_5G_HIGH = 4; |
| 806 | // Frequencies in the range of [5925, 6425) GHz |
| 807 | BAND_6G_LOW = 5; |
| 808 | // Frequencies in the range of [6425, 6875) GHz |
| 809 | BAND_6G_MIDDLE = 6; |
| 810 | // Frequencies in the range of [6875, 7125) GHz |
| 811 | BAND_6G_HIGH = 7; |
| 812 | } |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 813 | // duration this stat is obtained over in milliseconds |
| 814 | optional int32 duration_millis = 1; |
| 815 | // whether wifi is classified as sufficient for the user's data traffic, determined |
| 816 | // by whether the calculated throughput exceeds the average demand within |duration_millis| |
| 817 | optional bool is_sufficient = 2; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 818 | // whether cellular data is available |
xshu | 39bfd93 | 2020-02-14 15:49:24 -0800 | [diff] [blame] | 819 | optional bool is_cell_data_available = 3; |
| 820 | // the Band bucket the connected network is on |
| 821 | optional Band band = 4; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 822 | } |
| 823 | |
| 824 | /** |
| 825 | * Logged when wifi detects a significant change in connection failure rate. |
| 826 | * |
| 827 | * Logged from: frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiHealthMonitor.java |
| 828 | * |
| 829 | */ |
| 830 | message WifiFailureStatReported { |
| 831 | enum AbnormalityType { |
| 832 | UNKNOWN = 0; |
| 833 | SIGNIFICANT_INCREASE = 1; |
| 834 | SIGNIFICANT_DECREASE = 2; |
| 835 | SIMPLY_HIGH = 3; |
| 836 | } |
| 837 | enum FailureType { |
| 838 | FAILURE_UNKNOWN = 0; |
| 839 | FAILURE_CONNECTION = 1; |
| 840 | FAILURE_ASSOCIATION_REJECTION = 2; |
| 841 | FAILURE_ASSOCIATION_TIMEOUT = 3; |
| 842 | FAILURE_AUTHENTICATION = 4; |
| 843 | FAILURE_NON_LOCAL_DISCONNECTION = 5; |
| 844 | FAILURE_SHORT_CONNECTION_DUE_TO_NON_LOCAL_DISCONNECTION = 6; |
| 845 | } |
| 846 | // Reason for uploading this stat |
| 847 | optional AbnormalityType abnormality_type = 1; |
| 848 | // The particular type of failure |
| 849 | optional FailureType failure_type = 2; |
| 850 | // How many times we have encountered this combination of AbnormalityType and FailureType |
| 851 | optional int32 failure_count = 3; |
| 852 | } |
| 853 | |
| 854 | /** |
| 855 | * Logs whether a wifi connection is successful and reasons for failure if it isn't. |
| 856 | * |
| 857 | * Logged from: |
| 858 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
| 859 | */ |
| 860 | message WifiConnectionResultReported { |
| 861 | enum FailureCode { |
| 862 | FAILURE_UNKNOWN = 0; |
| 863 | FAILURE_ASSOCIATION_TIMEOUT = 1; |
| 864 | FAILURE_ASSOCIATION_REJECTION = 2; |
| 865 | FAILURE_AUTHENTICATION_GENERAL = 3; |
| 866 | FAILURE_AUTHENTICATION_EAP = 4; |
| 867 | FAILURE_DHCP = 5; |
| 868 | FAILURE_NETWORK_DISCONNECTION = 6; |
| 869 | FAILURE_ROAM_TIMEOUT = 7; |
| 870 | } |
| 871 | // true represents a successful connection |
| 872 | optional bool connection_result = 1; |
| 873 | // reason for the connection failure |
| 874 | optional FailureCode failure_code = 2; |
| 875 | // scan rssi before the connection attempt |
| 876 | optional int32 rssi = 3; |
| 877 | } |
| 878 | |
| 879 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 880 | * Logs when memory stats of a process is reported. |
| 881 | * |
| 882 | * Logged from: |
| 883 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 884 | */ |
| 885 | message ProcessMemoryStatReported { |
| 886 | optional int32 uid = 1; |
| 887 | optional string process_name = 2; |
| 888 | optional string package_name = 3; |
| 889 | //TODO: remove this when validation is done |
| 890 | optional int64 version = 9; |
| 891 | optional int64 pss = 4; |
| 892 | optional int64 uss = 5; |
| 893 | optional int64 rss = 6; |
| 894 | enum Type { |
| 895 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 896 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 897 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 898 | ADD_PSS_EXTERNAL = 3; |
| 899 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 900 | } |
| 901 | optional Type type = 7; |
Muhammad Qureshi | dda7320 | 2019-03-07 13:54:20 -0800 | [diff] [blame] | 902 | optional int64 duration_millis = 8; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 903 | } |
| 904 | |
| 905 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 906 | * Logs that a process started, finished, crashed, or ANRed. |
| 907 | * |
| 908 | * Logged from: |
| 909 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 910 | */ |
| 911 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 912 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 913 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 914 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 915 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 916 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 917 | // What lifecycle state the process changed to. |
| 918 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 919 | enum State { |
| 920 | FINISHED = 0; |
| 921 | STARTED = 1; |
| 922 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 923 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 924 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 925 | } |
| 926 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 927 | /** |
| 928 | * Logs when the ble scan state changes. |
| 929 | * |
| 930 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 931 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 932 | */ |
| 933 | message BleScanStateChanged { |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 934 | repeated AttributionNode attribution_node = 1 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 935 | [(state_field_option).primary_field_first_uid = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 936 | |
| 937 | enum State { |
| 938 | OFF = 0; |
| 939 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 940 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 941 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 942 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 943 | optional State state = 2 [ |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 944 | (state_field_option).exclusive_state = true, |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 945 | (state_field_option).default_state_value = 0 /* State.OFF */, |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 946 | (state_field_option).trigger_state_reset_value = 2 /* State.RESET */, |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 947 | (state_field_option).nested = true |
| 948 | ]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 949 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 950 | // Does the scan have a filter. |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 951 | optional bool is_filtered = 3 [(state_field_option).primary_field = true]; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 952 | // 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] | 953 | optional bool is_first_match = 4 [(state_field_option).primary_field = true]; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 954 | // 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] | 955 | optional bool is_opportunistic = 5 [(state_field_option).primary_field = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 956 | } |
| 957 | |
| 958 | /** |
| 959 | * Logs reporting of a ble scan finding results. |
| 960 | * |
| 961 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 962 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 963 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 964 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 965 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 966 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 967 | |
| 968 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 969 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 970 | } |
| 971 | |
| 972 | /** |
| 973 | * Logs when a sensor state changes. |
| 974 | * |
| 975 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 976 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 977 | */ |
| 978 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 979 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 980 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 981 | // The id (int) of the sensor. |
| 982 | optional int32 sensor_id = 2; |
| 983 | |
| 984 | enum State { |
| 985 | OFF = 0; |
| 986 | ON = 1; |
| 987 | } |
| 988 | optional State state = 3; |
| 989 | } |
| 990 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 991 | /** |
| 992 | * Logs when GPS state changes. |
| 993 | * |
| 994 | * Logged from: |
| 995 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 996 | */ |
| 997 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 998 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 999 | |
| 1000 | enum State { |
| 1001 | OFF = 0; |
| 1002 | ON = 1; |
| 1003 | } |
| 1004 | optional State state = 2; |
| 1005 | } |
| 1006 | |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 1007 | /** |
| 1008 | * Logs when GPS signal quality. |
| 1009 | * |
| 1010 | * Logged from: |
| 1011 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 1012 | */ |
| 1013 | message GpsSignalQualityChanged { |
| 1014 | optional android.server.location.GpsSignalQualityEnum level = 1; |
| 1015 | } |
| 1016 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1017 | |
| 1018 | /** |
| 1019 | * Logs when a sync manager sync state changes. |
| 1020 | * |
| 1021 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1022 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1023 | */ |
| 1024 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1025 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1026 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1027 | // 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] | 1028 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1029 | |
| 1030 | enum State { |
| 1031 | OFF = 0; |
| 1032 | ON = 1; |
| 1033 | } |
| 1034 | optional State state = 3; |
| 1035 | } |
| 1036 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 1037 | /* |
| 1038 | * Deferred job stats. |
| 1039 | * |
| 1040 | * Logged from: |
| 1041 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 1042 | */ |
| 1043 | message DeferredJobStatsReported { |
| 1044 | repeated AttributionNode attribution_node = 1; |
| 1045 | |
| 1046 | // Number of jobs deferred. |
| 1047 | optional int32 num_jobs_deferred = 2; |
| 1048 | |
| 1049 | // Time since the last job runs. |
| 1050 | optional int64 time_since_last_job_millis = 3; |
| 1051 | } |
| 1052 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1053 | /** |
| 1054 | * Logs when a job scheduler job 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 ScheduledJobStateChanged { |
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 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1063 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1064 | |
| 1065 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 1066 | FINISHED = 0; |
| 1067 | STARTED = 1; |
| 1068 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1069 | } |
| 1070 | optional State state = 3; |
| 1071 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 1072 | // The reason a job has stopped. |
| 1073 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1074 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 1075 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 1076 | |
| 1077 | // The standby bucket of the app that scheduled the job. These match the framework constants |
| 1078 | // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is |
| 1079 | // already assigned 0. |
| 1080 | enum Bucket { |
| 1081 | UNKNOWN = -1; |
| 1082 | ACTIVE = 0; |
| 1083 | WORKING_SET = 1; |
| 1084 | FREQUENT = 2; |
| 1085 | RARE = 3; |
| 1086 | NEVER = 4; |
Kweku Adams | ae9d6be | 2020-01-14 16:10:14 -0800 | [diff] [blame] | 1087 | RESTRICTED = 5; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 1088 | } |
| 1089 | optional Bucket standby_bucket = 5 [default = UNKNOWN]; |
| 1090 | |
| 1091 | // The job id (as assigned by the app). |
| 1092 | optional int32 job_id = 6; |
Suprabh Shukla | 1b5778d | 2020-02-18 16:39:02 -0800 | [diff] [blame] | 1093 | |
| 1094 | // One flag for each of the API constraints defined by Jobscheduler. Does not include implcit |
| 1095 | // constraints as they are always assumed to be set. |
| 1096 | optional bool has_charging_constraint = 7; |
| 1097 | optional bool has_battery_not_low_constraint = 8; |
| 1098 | optional bool has_storage_not_low_constraint = 9; |
| 1099 | optional bool has_timing_delay_constraint = 10; |
| 1100 | optional bool has_deadline_constraint = 11; |
| 1101 | optional bool has_idle_constraint = 12; |
| 1102 | optional bool has_connectivity_constraint = 13; |
| 1103 | optional bool has_content_trigger_constraint = 14; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1104 | } |
| 1105 | |
| 1106 | /** |
| 1107 | * Logs when the audio state changes. |
| 1108 | * |
| 1109 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1110 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1111 | */ |
| 1112 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1113 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1114 | |
| 1115 | enum State { |
| 1116 | OFF = 0; |
| 1117 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1118 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 1119 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1120 | } |
| 1121 | optional State state = 2; |
| 1122 | } |
| 1123 | |
| 1124 | /** |
| 1125 | * Logs when the video codec state changes. |
| 1126 | * |
| 1127 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1128 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1129 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1130 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1131 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1132 | |
| 1133 | enum State { |
| 1134 | OFF = 0; |
| 1135 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1136 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 1137 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1138 | } |
| 1139 | optional State state = 2; |
| 1140 | } |
| 1141 | |
| 1142 | /** |
| 1143 | * Logs when the flashlight state changes. |
| 1144 | * |
| 1145 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1146 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1147 | */ |
| 1148 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1149 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1150 | |
| 1151 | enum State { |
| 1152 | OFF = 0; |
| 1153 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1154 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 1155 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1156 | } |
| 1157 | optional State state = 2; |
| 1158 | } |
| 1159 | |
| 1160 | /** |
| 1161 | * Logs when the camera state changes. |
| 1162 | * |
| 1163 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1164 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1165 | */ |
| 1166 | message CameraStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1167 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1168 | |
| 1169 | enum State { |
| 1170 | OFF = 0; |
| 1171 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1172 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 1173 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1174 | } |
| 1175 | optional State state = 2; |
| 1176 | } |
| 1177 | |
| 1178 | /** |
| 1179 | * 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] | 1180 | * |
| 1181 | * Logged from: |
| 1182 | * TODO |
| 1183 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 1184 | message WakelockStateChanged { |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 1185 | repeated AttributionNode attribution_node = 1 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1186 | [(state_field_option).primary_field_first_uid = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1187 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1188 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 1189 | // From frameworks/base/core/proto/android/os/enums.proto. |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1190 | optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).primary_field = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1191 | |
| 1192 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1193 | optional string tag = 3 [(state_field_option).primary_field = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1194 | |
| 1195 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 1196 | RELEASE = 0; |
| 1197 | ACQUIRE = 1; |
| 1198 | CHANGE_RELEASE = 2; |
| 1199 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1200 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 1201 | optional State state = 4 [ |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1202 | (state_field_option).exclusive_state = true, |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 1203 | (state_field_option).default_state_value = 0, |
| 1204 | (state_field_option).nested = true |
| 1205 | ]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1206 | } |
| 1207 | |
| 1208 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1209 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 1210 | * |
| 1211 | * Logged from: |
| 1212 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1213 | */ |
| 1214 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1215 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1216 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1217 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 1218 | optional string tag = 2; |
| 1219 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1220 | // TODO: I have no idea what this is. |
| 1221 | optional string history_tag = 3; |
| 1222 | |
| 1223 | enum State { |
| 1224 | OFF = 0; |
| 1225 | ON = 1; |
| 1226 | } |
| 1227 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1228 | } |
| 1229 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1230 | /** |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 1231 | * Logs when the device is interactive, according to the PowerManager Notifier. |
| 1232 | * |
| 1233 | * Logged from: |
| 1234 | * frameworks/base/services/core/java/com/android/server/power/Notifier.java |
| 1235 | */ |
| 1236 | message InteractiveStateChanged { |
| 1237 | enum State { |
| 1238 | OFF = 0; |
| 1239 | ON = 1; |
| 1240 | } |
| 1241 | optional State state = 1; |
| 1242 | } |
| 1243 | |
| 1244 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1245 | * Logs Battery Saver state change. |
| 1246 | * |
| 1247 | * Logged from: |
| 1248 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1249 | */ |
| 1250 | message BatterySaverModeStateChanged { |
| 1251 | enum State { |
| 1252 | OFF = 0; |
| 1253 | ON = 1; |
| 1254 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 1255 | optional State state = 1 |
| 1256 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1257 | } |
| 1258 | |
| 1259 | /** |
| 1260 | * Logs Doze mode state change. |
| 1261 | * |
| 1262 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1263 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1264 | */ |
| 1265 | message DeviceIdleModeStateChanged { |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 1266 | optional android.server.DeviceIdleModeEnum state = 1 |
| 1267 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1268 | } |
| 1269 | |
| 1270 | |
| 1271 | /** |
| 1272 | * Logs state change of Doze mode including maintenance windows. |
| 1273 | * |
| 1274 | * Logged from: |
| 1275 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1276 | */ |
| 1277 | message DeviceIdlingModeStateChanged { |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 1278 | optional android.server.DeviceIdleModeEnum state = 1 |
| 1279 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1280 | } |
| 1281 | |
| 1282 | /** |
| 1283 | * Logs screen brightness level. |
| 1284 | * |
| 1285 | * Logged from: |
| 1286 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1287 | */ |
| 1288 | message ScreenBrightnessChanged { |
| 1289 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 1290 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1291 | } |
| 1292 | |
| 1293 | /** |
| 1294 | * Logs battery level (percent full, from 0 to 100). |
| 1295 | * |
| 1296 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1297 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1298 | */ |
| 1299 | message BatteryLevelChanged { |
| 1300 | // Battery level. Should be in [0, 100]. |
| 1301 | optional int32 battery_level = 1; |
| 1302 | } |
| 1303 | |
| 1304 | /** |
| 1305 | * Logs change in charging status of the device. |
| 1306 | * |
| 1307 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1308 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1309 | */ |
| 1310 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1311 | // State of the battery, from frameworks/base/core/proto/android/os/enums.proto. |
Kweku Adams | 301f754 | 2020-05-13 13:10:34 -0700 | [diff] [blame] | 1312 | optional android.os.BatteryStatusEnum state = 1 |
| 1313 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1314 | } |
| 1315 | |
| 1316 | /** |
| 1317 | * Logs whether the device is plugged in, and what power source it is using. |
| 1318 | * |
| 1319 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1320 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1321 | */ |
| 1322 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1323 | // 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] | 1324 | optional android.os.BatteryPluggedStateEnum state = 1 |
| 1325 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1326 | } |
| 1327 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1328 | /** |
| 1329 | * Logs when an app's wakeup alarm fires. |
| 1330 | * |
| 1331 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1332 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1333 | */ |
| 1334 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1335 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1336 | |
| 1337 | // Name of the wakeup alarm. |
| 1338 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame] | 1339 | |
| 1340 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 1341 | optional string package_name = 3; |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1342 | |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1343 | // 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] | 1344 | optional AppStandbyBucketChanged.Bucket app_standby_bucket = 4; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1345 | } |
| 1346 | |
| 1347 | /** |
| 1348 | * Logs when an an app causes the mobile radio to change state. |
| 1349 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 1350 | * |
| 1351 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1352 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1353 | */ |
| 1354 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1355 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1356 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1357 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1358 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1359 | } |
| 1360 | |
| 1361 | /** |
| 1362 | * Logs when an an app causes the wifi radio to change state. |
| 1363 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 1364 | * |
| 1365 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1366 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1367 | */ |
| 1368 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1369 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1370 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1371 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1372 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1373 | } |
| 1374 | |
| 1375 | /** |
| 1376 | * Logs kernel wakeup reasons and aborts. |
| 1377 | * |
| 1378 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 1379 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1380 | */ |
| 1381 | message KernelWakeupReported { |
| 1382 | // Name of the kernel wakeup reason (or abort). |
| 1383 | optional string wakeup_reason_name = 1; |
| 1384 | |
| 1385 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1386 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1387 | } |
| 1388 | |
| 1389 | /** |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1390 | * Logs when Wifi is toggled on/off. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1391 | * 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] | 1392 | * |
| 1393 | * Logged from: |
| 1394 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1395 | */ |
| 1396 | message WifiEnabledStateChanged { |
| 1397 | enum State { |
| 1398 | OFF = 0; |
| 1399 | ON = 1; |
| 1400 | } |
| 1401 | optional State state = 1; |
| 1402 | } |
| 1403 | |
| 1404 | /** |
tsaichristine | cecebdc | 2020-02-04 14:05:56 -0800 | [diff] [blame] | 1405 | * This atom is deprecated starting in R. |
| 1406 | * |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1407 | * 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] | 1408 | * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'. |
| 1409 | * Note that Wifi Scanning is monitored separately in WifiScanStateChanged. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1410 | * |
| 1411 | * Logged from: |
| 1412 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1413 | */ |
| 1414 | message WifiRunningStateChanged { |
| 1415 | repeated AttributionNode attribution_node = 1; |
| 1416 | |
| 1417 | enum State { |
| 1418 | OFF = 0; |
| 1419 | ON = 1; |
| 1420 | } |
| 1421 | optional State state = 2; |
| 1422 | } |
| 1423 | |
| 1424 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1425 | * Logs wifi locks held by an app. |
| 1426 | * |
| 1427 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1428 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1429 | */ |
| 1430 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1431 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1432 | |
| 1433 | enum State { |
| 1434 | OFF = 0; |
| 1435 | ON = 1; |
| 1436 | } |
| 1437 | optional State state = 2; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 1438 | |
| 1439 | // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto. |
| 1440 | optional android.net.wifi.WifiModeEnum mode = 3; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1441 | } |
| 1442 | |
| 1443 | /** |
| 1444 | * Logs wifi signal strength changes. |
| 1445 | * |
| 1446 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1447 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1448 | */ |
| 1449 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1450 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1451 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1452 | } |
| 1453 | |
| 1454 | /** |
| 1455 | * Logs wifi scans performed by an app. |
| 1456 | * |
| 1457 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1458 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1459 | */ |
| 1460 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1461 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1462 | |
| 1463 | enum State { |
| 1464 | OFF = 0; |
| 1465 | ON = 1; |
| 1466 | } |
| 1467 | optional State state = 2; |
| 1468 | } |
| 1469 | |
| 1470 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1471 | * Logs wifi multicast locks held by an app |
| 1472 | * |
| 1473 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1474 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1475 | */ |
| 1476 | message WifiMulticastLockStateChanged { |
| 1477 | repeated AttributionNode attribution_node = 1; |
| 1478 | |
| 1479 | enum State { |
| 1480 | OFF = 0; |
| 1481 | ON = 1; |
| 1482 | } |
| 1483 | optional State state = 2; |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1484 | |
| 1485 | optional string tag = 3; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1486 | } |
| 1487 | |
| 1488 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1489 | * Logs shutdown reason and duration on next boot. |
| 1490 | * |
| 1491 | * Logged from: |
| 1492 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 1493 | */ |
| 1494 | message ShutdownSequenceReported { |
| 1495 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 1496 | optional bool reboot = 1; |
| 1497 | |
| 1498 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 1499 | optional string reason = 2; |
| 1500 | |
| 1501 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 1502 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1503 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1504 | |
| 1505 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1506 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1507 | } |
| 1508 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1509 | |
| 1510 | /** |
| 1511 | * Logs boot reason and duration. |
| 1512 | * |
| 1513 | * Logged from: |
| 1514 | * system/core/bootstat/bootstat.cpp |
| 1515 | */ |
| 1516 | message BootSequenceReported { |
| 1517 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 1518 | // Default: "<EMPTY>" if not available. |
| 1519 | optional string bootloader_reason = 1; |
| 1520 | |
| 1521 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 1522 | // Default: "<EMPTY>" if not available. |
| 1523 | optional string system_reason = 2; |
| 1524 | |
| 1525 | // 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] | 1526 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1527 | |
| 1528 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1529 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1530 | |
| 1531 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1532 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1533 | |
| 1534 | // Time since last boot in ms. Default: 0 if not available. |
| 1535 | optional int64 time_since_last_boot = 6; |
| 1536 | } |
| 1537 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 1538 | |
| 1539 | /** |
| 1540 | * Logs call state and disconnect cause (if applicable). |
| 1541 | * |
| 1542 | * Logged from: |
| 1543 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 1544 | */ |
| 1545 | message CallStateChanged { |
| 1546 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 1547 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1548 | optional android.telecom.CallStateEnum call_state = 1; |
| 1549 | |
| 1550 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 1551 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 1552 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 1553 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1554 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 1555 | |
| 1556 | // True if the call is self-managed, which are apps that use the |
| 1557 | // telecom infrastructure to make their own calls. |
| 1558 | optional bool self_managed = 3; |
| 1559 | |
| 1560 | // True if call is external. External calls are calls on connected Wear |
| 1561 | // devices but show up in Telecom so the user can pull them onto the device. |
| 1562 | optional bool external_call = 4; |
| 1563 | } |
| 1564 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1565 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1566 | * Logs keyguard state. The keyguard is the lock screen. |
| 1567 | * |
| 1568 | * Logged from: |
| 1569 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 1570 | */ |
| 1571 | message KeyguardStateChanged { |
| 1572 | enum State { |
| 1573 | UNKNOWN = 0; |
| 1574 | // The keyguard is hidden when the phone is unlocked. |
| 1575 | HIDDEN = 1; |
| 1576 | // The keyguard is shown when the phone is locked (screen turns off). |
| 1577 | SHOWN= 2; |
| 1578 | // The keyguard is occluded when something is overlaying the keyguard. |
| 1579 | // Eg. Opening the camera while on the lock screen. |
| 1580 | OCCLUDED = 3; |
| 1581 | } |
| 1582 | optional State state = 1; |
| 1583 | } |
| 1584 | |
| 1585 | /** |
| 1586 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 1587 | * prompts the user to enter a password (pattern, pin, etc). |
| 1588 | * |
| 1589 | * Logged from: |
| 1590 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 1591 | */ |
| 1592 | |
| 1593 | message KeyguardBouncerStateChanged { |
| 1594 | enum State { |
| 1595 | UNKNOWN = 0; |
| 1596 | // Bouncer is hidden, either as a result of successfully entering the |
| 1597 | // password, screen timing out, or user going back to lock screen. |
| 1598 | HIDDEN = 1; |
| 1599 | // This is when the user is being prompted to enter the password. |
| 1600 | SHOWN = 2; |
| 1601 | } |
| 1602 | optional State state = 1; |
| 1603 | } |
| 1604 | |
| 1605 | /** |
| 1606 | * Logs the result of entering a password into the keyguard bouncer. |
| 1607 | * |
| 1608 | * Logged from: |
| 1609 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 1610 | */ |
| 1611 | message KeyguardBouncerPasswordEntered { |
| 1612 | enum BouncerResult { |
| 1613 | UNKNOWN = 0; |
| 1614 | // The password entered was incorrect. |
| 1615 | FAILURE = 1; |
| 1616 | // The password entered was correct. |
| 1617 | SUCCESS = 2; |
| 1618 | } |
| 1619 | optional BouncerResult result = 1; |
| 1620 | } |
| 1621 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1622 | /* |
| 1623 | * Logs changes to the configuration of the device. The configuration is defined |
| 1624 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 1625 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1626 | * Please go there to interpret the possible values each field can be. |
| 1627 | * |
| 1628 | * Logged from: |
| 1629 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1630 | */ |
| 1631 | message ResourceConfigurationChanged { |
| 1632 | // Bit mask of color capabilities of the screen. |
| 1633 | // Contains information about the color gamut and hdr mode of the screen. |
| 1634 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1635 | optional int32 color_mode = 1; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1636 | |
| 1637 | // The target screen density being rendered to. |
| 1638 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1639 | optional int32 density_dpi = 2; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1640 | |
| 1641 | // Current user preference for the scaling factor for fonts, |
| 1642 | // relative to the base density scaling. |
| 1643 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1644 | optional float font_scale = 3; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1645 | |
| 1646 | // Flag indicating whether the hard keyboard is hidden. |
| 1647 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1648 | optional int32 hard_keyboard_hidden = 4; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1649 | |
| 1650 | // The type of keyboard attached to the device. |
| 1651 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1652 | optional int32 keyboard = 5; |
| 1653 | |
| 1654 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1655 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1656 | optional int32 keyboard_hidden = 6; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1657 | |
| 1658 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1659 | // 0 if undefined. |
| 1660 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1661 | optional int32 mcc = 7; |
| 1662 | |
| 1663 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1664 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1665 | // MNC_ZERO symbol defined in Configuration.java. |
| 1666 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1667 | optional int32 mnc = 8; |
| 1668 | |
| 1669 | // The kind of navigation available on the device. |
| 1670 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1671 | optional int32 navigation = 9; |
| 1672 | |
| 1673 | // Flag indicating whether the navigation is available. |
| 1674 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1675 | optional int32 navigation_hidden = 10; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1676 | |
| 1677 | // Overall orientation of the screen. |
| 1678 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1679 | optional int32 orientation = 11; |
| 1680 | |
| 1681 | // The current height of the available screen space, in dp units. |
| 1682 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1683 | optional int32 screen_height_dp = 12; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1684 | |
| 1685 | // Bit mask of overall layout of the screen. |
| 1686 | // Contains information about screen size, whether the screen is wider/taller |
| 1687 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1688 | // and whether the screen has a rounded shape. |
| 1689 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1690 | optional int32 screen_layout = 13; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1691 | |
| 1692 | // Current width of the available screen space, in dp units. |
| 1693 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1694 | optional int32 screen_width_dp = 14; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1695 | |
| 1696 | // The smallest screen size an application will see in normal operation. |
| 1697 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1698 | // in portrait and landscape. |
| 1699 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1700 | optional int32 smallest_screen_width_dp = 15; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1701 | |
| 1702 | // The type of touch screen attached to the device. |
| 1703 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1704 | optional int32 touchscreen = 16; |
| 1705 | |
| 1706 | // Bit mask of the ui mode. |
| 1707 | // Contains information about the overall ui mode of the device. |
| 1708 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1709 | // Also contains information about whether the device is in night mode. |
| 1710 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1711 | optional int32 ui_mode = 17; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1712 | } |
| 1713 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1714 | |
| 1715 | /** |
| 1716 | * Logs changes in the connection state of the mobile radio. |
| 1717 | * |
| 1718 | * Logged from: |
| 1719 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1720 | */ |
| 1721 | message MobileConnectionStateChanged { |
| 1722 | // States are from the state machine DataConnection.java. |
| 1723 | enum State { |
| 1724 | UNKNOWN = 0; |
| 1725 | // The connection is inactive, or disconnected. |
| 1726 | INACTIVE = 1; |
| 1727 | // The connection is being activated, or connecting. |
| 1728 | ACTIVATING = 2; |
| 1729 | // The connection is active, or connected. |
| 1730 | ACTIVE = 3; |
| 1731 | // The connection is disconnecting. |
| 1732 | DISCONNECTING = 4; |
| 1733 | // The connection is disconnecting after creating a connection. |
| 1734 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1735 | } |
| 1736 | optional State state = 1; |
| 1737 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1738 | optional int32 sim_slot_index = 2; |
| 1739 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1740 | // every new network created. Resets whenever the device reboots. |
| 1741 | optional int32 data_connection_id = 3; |
| 1742 | // A bitmask for the capabilities of this connection. |
| 1743 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1744 | // Default value (if we have no information): 0 |
| 1745 | optional int64 capabilities = 4; |
| 1746 | // If this connection has internet. |
| 1747 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1748 | optional bool has_internet = 5; |
| 1749 | } |
| 1750 | |
| 1751 | /** |
| 1752 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1753 | * |
| 1754 | * Logged from: |
| 1755 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1756 | */ |
| 1757 | message MobileRadioTechnologyChanged { |
| 1758 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1759 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1760 | optional int32 sim_slot_index = 2; |
| 1761 | } |
| 1762 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1763 | /** |
| 1764 | * Logs the VID and PID of any connected USB devices. |
| 1765 | * |
| 1766 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1767 | * |
| 1768 | * Logged by Vendor. |
| 1769 | */ |
| 1770 | message UsbDeviceAttached { |
| 1771 | optional int32 vid = 1; |
| 1772 | optional int32 pid = 2; |
| 1773 | optional bool has_audio = 3; |
| 1774 | optional bool has_hid = 4; |
| 1775 | optional bool has_storage = 5; |
Badhri Jagan Sridharan | 5ec629f | 2018-11-16 15:39:22 -0800 | [diff] [blame] | 1776 | enum State { |
| 1777 | STATE_DISCONNECTED = 0; |
| 1778 | STATE_CONNECTED = 1; |
| 1779 | } |
| 1780 | optional State state = 6; |
Badhri Jagan Sridharan | c2c54a2 | 2018-12-14 14:41:26 -0800 | [diff] [blame] | 1781 | optional int64 last_connect_duration_millis = 7; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1782 | } |
| 1783 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1784 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1785 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1786 | * Logs when Bluetooth is enabled and disabled. |
| 1787 | * |
| 1788 | * Logged from: |
| 1789 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1790 | */ |
| 1791 | message BluetoothEnabledStateChanged { |
| 1792 | repeated AttributionNode attribution_node = 1; |
| 1793 | // Whether or not bluetooth is enabled on the device. |
| 1794 | enum State { |
| 1795 | UNKNOWN = 0; |
| 1796 | ENABLED = 1; |
| 1797 | DISABLED = 2; |
| 1798 | } |
| 1799 | optional State state = 2; |
| 1800 | // The reason for being enabled/disabled. |
| 1801 | // Eg. Airplane mode, crash, application request. |
| 1802 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1803 | // 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] | 1804 | optional string pkg_name = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1805 | } |
| 1806 | |
| 1807 | /** |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1808 | * Logs when profiles on a Bluetooth device connects and disconnects. |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1809 | * |
| 1810 | * Logged from: |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1811 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 1812 | * |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1813 | * Next Tag: 6 |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1814 | */ |
| 1815 | message BluetoothConnectionStateChanged { |
| 1816 | // The state of the connection. |
| 1817 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1818 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1819 | // An identifier that can be used to match connect and disconnect events. |
| 1820 | // Currently is last two bytes of a hash of a device level ID and |
| 1821 | // the mac address of the bluetooth device that is connected. |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1822 | // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1823 | optional int32 obfuscated_id = 2 [deprecated = true]; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1824 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1825 | // From android.bluetooth.BluetoothAdapter.java |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1826 | // Default: 0 when not used |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1827 | optional int32 bt_profile = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1828 | // An identifier that can be used to match events for this device. |
| 1829 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1830 | // Salt: Randomly generated 256 bit value |
| 1831 | // Hash algorithm: HMAC-SHA256 |
| 1832 | // Size: 32 byte |
| 1833 | // Default: null or empty if the device identifier is not known |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1834 | optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1835 | // An identifier that can be used to match events for this device. |
| 1836 | // The incremental identifier is locally generated and guaranteed not derived |
| 1837 | // from any globally unique hardware id. |
| 1838 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1839 | // same remote device. |
| 1840 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1841 | // session for the same remote device. |
| 1842 | // Default: 0 if the device's metric id is unknown. |
| 1843 | optional int32 metric_id = 5; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1844 | } |
| 1845 | |
| 1846 | /** |
| 1847 | * Logs when a Bluetooth device connects and disconnects over ACL |
| 1848 | * |
| 1849 | * Logged from: |
| 1850 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1851 | * |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1852 | * Next Tag: 4 |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1853 | */ |
| 1854 | message BluetoothAclConnectionStateChanged { |
| 1855 | // An identifier that can be used to match events for this device. |
| 1856 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1857 | // Salt: Randomly generated 256 bit value |
| 1858 | // Hash algorithm: HMAC-SHA256 |
| 1859 | // Size: 32 byte |
| 1860 | // Default: null or empty if the device identifier is not known |
| 1861 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1862 | // The state of the connection. |
| 1863 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1864 | optional android.bluetooth.ConnectionStateEnum state = 2; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1865 | // An identifier that can be used to match events for this device. |
| 1866 | // The incremental identifier is locally generated and guaranteed not derived |
| 1867 | // from any globally unique hardware id. |
| 1868 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1869 | // same remote device. |
| 1870 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1871 | // session for the same remote device. |
| 1872 | // Default: 0 if the device's metric id is unknown. |
| 1873 | optional int32 metric_id = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1874 | } |
| 1875 | |
| 1876 | /** |
| 1877 | * Logs when a Bluetooth device connects and disconnects over SCO |
| 1878 | * |
| 1879 | * Logged from: |
| 1880 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java |
| 1881 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java |
| 1882 | * |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1883 | * Next Tag: 5 |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1884 | */ |
| 1885 | message BluetoothScoConnectionStateChanged { |
| 1886 | // An identifier that can be used to match events for this device. |
| 1887 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1888 | // Salt: Randomly generated 256 bit value |
| 1889 | // Hash algorithm: HMAC-SHA256 |
| 1890 | // Size: 32 byte |
| 1891 | // Default: null or empty if the device identifier is not known |
| 1892 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1893 | // The state of the connection. |
| 1894 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1895 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1896 | // Codec used for this SCO connection |
| 1897 | // Default: UNKNOWN |
| 1898 | optional android.bluetooth.hfp.ScoCodec codec = 3; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1899 | // An identifier that can be used to match events for this device. |
| 1900 | // The incremental identifier is locally generated and guaranteed not derived |
| 1901 | // from any globally unique hardware id. |
| 1902 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1903 | // same remote device. |
| 1904 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1905 | // session for the same remote device. |
| 1906 | // Default: 0 if the device's metric id is unknown. |
| 1907 | optional int32 metric_id = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1908 | } |
| 1909 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1910 | /** |
| 1911 | * Logged when active device of a profile changes |
| 1912 | * |
| 1913 | * Logged from: |
| 1914 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1915 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java |
| 1916 | * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java |
| 1917 | */ |
| 1918 | message BluetoothActiveDeviceChanged { |
| 1919 | // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID |
| 1920 | // From android.bluetooth.BluetoothProfile |
| 1921 | optional int32 bt_profile = 1; |
| 1922 | // An identifier that can be used to match events for this new active device. |
| 1923 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1924 | // Salt: Randomly generated 256 bit value |
| 1925 | // Hash algorithm: HMAC-SHA256 |
| 1926 | // Size: 32 byte |
| 1927 | // Default: null or empty if there is no active device for this profile |
| 1928 | optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1929 | // An identifier that can be used to match events for this device. |
| 1930 | // The incremental identifier is locally generated and guaranteed not derived |
| 1931 | // from any globally unique hardware id. |
| 1932 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1933 | // same remote device. |
| 1934 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1935 | // session for the same remote device. |
| 1936 | // Default: 0 if the device's metric id is unknown. |
| 1937 | optional int32 metric_id = 3; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1938 | } |
| 1939 | |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1940 | // Logs when there is an event affecting Bluetooth device's link layer connection. |
| 1941 | // - This event is triggered when there is a related HCI command or event |
| 1942 | // - Users of this metrics can deduce Bluetooth device's connection state from these events |
| 1943 | // - HCI commands are logged before the command is sent, after receiving command status, and after |
| 1944 | // receiving command complete |
| 1945 | // - HCI events are logged when they arrive |
| 1946 | // |
| 1947 | // Low level log from system/bt |
| 1948 | // |
| 1949 | // Bluetooth classic commands: |
| 1950 | // - CMD_CREATE_CONNECTION |
| 1951 | // - CMD_DISCONNECT |
| 1952 | // - CMD_CREATE_CONNECTION_CANCEL |
| 1953 | // - CMD_ACCEPT_CONNECTION_REQUEST |
| 1954 | // - CMD_REJECT_CONNECTION_REQUEST |
| 1955 | // - CMD_SETUP_ESCO_CONNECTION |
| 1956 | // - CMD_ACCEPT_ESCO_CONNECTION |
| 1957 | // - CMD_REJECT_ESCO_CONNECTION |
| 1958 | // - CMD_ENH_SETUP_ESCO_CONNECTION |
| 1959 | // - CMD_ENH_ACCEPT_ESCO_CONNECTION |
| 1960 | // |
| 1961 | // Bluetooth low energy commands: |
| 1962 | // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] |
| 1963 | // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] |
| 1964 | // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] |
| 1965 | // - CMD_BLE_CLEAR_WHITE_LIST |
| 1966 | // - CMD_BLE_ADD_WHITE_LIST |
| 1967 | // - CMD_BLE_REMOVE_WHITE_LIST |
| 1968 | // |
| 1969 | // Bluetooth classic events: |
| 1970 | // - EVT_CONNECTION_COMP |
| 1971 | // - EVT_CONNECTION_REQUEST |
| 1972 | // - EVT_DISCONNECTION_COMP |
| 1973 | // - EVT_ESCO_CONNECTION_COMP |
| 1974 | // - EVT_ESCO_CONNECTION_CHANGED |
| 1975 | // |
| 1976 | // Bluetooth low energy meta events: |
| 1977 | // - BLE_EVT_CONN_COMPLETE_EVT |
| 1978 | // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT |
| 1979 | // |
| 1980 | // Next tag: 10 |
| 1981 | message BluetoothLinkLayerConnectionEvent { |
| 1982 | // An identifier that can be used to match events for this device. |
| 1983 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1984 | // Salt: Randomly generated 256 bit value |
| 1985 | // Hash algorithm: HMAC-SHA256 |
| 1986 | // Size: 32 byte |
| 1987 | // Default: null or empty if the device identifier is not known |
| 1988 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1989 | // Connection handle of this connection if available |
| 1990 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1991 | // Default: 0xFFFF if the handle is unknown |
| 1992 | optional int32 connection_handle = 2; |
| 1993 | // Direction of the link |
| 1994 | // Default: DIRECTION_UNKNOWN |
| 1995 | optional android.bluetooth.DirectionEnum direction = 3; |
| 1996 | // Type of this link |
| 1997 | // Default: LINK_TYPE_UNKNOWN |
| 1998 | optional android.bluetooth.LinkTypeEnum type = 4; |
| 1999 | |
| 2000 | // Reason metadata for this link layer connection event, rules for interpretation: |
| 2001 | // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or |
| 2002 | // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case |
| 2003 | // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is |
| 2004 | // set and valid, ignore hci_ble_event |
| 2005 | |
| 2006 | // HCI command associated with this event |
| 2007 | // Default: CMD_UNKNOWN |
| 2008 | optional android.bluetooth.hci.CommandEnum hci_cmd = 5; |
| 2009 | // HCI event associated with this event |
| 2010 | // Default: EVT_UNKNOWN |
| 2011 | optional android.bluetooth.hci.EventEnum hci_event = 6; |
| 2012 | // HCI BLE meta event associated with this event |
| 2013 | // Default: BLE_EVT_UNKNOWN |
| 2014 | optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; |
| 2015 | // HCI command status code if this is triggerred by hci_cmd |
| 2016 | // Default: STATUS_UNKNOWN |
| 2017 | optional android.bluetooth.hci.StatusEnum cmd_status = 8; |
| 2018 | // HCI reason code associated with this event |
| 2019 | // Default: STATUS_UNKNOWN |
| 2020 | optional android.bluetooth.hci.StatusEnum reason_code = 9; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2021 | // An identifier that can be used to match events for this device. |
| 2022 | // The incremental identifier is locally generated and guaranteed not derived |
| 2023 | // from any globally unique hardware id. |
| 2024 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2025 | // same remote device. |
| 2026 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2027 | // session for the same remote device. |
| 2028 | // Default: 0 if the device's metric id is unknown. |
| 2029 | optional int32 metric_id = 10; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 2030 | } |
| 2031 | |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 2032 | /** |
| 2033 | * Logs when a module is rolled back by Watchdog. |
| 2034 | * |
| 2035 | * Logged from: Rollback Manager |
| 2036 | */ |
| 2037 | message WatchdogRollbackOccurred { |
| 2038 | enum RollbackType { |
| 2039 | UNKNOWN = 0; |
| 2040 | ROLLBACK_INITIATE = 1; |
| 2041 | ROLLBACK_SUCCESS = 2; |
| 2042 | ROLLBACK_FAILURE = 3; |
Howard Ro | e4d6fed | 2019-03-04 16:54:19 -0800 | [diff] [blame] | 2043 | ROLLBACK_BOOT_TRIGGERED = 4; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 2044 | } |
| 2045 | optional RollbackType rollback_type = 1; |
| 2046 | |
| 2047 | optional string package_name = 2; |
| 2048 | |
| 2049 | optional int32 package_version_code = 3; |
Gavin Corkery | 254b0d5 | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 2050 | |
| 2051 | enum RollbackReasonType { |
| 2052 | REASON_UNKNOWN = 0; |
| 2053 | REASON_NATIVE_CRASH = 1; |
| 2054 | REASON_EXPLICIT_HEALTH_CHECK = 2; |
| 2055 | REASON_APP_CRASH = 3; |
| 2056 | REASON_APP_NOT_RESPONDING = 4; |
Gavin Corkery | 3285d22 | 2020-01-17 19:24:22 +0000 | [diff] [blame] | 2057 | REASON_NATIVE_CRASH_DURING_BOOT = 5; |
Gavin Corkery | 254b0d5 | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 2058 | } |
| 2059 | optional RollbackReasonType rollback_reason = 4; |
| 2060 | |
| 2061 | // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback |
| 2062 | // is initiated. Empty if the package is unknown. |
| 2063 | optional string failing_package_name = 5; |
Jonathan Nguyen | 703c42f | 2020-02-04 15:54:26 -0800 | [diff] [blame] | 2064 | |
| 2065 | optional TrainExperimentIds experiment_ids = 6 [(log_mode) = MODE_BYTES]; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 2066 | } |
| 2067 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2068 | /** |
| 2069 | * Logs when there is a change in Bluetooth A2DP playback state |
| 2070 | * |
| 2071 | * Logged from: |
| 2072 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 2073 | */ |
| 2074 | message BluetoothA2dpPlaybackStateChanged { |
| 2075 | // An identifier that can be used to match events for this device. |
| 2076 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2077 | // Salt: Randomly generated 256 bit value |
| 2078 | // Hash algorithm: HMAC-SHA256 |
| 2079 | // Size: 32 byte |
| 2080 | // Default: null or empty if the device identifier is not known |
| 2081 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2082 | // Current playback state |
| 2083 | // Default: PLAYBACK_STATE_UNKNOWN |
| 2084 | optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; |
| 2085 | // Current audio coding mode |
| 2086 | // Default: AUDIO_CODING_MODE_UNKNOWN |
| 2087 | optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2088 | // An identifier that can be used to match events for this device. |
| 2089 | // The incremental identifier is locally generated and guaranteed not derived |
| 2090 | // from any globally unique hardware id. |
| 2091 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2092 | // same remote device. |
| 2093 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2094 | // session for the same remote device. |
| 2095 | // Default: 0 if the device's metric id is unknown. |
| 2096 | optional int32 metric_id = 4; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2097 | } |
| 2098 | |
| 2099 | /** |
| 2100 | * Logs when there is a change in A2DP codec config for a particular remote device |
| 2101 | * |
| 2102 | * Logged from: |
| 2103 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 2104 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 2105 | */ |
| 2106 | message BluetoothA2dpCodecConfigChanged { |
| 2107 | // An identifier that can be used to match events for this device. |
| 2108 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2109 | // Salt: Randomly generated 256 bit value |
| 2110 | // Hash algorithm: HMAC-SHA256 |
| 2111 | // Size: 32 byte |
| 2112 | // Default: null or empty if the device identifier is not known |
| 2113 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2114 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 2115 | // Default SOURCE_CODEC_TYPE_INVALID |
| 2116 | optional int32 codec_type = 2; |
| 2117 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 2118 | // Default: CODEC_PRIORITY_DEFAULT |
| 2119 | optional int32 codec_priority = 3; |
| 2120 | // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig |
| 2121 | // Default: SAMPLE_RATE_NONE |
| 2122 | optional int32 sample_rate = 4; |
| 2123 | // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig |
| 2124 | // Default: BITS_PER_SAMPLE_NONE |
| 2125 | optional int32 bits_per_sample = 5; |
| 2126 | // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig |
| 2127 | // Default: CHANNEL_MODE_NONE |
| 2128 | optional int32 channel_mode = 6; |
| 2129 | // Codec specific values |
| 2130 | // Default 0 |
| 2131 | optional int64 codec_specific_1 = 7; |
| 2132 | optional int64 codec_specific_2 = 8; |
| 2133 | optional int64 codec_specific_3 = 9; |
| 2134 | optional int64 codec_specific_4 = 10; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2135 | // An identifier that can be used to match events for this device. |
| 2136 | // The incremental identifier is locally generated and guaranteed not derived |
| 2137 | // from any globally unique hardware id. |
| 2138 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2139 | // same remote device. |
| 2140 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2141 | // session for the same remote device. |
| 2142 | // Default: 0 if the device's metric id is unknown. |
| 2143 | optional int32 metric_id = 11; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2144 | } |
| 2145 | |
| 2146 | /** |
| 2147 | * Logs when there is a change in selectable A2DP codec capability for a paricular remote device |
| 2148 | * Each codec's capability is logged separately due to statsd restriction |
| 2149 | * |
| 2150 | * Logged from: |
| 2151 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 2152 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 2153 | */ |
| 2154 | message BluetoothA2dpCodecCapabilityChanged { |
| 2155 | // An identifier that can be used to match events for this device. |
| 2156 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2157 | // Salt: Randomly generated 256 bit value |
| 2158 | // Hash algorithm: HMAC-SHA256 |
| 2159 | // Size: 32 byte |
| 2160 | // Default: null or empty if the device identifier is not known |
| 2161 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2162 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 2163 | // Default SOURCE_CODEC_TYPE_INVALID |
| 2164 | optional int32 codec_type = 2; |
| 2165 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 2166 | // Default: CODEC_PRIORITY_DEFAULT |
| 2167 | optional int32 codec_priority = 3; |
| 2168 | // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants |
| 2169 | // in BluetoothCodecConfig |
| 2170 | // Default: empty and SAMPLE_RATE_NONE for individual item |
| 2171 | optional int32 sample_rate = 4; |
| 2172 | // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants |
| 2173 | // in BluetoothCodecConfig |
| 2174 | // Default: empty and BITS_PER_SAMPLE_NONE for individual item |
| 2175 | optional int32 bits_per_sample = 5; |
| 2176 | // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in |
| 2177 | // BluetoothCodecConfig |
| 2178 | // Default: empty and CHANNEL_MODE_NONE for individual item |
| 2179 | optional int32 channel_mode = 6; |
| 2180 | // Codec specific values |
| 2181 | // Default 0 |
| 2182 | optional int64 codec_specific_1 = 7; |
| 2183 | optional int64 codec_specific_2 = 8; |
| 2184 | optional int64 codec_specific_3 = 9; |
| 2185 | optional int64 codec_specific_4 = 10; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2186 | // An identifier that can be used to match events for this device. |
| 2187 | // The incremental identifier is locally generated and guaranteed not derived |
| 2188 | // from any globally unique hardware id. |
| 2189 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2190 | // same remote device. |
| 2191 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2192 | // session for the same remote device. |
| 2193 | // Default: 0 if the device's metric id is unknown. |
| 2194 | optional int32 metric_id = 11; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2195 | } |
| 2196 | |
| 2197 | /** |
| 2198 | * Logs when A2DP failed to read from PCM source. |
| 2199 | * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. |
| 2200 | * |
| 2201 | * Logged from: |
| 2202 | * system/bt |
| 2203 | */ |
| 2204 | message BluetoothA2dpAudioUnderrunReported { |
| 2205 | // An identifier that can be used to match events for this device. |
| 2206 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2207 | // Salt: Randomly generated 256 bit value |
| 2208 | // Hash algorithm: HMAC-SHA256 |
| 2209 | // Size: 32 byte |
| 2210 | // Default: null or empty if the device identifier is not known |
| 2211 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2212 | // Encoding interval in nanoseconds |
| 2213 | // Default: 0 |
| 2214 | optional int64 encoding_interval_nanos = 2; |
| 2215 | // Number of bytes of PCM data that could not be read from the source |
| 2216 | // Default: 0 |
| 2217 | optional int32 num_missing_pcm_bytes = 3; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2218 | // An identifier that can be used to match events for this device. |
| 2219 | // The incremental identifier is locally generated and guaranteed not derived |
| 2220 | // from any globally unique hardware id. |
| 2221 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2222 | // same remote device. |
| 2223 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2224 | // session for the same remote device. |
| 2225 | // Default: 0 if the device's metric id is unknown. |
| 2226 | optional int32 metric_id = 4; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2227 | } |
| 2228 | |
| 2229 | /** |
| 2230 | * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit |
| 2231 | * buffer queue is full and we have to drop data |
| 2232 | * |
| 2233 | * Logged from: |
| 2234 | * system/bt |
| 2235 | */ |
| 2236 | message BluetoothA2dpAudioOverrunReported { |
| 2237 | // An identifier that can be used to match events for this device. |
| 2238 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2239 | // Salt: Randomly generated 256 bit value |
| 2240 | // Hash algorithm: HMAC-SHA256 |
| 2241 | // Size: 32 byte |
| 2242 | // Default: null or empty if the device identifier is not known |
| 2243 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2244 | // Encoding interval in nanoseconds |
| 2245 | // Default: 0 |
| 2246 | optional int64 encoding_interval_nanos = 2; |
| 2247 | // Number of buffers dropped in this event |
| 2248 | // Each buffer is encoded in one encoding interval and consists of multiple encoded frames |
| 2249 | // Default: 0 |
| 2250 | optional int32 num_dropped_buffers = 3; |
| 2251 | // Number of encoded buffers dropped in this event |
| 2252 | // Default 0 |
| 2253 | optional int32 num_dropped_encoded_frames = 4; |
| 2254 | // Number of encoded bytes dropped in this event |
| 2255 | // Default: 0 |
| 2256 | optional int32 num_dropped_encoded_bytes = 5; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2257 | // An identifier that can be used to match events for this device. |
| 2258 | // The incremental identifier is locally generated and guaranteed not derived |
| 2259 | // from any globally unique hardware id. |
| 2260 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2261 | // same remote device. |
| 2262 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2263 | // session for the same remote device. |
| 2264 | // Default: 0 if the device's metric id is unknown. |
| 2265 | optional int32 metric_id = 6; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2266 | } |
| 2267 | |
| 2268 | /** |
| 2269 | * Logs when we receive reports regarding a device's RSSI value |
| 2270 | * |
| 2271 | * Logged from: |
| 2272 | * system/bt |
| 2273 | */ |
| 2274 | message BluetoothDeviceRssiReported { |
| 2275 | // An identifier that can be used to match events for this device. |
| 2276 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2277 | // Salt: Randomly generated 256 bit value |
| 2278 | // Hash algorithm: HMAC-SHA256 |
| 2279 | // Size: 32 byte |
| 2280 | // Default: null or empty if the device identifier is not known |
| 2281 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2282 | // Connection handle of this connection if available |
| 2283 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2284 | // Default: 0xFFFF if the handle is unknown |
| 2285 | optional int32 connection_handle = 2; |
| 2286 | // HCI command status code if this is triggerred by hci_cmd |
| 2287 | // Default: STATUS_UNKNOWN |
| 2288 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 2289 | // BR/EDR |
| 2290 | // Range: -128 ≤ N ≤ 127 (signed integer) |
| 2291 | // Units: dB |
| 2292 | // LE: |
| 2293 | // Range: -127 to 20, 127 (signed integer) |
| 2294 | // Units: dBm |
| 2295 | // Invalid when an out of range value is reported |
| 2296 | optional int32 rssi = 4; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2297 | // An identifier that can be used to match events for this device. |
| 2298 | // The incremental identifier is locally generated and guaranteed not derived |
| 2299 | // from any globally unique hardware id. |
| 2300 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2301 | // same remote device. |
| 2302 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2303 | // session for the same remote device. |
| 2304 | // Default: 0 if the device's metric id is unknown. |
| 2305 | optional int32 metric_id = 5; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2306 | } |
| 2307 | |
| 2308 | /** |
| 2309 | * Logs when we receive reports regarding how many consecutive failed contacts for a connection |
| 2310 | * |
| 2311 | * Logged from: |
| 2312 | * system/bt |
| 2313 | */ |
| 2314 | message BluetoothDeviceFailedContactCounterReported { |
| 2315 | // An identifier that can be used to match events for this device. |
| 2316 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2317 | // Salt: Randomly generated 256 bit value |
| 2318 | // Hash algorithm: HMAC-SHA256 |
| 2319 | // Size: 32 byte |
| 2320 | // Default: null or empty if the device identifier is not known |
| 2321 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2322 | // Connection handle of this connection if available |
| 2323 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2324 | // Default: 0xFFFF if the handle is unknown |
| 2325 | optional int32 connection_handle = 2; |
| 2326 | // HCI command status code if this is triggerred by hci_cmd |
| 2327 | // Default: STATUS_UNKNOWN |
| 2328 | optional android.bluetooth.hci.StatusEnum cmd_status = 3; |
| 2329 | // Number of consecutive failed contacts for a connection corresponding to the Handle |
| 2330 | // Range: uint16_t, 0-0xFFFF |
| 2331 | // Default: 0xFFFFF |
| 2332 | optional int32 failed_contact_counter = 4; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2333 | // An identifier that can be used to match events for this device. |
| 2334 | // The incremental identifier is locally generated and guaranteed not derived |
| 2335 | // from any globally unique hardware id. |
| 2336 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2337 | // same remote device. |
| 2338 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2339 | // session for the same remote device. |
| 2340 | // Default: 0 if the device's metric id is unknown. |
| 2341 | optional int32 metric_id = 5; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2342 | } |
| 2343 | |
| 2344 | /** |
| 2345 | * Logs when we receive reports regarding the tranmit power level used for a specific connection |
| 2346 | * |
| 2347 | * Logged from: |
| 2348 | * system/bt |
| 2349 | */ |
| 2350 | message BluetoothDeviceTxPowerLevelReported { |
| 2351 | // An identifier that can be used to match events for this device. |
| 2352 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2353 | // Salt: Randomly generated 256 bit value |
| 2354 | // Hash algorithm: HMAC-SHA256 |
| 2355 | // Size: 32 byte |
| 2356 | // Default: null or empty if the device identifier is not known |
| 2357 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2358 | // Connection handle of this connection if available |
| 2359 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2360 | // Default: 0xFFFF if the handle is unknown |
| 2361 | optional int32 connection_handle = 2; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2362 | // HCI command status code if this is triggered by hci_cmd |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2363 | // Default: STATUS_UNKNOWN |
| 2364 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 2365 | // Range: -30 ≤ N ≤ 20 |
| 2366 | // Units: dBm |
| 2367 | // Invalid when an out of range value is reported |
| 2368 | optional int32 transmit_power_level = 4; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2369 | // An identifier that can be used to match events for this device. |
| 2370 | // The incremental identifier is locally generated and guaranteed not derived |
| 2371 | // from any globally unique hardware id. |
| 2372 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2373 | // same remote device. |
| 2374 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2375 | // session for the same remote device. |
| 2376 | // Default: 0 if the device's metric id is unknown. |
| 2377 | optional int32 metric_id = 5; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2378 | } |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 2379 | |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 2380 | /** |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2381 | * Logs when Bluetooth controller failed to reply with command status within a timeout period after |
| 2382 | * receiving an HCI command from the host |
| 2383 | * |
| 2384 | * Logged from: system/bt |
| 2385 | */ |
| 2386 | message BluetoothHciTimeoutReported { |
| 2387 | // HCI command associated with this event |
| 2388 | // Default: CMD_UNKNOWN |
| 2389 | optional android.bluetooth.hci.CommandEnum hci_command = 1; |
| 2390 | } |
| 2391 | |
| 2392 | /** |
| 2393 | * Logs when we receive Bluetooth Link Quality Report event from the controller |
| 2394 | * See Android Bluetooth HCI specification for more details |
| 2395 | * |
| 2396 | * Note: all count and bytes field are counted since last event |
| 2397 | * |
| 2398 | * Logged from: system/bt |
| 2399 | */ |
| 2400 | message BluetoothQualityReportReported { |
| 2401 | // Quality report ID |
| 2402 | // Original type: uint8_t |
| 2403 | // Default: BQR_ID_UNKNOWN |
| 2404 | optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; |
| 2405 | // Packet type of the connection |
| 2406 | // Original type: uint8_t |
| 2407 | // Default: BQR_PACKET_TYPE_UNKNOWN |
| 2408 | optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; |
| 2409 | // Connection handle of the connection |
| 2410 | // Original type: uint16_t |
| 2411 | optional int32 connection_handle = 3; |
| 2412 | // Performing Role for the connection |
| 2413 | // Original type: uint8_t |
| 2414 | optional int32 connection_role = 4; |
| 2415 | // Current Transmit Power Level for the connection. This value is the same as the controller's |
| 2416 | // response to the HCI_Read_Transmit_Power_Level HCI command |
| 2417 | // Original type: uint8_t |
| 2418 | optional int32 tx_power_level = 5; |
| 2419 | // Received Signal Strength Indication (RSSI) value for the connection. This value is an |
| 2420 | // absolute receiver signal strength value |
| 2421 | // Original type: int8_t |
| 2422 | optional int32 rssi = 6; |
| 2423 | // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the |
| 2424 | // channels used by the link currently |
| 2425 | // Original type: uint8_t |
| 2426 | optional int32 snr = 7; |
| 2427 | // Indicates the number of unused channels in AFH_channel_map |
| 2428 | // Original type: uint8_t |
| 2429 | optional int32 unused_afh_channel_count = 8; |
| 2430 | // Indicates the number of the channels which are interfered and quality is bad but are still |
| 2431 | // selected for AFH |
| 2432 | // Original type: uint8_t |
| 2433 | optional int32 afh_select_unideal_channel_count = 9; |
| 2434 | // Current Link Supervision Timeout Setting |
| 2435 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2436 | // Original type: uint16_t |
| 2437 | optional int32 lsto = 10; |
| 2438 | // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's |
| 2439 | // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of |
| 2440 | // 0x01 (Piconet Clock) |
| 2441 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2442 | // Original type: uint32_t |
| 2443 | optional int64 connection_piconet_clock = 11; |
| 2444 | // The count of retransmission |
| 2445 | // Original type: uint32_t |
| 2446 | optional int64 retransmission_count = 12; |
| 2447 | // The count of no RX |
| 2448 | // Original type: uint32_t |
| 2449 | optional int64 no_rx_count = 13; |
| 2450 | // The count of NAK (Negative Acknowledge) |
| 2451 | // Original type: uint32_t |
| 2452 | optional int64 nak_count = 14; |
| 2453 | // Controller timestamp of last TX ACK |
| 2454 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2455 | // Original type: uint32_t |
| 2456 | optional int64 last_tx_ack_timestamp = 15; |
| 2457 | // The count of Flow-off (STOP) |
| 2458 | // Original type: uint32_t |
| 2459 | optional int64 flow_off_count = 16; |
| 2460 | // Controller timestamp of last Flow-on (GO) |
| 2461 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2462 | // Original type: uint32_t |
| 2463 | optional int64 last_flow_on_timestamp = 17; |
| 2464 | // Buffer overflow count (how many bytes of TX data are dropped) since the last event |
| 2465 | // Original type: uint32_t |
| 2466 | optional int64 buffer_overflow_bytes = 18; |
| 2467 | // Buffer underflow count (in byte) since last event |
| 2468 | // Original type: uint32_t |
| 2469 | optional int64 buffer_underflow_bytes = 19; |
| 2470 | } |
| 2471 | |
| 2472 | /** |
| 2473 | * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack |
| 2474 | * |
| 2475 | * Notes: |
| 2476 | * - Each event can be partially filled as we might learn different pieces of device |
| 2477 | * information at different time |
| 2478 | * - Multiple device info events can be combined to give more complete picture |
| 2479 | * - When multiple device info events tries to describe the same information, the |
| 2480 | * later one wins |
| 2481 | * |
| 2482 | * Logged from: |
| 2483 | * packages/apps/Bluetooth |
| 2484 | */ |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 2485 | message BluetoothDeviceInfoReported { |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2486 | // An identifier that can be used to match events for this device. |
| 2487 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2488 | // Salt: Randomly generated 256 bit value |
| 2489 | // Hash algorithm: HMAC-SHA256 |
| 2490 | // Size: 32 byte |
| 2491 | // Default: null or empty if the device identifier is not known |
| 2492 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2493 | // Where is this device info obtained from |
| 2494 | optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; |
| 2495 | // Name of the data source |
| 2496 | // For EXTERNAL: package name of the data source |
| 2497 | // For INTERNAL: null for general case, component name otherwise |
| 2498 | optional string source_name = 3; |
| 2499 | // Name of the manufacturer of this device |
| 2500 | optional string manufacturer = 4; |
| 2501 | // Model of this device |
| 2502 | optional string model = 5; |
| 2503 | // Hardware version of this device |
| 2504 | optional string hardware_version = 6; |
| 2505 | // Software version of this device |
| 2506 | optional string software_version = 7; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2507 | // An identifier that can be used to match events for this device. |
| 2508 | // The incremental identifier is locally generated and guaranteed not derived |
| 2509 | // from any globally unique hardware id. |
| 2510 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2511 | // same remote device. |
| 2512 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2513 | // session for the same remote device. |
| 2514 | // Default: 0 if the device's metric id is unknown. |
| 2515 | optional int32 metric_id = 8; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2516 | } |
| 2517 | |
| 2518 | /** |
| 2519 | * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote |
| 2520 | * device, as documented by the Bluetooth Core HCI specification |
| 2521 | * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification |
| 2522 | * Vol 2, Part E, Page 1118 |
| 2523 | * |
| 2524 | * Logged from: |
| 2525 | * system/bt |
| 2526 | */ |
| 2527 | message BluetoothRemoteVersionInfoReported { |
| 2528 | // Connection handle of the connection |
| 2529 | // Original type: uint16_t |
| 2530 | optional int32 connection_handle = 1; |
| 2531 | // HCI command status code |
| 2532 | // Default: STATUS_UNKNOWN |
| 2533 | optional android.bluetooth.hci.StatusEnum hci_status = 2; |
| 2534 | // 1 byte Version of current LMP in the remote controller |
| 2535 | optional int32 lmp_version = 3; |
| 2536 | // 2 bytes LMP manufacturer code of the remote controller |
| 2537 | // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers |
| 2538 | optional int32 lmp_manufacturer_code = 4; |
| 2539 | // 4 bytes subversion of the LMP in the remote controller |
| 2540 | optional int32 lmp_subversion = 5; |
| 2541 | } |
| 2542 | |
| 2543 | /** |
| 2544 | * Logs when certain Bluetooth SDP attributes are discovered |
| 2545 | * Constant definitions are from: |
| 2546 | * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery |
| 2547 | * |
| 2548 | * Current logged attributes: |
| 2549 | * - BluetoothProfileDescriptorList |
| 2550 | * - Supported Features Bitmask |
| 2551 | * |
| 2552 | * Logged from: |
| 2553 | * system/bt |
| 2554 | */ |
| 2555 | message BluetoothSdpAttributeReported { |
| 2556 | // An identifier that can be used to match events for this device. |
| 2557 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2558 | // Salt: Randomly generated 256 bit value |
| 2559 | // Hash algorithm: HMAC-SHA256 |
| 2560 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2561 | // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes |
| 2562 | // Original type: uint16_t |
| 2563 | optional int32 protocol_uuid = 2; |
| 2564 | // Short form UUIDs used to identify Bluetooth SDP attribute types |
| 2565 | // Original type: uint16_t |
| 2566 | optional int32 attribute_id = 3; |
| 2567 | // Attribute value for the particular attribute |
| 2568 | optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2569 | // An identifier that can be used to match events for this device. |
| 2570 | // The incremental identifier is locally generated and guaranteed not derived |
| 2571 | // from any globally unique hardware id. |
| 2572 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2573 | // same remote device. |
| 2574 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2575 | // session for the same remote device. |
| 2576 | // Default: 0 if the device's metric id is unknown. |
| 2577 | optional int32 metric_id = 5; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2578 | } |
| 2579 | |
| 2580 | /** |
| 2581 | * Logs when bond state of a Bluetooth device changes |
| 2582 | * |
| 2583 | * Logged from: |
| 2584 | * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| 2585 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2586 | */ |
| 2587 | message BluetoothBondStateChanged { |
| 2588 | // An identifier that can be used to match events for this device. |
| 2589 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2590 | // Salt: Randomly generated 256 bit value |
| 2591 | // Hash algorithm: HMAC-SHA256 |
| 2592 | // Size: 32 byte |
| 2593 | // Default: null or empty if the device identifier is not known |
| 2594 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2595 | // Preferred transport type to remote dual mode device |
| 2596 | // Default: TRANSPORT_AUTO means no preference |
| 2597 | optional android.bluetooth.TransportTypeEnum transport = 2; |
| 2598 | // The type of this Bluetooth device (Classic, LE, or Dual mode) |
| 2599 | // Default: UNKNOWN |
| 2600 | optional android.bluetooth.DeviceTypeEnum type = 3; |
| 2601 | // Current bond state (NONE, BONDING, BONDED) |
| 2602 | // Default: BOND_STATE_UNKNOWN |
| 2603 | optional android.bluetooth.BondStateEnum bond_state = 4; |
| 2604 | // Bonding sub state |
| 2605 | // Default: BOND_SUB_STATE_UNKNOWN |
| 2606 | optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; |
| 2607 | // Unbond Reason |
| 2608 | // Default: UNBOND_REASON_UNKNOWN |
| 2609 | optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2610 | // An identifier that can be used to match events for this device. |
| 2611 | // The incremental identifier is locally generated and guaranteed not derived |
| 2612 | // from any globally unique hardware id. |
| 2613 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2614 | // same remote device. |
| 2615 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2616 | // session for the same remote device. |
| 2617 | // Default: 0 if the device's metric id is unknown. |
| 2618 | optional int32 metric_id = 7; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2619 | } |
| 2620 | |
| 2621 | /** |
| 2622 | * Logs there is an event related Bluetooth classic pairing |
| 2623 | * |
| 2624 | * Logged from: |
| 2625 | * system/bt |
| 2626 | */ |
| 2627 | message BluetoothClassicPairingEventReported { |
| 2628 | // An identifier that can be used to match events for this device. |
| 2629 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2630 | // Salt: Randomly generated 256 bit value |
| 2631 | // Hash algorithm: HMAC-SHA256 |
| 2632 | // Size: 32 byte |
| 2633 | // Default: null or empty if the device identifier is not known |
| 2634 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2635 | // Connection handle of this connection if available |
| 2636 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2637 | // Default: 0xFFFF if the handle is unknown |
| 2638 | optional int32 connection_handle = 2; |
| 2639 | // HCI command associated with this event |
| 2640 | // Default: CMD_UNKNOWN |
| 2641 | optional android.bluetooth.hci.CommandEnum hci_cmd = 3; |
| 2642 | // HCI event associated with this event |
| 2643 | // Default: EVT_UNKNOWN |
| 2644 | optional android.bluetooth.hci.EventEnum hci_event = 4; |
| 2645 | // HCI command status code if this is triggerred by hci_cmd |
| 2646 | // Default: STATUS_UNKNOWN |
| 2647 | optional android.bluetooth.hci.StatusEnum cmd_status = 5; |
| 2648 | // HCI reason code associated with this event |
| 2649 | // Default: STATUS_UNKNOWN |
| 2650 | optional android.bluetooth.hci.StatusEnum reason_code = 6; |
Jack He | 3b25983 | 2019-03-20 03:47:29 -0700 | [diff] [blame] | 2651 | // A status value related to this specific event |
| 2652 | // Default: 0 |
| 2653 | optional int64 event_value = 7; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2654 | // An identifier that can be used to match events for this device. |
| 2655 | // The incremental identifier is locally generated and guaranteed not derived |
| 2656 | // from any globally unique hardware id. |
| 2657 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2658 | // same remote device. |
| 2659 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2660 | // session for the same remote device. |
| 2661 | // Default: 0 if the device's metric id is unknown. |
| 2662 | optional int32 metric_id = 8; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2663 | } |
| 2664 | |
| 2665 | /** |
| 2666 | * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) |
| 2667 | * |
| 2668 | * Logged from: |
| 2669 | * system/bt |
| 2670 | */ |
| 2671 | message BluetoothSmpPairingEventReported { |
| 2672 | // An identifier that can be used to match events for this device. |
| 2673 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2674 | // Salt: Randomly generated 256 bit value |
| 2675 | // Hash algorithm: HMAC-SHA256 |
| 2676 | // Size: 32 byte |
| 2677 | // Default: null or empty if the device identifier is not known |
| 2678 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2679 | // SMP command sent or received over L2CAP |
| 2680 | // Default: CMD_UNKNOWN |
| 2681 | optional android.bluetooth.smp.CommandEnum smp_command = 2; |
| 2682 | // Whether this command is sent or received |
| 2683 | // Default: DIRECTION_UNKNOWN |
| 2684 | optional android.bluetooth.DirectionEnum direction = 3; |
| 2685 | // SMP failure reason code |
| 2686 | // Default: PAIRING_FAIL_REASON_DEFAULT |
| 2687 | optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2688 | // An identifier that can be used to match events for this device. |
| 2689 | // The incremental identifier is locally generated and guaranteed not derived |
| 2690 | // from any globally unique hardware id. |
| 2691 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2692 | // same remote device. |
| 2693 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2694 | // session for the same remote device. |
| 2695 | // Default: 0 if the device's metric id is unknown. |
| 2696 | optional int32 metric_id = 5; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2697 | } |
| 2698 | |
| 2699 | /** |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2700 | * Logs when a Bluetooth socket’s connection state changed |
| 2701 | * |
| 2702 | * Logged from: |
| 2703 | * system/bt |
| 2704 | */ |
| 2705 | message BluetoothSocketConnectionStateChanged { |
| 2706 | // An identifier that can be used to match events for this device. |
| 2707 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2708 | // Salt: Randomly generated 256 bit value |
| 2709 | // Hash algorithm: HMAC-SHA256 |
| 2710 | // Size: 32 byte |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2711 | // Default: null or empty if this is a server listener socket |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2712 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2713 | // Temporary port of this socket for the current connection or session only |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2714 | // Default 0 when unknown or don't care |
| 2715 | optional int32 port = 2; |
| 2716 | // Socket type as mentioned in |
| 2717 | // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java |
| 2718 | // Default: SOCKET_TYPE_UNKNOWN |
| 2719 | optional android.bluetooth.SocketTypeEnum type = 3; |
| 2720 | // Socket connection state |
| 2721 | // Default: SOCKET_CONNECTION_STATE_UNKNOWN |
| 2722 | optional android.bluetooth.SocketConnectionstateEnum state = 4; |
| 2723 | // Number of bytes sent to remote device during this connection |
| 2724 | optional int64 tx_bytes = 5; |
| 2725 | // Number of bytes received from remote device during this connection |
| 2726 | optional int64 rx_bytes = 6; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2727 | // Socket owner's UID |
| 2728 | optional int32 uid = 7 [(is_uid) = true]; |
| 2729 | // Server port of this socket, if any. When both |server_port| and |port| fields are populated, |
| 2730 | // |port| must be spawned by |server_port| |
| 2731 | // Default 0 when unknown or don't care |
| 2732 | optional int32 server_port = 8; |
| 2733 | // Whether this is a server listener socket |
| 2734 | optional android.bluetooth.SocketRoleEnum is_server = 9; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2735 | // An identifier that can be used to match events for this device. |
| 2736 | // The incremental identifier is locally generated and guaranteed not derived |
| 2737 | // from any globally unique hardware id. |
| 2738 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2739 | // same remote device. |
| 2740 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2741 | // session for the same remote device. |
| 2742 | // Default: 0 if the device's metric id is unknown. |
| 2743 | optional int32 metric_id = 10; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2744 | } |
| 2745 | |
| 2746 | /** |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2747 | * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection |
| 2748 | * |
| 2749 | * Logged from: |
| 2750 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2751 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 2752 | * |
| 2753 | */ |
| 2754 | message BluetoothClassOfDeviceReported { |
| 2755 | // An identifier that can be used to match events for this device. |
| 2756 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2757 | // Salt: Randomly generated 256 bit value |
| 2758 | // Hash algorithm: HMAC-SHA256 |
| 2759 | // Size: 32 byte |
| 2760 | // Default: null or empty if this is a server listener socket |
| 2761 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2762 | // Class of Device (CoD) value including both Major, Minor device class and service class |
| 2763 | // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband |
| 2764 | // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass |
| 2765 | // Default: 0 |
| 2766 | optional int32 class_of_device = 2; |
Chen Chen | 73b1c2e | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2767 | // An identifier that can be used to match events for this device. |
| 2768 | // The incremental identifier is locally generated and guaranteed not derived |
| 2769 | // from any globally unique hardware id. |
| 2770 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2771 | // same remote device. |
| 2772 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2773 | // session for the same remote device. |
| 2774 | // Default: 0 if the device's metric id is unknown. |
| 2775 | optional int32 metric_id = 3; |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2776 | } |
| 2777 | |
| 2778 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2779 | * Logs when something is plugged into or removed from the USB-C connector. |
| 2780 | * |
| 2781 | * Logged from: |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2782 | * UsbService |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2783 | */ |
| 2784 | message UsbConnectorStateChanged { |
| 2785 | enum State { |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2786 | STATE_DISCONNECTED = 0; |
| 2787 | STATE_CONNECTED = 1; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2788 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 2789 | optional State state = 1 |
| 2790 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
| 2791 | optional string id = 2 [(state_field_option).primary_field = true]; |
Badhri Jagan Sridharan | faf6207 | 2018-11-16 17:17:03 -0800 | [diff] [blame] | 2792 | // Last active session in ms. |
| 2793 | // 0 when the port is in connected state. |
| 2794 | optional int64 last_connect_duration_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2795 | } |
| 2796 | |
| 2797 | /** |
| 2798 | * Logs the reported speaker impedance. |
| 2799 | * |
| 2800 | * Logged from: |
| 2801 | * Vendor audio implementation. |
| 2802 | */ |
| 2803 | message SpeakerImpedanceReported { |
| 2804 | optional int32 speaker_location = 1; |
| 2805 | optional int32 impedance = 2; |
| 2806 | } |
| 2807 | |
| 2808 | /** |
| 2809 | * Logs the report of a failed hardware. |
| 2810 | * |
| 2811 | * Logged from: |
| 2812 | * Vendor HALs. |
| 2813 | * |
| 2814 | */ |
| 2815 | message HardwareFailed { |
| 2816 | enum HardwareType { |
| 2817 | HARDWARE_FAILED_UNKNOWN = 0; |
| 2818 | HARDWARE_FAILED_MICROPHONE = 1; |
| 2819 | HARDWARE_FAILED_CODEC = 2; |
| 2820 | HARDWARE_FAILED_SPEAKER = 3; |
| 2821 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 2822 | } |
| 2823 | optional HardwareType hardware_type = 1; |
| 2824 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2825 | /** |
| 2826 | * hardware_location allows vendors to differentiate between multiple instances of |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2827 | * the same hardware_type. The specific locations are vendor defined integers, |
| 2828 | * referring to board-specific numbering schemes. |
| 2829 | */ |
| 2830 | optional int32 hardware_location = 2; |
| 2831 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2832 | /** |
| 2833 | * failure_code is specific to the HardwareType of the failed hardware. |
| 2834 | * It should use one of the enum values defined below. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2835 | */ |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2836 | enum HardwareErrorCode { |
| 2837 | UNKNOWN = 0; |
| 2838 | COMPLETE = 1; |
| 2839 | SPEAKER_HIGH_Z = 2; |
| 2840 | SPEAKER_SHORT = 3; |
| 2841 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 2842 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
Maggie White | b76cebc | 2019-02-05 15:21:29 -0800 | [diff] [blame] | 2843 | DEGRADE = 6; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2844 | } |
| 2845 | optional int32 failure_code = 3; |
| 2846 | } |
| 2847 | |
| 2848 | /** |
| 2849 | * Log an event when the device has been physically dropped. |
| 2850 | * Reported from the /vendor partition. |
| 2851 | */ |
| 2852 | message PhysicalDropDetected { |
| 2853 | // Confidence that the event was actually a drop, 0 -> 100 |
| 2854 | optional int32 confidence_pctg = 1; |
| 2855 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 2856 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 2857 | // Duration of freefall in ms |
| 2858 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2859 | } |
| 2860 | |
| 2861 | /** |
| 2862 | * Log bucketed battery charge cycles. |
| 2863 | * |
| 2864 | * Each bucket represents cycles of the battery past |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2865 | * a given charge point. For example, if 10 cycle buckets are |
| 2866 | * initialized, bucket 1 is the lowest 1/10th of the battery, |
| 2867 | * and bucket 10 is 100%. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2868 | * |
| 2869 | * Logged from: |
| 2870 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 2871 | */ |
| 2872 | message ChargeCyclesReported { |
| 2873 | optional int32 cycle_bucket_1 = 1; |
| 2874 | optional int32 cycle_bucket_2 = 2; |
| 2875 | optional int32 cycle_bucket_3 = 3; |
| 2876 | optional int32 cycle_bucket_4 = 4; |
| 2877 | optional int32 cycle_bucket_5 = 5; |
| 2878 | optional int32 cycle_bucket_6 = 6; |
| 2879 | optional int32 cycle_bucket_7 = 7; |
| 2880 | optional int32 cycle_bucket_8 = 8; |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2881 | optional int32 cycle_bucket_9 = 9; |
| 2882 | optional int32 cycle_bucket_10 = 10; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2883 | } |
| 2884 | |
| 2885 | /** |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2886 | * Log battery health snapshot. |
| 2887 | * |
| 2888 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 2889 | * are snapshotted periodically over 24hrs. |
| 2890 | */ |
| 2891 | message BatteryHealthSnapshot { |
| 2892 | enum BatterySnapshotType { |
| 2893 | UNKNOWN = 0; |
| 2894 | MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 2895 | MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 2896 | MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 2897 | MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 2898 | MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 2899 | MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 2900 | MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 2901 | MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 2902 | MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 2903 | MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 2904 | AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 2905 | } |
| 2906 | optional BatterySnapshotType type = 1; |
| 2907 | // Temperature, in 1/10ths of degree C. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2908 | optional int32 temperature_deci_celsius = 2; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2909 | // Voltage Battery Voltage, in microVolts. |
| 2910 | optional int32 voltage_micro_volt = 3; |
| 2911 | // Current Battery current, in microAmps. |
| 2912 | optional int32 current_micro_amps = 4; |
| 2913 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 2914 | optional int32 open_circuit_micro_volt = 5; |
| 2915 | // Resistance Battery Resistance, in microOhms. |
| 2916 | optional int32 resistance_micro_ohm = 6; |
| 2917 | // Level Battery Level, as % of full. |
| 2918 | optional int32 level_percent = 7; |
| 2919 | } |
| 2920 | |
| 2921 | /** |
| 2922 | * Log slow I/O operations on the primary storage. |
| 2923 | */ |
| 2924 | message SlowIo { |
| 2925 | // Classifications of IO Operations. |
| 2926 | enum IoOperation { |
| 2927 | UNKNOWN = 0; |
| 2928 | READ = 1; |
| 2929 | WRITE = 2; |
| 2930 | UNMAP = 3; |
| 2931 | SYNC = 4; |
| 2932 | } |
| 2933 | optional IoOperation operation = 1; |
| 2934 | |
| 2935 | // The number of slow IO operations of this type over 24 hours. |
| 2936 | optional int32 count = 2; |
| 2937 | } |
| 2938 | |
| 2939 | /** |
| 2940 | * Log battery caused shutdown with the last recorded voltage. |
| 2941 | */ |
| 2942 | message BatteryCausedShutdown { |
| 2943 | // The last recorded battery voltage prior to shutdown. |
| 2944 | optional int32 last_recorded_micro_volt = 1; |
| 2945 | } |
| 2946 | |
| 2947 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 2948 | * Logs when ThermalService receives throttling events. |
| 2949 | * |
| 2950 | * Logged from: |
| 2951 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 2952 | */ |
| 2953 | message ThermalThrottlingSeverityStateChanged { |
| 2954 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
| 2955 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 2956 | |
| 2957 | // The name of the temperature source. Eg. CPU0 |
| 2958 | optional string sensor_name = 2; |
| 2959 | |
| 2960 | // Temperature in tenths of a degree C. |
| 2961 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
| 2962 | optional int32 temperature_deci_celsius = 3; |
| 2963 | |
| 2964 | // Relative severity of the throttling, see enum definition. |
| 2965 | optional android.os.ThrottlingSeverityEnum severity = 4; |
| 2966 | } |
| 2967 | |
| 2968 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2969 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 2970 | * |
| 2971 | * Logged from: |
| 2972 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 2973 | */ |
| 2974 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2975 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2976 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2977 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2978 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2979 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2980 | } |
| 2981 | |
| 2982 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2983 | * Logs phone signal strength changes. |
| 2984 | * |
| 2985 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2986 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2987 | */ |
| 2988 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 2989 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 2990 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2991 | } |
| 2992 | |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 2993 | |
| 2994 | /** |
| 2995 | * Logs when the phone state, sim state or signal strength changes |
| 2996 | * |
| 2997 | * Logged from: |
| 2998 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2999 | */ |
| 3000 | message PhoneServiceStateChanged { |
| 3001 | optional android.telephony.ServiceStateEnum state = 1; |
| 3002 | optional android.telephony.SimStateEnum sim_state = 2; |
| 3003 | optional android.telephony.SignalStrengthEnum signal_strength = 3; |
| 3004 | } |
| 3005 | |
| 3006 | /** |
| 3007 | * Logs when the phone becomes on or off. |
| 3008 | * |
| 3009 | * Logged from: |
| 3010 | * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java |
| 3011 | */ |
| 3012 | message PhoneStateChanged { |
| 3013 | enum State { |
| 3014 | OFF = 0; |
| 3015 | ON = 1; |
| 3016 | } |
| 3017 | optional State state = 1; |
| 3018 | } |
| 3019 | |
Hyunyoung Song | f1b935e | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 3020 | message BackGesture { |
| 3021 | enum BackType { |
Maryam Karimzadehgan | 4f9ab82 | 2020-03-09 14:51:07 -0700 | [diff] [blame] | 3022 | DEFAULT_BACK_TYPE = 0; |
| 3023 | COMPLETED = 1; |
| 3024 | COMPLETED_REJECTED = 2; // successful because coming from rejected area |
| 3025 | INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area |
| 3026 | INCOMPLETE = 4; // Unsuccessful, for reasons other than below. |
| 3027 | INCOMPLETE_FAR_FROM_EDGE = 5; // Unsuccessful, far from the edge. |
| 3028 | INCOMPLETE_MULTI_TOUCH = 6; // Unsuccessful, multi touch. |
| 3029 | INCOMPLETE_LONG_PRESS = 7; // Unsuccessful, long press. |
| 3030 | INCOMPLETE_VERTICAL_MOVE = 8; // Unsuccessful, move vertically. |
Hyunyoung Song | f1b935e | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 3031 | } |
| 3032 | optional BackType type = 1; |
| 3033 | |
Maryam Karimzadehgan | 4f9ab82 | 2020-03-09 14:51:07 -0700 | [diff] [blame] | 3034 | optional int32 y_coordinate = 2 [deprecated = true]; // y coordinate for ACTION_DOWN event |
| 3035 | optional int32 start_x = 4; // X coordinate for ACTION_DOWN event. |
| 3036 | optional int32 start_y = 5; // Y coordinate for ACTION_DOWN event. |
| 3037 | optional int32 end_x = 6; // X coordinate for ACTION_MOVE event. |
| 3038 | optional int32 end_y = 7; // Y coordinate for ACTION_MOVE event. |
| 3039 | optional int32 left_boundary = 8; // left edge width + left inset |
| 3040 | optional int32 right_boundary = 9; // screen width - (right edge width + right inset) |
| 3041 | |
Hyunyoung Song | f1b935e | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 3042 | enum WindowHorizontalLocation { |
| 3043 | DEFAULT_LOCATION = 0; |
| 3044 | LEFT = 1; |
| 3045 | RIGHT = 2; |
| 3046 | } |
Maryam Karimzadehgan | 4f9ab82 | 2020-03-09 14:51:07 -0700 | [diff] [blame] | 3047 | optional WindowHorizontalLocation x_location = 3 [deprecated = true]; |
Hyunyoung Song | f1b935e | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 3048 | } |
| 3049 | |
| 3050 | message ExclusionRectStateChanged { |
| 3051 | optional string component_name = 1; // if not available, simply packageName |
| 3052 | optional int32 requested_height = 2; // px |
| 3053 | optional int32 rejected_height = 3; // px |
| 3054 | |
| 3055 | enum WindowHorizontalLocation { |
| 3056 | DEFAULT_LOCATION = 0; |
| 3057 | LEFT = 1; |
| 3058 | RIGHT = 2; |
| 3059 | } |
| 3060 | optional WindowHorizontalLocation x_location = 4; |
| 3061 | optional bool landscape = 5; |
| 3062 | optional bool splitscreen = 6; |
| 3063 | optional int32 duration_millis = 7; |
| 3064 | } |
| 3065 | |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3066 | /** |
Maryam | de784e5 | 2020-06-22 11:46:48 -0700 | [diff] [blame] | 3067 | * Logs when IME is on. |
| 3068 | * |
| 3069 | * Logged from: /packages/SystemUI/src/com/android/systemui/ |
| 3070 | statusbar/phone/NavigationBarView.java |
| 3071 | * |
| 3072 | */ |
| 3073 | message ImeTouchReported { |
| 3074 | optional int32 x_coordinate = 1; // X coordinate for ACTION_DOWN event. |
| 3075 | optional int32 y_coordinate = 2; // Y coordinate for ACTION_DOWN event. |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 3076 | } |
| 3077 | |
Maryam | de784e5 | 2020-06-22 11:46:48 -0700 | [diff] [blame] | 3078 | /** |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3079 | * Logs when Launcher (HomeScreen) UI has changed or was interacted. |
| 3080 | * |
| 3081 | * Logged from: |
| 3082 | * packages/apps/Launcher3 |
| 3083 | */ |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3084 | message LauncherUIChanged { |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3085 | optional android.stats.launcher.LauncherAction action = 1 [deprecated = true]; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3086 | optional android.stats.launcher.LauncherState src_state = 2; |
| 3087 | optional android.stats.launcher.LauncherState dst_state = 3; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3088 | optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES, deprecated = true]; |
| 3089 | optional bool is_swipe_up_enabled = 5 [deprecated = true]; |
| 3090 | |
| 3091 | // The event id (e.g., app launch, drag and drop, long press) |
| 3092 | optional int32 event_id = 6; |
| 3093 | // The event's source or target id (e.g., icon, task, button) |
| 3094 | optional int32 target_id = 7; |
| 3095 | // If the target needs to be tracked, use this id field |
| 3096 | optional int32 instance_id = 8; |
| 3097 | optional int32 uid = 9 [(is_uid) = true]; |
| 3098 | optional string package_name = 10; |
| 3099 | optional string component_name = 11; |
| 3100 | |
| 3101 | // (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] | 3102 | optional int32 grid_x = 12 [default = -1]; |
| 3103 | optional int32 grid_y = 13 [default = -1]; |
| 3104 | optional int32 page_id = 14 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3105 | |
| 3106 | // 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] | 3107 | optional int32 grid_x_parent = 15 [default = -1]; |
| 3108 | optional int32 grid_y_parent = 16 [default = -1]; |
| 3109 | optional int32 page_id_parent = 17 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3110 | |
| 3111 | // e.g., SEARCHBOX_ALLAPPS, FOLDER_WORKSPACE |
| 3112 | optional int32 hierarchy = 18; |
| 3113 | |
| 3114 | optional bool is_work_profile = 19; |
| 3115 | |
| 3116 | // Used to store the predicted rank of the target |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3117 | optional int32 rank = 20 [default = -1]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3118 | |
| 3119 | // e.g., folderLabelState can be captured in the following two fields |
| 3120 | optional int32 from_state = 21; |
| 3121 | optional int32 to_state = 22; |
| 3122 | |
| 3123 | // e.g., autofilled or suggested texts that are not user entered |
| 3124 | optional string edittext = 23; |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3125 | |
| 3126 | // e.g., number of contents inside a container (e.g., icons inside a folder) |
| 3127 | optional int32 cardinality = 24; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3128 | } |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3129 | |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3130 | /** |
| 3131 | * Used for snapshot of the HomeScreen UI elements |
| 3132 | * |
| 3133 | * Logged from: |
| 3134 | * packages/apps/Launcher3 |
| 3135 | */ |
| 3136 | message LauncherStaticLayout { |
| 3137 | // The event id (e.g., snapshot, drag and drop) |
| 3138 | optional int32 event_id = 1; |
| 3139 | // The event's source or target id (e.g., icon, shortcut, widget) |
| 3140 | optional int32 target_id = 2; |
| 3141 | // If the target needs to be tracked, use this id field |
| 3142 | optional int32 instance_id = 3; |
| 3143 | optional int32 uid = 4 [(is_uid) = true]; |
| 3144 | optional string package_name = 5; |
| 3145 | optional string component_name = 6; |
| 3146 | |
| 3147 | // (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] | 3148 | optional int32 grid_x = 7 [default = -1]; |
| 3149 | optional int32 grid_y = 8 [default = -1]; |
| 3150 | optional int32 page_id = 9 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3151 | |
| 3152 | // 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] | 3153 | // e.g., when used with widgets target, use these values for (span_x, span_y) |
| 3154 | optional int32 grid_x_parent = 10 [default = -1]; |
| 3155 | optional int32 grid_y_parent = 11 [default = -1]; |
| 3156 | optional int32 page_id_parent = 12 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3157 | |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3158 | // UNKNOWN = 0 |
| 3159 | // HOTSEAT = 1 |
| 3160 | // WORKSPACE = 2 |
| 3161 | // FOLDER_HOTSEAT = 3 |
| 3162 | // FOLDER_WORKSPACE = 4 |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3163 | optional int32 hierarchy = 13; |
| 3164 | |
| 3165 | optional bool is_work_profile = 14; |
| 3166 | |
| 3167 | // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION |
| 3168 | optional int32 origin = 15; |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3169 | |
| 3170 | // e.g., number of icons inside a folder |
| 3171 | optional int32 cardinality = 16; |
| 3172 | |
| 3173 | // e.g., (x, y) span of the widget inside homescreen grid system |
| 3174 | optional int32 span_x = 17 [default = 1]; |
| 3175 | optional int32 span_y = 18 [default = 1]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3176 | } |
| 3177 | |
| 3178 | /** |
| 3179 | * Logs when Wallpaper or ThemePicker UI has changed. |
| 3180 | * |
| 3181 | * Logged from: |
| 3182 | * packages/apps/ThemePicker |
| 3183 | * packages/apps/WallpaperPicker2 |
| 3184 | */ |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 3185 | message StyleUIChanged { |
| 3186 | optional android.stats.style.Action action = 1; |
| 3187 | optional int32 color_package_hash = 2; |
| 3188 | optional int32 font_package_hash = 3; |
| 3189 | optional int32 shape_package_hash = 4; |
| 3190 | optional int32 clock_package_hash = 5; |
| 3191 | optional int32 launcher_grid = 6; |
| 3192 | optional int32 wallpaper_category_hash = 7; |
| 3193 | optional int32 wallpaper_id_hash = 8; |
Kunhung Li | 286c52f | 2019-05-21 20:10:43 +0800 | [diff] [blame] | 3194 | optional int32 color_preference = 9; |
| 3195 | optional android.stats.style.LocationPreference location_preference = 10; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 3196 | } |
| 3197 | |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3198 | /** |
| 3199 | * Logs when Settings UI has changed. |
| 3200 | * |
| 3201 | * Logged from: |
| 3202 | * packages/apps/Settings |
| 3203 | */ |
| 3204 | message SettingsUIChanged { |
| 3205 | /** |
| 3206 | * Where this SettingsUIChange event comes from. For example, if |
| 3207 | * it's a PAGE_VISIBLE event, where the page is opened from. |
| 3208 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 3209 | optional android.app.settings.PageId attribution = 1; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3210 | |
| 3211 | /** |
| 3212 | * What the UI action is. |
| 3213 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 3214 | optional android.app.settings.Action action = 2; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3215 | |
| 3216 | /** |
| 3217 | * Where the action is happening |
| 3218 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 3219 | optional android.app.settings.PageId page_id = 3; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3220 | |
| 3221 | /** |
| 3222 | * What preference changed in this event. |
| 3223 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 3224 | optional string changed_preference_key = 4; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3225 | |
| 3226 | /** |
| 3227 | * The new value of the changed preference. |
| 3228 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 3229 | optional int64 changed_preference_int_value = 5; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3230 | } |
| 3231 | |
| 3232 | /** |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3233 | * Logs basic timing information about touch events. |
| 3234 | * Reported at most every 5 minutes while device is being interacted with. |
| 3235 | * |
| 3236 | * Logged from: |
| 3237 | * frameworks/native/services/inputflinger |
| 3238 | */ |
| 3239 | message TouchEventReported { |
| 3240 | /** |
| 3241 | * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 3242 | * and the standard deviation of the time spent processing touchscreen events |
| 3243 | * in the kernel and inputflinger. The units are microseconds. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3244 | * |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 3245 | * On supported devices, the starting point is taken during the hard interrupt inside the |
| 3246 | * kernel touch driver. On all other devices, the starting point is taken inside |
| 3247 | * the kernel's input event subsystem upon receipt of the input event. |
| 3248 | * The ending point is taken inside InputDispatcher, just after the input event |
| 3249 | * is sent to the app. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3250 | */ |
| 3251 | // Minimum value |
| 3252 | optional float latency_min_micros = 1; |
| 3253 | // Maximum value |
| 3254 | optional float latency_max_micros = 2; |
| 3255 | // Average value |
| 3256 | optional float latency_mean_micros = 3; |
| 3257 | // Standard deviation |
| 3258 | optional float latency_stdev_micros = 4; |
Siarhei Vishniakou | ca954f9 | 2019-03-22 16:41:14 -0700 | [diff] [blame] | 3259 | // Number of touch events (input_event) in this report |
| 3260 | optional int32 count = 5; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3261 | } |
| 3262 | |
| 3263 | /** |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 3264 | * Logs gesture classification and timing information for touch events. |
| 3265 | * |
| 3266 | * Logged from: |
| 3267 | * frameworks/base/core/java/android/view/GestureDetector.java |
| 3268 | * frameworks/base/core/java/android/view/View.java |
| 3269 | */ |
| 3270 | message TouchGestureClassified { |
| 3271 | // The source of the classification (e.g. Java class name). |
| 3272 | optional string source = 1; |
| 3273 | |
| 3274 | enum Classification { |
| 3275 | UNKNOWN_CLASSIFICATION = 0; |
| 3276 | SINGLE_TAP = 1; |
| 3277 | DOUBLE_TAP = 2; |
| 3278 | LONG_PRESS = 3; |
| 3279 | DEEP_PRESS = 4; |
| 3280 | SCROLL = 5; |
| 3281 | } |
| 3282 | // The classification of the gesture. |
| 3283 | optional Classification classification = 2; |
| 3284 | |
| 3285 | // The interval from the start of a touch event stream until the |
| 3286 | // classification was made. |
| 3287 | optional int32 latency_millis = 3; |
| 3288 | |
| 3289 | // The distance from the location of the first touch event to the |
| 3290 | // location of the touch event when the classification was made. |
| 3291 | optional float displacement_px = 4; |
| 3292 | } |
| 3293 | |
| 3294 | /** |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3295 | * Logs that a setting was updated. |
| 3296 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 3297 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3298 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 3299 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 3300 | */ |
| 3301 | message SettingChanged { |
| 3302 | // The name of the setting. |
| 3303 | optional string setting = 1; |
| 3304 | |
| 3305 | // The change being imposed on this setting. May represent a number, eg "3". |
| 3306 | optional string value = 2; |
| 3307 | |
| 3308 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 3309 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 3310 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 3311 | // The +/- feature is currently only used for location_providers_allowed. |
| 3312 | optional string new_value = 3; |
| 3313 | |
| 3314 | // The previous value of this setting. |
| 3315 | optional string prev_value = 4; |
| 3316 | |
| 3317 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 3318 | optional string tag = 5; |
| 3319 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 3320 | // True if this setting with tag should be resettable. |
| 3321 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3322 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 3323 | // 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] | 3324 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 3325 | |
| 3326 | enum ChangeReason { |
| 3327 | UPDATED = 1; // Updated can be an insertion or an update. |
| 3328 | DELETED = 2; |
| 3329 | } |
| 3330 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3331 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 3332 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3333 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 3334 | * Logs activity going to foreground or background |
| 3335 | * |
| 3336 | * Logged from: |
| 3337 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 3338 | */ |
| 3339 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3340 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 3341 | optional string pkg_name = 2; |
| 3342 | optional string class_name = 3; |
| 3343 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3344 | enum State { |
| 3345 | BACKGROUND = 0; |
| 3346 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 3347 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3348 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 3349 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3350 | |
| 3351 | /** |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 3352 | * Logs when a volume entered low Storage state. |
| 3353 | * Logged from: |
| 3354 | * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java |
| 3355 | */ |
| 3356 | message LowStorageStateChanged { |
| 3357 | // Volume that ran out of storage. |
| 3358 | optional string volume_description = 1; |
| 3359 | |
| 3360 | enum State { |
| 3361 | UNKNOWN = 0; |
| 3362 | OFF = 1; |
| 3363 | ON = 2; |
| 3364 | } |
| 3365 | optional State state = 2; |
| 3366 | } |
| 3367 | |
| 3368 | /** |
| 3369 | * Logs when an app is downgraded. |
| 3370 | * Logged from: |
| 3371 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 3372 | */ |
| 3373 | message AppDowngraded { |
| 3374 | optional string package_name = 1; |
| 3375 | // Size of the package (all data) before being downgraded. |
| 3376 | optional int64 size_in_bytes_before = 2; |
| 3377 | // Size of the package (all data) after being downgraded. |
| 3378 | optional int64 size_in_bytes_after = 3; |
| 3379 | |
| 3380 | optional bool aggressive = 4; |
| 3381 | } |
| 3382 | |
| 3383 | /** |
| 3384 | * Logs when an app is optimized after being downgraded. |
| 3385 | * Logged from: |
| 3386 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 3387 | */ |
| 3388 | message AppOptimizedAfterDowngraded { |
| 3389 | optional string package_name = 1; |
| 3390 | } |
| 3391 | |
| 3392 | /** |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 3393 | * Logs whenever an app is installed on external storage. |
| 3394 | * Logged from: |
| 3395 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 3396 | */ |
| 3397 | message AppInstallOnExternalStorageReported { |
| 3398 | // The type of external storage. |
| 3399 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 3400 | // The name of the package that is installed on the sd card. |
| 3401 | optional string package_name = 2; |
| 3402 | } |
| 3403 | |
| 3404 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3405 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3406 | * Logged from: |
| 3407 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3408 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3409 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3410 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3411 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3412 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3413 | |
| 3414 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3415 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3416 | optional string process_name = 3; |
| 3417 | |
| 3418 | // The pid if available. -1 means not available. |
Howard Ro | 8e05174 | 2020-03-20 15:07:20 -0700 | [diff] [blame] | 3419 | optional int32 pid = 4; |
Chenjie Yu | f17bf62f | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 3420 | |
| 3421 | optional string package_name = 5; |
| 3422 | |
| 3423 | enum InstantApp { |
| 3424 | UNAVAILABLE = 0; |
| 3425 | FALSE = 1; |
| 3426 | TRUE = 2; |
| 3427 | } |
| 3428 | optional InstantApp is_instant_app = 6; |
| 3429 | |
| 3430 | enum ForegroundState { |
| 3431 | UNKNOWN = 0; |
| 3432 | BACKGROUND = 1; |
| 3433 | FOREGROUND = 2; |
| 3434 | } |
| 3435 | optional ForegroundState foreground_state = 7; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3436 | |
| 3437 | optional android.server.ErrorSource error_source = 8; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3438 | } |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3439 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3440 | /** |
| 3441 | * Logs when a WTF (What a Terrible Failure) happened. |
| 3442 | * Logged from: |
| 3443 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3444 | */ |
| 3445 | message WTFOccurred { |
| 3446 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3447 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3448 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3449 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3450 | // The name of the process. |
| 3451 | // system_server if it is not by an app |
| 3452 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 3453 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3454 | // The pid if available. -1 means not available. |
Howard Ro | 8e05174 | 2020-03-20 15:07:20 -0700 | [diff] [blame] | 3455 | optional int32 pid = 4; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3456 | |
| 3457 | optional android.server.ErrorSource error_source = 5; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3458 | } |
| 3459 | |
| 3460 | /** |
| 3461 | * Logs when system server reports low memory. |
| 3462 | * Logged from: |
| 3463 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3464 | */ |
| 3465 | message LowMemReported { |
| 3466 | } |
| 3467 | |
| 3468 | /** |
| 3469 | * Logs when an app ANR (App Not Responding) occurs. |
| 3470 | * Logged from: |
| 3471 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 3472 | */ |
| 3473 | message ANROccurred { |
| 3474 | optional int32 uid = 1 [(is_uid) = true]; |
| 3475 | |
| 3476 | optional string process_name = 2; |
| 3477 | |
| 3478 | optional string short_component_name = 3; |
| 3479 | |
| 3480 | optional string reason = 4; |
Chenjie Yu | f17bf62f | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 3481 | |
| 3482 | enum InstantApp { |
| 3483 | UNAVAILABLE = 0; |
| 3484 | FALSE = 1; |
| 3485 | TRUE = 2; |
| 3486 | } |
| 3487 | optional InstantApp is_instant_app = 5; |
| 3488 | |
| 3489 | enum ForegroundState { |
| 3490 | UNKNOWN = 0; |
| 3491 | BACKGROUND = 1; |
| 3492 | FOREGROUND = 2; |
| 3493 | } |
| 3494 | optional ForegroundState foreground_state = 6; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3495 | |
| 3496 | optional android.server.ErrorSource error_source = 7; |
| 3497 | |
| 3498 | optional string package_name = 8; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3499 | } |
| 3500 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 3501 | /** |
| 3502 | * Logs when the vibrator state changes. |
| 3503 | * Logged from: |
| 3504 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 3505 | */ |
| 3506 | message VibratorStateChanged { |
| 3507 | repeated AttributionNode attribution_node = 1; |
| 3508 | |
| 3509 | enum State { |
| 3510 | OFF = 0; |
| 3511 | ON = 1; |
| 3512 | } |
| 3513 | optional State state = 2; |
| 3514 | |
| 3515 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 3516 | // Only applicable for State == ON. |
| 3517 | optional int64 duration_millis = 3; |
| 3518 | } |
| 3519 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3520 | /* |
| 3521 | * Allows other apps to push events into statsd. |
| 3522 | * Logged from: |
| 3523 | * frameworks/base/core/java/android/util/StatsLog.java |
| 3524 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3525 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3526 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3527 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3528 | |
| 3529 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 3530 | optional int32 label = 2; |
| 3531 | |
| 3532 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 3533 | // predicates for the metrics). |
| 3534 | enum State { |
| 3535 | UNKNOWN = 0; |
| 3536 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 3537 | STOP = 2; |
| 3538 | START = 3; |
| 3539 | } |
| 3540 | optional State state = 3; |
| 3541 | } |
| 3542 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3543 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 3544 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 3545 | * For example, this could be due to the user manually changing the time. |
| 3546 | * |
| 3547 | * Logged from: |
| 3548 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 3549 | */ |
| 3550 | message WallClockTimeShifted { |
| 3551 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 3552 | optional int64 wall_clock_timestamp_millis = 1; |
| 3553 | } |
| 3554 | |
| 3555 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3556 | * Logs when statsd detects an anomaly. |
| 3557 | * |
| 3558 | * Logged from: |
| 3559 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 3560 | */ |
| 3561 | message AnomalyDetected { |
| 3562 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3563 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3564 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 3565 | // Id of the config whose anomaly detection alert fired. |
| 3566 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3567 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 3568 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 3569 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3570 | } |
| 3571 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3572 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3573 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3574 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3575 | |
| 3576 | // The app package name. |
| 3577 | optional string pkg_name = 2; |
| 3578 | |
| 3579 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3580 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3581 | WARM = 1; |
| 3582 | HOT = 2; |
| 3583 | COLD = 3; |
| 3584 | } |
| 3585 | // The transition type. |
| 3586 | optional TransitionType type = 3; |
| 3587 | |
| 3588 | // The activity name. |
| 3589 | optional string activity_name = 4; |
| 3590 | |
| 3591 | // The name of the calling app. Empty if not set. |
| 3592 | optional string calling_pkg_name = 5; |
| 3593 | |
| 3594 | // Whether the app is an instant app. |
| 3595 | optional bool is_instant_app = 6; |
| 3596 | |
| 3597 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3598 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3599 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 3600 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3601 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3602 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3603 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3604 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3605 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3606 | optional int32 bind_application_delay_millis = 11; |
| 3607 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3608 | |
| 3609 | // Empty if not set. |
| 3610 | optional string launch_token = 13; |
| 3611 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3612 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3613 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3614 | |
| 3615 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3616 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3617 | } |
| 3618 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3619 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3620 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3621 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3622 | |
| 3623 | // The app package name. |
| 3624 | optional string pkg_name = 2; |
| 3625 | |
| 3626 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3627 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3628 | WARM = 1; |
| 3629 | HOT = 2; |
| 3630 | COLD = 3; |
| 3631 | } |
| 3632 | // The transition type. |
| 3633 | optional TransitionType type = 3; |
| 3634 | |
| 3635 | // The activity name. |
| 3636 | optional string activity_name = 4; |
| 3637 | } |
| 3638 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3639 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3640 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3641 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3642 | |
| 3643 | // The app package name. |
| 3644 | optional string pkg_name = 2; |
| 3645 | |
| 3646 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3647 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3648 | WITH_BUNDLE = 1; |
| 3649 | WITHOUT_BUNDLE = 2; |
| 3650 | } |
| 3651 | // The transition type. |
| 3652 | optional TransitionType type = 3; |
| 3653 | |
| 3654 | // The activity name. |
| 3655 | optional string activity_name = 4; |
| 3656 | |
| 3657 | optional bool transition_process_running = 5; |
| 3658 | |
| 3659 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3660 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3661 | } |
| 3662 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3663 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3664 | * Logs a picture-in-picture action |
| 3665 | * Logged from: |
| 3666 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3667 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 3668 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 3669 | */ |
| 3670 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3671 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3672 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3673 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3674 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3675 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3676 | enum State { |
| 3677 | ENTERED = 1; |
| 3678 | EXPANDED_TO_FULL_SCREEN = 2; |
| 3679 | MINIMIZED = 3; |
| 3680 | DISMISSED = 4; |
| 3681 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3682 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3683 | } |
| 3684 | |
| 3685 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3686 | * Logs overlay action |
| 3687 | * Logged from: |
| 3688 | * services/core/java/com/android/server/wm/Session.java |
| 3689 | */ |
| 3690 | message OverlayStateChanged { |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 3691 | 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] | 3692 | |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 3693 | optional string package_name = 2 [(state_field_option).primary_field = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3694 | |
| 3695 | optional bool using_alert_window = 3; |
| 3696 | |
| 3697 | enum State { |
| 3698 | ENTERED = 1; |
| 3699 | EXITED = 2; |
| 3700 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 3701 | optional State state = 4 |
| 3702 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3703 | } |
| 3704 | |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3705 | /** |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3706 | * Logs foreground service starts and stops. |
| 3707 | * Note that this is not when a service starts or stops, but when it is |
| 3708 | * considered foreground. |
| 3709 | * Logged from |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3710 | * frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3711 | */ |
| 3712 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3713 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3714 | // package_name + "/" + class_name |
| 3715 | optional string short_name = 2; |
| 3716 | |
| 3717 | enum State { |
| 3718 | ENTER = 1; |
| 3719 | EXIT = 2; |
| 3720 | } |
| 3721 | optional State state = 3; |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3722 | |
| 3723 | // Whether the fgs is allowed while-in-use permissions, i.e. is considered 'in-use' to the user. |
| 3724 | // (If the fgs was started while the app wasn't TOP it usually will be denied these permissions) |
| 3725 | optional bool allow_while_in_use_permission = 4; |
| 3726 | } |
| 3727 | |
| 3728 | /** |
| 3729 | * Logs the number of times a uid accesses a sensitive AppOp during a foreground service session. |
| 3730 | * A foreground service session is any continuous period during which the uid holds at least one |
| 3731 | * foreground service; the atom will be pushed when the uid no longer holds any foreground services. |
| 3732 | * Accesses initiated while the uid is in the TOP state are ignored. |
| 3733 | * Sessions with no attempted accesses are not logged. |
| 3734 | * Logged from |
| 3735 | * frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 3736 | */ |
| 3737 | message ForegroundServiceAppOpSessionEnded { |
| 3738 | optional int32 uid = 1 [(is_uid) = true]; |
| 3739 | |
| 3740 | // The operation's name. |
Stanislav Zholnin | 48811ee6 | 2020-03-03 16:15:55 +0000 | [diff] [blame] | 3741 | // Only following four ops are logged |
| 3742 | // COARSE_LOCATION = 0 |
| 3743 | // FINE_LOCATION = 1 |
| 3744 | // CAMERA = 26 |
| 3745 | // RECORD_AUDIO = 27 |
| 3746 | optional android.app.AppOpEnum app_op_name = 2 [default = APP_OP_NONE]; |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3747 | |
| 3748 | // The uid's permission mode for accessing the AppOp during this fgs session. |
| 3749 | enum Mode { |
| 3750 | MODE_UNKNOWN = 0; |
| 3751 | MODE_ALLOWED = 1; // Always allowed |
| 3752 | MODE_IGNORED = 2; // Denied |
| 3753 | MODE_FOREGROUND = 3; // Allow-while-in-use (or allowed-one-time) |
| 3754 | } |
| 3755 | optional Mode app_op_mode = 3; |
| 3756 | |
| 3757 | // Number of times this AppOp was requested and allowed. |
| 3758 | optional int32 count_ops_accepted = 4; |
| 3759 | // Number of times this AppOp was requested but denied. |
| 3760 | optional int32 count_ops_rejected = 5; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3761 | } |
| 3762 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3763 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3764 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 3765 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 3766 | * attributed back to the parent (host) uid. One example is Chrome. |
| 3767 | * |
| 3768 | * Logged from: |
| 3769 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 3770 | */ |
| 3771 | message IsolatedUidChanged { |
| 3772 | // 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] | 3773 | // 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] | 3774 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3775 | optional int32 parent_uid = 1; |
| 3776 | |
| 3777 | optional int32 isolated_uid = 2; |
| 3778 | |
| 3779 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 3780 | enum Event { |
| 3781 | REMOVED = 0; |
| 3782 | CREATED = 1; |
| 3783 | } |
| 3784 | optional Event event = 3; |
| 3785 | } |
| 3786 | |
| 3787 | /* |
| 3788 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 3789 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 3790 | * and processed by WakeupController.cpp. |
| 3791 | */ |
| 3792 | message PacketWakeupOccurred { |
| 3793 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 3794 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3795 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3796 | // The interface name on which the packet was received. |
| 3797 | optional string iface = 2; |
| 3798 | // The ethertype value of the packet. |
| 3799 | optional int32 ethertype = 3; |
| 3800 | // String representation of the destination MAC address of the packet. |
| 3801 | optional string destination_hardware_address = 4; |
| 3802 | // String representation of the source address of the packet if this was an IP packet. |
| 3803 | optional string source_ip = 5; |
| 3804 | // String representation of the destination address of the packet if this was an IP packet. |
| 3805 | optional string destination_ip = 6; |
| 3806 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 3807 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 3808 | // families. |
| 3809 | optional int32 ip_next_header = 7; |
| 3810 | // The source port if this was a TCP or UDP packet. |
| 3811 | optional int32 source_port = 8; |
| 3812 | // The destination port if this was a TCP or UDP packet. |
| 3813 | optional int32 destination_port = 9; |
| 3814 | } |
| 3815 | |
| 3816 | /* |
| 3817 | * Logs the memory stats for an app on startup. |
| 3818 | * Logged from: |
| 3819 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3820 | */ |
| 3821 | message AppStartMemoryStateCaptured { |
| 3822 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3823 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3824 | |
| 3825 | // The process name. |
| 3826 | optional string process_name = 2; |
| 3827 | |
| 3828 | // The activity name. |
| 3829 | optional string activity_name = 3; |
| 3830 | |
| 3831 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3832 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3833 | |
| 3834 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3835 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3836 | |
| 3837 | // RSS |
| 3838 | optional int64 rss_in_bytes = 6; |
| 3839 | |
| 3840 | // CACHE |
| 3841 | optional int64 cache_in_bytes = 7; |
| 3842 | |
| 3843 | // SWAP |
| 3844 | optional int64 swap_in_bytes = 8; |
| 3845 | } |
| 3846 | |
| 3847 | /* |
| 3848 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 3849 | * for LMK event. |
| 3850 | * Logged from: |
| 3851 | * system/core/lmkd/lmkd.c |
| 3852 | */ |
| 3853 | message LmkStateChanged { |
| 3854 | enum State { |
| 3855 | UNKNOWN = 0; |
| 3856 | START = 1; |
| 3857 | STOP = 2; |
| 3858 | } |
| 3859 | optional State state = 1; |
| 3860 | } |
| 3861 | |
| 3862 | /* |
| 3863 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 3864 | * Logged from: |
| 3865 | * system/core/lmkd/lmkd.c |
| 3866 | */ |
| 3867 | message LmkKillOccurred { |
Ioannis Ilkos | e408d21 | 2020-09-11 11:10:17 +0100 | [diff] [blame] | 3868 | enum Reason { |
| 3869 | UNKNOWN = 0; |
| 3870 | PRESSURE_AFTER_KILL = 1; |
| 3871 | NOT_RESPONDING = 2; |
| 3872 | LOW_SWAP_AND_THRASHING = 3; |
| 3873 | LOW_MEM_AND_SWAP = 4; |
| 3874 | LOW_MEM_AND_THRASHING = 5; |
| 3875 | DIRECT_RECL_AND_THRASHING = 6; |
| 3876 | LOW_MEM_AND_SWAP_UTIL = 7; |
| 3877 | } |
| 3878 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3879 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3880 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3881 | |
| 3882 | // The process name. |
| 3883 | optional string process_name = 2; |
| 3884 | |
| 3885 | // oom adj score. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3886 | optional int32 oom_adj_score = 3; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3887 | |
| 3888 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3889 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3890 | |
| 3891 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3892 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3893 | |
| 3894 | // RSS |
| 3895 | optional int64 rss_in_bytes = 6; |
| 3896 | |
| 3897 | // CACHE |
| 3898 | optional int64 cache_in_bytes = 7; |
| 3899 | |
| 3900 | // SWAP |
| 3901 | optional int64 swap_in_bytes = 8; |
Jim Blackler | 8593d1f | 2018-11-21 15:24:48 +0000 | [diff] [blame] | 3902 | |
| 3903 | // The elapsed real time of start of the process. |
| 3904 | optional int64 process_start_time_nanos = 9; |
Suren Baghdasaryan | 1fbaa1f | 2019-03-04 11:09:31 -0800 | [diff] [blame] | 3905 | |
| 3906 | // Min oom adj score considered by lmkd. |
| 3907 | optional int32 min_oom_score = 10; |
Ioannis Ilkos | e408d21 | 2020-09-11 11:10:17 +0100 | [diff] [blame] | 3908 | |
| 3909 | // Free physical memory on device at LMK time. |
| 3910 | optional int32 free_mem_kb = 11; |
| 3911 | |
| 3912 | // Free swap on device at LMK time. |
| 3913 | optional int32 free_swap_kb = 12; |
| 3914 | |
| 3915 | // What triggered the LMK event. |
| 3916 | optional Reason reason = 13; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3917 | } |
| 3918 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3919 | /* |
| 3920 | * Logs when the ActivityManagerService detects that an app died. |
| 3921 | * |
| 3922 | * Logged from: |
| 3923 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3924 | */ |
| 3925 | message AppDied { |
| 3926 | // timestamp(elapsedRealtime) of record creation |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 3927 | optional uint64 timestamp_millis = 1 [(state_field_option).exclusive_state = true]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3928 | } |
| 3929 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3930 | /** |
| 3931 | * An atom for generic metrics logging. Available from Android Q. |
| 3932 | */ |
| 3933 | message GenericAtom { |
| 3934 | // The uid of the application that sent this custom atom. |
| 3935 | optional int32 uid = 1 [(is_uid) = true]; |
| 3936 | |
| 3937 | // An event_id indicates the type of event. |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 3938 | optional android.stats.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3939 | } |
| 3940 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3941 | /** |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3942 | * Atom for simple logging of user interaction and impression events, such as "the user touched |
| 3943 | * this button" or "this dialog was displayed". |
| 3944 | * Keep the UI event stream clean: don't use for system or background events. |
| 3945 | * 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] | 3946 | * |
| 3947 | * Logged from: |
| 3948 | * frameworks/base/services/core/java/com/android/server/ |
| 3949 | * frameworks/base/packages/SystemUI/src/com/android/systemui/ |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3950 | */ |
| 3951 | message UiEventReported { |
| 3952 | // The event_id. |
| 3953 | optional int32 event_id = 1; |
| 3954 | // The event's source or target uid and package, if applicable. |
| 3955 | // For example, the package posting a notification, or the destination package of a share. |
| 3956 | optional int32 uid = 2 [(is_uid) = true]; |
| 3957 | optional string package_name = 3; |
Will Brockman | 12282ac | 2019-12-20 09:37:42 -0500 | [diff] [blame] | 3958 | // An identifier used to disambiguate which logs refer to a particular instance of some |
| 3959 | // UI element. Useful when there might be multiple instances simultaneously active. |
| 3960 | optional int32 instance_id = 4; |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3961 | } |
| 3962 | |
| 3963 | /** |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3964 | * Reports a notification was created or updated. |
| 3965 | * |
| 3966 | * Logged from: |
| 3967 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 3968 | */ |
| 3969 | message NotificationReported { |
| 3970 | // The event_id (as for UiEventReported). |
| 3971 | optional int32 event_id = 1; |
| 3972 | // The notifying app's uid and package. |
| 3973 | optional int32 uid = 2 [(is_uid) = true]; |
| 3974 | optional string package_name = 3; |
| 3975 | // A small system-assigned identifier for the notification. |
| 3976 | // Locally probably-unique, but expect collisions across users and/or days. |
| 3977 | optional int32 instance_id = 4; |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3978 | optional int32 notification_id_hash = 5; // Small hash of the app-assigned notif ID + tag |
| 3979 | 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] | 3980 | |
| 3981 | // Grouping information |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3982 | optional int32 group_id_hash = 7; // Small hash of the group ID of the notification |
| 3983 | optional int32 group_instance_id = 8; // Instance_id of the group-summary notification |
| 3984 | optional bool is_group_summary = 9; // Tags the group-summary notification |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3985 | |
| 3986 | // Attributes |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3987 | optional string category = 10; // App-assigned notification category (API-defined strings) |
| 3988 | optional int32 style = 11; // App-assigned notification style |
| 3989 | 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] | 3990 | |
| 3991 | // Ordering, importance and interruptiveness |
| 3992 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3993 | optional int32 position = 13; // Position in NotificationManager's list |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3994 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3995 | optional android.stats.sysui.NotificationImportance importance = 14; |
| 3996 | optional int32 alerting = 15; // Bitfield, 1=buzz 2=beep 4=blink |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3997 | |
| 3998 | enum NotificationImportanceExplanation { |
| 3999 | IMPORTANCE_EXPLANATION_UNKNOWN = 0; |
| 4000 | IMPORTANCE_EXPLANATION_APP = 1; // App-specified channel importance. |
| 4001 | IMPORTANCE_EXPLANATION_USER = 2; // User-specified channel importance. |
| 4002 | IMPORTANCE_EXPLANATION_ASST = 3; // Notification Assistant override. |
| 4003 | IMPORTANCE_EXPLANATION_SYSTEM = 4; // System override. |
| 4004 | // Like _APP, but based on pre-channels priority signal. |
| 4005 | IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5; |
| 4006 | } |
| 4007 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 4008 | optional NotificationImportanceExplanation importance_source = 16; |
| 4009 | optional android.stats.sysui.NotificationImportance importance_initial = 17; |
| 4010 | optional NotificationImportanceExplanation importance_initial_source = 18; |
| 4011 | optional android.stats.sysui.NotificationImportance importance_asst = 19; |
| 4012 | optional int32 assistant_hash = 20; |
| 4013 | optional float assistant_ranking_score = 21; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 4014 | } |
| 4015 | |
| 4016 | message Notification { |
| 4017 | // The notifying app's uid and package. |
| 4018 | optional int32 uid = 1 [(is_uid) = true]; |
| 4019 | optional string package_name = 2; |
| 4020 | // A small system-assigned identifier for the notification. |
| 4021 | optional int32 instance_id = 3; |
| 4022 | |
| 4023 | // Grouping information. |
| 4024 | optional int32 group_instance_id = 4; |
| 4025 | optional bool is_group_summary = 5; |
| 4026 | |
| 4027 | // The section of the shade that the notification is in. |
| 4028 | // See NotificationSectionsManager.PriorityBucket. |
| 4029 | enum NotificationSection { |
| 4030 | SECTION_UNKNOWN = 0; |
Will Brockman | e375384 | 2020-03-03 16:29:34 -0500 | [diff] [blame] | 4031 | SECTION_HEADS_UP = 1; |
Will Brockman | cec88ed | 2020-04-27 13:11:02 -0400 | [diff] [blame] | 4032 | SECTION_MEDIA_CONTROLS = 2; |
| 4033 | SECTION_PEOPLE = 3; |
| 4034 | SECTION_ALERTING = 4; |
| 4035 | SECTION_SILENT = 5; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 4036 | } |
| 4037 | optional NotificationSection section = 6; |
| 4038 | } |
| 4039 | |
| 4040 | message NotificationList { |
| 4041 | repeated Notification notifications = 1; // An ordered sequence of notifications. |
| 4042 | } |
| 4043 | |
| 4044 | /** |
| 4045 | * Reports a notification panel was displayed, e.g. from the lockscreen or status bar. |
| 4046 | * |
| 4047 | * Logged from: |
| 4048 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
| 4049 | */ |
| 4050 | message NotificationPanelReported { |
| 4051 | // The event_id (as for UiEventReported). |
| 4052 | optional int32 event_id = 1; |
| 4053 | optional int32 num_notifications = 2; |
| 4054 | // The notifications in the panel, in the order that they appear there. |
| 4055 | optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES]; |
| 4056 | } |
| 4057 | |
| 4058 | /** |
| 4059 | * Reports a notification channel, or channel group, was created, updated, or deleted. |
| 4060 | * |
| 4061 | * Logged from: |
| 4062 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 4063 | */ |
| 4064 | message NotificationChannelModified { |
| 4065 | // The event_id (as for UiEventReported). |
| 4066 | optional int32 event_id = 1; |
| 4067 | // The notifying app's uid and package. |
| 4068 | optional int32 uid = 2 [(is_uid) = true]; |
| 4069 | optional string package_name = 3; |
Will Brockman | 7fb7944 | 2020-02-27 14:34:24 -0500 | [diff] [blame] | 4070 | // Hash of app-assigned notification channel ID or channel-group ID |
| 4071 | optional int32 channel_id_hash = 4; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 4072 | // Previous importance setting, if applicable |
| 4073 | optional android.stats.sysui.NotificationImportance old_importance = 5; |
| 4074 | // New importance setting |
| 4075 | optional android.stats.sysui.NotificationImportance importance = 6; |
| 4076 | } |
| 4077 | |
| 4078 | |
| 4079 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4080 | * Logs when a biometric acquire event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4081 | * |
| 4082 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4083 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4084 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4085 | message BiometricAcquired { |
| 4086 | // Biometric modality that was acquired. |
| 4087 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4088 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. |
| 4089 | optional int32 user = 2; |
| 4090 | // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 4091 | optional bool is_crypto = 3; |
| 4092 | // Action that the device is performing. Acquired messages are only expected for enroll and |
| 4093 | // authenticate. Other actions may indicate an error. |
| 4094 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 4095 | // The client that this acquisition was received for. |
| 4096 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 4097 | // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager. |
| 4098 | optional int32 acquire_info = 6; |
| 4099 | // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. |
| 4100 | optional int32 acquire_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4101 | // Dictates if this message should trigger additional debugging. |
| 4102 | optional bool debug = 8; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4103 | } |
| 4104 | |
| 4105 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4106 | * Logs when a biometric authentication event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4107 | * |
| 4108 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4109 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4110 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4111 | message BiometricAuthenticated { |
| 4112 | // Biometric modality that was used. |
| 4113 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4114 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 4115 | optional int32 user = 2; |
| 4116 | // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password |
| 4117 | // storage. |
| 4118 | optional bool is_crypto = 3; |
| 4119 | // The client that this acquisition was received for. |
| 4120 | optional android.hardware.biometrics.ClientEnum client = 4; |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 4121 | // If authentication requires user confirmation. See BiometricPrompt's |
| 4122 | // setRequireConfirmation(bool) method. |
| 4123 | optional bool require_confirmation = 5; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4124 | |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4125 | enum State { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4126 | UNKNOWN = 0; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4127 | REJECTED = 1; |
| 4128 | PENDING_CONFIRMATION = 2; |
| 4129 | CONFIRMED = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4130 | } |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4131 | |
| 4132 | // State of the current auth attempt. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 4133 | optional State state = 6; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4134 | // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is |
| 4135 | // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to |
| 4136 | // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to |
| 4137 | // CONFIRMED. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 4138 | optional int64 latency_millis = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4139 | // Dictates if this message should trigger additional debugging. |
| 4140 | optional bool debug = 8; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4141 | } |
| 4142 | |
| 4143 | /** |
| 4144 | * Logs when a biometric error occurs. |
| 4145 | * |
| 4146 | * Logged from: |
| 4147 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 4148 | */ |
| 4149 | message BiometricErrorOccurred { |
| 4150 | // Biometric modality that was used. |
| 4151 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4152 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 4153 | optional int32 user = 2; |
| 4154 | // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 4155 | optional bool is_crypto = 3; |
| 4156 | // Action that the device is performing. |
| 4157 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 4158 | // The client that this acquisition was received for. |
| 4159 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 4160 | // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors |
| 4161 | // are unique to modality. |
| 4162 | optional int32 error_info = 6; |
| 4163 | // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined |
| 4164 | // by the vendor and not specified by the HIDL interface. |
| 4165 | optional int32 error_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4166 | // Dictates if this message should trigger additional debugging. |
| 4167 | optional bool debug = 8; |
Kevin Chyn | 7fca236 | 2019-06-20 17:20:42 -0700 | [diff] [blame] | 4168 | // Time spent during the authentication attempt. |
| 4169 | optional int64 latency_millis = 9; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4170 | } |
| 4171 | |
| 4172 | /** |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 4173 | * Logs when a system health issue is detected. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4174 | * Logged from: |
| 4175 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 4176 | */ |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 4177 | message BiometricSystemHealthIssueDetected { |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4178 | // Biometric modality. |
| 4179 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 4180 | // Type of issue detected. |
| 4181 | optional android.hardware.biometrics.IssueEnum issue = 2; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4182 | // Dictates if this message should trigger additional debugging. |
| 4183 | optional bool debug = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4184 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 4185 | |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 4186 | /** |
| 4187 | * Logs when a biometric enrollment occurs. |
| 4188 | * |
| 4189 | * Logged from: |
| 4190 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 4191 | */ |
| 4192 | message BiometricEnrolled { |
| 4193 | // Biometric modality that was used. |
| 4194 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4195 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 4196 | optional int32 user = 2; |
| 4197 | // The amount of time the enrollment took in milliseconds. |
| 4198 | optional int64 latency_millis = 3; |
| 4199 | // Whether or not the enrollment was successful. |
| 4200 | optional bool success = 4; |
| 4201 | } |
| 4202 | |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4203 | /* |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 4204 | * 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] | 4205 | */ |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 4206 | message FlagFlipUpdateOccurred { |
| 4207 | // If the event is from a flag config package, specify the package name. |
| 4208 | optional string flag_flip_package_name = 1; |
| 4209 | |
| 4210 | // The order id of the package |
| 4211 | optional int64 order_id = 2; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4212 | } |
| 4213 | |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 4214 | /** |
| 4215 | * Potential experiment ids that goes with a train install. |
Jonathan Nguyen | a0e6de1 | 2020-01-28 18:33:55 -0800 | [diff] [blame] | 4216 | * Should be kept in sync with experiment_ids.proto. |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 4217 | */ |
| 4218 | message TrainExperimentIds { |
| 4219 | repeated int64 experiment_id = 1; |
| 4220 | } |
| 4221 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4222 | /* |
| 4223 | * Logs when a binary push state changes. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4224 | * Logged by the installer via public api. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4225 | */ |
| 4226 | message BinaryPushStateChanged { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4227 | // Name of the train. |
| 4228 | optional string train_name = 1; |
| 4229 | // Version code for a "train" of packages that need to be installed atomically |
| 4230 | optional int64 train_version_code = 2; |
| 4231 | // After installation of this package, device requires a restart. |
| 4232 | optional bool requires_staging = 3; |
| 4233 | // Rollback should be enabled for this install. |
| 4234 | optional bool rollback_enabled = 4; |
| 4235 | // Requires low latency monitoring if possible. |
| 4236 | optional bool requires_low_latency_monitor = 5; |
| 4237 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4238 | enum State { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4239 | UNKNOWN = 0; |
| 4240 | INSTALL_REQUESTED = 1; |
| 4241 | INSTALL_STARTED = 2; |
| 4242 | INSTALL_STAGED_NOT_READY = 3; |
| 4243 | INSTALL_STAGED_READY = 4; |
| 4244 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 4245 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 4246 | // and INSTALL_FAILURE_COMMIT. |
| 4247 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 4248 | // 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] | 4249 | INSTALL_CANCELLED = 7; |
| 4250 | INSTALLER_ROLLBACK_REQUESTED = 8; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 4251 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 4252 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 4253 | INSTALLER_ROLLBACK_STAGED = 11; |
| 4254 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 4255 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 4256 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 4257 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 4258 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 4259 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 4260 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 4261 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 4262 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 4263 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 4264 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 4265 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 4266 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 4267 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 4268 | REBOOT_TRIGGERED = 26; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4269 | } |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4270 | optional State state = 6; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 4271 | // Possible experiment ids for monitoring this push. |
| 4272 | optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; |
| 4273 | // user id |
| 4274 | optional int32 user_id = 8; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 4275 | optional int32 reason = 9; |
Jonathan Nguyen | 703c42f | 2020-02-04 15:54:26 -0800 | [diff] [blame] | 4276 | // Whether or not this is a rollback event |
| 4277 | optional bool is_rollback = 10; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4278 | } |
| 4279 | |
Tej Singh | c920308 | 2019-05-03 13:42:23 -0700 | [diff] [blame] | 4280 | /* Test atom, is not logged anywhere */ |
| 4281 | message TestAtomReported { |
| 4282 | repeated AttributionNode attribution_node = 1; |
| 4283 | optional int32 int_field = 2; |
| 4284 | optional int64 long_field = 3; |
| 4285 | optional float float_field = 4; |
| 4286 | optional string string_field = 5; |
| 4287 | optional bool boolean_field = 6; |
| 4288 | enum State { |
| 4289 | UNKNOWN = 0; |
| 4290 | OFF = 1; |
| 4291 | ON = 2; |
| 4292 | } |
| 4293 | optional State state = 7; |
| 4294 | optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 4295 | } |
| 4296 | |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 4297 | /** Represents USB port overheat event. */ |
| 4298 | message UsbPortOverheatEvent { |
| 4299 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 4300 | optional int32 plug_temperature_deci_c = 1; |
| 4301 | |
| 4302 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ |
| 4303 | optional int32 max_temperature_deci_c = 2; |
| 4304 | |
| 4305 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 4306 | optional int32 time_to_overheat_secs = 3; |
| 4307 | |
| 4308 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 4309 | optional int32 time_to_hysteresis_secs = 4; |
| 4310 | |
| 4311 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 4312 | optional int32 time_to_inactive_secs = 5; |
| 4313 | }; |
| 4314 | |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 4315 | /** |
| 4316 | * Logs total effective full charge and discharge cycles on a battery. |
| 4317 | * Here are some examples of one effective cycle: |
| 4318 | * 1) the battery charges from 0% to 100% and drains back to 0%, |
| 4319 | * 2) charging from 50% to 100% and draining back to 50% twice. |
| 4320 | * Pulled from: |
| 4321 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4322 | */ |
| 4323 | message BatteryCycleCount { |
| 4324 | /* Number of total charge and discharge cycles on the system battery. */ |
| 4325 | optional int32 cycle_count = 1; |
| 4326 | } |
| 4327 | |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4328 | /** |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4329 | * Logs that external storage is mounted and information about it, the storage type (sd card/usb/ |
| 4330 | * others), its type (public or private) and the size in bytes. |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4331 | * Pulled from: |
| 4332 | * StatsCompanionService |
| 4333 | */ |
| 4334 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4335 | message ExternalStorageInfo { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4336 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4337 | enum VolumeType { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4338 | UNKNOWN = 0; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4339 | PUBLIC = 1; |
| 4340 | PRIVATE = 2; |
| 4341 | OTHER = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4342 | } |
| 4343 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4344 | // The type of external storage. |
| 4345 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 4346 | // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal. |
| 4347 | optional VolumeType volume_type = 2; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4348 | // Total size of the sd card in bytes. |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4349 | optional int64 size_bytes = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4350 | } |
| 4351 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4352 | /* |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4353 | * Logs when a connection becomes available and lost. |
| 4354 | * Logged in StatsCompanionService.java |
| 4355 | */ |
| 4356 | message ConnectivityStateChanged { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 4357 | // Id of the network. |
| 4358 | optional int32 net_id = 1; |
| 4359 | |
| 4360 | enum State { |
| 4361 | UNKNOWN = 0; |
| 4362 | CONNECTED = 1; |
| 4363 | DISCONNECTED = 2; |
| 4364 | } |
| 4365 | // Connected state of a network. |
| 4366 | optional State state = 2; |
| 4367 | } |
| 4368 | |
| 4369 | /** |
| 4370 | * Logs when a service starts and stops. |
| 4371 | * Logged from: |
| 4372 | * services/core/java/com/android/server/am/ActiveServices.java |
| 4373 | */ |
| 4374 | message ServiceStateChanged { |
| 4375 | |
| 4376 | optional int32 uid = 1 [(is_uid) = true]; |
| 4377 | |
| 4378 | optional string package_name = 2; |
| 4379 | |
| 4380 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4381 | |
| 4382 | enum State { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 4383 | START = 1; |
| 4384 | STOP = 2; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4385 | } |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 4386 | |
| 4387 | optional State state = 4; |
| 4388 | } |
| 4389 | |
| 4390 | /** |
| 4391 | * Logs when a service is launched. |
| 4392 | * Logged from: |
| 4393 | * services/core/java/com/android/server/am/ActiveServices.java |
| 4394 | */ |
| 4395 | message ServiceLaunchReported { |
| 4396 | |
| 4397 | optional int32 uid = 1 [(is_uid) = true]; |
| 4398 | |
| 4399 | optional string package_name = 2; |
| 4400 | |
| 4401 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4402 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 4403 | |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 4404 | /** |
| 4405 | * Logs when a hidden API is used. |
| 4406 | * |
| 4407 | * Logged from: |
| 4408 | * libcore/libart/src/main/java/dalvik/system/VMRuntime.java |
| 4409 | */ |
| 4410 | message HiddenApiUsed { |
| 4411 | // The uid of the app making the hidden access. |
| 4412 | optional int32 uid = 1 [(is_uid) = true]; |
| 4413 | |
| 4414 | // Signature of the method or field accessed. |
| 4415 | optional string signature = 2; |
| 4416 | |
| 4417 | enum AccessMethod { |
| 4418 | NONE = 0; |
| 4419 | REFLECTION = 1; |
| 4420 | JNI = 2; |
| 4421 | LINKING = 3; |
| 4422 | } |
| 4423 | |
| 4424 | // Type of access. |
| 4425 | optional AccessMethod access_method = 3; |
| 4426 | |
| 4427 | // Whether the access was prevented or not. |
| 4428 | optional bool access_denied = 4; |
| 4429 | } |
| 4430 | |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 4431 | /** |
| 4432 | * Logs user interaction with the Privacy Indicators added in Q. In particular: |
| 4433 | * - When user sees privacy chip |
| 4434 | * - When user clicks privacy chip |
| 4435 | * - How does the user exit the Privacy Dialog |
| 4436 | * Logged from: |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 4437 | * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java |
| 4438 | */ |
| 4439 | message PrivacyIndicatorsInteracted { |
| 4440 | |
| 4441 | enum Type { |
| 4442 | UNKNOWN = 0; |
| 4443 | CHIP_VIEWED = 1; |
| 4444 | CHIP_CLICKED = 2; |
| 4445 | DIALOG_PRIVACY_SETTINGS = 3; |
| 4446 | DIALOG_DISMISS = 4; |
| 4447 | DIALOG_LINE_ITEM = 5; |
| 4448 | } |
| 4449 | |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 4450 | optional Type type = 1 [(state_field_option).exclusive_state = true]; |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 4451 | |
| 4452 | // Used if the type is LINE_ITEM |
| 4453 | optional string package_name = 2; |
| 4454 | } |
| 4455 | |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 4456 | /** |
| 4457 | * Logs information about a package that is moved from the internal to external storage and vice |
| 4458 | * versa. |
| 4459 | * It logs the package name, the type of the external storage where the package is installed |
| 4460 | * (if moved to external storage, or UNKNOWN if moved to internal storage), |
| 4461 | * and the move type: if it's from internal to external or the other way around. |
| 4462 | * |
| 4463 | * Logged from: |
| 4464 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 4465 | */ |
| 4466 | message AppMovedStorageReported { |
| 4467 | enum MoveType { |
| 4468 | UNKNOWN = 0; |
| 4469 | TO_EXTERNAL = 1; |
| 4470 | TO_INTERNAL = 2; |
| 4471 | } |
| 4472 | // The type of the external storage. |
| 4473 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 4474 | // The type of move. |
| 4475 | optional MoveType move_type = 2; |
| 4476 | // The name of the package that was moved. |
| 4477 | optional string package_name = 3; |
| 4478 | } |
| 4479 | |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 4480 | /** |
| 4481 | * Logs when system server watchdog occurs. |
| 4482 | * Logged from: |
| 4483 | * frameworks/base/services/core/java/com/android/server/Watchdog.java |
| 4484 | */ |
| 4485 | message SystemServerWatchdogOccurred { |
| 4486 | optional string subject = 1; |
| 4487 | } |
| 4488 | |
| 4489 | /** |
| 4490 | * Logs when new file added to tombstones. |
| 4491 | * Logged from: |
| 4492 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 4493 | */ |
| 4494 | message TombStoneOccurred { |
| 4495 | } |
| 4496 | |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 4497 | /* |
| 4498 | * Information about a role request |
| 4499 | * |
| 4500 | * Logged from: |
| 4501 | * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java |
| 4502 | */ |
| 4503 | message RoleRequestResultReported { |
| 4504 | // UID of application requesting the role |
| 4505 | optional int32 requesting_uid = 1; |
| 4506 | |
| 4507 | // Package name of application requesting the role |
| 4508 | optional string requesting_package_name = 2; |
| 4509 | |
| 4510 | // The role to be granted |
| 4511 | optional string role_name = 3; |
| 4512 | |
| 4513 | // The count of applications qualifying for the role |
| 4514 | optional int32 qualifying_count = 4; |
| 4515 | |
| 4516 | // UID of application current granted the role |
| 4517 | optional int32 current_uid = 5; |
| 4518 | |
| 4519 | // Package name of application current granted the role |
| 4520 | optional string current_package_name = 6; |
| 4521 | |
| 4522 | // UID of another application that user chose to grant the role to, instead of the requesting |
| 4523 | // application |
| 4524 | optional int32 granted_another_uid = 7; |
| 4525 | |
| 4526 | // Package name of another application that user chose to grant the role to, instead of the |
| 4527 | // requesting application |
| 4528 | optional string granted_another_package_name = 8; |
| 4529 | |
| 4530 | enum Result { |
| 4531 | UNDEFINED = 0; |
| 4532 | // role request was ignored |
| 4533 | IGNORED = 1; |
| 4534 | // role request was ignored because it's already granted |
| 4535 | IGNORED_ALREADY_GRANTED = 2; |
| 4536 | // role request was ignored because the application isn't qualified |
| 4537 | IGNORED_NOT_QUALIFIED = 3; |
| 4538 | // role request was ignored because user said it should be always denied |
| 4539 | IGNORED_USER_ALWAYS_DENIED = 4; |
| 4540 | // role was granted by user action |
| 4541 | USER_GRANTED = 5; |
| 4542 | // role was denied by user action |
| 4543 | USER_DENIED = 6; |
| 4544 | // role was denied by user granting another application the role |
| 4545 | USER_DENIED_GRANTED_ANOTHER = 7; |
| 4546 | // role was denied and set to be always denied by the user |
| 4547 | USER_DENIED_WITH_ALWAYS = 8; |
| 4548 | } |
| 4549 | // The result of the role request |
| 4550 | optional Result result = 9; |
| 4551 | } |
| 4552 | |
Mark Tabry | 8a4a998 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 4553 | /** |
| 4554 | * Logs when a Vehicle Maps Service client's connection state has changed |
| 4555 | * |
| 4556 | * Logged from: |
| 4557 | * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java |
| 4558 | */ |
| 4559 | message VmsClientConnectionStateChanged { |
| 4560 | // The UID of the VMS client app |
| 4561 | optional int32 uid = 1 [(is_uid) = true]; |
| 4562 | |
| 4563 | enum State { |
| 4564 | UNKNOWN = 0; |
| 4565 | // Attempting to connect to the client |
| 4566 | CONNECTING = 1; |
| 4567 | // Client connection established |
| 4568 | CONNECTED = 2; |
| 4569 | // Client connection closed unexpectedly |
| 4570 | DISCONNECTED = 3; |
| 4571 | // Client connection closed by VMS |
| 4572 | TERMINATED = 4; |
| 4573 | // Error establishing the client connection |
| 4574 | CONNECTION_ERROR = 5; |
| 4575 | } |
| 4576 | |
| 4577 | optional State state = 2; |
| 4578 | } |
| 4579 | |
shafik | bb20605 | 2020-06-17 14:49:31 +0100 | [diff] [blame] | 4580 | message MimeTypes { |
| 4581 | repeated string mime_types = 1; |
| 4582 | } |
| 4583 | |
| 4584 | /** |
| 4585 | * Logs statistics regarding accesses to external storage. |
| 4586 | * All stats are normalized for one day period. |
| 4587 | * |
| 4588 | * Logged from: |
| 4589 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4590 | */ |
| 4591 | message GeneralExternalStorageAccessStats { |
| 4592 | optional int32 uid = 1 [(is_uid) = true]; |
| 4593 | // Total number of accesses like creation, open, delete and rename/update. |
| 4594 | // Includes file path and ContentResolver accesses |
| 4595 | optional uint32 total_accesses = 2; |
| 4596 | // Number of file path accesses, as opposed to file path and ContentResolver. |
| 4597 | optional uint32 file_path_accesses = 3; |
| 4598 | // Number of accesses on secondary volumes like SD cards. |
| 4599 | // Includes file path and ContentResolver accesses |
| 4600 | optional uint32 secondary_storage_accesses = 4; |
| 4601 | // Comma-separated list of mime types that were accessed. |
| 4602 | optional MimeTypes mime_types_accessed = 5; |
| 4603 | } |
| 4604 | |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4605 | /** |
| 4606 | * Logs when MediaProvider has successfully finished scanning a storage volume. |
| 4607 | * |
| 4608 | * Logged from: |
| 4609 | * packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java |
| 4610 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4611 | message MediaProviderScanOccurred { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4612 | enum Reason { |
| 4613 | // Scan triggered due to unknown reason |
| 4614 | UNKNOWN = 0; |
| 4615 | // Scan triggered due to storage volume being mounted |
| 4616 | MOUNTED = 1; |
| 4617 | // Scan triggered due to explicit user action or app request |
| 4618 | DEMAND = 2; |
| 4619 | // Scan triggered due to idle maintenance |
| 4620 | IDLE = 3; |
| 4621 | } |
| 4622 | |
| 4623 | // Volume type that this event pertains to |
| 4624 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4625 | // Reason why this scan was triggered |
| 4626 | optional Reason reason = 2; |
| 4627 | // Total number of files scanned |
| 4628 | optional int64 item_count = 3; |
| 4629 | // Duration of scan, normalized per file |
| 4630 | optional float normalized_duration_millis = 4; |
| 4631 | // Number of database inserts, normalized per file |
| 4632 | optional float normalized_insert_count = 5; |
| 4633 | // Number of database updates, normalized per file |
| 4634 | optional float normalized_update_count = 6; |
| 4635 | // Number of database deletes, normalized per file |
| 4636 | optional float normalized_delete_count = 7; |
| 4637 | } |
| 4638 | |
| 4639 | /** |
| 4640 | * Logs when an app has asked MediaProvider to delete media belonging to the user. |
| 4641 | * |
| 4642 | * Logged from: |
| 4643 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4644 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4645 | message MediaContentDeleted { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4646 | // Volume type that this event pertains to |
| 4647 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4648 | // UID of app that requested deletion |
| 4649 | optional int32 uid = 2 [(is_uid) = true]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4650 | // Number of items that were deleted |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4651 | optional int32 item_count = 3; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4652 | } |
| 4653 | |
| 4654 | /** |
| 4655 | * Logs when an app has asked MediaProvider to grant them access to media belonging to the user. |
| 4656 | * |
| 4657 | * Logged from: |
| 4658 | * packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java |
| 4659 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4660 | message MediaProviderPermissionRequested { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4661 | enum Result { |
| 4662 | UNKNOWN = 0; |
| 4663 | USER_GRANTED = 1; |
| 4664 | AUTO_GRANTED = 2; |
| 4665 | USER_DENIED = 3; |
| 4666 | USER_DENIED_WITH_PREJUDICE = 4; |
| 4667 | AUTO_DENIED = 5; |
| 4668 | } |
| 4669 | |
| 4670 | // Volume type that this event pertains to |
| 4671 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4672 | // UID of app that requested permission |
| 4673 | optional int32 uid = 2 [(is_uid) = true]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4674 | // Number of items that were requested |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4675 | optional int32 item_count = 3; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4676 | // Result of this request |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4677 | optional Result result = 4; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4678 | } |
| 4679 | |
| 4680 | /** |
| 4681 | * Logs when MediaProvider has finished upgrading or downgrading its database schema. |
| 4682 | * |
| 4683 | * Logged from: |
| 4684 | * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java |
| 4685 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4686 | message MediaProviderSchemaChanged { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4687 | // Volume type that this event pertains to |
| 4688 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4689 | // Old database version code |
| 4690 | optional int32 version_from = 2; |
| 4691 | // New database version code |
| 4692 | optional int32 version_to = 3; |
| 4693 | // Total number of files in database |
| 4694 | optional int64 item_count = 4; |
| 4695 | // Duration of schema change, normalized per file |
| 4696 | optional float normalized_duration_millis = 5; |
| 4697 | } |
| 4698 | |
| 4699 | /** |
| 4700 | * Logs when MediaProvider has finished an idle maintenance job. |
| 4701 | * |
| 4702 | * Logged from: |
| 4703 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4704 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4705 | message MediaProviderIdleMaintenanceFinished { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4706 | // Volume type that this event pertains to |
| 4707 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4708 | |
| 4709 | // Total number of files in database |
| 4710 | optional int64 item_count = 2; |
| 4711 | // Duration of idle maintenance, normalized per file |
| 4712 | optional float normalized_duration_millis = 3; |
| 4713 | // Number of thumbnails found to be stale, normalized per file |
| 4714 | optional float normalized_stale_thumbnails = 4; |
| 4715 | // Number of items found to be expired, normalized per file |
| 4716 | optional float normalized_expired_media = 5; |
| 4717 | } |
| 4718 | |
Keun young Park | bc3ce00 | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4719 | /** |
| 4720 | * Represents boot time event with duration in ms. |
| 4721 | * |
| 4722 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4723 | */ |
| 4724 | message BootTimeEventDuration { |
| 4725 | enum DurationEvent { |
| 4726 | UNKNOWN = 0; |
| 4727 | // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat. |
| 4728 | ABSOLUTE_BOOT_TIME = 1; |
| 4729 | // Bootloader's 1st stage execution time. |
| 4730 | // Logged from bootstat. |
| 4731 | BOOTLOADER_FIRST_STAGE_EXEC = 2; |
| 4732 | // Bootloader's 1st stage loading time. |
| 4733 | // Logged from bootstat. |
| 4734 | BOOTLOADER_FIRST_STAGE_LOAD = 3; |
| 4735 | // Bootloader's kernel loading time. |
| 4736 | // Logged from bootstat. |
| 4737 | BOOTLOADER_KERNEL_LOAD = 4; |
| 4738 | // Bootloader's 2nd stage execution time. |
| 4739 | // Logged from bootstat. |
| 4740 | BOOTLOADER_SECOND_STAGE_EXEC = 5; |
| 4741 | // Bootloader's 2nd stage loading time. |
| 4742 | // Logged from bootstat. |
| 4743 | BOOTLOADER_SECOND_STAGE_LOAD = 6; |
| 4744 | // Duration for Bootloader to show unlocked device's warning UI. This should not happen |
| 4745 | // for locked device. |
| 4746 | // Logged from bootstat. |
| 4747 | BOOTLOADER_UI_WAIT = 7; |
| 4748 | // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above. |
| 4749 | // Logged from bootstat. |
| 4750 | BOOTLOADER_TOTAL = 8; |
| 4751 | // Shutdown duration inside init for the reboot before the current boot up. |
| 4752 | // Logged from f/b/services/.../BootReceiver.java. |
| 4753 | SHUTDOWN_DURATION = 9; |
| 4754 | // Total time for mounting of disk devices during bootup. |
| 4755 | // Logged from f/b/services/.../BootReceiver.java. |
| 4756 | MOUNT_DEFAULT_DURATION = 10; |
| 4757 | // Total time for early stage mounting of disk devices during bootup. |
| 4758 | // Logged from f/b/services/.../BootReceiver.java. |
| 4759 | MOUNT_EARLY_DURATION = 11; |
| 4760 | // Total time for late stage mounting of disk devices during bootup. |
| 4761 | // Logged from f/b/services/.../BootReceiver.java. |
| 4762 | MOUNT_LATE_DURATION = 12; |
| 4763 | // Average time to scan non-system app after OTA |
| 4764 | // Logged from f/b/services/.../PackageManagerService.java |
| 4765 | OTA_PACKAGE_MANAGER_INIT_TIME = 13; |
| 4766 | // Time to initialize Package manager after OTA |
| 4767 | // Logged from f/b/services/.../PackageManagerService.java |
| 4768 | OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14; |
| 4769 | // Time to scan all system app from Package manager after OTA |
| 4770 | // Logged from f/b/services/.../PackageManagerService.java |
| 4771 | OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15; |
| 4772 | // Init's total time for cold boot stage. |
| 4773 | // Logged from bootstat. |
| 4774 | COLDBOOT_WAIT = 16; |
| 4775 | // Init's total time for initializing selinux. |
| 4776 | // Logged from bootstat. |
| 4777 | SELINUX_INIT = 17; |
| 4778 | // Time since last factory reset. |
| 4779 | // Logged from bootstat. |
| 4780 | FACTORY_RESET_TIME_SINCE_RESET = 18; |
Keun young Park | 8856b25 | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4781 | // Init's total time spent for completing the 1st stage. |
| 4782 | // Logged from bootstat. |
| 4783 | ANDROID_INIT_STAGE_1 = 19; |
Keun young Park | bc3ce00 | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4784 | } |
| 4785 | |
| 4786 | // Type of the event. |
| 4787 | optional DurationEvent event = 1; |
| 4788 | // Duration of the event in ms. |
| 4789 | optional int64 duration_millis = 2; |
| 4790 | } |
| 4791 | |
| 4792 | /** |
| 4793 | * Represents the start of specific boot time event during bootup in ms. This is usually a time |
| 4794 | * since boot-up. |
| 4795 | * |
| 4796 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4797 | */ |
| 4798 | message BootTimeEventElapsedTime { |
| 4799 | enum ElapsedTimeEvent { |
| 4800 | UNKNOWN = 0; |
| 4801 | // Time when init starts 1st stage. Logged from bootstat. |
| 4802 | ANDROID_INIT_STAGE_1 = 1; |
| 4803 | // Time when sys.boot_completed prop is set. |
| 4804 | // Logged from bootstat. |
| 4805 | BOOT_COMPLETE = 2; |
| 4806 | // BOOT_COMPLETE for encrypted device. |
| 4807 | BOOT_COMPLETE_ENCRYPTION = 3; |
| 4808 | // BOOT_COMPLETE for device with no encryption. |
| 4809 | BOOT_COMPLETE_NO_ENCRYPTION = 4; |
| 4810 | // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time. |
Keun young Park | 8856b25 | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4811 | BOOT_COMPLETE_POST_DECRYPT = 5; |
Keun young Park | bc3ce00 | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4812 | // BOOT_COMPLETE after factory reset. |
| 4813 | FACTORY_RESET_BOOT_COMPLETE = 6; |
| 4814 | // BOOT_COMPLETE_NO_ENCRYPTION after factory reset. |
| 4815 | FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7; |
Keun young Park | 8856b25 | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4816 | // BOOT_COMPLETE_POST_DECRYPT after factory reset. |
| 4817 | FACTORY_RESET_BOOT_COMPLETE_POST_DECRYPT = 8; |
Keun young Park | bc3ce00 | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4818 | // BOOT_COMPLETE after OTA. |
| 4819 | OTA_BOOT_COMPLETE = 9; |
| 4820 | // BOOT_COMPLETE_NO_ENCRYPTION after OTA. |
| 4821 | OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10; |
Keun young Park | 8856b25 | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4822 | // BOOT_COMPLETE_POST_DECRYPT after OTA. |
| 4823 | OTA_BOOT_COMPLETE_POST_DECRYPT = 11; |
Keun young Park | bc3ce00 | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4824 | // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast. |
| 4825 | // Logged from f/b/services/.../UserController.java |
| 4826 | FRAMEWORK_LOCKED_BOOT_COMPLETED = 12; |
| 4827 | // Time when the system starts sending BOOT_COMPLETED broadcast. |
| 4828 | // Logged from f/b/services/.../UserController.java |
| 4829 | FRAMEWORK_BOOT_COMPLETED = 13; |
| 4830 | // Time when the package manager starts init. |
| 4831 | // Logged from f/b/services/.../SystemServer.java |
| 4832 | PACKAGE_MANAGER_INIT_START = 14; |
| 4833 | // Time when package manager is ready |
| 4834 | // Logged from f/b/services/.../SystemServer.java |
| 4835 | PACKAGE_MANAGER_INIT_READY = 15; |
| 4836 | // Represents the time when user has entered unlock credential for system with user pin. |
| 4837 | // Logged from bootstat. |
| 4838 | POST_DECRYPT = 16; |
| 4839 | // Represents the start of zygote's init. |
| 4840 | // Logged from zygote itself. |
| 4841 | ZYGOTE_INIT_START = 17; |
| 4842 | // Represents the start of secondary zygote's init. |
| 4843 | // TODO: add logging to zygote |
| 4844 | SECONDARY_ZYGOTE_INIT_START = 18; |
| 4845 | // Represents the start of system server's init. |
| 4846 | // Logged from f/b/services/.../SystemServer.java |
| 4847 | SYSTEM_SERVER_INIT_START = 19; |
| 4848 | // Represents the completion of system server's init. |
| 4849 | // Logged from f/b/services/.../SystemServer.java |
| 4850 | SYSTEM_SERVER_READY = 20; |
| 4851 | // Represents the start of launcher during boot-up. |
| 4852 | // TODO: add logging |
| 4853 | LAUNCHER_START = 21; |
| 4854 | // Represents the completion of launcher's initial rendering. User can use other apps from |
| 4855 | // launcher from this point. |
| 4856 | // TODO: add logging |
| 4857 | LAUNCHER_SHOWN = 22; |
| 4858 | } |
| 4859 | |
| 4860 | // Type of the event. |
| 4861 | optional ElapsedTimeEvent event = 1; |
| 4862 | // Time since bootup for the event. |
| 4863 | // It should be acquired from SystemClock elapsedRealtime() call or equivalent. |
| 4864 | optional int64 time_millis = 2; |
| 4865 | } |
| 4866 | |
| 4867 | /** |
| 4868 | * Boot time events with UTC time. |
| 4869 | * |
| 4870 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4871 | */ |
| 4872 | message BootTimeEventUtcTime { |
| 4873 | enum UtcTimeEvent { |
| 4874 | UNKNOWN = 0; |
| 4875 | // Time of the bootstat's marking of 1st boot after the last factory reset. |
| 4876 | // Logged from bootstat. |
| 4877 | FACTORY_RESET_RESET_TIME = 1; |
| 4878 | // The time when bootstat records FACTORY_RESET_* events. This is close to |
| 4879 | // BOOT_COMPLETE time for the current bootup. |
| 4880 | // Logged from bootstat. |
| 4881 | FACTORY_RESET_CURRENT_TIME = 2; |
| 4882 | // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose. |
| 4883 | // Logged from bootstat. |
| 4884 | FACTORY_RESET_RECORD_VALUE = 3; |
| 4885 | } |
| 4886 | |
| 4887 | // Type of the event. |
| 4888 | optional UtcTimeEvent event = 1; |
| 4889 | // UTC time for the event. |
| 4890 | optional int64 utc_time_secs = 2; |
| 4891 | } |
| 4892 | |
| 4893 | /** |
| 4894 | * Boot time events representing specific error code during bootup. |
| 4895 | * Meaning of error code can be different per each event type. |
| 4896 | * |
| 4897 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4898 | */ |
| 4899 | message BootTimeEventErrorCode { |
| 4900 | enum ErrorCodeEvent { |
| 4901 | UNKNOWN = 0; |
| 4902 | // Linux error code for time() call to get the current UTC time. |
| 4903 | // Logged from bootstat. |
| 4904 | FACTORY_RESET_CURRENT_TIME_FAILURE = 1; |
| 4905 | // Represents UmountStat before the reboot for the current boot up. Error codes defined |
| 4906 | // as UMOUNT_STAT_* from init/reboot.cpp. |
| 4907 | // Logged from f/b/services/.../BootReceiver.java. |
| 4908 | SHUTDOWN_UMOUNT_STAT = 2; |
Keun young Park | b95f21f | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4909 | // Reprepsents fie system mounting error code of /data partition for the current boot. |
| 4910 | // Error codes defined as combination of FsStatFlags from system/core/fs_mgr/fs_mgr.cpp. |
Keun young Park | bc3ce00 | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4911 | // Logged from f/b/services/.../BootReceiver.java. |
Keun young Park | b95f21f | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4912 | FS_MGR_FS_STAT_DATA_PARTITION = 3; |
Keun young Park | bc3ce00 | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4913 | } |
| 4914 | |
| 4915 | // Type of the event. |
| 4916 | optional ErrorCodeEvent event = 1; |
| 4917 | // error code defined per each event type. |
| 4918 | // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of |
| 4919 | // FS_MGR_FS_STAT. |
| 4920 | optional int32 error_code = 2; |
| 4921 | } |
| 4922 | |
Alessio Balsini | 1550470 | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 4923 | /** |
| 4924 | * Collects Virtual A/B statistics related to the use of dm-snapshot performed |
| 4925 | * after an OTA. |
| 4926 | * |
| 4927 | * Logged from: |
Yifan Hong | 36137f0 | 2020-03-11 10:35:08 -0700 | [diff] [blame] | 4928 | * - system/update_engine/cleanup_previous_update_action.cc |
Alessio Balsini | 1550470 | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 4929 | */ |
| 4930 | message SnapshotMergeReported { |
| 4931 | // Keep in sync with |
| 4932 | // system/core/fs_mgr/libsnapshot/android/snapshot/snapshot.proto |
| 4933 | enum UpdateState { |
| 4934 | // No update or merge is in progress. |
| 4935 | NONE = 0; |
| 4936 | // An update is applying; snapshots may already exist. |
| 4937 | INITIATED = 1; |
| 4938 | // An update is pending, but has not been successfully booted yet. |
| 4939 | UNVERIFIED = 2; |
| 4940 | // The kernel is merging in the background. |
| 4941 | MERGING = 3; |
| 4942 | // Post-merge cleanup steps could not be completed due to a transient |
| 4943 | // error, but the next reboot will finish any pending operations. |
| 4944 | MERGE_NEEDS_REBOOT = 4; |
| 4945 | // Merging is complete, and needs to be acknowledged. |
| 4946 | MERGE_COMPLETED = 5; |
| 4947 | // Merging failed due to an unrecoverable error. |
| 4948 | MERGE_FAILED = 6; |
| 4949 | // The update was implicitly cancelled, either by a rollback or a flash |
| 4950 | // operation via fastboot. This state can only be returned by WaitForMerge. |
| 4951 | CANCELLED = 7; |
| 4952 | }; |
| 4953 | |
| 4954 | // Status of the update after the merge attempts. |
| 4955 | optional UpdateState final_state = 1; |
| 4956 | |
| 4957 | // Time to complete a merge operation in milliseconds. |
| 4958 | // A negative value corresponds to the case in which the merge operation |
| 4959 | // was interrupted and resumed (e.g. in case of a system reboot during the |
| 4960 | // merge). |
| 4961 | optional int64 duration_millis = 2; |
| 4962 | |
| 4963 | // Number of reboots that occurred after issuing and before completing the |
| 4964 | // merge of all the snapshot devices. |
| 4965 | optional int32 intermediate_reboots = 3; |
Alessio Balsini | 2294f39 | 2020-05-26 11:11:20 +0100 | [diff] [blame] | 4966 | |
| 4967 | // The device has been upgraded to Virtual A/B. |
| 4968 | optional bool is_vab_retrofit = 4; |
| 4969 | |
| 4970 | // Space that has been temporarily allocated in the /data partition |
| 4971 | // containing the dm-snapshot's copy-on-write data generated during a |
| 4972 | // Virtual A/B update. |
| 4973 | optional int64 cow_file_size_bytes = 5; |
Alessio Balsini | 628fb8d | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 4974 | } |
| 4975 | |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 4976 | /** |
| 4977 | * Event representing when BlobStoreManager.Session#commit() is called |
| 4978 | * |
| 4979 | * Logged from: |
| 4980 | * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java |
| 4981 | */ |
| 4982 | message BlobCommitted { |
| 4983 | // Uid of the Blob committer |
| 4984 | optional int32 uid = 1 [(is_uid) = true]; |
| 4985 | |
| 4986 | // Id of the Blob committed |
| 4987 | optional int64 blob_id = 2; |
| 4988 | |
| 4989 | // Size of the Blob |
| 4990 | optional int64 size = 3; |
| 4991 | |
| 4992 | enum Result { |
| 4993 | UNKNOWN = 0; |
| 4994 | // Commit Succeeded |
| 4995 | SUCCESS = 1; |
| 4996 | // Commit Failed: Error occurred during commit |
| 4997 | ERROR_DURING_COMMIT = 2; |
| 4998 | // Commit Failed: Digest of the data did not match Blob digest |
| 4999 | DIGEST_MISMATCH = 3; |
Sudheer Shanka | 5ed8d50 | 2020-06-23 19:01:37 -0700 | [diff] [blame] | 5000 | // Commit Failed: Allowed count limit exceeded |
| 5001 | COUNT_LIMIT_EXCEEDED = 4; |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 5002 | } |
| 5003 | optional Result result = 4; |
| 5004 | } |
| 5005 | |
| 5006 | /** |
| 5007 | * Event representing when BlobStoreManager#acquireLease() is called |
| 5008 | * |
| 5009 | * Logged from: |
| 5010 | * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java |
| 5011 | */ |
| 5012 | message BlobLeased{ |
| 5013 | // Uid of the Blob leasee |
| 5014 | optional int32 uid = 1 [(is_uid) = true]; |
| 5015 | |
| 5016 | // Id of the Blob leased or 0 if the Blob does not exist |
| 5017 | optional int64 blob_id = 2; |
| 5018 | |
| 5019 | // Size of the Blob or 0 if the Blob does not exist |
| 5020 | optional int64 size = 3; |
| 5021 | |
| 5022 | enum Result { |
| 5023 | UNKNOWN = 0; |
| 5024 | // Lease Succeeded |
| 5025 | SUCCESS = 1; |
| 5026 | // Lease Failed: Blob does not exist |
| 5027 | BLOB_DNE = 2; |
| 5028 | // Lease Failed: Leasee does not have access to the Blob |
| 5029 | ACCESS_NOT_ALLOWED = 3; |
| 5030 | // Lease Failed: Leasee requested an invalid expiry duration |
| 5031 | LEASE_EXPIRY_INVALID = 4; |
| 5032 | // Lease Failed: Leasee has exceeded the total data lease limit |
| 5033 | DATA_SIZE_LIMIT_EXCEEDED = 5; |
Sudheer Shanka | 5ed8d50 | 2020-06-23 19:01:37 -0700 | [diff] [blame] | 5034 | // Leasee Failed: Allowed count limit exceeded |
| 5035 | COUNT_LIMIT_EXCEEDED = 6; |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 5036 | } |
| 5037 | optional Result result = 4; |
| 5038 | } |
| 5039 | |
| 5040 | /** |
| 5041 | * Event representing when BlobStoreManager#openBlob() is called |
| 5042 | * |
| 5043 | * Logged from: |
| 5044 | * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java |
| 5045 | */ |
| 5046 | message BlobOpened{ |
| 5047 | // Uid of the Blob opener |
| 5048 | optional int32 uid = 1 [(is_uid) = true]; |
| 5049 | |
| 5050 | // Id of the Blob opened or 0 if the Blob does not exist |
| 5051 | optional int64 blob_id = 2; |
| 5052 | |
| 5053 | // Size of the Blob or 0 if the Blob does not exist |
| 5054 | optional int64 size = 3; |
| 5055 | |
| 5056 | enum Result { |
| 5057 | UNKNOWN = 0; |
| 5058 | // Open Succeeded |
| 5059 | SUCCESS = 1; |
| 5060 | // Open Failed: Blob does not exist |
| 5061 | BLOB_DNE = 2; |
| 5062 | // Open Failed: Opener does not have access to the Blob |
| 5063 | ACCESS_NOT_ALLOWED = 3; |
| 5064 | } |
| 5065 | optional Result result = 4; |
Alessio Balsini | 1550470 | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 5066 | } |
| 5067 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 5068 | ////////////////////////////////////////////////////////////////////// |
| 5069 | // Pulled atoms below this line // |
| 5070 | ////////////////////////////////////////////////////////////////////// |
| 5071 | |
| 5072 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5073 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 5074 | * |
| 5075 | * Pulled from: |
| 5076 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 5077 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5078 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5079 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5080 | |
| 5081 | optional int64 rx_bytes = 2; |
| 5082 | |
| 5083 | optional int64 rx_packets = 3; |
| 5084 | |
| 5085 | optional int64 tx_bytes = 4; |
| 5086 | |
| 5087 | optional int64 tx_packets = 5; |
| 5088 | } |
| 5089 | |
| 5090 | /** |
| 5091 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 5092 | * |
| 5093 | * Pulled from: |
| 5094 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 5095 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5096 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5097 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5098 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 5099 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 5100 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5101 | |
| 5102 | optional int64 rx_bytes = 3; |
| 5103 | |
| 5104 | optional int64 rx_packets = 4; |
| 5105 | |
| 5106 | optional int64 tx_bytes = 5; |
| 5107 | |
| 5108 | optional int64 tx_packets = 6; |
| 5109 | } |
| 5110 | |
| 5111 | /** |
| 5112 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 5113 | * |
| 5114 | * Pulled from: |
| 5115 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 5116 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5117 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5118 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5119 | |
| 5120 | optional int64 rx_bytes = 2; |
| 5121 | |
| 5122 | optional int64 rx_packets = 3; |
| 5123 | |
| 5124 | optional int64 tx_bytes = 4; |
| 5125 | |
| 5126 | optional int64 tx_packets = 5; |
| 5127 | } |
| 5128 | |
| 5129 | /** |
| 5130 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 5131 | * |
| 5132 | * Pulled from: |
| 5133 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 5134 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5135 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5136 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5137 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5138 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 5139 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 5140 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5141 | |
| 5142 | optional int64 rx_bytes = 3; |
| 5143 | |
| 5144 | optional int64 rx_packets = 4; |
| 5145 | |
| 5146 | optional int64 tx_bytes = 5; |
| 5147 | |
| 5148 | optional int64 tx_packets = 6; |
| 5149 | } |
| 5150 | |
| 5151 | /** |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5152 | * Used for pull network statistics via mobile|wifi networks, and sliced by interesting dimensions. |
junyulai | 8b794b7 | 2020-05-19 17:36:13 +0800 | [diff] [blame] | 5153 | * Note that the data is expected to be sliced into more dimensions in future. In other words, |
| 5154 | * the caller must not assume any row of data is one full report when filtering with a set of |
| 5155 | * matching conditions, because future data may represent with multiple rows what is currently |
| 5156 | * represented by one. |
| 5157 | * To avoid being broken by future slicing, callers must take care to aggregate rows even if they |
| 5158 | * query all the existing columns. |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5159 | * |
| 5160 | * Pulled from: |
| 5161 | * StatsPullAtomService (using NetworkStatsService to get NetworkStats) |
| 5162 | */ |
| 5163 | message DataUsageBytesTransfer { |
| 5164 | // State of this record. Should be NetworkStats#SET_DEFAULT or NetworkStats#SET_FOREGROUND to |
| 5165 | // indicate the foreground state, or NetworkStats#SET_ALL to indicate the record is for all |
| 5166 | // states combined, not including debug states. See NetworkStats#SET_*. |
| 5167 | optional int32 state = 1; |
| 5168 | |
| 5169 | optional int64 rx_bytes = 2; |
| 5170 | |
| 5171 | optional int64 rx_packets = 3; |
| 5172 | |
| 5173 | optional int64 tx_bytes = 4; |
| 5174 | |
| 5175 | optional int64 tx_packets = 5; |
| 5176 | |
| 5177 | // Radio Access Technology (RAT) type of this record, should be one of |
| 5178 | // TelephonyManager#NETWORK_TYPE_* constants, or NetworkTemplate#NETWORK_TYPE_ALL to indicate |
| 5179 | // the record is for all rat types combined. |
| 5180 | optional int32 rat_type = 6; |
| 5181 | |
| 5182 | // Mcc/Mnc read from sim if the record is for a specific subscription, null indicates the |
junyulai | 8b794b7 | 2020-05-19 17:36:13 +0800 | [diff] [blame] | 5183 | // record is combined across subscriptions. |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5184 | optional string sim_mcc = 7; |
| 5185 | optional string sim_mnc = 8; |
| 5186 | |
junyulai | 8b794b7 | 2020-05-19 17:36:13 +0800 | [diff] [blame] | 5187 | // Allows mobile virtual network operators (MVNOs) to be identified with individual IDs. |
| 5188 | // See TelephonyManager#getSimCarrierId. |
| 5189 | optional int32 carrier_id = 9; |
| 5190 | |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5191 | // Enumeration of opportunistic states with an additional ALL state indicates the record is |
| 5192 | // combined regardless of the boolean value in its field. |
| 5193 | enum DataSubscriptionState { |
junyulai | 8b794b7 | 2020-05-19 17:36:13 +0800 | [diff] [blame] | 5194 | UNKNOWN = 0; // For server side backward compatibility. |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5195 | ALL = 1; |
| 5196 | OPPORTUNISTIC = 2; |
| 5197 | NOT_OPPORTUNISTIC = 3; |
| 5198 | } |
| 5199 | // Mark whether the subscription is an opportunistic data subscription, and ALL indicates the |
junyulai | 8b794b7 | 2020-05-19 17:36:13 +0800 | [diff] [blame] | 5200 | // record is combined across opportunistic data subscriptions. |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5201 | // See {@link SubscriptionManager#setOpportunistic}. |
junyulai | 8b794b7 | 2020-05-19 17:36:13 +0800 | [diff] [blame] | 5202 | optional DataSubscriptionState opportunistic_data_sub = 10; |
junyulai | 472144c | 2020-07-16 13:48:00 +0800 | [diff] [blame] | 5203 | |
| 5204 | // Indicate whether NR is connected, server side could use this with RAT type to determine if |
| 5205 | // the record is for 5G NSA (Non Stand Alone) mode, where the primary cell is still LTE and |
| 5206 | // network allocates a secondary 5G cell so telephony reports RAT = LTE along with NR state as |
| 5207 | // connected. |
| 5208 | optional bool is_nr_connected = 11; |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5209 | } |
| 5210 | |
| 5211 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5212 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 5213 | * |
| 5214 | * Pulled from: |
| 5215 | * StatsCompanionService |
| 5216 | */ |
| 5217 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5218 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5219 | |
| 5220 | optional int64 rx_bytes = 2; |
| 5221 | |
| 5222 | optional int64 tx_bytes = 3; |
| 5223 | } |
| 5224 | |
| 5225 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5226 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 5227 | * android/internal/os/KernelWakelockStats.java |
| 5228 | * |
| 5229 | * Pulled from: |
| 5230 | * StatsCompanionService using KernelWakelockReader. |
| 5231 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5232 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5233 | optional string name = 1; |
| 5234 | |
| 5235 | optional int32 count = 2; |
| 5236 | |
| 5237 | optional int32 version = 3; |
| 5238 | |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5239 | optional int64 time_micros = 4; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5240 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 5241 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5242 | /** |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 5243 | * Pulls low power state information. If power.stats HAL is not available, this |
| 5244 | * includes platform and subsystem sleep state information, |
| 5245 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState |
| 5246 | * as defined in: |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 5247 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 5248 | * hardware/interfaces/power/1.1/types.hal |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 5249 | * If power.stats HAL is available, this includes PowerEntityStateResidencyResult |
| 5250 | * as defined in: |
| 5251 | * hardware/interfaces/power/stats/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 5252 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5253 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 5254 | // Subsystem name |
| 5255 | optional string subsystem_name = 1; |
| 5256 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 5257 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 5258 | // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the |
| 5259 | // powerEntityStateName from the corresponding PowerEntityStateInfo. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 5260 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 5261 | // 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] | 5262 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 5263 | // 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] | 5264 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 5265 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5266 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5267 | /** |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 5268 | * Pulls on-device power measurement information. |
| 5269 | * Data defined by hardware/interfaces/power/stats/1.0/types.hal. |
| 5270 | * Pulled from: |
| 5271 | * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp |
| 5272 | */ |
| 5273 | message OnDevicePowerMeasurement { |
| 5274 | // Name of the subsystem (to which the rail belongs). |
| 5275 | optional string subsystem_name = 1; |
| 5276 | |
| 5277 | // Rail name. The rail lies within the subsystem. |
| 5278 | optional string rail_name = 2; |
| 5279 | |
| 5280 | // Time (in ms since boot) at which the rail energy value was measured. |
| 5281 | // This may differ slightly from the time that statsd logs this information. |
| 5282 | optional uint64 measurement_timestamp_millis = 3; |
| 5283 | |
| 5284 | // Accumulated energy used via the rail since device boot in uWs. |
| 5285 | optional uint64 energy_microwatt_secs = 4; |
| 5286 | } |
| 5287 | |
| 5288 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5289 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 5290 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 5291 | * starts from highest to lowest. The value should be monotonically |
| 5292 | * increasing since boot. However, if there is a cpu |
| 5293 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5294 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5295 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5296 | optional uint32 cluster = 1; |
| 5297 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5298 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5299 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5300 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5301 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5302 | * Pulls Cpu Time Per Uid. |
| 5303 | * Note that isolated process uid time should be attributed to host uids. |
| 5304 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5305 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5306 | optional int32 uid = 1 [(is_uid) = true]; |
Misha Wagner | 6bc6c91 | 2018-11-16 13:19:54 +0000 | [diff] [blame] | 5307 | optional uint64 user_time_micros = 2; |
| 5308 | optional uint64 sys_time_micros = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5309 | } |
| 5310 | |
| 5311 | /** |
| 5312 | * Pulls Cpu Time Per Uid per frequency. |
| 5313 | * Note that isolated process uid time should be attributed to host uids. |
| 5314 | * For each uid, we order the time by descending frequencies. |
| 5315 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5316 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5317 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 5318 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5319 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5320 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 5321 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5322 | /** |
| 5323 | * Pulls Wifi Controller Activity Energy Info |
| 5324 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 5325 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5326 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5327 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5328 | // stack reported state |
| 5329 | // TODO: replace this with proto enum |
| 5330 | optional int32 stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5331 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5332 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5333 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5334 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5335 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5336 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5337 | // product of current(mA), voltage(V) and time(ms) |
| 5338 | optional uint64 controller_energy_used = 6; |
| 5339 | } |
| 5340 | |
| 5341 | /** |
| 5342 | * Pulls Modem Activity Energy Info |
| 5343 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5344 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5345 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5346 | optional uint64 timestamp_millis = 1; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5347 | // sleep time in millis. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5348 | optional uint64 sleep_time_millis = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5349 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5350 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5351 | /** |
| 5352 | * Tx power index |
| 5353 | * index 0 = tx_power < 0dBm |
| 5354 | * index 1 = 0dBm < tx_power < 5dBm |
| 5355 | * index 2 = 5dBm < tx_power < 15dBm |
| 5356 | * index 3 = 15dBm < tx_power < 20dBm |
| 5357 | * index 4 = tx_power > 20dBm |
| 5358 | */ |
| 5359 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5360 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5361 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5362 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5363 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5364 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5365 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5366 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5367 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5368 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5369 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5370 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5371 | // product of current(mA), voltage(V) and time(ms) |
Chen Xu | 9663781 | 2019-09-07 15:51:22 -0700 | [diff] [blame] | 5372 | optional uint64 energy_used = 10 [deprecated=true]; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 5373 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 5374 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5375 | /** |
| 5376 | * Pulls Bluetooth Activity Energy Info |
| 5377 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 5378 | */ |
| 5379 | message BluetoothActivityInfo { |
| 5380 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5381 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5382 | // bluetooth stack state |
| 5383 | optional int32 bluetooth_stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5384 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5385 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5386 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5387 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5388 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5389 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5390 | // product of current(mA), voltage(V) and time(ms) |
| 5391 | optional uint64 energy_used = 6; |
| 5392 | } |
| 5393 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 5394 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5395 | * Logs the memory stats for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5396 | * |
| 5397 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5398 | */ |
| 5399 | message ProcessMemoryState { |
| 5400 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5401 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5402 | |
| 5403 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5404 | // Usually package name, "system" for system server. |
| 5405 | // Provided by ActivityManagerService. |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5406 | optional string process_name = 2; |
| 5407 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5408 | // Current OOM score adjustment. Value read from ProcessRecord. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5409 | optional int32 oom_adj_score = 3; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5410 | |
| 5411 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5412 | optional int64 page_fault = 4; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5413 | |
| 5414 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5415 | optional int64 page_major_fault = 5; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5416 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5417 | // RSS |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5418 | // Value is read from memory.stat, field total_rss if per-app memory |
| 5419 | // cgroups are enabled. Otherwise, value from /proc/pid/stat. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5420 | optional int64 rss_in_bytes = 6; |
| 5421 | |
| 5422 | // CACHE |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5423 | // Value is read from memory.stat, field total_cache if per-app memory |
| 5424 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5425 | optional int64 cache_in_bytes = 7; |
| 5426 | |
| 5427 | // SWAP |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5428 | // 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] | 5429 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5430 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | aaf6089 | 2018-09-12 13:04:30 +0100 | [diff] [blame] | 5431 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5432 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5433 | optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; |
Rafal Slawik | 272a816 | 2018-11-01 15:12:28 +0000 | [diff] [blame] | 5434 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5435 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 5436 | optional int64 start_time_nanos = 10 [deprecated = true]; |
Ioannis Ilkos | 466ad6c | 2019-06-18 17:42:00 +0100 | [diff] [blame] | 5437 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5438 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 5439 | optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true]; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 5440 | } |
| 5441 | |
| 5442 | /* |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5443 | * Logs the memory high-water mark for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5444 | * |
| 5445 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) |
| 5446 | * and for selected native processes. |
Rafal Slawik | 44b8814 | 2018-12-15 16:48:09 +0000 | [diff] [blame] | 5447 | * |
| 5448 | * Pulling this atom resets high-water mark counters for all processes. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5449 | */ |
| 5450 | message ProcessMemoryHighWaterMark { |
| 5451 | // The uid if available. -1 means not available. |
| 5452 | optional int32 uid = 1 [(is_uid) = true]; |
| 5453 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5454 | // The process name. |
| 5455 | // Usually package name or process cmdline. |
| 5456 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5457 | optional string process_name = 2; |
| 5458 | |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 5459 | // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is |
| 5460 | // computed by converting kilobytes to bytes. |
| 5461 | optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true]; |
| 5462 | |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5463 | // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in |
| 5464 | // /proc/PID/status. |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 5465 | optional int32 rss_high_water_mark_in_kilobytes = 4; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5466 | } |
| 5467 | |
| 5468 | /* |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 5469 | * Logs the memory stats for a process. |
| 5470 | * |
| 5471 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService) |
| 5472 | * and for selected native processes. |
| 5473 | */ |
| 5474 | message ProcessMemorySnapshot { |
| 5475 | // The uid if available. -1 means not available. |
| 5476 | optional int32 uid = 1 [(is_uid) = true]; |
| 5477 | |
| 5478 | // The process name. |
| 5479 | // Usually package name or process cmdline. |
| 5480 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
| 5481 | optional string process_name = 2; |
| 5482 | |
| 5483 | // The pid of the process. |
| 5484 | // Allows to disambiguate instances of the process. |
| 5485 | optional int32 pid = 3; |
| 5486 | |
| 5487 | // The current OOM score adjustment value. |
| 5488 | // Read from ProcessRecord for managed processes. |
| 5489 | // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones. |
| 5490 | optional int32 oom_score_adj = 4; |
| 5491 | |
| 5492 | // The current RSS of the process. |
| 5493 | // VmRSS from /proc/pid/status. |
| 5494 | optional int32 rss_in_kilobytes = 5; |
| 5495 | |
| 5496 | // The current anon RSS of the process. |
| 5497 | // RssAnon from /proc/pid/status. |
| 5498 | optional int32 anon_rss_in_kilobytes = 6; |
| 5499 | |
| 5500 | // The current swap size of the process. |
| 5501 | // VmSwap from /proc/pid/status. |
| 5502 | optional int32 swap_in_kilobytes = 7; |
| 5503 | |
| 5504 | // The sum of rss_in_kilobytes and swap_in_kilobytes. |
| 5505 | optional int32 anon_rss_and_swap_in_kilobytes = 8; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5506 | } |
| 5507 | |
| 5508 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5509 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5510 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5511 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5512 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5513 | } |
| 5514 | |
| 5515 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5516 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5517 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5518 | message SystemUptime { |
| 5519 | // Milliseconds since the system was booted. |
| 5520 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 5521 | // for external input). |
| 5522 | // 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] | 5523 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5524 | } |
| 5525 | |
| 5526 | /* |
| 5527 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 5528 | * active: X (X is # cores) |
| 5529 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 5530 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 5531 | * ... |
| 5532 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 5533 | * The file contains a monotonically increasing count of time for a single boot. |
| 5534 | */ |
| 5535 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5536 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 5537 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5538 | } |
| 5539 | |
| 5540 | /** |
| 5541 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 5542 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 5543 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 5544 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 5545 | * ... |
| 5546 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 5547 | * The file contains a monotonically increasing count of time for a single boot. |
| 5548 | */ |
| 5549 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5550 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 5551 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5552 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 5553 | } |
| 5554 | |
| 5555 | /* |
| 5556 | * Pulls free disk space, for data, system partition and temporary directory. |
| 5557 | */ |
| 5558 | message DiskSpace { |
| 5559 | // available bytes in data partition |
| 5560 | optional uint64 data_available_bytes = 1; |
| 5561 | // available bytes in system partition |
| 5562 | optional uint64 system_available_bytes = 2; |
| 5563 | // available bytes in download cache or temp directories |
| 5564 | optional uint64 temp_available_bytes = 3; |
| 5565 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5566 | |
| 5567 | /** |
| 5568 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 9876a3b | 2019-01-11 14:28:35 -0800 | [diff] [blame] | 5569 | * |
| 5570 | * Pulled from StatsCompanionService.java |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5571 | */ |
| 5572 | message RemainingBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5573 | optional int32 charge_micro_ampere_hour = 1; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5574 | } |
| 5575 | |
| 5576 | /** |
| 5577 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5578 | * Pulled from: |
| 5579 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5580 | */ |
| 5581 | message FullBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5582 | optional int32 capacity_micro_ampere_hour = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5583 | } |
| 5584 | |
| 5585 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 5586 | * Pulls battery voltage. |
| 5587 | * Pulled from: |
| 5588 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 5589 | */ |
| 5590 | message BatteryVoltage { |
| 5591 | // The voltage of the battery, in millivolts. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5592 | optional int32 voltage_millivolt = 1; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 5593 | } |
| 5594 | |
| 5595 | /** |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 5596 | * Pulls battery level (percent full, from 0 to 100). |
| 5597 | * |
| 5598 | * Pulled from: |
| 5599 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 5600 | */ |
| 5601 | message BatteryLevel { |
| 5602 | // Battery level. Should be in [0, 100]. |
| 5603 | optional int32 battery_level = 1; |
| 5604 | } |
| 5605 | |
| 5606 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 5607 | * Pulls the temperature of various parts of the device. |
| 5608 | * 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] | 5609 | * |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 5610 | * Pulled from StatsCompanionService.java |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5611 | */ |
| 5612 | message Temperature { |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 5613 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5614 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 5615 | |
| 5616 | // The name of the temperature source. Eg. CPU0 |
| 5617 | optional string sensor_name = 2; |
| 5618 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 5619 | // Temperature in tenths of a degree C. |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 5620 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5621 | optional int32 temperature_deci_celsius = 3; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 5622 | |
| 5623 | // Relative severity of the throttling, see enum definition. |
| 5624 | optional android.os.ThrottlingSeverityEnum severity = 4; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 5625 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 5626 | |
| 5627 | /** |
| 5628 | * Pulls the statistics of calls to Binder. |
| 5629 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 5630 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 5631 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 5632 | * |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 5633 | * Next tag: 15 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 5634 | */ |
| 5635 | message BinderCalls { |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 5636 | // UID of the process responsible for the binder transaction. It will be set if the process |
| 5637 | // executing the binder transaction attribute the transaction to another uid using |
| 5638 | // Binder.setThreadWorkSource(). |
| 5639 | // |
| 5640 | // If not set, the value will be -1. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 5641 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 5642 | // UID of the process executing the binder transaction. |
| 5643 | optional int32 direct_caller_uid = 14; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 5644 | // Fully qualified class name of the API call. |
| 5645 | // |
| 5646 | // This is a system server class name. |
| 5647 | // |
| 5648 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 5649 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 5650 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 5651 | // commonly used APIs. |
| 5652 | optional string service_class_name = 2; |
| 5653 | // Method name of the API call. It can also be a transaction code if we cannot |
| 5654 | // resolve it to a name. See Binder#getTransactionName. |
| 5655 | // |
| 5656 | // This is a system server method name. |
| 5657 | optional string service_method_name = 3; |
| 5658 | // Total number of API calls. |
| 5659 | optional int64 call_count = 4; |
| 5660 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 5661 | optional bool screen_interactive = 13; |
| 5662 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 5663 | // call_count will be equal to recorded_call_count. |
| 5664 | // |
| 5665 | // If recorded_call_count is different than call_count, it means data collection has been |
| 5666 | // sampled. All the fields below will be sampled in this case. |
| 5667 | optional int64 recorded_call_count = 12; |
| 5668 | // Number of exceptions thrown by the API. |
| 5669 | optional int64 recorded_exception_count = 5; |
| 5670 | // Total latency of all API calls. |
| 5671 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 5672 | optional int64 recorded_total_latency_micros = 6; |
| 5673 | // Maximum latency of one API call. |
| 5674 | optional int64 recorded_max_latency_micros = 7; |
| 5675 | // Total CPU usage of all API calls. |
| 5676 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 5677 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 5678 | optional int64 recorded_total_cpu_micros = 8; |
| 5679 | // Maximum CPU usage of one API call. |
| 5680 | optional int64 recorded_max_cpu_micros = 9; |
| 5681 | // Maximum parcel reply size of one API call. |
| 5682 | optional int64 recorded_max_reply_size_bytes = 10; |
| 5683 | // Maximum parcel request size of one API call. |
| 5684 | optional int64 recorded_max_request_size_bytes = 11; |
| 5685 | } |
| 5686 | |
| 5687 | /** |
| 5688 | * Pulls the statistics of exceptions during calls to Binder. |
| 5689 | * |
| 5690 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 5691 | * > adb shell dumpsys binder_calls_stats --reset |
| 5692 | */ |
| 5693 | message BinderCallsExceptions { |
| 5694 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 5695 | // |
| 5696 | // This is an exception class name thrown by the system server. |
| 5697 | optional string exception_class_name = 1; |
| 5698 | // Total number of exceptions. |
| 5699 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 5700 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5701 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5702 | /** |
| 5703 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 5704 | * |
| 5705 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 5706 | * config on the device. |
| 5707 | * |
| 5708 | * Next tag: 11 |
| 5709 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5710 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 5711 | // 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] | 5712 | optional int32 uid = 1 [(is_uid) = true]; |
| 5713 | |
| 5714 | // Fully qualified class name of the handler target class. |
| 5715 | // |
| 5716 | // This field does not contain PII. This is a system server class name. |
| 5717 | optional string handler_class_name = 2; |
| 5718 | |
| 5719 | // The name of the thread that runs the Looper. |
| 5720 | // |
| 5721 | // This field does not contain PII. This is a system server thread name. |
| 5722 | optional string looper_thread_name = 3; |
| 5723 | |
| 5724 | // The name of the dispatched message. |
| 5725 | // |
| 5726 | // This field does not contain PII. This is a system server constant or class |
| 5727 | // name. |
| 5728 | optional string message_name = 4; |
| 5729 | |
| 5730 | // Total number of successfully dispatched messages. |
| 5731 | optional int64 message_count = 5; |
| 5732 | |
| 5733 | // Total number of messages that failed dispatching. |
| 5734 | optional int64 exception_count = 6; |
| 5735 | |
| 5736 | // Total number of processed messages we have data recorded for. If we |
| 5737 | // collected data for all the messages, message_count will be equal to |
| 5738 | // recorded_message_count. |
| 5739 | // |
| 5740 | // If recorded_message_count is different than message_count, it means data |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 5741 | // 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] | 5742 | optional int64 recorded_message_count = 7; |
| 5743 | |
| 5744 | // Total latency of all processed messages. |
| 5745 | // Average can be computed using recorded_total_latency_micros / |
| 5746 | // recorded_message_count. |
| 5747 | optional int64 recorded_total_latency_micros = 8; |
| 5748 | |
| 5749 | // Total CPU usage of all processed message. |
| 5750 | // Average can be computed using recorded_total_cpu_micros / |
| 5751 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5752 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5753 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5754 | |
| 5755 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 5756 | optional bool screen_interactive = 10; |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 5757 | |
| 5758 | // Max recorded CPU usage of all processed messages. |
| 5759 | optional int64 recorded_max_cpu_micros = 11; |
| 5760 | |
| 5761 | // Max recorded latency of all processed messages. |
| 5762 | optional int64 recorded_max_latency_micros = 12; |
| 5763 | |
| 5764 | // Total number of messages we tracked the dispatching delay for. If we |
| 5765 | // collected data for all the messages, message_count will be equal to |
| 5766 | // recorded_delay_message_count. |
| 5767 | // |
| 5768 | // If recorded_delay_message_count is different than message_count, it means data |
| 5769 | // collection has been sampled or/and not all messages specified the target dispatch time. |
| 5770 | // The fields below will be sampled in this case. |
| 5771 | optional int64 recorded_delay_message_count = 13; |
| 5772 | |
| 5773 | // Total dispatching delay of all processed messages. |
| 5774 | // Calculated as a difference between the target dispatching time (Message.when) |
| 5775 | // and the actual dispatching time. |
| 5776 | // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. |
| 5777 | optional int64 recorded_total_delay_millis = 14; |
| 5778 | |
| 5779 | // Max dispatching delay of all processed messages. |
| 5780 | // Calculated as a difference between the target dispatching time (Message.when) |
| 5781 | // and the actual dispatching time. |
| 5782 | optional int64 recorded_max_delay_millis = 15; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5783 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 5784 | |
| 5785 | /** |
| 5786 | * Pulls disk information, such as write speed and latency. |
| 5787 | */ |
| 5788 | message DiskStats { |
| 5789 | // Time taken to open, write 512B to, and close a file. |
| 5790 | // -1 if error performing the check. |
| 5791 | optional int64 data_write_latency_millis = 1; |
| 5792 | |
| 5793 | optional bool file_based_encryption = 2; |
| 5794 | |
| 5795 | // Recent disk write speed in kB/s. |
| 5796 | // -1 if error querying storageed. |
| 5797 | // 0 if data is unavailable. |
| 5798 | optional int32 recent_disk_write_speed = 3; |
| 5799 | } |
| 5800 | |
| 5801 | |
| 5802 | /** |
| 5803 | * Free and total bytes of the Data, Cache, and System partition. |
| 5804 | */ |
| 5805 | message DirectoryUsage { |
| 5806 | enum Directory { |
| 5807 | UNKNOWN = 0; |
| 5808 | DATA = 1; |
| 5809 | CACHE = 2; |
| 5810 | SYSTEM = 3; |
| 5811 | } |
| 5812 | optional Directory directory = 1; |
| 5813 | optional int64 free_bytes = 2; |
| 5814 | optional int64 total_bytes = 3; |
| 5815 | } |
| 5816 | |
| 5817 | |
| 5818 | /** |
| 5819 | * Size of an application: apk size, data size, and cache size. |
| 5820 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 5821 | * Information is only reported for apps with the primary user (user 0). |
| 5822 | * Sizes are aggregated by package name. |
| 5823 | */ |
| 5824 | message AppSize { |
| 5825 | // Including uids will involve modifying diskstats logic. |
| 5826 | optional string package_name = 1; |
| 5827 | // App size in bytes. -1 if unavailable. |
| 5828 | optional int64 app_size_bytes = 2; |
| 5829 | // App data size in bytes. -1 if unavailable. |
| 5830 | optional int64 app_data_size_bytes = 3; |
| 5831 | // App cache size in bytes. -1 if unavailable. |
| 5832 | optional int64 app_cache_size_bytes = 4; |
| 5833 | // Time that the cache file was produced. |
| 5834 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 5835 | optional int64 cache_time_millis = 5; |
| 5836 | } |
| 5837 | |
| 5838 | |
| 5839 | /** |
| 5840 | * Size of a particular category. Eg: photos, videos. |
| 5841 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 5842 | */ |
| 5843 | message CategorySize { |
| 5844 | enum Category { |
| 5845 | UNKNOWN = 0; |
| 5846 | APP_SIZE = 1; |
| 5847 | APP_DATA_SIZE = 2; |
| 5848 | APP_CACHE_SIZE = 3; |
| 5849 | PHOTOS = 4; |
| 5850 | VIDEOS = 5; |
| 5851 | AUDIO = 6; |
| 5852 | DOWNLOADS = 7; |
| 5853 | SYSTEM = 8; |
| 5854 | OTHER = 9; |
| 5855 | } |
| 5856 | optional Category category = 1; |
| 5857 | // Category size in bytes. |
| 5858 | optional int64 size_bytes = 2; |
| 5859 | // Time that the cache file was produced. |
| 5860 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 5861 | optional int64 cache_time_millis = 3; |
| 5862 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5863 | |
| 5864 | /** |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 5865 | * Pulls per uid I/O stats. The stats are cumulative since boot. |
| 5866 | * |
| 5867 | * Read/write bytes are I/O events from a storage device |
| 5868 | * Read/write chars are data requested by read/write syscalls, and can be |
| 5869 | * satisfied by caching. |
| 5870 | * |
| 5871 | * Pulled from StatsCompanionService, which reads proc/uid_io/stats. |
| 5872 | */ |
| 5873 | message DiskIo { |
| 5874 | optional int32 uid = 1 [(is_uid) = true]; |
| 5875 | optional int64 fg_chars_read = 2; |
| 5876 | optional int64 fg_chars_write = 3; |
| 5877 | optional int64 fg_bytes_read = 4; |
| 5878 | optional int64 fg_bytes_write = 5; |
| 5879 | optional int64 bg_chars_read = 6; |
| 5880 | optional int64 bg_chars_write = 7; |
| 5881 | optional int64 bg_bytes_read = 8; |
| 5882 | optional int64 bg_bytes_write = 9; |
| 5883 | optional int64 fg_fsync = 10; |
| 5884 | optional int64 bg_fsync= 11; |
| 5885 | } |
| 5886 | |
| 5887 | |
| 5888 | /** |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5889 | * Pulls the number of fingerprints for each user. |
| 5890 | * |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 5891 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5892 | */ |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5893 | message NumFingerprintsEnrolled { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5894 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5895 | // Defined in android/os/UserHandle.java |
| 5896 | optional int32 user = 1; |
| 5897 | // Number of fingerprints registered to that user. |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5898 | optional int32 num_fingerprints_enrolled = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5899 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5900 | |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5901 | /** |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5902 | * Pulls the number of faces for each user. |
| 5903 | * |
| 5904 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
| 5905 | */ |
| 5906 | message NumFacesEnrolled { |
| 5907 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5908 | // Defined in android/os/UserHandle.java |
| 5909 | optional int32 user = 1; |
| 5910 | // Number of faces registered to that user. |
| 5911 | optional int32 num_faces_enrolled = 2; |
| 5912 | } |
| 5913 | /** |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5914 | * A mapping of role holder -> role |
| 5915 | */ |
| 5916 | message RoleHolder { |
| 5917 | // uid of the role holder |
| 5918 | optional int32 uid = 1 [(is_uid) = true]; |
| 5919 | |
| 5920 | // package name of the role holder |
| 5921 | optional string package_name = 2; |
| 5922 | |
| 5923 | // the role held |
| 5924 | optional string role = 3; |
| 5925 | } |
| 5926 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5927 | message AggStats { |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5928 | // These are all in byte resolution. |
| 5929 | optional int64 min = 1 [deprecated = true]; |
| 5930 | optional int64 average = 2 [deprecated = true]; |
| 5931 | optional int64 max = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5932 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5933 | // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above |
| 5934 | // int64 fields. |
| 5935 | optional int32 mean_kb = 4; |
| 5936 | optional int32 max_kb = 5; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5937 | } |
| 5938 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5939 | // A reduced subset of process states; reducing the number of possible states allows more |
| 5940 | // aggressive device-side aggregation of statistics and hence reduces metric upload size. |
| 5941 | enum ProcessStateAggregated { |
| 5942 | PROCESS_STATE_UNKNOWN = 0; |
| 5943 | // Persistent system process. |
| 5944 | PROCESS_STATE_PERSISTENT = 1; |
| 5945 | // Top activity; actually any visible activity. |
| 5946 | PROCESS_STATE_TOP = 2; |
| 5947 | // Process binding to top or a foreground service. |
| 5948 | PROCESS_STATE_BOUND_TOP_OR_FGS = 3; |
| 5949 | // Processing running a foreground service. |
| 5950 | PROCESS_STATE_FGS = 4; |
| 5951 | // Important foreground process (ime, wallpaper, etc). |
| 5952 | PROCESS_STATE_IMPORTANT_FOREGROUND = 5; |
| 5953 | // Important background process. |
| 5954 | PROCESS_STATE_BACKGROUND = 6; |
| 5955 | // Process running a receiver. |
| 5956 | PROCESS_STATE_RECEIVER = 7; |
| 5957 | // All kinds of cached processes. |
| 5958 | PROCESS_STATE_CACHED = 8; |
| 5959 | } |
| 5960 | |
| 5961 | // Next tag: 13 |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5962 | message ProcessStatsStateProto { |
| 5963 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5964 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5965 | optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5966 | |
| 5967 | // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java |
| 5968 | // and not frameworks/base/core/java/android/app/ActivityManager.java |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5969 | optional android.service.procstats.ProcessState process_state = 3 [deprecated = true]; |
| 5970 | |
| 5971 | optional ProcessStateAggregated process_state_aggregated = 10; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5972 | |
| 5973 | // Millisecond uptime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5974 | optional int64 duration_millis = 4 [deprecated = true]; |
| 5975 | // Same as above, but with minute resolution so it fits into an int32. |
| 5976 | optional int32 duration_minutes = 11; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5977 | |
| 5978 | // Millisecond elapsed realtime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5979 | optional int64 realtime_duration_millis = 9 [deprecated = true]; |
| 5980 | // Same as above, but with minute resolution so it fits into an int32. |
| 5981 | optional int32 realtime_duration_minutes = 12; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5982 | |
| 5983 | // # of samples taken |
| 5984 | optional int32 sample_size = 5; |
| 5985 | |
| 5986 | // PSS is memory reserved for this process |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5987 | optional AggStats pss = 6 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5988 | |
| 5989 | // USS is memory shared between processes, divided evenly for accounting |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5990 | optional AggStats uss = 7 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5991 | |
| 5992 | // RSS is memory resident for this process |
| 5993 | optional AggStats rss = 8; |
| 5994 | } |
| 5995 | |
Jing Ji | 060d686 | 2020-04-13 19:36:31 -0700 | [diff] [blame] | 5996 | // Next Tag: 8 |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5997 | message ProcessStatsProto { |
| 5998 | // Name of process. |
| 5999 | optional string process = 1; |
| 6000 | |
| 6001 | // Uid of the process. |
Jing Ji | 1cd1f60 | 2020-06-03 13:45:36 -0700 | [diff] [blame] | 6002 | optional int32 uid = 2 [(is_uid) = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6003 | |
| 6004 | // Information about how often kills occurred |
| 6005 | message Kill { |
| 6006 | // Count of excessive CPU kills |
| 6007 | optional int32 cpu = 1; |
| 6008 | |
| 6009 | // Count of kills when cached |
| 6010 | optional int32 cached = 2; |
| 6011 | |
| 6012 | // PSS stats during cached kill |
| 6013 | optional AggStats cached_pss = 3; |
| 6014 | } |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 6015 | optional Kill kill = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6016 | |
| 6017 | // Time and memory spent in various states. |
| 6018 | repeated ProcessStatsStateProto states = 5; |
| 6019 | |
| 6020 | // Total time process has been running... screen_state, memory_state, and process_state |
| 6021 | // will not be set. |
| 6022 | optional ProcessStatsStateProto total_running_state = 6; |
Jing Ji | 060d686 | 2020-04-13 19:36:31 -0700 | [diff] [blame] | 6023 | |
| 6024 | // Association data for this process in this state; |
| 6025 | // each entry here is one association. |
| 6026 | repeated ProcessStatsAssociationProto assocs = 7; |
| 6027 | } |
| 6028 | |
Jing Ji | 1cd1f60 | 2020-06-03 13:45:36 -0700 | [diff] [blame] | 6029 | // Next Tag: 6 |
Jing Ji | 060d686 | 2020-04-13 19:36:31 -0700 | [diff] [blame] | 6030 | message ProcessStatsAssociationProto { |
| 6031 | // Procss Name of the associated process (client process of service binding) |
| 6032 | optional string assoc_process_name = 1; |
| 6033 | |
| 6034 | // Package Name of the associated package (client package of service binding) |
Jing Ji | 1cd1f60 | 2020-06-03 13:45:36 -0700 | [diff] [blame] | 6035 | optional string assoc_package_name = 2 [deprecated = true]; |
| 6036 | |
| 6037 | // UID of the associated process/package (client package of service binding) |
| 6038 | optional int32 assoc_uid = 5 [(is_uid) = true]; |
Jing Ji | 060d686 | 2020-04-13 19:36:31 -0700 | [diff] [blame] | 6039 | |
| 6040 | // Total count of the times this association (service binding) appeared. |
| 6041 | optional int32 total_count = 3; |
| 6042 | |
| 6043 | // Uptime total duration in seconds this association (service binding) was around. |
| 6044 | optional int32 total_duration_secs = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6045 | } |
| 6046 | |
| 6047 | message PackageServiceOperationStatsProto { |
| 6048 | // Operate enum: Started, Foreground, Bound, Executing |
| 6049 | optional android.service.procstats.ServiceOperationState operation = 1; |
| 6050 | |
| 6051 | // Number of times the service was in this operation. |
| 6052 | optional int32 count = 2; |
| 6053 | |
| 6054 | // Information about a state the service can be in. |
| 6055 | message StateStats { |
| 6056 | // Screen state enum. |
| 6057 | optional android.service.procstats.ScreenState screen_state = 1; |
| 6058 | // Memory state enum. |
| 6059 | optional android.service.procstats.MemoryState memory_state = 2; |
| 6060 | |
| 6061 | // duration in milliseconds. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6062 | optional int64 duration_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6063 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6064 | optional int64 realtime_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6065 | } |
| 6066 | repeated StateStats state_stats = 3; |
| 6067 | } |
| 6068 | |
| 6069 | message PackageServiceStatsProto { |
| 6070 | // Name of service component. |
| 6071 | optional string service_name = 1; |
| 6072 | |
| 6073 | // The operation stats. |
| 6074 | // The package_name, package_uid, package_version, service_name will not be set to save space. |
| 6075 | repeated PackageServiceOperationStatsProto operation_stats = 2; |
| 6076 | } |
| 6077 | |
| 6078 | message PackageAssociationSourceProcessStatsProto { |
| 6079 | // Uid of the process. |
| 6080 | optional int32 process_uid = 1; |
| 6081 | // Process name. |
| 6082 | optional string process_name = 2; |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 6083 | // Package name. |
| 6084 | optional string package_name = 7; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6085 | // Total count of the times this association appeared. |
| 6086 | optional int32 total_count = 3; |
| 6087 | |
| 6088 | // Millisecond uptime total duration this association was around. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6089 | optional int64 total_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6090 | |
| 6091 | // Total count of the times this association became actively impacting its target process. |
| 6092 | optional int32 active_count = 5; |
| 6093 | |
| 6094 | // Information on one source in this association. |
| 6095 | message StateStats { |
| 6096 | // Process state enum. |
| 6097 | optional android.service.procstats.ProcessState process_state = 1; |
| 6098 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6099 | optional int64 duration_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6100 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6101 | optional int64 realtime_duration_mmillis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6102 | } |
| 6103 | repeated StateStats active_state_stats = 6; |
| 6104 | } |
| 6105 | |
| 6106 | message PackageAssociationProcessStatsProto { |
| 6107 | // Name of the target component. |
| 6108 | optional string component_name = 1; |
| 6109 | // Information on one source in this association. |
| 6110 | repeated PackageAssociationSourceProcessStatsProto sources = 2; |
| 6111 | } |
| 6112 | |
| 6113 | |
| 6114 | message ProcessStatsPackageProto { |
| 6115 | // Name of package. |
| 6116 | optional string package = 1; |
| 6117 | |
| 6118 | // Uid of the package. |
| 6119 | optional int32 uid = 2; |
| 6120 | |
| 6121 | // Version of the package. |
| 6122 | optional int64 version = 3; |
| 6123 | |
| 6124 | // Stats for each process running with the package loaded in to it. |
| 6125 | repeated ProcessStatsProto process_stats = 4; |
| 6126 | |
| 6127 | // Stats for each of the package's services. |
| 6128 | repeated PackageServiceStatsProto service_stats = 5; |
| 6129 | |
| 6130 | // Stats for each association with the package. |
| 6131 | repeated PackageAssociationProcessStatsProto association_stats = 6; |
| 6132 | } |
| 6133 | |
| 6134 | message ProcessStatsSectionProto { |
| 6135 | // Elapsed realtime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6136 | optional int64 start_realtime_millis = 1; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6137 | |
| 6138 | // Elapsed realtime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6139 | optional int64 end_realtime_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6140 | |
| 6141 | // CPU uptime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6142 | optional int64 start_uptime_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6143 | |
| 6144 | // CPU uptime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6145 | optional int64 end_uptime_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6146 | |
| 6147 | // System runtime library. e.g. "libdvm.so", "libart.so". |
| 6148 | optional string runtime = 5; |
| 6149 | |
| 6150 | // whether kernel reports swapped pss. |
| 6151 | optional bool has_swapped_pss = 6; |
| 6152 | |
| 6153 | // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". |
| 6154 | enum Status { |
| 6155 | STATUS_UNKNOWN = 0; |
| 6156 | STATUS_COMPLETE = 1; |
| 6157 | STATUS_PARTIAL = 2; |
| 6158 | STATUS_SHUTDOWN = 3; |
| 6159 | STATUS_SYSPROPS = 4; |
| 6160 | } |
| 6161 | repeated Status status = 7; |
| 6162 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 6163 | // Number of pages available of various types and sizes, representation fragmentation. |
| 6164 | repeated ProcessStatsAvailablePagesProto available_pages = 10; |
| 6165 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6166 | // Stats for each process. |
| 6167 | repeated ProcessStatsProto process_stats = 8; |
| 6168 | |
| 6169 | // Stats for each package. |
| 6170 | repeated ProcessStatsPackageProto package_stats = 9; |
| 6171 | } |
| 6172 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 6173 | message ProcessStatsAvailablePagesProto { |
| 6174 | // Node these pages are in (as per /proc/pagetypeinfo) |
| 6175 | optional int32 node = 1; |
| 6176 | |
| 6177 | // Zone these pages are in (as per /proc/pagetypeinfo) |
| 6178 | optional string zone = 2; |
| 6179 | |
| 6180 | // Label for the type of these pages (as per /proc/pagetypeinfo) |
| 6181 | optional string label = 3; |
| 6182 | |
| 6183 | // Distribution of number of pages available by order size. First entry in array is |
| 6184 | // order 0, second is order 1, etc. Each order increase is a doubling of page size. |
| 6185 | repeated int32 pages_per_order = 4; |
| 6186 | } |
| 6187 | |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 6188 | /** |
| 6189 | * Pulled from ProcessStatsService.java |
| 6190 | */ |
| 6191 | message ProcStats { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6192 | optional ProcessStatsSectionProto proc_stats_section = 1; |
Richard Gaywood | 78c3f992 | 2020-06-23 17:12:49 +0100 | [diff] [blame] | 6193 | // Data pulled from device into this is sometimes sharded across multiple atoms to work around |
| 6194 | // a size limit. When this happens, this shard ID will contain an increasing 1-indexed integer |
| 6195 | // with the number of this shard. |
| 6196 | optional int32 shard_id = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6197 | } |
| 6198 | |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 6199 | /** |
| 6200 | * Pulled from ProcessStatsService.java |
| 6201 | */ |
| 6202 | message ProcStatsPkgProc { |
| 6203 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 6204 | } |
| 6205 | |
Chris Wren | bc487b5 | 2019-11-22 16:58:17 -0500 | [diff] [blame] | 6206 | // Next Tag: 2 |
| 6207 | message PackageRemoteViewInfoProto { |
| 6208 | optional string package_name = 1; |
| 6209 | // add per-package additional info here (like channels) |
| 6210 | } |
| 6211 | |
| 6212 | // Next Tag: 2 |
| 6213 | message NotificationRemoteViewsProto { |
| 6214 | repeated PackageRemoteViewInfoProto package_remote_view_info = 1; |
| 6215 | } |
| 6216 | |
| 6217 | /** |
| 6218 | * Pulled from NotificationManagerService.java |
| 6219 | */ |
| 6220 | message NotificationRemoteViews { |
| 6221 | optional NotificationRemoteViewsProto notification_remote_views = 1; |
| 6222 | } |
| 6223 | |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6224 | /** |
| 6225 | * Atom that contains a list of a package's preferences, pulled from NotificationManagerService.java |
| 6226 | */ |
| 6227 | message PackageNotificationPreferences { |
| 6228 | // Uid under which the package is installed. |
Muhammad Qureshi | 22e52da | 2020-03-30 21:14:21 -0700 | [diff] [blame] | 6229 | optional int32 uid = 1 [(is_uid) = true]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6230 | // Notification importance, which specifies when and how a notification is displayed. |
| 6231 | // Specified under core/java/android/app/NotificationManager.java. |
| 6232 | optional int32 importance = 2; |
| 6233 | // Lockscreen visibility as set by the user. |
| 6234 | optional int32 visibility = 3; |
| 6235 | // Bitfield mask indicating what fields were locked by the user (see LockableAppfields in |
| 6236 | // PreferencesHelper.java) |
| 6237 | optional int32 user_locked_fields = 4; |
| 6238 | } |
| 6239 | |
| 6240 | /** |
| 6241 | * Atom that contains a list of a package's channel preferences, pulled from |
| 6242 | * NotificationManagerService.java. |
| 6243 | */ |
| 6244 | message PackageNotificationChannelPreferences { |
| 6245 | // Uid under which the package is installed. |
Muhammad Qureshi | 22e52da | 2020-03-30 21:14:21 -0700 | [diff] [blame] | 6246 | optional int32 uid = 1 [(is_uid) = true]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6247 | // Channel's ID. Should always be available. |
| 6248 | optional string channel_id = 2; |
| 6249 | // Channel's name. Should always be available. |
| 6250 | optional string channel_name = 3; |
| 6251 | // Channel's description. Optionally set by the channel creator. |
| 6252 | optional string description = 4; |
| 6253 | // Notification importance, which specifies when and how a notification is displayed. Specified |
| 6254 | // under core/java/android/app/NotificationManager.java. |
| 6255 | optional int32 importance = 5; |
| 6256 | // Bitmask representing which fields have been set by the user. See field bitmask descriptions |
| 6257 | // at core/java/android/app/NotificationChannel.java |
| 6258 | optional int32 user_locked_fields = 6; |
| 6259 | // Indicates if the channel was deleted by the app. |
| 6260 | optional bool is_deleted = 7; |
Chris Wren | 07cb6a4 | 2020-05-14 17:35:30 -0400 | [diff] [blame] | 6261 | // Indicates if the channel was marked as a conversation by the app. |
| 6262 | optional bool is_conversation = 8; |
| 6263 | // Indicates if the channel is a conversation that was demoted by the user. |
| 6264 | optional bool is_demoted_conversation = 9; |
| 6265 | // Indicates if the channel is a conversation that was marked as important by the user. |
| 6266 | optional bool is_important_conversation = 10; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6267 | } |
| 6268 | |
| 6269 | /** |
Chris Wren | 9316569 | 2020-05-15 16:12:41 -0400 | [diff] [blame] | 6270 | * Atom that represents an item in the list of Do Not Disturb rules, pulled from |
| 6271 | * NotificationManagerService.java. |
| 6272 | */ |
| 6273 | message DNDModeProto { |
| 6274 | enum Mode { |
| 6275 | ROOT_CONFIG = -1; // Used to distinguish the config (one per user) from the rules. |
| 6276 | ZEN_MODE_OFF = 0; |
| 6277 | ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; |
| 6278 | ZEN_MODE_NO_INTERRUPTIONS = 2; |
| 6279 | ZEN_MODE_ALARMS = 3; |
| 6280 | } |
| 6281 | optional int32 user = 1; // Android user ID (0, 1, 10, ...) |
| 6282 | optional bool enabled = 2; // true for ROOT_CONFIG if a manualRule is enabled |
| 6283 | optional bool channels_bypassing = 3; // only valid for ROOT_CONFIG |
| 6284 | optional Mode zen_mode = 4; |
| 6285 | // id is one of the system default rule IDs, or empty |
| 6286 | // May also be "MANUAL_RULE" to indicate app-activation of the manual rule. |
| 6287 | optional string id = 5; |
| 6288 | optional int32 uid = 6 [(is_uid) = true]; // currently only SYSTEM_UID or 0 for other |
| 6289 | optional DNDPolicyProto policy = 7; |
| 6290 | } |
| 6291 | |
| 6292 | /** |
| 6293 | * Atom that represents a Do Not Disturb policy, an optional detail proto for DNDModeProto. |
| 6294 | */ |
| 6295 | message DNDPolicyProto { |
| 6296 | enum State { |
| 6297 | STATE_UNSET = 0; |
| 6298 | STATE_ALLOW = 1; |
| 6299 | STATE_DISALLOW = 2; |
| 6300 | } |
| 6301 | optional State calls = 1; |
| 6302 | optional State repeat_callers = 2; |
| 6303 | optional State messages = 3; |
| 6304 | optional State conversations = 4; |
| 6305 | optional State reminders = 5; |
| 6306 | optional State events = 6; |
| 6307 | optional State alarms = 7; |
| 6308 | optional State media = 8; |
| 6309 | optional State system = 9; |
| 6310 | optional State fullscreen = 10; |
| 6311 | optional State lights = 11; |
| 6312 | optional State peek = 12; |
| 6313 | optional State status_bar = 13; |
| 6314 | optional State badge = 14; |
| 6315 | optional State ambient = 15; |
| 6316 | optional State notification_list = 16; |
| 6317 | |
| 6318 | enum PeopleType { |
| 6319 | PEOPLE_UNSET = 0; |
| 6320 | PEOPLE_ANYONE = 1; |
| 6321 | PEOPLE_CONTACTS = 2; |
| 6322 | PEOPLE_STARRED = 3; |
| 6323 | PEOPLE_NONE = 4; |
| 6324 | } |
| 6325 | |
| 6326 | optional PeopleType allow_calls_from = 17; |
| 6327 | optional PeopleType allow_messages_from = 18; |
| 6328 | |
| 6329 | enum ConversationType { |
| 6330 | CONV_UNSET = 0; |
| 6331 | CONV_ANYONE = 1; |
| 6332 | CONV_IMPORTANT = 2; |
| 6333 | CONV_NONE = 3; |
| 6334 | } |
| 6335 | |
| 6336 | optional ConversationType allow_conversations_from = 19; |
| 6337 | } |
| 6338 | |
| 6339 | /** |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6340 | * Atom that contains a list of a package's channel group preferences, pulled from |
| 6341 | * NotificationManagerService.java. |
| 6342 | */ |
| 6343 | message PackageNotificationChannelGroupPreferences { |
| 6344 | // Uid under which the package is installed. |
Muhammad Qureshi | 22e52da | 2020-03-30 21:14:21 -0700 | [diff] [blame] | 6345 | optional int32 uid = 1 [(is_uid) = true]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6346 | // Channel Group's ID. Should always be available. |
| 6347 | optional string group_id = 2; |
| 6348 | // Channel Group's name. Should always be available. |
| 6349 | optional string group_name = 3; |
| 6350 | // Channel Group's description. Optionally set by group creator. |
| 6351 | optional string description = 4; |
| 6352 | // Indicates if notifications from this channel group are blocked. |
| 6353 | optional bool is_blocked = 5; |
| 6354 | // Bitmask representing which fields have been set by the user. See field bitmask descriptions |
| 6355 | // at core/java/android/app/NotificationChannelGroup.java |
| 6356 | optional int32 user_locked_fields = 6; |
| 6357 | } |
| 6358 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6359 | message PowerProfileProto { |
| 6360 | optional double cpu_suspend = 1; |
| 6361 | |
| 6362 | optional double cpu_idle = 2; |
| 6363 | |
| 6364 | optional double cpu_active = 3; |
| 6365 | |
| 6366 | message CpuCluster { |
| 6367 | optional int32 id = 1; |
| 6368 | optional double cluster_power = 2; |
| 6369 | optional int32 cores = 3; |
| 6370 | repeated int64 speed = 4; |
| 6371 | repeated double core_power = 5; |
| 6372 | } |
| 6373 | |
| 6374 | repeated CpuCluster cpu_cluster = 40; |
| 6375 | |
| 6376 | optional double wifi_scan = 4; |
| 6377 | |
| 6378 | optional double wifi_on = 5; |
| 6379 | |
| 6380 | optional double wifi_active = 6; |
| 6381 | |
| 6382 | optional double wifi_controller_idle = 7; |
| 6383 | |
| 6384 | optional double wifi_controller_rx = 8; |
| 6385 | |
| 6386 | optional double wifi_controller_tx = 9; |
| 6387 | |
| 6388 | repeated double wifi_controller_tx_levels = 10; |
| 6389 | |
| 6390 | optional double wifi_controller_operating_voltage = 11; |
| 6391 | |
| 6392 | optional double bluetooth_controller_idle = 12; |
| 6393 | |
| 6394 | optional double bluetooth_controller_rx = 13; |
| 6395 | |
| 6396 | optional double bluetooth_controller_tx = 14; |
| 6397 | |
| 6398 | optional double bluetooth_controller_operating_voltage = 15; |
| 6399 | |
| 6400 | optional double modem_controller_sleep = 16; |
| 6401 | |
| 6402 | optional double modem_controller_idle = 17; |
| 6403 | |
| 6404 | optional double modem_controller_rx = 18; |
| 6405 | |
| 6406 | repeated double modem_controller_tx = 19; |
| 6407 | |
| 6408 | optional double modem_controller_operating_voltage = 20; |
| 6409 | |
| 6410 | optional double gps_on = 21; |
| 6411 | |
| 6412 | repeated double gps_signal_quality_based = 22; |
| 6413 | |
| 6414 | optional double gps_operating_voltage = 23; |
| 6415 | |
| 6416 | optional double bluetooth_on = 24; |
| 6417 | |
| 6418 | optional double bluetooth_active = 25; |
| 6419 | |
| 6420 | optional double bluetooth_at_cmd = 26; |
| 6421 | |
| 6422 | optional double ambient_display = 27; |
| 6423 | |
| 6424 | optional double screen_on = 28; |
| 6425 | |
| 6426 | optional double radio_on = 29; |
| 6427 | |
| 6428 | optional double radio_scanning = 30; |
| 6429 | |
| 6430 | optional double radio_active = 31; |
| 6431 | |
| 6432 | optional double screen_full = 32; |
| 6433 | |
| 6434 | optional double audio = 33; |
| 6435 | |
| 6436 | optional double video = 34; |
| 6437 | |
| 6438 | optional double flashlight = 35; |
| 6439 | |
| 6440 | optional double memory = 36; |
| 6441 | |
| 6442 | optional double camera = 37; |
| 6443 | |
| 6444 | optional double wifi_batched_scan = 38; |
| 6445 | |
| 6446 | optional double battery_capacity = 39; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 6447 | } |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 6448 | |
| 6449 | /** |
| 6450 | * power_profile.xml and other constants for power model calculations. |
| 6451 | * Pulled from PowerProfile.java |
| 6452 | */ |
| 6453 | message PowerProfile { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6454 | optional PowerProfileProto power_profile = 1; |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 6455 | } |
Chenjie Yu | b35b5f7 | 2018-10-13 23:25:11 -0700 | [diff] [blame] | 6456 | |
| 6457 | /** |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 6458 | * Logs when a user restriction was added or removed. |
| 6459 | * |
| 6460 | * Logged from: |
| 6461 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 6462 | */ |
| 6463 | message UserRestrictionChanged { |
| 6464 | // The raw string of the user restriction as defined in UserManager. |
| 6465 | // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. |
| 6466 | optional string restriction = 1; |
| 6467 | // Whether the restriction is enabled or disabled. |
| 6468 | optional bool enabled = 2; |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 6469 | } |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 6470 | |
| 6471 | /** |
| 6472 | * Pulls process user time and system time. Puller takes a snapshot of all pids |
| 6473 | * in the system and returns cpu stats for those that are working at the time. |
| 6474 | * Dead pids will be dropped. Kernel processes are excluded. |
| 6475 | * Min cool-down is 5 sec. |
| 6476 | */ |
| 6477 | message ProcessCpuTime { |
| 6478 | optional int32 uid = 1 [(is_uid) = true]; |
| 6479 | |
| 6480 | optional string process_name = 2; |
| 6481 | // Process cpu time in user space, cumulative from boot/process start |
| 6482 | optional int64 user_time_millis = 3; |
| 6483 | // Process cpu time in system space, cumulative from boot/process start |
| 6484 | optional int64 system_time_millis = 4; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 6485 | } |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6486 | |
| 6487 | /** |
| 6488 | * Pulls the CPU usage for each thread. |
| 6489 | * |
| 6490 | * Read from /proc/$PID/task/$TID/time_in_state files. |
| 6491 | * |
| 6492 | * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and |
| 6493 | * time_in_state files not being present on some phones, have not been addressed. These should be |
| 6494 | * considered before a public release. |
| 6495 | */ |
| 6496 | message CpuTimePerThreadFreq { |
| 6497 | // UID that owns the process. |
| 6498 | optional int32 uid = 1 [(is_uid) = true]; |
| 6499 | // ID of the process. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 6500 | optional int32 process_id = 2; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6501 | // ID of the thread. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 6502 | optional int32 thread_id = 3; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6503 | // Name of the process taken from `/proc/$PID/cmdline`. |
| 6504 | optional string process_name = 4; |
| 6505 | // Name of the thread taken from `/proc/$PID/task/$TID/comm` |
| 6506 | optional string thread_name = 5; |
Misha Wagner | fde6958 | 2018-11-28 13:26:32 +0000 | [diff] [blame] | 6507 | |
| 6508 | // Report eight different frequencies, and how much time is spent in each frequency. Frequencies |
| 6509 | // are given in KHz, and time is given in milliseconds since the thread started. All eight |
| 6510 | // frequencies are given here as the alternative is sending eight separate atoms. This method |
| 6511 | // significantly reduces the amount of data created |
| 6512 | optional int32 frequency1_khz = 6; |
| 6513 | optional int32 time1_millis = 7; |
| 6514 | optional int32 frequency2_khz = 8; |
| 6515 | optional int32 time2_millis = 9; |
| 6516 | optional int32 frequency3_khz = 10; |
| 6517 | optional int32 time3_millis = 11; |
| 6518 | optional int32 frequency4_khz = 12; |
| 6519 | optional int32 time4_millis = 13; |
| 6520 | optional int32 frequency5_khz = 14; |
| 6521 | optional int32 time5_millis = 15; |
| 6522 | optional int32 frequency6_khz = 16; |
| 6523 | optional int32 time6_millis = 17; |
| 6524 | optional int32 frequency7_khz = 18; |
| 6525 | optional int32 time7_millis = 19; |
| 6526 | optional int32 frequency8_khz = 20; |
| 6527 | optional int32 time8_millis = 21; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6528 | } |
Bookatz | 75ee6042 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6529 | |
| 6530 | /** |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 6531 | * Pulls information about the device's build. |
| 6532 | */ |
| 6533 | message BuildInformation { |
| 6534 | // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. |
| 6535 | // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. |
| 6536 | optional string fingerprint = 1; |
| 6537 | |
| 6538 | // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. |
| 6539 | optional string brand = 2; |
| 6540 | |
| 6541 | // Build.PRODUCT. The name of the overall product. |
| 6542 | optional string product = 3; |
| 6543 | |
| 6544 | // Build.DEVICE. The name of the industrial design. |
| 6545 | optional string device = 4; |
| 6546 | |
| 6547 | // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". |
| 6548 | optional string version_release = 5; |
| 6549 | |
| 6550 | // Build.ID. E.g. a label like "M4-rc20". |
| 6551 | optional string id = 6; |
| 6552 | |
| 6553 | // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to |
| 6554 | // represent this build. |
| 6555 | optional string version_incremental = 7; |
| 6556 | |
| 6557 | // Build.TYPE. The type of build, like "user" or "eng". |
| 6558 | optional string type = 8; |
| 6559 | |
| 6560 | // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". |
| 6561 | optional string tags = 9; |
| 6562 | } |
| 6563 | |
| 6564 | /** |
Adam He | ff218534 | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 6565 | * Logs information about mismatched caller for content capture. |
| 6566 | * |
| 6567 | * Logged from: |
| 6568 | * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java |
| 6569 | */ |
| 6570 | message ContentCaptureCallerMismatchReported { |
| 6571 | optional string intended_package = 1; |
| 6572 | optional string calling_package = 2; |
| 6573 | } |
| 6574 | |
| 6575 | /** |
| 6576 | * Logs information about content capture service events. |
| 6577 | * |
| 6578 | * Logged from: |
| 6579 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 6580 | */ |
| 6581 | message ContentCaptureServiceEvents { |
| 6582 | // The type of event. |
| 6583 | enum Event { |
| 6584 | UNKNOWN = 0; |
| 6585 | ON_CONNECTED = 1; |
| 6586 | ON_DISCONNECTED = 2; |
| 6587 | SET_WHITELIST = 3; |
| 6588 | SET_DISABLED = 4; |
| 6589 | ON_USER_DATA_REMOVED = 5; |
Yara Hassan | 1e4256e | 2020-06-05 16:26:30 +0100 | [diff] [blame] | 6590 | ON_DATA_SHARE_REQUEST = 6; |
| 6591 | ACCEPT_DATA_SHARE_REQUEST = 7; |
| 6592 | REJECT_DATA_SHARE_REQUEST = 8; |
| 6593 | DATA_SHARE_WRITE_FINISHED = 9; |
| 6594 | DATA_SHARE_ERROR_IOEXCEPTION = 10; |
| 6595 | DATA_SHARE_ERROR_EMPTY_DATA = 11; |
| 6596 | DATA_SHARE_ERROR_CLIENT_PIPE_FAIL = 12; |
| 6597 | DATA_SHARE_ERROR_SERVICE_PIPE_FAIL = 13; |
| 6598 | DATA_SHARE_ERROR_CONCURRENT_REQUEST = 14; |
| 6599 | DATA_SHARE_ERROR_TIMEOUT_INTERRUPTED = 15; |
Adam He | ff218534 | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 6600 | } |
| 6601 | optional Event event = 1; |
| 6602 | // component/package of content capture service. |
| 6603 | optional string service_info = 2; |
| 6604 | // component/package of target. |
| 6605 | // it's a concatenated list of component/package for SET_WHITELIST event |
| 6606 | // separated by " ". |
| 6607 | optional string target_info = 3; |
| 6608 | } |
| 6609 | |
| 6610 | /** |
| 6611 | * Logs information about content capture session events. |
| 6612 | * |
| 6613 | * Logged from: |
| 6614 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 6615 | */ |
| 6616 | message ContentCaptureSessionEvents { |
| 6617 | // The type of event. |
| 6618 | enum Event { |
| 6619 | UNKNOWN = 0; |
| 6620 | ON_SESSION_STARTED = 1; |
| 6621 | ON_SESSION_FINISHED = 2; |
| 6622 | SESSION_NOT_CREATED = 3; |
| 6623 | } |
| 6624 | optional int32 session_id = 1; |
| 6625 | optional Event event = 2; |
| 6626 | // (n/a on session finished) |
| 6627 | optional int32 state_flags = 3; |
| 6628 | // component/package of content capture service. |
| 6629 | optional string service_info = 4; |
| 6630 | // component/package of app. |
| 6631 | // (n/a on session finished) |
| 6632 | optional string app_info = 5; |
| 6633 | optional bool is_child_session = 6; |
| 6634 | } |
| 6635 | |
| 6636 | /** |
| 6637 | * Logs information about session being flushed. |
| 6638 | * |
| 6639 | * Logged from: |
| 6640 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 6641 | */ |
| 6642 | message ContentCaptureFlushed { |
| 6643 | optional int32 session_id = 1; |
| 6644 | // component/package of content capture service. |
| 6645 | optional string service_info = 2; |
| 6646 | // component/package of app. |
| 6647 | optional string app_info = 3; |
| 6648 | // session start/finish events |
| 6649 | optional int32 child_session_started = 4; |
| 6650 | optional int32 child_session_finished = 5; |
| 6651 | // count of view events. |
| 6652 | optional int32 view_appeared_count = 6; |
| 6653 | optional int32 view_disappeared_count = 7; |
| 6654 | optional int32 view_text_changed_count = 8; |
| 6655 | |
| 6656 | // Flush stats. |
| 6657 | optional int32 max_events = 9; |
| 6658 | optional int32 idle_flush_freq = 10; |
| 6659 | optional int32 text_flush_freq = 11; |
| 6660 | optional int32 flush_reason = 12; |
| 6661 | } |
| 6662 | |
| 6663 | /** |
Bookatz | 75ee6042 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6664 | * Pulls on-device BatteryStats power use calculations for the overall device. |
| 6665 | */ |
| 6666 | message DeviceCalculatedPowerUse { |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 6667 | // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 6668 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 6669 | // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). |
| 6670 | optional int64 computed_power_nano_amp_secs = 1; |
Bookatz | 75ee6042 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6671 | } |
| 6672 | |
| 6673 | /** |
| 6674 | * Pulls on-device BatteryStats power use calculations broken down by uid. |
| 6675 | * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use |
| 6676 | * that is attributed to non-uid items. They must all be included to get the total power use. |
| 6677 | */ |
| 6678 | message DeviceCalculatedPowerBlameUid { |
| 6679 | // Uid being blamed. Note: isolated uids have already been mapped to host uid. |
| 6680 | optional int32 uid = 1 [(is_uid) = true]; |
| 6681 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 6682 | // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 6683 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 6684 | optional int64 power_nano_amp_secs = 2; |
Bookatz | 75ee6042 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6685 | } |
| 6686 | |
| 6687 | /** |
| 6688 | * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by |
| 6689 | * drain type. |
| 6690 | * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that |
| 6691 | * is attributed uids. They must all be included to get the total power use. |
| 6692 | */ |
| 6693 | message DeviceCalculatedPowerBlameOther { |
| 6694 | // The type of item whose power use is being reported. |
| 6695 | enum DrainType { |
| 6696 | AMBIENT_DISPLAY = 0; |
| 6697 | // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. |
| 6698 | BLUETOOTH = 2; |
| 6699 | CAMERA = 3; |
| 6700 | // Cell-standby |
| 6701 | CELL = 4; |
| 6702 | FLASHLIGHT = 5; |
| 6703 | IDLE = 6; |
| 6704 | MEMORY = 7; |
| 6705 | // Amount that total computed drain exceeded the drain estimated using the |
| 6706 | // battery level changes and capacity. |
| 6707 | OVERCOUNTED = 8; |
| 6708 | PHONE = 9; |
| 6709 | SCREEN = 10; |
| 6710 | // Amount that total computed drain was below the drain estimated using the |
| 6711 | // battery level changes and capacity. |
| 6712 | UNACCOUNTED = 11; |
| 6713 | // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. |
| 6714 | WIFI = 13; |
| 6715 | } |
| 6716 | optional DrainType drain_type = 1; |
| 6717 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 6718 | // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 6719 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 6720 | optional int64 power_nano_amp_secs = 2; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 6721 | } |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 6722 | |
| 6723 | /** |
| 6724 | * Logs device policy features. |
| 6725 | * |
| 6726 | * Logged from: |
| 6727 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 6728 | * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ |
| 6729 | */ |
| 6730 | message DevicePolicyEvent { |
| 6731 | // The event id - unique for each event. |
| 6732 | optional android.stats.devicepolicy.EventId event_id = 1; |
| 6733 | // The admin package name. |
| 6734 | optional string admin_package_name = 2; |
| 6735 | // A generic integer parameter. |
| 6736 | optional int32 integer_value = 3; |
| 6737 | // A generic boolean parameter. |
| 6738 | optional bool boolean_value = 4; |
| 6739 | // A parameter specifying a time period in milliseconds. |
| 6740 | optional uint64 time_period_millis = 5; |
| 6741 | // A parameter specifying a list of package names, bundle extras or string parameters. |
| 6742 | optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; |
| 6743 | } |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 6744 | |
| 6745 | /** |
| 6746 | * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. |
| 6747 | * |
| 6748 | * Logged from: |
| 6749 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6750 | */ |
| 6751 | message DocsUILaunchReported { |
| 6752 | optional android.stats.docsui.LaunchAction launch_action = 1; |
| 6753 | optional bool has_initial_uri = 2; |
| 6754 | optional android.stats.docsui.MimeType mime_type = 3; |
| 6755 | optional android.stats.docsui.Root initial_root = 4; |
| 6756 | } |
| 6757 | |
| 6758 | /** |
| 6759 | * Logs root/app visited event in file managers/picker. Call this when the user |
| 6760 | * taps on root/app in hamburger menu. |
| 6761 | * |
| 6762 | * Logged from: |
| 6763 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6764 | */ |
| 6765 | message DocsUIRootVisitedReported { |
| 6766 | optional android.stats.docsui.ContextScope scope = 1; |
| 6767 | optional android.stats.docsui.Root root = 2; |
| 6768 | } |
| 6769 | |
| 6770 | /** |
| 6771 | * Logs file operation stats. Call this when a file operation has completed. |
| 6772 | * |
| 6773 | * Logged from: |
| 6774 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6775 | */ |
| 6776 | message DocsUIFileOperationReported { |
| 6777 | optional android.stats.docsui.Provider provider = 1; |
| 6778 | optional android.stats.docsui.FileOperation file_op = 2; |
| 6779 | } |
| 6780 | |
| 6781 | /** |
| 6782 | * Logs file operation stats. Call this when a copy/move operation has completed with a specific |
| 6783 | * mode. |
| 6784 | * |
| 6785 | * Logged from: |
| 6786 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6787 | */ |
| 6788 | message DocsUIFileOperationCopyMoveModeReported { |
| 6789 | optional android.stats.docsui.FileOperation file_op = 1; |
| 6790 | optional android.stats.docsui.CopyMoveOpMode mode = 2; |
| 6791 | } |
| 6792 | |
| 6793 | |
| 6794 | /** |
| 6795 | * Logs file sub operation stats. Call this when a file operation has failed. |
| 6796 | * |
| 6797 | * Logged from: |
| 6798 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6799 | */ |
| 6800 | message DocsUIFileOperationFailureReported { |
| 6801 | optional android.stats.docsui.Authority authority = 1; |
| 6802 | optional android.stats.docsui.SubFileOperation sub_op = 2; |
| 6803 | } |
| 6804 | |
| 6805 | /** |
| 6806 | * Logs the cancellation of a file operation. Call this when a job is canceled |
| 6807 | * |
| 6808 | * Logged from: |
| 6809 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6810 | */ |
| 6811 | message DocsUIFileOperationCanceledReported { |
| 6812 | optional android.stats.docsui.FileOperation file_op = 1; |
| 6813 | } |
| 6814 | |
| 6815 | /** |
| 6816 | * Logs startup time in milliseconds. |
| 6817 | * |
| 6818 | * Logged from: |
| 6819 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6820 | */ |
| 6821 | message DocsUIStartupMsReported { |
| 6822 | optional int32 startup_millis = 1; |
| 6823 | } |
| 6824 | |
| 6825 | /** |
| 6826 | * Logs the action that was started by user. |
| 6827 | * |
| 6828 | * Logged from: |
| 6829 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6830 | */ |
| 6831 | message DocsUIUserActionReported { |
| 6832 | optional android.stats.docsui.UserAction action = 1; |
| 6833 | } |
| 6834 | |
| 6835 | /** |
| 6836 | * Logs the invalid type when invalid scoped access is requested. |
| 6837 | * |
| 6838 | * Logged from: |
| 6839 | * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java |
| 6840 | */ |
| 6841 | message DocsUIInvalidScopedAccessRequestReported { |
| 6842 | optional android.stats.docsui.InvalidScopedAccess type = 1; |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 6843 | } |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6844 | |
| 6845 | /** |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 6846 | * Logs the package name that launches docsui picker mode. |
| 6847 | * |
| 6848 | * Logged from: |
| 6849 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6850 | */ |
| 6851 | message DocsUIPickerLaunchedFromReported { |
| 6852 | optional string package_name = 1; |
| 6853 | } |
| 6854 | |
| 6855 | /** |
| 6856 | * Logs the search type. |
| 6857 | * |
| 6858 | * Logged from: |
| 6859 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6860 | */ |
| 6861 | message DocsUISearchTypeReported { |
| 6862 | optional android.stats.docsui.SearchType search_type = 1; |
| 6863 | } |
| 6864 | |
| 6865 | /** |
| 6866 | * Logs the search mode. |
| 6867 | * |
| 6868 | * Logged from: |
| 6869 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6870 | */ |
| 6871 | message DocsUISearchModeReported { |
| 6872 | optional android.stats.docsui.SearchMode search_mode = 1; |
| 6873 | } |
| 6874 | |
| 6875 | /** |
| 6876 | * Logs the pick result information. |
| 6877 | * |
| 6878 | * Logged from: |
| 6879 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6880 | */ |
| 6881 | message DocsUIPickResultReported { |
| 6882 | optional int32 total_action_count = 1; |
| 6883 | optional int64 duration_millis = 2; |
| 6884 | optional int32 file_count= 3; |
| 6885 | optional bool is_searching = 4; |
| 6886 | optional android.stats.docsui.Root picked_from = 5; |
| 6887 | optional android.stats.docsui.MimeType mime_type = 6; |
| 6888 | optional int32 repeatedly_pick_times = 7; |
| 6889 | } |
| 6890 | |
Diksha Gohlyan | b96b2f4 | 2020-04-30 09:20:42 -0700 | [diff] [blame] | 6891 | /** Logs the drag and drop of files. |
| 6892 | |
| 6893 | * Logged from: |
| 6894 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6895 | */ |
| 6896 | message DocsUIDragAndDropReported { |
| 6897 | optional bool drag_initiated_from_docsui = 1; |
| 6898 | } |
| 6899 | |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 6900 | /** |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6901 | * Logs when an app's memory is compacted. |
| 6902 | * |
| 6903 | * Logged from: |
| 6904 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 6905 | */ |
| 6906 | message AppCompacted { |
| 6907 | // The pid of the process being compacted. |
| 6908 | optional int32 pid = 1; |
| 6909 | |
| 6910 | // The name of the process being compacted. |
| 6911 | optional string process_name = 2; |
| 6912 | |
| 6913 | // The type of compaction. |
| 6914 | enum Action { |
| 6915 | UNKNOWN = 0; |
| 6916 | SOME = 1; |
| 6917 | FULL = 2; |
Ben Murdoch | 35c1420 | 2019-04-09 11:00:53 +0100 | [diff] [blame] | 6918 | PERSISTENT = 3; |
| 6919 | BFGS = 4; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6920 | } |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 6921 | optional Action action = 3; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6922 | |
| 6923 | // Total RSS in kilobytes consumed by the process prior to compaction. |
| 6924 | optional int64 before_rss_total_kilobytes = 4; |
| 6925 | |
| 6926 | // File RSS in kilobytes consumed by the process prior to compaction. |
| 6927 | optional int64 before_rss_file_kilobytes = 5; |
| 6928 | |
| 6929 | // Anonymous RSS in kilobytes consumed by the process prior to compaction. |
| 6930 | optional int64 before_rss_anon_kilobytes = 6; |
| 6931 | |
| 6932 | // Swap in kilobytes consumed by the process prior to compaction. |
| 6933 | optional int64 before_swap_kilobytes = 7; |
| 6934 | |
| 6935 | // Total RSS in kilobytes consumed by the process after compaction. |
| 6936 | optional int64 after_rss_total_kilobytes = 8; |
| 6937 | |
| 6938 | // File RSS in kilobytes consumed by the process after compaction. |
| 6939 | optional int64 after_rss_file_kilobytes = 9; |
| 6940 | |
| 6941 | // Anonymous RSS in kilobytes consumed by the process after compaction. |
| 6942 | optional int64 after_rss_anon_kilobytes = 10; |
| 6943 | |
| 6944 | // Swap in kilobytes consumed by the process after compaction. |
| 6945 | optional int64 after_swap_kilobytes = 11; |
| 6946 | |
| 6947 | // The time taken to perform compaction in milliseconds. |
| 6948 | optional int64 time_to_compact_millis = 12; |
| 6949 | |
| 6950 | // The last compaction action performed for this app. |
| 6951 | optional Action last_action = 13; |
| 6952 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 6953 | // The last time that compaction was attempted on this process in milliseconds |
| 6954 | // since boot, not including sleep (see SystemClock.uptimeMillis()). |
| 6955 | optional int64 last_compact_timestamp_ms_since_boot = 14; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6956 | |
Ben Murdoch | 885c21b | 2019-03-15 18:02:04 +0000 | [diff] [blame] | 6957 | // 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] | 6958 | optional int32 oom_score_adj = 15; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6959 | |
| 6960 | // The process state at the time of compaction. |
| 6961 | optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; |
Ben Murdoch | fdc5593 | 2019-01-30 10:43:15 +0000 | [diff] [blame] | 6962 | |
| 6963 | // Free ZRAM in kilobytes before compaction. |
| 6964 | optional int64 before_zram_free_kilobytes = 17; |
| 6965 | |
| 6966 | // Free ZRAM in kilobytes after compaction. |
| 6967 | optional int64 after_zram_free_kilobytes = 18; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6968 | } |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6969 | |
| 6970 | /** |
lifr | 8d9850d | 2020-04-27 23:03:25 +0800 | [diff] [blame] | 6971 | * Logs when a Tethering event occurs. |
| 6972 | * |
| 6973 | */ |
| 6974 | message NetworkTetheringReported { |
| 6975 | // tethering error code |
| 6976 | optional android.stats.connectivity.ErrorCode error_code = 1; |
| 6977 | |
| 6978 | // tethering downstream type |
| 6979 | optional android.stats.connectivity.DownstreamType downstream_type = 2; |
| 6980 | |
| 6981 | // transport type of upstream network |
| 6982 | optional android.stats.connectivity.UpstreamType upstream_type = 3; |
| 6983 | |
| 6984 | // The user type of Tethering |
| 6985 | optional android.stats.connectivity.UserType user_type= 4; |
| 6986 | } |
| 6987 | |
| 6988 | /** |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6989 | * Logs a DNS lookup operation initiated by the system resolver on behalf of an application |
| 6990 | * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). |
| 6991 | * |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6992 | * The NetworkDnsEventReported message represents the entire lookup operation, which may |
| 6993 | * result one or more queries to the recursive DNS resolvers. Those are individually logged |
| 6994 | * in DnsQueryEvents to enable computing error rates and network latency and timeouts |
| 6995 | * broken up by query type, transport, network interface, etc. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6996 | */ |
| 6997 | message NetworkDnsEventReported { |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6998 | optional android.stats.dnsresolver.EventType event_type = 1; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6999 | |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 7000 | optional android.stats.dnsresolver.ReturnCode return_code = 2; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 7001 | |
| 7002 | // The latency in microseconds of the entire DNS lookup operation. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 7003 | optional int32 latency_micros = 3; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 7004 | |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 7005 | // Only valid for event_type = EVENT_GETADDRINFO. |
| 7006 | optional int32 hints_ai_flags = 4; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 7007 | |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 7008 | // Flags passed to android_res_nsend() defined in multinetwork.h |
| 7009 | // Only valid for event_type = EVENT_RESNSEND. |
| 7010 | optional int32 res_nsend_flags = 5; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 7011 | |
Frank Li | be8ecaa | 2019-06-18 05:45:25 -0700 | [diff] [blame] | 7012 | optional android.stats.dnsresolver.NetworkType network_type = 6; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 7013 | |
| 7014 | // The DNS over TLS mode on a specific netId. |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 7015 | optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 7016 | |
| 7017 | // Additional pass-through fields opaque to statsd. |
| 7018 | // The DNS resolver Mainline module can add new fields here without requiring an OS update. |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 7019 | optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; |
Frank Li | 762eb4a | 2019-07-22 08:13:03 -0700 | [diff] [blame] | 7020 | |
| 7021 | // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom. |
| 7022 | optional int32 sampling_rate_denom = 9; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 7023 | } |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 7024 | |
| 7025 | /** |
lifr | 130535f | 2020-04-27 11:37:02 +0800 | [diff] [blame] | 7026 | * logs the CapportApiData info |
| 7027 | * Logged from: |
| 7028 | * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
| 7029 | */ |
| 7030 | message CapportApiData { |
| 7031 | // The TTL of the network connection provided by captive portal |
| 7032 | optional int32 remaining_ttl_secs = 1; |
| 7033 | |
| 7034 | // The limit traffic data of the network connection provided by captive portal |
| 7035 | optional int32 remaining_bytes = 2; |
| 7036 | |
| 7037 | // Is portal url option included in the DHCP packet (Yes, No) |
| 7038 | optional bool has_portal_url = 3; |
| 7039 | |
| 7040 | // Is venue info (e.g. store info, maps, flight status) included (Yes, No) |
| 7041 | optional bool has_venue_info = 4; |
| 7042 | } |
| 7043 | |
| 7044 | /** |
| 7045 | * logs a network Probe Event |
| 7046 | * Logged from: |
| 7047 | * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
| 7048 | */ |
| 7049 | message ProbeEvent { |
| 7050 | // The probe type (http or https, or captive portal API...) |
| 7051 | optional android.stats.connectivity.ProbeType probe_type = 1; |
| 7052 | |
| 7053 | // The latency in microseconds of the probe event |
| 7054 | optional int32 latency_micros = 2; |
| 7055 | |
| 7056 | // The result of the probe event |
| 7057 | optional android.stats.connectivity.ProbeResult probe_result = 3; |
| 7058 | |
| 7059 | // The CaptivePortal API info |
| 7060 | optional CapportApiData capport_api_data = 4; |
| 7061 | } |
| 7062 | |
| 7063 | /** |
| 7064 | * log each ProbeEvent in ProbeEvents |
| 7065 | * Logged from: |
| 7066 | * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
| 7067 | */ |
| 7068 | message ProbeEvents { |
| 7069 | // Record probe event during the validation |
| 7070 | repeated ProbeEvent probe_event = 1; |
| 7071 | } |
| 7072 | |
| 7073 | /** |
| 7074 | * The DHCP (Dynamic Host Configuration Protocol) session info |
| 7075 | * Logged from: |
| 7076 | * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java |
| 7077 | */ |
| 7078 | message DhcpSession { |
| 7079 | // The DHCP Feature(s) enabled in this session |
| 7080 | repeated android.stats.connectivity.DhcpFeature used_features = 1; |
| 7081 | |
| 7082 | // The discover packet (re)transmit count |
| 7083 | optional int32 discover_count = 2; |
| 7084 | |
| 7085 | // The request packet (re)transmit count |
| 7086 | optional int32 request_count = 3; |
| 7087 | |
| 7088 | // The IPv4 address conflict count |
| 7089 | // (only be meaningful when duplicate address detection is enabled) |
| 7090 | optional int32 conflict_count = 4; |
| 7091 | |
| 7092 | // The DHCP packet parsing error code in this session |
| 7093 | // (defined in android.net.metrics.DhcpErrorEvent) |
| 7094 | repeated android.stats.connectivity.DhcpErrorCode error_code = 5; |
| 7095 | |
| 7096 | // The result of DHCP hostname transliteration |
| 7097 | optional android.stats.connectivity.HostnameTransResult ht_result = 6; |
| 7098 | } |
| 7099 | |
| 7100 | /** |
| 7101 | * Logs Network IP provisioning event |
| 7102 | * Logged from: |
| 7103 | * packages/modules/NetworkStack/src/com/android/networkstack/metrics/NetworkIpProvisioningMetrics.java |
| 7104 | */ |
| 7105 | message NetworkIpProvisioningReported { |
| 7106 | // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) |
| 7107 | optional android.stats.connectivity.TransportType transport_type = 1; |
| 7108 | |
| 7109 | // The latency in microseconds of IP Provisioning over IPV4 |
| 7110 | optional int32 ipv4_latency_micros = 2; |
| 7111 | |
| 7112 | // The latency in microseconds of IP Provisioning over IPV6 |
| 7113 | optional int32 ipv6_latency_micros = 3; |
| 7114 | |
| 7115 | // The time duration between provisioning start and end (success or failure) |
| 7116 | optional int64 provisioning_duration_micros = 4; |
| 7117 | |
| 7118 | // The specific disconnect reason for this IP provisioning |
| 7119 | optional android.stats.connectivity.DisconnectCode disconnect_code = 5; |
| 7120 | |
| 7121 | // Log DHCP session info (Only valid for IPv4) |
| 7122 | optional DhcpSession dhcp_session = 6 [(log_mode) = MODE_BYTES]; |
| 7123 | |
| 7124 | // The random number between 0 ~ 999 for sampling |
| 7125 | optional int32 random_number = 7; |
| 7126 | } |
| 7127 | |
| 7128 | /** |
| 7129 | * Logs Network DHCP Renew event |
| 7130 | * Logged from: |
| 7131 | * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java |
| 7132 | */ |
| 7133 | message NetworkDhcpRenewReported { |
| 7134 | // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) |
| 7135 | optional android.stats.connectivity.TransportType transport_type = 1; |
| 7136 | |
| 7137 | // The request packet (re)transmit count |
| 7138 | optional int32 request_count = 2; |
| 7139 | |
| 7140 | // The latency in microseconds of DHCP Renew |
| 7141 | optional int32 latency_micros = 3; |
| 7142 | |
| 7143 | // The DHCP error code is defined in android.net.metrics.DhcpErrorEvent |
| 7144 | optional android.stats.connectivity.DhcpErrorCode error_code = 4; |
| 7145 | |
| 7146 | // The result of DHCP renew |
| 7147 | optional android.stats.connectivity.DhcpRenewResult renew_result = 5; |
| 7148 | |
| 7149 | // The random number between 0 ~ 999 for sampling |
| 7150 | optional int32 random_number = 6; |
| 7151 | } |
| 7152 | |
| 7153 | /** |
| 7154 | * Logs Network Validation event |
| 7155 | * Logged from: |
| 7156 | * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
| 7157 | */ |
| 7158 | message NetworkValidationReported { |
| 7159 | // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) |
| 7160 | optional android.stats.connectivity.TransportType transport_type = 1; |
| 7161 | |
| 7162 | // Record each probe event |
| 7163 | optional ProbeEvents probe_events = 2 [(log_mode) = MODE_BYTES]; |
| 7164 | |
| 7165 | // The result of the network validation |
| 7166 | optional android.stats.connectivity.ValidationResult validation_result = 3; |
| 7167 | |
| 7168 | // The latency in microseconds of network validation |
| 7169 | optional int32 latency_micros = 4; |
| 7170 | |
| 7171 | // The validation index (the first validation attempt or second, third...) |
| 7172 | optional int32 validation_index = 5; |
| 7173 | |
| 7174 | // The random number between 0 ~ 999 for sampling |
| 7175 | optional int32 random_number = 6; |
| 7176 | } |
| 7177 | |
| 7178 | /** |
| 7179 | * Logs NetworkStack Quirk event |
| 7180 | * Logged from: |
| 7181 | * packages/modules/NetworkStack/src/com/android/networkstack/ |
| 7182 | */ |
| 7183 | message NetworkStackQuirkReported { |
| 7184 | // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) |
| 7185 | optional android.stats.connectivity.TransportType transport_type = 1; |
| 7186 | |
| 7187 | // Record each Quirk event |
| 7188 | optional android.stats.connectivity.NetworkQuirkEvent event = 2; |
| 7189 | } |
| 7190 | |
| 7191 | /** |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 7192 | * Logs when a data stall event occurs. |
| 7193 | * |
| 7194 | * Log from: |
Chiachang Wang | b3f9ff7 | 2020-03-03 20:23:48 +0800 | [diff] [blame] | 7195 | * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 7196 | */ |
| 7197 | message DataStallEvent { |
| 7198 | // Data stall evaluation type. |
Chiachang Wang | b3f9ff7 | 2020-03-03 20:23:48 +0800 | [diff] [blame] | 7199 | // See packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 7200 | // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. |
| 7201 | optional int32 evaluation_type = 1; |
| 7202 | // See definition in data_stall_event.proto. |
| 7203 | optional com.android.server.connectivity.ProbeResult validation_result = 2; |
| 7204 | // See definition in data_stall_event.proto. |
| 7205 | optional android.net.NetworkCapabilitiesProto.Transport network_type = 3; |
| 7206 | // See definition in data_stall_event.proto. |
| 7207 | optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; |
| 7208 | // See definition in data_stall_event.proto. |
| 7209 | optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; |
| 7210 | // See definition in data_stall_event.proto. |
| 7211 | optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; |
Chiachang Wang | b3f9ff7 | 2020-03-03 20:23:48 +0800 | [diff] [blame] | 7212 | // The tcp packets fail rate from the latest tcp polling. |
| 7213 | optional int32 tcp_fail_rate = 7; |
| 7214 | // Number of packets sent since the last received packet. |
| 7215 | optional int32 tcp_sent_since_last_recv = 8; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 7216 | } |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 7217 | |
| 7218 | /* |
| 7219 | * Logs when RescueParty resets some set of experiment flags. |
| 7220 | * |
| 7221 | * Logged from: |
| 7222 | * frameworks/base/services/core/java/com/android/server/RescueParty.java |
| 7223 | */ |
| 7224 | message RescuePartyResetReported { |
| 7225 | // The rescue level of this reset. A value of 0 indicates missing or unknown level information. |
| 7226 | optional int32 rescue_level = 1; |
| 7227 | } |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 7228 | |
| 7229 | /** |
| 7230 | * Logs when signed config is received from an APK, and if that config was applied successfully. |
| 7231 | * Logged from: |
| 7232 | * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java |
| 7233 | */ |
| 7234 | message SignedConfigReported { |
| 7235 | enum Type { |
| 7236 | UNKNOWN_TYPE = 0; |
| 7237 | GLOBAL_SETTINGS = 1; |
| 7238 | } |
| 7239 | optional Type type = 1; |
| 7240 | |
| 7241 | // The final status of the signed config received. |
| 7242 | enum Status { |
| 7243 | UNKNOWN_STATUS = 0; |
| 7244 | APPLIED = 1; |
| 7245 | BASE64_FAILURE_CONFIG = 2; |
| 7246 | BASE64_FAILURE_SIGNATURE = 3; |
| 7247 | SECURITY_EXCEPTION = 4; |
| 7248 | INVALID_CONFIG = 5; |
| 7249 | OLD_CONFIG = 6; |
| 7250 | SIGNATURE_CHECK_FAILED = 7; |
| 7251 | NOT_APPLICABLE = 8; |
Mathew Inwood | 610d096 | 2019-01-15 11:50:28 +0000 | [diff] [blame] | 7252 | SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 7253 | } |
| 7254 | optional Status status = 2; |
| 7255 | |
| 7256 | // The version of the signed config processed. |
| 7257 | optional int32 version = 3; |
| 7258 | |
| 7259 | // The package name that the config was extracted from. |
| 7260 | optional string from_package = 4; |
| 7261 | |
| 7262 | enum Key { |
| 7263 | NO_KEY = 0; |
| 7264 | DEBUG = 1; |
| 7265 | PRODUCTION = 2; |
| 7266 | } |
| 7267 | // Which key was used to verify the config. |
| 7268 | optional Key verified_with = 5; |
| 7269 | } |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7270 | |
| 7271 | /* |
| 7272 | * Logs GNSS Network-Initiated (NI) location events. |
| 7273 | * |
| 7274 | * Logged from: |
| 7275 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 7276 | */ |
| 7277 | message GnssNiEventReported { |
| 7278 | // The type of GnssNiEvent. |
| 7279 | enum EventType { |
| 7280 | UNKNOWN = 0; |
| 7281 | NI_REQUEST = 1; |
| 7282 | NI_RESPONSE = 2; |
| 7283 | } |
| 7284 | optional EventType event_type = 1; |
| 7285 | |
| 7286 | // An ID generated by HAL to associate NI notifications and UI responses. |
| 7287 | optional int32 notification_id = 2; |
| 7288 | |
| 7289 | // 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] | 7290 | optional android.server.location.GnssNiType ni_type = 3; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7291 | |
| 7292 | // NI requires notification. |
| 7293 | optional bool need_notify = 4; |
| 7294 | |
| 7295 | // NI requires verification. |
| 7296 | optional bool need_verify = 5; |
| 7297 | |
| 7298 | // NI requires privacy override, no notification/minimal trace. |
| 7299 | optional bool privacy_override = 6; |
| 7300 | |
| 7301 | // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in |
| 7302 | // seconds. |
| 7303 | optional int32 timeout = 7; |
| 7304 | |
| 7305 | // Default response when timeout. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 7306 | optional android.server.location.GnssUserResponseType default_response = 8; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7307 | |
| 7308 | // String representing the requester of the network inititated location request. |
| 7309 | optional string requestor_id = 9; |
| 7310 | |
| 7311 | // Notification message text string representing the service(for eg. SUPL-service) who sent the |
| 7312 | // network initiated location request. |
| 7313 | optional string text = 10; |
| 7314 | |
| 7315 | // requestorId decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 7316 | optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7317 | |
| 7318 | // Notification message text decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 7319 | optional android.server.location.GnssNiEncodingType text_encoding = 12; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7320 | |
| 7321 | // True if SUPL ES is enabled. |
| 7322 | optional bool is_supl_es_enabled = 13; |
| 7323 | |
| 7324 | // True if GNSS location is enabled. |
| 7325 | optional bool is_location_enabled = 14; |
| 7326 | |
| 7327 | // GNSS NI responses which define the response in NI structures. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 7328 | optional android.server.location.GnssUserResponseType user_response = 15; |
| 7329 | } |
| 7330 | |
| 7331 | /** |
| 7332 | * Logs GNSS non-framework (NFW) location notification. |
| 7333 | * |
| 7334 | * Logged from: |
| 7335 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 7336 | */ |
| 7337 | message GnssNfwNotificationReported { |
| 7338 | // Package name of the Android proxy application representing the non-framework entity that |
| 7339 | // requested location. Set to empty string if unknown. |
| 7340 | optional string proxy_app_package_name = 1; |
| 7341 | |
| 7342 | // Protocol stack that initiated the non-framework location request. |
| 7343 | optional android.server.location.NfwProtocolStack protocol_stack = 2; |
| 7344 | |
| 7345 | // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, |
| 7346 | // set to empty string. This field is opaque to the framework and used for logging purposes. |
| 7347 | optional string other_protocol_stack_name = 3; |
| 7348 | |
| 7349 | // Source initiating/receiving the location information. |
| 7350 | optional android.server.location.NfwRequestor requestor = 4; |
| 7351 | |
| 7352 | // Identity of the endpoint receiving the location information. For example, carrier name, OEM |
| 7353 | // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework |
| 7354 | // and used for logging purposes. |
| 7355 | optional string requestor_id = 5; |
| 7356 | |
| 7357 | // Indicates whether location information was provided for this request. |
| 7358 | optional android.server.location.NfwResponseType response_type = 6; |
| 7359 | |
| 7360 | // True if the device is in user initiated emergency session. |
| 7361 | optional bool in_emergency_mode = 7; |
| 7362 | |
| 7363 | // True if cached location is provided. |
| 7364 | optional bool is_cached_location = 8; |
| 7365 | |
| 7366 | // True if proxy app permission mismatch between framework and GNSS HAL. |
| 7367 | optional bool is_permission_mismatched = 9; |
| 7368 | } |
| 7369 | |
| 7370 | /** |
| 7371 | * Logs GNSS configuration as defined in IGnssConfiguration.hal. |
| 7372 | * |
| 7373 | * Logged from: |
| 7374 | * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java |
| 7375 | */ |
| 7376 | message GnssConfigurationReported { |
| 7377 | // SUPL host name. |
| 7378 | optional string supl_host = 1; |
| 7379 | |
| 7380 | // SUPL port number. |
| 7381 | optional int32 supl_port = 2; |
| 7382 | |
| 7383 | // C2K host name. |
| 7384 | optional string c2k_host = 3; |
| 7385 | |
| 7386 | // C2K port number. |
| 7387 | optional int32 c2k_port = 4; |
| 7388 | |
| 7389 | // The SUPL version requested by Carrier. |
| 7390 | optional int32 supl_ver = 5; |
| 7391 | |
| 7392 | // The SUPL mode. |
| 7393 | optional android.server.location.SuplMode supl_mode = 6; |
| 7394 | |
| 7395 | // True if NI emergency SUPL restrictions is enabled. |
| 7396 | optional bool supl_es = 7; |
| 7397 | |
| 7398 | // LTE Positioning Profile settings |
| 7399 | optional android.server.location.LppProfile lpp_profile = 8; |
| 7400 | |
| 7401 | // Positioning protocol on A-Glonass system. |
| 7402 | optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; |
| 7403 | |
| 7404 | // True if emergency PDN is used. Otherwise, regular PDN is used. |
| 7405 | optional bool use_emergency_pdn_for_emergency_supl= 10; |
| 7406 | |
| 7407 | // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. |
| 7408 | optional android.server.location.GpsLock gps_lock = 11; |
| 7409 | |
| 7410 | // Number of seconds to extend the emergency session duration post emergency call. |
| 7411 | optional int32 es_extension_sec = 12; |
| 7412 | |
| 7413 | // The full list of package names of proxy Android applications representing the non-framework |
| 7414 | // location access entities (on/off the device) for which the framework user has granted |
| 7415 | // non-framework location access permission. The package names are concatenated in one string |
| 7416 | // with spaces as separators. |
| 7417 | optional string enabled_proxy_app_package_name_list = 13; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7418 | } |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7419 | |
| 7420 | /** |
| 7421 | * Logs when a NFC device's error occurred. |
| 7422 | * Logged from: |
| 7423 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 7424 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java |
| 7425 | */ |
| 7426 | message NfcErrorOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7427 | enum Type { |
| 7428 | UNKNOWN = 0; |
| 7429 | CMD_TIMEOUT = 1; |
| 7430 | ERROR_NOTIFICATION = 2; |
| 7431 | AID_OVERFLOW = 3; |
| 7432 | } |
| 7433 | optional Type type = 1; |
| 7434 | // If it's nci cmd timeout, log the timeout command. |
| 7435 | optional uint32 nci_cmd = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7436 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7437 | optional uint32 error_ntf_status_code = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7438 | } |
| 7439 | |
| 7440 | /** |
| 7441 | * Logs when a NFC device's state changed event |
| 7442 | * Logged from: |
| 7443 | * packages/apps/Nfc/src/com/android/nfc/NfcService.java |
| 7444 | */ |
| 7445 | message NfcStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7446 | enum State { |
| 7447 | UNKNOWN = 0; |
| 7448 | OFF = 1; |
| 7449 | ON = 2; |
| 7450 | ON_LOCKED = 3; // Secure Nfc enabled. |
| 7451 | CRASH_RESTART = 4; // NfcService watchdog timeout restart. |
| 7452 | } |
| 7453 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7454 | } |
| 7455 | |
| 7456 | /** |
| 7457 | * Logs when a NFC Beam Transaction occurred. |
| 7458 | * Logged from: |
| 7459 | * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java |
| 7460 | */ |
| 7461 | message NfcBeamOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7462 | enum Operation { |
| 7463 | UNKNOWN = 0; |
| 7464 | SEND = 1; |
| 7465 | RECEIVE = 2; |
| 7466 | } |
| 7467 | optional Operation operation = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7468 | } |
| 7469 | |
| 7470 | /** |
| 7471 | * Logs when a NFC Card Emulation Transaction occurred. |
| 7472 | * Logged from: |
| 7473 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java |
| 7474 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java |
| 7475 | */ |
| 7476 | message NfcCardemulationOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7477 | enum Category { |
| 7478 | UNKNOWN = 0; |
| 7479 | HCE_PAYMENT = 1; |
| 7480 | HCE_OTHER = 2; |
| 7481 | OFFHOST = 3; |
| 7482 | } |
| 7483 | // Transaction belongs to HCE payment or HCE other category, or offhost. |
| 7484 | optional Category category = 1; |
| 7485 | // SeName from transaction: SIMx, eSEx, HCE, HCEF. |
| 7486 | optional string se_name = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7487 | } |
| 7488 | |
| 7489 | /** |
| 7490 | * Logs when a NFC Tag event occurred. |
| 7491 | * Logged from: |
| 7492 | * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java |
| 7493 | */ |
| 7494 | message NfcTagOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7495 | enum Type { |
| 7496 | UNKNOWN = 0; |
| 7497 | URL = 1; |
| 7498 | BT_PAIRING = 2; |
| 7499 | PROVISION = 3; |
| 7500 | WIFI_CONNECT = 4; |
| 7501 | APP_LAUNCH = 5; |
| 7502 | OTHERS = 6; |
| 7503 | } |
| 7504 | optional Type type = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7505 | } |
| 7506 | |
| 7507 | /** |
| 7508 | * Logs when Hce transaction triggered |
| 7509 | * Logged from: |
| 7510 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 7511 | */ |
| 7512 | message NfcHceTransactionOccurred { |
| 7513 | // The latency period(in microseconds) it took for the first HCE data |
| 7514 | // exchange. |
| 7515 | optional uint32 latency_micros = 1; |
| 7516 | } |
| 7517 | |
| 7518 | /** |
| 7519 | * Logs when SecureElement state event changed |
| 7520 | * Logged from: |
| 7521 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 7522 | */ |
| 7523 | message SeStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7524 | enum State { |
| 7525 | UNKNOWN = 0; |
| 7526 | INITIALIZED = 1; |
| 7527 | DISCONNECTED = 2; |
| 7528 | CONNECTED = 3; |
| 7529 | HALCRASH = 4; |
| 7530 | } |
| 7531 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7532 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7533 | optional string state_change_reason = 2; |
| 7534 | // SIMx or eSEx. |
| 7535 | optional string terminal = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7536 | } |
| 7537 | |
| 7538 | /** |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 7539 | * Information about a permission grant request |
| 7540 | */ |
| 7541 | message PermissionGrantRequestResultReported { |
| 7542 | // unique value identifying an API call. A API call might result in multiple of these atoms |
| 7543 | optional int64 request_id = 1; |
| 7544 | |
| 7545 | // UID of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 7546 | optional int32 uid = 2 [(is_uid) = true]; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 7547 | |
| 7548 | // Name of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 7549 | optional string package_name = 3; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 7550 | |
| 7551 | // The permission to be granted |
| 7552 | optional string permission_name = 4; |
| 7553 | |
| 7554 | // If the permission was explicitly requested via the API or added by the system |
| 7555 | optional bool is_implicit = 5; |
| 7556 | |
| 7557 | enum Result { |
| 7558 | UNDEFINED = 0; |
| 7559 | // permission request was ignored |
| 7560 | IGNORED = 1; |
| 7561 | // permission request was ignored because it was user fixed |
| 7562 | IGNORED_USER_FIXED = 2; |
| 7563 | // permission request was ignored because it was policy fixed |
| 7564 | IGNORED_POLICY_FIXED = 3; |
| 7565 | // permission was granted by user action |
| 7566 | USER_GRANTED = 4; |
| 7567 | // permission was automatically granted |
| 7568 | AUTO_GRANTED = 5; |
| 7569 | // permission was denied by user action |
| 7570 | USER_DENIED = 6; |
| 7571 | // permission was denied with prejudice by the user |
| 7572 | USER_DENIED_WITH_PREJUDICE = 7; |
| 7573 | // permission was automatically denied |
| 7574 | AUTO_DENIED = 8; |
Svet Ganov | d8eb8b2 | 2019-04-05 18:52:08 -0700 | [diff] [blame] | 7575 | // permission request was ignored because permission is restricted |
| 7576 | IGNORED_RESTRICTED_PERMISSION = 9; |
Stanislav Zholnin | 066aefb | 2019-10-17 18:40:33 +0100 | [diff] [blame] | 7577 | // one time permission was granted by user action |
| 7578 | USER_GRANTED_ONE_TIME = 10; |
Stanislav Zholnin | 8fde4fb | 2019-12-06 19:06:08 +0000 | [diff] [blame] | 7579 | // user ignored request by leaving the request screen without choosing any option |
| 7580 | USER_IGNORED = 11; |
Evan Severson | 7c1cc8a | 2019-12-17 14:36:17 -0800 | [diff] [blame] | 7581 | // user granted the permission after being linked to settings |
| 7582 | USER_GRANTED_IN_SETTINGS = 12; |
| 7583 | // user denied the permission after being linked to settings |
| 7584 | USER_DENIED_IN_SETTINGS = 13; |
| 7585 | // user denied the permission with prejudice after being linked to settings |
| 7586 | USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14; |
| 7587 | // permission was automatically revoked after one-time permission expired |
| 7588 | AUTO_ONE_TIME_PERMISSION_REVOKED = 15; |
Eugene Susla | 6db4be5 | 2020-01-09 11:02:09 -0800 | [diff] [blame] | 7589 | // permission was automatically revoked for unused app |
| 7590 | AUTO_UNUSED_APP_PERMISSION_REVOKED = 16; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 7591 | } |
| 7592 | // The result of the permission grant |
| 7593 | optional Result result = 6; |
| 7594 | } |
| 7595 | |
| 7596 | /** |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7597 | * Logs when Omapi API used |
| 7598 | * Logged from: |
| 7599 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 7600 | */ |
| 7601 | message SeOmapiReported { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7602 | enum Operation { |
| 7603 | UNKNOWN = 0; |
| 7604 | OPEN_CHANNEL = 1; |
| 7605 | } |
| 7606 | optional Operation operation = 1; |
| 7607 | // SIMx or eSEx. |
| 7608 | optional string terminal = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7609 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7610 | optional string package_name = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7611 | } |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 7612 | |
| 7613 | /** |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 7614 | * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. |
| 7615 | * The dispatch latency is the dispatchClockTime - enqueueClockTime. |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 7616 | * Logged from: |
| 7617 | * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java |
| 7618 | */ |
| 7619 | message BroadcastDispatchLatencyReported { |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 7620 | optional int64 dispatch_latency_millis = 1; |
| 7621 | } |
| 7622 | |
| 7623 | /** |
| 7624 | * Logs AttentionManagerService attention check result. |
| 7625 | * |
| 7626 | * Logged from: |
| 7627 | * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java |
| 7628 | */ |
| 7629 | message AttentionManagerServiceResultReported { |
| 7630 | // See core/java/android/service/attention/AttentionService.java |
| 7631 | enum AttentionCheckResult { |
| 7632 | UNKNOWN = 20; |
| 7633 | ATTENTION_SUCCESS_ABSENT = 0; |
| 7634 | ATTENTION_SUCCESS_PRESENT = 1; |
Alex Salo | dd028ba | 2019-04-17 13:33:49 -0700 | [diff] [blame] | 7635 | ATTENTION_FAILURE_UNKNOWN = 2; |
| 7636 | ATTENTION_FAILURE_CANCELLED = 3; |
| 7637 | ATTENTION_FAILURE_PREEMPTED = 4; |
| 7638 | ATTENTION_FAILURE_TIMED_OUT = 5; |
| 7639 | ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 7640 | } |
| 7641 | optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 7642 | } |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 7643 | |
| 7644 | /** |
| 7645 | * Logs when an adb connection changes state. |
| 7646 | * |
| 7647 | * Logged from: |
| 7648 | * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java |
| 7649 | */ |
| 7650 | message AdbConnectionChanged { |
| 7651 | // The last time this system connected via adb, or 0 if the 'always allow' option was not |
| 7652 | // previously selected for this system. |
| 7653 | optional int64 last_connection_time_millis = 1; |
| 7654 | |
| 7655 | // The time in ms within which a subsequent connection from an 'always allow' system is allowed |
| 7656 | // to reconnect via adb without user interaction. |
| 7657 | optional int64 auth_window_millis = 2; |
| 7658 | |
| 7659 | // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto. |
| 7660 | optional android.debug.AdbConnectionStateEnum state = 3; |
| 7661 | |
| 7662 | // True if the 'always allow' option was selected for this system. |
| 7663 | optional bool always_allow = 4; |
| 7664 | } |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 7665 | |
| 7666 | /* |
| 7667 | * Logs the reported speech DSP status. |
| 7668 | * |
| 7669 | * Logged from: |
| 7670 | * Vendor audio implementation. |
| 7671 | */ |
| 7672 | message SpeechDspStatReported { |
| 7673 | // The total Speech DSP uptime in milliseconds. |
| 7674 | optional int32 total_uptime_millis = 1; |
| 7675 | // The total Speech DSP downtime in milliseconds. |
| 7676 | optional int32 total_downtime_millis = 2; |
| 7677 | optional int32 total_crash_count = 3; |
| 7678 | optional int32 total_recover_count = 4; |
| 7679 | } |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 7680 | |
| 7681 | /** |
| 7682 | * Logs USB connector contaminant status. |
| 7683 | * |
| 7684 | * Logged from: USB Service. |
| 7685 | */ |
| 7686 | message UsbContaminantReported { |
| 7687 | optional string id = 1; |
| 7688 | optional android.service.usb.ContaminantPresenceStatus status = 2; |
| 7689 | } |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 7690 | |
| 7691 | /** |
| 7692 | * This atom is for debugging purpose. |
| 7693 | */ |
| 7694 | message DebugElapsedClock { |
| 7695 | // Monotically increasing value for each pull. |
| 7696 | optional int64 pull_count = 1; |
| 7697 | // Time from System.elapsedRealtime. |
| 7698 | optional int64 elapsed_clock_millis = 2; |
| 7699 | // Time from System.elapsedRealtime. |
| 7700 | optional int64 same_elapsed_clock_millis = 3; |
| 7701 | // Diff between current elapsed time and elapsed time from previous pull. |
| 7702 | optional int64 elapsed_clock_diff_millis = 4; |
| 7703 | |
| 7704 | enum Type { |
| 7705 | TYPE_UNKNOWN = 0; |
| 7706 | ALWAYS_PRESENT = 1; |
| 7707 | PRESENT_ON_ODD_PULLS = 2; |
| 7708 | } |
| 7709 | // Type of behavior for the pulled data. |
| 7710 | optional Type type = 5; |
| 7711 | } |
| 7712 | |
| 7713 | /** |
| 7714 | * This atom is for debugging purpose. |
| 7715 | */ |
| 7716 | message DebugFailingElapsedClock { |
| 7717 | // Monotically increasing value for each pull. |
| 7718 | optional int64 pull_count = 1; |
| 7719 | // Time from System.elapsedRealtime. |
| 7720 | optional int64 elapsed_clock_millis = 2; |
| 7721 | // Time from System.elapsedRealtime. |
| 7722 | optional int64 same_elapsed_clock_millis = 3; |
| 7723 | // Diff between current elapsed time and elapsed time from previous pull. |
| 7724 | optional int64 elapsed_clock_diff_millis = 4; |
| 7725 | } |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7726 | |
| 7727 | /** Logs System UI bubbles event changed. |
| 7728 | * |
| 7729 | * Logged from: |
| 7730 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles |
| 7731 | */ |
| 7732 | message BubbleUIChanged { |
| 7733 | |
| 7734 | // The app package that is posting the bubble. |
| 7735 | optional string package_name = 1; |
| 7736 | |
| 7737 | // The notification channel that is posting the bubble. |
| 7738 | optional string notification_channel = 2; |
| 7739 | |
| 7740 | // The notification id associated with the posted bubble. |
| 7741 | optional int32 notification_id = 3; |
| 7742 | |
| 7743 | // The position of the bubble within the bubble stack. |
| 7744 | optional int32 position = 4; |
| 7745 | |
| 7746 | // The total number of bubbles within the bubble stack. |
| 7747 | optional int32 total_number = 5; |
| 7748 | |
| 7749 | // User interactions with the bubble. |
| 7750 | enum Action { |
| 7751 | UNKNOWN = 0; |
| 7752 | POSTED = 1; |
| 7753 | UPDATED = 2; |
| 7754 | EXPANDED = 3; |
| 7755 | COLLAPSED = 4; |
| 7756 | DISMISSED = 5; |
| 7757 | STACK_DISMISSED = 6; |
| 7758 | STACK_MOVED = 7; |
| 7759 | HEADER_GO_TO_APP = 8; |
| 7760 | HEADER_GO_TO_SETTINGS = 9; |
| 7761 | PERMISSION_OPT_IN = 10; |
| 7762 | PERMISSION_OPT_OUT = 11; |
Steven Wu | a62cb6a | 2019-02-15 17:12:51 -0500 | [diff] [blame] | 7763 | PERMISSION_DIALOG_SHOWN = 12; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7764 | SWIPE_LEFT = 13; |
| 7765 | SWIPE_RIGHT = 14; |
Steven Wu | a254dab | 2019-01-29 11:30:39 -0500 | [diff] [blame] | 7766 | STACK_EXPANDED = 15; |
Steven Wu | 1684f2d5 | 2019-04-11 14:10:42 -0400 | [diff] [blame] | 7767 | FLYOUT = 16; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7768 | } |
| 7769 | optional Action action = 6; |
| 7770 | |
| 7771 | // Normalized screen position of the bubble stack. The range is between 0 and 1. |
| 7772 | optional float normalized_x_position = 7; |
| 7773 | optional float normalized_y_position = 8; |
Steven Wu | 45e38ae | 2019-03-25 16:16:59 -0400 | [diff] [blame] | 7774 | |
| 7775 | // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon. |
| 7776 | optional bool is_unread = 9; |
Steven Wu | 8ba8ca9 | 2019-04-11 10:47:42 -0400 | [diff] [blame] | 7777 | |
| 7778 | // Whether the bubble is an on-going one. |
| 7779 | optional bool is_ongoing = 10; |
| 7780 | |
| 7781 | // Whether the bubble is produced by an app running in foreground. |
Mady Mellor | daa0a66 | 2019-06-24 16:42:35 -0700 | [diff] [blame] | 7782 | // This is deprecated and the value should be ignored. |
| 7783 | optional bool is_foreground = 11 [deprecated = true]; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7784 | } |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 7785 | |
| 7786 | /** |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 7787 | * Logs System UI bubbles developer errors. |
| 7788 | * |
| 7789 | * Logged from: |
| 7790 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java |
| 7791 | */ |
| 7792 | message BubbleDeveloperErrorReported { |
| 7793 | |
| 7794 | // The app package that is posting the bubble. |
| 7795 | optional string package_name = 1; |
| 7796 | |
| 7797 | // Bubble developer error type enums. |
| 7798 | enum Error { |
| 7799 | UNKNOWN = 0; |
| 7800 | ACTIVITY_INFO_MISSING = 1; |
| 7801 | ACTIVITY_INFO_NOT_RESIZABLE = 2; |
| 7802 | DOCUMENT_LAUNCH_NOT_ALWAYS = 3; |
| 7803 | } |
| 7804 | optional Error error = 2 [default = UNKNOWN]; |
| 7805 | } |
| 7806 | |
| 7807 | /** |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 7808 | * Logs that a constraint for a scheduled job has changed. |
| 7809 | * |
| 7810 | * Logged from: |
| 7811 | * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java |
| 7812 | */ |
| 7813 | message ScheduledJobConstraintChanged { |
| 7814 | repeated AttributionNode attribution_node = 1; |
| 7815 | |
| 7816 | // Name of the job. |
| 7817 | optional string job_name = 2; |
| 7818 | |
| 7819 | optional com.android.server.job.ConstraintEnum constraint = 3; |
| 7820 | |
| 7821 | enum State { |
Kweku Adams | e8db3ab | 2019-02-27 14:30:34 -0800 | [diff] [blame] | 7822 | UNKNOWN = 0; |
| 7823 | UNSATISFIED = 1; |
| 7824 | SATISFIED = 2; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 7825 | } |
| 7826 | optional State state = 4; |
| 7827 | } |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7828 | |
| 7829 | /** |
| 7830 | * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check |
| 7831 | * returns true. |
| 7832 | * |
| 7833 | * Logged from: |
| 7834 | * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java |
| 7835 | */ |
| 7836 | message ScreenTimeoutExtensionReported { |
| 7837 | // Describes how many times in a row did the power manager reset the screen off timeout. |
| 7838 | optional uint32 consecutive_timeout_extended_count = 1; |
| 7839 | } |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 7840 | |
| 7841 | /* |
| 7842 | * Logs number of milliseconds it takes to start a process. |
| 7843 | * The definition of app process start time is from the app launch time to |
| 7844 | * the time that Zygote finished forking the app process and loaded the |
| 7845 | * application package's java classes. |
| 7846 | |
| 7847 | * This metric is different from AppStartOccurred which is for foreground |
| 7848 | * activity only. |
| 7849 | |
| 7850 | * ProcessStartTime can report all processes (both foreground and background) |
| 7851 | * start time. |
| 7852 | * |
| 7853 | * Logged from: |
| 7854 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 7855 | */ |
| 7856 | message ProcessStartTime { |
| 7857 | // The uid of the ProcessRecord. |
| 7858 | optional int32 uid = 1 [(is_uid) = true]; |
| 7859 | |
| 7860 | // The process pid. |
| 7861 | optional int32 pid = 2; |
| 7862 | |
| 7863 | // The process name. |
| 7864 | // Usually package name, "system" for system server. |
| 7865 | // Provided by ActivityManagerService. |
| 7866 | optional string process_name = 3; |
| 7867 | |
| 7868 | enum StartType { |
| 7869 | UNKNOWN = 0; |
| 7870 | WARM = 1; |
| 7871 | HOT = 2; |
| 7872 | COLD = 3; |
| 7873 | } |
| 7874 | |
| 7875 | // The start type. |
| 7876 | optional StartType type = 4; |
| 7877 | |
| 7878 | // The elapsed realtime at the start of the process. |
| 7879 | optional int64 process_start_time_millis = 5; |
| 7880 | |
| 7881 | // Number of milliseconds it takes to reach bind application. |
| 7882 | optional int32 bind_application_delay_millis = 6; |
| 7883 | |
| 7884 | // Number of milliseconds it takes to finish start of the process. |
| 7885 | optional int32 process_start_delay_millis = 7; |
| 7886 | |
| 7887 | // hostingType field in ProcessRecord, the component type such as "activity", |
| 7888 | // "service", "content provider", "broadcast" or other strings. |
| 7889 | optional string hosting_type = 8; |
| 7890 | |
| 7891 | // hostingNameStr field in ProcessRecord. The component class name that runs |
| 7892 | // in this process. |
| 7893 | optional string hosting_name = 9; |
| 7894 | } |
| 7895 | |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 7896 | /** |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 7897 | * Track Media Codec usage |
| 7898 | * Logged from: |
| 7899 | * frameworks/av/media/libstagefright/MediaCodec.cpp |
| 7900 | * frameworks/av/services/mediaanalytics/statsd_codec.cpp |
| 7901 | */ |
| 7902 | message MediametricsCodecReported { |
| 7903 | optional int64 timestamp_nanos = 1; |
| 7904 | optional string package_name = 2; |
| 7905 | optional int64 package_version_code = 3; |
| 7906 | optional int64 media_apex_version = 4; |
| 7907 | |
| 7908 | optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7909 | } |
| 7910 | |
| 7911 | /** |
| 7912 | * Track Media Extractor (pulling video/audio streams out of containers) usage |
| 7913 | * Logged from: |
| 7914 | * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp |
| 7915 | * frameworks/av/services/mediaanalytics/statsd_extractor.cpp |
| 7916 | */ |
| 7917 | message MediametricsExtractorReported { |
| 7918 | optional int64 timestamp_nanos = 1; |
| 7919 | optional string package_name = 2; |
| 7920 | optional int64 package_version_code = 3; |
| 7921 | optional int64 media_apex_version = 4; |
| 7922 | |
| 7923 | optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7924 | } |
| 7925 | |
| 7926 | /** |
| 7927 | * Track how we arbitrate between microphone/input requests. |
| 7928 | * Logged from |
| 7929 | * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp |
| 7930 | * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp |
| 7931 | */ |
| 7932 | message MediametricsAudiopolicyReported { |
| 7933 | optional int64 timestamp_nanos = 1; |
| 7934 | optional string package_name = 2; |
| 7935 | optional int64 package_version_code = 3; |
| 7936 | optional int64 media_apex_version = 4; |
| 7937 | |
| 7938 | optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7939 | } |
| 7940 | |
| 7941 | /** |
| 7942 | * Track how we arbitrate between microphone requests. |
| 7943 | * Logged from |
| 7944 | * frameworks/av/media/libaudioclient/AudioRecord.cpp |
| 7945 | * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp |
| 7946 | */ |
| 7947 | message MediametricsAudiorecordReported { |
| 7948 | optional int64 timestamp_nanos = 1; |
| 7949 | optional string package_name = 2; |
| 7950 | optional int64 package_version_code = 3; |
| 7951 | optional int64 media_apex_version = 4; |
| 7952 | |
| 7953 | optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7954 | } |
| 7955 | |
| 7956 | /** |
| 7957 | * Track how we arbitrate between microphone/input requests. |
| 7958 | * Logged from |
| 7959 | * frameworks/av/media/libnblog/ReportPerformance.cpp |
| 7960 | * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp |
| 7961 | */ |
| 7962 | message MediametricsAudiothreadReported { |
| 7963 | optional int64 timestamp_nanos = 1; |
| 7964 | optional string package_name = 2; |
| 7965 | optional int64 package_version_code = 3; |
| 7966 | optional int64 media_apex_version = 4; |
| 7967 | |
| 7968 | optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7969 | } |
| 7970 | |
| 7971 | /** |
| 7972 | * Track how we arbitrate between microphone/input requests. |
| 7973 | * Logged from |
| 7974 | * frameworks/av/media/libaudioclient/AudioTrack.cpp |
| 7975 | * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp |
| 7976 | */ |
| 7977 | message MediametricsAudiotrackReported { |
| 7978 | optional int64 timestamp_nanos = 1; |
| 7979 | optional string package_name = 2; |
| 7980 | optional int64 package_version_code = 3; |
| 7981 | optional int64 media_apex_version = 4; |
| 7982 | |
| 7983 | optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7984 | } |
| 7985 | |
| 7986 | /** |
| 7987 | * Track information about DRM framework performance |
| 7988 | * Logged from |
| 7989 | * frameworks/av/drm/libmediadrm/DrmHal.cpp |
| 7990 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 7991 | */ |
| 7992 | message MediametricsMediadrmReported { |
| 7993 | optional int64 timestamp_nanos = 1; |
| 7994 | optional string package_name = 2; |
| 7995 | optional int64 package_version_code = 3; |
| 7996 | optional int64 media_apex_version = 4; |
| 7997 | |
| 7998 | // vendor+description tell about which DRM plugin is in use on this device |
| 7999 | optional string vendor = 5; |
| 8000 | optional string description = 6; |
| 8001 | // from frameworks/av/drm/libmediadrm/protos/metrics.proto |
| 8002 | optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8003 | } |
| 8004 | |
| 8005 | /** |
| 8006 | * Track information about the widevine DRM plugin performance |
| 8007 | * Logged from |
| 8008 | * vendor/widevine/libwvdrmengine/cdm/metrics |
| 8009 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 8010 | */ |
| 8011 | message MediametricsDrmWidevineReported { |
| 8012 | optional int64 timestamp_nanos = 1; |
| 8013 | optional string package_name = 2; |
| 8014 | optional int64 package_version_code = 3; |
| 8015 | optional int64 media_apex_version = 4; |
| 8016 | |
| 8017 | optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8018 | } |
| 8019 | |
| 8020 | /** |
| 8021 | * Track information about recordings (e.g. camcorder) |
| 8022 | * Logged from |
| 8023 | * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp |
| 8024 | * frameworks/av/services/mediaanalytics/statsd_recorder.cpp |
| 8025 | */ |
| 8026 | message MediametricsRecorderReported { |
| 8027 | optional int64 timestamp_nanos = 1; |
| 8028 | optional string package_name = 2; |
| 8029 | optional int64 package_version_code = 3; |
| 8030 | optional int64 media_apex_version = 4; |
| 8031 | |
| 8032 | optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8033 | } |
| 8034 | |
| 8035 | /** |
| 8036 | * Track Media Player usage |
| 8037 | * Logged from: |
| 8038 | * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp |
| 8039 | * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp |
| 8040 | */ |
| 8041 | message MediametricsNuPlayerReported { |
| 8042 | optional int64 timestamp_nanos = 1; |
| 8043 | optional string package_name = 2; |
| 8044 | optional int64 package_version_code = 3; |
| 8045 | optional int64 media_apex_version = 4; |
| 8046 | |
| 8047 | optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8048 | } |
| 8049 | |
| 8050 | /** |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 8051 | * Track Legacy DRM usage |
| 8052 | * Logged from |
| 8053 | * frameworks/av/drm/drmserver/DrmManager.cpp |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 8054 | */ |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 8055 | message MediametricsDrmManagerReported { |
| 8056 | optional int64 timestamp_nanos = 1; |
| 8057 | optional string package_name = 2; |
| 8058 | optional int64 package_version_code = 3; |
| 8059 | optional int64 media_apex_version = 4; |
| 8060 | |
| 8061 | enum Method { |
| 8062 | METHOD_NOT_FOUND = -1; |
| 8063 | GET_CONSTRAINTS = 0; |
| 8064 | GET_METADATA = 1; |
| 8065 | CAN_HANDLE = 2; |
| 8066 | PROCESS_DRM_INFO = 3; |
| 8067 | ACQUIRE_DRM_INFO = 4; |
| 8068 | SAVE_RIGHTS = 5; |
| 8069 | GET_ORIGINAL_MIME_TYPE = 6; |
| 8070 | GET_DRM_OBJECT_TYPE = 7; |
| 8071 | CHECK_RIGHTS_STATUS = 8; |
| 8072 | REMOVE_RIGHTS = 9; |
| 8073 | REMOVE_ALL_RIGHTS = 10; |
| 8074 | OPEN_CONVERT_SESSION = 11; |
| 8075 | OPEN_DECRYPT_SESSION = 12; |
| 8076 | } |
| 8077 | |
| 8078 | // plugin_id+description inform which Legacy DRM plugins are still in use on device |
| 8079 | optional string plugin_id = 5; |
| 8080 | optional string description = 6; |
| 8081 | optional Method method = 7; |
| 8082 | optional string mime_types = 8; |
Robert Shih | ec8e60c | 2020-02-08 15:20:39 -0800 | [diff] [blame] | 8083 | |
| 8084 | optional int64 get_constraints_count = 9; |
| 8085 | optional int64 get_metadata_count = 10; |
| 8086 | optional int64 can_handle_count = 11; |
| 8087 | optional int64 process_drm_info_count = 12; |
| 8088 | optional int64 acquire_drm_info_count = 13; |
| 8089 | optional int64 save_rights_count = 14; |
| 8090 | optional int64 get_original_mime_type_count = 15; |
| 8091 | optional int64 get_drm_object_type_count = 16; |
| 8092 | optional int64 check_rights_status_count = 17; |
| 8093 | optional int64 remove_rights_count = 18; |
| 8094 | optional int64 remove_all_rights_count = 19; |
| 8095 | optional int64 open_convert_session_count = 20; |
| 8096 | optional int64 open_decrypt_session_count = 21; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 8097 | } |
| 8098 | |
| 8099 | /** |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 8100 | * State of a dangerous permission requested by a package |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 8101 | * Pulled from: StatsCompanionService |
| 8102 | */ |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 8103 | message DangerousPermissionState { |
| 8104 | // Name of the permission |
| 8105 | optional string permission_name = 1; |
| 8106 | |
| 8107 | // Uid of the package |
| 8108 | optional int32 uid = 2 [(is_uid) = true]; |
| 8109 | |
| 8110 | // Package requesting the permission |
| 8111 | optional string package_name = 3; |
| 8112 | |
| 8113 | // If the permission is granted to the uid |
| 8114 | optional bool is_granted = 4; |
Stanislav Zholnin | 75c3fd1 | 2019-05-21 13:10:51 +0100 | [diff] [blame] | 8115 | |
| 8116 | // Permission flags as per android.content.pm.PermissionFlags |
| 8117 | optional int32 permission_flags = 5; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 8118 | } |
| 8119 | |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 8120 | /** |
| 8121 | * Logs when a package is denied access to a device identifier based on the new access requirements. |
| 8122 | * |
| 8123 | * Logged from: |
| 8124 | * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java |
| 8125 | */ |
| 8126 | message DeviceIdentifierAccessDenied { |
| 8127 | // The name of the package denied access to the requested device identifier. |
| 8128 | optional string package_name = 1; |
| 8129 | |
| 8130 | // The name of the device identifier method the package attempted to invoke. |
| 8131 | optional string method_name = 2; |
| 8132 | |
| 8133 | // True if the package is preinstalled. |
Meng Wang | e8953ae | 2020-01-29 10:38:58 -0800 | [diff] [blame] | 8134 | // Starting from Android 11, this boolean is not set and will always be false. |
| 8135 | optional bool is_preinstalled = 3 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 8136 | |
| 8137 | // True if the package is privileged. |
Sooraj Sasindran | b1c5799 | 2019-11-27 15:57:33 -0800 | [diff] [blame] | 8138 | // Starting from Android 11, this boolean is not set and will always be false. |
| 8139 | optional bool is_priv_app = 4 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 8140 | } |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 8141 | |
| 8142 | /** |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 8143 | * Pulls the ongoing mainline install train version code. |
| 8144 | * Pulled from StatsCompanionService |
| 8145 | */ |
| 8146 | message TrainInfo { |
| 8147 | optional int64 train_version_code = 1; |
| 8148 | |
| 8149 | optional TrainExperimentIds train_experiment_id = 2; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 8150 | |
| 8151 | optional string train_name = 3; |
| 8152 | |
| 8153 | enum Status { |
| 8154 | UNKNOWN = 0; |
| 8155 | INSTALL_REQUESTED = 1; |
| 8156 | INSTALL_STARTED = 2; |
| 8157 | INSTALL_STAGED_NOT_READY = 3; |
| 8158 | INSTALL_STAGED_READY = 4; |
| 8159 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 8160 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 8161 | // and INSTALL_FAILURE_COMMIT. |
| 8162 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 8163 | // 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] | 8164 | INSTALL_CANCELLED = 7; |
| 8165 | INSTALLER_ROLLBACK_REQUESTED = 8; |
| 8166 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 8167 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 8168 | INSTALLER_ROLLBACK_STAGED = 11; |
| 8169 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 8170 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 8171 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 8172 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 8173 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 8174 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 8175 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 8176 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 8177 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 8178 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 8179 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 8180 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 8181 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 8182 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 8183 | REBOOT_TRIGGERED = 26; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 8184 | } |
| 8185 | optional Status status = 4; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 8186 | } |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 8187 | |
| 8188 | /** |
| 8189 | * Logs the gesture stage changed event. |
| 8190 | * |
| 8191 | * Logged from: |
| 8192 | * frameworks/base/packages/SystemUI/ |
| 8193 | */ |
| 8194 | message AssistGestureStageReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 8195 | optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 8196 | } |
| 8197 | |
| 8198 | /** |
| 8199 | * Logs the feedback type. |
| 8200 | * |
| 8201 | * Logged from: |
| 8202 | * frameworks/base/packages/SystemUI/ |
| 8203 | */ |
| 8204 | message AssistGestureFeedbackReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 8205 | // Whether or not the gesture was used. |
| 8206 | optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 8207 | } |
| 8208 | |
| 8209 | /** |
| 8210 | * Logs the progress. |
| 8211 | * |
| 8212 | * Logged from: |
| 8213 | * frameworks/base/packages/SystemUI/ |
| 8214 | */ |
| 8215 | message AssistGestureProgressReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 8216 | // [0,100] progress for the assist gesture. |
| 8217 | optional int32 progress = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 8218 | } |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 8219 | |
| 8220 | /* |
| 8221 | * Information about the time zone data on a device. |
| 8222 | */ |
| 8223 | message TimeZoneDataInfo { |
| 8224 | // A version identifier for the data set on device. e.g. "2018i" |
| 8225 | optional string tzdb_version = 1; |
| 8226 | } |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8227 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 8228 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8229 | * Logs the GPU stats global health information. |
| 8230 | * |
| 8231 | * Logged from: |
| 8232 | * frameworks/native/services/gpuservice/gpustats/ |
| 8233 | */ |
| 8234 | message GpuStatsGlobalInfo { |
| 8235 | // Package name of the gpu driver. |
| 8236 | optional string driver_package_name = 1; |
| 8237 | |
| 8238 | // Version name of the gpu driver. |
| 8239 | optional string driver_version_name = 2; |
| 8240 | |
| 8241 | // Version code of the gpu driver. |
| 8242 | optional int64 driver_version_code = 3; |
| 8243 | |
| 8244 | // Build time of the gpu driver in UTC as seconds since January 1, 1970. |
| 8245 | optional int64 driver_build_time = 4; |
| 8246 | |
| 8247 | // Total count of the gl driver gets loaded. |
| 8248 | optional int64 gl_loading_count = 5; |
| 8249 | |
| 8250 | // Total count of the gl driver fails to be loaded. |
| 8251 | optional int64 gl_loading_failure_count = 6; |
| 8252 | |
| 8253 | // Total count of the Vulkan driver gets loaded. |
| 8254 | optional int64 vk_loading_count = 7; |
| 8255 | |
| 8256 | // Total count of the Vulkan driver fails to be loaded. |
| 8257 | optional int64 vk_loading_failure_count = 8; |
Yiwei Zhang | 63852d2a | 2019-05-06 19:31:20 -0700 | [diff] [blame] | 8258 | |
| 8259 | // Api version of the system Vulkan driver. |
| 8260 | optional int32 vulkan_version = 9; |
| 8261 | |
| 8262 | // Api version of the system CPU Vulkan driver. |
| 8263 | optional int32 cpu_vulkan_version = 10; |
| 8264 | |
| 8265 | // Api version of the system GLES driver. |
| 8266 | optional int32 gles_version = 11; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 8267 | |
| 8268 | // Total count of the angle driver gets loaded. |
| 8269 | optional int64 angle_loading_count = 12; |
| 8270 | |
| 8271 | // Total count of the angle driver fails to be loaded. |
| 8272 | optional int64 angle_loading_failure_count = 13; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8273 | } |
| 8274 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 8275 | /** |
| 8276 | * GPU driver loading time info. |
| 8277 | */ |
| 8278 | message GpuDriverLoadingTime { |
| 8279 | // List of all the driver loading times for this app. The list size is |
| 8280 | // capped at 50. |
| 8281 | repeated int64 driver_loading_time = 1; |
| 8282 | } |
| 8283 | |
| 8284 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8285 | * Logs the GPU stats per app health information. |
| 8286 | * |
| 8287 | * Logged from: |
| 8288 | * frameworks/native/services/gpuservice/gpustats/ |
| 8289 | */ |
| 8290 | message GpuStatsAppInfo { |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 8291 | // Package name of the application that loads the gpu driver. Total number |
| 8292 | // of different packages is capped at 100. |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8293 | optional string app_package_name = 1; |
| 8294 | |
| 8295 | // Version code of the gpu driver this app loads. |
| 8296 | optional int64 driver_version_code = 2; |
| 8297 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 8298 | // gl driver loading time info. |
| 8299 | optional GpuDriverLoadingTime gl_driver_loading_time = 3 |
| 8300 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8301 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 8302 | // Vulkan driver loading time info. |
| 8303 | optional GpuDriverLoadingTime vk_driver_loading_time = 4 |
| 8304 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 8305 | |
| 8306 | // Angle driver loading time info. |
| 8307 | optional GpuDriverLoadingTime angle_driver_loading_time = 5 |
| 8308 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 7c70930 | 2019-05-09 15:00:46 -0700 | [diff] [blame] | 8309 | |
| 8310 | // CPU Vulkan implementation is in use. |
| 8311 | optional bool cpu_vulkan_in_use = 6; |
Yiwei Zhang | a763861 | 2019-07-03 17:34:12 -0700 | [diff] [blame] | 8312 | |
| 8313 | // App is not doing pre-rotation correctly. |
| 8314 | optional bool false_prerotation = 7; |
Yiwei Zhang | f02cf6b | 2019-12-20 14:51:07 -0800 | [diff] [blame] | 8315 | |
| 8316 | // App creates GLESv1 context. |
| 8317 | optional bool gles_1_in_use = 8; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8318 | } |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 8319 | |
| 8320 | /* |
| 8321 | * Logs the size of the system ion heap. |
| 8322 | * |
| 8323 | * Pulled from StatsCompanionService. |
| 8324 | */ |
| 8325 | message SystemIonHeapSize { |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 8326 | // Deprecated due to limited support of ion stats in debugfs. |
| 8327 | // Use `IonHeapSize` instead. |
| 8328 | option deprecated = true; |
| 8329 | |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 8330 | // Size of the system ion heap in bytes. |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 8331 | // Read from debugfs. |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 8332 | optional int64 size_in_bytes = 1; |
| 8333 | } |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 8334 | |
Rafal Slawik | 6d44d6d | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 8335 | /* |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 8336 | * Logs the total size of the ion heap. |
| 8337 | * |
| 8338 | * Pulled from StatsCompanionService. |
| 8339 | */ |
| 8340 | message IonHeapSize { |
| 8341 | // Total size of all ion heaps in kilobytes. |
| 8342 | // Read from: /sys/kernel/ion/total_heaps_kb. |
| 8343 | optional int32 total_size_kb = 1; |
| 8344 | } |
| 8345 | |
| 8346 | /* |
Rafal Slawik | 6d44d6d | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 8347 | * Logs the per-process size of the system ion heap. |
| 8348 | * |
| 8349 | * Pulled from StatsCompanionService. |
| 8350 | */ |
| 8351 | message ProcessSystemIonHeapSize { |
| 8352 | // The uid if available. -1 means not available. |
| 8353 | optional int32 uid = 1 [(is_uid) = true]; |
| 8354 | |
| 8355 | // The process name (from /proc/PID/cmdline). |
| 8356 | optional string process_name = 2; |
| 8357 | |
| 8358 | // Sum of sizes of all allocations. |
| 8359 | optional int32 total_size_in_kilobytes = 3; |
| 8360 | |
| 8361 | // Number of allocations. |
| 8362 | optional int32 allocation_count = 4; |
| 8363 | |
| 8364 | // Size of the largest allocation. |
| 8365 | optional int32 max_size_in_kilobytes = 5; |
| 8366 | } |
| 8367 | |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 8368 | /** |
| 8369 | * Push network stack events. |
| 8370 | * |
| 8371 | * Log from: |
| 8372 | * frameworks/base/packages/NetworkStack/ |
| 8373 | */ |
| 8374 | message NetworkStackReported { |
Chiachang Wang | 729d267 | 2019-03-27 17:33:52 +0800 | [diff] [blame] | 8375 | // The id that indicates the event reported from NetworkStack. |
| 8376 | optional int32 event_id = 1; |
| 8377 | // The data for the reported events. |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 8378 | optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES]; |
| 8379 | } |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 8380 | |
| 8381 | /** |
| 8382 | * Logs the apps that are installed on the external storage. |
| 8383 | * Pulled from: |
| 8384 | * StatsCompanionService |
| 8385 | */ |
| 8386 | message AppsOnExternalStorageInfo { |
| 8387 | // The type of the external storage. |
| 8388 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 8389 | // The name of the package that is installed on the external storage. |
| 8390 | optional string package_name = 2; |
| 8391 | } |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 8392 | |
| 8393 | /** |
| 8394 | * Logs the settings related to Face. |
| 8395 | * Logged from: |
| 8396 | * frameworks/base/services/core/java/com/android/server/stats |
| 8397 | */ |
| 8398 | message FaceSettings { |
| 8399 | // Whether or not face unlock is allowed on Keyguard. |
| 8400 | optional bool unlock_keyguard_enabled = 1; |
| 8401 | // Whether or not face unlock dismisses the Keyguard. |
| 8402 | optional bool unlock_dismisses_keyguard = 2; |
| 8403 | // Whether or not face unlock requires attention. |
| 8404 | optional bool unlock_attention_required = 3; |
| 8405 | // Whether or not face unlock is allowed for apps (through BiometricPrompt). |
| 8406 | optional bool unlock_app_enabled = 4; |
| 8407 | // Whether or not face unlock always requires user confirmation. |
| 8408 | optional bool unlock_always_require_confirmation = 5; |
| 8409 | // Whether or not a diverse set of poses are required during enrollment. |
| 8410 | optional bool unlock_diversity_required = 6; |
| 8411 | } |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 8412 | |
| 8413 | /** |
| 8414 | * Logs cooling devices maintained by the kernel. |
| 8415 | * |
| 8416 | * Pulled from StatsCompanionService.java |
| 8417 | */ |
| 8418 | message CoolingDevice { |
| 8419 | // The type of cooling device being reported. Eg. CPU, GPU... |
| 8420 | optional android.os.CoolingTypeEnum device_location = 1; |
| 8421 | // The name of the cooling device source. Eg. CPU0 |
| 8422 | optional string device_name = 2; |
| 8423 | // Current throttle state of the cooling device. The value can any unsigned |
| 8424 | // integer between 0 and max_state defined in its driver. 0 means device is |
| 8425 | // not in throttling, higher value means deeper throttling. |
| 8426 | optional int32 state = 3; |
| 8427 | } |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 8428 | |
| 8429 | /** |
| 8430 | * Intelligence has several counter-type events that don't warrant a |
| 8431 | * full separate atom. These are primarily API call counters but also include |
| 8432 | * counters for feature usage and specific failure modes. |
| 8433 | * |
| 8434 | * Logged from the Intelligence mainline module. |
| 8435 | */ |
| 8436 | message IntelligenceEventReported { |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 8437 | // The event type. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 8438 | optional android.stats.intelligence.EventType event_id = 1; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 8439 | // Success, failure. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 8440 | optional android.stats.intelligence.Status status = 2; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 8441 | // How many times the event occured (to report a batch of high frequency events). |
| 8442 | optional int32 count = 3; |
Ben Blount | e3223f3d | 2019-05-02 22:49:03 -0700 | [diff] [blame] | 8443 | // How long the event took (sum of durations if count > 1) |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 8444 | optional int64 duration_millis = 4; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 8445 | } |
Andrew T Nguyen | ee615d6 | 2019-05-01 14:40:19 -0700 | [diff] [blame] | 8446 | |
| 8447 | /** |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 8448 | * Logs when Car Power state changed. |
| 8449 | * |
| 8450 | * Logged from: |
| 8451 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 8452 | */ |
| 8453 | message CarPowerStateChanged { |
| 8454 | // States come from CpmsState in CarPowerManagementService.java. |
| 8455 | enum State { |
| 8456 | WAIT_FOR_VHAL = 0; |
| 8457 | ON = 1; |
| 8458 | SHUTDOWN_PREPARE = 2; |
| 8459 | WAIT_FOR_FINISH = 3; |
| 8460 | SUSPEND = 4; |
| 8461 | SIMULATE_SLEEP = 5; |
| 8462 | } |
| 8463 | optional State state = 1; |
| 8464 | } |
| 8465 | |
| 8466 | /** |
Mayank Garg | da5ca01 | 2020-05-14 00:23:53 -0700 | [diff] [blame] | 8467 | * Logs when Car User Hal is requested to switch/create/remove user. |
| 8468 | * |
| 8469 | * Logged from: |
| 8470 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8471 | */ |
| 8472 | message CarUserHalModifyUserRequestReported { |
| 8473 | // Request id for the request. |
| 8474 | optional int32 request_id = 1; |
| 8475 | // Request type. |
| 8476 | enum RequestType { |
| 8477 | UNKNOWN = 0; |
| 8478 | // Car user manager requested user switch. |
| 8479 | SWITCH_REQUEST_ANDROID = 1; |
| 8480 | // OEM requested User switch. |
| 8481 | SWITCH_REQUEST_OEM = 2; |
| 8482 | // Hal switch requested after android switch using activity manager. |
| 8483 | SWITCH_REQUEST_LEGACY = 3; |
| 8484 | // Create User |
| 8485 | CREATE_REQUEST = 4; |
| 8486 | // Remove User |
| 8487 | REMOVE_REQUEST = 5; |
| 8488 | } |
| 8489 | optional RequestType request_type = 2; |
| 8490 | // Android User id of the current user which can only be 0, 10, 11 and so on. |
| 8491 | // -1 if not available. |
| 8492 | optional int32 user_id = 3; |
| 8493 | // VHAL flags of the current user. (-1 if not available) |
| 8494 | optional int32 user_flags = 4; |
| 8495 | // Android User id of the target user for switch/create/remove. It can only |
| 8496 | // be 0, 10, 11 and so on. -1 if not available. |
| 8497 | optional int32 target_user_id = 5; |
| 8498 | // VHAL flags of the target user for switch/create/remove. (-1 if not available) |
| 8499 | optional int32 target_user_flags = 6; |
| 8500 | // Request timeout Milliseconds (-1 if not available) |
| 8501 | optional int32 timeout_millis = 7; |
| 8502 | } |
| 8503 | |
| 8504 | /** |
| 8505 | * Logs when Car User Hal responds to switch/create user request. |
| 8506 | * |
| 8507 | * Logged from: |
| 8508 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8509 | */ |
| 8510 | message CarUserHalModifyUserResponseReported { |
| 8511 | // Request id of the request associated with the response. |
| 8512 | optional int32 request_id = 1; |
| 8513 | // Car user hal callback status. |
| 8514 | enum CallbackStatus { |
| 8515 | UNKNOWN = 0; |
| 8516 | // Hal response was invalid. |
| 8517 | INVALID = 1; |
| 8518 | // Hal response was ok. |
| 8519 | OK = 2; |
| 8520 | // Hal timeout during set call. |
| 8521 | HAL_SET_TIMEOUT = 3; |
| 8522 | // Hal response timeout. |
| 8523 | HAL_RESPONSE_TIMEOUT = 4; |
| 8524 | // Hal responded with wrong info. |
| 8525 | WRONG_HAL_RESPONSE = 5; |
| 8526 | // Hal is processing multiple requests simultaneously. |
| 8527 | CONCURRENT_OPERATION = 6; |
| 8528 | } |
| 8529 | optional CallbackStatus callback_status = 2; |
| 8530 | |
| 8531 | // Hal request status for user switch/create/remove. |
| 8532 | enum HalRequestStatus { |
| 8533 | UNSPECIFIED = 0; |
| 8534 | // Hal request for user switch/create is successful. |
| 8535 | SUCCESS = 1; |
| 8536 | // Hal request for user switch/create failed. |
| 8537 | FAILURE = 2; |
| 8538 | } |
| 8539 | optional HalRequestStatus request_status = 3; |
| 8540 | } |
| 8541 | |
| 8542 | /** |
| 8543 | * Logs when post switch response is posted to Car User Hal. |
| 8544 | * |
| 8545 | * Logged from: |
| 8546 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8547 | */ |
| 8548 | message CarUserHalPostSwitchResponseReported { |
| 8549 | // Request id. |
| 8550 | optional int32 request_id = 1; |
| 8551 | |
| 8552 | // Android user switch status. |
| 8553 | enum UserSwitchStatus { |
| 8554 | UNKNOWN = 0; |
| 8555 | // Android user switch is successful. |
| 8556 | SUCCESS = 1; |
| 8557 | // Android user switch failed. |
| 8558 | FAILURE = 2; |
| 8559 | } |
| 8560 | optional UserSwitchStatus switch_status = 2; |
| 8561 | } |
| 8562 | |
| 8563 | /** |
| 8564 | * Logs when initial user information is requested from Car User Hal. |
| 8565 | * |
| 8566 | * Logged from: |
| 8567 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8568 | */ |
| 8569 | message CarUserHalInitialUserInfoRequestReported { |
| 8570 | // Request id for the request. |
| 8571 | optional int32 request_id = 1; |
| 8572 | |
| 8573 | // Request type for initial user information. |
| 8574 | enum InitialUserInfoRequestType { |
| 8575 | UNKNOWN = 0; |
| 8576 | // At the first time Android was booted (or after a factory reset). |
| 8577 | FIRST_BOOT = 1; |
| 8578 | // At the first time Android was booted after the system was updated. |
| 8579 | FIRST_BOOT_AFTER_OTA = 2; |
| 8580 | // When Android was booted "from scratch". |
| 8581 | COLD_BOOT = 3; |
| 8582 | // When Android was resumed after the system was suspended to memory. |
| 8583 | RESUME = 4; |
| 8584 | } |
| 8585 | optional InitialUserInfoRequestType request_type = 2; |
| 8586 | // Request timeout Milliseconds (-1 if not available) |
| 8587 | optional int32 timeout_millis = 3; |
| 8588 | } |
| 8589 | |
| 8590 | /** |
| 8591 | * Logs when Car User Hal responds to initial user information requests. |
| 8592 | * |
| 8593 | * Logged from: |
| 8594 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8595 | */ |
| 8596 | message CarUserHalInitialUserInfoResponseReported { |
| 8597 | // Request id of the request associated with the response. |
| 8598 | optional int32 request_id = 1; |
| 8599 | // Car user hal callback status. |
| 8600 | enum CallbackStatus { |
| 8601 | UNKNOWN = 0; |
| 8602 | // Hal response was invalid. |
| 8603 | INVALID = 1; |
| 8604 | // Hal response was ok. |
| 8605 | OK = 2; |
| 8606 | // Hal timeout during set call. |
| 8607 | HAL_SET_TIMEOUT = 3; |
| 8608 | // Hal response timeout. |
| 8609 | HAL_RESPONSE_TIMEOUT = 4; |
| 8610 | // Hal responded with wrong info. |
| 8611 | WRONG_HAL_RESPONSE = 5; |
| 8612 | // Hal is processing multiple requests simultaneously. |
| 8613 | CONCURRENT_OPERATION = 6; |
| 8614 | } |
| 8615 | optional CallbackStatus callback_status = 2; |
| 8616 | // Response for initial user information request. |
| 8617 | enum InitialUserInfoResponseAction { |
| 8618 | UNSPECIFIED = 0; |
| 8619 | // Let the Android System decide what to do. |
| 8620 | DEFAULT = 1; |
| 8621 | // Switch to an existing Android user. |
| 8622 | SWITCH = 2; |
| 8623 | // Create a new Android user (and switch to it). |
| 8624 | CREATE = 3; |
| 8625 | } |
| 8626 | optional InitialUserInfoResponseAction response_action = 3; |
| 8627 | // Android User id of the target user which can only be 0, 10, 11 and so on. |
| 8628 | // -1 if not available. |
| 8629 | optional int32 target_user = 4; |
| 8630 | // VHAL flags of the current user. (-1 if not available) |
| 8631 | optional int32 target_user_flags = 5; |
| 8632 | // User locales |
| 8633 | optional string user_locales = 6; |
| 8634 | } |
| 8635 | |
| 8636 | /** |
| 8637 | * Logs when set user association is requested from Car User Hal. |
| 8638 | * |
| 8639 | * Logged from: |
| 8640 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8641 | */ |
| 8642 | message CarUserHalUserAssociationRequestReported { |
| 8643 | // Request id for the request. |
| 8644 | optional int32 request_id = 1; |
| 8645 | // Request type. |
| 8646 | enum RequestType { |
| 8647 | UNKNOWN = 0; |
| 8648 | // For setting user association information. |
| 8649 | SET = 1; |
| 8650 | // For getting user association information. |
| 8651 | GET = 2; |
| 8652 | } |
| 8653 | optional RequestType request_type = 2; |
| 8654 | // Android User id of the current user which can only be 0, 10, 11 and so on. |
| 8655 | // -1 if not available. |
| 8656 | optional int32 current_user_id = 3; |
| 8657 | // VHAL flags of the current user. (-1 if not available) |
| 8658 | optional int32 current_user_flags = 4; |
| 8659 | // Number of the set associations requested. |
| 8660 | optional int32 number_associations = 5; |
| 8661 | // Concatenated string for the types from set associations request. |
| 8662 | // This is a string converted from an array of integers. |
| 8663 | optional string user_identification_association_types = 6; |
| 8664 | // Concatenated string for the values from set associations request. |
| 8665 | // This is a string converted from an array of integers. |
| 8666 | optional string user_identification_association_values = 7; |
| 8667 | } |
| 8668 | |
| 8669 | /** |
| 8670 | * Logs when Car User Hal responds to set user association requests. |
| 8671 | * |
| 8672 | * Logged from: |
| 8673 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8674 | */ |
| 8675 | message CarUserHalSetUserAssociationResponseReported { |
| 8676 | // Request id of the request associated with the response. |
| 8677 | optional int32 request_id = 1; |
| 8678 | // Car user hal callback status. |
| 8679 | enum CallbackStatus { |
| 8680 | UNKNOWN = 0; |
| 8681 | // Hal response was invalid. |
| 8682 | INVALID = 1; |
| 8683 | // Hal response was ok. |
| 8684 | OK = 2; |
| 8685 | // Hal timeout during set call. |
| 8686 | HAL_SET_TIMEOUT = 3; |
| 8687 | // Hal response timeout. |
| 8688 | HAL_RESPONSE_TIMEOUT = 4; |
| 8689 | // Hal responded with wrong info. |
| 8690 | WRONG_HAL_RESPONSE = 5; |
| 8691 | // Hal is processing multiple requests simultaneously. |
| 8692 | CONCURRENT_OPERATION = 6; |
| 8693 | } |
| 8694 | optional CallbackStatus callback_status = 2; |
| 8695 | // Number of the set associations in the response. |
| 8696 | optional int32 number_associations = 3; |
| 8697 | // Concatenated string for the types from set associations request. |
| 8698 | // This is a string converted from an array of integers. |
| 8699 | optional string user_identification_association_types = 4; |
| 8700 | // Concatenated string for the values from set associations request. |
| 8701 | // This is a string converted from an array of integers. |
| 8702 | optional string user_identification_association_values = 5; |
| 8703 | } |
| 8704 | |
| 8705 | /** |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 8706 | * Logs whether GarageMode is entered. |
| 8707 | * |
| 8708 | * Logged from: |
| 8709 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 8710 | */ |
| 8711 | message GarageModeInfo { |
| 8712 | // Whether GarageMode is entered. |
| 8713 | optional bool is_garage_mode = 1; |
| 8714 | } |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 8715 | |
| 8716 | /** |
| 8717 | * Historical app ops data per package. |
| 8718 | */ |
| 8719 | message AppOps { |
| 8720 | // Uid of the package requesting the op |
| 8721 | optional int32 uid = 1 [(is_uid) = true]; |
| 8722 | |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8723 | // Name of the package performing the op |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 8724 | optional string package_name = 2; |
| 8725 | |
Stanislav Zholnin | 48811ee6 | 2020-03-03 16:15:55 +0000 | [diff] [blame] | 8726 | // operation id |
| 8727 | optional android.app.AppOpEnum op_id = 3 [default = APP_OP_NONE]; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 8728 | |
| 8729 | // The number of times the op was granted while the app was in the |
| 8730 | // foreground (only for trusted requests) |
| 8731 | optional int64 trusted_foreground_granted_count = 4; |
| 8732 | |
| 8733 | // The number of times the op was granted while the app was in the |
| 8734 | // background (only for trusted requests) |
| 8735 | optional int64 trusted_background_granted_count = 5; |
| 8736 | |
| 8737 | // The number of times the op was rejected while the app was in the |
| 8738 | // foreground (only for trusted requests) |
| 8739 | optional int64 trusted_foreground_rejected_count = 6; |
| 8740 | |
| 8741 | // The number of times the op was rejected while the app was in the |
| 8742 | // background (only for trusted requests) |
| 8743 | optional int64 trusted_background_rejected_count = 7; |
| 8744 | |
| 8745 | // For long-running operations, total duration of the operation |
| 8746 | // while the app was in the foreground (only for trusted requests) |
| 8747 | optional int64 trusted_foreground_duration_millis = 8; |
| 8748 | |
| 8749 | // For long-running operations, total duration of the operation |
| 8750 | // while the app was in the background (only for trusted requests) |
| 8751 | optional int64 trusted_background_duration_millis = 9; |
Stanislav Zholnin | 42d710e | 2019-11-28 13:11:54 +0000 | [diff] [blame] | 8752 | |
| 8753 | // Whether AppOps is guarded by Runtime permission |
| 8754 | optional bool is_runtime_permission = 10; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 8755 | } |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 8756 | |
| 8757 | /** |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 8758 | * Historical app ops data per package and attribution tag. |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 8759 | */ |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 8760 | message AttributedAppOps { |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 8761 | // Uid of the package requesting the op |
| 8762 | optional int32 uid = 1 [(is_uid) = true]; |
| 8763 | |
| 8764 | // Name of the package performing the op |
| 8765 | optional string package_name = 2; |
| 8766 | |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 8767 | // tag; provided by developer when accessing related API, limited at 50 chars by API. |
| 8768 | // Attributions must be provided through manifest using <attribution> tag available in R and |
| 8769 | // above. |
| 8770 | optional string tag = 3; |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 8771 | |
Stanislav Zholnin | 48811ee6 | 2020-03-03 16:15:55 +0000 | [diff] [blame] | 8772 | // operation id |
| 8773 | optional android.app.AppOpEnum op = 4 [default = APP_OP_NONE]; |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 8774 | |
| 8775 | // The number of times the op was granted while the app was in the |
| 8776 | // foreground (only for trusted requests) |
| 8777 | optional int64 trusted_foreground_granted_count = 5; |
| 8778 | |
| 8779 | // The number of times the op was granted while the app was in the |
| 8780 | // background (only for trusted requests) |
| 8781 | optional int64 trusted_background_granted_count = 6; |
| 8782 | |
| 8783 | // The number of times the op was rejected while the app was in the |
| 8784 | // foreground (only for trusted requests) |
| 8785 | optional int64 trusted_foreground_rejected_count = 7; |
| 8786 | |
| 8787 | // The number of times the op was rejected while the app was in the |
| 8788 | // background (only for trusted requests) |
| 8789 | optional int64 trusted_background_rejected_count = 8; |
| 8790 | |
| 8791 | // For long-running operations, total duration of the operation |
| 8792 | // while the app was in the foreground (only for trusted requests) |
| 8793 | optional int64 trusted_foreground_duration_millis = 9; |
| 8794 | |
| 8795 | // For long-running operations, total duration of the operation |
| 8796 | // while the app was in the background (only for trusted requests) |
| 8797 | optional int64 trusted_background_duration_millis = 10; |
| 8798 | |
| 8799 | // Whether AppOps is guarded by Runtime permission |
| 8800 | optional bool is_runtime_permission = 11; |
Stanislav Zholnin | 5919913 | 2020-03-06 14:19:25 +0000 | [diff] [blame] | 8801 | |
| 8802 | // Sampling rate used on device, from 0 to 100 |
| 8803 | optional int32 sampling_rate = 12; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 8804 | } |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 8805 | |
| 8806 | /** |
| 8807 | * Location Manager API Usage information(e.g. API under usage, |
| 8808 | * API call's parameters). |
| 8809 | * Logged from: |
| 8810 | * frameworks/base/services/core/java/com/android/server/LocationManagerService.java |
| 8811 | */ |
| 8812 | message LocationManagerApiUsageReported { |
| 8813 | |
| 8814 | // Indicating if usage starts or usage ends. |
| 8815 | optional android.stats.location.UsageState state = 1; |
| 8816 | |
| 8817 | // LocationManagerService's API in use. |
| 8818 | // We can identify which API from LocationManager is |
| 8819 | // invoking current LMS API by the combination of |
| 8820 | // API parameter(e.g. is_listener_null, is_intent_null, |
| 8821 | // is_location_request_null) |
| 8822 | optional android.stats.location.LocationManagerServiceApi api_in_use = 2; |
| 8823 | |
| 8824 | // Name of the package calling the API. |
| 8825 | optional string calling_package_name = 3; |
| 8826 | |
| 8827 | // Type of the location provider. |
| 8828 | optional android.stats.location.ProviderType provider = 4; |
| 8829 | |
| 8830 | // Quality of the location request |
| 8831 | optional android.stats.location.LocationRequestQuality quality = 5; |
| 8832 | |
| 8833 | // The desired interval for active location updates, in milliseconds. |
| 8834 | // Bucketized to reduce cardinality. |
| 8835 | optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6; |
| 8836 | |
| 8837 | // Minimum distance between location updates, in meters. |
| 8838 | // Bucketized to reduce cardinality. |
| 8839 | optional android.stats.location.SmallestDisplacementBucket |
| 8840 | bucketized_smallest_displacement = 7; |
| 8841 | |
| 8842 | // The number of location updates. |
| 8843 | optional int64 num_updates = 8; |
| 8844 | |
| 8845 | // The request expiration time, in millisecond since boot. |
| 8846 | // Bucketized to reduce cardinality. |
| 8847 | optional android.stats.location.ExpirationBucket |
| 8848 | bucketized_expire_in = 9; |
| 8849 | |
| 8850 | // Type of Callback passed in for this API. |
| 8851 | optional android.stats.location.CallbackType callback_type = 10; |
| 8852 | |
| 8853 | // The radius of the central point of the alert |
| 8854 | // region, in meters. Only for API REQUEST_GEOFENCE. |
| 8855 | // Bucketized to reduce cardinality. |
| 8856 | optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11; |
| 8857 | |
| 8858 | // Activity Importance of API caller. |
| 8859 | // Categorized to 3 types that are interesting from location's perspective. |
| 8860 | optional android.stats.location.ActivityImportance activiy_importance = 12; |
| 8861 | } |
Stanislav Zholnin | 3d215df1 | 2019-06-05 16:48:20 +0100 | [diff] [blame] | 8862 | |
| 8863 | /** |
| 8864 | * Information about a permission grant or denial made by user inside ReviewPermissionsFragment |
| 8865 | */ |
| 8866 | message ReviewPermissionsFragmentResultReported { |
| 8867 | // unique value identifying a permission group change. A permission group change might result |
| 8868 | // in multiple of these atoms |
| 8869 | optional int64 change_id = 1; |
| 8870 | |
| 8871 | // UID of package the permission belongs to |
| 8872 | optional int32 uid = 2 [(is_uid) = true]; |
| 8873 | |
| 8874 | // Name of package the permission belongs to |
| 8875 | optional string package_name = 3; |
| 8876 | |
| 8877 | // The permission to be granted |
| 8878 | optional string permission_name = 4; |
| 8879 | |
| 8880 | // The result of the permission grant |
| 8881 | optional bool permission_granted = 5; |
| 8882 | } |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 8883 | |
| 8884 | /** |
| 8885 | * Information about results of permission upgrade by RuntimePermissionsUpgradeController |
| 8886 | * Logged from: RuntimePermissionUpdgradeController |
| 8887 | */ |
| 8888 | message RuntimePermissionsUpgradeResult { |
| 8889 | // Permission granted as result of upgrade |
| 8890 | optional string permission_name = 1; |
| 8891 | |
| 8892 | // UID of package granted permission |
| 8893 | optional int32 uid = 2 [(is_uid) = true]; |
| 8894 | |
| 8895 | // Name of package granted permission |
| 8896 | optional string package_name = 3; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 8897 | } |
| 8898 | |
| 8899 | /** |
| 8900 | * Information about a buttons presented in GrantPermissionsActivty and choice made by user |
| 8901 | */ |
| 8902 | message GrantPermissionsActivityButtonActions { |
| 8903 | // Permission granted as result of upgrade |
| 8904 | optional string permission_group_name = 1; |
| 8905 | |
| 8906 | // UID of package granted permission |
| 8907 | optional int32 uid = 2 [(is_uid) = true]; |
| 8908 | |
| 8909 | // Name of package requesting permission |
| 8910 | optional string package_name = 3; |
| 8911 | |
| 8912 | // Buttons presented in the dialog - bit flags, bit numbers are in accordance with |
| 8913 | // LABEL_ constants in GrantPermissionActivity.java |
| 8914 | optional int32 buttons_presented = 4; |
| 8915 | |
| 8916 | // Button clicked by user - same as bit flags in buttons_presented with only single bit set |
| 8917 | optional int32 button_clicked = 5; |
Evan Severson | 5dfc091 | 2020-02-06 14:50:23 -0800 | [diff] [blame] | 8918 | |
| 8919 | // id which identifies single session of user interacting with permission controller |
| 8920 | optional int64 session_id = 6; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 8921 | } |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 8922 | |
| 8923 | /** |
| 8924 | * Information about LocationAccessCheck notification presented to user |
| 8925 | */ |
| 8926 | message LocationAccessCheckNotificationAction { |
| 8927 | |
| 8928 | // id which identifies single session of user interacting with permission controller |
| 8929 | optional int64 session_id = 1; |
| 8930 | |
| 8931 | // Uid of package for which location access check is presented |
| 8932 | optional int32 package_uid = 2; |
| 8933 | |
| 8934 | // Name of package for which location access check is presented |
| 8935 | optional string package_name = 3; |
| 8936 | |
| 8937 | enum Result { |
| 8938 | UNDEFINED = 0; |
| 8939 | // notification was presented to the user |
| 8940 | NOTIFICATION_PRESENTED = 1; |
| 8941 | // notification was declined by the user |
| 8942 | NOTIFICATION_DECLINED = 2; |
| 8943 | // notification was clicked by the user |
| 8944 | NOTIFICATION_CLICKED = 3; |
| 8945 | } |
| 8946 | |
| 8947 | // View / interaction recorded |
| 8948 | optional Result result = 4; |
| 8949 | } |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 8950 | |
| 8951 | /** |
| 8952 | * Information about a permission grant or revoke made by user inside AppPermissionFragment |
| 8953 | */ |
| 8954 | message AppPermissionFragmentActionReported { |
| 8955 | // id which identifies single session of user interacting with permission controller |
| 8956 | optional int64 session_id = 1; |
| 8957 | |
| 8958 | // unique value identifying a permission group change. A permission group change might result |
| 8959 | // in multiple of these atoms |
| 8960 | optional int64 change_id = 2; |
| 8961 | |
| 8962 | // UID of package the permission belongs to |
| 8963 | optional int32 uid = 3 [(is_uid) = true]; |
| 8964 | |
| 8965 | // Name of package the permission belongs to |
| 8966 | optional string package_name = 4; |
| 8967 | |
| 8968 | // The permission to be granted |
| 8969 | optional string permission_name = 5; |
| 8970 | |
| 8971 | // The result of the permission grant |
| 8972 | optional bool permission_granted = 6; |
Stanislav Zholnin | 126da0c | 2020-01-28 16:50:43 +0000 | [diff] [blame] | 8973 | |
| 8974 | // State of Permission Flags after grant as per android.content.pm.PermissionFlags |
| 8975 | optional int32 permission_flags = 7; |
| 8976 | |
| 8977 | enum Button { |
| 8978 | UNDEFINED = 0; |
| 8979 | // Allow button |
| 8980 | ALLOW = 1; |
| 8981 | // Deny button |
| 8982 | DENY = 2; |
| 8983 | // Ask every time button |
| 8984 | ASK_EVERY_TIME = 3; |
| 8985 | // Allow all the time button |
| 8986 | ALLOW_ALWAYS = 4; |
| 8987 | // Allow only while using the app button |
| 8988 | ALLOW_FOREGROUND = 5; |
| 8989 | // Same is Deny button but shown in while in use dialog |
| 8990 | DENY_FOREGROUND = 6; |
| 8991 | } |
| 8992 | |
| 8993 | // Button pressed in the dialog |
| 8994 | optional Button button_pressed = 8; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 8995 | } |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 8996 | |
| 8997 | /** |
| 8998 | * Information about a AppPermissionFragment viewed by user |
| 8999 | */ |
| 9000 | message AppPermissionFragmentViewed { |
| 9001 | // id which identifies single session of user interacting with permission controller |
| 9002 | optional int64 session_id = 1; |
| 9003 | |
| 9004 | // UID of package for which permissions are viewed |
| 9005 | optional int32 uid = 2 [(is_uid) = true]; |
| 9006 | |
| 9007 | // Name of package for which permissions are viewed |
| 9008 | optional string package_name = 3; |
| 9009 | |
| 9010 | // Permission group viewed |
| 9011 | optional string permission_group_name = 4; |
| 9012 | } |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 9013 | |
| 9014 | /** |
Nate Myren | e8f912bb | 2020-04-30 10:41:38 -0700 | [diff] [blame] | 9015 | * Information about a AppPermissionGroupsFragment viewed by user. Fragment has been renamed, but |
| 9016 | * the log retains the old fragment name. |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 9017 | */ |
| 9018 | message AppPermissionsFragmentViewed { |
| 9019 | // id which identifies single session of user interacting with permission controller |
| 9020 | optional int64 session_id = 1; |
| 9021 | |
| 9022 | // id which identifies single view as every view might have several logging records |
| 9023 | // with different package information attached |
| 9024 | optional int64 view_id = 2; |
| 9025 | |
| 9026 | // Permission group viewed |
| 9027 | optional string permission_group_name = 3; |
| 9028 | |
| 9029 | // UID of package for which permissions are viewed |
| 9030 | optional int32 uid = 4 [(is_uid) = true]; |
| 9031 | |
| 9032 | // Name of package for which permissions are viewed |
| 9033 | optional string package_name = 5; |
| 9034 | |
| 9035 | // Category in which permission is included |
| 9036 | enum Category { |
| 9037 | UNDEFINED = 0; |
| 9038 | ALLOWED = 1; |
| 9039 | ALLOWED_FOREGROUND = 2; |
| 9040 | DENIED = 3; |
| 9041 | } |
| 9042 | optional Category category = 6; |
| 9043 | } |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 9044 | /** |
| 9045 | * Information about a PermissionAppsFragment viewed by user. |
| 9046 | * Logged from ui/handheld/PermissionAppsFragment.java |
| 9047 | */ |
| 9048 | message PermissionAppsFragmentViewed { |
| 9049 | // id which identifies single session of user interacting with permission controller |
| 9050 | optional int64 session_id = 1; |
| 9051 | |
| 9052 | // id which identifies single view as every view might have several logging records |
| 9053 | // with different package information attached |
| 9054 | optional int64 view_id = 2; |
| 9055 | |
| 9056 | // Permission group viewed |
| 9057 | optional string permission_group_name = 3; |
| 9058 | |
| 9059 | // UID of package for which permissions are viewed |
| 9060 | optional int32 uid = 4 [(is_uid) = true]; |
| 9061 | |
| 9062 | // Name of package for which permissions are viewed |
| 9063 | optional string package_name = 5; |
| 9064 | |
| 9065 | // Category in which app is included |
| 9066 | enum Category { |
| 9067 | UNDEFINED = 0; |
| 9068 | ALLOWED = 1; |
| 9069 | ALLOWED_FOREGROUND = 2; |
| 9070 | DENIED = 3; |
| 9071 | } |
| 9072 | optional Category category = 6; |
| 9073 | } |
atrost | 1516d52 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 9074 | |
| 9075 | /** |
Nate Myren | e8f912bb | 2020-04-30 10:41:38 -0700 | [diff] [blame] | 9076 | * Log that the Auto Revoke notification has been clicked |
| 9077 | * Logged from ui/ManagePermissionsActivity |
| 9078 | */ |
| 9079 | message AutoRevokeNotificationClicked { |
| 9080 | // id which identifies single session of user interacting with permission controller |
| 9081 | optional int64 session_id = 1; |
| 9082 | } |
| 9083 | |
| 9084 | /** |
| 9085 | * Log that an app has been displayed on the auto revoke page, and lists one permission that was |
| 9086 | * auto revoked for it. |
| 9087 | * Logged from ui/handheld/AutoRevokeFragment |
| 9088 | */ |
| 9089 | message AutoRevokeFragmentAppViewed { |
| 9090 | // id which identifies single session of user interacting with permission controller |
| 9091 | optional int64 session_id = 1; |
| 9092 | |
| 9093 | // UID of package for which permissions are viewed |
| 9094 | optional int32 uid = 2 [(is_uid) = true]; |
| 9095 | |
| 9096 | // Name of package for which permissions are viewed |
| 9097 | optional string package_name = 3; |
| 9098 | |
| 9099 | // The name of a permission group that has been revoked |
| 9100 | optional string permission_group_name = 4; |
| 9101 | |
| 9102 | // The age of the app- more than three months old, or more than six months |
| 9103 | enum Age { |
| 9104 | UNDEFINED = 0; |
| 9105 | NEWER_BUCKET = 1; |
| 9106 | OLDER_BUCKET = 2; |
| 9107 | } |
| 9108 | |
| 9109 | // How long the app has been unused. Currently, newer bucket is 3 months, older is 6 months |
| 9110 | optional Age age = 5; |
| 9111 | } |
| 9112 | |
| 9113 | /** |
| 9114 | * Log that the user has interacted with an app on the auto revoke fragment |
| 9115 | * Logged from ui/handheld/AutoRevokeFragment |
| 9116 | */ |
| 9117 | message AutoRevokedAppInteraction { |
| 9118 | // id which identifies single session of user interacting with permission controller |
| 9119 | optional int64 session_id = 1; |
| 9120 | |
| 9121 | // UID of package for which permissions are viewed |
| 9122 | optional int32 uid = 2 [(is_uid) = true]; |
| 9123 | |
| 9124 | // Name of package for which permissions are viewed |
| 9125 | optional string package_name = 3; |
| 9126 | |
| 9127 | enum Action { |
| 9128 | UNDEFINED = 0; |
| 9129 | REMOVE = 1; |
| 9130 | OPEN = 2; |
| 9131 | APP_INFO = 3; |
| 9132 | PERMISSIONS = 4; |
| 9133 | REMOVE_IN_SETTINGS = 5; |
| 9134 | OPEN_IN_SETTINGS = 6; |
| 9135 | } |
| 9136 | |
| 9137 | // The action the user took to interact with the app |
| 9138 | optional Action action = 4; |
| 9139 | } |
| 9140 | |
| 9141 | /** |
| 9142 | * Log that the AppPermissionGroupsFragment has been interacted with for the possible purposes of |
| 9143 | * auto revoke, or that the auto revoke switch has been changed |
| 9144 | * Logged from ui/handheld/AppPermissionGroupsFragment |
| 9145 | */ |
| 9146 | message AppPermissionGroupsFragmentAutoRevokeAction { |
| 9147 | // id which identifies single session of user interacting with permission controller |
| 9148 | optional int64 session_id = 1; |
| 9149 | |
| 9150 | // UID of package for which permissions are viewed |
| 9151 | optional int32 uid = 2 [(is_uid) = true]; |
| 9152 | |
| 9153 | // Name of package for which permissions are viewed |
| 9154 | optional string package_name = 3; |
| 9155 | |
| 9156 | enum Action { |
| 9157 | UNDEFINED = 0; |
| 9158 | OPENED_FOR_AUTO_REVOKE = 1; |
| 9159 | OPENED_FROM_INTENT = 2; |
| 9160 | SWITCH_ENABLED = 3; |
| 9161 | SWITCH_DISABLED = 4; |
| 9162 | } |
| 9163 | |
| 9164 | // The action the user took to interact with the fragment |
| 9165 | optional Action action = 4; |
| 9166 | } |
| 9167 | |
| 9168 | /** |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9169 | * Logs when there is a smart selection related event. |
| 9170 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 9171 | * Logged from: TextClassifierEventLogger.java |
| 9172 | */ |
| 9173 | message TextSelectionEvent { |
| 9174 | // A session ID. |
| 9175 | optional string session_id = 1; |
| 9176 | |
| 9177 | // Event type of this event. |
| 9178 | optional android.stats.textclassifier.EventType event_type = 2; |
| 9179 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 9180 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9181 | optional string model_name = 3; |
| 9182 | |
| 9183 | // Type of widget that was involved in triggering this event. |
| 9184 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 9185 | |
| 9186 | // Index of this event in a session. |
| 9187 | optional int32 event_index = 5; |
| 9188 | |
| 9189 | // Entity type that is involved. |
| 9190 | optional string entity_type = 6; |
| 9191 | |
| 9192 | // Relative word index of the start of the selection. |
| 9193 | optional int32 relative_word_start_index = 7; |
| 9194 | |
| 9195 | // Relative word (exclusive) index of the end of the selection. |
| 9196 | optional int32 relative_word_end_index = 8; |
| 9197 | |
| 9198 | // Relative word index of the start of the smart selection. |
| 9199 | optional int32 relative_suggested_word_start_index = 9; |
| 9200 | |
| 9201 | // Relative word (exclusive) index of the end of the smart selection. |
| 9202 | optional int32 relative_suggested_word_end_index = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 9203 | |
| 9204 | // Name of source package. |
| 9205 | optional string package_name = 11; |
Tony Mak | 2c00495 | 2020-03-27 17:16:47 +0000 | [diff] [blame] | 9206 | |
| 9207 | // Name of the LangID model that is involved in this event. |
| 9208 | optional string langid_model_name = 12; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9209 | } |
| 9210 | |
| 9211 | /** |
| 9212 | * Logs when there is a smart linkify related event. |
| 9213 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 9214 | * Logged from: TextClassifierEventLogger.java |
| 9215 | */ |
| 9216 | message TextLinkifyEvent { |
| 9217 | // A session ID. |
| 9218 | optional string session_id = 1; |
| 9219 | |
| 9220 | // Event type of this event. |
| 9221 | optional android.stats.textclassifier.EventType event_type = 2; |
| 9222 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 9223 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9224 | optional string model_name = 3; |
| 9225 | |
| 9226 | // Type of widget that was involved in triggering this event. |
| 9227 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 9228 | |
| 9229 | // Index of this event in a session. |
| 9230 | optional int32 event_index = 5; |
| 9231 | |
| 9232 | // Entity type that is involved. |
| 9233 | optional string entity_type = 6; |
| 9234 | |
| 9235 | // Number of links detected. |
| 9236 | optional int32 num_links = 7; |
| 9237 | |
| 9238 | // The total length of all links. |
| 9239 | optional int32 linked_text_length = 8; |
| 9240 | |
| 9241 | // Length of input text. |
| 9242 | optional int32 text_length = 9; |
| 9243 | |
| 9244 | // Time spent on generating links in ms. |
| 9245 | optional int64 latency_millis = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 9246 | |
| 9247 | // Name of source package. |
| 9248 | optional string package_name = 11; |
Tony Mak | 2c00495 | 2020-03-27 17:16:47 +0000 | [diff] [blame] | 9249 | |
| 9250 | // Name of the LangID model that is involved in this event. |
| 9251 | optional string langid_model_name = 12; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9252 | } |
| 9253 | |
| 9254 | /** |
| 9255 | * Logs when there is a conversation actions related event. |
| 9256 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 9257 | * Logged from: TextClassifierEventLogger.java |
| 9258 | */ |
| 9259 | message ConversationActionsEvent { |
| 9260 | // A session ID. |
| 9261 | optional string session_id = 1; |
| 9262 | |
| 9263 | // Event type of this event. |
| 9264 | optional android.stats.textclassifier.EventType event_type = 2; |
| 9265 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 9266 | // Name of the actions model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9267 | optional string model_name = 3; |
| 9268 | |
| 9269 | // Type of widget that was involved in triggering this event. |
| 9270 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 9271 | |
| 9272 | // The first entity type that is involved. |
| 9273 | optional string first_entity_type = 5; |
| 9274 | |
| 9275 | // The second entity type that is involved. |
| 9276 | optional string second_entity_type = 6; |
| 9277 | |
| 9278 | // The third entity type that is involved. |
| 9279 | optional string third_entity_type = 7; |
| 9280 | |
| 9281 | // The score of the first entity type. |
| 9282 | optional float score = 8; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 9283 | |
| 9284 | // Name of source package. |
| 9285 | optional string package_name = 9; |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 9286 | |
| 9287 | // Name of the annotator model that is involved in this event. |
| 9288 | optional string annotator_model_name = 10; |
Tony Mak | 2c00495 | 2020-03-27 17:16:47 +0000 | [diff] [blame] | 9289 | |
| 9290 | // Name of the LangID model that is involved in this event. |
| 9291 | optional string langid_model_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9292 | } |
| 9293 | |
| 9294 | /** |
| 9295 | * Logs when there is a language detection related event. |
| 9296 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 9297 | * Logged from: TextClassifierEventLogger.java |
| 9298 | */ |
| 9299 | message LanguageDetectionEvent { |
| 9300 | // A session ID. |
| 9301 | optional string session_id = 1; |
| 9302 | |
| 9303 | // Event type of this event. |
| 9304 | optional android.stats.textclassifier.EventType event_type = 2; |
| 9305 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 9306 | // Name of the language detection model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9307 | optional string model_name = 3; |
| 9308 | |
| 9309 | // Type of widget that was involved in triggering this event. |
| 9310 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 9311 | |
| 9312 | // Detected language. |
| 9313 | optional string language_tag = 5; |
| 9314 | |
| 9315 | // Score of the detected language. |
| 9316 | optional float score = 6; |
| 9317 | |
| 9318 | // Position of this action. |
| 9319 | optional int32 action_index = 7; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 9320 | |
| 9321 | // Name of source package. |
| 9322 | optional string package_name = 8; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9323 | } |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9324 | |
| 9325 | /** |
| 9326 | * Information about an OTA update attempt by update_engine. |
| 9327 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 9328 | */ |
| 9329 | message UpdateEngineUpdateAttemptReported { |
| 9330 | // The number of attempts for the update engine to apply a given payload. |
| 9331 | optional int32 attempt_number = 1; |
| 9332 | |
| 9333 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 9334 | |
| 9335 | // The total time in minutes for the update engine to apply a given payload. |
| 9336 | // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and |
| 9337 | // it's increased when the system is sleeping. |
| 9338 | optional int32 duration_boottime_in_minutes = 3; |
| 9339 | |
| 9340 | // The total time in minutes for the update engine to apply a given payload. |
| 9341 | // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW; |
| 9342 | // and it's not increased when the system is sleeping. |
| 9343 | optional int32 duration_monotonic_in_minutes = 4; |
| 9344 | |
| 9345 | // The size of the payload in MiBs. |
| 9346 | optional int32 payload_size_mib = 5; |
| 9347 | |
| 9348 | // The attempt result reported by the update engine for an OTA update. |
| 9349 | optional android.stats.otaupdate.AttemptResult attempt_result = 6; |
| 9350 | |
| 9351 | // The error code reported by the update engine after an OTA update attempt |
| 9352 | // on A/B devices. |
| 9353 | optional android.stats.otaupdate.ErrorCode error_code = 7; |
| 9354 | |
| 9355 | // The build fingerprint of the source system. The value is read from a |
| 9356 | // system property when the device takes the update. e.g. |
| 9357 | // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys |
| 9358 | optional string source_fingerprint = 8; |
Alessio Balsini | d8698fa | 2020-05-26 22:26:56 +0100 | [diff] [blame] | 9359 | |
| 9360 | // Size of super partition. |
| 9361 | optional int64 super_partition_size_bytes = 9; |
| 9362 | |
| 9363 | // Size of current slot within the super partition. |
| 9364 | optional int64 slot_size_bytes = 10; |
| 9365 | |
| 9366 | // Free space available in the super partition. |
| 9367 | optional int64 super_free_space_bytes = 11; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9368 | } |
| 9369 | |
| 9370 | /** |
| 9371 | * Information about all the attempts the device make before finishing the |
| 9372 | * successful update. |
| 9373 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 9374 | */ |
| 9375 | message UpdateEngineSuccessfulUpdateReported { |
| 9376 | // The number of attempts for the update engine to apply the payload for a |
| 9377 | // successful update. |
| 9378 | optional int32 attempt_count = 1; |
| 9379 | |
| 9380 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 9381 | |
| 9382 | optional int32 payload_size_mib = 3; |
| 9383 | |
| 9384 | // The total number of bytes downloaded by update_engine since the last |
| 9385 | // successful update. |
| 9386 | optional int32 total_bytes_downloaded_mib = 4; |
| 9387 | |
| 9388 | // The ratio in percentage of the over-downloaded bytes compared to the |
| 9389 | // total bytes needed to successfully install the update. e.g. 200 if we |
| 9390 | // download 200MiB in total for a 100MiB package. |
| 9391 | optional int32 download_overhead_percentage = 5; |
| 9392 | |
| 9393 | // The total time in minutes for the update engine to apply the payload for a |
| 9394 | // successful update. |
| 9395 | optional int32 total_duration_minutes = 6; |
| 9396 | |
| 9397 | // The number of reboot of the device during a successful update. |
| 9398 | optional int32 reboot_count = 7; |
| 9399 | } |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 9400 | |
| 9401 | /** |
Kenny Root | 4eacaaa | 2020-01-08 20:48:13 -0800 | [diff] [blame] | 9402 | * Reported when the RebootEscrow HAL has attempted to recover the escrowed |
| 9403 | * key to indicate whether it was successful or not. |
| 9404 | * |
| 9405 | * Logged from: |
| 9406 | * frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java |
| 9407 | */ |
| 9408 | message RebootEscrowRecoveryReported { |
| 9409 | optional bool successful = 1; |
| 9410 | } |
| 9411 | |
| 9412 | /** |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 9413 | * Global display pipeline metrics reported by SurfaceFlinger. |
| 9414 | * Pulled from: |
| 9415 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 9416 | */ |
| 9417 | message SurfaceflingerStatsGlobalInfo { |
| 9418 | // Total number of frames presented during the tracing period |
| 9419 | optional int64 total_frames = 1; |
| 9420 | // Total number of frames missed |
| 9421 | optional int64 missed_frames = 2; |
| 9422 | // Total number of frames that fell back to client composition |
| 9423 | optional int64 client_composition_frames = 3; |
| 9424 | // Total time the display was turned on |
| 9425 | optional int64 display_on_millis = 4; |
| 9426 | // Total time that was spent performing animations. |
| 9427 | // This is derived from the present-to-present layer histogram |
| 9428 | optional int64 animation_millis = 5; |
Alec Mouri | a262245 | 2020-02-10 17:46:50 -0800 | [diff] [blame] | 9429 | // Total number of event connections tracked by SurfaceFlinger at the time |
| 9430 | // of this pull. If this number grows prohibitively large, then this can |
| 9431 | // cause jank due to resource contention. |
| 9432 | optional int32 event_connection_count = 6; |
Alec Mouri | bb55b7f | 2020-02-12 17:35:01 -0800 | [diff] [blame] | 9433 | // Set of timings measured from when SurfaceFlinger began compositing a |
| 9434 | // frame, until the frame was requested to be presented to the display. This |
| 9435 | // measures SurfaceFlinger's total CPU walltime on the critical path per |
| 9436 | // frame. |
| 9437 | optional FrameTimingHistogram frame_duration = 7 |
| 9438 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9439 | // Set of timings measured from when SurfaceFlinger first began using the |
| 9440 | // GPU to composite a frame, until the GPU has finished compositing that |
| 9441 | // frame. This measures the total additional time SurfaceFlinger needed to |
| 9442 | // perform due to falling back into GPU composition. |
| 9443 | optional FrameTimingHistogram render_engine_timing = 8 |
| 9444 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 9445 | } |
| 9446 | |
| 9447 | /** |
| 9448 | * Per-layer display pipeline metrics reported by SurfaceFlinger. |
| 9449 | * The number of layers uploaded will be restricted due to size limitations. |
| 9450 | * Pulled from: |
| 9451 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 9452 | */ |
| 9453 | message SurfaceflingerStatsLayerInfo { |
| 9454 | // The layer for this set of metrics |
| 9455 | // For now we can infer that the package name is included in the layer |
| 9456 | // name. |
| 9457 | optional string layer_name = 1; |
| 9458 | // Total number of frames presented |
| 9459 | optional int64 total_frames = 2; |
| 9460 | // Total number of dropped frames while latching a buffer for this layer. |
| 9461 | optional int64 dropped_frames = 3; |
| 9462 | // Set of timings measured between successive presentation timestamps. |
| 9463 | optional FrameTimingHistogram present_to_present = 4 |
| 9464 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9465 | // Set of timings measured from when an app queued a buffer for |
| 9466 | // presentation, until the buffer was actually presented to the |
| 9467 | // display. |
| 9468 | optional FrameTimingHistogram post_to_present = 5 |
| 9469 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9470 | // Set of timings measured from when a buffer is ready to be presented, |
| 9471 | // until the buffer was actually presented to the display. |
| 9472 | optional FrameTimingHistogram acquire_to_present = 6 |
| 9473 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9474 | // Set of timings measured from when a buffer was latched by |
| 9475 | // SurfaceFlinger, until the buffer was presented to the display |
| 9476 | optional FrameTimingHistogram latch_to_present = 7 |
| 9477 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9478 | // Set of timings measured from the desired presentation to the actual |
| 9479 | // presentation time |
| 9480 | optional FrameTimingHistogram desired_to_present = 8 |
| 9481 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9482 | // Set of timings measured from when an app queued a buffer for |
| 9483 | // presentation, until the buffer was ready to be presented. |
| 9484 | optional FrameTimingHistogram post_to_acquire = 9 |
| 9485 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 59cdc901 | 2020-02-10 10:58:39 -0800 | [diff] [blame] | 9486 | // Frames missed latch because the acquire fence didn't fire |
| 9487 | optional int64 late_acquire_frames = 10; |
| 9488 | // Frames latched early because the desired present time was bad |
| 9489 | optional int64 bad_desired_present_frames = 11; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 9490 | } |
| 9491 | |
| 9492 | /** |
| 9493 | * Histogram of frame counts bucketed by time in milliseconds. |
| 9494 | * Because of size limitations, we hard-cap the number of buckets, with |
| 9495 | * buckets for corresponding to larger milliseconds being less precise. |
| 9496 | */ |
| 9497 | message FrameTimingHistogram { |
| 9498 | // Timings in milliseconds that describes a set of histogram buckets |
| 9499 | repeated int32 time_millis_buckets = 1; |
| 9500 | // Number of frames that match to each time_millis, i.e. the bucket |
| 9501 | // contents |
| 9502 | // It's required that len(time_millis) == len(frame_count) |
| 9503 | repeated int64 frame_counts = 2; |
| 9504 | } |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 9505 | |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 9506 | /** |
Alec Mouri | 5ac3262 | 2020-02-06 08:44:25 -0800 | [diff] [blame] | 9507 | * Janky event as reported by SurfaceFlinger. |
| 9508 | * This event is intended to be consumed by a Perfetto subscriber for |
| 9509 | * automated trace collection. |
| 9510 | * |
| 9511 | * Logged from: |
| 9512 | * frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp |
| 9513 | */ |
| 9514 | message DisplayJankReported { |
| 9515 | // Informational field for how long the janky event lasted in milliseconds |
| 9516 | optional int64 event_duration_millis = 1; |
| 9517 | // Number of frame deadlines missed, where SurfaceFlinger failed to update |
| 9518 | // the display on time. |
| 9519 | optional int32 present_deadlines_missed = 2; |
| 9520 | } |
| 9521 | |
| 9522 | /** |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 9523 | * Information about camera facing and API level usage. |
| 9524 | * Logged from: |
| 9525 | * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java |
| 9526 | */ |
| 9527 | message CameraActionEvent { |
| 9528 | // Camera session duration |
Emilian Peev | 6ea6fe9 | 2020-02-24 15:31:34 -0800 | [diff] [blame] | 9529 | optional int64 duration_millis = 1; |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 9530 | |
| 9531 | // Camera API level used |
| 9532 | optional int32 api_level = 2; |
| 9533 | |
| 9534 | // Name of client package |
| 9535 | optional string package_name = 3; |
| 9536 | |
| 9537 | // Camera facing |
| 9538 | enum Facing { |
| 9539 | UNKNOWN = 0; |
| 9540 | BACK = 1; |
| 9541 | FRONT = 2; |
| 9542 | EXTERNAL = 3; |
| 9543 | } |
| 9544 | optional Facing facing = 4; |
| 9545 | } |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 9546 | |
| 9547 | /** |
atrost | 1516d52 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 9548 | * Logs when a compatibility change is affecting an app. |
| 9549 | * |
| 9550 | * Logged from: |
| 9551 | * frameworks/base/core/java/android/app/AppCompatCallbacks.java and |
| 9552 | * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java |
| 9553 | */ |
| 9554 | message AppCompatibilityChangeReported { |
| 9555 | // The UID of the app being affected by the compatibilty change. |
| 9556 | optional int32 uid = 1 [(is_uid) = true]; |
| 9557 | |
| 9558 | // The ID of the change affecting the app. |
| 9559 | optional int64 change_id = 2; |
| 9560 | |
| 9561 | enum State { |
| 9562 | UNKNOWN_STATE = 0; |
| 9563 | ENABLED = 1; |
| 9564 | DISABLED = 2; |
| 9565 | LOGGED = 3; |
| 9566 | } |
| 9567 | |
| 9568 | // The state of the change - if logged from gating whether it was enabled or disabled, or just |
| 9569 | // logged otherwise. |
| 9570 | optional State state = 3; |
| 9571 | |
| 9572 | enum Source { |
| 9573 | UNKNOWN_SOURCE = 0; |
| 9574 | APP_PROCESS = 1; |
| 9575 | SYSTEM_SERVER = 2; |
| 9576 | } |
| 9577 | |
| 9578 | // Where it was logged from. |
| 9579 | optional Source source = 4; |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 9580 | |
atrost | 1516d52 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 9581 | } |
Hector Dearman | 25af773 | 2019-11-19 16:28:59 +0000 | [diff] [blame] | 9582 | |
| 9583 | /** |
| 9584 | * Logged from |
| 9585 | * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc |
| 9586 | */ |
| 9587 | message PerfettoUploaded { |
| 9588 | enum Event { |
| 9589 | PERFETTO_UNDEFINED = 0; |
| 9590 | PERFETTO_TRACE_BEGIN = 1; |
| 9591 | PERFETTO_BACKGROUND_TRACE_BEGIN = 2; |
| 9592 | PERFETTO_ON_CONNECT = 3; |
| 9593 | PERFETTO_ON_TRACING_DISABLED = 4; |
| 9594 | PERFETTO_UPLOAD_DROPBOX_BEGIN = 5; |
| 9595 | PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6; |
| 9596 | PERFETTO_UPLOAD_DROPBOX_FAILURE = 7; |
| 9597 | PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; |
| 9598 | PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9; |
| 9599 | PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; |
| 9600 | PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; |
| 9601 | PERFETTO_TRIGGER_BEGIN = 12; |
| 9602 | PERFETTO_TRIGGER_SUCCESS = 13; |
| 9603 | PERFETTO_TRIGGER_FAILURE = 14; |
| 9604 | PERFETTO_HIT_GUARDRAILS = 15; |
| 9605 | PERFETTO_ON_TIMEOUT = 16; |
| 9606 | PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; |
| 9607 | } |
| 9608 | |
| 9609 | // Which stage of the pipeline we are reporting from. |
| 9610 | optional Event event = 1; |
| 9611 | |
| 9612 | // UUID matching the one set inside the SystemInfo trace packet. |
| 9613 | optional int64 trace_uuid_lsb = 2; |
| 9614 | optional int64 trace_uuid_msb = 3; |
| 9615 | } |
Hector Dearman | f35827b | 2019-12-04 13:42:41 +0000 | [diff] [blame] | 9616 | |
| 9617 | /** |
Mark Tabry | 8a4a998 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 9618 | * Pulls client metrics on data transferred via Vehicle Maps Service. |
| 9619 | * Metrics are keyed by uid + layer. |
| 9620 | * |
| 9621 | * Pulled from: |
| 9622 | * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java |
| 9623 | */ |
| 9624 | message VmsClientStats { |
| 9625 | // UID of the VMS client app |
| 9626 | optional int32 uid = 1 [(is_uid) = true]; |
| 9627 | |
| 9628 | // VMS layer definition |
| 9629 | optional int32 layer_type = 2; |
| 9630 | optional int32 layer_channel = 3; |
| 9631 | optional int32 layer_version = 4; |
| 9632 | |
| 9633 | // Bytes and packets sent by the client for the layer |
| 9634 | optional int64 tx_bytes = 5; |
| 9635 | optional int64 tx_packets = 6; |
| 9636 | |
| 9637 | // Bytes and packets received by the client for the layer |
| 9638 | optional int64 rx_bytes = 7; |
| 9639 | optional int64 rx_packets = 8; |
| 9640 | |
| 9641 | // Bytes and packets dropped due to client error |
| 9642 | optional int64 dropped_bytes = 9; |
| 9643 | optional int64 dropped_packets = 10; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 9644 | } |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9645 | |
| 9646 | /** |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 9647 | * State of a dangerous permission requested by a package - sampled |
| 9648 | * Pulled from: StatsCompanionService.java with data obtained from PackageManager API |
| 9649 | */ |
| 9650 | message DangerousPermissionStateSampled { |
| 9651 | // Name of the permission |
| 9652 | optional string permission_name = 1; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9653 | |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 9654 | // Uid of the package |
| 9655 | optional int32 uid = 2 [(is_uid) = true]; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9656 | |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 9657 | // If the permission is granted to the uid |
| 9658 | optional bool is_granted = 3; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9659 | |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 9660 | // Permission flags as per android.content.pm.PermissionFlags |
| 9661 | optional int32 permission_flags = 4; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9662 | } |
| 9663 | |
| 9664 | /** |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 9665 | * HWUI stats for a given app. |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9666 | */ |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 9667 | message GraphicsStats { |
| 9668 | // The package name of the app |
| 9669 | optional string package_name = 1; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9670 | |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 9671 | // The version code of the app |
| 9672 | optional int64 version_code = 2; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9673 | |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 9674 | // The start & end timestamps in UTC as |
| 9675 | // milliseconds since January 1, 1970 |
| 9676 | // Compatible with java.util.Date#setTime() |
Stan Iliev | b651719 | 2020-02-18 10:12:42 -0500 | [diff] [blame] | 9677 | optional int64 start_millis = 3; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9678 | |
Stan Iliev | b651719 | 2020-02-18 10:12:42 -0500 | [diff] [blame] | 9679 | optional int64 end_millis = 4; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9680 | |
Stan Iliev | b651719 | 2020-02-18 10:12:42 -0500 | [diff] [blame] | 9681 | // HWUI renders pipeline type: GL (1) or Vulkan (2). |
| 9682 | enum PipelineType { |
| 9683 | UNKNOWN = 0; |
| 9684 | GL = 1; |
| 9685 | VULKAN = 2; |
| 9686 | } |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9687 | |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 9688 | // HWUI renders pipeline type: GL or Vulkan. |
| 9689 | optional PipelineType pipeline = 5; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9690 | |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 9691 | // Distinct frame count. |
| 9692 | optional int32 total_frames = 6; |
| 9693 | |
| 9694 | // Number of "missed vsync" events. |
| 9695 | optional int32 missed_vsync_count = 7; |
| 9696 | |
| 9697 | // Number of frames in triple-buffering scenario (high input latency) |
| 9698 | optional int32 high_input_latency_count = 8; |
| 9699 | |
| 9700 | // Number of "slow UI thread" events. |
| 9701 | optional int32 slow_ui_thread_count = 9; |
| 9702 | |
| 9703 | // Number of "slow bitmap upload" events. |
| 9704 | optional int32 slow_bitmap_upload_count = 10; |
| 9705 | |
| 9706 | // Number of "slow draw" events. |
| 9707 | optional int32 slow_draw_count = 11; |
| 9708 | |
| 9709 | // Number of frames that missed their deadline (aka, visibly janked) |
| 9710 | optional int32 missed_deadline_count = 12; |
| 9711 | |
| 9712 | // The frame time histogram for the package |
| 9713 | optional FrameTimingHistogram cpu_histogram = 13 |
| 9714 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9715 | |
| 9716 | // The gpu frame time histogram for the package |
| 9717 | optional FrameTimingHistogram gpu_histogram = 14 |
| 9718 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9719 | |
| 9720 | // UI mainline module version. |
| 9721 | optional int64 version_ui_module = 15; |
| 9722 | |
| 9723 | // If true, these are HWUI stats for up to a 24h period for a given app from today. |
| 9724 | // If false, these are HWUI stats for a 24h period for a given app from the last complete |
| 9725 | // day (yesterday). Stats from yesterday stay constant, while stats from today may change as |
| 9726 | // more apps are running / rendering. |
| 9727 | optional bool is_today = 16; |
| 9728 | } |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9729 | |
| 9730 | /** |
| 9731 | * Message related to dangerous (runtime) app ops access |
| 9732 | */ |
Stanislav Zholnin | 88c6f32 | 2020-01-29 14:48:11 +0000 | [diff] [blame] | 9733 | message RuntimeAppOpAccess { |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9734 | // Uid of the package accessing app op |
| 9735 | optional int32 uid = 1 [(is_uid) = true]; |
| 9736 | |
| 9737 | // Name of the package accessing app op |
| 9738 | optional string package_name = 2; |
| 9739 | |
Stanislav Zholnin | 3a2a6e4 | 2020-03-30 10:44:51 +0100 | [diff] [blame] | 9740 | // deprecated - set to empty string |
| 9741 | optional string op_deprecated = 3 [deprecated = true]; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9742 | |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 9743 | // 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] | 9744 | // API. Attributions must be provided through manifest using <attribution> tag available in R |
| 9745 | // and above. |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 9746 | optional string attribution_tag = 4; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9747 | |
| 9748 | // message related to app op access, limited to 600 chars by API |
| 9749 | optional string message = 5; |
| 9750 | |
| 9751 | enum SamplingStrategy { |
| 9752 | DEFAULT = 0; |
| 9753 | UNIFORM = 1; |
| 9754 | RARELY_USED = 2; |
Stanislav Zholnin | 4c32385 | 2020-03-04 18:03:24 +0000 | [diff] [blame] | 9755 | BOOT_TIME_SAMPLING = 3; |
Stanislav Zholnin | cb726cb | 2020-06-03 15:27:35 +0100 | [diff] [blame] | 9756 | UNIFORM_OPS = 4; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9757 | } |
| 9758 | |
| 9759 | // sampling strategy used to collect this message |
| 9760 | optional SamplingStrategy sampling_strategy = 6; |
Stanislav Zholnin | 3a2a6e4 | 2020-03-30 10:44:51 +0100 | [diff] [blame] | 9761 | |
| 9762 | // operation id |
| 9763 | optional android.app.AppOpEnum op = 7 [default = APP_OP_NONE]; |
Tianjie Xu | 5d8df1f | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9764 | } |
Nikita Ioffe | 6b24739 | 2020-01-10 16:05:08 +0000 | [diff] [blame] | 9765 | |
| 9766 | /* |
| 9767 | * Logs userspace reboot outcome and duration. |
| 9768 | * |
| 9769 | * Logged from: |
| 9770 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 9771 | */ |
| 9772 | message UserspaceRebootReported { |
| 9773 | // Possible outcomes of userspace reboot. |
| 9774 | enum Outcome { |
| 9775 | // Default value in case platform failed to determine the outcome. |
| 9776 | OUTCOME_UNKNOWN = 0; |
| 9777 | // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot). |
| 9778 | SUCCESS = 1; |
| 9779 | // Userspace reboot shutdown sequence was aborted. |
| 9780 | FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2; |
| 9781 | // Remounting userdata into checkpointing mode failed. |
| 9782 | FAILED_USERDATA_REMOUNT = 3; |
| 9783 | // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard |
| 9784 | // reboot. |
| 9785 | FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4; |
| 9786 | } |
| 9787 | // Outcome of userspace reboot. Always set. |
| 9788 | optional Outcome outcome = 1; |
| 9789 | // Duration of userspace reboot in case it has a successful outcome. |
| 9790 | // Duration is measured as time between userspace reboot was initiated and until boot completed |
| 9791 | // (e.g. sys.boot_completed=1). |
| 9792 | optional int64 duration_millis = 2; |
| 9793 | // State of primary user's (user0) credential encryption storage. |
| 9794 | enum UserEncryptionState { |
| 9795 | // Default value. |
| 9796 | USER_ENCRYPTION_STATE_UNKNOWN = 0; |
| 9797 | // Credential encrypted storage is unlocked. |
| 9798 | UNLOCKED = 1; |
| 9799 | // Credential encrypted storage is locked. |
| 9800 | LOCKED = 2; |
| 9801 | } |
| 9802 | // State of primary user's encryption storage at the moment boot completed. Always set. |
| 9803 | optional UserEncryptionState user_encryption_state = 3; |
| 9804 | } |
Chi Zhang | f730a2a | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 9805 | |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 9806 | /* |
| 9807 | * Logs integrity check information during each install. |
| 9808 | * |
| 9809 | * Logged from: |
| 9810 | * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java |
| 9811 | */ |
| 9812 | message IntegrityCheckResultReported { |
| 9813 | optional string package_name = 1; |
| 9814 | optional string app_certificate_hash = 2; |
Omer Nebil Yaveroglu | 0ade854 | 2020-01-24 12:47:46 +0000 | [diff] [blame] | 9815 | optional int64 version_code = 3; |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 9816 | optional string installer_package_name = 4; |
| 9817 | enum Response { |
| 9818 | UNKNOWN = 0; |
| 9819 | ALLOWED = 1; |
| 9820 | REJECTED = 2; |
| 9821 | FORCE_ALLOWED = 3; |
| 9822 | } |
| 9823 | optional Response response = 5; |
| 9824 | // An estimate on the cause of the response. This will only be populated for |
| 9825 | // REJECTED and FORCE_ALLOWED |
| 9826 | optional bool caused_by_app_cert_rule = 6; |
| 9827 | optional bool caused_by_installer_rule = 7; |
| 9828 | } |
| 9829 | |
| 9830 | /** |
| 9831 | * Logs the information about the rules and the provider whenever rules are |
| 9832 | * pushed into AppIntegrityManager. |
| 9833 | * |
| 9834 | * Logged from: |
| 9835 | * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java |
| 9836 | */ |
| 9837 | message IntegrityRulesPushed { |
| 9838 | optional bool success = 1; |
| 9839 | // Package name of the app that pushed the rules. |
| 9840 | optional string rule_provider = 2; |
| 9841 | // Version string of arbitrary format provided by the rule provider to |
| 9842 | // identify the rules. |
| 9843 | optional string rule_version = 3; |
| 9844 | } |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9845 | |
| 9846 | /** |
| 9847 | * Logs when a cell broadcast message is received on the device. |
| 9848 | * |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 9849 | * Logged from Cell Broadcast module and platform: |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9850 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 9851 | * packages/apps/CellBroadcastReceiver/ |
| 9852 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/CellBroadcastServiceManager.java |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9853 | */ |
| 9854 | message CellBroadcastMessageReported { |
| 9855 | // The type of Cell Broadcast message |
| 9856 | enum CbType { |
| 9857 | UNKNOWN_TYPE = 0; |
| 9858 | GSM = 1; |
| 9859 | CDMA = 2; |
| 9860 | CDMA_SPC = 3; |
| 9861 | } |
| 9862 | |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 9863 | // The parts of the cell broadcast message pipeline |
| 9864 | enum ReportSource { |
| 9865 | UNKNOWN_SOURCE = 0; |
| 9866 | FRAMEWORK = 1; |
| 9867 | CB_SERVICE = 2; |
| 9868 | CB_RECEIVER_APP = 3; |
| 9869 | } |
| 9870 | |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9871 | // GSM, CDMA, CDMA-SCP |
| 9872 | optional CbType type = 1; |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 9873 | |
| 9874 | // The source of the report |
| 9875 | optional ReportSource source = 2; |
| 9876 | } |
| 9877 | |
| 9878 | /** |
| 9879 | * Logs when a cell broadcast message is filtered out, or otherwise intentionally not sent to CBR. |
| 9880 | * |
| 9881 | * Logged from CellBroadcastService module: |
| 9882 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
| 9883 | */ |
| 9884 | message CellBroadcastMessageFiltered { |
| 9885 | enum FilterReason { |
| 9886 | NOT_FILTERED = 0; |
| 9887 | DUPLICATE_MESSAGE = 1; |
| 9888 | GEOFENCED_MESSAGE = 2; |
| 9889 | AREA_INFO_MESSAGE = 3; |
| 9890 | } |
| 9891 | |
| 9892 | // GSM, CDMA, CDMA-SCP |
| 9893 | optional CellBroadcastMessageReported.CbType type = 1; |
| 9894 | |
| 9895 | // The source of the report |
| 9896 | optional FilterReason filter = 2; |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9897 | } |
| 9898 | |
| 9899 | /** |
| 9900 | * Logs when an error occurs while handling a cell broadcast message; |
| 9901 | * |
| 9902 | * Logged from CellBroadcastService module: |
| 9903 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
| 9904 | */ |
| 9905 | message CellBroadcastMessageError { |
| 9906 | // The type of error raised when trying to handle a cell broadcast message |
| 9907 | enum ErrorType { |
| 9908 | UNKNOWN_TYPE = 0; |
| 9909 | CDMA_DECODING_ERROR = 1; |
| 9910 | CDMA_SCP_EMPTY = 2; |
| 9911 | CDMA_SCP_HANDLING_ERROR = 3; |
| 9912 | GSM_INVALID_HEADER_LENGTH = 4; |
| 9913 | GSM_UNSUPPORTED_HEADER_MESSAGE_TYPE = 5; |
| 9914 | GSM_UNSUPPORTED_HEADER_DATA_CODING_SCHEME = 6; |
| 9915 | GSM_INVALID_PDU = 7; |
| 9916 | GSM_INVALID_GEO_FENCING_DATA = 8; |
| 9917 | GSM_UMTS_INVALID_WAC = 9; |
| 9918 | FAILED_TO_INSERT_TO_DB = 10; |
| 9919 | UNEXPECTED_GEOMETRY_FROM_FWK = 11; |
| 9920 | UNEXPECTED_GSM_MESSAGE_TYPE_FROM_FWK = 12; |
| 9921 | UNEXPECTED_CDMA_MESSAGE_TYPE_FROM_FWK = 13; |
| 9922 | UNEXPECTED_CDMA_SCP_MESSAGE_TYPE_FROM_FWK = 14; |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 9923 | NO_CONNECTION_TO_CB_SERVICE = 15; |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9924 | } |
| 9925 | |
| 9926 | // What kind of error occurred |
| 9927 | optional ErrorType type = 1; |
| 9928 | |
| 9929 | // Exception message (or log message) associated with the error (max 1000 chars) |
| 9930 | optional string exception_message = 2; |
| 9931 | } |
Anton Hansson | 5a48e4b | 2020-02-06 14:50:35 +0000 | [diff] [blame] | 9932 | |
| 9933 | /** |
Henry Fang | e316ab6 | 2020-04-21 18:43:14 -0700 | [diff] [blame] | 9934 | * Logs when a tune occurs through device's Frontend. |
| 9935 | * This is atom ID 276. |
| 9936 | * |
| 9937 | * Logged from: |
| 9938 | * frameworks/base/media/java/android/media/tv/tuner/Tuner.java |
| 9939 | */ |
| 9940 | message TvTunerStateChanged { |
| 9941 | enum State { |
| 9942 | UNKNOWN = 0; |
| 9943 | TUNING = 1; // Signal is tuned |
| 9944 | LOCKED = 2; // the signal is locked |
| 9945 | NOT_LOCKED = 3; // the signal isn’t locked. |
| 9946 | SIGNAL_LOST = 4; // the signal was locked, but is lost now. |
| 9947 | SCANNING = 5; // the signal is scanned |
| 9948 | SCAN_STOPPED = 6; // the scan is stopped. |
| 9949 | } |
| 9950 | // The uid of the application that sent this custom atom. |
| 9951 | optional int32 uid = 1 [(is_uid) = true]; |
| 9952 | // new state |
| 9953 | optional State state = 2; |
| 9954 | } |
Henry Fang | 1ae85bb | 2020-05-28 18:07:03 -0700 | [diff] [blame] | 9955 | |
| 9956 | /** |
| 9957 | * Logs the status of a dvr playback or record. |
| 9958 | * This is atom ID 279. |
| 9959 | * |
| 9960 | * Logged from: |
| 9961 | * frameworks/base/media/java/android/media/tv/tuner/dvr |
| 9962 | */ |
| 9963 | message TvTunerDvrStatus { |
| 9964 | enum Type { |
| 9965 | UNKNOWN_TYPE = 0; |
| 9966 | PLAYBACK = 1; // is a playback |
| 9967 | RECORD = 2; // is a record |
| 9968 | } |
| 9969 | enum State { |
| 9970 | UNKNOWN_STATE = 0; |
| 9971 | STARTED = 1; // DVR is started |
| 9972 | STOPPED = 2; // DVR is stopped |
| 9973 | } |
| 9974 | // The uid of the application that sent this custom atom. |
| 9975 | optional int32 uid = 1 [(is_uid) = true]; |
| 9976 | // DVR type |
| 9977 | optional Type type = 2; |
| 9978 | // DVR state |
| 9979 | optional State state = 3; |
| 9980 | // Identify the segment of a record or playback |
| 9981 | optional int32 segment_id = 4; |
| 9982 | // indicate how many overflow or underflow happened between started to stopped |
| 9983 | optional int32 overflow_underflow_count = 5; |
| 9984 | } |
Henry Fang | fd40c07 | 2020-06-01 14:59:17 -0700 | [diff] [blame] | 9985 | |
| 9986 | /** |
| 9987 | * Logs when a cas session opened through MediaCas. |
| 9988 | * This is atom ID 280. |
| 9989 | * |
| 9990 | * Logged from: |
| 9991 | * frameworks/base/media/java/android/media/MediaCas.java |
| 9992 | */ |
| 9993 | message TvCasSessionOpenStatus { |
| 9994 | enum State { |
| 9995 | UNKNOWN = 0; |
| 9996 | SUCCEEDED = 1; // indicate that the session is opened successfully. |
| 9997 | FAILED = 2; // indicate that the session isn’t opened successfully. |
| 9998 | } |
| 9999 | // The uid of the application that sent this custom atom. |
| 10000 | optional int32 uid = 1 [(is_uid) = true]; |
| 10001 | // Cas system Id |
| 10002 | optional int32 cas_system_id = 2; |
| 10003 | // State of the session |
| 10004 | optional State state = 3; |
| 10005 | } |
| 10006 | |
Henry Fang | e316ab6 | 2020-04-21 18:43:14 -0700 | [diff] [blame] | 10007 | /** |
Tingting Wang | b4ecadb | 2020-04-27 15:34:45 +0000 | [diff] [blame] | 10008 | * Logs for ContactsProvider general usage. |
| 10009 | * This is atom ID 301. |
| 10010 | * |
| 10011 | * Logged from: |
| 10012 | * packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsProvider2.java |
| 10013 | */ |
| 10014 | message ContactsProviderStatusReported { |
| 10015 | enum ApiType { |
| 10016 | UNKNOWN_API = 0; |
| 10017 | QUERY = 1; |
| 10018 | // INSERT includes insert and bulkInsert, and inserts triggered by applyBatch. |
| 10019 | INSERT = 2; |
| 10020 | // UPDATE and DELETE includes update/delete and the ones triggered by applyBatch. |
| 10021 | UPDATE = 3; |
| 10022 | DELETE = 4; |
| 10023 | } |
| 10024 | |
| 10025 | enum ResultType { |
| 10026 | UNKNOWN_RESULT = 0; |
| 10027 | SUCCESS = 1; |
| 10028 | FAIL = 2; |
| 10029 | ILLEGAL_ARGUMENT = 3; |
| 10030 | UNSUPPORTED_OPERATION = 4; |
| 10031 | } |
| 10032 | |
| 10033 | enum CallerType { |
| 10034 | UNSPECIFIED_CALLER_TYPE = 0; |
| 10035 | CALLER_IS_SYNC_ADAPTER = 1; |
| 10036 | CALLER_IS_NOT_SYNC_ADAPTER = 2; |
| 10037 | } |
| 10038 | |
| 10039 | optional ApiType api_type = 1; |
| 10040 | // Defined in |
| 10041 | // packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsProvider2.java |
| 10042 | optional int32 uri_type = 2; |
| 10043 | optional CallerType caller_type = 3; |
| 10044 | optional ResultType result_type = 4; |
| 10045 | optional int32 result_count = 5; |
| 10046 | optional int64 latency_micros = 6; |
| 10047 | } |
| 10048 | |
| 10049 | /** |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 10050 | * Logs when an app is frozen or unfrozen. |
| 10051 | * |
| 10052 | * Logged from: |
| 10053 | * frameworks/base/services/core/java/com/android/server/am/CachedAppOptimizer.java |
| 10054 | */ |
| 10055 | message AppFreezeChanged { |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10056 | // The type of event. |
| 10057 | enum Action { |
| 10058 | UNKNOWN = 0; |
| 10059 | FREEZE_APP = 1; |
| 10060 | UNFREEZE_APP = 2; |
| 10061 | } |
| 10062 | optional Action action = 1; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 10063 | |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10064 | // Pid of the process being frozen. |
| 10065 | optional int32 pid = 2; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 10066 | |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10067 | // Name of the process being frozen. |
| 10068 | optional string process_name = 3; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 10069 | |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10070 | // Time since last unfrozen. |
| 10071 | optional int64 time_unfrozen_millis = 4; |
| 10072 | } |
| 10073 | |
Chi Zhang | f730a2a | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 10074 | /** |
| 10075 | * Pulls information for a single voice call. |
| 10076 | * |
| 10077 | * Each pull creates multiple atoms, one for each call. The sequence is randomized when pulled. |
| 10078 | * |
| 10079 | * Pulled from: |
| 10080 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
| 10081 | */ |
| 10082 | message VoiceCallSession { |
| 10083 | // Bearer (IMS or CS) when the call started. |
| 10084 | optional android.telephony.CallBearerEnum bearer_at_start = 1; |
| 10085 | |
| 10086 | // Bearer (IMS or CS) when the call ended. |
| 10087 | // The bearer may change during the call, e.g. due to SRVCC. |
| 10088 | optional android.telephony.CallBearerEnum bearer_at_end = 2; |
| 10089 | |
| 10090 | // Direction of the call (incoming or outgoing). |
| 10091 | optional android.telephony.CallDirectionEnum direction = 3; |
| 10092 | |
| 10093 | // Time spent setting up the call. |
| 10094 | optional android.telephony.CallSetupDurationEnum setup_duration = 4; |
| 10095 | |
| 10096 | // Whether the call ended before the setup was completed. |
| 10097 | optional bool setup_failed = 5; |
| 10098 | |
| 10099 | // IMS reason code or CS disconnect cause. |
| 10100 | // For IMS, see: frameworks/base/telephony/java/android/telephony/ims/ImsReasonInfo.java |
| 10101 | // For CS, see: frameworks/base/telephony/java/android/telephony/DisconnectCause.java |
| 10102 | optional int32 disconnect_reason_code = 6; |
| 10103 | |
| 10104 | // IMS extra code or CS precise disconnect cause. |
| 10105 | // For IMS, this code is vendor-specific |
| 10106 | // For CS, see: frameworks/base/telephony/java/android/telephony/PreciseDisconnectCause.java |
| 10107 | optional int32 disconnect_extra_code = 7; |
| 10108 | |
| 10109 | // IMS extra message or CS vendor cause. |
| 10110 | optional string disconnect_extra_message = 8; |
| 10111 | |
| 10112 | // Radio access technology (RAT) used when call started. |
| 10113 | optional android.telephony.NetworkTypeEnum rat_at_start = 9; |
| 10114 | |
| 10115 | // Radio access technology (RAT) used when call terminated. |
| 10116 | optional android.telephony.NetworkTypeEnum rat_at_end = 10; |
| 10117 | |
| 10118 | // Number of times RAT changed during the call. |
| 10119 | optional int64 rat_switch_count = 11; |
| 10120 | |
| 10121 | // A bitmask of all codecs used during the call. |
| 10122 | // See: frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/VoiceCallSessionStats.java |
| 10123 | optional int64 codec_bitmask = 12; |
| 10124 | |
| 10125 | // Number of other calls going on during call setup, for the same SIM slot. |
| 10126 | optional int32 concurrent_call_count_at_start = 13; |
| 10127 | |
| 10128 | // Number of other calls going on during call termination, for the same SIM slot. |
| 10129 | optional int32 concurrent_call_count_at_end = 14; |
| 10130 | |
| 10131 | // Index of the SIM is used, 0 for single-SIM devices. |
| 10132 | optional int32 sim_slot_index = 15; |
| 10133 | |
| 10134 | // Whether the device was in multi-SIM mode (with multiple active SIM profiles). |
| 10135 | optional bool is_multi_sim = 16; |
| 10136 | |
| 10137 | // Whether the call was made with an eSIM profile. |
| 10138 | optional bool is_esim = 17; |
| 10139 | |
| 10140 | // Carrier ID of the SIM card. |
| 10141 | // See https://source.android.com/devices/tech/config/carrierid. |
| 10142 | optional int32 carrier_id = 18; |
| 10143 | |
| 10144 | // Whether an SRVCC has been completed successfully for this call. |
| 10145 | optional bool srvcc_completed = 19; |
| 10146 | |
| 10147 | // Number of SRVCC failures. |
| 10148 | optional int64 srvcc_failure_count = 20; |
| 10149 | |
| 10150 | // Number of SRVCC cancellations. |
| 10151 | optional int64 srvcc_cancellation_count = 21; |
| 10152 | |
| 10153 | // Whether the Real-Time Text (RTT) was ever used in the call (rather than whether RTT was |
| 10154 | // enabled in the dialer's settings). |
| 10155 | optional bool rtt_enabled = 22; |
| 10156 | |
| 10157 | // Whether this was an emergency call. |
| 10158 | optional bool is_emergency = 23; |
| 10159 | |
| 10160 | // Whether the call was performed while roaming. |
| 10161 | optional bool is_roaming = 24; |
| 10162 | |
| 10163 | // A random number used as the dimension field to pull multiple atoms. |
| 10164 | optional int32 dimension = 25; |
| 10165 | } |
| 10166 | |
| 10167 | /** |
| 10168 | * Pulls voice call radio access technology (RAT) usage. |
| 10169 | * |
| 10170 | * Each pull creates multiple atoms, one for each carrier/RAT, the order of which is irrelevant to |
| 10171 | * time. The atom will be skipped if not enough data is available. |
| 10172 | * |
| 10173 | * Pulled from: |
| 10174 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
| 10175 | */ |
| 10176 | message VoiceCallRatUsage { |
| 10177 | // Carrier ID (https://source.android.com/devices/tech/config/carrierid). |
| 10178 | optional int32 carrier_id = 1; |
| 10179 | |
| 10180 | // Radio access technology. |
| 10181 | optional android.telephony.NetworkTypeEnum rat = 2; |
| 10182 | |
| 10183 | // Total duration that voice calls spent on this carrier and RAT. |
| 10184 | optional int64 total_duration_seconds = 3; |
| 10185 | |
| 10186 | // Total number of calls using this carrier and RAT. |
| 10187 | // A call is counted once even if it used the RAT multiple times. |
| 10188 | optional int64 call_count = 4; |
| 10189 | } |
| 10190 | |
| 10191 | /** |
| 10192 | * Pulls the number of active SIM slots and SIMs/eSIM profiles. |
| 10193 | * |
| 10194 | * Pulled from: |
| 10195 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
| 10196 | */ |
| 10197 | message SimSlotState { |
| 10198 | // Number of active SIM slots (both physical and eSIM profiles) in the device. |
| 10199 | optional int32 active_slot_count = 1; |
| 10200 | |
| 10201 | // Number of SIM cards (both physical and active eSIM profiles). |
| 10202 | // This number is always equal to or less than the number of active SIM slots. |
| 10203 | optional int32 sim_count = 2; |
| 10204 | |
| 10205 | // Number of active eSIM profiles. |
| 10206 | // This number is always equal to or less than the number of SIMs. |
| 10207 | optional int32 esim_count = 3; |
| 10208 | } |
| 10209 | |
| 10210 | /** |
| 10211 | * Pulls supported cellular radio access technologies. |
| 10212 | * |
| 10213 | * This atom reports the capabilities of the device, rather than the network it has access to. |
| 10214 | * |
| 10215 | * Pulled from: |
| 10216 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
| 10217 | */ |
| 10218 | message SupportedRadioAccessFamily { |
| 10219 | // A bitmask of supported radio technologies. |
| 10220 | // See android.telephony.TelephonyManager.NetworkTypeBitMask. |
| 10221 | optional int64 network_type_bitmask = 1; |
| 10222 | } |
Hasini Gunasinghe | 68d7e94 | 2020-05-21 16:17:30 +0000 | [diff] [blame] | 10223 | |
| 10224 | /** |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10225 | * Logs gnss stats from location service provider |
| 10226 | * |
| 10227 | * Pulled from: |
| 10228 | * frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 10229 | */ |
| 10230 | |
| 10231 | message GnssStats { |
| 10232 | // Number of location reports since boot |
| 10233 | optional int64 location_reports = 1; |
| 10234 | |
| 10235 | // Total pulled reports of Location failures since boot |
| 10236 | optional int64 location_failure_reports = 2; |
| 10237 | |
| 10238 | // Number of time to first fix reports since boot |
| 10239 | optional int64 time_to_first_fix_reports = 3; |
| 10240 | |
| 10241 | // Total pulled reported time to first fix (in milli-seconds) since boot |
Blake Kragten | 850a9d43 | 2020-06-11 09:05:39 -0700 | [diff] [blame] | 10242 | optional int64 time_to_first_fix_millis = 4; |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10243 | |
| 10244 | // Number of position accuracy reports since boot |
| 10245 | optional int64 position_accuracy_reports = 5; |
| 10246 | |
| 10247 | // Total pulled reported position accuracy (in meters) since boot |
| 10248 | optional int64 position_accuracy_meters = 6; |
| 10249 | |
| 10250 | // Number of top 4 average CN0 reports since boot |
| 10251 | optional int64 top_four_average_cn0_reports = 7; |
| 10252 | |
| 10253 | // Total pulled reported of top 4 average CN0 (dB-mHz) since boot |
| 10254 | optional int64 top_four_average_cn0_db_mhz = 8; |
| 10255 | |
| 10256 | // Number of l5 top 4 average CN0 reports since boot |
| 10257 | optional int64 l5_top_four_average_cn0_reports = 9; |
| 10258 | |
| 10259 | // Total pulled reported of l5 top 4 average CN0 (dB-mHz) since boot |
| 10260 | optional int64 l5_top_four_average_cn0_db_mhz = 10; |
| 10261 | |
| 10262 | // Total number of sv status messages reports since boot |
| 10263 | optional int64 sv_status_reports = 11; |
| 10264 | |
| 10265 | // Total number of sv status messages reports, where sv is used in fix since boot |
| 10266 | optional int64 sv_status_reports_used_in_fix = 12; |
| 10267 | |
| 10268 | // Total number of L5 sv status messages reports since boot |
| 10269 | optional int64 l5_sv_status_reports = 13; |
| 10270 | |
| 10271 | // Total number of L5 sv status messages reports, where sv is used in fix since boot |
| 10272 | optional int64 l5_sv_status_reports_used_in_fix = 14; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 10273 | } |
Kweku Adams | 1275213 | 2020-02-18 15:36:48 -0800 | [diff] [blame] | 10274 | |
| 10275 | /** |
| 10276 | * Logs when an app is moved to a different standby bucket. |
| 10277 | * |
| 10278 | * Logged from: |
| 10279 | * frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/AppIdleHistory.java |
| 10280 | */ |
| 10281 | message AppStandbyBucketChanged { |
| 10282 | optional string package_name = 1; |
| 10283 | |
| 10284 | // Should be 0, 10, 11, 12, etc. where 0 is the owner. See UserHandle for more documentation. |
| 10285 | optional int32 user_id = 2; |
| 10286 | |
| 10287 | // These enum values match the constants defined in UsageStatsManager.java. |
| 10288 | enum Bucket { |
| 10289 | BUCKET_UNKNOWN = 0; |
| 10290 | BUCKET_EXEMPTED = 5; |
| 10291 | BUCKET_ACTIVE = 10; |
| 10292 | BUCKET_WORKING_SET = 20; |
| 10293 | BUCKET_FREQUENT = 30; |
| 10294 | BUCKET_RARE = 40; |
| 10295 | BUCKET_RESTRICTED = 45; |
| 10296 | BUCKET_NEVER = 50; |
| 10297 | } |
| 10298 | optional Bucket bucket = 3; |
| 10299 | |
| 10300 | enum MainReason { |
| 10301 | MAIN_UNKNOWN = 0; |
| 10302 | MAIN_DEFAULT = 0x0100; |
| 10303 | MAIN_TIMEOUT = 0x0200; |
| 10304 | MAIN_USAGE = 0x0300; |
| 10305 | MAIN_FORCED_BY_USER = 0x0400; |
| 10306 | MAIN_PREDICTED = 0x0500; |
| 10307 | MAIN_FORCED_BY_SYSTEM = 0x0600; |
| 10308 | } |
| 10309 | optional MainReason main_reason = 4; |
| 10310 | |
| 10311 | // A more detailed reason for the standby bucket change. The sub reason name is dependent on |
| 10312 | // the main reason. Values are one of the REASON_SUB_XXX constants defined in |
| 10313 | // UsageStatsManager.java. |
| 10314 | optional int32 sub_reason = 5; |
| 10315 | } |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 10316 | |
| 10317 | /** |
| 10318 | * Reports a started sharesheet transaction. |
| 10319 | * |
| 10320 | * Logged from: |
| 10321 | * frameworks/base/core/java/com/android/internal/app/ChooserActivity.java |
| 10322 | */ |
| 10323 | message SharesheetStarted { |
| 10324 | // The event_id (as for UiEventReported). |
| 10325 | optional int32 event_id = 1; |
| 10326 | // The calling app's package name. |
| 10327 | optional string package_name = 2; |
| 10328 | // An identifier to tie together multiple logs relating to the same share event |
| 10329 | optional int32 instance_id = 3; |
| 10330 | // The mime type of the share |
| 10331 | optional string mime_type = 4; |
| 10332 | // The number of direct targets the calling app is providing that will be shown. |
| 10333 | optional int32 num_app_provided_direct_targets = 5; |
| 10334 | // The number of app targets the calling app is providing that will be shown. |
| 10335 | optional int32 num_app_provided_app_targets = 6; |
| 10336 | // True if the share originates from the workprofile |
| 10337 | optional bool is_workprofile = 7; |
| 10338 | |
| 10339 | enum SharesheetPreviewType { // Constants from ChooserActivity.java |
Susi Kharraz-Post | 3ddadd8 | 2020-04-13 08:09:15 -0400 | [diff] [blame] | 10340 | CONTENT_PREVIEW_TYPE_UNKNOWN = 0; // Default for proto 2 / 3 compatibility. |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 10341 | CONTENT_PREVIEW_IMAGE = 1; // The preview shown in the sharesheet is an image. |
| 10342 | CONTENT_PREVIEW_FILE = 2; // The preview shown in the sharesheet is a file. |
| 10343 | CONTENT_PREVIEW_TEXT = 3; // The preview shown in the sharesheet is text. |
| 10344 | } |
| 10345 | // How the sharesheet preview is presented. |
Susi Kharraz-Post | 3ddadd8 | 2020-04-13 08:09:15 -0400 | [diff] [blame] | 10346 | optional SharesheetPreviewType preview_type = 8; |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 10347 | |
| 10348 | enum ResolverActivityIntent { // Intents handled by ResolverActivity.java |
| 10349 | INTENT_DEFAULT = 0; |
| 10350 | INTENT_ACTION_VIEW = 1; |
| 10351 | INTENT_ACTION_EDIT = 2; |
| 10352 | INTENT_ACTION_SEND = 3; |
| 10353 | INTENT_ACTION_SENDTO = 4; |
| 10354 | INTENT_ACTION_SEND_MULTIPLE = 5; |
| 10355 | INTENT_ACTION_IMAGE_CAPTURE = 6; |
| 10356 | INTENT_ACTION_MAIN = 7; |
| 10357 | } |
| 10358 | // 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] | 10359 | optional ResolverActivityIntent intent_type = 9; |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 10360 | } |
| 10361 | |
| 10362 | /** |
| 10363 | * Reports a ranking selection event. |
| 10364 | * |
| 10365 | * Logged from: |
| 10366 | * frameworks/base/core/java/com/android/internal/app/ChooserActivity.java (sharesheet) |
| 10367 | */ |
| 10368 | message RankingSelected { |
| 10369 | // The event_id (as for UiEventReported). |
| 10370 | optional int32 event_id = 1; |
| 10371 | // The relevant app's package name (can be source or picked package). |
| 10372 | optional string package_name = 2; |
| 10373 | // An identifier to tie together multiple logs relating to the same share event. |
| 10374 | optional int32 instance_id = 3; |
| 10375 | // Which of the ranked targets got picked, default starting position 0. |
| 10376 | optional int32 position_picked = 4; |
| 10377 | } |
Raff Tsai | ea4db18 | 2020-03-06 07:45:43 +0800 | [diff] [blame] | 10378 | |
| 10379 | /** |
Zhen Sun | 0bec8d4 | 2020-03-25 17:17:29 -0700 | [diff] [blame] | 10380 | * Logs when TvSettings UI is interacted at. |
| 10381 | * |
| 10382 | * Logged from: packages/apps/TvSettings |
| 10383 | */ |
| 10384 | message TvSettingsUIInteracted { |
| 10385 | |
| 10386 | /** The UI action category */ |
| 10387 | optional android.app.tvsettings.Action action = 1; |
| 10388 | |
| 10389 | /** The ID of the entry that the users actioned on */ |
| 10390 | optional android.app.tvsettings.ItemId item_id = 2; |
Zhen Sun | 0bec8d4 | 2020-03-25 17:17:29 -0700 | [diff] [blame] | 10391 | } |
| 10392 | |
| 10393 | /** |
Songchun Fan | c296cf7 | 2020-03-31 18:38:52 -0700 | [diff] [blame] | 10394 | * Logs information about a package installation using package installer V2 APIs. |
| 10395 | * |
| 10396 | * Logged from: |
| 10397 | * frameworks/base/services/core/java/com/android/server/pm/PackageInstallerSession.java |
| 10398 | */ |
| 10399 | message PackageInstallerV2Reported { |
| 10400 | // Whether this installation uses Incremental File System |
| 10401 | optional bool is_incremental = 1; |
| 10402 | // Name of the package that is intended to be installed |
| 10403 | optional string package_name = 2; |
| 10404 | // The duration between when the install was requested to when the install has completed |
| 10405 | optional int64 duration_millis = 3; |
| 10406 | // Installation result in final integer, which are SystemApi's. |
| 10407 | // Return_code 1 indicates success. |
| 10408 | // For full list, see frameworks/base/core/java/android/content/pm/PackageManager.java |
| 10409 | optional int32 return_code = 4; |
Songchun Fan | aff0dce | 2020-04-29 15:23:40 -0700 | [diff] [blame] | 10410 | // Total size of the APKs installed for this package |
| 10411 | optional int64 apks_size_bytes = 5; |
Songchun Fan | c296cf7 | 2020-03-31 18:38:52 -0700 | [diff] [blame] | 10412 | } |
| 10413 | |
| 10414 | /** |
Raff Tsai | ea4db18 | 2020-03-06 07:45:43 +0800 | [diff] [blame] | 10415 | * Logs settings provider values. |
| 10416 | * |
| 10417 | * Use DeviceConfig.getProperties to get a list Setting key, query the data from content provider, |
| 10418 | * then write the value to proto. |
| 10419 | * |
| 10420 | */ |
| 10421 | message SettingSnapshot { |
| 10422 | |
| 10423 | // Setting key |
| 10424 | optional string name = 1; |
| 10425 | |
| 10426 | enum SettingsValueType { |
| 10427 | NOTASSIGNED = 0; |
| 10428 | ASSIGNED_BOOL_TYPE = 1; |
| 10429 | ASSIGNED_INT_TYPE = 2; |
| 10430 | ASSIGNED_FLOAT_TYPE = 3; |
| 10431 | ASSIGNED_STRING_TYPE = 4; |
| 10432 | }; |
| 10433 | // Setting value type |
| 10434 | optional SettingsValueType type = 2; |
| 10435 | |
| 10436 | optional bool bool_value = 3; |
| 10437 | |
| 10438 | optional int32 int_value = 4; |
| 10439 | |
| 10440 | optional float float_value = 5; |
| 10441 | |
| 10442 | optional string str_value = 6; |
| 10443 | |
| 10444 | // Android user index. 0 for primary user, 10, 11 for secondary or profile user |
| 10445 | optional int32 user_id = 7; |
| 10446 | } |
Varun Shah | acb5634 | 2019-12-18 11:45:38 -0800 | [diff] [blame] | 10447 | |
| 10448 | /** |
| 10449 | * An event logged to indicate that a user journey is about to be performed. This atom includes |
| 10450 | * relevant information about the users involved in the journey. A UserLifecycleEventOccurred event |
| 10451 | * will immediately follow this atom which will describe the event(s) and its state. |
| 10452 | * |
| 10453 | * Logged from: |
| 10454 | * frameworks/base/services/core/java/com/android/server/am/UserController.java |
| 10455 | * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java |
| 10456 | */ |
| 10457 | message UserLifecycleJourneyReported { |
| 10458 | // An identifier to track a chain of user lifecycle events occurring (referenced in the |
| 10459 | // UserLifecycleEventOccurred atom) |
| 10460 | optional int64 session_id = 1; |
| 10461 | |
| 10462 | // Indicates what type of user journey this session is related to |
| 10463 | enum Journey { |
| 10464 | UNKNOWN = 0; // Undefined user lifecycle journey |
| 10465 | USER_SWITCH_UI = 1; // A user switch journey where a UI is shown |
| 10466 | USER_SWITCH_FG = 2; // A user switch journey without a UI shown |
| 10467 | USER_START = 3; // A user start journey |
| 10468 | USER_CREATE = 4; // A user creation journey |
| 10469 | } |
| 10470 | optional Journey journey = 2; |
| 10471 | // Which user the journey is originating from - could be -1 for certain phases (eg USER_CREATE) |
| 10472 | // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest) |
| 10473 | optional int32 origin_user = 3; |
| 10474 | // Which user the journey is targeting |
| 10475 | // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest) |
| 10476 | optional int32 target_user = 4; |
| 10477 | |
| 10478 | // What is the user type of the target user |
| 10479 | // These should be in sync with USER_TYPE_* flags defined in UserManager.java |
| 10480 | enum UserType { |
| 10481 | TYPE_UNKNOWN = 0; |
| 10482 | FULL_SYSTEM = 1; |
| 10483 | FULL_SECONDARY = 2; |
| 10484 | FULL_GUEST = 3; |
| 10485 | FULL_DEMO = 4; |
| 10486 | FULL_RESTRICTED = 5; |
| 10487 | PROFILE_MANAGED = 6; |
| 10488 | SYSTEM_HEADLESS = 7; |
| 10489 | } |
| 10490 | optional UserType user_type = 5; |
| 10491 | // What are the flags attached to the target user |
| 10492 | optional int32 user_flags = 6; |
| 10493 | } |
| 10494 | |
| 10495 | /** |
| 10496 | * An event logged when a specific user lifecycle event is performed. These events should be |
| 10497 | * correlated with a UserLifecycleJourneyReported atom via the session_id. |
| 10498 | * Note: journeys can span over multiple events, hence some events may share a single session id. |
| 10499 | * |
| 10500 | * Logged from: |
| 10501 | * frameworks/base/services/core/java/com/android/server/am/UserController.java |
| 10502 | * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java |
| 10503 | */ |
| 10504 | message UserLifecycleEventOccurred { |
| 10505 | // An id which links back to user details (reported in the UserLifecycleJourneyReported atom) |
| 10506 | optional int64 session_id = 1; |
| 10507 | // The target user for this event (same as target_user in the UserLifecycleJourneyReported atom) |
| 10508 | // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest) |
| 10509 | optional int32 user_id = 2; |
| 10510 | |
| 10511 | enum Event { |
| 10512 | UNKNOWN = 0; // Indicates that the associated user journey timed-out or resulted in an error |
| 10513 | SWITCH_USER = 1; // Indicates that this is a user switch event |
| 10514 | START_USER = 2; // Indicates that this is a user start event |
| 10515 | CREATE_USER = 3; // Indicates that this is a user create event |
Mayank Garg | 4f93a04 | 2020-05-12 23:05:21 -0700 | [diff] [blame] | 10516 | USER_RUNNING_LOCKED = 4; // Indicates that user is running in locked state |
| 10517 | UNLOCKING_USER = 5; // Indicates that this is a user unlocking event |
| 10518 | UNLOCKED_USER = 6; // Indicates that this is a user unlocked event |
Varun Shah | acb5634 | 2019-12-18 11:45:38 -0800 | [diff] [blame] | 10519 | } |
| 10520 | optional Event event = 3; |
| 10521 | |
| 10522 | enum State { |
| 10523 | NONE = 0; // Indicates the associated event has no start/end defined |
| 10524 | BEGIN = 1; |
| 10525 | FINISH = 2; |
| 10526 | } |
| 10527 | optional State state = 4; // Represents the state of an event (beginning/ending) |
| 10528 | } |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 10529 | |
| 10530 | /** |
| 10531 | * Logs when accessibility shortcut clicked. |
| 10532 | * |
| 10533 | * Logged from: |
jasonwshsu | 7b1be3e | 2020-04-27 15:21:07 +0800 | [diff] [blame] | 10534 | * frameworks/base/services/accessibility/java/com/android/server/accessibility |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 10535 | */ |
| 10536 | message AccessibilityShortcutReported { |
| 10537 | // The accessibility feature(including installed a11y service, framework a11y feature, |
| 10538 | // and installed a11y activity) package name that is assigned to the accessibility shortcut. |
| 10539 | optional string package_name = 1; |
| 10540 | |
| 10541 | // The definition of the accessibility shortcut. |
| 10542 | // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. |
| 10543 | optional android.stats.accessibility.ShortcutType shortcut_type = 2; |
| 10544 | |
| 10545 | // The definition of the service status. |
| 10546 | // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. |
| 10547 | optional android.stats.accessibility.ServiceStatus service_status = 3; |
| 10548 | } |
| 10549 | |
| 10550 | /** |
| 10551 | * Logs when accessibility service status changed. |
| 10552 | * |
| 10553 | * Logged from: |
jasonwshsu | 7b1be3e | 2020-04-27 15:21:07 +0800 | [diff] [blame] | 10554 | * packages/apps/Settings/src/com/android/settings/accessibility |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 10555 | */ |
| 10556 | message AccessibilityServiceReported { |
| 10557 | // The accessibility service package name. |
| 10558 | optional string package_name = 1; |
| 10559 | |
| 10560 | // The definition of the service status. |
| 10561 | // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. |
| 10562 | optional android.stats.accessibility.ServiceStatus service_status = 2; |
| 10563 | } |
Jonathan Nguyen | 8d8ff53 | 2020-05-07 18:11:15 -0700 | [diff] [blame] | 10564 | |
Denny cy Lee | ca62fc4 | 2020-05-28 18:13:07 +0800 | [diff] [blame] | 10565 | /** |
| 10566 | * Logs when display wake up. |
| 10567 | * |
| 10568 | * Logged from: |
| 10569 | * services/core/java/com/android/server/power/Notifier.java |
| 10570 | */ |
| 10571 | |
| 10572 | message DisplayWakeReported { |
Denny cy Lee | 57b3128 | 2020-04-17 10:08:52 +0800 | [diff] [blame] | 10573 | // Wake_up_reason code |
| 10574 | // If LOWORD(wake_up_reason) = 0 |
| 10575 | // reference to HIWORD(wake_up_reason) PowerManager.WAKE_REASON_XXX |
| 10576 | // else reference wake_up_reason to |
Denny cy Lee | ca62fc4 | 2020-05-28 18:13:07 +0800 | [diff] [blame] | 10577 | // services/core/java/com/android/server/power/Notifier.java#onWakeUp |
Denny cy Lee | 57b3128 | 2020-04-17 10:08:52 +0800 | [diff] [blame] | 10578 | optional int32 wake_up_reason = 1; |
Denny cy Lee | 57b3128 | 2020-04-17 10:08:52 +0800 | [diff] [blame] | 10579 | } |
| 10580 | |
Jonathan Nguyen | 8d8ff53 | 2020-05-07 18:11:15 -0700 | [diff] [blame] | 10581 | /** |
| 10582 | * Logs app usage events. |
| 10583 | */ |
| 10584 | message AppUsageEventOccurred { |
| 10585 | optional int32 uid = 1 [(is_uid) = true]; |
| 10586 | optional string package_name = 2; |
| 10587 | optional string class_name = 3; |
| 10588 | |
| 10589 | enum EventType { |
| 10590 | NONE = 0; |
| 10591 | MOVE_TO_FOREGROUND = 1; |
| 10592 | MOVE_TO_BACKGROUND = 2; |
| 10593 | } |
| 10594 | optional EventType event_type = 4; |
| 10595 | } |
Changyeon Jo | 51ae358 | 2020-04-14 09:41:00 -0700 | [diff] [blame] | 10596 | |
| 10597 | /* |
| 10598 | * Quality metrics logged when EVS cameras are active. |
| 10599 | * |
| 10600 | * Logged from: |
| 10601 | * packages/services/Car/evs/manager/1.1/Enumerator.cpp |
| 10602 | */ |
| 10603 | message EvsUsageStatsReported { |
| 10604 | |
| 10605 | // Camera identifier to distinguish the source camera device. This is not |
| 10606 | // globally unique and therefore cannot be used to identify the user and/or |
| 10607 | // the device. |
| 10608 | optional int32 device_id = 1; |
| 10609 | |
| 10610 | // Peak number of clients during the service |
| 10611 | optional int32 peak_num_clients = 2; |
| 10612 | |
| 10613 | // Number of erroneous events during the service |
| 10614 | optional int32 num_errors = 3; |
| 10615 | |
| 10616 | // Round trip latency of the very first frame |
| 10617 | optional int64 first_latency_millis = 4; |
| 10618 | |
| 10619 | // Average frame round trip latency |
| 10620 | optional float avg_latency_millis = 5; |
| 10621 | |
| 10622 | // Peak frame round trip latency |
| 10623 | optional int64 peak_latency_millis = 6; |
| 10624 | |
| 10625 | // Total number of frames received |
| 10626 | optional int64 total_frames = 7; |
| 10627 | |
| 10628 | // Number of frames ignored |
| 10629 | optional int64 ignored_frames = 8; |
| 10630 | |
| 10631 | // Number of dropped frames to synchronize camera devices |
| 10632 | optional int64 dropped_frames_to_sync = 9; |
| 10633 | |
| 10634 | // The duration of the service |
| 10635 | optional int64 duration_millis = 10; |
| 10636 | } |
Robert Lee | cccdc15 | 2020-04-23 13:22:46 +0800 | [diff] [blame] | 10637 | |
| 10638 | /** |
| 10639 | * Logs audio power usage stats. |
| 10640 | * |
| 10641 | * Pushed from: |
| 10642 | * frameworks/av/services/mediametrics/AudioPowerUsage.cpp |
| 10643 | */ |
| 10644 | message AudioPowerUsageDataReported { |
| 10645 | /** |
| 10646 | * Device used for input/output |
| 10647 | * |
| 10648 | * All audio devices please refer to below file: |
| 10649 | * system/media/audio/include/system/audio-base.h |
| 10650 | * |
| 10651 | * Define our own enum values because we don't report all audio devices. |
| 10652 | * Currently, we only report built-in audio devices such as handset, speaker, |
| 10653 | * built-in mics, common audio devices such as wired headset, usb headset |
| 10654 | * and bluetooth devices. |
| 10655 | */ |
| 10656 | enum AudioDevice { |
| 10657 | OUTPUT_EARPIECE = 0x1; // handset |
| 10658 | OUTPUT_SPEAKER = 0x2; // dual speaker |
| 10659 | OUTPUT_WIRED_HEADSET = 0x4; // 3.5mm headset |
| 10660 | OUTPUT_USB_HEADSET = 0x8; // usb headset |
| 10661 | OUTPUT_BLUETOOTH_SCO = 0x10; // bluetooth sco |
| 10662 | OUTPUT_BLUETOOTH_A2DP = 0x20; // a2dp |
| 10663 | OUTPUT_SPEAKER_SAFE = 0x40; // bottom speaker |
| 10664 | |
| 10665 | INPUT_DEVICE_BIT = 0x40000000; // non-negative positive int32. |
| 10666 | INPUT_BUILTIN_MIC = 0x40000001; // buildin mic |
| 10667 | INPUT_BUILTIN_BACK_MIC = 0x40000002; // buildin back mic |
| 10668 | INPUT_WIRED_HEADSET_MIC = 0x40000004; // 3.5mm headset mic |
| 10669 | INPUT_USB_HEADSET_MIC = 0x40000008; // usb headset mic |
| 10670 | INPUT_BLUETOOTH_SCO = 0x40000010; // bluetooth sco mic |
| 10671 | } |
| 10672 | optional AudioDevice audio_device = 1; |
| 10673 | |
| 10674 | // Duration of the audio in seconds |
| 10675 | optional int32 duration_secs = 2; |
| 10676 | |
| 10677 | // Average volume (0 ... 1.0) |
| 10678 | optional float average_volume = 3; |
| 10679 | |
| 10680 | enum AudioType { |
| 10681 | UNKNOWN_TYPE = 0; |
| 10682 | VOICE_CALL_TYPE = 1; // voice call |
| 10683 | VOIP_CALL_TYPE = 2; // voip call, including uplink and downlink |
| 10684 | MEDIA_TYPE = 3; // music and system sound |
| 10685 | RINGTONE_NOTIFICATION_TYPE = 4; // ringtone and notification |
| 10686 | ALARM_TYPE = 5; // alarm type |
| 10687 | // record type |
| 10688 | CAMCORDER_TYPE = 6; // camcorder |
| 10689 | RECORD_TYPE = 7; // other recording |
| 10690 | } |
| 10691 | optional AudioType type = 4; |
| 10692 | } |
Ruchir Rastogi | 56579cb | 2020-05-14 10:44:19 -0700 | [diff] [blame] | 10693 | |
| 10694 | /** |
| 10695 | * Pulls bytes transferred over WiFi and mobile networks sliced by uid, is_metered, and tag. |
| 10696 | * |
| 10697 | * Pulled from: |
| 10698 | * StatsPullAtomService, which uses NetworkStatsService to query NetworkStats. |
| 10699 | */ |
| 10700 | message BytesTransferByTagAndMetered { |
| 10701 | optional int32 uid = 1 [(is_uid) = true]; |
| 10702 | |
| 10703 | optional bool is_metered = 2; |
| 10704 | |
| 10705 | optional int32 tag = 3; |
| 10706 | |
| 10707 | optional int64 rx_bytes = 4; |
| 10708 | |
| 10709 | optional int64 rx_packets = 5; |
| 10710 | |
| 10711 | optional int64 tx_bytes = 6; |
| 10712 | |
| 10713 | optional int64 tx_packets = 7; |
| 10714 | } |
Robert Luo | 2f52f04 | 2020-05-11 16:39:24 +0800 | [diff] [blame] | 10715 | |
| 10716 | /* |
| 10717 | * Logs when the Media Output Switcher finishes a media switch operation. |
| 10718 | * |
| 10719 | * Logged from: |
| 10720 | * packages/apps/Settings/src/com/android/settings/media/MediaOutputSliceWorker.java |
| 10721 | */ |
| 10722 | message MediaOutputOpSwitchReported { |
| 10723 | // Source medium type before switching. |
| 10724 | optional android.app.settings.mediaoutput.MediumType source = 1; |
| 10725 | |
| 10726 | // Target medium type after switching. |
| 10727 | optional android.app.settings.mediaoutput.MediumType target = 2; |
| 10728 | |
| 10729 | // The result of switching. |
| 10730 | optional android.app.settings.mediaoutput.SwitchResult result = 3; |
| 10731 | |
| 10732 | // The detail code of a switching result. |
| 10733 | optional android.app.settings.mediaoutput.SubResult subresult = 4; |
| 10734 | |
| 10735 | /* |
| 10736 | * The package name of a pre-installed app, whose media session is being switched. |
| 10737 | */ |
| 10738 | optional string media_session_package_name = 5; |
| 10739 | |
| 10740 | // The amount of available wired devices when a switching is being performed. |
| 10741 | optional int32 available_wired_device_count = 6; |
| 10742 | |
| 10743 | // The amount of available Bluetooth devices a switching is being performed. |
| 10744 | optional int32 available_bt_device_count = 7; |
| 10745 | |
| 10746 | // The amount of available remote devices when a switching is being performed. |
| 10747 | optional int32 available_remote_device_count = 8; |
| 10748 | |
| 10749 | // The amount of applied devices within a remote dynamic group after a switching is done. |
| 10750 | optional int32 applied_device_count_within_remote_group = 9; |
| 10751 | } |
Govinda Wasserman | e464028 | 2020-04-30 09:30:56 -0400 | [diff] [blame] | 10752 | |
| 10753 | /** |
| 10754 | * Logs when the Assistant is invoked. |
| 10755 | * |
| 10756 | * Logged from: |
| 10757 | * frameworks/base/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java |
| 10758 | */ |
| 10759 | message AssistantInvocationReported { |
| 10760 | |
| 10761 | // The event_id (as for UiEventReported). |
| 10762 | optional int32 event_id = 1; |
| 10763 | |
| 10764 | // The registered Assistant's uid and package (as for UiEventReported). |
| 10765 | optional int32 uid = 2 [(is_uid) = true]; |
| 10766 | optional string package_name = 3; |
| 10767 | |
| 10768 | // An identifier used to disambiguate which logs refer to a particular invocation of the |
| 10769 | // Assistant (as for UiEventReported). |
| 10770 | optional int32 instance_id = 4; |
| 10771 | |
| 10772 | // The state of the device at the time of invocation. |
| 10773 | enum DeviceState { |
| 10774 | UNKNOWN_DEVICE_STATE = 0; |
| 10775 | AOD1 = 1; |
| 10776 | AOD2 = 2; |
| 10777 | BOUNCER = 3; |
| 10778 | UNLOCKED_LOCKSCREEN = 4; |
| 10779 | LAUNCHER_HOME = 5; |
| 10780 | LAUNCHER_OVERVIEW = 6; |
| 10781 | LAUNCHER_ALL_APPS = 7; |
| 10782 | APP_DEFAULT = 8; |
| 10783 | APP_IMMERSIVE = 9; |
| 10784 | APP_FULLSCREEN = 10; |
| 10785 | } |
| 10786 | optional DeviceState device_state = 5; |
| 10787 | |
| 10788 | // Whether the Assistant handles were showing at the time of invocation. |
| 10789 | optional bool assistant_handles_showing = 6; |
| 10790 | } |
Andy Hung | 48cffa3 | 2020-05-01 09:54:02 -0700 | [diff] [blame] | 10791 | |
| 10792 | /** |
| 10793 | * Logs when an AudioRecord finishes running on an audio device |
| 10794 | * |
| 10795 | * Logged from: |
| 10796 | * frameworks/av/services/mediametrics/AudioAnalytics.cpp |
| 10797 | */ |
| 10798 | message MediametricsAudioRecordDeviceUsageReported { |
| 10799 | // The devices connected to this AudioRecord. |
| 10800 | // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2". |
| 10801 | // See lookup<INPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10802 | // See audio_device_t in system/media/audio/include/system/audio-base.h |
| 10803 | optional string devices = 1; |
| 10804 | |
| 10805 | // The name of the remote device attached to the device, typically available for USB or BT. |
| 10806 | // This may be empty for a fixed device, or separated by "|" if more than one. |
| 10807 | optional string device_names = 2; |
| 10808 | |
| 10809 | // The amount of time spent in the device as measured by the active track in AudioFlinger. |
| 10810 | optional int64 device_time_nanos = 3; |
| 10811 | |
| 10812 | // The audio data format used for encoding. |
| 10813 | // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t |
| 10814 | optional string encoding = 4; |
| 10815 | |
| 10816 | // The client-server buffer framecount. |
| 10817 | // The framecount is generally between 960 - 48000 for PCM encoding. |
| 10818 | // The framecount represents raw buffer size in bytes for non-PCM encoding. |
| 10819 | optional int32 frame_count = 5; |
| 10820 | |
| 10821 | // The number of audio intervals (contiguous, continuous playbacks). |
| 10822 | optional int32 interval_count = 6; |
| 10823 | |
| 10824 | // The sample rate of the AudioRecord. |
| 10825 | // A number generally between 8000-96000 (frames per second). |
| 10826 | optional int32 sample_rate = 7; |
| 10827 | |
| 10828 | // The audio input flags used to construct the AudioRecord. |
| 10829 | // A string OR from system/media/audio/include/system/audio-base.h audio_input_flags_t |
| 10830 | optional string flags = 8; |
| 10831 | |
| 10832 | // The santized package name of the audio client associated with the AudioRecord. |
| 10833 | // See getSanitizedPackageNameAndVersionCode() in |
| 10834 | // frameworks/av/services/mediametrics/MediaMetricsService.cpp |
| 10835 | optional string package_name = 9; |
| 10836 | |
| 10837 | // The selected device id (nonzero if a non-default device is selected) |
| 10838 | optional int32 selected_device_id = 10; |
| 10839 | |
| 10840 | // The caller of the AudioRecord. |
| 10841 | // See lookup<CALLER_NAME>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10842 | optional string caller = 11; |
| 10843 | |
| 10844 | // The audio source for AudioRecord. |
| 10845 | // An enumeration from system/media/audio/include/system/audio-base.h audio_source_t |
| 10846 | optional string source = 12; |
| 10847 | } |
| 10848 | |
| 10849 | /** |
| 10850 | * Logs when an AudioThread finishes running on an audio device |
| 10851 | * |
| 10852 | * Logged from: |
| 10853 | * frameworks/av/services/mediametrics/AudioAnalytics.cpp |
| 10854 | */ |
| 10855 | message MediametricsAudioThreadDeviceUsageReported { |
| 10856 | // The devices connected to this audio thread. |
| 10857 | // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2". |
| 10858 | // (for record threads): |
| 10859 | // See lookup<INPUT_DEVICE> in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10860 | // (for playback threads): |
| 10861 | // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10862 | // See audio_device_t in system/media/audio/include/system/audio-base.h |
| 10863 | optional string devices = 1; |
| 10864 | |
| 10865 | // The name of the remote device attached to the device, typically available for USB or BT. |
| 10866 | // This may be empty for a fixed device, or separated by "|" if more than one. |
| 10867 | optional string device_names = 2; |
| 10868 | |
| 10869 | // The amount of time spent in the device as measured by the active track in AudioFlinger. |
| 10870 | optional int64 device_time_nanos = 3; |
| 10871 | |
| 10872 | // The audio data format used for encoding. |
| 10873 | // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t |
| 10874 | optional string encoding = 4; |
| 10875 | |
| 10876 | // The framecount of the buffer delivered to (or from) the HAL. |
| 10877 | // The framecount is generally ~960 for PCM encoding. |
| 10878 | // The framecount represents raw buffer size in bytes for non-PCM encoding. |
| 10879 | optional int32 frame_count = 5; |
| 10880 | |
| 10881 | // The number of audio intervals (contiguous, continuous playbacks). |
| 10882 | optional int32 interval_count = 6; |
| 10883 | |
| 10884 | // The sample rate of the audio thread. |
| 10885 | // A number generally between 8000-96000 (frames per second). |
| 10886 | optional int32 sample_rate = 7; |
| 10887 | |
| 10888 | // The audio flags used to construct the thread |
| 10889 | // (for record threads): |
| 10890 | // A string OR from system/media/audio/include/system/audio-base.h audio_input_flags_t |
| 10891 | // (for playback threads): |
| 10892 | // A string OR from system/media/audio/include/system/audio-base.h audio_output_flags_t |
| 10893 | optional string flags = 8; |
| 10894 | |
| 10895 | // The number of underruns encountered for a playback thread or the |
| 10896 | // number of overruns encountered for a capture thread. |
| 10897 | optional int32 xruns = 9; |
| 10898 | |
| 10899 | // The type of thread |
| 10900 | // A thread type enumeration from |
| 10901 | // frameworks/av/mediametrics/services/Translate.h |
| 10902 | optional string type = 10; |
| 10903 | } |
| 10904 | |
| 10905 | /** |
| 10906 | * Logs when an AudioTrack finishes running on an audio device |
| 10907 | * |
| 10908 | * Logged from: |
| 10909 | * frameworks/av/services/mediametrics/AudioAnalytics.cpp |
| 10910 | */ |
| 10911 | message MediametricsAudioTrackDeviceUsageReported { |
| 10912 | // The output devices connected to this AudioTrack. |
| 10913 | // A string OR of various output device categories, e.g. "DEVICE1|DEVICE2". |
| 10914 | // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10915 | // See audio_device_t in system/media/audio/include/system/audio-base.h |
| 10916 | optional string devices = 1; |
| 10917 | |
| 10918 | // The name of the remote device attached to the device, typically available for USB or BT. |
| 10919 | // This may be empty for a fixed device, or separated by "|" if more than one. |
| 10920 | optional string device_names = 2; |
| 10921 | |
| 10922 | // The amount of time spent in the device as measured by the active track in AudioFlinger. |
| 10923 | optional int64 device_time_nanos = 3; |
| 10924 | |
| 10925 | // The audio data format used for encoding. |
| 10926 | // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t |
| 10927 | optional string encoding = 4; |
| 10928 | |
| 10929 | // The client-server buffer framecount. |
| 10930 | // The framecount is generally between 960 - 48000 for PCM encoding. |
| 10931 | // The framecount represents raw buffer size in bytes for non-PCM encoding. |
| 10932 | // A static track (see traits) may have a very large framecount. |
| 10933 | optional int32 frame_count = 5; |
| 10934 | |
| 10935 | // The number of audio intervals (contiguous, continuous playbacks). |
| 10936 | optional int32 interval_count = 6; |
| 10937 | |
| 10938 | // The sample rate of the AudioTrack. |
| 10939 | // A number generally between 8000-96000 (frames per second). |
| 10940 | optional int32 sample_rate = 7; |
| 10941 | |
| 10942 | // The audio flags used to construct the AudioTrack. |
| 10943 | // A string OR from system/media/audio/include/system/audio-base.h audio_output_flags_t |
| 10944 | optional string flags = 8; |
| 10945 | |
| 10946 | // The number of underruns encountered. |
| 10947 | optional int32 xruns = 9; |
| 10948 | |
| 10949 | // The santized package name of the audio client associated with the AudioTrack. |
| 10950 | // See getSanitizedPackageNameAndVersionCode() in |
| 10951 | // frameworks/av/services/mediametrics/MediaMetricsService.cpp |
| 10952 | optional string package_name = 10; |
| 10953 | |
| 10954 | // The latency of the last sample in the buffer in milliseconds. |
| 10955 | optional float device_latency_millis = 11; |
| 10956 | |
| 10957 | // The startup time in milliseconds from start() to sample played. |
| 10958 | optional float device_startup_millis = 12; |
| 10959 | |
| 10960 | // The average volume of the track on the device [ 0.f - 1.f ] |
| 10961 | optional float device_volume = 13; |
| 10962 | |
| 10963 | // The selected device id (nonzero if a non-default device is selected) |
| 10964 | optional int32 selected_device_id = 14; |
| 10965 | |
| 10966 | // The stream_type category for the AudioTrack. |
| 10967 | // An enumeration from system/media/audio/include/system/audio-base.h audio_stream_type_t |
| 10968 | optional string stream_type = 15; |
| 10969 | |
| 10970 | // The usage for the AudioTrack. |
| 10971 | // An enumeration from system/media/audio/include/system/audio-base.h audio_usage_t |
| 10972 | optional string usage = 16; |
| 10973 | |
| 10974 | // The content type of the AudioTrack. |
| 10975 | // An enumeration from system/media/audio/include/system/audio-base.h audio_content_type_t |
| 10976 | optional string content_type = 17; |
| 10977 | |
| 10978 | // The caller of the AudioTrack. |
| 10979 | // See lookup<CALLER_NAME>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10980 | optional string caller = 18; |
| 10981 | |
| 10982 | // The traits of the AudioTrack. |
| 10983 | // A string OR of different traits, may be empty string. |
| 10984 | // Only "static" is supported for R. |
| 10985 | // See lookup<TRACK_TRAITS>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10986 | optional string traits = 19; |
| 10987 | } |
| 10988 | |
| 10989 | /** |
| 10990 | * Logs the status of an audio device connection attempt. |
| 10991 | * |
| 10992 | * Logged from: |
| 10993 | * frameworks/av/services/mediametrics/AudioAnalytics.cpp |
| 10994 | */ |
| 10995 | message MediametricsAudioDeviceConnectionReported { |
| 10996 | // The input devices represented by this report. |
| 10997 | // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2". |
| 10998 | // See lookup<INPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10999 | // See audio_device_t in system/media/audio/include/system/audio-base.h |
| 11000 | optional string input_devices = 1; |
| 11001 | |
| 11002 | // The output devices represented by this report. |
| 11003 | // A string OR of various output device categories. |
| 11004 | // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 11005 | // See audio_device_t in system/media/audio/include/system/audio-base.h |
| 11006 | optional string output_devices = 2; |
| 11007 | |
| 11008 | // The name of the remote device attached to the device, typically available for USB or BT. |
| 11009 | // This may be empty for a fixed device, or separated by "|" if more than one. |
| 11010 | optional string device_names = 3; |
| 11011 | |
| 11012 | // The result of the audio device connection. |
| 11013 | // 0 indicates success: connection verified. |
| 11014 | // 1 indicates unknown: connection not verified or not known if diverted properly. |
| 11015 | // Other values indicate specific status. |
| 11016 | // See DeviceConnectionResult in frameworks/av/services/mediametrics/AudioTypes.h |
| 11017 | optional int32 result = 4; |
| 11018 | |
| 11019 | // Average milliseconds of time to connect |
| 11020 | optional float time_to_connect_millis = 5; |
| 11021 | |
| 11022 | // Number of connections if aggregated statistics, otherwise 1. |
| 11023 | optional int32 connection_count = 6; |
| 11024 | } |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 11025 | |
Hasini Gunasinghe | 7c336a6 | 2020-05-28 10:23:01 +0000 | [diff] [blame] | 11026 | /** |
Hasini Gunasinghe | 68d7e94 | 2020-05-21 16:17:30 +0000 | [diff] [blame] | 11027 | * Logs: i) creation of different types of cryptographic keys in the keystore, |
| 11028 | * ii) operations performed using the keys, |
| 11029 | * iii) attestation of the keys |
| 11030 | * Logged from: system/security/keystore/key_event_log_handler.cpp |
| 11031 | */ |
| 11032 | message KeystoreKeyEventReported { |
| 11033 | |
| 11034 | enum Algorithm { |
| 11035 | /** Asymmetric algorithms. */ |
| 11036 | RSA = 1; |
| 11037 | // 2 removed, do not reuse. |
| 11038 | EC = 3; |
| 11039 | /** Block cipher algorithms */ |
| 11040 | AES = 32; |
| 11041 | TRIPLE_DES = 33; |
| 11042 | /** MAC algorithms */ |
| 11043 | HMAC = 128; |
| 11044 | }; |
| 11045 | /** Algorithm associated with the key */ |
| 11046 | optional Algorithm algorithm = 1; |
| 11047 | |
| 11048 | /** Size of the key */ |
| 11049 | optional int32 key_size = 2; |
| 11050 | |
| 11051 | enum KeyOrigin { |
| 11052 | /** Generated in keymaster. Should not exist outside the TEE. */ |
| 11053 | GENERATED = 0; |
| 11054 | /** Derived inside keymaster. Likely exists off-device. */ |
| 11055 | DERIVED = 1; |
| 11056 | /** Imported into keymaster. Existed as cleartext in Android. */ |
| 11057 | IMPORTED = 2; |
| 11058 | /** Keymaster did not record origin. */ |
| 11059 | UNKNOWN = 3; |
| 11060 | /** Securely imported into Keymaster. */ |
| 11061 | SECURELY_IMPORTED = 4; |
| 11062 | }; |
| 11063 | /* Logs whether the key was generated, imported, securely imported, or derived.*/ |
| 11064 | optional KeyOrigin key_origin = 3; |
| 11065 | |
| 11066 | enum HardwareAuthenticatorType { |
| 11067 | NONE = 0; |
| 11068 | PASSWORD = 1; |
| 11069 | FINGERPRINT = 2; |
| 11070 | // Additional entries must be powers of 2. |
| 11071 | }; |
| 11072 | /** |
| 11073 | * What auth types does this key require? If none, |
| 11074 | * then no auth required. |
| 11075 | */ |
| 11076 | optional HardwareAuthenticatorType user_auth_type = 4; |
| 11077 | |
| 11078 | /** |
| 11079 | * If user authentication is required, is the requirement time based? If it |
| 11080 | * is not time based then this field will not be used and the key is per |
| 11081 | * operation. Per operation keys must be user authenticated on each usage. |
| 11082 | */ |
| 11083 | optional int32 user_auth_key_timeout_secs = 5; |
| 11084 | |
| 11085 | /** |
| 11086 | * padding mode, digest, block_mode and purpose should ideally be repeated |
| 11087 | * fields. However, since statsd does not support repeated fields in |
| 11088 | * pushed atoms, they are represented using bitmaps. |
| 11089 | */ |
| 11090 | |
| 11091 | /** Track which padding mode is being used.*/ |
| 11092 | optional int32 padding_mode_bitmap = 6; |
| 11093 | |
| 11094 | /** Track which digest is being used. */ |
| 11095 | optional int32 digest_bitmap = 7; |
| 11096 | |
| 11097 | /** Track what block mode is being used (for encryption). */ |
| 11098 | optional int32 block_mode_bitmap = 8; |
| 11099 | |
| 11100 | /** Track what purpose is this key serving. */ |
| 11101 | optional int32 purpose_bitmap = 9; |
| 11102 | |
| 11103 | enum EcCurve { |
| 11104 | P_224 = 0; |
| 11105 | P_256 = 1; |
| 11106 | P_384 = 2; |
| 11107 | P_521 = 3; |
| 11108 | }; |
| 11109 | /** Which ec curve was selected if elliptic curve cryptography is in use **/ |
| 11110 | optional EcCurve ec_curve = 10; |
| 11111 | |
| 11112 | enum KeyBlobUsageRequirements { |
| 11113 | STANDALONE = 0; |
| 11114 | REQUIRES_FILE_SYSTEM = 1; |
| 11115 | }; |
| 11116 | /** Standalone or is a file system required */ |
| 11117 | optional KeyBlobUsageRequirements key_blob_usage_reqs = 11; |
| 11118 | |
| 11119 | enum Type { |
Hasini Gunasinghe | 7c336a6 | 2020-05-28 10:23:01 +0000 | [diff] [blame] | 11120 | key_operation = 0; |
| 11121 | key_creation = 1; |
| 11122 | key_attestation = 2; |
Hasini Gunasinghe | 68d7e94 | 2020-05-21 16:17:30 +0000 | [diff] [blame] | 11123 | } |
| 11124 | /** Key creation event, operation event or attestation event? */ |
| 11125 | optional Type type = 12; |
| 11126 | |
| 11127 | /** Was the key creation, operation, or attestation successful? */ |
| 11128 | optional bool was_successful = 13; |
| 11129 | |
| 11130 | /** Response code or error code */ |
| 11131 | optional int32 error_code = 14; |
| 11132 | } |
Hasini Gunasinghe | 7c336a6 | 2020-05-28 10:23:01 +0000 | [diff] [blame] | 11133 | |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 11134 | // Blob Committer stats |
| 11135 | // Keep in sync between: |
| 11136 | // frameworks/base/core/proto/android/server/blobstoremanagerservice.proto |
| 11137 | // frameworks/base/cmds/statsd/src/atoms.proto |
| 11138 | message BlobCommitterProto { |
| 11139 | // Committer app's uid |
| 11140 | optional int32 uid = 1 [(is_uid) = true]; |
| 11141 | |
| 11142 | // Unix epoch timestamp of the commit in milliseconds |
| 11143 | optional int64 commit_timestamp_millis = 2; |
| 11144 | |
| 11145 | // Flags of what access types the committer has set for the Blob |
| 11146 | optional int32 access_mode = 3; |
| 11147 | |
| 11148 | // Number of packages that have been whitelisted for ACCESS_TYPE_WHITELIST |
| 11149 | optional int32 num_whitelisted_package = 4; |
| 11150 | } |
| 11151 | |
| 11152 | // Blob Leasee stats |
| 11153 | // Keep in sync between: |
| 11154 | // frameworks/base/core/proto/android/server/blobstoremanagerservice.proto |
| 11155 | // frameworks/base/cmds/statsd/src/atoms.proto |
| 11156 | message BlobLeaseeProto { |
| 11157 | // Leasee app's uid |
| 11158 | optional int32 uid = 1 [(is_uid) = true]; |
| 11159 | |
| 11160 | // Unix epoch timestamp for lease expiration in milliseconds |
| 11161 | optional int64 lease_expiry_timestamp_millis = 2; |
| 11162 | } |
| 11163 | |
| 11164 | // List of Blob Committers |
| 11165 | // Keep in sync between: |
| 11166 | // frameworks/base/core/proto/android/server/blobstoremanagerservice.proto |
| 11167 | // frameworks/base/cmds/statsd/src/atoms.proto |
| 11168 | message BlobCommitterListProto { |
| 11169 | repeated BlobCommitterProto committer = 1; |
| 11170 | } |
| 11171 | |
| 11172 | // List of Blob Leasees |
| 11173 | // Keep in sync between: |
| 11174 | // frameworks/base/core/proto/android/server/blobstoremanagerservice.proto |
| 11175 | // frameworks/base/cmds/statsd/src/atoms.proto |
| 11176 | message BlobLeaseeListProto { |
| 11177 | repeated BlobLeaseeProto leasee = 1; |
| 11178 | } |
| 11179 | |
| 11180 | /** |
| 11181 | * Logs the current state of a Blob committed with BlobStoreManager |
| 11182 | * |
| 11183 | * Pulled from: |
| 11184 | * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java |
| 11185 | */ |
| 11186 | message BlobInfo { |
| 11187 | // Id of the Blob |
| 11188 | optional int64 blob_id = 1; |
| 11189 | |
| 11190 | // Size of the Blob data |
| 11191 | optional int64 size = 2; |
| 11192 | |
| 11193 | // Unix epoch timestamp of the Blob's expiration in milliseconds |
| 11194 | optional int64 expiry_timestamp_millis = 3; |
| 11195 | |
| 11196 | // List of committers of this Blob |
| 11197 | optional BlobCommitterListProto committers = 4; |
| 11198 | |
| 11199 | // List of leasees of this Blob |
| 11200 | optional BlobLeaseeListProto leasees = 5; |
| 11201 | } |
Nikita Iashchenko | ff64fd0 | 2020-11-02 08:10:45 +0000 | [diff] [blame] | 11202 | |
| 11203 | /** |
| 11204 | * Pushes TLS handshake counters from Conscrypt. |
| 11205 | * Pulled from: |
| 11206 | * external/conscrypt/common/src/main/java/org/conscrypt/ConscryptEngineSocket.java |
| 11207 | * external/conscrypt/common/src/main/java/org/conscrypt/ConscryptFileDescriptorSocket.java |
| 11208 | */ |
| 11209 | message TlsHandshakeReported { |
| 11210 | optional bool success = 1; |
| 11211 | |
| 11212 | optional android.stats.tls.Protocol protocol = 2; |
| 11213 | |
| 11214 | optional android.stats.tls.CipherSuite cipher_suite = 3; |
| 11215 | |
| 11216 | optional int32 handshake_duration_millis = 4; |
| 11217 | } |