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 | 8abf3a7 | 2020-06-13 11:24:34 +0800 | [diff] [blame] | 46 | import "frameworks/base/core/proto/android/stats/connectivity/tethering.proto"; |
lifr | 1f74b05 | 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"; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 61 | import "frameworks/base/core/proto/android/telecomm/enums.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 62 | import "frameworks/base/core/proto/android/telephony/enums.proto"; |
| 63 | import "frameworks/base/core/proto/android/view/enums.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 64 | import "frameworks/base/core/proto/android/wifi/enums.proto"; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 65 | import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto"; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 66 | import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto"; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 67 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 68 | /** |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 69 | * The master atom class. This message defines all of the available |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 70 | * raw stats log events from the Android system, also known as "atoms." |
| 71 | * |
| 72 | * This field contains a single oneof with all of the available messages. |
| 73 | * The stats-log-api-gen tool runs as part of the Android build and |
| 74 | * generates the android.util.StatsLog class, which contains the constants |
| 75 | * and methods that Android uses to log. |
| 76 | * |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 77 | * This Atom class is not actually built into the Android system. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 78 | * Instead, statsd on Android constructs these messages synthetically, |
| 79 | * in the format defined here and in stats_log.proto. |
| 80 | */ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 81 | message Atom { |
| 82 | // Pushed atoms start at 2. |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 83 | oneof pushed { |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 84 | // 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] | 85 | BleScanStateChanged ble_scan_state_changed = 2 |
| 86 | [(module) = "bluetooth", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 87 | ProcessStateChanged process_state_changed = 3 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 88 | BleScanResultReceived ble_scan_result_received = 4 [(module) = "bluetooth"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 89 | SensorStateChanged sensor_state_changed = |
| 90 | 5 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 91 | GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 92 | SyncStateChanged sync_state_changed = 7 [(module) = "framework", (module) = "statsdtest"]; |
| 93 | ScheduledJobStateChanged scheduled_job_state_changed = |
| 94 | 8 [(module) = "framework", (module) = "statsdtest"]; |
| 95 | ScreenBrightnessChanged screen_brightness_changed = |
| 96 | 9 [(module) = "framework", (module) = "statsdtest"]; |
| 97 | WakelockStateChanged wakelock_state_changed = |
| 98 | 10 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 99 | LongPartialWakelockStateChanged long_partial_wakelock_state_changed = |
| 100 | 11 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 101 | MobileRadioPowerStateChanged mobile_radio_power_state_changed = |
| 102 | 12 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 103 | WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(module) = "framework"]; |
| 104 | ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = |
| 105 | 14 [(module) = "framework"]; |
| 106 | MemoryFactorStateChanged memory_factor_state_changed = 15 [(module) = "framework"]; |
| 107 | ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16 [(module) = "framework"]; |
| 108 | CachedKillReported cached_kill_reported = 17 [(module) = "framework"]; |
| 109 | ProcessMemoryStatReported process_memory_stat_reported = 18 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 110 | LauncherUIChanged launcher_event = 19 [(module) = "sysui"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 111 | BatterySaverModeStateChanged battery_saver_mode_state_changed = |
| 112 | 20 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 113 | DeviceIdleModeStateChanged device_idle_mode_state_changed = 21 [(module) = "framework"]; |
| 114 | DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 115 | AudioStateChanged audio_state_changed = |
| 116 | 23 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 117 | MediaCodecStateChanged media_codec_state_changed = 24 [(module) = "framework"]; |
| 118 | CameraStateChanged camera_state_changed = 25 [(module) = "framework"]; |
| 119 | FlashlightStateChanged flashlight_state_changed = 26 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 120 | UidProcessStateChanged uid_process_state_changed = |
| 121 | 27 [(module) = "framework", (module) = "statsdtest"]; |
| 122 | ProcessLifeCycleStateChanged process_life_cycle_state_changed = |
| 123 | 28 [(module) = "framework", (module) = "statsdtest"]; |
| 124 | ScreenStateChanged screen_state_changed = |
| 125 | 29 [(module) = "framework", (module) = "statsdtest"]; |
| 126 | BatteryLevelChanged battery_level_changed = |
| 127 | 30 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 128 | ChargingStateChanged charging_state_changed = 31 [(module) = "framework"]; |
tsaichristine | 1449fa4 | 2020-01-02 12:12:05 -0800 | [diff] [blame] | 129 | PluggedStateChanged plugged_state_changed = 32 |
| 130 | [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 131 | InteractiveStateChanged interactive_state_changed = 33 [(module) = "framework"]; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 132 | TouchEventReported touch_event_reported = 34; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 133 | WakeupAlarmOccurred wakeup_alarm_occurred = 35 [(module) = "framework"]; |
| 134 | KernelWakeupReported kernel_wakeup_reported = 36 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 135 | WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"]; |
| 136 | WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"]; |
| 137 | WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 138 | PhoneSignalStrengthChanged phone_signal_strength_changed = |
| 139 | 40 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 140 | SettingChanged setting_changed = 41 [(module) = "framework"]; |
| 141 | ActivityForegroundStateChanged activity_foreground_state_changed = |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 142 | 42 [(module) = "framework", (module) = "statsdtest"]; |
| 143 | IsolatedUidChanged isolated_uid_changed = |
| 144 | 43 [(module) = "framework", (module) = "statsd", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 145 | PacketWakeupOccurred packet_wakeup_occurred = 44 [(module) = "framework"]; |
| 146 | WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 147 | AnomalyDetected anomaly_detected = 46 [(module) = "statsd"]; |
Muhammad Qureshi | 741d318 | 2020-06-18 18:28:21 -0700 | [diff] [blame] | 148 | AppBreadcrumbReported app_breadcrumb_reported = 47 [(module) = "statsd"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 149 | AppStartOccurred app_start_occurred = 48 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 150 | AppStartCanceled app_start_canceled = 49 [(module) = "framework"]; |
| 151 | AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"]; |
Muhammad Qureshi | 79f068c | 2019-12-20 06:55:57 -0800 | [diff] [blame] | 152 | LmkKillOccurred lmk_kill_occurred = 51 [(module) = "lmkd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 153 | PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 154 | WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"]; |
Muhammad Qureshi | 79f068c | 2019-12-20 06:55:57 -0800 | [diff] [blame] | 155 | LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 156 | AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"]; |
| 157 | ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"]; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 158 | BootSequenceReported boot_sequence_reported = 57; |
Muhammad Qureshi | 741d318 | 2020-06-18 18:28:21 -0700 | [diff] [blame] | 159 | DaveyOccurred davey_occurred = 58 [(module) = "statsd"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 160 | OverlayStateChanged overlay_state_changed = |
| 161 | 59 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 162 | ForegroundServiceStateChanged foreground_service_state_changed |
| 163 | = 60 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 164 | CallStateChanged call_state_changed = |
| 165 | 61 [(module) = "telecom", (truncate_timestamp) = true]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 166 | KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"]; |
| 167 | KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"]; |
| 168 | KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 169 | AppDied app_died = 65 [(module) = "framework"]; |
| 170 | ResourceConfigurationChanged resource_configuration_changed = 66 [(module) = "framework"]; |
| 171 | BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 172 | BluetoothConnectionStateChanged bluetooth_connection_state_changed = |
| 173 | 68 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 174 | GpsSignalQualityChanged gps_signal_quality_changed = 69 [(module) = "framework"]; |
| 175 | UsbConnectorStateChanged usb_connector_state_changed = 70 [(module) = "framework"]; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 176 | SpeakerImpedanceReported speaker_impedance_reported = 71; |
| 177 | HardwareFailed hardware_failed = 72; |
| 178 | PhysicalDropDetected physical_drop_detected = 73; |
| 179 | ChargeCyclesReported charge_cycles_reported = 74; |
Muhammad Qureshi | a4efed8 | 2020-01-23 13:53:51 -0800 | [diff] [blame] | 180 | MobileConnectionStateChanged mobile_connection_state_changed = 75 [(module) = "telephony"]; |
| 181 | MobileRadioTechnologyChanged mobile_radio_technology_changed = 76 [(module) = "telephony"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 182 | UsbDeviceAttached usb_device_attached = 77 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 183 | AppCrashOccurred app_crash_occurred = 78 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 184 | ANROccurred anr_occurred = 79 [(module) = "framework"]; |
| 185 | WTFOccurred wtf_occurred = 80 [(module) = "framework"]; |
| 186 | LowMemReported low_mem_reported = 81 [(module) = "framework"]; |
Howard Ro | cb767f6 | 2018-06-19 19:58:05 -0700 | [diff] [blame] | 187 | GenericAtom generic_atom = 82; |
Muhammad Qureshi | 741d318 | 2020-06-18 18:28:21 -0700 | [diff] [blame] | 188 | KeyValuePairsAtom key_value_pairs_atom = 83 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 189 | VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"]; |
| 190 | DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"]; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 191 | ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 192 | BiometricAcquired biometric_acquired = 87 [(module) = "framework"]; |
| 193 | BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"]; |
| 194 | BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"]; |
thiruram | 70b0843 | 2020-06-09 18:44:02 -0700 | [diff] [blame] | 195 | UiEventReported ui_event_reported = 90 [(module) = "framework", (module) = "sysui"]; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 196 | BatteryHealthSnapshot battery_health_snapshot = 91; |
| 197 | SlowIo slow_io = 92; |
| 198 | BatteryCausedShutdown battery_caused_shutdown = 93; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 199 | PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"]; |
| 200 | PhoneStateChanged phone_state_changed = 95 [(module) = "framework"]; |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 201 | UserRestrictionChanged user_restriction_changed = 96; |
Muhammad Qureshi | 9afad81 | 2020-01-23 15:04:59 -0800 | [diff] [blame] | 202 | SettingsUIChanged settings_ui_changed = 97 [(module) = "settings"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 203 | ConnectivityStateChanged connectivity_state_changed = 98 [(module) = "framework"]; |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 204 | // TODO: service state change is very noisy shortly after boot, as well |
| 205 | // as at other transitions - coming out of doze, device plugged in, etc. |
| 206 | // Consider removing this if it becomes a problem |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 207 | ServiceStateChanged service_state_changed = 99 [(module) = "framework"]; |
| 208 | ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"]; |
| 209 | FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"]; |
Muhammad Qureshi | cefc882 | 2020-02-09 11:46:23 -0800 | [diff] [blame] | 210 | BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 211 | DevicePolicyEvent device_policy_event = 103 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 212 | DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"]; |
| 213 | DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported = |
| 214 | 105 [(module) = "docsui"]; |
| 215 | DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"]; |
| 216 | DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"]; |
| 217 | DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request = |
| 218 | 108 [(module) = "docsui"]; |
| 219 | DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"]; |
| 220 | DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"]; |
| 221 | DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"]; |
| 222 | DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 223 | WifiEnabledStateChanged wifi_enabled_state_changed = 113 [(module) = "framework"]; |
tsaichristine | cecebdc | 2020-02-04 14:05:56 -0800 | [diff] [blame] | 224 | WifiRunningStateChanged wifi_running_state_changed = 114 |
| 225 | [(module) = "framework", deprecated = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 226 | AppCompacted app_compacted = 115 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 227 | NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"]; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 228 | DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 229 | 117 [(module) = "docsui"]; |
| 230 | DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"]; |
| 231 | DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"]; |
| 232 | DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"]; |
| 233 | DataStallEvent data_stall_event = 121 [(module) = "network_stack"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 234 | RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"]; |
| 235 | SignedConfigReported signed_config_reported = 123 [(module) = "framework"]; |
| 236 | GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 237 | BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = |
| 238 | 125 [(module) = "bluetooth"]; |
| 239 | BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = |
| 240 | 126 [(module) = "bluetooth"]; |
| 241 | BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = |
| 242 | 127 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 243 | AppDowngraded app_downgraded = 128 [(module) = "framework"]; |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 244 | AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 245 | LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"]; |
| 246 | GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"]; |
| 247 | GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"]; |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 248 | UsbPortOverheatEvent usb_port_overheat_event_reported = 133; |
Muhammad Qureshi | f9a5ab0 | 2020-01-25 19:43:27 -0800 | [diff] [blame] | 249 | NfcErrorOccurred nfc_error_occurred = 134 [(module) = "nfc"]; |
| 250 | NfcStateChanged nfc_state_changed = 135 [(module) = "nfc"]; |
| 251 | NfcBeamOccurred nfc_beam_occurred = 136 [(module) = "nfc"]; |
| 252 | NfcCardemulationOccurred nfc_cardemulation_occurred = 137 [(module) = "nfc"]; |
| 253 | NfcTagOccurred nfc_tag_occurred = 138 [(module) = "nfc"]; |
| 254 | NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139 [(module) = "nfc"]; |
Muhammad Qureshi | 70dfeb4 | 2020-01-24 20:11:44 -0800 | [diff] [blame] | 255 | SeStateChanged se_state_changed = 140 [(module) = "secure_element"]; |
| 256 | SeOmapiReported se_omapi_reported = 141 [(module) = "secure_element"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 257 | BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = |
| 258 | 142 [(module) = "framework"]; |
| 259 | AttentionManagerServiceResultReported attention_manager_service_result_reported = |
| 260 | 143 [(module) = "framework"]; |
| 261 | AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"]; |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 262 | SpeechDspStatReported speech_dsp_stat_reported = 145; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 263 | UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 264 | WatchdogRollbackOccurred watchdog_rollback_occurred = |
| 265 | 147 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 266 | BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = |
| 267 | 148 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 268 | BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 269 | ScheduledJobConstraintChanged scheduled_job_constraint_changed = |
| 270 | 150 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 271 | BluetoothActiveDeviceChanged bluetooth_active_device_changed = |
| 272 | 151 [(module) = "bluetooth"]; |
| 273 | BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = |
| 274 | 152 [(module) = "bluetooth"]; |
| 275 | BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = |
| 276 | 153 [(module) = "bluetooth"]; |
| 277 | BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = |
| 278 | 154 [(module) = "bluetooth"]; |
| 279 | BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = |
| 280 | 155 [(module) = "bluetooth"]; |
| 281 | BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = |
| 282 | 156 [(module) = "bluetooth"]; |
| 283 | BluetoothDeviceRssiReported bluetooth_device_rssi_reported = |
| 284 | 157 [(module) = "bluetooth"]; |
| 285 | BluetoothDeviceFailedContactCounterReported |
| 286 | bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"]; |
| 287 | BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = |
| 288 | 159 [(module) = "bluetooth"]; |
| 289 | BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = |
| 290 | 160 [(module) = "bluetooth"]; |
| 291 | BluetoothQualityReportReported bluetooth_quality_report_reported = |
| 292 | 161 [(module) = "bluetooth"]; |
| 293 | BluetoothDeviceInfoReported bluetooth_device_info_reported = |
| 294 | 162 [(module) = "bluetooth"]; |
| 295 | BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = |
| 296 | 163 [(module) = "bluetooth"]; |
| 297 | BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = |
| 298 | 164 [(module) = "bluetooth"]; |
| 299 | BluetoothBondStateChanged bluetooth_bond_state_changed = |
| 300 | 165 [(module) = "bluetooth"]; |
| 301 | BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = |
| 302 | 166 [(module) = "bluetooth"]; |
| 303 | BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = |
| 304 | 167 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 305 | ScreenTimeoutExtensionReported screen_timeout_extension_reported = |
| 306 | 168 [(module) = "framework"]; |
| 307 | ProcessStartTime process_start_time = 169 [(module) = "framework"]; |
Philip P. Moltmann | b2f0c77 | 2019-04-11 14:41:21 -0700 | [diff] [blame] | 308 | PermissionGrantRequestResultReported permission_grant_request_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 309 | 170 [(module) = "permissioncontroller"]; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 310 | BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; |
Muhammad Qureshi | ed8bca0 | 2020-01-24 16:07:49 -0800 | [diff] [blame] | 311 | DeviceIdentifierAccessDenied device_identifier_access_denied = |
| 312 | 172 [(module) = "telephony_common"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 313 | BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"]; |
Muhammad Qureshi | 76b2524 | 2020-01-25 19:02:08 -0800 | [diff] [blame] | 314 | AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"]; |
| 315 | AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"]; |
| 316 | AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 317 | TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"]; |
Muhammad Qureshi | 741d318 | 2020-06-18 18:28:21 -0700 | [diff] [blame] | 318 | HiddenApiUsed hidden_api_used = 178 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 319 | StyleUIChanged style_ui_changed = 179 [(module) = "sysui"]; |
Joel Galenson | 6f41b106 | 2019-04-16 12:22:41 -0700 | [diff] [blame] | 320 | PrivacyIndicatorsInteracted privacy_indicators_interacted = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 321 | 180 [(module) = "permissioncontroller"]; |
| 322 | AppInstallOnExternalStorageReported app_install_on_external_storage_reported = |
| 323 | 181 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 324 | NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 325 | AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"]; |
| 326 | BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"]; |
| 327 | SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"]; |
| 328 | TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 329 | BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = |
| 330 | 187 [(module) = "bluetooth"]; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 331 | IntelligenceEventReported intelligence_event_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 332 | 188 [(module) = "intelligence"]; |
| 333 | ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = |
| 334 | 189 [(module) = "framework"]; |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 335 | RoleRequestResultReported role_request_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 336 | 190 [(module) = "permissioncontroller"]; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 337 | MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191; |
| 338 | MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192; |
| 339 | MediametricsAudiothreadReported mediametrics_audiothread_reported = 193; |
| 340 | MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194; |
| 341 | MediametricsCodecReported mediametrics_codec_reported = 195; |
| 342 | MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196; |
| 343 | MediametricsExtractorReported mediametrics_extractor_reported = 197; |
| 344 | MediametricsMediadrmReported mediametrics_mediadrm_reported = 198; |
| 345 | MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199; |
| 346 | MediametricsRecorderReported mediametrics_recorder_reported = 200; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 347 | MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 348 | CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"]; |
| 349 | GarageModeInfo garage_mode_info = 204 [(module) = "car"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 350 | TestAtomReported test_atom_reported = 205 [(module) = "cts"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 351 | ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = |
| 352 | 206 [(module) = "framework"]; |
| 353 | ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"]; |
| 354 | ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"]; |
| 355 | ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"]; |
| 356 | LocationManagerApiUsageReported location_manager_api_usage_reported = |
| 357 | 210 [(module) = "framework"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 358 | ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 359 | 211 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 360 | RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 361 | 212 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 362 | GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 363 | 213 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 364 | LocationAccessCheckNotificationAction location_access_check_notification_action = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 365 | 214 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 366 | AppPermissionFragmentActionReported app_permission_fragment_action_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 367 | 215 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 368 | AppPermissionFragmentViewed app_permission_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 369 | 216 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 370 | AppPermissionsFragmentViewed app_permissions_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 371 | 217 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 372 | PermissionAppsFragmentViewed permission_apps_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 373 | 218 [(module) = "permissioncontroller"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 374 | TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"]; |
| 375 | TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"]; |
| 376 | ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"]; |
| 377 | LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 378 | ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 379 | BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"]; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 380 | UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225; |
| 381 | UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 382 | CameraActionEvent camera_action_event = 227 [(module) = "framework"]; |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 383 | AppCompatibilityChangeReported app_compatibility_change_reported = |
Muhammad Qureshi | 741d318 | 2020-06-18 18:28:21 -0700 | [diff] [blame] | 384 | 228 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 385 | PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"]; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 386 | VmsClientConnectionStateChanged vms_client_connection_state_changed = |
| 387 | 230 [(module) = "car"]; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 388 | MediaProviderScanOccurred media_provider_scan_occurred = 233 [(module) = "mediaprovider"]; |
| 389 | MediaContentDeleted media_content_deleted = 234 [(module) = "mediaprovider"]; |
| 390 | MediaProviderPermissionRequested media_provider_permission_requested = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 391 | 235 [(module) = "mediaprovider"]; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 392 | MediaProviderSchemaChanged media_provider_schema_changed = 236 [(module) = "mediaprovider"]; |
| 393 | MediaProviderIdleMaintenanceFinished media_provider_idle_maintenance_finished = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 394 | 237 [(module) = "mediaprovider"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 395 | RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"]; |
| 396 | BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"]; |
| 397 | BootTimeEventElapsedTime boot_time_event_elapsed_time_reported = |
| 398 | 240 [(module) = "framework"]; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 399 | BootTimeEventUtcTime boot_time_event_utc_time_reported = 241; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 400 | BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"]; |
Nikita Ioffe | 779d6be | 2020-02-06 23:17:17 +0000 | [diff] [blame] | 401 | UserspaceRebootReported userspace_reboot_reported = 243 [(module) = "framework"]; |
Muhammad Qureshi | 550b84c | 2020-02-03 14:17:59 -0800 | [diff] [blame] | 402 | NotificationReported notification_reported = 244 [(module) = "framework"]; |
Will Brockman | 7fb7944 | 2020-02-27 14:34:24 -0500 | [diff] [blame] | 403 | NotificationPanelReported notification_panel_reported = 245 [(module) = "sysui"]; |
| 404 | NotificationChannelModified notification_channel_modified = 246 [(module) = "framework"]; |
Muhammad Qureshi | e2b2432 | 2020-01-28 10:54:17 -0800 | [diff] [blame] | 405 | IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"]; |
| 406 | IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"]; |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 407 | CellBroadcastMessageReported cb_message_reported = |
| 408 | 249 [(module) = "cellbroadcast"]; |
| 409 | CellBroadcastMessageError cb_message_error = |
| 410 | 250 [(module) = "cellbroadcast"]; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 411 | WifiHealthStatReported wifi_health_stat_reported = 251 [(module) = "wifi"]; |
| 412 | WifiFailureStatReported wifi_failure_stat_reported = 252 [(module) = "wifi"]; |
| 413 | WifiConnectionResultReported wifi_connection_result_reported = 253 [(module) = "wifi"]; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 414 | AppFreezeChanged app_freeze_changed = 254 [(module) = "framework"]; |
Alessio Balsini | 628fb8d | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 415 | SnapshotMergeReported snapshot_merge_reported = 255; |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 416 | ForegroundServiceAppOpSessionEnded foreground_service_app_op_session_ended = |
| 417 | 256 [(module) = "framework"]; |
Alec Mouri | 5ac3262 | 2020-02-06 08:44:25 -0800 | [diff] [blame] | 418 | DisplayJankReported display_jank_reported = 257; |
Kweku Adams | 1275213 | 2020-02-18 15:36:48 -0800 | [diff] [blame] | 419 | AppStandbyBucketChanged app_standby_bucket_changed = 258 [(module) = "framework"]; |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 420 | SharesheetStarted sharesheet_started = 259 [(module) = "framework"]; |
thiruram | 70b0843 | 2020-06-09 18:44:02 -0700 | [diff] [blame] | 421 | RankingSelected ranking_selected = 260 [(module) = "framework", (module) = "sysui"]; |
Zhen Sun | 7dbb51a | 2020-04-07 16:05:12 -0700 | [diff] [blame] | 422 | TvSettingsUIInteracted tvsettings_ui_interacted = 261 [(module) = "tv_settings"]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 423 | LauncherStaticLayout launcher_snapshot = 262 [(module) = "sysui"]; |
Songchun Fan | c296cf7 | 2020-03-31 18:38:52 -0700 | [diff] [blame] | 424 | PackageInstallerV2Reported package_installer_v2_reported = 263 [(module) = "framework"]; |
Varun Shah | acb5634 | 2019-12-18 11:45:38 -0800 | [diff] [blame] | 425 | UserLifecycleJourneyReported user_lifecycle_journey_reported = 264 [(module) = "framework"]; |
| 426 | UserLifecycleEventOccurred user_lifecycle_event_occurred = 265 [(module) = "framework"]; |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 427 | AccessibilityShortcutReported accessibility_shortcut_reported = |
| 428 | 266 [(module) = "framework"]; |
jasonwshsu | 7b1be3e | 2020-04-27 15:21:07 +0800 | [diff] [blame] | 429 | AccessibilityServiceReported accessibility_service_reported = 267 [(module) = "settings"]; |
Diksha Gohlyan | b96b2f4 | 2020-04-30 09:20:42 -0700 | [diff] [blame] | 430 | DocsUIDragAndDropReported docs_ui_drag_and_drop_reported = 268 [(module) = "docsui"]; |
Jonathan Nguyen | 8d8ff53 | 2020-05-07 18:11:15 -0700 | [diff] [blame] | 431 | AppUsageEventOccurred app_usage_event_occurred = 269 [(module) = "framework"]; |
Nate Myren | e8f912bb | 2020-04-30 10:41:38 -0700 | [diff] [blame] | 432 | AutoRevokeNotificationClicked auto_revoke_notification_clicked = |
| 433 | 270 [(module) = "permissioncontroller"]; |
| 434 | AutoRevokeFragmentAppViewed auto_revoke_fragment_app_viewed = |
| 435 | 271 [(module) = "permissioncontroller"]; |
| 436 | AutoRevokedAppInteraction auto_revoked_app_interaction = |
| 437 | 272 [(module) = "permissioncontroller", (module) = "settings"]; |
| 438 | AppPermissionGroupsFragmentAutoRevokeAction |
| 439 | app_permission_groups_fragment_auto_revoke_action = |
| 440 | 273 [(module) = "permissioncontroller"]; |
Changyeon Jo | 51ae358 | 2020-04-14 09:41:00 -0700 | [diff] [blame] | 441 | EvsUsageStatsReported evs_usage_stats_reported = 274 [(module) = "evs"]; |
Robert Lee | cccdc15 | 2020-04-23 13:22:46 +0800 | [diff] [blame] | 442 | AudioPowerUsageDataReported audio_power_usage_data_reported = 275; |
Henry Fang | e316ab6 | 2020-04-21 18:43:14 -0700 | [diff] [blame] | 443 | TvTunerStateChanged tv_tuner_state_changed = 276 [(module) = "framework"]; |
Robert Luo | 2f52f04 | 2020-05-11 16:39:24 +0800 | [diff] [blame] | 444 | MediaOutputOpSwitchReported mediaoutput_op_switch_reported = |
| 445 | 277 [(module) = "settings"]; |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 446 | CellBroadcastMessageFiltered cb_message_filtered = |
| 447 | 278 [(module) = "cellbroadcast"]; |
Henry Fang | 1ae85bb | 2020-05-28 18:07:03 -0700 | [diff] [blame] | 448 | TvTunerDvrStatus tv_tuner_dvr_status = 279 [(module) = "framework"]; |
Henry Fang | fd40c07 | 2020-06-01 14:59:17 -0700 | [diff] [blame] | 449 | TvCasSessionOpenStatus tv_cas_session_open_status = |
| 450 | 280 [(module) = "framework"]; |
Govinda Wasserman | e464028 | 2020-04-30 09:30:56 -0400 | [diff] [blame] | 451 | AssistantInvocationReported assistant_invocation_reported = 281 [(module) = "framework"]; |
Denny cy Lee | ca62fc4 | 2020-05-28 18:13:07 +0800 | [diff] [blame] | 452 | DisplayWakeReported display_wake_reported = 282 [(module) = "framework"]; |
Mayank Garg | da5ca01 | 2020-05-14 00:23:53 -0700 | [diff] [blame] | 453 | CarUserHalModifyUserRequestReported car_user_hal_modify_user_request_reported = |
| 454 | 283 [(module) = "car"]; |
| 455 | CarUserHalModifyUserResponseReported car_user_hal_modify_user_response_reported = |
| 456 | 284 [(module) = "car"]; |
| 457 | CarUserHalPostSwitchResponseReported car_user_hal_post_switch_response_reported = |
| 458 | 285 [(module) = "car"]; |
| 459 | CarUserHalInitialUserInfoRequestReported car_user_hal_initial_user_info_request_reported = |
| 460 | 286 [(module) = "car"]; |
| 461 | CarUserHalInitialUserInfoResponseReported car_user_hal_initial_user_info_response_reported = |
| 462 | 287 [(module) = "car"]; |
| 463 | CarUserHalUserAssociationRequestReported car_user_hal_user_association_request_reported = |
| 464 | 288 [(module) = "car"]; |
| 465 | CarUserHalSetUserAssociationResponseReported car_user_hal_set_user_association_response_reported = |
| 466 | 289 [(module) = "car"]; |
lifr | 1cc318d | 2020-03-19 21:58:30 +0800 | [diff] [blame] | 467 | NetworkIpProvisioningReported network_ip_provisioning_reported = |
| 468 | 290 [(module) = "network_stack"]; |
| 469 | NetworkDhcpRenewReported network_dhcp_renew_reported = 291 [(module) = "network_stack"]; |
| 470 | NetworkValidationReported network_validation_reported = 292 [(module) = "network_stack"]; |
| 471 | NetworkStackQuirkReported network_stack_quirk_reported = 293 [(module) = "network_stack"]; |
Andy Hung | 48cffa3 | 2020-05-01 09:54:02 -0700 | [diff] [blame] | 472 | MediametricsAudioRecordDeviceUsageReported mediametrics_audiorecorddeviceusage_reported = |
| 473 | 294; |
| 474 | MediametricsAudioThreadDeviceUsageReported mediametrics_audiothreaddeviceusage_reported = |
| 475 | 295; |
| 476 | MediametricsAudioTrackDeviceUsageReported mediametrics_audiotrackdeviceusage_reported = |
| 477 | 296; |
| 478 | MediametricsAudioDeviceConnectionReported mediametrics_audiodeviceconnection_reported = |
| 479 | 297; |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 480 | BlobCommitted blob_committed = 298 [(module) = "framework"]; |
| 481 | BlobLeased blob_leased = 299 [(module) = "framework"]; |
| 482 | BlobOpened blob_opened = 300 [(module) = "framework"]; |
Tingting Wang | b4ecadb | 2020-04-27 15:34:45 +0000 | [diff] [blame] | 483 | ContactsProviderStatusReported contacts_provider_status_reported = 301; |
Hasini Gunasinghe | 7c336a6 | 2020-05-28 10:23:01 +0000 | [diff] [blame] | 484 | KeystoreKeyEventReported keystore_key_event_reported = 302; |
lifr | 8abf3a7 | 2020-06-13 11:24:34 +0800 | [diff] [blame] | 485 | NetworkTetheringReported network_tethering_reported = |
| 486 | 303 [(module) = "network_tethering"]; |
Maryam | de784e5 | 2020-06-22 11:46:48 -0700 | [diff] [blame] | 487 | ImeTouchReported ime_touch_reported = 304 [(module) = "sysui"]; |
Muhammad Qureshi | cdf291d | 2020-04-15 17:13:12 -0700 | [diff] [blame] | 488 | |
| 489 | // StatsdStats tracks platform atoms with ids upto 500. |
| 490 | // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 491 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 492 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 493 | // Pulled events will start at field 10000. |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 494 | // Next: 10084 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 495 | oneof pulled { |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 496 | WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"]; |
| 497 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"]; |
Muhammad Qureshi | 9b99580 | 2020-03-20 13:55:51 -0700 | [diff] [blame] | 498 | MobileBytesTransfer mobile_bytes_transfer = |
| 499 | 10002 [(module) = "framework", (truncate_timestamp) = true]; |
| 500 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = |
| 501 | 10003 [(module) = "framework", (truncate_timestamp) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 502 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"]; |
| 503 | KernelWakelock kernel_wakelock = 10004 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 504 | SubsystemSleepState subsystem_sleep_state = 10005 [(module) = "statsdtest"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 505 | CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 506 | CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework", (module) = "statsdtest"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 507 | CpuTimePerUidFreq cpu_time_per_uid_freq = |
| 508 | 10010 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 509 | WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"]; |
| 510 | ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"]; |
| 511 | BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"]; |
| 512 | ProcessMemoryState process_memory_state = 10013 [(module) = "framework"]; |
| 513 | SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"]; |
Muhammad Qureshi | b635b3a | 2020-04-22 20:57:41 -0700 | [diff] [blame] | 514 | SystemUptime system_uptime = 10015 [(module) = "framework"]; |
tsaichristine | a3d2ed8 | 2020-03-19 20:53:36 -0700 | [diff] [blame] | 515 | CpuActiveTime cpu_active_time = 10016 [(module) = "framework", (module) = "statsdtest"]; |
Muhammad Qureshi | b635b3a | 2020-04-22 20:57:41 -0700 | [diff] [blame] | 516 | CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 517 | DiskSpace disk_space = 10018 [deprecated=true, (module) = "statsdtest"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 518 | RemainingBatteryCapacity remaining_battery_capacity = 10019 [(module) = "framework"]; |
| 519 | FullBatteryCapacity full_battery_capacity = 10020 [(module) = "framework"]; |
Jeffrey Huang | 3eb84d4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 520 | Temperature temperature = 10021 [(module) = "framework", (module) = "statsdtest"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 521 | BinderCalls binder_calls = 10022 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 522 | BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 523 | LooperStats looper_stats = 10024 [(module) = "framework", (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 524 | DiskStats disk_stats = 10025 [(module) = "framework"]; |
| 525 | DirectoryUsage directory_usage = 10026 [(module) = "framework"]; |
| 526 | AppSize app_size = 10027 [(module) = "framework"]; |
| 527 | CategorySize category_size = 10028 [(module) = "framework"]; |
| 528 | ProcStats proc_stats = 10029 [(module) = "framework"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 529 | BatteryVoltage battery_voltage = 10030 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 530 | NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"]; |
| 531 | DiskIo disk_io = 10032 [(module) = "framework"]; |
| 532 | PowerProfile power_profile = 10033 [(module) = "framework"]; |
| 533 | ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"]; |
| 534 | ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"]; |
| 535 | CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"]; |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 536 | OnDevicePowerMeasurement on_device_power_measurement = 10038; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 537 | DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"]; |
| 538 | DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = |
| 539 | 10040 [(module) = "framework"]; |
| 540 | DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = |
| 541 | 10041 [(module) = "framework"]; |
| 542 | ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"]; |
Jeffrey Huang | 9a3c1b6 | 2020-01-27 17:33:13 -0800 | [diff] [blame] | 543 | BatteryLevel battery_level = 10043 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 544 | BuildInformation build_information = 10044 [(module) = "framework"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 545 | BatteryCycleCount battery_cycle_count = 10045 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 546 | DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"]; |
| 547 | DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"]; |
| 548 | NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"]; |
| 549 | RoleHolder role_holder = 10049 [(module) = "framework"]; |
| 550 | DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"]; |
Jeffrey Huang | 74fc435 | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 551 | TrainInfo train_info = 10051 [(module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 552 | TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"]; |
| 553 | ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 554 | GpuStatsGlobalInfo gpu_stats_global_info = 10054; |
| 555 | GpuStatsAppInfo gpu_stats_app_info = 10055; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 556 | SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"]; |
| 557 | AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"]; |
| 558 | FaceSettings face_settings = 10058 [(module) = "framework"]; |
| 559 | CoolingDevice cooling_device = 10059 [(module) = "framework"]; |
| 560 | AppOps app_ops = 10060 [(module) = "framework"]; |
| 561 | ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"]; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 562 | SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062; |
| 563 | SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 564 | ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"]; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 565 | VmsClientStats vms_client_stats = 10065 [(module) = "car"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 566 | NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"]; |
| 567 | DangerousPermissionStateSampled dangerous_permission_state_sampled = |
| 568 | 10067 [(module) = "framework"]; |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 569 | GraphicsStats graphics_stats = 10068; |
Stanislav Zholnin | 88c6f32 | 2020-01-29 14:48:11 +0000 | [diff] [blame] | 570 | RuntimeAppOpAccess runtime_app_op_access = 10069 [(module) = "framework"]; |
Kenny Root | 6c218db | 2020-02-02 17:43:44 +0000 | [diff] [blame] | 571 | IonHeapSize ion_heap_size = 10070 [(module) = "framework"]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 572 | PackageNotificationPreferences package_notification_preferences = |
| 573 | 10071 [(module) = "framework"]; |
| 574 | PackageNotificationChannelPreferences package_notification_channel_preferences = |
| 575 | 10072 [(module) = "framework"]; |
| 576 | PackageNotificationChannelGroupPreferences package_notification_channel_group_preferences = |
| 577 | 10073 [(module) = "framework"]; |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 578 | GnssStats gnss_stats = 10074 [(module) = "framework"]; |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 579 | AttributedAppOps attributed_app_ops = 10075 [(module) = "framework"]; |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 580 | VoiceCallSession voice_call_session = 10076 [(module) = "telephony"]; |
| 581 | VoiceCallRatUsage voice_call_rat_usage = 10077 [(module) = "telephony"]; |
| 582 | SimSlotState sim_slot_state = 10078 [(module) = "telephony"]; |
| 583 | SupportedRadioAccessFamily supported_radio_access_family = 10079 [(module) = "telephony"]; |
Raff Tsai | ea4db18 | 2020-03-06 07:45:43 +0800 | [diff] [blame] | 584 | SettingSnapshot setting_snapshot = 10080 [(module) = "framework"]; |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 585 | BlobInfo blob_info = 10081 [(module) = "framework"]; |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 586 | DataUsageBytesTransfer data_usage_bytes_transfer = 10082 [(module) = "framework"]; |
Ruchir Rastogi | 56579cb | 2020-05-14 10:44:19 -0700 | [diff] [blame] | 587 | BytesTransferByTagAndMetered bytes_transfer_by_tag_and_metered = |
| 588 | 10083 [(module) = "framework"]; |
Chris Wren | 9316569 | 2020-05-15 16:12:41 -0400 | [diff] [blame] | 589 | DNDModeProto dnd_mode_rule = 10084 [(module) = "framework"]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 590 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 591 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 592 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 593 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 594 | // 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] | 595 | |
| 596 | reserved 10036; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 597 | } |
| 598 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 599 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 600 | * This proto represents a node of an attribution chain. |
| 601 | * Note: All attribution chains are represented as a repeated field of type |
| 602 | * AttributionNode. It is understood that in such arrays, the order is that |
| 603 | * 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] | 604 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 605 | message AttributionNode { |
| 606 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 607 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 608 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 609 | // The (optional) string tag for an element in the attribution chain. If the |
| 610 | // element has no tag, it is encoded as an empty string. |
| 611 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 612 | } |
| 613 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 614 | message KeyValuePair { |
| 615 | optional int32 key = 1; |
| 616 | oneof value { |
Howard Ro | 4078dd4 | 2018-09-27 17:41:08 -0700 | [diff] [blame] | 617 | int32 value_int = 2; |
| 618 | int64 value_long = 3; |
| 619 | string value_str = 4; |
| 620 | float value_float = 5; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 621 | } |
| 622 | } |
| 623 | |
| 624 | message KeyValuePairsAtom { |
| 625 | optional int32 uid = 1; |
| 626 | repeated KeyValuePair pairs = 2; |
| 627 | } |
| 628 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 629 | /* |
| 630 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 631 | * 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] | 632 | * |
| 633 | * RULES: |
| 634 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 635 | * Skipping field ids is not allowed. |
| 636 | * - These form an API, so renaming, renumbering or removing fields is |
| 637 | * not allowed between android releases. (This is not currently enforced, |
| 638 | * but there will be a tool to enforce this restriction). |
| 639 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 640 | * are allowed (yet). The bytes type is also not allowed. |
| 641 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 642 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 643 | * - 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] | 644 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 645 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 646 | * annotation. The generated code on android will be represented by UIDs, |
| 647 | * and those UIDs will be translated in xxx to those strings. |
| 648 | * |
| 649 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 650 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 651 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 652 | * ***************************************************************************** |
| 653 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 654 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 655 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 656 | * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 657 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 658 | * |
| 659 | * Logged from: |
| 660 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 661 | */ |
| 662 | message ThermalThrottlingStateChanged { |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 663 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 664 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 665 | |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 666 | // Throttling state, this field is DEPRECATED |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 667 | enum State { |
| 668 | UNKNOWN = 0; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 669 | START = 1; // START indicated that throttling was triggered. |
| 670 | STOP = 2; // STOP indicates that throttling was cleared. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 671 | } |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 672 | optional State state = 2; |
| 673 | |
| 674 | optional float temperature = 3; |
| 675 | } |
| 676 | |
| 677 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 678 | * Logs when the screen state changes. |
| 679 | * |
| 680 | * Logged from: |
| 681 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 682 | */ |
| 683 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 684 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 685 | optional android.view.DisplayStateEnum state = 1 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 686 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 687 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 688 | |
| 689 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 690 | * Logs that the process state of the uid, as determined by ActivityManager |
| 691 | * (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] | 692 | * |
| 693 | * Logged from: |
| 694 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 695 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 696 | message UidProcessStateChanged { |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 697 | 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] | 698 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 699 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 700 | optional android.app.ProcessStateEnum state = 2 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 701 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 702 | } |
| 703 | |
| 704 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 705 | * Logs process state change of a process, as per the activity manager. |
| 706 | * |
| 707 | * Logged from: |
| 708 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 709 | */ |
| 710 | message ProcessStateChanged { |
| 711 | optional int32 uid = 1; |
| 712 | optional string process_name = 2; |
| 713 | optional string package_name = 3; |
| 714 | // TODO: remove this when validation is done |
| 715 | optional int64 version = 5; |
| 716 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 717 | optional android.app.ProcessStateEnum state = 4; |
| 718 | } |
| 719 | |
| 720 | /** |
| 721 | * Logs when ActivityManagerService sleep state is changed. |
| 722 | * |
| 723 | * Logged from: |
| 724 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 725 | */ |
| 726 | message ActivityManagerSleepStateChanged { |
| 727 | // TODO: import frameworks proto |
| 728 | enum State { |
| 729 | UNKNOWN = 0; |
| 730 | ASLEEP = 1; |
| 731 | AWAKE = 2; |
| 732 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 733 | optional State state = 1 |
| 734 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 735 | } |
| 736 | |
| 737 | /** |
| 738 | * Logs when system memory state changes. |
| 739 | * |
| 740 | * Logged from: |
| 741 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 742 | */ |
| 743 | message MemoryFactorStateChanged { |
| 744 | // TODO: import frameworks proto |
| 745 | enum State { |
| 746 | MEMORY_UNKNOWN = 0; |
| 747 | NORMAL = 1; // normal. |
| 748 | MODERATE = 2; // moderate memory pressure. |
| 749 | LOW = 3; // low memory. |
| 750 | CRITICAL = 4; // critical memory. |
| 751 | |
| 752 | } |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 753 | optional State factor = 1 [(state_field_option).exclusive_state = true]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 754 | } |
| 755 | |
| 756 | /** |
| 757 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 758 | * |
| 759 | * Logged from: |
| 760 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 761 | */ |
| 762 | message ExcessiveCpuUsageReported { |
| 763 | optional int32 uid = 1; |
| 764 | optional string process_name = 2; |
| 765 | optional string package_name = 3; |
| 766 | // package version. TODO: remove this when validation is done |
| 767 | optional int64 version = 4; |
| 768 | } |
| 769 | |
| 770 | /** |
| 771 | * Logs when a cached process is killed, along with its pss. |
| 772 | * |
| 773 | * Logged from: |
| 774 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 775 | */ |
| 776 | message CachedKillReported { |
| 777 | optional int32 uid = 1; |
| 778 | optional string process_name = 2; |
| 779 | optional string package_name = 3; |
| 780 | // TODO: remove this when validation is done |
| 781 | optional int64 version = 5; |
| 782 | optional int64 pss = 4; |
| 783 | } |
| 784 | |
| 785 | /** |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 786 | * Logs the change in wifi health. |
| 787 | * |
| 788 | * Logged from: |
| 789 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDataStall.java |
| 790 | */ |
| 791 | message WifiHealthStatReported { |
xshu | 39bfd93 | 2020-02-14 15:49:24 -0800 | [diff] [blame] | 792 | enum Band { |
| 793 | UNKNOWN = 0; |
| 794 | // All of 2.4GHz band |
| 795 | BAND_2G = 1; |
| 796 | // Frequencies in the range of [5150, 5250) GHz |
| 797 | BAND_5G_LOW = 2; |
| 798 | // Frequencies in the range of [5250, 5725) GHz |
| 799 | BAND_5G_MIDDLE = 3; |
| 800 | // Frequencies in the range of [5725, 5850) GHz |
| 801 | BAND_5G_HIGH = 4; |
| 802 | // Frequencies in the range of [5925, 6425) GHz |
| 803 | BAND_6G_LOW = 5; |
| 804 | // Frequencies in the range of [6425, 6875) GHz |
| 805 | BAND_6G_MIDDLE = 6; |
| 806 | // Frequencies in the range of [6875, 7125) GHz |
| 807 | BAND_6G_HIGH = 7; |
| 808 | } |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 809 | // duration this stat is obtained over in milliseconds |
| 810 | optional int32 duration_millis = 1; |
| 811 | // whether wifi is classified as sufficient for the user's data traffic, determined |
| 812 | // by whether the calculated throughput exceeds the average demand within |duration_millis| |
| 813 | optional bool is_sufficient = 2; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 814 | // whether cellular data is available |
xshu | 39bfd93 | 2020-02-14 15:49:24 -0800 | [diff] [blame] | 815 | optional bool is_cell_data_available = 3; |
| 816 | // the Band bucket the connected network is on |
| 817 | optional Band band = 4; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 818 | } |
| 819 | |
| 820 | /** |
| 821 | * Logged when wifi detects a significant change in connection failure rate. |
| 822 | * |
| 823 | * Logged from: frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiHealthMonitor.java |
| 824 | * |
| 825 | */ |
| 826 | message WifiFailureStatReported { |
| 827 | enum AbnormalityType { |
| 828 | UNKNOWN = 0; |
| 829 | SIGNIFICANT_INCREASE = 1; |
| 830 | SIGNIFICANT_DECREASE = 2; |
| 831 | SIMPLY_HIGH = 3; |
| 832 | } |
| 833 | enum FailureType { |
| 834 | FAILURE_UNKNOWN = 0; |
| 835 | FAILURE_CONNECTION = 1; |
| 836 | FAILURE_ASSOCIATION_REJECTION = 2; |
| 837 | FAILURE_ASSOCIATION_TIMEOUT = 3; |
| 838 | FAILURE_AUTHENTICATION = 4; |
| 839 | FAILURE_NON_LOCAL_DISCONNECTION = 5; |
| 840 | FAILURE_SHORT_CONNECTION_DUE_TO_NON_LOCAL_DISCONNECTION = 6; |
| 841 | } |
| 842 | // Reason for uploading this stat |
| 843 | optional AbnormalityType abnormality_type = 1; |
| 844 | // The particular type of failure |
| 845 | optional FailureType failure_type = 2; |
| 846 | // How many times we have encountered this combination of AbnormalityType and FailureType |
| 847 | optional int32 failure_count = 3; |
| 848 | } |
| 849 | |
| 850 | /** |
| 851 | * Logs whether a wifi connection is successful and reasons for failure if it isn't. |
| 852 | * |
| 853 | * Logged from: |
| 854 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
| 855 | */ |
| 856 | message WifiConnectionResultReported { |
| 857 | enum FailureCode { |
| 858 | FAILURE_UNKNOWN = 0; |
| 859 | FAILURE_ASSOCIATION_TIMEOUT = 1; |
| 860 | FAILURE_ASSOCIATION_REJECTION = 2; |
| 861 | FAILURE_AUTHENTICATION_GENERAL = 3; |
| 862 | FAILURE_AUTHENTICATION_EAP = 4; |
| 863 | FAILURE_DHCP = 5; |
| 864 | FAILURE_NETWORK_DISCONNECTION = 6; |
| 865 | FAILURE_ROAM_TIMEOUT = 7; |
| 866 | } |
| 867 | // true represents a successful connection |
| 868 | optional bool connection_result = 1; |
| 869 | // reason for the connection failure |
| 870 | optional FailureCode failure_code = 2; |
| 871 | // scan rssi before the connection attempt |
| 872 | optional int32 rssi = 3; |
| 873 | } |
| 874 | |
| 875 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 876 | * Logs when memory stats of a process is reported. |
| 877 | * |
| 878 | * Logged from: |
| 879 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 880 | */ |
| 881 | message ProcessMemoryStatReported { |
| 882 | optional int32 uid = 1; |
| 883 | optional string process_name = 2; |
| 884 | optional string package_name = 3; |
| 885 | //TODO: remove this when validation is done |
| 886 | optional int64 version = 9; |
| 887 | optional int64 pss = 4; |
| 888 | optional int64 uss = 5; |
| 889 | optional int64 rss = 6; |
| 890 | enum Type { |
| 891 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 892 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 893 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 894 | ADD_PSS_EXTERNAL = 3; |
| 895 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 896 | } |
| 897 | optional Type type = 7; |
Muhammad Qureshi | dda7320 | 2019-03-07 13:54:20 -0800 | [diff] [blame] | 898 | optional int64 duration_millis = 8; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 899 | } |
| 900 | |
| 901 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 902 | * Logs that a process started, finished, crashed, or ANRed. |
| 903 | * |
| 904 | * Logged from: |
| 905 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 906 | */ |
| 907 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 908 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 909 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 910 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 911 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 912 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 913 | // What lifecycle state the process changed to. |
| 914 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 915 | enum State { |
| 916 | FINISHED = 0; |
| 917 | STARTED = 1; |
| 918 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 919 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 920 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 921 | } |
| 922 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 923 | /** |
| 924 | * Logs when the ble scan state changes. |
| 925 | * |
| 926 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 927 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 928 | */ |
| 929 | message BleScanStateChanged { |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 930 | repeated AttributionNode attribution_node = 1 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 931 | [(state_field_option).primary_field_first_uid = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 932 | |
| 933 | enum State { |
| 934 | OFF = 0; |
| 935 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 936 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 937 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 938 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 939 | optional State state = 2 [ |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 940 | (state_field_option).exclusive_state = true, |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 941 | (state_field_option).default_state_value = 0 /* State.OFF */, |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 942 | (state_field_option).trigger_state_reset_value = 2 /* State.RESET */, |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 943 | (state_field_option).nested = true |
| 944 | ]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 945 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 946 | // Does the scan have a filter. |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 947 | optional bool is_filtered = 3 [(state_field_option).primary_field = true]; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 948 | // 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] | 949 | optional bool is_first_match = 4 [(state_field_option).primary_field = true]; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 950 | // 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] | 951 | optional bool is_opportunistic = 5 [(state_field_option).primary_field = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 952 | } |
| 953 | |
| 954 | /** |
| 955 | * Logs reporting of a ble scan finding results. |
| 956 | * |
| 957 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 958 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 959 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 960 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 961 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 962 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 963 | |
| 964 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 965 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 966 | } |
| 967 | |
| 968 | /** |
| 969 | * Logs when a sensor state changes. |
| 970 | * |
| 971 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 972 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 973 | */ |
| 974 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 975 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 976 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 977 | // The id (int) of the sensor. |
| 978 | optional int32 sensor_id = 2; |
| 979 | |
| 980 | enum State { |
| 981 | OFF = 0; |
| 982 | ON = 1; |
| 983 | } |
| 984 | optional State state = 3; |
| 985 | } |
| 986 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 987 | /** |
| 988 | * Logs when GPS state changes. |
| 989 | * |
| 990 | * Logged from: |
| 991 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 992 | */ |
| 993 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 994 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 995 | |
| 996 | enum State { |
| 997 | OFF = 0; |
| 998 | ON = 1; |
| 999 | } |
| 1000 | optional State state = 2; |
| 1001 | } |
| 1002 | |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 1003 | /** |
| 1004 | * Logs when GPS signal quality. |
| 1005 | * |
| 1006 | * Logged from: |
| 1007 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 1008 | */ |
| 1009 | message GpsSignalQualityChanged { |
| 1010 | optional android.server.location.GpsSignalQualityEnum level = 1; |
| 1011 | } |
| 1012 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1013 | |
| 1014 | /** |
| 1015 | * Logs when a sync manager sync state changes. |
| 1016 | * |
| 1017 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1018 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1019 | */ |
| 1020 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1021 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1022 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1023 | // 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] | 1024 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1025 | |
| 1026 | enum State { |
| 1027 | OFF = 0; |
| 1028 | ON = 1; |
| 1029 | } |
| 1030 | optional State state = 3; |
| 1031 | } |
| 1032 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 1033 | /* |
| 1034 | * Deferred job stats. |
| 1035 | * |
| 1036 | * Logged from: |
| 1037 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 1038 | */ |
| 1039 | message DeferredJobStatsReported { |
| 1040 | repeated AttributionNode attribution_node = 1; |
| 1041 | |
| 1042 | // Number of jobs deferred. |
| 1043 | optional int32 num_jobs_deferred = 2; |
| 1044 | |
| 1045 | // Time since the last job runs. |
| 1046 | optional int64 time_since_last_job_millis = 3; |
| 1047 | } |
| 1048 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1049 | /** |
| 1050 | * Logs when a job scheduler job state changes. |
| 1051 | * |
| 1052 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1053 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1054 | */ |
| 1055 | message ScheduledJobStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1056 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1057 | |
| 1058 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1059 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1060 | |
| 1061 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 1062 | FINISHED = 0; |
| 1063 | STARTED = 1; |
| 1064 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1065 | } |
| 1066 | optional State state = 3; |
| 1067 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 1068 | // The reason a job has stopped. |
| 1069 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1070 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 1071 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 1072 | |
| 1073 | // The standby bucket of the app that scheduled the job. These match the framework constants |
| 1074 | // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is |
| 1075 | // already assigned 0. |
| 1076 | enum Bucket { |
| 1077 | UNKNOWN = -1; |
| 1078 | ACTIVE = 0; |
| 1079 | WORKING_SET = 1; |
| 1080 | FREQUENT = 2; |
| 1081 | RARE = 3; |
| 1082 | NEVER = 4; |
Kweku Adams | ae9d6be | 2020-01-14 16:10:14 -0800 | [diff] [blame] | 1083 | RESTRICTED = 5; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 1084 | } |
| 1085 | optional Bucket standby_bucket = 5 [default = UNKNOWN]; |
| 1086 | |
| 1087 | // The job id (as assigned by the app). |
| 1088 | optional int32 job_id = 6; |
Suprabh Shukla | 1b5778d | 2020-02-18 16:39:02 -0800 | [diff] [blame] | 1089 | |
| 1090 | // One flag for each of the API constraints defined by Jobscheduler. Does not include implcit |
| 1091 | // constraints as they are always assumed to be set. |
| 1092 | optional bool has_charging_constraint = 7; |
| 1093 | optional bool has_battery_not_low_constraint = 8; |
| 1094 | optional bool has_storage_not_low_constraint = 9; |
| 1095 | optional bool has_timing_delay_constraint = 10; |
| 1096 | optional bool has_deadline_constraint = 11; |
| 1097 | optional bool has_idle_constraint = 12; |
| 1098 | optional bool has_connectivity_constraint = 13; |
| 1099 | optional bool has_content_trigger_constraint = 14; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1100 | } |
| 1101 | |
| 1102 | /** |
| 1103 | * Logs when the audio state changes. |
| 1104 | * |
| 1105 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1106 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1107 | */ |
| 1108 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1109 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1110 | |
| 1111 | enum State { |
| 1112 | OFF = 0; |
| 1113 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1114 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 1115 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1116 | } |
| 1117 | optional State state = 2; |
| 1118 | } |
| 1119 | |
| 1120 | /** |
| 1121 | * Logs when the video codec state changes. |
| 1122 | * |
| 1123 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1124 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1125 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1126 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1127 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1128 | |
| 1129 | enum State { |
| 1130 | OFF = 0; |
| 1131 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1132 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 1133 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1134 | } |
| 1135 | optional State state = 2; |
| 1136 | } |
| 1137 | |
| 1138 | /** |
| 1139 | * Logs when the flashlight state changes. |
| 1140 | * |
| 1141 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1142 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1143 | */ |
| 1144 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1145 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1146 | |
| 1147 | enum State { |
| 1148 | OFF = 0; |
| 1149 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1150 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 1151 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1152 | } |
| 1153 | optional State state = 2; |
| 1154 | } |
| 1155 | |
| 1156 | /** |
| 1157 | * Logs when the camera state changes. |
| 1158 | * |
| 1159 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1160 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1161 | */ |
| 1162 | message CameraStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1163 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1164 | |
| 1165 | enum State { |
| 1166 | OFF = 0; |
| 1167 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1168 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 1169 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1170 | } |
| 1171 | optional State state = 2; |
| 1172 | } |
| 1173 | |
| 1174 | /** |
| 1175 | * 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] | 1176 | * |
| 1177 | * Logged from: |
| 1178 | * TODO |
| 1179 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 1180 | message WakelockStateChanged { |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 1181 | repeated AttributionNode attribution_node = 1 |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1182 | [(state_field_option).primary_field_first_uid = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1183 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1184 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 1185 | // From frameworks/base/core/proto/android/os/enums.proto. |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1186 | optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).primary_field = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1187 | |
| 1188 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1189 | optional string tag = 3 [(state_field_option).primary_field = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1190 | |
| 1191 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 1192 | RELEASE = 0; |
| 1193 | ACQUIRE = 1; |
| 1194 | CHANGE_RELEASE = 2; |
| 1195 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1196 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 1197 | optional State state = 4 [ |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 1198 | (state_field_option).exclusive_state = true, |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 1199 | (state_field_option).default_state_value = 0, |
| 1200 | (state_field_option).nested = true |
| 1201 | ]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1202 | } |
| 1203 | |
| 1204 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1205 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 1206 | * |
| 1207 | * Logged from: |
| 1208 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1209 | */ |
| 1210 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1211 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1212 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1213 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 1214 | optional string tag = 2; |
| 1215 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1216 | // TODO: I have no idea what this is. |
| 1217 | optional string history_tag = 3; |
| 1218 | |
| 1219 | enum State { |
| 1220 | OFF = 0; |
| 1221 | ON = 1; |
| 1222 | } |
| 1223 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1224 | } |
| 1225 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1226 | /** |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 1227 | * Logs when the device is interactive, according to the PowerManager Notifier. |
| 1228 | * |
| 1229 | * Logged from: |
| 1230 | * frameworks/base/services/core/java/com/android/server/power/Notifier.java |
| 1231 | */ |
| 1232 | message InteractiveStateChanged { |
| 1233 | enum State { |
| 1234 | OFF = 0; |
| 1235 | ON = 1; |
| 1236 | } |
| 1237 | optional State state = 1; |
| 1238 | } |
| 1239 | |
| 1240 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1241 | * Logs Battery Saver state change. |
| 1242 | * |
| 1243 | * Logged from: |
| 1244 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1245 | */ |
| 1246 | message BatterySaverModeStateChanged { |
| 1247 | enum State { |
| 1248 | OFF = 0; |
| 1249 | ON = 1; |
| 1250 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 1251 | optional State state = 1 |
| 1252 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1253 | } |
| 1254 | |
| 1255 | /** |
| 1256 | * Logs Doze mode state change. |
| 1257 | * |
| 1258 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1259 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1260 | */ |
| 1261 | message DeviceIdleModeStateChanged { |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 1262 | optional android.server.DeviceIdleModeEnum state = 1 |
| 1263 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1264 | } |
| 1265 | |
| 1266 | |
| 1267 | /** |
| 1268 | * Logs state change of Doze mode including maintenance windows. |
| 1269 | * |
| 1270 | * Logged from: |
| 1271 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1272 | */ |
| 1273 | message DeviceIdlingModeStateChanged { |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 1274 | optional android.server.DeviceIdleModeEnum state = 1 |
| 1275 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1276 | } |
| 1277 | |
| 1278 | /** |
| 1279 | * Logs screen brightness level. |
| 1280 | * |
| 1281 | * Logged from: |
| 1282 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1283 | */ |
| 1284 | message ScreenBrightnessChanged { |
| 1285 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 1286 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1287 | } |
| 1288 | |
| 1289 | /** |
| 1290 | * Logs battery level (percent full, from 0 to 100). |
| 1291 | * |
| 1292 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1293 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1294 | */ |
| 1295 | message BatteryLevelChanged { |
| 1296 | // Battery level. Should be in [0, 100]. |
| 1297 | optional int32 battery_level = 1; |
| 1298 | } |
| 1299 | |
| 1300 | /** |
| 1301 | * Logs change in charging status of the device. |
| 1302 | * |
| 1303 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1304 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1305 | */ |
| 1306 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1307 | // 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] | 1308 | optional android.os.BatteryStatusEnum state = 1 |
| 1309 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1310 | } |
| 1311 | |
| 1312 | /** |
| 1313 | * Logs whether the device is plugged in, and what power source it is using. |
| 1314 | * |
| 1315 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1316 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1317 | */ |
| 1318 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1319 | // 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] | 1320 | optional android.os.BatteryPluggedStateEnum state = 1 |
| 1321 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1322 | } |
| 1323 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1324 | /** |
| 1325 | * Logs when an app's wakeup alarm fires. |
| 1326 | * |
| 1327 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1328 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1329 | */ |
| 1330 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1331 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1332 | |
| 1333 | // Name of the wakeup alarm. |
| 1334 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame] | 1335 | |
| 1336 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 1337 | optional string package_name = 3; |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1338 | |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1339 | // 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] | 1340 | optional AppStandbyBucketChanged.Bucket app_standby_bucket = 4; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1341 | } |
| 1342 | |
| 1343 | /** |
| 1344 | * Logs when an an app causes the mobile radio to change state. |
| 1345 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 1346 | * |
| 1347 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1348 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1349 | */ |
| 1350 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1351 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1352 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1353 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1354 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1355 | } |
| 1356 | |
| 1357 | /** |
| 1358 | * Logs when an an app causes the wifi radio to change state. |
| 1359 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 1360 | * |
| 1361 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1362 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1363 | */ |
| 1364 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1365 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1366 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1367 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1368 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1369 | } |
| 1370 | |
| 1371 | /** |
| 1372 | * Logs kernel wakeup reasons and aborts. |
| 1373 | * |
| 1374 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 1375 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1376 | */ |
| 1377 | message KernelWakeupReported { |
| 1378 | // Name of the kernel wakeup reason (or abort). |
| 1379 | optional string wakeup_reason_name = 1; |
| 1380 | |
| 1381 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1382 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1383 | } |
| 1384 | |
| 1385 | /** |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1386 | * Logs when Wifi is toggled on/off. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1387 | * 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] | 1388 | * |
| 1389 | * Logged from: |
| 1390 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1391 | */ |
| 1392 | message WifiEnabledStateChanged { |
| 1393 | enum State { |
| 1394 | OFF = 0; |
| 1395 | ON = 1; |
| 1396 | } |
| 1397 | optional State state = 1; |
| 1398 | } |
| 1399 | |
| 1400 | /** |
tsaichristine | cecebdc | 2020-02-04 14:05:56 -0800 | [diff] [blame] | 1401 | * This atom is deprecated starting in R. |
| 1402 | * |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1403 | * 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] | 1404 | * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'. |
| 1405 | * Note that Wifi Scanning is monitored separately in WifiScanStateChanged. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1406 | * |
| 1407 | * Logged from: |
| 1408 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1409 | */ |
| 1410 | message WifiRunningStateChanged { |
| 1411 | repeated AttributionNode attribution_node = 1; |
| 1412 | |
| 1413 | enum State { |
| 1414 | OFF = 0; |
| 1415 | ON = 1; |
| 1416 | } |
| 1417 | optional State state = 2; |
| 1418 | } |
| 1419 | |
| 1420 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1421 | * Logs wifi locks held by an app. |
| 1422 | * |
| 1423 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1424 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1425 | */ |
| 1426 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1427 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1428 | |
| 1429 | enum State { |
| 1430 | OFF = 0; |
| 1431 | ON = 1; |
| 1432 | } |
| 1433 | optional State state = 2; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 1434 | |
| 1435 | // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto. |
| 1436 | optional android.net.wifi.WifiModeEnum mode = 3; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1437 | } |
| 1438 | |
| 1439 | /** |
| 1440 | * Logs wifi signal strength changes. |
| 1441 | * |
| 1442 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1443 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1444 | */ |
| 1445 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1446 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1447 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1448 | } |
| 1449 | |
| 1450 | /** |
| 1451 | * Logs wifi scans performed by an app. |
| 1452 | * |
| 1453 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1454 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1455 | */ |
| 1456 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1457 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1458 | |
| 1459 | enum State { |
| 1460 | OFF = 0; |
| 1461 | ON = 1; |
| 1462 | } |
| 1463 | optional State state = 2; |
| 1464 | } |
| 1465 | |
| 1466 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1467 | * Logs wifi multicast locks held by an app |
| 1468 | * |
| 1469 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1470 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1471 | */ |
| 1472 | message WifiMulticastLockStateChanged { |
| 1473 | repeated AttributionNode attribution_node = 1; |
| 1474 | |
| 1475 | enum State { |
| 1476 | OFF = 0; |
| 1477 | ON = 1; |
| 1478 | } |
| 1479 | optional State state = 2; |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1480 | |
| 1481 | optional string tag = 3; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1482 | } |
| 1483 | |
| 1484 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1485 | * Logs shutdown reason and duration on next boot. |
| 1486 | * |
| 1487 | * Logged from: |
| 1488 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 1489 | */ |
| 1490 | message ShutdownSequenceReported { |
| 1491 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 1492 | optional bool reboot = 1; |
| 1493 | |
| 1494 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 1495 | optional string reason = 2; |
| 1496 | |
| 1497 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 1498 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1499 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1500 | |
| 1501 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1502 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1503 | } |
| 1504 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1505 | |
| 1506 | /** |
| 1507 | * Logs boot reason and duration. |
| 1508 | * |
| 1509 | * Logged from: |
| 1510 | * system/core/bootstat/bootstat.cpp |
| 1511 | */ |
| 1512 | message BootSequenceReported { |
| 1513 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 1514 | // Default: "<EMPTY>" if not available. |
| 1515 | optional string bootloader_reason = 1; |
| 1516 | |
| 1517 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 1518 | // Default: "<EMPTY>" if not available. |
| 1519 | optional string system_reason = 2; |
| 1520 | |
| 1521 | // 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] | 1522 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1523 | |
| 1524 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1525 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1526 | |
| 1527 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1528 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1529 | |
| 1530 | // Time since last boot in ms. Default: 0 if not available. |
| 1531 | optional int64 time_since_last_boot = 6; |
| 1532 | } |
| 1533 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 1534 | |
| 1535 | /** |
| 1536 | * Logs call state and disconnect cause (if applicable). |
| 1537 | * |
| 1538 | * Logged from: |
| 1539 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 1540 | */ |
| 1541 | message CallStateChanged { |
| 1542 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 1543 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1544 | optional android.telecom.CallStateEnum call_state = 1; |
| 1545 | |
| 1546 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 1547 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 1548 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 1549 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1550 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 1551 | |
| 1552 | // True if the call is self-managed, which are apps that use the |
| 1553 | // telecom infrastructure to make their own calls. |
| 1554 | optional bool self_managed = 3; |
| 1555 | |
| 1556 | // True if call is external. External calls are calls on connected Wear |
| 1557 | // devices but show up in Telecom so the user can pull them onto the device. |
| 1558 | optional bool external_call = 4; |
| 1559 | } |
| 1560 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1561 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1562 | * Logs keyguard state. The keyguard is the lock screen. |
| 1563 | * |
| 1564 | * Logged from: |
| 1565 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 1566 | */ |
| 1567 | message KeyguardStateChanged { |
| 1568 | enum State { |
| 1569 | UNKNOWN = 0; |
| 1570 | // The keyguard is hidden when the phone is unlocked. |
| 1571 | HIDDEN = 1; |
| 1572 | // The keyguard is shown when the phone is locked (screen turns off). |
| 1573 | SHOWN= 2; |
| 1574 | // The keyguard is occluded when something is overlaying the keyguard. |
| 1575 | // Eg. Opening the camera while on the lock screen. |
| 1576 | OCCLUDED = 3; |
| 1577 | } |
| 1578 | optional State state = 1; |
| 1579 | } |
| 1580 | |
| 1581 | /** |
| 1582 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 1583 | * prompts the user to enter a password (pattern, pin, etc). |
| 1584 | * |
| 1585 | * Logged from: |
| 1586 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 1587 | */ |
| 1588 | |
| 1589 | message KeyguardBouncerStateChanged { |
| 1590 | enum State { |
| 1591 | UNKNOWN = 0; |
| 1592 | // Bouncer is hidden, either as a result of successfully entering the |
| 1593 | // password, screen timing out, or user going back to lock screen. |
| 1594 | HIDDEN = 1; |
| 1595 | // This is when the user is being prompted to enter the password. |
| 1596 | SHOWN = 2; |
| 1597 | } |
| 1598 | optional State state = 1; |
| 1599 | } |
| 1600 | |
| 1601 | /** |
| 1602 | * Logs the result of entering a password into the keyguard bouncer. |
| 1603 | * |
| 1604 | * Logged from: |
| 1605 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 1606 | */ |
| 1607 | message KeyguardBouncerPasswordEntered { |
| 1608 | enum BouncerResult { |
| 1609 | UNKNOWN = 0; |
| 1610 | // The password entered was incorrect. |
| 1611 | FAILURE = 1; |
| 1612 | // The password entered was correct. |
| 1613 | SUCCESS = 2; |
| 1614 | } |
| 1615 | optional BouncerResult result = 1; |
| 1616 | } |
| 1617 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1618 | /* |
| 1619 | * Logs changes to the configuration of the device. The configuration is defined |
| 1620 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 1621 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1622 | * Please go there to interpret the possible values each field can be. |
| 1623 | * |
| 1624 | * Logged from: |
| 1625 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1626 | */ |
| 1627 | message ResourceConfigurationChanged { |
| 1628 | // Bit mask of color capabilities of the screen. |
| 1629 | // Contains information about the color gamut and hdr mode of the screen. |
| 1630 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1631 | optional int32 color_mode = 1; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1632 | |
| 1633 | // The target screen density being rendered to. |
| 1634 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1635 | optional int32 density_dpi = 2; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1636 | |
| 1637 | // Current user preference for the scaling factor for fonts, |
| 1638 | // relative to the base density scaling. |
| 1639 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1640 | optional float font_scale = 3; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1641 | |
| 1642 | // Flag indicating whether the hard keyboard is hidden. |
| 1643 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1644 | optional int32 hard_keyboard_hidden = 4; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1645 | |
| 1646 | // The type of keyboard attached to the device. |
| 1647 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1648 | optional int32 keyboard = 5; |
| 1649 | |
| 1650 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1651 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1652 | optional int32 keyboard_hidden = 6; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1653 | |
| 1654 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1655 | // 0 if undefined. |
| 1656 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1657 | optional int32 mcc = 7; |
| 1658 | |
| 1659 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1660 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1661 | // MNC_ZERO symbol defined in Configuration.java. |
| 1662 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1663 | optional int32 mnc = 8; |
| 1664 | |
| 1665 | // The kind of navigation available on the device. |
| 1666 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1667 | optional int32 navigation = 9; |
| 1668 | |
| 1669 | // Flag indicating whether the navigation is available. |
| 1670 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1671 | optional int32 navigation_hidden = 10; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1672 | |
| 1673 | // Overall orientation of the screen. |
| 1674 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1675 | optional int32 orientation = 11; |
| 1676 | |
| 1677 | // The current height of the available screen space, in dp units. |
| 1678 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1679 | optional int32 screen_height_dp = 12; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1680 | |
| 1681 | // Bit mask of overall layout of the screen. |
| 1682 | // Contains information about screen size, whether the screen is wider/taller |
| 1683 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1684 | // and whether the screen has a rounded shape. |
| 1685 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1686 | optional int32 screen_layout = 13; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1687 | |
| 1688 | // Current width of the available screen space, in dp units. |
| 1689 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1690 | optional int32 screen_width_dp = 14; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1691 | |
| 1692 | // The smallest screen size an application will see in normal operation. |
| 1693 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1694 | // in portrait and landscape. |
| 1695 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1696 | optional int32 smallest_screen_width_dp = 15; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1697 | |
| 1698 | // The type of touch screen attached to the device. |
| 1699 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1700 | optional int32 touchscreen = 16; |
| 1701 | |
| 1702 | // Bit mask of the ui mode. |
| 1703 | // Contains information about the overall ui mode of the device. |
| 1704 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1705 | // Also contains information about whether the device is in night mode. |
| 1706 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1707 | optional int32 ui_mode = 17; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1708 | } |
| 1709 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1710 | |
| 1711 | /** |
| 1712 | * Logs changes in the connection state of the mobile radio. |
| 1713 | * |
| 1714 | * Logged from: |
| 1715 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1716 | */ |
| 1717 | message MobileConnectionStateChanged { |
| 1718 | // States are from the state machine DataConnection.java. |
| 1719 | enum State { |
| 1720 | UNKNOWN = 0; |
| 1721 | // The connection is inactive, or disconnected. |
| 1722 | INACTIVE = 1; |
| 1723 | // The connection is being activated, or connecting. |
| 1724 | ACTIVATING = 2; |
| 1725 | // The connection is active, or connected. |
| 1726 | ACTIVE = 3; |
| 1727 | // The connection is disconnecting. |
| 1728 | DISCONNECTING = 4; |
| 1729 | // The connection is disconnecting after creating a connection. |
| 1730 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1731 | } |
| 1732 | optional State state = 1; |
| 1733 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1734 | optional int32 sim_slot_index = 2; |
| 1735 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1736 | // every new network created. Resets whenever the device reboots. |
| 1737 | optional int32 data_connection_id = 3; |
| 1738 | // A bitmask for the capabilities of this connection. |
| 1739 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1740 | // Default value (if we have no information): 0 |
| 1741 | optional int64 capabilities = 4; |
| 1742 | // If this connection has internet. |
| 1743 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1744 | optional bool has_internet = 5; |
| 1745 | } |
| 1746 | |
| 1747 | /** |
| 1748 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1749 | * |
| 1750 | * Logged from: |
| 1751 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1752 | */ |
| 1753 | message MobileRadioTechnologyChanged { |
| 1754 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1755 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1756 | optional int32 sim_slot_index = 2; |
| 1757 | } |
| 1758 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1759 | /** |
| 1760 | * Logs the VID and PID of any connected USB devices. |
| 1761 | * |
| 1762 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1763 | * |
| 1764 | * Logged by Vendor. |
| 1765 | */ |
| 1766 | message UsbDeviceAttached { |
| 1767 | optional int32 vid = 1; |
| 1768 | optional int32 pid = 2; |
| 1769 | optional bool has_audio = 3; |
| 1770 | optional bool has_hid = 4; |
| 1771 | optional bool has_storage = 5; |
Badhri Jagan Sridharan | 5ec629f | 2018-11-16 15:39:22 -0800 | [diff] [blame] | 1772 | enum State { |
| 1773 | STATE_DISCONNECTED = 0; |
| 1774 | STATE_CONNECTED = 1; |
| 1775 | } |
| 1776 | optional State state = 6; |
Badhri Jagan Sridharan | c2c54a2 | 2018-12-14 14:41:26 -0800 | [diff] [blame] | 1777 | optional int64 last_connect_duration_millis = 7; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1778 | } |
| 1779 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1780 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1781 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1782 | * Logs when Bluetooth is enabled and disabled. |
| 1783 | * |
| 1784 | * Logged from: |
| 1785 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1786 | */ |
| 1787 | message BluetoothEnabledStateChanged { |
| 1788 | repeated AttributionNode attribution_node = 1; |
| 1789 | // Whether or not bluetooth is enabled on the device. |
| 1790 | enum State { |
| 1791 | UNKNOWN = 0; |
| 1792 | ENABLED = 1; |
| 1793 | DISABLED = 2; |
| 1794 | } |
| 1795 | optional State state = 2; |
| 1796 | // The reason for being enabled/disabled. |
| 1797 | // Eg. Airplane mode, crash, application request. |
| 1798 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1799 | // 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] | 1800 | optional string pkg_name = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1801 | } |
| 1802 | |
| 1803 | /** |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1804 | * Logs when profiles on a Bluetooth device connects and disconnects. |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1805 | * |
| 1806 | * Logged from: |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1807 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 1808 | * |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1809 | * Next Tag: 6 |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1810 | */ |
| 1811 | message BluetoothConnectionStateChanged { |
| 1812 | // The state of the connection. |
| 1813 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1814 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1815 | // An identifier that can be used to match connect and disconnect events. |
| 1816 | // Currently is last two bytes of a hash of a device level ID and |
| 1817 | // the mac address of the bluetooth device that is connected. |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1818 | // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1819 | optional int32 obfuscated_id = 2 [deprecated = true]; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1820 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1821 | // From android.bluetooth.BluetoothAdapter.java |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1822 | // Default: 0 when not used |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1823 | optional int32 bt_profile = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1824 | // An identifier that can be used to match events for this device. |
| 1825 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1826 | // Salt: Randomly generated 256 bit value |
| 1827 | // Hash algorithm: HMAC-SHA256 |
| 1828 | // Size: 32 byte |
| 1829 | // Default: null or empty if the device identifier is not known |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1830 | optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1831 | // An identifier that can be used to match events for this device. |
| 1832 | // The incremental identifier is locally generated and guaranteed not derived |
| 1833 | // from any globally unique hardware id. |
| 1834 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1835 | // same remote device. |
| 1836 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1837 | // session for the same remote device. |
| 1838 | // Default: 0 if the device's metric id is unknown. |
| 1839 | optional int32 metric_id = 5; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1840 | } |
| 1841 | |
| 1842 | /** |
| 1843 | * Logs when a Bluetooth device connects and disconnects over ACL |
| 1844 | * |
| 1845 | * Logged from: |
| 1846 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1847 | * |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1848 | * Next Tag: 4 |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1849 | */ |
| 1850 | message BluetoothAclConnectionStateChanged { |
| 1851 | // An identifier that can be used to match events for this device. |
| 1852 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1853 | // Salt: Randomly generated 256 bit value |
| 1854 | // Hash algorithm: HMAC-SHA256 |
| 1855 | // Size: 32 byte |
| 1856 | // Default: null or empty if the device identifier is not known |
| 1857 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1858 | // The state of the connection. |
| 1859 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1860 | optional android.bluetooth.ConnectionStateEnum state = 2; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1861 | // An identifier that can be used to match events for this device. |
| 1862 | // The incremental identifier is locally generated and guaranteed not derived |
| 1863 | // from any globally unique hardware id. |
| 1864 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1865 | // same remote device. |
| 1866 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1867 | // session for the same remote device. |
| 1868 | // Default: 0 if the device's metric id is unknown. |
| 1869 | optional int32 metric_id = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1870 | } |
| 1871 | |
| 1872 | /** |
| 1873 | * Logs when a Bluetooth device connects and disconnects over SCO |
| 1874 | * |
| 1875 | * Logged from: |
| 1876 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java |
| 1877 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java |
| 1878 | * |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1879 | * Next Tag: 5 |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1880 | */ |
| 1881 | message BluetoothScoConnectionStateChanged { |
| 1882 | // An identifier that can be used to match events for this device. |
| 1883 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1884 | // Salt: Randomly generated 256 bit value |
| 1885 | // Hash algorithm: HMAC-SHA256 |
| 1886 | // Size: 32 byte |
| 1887 | // Default: null or empty if the device identifier is not known |
| 1888 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1889 | // The state of the connection. |
| 1890 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1891 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1892 | // Codec used for this SCO connection |
| 1893 | // Default: UNKNOWN |
| 1894 | optional android.bluetooth.hfp.ScoCodec codec = 3; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1895 | // An identifier that can be used to match events for this device. |
| 1896 | // The incremental identifier is locally generated and guaranteed not derived |
| 1897 | // from any globally unique hardware id. |
| 1898 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1899 | // same remote device. |
| 1900 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1901 | // session for the same remote device. |
| 1902 | // Default: 0 if the device's metric id is unknown. |
| 1903 | optional int32 metric_id = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1904 | } |
| 1905 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1906 | /** |
| 1907 | * Logged when active device of a profile changes |
| 1908 | * |
| 1909 | * Logged from: |
| 1910 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1911 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java |
| 1912 | * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java |
| 1913 | */ |
| 1914 | message BluetoothActiveDeviceChanged { |
| 1915 | // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID |
| 1916 | // From android.bluetooth.BluetoothProfile |
| 1917 | optional int32 bt_profile = 1; |
| 1918 | // An identifier that can be used to match events for this new active device. |
| 1919 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1920 | // Salt: Randomly generated 256 bit value |
| 1921 | // Hash algorithm: HMAC-SHA256 |
| 1922 | // Size: 32 byte |
| 1923 | // Default: null or empty if there is no active device for this profile |
| 1924 | optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 1925 | // An identifier that can be used to match events for this device. |
| 1926 | // The incremental identifier is locally generated and guaranteed not derived |
| 1927 | // from any globally unique hardware id. |
| 1928 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 1929 | // same remote device. |
| 1930 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 1931 | // session for the same remote device. |
| 1932 | // Default: 0 if the device's metric id is unknown. |
| 1933 | optional int32 metric_id = 3; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1934 | } |
| 1935 | |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1936 | // Logs when there is an event affecting Bluetooth device's link layer connection. |
| 1937 | // - This event is triggered when there is a related HCI command or event |
| 1938 | // - Users of this metrics can deduce Bluetooth device's connection state from these events |
| 1939 | // - HCI commands are logged before the command is sent, after receiving command status, and after |
| 1940 | // receiving command complete |
| 1941 | // - HCI events are logged when they arrive |
| 1942 | // |
| 1943 | // Low level log from system/bt |
| 1944 | // |
| 1945 | // Bluetooth classic commands: |
| 1946 | // - CMD_CREATE_CONNECTION |
| 1947 | // - CMD_DISCONNECT |
| 1948 | // - CMD_CREATE_CONNECTION_CANCEL |
| 1949 | // - CMD_ACCEPT_CONNECTION_REQUEST |
| 1950 | // - CMD_REJECT_CONNECTION_REQUEST |
| 1951 | // - CMD_SETUP_ESCO_CONNECTION |
| 1952 | // - CMD_ACCEPT_ESCO_CONNECTION |
| 1953 | // - CMD_REJECT_ESCO_CONNECTION |
| 1954 | // - CMD_ENH_SETUP_ESCO_CONNECTION |
| 1955 | // - CMD_ENH_ACCEPT_ESCO_CONNECTION |
| 1956 | // |
| 1957 | // Bluetooth low energy commands: |
| 1958 | // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] |
| 1959 | // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] |
| 1960 | // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] |
| 1961 | // - CMD_BLE_CLEAR_WHITE_LIST |
| 1962 | // - CMD_BLE_ADD_WHITE_LIST |
| 1963 | // - CMD_BLE_REMOVE_WHITE_LIST |
| 1964 | // |
| 1965 | // Bluetooth classic events: |
| 1966 | // - EVT_CONNECTION_COMP |
| 1967 | // - EVT_CONNECTION_REQUEST |
| 1968 | // - EVT_DISCONNECTION_COMP |
| 1969 | // - EVT_ESCO_CONNECTION_COMP |
| 1970 | // - EVT_ESCO_CONNECTION_CHANGED |
| 1971 | // |
| 1972 | // Bluetooth low energy meta events: |
| 1973 | // - BLE_EVT_CONN_COMPLETE_EVT |
| 1974 | // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT |
| 1975 | // |
| 1976 | // Next tag: 10 |
| 1977 | message BluetoothLinkLayerConnectionEvent { |
| 1978 | // An identifier that can be used to match events for this device. |
| 1979 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1980 | // Salt: Randomly generated 256 bit value |
| 1981 | // Hash algorithm: HMAC-SHA256 |
| 1982 | // Size: 32 byte |
| 1983 | // Default: null or empty if the device identifier is not known |
| 1984 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1985 | // Connection handle of this connection if available |
| 1986 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1987 | // Default: 0xFFFF if the handle is unknown |
| 1988 | optional int32 connection_handle = 2; |
| 1989 | // Direction of the link |
| 1990 | // Default: DIRECTION_UNKNOWN |
| 1991 | optional android.bluetooth.DirectionEnum direction = 3; |
| 1992 | // Type of this link |
| 1993 | // Default: LINK_TYPE_UNKNOWN |
| 1994 | optional android.bluetooth.LinkTypeEnum type = 4; |
| 1995 | |
| 1996 | // Reason metadata for this link layer connection event, rules for interpretation: |
| 1997 | // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or |
| 1998 | // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case |
| 1999 | // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is |
| 2000 | // set and valid, ignore hci_ble_event |
| 2001 | |
| 2002 | // HCI command associated with this event |
| 2003 | // Default: CMD_UNKNOWN |
| 2004 | optional android.bluetooth.hci.CommandEnum hci_cmd = 5; |
| 2005 | // HCI event associated with this event |
| 2006 | // Default: EVT_UNKNOWN |
| 2007 | optional android.bluetooth.hci.EventEnum hci_event = 6; |
| 2008 | // HCI BLE meta event associated with this event |
| 2009 | // Default: BLE_EVT_UNKNOWN |
| 2010 | optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; |
| 2011 | // HCI command status code if this is triggerred by hci_cmd |
| 2012 | // Default: STATUS_UNKNOWN |
| 2013 | optional android.bluetooth.hci.StatusEnum cmd_status = 8; |
| 2014 | // HCI reason code associated with this event |
| 2015 | // Default: STATUS_UNKNOWN |
| 2016 | optional android.bluetooth.hci.StatusEnum reason_code = 9; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2017 | // An identifier that can be used to match events for this device. |
| 2018 | // The incremental identifier is locally generated and guaranteed not derived |
| 2019 | // from any globally unique hardware id. |
| 2020 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2021 | // same remote device. |
| 2022 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2023 | // session for the same remote device. |
| 2024 | // Default: 0 if the device's metric id is unknown. |
| 2025 | optional int32 metric_id = 10; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 2026 | } |
| 2027 | |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 2028 | /** |
| 2029 | * Logs when a module is rolled back by Watchdog. |
| 2030 | * |
| 2031 | * Logged from: Rollback Manager |
| 2032 | */ |
| 2033 | message WatchdogRollbackOccurred { |
| 2034 | enum RollbackType { |
| 2035 | UNKNOWN = 0; |
| 2036 | ROLLBACK_INITIATE = 1; |
| 2037 | ROLLBACK_SUCCESS = 2; |
| 2038 | ROLLBACK_FAILURE = 3; |
Howard Ro | e4d6fed | 2019-03-04 16:54:19 -0800 | [diff] [blame] | 2039 | ROLLBACK_BOOT_TRIGGERED = 4; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 2040 | } |
| 2041 | optional RollbackType rollback_type = 1; |
| 2042 | |
| 2043 | optional string package_name = 2; |
| 2044 | |
| 2045 | optional int32 package_version_code = 3; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 2046 | |
| 2047 | enum RollbackReasonType { |
| 2048 | REASON_UNKNOWN = 0; |
| 2049 | REASON_NATIVE_CRASH = 1; |
| 2050 | REASON_EXPLICIT_HEALTH_CHECK = 2; |
| 2051 | REASON_APP_CRASH = 3; |
| 2052 | REASON_APP_NOT_RESPONDING = 4; |
Gavin Corkery | 3285d22 | 2020-01-17 19:24:22 +0000 | [diff] [blame] | 2053 | REASON_NATIVE_CRASH_DURING_BOOT = 5; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 2054 | } |
| 2055 | optional RollbackReasonType rollback_reason = 4; |
| 2056 | |
| 2057 | // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback |
| 2058 | // is initiated. Empty if the package is unknown. |
| 2059 | optional string failing_package_name = 5; |
Jonathan Nguyen | 703c42f | 2020-02-04 15:54:26 -0800 | [diff] [blame] | 2060 | |
| 2061 | optional TrainExperimentIds experiment_ids = 6 [(log_mode) = MODE_BYTES]; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 2062 | } |
| 2063 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2064 | /** |
| 2065 | * Logs when there is a change in Bluetooth A2DP playback state |
| 2066 | * |
| 2067 | * Logged from: |
| 2068 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 2069 | */ |
| 2070 | message BluetoothA2dpPlaybackStateChanged { |
| 2071 | // An identifier that can be used to match events for this device. |
| 2072 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2073 | // Salt: Randomly generated 256 bit value |
| 2074 | // Hash algorithm: HMAC-SHA256 |
| 2075 | // Size: 32 byte |
| 2076 | // Default: null or empty if the device identifier is not known |
| 2077 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2078 | // Current playback state |
| 2079 | // Default: PLAYBACK_STATE_UNKNOWN |
| 2080 | optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; |
| 2081 | // Current audio coding mode |
| 2082 | // Default: AUDIO_CODING_MODE_UNKNOWN |
| 2083 | optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2084 | // An identifier that can be used to match events for this device. |
| 2085 | // The incremental identifier is locally generated and guaranteed not derived |
| 2086 | // from any globally unique hardware id. |
| 2087 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2088 | // same remote device. |
| 2089 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2090 | // session for the same remote device. |
| 2091 | // Default: 0 if the device's metric id is unknown. |
| 2092 | optional int32 metric_id = 4; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2093 | } |
| 2094 | |
| 2095 | /** |
| 2096 | * Logs when there is a change in A2DP codec config for a particular remote device |
| 2097 | * |
| 2098 | * Logged from: |
| 2099 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 2100 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 2101 | */ |
| 2102 | message BluetoothA2dpCodecConfigChanged { |
| 2103 | // An identifier that can be used to match events for this device. |
| 2104 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2105 | // Salt: Randomly generated 256 bit value |
| 2106 | // Hash algorithm: HMAC-SHA256 |
| 2107 | // Size: 32 byte |
| 2108 | // Default: null or empty if the device identifier is not known |
| 2109 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2110 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 2111 | // Default SOURCE_CODEC_TYPE_INVALID |
| 2112 | optional int32 codec_type = 2; |
| 2113 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 2114 | // Default: CODEC_PRIORITY_DEFAULT |
| 2115 | optional int32 codec_priority = 3; |
| 2116 | // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig |
| 2117 | // Default: SAMPLE_RATE_NONE |
| 2118 | optional int32 sample_rate = 4; |
| 2119 | // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig |
| 2120 | // Default: BITS_PER_SAMPLE_NONE |
| 2121 | optional int32 bits_per_sample = 5; |
| 2122 | // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig |
| 2123 | // Default: CHANNEL_MODE_NONE |
| 2124 | optional int32 channel_mode = 6; |
| 2125 | // Codec specific values |
| 2126 | // Default 0 |
| 2127 | optional int64 codec_specific_1 = 7; |
| 2128 | optional int64 codec_specific_2 = 8; |
| 2129 | optional int64 codec_specific_3 = 9; |
| 2130 | optional int64 codec_specific_4 = 10; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2131 | // An identifier that can be used to match events for this device. |
| 2132 | // The incremental identifier is locally generated and guaranteed not derived |
| 2133 | // from any globally unique hardware id. |
| 2134 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2135 | // same remote device. |
| 2136 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2137 | // session for the same remote device. |
| 2138 | // Default: 0 if the device's metric id is unknown. |
| 2139 | optional int32 metric_id = 11; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2140 | } |
| 2141 | |
| 2142 | /** |
| 2143 | * Logs when there is a change in selectable A2DP codec capability for a paricular remote device |
| 2144 | * Each codec's capability is logged separately due to statsd restriction |
| 2145 | * |
| 2146 | * Logged from: |
| 2147 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 2148 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 2149 | */ |
| 2150 | message BluetoothA2dpCodecCapabilityChanged { |
| 2151 | // An identifier that can be used to match events for this device. |
| 2152 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2153 | // Salt: Randomly generated 256 bit value |
| 2154 | // Hash algorithm: HMAC-SHA256 |
| 2155 | // Size: 32 byte |
| 2156 | // Default: null or empty if the device identifier is not known |
| 2157 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2158 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 2159 | // Default SOURCE_CODEC_TYPE_INVALID |
| 2160 | optional int32 codec_type = 2; |
| 2161 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 2162 | // Default: CODEC_PRIORITY_DEFAULT |
| 2163 | optional int32 codec_priority = 3; |
| 2164 | // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants |
| 2165 | // in BluetoothCodecConfig |
| 2166 | // Default: empty and SAMPLE_RATE_NONE for individual item |
| 2167 | optional int32 sample_rate = 4; |
| 2168 | // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants |
| 2169 | // in BluetoothCodecConfig |
| 2170 | // Default: empty and BITS_PER_SAMPLE_NONE for individual item |
| 2171 | optional int32 bits_per_sample = 5; |
| 2172 | // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in |
| 2173 | // BluetoothCodecConfig |
| 2174 | // Default: empty and CHANNEL_MODE_NONE for individual item |
| 2175 | optional int32 channel_mode = 6; |
| 2176 | // Codec specific values |
| 2177 | // Default 0 |
| 2178 | optional int64 codec_specific_1 = 7; |
| 2179 | optional int64 codec_specific_2 = 8; |
| 2180 | optional int64 codec_specific_3 = 9; |
| 2181 | optional int64 codec_specific_4 = 10; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2182 | // An identifier that can be used to match events for this device. |
| 2183 | // The incremental identifier is locally generated and guaranteed not derived |
| 2184 | // from any globally unique hardware id. |
| 2185 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2186 | // same remote device. |
| 2187 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2188 | // session for the same remote device. |
| 2189 | // Default: 0 if the device's metric id is unknown. |
| 2190 | optional int32 metric_id = 11; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2191 | } |
| 2192 | |
| 2193 | /** |
| 2194 | * Logs when A2DP failed to read from PCM source. |
| 2195 | * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. |
| 2196 | * |
| 2197 | * Logged from: |
| 2198 | * system/bt |
| 2199 | */ |
| 2200 | message BluetoothA2dpAudioUnderrunReported { |
| 2201 | // An identifier that can be used to match events for this device. |
| 2202 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2203 | // Salt: Randomly generated 256 bit value |
| 2204 | // Hash algorithm: HMAC-SHA256 |
| 2205 | // Size: 32 byte |
| 2206 | // Default: null or empty if the device identifier is not known |
| 2207 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2208 | // Encoding interval in nanoseconds |
| 2209 | // Default: 0 |
| 2210 | optional int64 encoding_interval_nanos = 2; |
| 2211 | // Number of bytes of PCM data that could not be read from the source |
| 2212 | // Default: 0 |
| 2213 | optional int32 num_missing_pcm_bytes = 3; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2214 | // An identifier that can be used to match events for this device. |
| 2215 | // The incremental identifier is locally generated and guaranteed not derived |
| 2216 | // from any globally unique hardware id. |
| 2217 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2218 | // same remote device. |
| 2219 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2220 | // session for the same remote device. |
| 2221 | // Default: 0 if the device's metric id is unknown. |
| 2222 | optional int32 metric_id = 4; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2223 | } |
| 2224 | |
| 2225 | /** |
| 2226 | * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit |
| 2227 | * buffer queue is full and we have to drop data |
| 2228 | * |
| 2229 | * Logged from: |
| 2230 | * system/bt |
| 2231 | */ |
| 2232 | message BluetoothA2dpAudioOverrunReported { |
| 2233 | // An identifier that can be used to match events for this device. |
| 2234 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2235 | // Salt: Randomly generated 256 bit value |
| 2236 | // Hash algorithm: HMAC-SHA256 |
| 2237 | // Size: 32 byte |
| 2238 | // Default: null or empty if the device identifier is not known |
| 2239 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2240 | // Encoding interval in nanoseconds |
| 2241 | // Default: 0 |
| 2242 | optional int64 encoding_interval_nanos = 2; |
| 2243 | // Number of buffers dropped in this event |
| 2244 | // Each buffer is encoded in one encoding interval and consists of multiple encoded frames |
| 2245 | // Default: 0 |
| 2246 | optional int32 num_dropped_buffers = 3; |
| 2247 | // Number of encoded buffers dropped in this event |
| 2248 | // Default 0 |
| 2249 | optional int32 num_dropped_encoded_frames = 4; |
| 2250 | // Number of encoded bytes dropped in this event |
| 2251 | // Default: 0 |
| 2252 | optional int32 num_dropped_encoded_bytes = 5; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2253 | // An identifier that can be used to match events for this device. |
| 2254 | // The incremental identifier is locally generated and guaranteed not derived |
| 2255 | // from any globally unique hardware id. |
| 2256 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2257 | // same remote device. |
| 2258 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2259 | // session for the same remote device. |
| 2260 | // Default: 0 if the device's metric id is unknown. |
| 2261 | optional int32 metric_id = 6; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2262 | } |
| 2263 | |
| 2264 | /** |
| 2265 | * Logs when we receive reports regarding a device's RSSI value |
| 2266 | * |
| 2267 | * Logged from: |
| 2268 | * system/bt |
| 2269 | */ |
| 2270 | message BluetoothDeviceRssiReported { |
| 2271 | // An identifier that can be used to match events for this device. |
| 2272 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2273 | // Salt: Randomly generated 256 bit value |
| 2274 | // Hash algorithm: HMAC-SHA256 |
| 2275 | // Size: 32 byte |
| 2276 | // Default: null or empty if the device identifier is not known |
| 2277 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2278 | // Connection handle of this connection if available |
| 2279 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2280 | // Default: 0xFFFF if the handle is unknown |
| 2281 | optional int32 connection_handle = 2; |
| 2282 | // HCI command status code if this is triggerred by hci_cmd |
| 2283 | // Default: STATUS_UNKNOWN |
| 2284 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 2285 | // BR/EDR |
| 2286 | // Range: -128 ≤ N ≤ 127 (signed integer) |
| 2287 | // Units: dB |
| 2288 | // LE: |
| 2289 | // Range: -127 to 20, 127 (signed integer) |
| 2290 | // Units: dBm |
| 2291 | // Invalid when an out of range value is reported |
| 2292 | optional int32 rssi = 4; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2293 | // An identifier that can be used to match events for this device. |
| 2294 | // The incremental identifier is locally generated and guaranteed not derived |
| 2295 | // from any globally unique hardware id. |
| 2296 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2297 | // same remote device. |
| 2298 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2299 | // session for the same remote device. |
| 2300 | // Default: 0 if the device's metric id is unknown. |
| 2301 | optional int32 metric_id = 5; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2302 | } |
| 2303 | |
| 2304 | /** |
| 2305 | * Logs when we receive reports regarding how many consecutive failed contacts for a connection |
| 2306 | * |
| 2307 | * Logged from: |
| 2308 | * system/bt |
| 2309 | */ |
| 2310 | message BluetoothDeviceFailedContactCounterReported { |
| 2311 | // An identifier that can be used to match events for this device. |
| 2312 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2313 | // Salt: Randomly generated 256 bit value |
| 2314 | // Hash algorithm: HMAC-SHA256 |
| 2315 | // Size: 32 byte |
| 2316 | // Default: null or empty if the device identifier is not known |
| 2317 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2318 | // Connection handle of this connection if available |
| 2319 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2320 | // Default: 0xFFFF if the handle is unknown |
| 2321 | optional int32 connection_handle = 2; |
| 2322 | // HCI command status code if this is triggerred by hci_cmd |
| 2323 | // Default: STATUS_UNKNOWN |
| 2324 | optional android.bluetooth.hci.StatusEnum cmd_status = 3; |
| 2325 | // Number of consecutive failed contacts for a connection corresponding to the Handle |
| 2326 | // Range: uint16_t, 0-0xFFFF |
| 2327 | // Default: 0xFFFFF |
| 2328 | optional int32 failed_contact_counter = 4; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2329 | // An identifier that can be used to match events for this device. |
| 2330 | // The incremental identifier is locally generated and guaranteed not derived |
| 2331 | // from any globally unique hardware id. |
| 2332 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2333 | // same remote device. |
| 2334 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2335 | // session for the same remote device. |
| 2336 | // Default: 0 if the device's metric id is unknown. |
| 2337 | optional int32 metric_id = 5; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2338 | } |
| 2339 | |
| 2340 | /** |
| 2341 | * Logs when we receive reports regarding the tranmit power level used for a specific connection |
| 2342 | * |
| 2343 | * Logged from: |
| 2344 | * system/bt |
| 2345 | */ |
| 2346 | message BluetoothDeviceTxPowerLevelReported { |
| 2347 | // An identifier that can be used to match events for this device. |
| 2348 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2349 | // Salt: Randomly generated 256 bit value |
| 2350 | // Hash algorithm: HMAC-SHA256 |
| 2351 | // Size: 32 byte |
| 2352 | // Default: null or empty if the device identifier is not known |
| 2353 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2354 | // Connection handle of this connection if available |
| 2355 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2356 | // Default: 0xFFFF if the handle is unknown |
| 2357 | optional int32 connection_handle = 2; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2358 | // HCI command status code if this is triggered by hci_cmd |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2359 | // Default: STATUS_UNKNOWN |
| 2360 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 2361 | // Range: -30 ≤ N ≤ 20 |
| 2362 | // Units: dBm |
| 2363 | // Invalid when an out of range value is reported |
| 2364 | optional int32 transmit_power_level = 4; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2365 | // An identifier that can be used to match events for this device. |
| 2366 | // The incremental identifier is locally generated and guaranteed not derived |
| 2367 | // from any globally unique hardware id. |
| 2368 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2369 | // same remote device. |
| 2370 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2371 | // session for the same remote device. |
| 2372 | // Default: 0 if the device's metric id is unknown. |
| 2373 | optional int32 metric_id = 5; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2374 | } |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 2375 | |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 2376 | /** |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2377 | * Logs when Bluetooth controller failed to reply with command status within a timeout period after |
| 2378 | * receiving an HCI command from the host |
| 2379 | * |
| 2380 | * Logged from: system/bt |
| 2381 | */ |
| 2382 | message BluetoothHciTimeoutReported { |
| 2383 | // HCI command associated with this event |
| 2384 | // Default: CMD_UNKNOWN |
| 2385 | optional android.bluetooth.hci.CommandEnum hci_command = 1; |
| 2386 | } |
| 2387 | |
| 2388 | /** |
| 2389 | * Logs when we receive Bluetooth Link Quality Report event from the controller |
| 2390 | * See Android Bluetooth HCI specification for more details |
| 2391 | * |
| 2392 | * Note: all count and bytes field are counted since last event |
| 2393 | * |
| 2394 | * Logged from: system/bt |
| 2395 | */ |
| 2396 | message BluetoothQualityReportReported { |
| 2397 | // Quality report ID |
| 2398 | // Original type: uint8_t |
| 2399 | // Default: BQR_ID_UNKNOWN |
| 2400 | optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; |
| 2401 | // Packet type of the connection |
| 2402 | // Original type: uint8_t |
| 2403 | // Default: BQR_PACKET_TYPE_UNKNOWN |
| 2404 | optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; |
| 2405 | // Connection handle of the connection |
| 2406 | // Original type: uint16_t |
| 2407 | optional int32 connection_handle = 3; |
| 2408 | // Performing Role for the connection |
| 2409 | // Original type: uint8_t |
| 2410 | optional int32 connection_role = 4; |
| 2411 | // Current Transmit Power Level for the connection. This value is the same as the controller's |
| 2412 | // response to the HCI_Read_Transmit_Power_Level HCI command |
| 2413 | // Original type: uint8_t |
| 2414 | optional int32 tx_power_level = 5; |
| 2415 | // Received Signal Strength Indication (RSSI) value for the connection. This value is an |
| 2416 | // absolute receiver signal strength value |
| 2417 | // Original type: int8_t |
| 2418 | optional int32 rssi = 6; |
| 2419 | // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the |
| 2420 | // channels used by the link currently |
| 2421 | // Original type: uint8_t |
| 2422 | optional int32 snr = 7; |
| 2423 | // Indicates the number of unused channels in AFH_channel_map |
| 2424 | // Original type: uint8_t |
| 2425 | optional int32 unused_afh_channel_count = 8; |
| 2426 | // Indicates the number of the channels which are interfered and quality is bad but are still |
| 2427 | // selected for AFH |
| 2428 | // Original type: uint8_t |
| 2429 | optional int32 afh_select_unideal_channel_count = 9; |
| 2430 | // Current Link Supervision Timeout Setting |
| 2431 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2432 | // Original type: uint16_t |
| 2433 | optional int32 lsto = 10; |
| 2434 | // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's |
| 2435 | // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of |
| 2436 | // 0x01 (Piconet Clock) |
| 2437 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2438 | // Original type: uint32_t |
| 2439 | optional int64 connection_piconet_clock = 11; |
| 2440 | // The count of retransmission |
| 2441 | // Original type: uint32_t |
| 2442 | optional int64 retransmission_count = 12; |
| 2443 | // The count of no RX |
| 2444 | // Original type: uint32_t |
| 2445 | optional int64 no_rx_count = 13; |
| 2446 | // The count of NAK (Negative Acknowledge) |
| 2447 | // Original type: uint32_t |
| 2448 | optional int64 nak_count = 14; |
| 2449 | // Controller timestamp of last TX ACK |
| 2450 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2451 | // Original type: uint32_t |
| 2452 | optional int64 last_tx_ack_timestamp = 15; |
| 2453 | // The count of Flow-off (STOP) |
| 2454 | // Original type: uint32_t |
| 2455 | optional int64 flow_off_count = 16; |
| 2456 | // Controller timestamp of last Flow-on (GO) |
| 2457 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2458 | // Original type: uint32_t |
| 2459 | optional int64 last_flow_on_timestamp = 17; |
| 2460 | // Buffer overflow count (how many bytes of TX data are dropped) since the last event |
| 2461 | // Original type: uint32_t |
| 2462 | optional int64 buffer_overflow_bytes = 18; |
| 2463 | // Buffer underflow count (in byte) since last event |
| 2464 | // Original type: uint32_t |
| 2465 | optional int64 buffer_underflow_bytes = 19; |
| 2466 | } |
| 2467 | |
| 2468 | /** |
| 2469 | * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack |
| 2470 | * |
| 2471 | * Notes: |
| 2472 | * - Each event can be partially filled as we might learn different pieces of device |
| 2473 | * information at different time |
| 2474 | * - Multiple device info events can be combined to give more complete picture |
| 2475 | * - When multiple device info events tries to describe the same information, the |
| 2476 | * later one wins |
| 2477 | * |
| 2478 | * Logged from: |
| 2479 | * packages/apps/Bluetooth |
| 2480 | */ |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 2481 | message BluetoothDeviceInfoReported { |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2482 | // An identifier that can be used to match events for this device. |
| 2483 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2484 | // Salt: Randomly generated 256 bit value |
| 2485 | // Hash algorithm: HMAC-SHA256 |
| 2486 | // Size: 32 byte |
| 2487 | // Default: null or empty if the device identifier is not known |
| 2488 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2489 | // Where is this device info obtained from |
| 2490 | optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; |
| 2491 | // Name of the data source |
| 2492 | // For EXTERNAL: package name of the data source |
| 2493 | // For INTERNAL: null for general case, component name otherwise |
| 2494 | optional string source_name = 3; |
| 2495 | // Name of the manufacturer of this device |
| 2496 | optional string manufacturer = 4; |
| 2497 | // Model of this device |
| 2498 | optional string model = 5; |
| 2499 | // Hardware version of this device |
| 2500 | optional string hardware_version = 6; |
| 2501 | // Software version of this device |
| 2502 | optional string software_version = 7; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2503 | // An identifier that can be used to match events for this device. |
| 2504 | // The incremental identifier is locally generated and guaranteed not derived |
| 2505 | // from any globally unique hardware id. |
| 2506 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2507 | // same remote device. |
| 2508 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2509 | // session for the same remote device. |
| 2510 | // Default: 0 if the device's metric id is unknown. |
| 2511 | optional int32 metric_id = 8; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2512 | } |
| 2513 | |
| 2514 | /** |
| 2515 | * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote |
| 2516 | * device, as documented by the Bluetooth Core HCI specification |
| 2517 | * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification |
| 2518 | * Vol 2, Part E, Page 1118 |
| 2519 | * |
| 2520 | * Logged from: |
| 2521 | * system/bt |
| 2522 | */ |
| 2523 | message BluetoothRemoteVersionInfoReported { |
| 2524 | // Connection handle of the connection |
| 2525 | // Original type: uint16_t |
| 2526 | optional int32 connection_handle = 1; |
| 2527 | // HCI command status code |
| 2528 | // Default: STATUS_UNKNOWN |
| 2529 | optional android.bluetooth.hci.StatusEnum hci_status = 2; |
| 2530 | // 1 byte Version of current LMP in the remote controller |
| 2531 | optional int32 lmp_version = 3; |
| 2532 | // 2 bytes LMP manufacturer code of the remote controller |
| 2533 | // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers |
| 2534 | optional int32 lmp_manufacturer_code = 4; |
| 2535 | // 4 bytes subversion of the LMP in the remote controller |
| 2536 | optional int32 lmp_subversion = 5; |
| 2537 | } |
| 2538 | |
| 2539 | /** |
| 2540 | * Logs when certain Bluetooth SDP attributes are discovered |
| 2541 | * Constant definitions are from: |
| 2542 | * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery |
| 2543 | * |
| 2544 | * Current logged attributes: |
| 2545 | * - BluetoothProfileDescriptorList |
| 2546 | * - Supported Features Bitmask |
| 2547 | * |
| 2548 | * Logged from: |
| 2549 | * system/bt |
| 2550 | */ |
| 2551 | message BluetoothSdpAttributeReported { |
| 2552 | // An identifier that can be used to match events for this device. |
| 2553 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2554 | // Salt: Randomly generated 256 bit value |
| 2555 | // Hash algorithm: HMAC-SHA256 |
| 2556 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2557 | // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes |
| 2558 | // Original type: uint16_t |
| 2559 | optional int32 protocol_uuid = 2; |
| 2560 | // Short form UUIDs used to identify Bluetooth SDP attribute types |
| 2561 | // Original type: uint16_t |
| 2562 | optional int32 attribute_id = 3; |
| 2563 | // Attribute value for the particular attribute |
| 2564 | optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2565 | // An identifier that can be used to match events for this device. |
| 2566 | // The incremental identifier is locally generated and guaranteed not derived |
| 2567 | // from any globally unique hardware id. |
| 2568 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2569 | // same remote device. |
| 2570 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2571 | // session for the same remote device. |
| 2572 | // Default: 0 if the device's metric id is unknown. |
| 2573 | optional int32 metric_id = 5; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2574 | } |
| 2575 | |
| 2576 | /** |
| 2577 | * Logs when bond state of a Bluetooth device changes |
| 2578 | * |
| 2579 | * Logged from: |
| 2580 | * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| 2581 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2582 | */ |
| 2583 | message BluetoothBondStateChanged { |
| 2584 | // An identifier that can be used to match events for this device. |
| 2585 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2586 | // Salt: Randomly generated 256 bit value |
| 2587 | // Hash algorithm: HMAC-SHA256 |
| 2588 | // Size: 32 byte |
| 2589 | // Default: null or empty if the device identifier is not known |
| 2590 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2591 | // Preferred transport type to remote dual mode device |
| 2592 | // Default: TRANSPORT_AUTO means no preference |
| 2593 | optional android.bluetooth.TransportTypeEnum transport = 2; |
| 2594 | // The type of this Bluetooth device (Classic, LE, or Dual mode) |
| 2595 | // Default: UNKNOWN |
| 2596 | optional android.bluetooth.DeviceTypeEnum type = 3; |
| 2597 | // Current bond state (NONE, BONDING, BONDED) |
| 2598 | // Default: BOND_STATE_UNKNOWN |
| 2599 | optional android.bluetooth.BondStateEnum bond_state = 4; |
| 2600 | // Bonding sub state |
| 2601 | // Default: BOND_SUB_STATE_UNKNOWN |
| 2602 | optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; |
| 2603 | // Unbond Reason |
| 2604 | // Default: UNBOND_REASON_UNKNOWN |
| 2605 | optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2606 | // An identifier that can be used to match events for this device. |
| 2607 | // The incremental identifier is locally generated and guaranteed not derived |
| 2608 | // from any globally unique hardware id. |
| 2609 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2610 | // same remote device. |
| 2611 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2612 | // session for the same remote device. |
| 2613 | // Default: 0 if the device's metric id is unknown. |
| 2614 | optional int32 metric_id = 7; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2615 | } |
| 2616 | |
| 2617 | /** |
| 2618 | * Logs there is an event related Bluetooth classic pairing |
| 2619 | * |
| 2620 | * Logged from: |
| 2621 | * system/bt |
| 2622 | */ |
| 2623 | message BluetoothClassicPairingEventReported { |
| 2624 | // An identifier that can be used to match events for this device. |
| 2625 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2626 | // Salt: Randomly generated 256 bit value |
| 2627 | // Hash algorithm: HMAC-SHA256 |
| 2628 | // Size: 32 byte |
| 2629 | // Default: null or empty if the device identifier is not known |
| 2630 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2631 | // Connection handle of this connection if available |
| 2632 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2633 | // Default: 0xFFFF if the handle is unknown |
| 2634 | optional int32 connection_handle = 2; |
| 2635 | // HCI command associated with this event |
| 2636 | // Default: CMD_UNKNOWN |
| 2637 | optional android.bluetooth.hci.CommandEnum hci_cmd = 3; |
| 2638 | // HCI event associated with this event |
| 2639 | // Default: EVT_UNKNOWN |
| 2640 | optional android.bluetooth.hci.EventEnum hci_event = 4; |
| 2641 | // HCI command status code if this is triggerred by hci_cmd |
| 2642 | // Default: STATUS_UNKNOWN |
| 2643 | optional android.bluetooth.hci.StatusEnum cmd_status = 5; |
| 2644 | // HCI reason code associated with this event |
| 2645 | // Default: STATUS_UNKNOWN |
| 2646 | optional android.bluetooth.hci.StatusEnum reason_code = 6; |
Jack He | 3b25983 | 2019-03-20 03:47:29 -0700 | [diff] [blame] | 2647 | // A status value related to this specific event |
| 2648 | // Default: 0 |
| 2649 | optional int64 event_value = 7; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2650 | // An identifier that can be used to match events for this device. |
| 2651 | // The incremental identifier is locally generated and guaranteed not derived |
| 2652 | // from any globally unique hardware id. |
| 2653 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2654 | // same remote device. |
| 2655 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2656 | // session for the same remote device. |
| 2657 | // Default: 0 if the device's metric id is unknown. |
| 2658 | optional int32 metric_id = 8; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2659 | } |
| 2660 | |
| 2661 | /** |
| 2662 | * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) |
| 2663 | * |
| 2664 | * Logged from: |
| 2665 | * system/bt |
| 2666 | */ |
| 2667 | message BluetoothSmpPairingEventReported { |
| 2668 | // An identifier that can be used to match events for this device. |
| 2669 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2670 | // Salt: Randomly generated 256 bit value |
| 2671 | // Hash algorithm: HMAC-SHA256 |
| 2672 | // Size: 32 byte |
| 2673 | // Default: null or empty if the device identifier is not known |
| 2674 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2675 | // SMP command sent or received over L2CAP |
| 2676 | // Default: CMD_UNKNOWN |
| 2677 | optional android.bluetooth.smp.CommandEnum smp_command = 2; |
| 2678 | // Whether this command is sent or received |
| 2679 | // Default: DIRECTION_UNKNOWN |
| 2680 | optional android.bluetooth.DirectionEnum direction = 3; |
| 2681 | // SMP failure reason code |
| 2682 | // Default: PAIRING_FAIL_REASON_DEFAULT |
| 2683 | optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2684 | // An identifier that can be used to match events for this device. |
| 2685 | // The incremental identifier is locally generated and guaranteed not derived |
| 2686 | // from any globally unique hardware id. |
| 2687 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2688 | // same remote device. |
| 2689 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2690 | // session for the same remote device. |
| 2691 | // Default: 0 if the device's metric id is unknown. |
| 2692 | optional int32 metric_id = 5; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2693 | } |
| 2694 | |
| 2695 | /** |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2696 | * Logs when a Bluetooth socket’s connection state changed |
| 2697 | * |
| 2698 | * Logged from: |
| 2699 | * system/bt |
| 2700 | */ |
| 2701 | message BluetoothSocketConnectionStateChanged { |
| 2702 | // An identifier that can be used to match events for this device. |
| 2703 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2704 | // Salt: Randomly generated 256 bit value |
| 2705 | // Hash algorithm: HMAC-SHA256 |
| 2706 | // Size: 32 byte |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2707 | // Default: null or empty if this is a server listener socket |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2708 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2709 | // Temporary port of this socket for the current connection or session only |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2710 | // Default 0 when unknown or don't care |
| 2711 | optional int32 port = 2; |
| 2712 | // Socket type as mentioned in |
| 2713 | // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java |
| 2714 | // Default: SOCKET_TYPE_UNKNOWN |
| 2715 | optional android.bluetooth.SocketTypeEnum type = 3; |
| 2716 | // Socket connection state |
| 2717 | // Default: SOCKET_CONNECTION_STATE_UNKNOWN |
| 2718 | optional android.bluetooth.SocketConnectionstateEnum state = 4; |
| 2719 | // Number of bytes sent to remote device during this connection |
| 2720 | optional int64 tx_bytes = 5; |
| 2721 | // Number of bytes received from remote device during this connection |
| 2722 | optional int64 rx_bytes = 6; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2723 | // Socket owner's UID |
| 2724 | optional int32 uid = 7 [(is_uid) = true]; |
| 2725 | // Server port of this socket, if any. When both |server_port| and |port| fields are populated, |
| 2726 | // |port| must be spawned by |server_port| |
| 2727 | // Default 0 when unknown or don't care |
| 2728 | optional int32 server_port = 8; |
| 2729 | // Whether this is a server listener socket |
| 2730 | optional android.bluetooth.SocketRoleEnum is_server = 9; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2731 | // An identifier that can be used to match events for this device. |
| 2732 | // The incremental identifier is locally generated and guaranteed not derived |
| 2733 | // from any globally unique hardware id. |
| 2734 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2735 | // same remote device. |
| 2736 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2737 | // session for the same remote device. |
| 2738 | // Default: 0 if the device's metric id is unknown. |
| 2739 | optional int32 metric_id = 10; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2740 | } |
| 2741 | |
| 2742 | /** |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2743 | * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection |
| 2744 | * |
| 2745 | * Logged from: |
| 2746 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2747 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 2748 | * |
| 2749 | */ |
| 2750 | message BluetoothClassOfDeviceReported { |
| 2751 | // An identifier that can be used to match events for this device. |
| 2752 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2753 | // Salt: Randomly generated 256 bit value |
| 2754 | // Hash algorithm: HMAC-SHA256 |
| 2755 | // Size: 32 byte |
| 2756 | // Default: null or empty if this is a server listener socket |
| 2757 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2758 | // Class of Device (CoD) value including both Major, Minor device class and service class |
| 2759 | // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband |
| 2760 | // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass |
| 2761 | // Default: 0 |
| 2762 | optional int32 class_of_device = 2; |
Chen Chen | 71c3a5d | 2020-03-06 16:01:24 -0800 | [diff] [blame] | 2763 | // An identifier that can be used to match events for this device. |
| 2764 | // The incremental identifier is locally generated and guaranteed not derived |
| 2765 | // from any globally unique hardware id. |
| 2766 | // For paired devices, it stays consistent between Bluetooth toggling for the |
| 2767 | // same remote device. |
| 2768 | // For unpaired devices, it stays consistent within the same Bluetooth adapter |
| 2769 | // session for the same remote device. |
| 2770 | // Default: 0 if the device's metric id is unknown. |
| 2771 | optional int32 metric_id = 3; |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2772 | } |
| 2773 | |
| 2774 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2775 | * Logs when something is plugged into or removed from the USB-C connector. |
| 2776 | * |
| 2777 | * Logged from: |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2778 | * UsbService |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2779 | */ |
| 2780 | message UsbConnectorStateChanged { |
| 2781 | enum State { |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2782 | STATE_DISCONNECTED = 0; |
| 2783 | STATE_CONNECTED = 1; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2784 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 2785 | optional State state = 1 |
| 2786 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
| 2787 | optional string id = 2 [(state_field_option).primary_field = true]; |
Badhri Jagan Sridharan | faf6207 | 2018-11-16 17:17:03 -0800 | [diff] [blame] | 2788 | // Last active session in ms. |
| 2789 | // 0 when the port is in connected state. |
| 2790 | optional int64 last_connect_duration_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2791 | } |
| 2792 | |
| 2793 | /** |
| 2794 | * Logs the reported speaker impedance. |
| 2795 | * |
| 2796 | * Logged from: |
| 2797 | * Vendor audio implementation. |
| 2798 | */ |
| 2799 | message SpeakerImpedanceReported { |
| 2800 | optional int32 speaker_location = 1; |
| 2801 | optional int32 impedance = 2; |
| 2802 | } |
| 2803 | |
| 2804 | /** |
| 2805 | * Logs the report of a failed hardware. |
| 2806 | * |
| 2807 | * Logged from: |
| 2808 | * Vendor HALs. |
| 2809 | * |
| 2810 | */ |
| 2811 | message HardwareFailed { |
| 2812 | enum HardwareType { |
| 2813 | HARDWARE_FAILED_UNKNOWN = 0; |
| 2814 | HARDWARE_FAILED_MICROPHONE = 1; |
| 2815 | HARDWARE_FAILED_CODEC = 2; |
| 2816 | HARDWARE_FAILED_SPEAKER = 3; |
| 2817 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 2818 | } |
| 2819 | optional HardwareType hardware_type = 1; |
| 2820 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2821 | /** |
| 2822 | * hardware_location allows vendors to differentiate between multiple instances of |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2823 | * the same hardware_type. The specific locations are vendor defined integers, |
| 2824 | * referring to board-specific numbering schemes. |
| 2825 | */ |
| 2826 | optional int32 hardware_location = 2; |
| 2827 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2828 | /** |
| 2829 | * failure_code is specific to the HardwareType of the failed hardware. |
| 2830 | * It should use one of the enum values defined below. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2831 | */ |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2832 | enum HardwareErrorCode { |
| 2833 | UNKNOWN = 0; |
| 2834 | COMPLETE = 1; |
| 2835 | SPEAKER_HIGH_Z = 2; |
| 2836 | SPEAKER_SHORT = 3; |
| 2837 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 2838 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
Maggie White | b76cebc | 2019-02-05 15:21:29 -0800 | [diff] [blame] | 2839 | DEGRADE = 6; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2840 | } |
| 2841 | optional int32 failure_code = 3; |
| 2842 | } |
| 2843 | |
| 2844 | /** |
| 2845 | * Log an event when the device has been physically dropped. |
| 2846 | * Reported from the /vendor partition. |
| 2847 | */ |
| 2848 | message PhysicalDropDetected { |
| 2849 | // Confidence that the event was actually a drop, 0 -> 100 |
| 2850 | optional int32 confidence_pctg = 1; |
| 2851 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 2852 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 2853 | // Duration of freefall in ms |
| 2854 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2855 | } |
| 2856 | |
| 2857 | /** |
| 2858 | * Log bucketed battery charge cycles. |
| 2859 | * |
| 2860 | * Each bucket represents cycles of the battery past |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2861 | * a given charge point. For example, if 10 cycle buckets are |
| 2862 | * initialized, bucket 1 is the lowest 1/10th of the battery, |
| 2863 | * and bucket 10 is 100%. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2864 | * |
| 2865 | * Logged from: |
| 2866 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 2867 | */ |
| 2868 | message ChargeCyclesReported { |
| 2869 | optional int32 cycle_bucket_1 = 1; |
| 2870 | optional int32 cycle_bucket_2 = 2; |
| 2871 | optional int32 cycle_bucket_3 = 3; |
| 2872 | optional int32 cycle_bucket_4 = 4; |
| 2873 | optional int32 cycle_bucket_5 = 5; |
| 2874 | optional int32 cycle_bucket_6 = 6; |
| 2875 | optional int32 cycle_bucket_7 = 7; |
| 2876 | optional int32 cycle_bucket_8 = 8; |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2877 | optional int32 cycle_bucket_9 = 9; |
| 2878 | optional int32 cycle_bucket_10 = 10; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2879 | } |
| 2880 | |
| 2881 | /** |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2882 | * Log battery health snapshot. |
| 2883 | * |
| 2884 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 2885 | * are snapshotted periodically over 24hrs. |
| 2886 | */ |
| 2887 | message BatteryHealthSnapshot { |
| 2888 | enum BatterySnapshotType { |
| 2889 | UNKNOWN = 0; |
| 2890 | MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 2891 | MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 2892 | MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 2893 | MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 2894 | MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 2895 | MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 2896 | MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 2897 | MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 2898 | MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 2899 | MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 2900 | AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 2901 | } |
| 2902 | optional BatterySnapshotType type = 1; |
| 2903 | // Temperature, in 1/10ths of degree C. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2904 | optional int32 temperature_deci_celsius = 2; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2905 | // Voltage Battery Voltage, in microVolts. |
| 2906 | optional int32 voltage_micro_volt = 3; |
| 2907 | // Current Battery current, in microAmps. |
| 2908 | optional int32 current_micro_amps = 4; |
| 2909 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 2910 | optional int32 open_circuit_micro_volt = 5; |
| 2911 | // Resistance Battery Resistance, in microOhms. |
| 2912 | optional int32 resistance_micro_ohm = 6; |
| 2913 | // Level Battery Level, as % of full. |
| 2914 | optional int32 level_percent = 7; |
| 2915 | } |
| 2916 | |
| 2917 | /** |
| 2918 | * Log slow I/O operations on the primary storage. |
| 2919 | */ |
| 2920 | message SlowIo { |
| 2921 | // Classifications of IO Operations. |
| 2922 | enum IoOperation { |
| 2923 | UNKNOWN = 0; |
| 2924 | READ = 1; |
| 2925 | WRITE = 2; |
| 2926 | UNMAP = 3; |
| 2927 | SYNC = 4; |
| 2928 | } |
| 2929 | optional IoOperation operation = 1; |
| 2930 | |
| 2931 | // The number of slow IO operations of this type over 24 hours. |
| 2932 | optional int32 count = 2; |
| 2933 | } |
| 2934 | |
| 2935 | /** |
| 2936 | * Log battery caused shutdown with the last recorded voltage. |
| 2937 | */ |
| 2938 | message BatteryCausedShutdown { |
| 2939 | // The last recorded battery voltage prior to shutdown. |
| 2940 | optional int32 last_recorded_micro_volt = 1; |
| 2941 | } |
| 2942 | |
| 2943 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 2944 | * Logs when ThermalService receives throttling events. |
| 2945 | * |
| 2946 | * Logged from: |
| 2947 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 2948 | */ |
| 2949 | message ThermalThrottlingSeverityStateChanged { |
| 2950 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
| 2951 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 2952 | |
| 2953 | // The name of the temperature source. Eg. CPU0 |
| 2954 | optional string sensor_name = 2; |
| 2955 | |
| 2956 | // Temperature in tenths of a degree C. |
| 2957 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
| 2958 | optional int32 temperature_deci_celsius = 3; |
| 2959 | |
| 2960 | // Relative severity of the throttling, see enum definition. |
| 2961 | optional android.os.ThrottlingSeverityEnum severity = 4; |
| 2962 | } |
| 2963 | |
| 2964 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2965 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 2966 | * |
| 2967 | * Logged from: |
| 2968 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 2969 | */ |
| 2970 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2971 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2972 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2973 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2974 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2975 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2976 | } |
| 2977 | |
| 2978 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2979 | * Logs phone signal strength changes. |
| 2980 | * |
| 2981 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2982 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2983 | */ |
| 2984 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 2985 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 2986 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2987 | } |
| 2988 | |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 2989 | |
| 2990 | /** |
| 2991 | * Logs when the phone state, sim state or signal strength changes |
| 2992 | * |
| 2993 | * Logged from: |
| 2994 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2995 | */ |
| 2996 | message PhoneServiceStateChanged { |
| 2997 | optional android.telephony.ServiceStateEnum state = 1; |
| 2998 | optional android.telephony.SimStateEnum sim_state = 2; |
| 2999 | optional android.telephony.SignalStrengthEnum signal_strength = 3; |
| 3000 | } |
| 3001 | |
| 3002 | /** |
| 3003 | * Logs when the phone becomes on or off. |
| 3004 | * |
| 3005 | * Logged from: |
| 3006 | * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java |
| 3007 | */ |
| 3008 | message PhoneStateChanged { |
| 3009 | enum State { |
| 3010 | OFF = 0; |
| 3011 | ON = 1; |
| 3012 | } |
| 3013 | optional State state = 1; |
| 3014 | } |
| 3015 | |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 3016 | message BackGesture { |
| 3017 | enum BackType { |
Maryam Karimzadehgan | 4f9ab82 | 2020-03-09 14:51:07 -0700 | [diff] [blame] | 3018 | DEFAULT_BACK_TYPE = 0; |
| 3019 | COMPLETED = 1; |
| 3020 | COMPLETED_REJECTED = 2; // successful because coming from rejected area |
| 3021 | INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area |
| 3022 | INCOMPLETE = 4; // Unsuccessful, for reasons other than below. |
| 3023 | INCOMPLETE_FAR_FROM_EDGE = 5; // Unsuccessful, far from the edge. |
| 3024 | INCOMPLETE_MULTI_TOUCH = 6; // Unsuccessful, multi touch. |
| 3025 | INCOMPLETE_LONG_PRESS = 7; // Unsuccessful, long press. |
| 3026 | INCOMPLETE_VERTICAL_MOVE = 8; // Unsuccessful, move vertically. |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 3027 | } |
| 3028 | optional BackType type = 1; |
| 3029 | |
Maryam Karimzadehgan | 4f9ab82 | 2020-03-09 14:51:07 -0700 | [diff] [blame] | 3030 | optional int32 y_coordinate = 2 [deprecated = true]; // y coordinate for ACTION_DOWN event |
| 3031 | optional int32 start_x = 4; // X coordinate for ACTION_DOWN event. |
| 3032 | optional int32 start_y = 5; // Y coordinate for ACTION_DOWN event. |
| 3033 | optional int32 end_x = 6; // X coordinate for ACTION_MOVE event. |
| 3034 | optional int32 end_y = 7; // Y coordinate for ACTION_MOVE event. |
| 3035 | optional int32 left_boundary = 8; // left edge width + left inset |
| 3036 | optional int32 right_boundary = 9; // screen width - (right edge width + right inset) |
| 3037 | |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 3038 | enum WindowHorizontalLocation { |
| 3039 | DEFAULT_LOCATION = 0; |
| 3040 | LEFT = 1; |
| 3041 | RIGHT = 2; |
| 3042 | } |
Maryam Karimzadehgan | 4f9ab82 | 2020-03-09 14:51:07 -0700 | [diff] [blame] | 3043 | optional WindowHorizontalLocation x_location = 3 [deprecated = true]; |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 3044 | } |
| 3045 | |
| 3046 | message ExclusionRectStateChanged { |
| 3047 | optional string component_name = 1; // if not available, simply packageName |
| 3048 | optional int32 requested_height = 2; // px |
| 3049 | optional int32 rejected_height = 3; // px |
| 3050 | |
| 3051 | enum WindowHorizontalLocation { |
| 3052 | DEFAULT_LOCATION = 0; |
| 3053 | LEFT = 1; |
| 3054 | RIGHT = 2; |
| 3055 | } |
| 3056 | optional WindowHorizontalLocation x_location = 4; |
| 3057 | optional bool landscape = 5; |
| 3058 | optional bool splitscreen = 6; |
| 3059 | optional int32 duration_millis = 7; |
| 3060 | } |
| 3061 | |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3062 | /** |
Maryam | de784e5 | 2020-06-22 11:46:48 -0700 | [diff] [blame] | 3063 | * Logs when IME is on. |
| 3064 | * |
| 3065 | * Logged from: /packages/SystemUI/src/com/android/systemui/ |
| 3066 | statusbar/phone/NavigationBarView.java |
| 3067 | * |
| 3068 | */ |
| 3069 | message ImeTouchReported { |
| 3070 | optional int32 x_coordinate = 1; // X coordinate for ACTION_DOWN event. |
| 3071 | optional int32 y_coordinate = 2; // Y coordinate for ACTION_DOWN event. |
| 3072 | } |
| 3073 | |
| 3074 | /** |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3075 | * Logs when Launcher (HomeScreen) UI has changed or was interacted. |
| 3076 | * |
| 3077 | * Logged from: |
| 3078 | * packages/apps/Launcher3 |
| 3079 | */ |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 3080 | message LauncherUIChanged { |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3081 | optional android.stats.launcher.LauncherAction action = 1 [deprecated = true]; |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 3082 | optional android.stats.launcher.LauncherState src_state = 2; |
| 3083 | optional android.stats.launcher.LauncherState dst_state = 3; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3084 | optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES, deprecated = true]; |
| 3085 | optional bool is_swipe_up_enabled = 5 [deprecated = true]; |
| 3086 | |
| 3087 | // The event id (e.g., app launch, drag and drop, long press) |
| 3088 | optional int32 event_id = 6; |
| 3089 | // The event's source or target id (e.g., icon, task, button) |
| 3090 | optional int32 target_id = 7; |
| 3091 | // If the target needs to be tracked, use this id field |
| 3092 | optional int32 instance_id = 8; |
| 3093 | optional int32 uid = 9 [(is_uid) = true]; |
| 3094 | optional string package_name = 10; |
| 3095 | optional string component_name = 11; |
| 3096 | |
| 3097 | // (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] | 3098 | optional int32 grid_x = 12 [default = -1]; |
| 3099 | optional int32 grid_y = 13 [default = -1]; |
| 3100 | optional int32 page_id = 14 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3101 | |
| 3102 | // 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] | 3103 | optional int32 grid_x_parent = 15 [default = -1]; |
| 3104 | optional int32 grid_y_parent = 16 [default = -1]; |
| 3105 | optional int32 page_id_parent = 17 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3106 | |
| 3107 | // e.g., SEARCHBOX_ALLAPPS, FOLDER_WORKSPACE |
| 3108 | optional int32 hierarchy = 18; |
| 3109 | |
| 3110 | optional bool is_work_profile = 19; |
| 3111 | |
| 3112 | // Used to store the predicted rank of the target |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3113 | optional int32 rank = 20 [default = -1]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3114 | |
| 3115 | // e.g., folderLabelState can be captured in the following two fields |
| 3116 | optional int32 from_state = 21; |
| 3117 | optional int32 to_state = 22; |
| 3118 | |
| 3119 | // e.g., autofilled or suggested texts that are not user entered |
| 3120 | optional string edittext = 23; |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3121 | |
| 3122 | // e.g., number of contents inside a container (e.g., icons inside a folder) |
| 3123 | optional int32 cardinality = 24; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 3124 | } |
| 3125 | |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3126 | /** |
| 3127 | * Used for snapshot of the HomeScreen UI elements |
| 3128 | * |
| 3129 | * Logged from: |
| 3130 | * packages/apps/Launcher3 |
| 3131 | */ |
| 3132 | message LauncherStaticLayout { |
| 3133 | // The event id (e.g., snapshot, drag and drop) |
| 3134 | optional int32 event_id = 1; |
| 3135 | // The event's source or target id (e.g., icon, shortcut, widget) |
| 3136 | optional int32 target_id = 2; |
| 3137 | // If the target needs to be tracked, use this id field |
| 3138 | optional int32 instance_id = 3; |
| 3139 | optional int32 uid = 4 [(is_uid) = true]; |
| 3140 | optional string package_name = 5; |
| 3141 | optional string component_name = 6; |
| 3142 | |
| 3143 | // (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] | 3144 | optional int32 grid_x = 7 [default = -1]; |
| 3145 | optional int32 grid_y = 8 [default = -1]; |
| 3146 | optional int32 page_id = 9 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3147 | |
| 3148 | // 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] | 3149 | // e.g., when used with widgets target, use these values for (span_x, span_y) |
| 3150 | optional int32 grid_x_parent = 10 [default = -1]; |
| 3151 | optional int32 grid_y_parent = 11 [default = -1]; |
| 3152 | optional int32 page_id_parent = 12 [default = -2]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3153 | |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3154 | // UNKNOWN = 0 |
| 3155 | // HOTSEAT = 1 |
| 3156 | // WORKSPACE = 2 |
| 3157 | // FOLDER_HOTSEAT = 3 |
| 3158 | // FOLDER_WORKSPACE = 4 |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3159 | optional int32 hierarchy = 13; |
| 3160 | |
| 3161 | optional bool is_work_profile = 14; |
| 3162 | |
| 3163 | // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION |
| 3164 | optional int32 origin = 15; |
Hyunyoung Song | e742ae7 | 2020-05-04 23:47:11 -0700 | [diff] [blame] | 3165 | |
| 3166 | // e.g., number of icons inside a folder |
| 3167 | optional int32 cardinality = 16; |
| 3168 | |
| 3169 | // e.g., (x, y) span of the widget inside homescreen grid system |
| 3170 | optional int32 span_x = 17 [default = 1]; |
| 3171 | optional int32 span_y = 18 [default = 1]; |
Hyunyoung Song | 0ff10a4 | 2020-02-28 11:44:39 -0800 | [diff] [blame] | 3172 | } |
| 3173 | |
| 3174 | /** |
| 3175 | * Logs when Wallpaper or ThemePicker UI has changed. |
| 3176 | * |
| 3177 | * Logged from: |
| 3178 | * packages/apps/ThemePicker |
| 3179 | * packages/apps/WallpaperPicker2 |
| 3180 | */ |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 3181 | message StyleUIChanged { |
| 3182 | optional android.stats.style.Action action = 1; |
| 3183 | optional int32 color_package_hash = 2; |
| 3184 | optional int32 font_package_hash = 3; |
| 3185 | optional int32 shape_package_hash = 4; |
| 3186 | optional int32 clock_package_hash = 5; |
| 3187 | optional int32 launcher_grid = 6; |
| 3188 | optional int32 wallpaper_category_hash = 7; |
| 3189 | optional int32 wallpaper_id_hash = 8; |
Kunhung Li | 286c52f | 2019-05-21 20:10:43 +0800 | [diff] [blame] | 3190 | optional int32 color_preference = 9; |
| 3191 | optional android.stats.style.LocationPreference location_preference = 10; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 3192 | } |
| 3193 | |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3194 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3195 | * Logs when Settings UI has changed. |
| 3196 | * |
| 3197 | * Logged from: |
| 3198 | * packages/apps/Settings |
| 3199 | */ |
| 3200 | message SettingsUIChanged { |
| 3201 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3202 | * Where this SettingsUIChange event comes from. For example, if |
| 3203 | * it's a PAGE_VISIBLE event, where the page is opened from. |
| 3204 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 3205 | optional android.app.settings.PageId attribution = 1; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3206 | |
| 3207 | /** |
| 3208 | * What the UI action is. |
| 3209 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 3210 | optional android.app.settings.Action action = 2; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3211 | |
| 3212 | /** |
| 3213 | * Where the action is happening |
| 3214 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 3215 | optional android.app.settings.PageId page_id = 3; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3216 | |
| 3217 | /** |
| 3218 | * What preference changed in this event. |
| 3219 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 3220 | optional string changed_preference_key = 4; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3221 | |
| 3222 | /** |
| 3223 | * The new value of the changed preference. |
| 3224 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 3225 | optional int64 changed_preference_int_value = 5; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 3226 | } |
| 3227 | |
| 3228 | /** |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3229 | * Logs basic timing information about touch events. |
| 3230 | * Reported at most every 5 minutes while device is being interacted with. |
| 3231 | * |
| 3232 | * Logged from: |
| 3233 | * frameworks/native/services/inputflinger |
| 3234 | */ |
| 3235 | message TouchEventReported { |
| 3236 | /** |
| 3237 | * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 3238 | * and the standard deviation of the time spent processing touchscreen events |
| 3239 | * in the kernel and inputflinger. The units are microseconds. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3240 | * |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 3241 | * On supported devices, the starting point is taken during the hard interrupt inside the |
| 3242 | * kernel touch driver. On all other devices, the starting point is taken inside |
| 3243 | * the kernel's input event subsystem upon receipt of the input event. |
| 3244 | * The ending point is taken inside InputDispatcher, just after the input event |
| 3245 | * is sent to the app. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3246 | */ |
| 3247 | // Minimum value |
| 3248 | optional float latency_min_micros = 1; |
| 3249 | // Maximum value |
| 3250 | optional float latency_max_micros = 2; |
| 3251 | // Average value |
| 3252 | optional float latency_mean_micros = 3; |
| 3253 | // Standard deviation |
| 3254 | optional float latency_stdev_micros = 4; |
Siarhei Vishniakou | ca954f9 | 2019-03-22 16:41:14 -0700 | [diff] [blame] | 3255 | // Number of touch events (input_event) in this report |
| 3256 | optional int32 count = 5; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 3257 | } |
| 3258 | |
| 3259 | /** |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 3260 | * Logs gesture classification and timing information for touch events. |
| 3261 | * |
| 3262 | * Logged from: |
| 3263 | * frameworks/base/core/java/android/view/GestureDetector.java |
| 3264 | * frameworks/base/core/java/android/view/View.java |
| 3265 | */ |
| 3266 | message TouchGestureClassified { |
| 3267 | // The source of the classification (e.g. Java class name). |
| 3268 | optional string source = 1; |
| 3269 | |
| 3270 | enum Classification { |
| 3271 | UNKNOWN_CLASSIFICATION = 0; |
| 3272 | SINGLE_TAP = 1; |
| 3273 | DOUBLE_TAP = 2; |
| 3274 | LONG_PRESS = 3; |
| 3275 | DEEP_PRESS = 4; |
| 3276 | SCROLL = 5; |
| 3277 | } |
| 3278 | // The classification of the gesture. |
| 3279 | optional Classification classification = 2; |
| 3280 | |
| 3281 | // The interval from the start of a touch event stream until the |
| 3282 | // classification was made. |
| 3283 | optional int32 latency_millis = 3; |
| 3284 | |
| 3285 | // The distance from the location of the first touch event to the |
| 3286 | // location of the touch event when the classification was made. |
| 3287 | optional float displacement_px = 4; |
| 3288 | } |
| 3289 | |
| 3290 | /** |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3291 | * Logs that a setting was updated. |
| 3292 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 3293 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3294 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 3295 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 3296 | */ |
| 3297 | message SettingChanged { |
| 3298 | // The name of the setting. |
| 3299 | optional string setting = 1; |
| 3300 | |
| 3301 | // The change being imposed on this setting. May represent a number, eg "3". |
| 3302 | optional string value = 2; |
| 3303 | |
| 3304 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 3305 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 3306 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 3307 | // The +/- feature is currently only used for location_providers_allowed. |
| 3308 | optional string new_value = 3; |
| 3309 | |
| 3310 | // The previous value of this setting. |
| 3311 | optional string prev_value = 4; |
| 3312 | |
| 3313 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 3314 | optional string tag = 5; |
| 3315 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 3316 | // True if this setting with tag should be resettable. |
| 3317 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3318 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 3319 | // 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] | 3320 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 3321 | |
| 3322 | enum ChangeReason { |
| 3323 | UPDATED = 1; // Updated can be an insertion or an update. |
| 3324 | DELETED = 2; |
| 3325 | } |
| 3326 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 3327 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 3328 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3329 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 3330 | * Logs activity going to foreground or background |
| 3331 | * |
| 3332 | * Logged from: |
| 3333 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 3334 | */ |
| 3335 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3336 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 3337 | optional string pkg_name = 2; |
| 3338 | optional string class_name = 3; |
| 3339 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3340 | enum State { |
| 3341 | BACKGROUND = 0; |
| 3342 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 3343 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3344 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 3345 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3346 | |
| 3347 | /** |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 3348 | * Logs when a volume entered low Storage state. |
| 3349 | * Logged from: |
| 3350 | * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java |
| 3351 | */ |
| 3352 | message LowStorageStateChanged { |
| 3353 | // Volume that ran out of storage. |
| 3354 | optional string volume_description = 1; |
| 3355 | |
| 3356 | enum State { |
| 3357 | UNKNOWN = 0; |
| 3358 | OFF = 1; |
| 3359 | ON = 2; |
| 3360 | } |
| 3361 | optional State state = 2; |
| 3362 | } |
| 3363 | |
| 3364 | /** |
| 3365 | * Logs when an app is downgraded. |
| 3366 | * Logged from: |
| 3367 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 3368 | */ |
| 3369 | message AppDowngraded { |
| 3370 | optional string package_name = 1; |
| 3371 | // Size of the package (all data) before being downgraded. |
| 3372 | optional int64 size_in_bytes_before = 2; |
| 3373 | // Size of the package (all data) after being downgraded. |
| 3374 | optional int64 size_in_bytes_after = 3; |
| 3375 | |
| 3376 | optional bool aggressive = 4; |
| 3377 | } |
| 3378 | |
| 3379 | /** |
| 3380 | * Logs when an app is optimized after being downgraded. |
| 3381 | * Logged from: |
| 3382 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 3383 | */ |
| 3384 | message AppOptimizedAfterDowngraded { |
| 3385 | optional string package_name = 1; |
| 3386 | } |
| 3387 | |
| 3388 | /** |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 3389 | * Logs whenever an app is installed on external storage. |
| 3390 | * Logged from: |
| 3391 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 3392 | */ |
| 3393 | message AppInstallOnExternalStorageReported { |
| 3394 | // The type of external storage. |
| 3395 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 3396 | // The name of the package that is installed on the sd card. |
| 3397 | optional string package_name = 2; |
| 3398 | } |
| 3399 | |
| 3400 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3401 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3402 | * Logged from: |
| 3403 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3404 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3405 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3406 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3407 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3408 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3409 | |
| 3410 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3411 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3412 | optional string process_name = 3; |
| 3413 | |
| 3414 | // The pid if available. -1 means not available. |
Howard Ro | 8e05174 | 2020-03-20 15:07:20 -0700 | [diff] [blame] | 3415 | optional int32 pid = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 3416 | |
| 3417 | optional string package_name = 5; |
| 3418 | |
| 3419 | enum InstantApp { |
| 3420 | UNAVAILABLE = 0; |
| 3421 | FALSE = 1; |
| 3422 | TRUE = 2; |
| 3423 | } |
| 3424 | optional InstantApp is_instant_app = 6; |
| 3425 | |
| 3426 | enum ForegroundState { |
| 3427 | UNKNOWN = 0; |
| 3428 | BACKGROUND = 1; |
| 3429 | FOREGROUND = 2; |
| 3430 | } |
| 3431 | optional ForegroundState foreground_state = 7; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3432 | |
| 3433 | optional android.server.ErrorSource error_source = 8; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3434 | } |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3435 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3436 | /** |
| 3437 | * Logs when a WTF (What a Terrible Failure) happened. |
| 3438 | * Logged from: |
| 3439 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3440 | */ |
| 3441 | message WTFOccurred { |
| 3442 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3443 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3444 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3445 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3446 | // The name of the process. |
| 3447 | // system_server if it is not by an app |
| 3448 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 3449 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3450 | // The pid if available. -1 means not available. |
Howard Ro | 8e05174 | 2020-03-20 15:07:20 -0700 | [diff] [blame] | 3451 | optional int32 pid = 4; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3452 | |
| 3453 | optional android.server.ErrorSource error_source = 5; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3454 | } |
| 3455 | |
| 3456 | /** |
| 3457 | * Logs when system server reports low memory. |
| 3458 | * Logged from: |
| 3459 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3460 | */ |
| 3461 | message LowMemReported { |
| 3462 | } |
| 3463 | |
| 3464 | /** |
| 3465 | * Logs when an app ANR (App Not Responding) occurs. |
| 3466 | * Logged from: |
| 3467 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 3468 | */ |
| 3469 | message ANROccurred { |
| 3470 | optional int32 uid = 1 [(is_uid) = true]; |
| 3471 | |
| 3472 | optional string process_name = 2; |
| 3473 | |
| 3474 | optional string short_component_name = 3; |
| 3475 | |
| 3476 | optional string reason = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 3477 | |
| 3478 | enum InstantApp { |
| 3479 | UNAVAILABLE = 0; |
| 3480 | FALSE = 1; |
| 3481 | TRUE = 2; |
| 3482 | } |
| 3483 | optional InstantApp is_instant_app = 5; |
| 3484 | |
| 3485 | enum ForegroundState { |
| 3486 | UNKNOWN = 0; |
| 3487 | BACKGROUND = 1; |
| 3488 | FOREGROUND = 2; |
| 3489 | } |
| 3490 | optional ForegroundState foreground_state = 6; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3491 | |
| 3492 | optional android.server.ErrorSource error_source = 7; |
| 3493 | |
| 3494 | optional string package_name = 8; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3495 | } |
| 3496 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 3497 | /** |
| 3498 | * Logs when the vibrator state changes. |
| 3499 | * Logged from: |
| 3500 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 3501 | */ |
| 3502 | message VibratorStateChanged { |
| 3503 | repeated AttributionNode attribution_node = 1; |
| 3504 | |
| 3505 | enum State { |
| 3506 | OFF = 0; |
| 3507 | ON = 1; |
| 3508 | } |
| 3509 | optional State state = 2; |
| 3510 | |
| 3511 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 3512 | // Only applicable for State == ON. |
| 3513 | optional int64 duration_millis = 3; |
| 3514 | } |
| 3515 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3516 | /* |
| 3517 | * Allows other apps to push events into statsd. |
| 3518 | * Logged from: |
| 3519 | * frameworks/base/core/java/android/util/StatsLog.java |
| 3520 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3521 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3522 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3523 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3524 | |
| 3525 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 3526 | optional int32 label = 2; |
| 3527 | |
| 3528 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 3529 | // predicates for the metrics). |
| 3530 | enum State { |
| 3531 | UNKNOWN = 0; |
| 3532 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 3533 | STOP = 2; |
| 3534 | START = 3; |
| 3535 | } |
| 3536 | optional State state = 3; |
| 3537 | } |
| 3538 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3539 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 3540 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 3541 | * For example, this could be due to the user manually changing the time. |
| 3542 | * |
| 3543 | * Logged from: |
| 3544 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 3545 | */ |
| 3546 | message WallClockTimeShifted { |
| 3547 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 3548 | optional int64 wall_clock_timestamp_millis = 1; |
| 3549 | } |
| 3550 | |
| 3551 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3552 | * Logs when statsd detects an anomaly. |
| 3553 | * |
| 3554 | * Logged from: |
| 3555 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 3556 | */ |
| 3557 | message AnomalyDetected { |
| 3558 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3559 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3560 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 3561 | // Id of the config whose anomaly detection alert fired. |
| 3562 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3563 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 3564 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 3565 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3566 | } |
| 3567 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3568 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3569 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3570 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3571 | |
| 3572 | // The app package name. |
| 3573 | optional string pkg_name = 2; |
| 3574 | |
| 3575 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3576 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3577 | WARM = 1; |
| 3578 | HOT = 2; |
| 3579 | COLD = 3; |
| 3580 | } |
| 3581 | // The transition type. |
| 3582 | optional TransitionType type = 3; |
| 3583 | |
| 3584 | // The activity name. |
| 3585 | optional string activity_name = 4; |
| 3586 | |
| 3587 | // The name of the calling app. Empty if not set. |
| 3588 | optional string calling_pkg_name = 5; |
| 3589 | |
| 3590 | // Whether the app is an instant app. |
| 3591 | optional bool is_instant_app = 6; |
| 3592 | |
| 3593 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3594 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3595 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 3596 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3597 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3598 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3599 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3600 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3601 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3602 | optional int32 bind_application_delay_millis = 11; |
| 3603 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3604 | |
| 3605 | // Empty if not set. |
| 3606 | optional string launch_token = 13; |
| 3607 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3608 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3609 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3610 | |
| 3611 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3612 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3613 | } |
| 3614 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3615 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3616 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3617 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3618 | |
| 3619 | // The app package name. |
| 3620 | optional string pkg_name = 2; |
| 3621 | |
| 3622 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3623 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3624 | WARM = 1; |
| 3625 | HOT = 2; |
| 3626 | COLD = 3; |
| 3627 | } |
| 3628 | // The transition type. |
| 3629 | optional TransitionType type = 3; |
| 3630 | |
| 3631 | // The activity name. |
| 3632 | optional string activity_name = 4; |
| 3633 | } |
| 3634 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3635 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3636 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3637 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3638 | |
| 3639 | // The app package name. |
| 3640 | optional string pkg_name = 2; |
| 3641 | |
| 3642 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3643 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3644 | WITH_BUNDLE = 1; |
| 3645 | WITHOUT_BUNDLE = 2; |
| 3646 | } |
| 3647 | // The transition type. |
| 3648 | optional TransitionType type = 3; |
| 3649 | |
| 3650 | // The activity name. |
| 3651 | optional string activity_name = 4; |
| 3652 | |
| 3653 | optional bool transition_process_running = 5; |
| 3654 | |
| 3655 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3656 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3657 | } |
| 3658 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3659 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3660 | * Logs a picture-in-picture action |
| 3661 | * Logged from: |
| 3662 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3663 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 3664 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 3665 | */ |
| 3666 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3667 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3668 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3669 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3670 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3671 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3672 | enum State { |
| 3673 | ENTERED = 1; |
| 3674 | EXPANDED_TO_FULL_SCREEN = 2; |
| 3675 | MINIMIZED = 3; |
| 3676 | DISMISSED = 4; |
| 3677 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3678 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3679 | } |
| 3680 | |
| 3681 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3682 | * Logs overlay action |
| 3683 | * Logged from: |
| 3684 | * services/core/java/com/android/server/wm/Session.java |
| 3685 | */ |
| 3686 | message OverlayStateChanged { |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 3687 | 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] | 3688 | |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 3689 | optional string package_name = 2 [(state_field_option).primary_field = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3690 | |
| 3691 | optional bool using_alert_window = 3; |
| 3692 | |
| 3693 | enum State { |
| 3694 | ENTERED = 1; |
| 3695 | EXITED = 2; |
| 3696 | } |
tsaichristine | 961d2fd | 2020-04-23 10:39:34 -0700 | [diff] [blame] | 3697 | optional State state = 4 |
| 3698 | [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3699 | } |
| 3700 | |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3701 | /** |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3702 | * Logs foreground service starts and stops. |
| 3703 | * Note that this is not when a service starts or stops, but when it is |
| 3704 | * considered foreground. |
| 3705 | * Logged from |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3706 | * frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3707 | */ |
| 3708 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3709 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3710 | // package_name + "/" + class_name |
| 3711 | optional string short_name = 2; |
| 3712 | |
| 3713 | enum State { |
| 3714 | ENTER = 1; |
| 3715 | EXIT = 2; |
| 3716 | } |
| 3717 | optional State state = 3; |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3718 | |
| 3719 | // Whether the fgs is allowed while-in-use permissions, i.e. is considered 'in-use' to the user. |
| 3720 | // (If the fgs was started while the app wasn't TOP it usually will be denied these permissions) |
| 3721 | optional bool allow_while_in_use_permission = 4; |
| 3722 | } |
| 3723 | |
| 3724 | /** |
| 3725 | * Logs the number of times a uid accesses a sensitive AppOp during a foreground service session. |
| 3726 | * A foreground service session is any continuous period during which the uid holds at least one |
| 3727 | * foreground service; the atom will be pushed when the uid no longer holds any foreground services. |
| 3728 | * Accesses initiated while the uid is in the TOP state are ignored. |
| 3729 | * Sessions with no attempted accesses are not logged. |
| 3730 | * Logged from |
| 3731 | * frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 3732 | */ |
| 3733 | message ForegroundServiceAppOpSessionEnded { |
| 3734 | optional int32 uid = 1 [(is_uid) = true]; |
| 3735 | |
| 3736 | // The operation's name. |
Stanislav Zholnin | 48811ee | 2020-03-03 16:15:55 +0000 | [diff] [blame] | 3737 | // Only following four ops are logged |
| 3738 | // COARSE_LOCATION = 0 |
| 3739 | // FINE_LOCATION = 1 |
| 3740 | // CAMERA = 26 |
| 3741 | // RECORD_AUDIO = 27 |
| 3742 | optional android.app.AppOpEnum app_op_name = 2 [default = APP_OP_NONE]; |
Adam Bookatz | 3876793 | 2020-02-05 12:13:40 -0800 | [diff] [blame] | 3743 | |
| 3744 | // The uid's permission mode for accessing the AppOp during this fgs session. |
| 3745 | enum Mode { |
| 3746 | MODE_UNKNOWN = 0; |
| 3747 | MODE_ALLOWED = 1; // Always allowed |
| 3748 | MODE_IGNORED = 2; // Denied |
| 3749 | MODE_FOREGROUND = 3; // Allow-while-in-use (or allowed-one-time) |
| 3750 | } |
| 3751 | optional Mode app_op_mode = 3; |
| 3752 | |
| 3753 | // Number of times this AppOp was requested and allowed. |
| 3754 | optional int32 count_ops_accepted = 4; |
| 3755 | // Number of times this AppOp was requested but denied. |
| 3756 | optional int32 count_ops_rejected = 5; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3757 | } |
| 3758 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3759 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3760 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 3761 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 3762 | * attributed back to the parent (host) uid. One example is Chrome. |
| 3763 | * |
| 3764 | * Logged from: |
| 3765 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 3766 | */ |
| 3767 | message IsolatedUidChanged { |
| 3768 | // 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] | 3769 | // 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] | 3770 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3771 | optional int32 parent_uid = 1; |
| 3772 | |
| 3773 | optional int32 isolated_uid = 2; |
| 3774 | |
| 3775 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 3776 | enum Event { |
| 3777 | REMOVED = 0; |
| 3778 | CREATED = 1; |
| 3779 | } |
| 3780 | optional Event event = 3; |
| 3781 | } |
| 3782 | |
| 3783 | /* |
| 3784 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 3785 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 3786 | * and processed by WakeupController.cpp. |
| 3787 | */ |
| 3788 | message PacketWakeupOccurred { |
| 3789 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 3790 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3791 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3792 | // The interface name on which the packet was received. |
| 3793 | optional string iface = 2; |
| 3794 | // The ethertype value of the packet. |
| 3795 | optional int32 ethertype = 3; |
| 3796 | // String representation of the destination MAC address of the packet. |
| 3797 | optional string destination_hardware_address = 4; |
| 3798 | // String representation of the source address of the packet if this was an IP packet. |
| 3799 | optional string source_ip = 5; |
| 3800 | // String representation of the destination address of the packet if this was an IP packet. |
| 3801 | optional string destination_ip = 6; |
| 3802 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 3803 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 3804 | // families. |
| 3805 | optional int32 ip_next_header = 7; |
| 3806 | // The source port if this was a TCP or UDP packet. |
| 3807 | optional int32 source_port = 8; |
| 3808 | // The destination port if this was a TCP or UDP packet. |
| 3809 | optional int32 destination_port = 9; |
| 3810 | } |
| 3811 | |
| 3812 | /* |
| 3813 | * Logs the memory stats for an app on startup. |
| 3814 | * Logged from: |
| 3815 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3816 | */ |
| 3817 | message AppStartMemoryStateCaptured { |
| 3818 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3819 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3820 | |
| 3821 | // The process name. |
| 3822 | optional string process_name = 2; |
| 3823 | |
| 3824 | // The activity name. |
| 3825 | optional string activity_name = 3; |
| 3826 | |
| 3827 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3828 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3829 | |
| 3830 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3831 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3832 | |
| 3833 | // RSS |
| 3834 | optional int64 rss_in_bytes = 6; |
| 3835 | |
| 3836 | // CACHE |
| 3837 | optional int64 cache_in_bytes = 7; |
| 3838 | |
| 3839 | // SWAP |
| 3840 | optional int64 swap_in_bytes = 8; |
| 3841 | } |
| 3842 | |
| 3843 | /* |
| 3844 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 3845 | * for LMK event. |
| 3846 | * Logged from: |
| 3847 | * system/core/lmkd/lmkd.c |
| 3848 | */ |
| 3849 | message LmkStateChanged { |
| 3850 | enum State { |
| 3851 | UNKNOWN = 0; |
| 3852 | START = 1; |
| 3853 | STOP = 2; |
| 3854 | } |
| 3855 | optional State state = 1; |
| 3856 | } |
| 3857 | |
| 3858 | /* |
| 3859 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 3860 | * Logged from: |
| 3861 | * system/core/lmkd/lmkd.c |
| 3862 | */ |
| 3863 | message LmkKillOccurred { |
| 3864 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3865 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3866 | |
| 3867 | // The process name. |
| 3868 | optional string process_name = 2; |
| 3869 | |
| 3870 | // oom adj score. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3871 | optional int32 oom_adj_score = 3; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3872 | |
| 3873 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3874 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3875 | |
| 3876 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3877 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3878 | |
| 3879 | // RSS |
| 3880 | optional int64 rss_in_bytes = 6; |
| 3881 | |
| 3882 | // CACHE |
| 3883 | optional int64 cache_in_bytes = 7; |
| 3884 | |
| 3885 | // SWAP |
| 3886 | optional int64 swap_in_bytes = 8; |
Jim Blackler | 8593d1f | 2018-11-21 15:24:48 +0000 | [diff] [blame] | 3887 | |
| 3888 | // The elapsed real time of start of the process. |
| 3889 | optional int64 process_start_time_nanos = 9; |
Suren Baghdasaryan | 1fbaa1f | 2019-03-04 11:09:31 -0800 | [diff] [blame] | 3890 | |
| 3891 | // Min oom adj score considered by lmkd. |
| 3892 | optional int32 min_oom_score = 10; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3893 | } |
| 3894 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3895 | /* |
| 3896 | * Logs when the ActivityManagerService detects that an app died. |
| 3897 | * |
| 3898 | * Logged from: |
| 3899 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3900 | */ |
| 3901 | message AppDied { |
| 3902 | // timestamp(elapsedRealtime) of record creation |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 3903 | optional uint64 timestamp_millis = 1 [(state_field_option).exclusive_state = true]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3904 | } |
| 3905 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3906 | /** |
| 3907 | * An atom for generic metrics logging. Available from Android Q. |
| 3908 | */ |
| 3909 | message GenericAtom { |
| 3910 | // The uid of the application that sent this custom atom. |
| 3911 | optional int32 uid = 1 [(is_uid) = true]; |
| 3912 | |
| 3913 | // An event_id indicates the type of event. |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 3914 | optional android.stats.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3915 | } |
| 3916 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3917 | /** |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3918 | * Atom for simple logging of user interaction and impression events, such as "the user touched |
| 3919 | * this button" or "this dialog was displayed". |
| 3920 | * Keep the UI event stream clean: don't use for system or background events. |
| 3921 | * 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] | 3922 | * |
| 3923 | * Logged from: |
| 3924 | * frameworks/base/services/core/java/com/android/server/ |
| 3925 | * frameworks/base/packages/SystemUI/src/com/android/systemui/ |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3926 | */ |
| 3927 | message UiEventReported { |
| 3928 | // The event_id. |
| 3929 | optional int32 event_id = 1; |
| 3930 | // The event's source or target uid and package, if applicable. |
| 3931 | // For example, the package posting a notification, or the destination package of a share. |
| 3932 | optional int32 uid = 2 [(is_uid) = true]; |
| 3933 | optional string package_name = 3; |
Will Brockman | 12282ac | 2019-12-20 09:37:42 -0500 | [diff] [blame] | 3934 | // An identifier used to disambiguate which logs refer to a particular instance of some |
| 3935 | // UI element. Useful when there might be multiple instances simultaneously active. |
| 3936 | optional int32 instance_id = 4; |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3937 | } |
| 3938 | |
| 3939 | /** |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3940 | * Reports a notification was created or updated. |
| 3941 | * |
| 3942 | * Logged from: |
| 3943 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 3944 | */ |
| 3945 | message NotificationReported { |
| 3946 | // The event_id (as for UiEventReported). |
| 3947 | optional int32 event_id = 1; |
| 3948 | // The notifying app's uid and package. |
| 3949 | optional int32 uid = 2 [(is_uid) = true]; |
| 3950 | optional string package_name = 3; |
| 3951 | // A small system-assigned identifier for the notification. |
| 3952 | // Locally probably-unique, but expect collisions across users and/or days. |
| 3953 | optional int32 instance_id = 4; |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3954 | optional int32 notification_id_hash = 5; // Small hash of the app-assigned notif ID + tag |
| 3955 | 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] | 3956 | |
| 3957 | // Grouping information |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3958 | optional int32 group_id_hash = 7; // Small hash of the group ID of the notification |
| 3959 | optional int32 group_instance_id = 8; // Instance_id of the group-summary notification |
| 3960 | optional bool is_group_summary = 9; // Tags the group-summary notification |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3961 | |
| 3962 | // Attributes |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3963 | optional string category = 10; // App-assigned notification category (API-defined strings) |
| 3964 | optional int32 style = 11; // App-assigned notification style |
| 3965 | 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] | 3966 | |
| 3967 | // Ordering, importance and interruptiveness |
| 3968 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3969 | optional int32 position = 13; // Position in NotificationManager's list |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3970 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3971 | optional android.stats.sysui.NotificationImportance importance = 14; |
| 3972 | optional int32 alerting = 15; // Bitfield, 1=buzz 2=beep 4=blink |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3973 | |
| 3974 | enum NotificationImportanceExplanation { |
| 3975 | IMPORTANCE_EXPLANATION_UNKNOWN = 0; |
| 3976 | IMPORTANCE_EXPLANATION_APP = 1; // App-specified channel importance. |
| 3977 | IMPORTANCE_EXPLANATION_USER = 2; // User-specified channel importance. |
| 3978 | IMPORTANCE_EXPLANATION_ASST = 3; // Notification Assistant override. |
| 3979 | IMPORTANCE_EXPLANATION_SYSTEM = 4; // System override. |
| 3980 | // Like _APP, but based on pre-channels priority signal. |
| 3981 | IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5; |
| 3982 | } |
| 3983 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3984 | optional NotificationImportanceExplanation importance_source = 16; |
| 3985 | optional android.stats.sysui.NotificationImportance importance_initial = 17; |
| 3986 | optional NotificationImportanceExplanation importance_initial_source = 18; |
| 3987 | optional android.stats.sysui.NotificationImportance importance_asst = 19; |
| 3988 | optional int32 assistant_hash = 20; |
| 3989 | optional float assistant_ranking_score = 21; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3990 | } |
| 3991 | |
| 3992 | message Notification { |
| 3993 | // The notifying app's uid and package. |
| 3994 | optional int32 uid = 1 [(is_uid) = true]; |
| 3995 | optional string package_name = 2; |
| 3996 | // A small system-assigned identifier for the notification. |
| 3997 | optional int32 instance_id = 3; |
| 3998 | |
| 3999 | // Grouping information. |
| 4000 | optional int32 group_instance_id = 4; |
| 4001 | optional bool is_group_summary = 5; |
| 4002 | |
| 4003 | // The section of the shade that the notification is in. |
| 4004 | // See NotificationSectionsManager.PriorityBucket. |
| 4005 | enum NotificationSection { |
| 4006 | SECTION_UNKNOWN = 0; |
Will Brockman | e375384 | 2020-03-03 16:29:34 -0500 | [diff] [blame] | 4007 | SECTION_HEADS_UP = 1; |
Will Brockman | cec88ed | 2020-04-27 13:11:02 -0400 | [diff] [blame] | 4008 | SECTION_MEDIA_CONTROLS = 2; |
| 4009 | SECTION_PEOPLE = 3; |
| 4010 | SECTION_ALERTING = 4; |
| 4011 | SECTION_SILENT = 5; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 4012 | } |
| 4013 | optional NotificationSection section = 6; |
| 4014 | } |
| 4015 | |
| 4016 | message NotificationList { |
| 4017 | repeated Notification notifications = 1; // An ordered sequence of notifications. |
| 4018 | } |
| 4019 | |
| 4020 | /** |
| 4021 | * Reports a notification panel was displayed, e.g. from the lockscreen or status bar. |
| 4022 | * |
| 4023 | * Logged from: |
| 4024 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
| 4025 | */ |
| 4026 | message NotificationPanelReported { |
| 4027 | // The event_id (as for UiEventReported). |
| 4028 | optional int32 event_id = 1; |
| 4029 | optional int32 num_notifications = 2; |
| 4030 | // The notifications in the panel, in the order that they appear there. |
| 4031 | optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES]; |
| 4032 | } |
| 4033 | |
| 4034 | /** |
| 4035 | * Reports a notification channel, or channel group, was created, updated, or deleted. |
| 4036 | * |
| 4037 | * Logged from: |
| 4038 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 4039 | */ |
| 4040 | message NotificationChannelModified { |
| 4041 | // The event_id (as for UiEventReported). |
| 4042 | optional int32 event_id = 1; |
| 4043 | // The notifying app's uid and package. |
| 4044 | optional int32 uid = 2 [(is_uid) = true]; |
| 4045 | optional string package_name = 3; |
Will Brockman | 7fb7944 | 2020-02-27 14:34:24 -0500 | [diff] [blame] | 4046 | // Hash of app-assigned notification channel ID or channel-group ID |
| 4047 | optional int32 channel_id_hash = 4; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 4048 | // Previous importance setting, if applicable |
| 4049 | optional android.stats.sysui.NotificationImportance old_importance = 5; |
| 4050 | // New importance setting |
| 4051 | optional android.stats.sysui.NotificationImportance importance = 6; |
| 4052 | } |
| 4053 | |
| 4054 | |
| 4055 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4056 | * Logs when a biometric acquire event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4057 | * |
| 4058 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4059 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4060 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4061 | message BiometricAcquired { |
| 4062 | // Biometric modality that was acquired. |
| 4063 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4064 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. |
| 4065 | optional int32 user = 2; |
| 4066 | // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 4067 | optional bool is_crypto = 3; |
| 4068 | // Action that the device is performing. Acquired messages are only expected for enroll and |
| 4069 | // authenticate. Other actions may indicate an error. |
| 4070 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 4071 | // The client that this acquisition was received for. |
| 4072 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 4073 | // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager. |
| 4074 | optional int32 acquire_info = 6; |
| 4075 | // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. |
| 4076 | optional int32 acquire_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4077 | // Dictates if this message should trigger additional debugging. |
| 4078 | optional bool debug = 8; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4079 | } |
| 4080 | |
| 4081 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4082 | * Logs when a biometric authentication event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4083 | * |
| 4084 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4085 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4086 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4087 | message BiometricAuthenticated { |
| 4088 | // Biometric modality that was used. |
| 4089 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4090 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 4091 | optional int32 user = 2; |
| 4092 | // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password |
| 4093 | // storage. |
| 4094 | optional bool is_crypto = 3; |
| 4095 | // The client that this acquisition was received for. |
| 4096 | optional android.hardware.biometrics.ClientEnum client = 4; |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 4097 | // If authentication requires user confirmation. See BiometricPrompt's |
| 4098 | // setRequireConfirmation(bool) method. |
| 4099 | optional bool require_confirmation = 5; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4100 | |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4101 | enum State { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4102 | UNKNOWN = 0; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4103 | REJECTED = 1; |
| 4104 | PENDING_CONFIRMATION = 2; |
| 4105 | CONFIRMED = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4106 | } |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4107 | |
| 4108 | // State of the current auth attempt. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 4109 | optional State state = 6; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4110 | // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is |
| 4111 | // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to |
| 4112 | // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to |
| 4113 | // CONFIRMED. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 4114 | optional int64 latency_millis = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4115 | // Dictates if this message should trigger additional debugging. |
| 4116 | optional bool debug = 8; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4117 | } |
| 4118 | |
| 4119 | /** |
| 4120 | * Logs when a biometric error occurs. |
| 4121 | * |
| 4122 | * Logged from: |
| 4123 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 4124 | */ |
| 4125 | message BiometricErrorOccurred { |
| 4126 | // Biometric modality that was used. |
| 4127 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4128 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 4129 | optional int32 user = 2; |
| 4130 | // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 4131 | optional bool is_crypto = 3; |
| 4132 | // Action that the device is performing. |
| 4133 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 4134 | // The client that this acquisition was received for. |
| 4135 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 4136 | // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors |
| 4137 | // are unique to modality. |
| 4138 | optional int32 error_info = 6; |
| 4139 | // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined |
| 4140 | // by the vendor and not specified by the HIDL interface. |
| 4141 | optional int32 error_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4142 | // Dictates if this message should trigger additional debugging. |
| 4143 | optional bool debug = 8; |
Kevin Chyn | 7fca236 | 2019-06-20 17:20:42 -0700 | [diff] [blame] | 4144 | // Time spent during the authentication attempt. |
| 4145 | optional int64 latency_millis = 9; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4146 | } |
| 4147 | |
| 4148 | /** |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 4149 | * Logs when a system health issue is detected. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4150 | * Logged from: |
| 4151 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 4152 | */ |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 4153 | message BiometricSystemHealthIssueDetected { |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4154 | // Biometric modality. |
| 4155 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 4156 | // Type of issue detected. |
| 4157 | optional android.hardware.biometrics.IssueEnum issue = 2; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 4158 | // Dictates if this message should trigger additional debugging. |
| 4159 | optional bool debug = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4160 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 4161 | |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 4162 | /** |
| 4163 | * Logs when a biometric enrollment occurs. |
| 4164 | * |
| 4165 | * Logged from: |
| 4166 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 4167 | */ |
| 4168 | message BiometricEnrolled { |
| 4169 | // Biometric modality that was used. |
| 4170 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 4171 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 4172 | optional int32 user = 2; |
| 4173 | // The amount of time the enrollment took in milliseconds. |
| 4174 | optional int64 latency_millis = 3; |
| 4175 | // Whether or not the enrollment was successful. |
| 4176 | optional bool success = 4; |
| 4177 | } |
| 4178 | |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4179 | /* |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 4180 | * 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] | 4181 | */ |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 4182 | message FlagFlipUpdateOccurred { |
| 4183 | // If the event is from a flag config package, specify the package name. |
| 4184 | optional string flag_flip_package_name = 1; |
| 4185 | |
| 4186 | // The order id of the package |
| 4187 | optional int64 order_id = 2; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4188 | } |
| 4189 | |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 4190 | /** |
| 4191 | * Potential experiment ids that goes with a train install. |
Jonathan Nguyen | a0e6de1 | 2020-01-28 18:33:55 -0800 | [diff] [blame] | 4192 | * Should be kept in sync with experiment_ids.proto. |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 4193 | */ |
| 4194 | message TrainExperimentIds { |
| 4195 | repeated int64 experiment_id = 1; |
| 4196 | } |
| 4197 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4198 | /* |
| 4199 | * Logs when a binary push state changes. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4200 | * Logged by the installer via public api. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4201 | */ |
| 4202 | message BinaryPushStateChanged { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4203 | // Name of the train. |
| 4204 | optional string train_name = 1; |
| 4205 | // Version code for a "train" of packages that need to be installed atomically |
| 4206 | optional int64 train_version_code = 2; |
| 4207 | // After installation of this package, device requires a restart. |
| 4208 | optional bool requires_staging = 3; |
| 4209 | // Rollback should be enabled for this install. |
| 4210 | optional bool rollback_enabled = 4; |
| 4211 | // Requires low latency monitoring if possible. |
| 4212 | optional bool requires_low_latency_monitor = 5; |
| 4213 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4214 | enum State { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4215 | UNKNOWN = 0; |
| 4216 | INSTALL_REQUESTED = 1; |
| 4217 | INSTALL_STARTED = 2; |
| 4218 | INSTALL_STAGED_NOT_READY = 3; |
| 4219 | INSTALL_STAGED_READY = 4; |
| 4220 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 4221 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 4222 | // and INSTALL_FAILURE_COMMIT. |
| 4223 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 4224 | // 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] | 4225 | INSTALL_CANCELLED = 7; |
| 4226 | INSTALLER_ROLLBACK_REQUESTED = 8; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 4227 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 4228 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 4229 | INSTALLER_ROLLBACK_STAGED = 11; |
| 4230 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 4231 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 4232 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 4233 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 4234 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 4235 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 4236 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 4237 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 4238 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 4239 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 4240 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 4241 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 4242 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 4243 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 4244 | REBOOT_TRIGGERED = 26; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4245 | } |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 4246 | optional State state = 6; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 4247 | // Possible experiment ids for monitoring this push. |
| 4248 | optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; |
| 4249 | // user id |
| 4250 | optional int32 user_id = 8; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 4251 | optional int32 reason = 9; |
Jonathan Nguyen | 703c42f | 2020-02-04 15:54:26 -0800 | [diff] [blame] | 4252 | // Whether or not this is a rollback event |
| 4253 | optional bool is_rollback = 10; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4254 | } |
| 4255 | |
Tej Singh | c920308 | 2019-05-03 13:42:23 -0700 | [diff] [blame] | 4256 | /* Test atom, is not logged anywhere */ |
| 4257 | message TestAtomReported { |
| 4258 | repeated AttributionNode attribution_node = 1; |
| 4259 | optional int32 int_field = 2; |
| 4260 | optional int64 long_field = 3; |
| 4261 | optional float float_field = 4; |
| 4262 | optional string string_field = 5; |
| 4263 | optional bool boolean_field = 6; |
| 4264 | enum State { |
| 4265 | UNKNOWN = 0; |
| 4266 | OFF = 1; |
| 4267 | ON = 2; |
| 4268 | } |
| 4269 | optional State state = 7; |
| 4270 | optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 4271 | } |
| 4272 | |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 4273 | /** Represents USB port overheat event. */ |
| 4274 | message UsbPortOverheatEvent { |
| 4275 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 4276 | optional int32 plug_temperature_deci_c = 1; |
| 4277 | |
| 4278 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ |
| 4279 | optional int32 max_temperature_deci_c = 2; |
| 4280 | |
| 4281 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 4282 | optional int32 time_to_overheat_secs = 3; |
| 4283 | |
| 4284 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 4285 | optional int32 time_to_hysteresis_secs = 4; |
| 4286 | |
| 4287 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 4288 | optional int32 time_to_inactive_secs = 5; |
| 4289 | }; |
| 4290 | |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 4291 | /** |
| 4292 | * Logs total effective full charge and discharge cycles on a battery. |
| 4293 | * Here are some examples of one effective cycle: |
| 4294 | * 1) the battery charges from 0% to 100% and drains back to 0%, |
| 4295 | * 2) charging from 50% to 100% and draining back to 50% twice. |
| 4296 | * Pulled from: |
| 4297 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4298 | */ |
| 4299 | message BatteryCycleCount { |
| 4300 | /* Number of total charge and discharge cycles on the system battery. */ |
| 4301 | optional int32 cycle_count = 1; |
| 4302 | } |
| 4303 | |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4304 | /** |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4305 | * Logs that external storage is mounted and information about it, the storage type (sd card/usb/ |
| 4306 | * others), its type (public or private) and the size in bytes. |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4307 | * Pulled from: |
| 4308 | * StatsCompanionService |
| 4309 | */ |
| 4310 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4311 | message ExternalStorageInfo { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4312 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4313 | enum VolumeType { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4314 | UNKNOWN = 0; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4315 | PUBLIC = 1; |
| 4316 | PRIVATE = 2; |
| 4317 | OTHER = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4318 | } |
| 4319 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4320 | // The type of external storage. |
| 4321 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 4322 | // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal. |
| 4323 | optional VolumeType volume_type = 2; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4324 | // Total size of the sd card in bytes. |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 4325 | optional int64 size_bytes = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 4326 | } |
| 4327 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 4328 | /* |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4329 | * Logs when a connection becomes available and lost. |
| 4330 | * Logged in StatsCompanionService.java |
| 4331 | */ |
| 4332 | message ConnectivityStateChanged { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 4333 | // Id of the network. |
| 4334 | optional int32 net_id = 1; |
| 4335 | |
| 4336 | enum State { |
| 4337 | UNKNOWN = 0; |
| 4338 | CONNECTED = 1; |
| 4339 | DISCONNECTED = 2; |
| 4340 | } |
| 4341 | // Connected state of a network. |
| 4342 | optional State state = 2; |
| 4343 | } |
| 4344 | |
| 4345 | /** |
| 4346 | * Logs when a service starts and stops. |
| 4347 | * Logged from: |
| 4348 | * services/core/java/com/android/server/am/ActiveServices.java |
| 4349 | */ |
| 4350 | message ServiceStateChanged { |
| 4351 | |
| 4352 | optional int32 uid = 1 [(is_uid) = true]; |
| 4353 | |
| 4354 | optional string package_name = 2; |
| 4355 | |
| 4356 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4357 | |
| 4358 | enum State { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 4359 | START = 1; |
| 4360 | STOP = 2; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4361 | } |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 4362 | |
| 4363 | optional State state = 4; |
| 4364 | } |
| 4365 | |
| 4366 | /** |
| 4367 | * Logs when a service is launched. |
| 4368 | * Logged from: |
| 4369 | * services/core/java/com/android/server/am/ActiveServices.java |
| 4370 | */ |
| 4371 | message ServiceLaunchReported { |
| 4372 | |
| 4373 | optional int32 uid = 1 [(is_uid) = true]; |
| 4374 | |
| 4375 | optional string package_name = 2; |
| 4376 | |
| 4377 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 4378 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 4379 | |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 4380 | /** |
| 4381 | * Logs when a hidden API is used. |
| 4382 | * |
| 4383 | * Logged from: |
| 4384 | * libcore/libart/src/main/java/dalvik/system/VMRuntime.java |
| 4385 | */ |
| 4386 | message HiddenApiUsed { |
| 4387 | // The uid of the app making the hidden access. |
| 4388 | optional int32 uid = 1 [(is_uid) = true]; |
| 4389 | |
| 4390 | // Signature of the method or field accessed. |
| 4391 | optional string signature = 2; |
| 4392 | |
| 4393 | enum AccessMethod { |
| 4394 | NONE = 0; |
| 4395 | REFLECTION = 1; |
| 4396 | JNI = 2; |
| 4397 | LINKING = 3; |
| 4398 | } |
| 4399 | |
| 4400 | // Type of access. |
| 4401 | optional AccessMethod access_method = 3; |
| 4402 | |
| 4403 | // Whether the access was prevented or not. |
| 4404 | optional bool access_denied = 4; |
| 4405 | } |
| 4406 | |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 4407 | /** |
| 4408 | * Logs user interaction with the Privacy Indicators added in Q. In particular: |
| 4409 | * - When user sees privacy chip |
| 4410 | * - When user clicks privacy chip |
| 4411 | * - How does the user exit the Privacy Dialog |
| 4412 | * Logged from: |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 4413 | * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java |
| 4414 | */ |
| 4415 | message PrivacyIndicatorsInteracted { |
| 4416 | |
| 4417 | enum Type { |
| 4418 | UNKNOWN = 0; |
| 4419 | CHIP_VIEWED = 1; |
| 4420 | CHIP_CLICKED = 2; |
| 4421 | DIALOG_PRIVACY_SETTINGS = 3; |
| 4422 | DIALOG_DISMISS = 4; |
| 4423 | DIALOG_LINE_ITEM = 5; |
| 4424 | } |
| 4425 | |
Muhammad Qureshi | 3f9c330 | 2020-04-01 16:11:53 -0700 | [diff] [blame] | 4426 | optional Type type = 1 [(state_field_option).exclusive_state = true]; |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 4427 | |
| 4428 | // Used if the type is LINE_ITEM |
| 4429 | optional string package_name = 2; |
| 4430 | } |
| 4431 | |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 4432 | /** |
| 4433 | * Logs information about a package that is moved from the internal to external storage and vice |
| 4434 | * versa. |
| 4435 | * It logs the package name, the type of the external storage where the package is installed |
| 4436 | * (if moved to external storage, or UNKNOWN if moved to internal storage), |
| 4437 | * and the move type: if it's from internal to external or the other way around. |
| 4438 | * |
| 4439 | * Logged from: |
| 4440 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 4441 | */ |
| 4442 | message AppMovedStorageReported { |
| 4443 | enum MoveType { |
| 4444 | UNKNOWN = 0; |
| 4445 | TO_EXTERNAL = 1; |
| 4446 | TO_INTERNAL = 2; |
| 4447 | } |
| 4448 | // The type of the external storage. |
| 4449 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 4450 | // The type of move. |
| 4451 | optional MoveType move_type = 2; |
| 4452 | // The name of the package that was moved. |
| 4453 | optional string package_name = 3; |
| 4454 | } |
| 4455 | |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 4456 | /** |
| 4457 | * Logs when system server watchdog occurs. |
| 4458 | * Logged from: |
| 4459 | * frameworks/base/services/core/java/com/android/server/Watchdog.java |
| 4460 | */ |
| 4461 | message SystemServerWatchdogOccurred { |
| 4462 | optional string subject = 1; |
| 4463 | } |
| 4464 | |
| 4465 | /** |
| 4466 | * Logs when new file added to tombstones. |
| 4467 | * Logged from: |
| 4468 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 4469 | */ |
| 4470 | message TombStoneOccurred { |
| 4471 | } |
| 4472 | |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 4473 | /* |
| 4474 | * Information about a role request |
| 4475 | * |
| 4476 | * Logged from: |
| 4477 | * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java |
| 4478 | */ |
| 4479 | message RoleRequestResultReported { |
| 4480 | // UID of application requesting the role |
| 4481 | optional int32 requesting_uid = 1; |
| 4482 | |
| 4483 | // Package name of application requesting the role |
| 4484 | optional string requesting_package_name = 2; |
| 4485 | |
| 4486 | // The role to be granted |
| 4487 | optional string role_name = 3; |
| 4488 | |
| 4489 | // The count of applications qualifying for the role |
| 4490 | optional int32 qualifying_count = 4; |
| 4491 | |
| 4492 | // UID of application current granted the role |
| 4493 | optional int32 current_uid = 5; |
| 4494 | |
| 4495 | // Package name of application current granted the role |
| 4496 | optional string current_package_name = 6; |
| 4497 | |
| 4498 | // UID of another application that user chose to grant the role to, instead of the requesting |
| 4499 | // application |
| 4500 | optional int32 granted_another_uid = 7; |
| 4501 | |
| 4502 | // Package name of another application that user chose to grant the role to, instead of the |
| 4503 | // requesting application |
| 4504 | optional string granted_another_package_name = 8; |
| 4505 | |
| 4506 | enum Result { |
| 4507 | UNDEFINED = 0; |
| 4508 | // role request was ignored |
| 4509 | IGNORED = 1; |
| 4510 | // role request was ignored because it's already granted |
| 4511 | IGNORED_ALREADY_GRANTED = 2; |
| 4512 | // role request was ignored because the application isn't qualified |
| 4513 | IGNORED_NOT_QUALIFIED = 3; |
| 4514 | // role request was ignored because user said it should be always denied |
| 4515 | IGNORED_USER_ALWAYS_DENIED = 4; |
| 4516 | // role was granted by user action |
| 4517 | USER_GRANTED = 5; |
| 4518 | // role was denied by user action |
| 4519 | USER_DENIED = 6; |
| 4520 | // role was denied by user granting another application the role |
| 4521 | USER_DENIED_GRANTED_ANOTHER = 7; |
| 4522 | // role was denied and set to be always denied by the user |
| 4523 | USER_DENIED_WITH_ALWAYS = 8; |
| 4524 | } |
| 4525 | // The result of the role request |
| 4526 | optional Result result = 9; |
| 4527 | } |
| 4528 | |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 4529 | /** |
| 4530 | * Logs when a Vehicle Maps Service client's connection state has changed |
| 4531 | * |
| 4532 | * Logged from: |
| 4533 | * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java |
| 4534 | */ |
| 4535 | message VmsClientConnectionStateChanged { |
| 4536 | // The UID of the VMS client app |
| 4537 | optional int32 uid = 1 [(is_uid) = true]; |
| 4538 | |
| 4539 | enum State { |
| 4540 | UNKNOWN = 0; |
| 4541 | // Attempting to connect to the client |
| 4542 | CONNECTING = 1; |
| 4543 | // Client connection established |
| 4544 | CONNECTED = 2; |
| 4545 | // Client connection closed unexpectedly |
| 4546 | DISCONNECTED = 3; |
| 4547 | // Client connection closed by VMS |
| 4548 | TERMINATED = 4; |
| 4549 | // Error establishing the client connection |
| 4550 | CONNECTION_ERROR = 5; |
| 4551 | } |
| 4552 | |
| 4553 | optional State state = 2; |
| 4554 | } |
| 4555 | |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4556 | /** |
| 4557 | * Logs when MediaProvider has successfully finished scanning a storage volume. |
| 4558 | * |
| 4559 | * Logged from: |
| 4560 | * packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java |
| 4561 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4562 | message MediaProviderScanOccurred { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4563 | enum Reason { |
| 4564 | // Scan triggered due to unknown reason |
| 4565 | UNKNOWN = 0; |
| 4566 | // Scan triggered due to storage volume being mounted |
| 4567 | MOUNTED = 1; |
| 4568 | // Scan triggered due to explicit user action or app request |
| 4569 | DEMAND = 2; |
| 4570 | // Scan triggered due to idle maintenance |
| 4571 | IDLE = 3; |
| 4572 | } |
| 4573 | |
| 4574 | // Volume type that this event pertains to |
| 4575 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4576 | // Reason why this scan was triggered |
| 4577 | optional Reason reason = 2; |
| 4578 | // Total number of files scanned |
| 4579 | optional int64 item_count = 3; |
| 4580 | // Duration of scan, normalized per file |
| 4581 | optional float normalized_duration_millis = 4; |
| 4582 | // Number of database inserts, normalized per file |
| 4583 | optional float normalized_insert_count = 5; |
| 4584 | // Number of database updates, normalized per file |
| 4585 | optional float normalized_update_count = 6; |
| 4586 | // Number of database deletes, normalized per file |
| 4587 | optional float normalized_delete_count = 7; |
| 4588 | } |
| 4589 | |
| 4590 | /** |
| 4591 | * Logs when an app has asked MediaProvider to delete media belonging to the user. |
| 4592 | * |
| 4593 | * Logged from: |
| 4594 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4595 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4596 | message MediaContentDeleted { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4597 | // Volume type that this event pertains to |
| 4598 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4599 | // UID of app that requested deletion |
| 4600 | optional int32 uid = 2 [(is_uid) = true]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4601 | // Number of items that were deleted |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4602 | optional int32 item_count = 3; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4603 | } |
| 4604 | |
| 4605 | /** |
| 4606 | * Logs when an app has asked MediaProvider to grant them access to media belonging to the user. |
| 4607 | * |
| 4608 | * Logged from: |
| 4609 | * packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java |
| 4610 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4611 | message MediaProviderPermissionRequested { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4612 | enum Result { |
| 4613 | UNKNOWN = 0; |
| 4614 | USER_GRANTED = 1; |
| 4615 | AUTO_GRANTED = 2; |
| 4616 | USER_DENIED = 3; |
| 4617 | USER_DENIED_WITH_PREJUDICE = 4; |
| 4618 | AUTO_DENIED = 5; |
| 4619 | } |
| 4620 | |
| 4621 | // Volume type that this event pertains to |
| 4622 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4623 | // UID of app that requested permission |
| 4624 | optional int32 uid = 2 [(is_uid) = true]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4625 | // Number of items that were requested |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4626 | optional int32 item_count = 3; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4627 | // Result of this request |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4628 | optional Result result = 4; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4629 | } |
| 4630 | |
| 4631 | /** |
| 4632 | * Logs when MediaProvider has finished upgrading or downgrading its database schema. |
| 4633 | * |
| 4634 | * Logged from: |
| 4635 | * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java |
| 4636 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4637 | message MediaProviderSchemaChanged { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4638 | // Volume type that this event pertains to |
| 4639 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4640 | // Old database version code |
| 4641 | optional int32 version_from = 2; |
| 4642 | // New database version code |
| 4643 | optional int32 version_to = 3; |
| 4644 | // Total number of files in database |
| 4645 | optional int64 item_count = 4; |
| 4646 | // Duration of schema change, normalized per file |
| 4647 | optional float normalized_duration_millis = 5; |
| 4648 | } |
| 4649 | |
| 4650 | /** |
| 4651 | * Logs when MediaProvider has finished an idle maintenance job. |
| 4652 | * |
| 4653 | * Logged from: |
| 4654 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4655 | */ |
shafik | 4382584 | 2020-04-02 17:30:24 +0100 | [diff] [blame] | 4656 | message MediaProviderIdleMaintenanceFinished { |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4657 | // Volume type that this event pertains to |
| 4658 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4659 | |
| 4660 | // Total number of files in database |
| 4661 | optional int64 item_count = 2; |
| 4662 | // Duration of idle maintenance, normalized per file |
| 4663 | optional float normalized_duration_millis = 3; |
| 4664 | // Number of thumbnails found to be stale, normalized per file |
| 4665 | optional float normalized_stale_thumbnails = 4; |
| 4666 | // Number of items found to be expired, normalized per file |
| 4667 | optional float normalized_expired_media = 5; |
| 4668 | } |
| 4669 | |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4670 | /** |
| 4671 | * Represents boot time event with duration in ms. |
| 4672 | * |
| 4673 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4674 | */ |
| 4675 | message BootTimeEventDuration { |
| 4676 | enum DurationEvent { |
| 4677 | UNKNOWN = 0; |
| 4678 | // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat. |
| 4679 | ABSOLUTE_BOOT_TIME = 1; |
| 4680 | // Bootloader's 1st stage execution time. |
| 4681 | // Logged from bootstat. |
| 4682 | BOOTLOADER_FIRST_STAGE_EXEC = 2; |
| 4683 | // Bootloader's 1st stage loading time. |
| 4684 | // Logged from bootstat. |
| 4685 | BOOTLOADER_FIRST_STAGE_LOAD = 3; |
| 4686 | // Bootloader's kernel loading time. |
| 4687 | // Logged from bootstat. |
| 4688 | BOOTLOADER_KERNEL_LOAD = 4; |
| 4689 | // Bootloader's 2nd stage execution time. |
| 4690 | // Logged from bootstat. |
| 4691 | BOOTLOADER_SECOND_STAGE_EXEC = 5; |
| 4692 | // Bootloader's 2nd stage loading time. |
| 4693 | // Logged from bootstat. |
| 4694 | BOOTLOADER_SECOND_STAGE_LOAD = 6; |
| 4695 | // Duration for Bootloader to show unlocked device's warning UI. This should not happen |
| 4696 | // for locked device. |
| 4697 | // Logged from bootstat. |
| 4698 | BOOTLOADER_UI_WAIT = 7; |
| 4699 | // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above. |
| 4700 | // Logged from bootstat. |
| 4701 | BOOTLOADER_TOTAL = 8; |
| 4702 | // Shutdown duration inside init for the reboot before the current boot up. |
| 4703 | // Logged from f/b/services/.../BootReceiver.java. |
| 4704 | SHUTDOWN_DURATION = 9; |
| 4705 | // Total time for mounting of disk devices during bootup. |
| 4706 | // Logged from f/b/services/.../BootReceiver.java. |
| 4707 | MOUNT_DEFAULT_DURATION = 10; |
| 4708 | // Total time for early stage mounting of disk devices during bootup. |
| 4709 | // Logged from f/b/services/.../BootReceiver.java. |
| 4710 | MOUNT_EARLY_DURATION = 11; |
| 4711 | // Total time for late stage mounting of disk devices during bootup. |
| 4712 | // Logged from f/b/services/.../BootReceiver.java. |
| 4713 | MOUNT_LATE_DURATION = 12; |
| 4714 | // Average time to scan non-system app after OTA |
| 4715 | // Logged from f/b/services/.../PackageManagerService.java |
| 4716 | OTA_PACKAGE_MANAGER_INIT_TIME = 13; |
| 4717 | // Time to initialize Package manager after OTA |
| 4718 | // Logged from f/b/services/.../PackageManagerService.java |
| 4719 | OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14; |
| 4720 | // Time to scan all system app from Package manager after OTA |
| 4721 | // Logged from f/b/services/.../PackageManagerService.java |
| 4722 | OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15; |
| 4723 | // Init's total time for cold boot stage. |
| 4724 | // Logged from bootstat. |
| 4725 | COLDBOOT_WAIT = 16; |
| 4726 | // Init's total time for initializing selinux. |
| 4727 | // Logged from bootstat. |
| 4728 | SELINUX_INIT = 17; |
| 4729 | // Time since last factory reset. |
| 4730 | // Logged from bootstat. |
| 4731 | FACTORY_RESET_TIME_SINCE_RESET = 18; |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4732 | // Init's total time spent for completing the 1st stage. |
| 4733 | // Logged from bootstat. |
| 4734 | ANDROID_INIT_STAGE_1 = 19; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4735 | } |
| 4736 | |
| 4737 | // Type of the event. |
| 4738 | optional DurationEvent event = 1; |
| 4739 | // Duration of the event in ms. |
| 4740 | optional int64 duration_millis = 2; |
| 4741 | } |
| 4742 | |
| 4743 | /** |
| 4744 | * Represents the start of specific boot time event during bootup in ms. This is usually a time |
| 4745 | * since boot-up. |
| 4746 | * |
| 4747 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4748 | */ |
| 4749 | message BootTimeEventElapsedTime { |
| 4750 | enum ElapsedTimeEvent { |
| 4751 | UNKNOWN = 0; |
| 4752 | // Time when init starts 1st stage. Logged from bootstat. |
| 4753 | ANDROID_INIT_STAGE_1 = 1; |
| 4754 | // Time when sys.boot_completed prop is set. |
| 4755 | // Logged from bootstat. |
| 4756 | BOOT_COMPLETE = 2; |
| 4757 | // BOOT_COMPLETE for encrypted device. |
| 4758 | BOOT_COMPLETE_ENCRYPTION = 3; |
| 4759 | // BOOT_COMPLETE for device with no encryption. |
| 4760 | BOOT_COMPLETE_NO_ENCRYPTION = 4; |
| 4761 | // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time. |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4762 | BOOT_COMPLETE_POST_DECRYPT = 5; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4763 | // BOOT_COMPLETE after factory reset. |
| 4764 | FACTORY_RESET_BOOT_COMPLETE = 6; |
| 4765 | // BOOT_COMPLETE_NO_ENCRYPTION after factory reset. |
| 4766 | FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7; |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4767 | // BOOT_COMPLETE_POST_DECRYPT after factory reset. |
| 4768 | FACTORY_RESET_BOOT_COMPLETE_POST_DECRYPT = 8; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4769 | // BOOT_COMPLETE after OTA. |
| 4770 | OTA_BOOT_COMPLETE = 9; |
| 4771 | // BOOT_COMPLETE_NO_ENCRYPTION after OTA. |
| 4772 | OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10; |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4773 | // BOOT_COMPLETE_POST_DECRYPT after OTA. |
| 4774 | OTA_BOOT_COMPLETE_POST_DECRYPT = 11; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4775 | // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast. |
| 4776 | // Logged from f/b/services/.../UserController.java |
| 4777 | FRAMEWORK_LOCKED_BOOT_COMPLETED = 12; |
| 4778 | // Time when the system starts sending BOOT_COMPLETED broadcast. |
| 4779 | // Logged from f/b/services/.../UserController.java |
| 4780 | FRAMEWORK_BOOT_COMPLETED = 13; |
| 4781 | // Time when the package manager starts init. |
| 4782 | // Logged from f/b/services/.../SystemServer.java |
| 4783 | PACKAGE_MANAGER_INIT_START = 14; |
| 4784 | // Time when package manager is ready |
| 4785 | // Logged from f/b/services/.../SystemServer.java |
| 4786 | PACKAGE_MANAGER_INIT_READY = 15; |
| 4787 | // Represents the time when user has entered unlock credential for system with user pin. |
| 4788 | // Logged from bootstat. |
| 4789 | POST_DECRYPT = 16; |
| 4790 | // Represents the start of zygote's init. |
| 4791 | // Logged from zygote itself. |
| 4792 | ZYGOTE_INIT_START = 17; |
| 4793 | // Represents the start of secondary zygote's init. |
| 4794 | // TODO: add logging to zygote |
| 4795 | SECONDARY_ZYGOTE_INIT_START = 18; |
| 4796 | // Represents the start of system server's init. |
| 4797 | // Logged from f/b/services/.../SystemServer.java |
| 4798 | SYSTEM_SERVER_INIT_START = 19; |
| 4799 | // Represents the completion of system server's init. |
| 4800 | // Logged from f/b/services/.../SystemServer.java |
| 4801 | SYSTEM_SERVER_READY = 20; |
| 4802 | // Represents the start of launcher during boot-up. |
| 4803 | // TODO: add logging |
| 4804 | LAUNCHER_START = 21; |
| 4805 | // Represents the completion of launcher's initial rendering. User can use other apps from |
| 4806 | // launcher from this point. |
| 4807 | // TODO: add logging |
| 4808 | LAUNCHER_SHOWN = 22; |
| 4809 | } |
| 4810 | |
| 4811 | // Type of the event. |
| 4812 | optional ElapsedTimeEvent event = 1; |
| 4813 | // Time since bootup for the event. |
| 4814 | // It should be acquired from SystemClock elapsedRealtime() call or equivalent. |
| 4815 | optional int64 time_millis = 2; |
| 4816 | } |
| 4817 | |
| 4818 | /** |
| 4819 | * Boot time events with UTC time. |
| 4820 | * |
| 4821 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4822 | */ |
| 4823 | message BootTimeEventUtcTime { |
| 4824 | enum UtcTimeEvent { |
| 4825 | UNKNOWN = 0; |
| 4826 | // Time of the bootstat's marking of 1st boot after the last factory reset. |
| 4827 | // Logged from bootstat. |
| 4828 | FACTORY_RESET_RESET_TIME = 1; |
| 4829 | // The time when bootstat records FACTORY_RESET_* events. This is close to |
| 4830 | // BOOT_COMPLETE time for the current bootup. |
| 4831 | // Logged from bootstat. |
| 4832 | FACTORY_RESET_CURRENT_TIME = 2; |
| 4833 | // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose. |
| 4834 | // Logged from bootstat. |
| 4835 | FACTORY_RESET_RECORD_VALUE = 3; |
| 4836 | } |
| 4837 | |
| 4838 | // Type of the event. |
| 4839 | optional UtcTimeEvent event = 1; |
| 4840 | // UTC time for the event. |
| 4841 | optional int64 utc_time_secs = 2; |
| 4842 | } |
| 4843 | |
| 4844 | /** |
| 4845 | * Boot time events representing specific error code during bootup. |
| 4846 | * Meaning of error code can be different per each event type. |
| 4847 | * |
| 4848 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4849 | */ |
| 4850 | message BootTimeEventErrorCode { |
| 4851 | enum ErrorCodeEvent { |
| 4852 | UNKNOWN = 0; |
| 4853 | // Linux error code for time() call to get the current UTC time. |
| 4854 | // Logged from bootstat. |
| 4855 | FACTORY_RESET_CURRENT_TIME_FAILURE = 1; |
| 4856 | // Represents UmountStat before the reboot for the current boot up. Error codes defined |
| 4857 | // as UMOUNT_STAT_* from init/reboot.cpp. |
| 4858 | // Logged from f/b/services/.../BootReceiver.java. |
| 4859 | SHUTDOWN_UMOUNT_STAT = 2; |
Keun young Park | df1534d | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4860 | // Reprepsents fie system mounting error code of /data partition for the current boot. |
| 4861 | // Error codes defined as combination of FsStatFlags from system/core/fs_mgr/fs_mgr.cpp. |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4862 | // Logged from f/b/services/.../BootReceiver.java. |
Keun young Park | df1534d | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4863 | FS_MGR_FS_STAT_DATA_PARTITION = 3; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4864 | } |
| 4865 | |
| 4866 | // Type of the event. |
| 4867 | optional ErrorCodeEvent event = 1; |
| 4868 | // error code defined per each event type. |
| 4869 | // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of |
| 4870 | // FS_MGR_FS_STAT. |
| 4871 | optional int32 error_code = 2; |
| 4872 | } |
| 4873 | |
Alessio Balsini | 628fb8d | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 4874 | /** |
| 4875 | * Collects Virtual A/B statistics related to the use of dm-snapshot performed |
| 4876 | * after an OTA. |
| 4877 | * |
| 4878 | * Logged from: |
Yifan Hong | 36137f0 | 2020-03-11 10:35:08 -0700 | [diff] [blame] | 4879 | * - system/update_engine/cleanup_previous_update_action.cc |
Alessio Balsini | 628fb8d | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 4880 | */ |
| 4881 | message SnapshotMergeReported { |
| 4882 | // Keep in sync with |
| 4883 | // system/core/fs_mgr/libsnapshot/android/snapshot/snapshot.proto |
| 4884 | enum UpdateState { |
| 4885 | // No update or merge is in progress. |
| 4886 | NONE = 0; |
| 4887 | // An update is applying; snapshots may already exist. |
| 4888 | INITIATED = 1; |
| 4889 | // An update is pending, but has not been successfully booted yet. |
| 4890 | UNVERIFIED = 2; |
| 4891 | // The kernel is merging in the background. |
| 4892 | MERGING = 3; |
| 4893 | // Post-merge cleanup steps could not be completed due to a transient |
| 4894 | // error, but the next reboot will finish any pending operations. |
| 4895 | MERGE_NEEDS_REBOOT = 4; |
| 4896 | // Merging is complete, and needs to be acknowledged. |
| 4897 | MERGE_COMPLETED = 5; |
| 4898 | // Merging failed due to an unrecoverable error. |
| 4899 | MERGE_FAILED = 6; |
| 4900 | // The update was implicitly cancelled, either by a rollback or a flash |
| 4901 | // operation via fastboot. This state can only be returned by WaitForMerge. |
| 4902 | CANCELLED = 7; |
| 4903 | }; |
| 4904 | |
| 4905 | // Status of the update after the merge attempts. |
| 4906 | optional UpdateState final_state = 1; |
| 4907 | |
| 4908 | // Time to complete a merge operation in milliseconds. |
| 4909 | // A negative value corresponds to the case in which the merge operation |
| 4910 | // was interrupted and resumed (e.g. in case of a system reboot during the |
| 4911 | // merge). |
| 4912 | optional int64 duration_millis = 2; |
| 4913 | |
| 4914 | // Number of reboots that occurred after issuing and before completing the |
| 4915 | // merge of all the snapshot devices. |
| 4916 | optional int32 intermediate_reboots = 3; |
Alessio Balsini | 2294f39 | 2020-05-26 11:11:20 +0100 | [diff] [blame] | 4917 | |
| 4918 | // The device has been upgraded to Virtual A/B. |
| 4919 | optional bool is_vab_retrofit = 4; |
| 4920 | |
| 4921 | // Space that has been temporarily allocated in the /data partition |
| 4922 | // containing the dm-snapshot's copy-on-write data generated during a |
| 4923 | // Virtual A/B update. |
| 4924 | optional int64 cow_file_size_bytes = 5; |
Alessio Balsini | 628fb8d | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 4925 | } |
| 4926 | |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 4927 | /** |
| 4928 | * Event representing when BlobStoreManager.Session#commit() is called |
| 4929 | * |
| 4930 | * Logged from: |
| 4931 | * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java |
| 4932 | */ |
| 4933 | message BlobCommitted { |
| 4934 | // Uid of the Blob committer |
| 4935 | optional int32 uid = 1 [(is_uid) = true]; |
| 4936 | |
| 4937 | // Id of the Blob committed |
| 4938 | optional int64 blob_id = 2; |
| 4939 | |
| 4940 | // Size of the Blob |
| 4941 | optional int64 size = 3; |
| 4942 | |
| 4943 | enum Result { |
| 4944 | UNKNOWN = 0; |
| 4945 | // Commit Succeeded |
| 4946 | SUCCESS = 1; |
| 4947 | // Commit Failed: Error occurred during commit |
| 4948 | ERROR_DURING_COMMIT = 2; |
| 4949 | // Commit Failed: Digest of the data did not match Blob digest |
| 4950 | DIGEST_MISMATCH = 3; |
| 4951 | } |
| 4952 | optional Result result = 4; |
| 4953 | } |
| 4954 | |
| 4955 | /** |
| 4956 | * Event representing when BlobStoreManager#acquireLease() is called |
| 4957 | * |
| 4958 | * Logged from: |
| 4959 | * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java |
| 4960 | */ |
| 4961 | message BlobLeased{ |
| 4962 | // Uid of the Blob leasee |
| 4963 | optional int32 uid = 1 [(is_uid) = true]; |
| 4964 | |
| 4965 | // Id of the Blob leased or 0 if the Blob does not exist |
| 4966 | optional int64 blob_id = 2; |
| 4967 | |
| 4968 | // Size of the Blob or 0 if the Blob does not exist |
| 4969 | optional int64 size = 3; |
| 4970 | |
| 4971 | enum Result { |
| 4972 | UNKNOWN = 0; |
| 4973 | // Lease Succeeded |
| 4974 | SUCCESS = 1; |
| 4975 | // Lease Failed: Blob does not exist |
| 4976 | BLOB_DNE = 2; |
| 4977 | // Lease Failed: Leasee does not have access to the Blob |
| 4978 | ACCESS_NOT_ALLOWED = 3; |
| 4979 | // Lease Failed: Leasee requested an invalid expiry duration |
| 4980 | LEASE_EXPIRY_INVALID = 4; |
| 4981 | // Lease Failed: Leasee has exceeded the total data lease limit |
| 4982 | DATA_SIZE_LIMIT_EXCEEDED = 5; |
| 4983 | } |
| 4984 | optional Result result = 4; |
| 4985 | } |
| 4986 | |
| 4987 | /** |
| 4988 | * Event representing when BlobStoreManager#openBlob() is called |
| 4989 | * |
| 4990 | * Logged from: |
| 4991 | * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java |
| 4992 | */ |
| 4993 | message BlobOpened{ |
| 4994 | // Uid of the Blob opener |
| 4995 | optional int32 uid = 1 [(is_uid) = true]; |
| 4996 | |
| 4997 | // Id of the Blob opened or 0 if the Blob does not exist |
| 4998 | optional int64 blob_id = 2; |
| 4999 | |
| 5000 | // Size of the Blob or 0 if the Blob does not exist |
| 5001 | optional int64 size = 3; |
| 5002 | |
| 5003 | enum Result { |
| 5004 | UNKNOWN = 0; |
| 5005 | // Open Succeeded |
| 5006 | SUCCESS = 1; |
| 5007 | // Open Failed: Blob does not exist |
| 5008 | BLOB_DNE = 2; |
| 5009 | // Open Failed: Opener does not have access to the Blob |
| 5010 | ACCESS_NOT_ALLOWED = 3; |
| 5011 | } |
| 5012 | optional Result result = 4; |
| 5013 | } |
| 5014 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 5015 | ////////////////////////////////////////////////////////////////////// |
| 5016 | // Pulled atoms below this line // |
| 5017 | ////////////////////////////////////////////////////////////////////// |
| 5018 | |
| 5019 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5020 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 5021 | * |
| 5022 | * Pulled from: |
| 5023 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 5024 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5025 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5026 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5027 | |
| 5028 | optional int64 rx_bytes = 2; |
| 5029 | |
| 5030 | optional int64 rx_packets = 3; |
| 5031 | |
| 5032 | optional int64 tx_bytes = 4; |
| 5033 | |
| 5034 | optional int64 tx_packets = 5; |
| 5035 | } |
| 5036 | |
| 5037 | /** |
| 5038 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 5039 | * |
| 5040 | * Pulled from: |
| 5041 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 5042 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5043 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5044 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5045 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 5046 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 5047 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5048 | |
| 5049 | optional int64 rx_bytes = 3; |
| 5050 | |
| 5051 | optional int64 rx_packets = 4; |
| 5052 | |
| 5053 | optional int64 tx_bytes = 5; |
| 5054 | |
| 5055 | optional int64 tx_packets = 6; |
| 5056 | } |
| 5057 | |
| 5058 | /** |
| 5059 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 5060 | * |
| 5061 | * Pulled from: |
| 5062 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 5063 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5064 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5065 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5066 | |
| 5067 | optional int64 rx_bytes = 2; |
| 5068 | |
| 5069 | optional int64 rx_packets = 3; |
| 5070 | |
| 5071 | optional int64 tx_bytes = 4; |
| 5072 | |
| 5073 | optional int64 tx_packets = 5; |
| 5074 | } |
| 5075 | |
| 5076 | /** |
| 5077 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 5078 | * |
| 5079 | * Pulled from: |
| 5080 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 5081 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5082 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5083 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5084 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5085 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 5086 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 5087 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5088 | |
| 5089 | optional int64 rx_bytes = 3; |
| 5090 | |
| 5091 | optional int64 rx_packets = 4; |
| 5092 | |
| 5093 | optional int64 tx_bytes = 5; |
| 5094 | |
| 5095 | optional int64 tx_packets = 6; |
| 5096 | } |
| 5097 | |
| 5098 | /** |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5099 | * 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] | 5100 | * Note that the data is expected to be sliced into more dimensions in future. In other words, |
| 5101 | * the caller must not assume any row of data is one full report when filtering with a set of |
| 5102 | * matching conditions, because future data may represent with multiple rows what is currently |
| 5103 | * represented by one. |
| 5104 | * To avoid being broken by future slicing, callers must take care to aggregate rows even if they |
| 5105 | * query all the existing columns. |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5106 | * |
| 5107 | * Pulled from: |
| 5108 | * StatsPullAtomService (using NetworkStatsService to get NetworkStats) |
| 5109 | */ |
| 5110 | message DataUsageBytesTransfer { |
| 5111 | // State of this record. Should be NetworkStats#SET_DEFAULT or NetworkStats#SET_FOREGROUND to |
| 5112 | // indicate the foreground state, or NetworkStats#SET_ALL to indicate the record is for all |
| 5113 | // states combined, not including debug states. See NetworkStats#SET_*. |
| 5114 | optional int32 state = 1; |
| 5115 | |
| 5116 | optional int64 rx_bytes = 2; |
| 5117 | |
| 5118 | optional int64 rx_packets = 3; |
| 5119 | |
| 5120 | optional int64 tx_bytes = 4; |
| 5121 | |
| 5122 | optional int64 tx_packets = 5; |
| 5123 | |
| 5124 | // Radio Access Technology (RAT) type of this record, should be one of |
| 5125 | // TelephonyManager#NETWORK_TYPE_* constants, or NetworkTemplate#NETWORK_TYPE_ALL to indicate |
| 5126 | // the record is for all rat types combined. |
| 5127 | optional int32 rat_type = 6; |
| 5128 | |
| 5129 | // 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] | 5130 | // record is combined across subscriptions. |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5131 | optional string sim_mcc = 7; |
| 5132 | optional string sim_mnc = 8; |
| 5133 | |
junyulai | 8b794b7 | 2020-05-19 17:36:13 +0800 | [diff] [blame] | 5134 | // Allows mobile virtual network operators (MVNOs) to be identified with individual IDs. |
| 5135 | // See TelephonyManager#getSimCarrierId. |
| 5136 | optional int32 carrier_id = 9; |
| 5137 | |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5138 | // Enumeration of opportunistic states with an additional ALL state indicates the record is |
| 5139 | // combined regardless of the boolean value in its field. |
| 5140 | enum DataSubscriptionState { |
junyulai | 8b794b7 | 2020-05-19 17:36:13 +0800 | [diff] [blame] | 5141 | UNKNOWN = 0; // For server side backward compatibility. |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5142 | ALL = 1; |
| 5143 | OPPORTUNISTIC = 2; |
| 5144 | NOT_OPPORTUNISTIC = 3; |
| 5145 | } |
| 5146 | // Mark whether the subscription is an opportunistic data subscription, and ALL indicates the |
junyulai | 8b794b7 | 2020-05-19 17:36:13 +0800 | [diff] [blame] | 5147 | // record is combined across opportunistic data subscriptions. |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5148 | // See {@link SubscriptionManager#setOpportunistic}. |
junyulai | 8b794b7 | 2020-05-19 17:36:13 +0800 | [diff] [blame] | 5149 | optional DataSubscriptionState opportunistic_data_sub = 10; |
junyulai | 8d1a609 | 2020-05-07 13:38:15 +0800 | [diff] [blame] | 5150 | } |
| 5151 | |
| 5152 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5153 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 5154 | * |
| 5155 | * Pulled from: |
| 5156 | * StatsCompanionService |
| 5157 | */ |
| 5158 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5159 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5160 | |
| 5161 | optional int64 rx_bytes = 2; |
| 5162 | |
| 5163 | optional int64 tx_bytes = 3; |
| 5164 | } |
| 5165 | |
| 5166 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5167 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 5168 | * android/internal/os/KernelWakelockStats.java |
| 5169 | * |
| 5170 | * Pulled from: |
| 5171 | * StatsCompanionService using KernelWakelockReader. |
| 5172 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5173 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5174 | optional string name = 1; |
| 5175 | |
| 5176 | optional int32 count = 2; |
| 5177 | |
| 5178 | optional int32 version = 3; |
| 5179 | |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5180 | optional int64 time_micros = 4; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 5181 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 5182 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5183 | /** |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 5184 | * Pulls low power state information. If power.stats HAL is not available, this |
| 5185 | * includes platform and subsystem sleep state information, |
| 5186 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState |
| 5187 | * as defined in: |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 5188 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 5189 | * hardware/interfaces/power/1.1/types.hal |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 5190 | * If power.stats HAL is available, this includes PowerEntityStateResidencyResult |
| 5191 | * as defined in: |
| 5192 | * hardware/interfaces/power/stats/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 5193 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5194 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 5195 | // Subsystem name |
| 5196 | optional string subsystem_name = 1; |
| 5197 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 5198 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 5199 | // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the |
| 5200 | // powerEntityStateName from the corresponding PowerEntityStateInfo. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 5201 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 5202 | // 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] | 5203 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 5204 | // 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] | 5205 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 5206 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5207 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5208 | /** |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 5209 | * Pulls on-device power measurement information. |
| 5210 | * Data defined by hardware/interfaces/power/stats/1.0/types.hal. |
| 5211 | * Pulled from: |
| 5212 | * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp |
| 5213 | */ |
| 5214 | message OnDevicePowerMeasurement { |
| 5215 | // Name of the subsystem (to which the rail belongs). |
| 5216 | optional string subsystem_name = 1; |
| 5217 | |
| 5218 | // Rail name. The rail lies within the subsystem. |
| 5219 | optional string rail_name = 2; |
| 5220 | |
| 5221 | // Time (in ms since boot) at which the rail energy value was measured. |
| 5222 | // This may differ slightly from the time that statsd logs this information. |
| 5223 | optional uint64 measurement_timestamp_millis = 3; |
| 5224 | |
| 5225 | // Accumulated energy used via the rail since device boot in uWs. |
| 5226 | optional uint64 energy_microwatt_secs = 4; |
| 5227 | } |
| 5228 | |
| 5229 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5230 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 5231 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 5232 | * starts from highest to lowest. The value should be monotonically |
| 5233 | * increasing since boot. However, if there is a cpu |
| 5234 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5235 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5236 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5237 | optional uint32 cluster = 1; |
| 5238 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5239 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 5240 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5241 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5242 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5243 | * Pulls Cpu Time Per Uid. |
| 5244 | * Note that isolated process uid time should be attributed to host uids. |
| 5245 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5246 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5247 | optional int32 uid = 1 [(is_uid) = true]; |
Misha Wagner | 6bc6c91 | 2018-11-16 13:19:54 +0000 | [diff] [blame] | 5248 | optional uint64 user_time_micros = 2; |
| 5249 | optional uint64 sys_time_micros = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5250 | } |
| 5251 | |
| 5252 | /** |
| 5253 | * Pulls Cpu Time Per Uid per frequency. |
| 5254 | * Note that isolated process uid time should be attributed to host uids. |
| 5255 | * For each uid, we order the time by descending frequencies. |
| 5256 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5257 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5258 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 5259 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5260 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 5261 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 5262 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5263 | /** |
| 5264 | * Pulls Wifi Controller Activity Energy Info |
| 5265 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 5266 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5267 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5268 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5269 | // stack reported state |
| 5270 | // TODO: replace this with proto enum |
| 5271 | optional int32 stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5272 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5273 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5274 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5275 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5276 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5277 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5278 | // product of current(mA), voltage(V) and time(ms) |
| 5279 | optional uint64 controller_energy_used = 6; |
| 5280 | } |
| 5281 | |
| 5282 | /** |
| 5283 | * Pulls Modem Activity Energy Info |
| 5284 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 5285 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5286 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5287 | optional uint64 timestamp_millis = 1; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5288 | // sleep time in millis. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5289 | optional uint64 sleep_time_millis = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5290 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5291 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5292 | /** |
| 5293 | * Tx power index |
| 5294 | * index 0 = tx_power < 0dBm |
| 5295 | * index 1 = 0dBm < tx_power < 5dBm |
| 5296 | * index 2 = 5dBm < tx_power < 15dBm |
| 5297 | * index 3 = 15dBm < tx_power < 20dBm |
| 5298 | * index 4 = tx_power > 20dBm |
| 5299 | */ |
| 5300 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5301 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5302 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5303 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5304 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5305 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5306 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5307 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5308 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5309 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5310 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5311 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 5312 | // product of current(mA), voltage(V) and time(ms) |
Chen Xu | 7322e4a | 2019-09-07 15:51:22 -0700 | [diff] [blame] | 5313 | optional uint64 energy_used = 10 [deprecated=true]; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 5314 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 5315 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5316 | /** |
| 5317 | * Pulls Bluetooth Activity Energy Info |
| 5318 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 5319 | */ |
| 5320 | message BluetoothActivityInfo { |
| 5321 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5322 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5323 | // bluetooth stack state |
| 5324 | optional int32 bluetooth_stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5325 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5326 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5327 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5328 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5329 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5330 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5331 | // product of current(mA), voltage(V) and time(ms) |
| 5332 | optional uint64 energy_used = 6; |
| 5333 | } |
| 5334 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 5335 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5336 | * Logs the memory stats for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5337 | * |
| 5338 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5339 | */ |
| 5340 | message ProcessMemoryState { |
| 5341 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5342 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5343 | |
| 5344 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5345 | // Usually package name, "system" for system server. |
| 5346 | // Provided by ActivityManagerService. |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5347 | optional string process_name = 2; |
| 5348 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5349 | // Current OOM score adjustment. Value read from ProcessRecord. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5350 | optional int32 oom_adj_score = 3; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5351 | |
| 5352 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5353 | optional int64 page_fault = 4; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5354 | |
| 5355 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5356 | optional int64 page_major_fault = 5; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 5357 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5358 | // RSS |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5359 | // Value is read from memory.stat, field total_rss if per-app memory |
| 5360 | // cgroups are enabled. Otherwise, value from /proc/pid/stat. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5361 | optional int64 rss_in_bytes = 6; |
| 5362 | |
| 5363 | // CACHE |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5364 | // Value is read from memory.stat, field total_cache if per-app memory |
| 5365 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5366 | optional int64 cache_in_bytes = 7; |
| 5367 | |
| 5368 | // SWAP |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5369 | // 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] | 5370 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 5371 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | aaf6089 | 2018-09-12 13:04:30 +0100 | [diff] [blame] | 5372 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5373 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5374 | optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; |
Rafal Slawik | 272a816 | 2018-11-01 15:12:28 +0000 | [diff] [blame] | 5375 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5376 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 5377 | optional int64 start_time_nanos = 10 [deprecated = true]; |
Ioannis Ilkos | 466ad6c | 2019-06-18 17:42:00 +0100 | [diff] [blame] | 5378 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 5379 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 5380 | optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true]; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 5381 | } |
| 5382 | |
| 5383 | /* |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5384 | * Logs the memory high-water mark for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5385 | * |
| 5386 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) |
| 5387 | * and for selected native processes. |
Rafal Slawik | 44b8814 | 2018-12-15 16:48:09 +0000 | [diff] [blame] | 5388 | * |
| 5389 | * Pulling this atom resets high-water mark counters for all processes. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5390 | */ |
| 5391 | message ProcessMemoryHighWaterMark { |
| 5392 | // The uid if available. -1 means not available. |
| 5393 | optional int32 uid = 1 [(is_uid) = true]; |
| 5394 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5395 | // The process name. |
| 5396 | // Usually package name or process cmdline. |
| 5397 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5398 | optional string process_name = 2; |
| 5399 | |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 5400 | // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is |
| 5401 | // computed by converting kilobytes to bytes. |
| 5402 | optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true]; |
| 5403 | |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5404 | // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in |
| 5405 | // /proc/PID/status. |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 5406 | optional int32 rss_high_water_mark_in_kilobytes = 4; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5407 | } |
| 5408 | |
| 5409 | /* |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 5410 | * Logs the memory stats for a process. |
| 5411 | * |
| 5412 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService) |
| 5413 | * and for selected native processes. |
| 5414 | */ |
| 5415 | message ProcessMemorySnapshot { |
| 5416 | // The uid if available. -1 means not available. |
| 5417 | optional int32 uid = 1 [(is_uid) = true]; |
| 5418 | |
| 5419 | // The process name. |
| 5420 | // Usually package name or process cmdline. |
| 5421 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
| 5422 | optional string process_name = 2; |
| 5423 | |
| 5424 | // The pid of the process. |
| 5425 | // Allows to disambiguate instances of the process. |
| 5426 | optional int32 pid = 3; |
| 5427 | |
| 5428 | // The current OOM score adjustment value. |
| 5429 | // Read from ProcessRecord for managed processes. |
| 5430 | // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones. |
| 5431 | optional int32 oom_score_adj = 4; |
| 5432 | |
| 5433 | // The current RSS of the process. |
| 5434 | // VmRSS from /proc/pid/status. |
| 5435 | optional int32 rss_in_kilobytes = 5; |
| 5436 | |
| 5437 | // The current anon RSS of the process. |
| 5438 | // RssAnon from /proc/pid/status. |
| 5439 | optional int32 anon_rss_in_kilobytes = 6; |
| 5440 | |
| 5441 | // The current swap size of the process. |
| 5442 | // VmSwap from /proc/pid/status. |
| 5443 | optional int32 swap_in_kilobytes = 7; |
| 5444 | |
| 5445 | // The sum of rss_in_kilobytes and swap_in_kilobytes. |
| 5446 | optional int32 anon_rss_and_swap_in_kilobytes = 8; |
| 5447 | } |
| 5448 | |
| 5449 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5450 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5451 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5452 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5453 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5454 | } |
| 5455 | |
| 5456 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5457 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5458 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 5459 | message SystemUptime { |
| 5460 | // Milliseconds since the system was booted. |
| 5461 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 5462 | // for external input). |
| 5463 | // 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] | 5464 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5465 | } |
| 5466 | |
| 5467 | /* |
| 5468 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 5469 | * active: X (X is # cores) |
| 5470 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 5471 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 5472 | * ... |
| 5473 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 5474 | * The file contains a monotonically increasing count of time for a single boot. |
| 5475 | */ |
| 5476 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5477 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 5478 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 5479 | } |
| 5480 | |
| 5481 | /** |
| 5482 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 5483 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 5484 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 5485 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 5486 | * ... |
| 5487 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 5488 | * The file contains a monotonically increasing count of time for a single boot. |
| 5489 | */ |
| 5490 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 5491 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 5492 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 5493 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 5494 | } |
| 5495 | |
| 5496 | /* |
| 5497 | * Pulls free disk space, for data, system partition and temporary directory. |
| 5498 | */ |
| 5499 | message DiskSpace { |
| 5500 | // available bytes in data partition |
| 5501 | optional uint64 data_available_bytes = 1; |
| 5502 | // available bytes in system partition |
| 5503 | optional uint64 system_available_bytes = 2; |
| 5504 | // available bytes in download cache or temp directories |
| 5505 | optional uint64 temp_available_bytes = 3; |
| 5506 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5507 | |
| 5508 | /** |
| 5509 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 9876a3b | 2019-01-11 14:28:35 -0800 | [diff] [blame] | 5510 | * |
| 5511 | * Pulled from StatsCompanionService.java |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5512 | */ |
| 5513 | message RemainingBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5514 | optional int32 charge_micro_ampere_hour = 1; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5515 | } |
| 5516 | |
| 5517 | /** |
| 5518 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5519 | * Pulled from: |
| 5520 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 5521 | */ |
| 5522 | message FullBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5523 | optional int32 capacity_micro_ampere_hour = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5524 | } |
| 5525 | |
| 5526 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 5527 | * Pulls battery voltage. |
| 5528 | * Pulled from: |
| 5529 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 5530 | */ |
| 5531 | message BatteryVoltage { |
| 5532 | // The voltage of the battery, in millivolts. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5533 | optional int32 voltage_millivolt = 1; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 5534 | } |
| 5535 | |
| 5536 | /** |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 5537 | * Pulls battery level (percent full, from 0 to 100). |
| 5538 | * |
| 5539 | * Pulled from: |
| 5540 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 5541 | */ |
| 5542 | message BatteryLevel { |
| 5543 | // Battery level. Should be in [0, 100]. |
| 5544 | optional int32 battery_level = 1; |
| 5545 | } |
| 5546 | |
| 5547 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 5548 | * Pulls the temperature of various parts of the device. |
| 5549 | * 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] | 5550 | * |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 5551 | * Pulled from StatsCompanionService.java |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5552 | */ |
| 5553 | message Temperature { |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 5554 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 5555 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 5556 | |
| 5557 | // The name of the temperature source. Eg. CPU0 |
| 5558 | optional string sensor_name = 2; |
| 5559 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 5560 | // Temperature in tenths of a degree C. |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 5561 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5562 | optional int32 temperature_deci_celsius = 3; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 5563 | |
| 5564 | // Relative severity of the throttling, see enum definition. |
| 5565 | optional android.os.ThrottlingSeverityEnum severity = 4; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 5566 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 5567 | |
| 5568 | /** |
| 5569 | * Pulls the statistics of calls to Binder. |
| 5570 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 5571 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 5572 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 5573 | * |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 5574 | * Next tag: 15 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 5575 | */ |
| 5576 | message BinderCalls { |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 5577 | // UID of the process responsible for the binder transaction. It will be set if the process |
| 5578 | // executing the binder transaction attribute the transaction to another uid using |
| 5579 | // Binder.setThreadWorkSource(). |
| 5580 | // |
| 5581 | // If not set, the value will be -1. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 5582 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 5583 | // UID of the process executing the binder transaction. |
| 5584 | optional int32 direct_caller_uid = 14; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 5585 | // Fully qualified class name of the API call. |
| 5586 | // |
| 5587 | // This is a system server class name. |
| 5588 | // |
| 5589 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 5590 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 5591 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 5592 | // commonly used APIs. |
| 5593 | optional string service_class_name = 2; |
| 5594 | // Method name of the API call. It can also be a transaction code if we cannot |
| 5595 | // resolve it to a name. See Binder#getTransactionName. |
| 5596 | // |
| 5597 | // This is a system server method name. |
| 5598 | optional string service_method_name = 3; |
| 5599 | // Total number of API calls. |
| 5600 | optional int64 call_count = 4; |
| 5601 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 5602 | optional bool screen_interactive = 13; |
| 5603 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 5604 | // call_count will be equal to recorded_call_count. |
| 5605 | // |
| 5606 | // If recorded_call_count is different than call_count, it means data collection has been |
| 5607 | // sampled. All the fields below will be sampled in this case. |
| 5608 | optional int64 recorded_call_count = 12; |
| 5609 | // Number of exceptions thrown by the API. |
| 5610 | optional int64 recorded_exception_count = 5; |
| 5611 | // Total latency of all API calls. |
| 5612 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 5613 | optional int64 recorded_total_latency_micros = 6; |
| 5614 | // Maximum latency of one API call. |
| 5615 | optional int64 recorded_max_latency_micros = 7; |
| 5616 | // Total CPU usage of all API calls. |
| 5617 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 5618 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 5619 | optional int64 recorded_total_cpu_micros = 8; |
| 5620 | // Maximum CPU usage of one API call. |
| 5621 | optional int64 recorded_max_cpu_micros = 9; |
| 5622 | // Maximum parcel reply size of one API call. |
| 5623 | optional int64 recorded_max_reply_size_bytes = 10; |
| 5624 | // Maximum parcel request size of one API call. |
| 5625 | optional int64 recorded_max_request_size_bytes = 11; |
| 5626 | } |
| 5627 | |
| 5628 | /** |
| 5629 | * Pulls the statistics of exceptions during calls to Binder. |
| 5630 | * |
| 5631 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 5632 | * > adb shell dumpsys binder_calls_stats --reset |
| 5633 | */ |
| 5634 | message BinderCallsExceptions { |
| 5635 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 5636 | // |
| 5637 | // This is an exception class name thrown by the system server. |
| 5638 | optional string exception_class_name = 1; |
| 5639 | // Total number of exceptions. |
| 5640 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 5641 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5642 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5643 | /** |
| 5644 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 5645 | * |
| 5646 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 5647 | * config on the device. |
| 5648 | * |
| 5649 | * Next tag: 11 |
| 5650 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5651 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 5652 | // 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] | 5653 | optional int32 uid = 1 [(is_uid) = true]; |
| 5654 | |
| 5655 | // Fully qualified class name of the handler target class. |
| 5656 | // |
| 5657 | // This field does not contain PII. This is a system server class name. |
| 5658 | optional string handler_class_name = 2; |
| 5659 | |
| 5660 | // The name of the thread that runs the Looper. |
| 5661 | // |
| 5662 | // This field does not contain PII. This is a system server thread name. |
| 5663 | optional string looper_thread_name = 3; |
| 5664 | |
| 5665 | // The name of the dispatched message. |
| 5666 | // |
| 5667 | // This field does not contain PII. This is a system server constant or class |
| 5668 | // name. |
| 5669 | optional string message_name = 4; |
| 5670 | |
| 5671 | // Total number of successfully dispatched messages. |
| 5672 | optional int64 message_count = 5; |
| 5673 | |
| 5674 | // Total number of messages that failed dispatching. |
| 5675 | optional int64 exception_count = 6; |
| 5676 | |
| 5677 | // Total number of processed messages we have data recorded for. If we |
| 5678 | // collected data for all the messages, message_count will be equal to |
| 5679 | // recorded_message_count. |
| 5680 | // |
| 5681 | // If recorded_message_count is different than message_count, it means data |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 5682 | // 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] | 5683 | optional int64 recorded_message_count = 7; |
| 5684 | |
| 5685 | // Total latency of all processed messages. |
| 5686 | // Average can be computed using recorded_total_latency_micros / |
| 5687 | // recorded_message_count. |
| 5688 | optional int64 recorded_total_latency_micros = 8; |
| 5689 | |
| 5690 | // Total CPU usage of all processed message. |
| 5691 | // Average can be computed using recorded_total_cpu_micros / |
| 5692 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5693 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5694 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5695 | |
| 5696 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 5697 | optional bool screen_interactive = 10; |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 5698 | |
| 5699 | // Max recorded CPU usage of all processed messages. |
| 5700 | optional int64 recorded_max_cpu_micros = 11; |
| 5701 | |
| 5702 | // Max recorded latency of all processed messages. |
| 5703 | optional int64 recorded_max_latency_micros = 12; |
| 5704 | |
| 5705 | // Total number of messages we tracked the dispatching delay for. If we |
| 5706 | // collected data for all the messages, message_count will be equal to |
| 5707 | // recorded_delay_message_count. |
| 5708 | // |
| 5709 | // If recorded_delay_message_count is different than message_count, it means data |
| 5710 | // collection has been sampled or/and not all messages specified the target dispatch time. |
| 5711 | // The fields below will be sampled in this case. |
| 5712 | optional int64 recorded_delay_message_count = 13; |
| 5713 | |
| 5714 | // Total dispatching delay of all processed messages. |
| 5715 | // Calculated as a difference between the target dispatching time (Message.when) |
| 5716 | // and the actual dispatching time. |
| 5717 | // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. |
| 5718 | optional int64 recorded_total_delay_millis = 14; |
| 5719 | |
| 5720 | // Max dispatching delay of all processed messages. |
| 5721 | // Calculated as a difference between the target dispatching time (Message.when) |
| 5722 | // and the actual dispatching time. |
| 5723 | optional int64 recorded_max_delay_millis = 15; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5724 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 5725 | |
| 5726 | /** |
| 5727 | * Pulls disk information, such as write speed and latency. |
| 5728 | */ |
| 5729 | message DiskStats { |
| 5730 | // Time taken to open, write 512B to, and close a file. |
| 5731 | // -1 if error performing the check. |
| 5732 | optional int64 data_write_latency_millis = 1; |
| 5733 | |
| 5734 | optional bool file_based_encryption = 2; |
| 5735 | |
| 5736 | // Recent disk write speed in kB/s. |
| 5737 | // -1 if error querying storageed. |
| 5738 | // 0 if data is unavailable. |
| 5739 | optional int32 recent_disk_write_speed = 3; |
| 5740 | } |
| 5741 | |
| 5742 | |
| 5743 | /** |
| 5744 | * Free and total bytes of the Data, Cache, and System partition. |
| 5745 | */ |
| 5746 | message DirectoryUsage { |
| 5747 | enum Directory { |
| 5748 | UNKNOWN = 0; |
| 5749 | DATA = 1; |
| 5750 | CACHE = 2; |
| 5751 | SYSTEM = 3; |
| 5752 | } |
| 5753 | optional Directory directory = 1; |
| 5754 | optional int64 free_bytes = 2; |
| 5755 | optional int64 total_bytes = 3; |
| 5756 | } |
| 5757 | |
| 5758 | |
| 5759 | /** |
| 5760 | * Size of an application: apk size, data size, and cache size. |
| 5761 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 5762 | * Information is only reported for apps with the primary user (user 0). |
| 5763 | * Sizes are aggregated by package name. |
| 5764 | */ |
| 5765 | message AppSize { |
| 5766 | // Including uids will involve modifying diskstats logic. |
| 5767 | optional string package_name = 1; |
| 5768 | // App size in bytes. -1 if unavailable. |
| 5769 | optional int64 app_size_bytes = 2; |
| 5770 | // App data size in bytes. -1 if unavailable. |
| 5771 | optional int64 app_data_size_bytes = 3; |
| 5772 | // App cache size in bytes. -1 if unavailable. |
| 5773 | optional int64 app_cache_size_bytes = 4; |
| 5774 | // Time that the cache file was produced. |
| 5775 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 5776 | optional int64 cache_time_millis = 5; |
| 5777 | } |
| 5778 | |
| 5779 | |
| 5780 | /** |
| 5781 | * Size of a particular category. Eg: photos, videos. |
| 5782 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 5783 | */ |
| 5784 | message CategorySize { |
| 5785 | enum Category { |
| 5786 | UNKNOWN = 0; |
| 5787 | APP_SIZE = 1; |
| 5788 | APP_DATA_SIZE = 2; |
| 5789 | APP_CACHE_SIZE = 3; |
| 5790 | PHOTOS = 4; |
| 5791 | VIDEOS = 5; |
| 5792 | AUDIO = 6; |
| 5793 | DOWNLOADS = 7; |
| 5794 | SYSTEM = 8; |
| 5795 | OTHER = 9; |
| 5796 | } |
| 5797 | optional Category category = 1; |
| 5798 | // Category size in bytes. |
| 5799 | optional int64 size_bytes = 2; |
| 5800 | // Time that the cache file was produced. |
| 5801 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 5802 | optional int64 cache_time_millis = 3; |
| 5803 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5804 | |
| 5805 | /** |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 5806 | * Pulls per uid I/O stats. The stats are cumulative since boot. |
| 5807 | * |
| 5808 | * Read/write bytes are I/O events from a storage device |
| 5809 | * Read/write chars are data requested by read/write syscalls, and can be |
| 5810 | * satisfied by caching. |
| 5811 | * |
| 5812 | * Pulled from StatsCompanionService, which reads proc/uid_io/stats. |
| 5813 | */ |
| 5814 | message DiskIo { |
| 5815 | optional int32 uid = 1 [(is_uid) = true]; |
| 5816 | optional int64 fg_chars_read = 2; |
| 5817 | optional int64 fg_chars_write = 3; |
| 5818 | optional int64 fg_bytes_read = 4; |
| 5819 | optional int64 fg_bytes_write = 5; |
| 5820 | optional int64 bg_chars_read = 6; |
| 5821 | optional int64 bg_chars_write = 7; |
| 5822 | optional int64 bg_bytes_read = 8; |
| 5823 | optional int64 bg_bytes_write = 9; |
| 5824 | optional int64 fg_fsync = 10; |
| 5825 | optional int64 bg_fsync= 11; |
| 5826 | } |
| 5827 | |
| 5828 | |
| 5829 | /** |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5830 | * Pulls the number of fingerprints for each user. |
| 5831 | * |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 5832 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5833 | */ |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5834 | message NumFingerprintsEnrolled { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5835 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5836 | // Defined in android/os/UserHandle.java |
| 5837 | optional int32 user = 1; |
| 5838 | // Number of fingerprints registered to that user. |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5839 | optional int32 num_fingerprints_enrolled = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5840 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5841 | |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5842 | /** |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5843 | * Pulls the number of faces for each user. |
| 5844 | * |
| 5845 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
| 5846 | */ |
| 5847 | message NumFacesEnrolled { |
| 5848 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5849 | // Defined in android/os/UserHandle.java |
| 5850 | optional int32 user = 1; |
| 5851 | // Number of faces registered to that user. |
| 5852 | optional int32 num_faces_enrolled = 2; |
| 5853 | } |
| 5854 | /** |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5855 | * A mapping of role holder -> role |
| 5856 | */ |
| 5857 | message RoleHolder { |
| 5858 | // uid of the role holder |
| 5859 | optional int32 uid = 1 [(is_uid) = true]; |
| 5860 | |
| 5861 | // package name of the role holder |
| 5862 | optional string package_name = 2; |
| 5863 | |
| 5864 | // the role held |
| 5865 | optional string role = 3; |
| 5866 | } |
| 5867 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5868 | message AggStats { |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5869 | // These are all in byte resolution. |
| 5870 | optional int64 min = 1 [deprecated = true]; |
| 5871 | optional int64 average = 2 [deprecated = true]; |
| 5872 | optional int64 max = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5873 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5874 | // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above |
| 5875 | // int64 fields. |
| 5876 | optional int32 mean_kb = 4; |
| 5877 | optional int32 max_kb = 5; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5878 | } |
| 5879 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5880 | // A reduced subset of process states; reducing the number of possible states allows more |
| 5881 | // aggressive device-side aggregation of statistics and hence reduces metric upload size. |
| 5882 | enum ProcessStateAggregated { |
| 5883 | PROCESS_STATE_UNKNOWN = 0; |
| 5884 | // Persistent system process. |
| 5885 | PROCESS_STATE_PERSISTENT = 1; |
| 5886 | // Top activity; actually any visible activity. |
| 5887 | PROCESS_STATE_TOP = 2; |
| 5888 | // Process binding to top or a foreground service. |
| 5889 | PROCESS_STATE_BOUND_TOP_OR_FGS = 3; |
| 5890 | // Processing running a foreground service. |
| 5891 | PROCESS_STATE_FGS = 4; |
| 5892 | // Important foreground process (ime, wallpaper, etc). |
| 5893 | PROCESS_STATE_IMPORTANT_FOREGROUND = 5; |
| 5894 | // Important background process. |
| 5895 | PROCESS_STATE_BACKGROUND = 6; |
| 5896 | // Process running a receiver. |
| 5897 | PROCESS_STATE_RECEIVER = 7; |
| 5898 | // All kinds of cached processes. |
| 5899 | PROCESS_STATE_CACHED = 8; |
| 5900 | } |
| 5901 | |
| 5902 | // Next tag: 13 |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5903 | message ProcessStatsStateProto { |
| 5904 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5905 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5906 | optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5907 | |
| 5908 | // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java |
| 5909 | // and not frameworks/base/core/java/android/app/ActivityManager.java |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5910 | optional android.service.procstats.ProcessState process_state = 3 [deprecated = true]; |
| 5911 | |
| 5912 | optional ProcessStateAggregated process_state_aggregated = 10; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5913 | |
| 5914 | // Millisecond uptime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5915 | optional int64 duration_millis = 4 [deprecated = true]; |
| 5916 | // Same as above, but with minute resolution so it fits into an int32. |
| 5917 | optional int32 duration_minutes = 11; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5918 | |
| 5919 | // Millisecond elapsed realtime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5920 | optional int64 realtime_duration_millis = 9 [deprecated = true]; |
| 5921 | // Same as above, but with minute resolution so it fits into an int32. |
| 5922 | optional int32 realtime_duration_minutes = 12; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5923 | |
| 5924 | // # of samples taken |
| 5925 | optional int32 sample_size = 5; |
| 5926 | |
| 5927 | // PSS is memory reserved for this process |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5928 | optional AggStats pss = 6 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5929 | |
| 5930 | // USS is memory shared between processes, divided evenly for accounting |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5931 | optional AggStats uss = 7 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5932 | |
| 5933 | // RSS is memory resident for this process |
| 5934 | optional AggStats rss = 8; |
| 5935 | } |
| 5936 | |
Jing Ji | 060d686 | 2020-04-13 19:36:31 -0700 | [diff] [blame] | 5937 | // Next Tag: 8 |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5938 | message ProcessStatsProto { |
| 5939 | // Name of process. |
| 5940 | optional string process = 1; |
| 5941 | |
| 5942 | // Uid of the process. |
Jing Ji | 1cd1f60 | 2020-06-03 13:45:36 -0700 | [diff] [blame] | 5943 | optional int32 uid = 2 [(is_uid) = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5944 | |
| 5945 | // Information about how often kills occurred |
| 5946 | message Kill { |
| 5947 | // Count of excessive CPU kills |
| 5948 | optional int32 cpu = 1; |
| 5949 | |
| 5950 | // Count of kills when cached |
| 5951 | optional int32 cached = 2; |
| 5952 | |
| 5953 | // PSS stats during cached kill |
| 5954 | optional AggStats cached_pss = 3; |
| 5955 | } |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5956 | optional Kill kill = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5957 | |
| 5958 | // Time and memory spent in various states. |
| 5959 | repeated ProcessStatsStateProto states = 5; |
| 5960 | |
| 5961 | // Total time process has been running... screen_state, memory_state, and process_state |
| 5962 | // will not be set. |
| 5963 | optional ProcessStatsStateProto total_running_state = 6; |
Jing Ji | 060d686 | 2020-04-13 19:36:31 -0700 | [diff] [blame] | 5964 | |
| 5965 | // Association data for this process in this state; |
| 5966 | // each entry here is one association. |
| 5967 | repeated ProcessStatsAssociationProto assocs = 7; |
| 5968 | } |
| 5969 | |
Jing Ji | 1cd1f60 | 2020-06-03 13:45:36 -0700 | [diff] [blame] | 5970 | // Next Tag: 6 |
Jing Ji | 060d686 | 2020-04-13 19:36:31 -0700 | [diff] [blame] | 5971 | message ProcessStatsAssociationProto { |
| 5972 | // Procss Name of the associated process (client process of service binding) |
| 5973 | optional string assoc_process_name = 1; |
| 5974 | |
| 5975 | // Package Name of the associated package (client package of service binding) |
Jing Ji | 1cd1f60 | 2020-06-03 13:45:36 -0700 | [diff] [blame] | 5976 | optional string assoc_package_name = 2 [deprecated = true]; |
| 5977 | |
| 5978 | // UID of the associated process/package (client package of service binding) |
| 5979 | optional int32 assoc_uid = 5 [(is_uid) = true]; |
Jing Ji | 060d686 | 2020-04-13 19:36:31 -0700 | [diff] [blame] | 5980 | |
| 5981 | // Total count of the times this association (service binding) appeared. |
| 5982 | optional int32 total_count = 3; |
| 5983 | |
| 5984 | // Uptime total duration in seconds this association (service binding) was around. |
| 5985 | optional int32 total_duration_secs = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5986 | } |
| 5987 | |
| 5988 | message PackageServiceOperationStatsProto { |
| 5989 | // Operate enum: Started, Foreground, Bound, Executing |
| 5990 | optional android.service.procstats.ServiceOperationState operation = 1; |
| 5991 | |
| 5992 | // Number of times the service was in this operation. |
| 5993 | optional int32 count = 2; |
| 5994 | |
| 5995 | // Information about a state the service can be in. |
| 5996 | message StateStats { |
| 5997 | // Screen state enum. |
| 5998 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5999 | // Memory state enum. |
| 6000 | optional android.service.procstats.MemoryState memory_state = 2; |
| 6001 | |
| 6002 | // duration in milliseconds. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6003 | optional int64 duration_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6004 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6005 | optional int64 realtime_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6006 | } |
| 6007 | repeated StateStats state_stats = 3; |
| 6008 | } |
| 6009 | |
| 6010 | message PackageServiceStatsProto { |
| 6011 | // Name of service component. |
| 6012 | optional string service_name = 1; |
| 6013 | |
| 6014 | // The operation stats. |
| 6015 | // The package_name, package_uid, package_version, service_name will not be set to save space. |
| 6016 | repeated PackageServiceOperationStatsProto operation_stats = 2; |
| 6017 | } |
| 6018 | |
| 6019 | message PackageAssociationSourceProcessStatsProto { |
| 6020 | // Uid of the process. |
| 6021 | optional int32 process_uid = 1; |
| 6022 | // Process name. |
| 6023 | optional string process_name = 2; |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 6024 | // Package name. |
| 6025 | optional string package_name = 7; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6026 | // Total count of the times this association appeared. |
| 6027 | optional int32 total_count = 3; |
| 6028 | |
| 6029 | // Millisecond uptime total duration this association was around. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6030 | optional int64 total_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6031 | |
| 6032 | // Total count of the times this association became actively impacting its target process. |
| 6033 | optional int32 active_count = 5; |
| 6034 | |
| 6035 | // Information on one source in this association. |
| 6036 | message StateStats { |
| 6037 | // Process state enum. |
| 6038 | optional android.service.procstats.ProcessState process_state = 1; |
| 6039 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6040 | optional int64 duration_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6041 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6042 | optional int64 realtime_duration_mmillis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6043 | } |
| 6044 | repeated StateStats active_state_stats = 6; |
| 6045 | } |
| 6046 | |
| 6047 | message PackageAssociationProcessStatsProto { |
| 6048 | // Name of the target component. |
| 6049 | optional string component_name = 1; |
| 6050 | // Information on one source in this association. |
| 6051 | repeated PackageAssociationSourceProcessStatsProto sources = 2; |
| 6052 | } |
| 6053 | |
| 6054 | |
| 6055 | message ProcessStatsPackageProto { |
| 6056 | // Name of package. |
| 6057 | optional string package = 1; |
| 6058 | |
| 6059 | // Uid of the package. |
| 6060 | optional int32 uid = 2; |
| 6061 | |
| 6062 | // Version of the package. |
| 6063 | optional int64 version = 3; |
| 6064 | |
| 6065 | // Stats for each process running with the package loaded in to it. |
| 6066 | repeated ProcessStatsProto process_stats = 4; |
| 6067 | |
| 6068 | // Stats for each of the package's services. |
| 6069 | repeated PackageServiceStatsProto service_stats = 5; |
| 6070 | |
| 6071 | // Stats for each association with the package. |
| 6072 | repeated PackageAssociationProcessStatsProto association_stats = 6; |
| 6073 | } |
| 6074 | |
| 6075 | message ProcessStatsSectionProto { |
| 6076 | // Elapsed realtime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6077 | optional int64 start_realtime_millis = 1; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6078 | |
| 6079 | // Elapsed realtime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6080 | optional int64 end_realtime_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6081 | |
| 6082 | // CPU uptime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6083 | optional int64 start_uptime_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6084 | |
| 6085 | // CPU uptime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 6086 | optional int64 end_uptime_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6087 | |
| 6088 | // System runtime library. e.g. "libdvm.so", "libart.so". |
| 6089 | optional string runtime = 5; |
| 6090 | |
| 6091 | // whether kernel reports swapped pss. |
| 6092 | optional bool has_swapped_pss = 6; |
| 6093 | |
| 6094 | // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". |
| 6095 | enum Status { |
| 6096 | STATUS_UNKNOWN = 0; |
| 6097 | STATUS_COMPLETE = 1; |
| 6098 | STATUS_PARTIAL = 2; |
| 6099 | STATUS_SHUTDOWN = 3; |
| 6100 | STATUS_SYSPROPS = 4; |
| 6101 | } |
| 6102 | repeated Status status = 7; |
| 6103 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 6104 | // Number of pages available of various types and sizes, representation fragmentation. |
| 6105 | repeated ProcessStatsAvailablePagesProto available_pages = 10; |
| 6106 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6107 | // Stats for each process. |
| 6108 | repeated ProcessStatsProto process_stats = 8; |
| 6109 | |
| 6110 | // Stats for each package. |
| 6111 | repeated ProcessStatsPackageProto package_stats = 9; |
| 6112 | } |
| 6113 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 6114 | message ProcessStatsAvailablePagesProto { |
| 6115 | // Node these pages are in (as per /proc/pagetypeinfo) |
| 6116 | optional int32 node = 1; |
| 6117 | |
| 6118 | // Zone these pages are in (as per /proc/pagetypeinfo) |
| 6119 | optional string zone = 2; |
| 6120 | |
| 6121 | // Label for the type of these pages (as per /proc/pagetypeinfo) |
| 6122 | optional string label = 3; |
| 6123 | |
| 6124 | // Distribution of number of pages available by order size. First entry in array is |
| 6125 | // order 0, second is order 1, etc. Each order increase is a doubling of page size. |
| 6126 | repeated int32 pages_per_order = 4; |
| 6127 | } |
| 6128 | |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 6129 | /** |
| 6130 | * Pulled from ProcessStatsService.java |
| 6131 | */ |
| 6132 | message ProcStats { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6133 | optional ProcessStatsSectionProto proc_stats_section = 1; |
Richard Gaywood | 78c3f99 | 2020-06-23 17:12:49 +0100 | [diff] [blame] | 6134 | // Data pulled from device into this is sometimes sharded across multiple atoms to work around |
| 6135 | // a size limit. When this happens, this shard ID will contain an increasing 1-indexed integer |
| 6136 | // with the number of this shard. |
| 6137 | optional int32 shard_id = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6138 | } |
| 6139 | |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 6140 | /** |
| 6141 | * Pulled from ProcessStatsService.java |
| 6142 | */ |
| 6143 | message ProcStatsPkgProc { |
| 6144 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 6145 | } |
| 6146 | |
Chris Wren | cdea3b7 | 2019-11-22 16:58:17 -0500 | [diff] [blame] | 6147 | // Next Tag: 2 |
| 6148 | message PackageRemoteViewInfoProto { |
| 6149 | optional string package_name = 1; |
| 6150 | // add per-package additional info here (like channels) |
| 6151 | } |
| 6152 | |
| 6153 | // Next Tag: 2 |
| 6154 | message NotificationRemoteViewsProto { |
| 6155 | repeated PackageRemoteViewInfoProto package_remote_view_info = 1; |
| 6156 | } |
| 6157 | |
| 6158 | /** |
| 6159 | * Pulled from NotificationManagerService.java |
| 6160 | */ |
| 6161 | message NotificationRemoteViews { |
| 6162 | optional NotificationRemoteViewsProto notification_remote_views = 1; |
| 6163 | } |
| 6164 | |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6165 | /** |
| 6166 | * Atom that contains a list of a package's preferences, pulled from NotificationManagerService.java |
| 6167 | */ |
| 6168 | message PackageNotificationPreferences { |
| 6169 | // Uid under which the package is installed. |
Muhammad Qureshi | 22e52da | 2020-03-30 21:14:21 -0700 | [diff] [blame] | 6170 | optional int32 uid = 1 [(is_uid) = true]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6171 | // Notification importance, which specifies when and how a notification is displayed. |
| 6172 | // Specified under core/java/android/app/NotificationManager.java. |
| 6173 | optional int32 importance = 2; |
| 6174 | // Lockscreen visibility as set by the user. |
| 6175 | optional int32 visibility = 3; |
| 6176 | // Bitfield mask indicating what fields were locked by the user (see LockableAppfields in |
| 6177 | // PreferencesHelper.java) |
| 6178 | optional int32 user_locked_fields = 4; |
| 6179 | } |
| 6180 | |
| 6181 | /** |
| 6182 | * Atom that contains a list of a package's channel preferences, pulled from |
| 6183 | * NotificationManagerService.java. |
| 6184 | */ |
| 6185 | message PackageNotificationChannelPreferences { |
| 6186 | // Uid under which the package is installed. |
Muhammad Qureshi | 22e52da | 2020-03-30 21:14:21 -0700 | [diff] [blame] | 6187 | optional int32 uid = 1 [(is_uid) = true]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6188 | // Channel's ID. Should always be available. |
| 6189 | optional string channel_id = 2; |
| 6190 | // Channel's name. Should always be available. |
| 6191 | optional string channel_name = 3; |
| 6192 | // Channel's description. Optionally set by the channel creator. |
| 6193 | optional string description = 4; |
| 6194 | // Notification importance, which specifies when and how a notification is displayed. Specified |
| 6195 | // under core/java/android/app/NotificationManager.java. |
| 6196 | optional int32 importance = 5; |
| 6197 | // Bitmask representing which fields have been set by the user. See field bitmask descriptions |
| 6198 | // at core/java/android/app/NotificationChannel.java |
| 6199 | optional int32 user_locked_fields = 6; |
| 6200 | // Indicates if the channel was deleted by the app. |
| 6201 | optional bool is_deleted = 7; |
Chris Wren | 07cb6a4 | 2020-05-14 17:35:30 -0400 | [diff] [blame] | 6202 | // Indicates if the channel was marked as a conversation by the app. |
| 6203 | optional bool is_conversation = 8; |
| 6204 | // Indicates if the channel is a conversation that was demoted by the user. |
| 6205 | optional bool is_demoted_conversation = 9; |
| 6206 | // Indicates if the channel is a conversation that was marked as important by the user. |
| 6207 | optional bool is_important_conversation = 10; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6208 | } |
| 6209 | |
| 6210 | /** |
Chris Wren | 9316569 | 2020-05-15 16:12:41 -0400 | [diff] [blame] | 6211 | * Atom that represents an item in the list of Do Not Disturb rules, pulled from |
| 6212 | * NotificationManagerService.java. |
| 6213 | */ |
| 6214 | message DNDModeProto { |
| 6215 | enum Mode { |
| 6216 | ROOT_CONFIG = -1; // Used to distinguish the config (one per user) from the rules. |
| 6217 | ZEN_MODE_OFF = 0; |
| 6218 | ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; |
| 6219 | ZEN_MODE_NO_INTERRUPTIONS = 2; |
| 6220 | ZEN_MODE_ALARMS = 3; |
| 6221 | } |
| 6222 | optional int32 user = 1; // Android user ID (0, 1, 10, ...) |
| 6223 | optional bool enabled = 2; // true for ROOT_CONFIG if a manualRule is enabled |
| 6224 | optional bool channels_bypassing = 3; // only valid for ROOT_CONFIG |
| 6225 | optional Mode zen_mode = 4; |
| 6226 | // id is one of the system default rule IDs, or empty |
| 6227 | // May also be "MANUAL_RULE" to indicate app-activation of the manual rule. |
| 6228 | optional string id = 5; |
| 6229 | optional int32 uid = 6 [(is_uid) = true]; // currently only SYSTEM_UID or 0 for other |
| 6230 | optional DNDPolicyProto policy = 7; |
| 6231 | } |
| 6232 | |
| 6233 | /** |
| 6234 | * Atom that represents a Do Not Disturb policy, an optional detail proto for DNDModeProto. |
| 6235 | */ |
| 6236 | message DNDPolicyProto { |
| 6237 | enum State { |
| 6238 | STATE_UNSET = 0; |
| 6239 | STATE_ALLOW = 1; |
| 6240 | STATE_DISALLOW = 2; |
| 6241 | } |
| 6242 | optional State calls = 1; |
| 6243 | optional State repeat_callers = 2; |
| 6244 | optional State messages = 3; |
| 6245 | optional State conversations = 4; |
| 6246 | optional State reminders = 5; |
| 6247 | optional State events = 6; |
| 6248 | optional State alarms = 7; |
| 6249 | optional State media = 8; |
| 6250 | optional State system = 9; |
| 6251 | optional State fullscreen = 10; |
| 6252 | optional State lights = 11; |
| 6253 | optional State peek = 12; |
| 6254 | optional State status_bar = 13; |
| 6255 | optional State badge = 14; |
| 6256 | optional State ambient = 15; |
| 6257 | optional State notification_list = 16; |
| 6258 | |
| 6259 | enum PeopleType { |
| 6260 | PEOPLE_UNSET = 0; |
| 6261 | PEOPLE_ANYONE = 1; |
| 6262 | PEOPLE_CONTACTS = 2; |
| 6263 | PEOPLE_STARRED = 3; |
| 6264 | PEOPLE_NONE = 4; |
| 6265 | } |
| 6266 | |
| 6267 | optional PeopleType allow_calls_from = 17; |
| 6268 | optional PeopleType allow_messages_from = 18; |
| 6269 | |
| 6270 | enum ConversationType { |
| 6271 | CONV_UNSET = 0; |
| 6272 | CONV_ANYONE = 1; |
| 6273 | CONV_IMPORTANT = 2; |
| 6274 | CONV_NONE = 3; |
| 6275 | } |
| 6276 | |
| 6277 | optional ConversationType allow_conversations_from = 19; |
| 6278 | } |
| 6279 | |
| 6280 | /** |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6281 | * Atom that contains a list of a package's channel group preferences, pulled from |
| 6282 | * NotificationManagerService.java. |
| 6283 | */ |
| 6284 | message PackageNotificationChannelGroupPreferences { |
| 6285 | // Uid under which the package is installed. |
Muhammad Qureshi | 22e52da | 2020-03-30 21:14:21 -0700 | [diff] [blame] | 6286 | optional int32 uid = 1 [(is_uid) = true]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 6287 | // Channel Group's ID. Should always be available. |
| 6288 | optional string group_id = 2; |
| 6289 | // Channel Group's name. Should always be available. |
| 6290 | optional string group_name = 3; |
| 6291 | // Channel Group's description. Optionally set by group creator. |
| 6292 | optional string description = 4; |
| 6293 | // Indicates if notifications from this channel group are blocked. |
| 6294 | optional bool is_blocked = 5; |
| 6295 | // Bitmask representing which fields have been set by the user. See field bitmask descriptions |
| 6296 | // at core/java/android/app/NotificationChannelGroup.java |
| 6297 | optional int32 user_locked_fields = 6; |
| 6298 | } |
| 6299 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6300 | message PowerProfileProto { |
| 6301 | optional double cpu_suspend = 1; |
| 6302 | |
| 6303 | optional double cpu_idle = 2; |
| 6304 | |
| 6305 | optional double cpu_active = 3; |
| 6306 | |
| 6307 | message CpuCluster { |
| 6308 | optional int32 id = 1; |
| 6309 | optional double cluster_power = 2; |
| 6310 | optional int32 cores = 3; |
| 6311 | repeated int64 speed = 4; |
| 6312 | repeated double core_power = 5; |
| 6313 | } |
| 6314 | |
| 6315 | repeated CpuCluster cpu_cluster = 40; |
| 6316 | |
| 6317 | optional double wifi_scan = 4; |
| 6318 | |
| 6319 | optional double wifi_on = 5; |
| 6320 | |
| 6321 | optional double wifi_active = 6; |
| 6322 | |
| 6323 | optional double wifi_controller_idle = 7; |
| 6324 | |
| 6325 | optional double wifi_controller_rx = 8; |
| 6326 | |
| 6327 | optional double wifi_controller_tx = 9; |
| 6328 | |
| 6329 | repeated double wifi_controller_tx_levels = 10; |
| 6330 | |
| 6331 | optional double wifi_controller_operating_voltage = 11; |
| 6332 | |
| 6333 | optional double bluetooth_controller_idle = 12; |
| 6334 | |
| 6335 | optional double bluetooth_controller_rx = 13; |
| 6336 | |
| 6337 | optional double bluetooth_controller_tx = 14; |
| 6338 | |
| 6339 | optional double bluetooth_controller_operating_voltage = 15; |
| 6340 | |
| 6341 | optional double modem_controller_sleep = 16; |
| 6342 | |
| 6343 | optional double modem_controller_idle = 17; |
| 6344 | |
| 6345 | optional double modem_controller_rx = 18; |
| 6346 | |
| 6347 | repeated double modem_controller_tx = 19; |
| 6348 | |
| 6349 | optional double modem_controller_operating_voltage = 20; |
| 6350 | |
| 6351 | optional double gps_on = 21; |
| 6352 | |
| 6353 | repeated double gps_signal_quality_based = 22; |
| 6354 | |
| 6355 | optional double gps_operating_voltage = 23; |
| 6356 | |
| 6357 | optional double bluetooth_on = 24; |
| 6358 | |
| 6359 | optional double bluetooth_active = 25; |
| 6360 | |
| 6361 | optional double bluetooth_at_cmd = 26; |
| 6362 | |
| 6363 | optional double ambient_display = 27; |
| 6364 | |
| 6365 | optional double screen_on = 28; |
| 6366 | |
| 6367 | optional double radio_on = 29; |
| 6368 | |
| 6369 | optional double radio_scanning = 30; |
| 6370 | |
| 6371 | optional double radio_active = 31; |
| 6372 | |
| 6373 | optional double screen_full = 32; |
| 6374 | |
| 6375 | optional double audio = 33; |
| 6376 | |
| 6377 | optional double video = 34; |
| 6378 | |
| 6379 | optional double flashlight = 35; |
| 6380 | |
| 6381 | optional double memory = 36; |
| 6382 | |
| 6383 | optional double camera = 37; |
| 6384 | |
| 6385 | optional double wifi_batched_scan = 38; |
| 6386 | |
| 6387 | optional double battery_capacity = 39; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 6388 | } |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 6389 | |
| 6390 | /** |
| 6391 | * power_profile.xml and other constants for power model calculations. |
| 6392 | * Pulled from PowerProfile.java |
| 6393 | */ |
| 6394 | message PowerProfile { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 6395 | optional PowerProfileProto power_profile = 1; |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 6396 | } |
Chenjie Yu | b35b5f7 | 2018-10-13 23:25:11 -0700 | [diff] [blame] | 6397 | |
| 6398 | /** |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 6399 | * Logs when a user restriction was added or removed. |
| 6400 | * |
| 6401 | * Logged from: |
| 6402 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 6403 | */ |
| 6404 | message UserRestrictionChanged { |
| 6405 | // The raw string of the user restriction as defined in UserManager. |
| 6406 | // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. |
| 6407 | optional string restriction = 1; |
| 6408 | // Whether the restriction is enabled or disabled. |
| 6409 | optional bool enabled = 2; |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 6410 | } |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 6411 | |
| 6412 | /** |
| 6413 | * Pulls process user time and system time. Puller takes a snapshot of all pids |
| 6414 | * in the system and returns cpu stats for those that are working at the time. |
| 6415 | * Dead pids will be dropped. Kernel processes are excluded. |
| 6416 | * Min cool-down is 5 sec. |
| 6417 | */ |
| 6418 | message ProcessCpuTime { |
| 6419 | optional int32 uid = 1 [(is_uid) = true]; |
| 6420 | |
| 6421 | optional string process_name = 2; |
| 6422 | // Process cpu time in user space, cumulative from boot/process start |
| 6423 | optional int64 user_time_millis = 3; |
| 6424 | // Process cpu time in system space, cumulative from boot/process start |
| 6425 | optional int64 system_time_millis = 4; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 6426 | } |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6427 | |
| 6428 | /** |
| 6429 | * Pulls the CPU usage for each thread. |
| 6430 | * |
| 6431 | * Read from /proc/$PID/task/$TID/time_in_state files. |
| 6432 | * |
| 6433 | * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and |
| 6434 | * time_in_state files not being present on some phones, have not been addressed. These should be |
| 6435 | * considered before a public release. |
| 6436 | */ |
| 6437 | message CpuTimePerThreadFreq { |
| 6438 | // UID that owns the process. |
| 6439 | optional int32 uid = 1 [(is_uid) = true]; |
| 6440 | // ID of the process. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 6441 | optional int32 process_id = 2; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6442 | // ID of the thread. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 6443 | optional int32 thread_id = 3; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6444 | // Name of the process taken from `/proc/$PID/cmdline`. |
| 6445 | optional string process_name = 4; |
| 6446 | // Name of the thread taken from `/proc/$PID/task/$TID/comm` |
| 6447 | optional string thread_name = 5; |
Misha Wagner | fde6958 | 2018-11-28 13:26:32 +0000 | [diff] [blame] | 6448 | |
| 6449 | // Report eight different frequencies, and how much time is spent in each frequency. Frequencies |
| 6450 | // are given in KHz, and time is given in milliseconds since the thread started. All eight |
| 6451 | // frequencies are given here as the alternative is sending eight separate atoms. This method |
| 6452 | // significantly reduces the amount of data created |
| 6453 | optional int32 frequency1_khz = 6; |
| 6454 | optional int32 time1_millis = 7; |
| 6455 | optional int32 frequency2_khz = 8; |
| 6456 | optional int32 time2_millis = 9; |
| 6457 | optional int32 frequency3_khz = 10; |
| 6458 | optional int32 time3_millis = 11; |
| 6459 | optional int32 frequency4_khz = 12; |
| 6460 | optional int32 time4_millis = 13; |
| 6461 | optional int32 frequency5_khz = 14; |
| 6462 | optional int32 time5_millis = 15; |
| 6463 | optional int32 frequency6_khz = 16; |
| 6464 | optional int32 time6_millis = 17; |
| 6465 | optional int32 frequency7_khz = 18; |
| 6466 | optional int32 time7_millis = 19; |
| 6467 | optional int32 frequency8_khz = 20; |
| 6468 | optional int32 time8_millis = 21; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 6469 | } |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6470 | |
| 6471 | /** |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 6472 | * Pulls information about the device's build. |
| 6473 | */ |
| 6474 | message BuildInformation { |
| 6475 | // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. |
| 6476 | // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. |
| 6477 | optional string fingerprint = 1; |
| 6478 | |
| 6479 | // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. |
| 6480 | optional string brand = 2; |
| 6481 | |
| 6482 | // Build.PRODUCT. The name of the overall product. |
| 6483 | optional string product = 3; |
| 6484 | |
| 6485 | // Build.DEVICE. The name of the industrial design. |
| 6486 | optional string device = 4; |
| 6487 | |
| 6488 | // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". |
| 6489 | optional string version_release = 5; |
| 6490 | |
| 6491 | // Build.ID. E.g. a label like "M4-rc20". |
| 6492 | optional string id = 6; |
| 6493 | |
| 6494 | // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to |
| 6495 | // represent this build. |
| 6496 | optional string version_incremental = 7; |
| 6497 | |
| 6498 | // Build.TYPE. The type of build, like "user" or "eng". |
| 6499 | optional string type = 8; |
| 6500 | |
| 6501 | // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". |
| 6502 | optional string tags = 9; |
| 6503 | } |
| 6504 | |
| 6505 | /** |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 6506 | * Logs information about mismatched caller for content capture. |
| 6507 | * |
| 6508 | * Logged from: |
| 6509 | * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java |
| 6510 | */ |
| 6511 | message ContentCaptureCallerMismatchReported { |
| 6512 | optional string intended_package = 1; |
| 6513 | optional string calling_package = 2; |
| 6514 | } |
| 6515 | |
| 6516 | /** |
| 6517 | * Logs information about content capture service events. |
| 6518 | * |
| 6519 | * Logged from: |
| 6520 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 6521 | */ |
| 6522 | message ContentCaptureServiceEvents { |
| 6523 | // The type of event. |
| 6524 | enum Event { |
| 6525 | UNKNOWN = 0; |
| 6526 | ON_CONNECTED = 1; |
| 6527 | ON_DISCONNECTED = 2; |
| 6528 | SET_WHITELIST = 3; |
| 6529 | SET_DISABLED = 4; |
| 6530 | ON_USER_DATA_REMOVED = 5; |
Yara Hassan | 1e4256e | 2020-06-05 16:26:30 +0100 | [diff] [blame] | 6531 | ON_DATA_SHARE_REQUEST = 6; |
| 6532 | ACCEPT_DATA_SHARE_REQUEST = 7; |
| 6533 | REJECT_DATA_SHARE_REQUEST = 8; |
| 6534 | DATA_SHARE_WRITE_FINISHED = 9; |
| 6535 | DATA_SHARE_ERROR_IOEXCEPTION = 10; |
| 6536 | DATA_SHARE_ERROR_EMPTY_DATA = 11; |
| 6537 | DATA_SHARE_ERROR_CLIENT_PIPE_FAIL = 12; |
| 6538 | DATA_SHARE_ERROR_SERVICE_PIPE_FAIL = 13; |
| 6539 | DATA_SHARE_ERROR_CONCURRENT_REQUEST = 14; |
| 6540 | DATA_SHARE_ERROR_TIMEOUT_INTERRUPTED = 15; |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 6541 | } |
| 6542 | optional Event event = 1; |
| 6543 | // component/package of content capture service. |
| 6544 | optional string service_info = 2; |
| 6545 | // component/package of target. |
| 6546 | // it's a concatenated list of component/package for SET_WHITELIST event |
| 6547 | // separated by " ". |
| 6548 | optional string target_info = 3; |
| 6549 | } |
| 6550 | |
| 6551 | /** |
| 6552 | * Logs information about content capture session events. |
| 6553 | * |
| 6554 | * Logged from: |
| 6555 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 6556 | */ |
| 6557 | message ContentCaptureSessionEvents { |
| 6558 | // The type of event. |
| 6559 | enum Event { |
| 6560 | UNKNOWN = 0; |
| 6561 | ON_SESSION_STARTED = 1; |
| 6562 | ON_SESSION_FINISHED = 2; |
| 6563 | SESSION_NOT_CREATED = 3; |
| 6564 | } |
| 6565 | optional int32 session_id = 1; |
| 6566 | optional Event event = 2; |
| 6567 | // (n/a on session finished) |
| 6568 | optional int32 state_flags = 3; |
| 6569 | // component/package of content capture service. |
| 6570 | optional string service_info = 4; |
| 6571 | // component/package of app. |
| 6572 | // (n/a on session finished) |
| 6573 | optional string app_info = 5; |
| 6574 | optional bool is_child_session = 6; |
| 6575 | } |
| 6576 | |
| 6577 | /** |
| 6578 | * Logs information about session being flushed. |
| 6579 | * |
| 6580 | * Logged from: |
| 6581 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 6582 | */ |
| 6583 | message ContentCaptureFlushed { |
| 6584 | optional int32 session_id = 1; |
| 6585 | // component/package of content capture service. |
| 6586 | optional string service_info = 2; |
| 6587 | // component/package of app. |
| 6588 | optional string app_info = 3; |
| 6589 | // session start/finish events |
| 6590 | optional int32 child_session_started = 4; |
| 6591 | optional int32 child_session_finished = 5; |
| 6592 | // count of view events. |
| 6593 | optional int32 view_appeared_count = 6; |
| 6594 | optional int32 view_disappeared_count = 7; |
| 6595 | optional int32 view_text_changed_count = 8; |
| 6596 | |
| 6597 | // Flush stats. |
| 6598 | optional int32 max_events = 9; |
| 6599 | optional int32 idle_flush_freq = 10; |
| 6600 | optional int32 text_flush_freq = 11; |
| 6601 | optional int32 flush_reason = 12; |
| 6602 | } |
| 6603 | |
| 6604 | /** |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6605 | * Pulls on-device BatteryStats power use calculations for the overall device. |
| 6606 | */ |
| 6607 | message DeviceCalculatedPowerUse { |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 6608 | // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 6609 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 6610 | // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). |
| 6611 | optional int64 computed_power_nano_amp_secs = 1; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6612 | } |
| 6613 | |
| 6614 | /** |
| 6615 | * Pulls on-device BatteryStats power use calculations broken down by uid. |
| 6616 | * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use |
| 6617 | * that is attributed to non-uid items. They must all be included to get the total power use. |
| 6618 | */ |
| 6619 | message DeviceCalculatedPowerBlameUid { |
| 6620 | // Uid being blamed. Note: isolated uids have already been mapped to host uid. |
| 6621 | optional int32 uid = 1 [(is_uid) = true]; |
| 6622 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 6623 | // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 6624 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 6625 | optional int64 power_nano_amp_secs = 2; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 6626 | } |
| 6627 | |
| 6628 | /** |
| 6629 | * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by |
| 6630 | * drain type. |
| 6631 | * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that |
| 6632 | * is attributed uids. They must all be included to get the total power use. |
| 6633 | */ |
| 6634 | message DeviceCalculatedPowerBlameOther { |
| 6635 | // The type of item whose power use is being reported. |
| 6636 | enum DrainType { |
| 6637 | AMBIENT_DISPLAY = 0; |
| 6638 | // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. |
| 6639 | BLUETOOTH = 2; |
| 6640 | CAMERA = 3; |
| 6641 | // Cell-standby |
| 6642 | CELL = 4; |
| 6643 | FLASHLIGHT = 5; |
| 6644 | IDLE = 6; |
| 6645 | MEMORY = 7; |
| 6646 | // Amount that total computed drain exceeded the drain estimated using the |
| 6647 | // battery level changes and capacity. |
| 6648 | OVERCOUNTED = 8; |
| 6649 | PHONE = 9; |
| 6650 | SCREEN = 10; |
| 6651 | // Amount that total computed drain was below the drain estimated using the |
| 6652 | // battery level changes and capacity. |
| 6653 | UNACCOUNTED = 11; |
| 6654 | // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. |
| 6655 | WIFI = 13; |
| 6656 | } |
| 6657 | optional DrainType drain_type = 1; |
| 6658 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 6659 | // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 6660 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 6661 | optional int64 power_nano_amp_secs = 2; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 6662 | } |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 6663 | |
| 6664 | /** |
| 6665 | * Logs device policy features. |
| 6666 | * |
| 6667 | * Logged from: |
| 6668 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 6669 | * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ |
| 6670 | */ |
| 6671 | message DevicePolicyEvent { |
| 6672 | // The event id - unique for each event. |
| 6673 | optional android.stats.devicepolicy.EventId event_id = 1; |
| 6674 | // The admin package name. |
| 6675 | optional string admin_package_name = 2; |
| 6676 | // A generic integer parameter. |
| 6677 | optional int32 integer_value = 3; |
| 6678 | // A generic boolean parameter. |
| 6679 | optional bool boolean_value = 4; |
| 6680 | // A parameter specifying a time period in milliseconds. |
| 6681 | optional uint64 time_period_millis = 5; |
| 6682 | // A parameter specifying a list of package names, bundle extras or string parameters. |
| 6683 | optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; |
| 6684 | } |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 6685 | |
| 6686 | /** |
| 6687 | * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. |
| 6688 | * |
| 6689 | * Logged from: |
| 6690 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6691 | */ |
| 6692 | message DocsUILaunchReported { |
| 6693 | optional android.stats.docsui.LaunchAction launch_action = 1; |
| 6694 | optional bool has_initial_uri = 2; |
| 6695 | optional android.stats.docsui.MimeType mime_type = 3; |
| 6696 | optional android.stats.docsui.Root initial_root = 4; |
| 6697 | } |
| 6698 | |
| 6699 | /** |
| 6700 | * Logs root/app visited event in file managers/picker. Call this when the user |
| 6701 | * taps on root/app in hamburger menu. |
| 6702 | * |
| 6703 | * Logged from: |
| 6704 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6705 | */ |
| 6706 | message DocsUIRootVisitedReported { |
| 6707 | optional android.stats.docsui.ContextScope scope = 1; |
| 6708 | optional android.stats.docsui.Root root = 2; |
| 6709 | } |
| 6710 | |
| 6711 | /** |
| 6712 | * Logs file operation stats. Call this when a file operation has completed. |
| 6713 | * |
| 6714 | * Logged from: |
| 6715 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6716 | */ |
| 6717 | message DocsUIFileOperationReported { |
| 6718 | optional android.stats.docsui.Provider provider = 1; |
| 6719 | optional android.stats.docsui.FileOperation file_op = 2; |
| 6720 | } |
| 6721 | |
| 6722 | /** |
| 6723 | * Logs file operation stats. Call this when a copy/move operation has completed with a specific |
| 6724 | * mode. |
| 6725 | * |
| 6726 | * Logged from: |
| 6727 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6728 | */ |
| 6729 | message DocsUIFileOperationCopyMoveModeReported { |
| 6730 | optional android.stats.docsui.FileOperation file_op = 1; |
| 6731 | optional android.stats.docsui.CopyMoveOpMode mode = 2; |
| 6732 | } |
| 6733 | |
| 6734 | |
| 6735 | /** |
| 6736 | * Logs file sub operation stats. Call this when a file operation has failed. |
| 6737 | * |
| 6738 | * Logged from: |
| 6739 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6740 | */ |
| 6741 | message DocsUIFileOperationFailureReported { |
| 6742 | optional android.stats.docsui.Authority authority = 1; |
| 6743 | optional android.stats.docsui.SubFileOperation sub_op = 2; |
| 6744 | } |
| 6745 | |
| 6746 | /** |
| 6747 | * Logs the cancellation of a file operation. Call this when a job is canceled |
| 6748 | * |
| 6749 | * Logged from: |
| 6750 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6751 | */ |
| 6752 | message DocsUIFileOperationCanceledReported { |
| 6753 | optional android.stats.docsui.FileOperation file_op = 1; |
| 6754 | } |
| 6755 | |
| 6756 | /** |
| 6757 | * Logs startup time in milliseconds. |
| 6758 | * |
| 6759 | * Logged from: |
| 6760 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6761 | */ |
| 6762 | message DocsUIStartupMsReported { |
| 6763 | optional int32 startup_millis = 1; |
| 6764 | } |
| 6765 | |
| 6766 | /** |
| 6767 | * Logs the action that was started by user. |
| 6768 | * |
| 6769 | * Logged from: |
| 6770 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6771 | */ |
| 6772 | message DocsUIUserActionReported { |
| 6773 | optional android.stats.docsui.UserAction action = 1; |
| 6774 | } |
| 6775 | |
| 6776 | /** |
| 6777 | * Logs the invalid type when invalid scoped access is requested. |
| 6778 | * |
| 6779 | * Logged from: |
| 6780 | * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java |
| 6781 | */ |
| 6782 | message DocsUIInvalidScopedAccessRequestReported { |
| 6783 | optional android.stats.docsui.InvalidScopedAccess type = 1; |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 6784 | } |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6785 | |
| 6786 | /** |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 6787 | * Logs the package name that launches docsui picker mode. |
| 6788 | * |
| 6789 | * Logged from: |
| 6790 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6791 | */ |
| 6792 | message DocsUIPickerLaunchedFromReported { |
| 6793 | optional string package_name = 1; |
| 6794 | } |
| 6795 | |
| 6796 | /** |
| 6797 | * Logs the search type. |
| 6798 | * |
| 6799 | * Logged from: |
| 6800 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6801 | */ |
| 6802 | message DocsUISearchTypeReported { |
| 6803 | optional android.stats.docsui.SearchType search_type = 1; |
| 6804 | } |
| 6805 | |
| 6806 | /** |
| 6807 | * Logs the search mode. |
| 6808 | * |
| 6809 | * Logged from: |
| 6810 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6811 | */ |
| 6812 | message DocsUISearchModeReported { |
| 6813 | optional android.stats.docsui.SearchMode search_mode = 1; |
| 6814 | } |
| 6815 | |
| 6816 | /** |
| 6817 | * Logs the pick result information. |
| 6818 | * |
| 6819 | * Logged from: |
| 6820 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6821 | */ |
| 6822 | message DocsUIPickResultReported { |
| 6823 | optional int32 total_action_count = 1; |
| 6824 | optional int64 duration_millis = 2; |
| 6825 | optional int32 file_count= 3; |
| 6826 | optional bool is_searching = 4; |
| 6827 | optional android.stats.docsui.Root picked_from = 5; |
| 6828 | optional android.stats.docsui.MimeType mime_type = 6; |
| 6829 | optional int32 repeatedly_pick_times = 7; |
| 6830 | } |
| 6831 | |
Diksha Gohlyan | b96b2f4 | 2020-04-30 09:20:42 -0700 | [diff] [blame] | 6832 | /** Logs the drag and drop of files. |
| 6833 | |
| 6834 | * Logged from: |
| 6835 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6836 | */ |
| 6837 | message DocsUIDragAndDropReported { |
| 6838 | optional bool drag_initiated_from_docsui = 1; |
| 6839 | } |
| 6840 | |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 6841 | /** |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6842 | * Logs when an app's memory is compacted. |
| 6843 | * |
| 6844 | * Logged from: |
| 6845 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 6846 | */ |
| 6847 | message AppCompacted { |
| 6848 | // The pid of the process being compacted. |
| 6849 | optional int32 pid = 1; |
| 6850 | |
| 6851 | // The name of the process being compacted. |
| 6852 | optional string process_name = 2; |
| 6853 | |
| 6854 | // The type of compaction. |
| 6855 | enum Action { |
| 6856 | UNKNOWN = 0; |
| 6857 | SOME = 1; |
| 6858 | FULL = 2; |
Ben Murdoch | 35c1420 | 2019-04-09 11:00:53 +0100 | [diff] [blame] | 6859 | PERSISTENT = 3; |
| 6860 | BFGS = 4; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6861 | } |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 6862 | optional Action action = 3; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6863 | |
| 6864 | // Total RSS in kilobytes consumed by the process prior to compaction. |
| 6865 | optional int64 before_rss_total_kilobytes = 4; |
| 6866 | |
| 6867 | // File RSS in kilobytes consumed by the process prior to compaction. |
| 6868 | optional int64 before_rss_file_kilobytes = 5; |
| 6869 | |
| 6870 | // Anonymous RSS in kilobytes consumed by the process prior to compaction. |
| 6871 | optional int64 before_rss_anon_kilobytes = 6; |
| 6872 | |
| 6873 | // Swap in kilobytes consumed by the process prior to compaction. |
| 6874 | optional int64 before_swap_kilobytes = 7; |
| 6875 | |
| 6876 | // Total RSS in kilobytes consumed by the process after compaction. |
| 6877 | optional int64 after_rss_total_kilobytes = 8; |
| 6878 | |
| 6879 | // File RSS in kilobytes consumed by the process after compaction. |
| 6880 | optional int64 after_rss_file_kilobytes = 9; |
| 6881 | |
| 6882 | // Anonymous RSS in kilobytes consumed by the process after compaction. |
| 6883 | optional int64 after_rss_anon_kilobytes = 10; |
| 6884 | |
| 6885 | // Swap in kilobytes consumed by the process after compaction. |
| 6886 | optional int64 after_swap_kilobytes = 11; |
| 6887 | |
| 6888 | // The time taken to perform compaction in milliseconds. |
| 6889 | optional int64 time_to_compact_millis = 12; |
| 6890 | |
| 6891 | // The last compaction action performed for this app. |
| 6892 | optional Action last_action = 13; |
| 6893 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 6894 | // The last time that compaction was attempted on this process in milliseconds |
| 6895 | // since boot, not including sleep (see SystemClock.uptimeMillis()). |
| 6896 | optional int64 last_compact_timestamp_ms_since_boot = 14; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6897 | |
Ben Murdoch | 885c21b | 2019-03-15 18:02:04 +0000 | [diff] [blame] | 6898 | // 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] | 6899 | optional int32 oom_score_adj = 15; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6900 | |
| 6901 | // The process state at the time of compaction. |
| 6902 | optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; |
Ben Murdoch | fdc5593 | 2019-01-30 10:43:15 +0000 | [diff] [blame] | 6903 | |
| 6904 | // Free ZRAM in kilobytes before compaction. |
| 6905 | optional int64 before_zram_free_kilobytes = 17; |
| 6906 | |
| 6907 | // Free ZRAM in kilobytes after compaction. |
| 6908 | optional int64 after_zram_free_kilobytes = 18; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6909 | } |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6910 | |
| 6911 | /** |
lifr | 8abf3a7 | 2020-06-13 11:24:34 +0800 | [diff] [blame] | 6912 | * Logs when a Tethering event occurs. |
| 6913 | * |
| 6914 | */ |
| 6915 | message NetworkTetheringReported { |
| 6916 | // tethering error code |
| 6917 | optional android.stats.connectivity.ErrorCode error_code = 1; |
| 6918 | |
| 6919 | // tethering downstream type |
| 6920 | optional android.stats.connectivity.DownstreamType downstream_type = 2; |
| 6921 | |
| 6922 | // transport type of upstream network |
| 6923 | optional android.stats.connectivity.UpstreamType upstream_type = 3; |
| 6924 | |
| 6925 | // The user type of Tethering |
| 6926 | optional android.stats.connectivity.UserType user_type= 4; |
| 6927 | } |
| 6928 | |
| 6929 | /** |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6930 | * Logs a DNS lookup operation initiated by the system resolver on behalf of an application |
| 6931 | * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). |
| 6932 | * |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6933 | * The NetworkDnsEventReported message represents the entire lookup operation, which may |
| 6934 | * result one or more queries to the recursive DNS resolvers. Those are individually logged |
| 6935 | * in DnsQueryEvents to enable computing error rates and network latency and timeouts |
| 6936 | * broken up by query type, transport, network interface, etc. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6937 | */ |
| 6938 | message NetworkDnsEventReported { |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6939 | optional android.stats.dnsresolver.EventType event_type = 1; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6940 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6941 | optional android.stats.dnsresolver.ReturnCode return_code = 2; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6942 | |
| 6943 | // The latency in microseconds of the entire DNS lookup operation. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6944 | optional int32 latency_micros = 3; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6945 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6946 | // Only valid for event_type = EVENT_GETADDRINFO. |
| 6947 | optional int32 hints_ai_flags = 4; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6948 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6949 | // Flags passed to android_res_nsend() defined in multinetwork.h |
| 6950 | // Only valid for event_type = EVENT_RESNSEND. |
| 6951 | optional int32 res_nsend_flags = 5; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6952 | |
lifr | ad9becc | 2019-05-20 11:04:41 +0800 | [diff] [blame] | 6953 | optional android.stats.dnsresolver.NetworkType network_type = 6; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6954 | |
| 6955 | // The DNS over TLS mode on a specific netId. |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6956 | optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6957 | |
| 6958 | // Additional pass-through fields opaque to statsd. |
| 6959 | // The DNS resolver Mainline module can add new fields here without requiring an OS update. |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6960 | optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; |
lifr | 2b9fab7 | 2019-07-20 15:28:28 +0800 | [diff] [blame] | 6961 | |
| 6962 | // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom. |
| 6963 | optional int32 sampling_rate_denom = 9; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6964 | } |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 6965 | |
| 6966 | /** |
lifr | 1cc318d | 2020-03-19 21:58:30 +0800 | [diff] [blame] | 6967 | * logs the CapportApiData info |
| 6968 | * Logged from: |
| 6969 | * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
| 6970 | */ |
| 6971 | message CapportApiData { |
| 6972 | // The TTL of the network connection provided by captive portal |
| 6973 | optional int32 remaining_ttl_secs = 1; |
| 6974 | |
| 6975 | // The limit traffic data of the network connection provided by captive portal |
| 6976 | optional int32 remaining_bytes = 2; |
| 6977 | |
| 6978 | // Is portal url option included in the DHCP packet (Yes, No) |
| 6979 | optional bool has_portal_url = 3; |
| 6980 | |
| 6981 | // Is venue info (e.g. store info, maps, flight status) included (Yes, No) |
| 6982 | optional bool has_venue_info = 4; |
| 6983 | } |
| 6984 | |
| 6985 | /** |
| 6986 | * logs a network Probe Event |
| 6987 | * Logged from: |
| 6988 | * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
| 6989 | */ |
| 6990 | message ProbeEvent { |
| 6991 | // The probe type (http or https, or captive portal API...) |
| 6992 | optional android.stats.connectivity.ProbeType probe_type = 1; |
| 6993 | |
| 6994 | // The latency in microseconds of the probe event |
| 6995 | optional int32 latency_micros = 2; |
| 6996 | |
| 6997 | // The result of the probe event |
| 6998 | optional android.stats.connectivity.ProbeResult probe_result = 3; |
| 6999 | |
| 7000 | // The CaptivePortal API info |
| 7001 | optional CapportApiData capport_api_data = 4; |
| 7002 | } |
| 7003 | |
| 7004 | /** |
| 7005 | * log each ProbeEvent in ProbeEvents |
| 7006 | * Logged from: |
| 7007 | * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
| 7008 | */ |
| 7009 | message ProbeEvents { |
| 7010 | // Record probe event during the validation |
| 7011 | repeated ProbeEvent probe_event = 1; |
| 7012 | } |
| 7013 | |
| 7014 | /** |
| 7015 | * The DHCP (Dynamic Host Configuration Protocol) session info |
| 7016 | * Logged from: |
| 7017 | * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java |
| 7018 | */ |
| 7019 | message DhcpSession { |
| 7020 | // The DHCP Feature(s) enabled in this session |
| 7021 | repeated android.stats.connectivity.DhcpFeature used_features = 1; |
| 7022 | |
| 7023 | // The discover packet (re)transmit count |
| 7024 | optional int32 discover_count = 2; |
| 7025 | |
| 7026 | // The request packet (re)transmit count |
| 7027 | optional int32 request_count = 3; |
| 7028 | |
| 7029 | // The IPv4 address conflict count |
| 7030 | // (only be meaningful when duplicate address detection is enabled) |
| 7031 | optional int32 conflict_count = 4; |
| 7032 | |
| 7033 | // The DHCP packet parsing error code in this session |
| 7034 | // (defined in android.net.metrics.DhcpErrorEvent) |
| 7035 | repeated android.stats.connectivity.DhcpErrorCode error_code = 5; |
| 7036 | |
| 7037 | // The result of DHCP hostname transliteration |
| 7038 | optional android.stats.connectivity.HostnameTransResult ht_result = 6; |
| 7039 | } |
| 7040 | |
| 7041 | /** |
| 7042 | * Logs Network IP provisioning event |
| 7043 | * Logged from: |
| 7044 | * packages/modules/NetworkStack/src/com/android/networkstack/metrics/NetworkIpProvisioningMetrics.java |
| 7045 | */ |
| 7046 | message NetworkIpProvisioningReported { |
| 7047 | // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) |
| 7048 | optional android.stats.connectivity.TransportType transport_type = 1; |
| 7049 | |
| 7050 | // The latency in microseconds of IP Provisioning over IPV4 |
| 7051 | optional int32 ipv4_latency_micros = 2; |
| 7052 | |
| 7053 | // The latency in microseconds of IP Provisioning over IPV6 |
| 7054 | optional int32 ipv6_latency_micros = 3; |
| 7055 | |
| 7056 | // The time duration between provisioning start and end (success or failure) |
| 7057 | optional int64 provisioning_duration_micros = 4; |
| 7058 | |
| 7059 | // The specific disconnect reason for this IP provisioning |
| 7060 | optional android.stats.connectivity.DisconnectCode disconnect_code = 5; |
| 7061 | |
| 7062 | // Log DHCP session info (Only valid for IPv4) |
| 7063 | optional DhcpSession dhcp_session = 6 [(log_mode) = MODE_BYTES]; |
| 7064 | |
| 7065 | // The random number between 0 ~ 999 for sampling |
| 7066 | optional int32 random_number = 7; |
| 7067 | } |
| 7068 | |
| 7069 | /** |
| 7070 | * Logs Network DHCP Renew event |
| 7071 | * Logged from: |
| 7072 | * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java |
| 7073 | */ |
| 7074 | message NetworkDhcpRenewReported { |
| 7075 | // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) |
| 7076 | optional android.stats.connectivity.TransportType transport_type = 1; |
| 7077 | |
| 7078 | // The request packet (re)transmit count |
| 7079 | optional int32 request_count = 2; |
| 7080 | |
| 7081 | // The latency in microseconds of DHCP Renew |
| 7082 | optional int32 latency_micros = 3; |
| 7083 | |
| 7084 | // The DHCP error code is defined in android.net.metrics.DhcpErrorEvent |
| 7085 | optional android.stats.connectivity.DhcpErrorCode error_code = 4; |
| 7086 | |
| 7087 | // The result of DHCP renew |
| 7088 | optional android.stats.connectivity.DhcpRenewResult renew_result = 5; |
| 7089 | |
| 7090 | // The random number between 0 ~ 999 for sampling |
| 7091 | optional int32 random_number = 6; |
| 7092 | } |
| 7093 | |
| 7094 | /** |
| 7095 | * Logs Network Validation event |
| 7096 | * Logged from: |
| 7097 | * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
| 7098 | */ |
| 7099 | message NetworkValidationReported { |
| 7100 | // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) |
| 7101 | optional android.stats.connectivity.TransportType transport_type = 1; |
| 7102 | |
| 7103 | // Record each probe event |
| 7104 | optional ProbeEvents probe_events = 2 [(log_mode) = MODE_BYTES]; |
| 7105 | |
| 7106 | // The result of the network validation |
| 7107 | optional android.stats.connectivity.ValidationResult validation_result = 3; |
| 7108 | |
| 7109 | // The latency in microseconds of network validation |
| 7110 | optional int32 latency_micros = 4; |
| 7111 | |
| 7112 | // The validation index (the first validation attempt or second, third...) |
| 7113 | optional int32 validation_index = 5; |
| 7114 | |
| 7115 | // The random number between 0 ~ 999 for sampling |
| 7116 | optional int32 random_number = 6; |
| 7117 | } |
| 7118 | |
| 7119 | /** |
| 7120 | * Logs NetworkStack Quirk event |
| 7121 | * Logged from: |
| 7122 | * packages/modules/NetworkStack/src/com/android/networkstack/ |
| 7123 | */ |
| 7124 | message NetworkStackQuirkReported { |
| 7125 | // Transport type (WIFI, CELLULAR, BLUETOOTH, ..) |
| 7126 | optional android.stats.connectivity.TransportType transport_type = 1; |
| 7127 | |
| 7128 | // Record each Quirk event |
| 7129 | optional android.stats.connectivity.NetworkQuirkEvent event = 2; |
| 7130 | } |
| 7131 | |
| 7132 | /** |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 7133 | * Logs when a data stall event occurs. |
| 7134 | * |
| 7135 | * Log from: |
Chiachang Wang | 0aa2cd6 | 2020-05-21 07:03:23 +0000 | [diff] [blame] | 7136 | * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 7137 | */ |
| 7138 | message DataStallEvent { |
| 7139 | // Data stall evaluation type. |
Chiachang Wang | 0aa2cd6 | 2020-05-21 07:03:23 +0000 | [diff] [blame] | 7140 | // See packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 7141 | // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. |
| 7142 | optional int32 evaluation_type = 1; |
| 7143 | // See definition in data_stall_event.proto. |
| 7144 | optional com.android.server.connectivity.ProbeResult validation_result = 2; |
| 7145 | // See definition in data_stall_event.proto. |
| 7146 | optional android.net.NetworkCapabilitiesProto.Transport network_type = 3; |
| 7147 | // See definition in data_stall_event.proto. |
| 7148 | optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; |
| 7149 | // See definition in data_stall_event.proto. |
| 7150 | optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; |
| 7151 | // See definition in data_stall_event.proto. |
| 7152 | optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; |
Chiachang Wang | 0aa2cd6 | 2020-05-21 07:03:23 +0000 | [diff] [blame] | 7153 | // The tcp packets fail rate from the latest tcp polling. |
| 7154 | optional int32 tcp_fail_rate = 7; |
| 7155 | // Number of packets sent since the last received packet. |
| 7156 | optional int32 tcp_sent_since_last_recv = 8; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 7157 | } |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 7158 | |
| 7159 | /* |
| 7160 | * Logs when RescueParty resets some set of experiment flags. |
| 7161 | * |
| 7162 | * Logged from: |
| 7163 | * frameworks/base/services/core/java/com/android/server/RescueParty.java |
| 7164 | */ |
| 7165 | message RescuePartyResetReported { |
| 7166 | // The rescue level of this reset. A value of 0 indicates missing or unknown level information. |
| 7167 | optional int32 rescue_level = 1; |
| 7168 | } |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 7169 | |
| 7170 | /** |
| 7171 | * Logs when signed config is received from an APK, and if that config was applied successfully. |
| 7172 | * Logged from: |
| 7173 | * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java |
| 7174 | */ |
| 7175 | message SignedConfigReported { |
| 7176 | enum Type { |
| 7177 | UNKNOWN_TYPE = 0; |
| 7178 | GLOBAL_SETTINGS = 1; |
| 7179 | } |
| 7180 | optional Type type = 1; |
| 7181 | |
| 7182 | // The final status of the signed config received. |
| 7183 | enum Status { |
| 7184 | UNKNOWN_STATUS = 0; |
| 7185 | APPLIED = 1; |
| 7186 | BASE64_FAILURE_CONFIG = 2; |
| 7187 | BASE64_FAILURE_SIGNATURE = 3; |
| 7188 | SECURITY_EXCEPTION = 4; |
| 7189 | INVALID_CONFIG = 5; |
| 7190 | OLD_CONFIG = 6; |
| 7191 | SIGNATURE_CHECK_FAILED = 7; |
| 7192 | NOT_APPLICABLE = 8; |
Mathew Inwood | 610d096 | 2019-01-15 11:50:28 +0000 | [diff] [blame] | 7193 | SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 7194 | } |
| 7195 | optional Status status = 2; |
| 7196 | |
| 7197 | // The version of the signed config processed. |
| 7198 | optional int32 version = 3; |
| 7199 | |
| 7200 | // The package name that the config was extracted from. |
| 7201 | optional string from_package = 4; |
| 7202 | |
| 7203 | enum Key { |
| 7204 | NO_KEY = 0; |
| 7205 | DEBUG = 1; |
| 7206 | PRODUCTION = 2; |
| 7207 | } |
| 7208 | // Which key was used to verify the config. |
| 7209 | optional Key verified_with = 5; |
| 7210 | } |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7211 | |
| 7212 | /* |
| 7213 | * Logs GNSS Network-Initiated (NI) location events. |
| 7214 | * |
| 7215 | * Logged from: |
| 7216 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 7217 | */ |
| 7218 | message GnssNiEventReported { |
| 7219 | // The type of GnssNiEvent. |
| 7220 | enum EventType { |
| 7221 | UNKNOWN = 0; |
| 7222 | NI_REQUEST = 1; |
| 7223 | NI_RESPONSE = 2; |
| 7224 | } |
| 7225 | optional EventType event_type = 1; |
| 7226 | |
| 7227 | // An ID generated by HAL to associate NI notifications and UI responses. |
| 7228 | optional int32 notification_id = 2; |
| 7229 | |
| 7230 | // 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] | 7231 | optional android.server.location.GnssNiType ni_type = 3; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7232 | |
| 7233 | // NI requires notification. |
| 7234 | optional bool need_notify = 4; |
| 7235 | |
| 7236 | // NI requires verification. |
| 7237 | optional bool need_verify = 5; |
| 7238 | |
| 7239 | // NI requires privacy override, no notification/minimal trace. |
| 7240 | optional bool privacy_override = 6; |
| 7241 | |
| 7242 | // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in |
| 7243 | // seconds. |
| 7244 | optional int32 timeout = 7; |
| 7245 | |
| 7246 | // Default response when timeout. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 7247 | optional android.server.location.GnssUserResponseType default_response = 8; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7248 | |
| 7249 | // String representing the requester of the network inititated location request. |
| 7250 | optional string requestor_id = 9; |
| 7251 | |
| 7252 | // Notification message text string representing the service(for eg. SUPL-service) who sent the |
| 7253 | // network initiated location request. |
| 7254 | optional string text = 10; |
| 7255 | |
| 7256 | // requestorId decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 7257 | optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7258 | |
| 7259 | // Notification message text decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 7260 | optional android.server.location.GnssNiEncodingType text_encoding = 12; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7261 | |
| 7262 | // True if SUPL ES is enabled. |
| 7263 | optional bool is_supl_es_enabled = 13; |
| 7264 | |
| 7265 | // True if GNSS location is enabled. |
| 7266 | optional bool is_location_enabled = 14; |
| 7267 | |
| 7268 | // GNSS NI responses which define the response in NI structures. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 7269 | optional android.server.location.GnssUserResponseType user_response = 15; |
| 7270 | } |
| 7271 | |
| 7272 | /** |
| 7273 | * Logs GNSS non-framework (NFW) location notification. |
| 7274 | * |
| 7275 | * Logged from: |
| 7276 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 7277 | */ |
| 7278 | message GnssNfwNotificationReported { |
| 7279 | // Package name of the Android proxy application representing the non-framework entity that |
| 7280 | // requested location. Set to empty string if unknown. |
| 7281 | optional string proxy_app_package_name = 1; |
| 7282 | |
| 7283 | // Protocol stack that initiated the non-framework location request. |
| 7284 | optional android.server.location.NfwProtocolStack protocol_stack = 2; |
| 7285 | |
| 7286 | // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, |
| 7287 | // set to empty string. This field is opaque to the framework and used for logging purposes. |
| 7288 | optional string other_protocol_stack_name = 3; |
| 7289 | |
| 7290 | // Source initiating/receiving the location information. |
| 7291 | optional android.server.location.NfwRequestor requestor = 4; |
| 7292 | |
| 7293 | // Identity of the endpoint receiving the location information. For example, carrier name, OEM |
| 7294 | // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework |
| 7295 | // and used for logging purposes. |
| 7296 | optional string requestor_id = 5; |
| 7297 | |
| 7298 | // Indicates whether location information was provided for this request. |
| 7299 | optional android.server.location.NfwResponseType response_type = 6; |
| 7300 | |
| 7301 | // True if the device is in user initiated emergency session. |
| 7302 | optional bool in_emergency_mode = 7; |
| 7303 | |
| 7304 | // True if cached location is provided. |
| 7305 | optional bool is_cached_location = 8; |
| 7306 | |
| 7307 | // True if proxy app permission mismatch between framework and GNSS HAL. |
| 7308 | optional bool is_permission_mismatched = 9; |
| 7309 | } |
| 7310 | |
| 7311 | /** |
| 7312 | * Logs GNSS configuration as defined in IGnssConfiguration.hal. |
| 7313 | * |
| 7314 | * Logged from: |
| 7315 | * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java |
| 7316 | */ |
| 7317 | message GnssConfigurationReported { |
| 7318 | // SUPL host name. |
| 7319 | optional string supl_host = 1; |
| 7320 | |
| 7321 | // SUPL port number. |
| 7322 | optional int32 supl_port = 2; |
| 7323 | |
| 7324 | // C2K host name. |
| 7325 | optional string c2k_host = 3; |
| 7326 | |
| 7327 | // C2K port number. |
| 7328 | optional int32 c2k_port = 4; |
| 7329 | |
| 7330 | // The SUPL version requested by Carrier. |
| 7331 | optional int32 supl_ver = 5; |
| 7332 | |
| 7333 | // The SUPL mode. |
| 7334 | optional android.server.location.SuplMode supl_mode = 6; |
| 7335 | |
| 7336 | // True if NI emergency SUPL restrictions is enabled. |
| 7337 | optional bool supl_es = 7; |
| 7338 | |
| 7339 | // LTE Positioning Profile settings |
| 7340 | optional android.server.location.LppProfile lpp_profile = 8; |
| 7341 | |
| 7342 | // Positioning protocol on A-Glonass system. |
| 7343 | optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; |
| 7344 | |
| 7345 | // True if emergency PDN is used. Otherwise, regular PDN is used. |
| 7346 | optional bool use_emergency_pdn_for_emergency_supl= 10; |
| 7347 | |
| 7348 | // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. |
| 7349 | optional android.server.location.GpsLock gps_lock = 11; |
| 7350 | |
| 7351 | // Number of seconds to extend the emergency session duration post emergency call. |
| 7352 | optional int32 es_extension_sec = 12; |
| 7353 | |
| 7354 | // The full list of package names of proxy Android applications representing the non-framework |
| 7355 | // location access entities (on/off the device) for which the framework user has granted |
| 7356 | // non-framework location access permission. The package names are concatenated in one string |
| 7357 | // with spaces as separators. |
| 7358 | optional string enabled_proxy_app_package_name_list = 13; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 7359 | } |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7360 | |
| 7361 | /** |
| 7362 | * Logs when a NFC device's error occurred. |
| 7363 | * Logged from: |
| 7364 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 7365 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java |
| 7366 | */ |
| 7367 | message NfcErrorOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7368 | enum Type { |
| 7369 | UNKNOWN = 0; |
| 7370 | CMD_TIMEOUT = 1; |
| 7371 | ERROR_NOTIFICATION = 2; |
| 7372 | AID_OVERFLOW = 3; |
| 7373 | } |
| 7374 | optional Type type = 1; |
| 7375 | // If it's nci cmd timeout, log the timeout command. |
| 7376 | optional uint32 nci_cmd = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7377 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7378 | optional uint32 error_ntf_status_code = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7379 | } |
| 7380 | |
| 7381 | /** |
| 7382 | * Logs when a NFC device's state changed event |
| 7383 | * Logged from: |
| 7384 | * packages/apps/Nfc/src/com/android/nfc/NfcService.java |
| 7385 | */ |
| 7386 | message NfcStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7387 | enum State { |
| 7388 | UNKNOWN = 0; |
| 7389 | OFF = 1; |
| 7390 | ON = 2; |
| 7391 | ON_LOCKED = 3; // Secure Nfc enabled. |
| 7392 | CRASH_RESTART = 4; // NfcService watchdog timeout restart. |
| 7393 | } |
| 7394 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7395 | } |
| 7396 | |
| 7397 | /** |
| 7398 | * Logs when a NFC Beam Transaction occurred. |
| 7399 | * Logged from: |
| 7400 | * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java |
| 7401 | */ |
| 7402 | message NfcBeamOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7403 | enum Operation { |
| 7404 | UNKNOWN = 0; |
| 7405 | SEND = 1; |
| 7406 | RECEIVE = 2; |
| 7407 | } |
| 7408 | optional Operation operation = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7409 | } |
| 7410 | |
| 7411 | /** |
| 7412 | * Logs when a NFC Card Emulation Transaction occurred. |
| 7413 | * Logged from: |
| 7414 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java |
| 7415 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java |
| 7416 | */ |
| 7417 | message NfcCardemulationOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7418 | enum Category { |
| 7419 | UNKNOWN = 0; |
| 7420 | HCE_PAYMENT = 1; |
| 7421 | HCE_OTHER = 2; |
| 7422 | OFFHOST = 3; |
| 7423 | } |
| 7424 | // Transaction belongs to HCE payment or HCE other category, or offhost. |
| 7425 | optional Category category = 1; |
| 7426 | // SeName from transaction: SIMx, eSEx, HCE, HCEF. |
| 7427 | optional string se_name = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7428 | } |
| 7429 | |
| 7430 | /** |
| 7431 | * Logs when a NFC Tag event occurred. |
| 7432 | * Logged from: |
| 7433 | * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java |
| 7434 | */ |
| 7435 | message NfcTagOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7436 | enum Type { |
| 7437 | UNKNOWN = 0; |
| 7438 | URL = 1; |
| 7439 | BT_PAIRING = 2; |
| 7440 | PROVISION = 3; |
| 7441 | WIFI_CONNECT = 4; |
| 7442 | APP_LAUNCH = 5; |
| 7443 | OTHERS = 6; |
| 7444 | } |
| 7445 | optional Type type = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7446 | } |
| 7447 | |
| 7448 | /** |
| 7449 | * Logs when Hce transaction triggered |
| 7450 | * Logged from: |
| 7451 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 7452 | */ |
| 7453 | message NfcHceTransactionOccurred { |
| 7454 | // The latency period(in microseconds) it took for the first HCE data |
| 7455 | // exchange. |
| 7456 | optional uint32 latency_micros = 1; |
| 7457 | } |
| 7458 | |
| 7459 | /** |
| 7460 | * Logs when SecureElement state event changed |
| 7461 | * Logged from: |
| 7462 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 7463 | */ |
| 7464 | message SeStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7465 | enum State { |
| 7466 | UNKNOWN = 0; |
| 7467 | INITIALIZED = 1; |
| 7468 | DISCONNECTED = 2; |
| 7469 | CONNECTED = 3; |
| 7470 | HALCRASH = 4; |
| 7471 | } |
| 7472 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7473 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7474 | optional string state_change_reason = 2; |
| 7475 | // SIMx or eSEx. |
| 7476 | optional string terminal = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7477 | } |
| 7478 | |
| 7479 | /** |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 7480 | * Information about a permission grant request |
| 7481 | */ |
| 7482 | message PermissionGrantRequestResultReported { |
| 7483 | // unique value identifying an API call. A API call might result in multiple of these atoms |
| 7484 | optional int64 request_id = 1; |
| 7485 | |
| 7486 | // UID of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 7487 | optional int32 uid = 2 [(is_uid) = true]; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 7488 | |
| 7489 | // Name of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 7490 | optional string package_name = 3; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 7491 | |
| 7492 | // The permission to be granted |
| 7493 | optional string permission_name = 4; |
| 7494 | |
| 7495 | // If the permission was explicitly requested via the API or added by the system |
| 7496 | optional bool is_implicit = 5; |
| 7497 | |
| 7498 | enum Result { |
| 7499 | UNDEFINED = 0; |
| 7500 | // permission request was ignored |
| 7501 | IGNORED = 1; |
| 7502 | // permission request was ignored because it was user fixed |
| 7503 | IGNORED_USER_FIXED = 2; |
| 7504 | // permission request was ignored because it was policy fixed |
| 7505 | IGNORED_POLICY_FIXED = 3; |
| 7506 | // permission was granted by user action |
| 7507 | USER_GRANTED = 4; |
| 7508 | // permission was automatically granted |
| 7509 | AUTO_GRANTED = 5; |
| 7510 | // permission was denied by user action |
| 7511 | USER_DENIED = 6; |
| 7512 | // permission was denied with prejudice by the user |
| 7513 | USER_DENIED_WITH_PREJUDICE = 7; |
| 7514 | // permission was automatically denied |
| 7515 | AUTO_DENIED = 8; |
Svet Ganov | d8eb8b2 | 2019-04-05 18:52:08 -0700 | [diff] [blame] | 7516 | // permission request was ignored because permission is restricted |
| 7517 | IGNORED_RESTRICTED_PERMISSION = 9; |
Stanislav Zholnin | 066aefb | 2019-10-17 18:40:33 +0100 | [diff] [blame] | 7518 | // one time permission was granted by user action |
| 7519 | USER_GRANTED_ONE_TIME = 10; |
Stanislav Zholnin | 8fde4fb | 2019-12-06 19:06:08 +0000 | [diff] [blame] | 7520 | // user ignored request by leaving the request screen without choosing any option |
| 7521 | USER_IGNORED = 11; |
Evan Severson | 7c1cc8a | 2019-12-17 14:36:17 -0800 | [diff] [blame] | 7522 | // user granted the permission after being linked to settings |
| 7523 | USER_GRANTED_IN_SETTINGS = 12; |
| 7524 | // user denied the permission after being linked to settings |
| 7525 | USER_DENIED_IN_SETTINGS = 13; |
| 7526 | // user denied the permission with prejudice after being linked to settings |
| 7527 | USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14; |
| 7528 | // permission was automatically revoked after one-time permission expired |
| 7529 | AUTO_ONE_TIME_PERMISSION_REVOKED = 15; |
Eugene Susla | 6db4be5 | 2020-01-09 11:02:09 -0800 | [diff] [blame] | 7530 | // permission was automatically revoked for unused app |
| 7531 | AUTO_UNUSED_APP_PERMISSION_REVOKED = 16; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 7532 | } |
| 7533 | // The result of the permission grant |
| 7534 | optional Result result = 6; |
| 7535 | } |
| 7536 | |
| 7537 | /** |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7538 | * Logs when Omapi API used |
| 7539 | * Logged from: |
| 7540 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 7541 | */ |
| 7542 | message SeOmapiReported { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7543 | enum Operation { |
| 7544 | UNKNOWN = 0; |
| 7545 | OPEN_CHANNEL = 1; |
| 7546 | } |
| 7547 | optional Operation operation = 1; |
| 7548 | // SIMx or eSEx. |
| 7549 | optional string terminal = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7550 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7551 | optional string package_name = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 7552 | } |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 7553 | |
| 7554 | /** |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 7555 | * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. |
| 7556 | * The dispatch latency is the dispatchClockTime - enqueueClockTime. |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 7557 | * Logged from: |
| 7558 | * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java |
| 7559 | */ |
| 7560 | message BroadcastDispatchLatencyReported { |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 7561 | optional int64 dispatch_latency_millis = 1; |
| 7562 | } |
| 7563 | |
| 7564 | /** |
| 7565 | * Logs AttentionManagerService attention check result. |
| 7566 | * |
| 7567 | * Logged from: |
| 7568 | * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java |
| 7569 | */ |
| 7570 | message AttentionManagerServiceResultReported { |
| 7571 | // See core/java/android/service/attention/AttentionService.java |
| 7572 | enum AttentionCheckResult { |
| 7573 | UNKNOWN = 20; |
| 7574 | ATTENTION_SUCCESS_ABSENT = 0; |
| 7575 | ATTENTION_SUCCESS_PRESENT = 1; |
Alex Salo | dd028ba | 2019-04-17 13:33:49 -0700 | [diff] [blame] | 7576 | ATTENTION_FAILURE_UNKNOWN = 2; |
| 7577 | ATTENTION_FAILURE_CANCELLED = 3; |
| 7578 | ATTENTION_FAILURE_PREEMPTED = 4; |
| 7579 | ATTENTION_FAILURE_TIMED_OUT = 5; |
| 7580 | ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 7581 | } |
| 7582 | optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 7583 | } |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 7584 | |
| 7585 | /** |
| 7586 | * Logs when an adb connection changes state. |
| 7587 | * |
| 7588 | * Logged from: |
| 7589 | * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java |
| 7590 | */ |
| 7591 | message AdbConnectionChanged { |
| 7592 | // The last time this system connected via adb, or 0 if the 'always allow' option was not |
| 7593 | // previously selected for this system. |
| 7594 | optional int64 last_connection_time_millis = 1; |
| 7595 | |
| 7596 | // The time in ms within which a subsequent connection from an 'always allow' system is allowed |
| 7597 | // to reconnect via adb without user interaction. |
| 7598 | optional int64 auth_window_millis = 2; |
| 7599 | |
| 7600 | // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto. |
| 7601 | optional android.debug.AdbConnectionStateEnum state = 3; |
| 7602 | |
| 7603 | // True if the 'always allow' option was selected for this system. |
| 7604 | optional bool always_allow = 4; |
| 7605 | } |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 7606 | |
| 7607 | /* |
| 7608 | * Logs the reported speech DSP status. |
| 7609 | * |
| 7610 | * Logged from: |
| 7611 | * Vendor audio implementation. |
| 7612 | */ |
| 7613 | message SpeechDspStatReported { |
| 7614 | // The total Speech DSP uptime in milliseconds. |
| 7615 | optional int32 total_uptime_millis = 1; |
| 7616 | // The total Speech DSP downtime in milliseconds. |
| 7617 | optional int32 total_downtime_millis = 2; |
| 7618 | optional int32 total_crash_count = 3; |
| 7619 | optional int32 total_recover_count = 4; |
| 7620 | } |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 7621 | |
| 7622 | /** |
| 7623 | * Logs USB connector contaminant status. |
| 7624 | * |
| 7625 | * Logged from: USB Service. |
| 7626 | */ |
| 7627 | message UsbContaminantReported { |
| 7628 | optional string id = 1; |
| 7629 | optional android.service.usb.ContaminantPresenceStatus status = 2; |
| 7630 | } |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 7631 | |
| 7632 | /** |
| 7633 | * This atom is for debugging purpose. |
| 7634 | */ |
| 7635 | message DebugElapsedClock { |
| 7636 | // Monotically increasing value for each pull. |
| 7637 | optional int64 pull_count = 1; |
| 7638 | // Time from System.elapsedRealtime. |
| 7639 | optional int64 elapsed_clock_millis = 2; |
| 7640 | // Time from System.elapsedRealtime. |
| 7641 | optional int64 same_elapsed_clock_millis = 3; |
| 7642 | // Diff between current elapsed time and elapsed time from previous pull. |
| 7643 | optional int64 elapsed_clock_diff_millis = 4; |
| 7644 | |
| 7645 | enum Type { |
| 7646 | TYPE_UNKNOWN = 0; |
| 7647 | ALWAYS_PRESENT = 1; |
| 7648 | PRESENT_ON_ODD_PULLS = 2; |
| 7649 | } |
| 7650 | // Type of behavior for the pulled data. |
| 7651 | optional Type type = 5; |
| 7652 | } |
| 7653 | |
| 7654 | /** |
| 7655 | * This atom is for debugging purpose. |
| 7656 | */ |
| 7657 | message DebugFailingElapsedClock { |
| 7658 | // Monotically increasing value for each pull. |
| 7659 | optional int64 pull_count = 1; |
| 7660 | // Time from System.elapsedRealtime. |
| 7661 | optional int64 elapsed_clock_millis = 2; |
| 7662 | // Time from System.elapsedRealtime. |
| 7663 | optional int64 same_elapsed_clock_millis = 3; |
| 7664 | // Diff between current elapsed time and elapsed time from previous pull. |
| 7665 | optional int64 elapsed_clock_diff_millis = 4; |
| 7666 | } |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7667 | |
| 7668 | /** Logs System UI bubbles event changed. |
| 7669 | * |
| 7670 | * Logged from: |
| 7671 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles |
| 7672 | */ |
| 7673 | message BubbleUIChanged { |
| 7674 | |
| 7675 | // The app package that is posting the bubble. |
| 7676 | optional string package_name = 1; |
| 7677 | |
| 7678 | // The notification channel that is posting the bubble. |
| 7679 | optional string notification_channel = 2; |
| 7680 | |
| 7681 | // The notification id associated with the posted bubble. |
| 7682 | optional int32 notification_id = 3; |
| 7683 | |
| 7684 | // The position of the bubble within the bubble stack. |
| 7685 | optional int32 position = 4; |
| 7686 | |
| 7687 | // The total number of bubbles within the bubble stack. |
| 7688 | optional int32 total_number = 5; |
| 7689 | |
| 7690 | // User interactions with the bubble. |
| 7691 | enum Action { |
| 7692 | UNKNOWN = 0; |
| 7693 | POSTED = 1; |
| 7694 | UPDATED = 2; |
| 7695 | EXPANDED = 3; |
| 7696 | COLLAPSED = 4; |
| 7697 | DISMISSED = 5; |
| 7698 | STACK_DISMISSED = 6; |
| 7699 | STACK_MOVED = 7; |
| 7700 | HEADER_GO_TO_APP = 8; |
| 7701 | HEADER_GO_TO_SETTINGS = 9; |
| 7702 | PERMISSION_OPT_IN = 10; |
| 7703 | PERMISSION_OPT_OUT = 11; |
Steven Wu | a62cb6a | 2019-02-15 17:12:51 -0500 | [diff] [blame] | 7704 | PERMISSION_DIALOG_SHOWN = 12; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7705 | SWIPE_LEFT = 13; |
| 7706 | SWIPE_RIGHT = 14; |
Steven Wu | a254dab | 2019-01-29 11:30:39 -0500 | [diff] [blame] | 7707 | STACK_EXPANDED = 15; |
Steven Wu | 1684f2d | 2019-04-11 14:10:42 -0400 | [diff] [blame] | 7708 | FLYOUT = 16; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7709 | } |
| 7710 | optional Action action = 6; |
| 7711 | |
| 7712 | // Normalized screen position of the bubble stack. The range is between 0 and 1. |
| 7713 | optional float normalized_x_position = 7; |
| 7714 | optional float normalized_y_position = 8; |
Steven Wu | 45e38ae | 2019-03-25 16:16:59 -0400 | [diff] [blame] | 7715 | |
| 7716 | // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon. |
| 7717 | optional bool is_unread = 9; |
Steven Wu | 8ba8ca9 | 2019-04-11 10:47:42 -0400 | [diff] [blame] | 7718 | |
| 7719 | // Whether the bubble is an on-going one. |
| 7720 | optional bool is_ongoing = 10; |
| 7721 | |
| 7722 | // Whether the bubble is produced by an app running in foreground. |
Mady Mellor | daa0a66 | 2019-06-24 16:42:35 -0700 | [diff] [blame] | 7723 | // This is deprecated and the value should be ignored. |
| 7724 | optional bool is_foreground = 11 [deprecated = true]; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 7725 | } |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 7726 | |
| 7727 | /** |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 7728 | * Logs System UI bubbles developer errors. |
| 7729 | * |
| 7730 | * Logged from: |
| 7731 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java |
| 7732 | */ |
| 7733 | message BubbleDeveloperErrorReported { |
| 7734 | |
| 7735 | // The app package that is posting the bubble. |
| 7736 | optional string package_name = 1; |
| 7737 | |
| 7738 | // Bubble developer error type enums. |
| 7739 | enum Error { |
| 7740 | UNKNOWN = 0; |
| 7741 | ACTIVITY_INFO_MISSING = 1; |
| 7742 | ACTIVITY_INFO_NOT_RESIZABLE = 2; |
| 7743 | DOCUMENT_LAUNCH_NOT_ALWAYS = 3; |
| 7744 | } |
| 7745 | optional Error error = 2 [default = UNKNOWN]; |
| 7746 | } |
| 7747 | |
| 7748 | /** |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 7749 | * Logs that a constraint for a scheduled job has changed. |
| 7750 | * |
| 7751 | * Logged from: |
| 7752 | * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java |
| 7753 | */ |
| 7754 | message ScheduledJobConstraintChanged { |
| 7755 | repeated AttributionNode attribution_node = 1; |
| 7756 | |
| 7757 | // Name of the job. |
| 7758 | optional string job_name = 2; |
| 7759 | |
| 7760 | optional com.android.server.job.ConstraintEnum constraint = 3; |
| 7761 | |
| 7762 | enum State { |
Kweku Adams | e8db3ab | 2019-02-27 14:30:34 -0800 | [diff] [blame] | 7763 | UNKNOWN = 0; |
| 7764 | UNSATISFIED = 1; |
| 7765 | SATISFIED = 2; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 7766 | } |
| 7767 | optional State state = 4; |
| 7768 | } |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 7769 | |
| 7770 | /** |
| 7771 | * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check |
| 7772 | * returns true. |
| 7773 | * |
| 7774 | * Logged from: |
| 7775 | * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java |
| 7776 | */ |
| 7777 | message ScreenTimeoutExtensionReported { |
| 7778 | // Describes how many times in a row did the power manager reset the screen off timeout. |
| 7779 | optional uint32 consecutive_timeout_extended_count = 1; |
| 7780 | } |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 7781 | |
| 7782 | /* |
| 7783 | * Logs number of milliseconds it takes to start a process. |
| 7784 | * The definition of app process start time is from the app launch time to |
| 7785 | * the time that Zygote finished forking the app process and loaded the |
| 7786 | * application package's java classes. |
| 7787 | |
| 7788 | * This metric is different from AppStartOccurred which is for foreground |
| 7789 | * activity only. |
| 7790 | |
| 7791 | * ProcessStartTime can report all processes (both foreground and background) |
| 7792 | * start time. |
| 7793 | * |
| 7794 | * Logged from: |
| 7795 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 7796 | */ |
| 7797 | message ProcessStartTime { |
| 7798 | // The uid of the ProcessRecord. |
| 7799 | optional int32 uid = 1 [(is_uid) = true]; |
| 7800 | |
| 7801 | // The process pid. |
| 7802 | optional int32 pid = 2; |
| 7803 | |
| 7804 | // The process name. |
| 7805 | // Usually package name, "system" for system server. |
| 7806 | // Provided by ActivityManagerService. |
| 7807 | optional string process_name = 3; |
| 7808 | |
| 7809 | enum StartType { |
| 7810 | UNKNOWN = 0; |
| 7811 | WARM = 1; |
| 7812 | HOT = 2; |
| 7813 | COLD = 3; |
| 7814 | } |
| 7815 | |
| 7816 | // The start type. |
| 7817 | optional StartType type = 4; |
| 7818 | |
| 7819 | // The elapsed realtime at the start of the process. |
| 7820 | optional int64 process_start_time_millis = 5; |
| 7821 | |
| 7822 | // Number of milliseconds it takes to reach bind application. |
| 7823 | optional int32 bind_application_delay_millis = 6; |
| 7824 | |
| 7825 | // Number of milliseconds it takes to finish start of the process. |
| 7826 | optional int32 process_start_delay_millis = 7; |
| 7827 | |
| 7828 | // hostingType field in ProcessRecord, the component type such as "activity", |
| 7829 | // "service", "content provider", "broadcast" or other strings. |
| 7830 | optional string hosting_type = 8; |
| 7831 | |
| 7832 | // hostingNameStr field in ProcessRecord. The component class name that runs |
| 7833 | // in this process. |
| 7834 | optional string hosting_name = 9; |
| 7835 | } |
| 7836 | |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 7837 | /** |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 7838 | * Track Media Codec usage |
| 7839 | * Logged from: |
| 7840 | * frameworks/av/media/libstagefright/MediaCodec.cpp |
| 7841 | * frameworks/av/services/mediaanalytics/statsd_codec.cpp |
| 7842 | */ |
| 7843 | message MediametricsCodecReported { |
| 7844 | optional int64 timestamp_nanos = 1; |
| 7845 | optional string package_name = 2; |
| 7846 | optional int64 package_version_code = 3; |
| 7847 | optional int64 media_apex_version = 4; |
| 7848 | |
| 7849 | optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7850 | } |
| 7851 | |
| 7852 | /** |
| 7853 | * Track Media Extractor (pulling video/audio streams out of containers) usage |
| 7854 | * Logged from: |
| 7855 | * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp |
| 7856 | * frameworks/av/services/mediaanalytics/statsd_extractor.cpp |
| 7857 | */ |
| 7858 | message MediametricsExtractorReported { |
| 7859 | optional int64 timestamp_nanos = 1; |
| 7860 | optional string package_name = 2; |
| 7861 | optional int64 package_version_code = 3; |
| 7862 | optional int64 media_apex_version = 4; |
| 7863 | |
| 7864 | optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7865 | } |
| 7866 | |
| 7867 | /** |
| 7868 | * Track how we arbitrate between microphone/input requests. |
| 7869 | * Logged from |
| 7870 | * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp |
| 7871 | * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp |
| 7872 | */ |
| 7873 | message MediametricsAudiopolicyReported { |
| 7874 | optional int64 timestamp_nanos = 1; |
| 7875 | optional string package_name = 2; |
| 7876 | optional int64 package_version_code = 3; |
| 7877 | optional int64 media_apex_version = 4; |
| 7878 | |
| 7879 | optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7880 | } |
| 7881 | |
| 7882 | /** |
| 7883 | * Track how we arbitrate between microphone requests. |
| 7884 | * Logged from |
| 7885 | * frameworks/av/media/libaudioclient/AudioRecord.cpp |
| 7886 | * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp |
| 7887 | */ |
| 7888 | message MediametricsAudiorecordReported { |
| 7889 | optional int64 timestamp_nanos = 1; |
| 7890 | optional string package_name = 2; |
| 7891 | optional int64 package_version_code = 3; |
| 7892 | optional int64 media_apex_version = 4; |
| 7893 | |
| 7894 | optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7895 | } |
| 7896 | |
| 7897 | /** |
| 7898 | * Track how we arbitrate between microphone/input requests. |
| 7899 | * Logged from |
| 7900 | * frameworks/av/media/libnblog/ReportPerformance.cpp |
| 7901 | * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp |
| 7902 | */ |
| 7903 | message MediametricsAudiothreadReported { |
| 7904 | optional int64 timestamp_nanos = 1; |
| 7905 | optional string package_name = 2; |
| 7906 | optional int64 package_version_code = 3; |
| 7907 | optional int64 media_apex_version = 4; |
| 7908 | |
| 7909 | optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7910 | } |
| 7911 | |
| 7912 | /** |
| 7913 | * Track how we arbitrate between microphone/input requests. |
| 7914 | * Logged from |
| 7915 | * frameworks/av/media/libaudioclient/AudioTrack.cpp |
| 7916 | * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp |
| 7917 | */ |
| 7918 | message MediametricsAudiotrackReported { |
| 7919 | optional int64 timestamp_nanos = 1; |
| 7920 | optional string package_name = 2; |
| 7921 | optional int64 package_version_code = 3; |
| 7922 | optional int64 media_apex_version = 4; |
| 7923 | |
| 7924 | optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7925 | } |
| 7926 | |
| 7927 | /** |
| 7928 | * Track information about DRM framework performance |
| 7929 | * Logged from |
| 7930 | * frameworks/av/drm/libmediadrm/DrmHal.cpp |
| 7931 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 7932 | */ |
| 7933 | message MediametricsMediadrmReported { |
| 7934 | optional int64 timestamp_nanos = 1; |
| 7935 | optional string package_name = 2; |
| 7936 | optional int64 package_version_code = 3; |
| 7937 | optional int64 media_apex_version = 4; |
| 7938 | |
| 7939 | // vendor+description tell about which DRM plugin is in use on this device |
| 7940 | optional string vendor = 5; |
| 7941 | optional string description = 6; |
| 7942 | // from frameworks/av/drm/libmediadrm/protos/metrics.proto |
| 7943 | optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7944 | } |
| 7945 | |
| 7946 | /** |
| 7947 | * Track information about the widevine DRM plugin performance |
| 7948 | * Logged from |
| 7949 | * vendor/widevine/libwvdrmengine/cdm/metrics |
| 7950 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 7951 | */ |
| 7952 | message MediametricsDrmWidevineReported { |
| 7953 | optional int64 timestamp_nanos = 1; |
| 7954 | optional string package_name = 2; |
| 7955 | optional int64 package_version_code = 3; |
| 7956 | optional int64 media_apex_version = 4; |
| 7957 | |
| 7958 | optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7959 | } |
| 7960 | |
| 7961 | /** |
| 7962 | * Track information about recordings (e.g. camcorder) |
| 7963 | * Logged from |
| 7964 | * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp |
| 7965 | * frameworks/av/services/mediaanalytics/statsd_recorder.cpp |
| 7966 | */ |
| 7967 | message MediametricsRecorderReported { |
| 7968 | optional int64 timestamp_nanos = 1; |
| 7969 | optional string package_name = 2; |
| 7970 | optional int64 package_version_code = 3; |
| 7971 | optional int64 media_apex_version = 4; |
| 7972 | |
| 7973 | optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7974 | } |
| 7975 | |
| 7976 | /** |
| 7977 | * Track Media Player usage |
| 7978 | * Logged from: |
| 7979 | * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp |
| 7980 | * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp |
| 7981 | */ |
| 7982 | message MediametricsNuPlayerReported { |
| 7983 | optional int64 timestamp_nanos = 1; |
| 7984 | optional string package_name = 2; |
| 7985 | optional int64 package_version_code = 3; |
| 7986 | optional int64 media_apex_version = 4; |
| 7987 | |
| 7988 | optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7989 | } |
| 7990 | |
| 7991 | /** |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 7992 | * Track Legacy DRM usage |
| 7993 | * Logged from |
| 7994 | * frameworks/av/drm/drmserver/DrmManager.cpp |
| 7995 | */ |
| 7996 | message MediametricsDrmManagerReported { |
| 7997 | optional int64 timestamp_nanos = 1; |
| 7998 | optional string package_name = 2; |
| 7999 | optional int64 package_version_code = 3; |
| 8000 | optional int64 media_apex_version = 4; |
| 8001 | |
| 8002 | enum Method { |
| 8003 | METHOD_NOT_FOUND = -1; |
| 8004 | GET_CONSTRAINTS = 0; |
| 8005 | GET_METADATA = 1; |
| 8006 | CAN_HANDLE = 2; |
| 8007 | PROCESS_DRM_INFO = 3; |
| 8008 | ACQUIRE_DRM_INFO = 4; |
| 8009 | SAVE_RIGHTS = 5; |
| 8010 | GET_ORIGINAL_MIME_TYPE = 6; |
| 8011 | GET_DRM_OBJECT_TYPE = 7; |
| 8012 | CHECK_RIGHTS_STATUS = 8; |
| 8013 | REMOVE_RIGHTS = 9; |
| 8014 | REMOVE_ALL_RIGHTS = 10; |
| 8015 | OPEN_CONVERT_SESSION = 11; |
| 8016 | OPEN_DECRYPT_SESSION = 12; |
| 8017 | } |
| 8018 | |
| 8019 | // plugin_id+description inform which Legacy DRM plugins are still in use on device |
| 8020 | optional string plugin_id = 5; |
| 8021 | optional string description = 6; |
| 8022 | optional Method method = 7; |
| 8023 | optional string mime_types = 8; |
Robert Shih | ec8e60c | 2020-02-08 15:20:39 -0800 | [diff] [blame] | 8024 | |
| 8025 | optional int64 get_constraints_count = 9; |
| 8026 | optional int64 get_metadata_count = 10; |
| 8027 | optional int64 can_handle_count = 11; |
| 8028 | optional int64 process_drm_info_count = 12; |
| 8029 | optional int64 acquire_drm_info_count = 13; |
| 8030 | optional int64 save_rights_count = 14; |
| 8031 | optional int64 get_original_mime_type_count = 15; |
| 8032 | optional int64 get_drm_object_type_count = 16; |
| 8033 | optional int64 check_rights_status_count = 17; |
| 8034 | optional int64 remove_rights_count = 18; |
| 8035 | optional int64 remove_all_rights_count = 19; |
| 8036 | optional int64 open_convert_session_count = 20; |
| 8037 | optional int64 open_decrypt_session_count = 21; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 8038 | } |
| 8039 | |
| 8040 | /** |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 8041 | * State of a dangerous permission requested by a package |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 8042 | * Pulled from: StatsCompanionService |
| 8043 | */ |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 8044 | message DangerousPermissionState { |
| 8045 | // Name of the permission |
| 8046 | optional string permission_name = 1; |
| 8047 | |
| 8048 | // Uid of the package |
| 8049 | optional int32 uid = 2 [(is_uid) = true]; |
| 8050 | |
| 8051 | // Package requesting the permission |
| 8052 | optional string package_name = 3; |
| 8053 | |
| 8054 | // If the permission is granted to the uid |
| 8055 | optional bool is_granted = 4; |
Stanislav Zholnin | 75c3fd1 | 2019-05-21 13:10:51 +0100 | [diff] [blame] | 8056 | |
| 8057 | // Permission flags as per android.content.pm.PermissionFlags |
| 8058 | optional int32 permission_flags = 5; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 8059 | } |
| 8060 | |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 8061 | /** |
| 8062 | * Logs when a package is denied access to a device identifier based on the new access requirements. |
| 8063 | * |
| 8064 | * Logged from: |
| 8065 | * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java |
| 8066 | */ |
| 8067 | message DeviceIdentifierAccessDenied { |
| 8068 | // The name of the package denied access to the requested device identifier. |
| 8069 | optional string package_name = 1; |
| 8070 | |
| 8071 | // The name of the device identifier method the package attempted to invoke. |
| 8072 | optional string method_name = 2; |
| 8073 | |
| 8074 | // True if the package is preinstalled. |
Meng Wang | e8953ae | 2020-01-29 10:38:58 -0800 | [diff] [blame] | 8075 | // Starting from Android 11, this boolean is not set and will always be false. |
| 8076 | optional bool is_preinstalled = 3 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 8077 | |
| 8078 | // True if the package is privileged. |
Sooraj Sasindran | 22b53f4 | 2019-11-27 15:57:33 -0800 | [diff] [blame] | 8079 | // Starting from Android 11, this boolean is not set and will always be false. |
| 8080 | optional bool is_priv_app = 4 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 8081 | } |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 8082 | |
| 8083 | /** |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 8084 | * Pulls the ongoing mainline install train version code. |
| 8085 | * Pulled from StatsCompanionService |
| 8086 | */ |
| 8087 | message TrainInfo { |
| 8088 | optional int64 train_version_code = 1; |
| 8089 | |
| 8090 | optional TrainExperimentIds train_experiment_id = 2; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 8091 | |
| 8092 | optional string train_name = 3; |
| 8093 | |
| 8094 | enum Status { |
| 8095 | UNKNOWN = 0; |
| 8096 | INSTALL_REQUESTED = 1; |
| 8097 | INSTALL_STARTED = 2; |
| 8098 | INSTALL_STAGED_NOT_READY = 3; |
| 8099 | INSTALL_STAGED_READY = 4; |
| 8100 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 8101 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 8102 | // and INSTALL_FAILURE_COMMIT. |
| 8103 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 8104 | // 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] | 8105 | INSTALL_CANCELLED = 7; |
| 8106 | INSTALLER_ROLLBACK_REQUESTED = 8; |
| 8107 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 8108 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 8109 | INSTALLER_ROLLBACK_STAGED = 11; |
| 8110 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 8111 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 8112 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 8113 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 8114 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 8115 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 8116 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 8117 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 8118 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 8119 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 8120 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 8121 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 8122 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 8123 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 8124 | REBOOT_TRIGGERED = 26; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 8125 | } |
| 8126 | optional Status status = 4; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 8127 | } |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 8128 | |
| 8129 | /** |
| 8130 | * Logs the gesture stage changed event. |
| 8131 | * |
| 8132 | * Logged from: |
| 8133 | * frameworks/base/packages/SystemUI/ |
| 8134 | */ |
| 8135 | message AssistGestureStageReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 8136 | optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 8137 | } |
| 8138 | |
| 8139 | /** |
| 8140 | * Logs the feedback type. |
| 8141 | * |
| 8142 | * Logged from: |
| 8143 | * frameworks/base/packages/SystemUI/ |
| 8144 | */ |
| 8145 | message AssistGestureFeedbackReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 8146 | // Whether or not the gesture was used. |
| 8147 | optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 8148 | } |
| 8149 | |
| 8150 | /** |
| 8151 | * Logs the progress. |
| 8152 | * |
| 8153 | * Logged from: |
| 8154 | * frameworks/base/packages/SystemUI/ |
| 8155 | */ |
| 8156 | message AssistGestureProgressReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 8157 | // [0,100] progress for the assist gesture. |
| 8158 | optional int32 progress = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 8159 | } |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 8160 | |
| 8161 | /* |
| 8162 | * Information about the time zone data on a device. |
| 8163 | */ |
| 8164 | message TimeZoneDataInfo { |
| 8165 | // A version identifier for the data set on device. e.g. "2018i" |
| 8166 | optional string tzdb_version = 1; |
| 8167 | } |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8168 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 8169 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8170 | * Logs the GPU stats global health information. |
| 8171 | * |
| 8172 | * Logged from: |
| 8173 | * frameworks/native/services/gpuservice/gpustats/ |
| 8174 | */ |
| 8175 | message GpuStatsGlobalInfo { |
| 8176 | // Package name of the gpu driver. |
| 8177 | optional string driver_package_name = 1; |
| 8178 | |
| 8179 | // Version name of the gpu driver. |
| 8180 | optional string driver_version_name = 2; |
| 8181 | |
| 8182 | // Version code of the gpu driver. |
| 8183 | optional int64 driver_version_code = 3; |
| 8184 | |
| 8185 | // Build time of the gpu driver in UTC as seconds since January 1, 1970. |
| 8186 | optional int64 driver_build_time = 4; |
| 8187 | |
| 8188 | // Total count of the gl driver gets loaded. |
| 8189 | optional int64 gl_loading_count = 5; |
| 8190 | |
| 8191 | // Total count of the gl driver fails to be loaded. |
| 8192 | optional int64 gl_loading_failure_count = 6; |
| 8193 | |
| 8194 | // Total count of the Vulkan driver gets loaded. |
| 8195 | optional int64 vk_loading_count = 7; |
| 8196 | |
| 8197 | // Total count of the Vulkan driver fails to be loaded. |
| 8198 | optional int64 vk_loading_failure_count = 8; |
Yiwei Zhang | 63852d2a | 2019-05-06 19:31:20 -0700 | [diff] [blame] | 8199 | |
| 8200 | // Api version of the system Vulkan driver. |
| 8201 | optional int32 vulkan_version = 9; |
| 8202 | |
| 8203 | // Api version of the system CPU Vulkan driver. |
| 8204 | optional int32 cpu_vulkan_version = 10; |
| 8205 | |
| 8206 | // Api version of the system GLES driver. |
| 8207 | optional int32 gles_version = 11; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 8208 | |
| 8209 | // Total count of the angle driver gets loaded. |
| 8210 | optional int64 angle_loading_count = 12; |
| 8211 | |
| 8212 | // Total count of the angle driver fails to be loaded. |
| 8213 | optional int64 angle_loading_failure_count = 13; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8214 | } |
| 8215 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 8216 | /** |
| 8217 | * GPU driver loading time info. |
| 8218 | */ |
| 8219 | message GpuDriverLoadingTime { |
| 8220 | // List of all the driver loading times for this app. The list size is |
| 8221 | // capped at 50. |
| 8222 | repeated int64 driver_loading_time = 1; |
| 8223 | } |
| 8224 | |
| 8225 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8226 | * Logs the GPU stats per app health information. |
| 8227 | * |
| 8228 | * Logged from: |
| 8229 | * frameworks/native/services/gpuservice/gpustats/ |
| 8230 | */ |
| 8231 | message GpuStatsAppInfo { |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 8232 | // Package name of the application that loads the gpu driver. Total number |
| 8233 | // of different packages is capped at 100. |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8234 | optional string app_package_name = 1; |
| 8235 | |
| 8236 | // Version code of the gpu driver this app loads. |
| 8237 | optional int64 driver_version_code = 2; |
| 8238 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 8239 | // gl driver loading time info. |
| 8240 | optional GpuDriverLoadingTime gl_driver_loading_time = 3 |
| 8241 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8242 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 8243 | // Vulkan driver loading time info. |
| 8244 | optional GpuDriverLoadingTime vk_driver_loading_time = 4 |
| 8245 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 8246 | |
| 8247 | // Angle driver loading time info. |
| 8248 | optional GpuDriverLoadingTime angle_driver_loading_time = 5 |
| 8249 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 7c70930 | 2019-05-09 15:00:46 -0700 | [diff] [blame] | 8250 | |
| 8251 | // CPU Vulkan implementation is in use. |
| 8252 | optional bool cpu_vulkan_in_use = 6; |
Yiwei Zhang | a763861 | 2019-07-03 17:34:12 -0700 | [diff] [blame] | 8253 | |
| 8254 | // App is not doing pre-rotation correctly. |
| 8255 | optional bool false_prerotation = 7; |
Yiwei Zhang | f02cf6b | 2019-12-20 14:51:07 -0800 | [diff] [blame] | 8256 | |
| 8257 | // App creates GLESv1 context. |
| 8258 | optional bool gles_1_in_use = 8; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 8259 | } |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 8260 | |
| 8261 | /* |
| 8262 | * Logs the size of the system ion heap. |
| 8263 | * |
| 8264 | * Pulled from StatsCompanionService. |
| 8265 | */ |
| 8266 | message SystemIonHeapSize { |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 8267 | // Deprecated due to limited support of ion stats in debugfs. |
| 8268 | // Use `IonHeapSize` instead. |
| 8269 | option deprecated = true; |
| 8270 | |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 8271 | // Size of the system ion heap in bytes. |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 8272 | // Read from debugfs. |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 8273 | optional int64 size_in_bytes = 1; |
| 8274 | } |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 8275 | |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 8276 | /* |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 8277 | * Logs the total size of the ion heap. |
| 8278 | * |
| 8279 | * Pulled from StatsCompanionService. |
| 8280 | */ |
| 8281 | message IonHeapSize { |
| 8282 | // Total size of all ion heaps in kilobytes. |
| 8283 | // Read from: /sys/kernel/ion/total_heaps_kb. |
| 8284 | optional int32 total_size_kb = 1; |
| 8285 | } |
| 8286 | |
| 8287 | /* |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 8288 | * Logs the per-process size of the system ion heap. |
| 8289 | * |
| 8290 | * Pulled from StatsCompanionService. |
| 8291 | */ |
| 8292 | message ProcessSystemIonHeapSize { |
| 8293 | // The uid if available. -1 means not available. |
| 8294 | optional int32 uid = 1 [(is_uid) = true]; |
| 8295 | |
| 8296 | // The process name (from /proc/PID/cmdline). |
| 8297 | optional string process_name = 2; |
| 8298 | |
| 8299 | // Sum of sizes of all allocations. |
| 8300 | optional int32 total_size_in_kilobytes = 3; |
| 8301 | |
| 8302 | // Number of allocations. |
| 8303 | optional int32 allocation_count = 4; |
| 8304 | |
| 8305 | // Size of the largest allocation. |
| 8306 | optional int32 max_size_in_kilobytes = 5; |
| 8307 | } |
| 8308 | |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 8309 | /** |
| 8310 | * Push network stack events. |
| 8311 | * |
| 8312 | * Log from: |
| 8313 | * frameworks/base/packages/NetworkStack/ |
| 8314 | */ |
| 8315 | message NetworkStackReported { |
Chiachang Wang | 729d267 | 2019-03-27 17:33:52 +0800 | [diff] [blame] | 8316 | // The id that indicates the event reported from NetworkStack. |
| 8317 | optional int32 event_id = 1; |
| 8318 | // The data for the reported events. |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 8319 | optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES]; |
| 8320 | } |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 8321 | |
| 8322 | /** |
| 8323 | * Logs the apps that are installed on the external storage. |
| 8324 | * Pulled from: |
| 8325 | * StatsCompanionService |
| 8326 | */ |
| 8327 | message AppsOnExternalStorageInfo { |
| 8328 | // The type of the external storage. |
| 8329 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 8330 | // The name of the package that is installed on the external storage. |
| 8331 | optional string package_name = 2; |
| 8332 | } |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 8333 | |
| 8334 | /** |
| 8335 | * Logs the settings related to Face. |
| 8336 | * Logged from: |
| 8337 | * frameworks/base/services/core/java/com/android/server/stats |
| 8338 | */ |
| 8339 | message FaceSettings { |
| 8340 | // Whether or not face unlock is allowed on Keyguard. |
| 8341 | optional bool unlock_keyguard_enabled = 1; |
| 8342 | // Whether or not face unlock dismisses the Keyguard. |
| 8343 | optional bool unlock_dismisses_keyguard = 2; |
| 8344 | // Whether or not face unlock requires attention. |
| 8345 | optional bool unlock_attention_required = 3; |
| 8346 | // Whether or not face unlock is allowed for apps (through BiometricPrompt). |
| 8347 | optional bool unlock_app_enabled = 4; |
| 8348 | // Whether or not face unlock always requires user confirmation. |
| 8349 | optional bool unlock_always_require_confirmation = 5; |
| 8350 | // Whether or not a diverse set of poses are required during enrollment. |
| 8351 | optional bool unlock_diversity_required = 6; |
| 8352 | } |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 8353 | |
| 8354 | /** |
| 8355 | * Logs cooling devices maintained by the kernel. |
| 8356 | * |
| 8357 | * Pulled from StatsCompanionService.java |
| 8358 | */ |
| 8359 | message CoolingDevice { |
| 8360 | // The type of cooling device being reported. Eg. CPU, GPU... |
| 8361 | optional android.os.CoolingTypeEnum device_location = 1; |
| 8362 | // The name of the cooling device source. Eg. CPU0 |
| 8363 | optional string device_name = 2; |
| 8364 | // Current throttle state of the cooling device. The value can any unsigned |
| 8365 | // integer between 0 and max_state defined in its driver. 0 means device is |
| 8366 | // not in throttling, higher value means deeper throttling. |
| 8367 | optional int32 state = 3; |
| 8368 | } |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 8369 | |
| 8370 | /** |
| 8371 | * Intelligence has several counter-type events that don't warrant a |
| 8372 | * full separate atom. These are primarily API call counters but also include |
| 8373 | * counters for feature usage and specific failure modes. |
| 8374 | * |
| 8375 | * Logged from the Intelligence mainline module. |
| 8376 | */ |
| 8377 | message IntelligenceEventReported { |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 8378 | // The event type. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 8379 | optional android.stats.intelligence.EventType event_id = 1; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 8380 | // Success, failure. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 8381 | optional android.stats.intelligence.Status status = 2; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 8382 | // How many times the event occured (to report a batch of high frequency events). |
| 8383 | optional int32 count = 3; |
Ben Blount | e3223f3d | 2019-05-02 22:49:03 -0700 | [diff] [blame] | 8384 | // How long the event took (sum of durations if count > 1) |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 8385 | optional int64 duration_millis = 4; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 8386 | } |
Andrew T Nguyen | ee615d6 | 2019-05-01 14:40:19 -0700 | [diff] [blame] | 8387 | |
| 8388 | /** |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 8389 | * Logs when Car Power state changed. |
| 8390 | * |
| 8391 | * Logged from: |
| 8392 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 8393 | */ |
| 8394 | message CarPowerStateChanged { |
| 8395 | // States come from CpmsState in CarPowerManagementService.java. |
| 8396 | enum State { |
| 8397 | WAIT_FOR_VHAL = 0; |
| 8398 | ON = 1; |
| 8399 | SHUTDOWN_PREPARE = 2; |
| 8400 | WAIT_FOR_FINISH = 3; |
| 8401 | SUSPEND = 4; |
| 8402 | SIMULATE_SLEEP = 5; |
| 8403 | } |
| 8404 | optional State state = 1; |
| 8405 | } |
| 8406 | |
| 8407 | /** |
Mayank Garg | da5ca01 | 2020-05-14 00:23:53 -0700 | [diff] [blame] | 8408 | * Logs when Car User Hal is requested to switch/create/remove user. |
| 8409 | * |
| 8410 | * Logged from: |
| 8411 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8412 | */ |
| 8413 | message CarUserHalModifyUserRequestReported { |
| 8414 | // Request id for the request. |
| 8415 | optional int32 request_id = 1; |
| 8416 | // Request type. |
| 8417 | enum RequestType { |
| 8418 | UNKNOWN = 0; |
| 8419 | // Car user manager requested user switch. |
| 8420 | SWITCH_REQUEST_ANDROID = 1; |
| 8421 | // OEM requested User switch. |
| 8422 | SWITCH_REQUEST_OEM = 2; |
| 8423 | // Hal switch requested after android switch using activity manager. |
| 8424 | SWITCH_REQUEST_LEGACY = 3; |
| 8425 | // Create User |
| 8426 | CREATE_REQUEST = 4; |
| 8427 | // Remove User |
| 8428 | REMOVE_REQUEST = 5; |
| 8429 | } |
| 8430 | optional RequestType request_type = 2; |
| 8431 | // Android User id of the current user which can only be 0, 10, 11 and so on. |
| 8432 | // -1 if not available. |
| 8433 | optional int32 user_id = 3; |
| 8434 | // VHAL flags of the current user. (-1 if not available) |
| 8435 | optional int32 user_flags = 4; |
| 8436 | // Android User id of the target user for switch/create/remove. It can only |
| 8437 | // be 0, 10, 11 and so on. -1 if not available. |
| 8438 | optional int32 target_user_id = 5; |
| 8439 | // VHAL flags of the target user for switch/create/remove. (-1 if not available) |
| 8440 | optional int32 target_user_flags = 6; |
| 8441 | // Request timeout Milliseconds (-1 if not available) |
| 8442 | optional int32 timeout_millis = 7; |
| 8443 | } |
| 8444 | |
| 8445 | /** |
| 8446 | * Logs when Car User Hal responds to switch/create user request. |
| 8447 | * |
| 8448 | * Logged from: |
| 8449 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8450 | */ |
| 8451 | message CarUserHalModifyUserResponseReported { |
| 8452 | // Request id of the request associated with the response. |
| 8453 | optional int32 request_id = 1; |
| 8454 | // Car user hal callback status. |
| 8455 | enum CallbackStatus { |
| 8456 | UNKNOWN = 0; |
| 8457 | // Hal response was invalid. |
| 8458 | INVALID = 1; |
| 8459 | // Hal response was ok. |
| 8460 | OK = 2; |
| 8461 | // Hal timeout during set call. |
| 8462 | HAL_SET_TIMEOUT = 3; |
| 8463 | // Hal response timeout. |
| 8464 | HAL_RESPONSE_TIMEOUT = 4; |
| 8465 | // Hal responded with wrong info. |
| 8466 | WRONG_HAL_RESPONSE = 5; |
| 8467 | // Hal is processing multiple requests simultaneously. |
| 8468 | CONCURRENT_OPERATION = 6; |
| 8469 | } |
| 8470 | optional CallbackStatus callback_status = 2; |
| 8471 | |
| 8472 | // Hal request status for user switch/create/remove. |
| 8473 | enum HalRequestStatus { |
| 8474 | UNSPECIFIED = 0; |
| 8475 | // Hal request for user switch/create is successful. |
| 8476 | SUCCESS = 1; |
| 8477 | // Hal request for user switch/create failed. |
| 8478 | FAILURE = 2; |
| 8479 | } |
| 8480 | optional HalRequestStatus request_status = 3; |
| 8481 | } |
| 8482 | |
| 8483 | /** |
| 8484 | * Logs when post switch response is posted to Car User Hal. |
| 8485 | * |
| 8486 | * Logged from: |
| 8487 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8488 | */ |
| 8489 | message CarUserHalPostSwitchResponseReported { |
| 8490 | // Request id. |
| 8491 | optional int32 request_id = 1; |
| 8492 | |
| 8493 | // Android user switch status. |
| 8494 | enum UserSwitchStatus { |
| 8495 | UNKNOWN = 0; |
| 8496 | // Android user switch is successful. |
| 8497 | SUCCESS = 1; |
| 8498 | // Android user switch failed. |
| 8499 | FAILURE = 2; |
| 8500 | } |
| 8501 | optional UserSwitchStatus switch_status = 2; |
| 8502 | } |
| 8503 | |
| 8504 | /** |
| 8505 | * Logs when initial user information is requested from Car User Hal. |
| 8506 | * |
| 8507 | * Logged from: |
| 8508 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8509 | */ |
| 8510 | message CarUserHalInitialUserInfoRequestReported { |
| 8511 | // Request id for the request. |
| 8512 | optional int32 request_id = 1; |
| 8513 | |
| 8514 | // Request type for initial user information. |
| 8515 | enum InitialUserInfoRequestType { |
| 8516 | UNKNOWN = 0; |
| 8517 | // At the first time Android was booted (or after a factory reset). |
| 8518 | FIRST_BOOT = 1; |
| 8519 | // At the first time Android was booted after the system was updated. |
| 8520 | FIRST_BOOT_AFTER_OTA = 2; |
| 8521 | // When Android was booted "from scratch". |
| 8522 | COLD_BOOT = 3; |
| 8523 | // When Android was resumed after the system was suspended to memory. |
| 8524 | RESUME = 4; |
| 8525 | } |
| 8526 | optional InitialUserInfoRequestType request_type = 2; |
| 8527 | // Request timeout Milliseconds (-1 if not available) |
| 8528 | optional int32 timeout_millis = 3; |
| 8529 | } |
| 8530 | |
| 8531 | /** |
| 8532 | * Logs when Car User Hal responds to initial user information requests. |
| 8533 | * |
| 8534 | * Logged from: |
| 8535 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8536 | */ |
| 8537 | message CarUserHalInitialUserInfoResponseReported { |
| 8538 | // Request id of the request associated with the response. |
| 8539 | optional int32 request_id = 1; |
| 8540 | // Car user hal callback status. |
| 8541 | enum CallbackStatus { |
| 8542 | UNKNOWN = 0; |
| 8543 | // Hal response was invalid. |
| 8544 | INVALID = 1; |
| 8545 | // Hal response was ok. |
| 8546 | OK = 2; |
| 8547 | // Hal timeout during set call. |
| 8548 | HAL_SET_TIMEOUT = 3; |
| 8549 | // Hal response timeout. |
| 8550 | HAL_RESPONSE_TIMEOUT = 4; |
| 8551 | // Hal responded with wrong info. |
| 8552 | WRONG_HAL_RESPONSE = 5; |
| 8553 | // Hal is processing multiple requests simultaneously. |
| 8554 | CONCURRENT_OPERATION = 6; |
| 8555 | } |
| 8556 | optional CallbackStatus callback_status = 2; |
| 8557 | // Response for initial user information request. |
| 8558 | enum InitialUserInfoResponseAction { |
| 8559 | UNSPECIFIED = 0; |
| 8560 | // Let the Android System decide what to do. |
| 8561 | DEFAULT = 1; |
| 8562 | // Switch to an existing Android user. |
| 8563 | SWITCH = 2; |
| 8564 | // Create a new Android user (and switch to it). |
| 8565 | CREATE = 3; |
| 8566 | } |
| 8567 | optional InitialUserInfoResponseAction response_action = 3; |
| 8568 | // Android User id of the target user which can only be 0, 10, 11 and so on. |
| 8569 | // -1 if not available. |
| 8570 | optional int32 target_user = 4; |
| 8571 | // VHAL flags of the current user. (-1 if not available) |
| 8572 | optional int32 target_user_flags = 5; |
| 8573 | // User locales |
| 8574 | optional string user_locales = 6; |
| 8575 | } |
| 8576 | |
| 8577 | /** |
| 8578 | * Logs when set user association is requested from Car User Hal. |
| 8579 | * |
| 8580 | * Logged from: |
| 8581 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8582 | */ |
| 8583 | message CarUserHalUserAssociationRequestReported { |
| 8584 | // Request id for the request. |
| 8585 | optional int32 request_id = 1; |
| 8586 | // Request type. |
| 8587 | enum RequestType { |
| 8588 | UNKNOWN = 0; |
| 8589 | // For setting user association information. |
| 8590 | SET = 1; |
| 8591 | // For getting user association information. |
| 8592 | GET = 2; |
| 8593 | } |
| 8594 | optional RequestType request_type = 2; |
| 8595 | // Android User id of the current user which can only be 0, 10, 11 and so on. |
| 8596 | // -1 if not available. |
| 8597 | optional int32 current_user_id = 3; |
| 8598 | // VHAL flags of the current user. (-1 if not available) |
| 8599 | optional int32 current_user_flags = 4; |
| 8600 | // Number of the set associations requested. |
| 8601 | optional int32 number_associations = 5; |
| 8602 | // Concatenated string for the types from set associations request. |
| 8603 | // This is a string converted from an array of integers. |
| 8604 | optional string user_identification_association_types = 6; |
| 8605 | // Concatenated string for the values from set associations request. |
| 8606 | // This is a string converted from an array of integers. |
| 8607 | optional string user_identification_association_values = 7; |
| 8608 | } |
| 8609 | |
| 8610 | /** |
| 8611 | * Logs when Car User Hal responds to set user association requests. |
| 8612 | * |
| 8613 | * Logged from: |
| 8614 | * packages/services/Car/service/src/com/android/car/hal/UserHalService.java |
| 8615 | */ |
| 8616 | message CarUserHalSetUserAssociationResponseReported { |
| 8617 | // Request id of the request associated with the response. |
| 8618 | optional int32 request_id = 1; |
| 8619 | // Car user hal callback status. |
| 8620 | enum CallbackStatus { |
| 8621 | UNKNOWN = 0; |
| 8622 | // Hal response was invalid. |
| 8623 | INVALID = 1; |
| 8624 | // Hal response was ok. |
| 8625 | OK = 2; |
| 8626 | // Hal timeout during set call. |
| 8627 | HAL_SET_TIMEOUT = 3; |
| 8628 | // Hal response timeout. |
| 8629 | HAL_RESPONSE_TIMEOUT = 4; |
| 8630 | // Hal responded with wrong info. |
| 8631 | WRONG_HAL_RESPONSE = 5; |
| 8632 | // Hal is processing multiple requests simultaneously. |
| 8633 | CONCURRENT_OPERATION = 6; |
| 8634 | } |
| 8635 | optional CallbackStatus callback_status = 2; |
| 8636 | // Number of the set associations in the response. |
| 8637 | optional int32 number_associations = 3; |
| 8638 | // Concatenated string for the types from set associations request. |
| 8639 | // This is a string converted from an array of integers. |
| 8640 | optional string user_identification_association_types = 4; |
| 8641 | // Concatenated string for the values from set associations request. |
| 8642 | // This is a string converted from an array of integers. |
| 8643 | optional string user_identification_association_values = 5; |
| 8644 | } |
| 8645 | |
| 8646 | /** |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 8647 | * Logs whether GarageMode is entered. |
| 8648 | * |
| 8649 | * Logged from: |
| 8650 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 8651 | */ |
| 8652 | message GarageModeInfo { |
| 8653 | // Whether GarageMode is entered. |
| 8654 | optional bool is_garage_mode = 1; |
| 8655 | } |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 8656 | |
| 8657 | /** |
| 8658 | * Historical app ops data per package. |
| 8659 | */ |
| 8660 | message AppOps { |
| 8661 | // Uid of the package requesting the op |
| 8662 | optional int32 uid = 1 [(is_uid) = true]; |
| 8663 | |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8664 | // Name of the package performing the op |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 8665 | optional string package_name = 2; |
| 8666 | |
Stanislav Zholnin | 48811ee | 2020-03-03 16:15:55 +0000 | [diff] [blame] | 8667 | // operation id |
| 8668 | optional android.app.AppOpEnum op_id = 3 [default = APP_OP_NONE]; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 8669 | |
| 8670 | // The number of times the op was granted while the app was in the |
| 8671 | // foreground (only for trusted requests) |
| 8672 | optional int64 trusted_foreground_granted_count = 4; |
| 8673 | |
| 8674 | // The number of times the op was granted while the app was in the |
| 8675 | // background (only for trusted requests) |
| 8676 | optional int64 trusted_background_granted_count = 5; |
| 8677 | |
| 8678 | // The number of times the op was rejected while the app was in the |
| 8679 | // foreground (only for trusted requests) |
| 8680 | optional int64 trusted_foreground_rejected_count = 6; |
| 8681 | |
| 8682 | // The number of times the op was rejected while the app was in the |
| 8683 | // background (only for trusted requests) |
| 8684 | optional int64 trusted_background_rejected_count = 7; |
| 8685 | |
| 8686 | // For long-running operations, total duration of the operation |
| 8687 | // while the app was in the foreground (only for trusted requests) |
| 8688 | optional int64 trusted_foreground_duration_millis = 8; |
| 8689 | |
| 8690 | // For long-running operations, total duration of the operation |
| 8691 | // while the app was in the background (only for trusted requests) |
| 8692 | optional int64 trusted_background_duration_millis = 9; |
Stanislav Zholnin | 42d710e | 2019-11-28 13:11:54 +0000 | [diff] [blame] | 8693 | |
| 8694 | // Whether AppOps is guarded by Runtime permission |
| 8695 | optional bool is_runtime_permission = 10; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 8696 | } |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 8697 | |
| 8698 | /** |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 8699 | * Historical app ops data per package and attribution tag. |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 8700 | */ |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 8701 | message AttributedAppOps { |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 8702 | // Uid of the package requesting the op |
| 8703 | optional int32 uid = 1 [(is_uid) = true]; |
| 8704 | |
| 8705 | // Name of the package performing the op |
| 8706 | optional string package_name = 2; |
| 8707 | |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 8708 | // tag; provided by developer when accessing related API, limited at 50 chars by API. |
| 8709 | // Attributions must be provided through manifest using <attribution> tag available in R and |
| 8710 | // above. |
| 8711 | optional string tag = 3; |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 8712 | |
Stanislav Zholnin | 48811ee | 2020-03-03 16:15:55 +0000 | [diff] [blame] | 8713 | // operation id |
| 8714 | optional android.app.AppOpEnum op = 4 [default = APP_OP_NONE]; |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 8715 | |
| 8716 | // The number of times the op was granted while the app was in the |
| 8717 | // foreground (only for trusted requests) |
| 8718 | optional int64 trusted_foreground_granted_count = 5; |
| 8719 | |
| 8720 | // The number of times the op was granted while the app was in the |
| 8721 | // background (only for trusted requests) |
| 8722 | optional int64 trusted_background_granted_count = 6; |
| 8723 | |
| 8724 | // The number of times the op was rejected while the app was in the |
| 8725 | // foreground (only for trusted requests) |
| 8726 | optional int64 trusted_foreground_rejected_count = 7; |
| 8727 | |
| 8728 | // The number of times the op was rejected while the app was in the |
| 8729 | // background (only for trusted requests) |
| 8730 | optional int64 trusted_background_rejected_count = 8; |
| 8731 | |
| 8732 | // For long-running operations, total duration of the operation |
| 8733 | // while the app was in the foreground (only for trusted requests) |
| 8734 | optional int64 trusted_foreground_duration_millis = 9; |
| 8735 | |
| 8736 | // For long-running operations, total duration of the operation |
| 8737 | // while the app was in the background (only for trusted requests) |
| 8738 | optional int64 trusted_background_duration_millis = 10; |
| 8739 | |
| 8740 | // Whether AppOps is guarded by Runtime permission |
| 8741 | optional bool is_runtime_permission = 11; |
Stanislav Zholnin | 5919913 | 2020-03-06 14:19:25 +0000 | [diff] [blame] | 8742 | |
| 8743 | // Sampling rate used on device, from 0 to 100 |
| 8744 | optional int32 sampling_rate = 12; |
Stanislav Zholnin | 7dcc51d | 2020-01-29 16:53:24 +0000 | [diff] [blame] | 8745 | } |
| 8746 | |
| 8747 | /** |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 8748 | * Location Manager API Usage information(e.g. API under usage, |
| 8749 | * API call's parameters). |
| 8750 | * Logged from: |
| 8751 | * frameworks/base/services/core/java/com/android/server/LocationManagerService.java |
| 8752 | */ |
| 8753 | message LocationManagerApiUsageReported { |
| 8754 | |
| 8755 | // Indicating if usage starts or usage ends. |
| 8756 | optional android.stats.location.UsageState state = 1; |
| 8757 | |
| 8758 | // LocationManagerService's API in use. |
| 8759 | // We can identify which API from LocationManager is |
| 8760 | // invoking current LMS API by the combination of |
| 8761 | // API parameter(e.g. is_listener_null, is_intent_null, |
| 8762 | // is_location_request_null) |
| 8763 | optional android.stats.location.LocationManagerServiceApi api_in_use = 2; |
| 8764 | |
| 8765 | // Name of the package calling the API. |
| 8766 | optional string calling_package_name = 3; |
| 8767 | |
| 8768 | // Type of the location provider. |
| 8769 | optional android.stats.location.ProviderType provider = 4; |
| 8770 | |
| 8771 | // Quality of the location request |
| 8772 | optional android.stats.location.LocationRequestQuality quality = 5; |
| 8773 | |
| 8774 | // The desired interval for active location updates, in milliseconds. |
| 8775 | // Bucketized to reduce cardinality. |
| 8776 | optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6; |
| 8777 | |
| 8778 | // Minimum distance between location updates, in meters. |
| 8779 | // Bucketized to reduce cardinality. |
| 8780 | optional android.stats.location.SmallestDisplacementBucket |
| 8781 | bucketized_smallest_displacement = 7; |
| 8782 | |
| 8783 | // The number of location updates. |
| 8784 | optional int64 num_updates = 8; |
| 8785 | |
| 8786 | // The request expiration time, in millisecond since boot. |
| 8787 | // Bucketized to reduce cardinality. |
| 8788 | optional android.stats.location.ExpirationBucket |
| 8789 | bucketized_expire_in = 9; |
| 8790 | |
| 8791 | // Type of Callback passed in for this API. |
| 8792 | optional android.stats.location.CallbackType callback_type = 10; |
| 8793 | |
| 8794 | // The radius of the central point of the alert |
| 8795 | // region, in meters. Only for API REQUEST_GEOFENCE. |
| 8796 | // Bucketized to reduce cardinality. |
| 8797 | optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11; |
| 8798 | |
| 8799 | // Activity Importance of API caller. |
| 8800 | // Categorized to 3 types that are interesting from location's perspective. |
| 8801 | optional android.stats.location.ActivityImportance activiy_importance = 12; |
| 8802 | } |
Stanislav Zholnin | 3d215df1 | 2019-06-05 16:48:20 +0100 | [diff] [blame] | 8803 | |
| 8804 | /** |
| 8805 | * Information about a permission grant or denial made by user inside ReviewPermissionsFragment |
| 8806 | */ |
| 8807 | message ReviewPermissionsFragmentResultReported { |
| 8808 | // unique value identifying a permission group change. A permission group change might result |
| 8809 | // in multiple of these atoms |
| 8810 | optional int64 change_id = 1; |
| 8811 | |
| 8812 | // UID of package the permission belongs to |
| 8813 | optional int32 uid = 2 [(is_uid) = true]; |
| 8814 | |
| 8815 | // Name of package the permission belongs to |
| 8816 | optional string package_name = 3; |
| 8817 | |
| 8818 | // The permission to be granted |
| 8819 | optional string permission_name = 4; |
| 8820 | |
| 8821 | // The result of the permission grant |
| 8822 | optional bool permission_granted = 5; |
| 8823 | } |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 8824 | |
| 8825 | /** |
| 8826 | * Information about results of permission upgrade by RuntimePermissionsUpgradeController |
| 8827 | * Logged from: RuntimePermissionUpdgradeController |
| 8828 | */ |
| 8829 | message RuntimePermissionsUpgradeResult { |
| 8830 | // Permission granted as result of upgrade |
| 8831 | optional string permission_name = 1; |
| 8832 | |
| 8833 | // UID of package granted permission |
| 8834 | optional int32 uid = 2 [(is_uid) = true]; |
| 8835 | |
| 8836 | // Name of package granted permission |
| 8837 | optional string package_name = 3; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 8838 | } |
| 8839 | |
| 8840 | /** |
| 8841 | * Information about a buttons presented in GrantPermissionsActivty and choice made by user |
| 8842 | */ |
| 8843 | message GrantPermissionsActivityButtonActions { |
| 8844 | // Permission granted as result of upgrade |
| 8845 | optional string permission_group_name = 1; |
| 8846 | |
| 8847 | // UID of package granted permission |
| 8848 | optional int32 uid = 2 [(is_uid) = true]; |
| 8849 | |
| 8850 | // Name of package requesting permission |
| 8851 | optional string package_name = 3; |
| 8852 | |
| 8853 | // Buttons presented in the dialog - bit flags, bit numbers are in accordance with |
| 8854 | // LABEL_ constants in GrantPermissionActivity.java |
| 8855 | optional int32 buttons_presented = 4; |
| 8856 | |
| 8857 | // Button clicked by user - same as bit flags in buttons_presented with only single bit set |
| 8858 | optional int32 button_clicked = 5; |
Evan Severson | 5dfc091 | 2020-02-06 14:50:23 -0800 | [diff] [blame] | 8859 | |
| 8860 | // id which identifies single session of user interacting with permission controller |
| 8861 | optional int64 session_id = 6; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 8862 | } |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 8863 | |
| 8864 | /** |
| 8865 | * Information about LocationAccessCheck notification presented to user |
| 8866 | */ |
| 8867 | message LocationAccessCheckNotificationAction { |
| 8868 | |
| 8869 | // id which identifies single session of user interacting with permission controller |
| 8870 | optional int64 session_id = 1; |
| 8871 | |
| 8872 | // Uid of package for which location access check is presented |
| 8873 | optional int32 package_uid = 2; |
| 8874 | |
| 8875 | // Name of package for which location access check is presented |
| 8876 | optional string package_name = 3; |
| 8877 | |
| 8878 | enum Result { |
| 8879 | UNDEFINED = 0; |
| 8880 | // notification was presented to the user |
| 8881 | NOTIFICATION_PRESENTED = 1; |
| 8882 | // notification was declined by the user |
| 8883 | NOTIFICATION_DECLINED = 2; |
| 8884 | // notification was clicked by the user |
| 8885 | NOTIFICATION_CLICKED = 3; |
| 8886 | } |
| 8887 | |
| 8888 | // View / interaction recorded |
| 8889 | optional Result result = 4; |
| 8890 | } |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 8891 | |
| 8892 | /** |
| 8893 | * Information about a permission grant or revoke made by user inside AppPermissionFragment |
| 8894 | */ |
| 8895 | message AppPermissionFragmentActionReported { |
| 8896 | // id which identifies single session of user interacting with permission controller |
| 8897 | optional int64 session_id = 1; |
| 8898 | |
| 8899 | // unique value identifying a permission group change. A permission group change might result |
| 8900 | // in multiple of these atoms |
| 8901 | optional int64 change_id = 2; |
| 8902 | |
| 8903 | // UID of package the permission belongs to |
| 8904 | optional int32 uid = 3 [(is_uid) = true]; |
| 8905 | |
| 8906 | // Name of package the permission belongs to |
| 8907 | optional string package_name = 4; |
| 8908 | |
| 8909 | // The permission to be granted |
| 8910 | optional string permission_name = 5; |
| 8911 | |
| 8912 | // The result of the permission grant |
| 8913 | optional bool permission_granted = 6; |
Stanislav Zholnin | 126da0c | 2020-01-28 16:50:43 +0000 | [diff] [blame] | 8914 | |
| 8915 | // State of Permission Flags after grant as per android.content.pm.PermissionFlags |
| 8916 | optional int32 permission_flags = 7; |
| 8917 | |
| 8918 | enum Button { |
| 8919 | UNDEFINED = 0; |
| 8920 | // Allow button |
| 8921 | ALLOW = 1; |
| 8922 | // Deny button |
| 8923 | DENY = 2; |
| 8924 | // Ask every time button |
| 8925 | ASK_EVERY_TIME = 3; |
| 8926 | // Allow all the time button |
| 8927 | ALLOW_ALWAYS = 4; |
| 8928 | // Allow only while using the app button |
| 8929 | ALLOW_FOREGROUND = 5; |
| 8930 | // Same is Deny button but shown in while in use dialog |
| 8931 | DENY_FOREGROUND = 6; |
| 8932 | } |
| 8933 | |
| 8934 | // Button pressed in the dialog |
| 8935 | optional Button button_pressed = 8; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 8936 | } |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 8937 | |
| 8938 | /** |
| 8939 | * Information about a AppPermissionFragment viewed by user |
| 8940 | */ |
| 8941 | message AppPermissionFragmentViewed { |
| 8942 | // id which identifies single session of user interacting with permission controller |
| 8943 | optional int64 session_id = 1; |
| 8944 | |
| 8945 | // UID of package for which permissions are viewed |
| 8946 | optional int32 uid = 2 [(is_uid) = true]; |
| 8947 | |
| 8948 | // Name of package for which permissions are viewed |
| 8949 | optional string package_name = 3; |
| 8950 | |
| 8951 | // Permission group viewed |
| 8952 | optional string permission_group_name = 4; |
| 8953 | } |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 8954 | |
| 8955 | /** |
Nate Myren | e8f912bb | 2020-04-30 10:41:38 -0700 | [diff] [blame] | 8956 | * Information about a AppPermissionGroupsFragment viewed by user. Fragment has been renamed, but |
| 8957 | * the log retains the old fragment name. |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 8958 | */ |
| 8959 | message AppPermissionsFragmentViewed { |
| 8960 | // id which identifies single session of user interacting with permission controller |
| 8961 | optional int64 session_id = 1; |
| 8962 | |
| 8963 | // id which identifies single view as every view might have several logging records |
| 8964 | // with different package information attached |
| 8965 | optional int64 view_id = 2; |
| 8966 | |
| 8967 | // Permission group viewed |
| 8968 | optional string permission_group_name = 3; |
| 8969 | |
| 8970 | // UID of package for which permissions are viewed |
| 8971 | optional int32 uid = 4 [(is_uid) = true]; |
| 8972 | |
| 8973 | // Name of package for which permissions are viewed |
| 8974 | optional string package_name = 5; |
| 8975 | |
| 8976 | // Category in which permission is included |
| 8977 | enum Category { |
| 8978 | UNDEFINED = 0; |
| 8979 | ALLOWED = 1; |
| 8980 | ALLOWED_FOREGROUND = 2; |
| 8981 | DENIED = 3; |
| 8982 | } |
| 8983 | optional Category category = 6; |
| 8984 | } |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 8985 | /** |
| 8986 | * Information about a PermissionAppsFragment viewed by user. |
| 8987 | * Logged from ui/handheld/PermissionAppsFragment.java |
| 8988 | */ |
| 8989 | message PermissionAppsFragmentViewed { |
| 8990 | // id which identifies single session of user interacting with permission controller |
| 8991 | optional int64 session_id = 1; |
| 8992 | |
| 8993 | // id which identifies single view as every view might have several logging records |
| 8994 | // with different package information attached |
| 8995 | optional int64 view_id = 2; |
| 8996 | |
| 8997 | // Permission group viewed |
| 8998 | optional string permission_group_name = 3; |
| 8999 | |
| 9000 | // UID of package for which permissions are viewed |
| 9001 | optional int32 uid = 4 [(is_uid) = true]; |
| 9002 | |
| 9003 | // Name of package for which permissions are viewed |
| 9004 | optional string package_name = 5; |
| 9005 | |
| 9006 | // Category in which app is included |
| 9007 | enum Category { |
| 9008 | UNDEFINED = 0; |
| 9009 | ALLOWED = 1; |
| 9010 | ALLOWED_FOREGROUND = 2; |
| 9011 | DENIED = 3; |
| 9012 | } |
| 9013 | optional Category category = 6; |
| 9014 | } |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9015 | |
| 9016 | /** |
Nate Myren | e8f912bb | 2020-04-30 10:41:38 -0700 | [diff] [blame] | 9017 | * Log that the Auto Revoke notification has been clicked |
| 9018 | * Logged from ui/ManagePermissionsActivity |
| 9019 | */ |
| 9020 | message AutoRevokeNotificationClicked { |
| 9021 | // id which identifies single session of user interacting with permission controller |
| 9022 | optional int64 session_id = 1; |
| 9023 | } |
| 9024 | |
| 9025 | /** |
| 9026 | * Log that an app has been displayed on the auto revoke page, and lists one permission that was |
| 9027 | * auto revoked for it. |
| 9028 | * Logged from ui/handheld/AutoRevokeFragment |
| 9029 | */ |
| 9030 | message AutoRevokeFragmentAppViewed { |
| 9031 | // id which identifies single session of user interacting with permission controller |
| 9032 | optional int64 session_id = 1; |
| 9033 | |
| 9034 | // UID of package for which permissions are viewed |
| 9035 | optional int32 uid = 2 [(is_uid) = true]; |
| 9036 | |
| 9037 | // Name of package for which permissions are viewed |
| 9038 | optional string package_name = 3; |
| 9039 | |
| 9040 | // The name of a permission group that has been revoked |
| 9041 | optional string permission_group_name = 4; |
| 9042 | |
| 9043 | // The age of the app- more than three months old, or more than six months |
| 9044 | enum Age { |
| 9045 | UNDEFINED = 0; |
| 9046 | NEWER_BUCKET = 1; |
| 9047 | OLDER_BUCKET = 2; |
| 9048 | } |
| 9049 | |
| 9050 | // How long the app has been unused. Currently, newer bucket is 3 months, older is 6 months |
| 9051 | optional Age age = 5; |
| 9052 | } |
| 9053 | |
| 9054 | /** |
| 9055 | * Log that the user has interacted with an app on the auto revoke fragment |
| 9056 | * Logged from ui/handheld/AutoRevokeFragment |
| 9057 | */ |
| 9058 | message AutoRevokedAppInteraction { |
| 9059 | // id which identifies single session of user interacting with permission controller |
| 9060 | optional int64 session_id = 1; |
| 9061 | |
| 9062 | // UID of package for which permissions are viewed |
| 9063 | optional int32 uid = 2 [(is_uid) = true]; |
| 9064 | |
| 9065 | // Name of package for which permissions are viewed |
| 9066 | optional string package_name = 3; |
| 9067 | |
| 9068 | enum Action { |
| 9069 | UNDEFINED = 0; |
| 9070 | REMOVE = 1; |
| 9071 | OPEN = 2; |
| 9072 | APP_INFO = 3; |
| 9073 | PERMISSIONS = 4; |
| 9074 | REMOVE_IN_SETTINGS = 5; |
| 9075 | OPEN_IN_SETTINGS = 6; |
| 9076 | } |
| 9077 | |
| 9078 | // The action the user took to interact with the app |
| 9079 | optional Action action = 4; |
| 9080 | } |
| 9081 | |
| 9082 | /** |
| 9083 | * Log that the AppPermissionGroupsFragment has been interacted with for the possible purposes of |
| 9084 | * auto revoke, or that the auto revoke switch has been changed |
| 9085 | * Logged from ui/handheld/AppPermissionGroupsFragment |
| 9086 | */ |
| 9087 | message AppPermissionGroupsFragmentAutoRevokeAction { |
| 9088 | // id which identifies single session of user interacting with permission controller |
| 9089 | optional int64 session_id = 1; |
| 9090 | |
| 9091 | // UID of package for which permissions are viewed |
| 9092 | optional int32 uid = 2 [(is_uid) = true]; |
| 9093 | |
| 9094 | // Name of package for which permissions are viewed |
| 9095 | optional string package_name = 3; |
| 9096 | |
| 9097 | enum Action { |
| 9098 | UNDEFINED = 0; |
| 9099 | OPENED_FOR_AUTO_REVOKE = 1; |
| 9100 | OPENED_FROM_INTENT = 2; |
| 9101 | SWITCH_ENABLED = 3; |
| 9102 | SWITCH_DISABLED = 4; |
| 9103 | } |
| 9104 | |
| 9105 | // The action the user took to interact with the fragment |
| 9106 | optional Action action = 4; |
| 9107 | } |
| 9108 | |
| 9109 | /** |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9110 | * Logs when there is a smart selection related event. |
| 9111 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 9112 | * Logged from: TextClassifierEventLogger.java |
| 9113 | */ |
| 9114 | message TextSelectionEvent { |
| 9115 | // A session ID. |
| 9116 | optional string session_id = 1; |
| 9117 | |
| 9118 | // Event type of this event. |
| 9119 | optional android.stats.textclassifier.EventType event_type = 2; |
| 9120 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 9121 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9122 | optional string model_name = 3; |
| 9123 | |
| 9124 | // Type of widget that was involved in triggering this event. |
| 9125 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 9126 | |
| 9127 | // Index of this event in a session. |
| 9128 | optional int32 event_index = 5; |
| 9129 | |
| 9130 | // Entity type that is involved. |
| 9131 | optional string entity_type = 6; |
| 9132 | |
| 9133 | // Relative word index of the start of the selection. |
| 9134 | optional int32 relative_word_start_index = 7; |
| 9135 | |
| 9136 | // Relative word (exclusive) index of the end of the selection. |
| 9137 | optional int32 relative_word_end_index = 8; |
| 9138 | |
| 9139 | // Relative word index of the start of the smart selection. |
| 9140 | optional int32 relative_suggested_word_start_index = 9; |
| 9141 | |
| 9142 | // Relative word (exclusive) index of the end of the smart selection. |
| 9143 | optional int32 relative_suggested_word_end_index = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 9144 | |
| 9145 | // Name of source package. |
| 9146 | optional string package_name = 11; |
Tony Mak | 2c00495 | 2020-03-27 17:16:47 +0000 | [diff] [blame] | 9147 | |
| 9148 | // Name of the LangID model that is involved in this event. |
| 9149 | optional string langid_model_name = 12; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9150 | } |
| 9151 | |
| 9152 | /** |
| 9153 | * Logs when there is a smart linkify related event. |
| 9154 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 9155 | * Logged from: TextClassifierEventLogger.java |
| 9156 | */ |
| 9157 | message TextLinkifyEvent { |
| 9158 | // A session ID. |
| 9159 | optional string session_id = 1; |
| 9160 | |
| 9161 | // Event type of this event. |
| 9162 | optional android.stats.textclassifier.EventType event_type = 2; |
| 9163 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 9164 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9165 | optional string model_name = 3; |
| 9166 | |
| 9167 | // Type of widget that was involved in triggering this event. |
| 9168 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 9169 | |
| 9170 | // Index of this event in a session. |
| 9171 | optional int32 event_index = 5; |
| 9172 | |
| 9173 | // Entity type that is involved. |
| 9174 | optional string entity_type = 6; |
| 9175 | |
| 9176 | // Number of links detected. |
| 9177 | optional int32 num_links = 7; |
| 9178 | |
| 9179 | // The total length of all links. |
| 9180 | optional int32 linked_text_length = 8; |
| 9181 | |
| 9182 | // Length of input text. |
| 9183 | optional int32 text_length = 9; |
| 9184 | |
| 9185 | // Time spent on generating links in ms. |
| 9186 | optional int64 latency_millis = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 9187 | |
| 9188 | // Name of source package. |
| 9189 | optional string package_name = 11; |
Tony Mak | 2c00495 | 2020-03-27 17:16:47 +0000 | [diff] [blame] | 9190 | |
| 9191 | // Name of the LangID model that is involved in this event. |
| 9192 | optional string langid_model_name = 12; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9193 | } |
| 9194 | |
| 9195 | /** |
| 9196 | * Logs when there is a conversation actions related event. |
| 9197 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 9198 | * Logged from: TextClassifierEventLogger.java |
| 9199 | */ |
| 9200 | message ConversationActionsEvent { |
| 9201 | // A session ID. |
| 9202 | optional string session_id = 1; |
| 9203 | |
| 9204 | // Event type of this event. |
| 9205 | optional android.stats.textclassifier.EventType event_type = 2; |
| 9206 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 9207 | // Name of the actions model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9208 | optional string model_name = 3; |
| 9209 | |
| 9210 | // Type of widget that was involved in triggering this event. |
| 9211 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 9212 | |
| 9213 | // The first entity type that is involved. |
| 9214 | optional string first_entity_type = 5; |
| 9215 | |
| 9216 | // The second entity type that is involved. |
| 9217 | optional string second_entity_type = 6; |
| 9218 | |
| 9219 | // The third entity type that is involved. |
| 9220 | optional string third_entity_type = 7; |
| 9221 | |
| 9222 | // The score of the first entity type. |
| 9223 | optional float score = 8; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 9224 | |
| 9225 | // Name of source package. |
| 9226 | optional string package_name = 9; |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 9227 | |
| 9228 | // Name of the annotator model that is involved in this event. |
| 9229 | optional string annotator_model_name = 10; |
Tony Mak | 2c00495 | 2020-03-27 17:16:47 +0000 | [diff] [blame] | 9230 | |
| 9231 | // Name of the LangID model that is involved in this event. |
| 9232 | optional string langid_model_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9233 | } |
| 9234 | |
| 9235 | /** |
| 9236 | * Logs when there is a language detection related event. |
| 9237 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 9238 | * Logged from: TextClassifierEventLogger.java |
| 9239 | */ |
| 9240 | message LanguageDetectionEvent { |
| 9241 | // A session ID. |
| 9242 | optional string session_id = 1; |
| 9243 | |
| 9244 | // Event type of this event. |
| 9245 | optional android.stats.textclassifier.EventType event_type = 2; |
| 9246 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 9247 | // Name of the language detection model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9248 | optional string model_name = 3; |
| 9249 | |
| 9250 | // Type of widget that was involved in triggering this event. |
| 9251 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 9252 | |
| 9253 | // Detected language. |
| 9254 | optional string language_tag = 5; |
| 9255 | |
| 9256 | // Score of the detected language. |
| 9257 | optional float score = 6; |
| 9258 | |
| 9259 | // Position of this action. |
| 9260 | optional int32 action_index = 7; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 9261 | |
| 9262 | // Name of source package. |
| 9263 | optional string package_name = 8; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 9264 | } |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9265 | |
| 9266 | /** |
| 9267 | * Information about an OTA update attempt by update_engine. |
| 9268 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 9269 | */ |
| 9270 | message UpdateEngineUpdateAttemptReported { |
| 9271 | // The number of attempts for the update engine to apply a given payload. |
| 9272 | optional int32 attempt_number = 1; |
| 9273 | |
| 9274 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 9275 | |
| 9276 | // The total time in minutes for the update engine to apply a given payload. |
| 9277 | // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and |
| 9278 | // it's increased when the system is sleeping. |
| 9279 | optional int32 duration_boottime_in_minutes = 3; |
| 9280 | |
| 9281 | // The total time in minutes for the update engine to apply a given payload. |
| 9282 | // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW; |
| 9283 | // and it's not increased when the system is sleeping. |
| 9284 | optional int32 duration_monotonic_in_minutes = 4; |
| 9285 | |
| 9286 | // The size of the payload in MiBs. |
| 9287 | optional int32 payload_size_mib = 5; |
| 9288 | |
| 9289 | // The attempt result reported by the update engine for an OTA update. |
| 9290 | optional android.stats.otaupdate.AttemptResult attempt_result = 6; |
| 9291 | |
| 9292 | // The error code reported by the update engine after an OTA update attempt |
| 9293 | // on A/B devices. |
| 9294 | optional android.stats.otaupdate.ErrorCode error_code = 7; |
| 9295 | |
| 9296 | // The build fingerprint of the source system. The value is read from a |
| 9297 | // system property when the device takes the update. e.g. |
| 9298 | // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys |
| 9299 | optional string source_fingerprint = 8; |
Alessio Balsini | d8698fa | 2020-05-26 22:26:56 +0100 | [diff] [blame] | 9300 | |
| 9301 | // Size of super partition. |
| 9302 | optional int64 super_partition_size_bytes = 9; |
| 9303 | |
| 9304 | // Size of current slot within the super partition. |
| 9305 | optional int64 slot_size_bytes = 10; |
| 9306 | |
| 9307 | // Free space available in the super partition. |
| 9308 | optional int64 super_free_space_bytes = 11; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 9309 | } |
| 9310 | |
| 9311 | /** |
| 9312 | * Information about all the attempts the device make before finishing the |
| 9313 | * successful update. |
| 9314 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 9315 | */ |
| 9316 | message UpdateEngineSuccessfulUpdateReported { |
| 9317 | // The number of attempts for the update engine to apply the payload for a |
| 9318 | // successful update. |
| 9319 | optional int32 attempt_count = 1; |
| 9320 | |
| 9321 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 9322 | |
| 9323 | optional int32 payload_size_mib = 3; |
| 9324 | |
| 9325 | // The total number of bytes downloaded by update_engine since the last |
| 9326 | // successful update. |
| 9327 | optional int32 total_bytes_downloaded_mib = 4; |
| 9328 | |
| 9329 | // The ratio in percentage of the over-downloaded bytes compared to the |
| 9330 | // total bytes needed to successfully install the update. e.g. 200 if we |
| 9331 | // download 200MiB in total for a 100MiB package. |
| 9332 | optional int32 download_overhead_percentage = 5; |
| 9333 | |
| 9334 | // The total time in minutes for the update engine to apply the payload for a |
| 9335 | // successful update. |
| 9336 | optional int32 total_duration_minutes = 6; |
| 9337 | |
| 9338 | // The number of reboot of the device during a successful update. |
| 9339 | optional int32 reboot_count = 7; |
| 9340 | } |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 9341 | |
| 9342 | /** |
Kenny Root | 4eacaaa | 2020-01-08 20:48:13 -0800 | [diff] [blame] | 9343 | * Reported when the RebootEscrow HAL has attempted to recover the escrowed |
| 9344 | * key to indicate whether it was successful or not. |
| 9345 | * |
| 9346 | * Logged from: |
| 9347 | * frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java |
| 9348 | */ |
| 9349 | message RebootEscrowRecoveryReported { |
| 9350 | optional bool successful = 1; |
| 9351 | } |
| 9352 | |
| 9353 | /** |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 9354 | * Global display pipeline metrics reported by SurfaceFlinger. |
| 9355 | * Pulled from: |
| 9356 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 9357 | */ |
| 9358 | message SurfaceflingerStatsGlobalInfo { |
| 9359 | // Total number of frames presented during the tracing period |
| 9360 | optional int64 total_frames = 1; |
| 9361 | // Total number of frames missed |
| 9362 | optional int64 missed_frames = 2; |
| 9363 | // Total number of frames that fell back to client composition |
| 9364 | optional int64 client_composition_frames = 3; |
| 9365 | // Total time the display was turned on |
| 9366 | optional int64 display_on_millis = 4; |
| 9367 | // Total time that was spent performing animations. |
| 9368 | // This is derived from the present-to-present layer histogram |
| 9369 | optional int64 animation_millis = 5; |
Alec Mouri | a262245 | 2020-02-10 17:46:50 -0800 | [diff] [blame] | 9370 | // Total number of event connections tracked by SurfaceFlinger at the time |
| 9371 | // of this pull. If this number grows prohibitively large, then this can |
| 9372 | // cause jank due to resource contention. |
| 9373 | optional int32 event_connection_count = 6; |
Alec Mouri | bb55b7f | 2020-02-12 17:35:01 -0800 | [diff] [blame] | 9374 | // Set of timings measured from when SurfaceFlinger began compositing a |
| 9375 | // frame, until the frame was requested to be presented to the display. This |
| 9376 | // measures SurfaceFlinger's total CPU walltime on the critical path per |
| 9377 | // frame. |
| 9378 | optional FrameTimingHistogram frame_duration = 7 |
| 9379 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9380 | // Set of timings measured from when SurfaceFlinger first began using the |
| 9381 | // GPU to composite a frame, until the GPU has finished compositing that |
| 9382 | // frame. This measures the total additional time SurfaceFlinger needed to |
| 9383 | // perform due to falling back into GPU composition. |
| 9384 | optional FrameTimingHistogram render_engine_timing = 8 |
| 9385 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 9386 | } |
| 9387 | |
| 9388 | /** |
| 9389 | * Per-layer display pipeline metrics reported by SurfaceFlinger. |
| 9390 | * The number of layers uploaded will be restricted due to size limitations. |
| 9391 | * Pulled from: |
| 9392 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 9393 | */ |
| 9394 | message SurfaceflingerStatsLayerInfo { |
| 9395 | // The layer for this set of metrics |
| 9396 | // For now we can infer that the package name is included in the layer |
| 9397 | // name. |
| 9398 | optional string layer_name = 1; |
| 9399 | // Total number of frames presented |
| 9400 | optional int64 total_frames = 2; |
| 9401 | // Total number of dropped frames while latching a buffer for this layer. |
| 9402 | optional int64 dropped_frames = 3; |
| 9403 | // Set of timings measured between successive presentation timestamps. |
| 9404 | optional FrameTimingHistogram present_to_present = 4 |
| 9405 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9406 | // Set of timings measured from when an app queued a buffer for |
| 9407 | // presentation, until the buffer was actually presented to the |
| 9408 | // display. |
| 9409 | optional FrameTimingHistogram post_to_present = 5 |
| 9410 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9411 | // Set of timings measured from when a buffer is ready to be presented, |
| 9412 | // until the buffer was actually presented to the display. |
| 9413 | optional FrameTimingHistogram acquire_to_present = 6 |
| 9414 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9415 | // Set of timings measured from when a buffer was latched by |
| 9416 | // SurfaceFlinger, until the buffer was presented to the display |
| 9417 | optional FrameTimingHistogram latch_to_present = 7 |
| 9418 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9419 | // Set of timings measured from the desired presentation to the actual |
| 9420 | // presentation time |
| 9421 | optional FrameTimingHistogram desired_to_present = 8 |
| 9422 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9423 | // Set of timings measured from when an app queued a buffer for |
| 9424 | // presentation, until the buffer was ready to be presented. |
| 9425 | optional FrameTimingHistogram post_to_acquire = 9 |
| 9426 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 59cdc901 | 2020-02-10 10:58:39 -0800 | [diff] [blame] | 9427 | // Frames missed latch because the acquire fence didn't fire |
| 9428 | optional int64 late_acquire_frames = 10; |
| 9429 | // Frames latched early because the desired present time was bad |
| 9430 | optional int64 bad_desired_present_frames = 11; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 9431 | } |
| 9432 | |
| 9433 | /** |
| 9434 | * Histogram of frame counts bucketed by time in milliseconds. |
| 9435 | * Because of size limitations, we hard-cap the number of buckets, with |
| 9436 | * buckets for corresponding to larger milliseconds being less precise. |
| 9437 | */ |
| 9438 | message FrameTimingHistogram { |
| 9439 | // Timings in milliseconds that describes a set of histogram buckets |
| 9440 | repeated int32 time_millis_buckets = 1; |
| 9441 | // Number of frames that match to each time_millis, i.e. the bucket |
| 9442 | // contents |
| 9443 | // It's required that len(time_millis) == len(frame_count) |
| 9444 | repeated int64 frame_counts = 2; |
| 9445 | } |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 9446 | |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 9447 | /** |
Alec Mouri | 5ac3262 | 2020-02-06 08:44:25 -0800 | [diff] [blame] | 9448 | * Janky event as reported by SurfaceFlinger. |
| 9449 | * This event is intended to be consumed by a Perfetto subscriber for |
| 9450 | * automated trace collection. |
| 9451 | * |
| 9452 | * Logged from: |
| 9453 | * frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp |
| 9454 | */ |
| 9455 | message DisplayJankReported { |
| 9456 | // Informational field for how long the janky event lasted in milliseconds |
| 9457 | optional int64 event_duration_millis = 1; |
| 9458 | // Number of frame deadlines missed, where SurfaceFlinger failed to update |
| 9459 | // the display on time. |
| 9460 | optional int32 present_deadlines_missed = 2; |
| 9461 | } |
| 9462 | |
| 9463 | /** |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 9464 | * Information about camera facing and API level usage. |
| 9465 | * Logged from: |
| 9466 | * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java |
| 9467 | */ |
| 9468 | message CameraActionEvent { |
| 9469 | // Camera session duration |
Emilian Peev | 6ea6fe9 | 2020-02-24 15:31:34 -0800 | [diff] [blame] | 9470 | optional int64 duration_millis = 1; |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 9471 | |
| 9472 | // Camera API level used |
| 9473 | optional int32 api_level = 2; |
| 9474 | |
| 9475 | // Name of client package |
| 9476 | optional string package_name = 3; |
| 9477 | |
| 9478 | // Camera facing |
| 9479 | enum Facing { |
| 9480 | UNKNOWN = 0; |
| 9481 | BACK = 1; |
| 9482 | FRONT = 2; |
| 9483 | EXTERNAL = 3; |
| 9484 | } |
| 9485 | optional Facing facing = 4; |
| 9486 | } |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 9487 | |
| 9488 | /** |
| 9489 | * Logs when a compatibility change is affecting an app. |
| 9490 | * |
| 9491 | * Logged from: |
| 9492 | * frameworks/base/core/java/android/app/AppCompatCallbacks.java and |
| 9493 | * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java |
| 9494 | */ |
| 9495 | message AppCompatibilityChangeReported { |
| 9496 | // The UID of the app being affected by the compatibilty change. |
| 9497 | optional int32 uid = 1 [(is_uid) = true]; |
| 9498 | |
| 9499 | // The ID of the change affecting the app. |
| 9500 | optional int64 change_id = 2; |
| 9501 | |
| 9502 | enum State { |
| 9503 | UNKNOWN_STATE = 0; |
| 9504 | ENABLED = 1; |
| 9505 | DISABLED = 2; |
| 9506 | LOGGED = 3; |
| 9507 | } |
| 9508 | |
| 9509 | // The state of the change - if logged from gating whether it was enabled or disabled, or just |
| 9510 | // logged otherwise. |
| 9511 | optional State state = 3; |
| 9512 | |
| 9513 | enum Source { |
| 9514 | UNKNOWN_SOURCE = 0; |
| 9515 | APP_PROCESS = 1; |
| 9516 | SYSTEM_SERVER = 2; |
| 9517 | } |
| 9518 | |
| 9519 | // Where it was logged from. |
| 9520 | optional Source source = 4; |
| 9521 | |
| 9522 | } |
Hector Dearman | 40579f6 | 2019-11-01 13:19:30 +0000 | [diff] [blame] | 9523 | |
| 9524 | /** |
| 9525 | * Logged from |
| 9526 | * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc |
| 9527 | */ |
| 9528 | message PerfettoUploaded { |
| 9529 | enum Event { |
| 9530 | PERFETTO_UNDEFINED = 0; |
| 9531 | PERFETTO_TRACE_BEGIN = 1; |
| 9532 | PERFETTO_BACKGROUND_TRACE_BEGIN = 2; |
| 9533 | PERFETTO_ON_CONNECT = 3; |
| 9534 | PERFETTO_ON_TRACING_DISABLED = 4; |
| 9535 | PERFETTO_UPLOAD_DROPBOX_BEGIN = 5; |
| 9536 | PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6; |
| 9537 | PERFETTO_UPLOAD_DROPBOX_FAILURE = 7; |
| 9538 | PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; |
| 9539 | PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9; |
| 9540 | PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; |
| 9541 | PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; |
| 9542 | PERFETTO_TRIGGER_BEGIN = 12; |
| 9543 | PERFETTO_TRIGGER_SUCCESS = 13; |
| 9544 | PERFETTO_TRIGGER_FAILURE = 14; |
| 9545 | PERFETTO_HIT_GUARDRAILS = 15; |
| 9546 | PERFETTO_ON_TIMEOUT = 16; |
| 9547 | PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; |
| 9548 | } |
| 9549 | |
| 9550 | // Which stage of the pipeline we are reporting from. |
| 9551 | optional Event event = 1; |
| 9552 | |
| 9553 | // UUID matching the one set inside the SystemInfo trace packet. |
| 9554 | optional int64 trace_uuid_lsb = 2; |
| 9555 | optional int64 trace_uuid_msb = 3; |
| 9556 | } |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 9557 | |
| 9558 | /** |
| 9559 | * Pulls client metrics on data transferred via Vehicle Maps Service. |
| 9560 | * Metrics are keyed by uid + layer. |
| 9561 | * |
| 9562 | * Pulled from: |
| 9563 | * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java |
| 9564 | */ |
| 9565 | message VmsClientStats { |
| 9566 | // UID of the VMS client app |
| 9567 | optional int32 uid = 1 [(is_uid) = true]; |
| 9568 | |
| 9569 | // VMS layer definition |
| 9570 | optional int32 layer_type = 2; |
| 9571 | optional int32 layer_channel = 3; |
| 9572 | optional int32 layer_version = 4; |
| 9573 | |
| 9574 | // Bytes and packets sent by the client for the layer |
| 9575 | optional int64 tx_bytes = 5; |
| 9576 | optional int64 tx_packets = 6; |
| 9577 | |
| 9578 | // Bytes and packets received by the client for the layer |
| 9579 | optional int64 rx_bytes = 7; |
| 9580 | optional int64 rx_packets = 8; |
| 9581 | |
| 9582 | // Bytes and packets dropped due to client error |
| 9583 | optional int64 dropped_bytes = 9; |
| 9584 | optional int64 dropped_packets = 10; |
| 9585 | } |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 9586 | |
| 9587 | /** |
| 9588 | * State of a dangerous permission requested by a package - sampled |
| 9589 | * Pulled from: StatsCompanionService.java with data obtained from PackageManager API |
| 9590 | */ |
| 9591 | message DangerousPermissionStateSampled { |
| 9592 | // Name of the permission |
| 9593 | optional string permission_name = 1; |
| 9594 | |
| 9595 | // Uid of the package |
| 9596 | optional int32 uid = 2 [(is_uid) = true]; |
| 9597 | |
| 9598 | // If the permission is granted to the uid |
| 9599 | optional bool is_granted = 3; |
| 9600 | |
| 9601 | // Permission flags as per android.content.pm.PermissionFlags |
| 9602 | optional int32 permission_flags = 4; |
| 9603 | } |
| 9604 | |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 9605 | /** |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 9606 | * HWUI stats for a given app. |
| 9607 | */ |
| 9608 | message GraphicsStats { |
| 9609 | // The package name of the app |
| 9610 | optional string package_name = 1; |
| 9611 | |
| 9612 | // The version code of the app |
| 9613 | optional int64 version_code = 2; |
| 9614 | |
| 9615 | // The start & end timestamps in UTC as |
| 9616 | // milliseconds since January 1, 1970 |
| 9617 | // Compatible with java.util.Date#setTime() |
Stan Iliev | b651719 | 2020-02-18 10:12:42 -0500 | [diff] [blame] | 9618 | optional int64 start_millis = 3; |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 9619 | |
Stan Iliev | b651719 | 2020-02-18 10:12:42 -0500 | [diff] [blame] | 9620 | optional int64 end_millis = 4; |
| 9621 | |
| 9622 | // HWUI renders pipeline type: GL (1) or Vulkan (2). |
| 9623 | enum PipelineType { |
| 9624 | UNKNOWN = 0; |
| 9625 | GL = 1; |
| 9626 | VULKAN = 2; |
| 9627 | } |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 9628 | |
| 9629 | // HWUI renders pipeline type: GL or Vulkan. |
| 9630 | optional PipelineType pipeline = 5; |
| 9631 | |
| 9632 | // Distinct frame count. |
| 9633 | optional int32 total_frames = 6; |
| 9634 | |
| 9635 | // Number of "missed vsync" events. |
| 9636 | optional int32 missed_vsync_count = 7; |
| 9637 | |
| 9638 | // Number of frames in triple-buffering scenario (high input latency) |
| 9639 | optional int32 high_input_latency_count = 8; |
| 9640 | |
| 9641 | // Number of "slow UI thread" events. |
| 9642 | optional int32 slow_ui_thread_count = 9; |
| 9643 | |
| 9644 | // Number of "slow bitmap upload" events. |
| 9645 | optional int32 slow_bitmap_upload_count = 10; |
| 9646 | |
| 9647 | // Number of "slow draw" events. |
| 9648 | optional int32 slow_draw_count = 11; |
| 9649 | |
| 9650 | // Number of frames that missed their deadline (aka, visibly janked) |
| 9651 | optional int32 missed_deadline_count = 12; |
| 9652 | |
| 9653 | // The frame time histogram for the package |
| 9654 | optional FrameTimingHistogram cpu_histogram = 13 |
| 9655 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9656 | |
| 9657 | // The gpu frame time histogram for the package |
| 9658 | optional FrameTimingHistogram gpu_histogram = 14 |
| 9659 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 9660 | |
| 9661 | // UI mainline module version. |
| 9662 | optional int64 version_ui_module = 15; |
| 9663 | |
| 9664 | // If true, these are HWUI stats for up to a 24h period for a given app from today. |
| 9665 | // If false, these are HWUI stats for a 24h period for a given app from the last complete |
| 9666 | // day (yesterday). Stats from yesterday stay constant, while stats from today may change as |
| 9667 | // more apps are running / rendering. |
| 9668 | optional bool is_today = 16; |
| 9669 | } |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9670 | |
| 9671 | /** |
| 9672 | * Message related to dangerous (runtime) app ops access |
| 9673 | */ |
Stanislav Zholnin | 88c6f32 | 2020-01-29 14:48:11 +0000 | [diff] [blame] | 9674 | message RuntimeAppOpAccess { |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9675 | // Uid of the package accessing app op |
| 9676 | optional int32 uid = 1 [(is_uid) = true]; |
| 9677 | |
| 9678 | // Name of the package accessing app op |
| 9679 | optional string package_name = 2; |
| 9680 | |
Stanislav Zholnin | 3a2a6e4 | 2020-03-30 10:44:51 +0100 | [diff] [blame] | 9681 | // deprecated - set to empty string |
| 9682 | optional string op_deprecated = 3 [deprecated = true]; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9683 | |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 9684 | // 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] | 9685 | // API. Attributions must be provided through manifest using <attribution> tag available in R |
| 9686 | // and above. |
Philip P. Moltmann | 12ac3f4 | 2020-03-05 15:01:29 -0800 | [diff] [blame] | 9687 | optional string attribution_tag = 4; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9688 | |
| 9689 | // message related to app op access, limited to 600 chars by API |
| 9690 | optional string message = 5; |
| 9691 | |
| 9692 | enum SamplingStrategy { |
| 9693 | DEFAULT = 0; |
| 9694 | UNIFORM = 1; |
| 9695 | RARELY_USED = 2; |
Stanislav Zholnin | 4c32385 | 2020-03-04 18:03:24 +0000 | [diff] [blame] | 9696 | BOOT_TIME_SAMPLING = 3; |
Stanislav Zholnin | cb726cb | 2020-06-03 15:27:35 +0100 | [diff] [blame] | 9697 | UNIFORM_OPS = 4; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9698 | } |
| 9699 | |
| 9700 | // sampling strategy used to collect this message |
| 9701 | optional SamplingStrategy sampling_strategy = 6; |
Stanislav Zholnin | 3a2a6e4 | 2020-03-30 10:44:51 +0100 | [diff] [blame] | 9702 | |
| 9703 | // operation id |
| 9704 | optional android.app.AppOpEnum op = 7 [default = APP_OP_NONE]; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 9705 | } |
| 9706 | |
Nikita Ioffe | 41dd57e | 2020-01-10 16:05:08 +0000 | [diff] [blame] | 9707 | /* |
| 9708 | * Logs userspace reboot outcome and duration. |
| 9709 | * |
| 9710 | * Logged from: |
| 9711 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 9712 | */ |
| 9713 | message UserspaceRebootReported { |
| 9714 | // Possible outcomes of userspace reboot. |
| 9715 | enum Outcome { |
| 9716 | // Default value in case platform failed to determine the outcome. |
| 9717 | OUTCOME_UNKNOWN = 0; |
| 9718 | // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot). |
| 9719 | SUCCESS = 1; |
| 9720 | // Userspace reboot shutdown sequence was aborted. |
| 9721 | FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2; |
| 9722 | // Remounting userdata into checkpointing mode failed. |
| 9723 | FAILED_USERDATA_REMOUNT = 3; |
| 9724 | // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard |
| 9725 | // reboot. |
| 9726 | FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4; |
| 9727 | } |
| 9728 | // Outcome of userspace reboot. Always set. |
| 9729 | optional Outcome outcome = 1; |
| 9730 | // Duration of userspace reboot in case it has a successful outcome. |
| 9731 | // Duration is measured as time between userspace reboot was initiated and until boot completed |
| 9732 | // (e.g. sys.boot_completed=1). |
| 9733 | optional int64 duration_millis = 2; |
| 9734 | // State of primary user's (user0) credential encryption storage. |
| 9735 | enum UserEncryptionState { |
| 9736 | // Default value. |
| 9737 | USER_ENCRYPTION_STATE_UNKNOWN = 0; |
| 9738 | // Credential encrypted storage is unlocked. |
| 9739 | UNLOCKED = 1; |
| 9740 | // Credential encrypted storage is locked. |
| 9741 | LOCKED = 2; |
| 9742 | } |
| 9743 | // State of primary user's encryption storage at the moment boot completed. Always set. |
| 9744 | optional UserEncryptionState user_encryption_state = 3; |
| 9745 | } |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 9746 | |
| 9747 | /* |
| 9748 | * Logs integrity check information during each install. |
| 9749 | * |
| 9750 | * Logged from: |
| 9751 | * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java |
| 9752 | */ |
| 9753 | message IntegrityCheckResultReported { |
| 9754 | optional string package_name = 1; |
| 9755 | optional string app_certificate_hash = 2; |
Omer Nebil Yaveroglu | 0ade854 | 2020-01-24 12:47:46 +0000 | [diff] [blame] | 9756 | optional int64 version_code = 3; |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 9757 | optional string installer_package_name = 4; |
| 9758 | enum Response { |
| 9759 | UNKNOWN = 0; |
| 9760 | ALLOWED = 1; |
| 9761 | REJECTED = 2; |
| 9762 | FORCE_ALLOWED = 3; |
| 9763 | } |
| 9764 | optional Response response = 5; |
| 9765 | // An estimate on the cause of the response. This will only be populated for |
| 9766 | // REJECTED and FORCE_ALLOWED |
| 9767 | optional bool caused_by_app_cert_rule = 6; |
| 9768 | optional bool caused_by_installer_rule = 7; |
| 9769 | } |
| 9770 | |
| 9771 | /** |
| 9772 | * Logs the information about the rules and the provider whenever rules are |
| 9773 | * pushed into AppIntegrityManager. |
| 9774 | * |
| 9775 | * Logged from: |
| 9776 | * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java |
| 9777 | */ |
| 9778 | message IntegrityRulesPushed { |
| 9779 | optional bool success = 1; |
| 9780 | // Package name of the app that pushed the rules. |
| 9781 | optional string rule_provider = 2; |
| 9782 | // Version string of arbitrary format provided by the rule provider to |
| 9783 | // identify the rules. |
| 9784 | optional string rule_version = 3; |
| 9785 | } |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9786 | |
| 9787 | /** |
| 9788 | * Logs when a cell broadcast message is received on the device. |
| 9789 | * |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 9790 | * Logged from Cell Broadcast module and platform: |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9791 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 9792 | * packages/apps/CellBroadcastReceiver/ |
| 9793 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/CellBroadcastServiceManager.java |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9794 | */ |
| 9795 | message CellBroadcastMessageReported { |
| 9796 | // The type of Cell Broadcast message |
| 9797 | enum CbType { |
| 9798 | UNKNOWN_TYPE = 0; |
| 9799 | GSM = 1; |
| 9800 | CDMA = 2; |
| 9801 | CDMA_SPC = 3; |
| 9802 | } |
| 9803 | |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 9804 | // The parts of the cell broadcast message pipeline |
| 9805 | enum ReportSource { |
| 9806 | UNKNOWN_SOURCE = 0; |
| 9807 | FRAMEWORK = 1; |
| 9808 | CB_SERVICE = 2; |
| 9809 | CB_RECEIVER_APP = 3; |
| 9810 | } |
| 9811 | |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9812 | // GSM, CDMA, CDMA-SCP |
| 9813 | optional CbType type = 1; |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 9814 | |
| 9815 | // The source of the report |
| 9816 | optional ReportSource source = 2; |
| 9817 | } |
| 9818 | |
| 9819 | /** |
| 9820 | * Logs when a cell broadcast message is filtered out, or otherwise intentionally not sent to CBR. |
| 9821 | * |
| 9822 | * Logged from CellBroadcastService module: |
| 9823 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
| 9824 | */ |
| 9825 | message CellBroadcastMessageFiltered { |
| 9826 | enum FilterReason { |
| 9827 | NOT_FILTERED = 0; |
| 9828 | DUPLICATE_MESSAGE = 1; |
| 9829 | GEOFENCED_MESSAGE = 2; |
| 9830 | AREA_INFO_MESSAGE = 3; |
| 9831 | } |
| 9832 | |
| 9833 | // GSM, CDMA, CDMA-SCP |
| 9834 | optional CellBroadcastMessageReported.CbType type = 1; |
| 9835 | |
| 9836 | // The source of the report |
| 9837 | optional FilterReason filter = 2; |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9838 | } |
| 9839 | |
| 9840 | /** |
| 9841 | * Logs when an error occurs while handling a cell broadcast message; |
| 9842 | * |
| 9843 | * Logged from CellBroadcastService module: |
| 9844 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
| 9845 | */ |
| 9846 | message CellBroadcastMessageError { |
| 9847 | // The type of error raised when trying to handle a cell broadcast message |
| 9848 | enum ErrorType { |
| 9849 | UNKNOWN_TYPE = 0; |
| 9850 | CDMA_DECODING_ERROR = 1; |
| 9851 | CDMA_SCP_EMPTY = 2; |
| 9852 | CDMA_SCP_HANDLING_ERROR = 3; |
| 9853 | GSM_INVALID_HEADER_LENGTH = 4; |
| 9854 | GSM_UNSUPPORTED_HEADER_MESSAGE_TYPE = 5; |
| 9855 | GSM_UNSUPPORTED_HEADER_DATA_CODING_SCHEME = 6; |
| 9856 | GSM_INVALID_PDU = 7; |
| 9857 | GSM_INVALID_GEO_FENCING_DATA = 8; |
| 9858 | GSM_UMTS_INVALID_WAC = 9; |
| 9859 | FAILED_TO_INSERT_TO_DB = 10; |
| 9860 | UNEXPECTED_GEOMETRY_FROM_FWK = 11; |
| 9861 | UNEXPECTED_GSM_MESSAGE_TYPE_FROM_FWK = 12; |
| 9862 | UNEXPECTED_CDMA_MESSAGE_TYPE_FROM_FWK = 13; |
| 9863 | UNEXPECTED_CDMA_SCP_MESSAGE_TYPE_FROM_FWK = 14; |
Jordan Liu | 900e5cb | 2020-05-29 09:44:59 -0700 | [diff] [blame] | 9864 | NO_CONNECTION_TO_CB_SERVICE = 15; |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 9865 | } |
| 9866 | |
| 9867 | // What kind of error occurred |
| 9868 | optional ErrorType type = 1; |
| 9869 | |
| 9870 | // Exception message (or log message) associated with the error (max 1000 chars) |
| 9871 | optional string exception_message = 2; |
| 9872 | } |
Anton Hansson | 5a48e4b | 2020-02-06 14:50:35 +0000 | [diff] [blame] | 9873 | |
| 9874 | /** |
Henry Fang | e316ab6 | 2020-04-21 18:43:14 -0700 | [diff] [blame] | 9875 | * Logs when a tune occurs through device's Frontend. |
| 9876 | * This is atom ID 276. |
| 9877 | * |
| 9878 | * Logged from: |
| 9879 | * frameworks/base/media/java/android/media/tv/tuner/Tuner.java |
| 9880 | */ |
| 9881 | message TvTunerStateChanged { |
| 9882 | enum State { |
| 9883 | UNKNOWN = 0; |
| 9884 | TUNING = 1; // Signal is tuned |
| 9885 | LOCKED = 2; // the signal is locked |
| 9886 | NOT_LOCKED = 3; // the signal isn’t locked. |
| 9887 | SIGNAL_LOST = 4; // the signal was locked, but is lost now. |
| 9888 | SCANNING = 5; // the signal is scanned |
| 9889 | SCAN_STOPPED = 6; // the scan is stopped. |
| 9890 | } |
| 9891 | // The uid of the application that sent this custom atom. |
| 9892 | optional int32 uid = 1 [(is_uid) = true]; |
| 9893 | // new state |
| 9894 | optional State state = 2; |
| 9895 | } |
Henry Fang | 1ae85bb | 2020-05-28 18:07:03 -0700 | [diff] [blame] | 9896 | |
| 9897 | /** |
| 9898 | * Logs the status of a dvr playback or record. |
| 9899 | * This is atom ID 279. |
| 9900 | * |
| 9901 | * Logged from: |
| 9902 | * frameworks/base/media/java/android/media/tv/tuner/dvr |
| 9903 | */ |
| 9904 | message TvTunerDvrStatus { |
| 9905 | enum Type { |
| 9906 | UNKNOWN_TYPE = 0; |
| 9907 | PLAYBACK = 1; // is a playback |
| 9908 | RECORD = 2; // is a record |
| 9909 | } |
| 9910 | enum State { |
| 9911 | UNKNOWN_STATE = 0; |
| 9912 | STARTED = 1; // DVR is started |
| 9913 | STOPPED = 2; // DVR is stopped |
| 9914 | } |
| 9915 | // The uid of the application that sent this custom atom. |
| 9916 | optional int32 uid = 1 [(is_uid) = true]; |
| 9917 | // DVR type |
| 9918 | optional Type type = 2; |
| 9919 | // DVR state |
| 9920 | optional State state = 3; |
| 9921 | // Identify the segment of a record or playback |
| 9922 | optional int32 segment_id = 4; |
| 9923 | // indicate how many overflow or underflow happened between started to stopped |
| 9924 | optional int32 overflow_underflow_count = 5; |
| 9925 | } |
Henry Fang | fd40c07 | 2020-06-01 14:59:17 -0700 | [diff] [blame] | 9926 | |
| 9927 | /** |
| 9928 | * Logs when a cas session opened through MediaCas. |
| 9929 | * This is atom ID 280. |
| 9930 | * |
| 9931 | * Logged from: |
| 9932 | * frameworks/base/media/java/android/media/MediaCas.java |
| 9933 | */ |
| 9934 | message TvCasSessionOpenStatus { |
| 9935 | enum State { |
| 9936 | UNKNOWN = 0; |
| 9937 | SUCCEEDED = 1; // indicate that the session is opened successfully. |
| 9938 | FAILED = 2; // indicate that the session isn’t opened successfully. |
| 9939 | } |
| 9940 | // The uid of the application that sent this custom atom. |
| 9941 | optional int32 uid = 1 [(is_uid) = true]; |
| 9942 | // Cas system Id |
| 9943 | optional int32 cas_system_id = 2; |
| 9944 | // State of the session |
| 9945 | optional State state = 3; |
| 9946 | } |
| 9947 | |
Henry Fang | e316ab6 | 2020-04-21 18:43:14 -0700 | [diff] [blame] | 9948 | /** |
Tingting Wang | b4ecadb | 2020-04-27 15:34:45 +0000 | [diff] [blame] | 9949 | * Logs for ContactsProvider general usage. |
| 9950 | * This is atom ID 301. |
| 9951 | * |
| 9952 | * Logged from: |
| 9953 | * packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsProvider2.java |
| 9954 | */ |
| 9955 | message ContactsProviderStatusReported { |
| 9956 | enum ApiType { |
| 9957 | UNKNOWN_API = 0; |
| 9958 | QUERY = 1; |
| 9959 | // INSERT includes insert and bulkInsert, and inserts triggered by applyBatch. |
| 9960 | INSERT = 2; |
| 9961 | // UPDATE and DELETE includes update/delete and the ones triggered by applyBatch. |
| 9962 | UPDATE = 3; |
| 9963 | DELETE = 4; |
| 9964 | } |
| 9965 | |
| 9966 | enum ResultType { |
| 9967 | UNKNOWN_RESULT = 0; |
| 9968 | SUCCESS = 1; |
| 9969 | FAIL = 2; |
| 9970 | ILLEGAL_ARGUMENT = 3; |
| 9971 | UNSUPPORTED_OPERATION = 4; |
| 9972 | } |
| 9973 | |
| 9974 | enum CallerType { |
| 9975 | UNSPECIFIED_CALLER_TYPE = 0; |
| 9976 | CALLER_IS_SYNC_ADAPTER = 1; |
| 9977 | CALLER_IS_NOT_SYNC_ADAPTER = 2; |
| 9978 | } |
| 9979 | |
| 9980 | optional ApiType api_type = 1; |
| 9981 | // Defined in |
| 9982 | // packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsProvider2.java |
| 9983 | optional int32 uri_type = 2; |
| 9984 | optional CallerType caller_type = 3; |
| 9985 | optional ResultType result_type = 4; |
| 9986 | optional int32 result_count = 5; |
| 9987 | optional int64 latency_micros = 6; |
| 9988 | } |
| 9989 | |
| 9990 | /** |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 9991 | * Logs when an app is frozen or unfrozen. |
| 9992 | * |
| 9993 | * Logged from: |
| 9994 | * frameworks/base/services/core/java/com/android/server/am/CachedAppOptimizer.java |
| 9995 | */ |
| 9996 | message AppFreezeChanged { |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 9997 | // The type of event. |
| 9998 | enum Action { |
| 9999 | UNKNOWN = 0; |
| 10000 | FREEZE_APP = 1; |
| 10001 | UNFREEZE_APP = 2; |
| 10002 | } |
| 10003 | optional Action action = 1; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 10004 | |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10005 | // Pid of the process being frozen. |
| 10006 | optional int32 pid = 2; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 10007 | |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10008 | // Name of the process being frozen. |
| 10009 | optional string process_name = 3; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 10010 | |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10011 | // Time since last unfrozen. |
| 10012 | optional int64 time_unfrozen_millis = 4; |
| 10013 | } |
| 10014 | |
| 10015 | /** |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 10016 | * Pulls information for a single voice call. |
| 10017 | * |
| 10018 | * Each pull creates multiple atoms, one for each call. The sequence is randomized when pulled. |
| 10019 | * |
| 10020 | * Pulled from: |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 10021 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 10022 | */ |
| 10023 | message VoiceCallSession { |
| 10024 | // Bearer (IMS or CS) when the call started. |
| 10025 | optional android.telephony.CallBearerEnum bearer_at_start = 1; |
| 10026 | |
| 10027 | // Bearer (IMS or CS) when the call ended. |
| 10028 | // The bearer may change during the call, e.g. due to SRVCC. |
| 10029 | optional android.telephony.CallBearerEnum bearer_at_end = 2; |
| 10030 | |
| 10031 | // Direction of the call (incoming or outgoing). |
| 10032 | optional android.telephony.CallDirectionEnum direction = 3; |
| 10033 | |
| 10034 | // Time spent setting up the call. |
| 10035 | optional android.telephony.CallSetupDurationEnum setup_duration = 4; |
| 10036 | |
| 10037 | // Whether the call ended before the setup was completed. |
| 10038 | optional bool setup_failed = 5; |
| 10039 | |
| 10040 | // IMS reason code or CS disconnect cause. |
| 10041 | // For IMS, see: frameworks/base/telephony/java/android/telephony/ims/ImsReasonInfo.java |
| 10042 | // For CS, see: frameworks/base/telephony/java/android/telephony/DisconnectCause.java |
| 10043 | optional int32 disconnect_reason_code = 6; |
| 10044 | |
| 10045 | // IMS extra code or CS precise disconnect cause. |
| 10046 | // For IMS, this code is vendor-specific |
| 10047 | // For CS, see: frameworks/base/telephony/java/android/telephony/PreciseDisconnectCause.java |
| 10048 | optional int32 disconnect_extra_code = 7; |
| 10049 | |
| 10050 | // IMS extra message or CS vendor cause. |
| 10051 | optional string disconnect_extra_message = 8; |
| 10052 | |
| 10053 | // Radio access technology (RAT) used when call started. |
| 10054 | optional android.telephony.NetworkTypeEnum rat_at_start = 9; |
| 10055 | |
| 10056 | // Radio access technology (RAT) used when call terminated. |
| 10057 | optional android.telephony.NetworkTypeEnum rat_at_end = 10; |
| 10058 | |
| 10059 | // Number of times RAT changed during the call. |
| 10060 | optional int64 rat_switch_count = 11; |
| 10061 | |
| 10062 | // A bitmask of all codecs used during the call. |
| 10063 | // See: frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/VoiceCallSessionStats.java |
| 10064 | optional int64 codec_bitmask = 12; |
| 10065 | |
| 10066 | // Number of other calls going on during call setup, for the same SIM slot. |
| 10067 | optional int32 concurrent_call_count_at_start = 13; |
| 10068 | |
| 10069 | // Number of other calls going on during call termination, for the same SIM slot. |
| 10070 | optional int32 concurrent_call_count_at_end = 14; |
| 10071 | |
| 10072 | // Index of the SIM is used, 0 for single-SIM devices. |
| 10073 | optional int32 sim_slot_index = 15; |
| 10074 | |
| 10075 | // Whether the device was in multi-SIM mode (with multiple active SIM profiles). |
| 10076 | optional bool is_multi_sim = 16; |
| 10077 | |
| 10078 | // Whether the call was made with an eSIM profile. |
| 10079 | optional bool is_esim = 17; |
| 10080 | |
| 10081 | // Carrier ID of the SIM card. |
| 10082 | // See https://source.android.com/devices/tech/config/carrierid. |
| 10083 | optional int32 carrier_id = 18; |
| 10084 | |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 10085 | // Whether an SRVCC has been completed successfully for this call. |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 10086 | optional bool srvcc_completed = 19; |
| 10087 | |
| 10088 | // Number of SRVCC failures. |
| 10089 | optional int64 srvcc_failure_count = 20; |
| 10090 | |
| 10091 | // Number of SRVCC cancellations. |
| 10092 | optional int64 srvcc_cancellation_count = 21; |
| 10093 | |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 10094 | // Whether the Real-Time Text (RTT) was ever used in the call (rather than whether RTT was |
| 10095 | // enabled in the dialer's settings). |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 10096 | optional bool rtt_enabled = 22; |
| 10097 | |
| 10098 | // Whether this was an emergency call. |
| 10099 | optional bool is_emergency = 23; |
| 10100 | |
| 10101 | // Whether the call was performed while roaming. |
| 10102 | optional bool is_roaming = 24; |
Chi Zhang | 8bf81df | 2020-05-01 11:23:28 -0700 | [diff] [blame] | 10103 | |
| 10104 | // A random number used as the dimension field to pull multiple atoms. |
| 10105 | optional int32 dimension = 25; |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 10106 | } |
| 10107 | |
| 10108 | /** |
| 10109 | * Pulls voice call radio access technology (RAT) usage. |
| 10110 | * |
| 10111 | * Each pull creates multiple atoms, one for each carrier/RAT, the order of which is irrelevant to |
| 10112 | * time. The atom will be skipped if not enough data is available. |
| 10113 | * |
| 10114 | * Pulled from: |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 10115 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 10116 | */ |
| 10117 | message VoiceCallRatUsage { |
| 10118 | // Carrier ID (https://source.android.com/devices/tech/config/carrierid). |
| 10119 | optional int32 carrier_id = 1; |
| 10120 | |
| 10121 | // Radio access technology. |
| 10122 | optional android.telephony.NetworkTypeEnum rat = 2; |
| 10123 | |
| 10124 | // Total duration that voice calls spent on this carrier and RAT. |
| 10125 | optional int64 total_duration_seconds = 3; |
| 10126 | |
| 10127 | // Total number of calls using this carrier and RAT. |
| 10128 | // A call is counted once even if it used the RAT multiple times. |
| 10129 | optional int64 call_count = 4; |
| 10130 | } |
| 10131 | |
| 10132 | /** |
| 10133 | * Pulls the number of active SIM slots and SIMs/eSIM profiles. |
| 10134 | * |
| 10135 | * Pulled from: |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 10136 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 10137 | */ |
| 10138 | message SimSlotState { |
| 10139 | // Number of active SIM slots (both physical and eSIM profiles) in the device. |
| 10140 | optional int32 active_slot_count = 1; |
| 10141 | |
| 10142 | // Number of SIM cards (both physical and active eSIM profiles). |
| 10143 | // This number is always equal to or less than the number of active SIM slots. |
| 10144 | optional int32 sim_count = 2; |
| 10145 | |
| 10146 | // Number of active eSIM profiles. |
| 10147 | // This number is always equal to or less than the number of SIMs. |
| 10148 | optional int32 esim_count = 3; |
| 10149 | } |
| 10150 | |
| 10151 | /** |
| 10152 | * Pulls supported cellular radio access technologies. |
| 10153 | * |
| 10154 | * This atom reports the capabilities of the device, rather than the network it has access to. |
| 10155 | * |
| 10156 | * Pulled from: |
Chi Zhang | ba1b03a | 2020-04-21 17:17:56 -0700 | [diff] [blame] | 10157 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java |
Chi Zhang | bb9ed92 | 2020-03-11 10:16:47 -0700 | [diff] [blame] | 10158 | */ |
| 10159 | message SupportedRadioAccessFamily { |
| 10160 | // A bitmask of supported radio technologies. |
| 10161 | // See android.telephony.TelephonyManager.NetworkTypeBitMask. |
| 10162 | optional int64 network_type_bitmask = 1; |
| 10163 | } |
| 10164 | |
| 10165 | /** |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10166 | * Logs gnss stats from location service provider |
| 10167 | * |
| 10168 | * Pulled from: |
| 10169 | * frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 10170 | */ |
| 10171 | |
| 10172 | message GnssStats { |
| 10173 | // Number of location reports since boot |
| 10174 | optional int64 location_reports = 1; |
| 10175 | |
| 10176 | // Total pulled reports of Location failures since boot |
| 10177 | optional int64 location_failure_reports = 2; |
| 10178 | |
| 10179 | // Number of time to first fix reports since boot |
| 10180 | optional int64 time_to_first_fix_reports = 3; |
| 10181 | |
| 10182 | // Total pulled reported time to first fix (in milli-seconds) since boot |
Blake Kragten | 850a9d43 | 2020-06-11 09:05:39 -0700 | [diff] [blame] | 10183 | optional int64 time_to_first_fix_millis = 4; |
Blake Kragten | 6ce382a | 2020-01-16 20:20:46 -0800 | [diff] [blame] | 10184 | |
| 10185 | // Number of position accuracy reports since boot |
| 10186 | optional int64 position_accuracy_reports = 5; |
| 10187 | |
| 10188 | // Total pulled reported position accuracy (in meters) since boot |
| 10189 | optional int64 position_accuracy_meters = 6; |
| 10190 | |
| 10191 | // Number of top 4 average CN0 reports since boot |
| 10192 | optional int64 top_four_average_cn0_reports = 7; |
| 10193 | |
| 10194 | // Total pulled reported of top 4 average CN0 (dB-mHz) since boot |
| 10195 | optional int64 top_four_average_cn0_db_mhz = 8; |
| 10196 | |
| 10197 | // Number of l5 top 4 average CN0 reports since boot |
| 10198 | optional int64 l5_top_four_average_cn0_reports = 9; |
| 10199 | |
| 10200 | // Total pulled reported of l5 top 4 average CN0 (dB-mHz) since boot |
| 10201 | optional int64 l5_top_four_average_cn0_db_mhz = 10; |
| 10202 | |
| 10203 | // Total number of sv status messages reports since boot |
| 10204 | optional int64 sv_status_reports = 11; |
| 10205 | |
| 10206 | // Total number of sv status messages reports, where sv is used in fix since boot |
| 10207 | optional int64 sv_status_reports_used_in_fix = 12; |
| 10208 | |
| 10209 | // Total number of L5 sv status messages reports since boot |
| 10210 | optional int64 l5_sv_status_reports = 13; |
| 10211 | |
| 10212 | // Total number of L5 sv status messages reports, where sv is used in fix since boot |
| 10213 | optional int64 l5_sv_status_reports_used_in_fix = 14; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 10214 | } |
Kweku Adams | 1275213 | 2020-02-18 15:36:48 -0800 | [diff] [blame] | 10215 | |
| 10216 | /** |
| 10217 | * Logs when an app is moved to a different standby bucket. |
| 10218 | * |
| 10219 | * Logged from: |
| 10220 | * frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/AppIdleHistory.java |
| 10221 | */ |
| 10222 | message AppStandbyBucketChanged { |
| 10223 | optional string package_name = 1; |
| 10224 | |
| 10225 | // Should be 0, 10, 11, 12, etc. where 0 is the owner. See UserHandle for more documentation. |
| 10226 | optional int32 user_id = 2; |
| 10227 | |
| 10228 | // These enum values match the constants defined in UsageStatsManager.java. |
| 10229 | enum Bucket { |
| 10230 | BUCKET_UNKNOWN = 0; |
| 10231 | BUCKET_EXEMPTED = 5; |
| 10232 | BUCKET_ACTIVE = 10; |
| 10233 | BUCKET_WORKING_SET = 20; |
| 10234 | BUCKET_FREQUENT = 30; |
| 10235 | BUCKET_RARE = 40; |
| 10236 | BUCKET_RESTRICTED = 45; |
| 10237 | BUCKET_NEVER = 50; |
| 10238 | } |
| 10239 | optional Bucket bucket = 3; |
| 10240 | |
| 10241 | enum MainReason { |
| 10242 | MAIN_UNKNOWN = 0; |
| 10243 | MAIN_DEFAULT = 0x0100; |
| 10244 | MAIN_TIMEOUT = 0x0200; |
| 10245 | MAIN_USAGE = 0x0300; |
| 10246 | MAIN_FORCED_BY_USER = 0x0400; |
| 10247 | MAIN_PREDICTED = 0x0500; |
| 10248 | MAIN_FORCED_BY_SYSTEM = 0x0600; |
| 10249 | } |
| 10250 | optional MainReason main_reason = 4; |
| 10251 | |
| 10252 | // A more detailed reason for the standby bucket change. The sub reason name is dependent on |
| 10253 | // the main reason. Values are one of the REASON_SUB_XXX constants defined in |
| 10254 | // UsageStatsManager.java. |
| 10255 | optional int32 sub_reason = 5; |
| 10256 | } |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 10257 | |
| 10258 | /** |
| 10259 | * Reports a started sharesheet transaction. |
| 10260 | * |
| 10261 | * Logged from: |
| 10262 | * frameworks/base/core/java/com/android/internal/app/ChooserActivity.java |
| 10263 | */ |
| 10264 | message SharesheetStarted { |
| 10265 | // The event_id (as for UiEventReported). |
| 10266 | optional int32 event_id = 1; |
| 10267 | // The calling app's package name. |
| 10268 | optional string package_name = 2; |
| 10269 | // An identifier to tie together multiple logs relating to the same share event |
| 10270 | optional int32 instance_id = 3; |
| 10271 | // The mime type of the share |
| 10272 | optional string mime_type = 4; |
| 10273 | // The number of direct targets the calling app is providing that will be shown. |
| 10274 | optional int32 num_app_provided_direct_targets = 5; |
| 10275 | // The number of app targets the calling app is providing that will be shown. |
| 10276 | optional int32 num_app_provided_app_targets = 6; |
| 10277 | // True if the share originates from the workprofile |
| 10278 | optional bool is_workprofile = 7; |
| 10279 | |
| 10280 | enum SharesheetPreviewType { // Constants from ChooserActivity.java |
Susi Kharraz-Post | 3ddadd8 | 2020-04-13 08:09:15 -0400 | [diff] [blame] | 10281 | CONTENT_PREVIEW_TYPE_UNKNOWN = 0; // Default for proto 2 / 3 compatibility. |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 10282 | CONTENT_PREVIEW_IMAGE = 1; // The preview shown in the sharesheet is an image. |
| 10283 | CONTENT_PREVIEW_FILE = 2; // The preview shown in the sharesheet is a file. |
| 10284 | CONTENT_PREVIEW_TEXT = 3; // The preview shown in the sharesheet is text. |
| 10285 | } |
| 10286 | // How the sharesheet preview is presented. |
Susi Kharraz-Post | 3ddadd8 | 2020-04-13 08:09:15 -0400 | [diff] [blame] | 10287 | optional SharesheetPreviewType preview_type = 8; |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 10288 | |
| 10289 | enum ResolverActivityIntent { // Intents handled by ResolverActivity.java |
| 10290 | INTENT_DEFAULT = 0; |
| 10291 | INTENT_ACTION_VIEW = 1; |
| 10292 | INTENT_ACTION_EDIT = 2; |
| 10293 | INTENT_ACTION_SEND = 3; |
| 10294 | INTENT_ACTION_SENDTO = 4; |
| 10295 | INTENT_ACTION_SEND_MULTIPLE = 5; |
| 10296 | INTENT_ACTION_IMAGE_CAPTURE = 6; |
| 10297 | INTENT_ACTION_MAIN = 7; |
| 10298 | } |
| 10299 | // 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] | 10300 | optional ResolverActivityIntent intent_type = 9; |
Susi Kharraz-Post | 1df7b00 | 2020-02-20 16:32:06 -0500 | [diff] [blame] | 10301 | } |
| 10302 | |
| 10303 | /** |
| 10304 | * Reports a ranking selection event. |
| 10305 | * |
| 10306 | * Logged from: |
| 10307 | * frameworks/base/core/java/com/android/internal/app/ChooserActivity.java (sharesheet) |
| 10308 | */ |
| 10309 | message RankingSelected { |
| 10310 | // The event_id (as for UiEventReported). |
| 10311 | optional int32 event_id = 1; |
| 10312 | // The relevant app's package name (can be source or picked package). |
| 10313 | optional string package_name = 2; |
| 10314 | // An identifier to tie together multiple logs relating to the same share event. |
| 10315 | optional int32 instance_id = 3; |
| 10316 | // Which of the ranked targets got picked, default starting position 0. |
| 10317 | optional int32 position_picked = 4; |
| 10318 | } |
Raff Tsai | ea4db18 | 2020-03-06 07:45:43 +0800 | [diff] [blame] | 10319 | |
| 10320 | /** |
Zhen Sun | 0bec8d4 | 2020-03-25 17:17:29 -0700 | [diff] [blame] | 10321 | * Logs when TvSettings UI is interacted at. |
| 10322 | * |
| 10323 | * Logged from: packages/apps/TvSettings |
| 10324 | */ |
| 10325 | message TvSettingsUIInteracted { |
| 10326 | |
| 10327 | /** The UI action category */ |
| 10328 | optional android.app.tvsettings.Action action = 1; |
| 10329 | |
| 10330 | /** The ID of the entry that the users actioned on */ |
| 10331 | optional android.app.tvsettings.ItemId item_id = 2; |
Zhen Sun | 0bec8d4 | 2020-03-25 17:17:29 -0700 | [diff] [blame] | 10332 | } |
| 10333 | |
| 10334 | /** |
Songchun Fan | c296cf7 | 2020-03-31 18:38:52 -0700 | [diff] [blame] | 10335 | * Logs information about a package installation using package installer V2 APIs. |
| 10336 | * |
| 10337 | * Logged from: |
| 10338 | * frameworks/base/services/core/java/com/android/server/pm/PackageInstallerSession.java |
| 10339 | */ |
| 10340 | message PackageInstallerV2Reported { |
| 10341 | // Whether this installation uses Incremental File System |
| 10342 | optional bool is_incremental = 1; |
| 10343 | // Name of the package that is intended to be installed |
| 10344 | optional string package_name = 2; |
| 10345 | // The duration between when the install was requested to when the install has completed |
| 10346 | optional int64 duration_millis = 3; |
| 10347 | // Installation result in final integer, which are SystemApi's. |
| 10348 | // Return_code 1 indicates success. |
| 10349 | // For full list, see frameworks/base/core/java/android/content/pm/PackageManager.java |
| 10350 | optional int32 return_code = 4; |
Songchun Fan | aff0dce | 2020-04-29 15:23:40 -0700 | [diff] [blame] | 10351 | // Total size of the APKs installed for this package |
| 10352 | optional int64 apks_size_bytes = 5; |
Songchun Fan | c296cf7 | 2020-03-31 18:38:52 -0700 | [diff] [blame] | 10353 | } |
| 10354 | |
| 10355 | /** |
Raff Tsai | ea4db18 | 2020-03-06 07:45:43 +0800 | [diff] [blame] | 10356 | * Logs settings provider values. |
| 10357 | * |
| 10358 | * Use DeviceConfig.getProperties to get a list Setting key, query the data from content provider, |
| 10359 | * then write the value to proto. |
| 10360 | * |
| 10361 | */ |
| 10362 | message SettingSnapshot { |
| 10363 | |
| 10364 | // Setting key |
| 10365 | optional string name = 1; |
| 10366 | |
| 10367 | enum SettingsValueType { |
| 10368 | NOTASSIGNED = 0; |
| 10369 | ASSIGNED_BOOL_TYPE = 1; |
| 10370 | ASSIGNED_INT_TYPE = 2; |
| 10371 | ASSIGNED_FLOAT_TYPE = 3; |
| 10372 | ASSIGNED_STRING_TYPE = 4; |
| 10373 | }; |
| 10374 | // Setting value type |
| 10375 | optional SettingsValueType type = 2; |
| 10376 | |
| 10377 | optional bool bool_value = 3; |
| 10378 | |
| 10379 | optional int32 int_value = 4; |
| 10380 | |
| 10381 | optional float float_value = 5; |
| 10382 | |
| 10383 | optional string str_value = 6; |
| 10384 | |
| 10385 | // Android user index. 0 for primary user, 10, 11 for secondary or profile user |
| 10386 | optional int32 user_id = 7; |
| 10387 | } |
Varun Shah | acb5634 | 2019-12-18 11:45:38 -0800 | [diff] [blame] | 10388 | |
| 10389 | /** |
| 10390 | * An event logged to indicate that a user journey is about to be performed. This atom includes |
| 10391 | * relevant information about the users involved in the journey. A UserLifecycleEventOccurred event |
| 10392 | * will immediately follow this atom which will describe the event(s) and its state. |
| 10393 | * |
| 10394 | * Logged from: |
| 10395 | * frameworks/base/services/core/java/com/android/server/am/UserController.java |
| 10396 | * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java |
| 10397 | */ |
| 10398 | message UserLifecycleJourneyReported { |
| 10399 | // An identifier to track a chain of user lifecycle events occurring (referenced in the |
| 10400 | // UserLifecycleEventOccurred atom) |
| 10401 | optional int64 session_id = 1; |
| 10402 | |
| 10403 | // Indicates what type of user journey this session is related to |
| 10404 | enum Journey { |
| 10405 | UNKNOWN = 0; // Undefined user lifecycle journey |
| 10406 | USER_SWITCH_UI = 1; // A user switch journey where a UI is shown |
| 10407 | USER_SWITCH_FG = 2; // A user switch journey without a UI shown |
| 10408 | USER_START = 3; // A user start journey |
| 10409 | USER_CREATE = 4; // A user creation journey |
| 10410 | } |
| 10411 | optional Journey journey = 2; |
| 10412 | // Which user the journey is originating from - could be -1 for certain phases (eg USER_CREATE) |
| 10413 | // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest) |
| 10414 | optional int32 origin_user = 3; |
| 10415 | // Which user the journey is targeting |
| 10416 | // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest) |
| 10417 | optional int32 target_user = 4; |
| 10418 | |
| 10419 | // What is the user type of the target user |
| 10420 | // These should be in sync with USER_TYPE_* flags defined in UserManager.java |
| 10421 | enum UserType { |
| 10422 | TYPE_UNKNOWN = 0; |
| 10423 | FULL_SYSTEM = 1; |
| 10424 | FULL_SECONDARY = 2; |
| 10425 | FULL_GUEST = 3; |
| 10426 | FULL_DEMO = 4; |
| 10427 | FULL_RESTRICTED = 5; |
| 10428 | PROFILE_MANAGED = 6; |
| 10429 | SYSTEM_HEADLESS = 7; |
| 10430 | } |
| 10431 | optional UserType user_type = 5; |
| 10432 | // What are the flags attached to the target user |
| 10433 | optional int32 user_flags = 6; |
| 10434 | } |
| 10435 | |
| 10436 | /** |
| 10437 | * An event logged when a specific user lifecycle event is performed. These events should be |
| 10438 | * correlated with a UserLifecycleJourneyReported atom via the session_id. |
| 10439 | * Note: journeys can span over multiple events, hence some events may share a single session id. |
| 10440 | * |
| 10441 | * Logged from: |
| 10442 | * frameworks/base/services/core/java/com/android/server/am/UserController.java |
| 10443 | * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java |
| 10444 | */ |
| 10445 | message UserLifecycleEventOccurred { |
| 10446 | // An id which links back to user details (reported in the UserLifecycleJourneyReported atom) |
| 10447 | optional int64 session_id = 1; |
| 10448 | // The target user for this event (same as target_user in the UserLifecycleJourneyReported atom) |
| 10449 | // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest) |
| 10450 | optional int32 user_id = 2; |
| 10451 | |
| 10452 | enum Event { |
| 10453 | UNKNOWN = 0; // Indicates that the associated user journey timed-out or resulted in an error |
| 10454 | SWITCH_USER = 1; // Indicates that this is a user switch event |
| 10455 | START_USER = 2; // Indicates that this is a user start event |
| 10456 | CREATE_USER = 3; // Indicates that this is a user create event |
Mayank Garg | 4f93a04 | 2020-05-12 23:05:21 -0700 | [diff] [blame] | 10457 | USER_RUNNING_LOCKED = 4; // Indicates that user is running in locked state |
| 10458 | UNLOCKING_USER = 5; // Indicates that this is a user unlocking event |
| 10459 | UNLOCKED_USER = 6; // Indicates that this is a user unlocked event |
Varun Shah | acb5634 | 2019-12-18 11:45:38 -0800 | [diff] [blame] | 10460 | } |
| 10461 | optional Event event = 3; |
| 10462 | |
| 10463 | enum State { |
| 10464 | NONE = 0; // Indicates the associated event has no start/end defined |
| 10465 | BEGIN = 1; |
| 10466 | FINISH = 2; |
| 10467 | } |
| 10468 | optional State state = 4; // Represents the state of an event (beginning/ending) |
| 10469 | } |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 10470 | |
| 10471 | /** |
| 10472 | * Logs when accessibility shortcut clicked. |
| 10473 | * |
| 10474 | * Logged from: |
jasonwshsu | 7b1be3e | 2020-04-27 15:21:07 +0800 | [diff] [blame] | 10475 | * frameworks/base/services/accessibility/java/com/android/server/accessibility |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 10476 | */ |
| 10477 | message AccessibilityShortcutReported { |
| 10478 | // The accessibility feature(including installed a11y service, framework a11y feature, |
| 10479 | // and installed a11y activity) package name that is assigned to the accessibility shortcut. |
| 10480 | optional string package_name = 1; |
| 10481 | |
| 10482 | // The definition of the accessibility shortcut. |
| 10483 | // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. |
| 10484 | optional android.stats.accessibility.ShortcutType shortcut_type = 2; |
| 10485 | |
| 10486 | // The definition of the service status. |
| 10487 | // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. |
| 10488 | optional android.stats.accessibility.ServiceStatus service_status = 3; |
| 10489 | } |
| 10490 | |
| 10491 | /** |
| 10492 | * Logs when accessibility service status changed. |
| 10493 | * |
| 10494 | * Logged from: |
jasonwshsu | 7b1be3e | 2020-04-27 15:21:07 +0800 | [diff] [blame] | 10495 | * packages/apps/Settings/src/com/android/settings/accessibility |
jasonwshsu | 81173e3 | 2020-03-27 15:22:03 +0800 | [diff] [blame] | 10496 | */ |
| 10497 | message AccessibilityServiceReported { |
| 10498 | // The accessibility service package name. |
| 10499 | optional string package_name = 1; |
| 10500 | |
| 10501 | // The definition of the service status. |
| 10502 | // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. |
| 10503 | optional android.stats.accessibility.ServiceStatus service_status = 2; |
| 10504 | } |
Jonathan Nguyen | 8d8ff53 | 2020-05-07 18:11:15 -0700 | [diff] [blame] | 10505 | |
Denny cy Lee | ca62fc4 | 2020-05-28 18:13:07 +0800 | [diff] [blame] | 10506 | /** |
| 10507 | * Logs when display wake up. |
| 10508 | * |
| 10509 | * Logged from: |
| 10510 | * services/core/java/com/android/server/power/Notifier.java |
| 10511 | */ |
| 10512 | |
| 10513 | message DisplayWakeReported { |
Denny cy Lee | 57b3128 | 2020-04-17 10:08:52 +0800 | [diff] [blame] | 10514 | // Wake_up_reason code |
| 10515 | // If LOWORD(wake_up_reason) = 0 |
| 10516 | // reference to HIWORD(wake_up_reason) PowerManager.WAKE_REASON_XXX |
| 10517 | // else reference wake_up_reason to |
Denny cy Lee | ca62fc4 | 2020-05-28 18:13:07 +0800 | [diff] [blame] | 10518 | // services/core/java/com/android/server/power/Notifier.java#onWakeUp |
Denny cy Lee | 57b3128 | 2020-04-17 10:08:52 +0800 | [diff] [blame] | 10519 | optional int32 wake_up_reason = 1; |
Denny cy Lee | 57b3128 | 2020-04-17 10:08:52 +0800 | [diff] [blame] | 10520 | } |
| 10521 | |
Jonathan Nguyen | 8d8ff53 | 2020-05-07 18:11:15 -0700 | [diff] [blame] | 10522 | /** |
| 10523 | * Logs app usage events. |
| 10524 | */ |
| 10525 | message AppUsageEventOccurred { |
| 10526 | optional int32 uid = 1 [(is_uid) = true]; |
| 10527 | optional string package_name = 2; |
| 10528 | optional string class_name = 3; |
| 10529 | |
| 10530 | enum EventType { |
| 10531 | NONE = 0; |
| 10532 | MOVE_TO_FOREGROUND = 1; |
| 10533 | MOVE_TO_BACKGROUND = 2; |
| 10534 | } |
| 10535 | optional EventType event_type = 4; |
| 10536 | } |
Changyeon Jo | 51ae358 | 2020-04-14 09:41:00 -0700 | [diff] [blame] | 10537 | |
| 10538 | /* |
| 10539 | * Quality metrics logged when EVS cameras are active. |
| 10540 | * |
| 10541 | * Logged from: |
| 10542 | * packages/services/Car/evs/manager/1.1/Enumerator.cpp |
| 10543 | */ |
| 10544 | message EvsUsageStatsReported { |
| 10545 | |
| 10546 | // Camera identifier to distinguish the source camera device. This is not |
| 10547 | // globally unique and therefore cannot be used to identify the user and/or |
| 10548 | // the device. |
| 10549 | optional int32 device_id = 1; |
| 10550 | |
| 10551 | // Peak number of clients during the service |
| 10552 | optional int32 peak_num_clients = 2; |
| 10553 | |
| 10554 | // Number of erroneous events during the service |
| 10555 | optional int32 num_errors = 3; |
| 10556 | |
| 10557 | // Round trip latency of the very first frame |
| 10558 | optional int64 first_latency_millis = 4; |
| 10559 | |
| 10560 | // Average frame round trip latency |
| 10561 | optional float avg_latency_millis = 5; |
| 10562 | |
| 10563 | // Peak frame round trip latency |
| 10564 | optional int64 peak_latency_millis = 6; |
| 10565 | |
| 10566 | // Total number of frames received |
| 10567 | optional int64 total_frames = 7; |
| 10568 | |
| 10569 | // Number of frames ignored |
| 10570 | optional int64 ignored_frames = 8; |
| 10571 | |
| 10572 | // Number of dropped frames to synchronize camera devices |
| 10573 | optional int64 dropped_frames_to_sync = 9; |
| 10574 | |
| 10575 | // The duration of the service |
| 10576 | optional int64 duration_millis = 10; |
| 10577 | } |
Robert Lee | cccdc15 | 2020-04-23 13:22:46 +0800 | [diff] [blame] | 10578 | |
| 10579 | /** |
| 10580 | * Logs audio power usage stats. |
| 10581 | * |
| 10582 | * Pushed from: |
| 10583 | * frameworks/av/services/mediametrics/AudioPowerUsage.cpp |
| 10584 | */ |
| 10585 | message AudioPowerUsageDataReported { |
| 10586 | /** |
| 10587 | * Device used for input/output |
| 10588 | * |
| 10589 | * All audio devices please refer to below file: |
| 10590 | * system/media/audio/include/system/audio-base.h |
| 10591 | * |
| 10592 | * Define our own enum values because we don't report all audio devices. |
| 10593 | * Currently, we only report built-in audio devices such as handset, speaker, |
| 10594 | * built-in mics, common audio devices such as wired headset, usb headset |
| 10595 | * and bluetooth devices. |
| 10596 | */ |
| 10597 | enum AudioDevice { |
| 10598 | OUTPUT_EARPIECE = 0x1; // handset |
| 10599 | OUTPUT_SPEAKER = 0x2; // dual speaker |
| 10600 | OUTPUT_WIRED_HEADSET = 0x4; // 3.5mm headset |
| 10601 | OUTPUT_USB_HEADSET = 0x8; // usb headset |
| 10602 | OUTPUT_BLUETOOTH_SCO = 0x10; // bluetooth sco |
| 10603 | OUTPUT_BLUETOOTH_A2DP = 0x20; // a2dp |
| 10604 | OUTPUT_SPEAKER_SAFE = 0x40; // bottom speaker |
| 10605 | |
| 10606 | INPUT_DEVICE_BIT = 0x40000000; // non-negative positive int32. |
| 10607 | INPUT_BUILTIN_MIC = 0x40000001; // buildin mic |
| 10608 | INPUT_BUILTIN_BACK_MIC = 0x40000002; // buildin back mic |
| 10609 | INPUT_WIRED_HEADSET_MIC = 0x40000004; // 3.5mm headset mic |
| 10610 | INPUT_USB_HEADSET_MIC = 0x40000008; // usb headset mic |
| 10611 | INPUT_BLUETOOTH_SCO = 0x40000010; // bluetooth sco mic |
| 10612 | } |
| 10613 | optional AudioDevice audio_device = 1; |
| 10614 | |
| 10615 | // Duration of the audio in seconds |
| 10616 | optional int32 duration_secs = 2; |
| 10617 | |
| 10618 | // Average volume (0 ... 1.0) |
| 10619 | optional float average_volume = 3; |
| 10620 | |
| 10621 | enum AudioType { |
| 10622 | UNKNOWN_TYPE = 0; |
| 10623 | VOICE_CALL_TYPE = 1; // voice call |
| 10624 | VOIP_CALL_TYPE = 2; // voip call, including uplink and downlink |
| 10625 | MEDIA_TYPE = 3; // music and system sound |
| 10626 | RINGTONE_NOTIFICATION_TYPE = 4; // ringtone and notification |
| 10627 | ALARM_TYPE = 5; // alarm type |
| 10628 | // record type |
| 10629 | CAMCORDER_TYPE = 6; // camcorder |
| 10630 | RECORD_TYPE = 7; // other recording |
| 10631 | } |
| 10632 | optional AudioType type = 4; |
| 10633 | } |
Ruchir Rastogi | 56579cb | 2020-05-14 10:44:19 -0700 | [diff] [blame] | 10634 | |
| 10635 | /** |
| 10636 | * Pulls bytes transferred over WiFi and mobile networks sliced by uid, is_metered, and tag. |
| 10637 | * |
| 10638 | * Pulled from: |
| 10639 | * StatsPullAtomService, which uses NetworkStatsService to query NetworkStats. |
| 10640 | */ |
| 10641 | message BytesTransferByTagAndMetered { |
| 10642 | optional int32 uid = 1 [(is_uid) = true]; |
| 10643 | |
| 10644 | optional bool is_metered = 2; |
| 10645 | |
| 10646 | optional int32 tag = 3; |
| 10647 | |
| 10648 | optional int64 rx_bytes = 4; |
| 10649 | |
| 10650 | optional int64 rx_packets = 5; |
| 10651 | |
| 10652 | optional int64 tx_bytes = 6; |
| 10653 | |
| 10654 | optional int64 tx_packets = 7; |
| 10655 | } |
Robert Luo | 2f52f04 | 2020-05-11 16:39:24 +0800 | [diff] [blame] | 10656 | |
| 10657 | /* |
| 10658 | * Logs when the Media Output Switcher finishes a media switch operation. |
| 10659 | * |
| 10660 | * Logged from: |
| 10661 | * packages/apps/Settings/src/com/android/settings/media/MediaOutputSliceWorker.java |
| 10662 | */ |
| 10663 | message MediaOutputOpSwitchReported { |
| 10664 | // Source medium type before switching. |
| 10665 | optional android.app.settings.mediaoutput.MediumType source = 1; |
| 10666 | |
| 10667 | // Target medium type after switching. |
| 10668 | optional android.app.settings.mediaoutput.MediumType target = 2; |
| 10669 | |
| 10670 | // The result of switching. |
| 10671 | optional android.app.settings.mediaoutput.SwitchResult result = 3; |
| 10672 | |
| 10673 | // The detail code of a switching result. |
| 10674 | optional android.app.settings.mediaoutput.SubResult subresult = 4; |
| 10675 | |
| 10676 | /* |
| 10677 | * The package name of a pre-installed app, whose media session is being switched. |
| 10678 | */ |
| 10679 | optional string media_session_package_name = 5; |
| 10680 | |
| 10681 | // The amount of available wired devices when a switching is being performed. |
| 10682 | optional int32 available_wired_device_count = 6; |
| 10683 | |
| 10684 | // The amount of available Bluetooth devices a switching is being performed. |
| 10685 | optional int32 available_bt_device_count = 7; |
| 10686 | |
| 10687 | // The amount of available remote devices when a switching is being performed. |
| 10688 | optional int32 available_remote_device_count = 8; |
| 10689 | |
| 10690 | // The amount of applied devices within a remote dynamic group after a switching is done. |
| 10691 | optional int32 applied_device_count_within_remote_group = 9; |
| 10692 | } |
Govinda Wasserman | e464028 | 2020-04-30 09:30:56 -0400 | [diff] [blame] | 10693 | |
| 10694 | /** |
| 10695 | * Logs when the Assistant is invoked. |
| 10696 | * |
| 10697 | * Logged from: |
| 10698 | * frameworks/base/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java |
| 10699 | */ |
| 10700 | message AssistantInvocationReported { |
| 10701 | |
| 10702 | // The event_id (as for UiEventReported). |
| 10703 | optional int32 event_id = 1; |
| 10704 | |
| 10705 | // The registered Assistant's uid and package (as for UiEventReported). |
| 10706 | optional int32 uid = 2 [(is_uid) = true]; |
| 10707 | optional string package_name = 3; |
| 10708 | |
| 10709 | // An identifier used to disambiguate which logs refer to a particular invocation of the |
| 10710 | // Assistant (as for UiEventReported). |
| 10711 | optional int32 instance_id = 4; |
| 10712 | |
| 10713 | // The state of the device at the time of invocation. |
| 10714 | enum DeviceState { |
| 10715 | UNKNOWN_DEVICE_STATE = 0; |
| 10716 | AOD1 = 1; |
| 10717 | AOD2 = 2; |
| 10718 | BOUNCER = 3; |
| 10719 | UNLOCKED_LOCKSCREEN = 4; |
| 10720 | LAUNCHER_HOME = 5; |
| 10721 | LAUNCHER_OVERVIEW = 6; |
| 10722 | LAUNCHER_ALL_APPS = 7; |
| 10723 | APP_DEFAULT = 8; |
| 10724 | APP_IMMERSIVE = 9; |
| 10725 | APP_FULLSCREEN = 10; |
| 10726 | } |
| 10727 | optional DeviceState device_state = 5; |
| 10728 | |
| 10729 | // Whether the Assistant handles were showing at the time of invocation. |
| 10730 | optional bool assistant_handles_showing = 6; |
| 10731 | } |
Andy Hung | 48cffa3 | 2020-05-01 09:54:02 -0700 | [diff] [blame] | 10732 | |
| 10733 | /** |
| 10734 | * Logs when an AudioRecord finishes running on an audio device |
| 10735 | * |
| 10736 | * Logged from: |
| 10737 | * frameworks/av/services/mediametrics/AudioAnalytics.cpp |
| 10738 | */ |
| 10739 | message MediametricsAudioRecordDeviceUsageReported { |
| 10740 | // The devices connected to this AudioRecord. |
| 10741 | // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2". |
| 10742 | // See lookup<INPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10743 | // See audio_device_t in system/media/audio/include/system/audio-base.h |
| 10744 | optional string devices = 1; |
| 10745 | |
| 10746 | // The name of the remote device attached to the device, typically available for USB or BT. |
| 10747 | // This may be empty for a fixed device, or separated by "|" if more than one. |
| 10748 | optional string device_names = 2; |
| 10749 | |
| 10750 | // The amount of time spent in the device as measured by the active track in AudioFlinger. |
| 10751 | optional int64 device_time_nanos = 3; |
| 10752 | |
| 10753 | // The audio data format used for encoding. |
| 10754 | // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t |
| 10755 | optional string encoding = 4; |
| 10756 | |
| 10757 | // The client-server buffer framecount. |
| 10758 | // The framecount is generally between 960 - 48000 for PCM encoding. |
| 10759 | // The framecount represents raw buffer size in bytes for non-PCM encoding. |
| 10760 | optional int32 frame_count = 5; |
| 10761 | |
| 10762 | // The number of audio intervals (contiguous, continuous playbacks). |
| 10763 | optional int32 interval_count = 6; |
| 10764 | |
| 10765 | // The sample rate of the AudioRecord. |
| 10766 | // A number generally between 8000-96000 (frames per second). |
| 10767 | optional int32 sample_rate = 7; |
| 10768 | |
| 10769 | // The audio input flags used to construct the AudioRecord. |
| 10770 | // A string OR from system/media/audio/include/system/audio-base.h audio_input_flags_t |
| 10771 | optional string flags = 8; |
| 10772 | |
| 10773 | // The santized package name of the audio client associated with the AudioRecord. |
| 10774 | // See getSanitizedPackageNameAndVersionCode() in |
| 10775 | // frameworks/av/services/mediametrics/MediaMetricsService.cpp |
| 10776 | optional string package_name = 9; |
| 10777 | |
| 10778 | // The selected device id (nonzero if a non-default device is selected) |
| 10779 | optional int32 selected_device_id = 10; |
| 10780 | |
| 10781 | // The caller of the AudioRecord. |
| 10782 | // See lookup<CALLER_NAME>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10783 | optional string caller = 11; |
| 10784 | |
| 10785 | // The audio source for AudioRecord. |
| 10786 | // An enumeration from system/media/audio/include/system/audio-base.h audio_source_t |
| 10787 | optional string source = 12; |
| 10788 | } |
| 10789 | |
| 10790 | /** |
| 10791 | * Logs when an AudioThread finishes running on an audio device |
| 10792 | * |
| 10793 | * Logged from: |
| 10794 | * frameworks/av/services/mediametrics/AudioAnalytics.cpp |
| 10795 | */ |
| 10796 | message MediametricsAudioThreadDeviceUsageReported { |
| 10797 | // The devices connected to this audio thread. |
| 10798 | // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2". |
| 10799 | // (for record threads): |
| 10800 | // See lookup<INPUT_DEVICE> in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10801 | // (for playback threads): |
| 10802 | // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10803 | // See audio_device_t in system/media/audio/include/system/audio-base.h |
| 10804 | optional string devices = 1; |
| 10805 | |
| 10806 | // The name of the remote device attached to the device, typically available for USB or BT. |
| 10807 | // This may be empty for a fixed device, or separated by "|" if more than one. |
| 10808 | optional string device_names = 2; |
| 10809 | |
| 10810 | // The amount of time spent in the device as measured by the active track in AudioFlinger. |
| 10811 | optional int64 device_time_nanos = 3; |
| 10812 | |
| 10813 | // The audio data format used for encoding. |
| 10814 | // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t |
| 10815 | optional string encoding = 4; |
| 10816 | |
| 10817 | // The framecount of the buffer delivered to (or from) the HAL. |
| 10818 | // The framecount is generally ~960 for PCM encoding. |
| 10819 | // The framecount represents raw buffer size in bytes for non-PCM encoding. |
| 10820 | optional int32 frame_count = 5; |
| 10821 | |
| 10822 | // The number of audio intervals (contiguous, continuous playbacks). |
| 10823 | optional int32 interval_count = 6; |
| 10824 | |
| 10825 | // The sample rate of the audio thread. |
| 10826 | // A number generally between 8000-96000 (frames per second). |
| 10827 | optional int32 sample_rate = 7; |
| 10828 | |
| 10829 | // The audio flags used to construct the thread |
| 10830 | // (for record threads): |
| 10831 | // A string OR from system/media/audio/include/system/audio-base.h audio_input_flags_t |
| 10832 | // (for playback threads): |
| 10833 | // A string OR from system/media/audio/include/system/audio-base.h audio_output_flags_t |
| 10834 | optional string flags = 8; |
| 10835 | |
| 10836 | // The number of underruns encountered for a playback thread or the |
| 10837 | // number of overruns encountered for a capture thread. |
| 10838 | optional int32 xruns = 9; |
| 10839 | |
| 10840 | // The type of thread |
| 10841 | // A thread type enumeration from |
| 10842 | // frameworks/av/mediametrics/services/Translate.h |
| 10843 | optional string type = 10; |
| 10844 | } |
| 10845 | |
| 10846 | /** |
| 10847 | * Logs when an AudioTrack finishes running on an audio device |
| 10848 | * |
| 10849 | * Logged from: |
| 10850 | * frameworks/av/services/mediametrics/AudioAnalytics.cpp |
| 10851 | */ |
| 10852 | message MediametricsAudioTrackDeviceUsageReported { |
| 10853 | // The output devices connected to this AudioTrack. |
| 10854 | // A string OR of various output device categories, e.g. "DEVICE1|DEVICE2". |
| 10855 | // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10856 | // See audio_device_t in system/media/audio/include/system/audio-base.h |
| 10857 | optional string devices = 1; |
| 10858 | |
| 10859 | // The name of the remote device attached to the device, typically available for USB or BT. |
| 10860 | // This may be empty for a fixed device, or separated by "|" if more than one. |
| 10861 | optional string device_names = 2; |
| 10862 | |
| 10863 | // The amount of time spent in the device as measured by the active track in AudioFlinger. |
| 10864 | optional int64 device_time_nanos = 3; |
| 10865 | |
| 10866 | // The audio data format used for encoding. |
| 10867 | // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t |
| 10868 | optional string encoding = 4; |
| 10869 | |
| 10870 | // The client-server buffer framecount. |
| 10871 | // The framecount is generally between 960 - 48000 for PCM encoding. |
| 10872 | // The framecount represents raw buffer size in bytes for non-PCM encoding. |
| 10873 | // A static track (see traits) may have a very large framecount. |
| 10874 | optional int32 frame_count = 5; |
| 10875 | |
| 10876 | // The number of audio intervals (contiguous, continuous playbacks). |
| 10877 | optional int32 interval_count = 6; |
| 10878 | |
| 10879 | // The sample rate of the AudioTrack. |
| 10880 | // A number generally between 8000-96000 (frames per second). |
| 10881 | optional int32 sample_rate = 7; |
| 10882 | |
| 10883 | // The audio flags used to construct the AudioTrack. |
| 10884 | // A string OR from system/media/audio/include/system/audio-base.h audio_output_flags_t |
| 10885 | optional string flags = 8; |
| 10886 | |
| 10887 | // The number of underruns encountered. |
| 10888 | optional int32 xruns = 9; |
| 10889 | |
| 10890 | // The santized package name of the audio client associated with the AudioTrack. |
| 10891 | // See getSanitizedPackageNameAndVersionCode() in |
| 10892 | // frameworks/av/services/mediametrics/MediaMetricsService.cpp |
| 10893 | optional string package_name = 10; |
| 10894 | |
| 10895 | // The latency of the last sample in the buffer in milliseconds. |
| 10896 | optional float device_latency_millis = 11; |
| 10897 | |
| 10898 | // The startup time in milliseconds from start() to sample played. |
| 10899 | optional float device_startup_millis = 12; |
| 10900 | |
| 10901 | // The average volume of the track on the device [ 0.f - 1.f ] |
| 10902 | optional float device_volume = 13; |
| 10903 | |
| 10904 | // The selected device id (nonzero if a non-default device is selected) |
| 10905 | optional int32 selected_device_id = 14; |
| 10906 | |
| 10907 | // The stream_type category for the AudioTrack. |
| 10908 | // An enumeration from system/media/audio/include/system/audio-base.h audio_stream_type_t |
| 10909 | optional string stream_type = 15; |
| 10910 | |
| 10911 | // The usage for the AudioTrack. |
| 10912 | // An enumeration from system/media/audio/include/system/audio-base.h audio_usage_t |
| 10913 | optional string usage = 16; |
| 10914 | |
| 10915 | // The content type of the AudioTrack. |
| 10916 | // An enumeration from system/media/audio/include/system/audio-base.h audio_content_type_t |
| 10917 | optional string content_type = 17; |
| 10918 | |
| 10919 | // The caller of the AudioTrack. |
| 10920 | // See lookup<CALLER_NAME>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10921 | optional string caller = 18; |
| 10922 | |
| 10923 | // The traits of the AudioTrack. |
| 10924 | // A string OR of different traits, may be empty string. |
| 10925 | // Only "static" is supported for R. |
| 10926 | // See lookup<TRACK_TRAITS>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10927 | optional string traits = 19; |
| 10928 | } |
| 10929 | |
| 10930 | /** |
| 10931 | * Logs the status of an audio device connection attempt. |
| 10932 | * |
| 10933 | * Logged from: |
| 10934 | * frameworks/av/services/mediametrics/AudioAnalytics.cpp |
| 10935 | */ |
| 10936 | message MediametricsAudioDeviceConnectionReported { |
| 10937 | // The input devices represented by this report. |
| 10938 | // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2". |
| 10939 | // See lookup<INPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10940 | // See audio_device_t in system/media/audio/include/system/audio-base.h |
| 10941 | optional string input_devices = 1; |
| 10942 | |
| 10943 | // The output devices represented by this report. |
| 10944 | // A string OR of various output device categories. |
| 10945 | // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp |
| 10946 | // See audio_device_t in system/media/audio/include/system/audio-base.h |
| 10947 | optional string output_devices = 2; |
| 10948 | |
| 10949 | // The name of the remote device attached to the device, typically available for USB or BT. |
| 10950 | // This may be empty for a fixed device, or separated by "|" if more than one. |
| 10951 | optional string device_names = 3; |
| 10952 | |
| 10953 | // The result of the audio device connection. |
| 10954 | // 0 indicates success: connection verified. |
| 10955 | // 1 indicates unknown: connection not verified or not known if diverted properly. |
| 10956 | // Other values indicate specific status. |
| 10957 | // See DeviceConnectionResult in frameworks/av/services/mediametrics/AudioTypes.h |
| 10958 | optional int32 result = 4; |
| 10959 | |
| 10960 | // Average milliseconds of time to connect |
| 10961 | optional float time_to_connect_millis = 5; |
| 10962 | |
| 10963 | // Number of connections if aggregated statistics, otherwise 1. |
| 10964 | optional int32 connection_count = 6; |
| 10965 | } |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 10966 | |
Hasini Gunasinghe | 7c336a6 | 2020-05-28 10:23:01 +0000 | [diff] [blame] | 10967 | /** |
| 10968 | * Logs: i) creation of different types of cryptographic keys in the keystore, |
| 10969 | * ii) operations performed using the keys, |
| 10970 | * iii) attestation of the keys |
| 10971 | * Logged from: system/security/keystore/key_event_log_handler.cpp |
| 10972 | */ |
| 10973 | message KeystoreKeyEventReported { |
| 10974 | |
| 10975 | enum Algorithm { |
| 10976 | /** Asymmetric algorithms. */ |
| 10977 | RSA = 1; |
| 10978 | // 2 removed, do not reuse. |
| 10979 | EC = 3; |
| 10980 | /** Block cipher algorithms */ |
| 10981 | AES = 32; |
| 10982 | TRIPLE_DES = 33; |
| 10983 | /** MAC algorithms */ |
| 10984 | HMAC = 128; |
| 10985 | }; |
| 10986 | /** Algorithm associated with the key */ |
| 10987 | optional Algorithm algorithm = 1; |
| 10988 | |
| 10989 | /** Size of the key */ |
| 10990 | optional int32 key_size = 2; |
| 10991 | |
| 10992 | enum KeyOrigin { |
| 10993 | /** Generated in keymaster. Should not exist outside the TEE. */ |
| 10994 | GENERATED = 0; |
| 10995 | /** Derived inside keymaster. Likely exists off-device. */ |
| 10996 | DERIVED = 1; |
| 10997 | /** Imported into keymaster. Existed as cleartext in Android. */ |
| 10998 | IMPORTED = 2; |
| 10999 | /** Keymaster did not record origin. */ |
| 11000 | UNKNOWN = 3; |
| 11001 | /** Securely imported into Keymaster. */ |
| 11002 | SECURELY_IMPORTED = 4; |
| 11003 | }; |
| 11004 | /* Logs whether the key was generated, imported, securely imported, or derived.*/ |
| 11005 | optional KeyOrigin key_origin = 3; |
| 11006 | |
| 11007 | enum HardwareAuthenticatorType { |
| 11008 | NONE = 0; |
| 11009 | PASSWORD = 1; |
| 11010 | FINGERPRINT = 2; |
| 11011 | // Additional entries must be powers of 2. |
| 11012 | }; |
| 11013 | /** |
| 11014 | * What auth types does this key require? If none, |
| 11015 | * then no auth required. |
| 11016 | */ |
| 11017 | optional HardwareAuthenticatorType user_auth_type = 4; |
| 11018 | |
| 11019 | /** |
| 11020 | * If user authentication is required, is the requirement time based? If it |
| 11021 | * is not time based then this field will not be used and the key is per |
| 11022 | * operation. Per operation keys must be user authenticated on each usage. |
| 11023 | */ |
| 11024 | optional int32 user_auth_key_timeout_secs = 5; |
| 11025 | |
| 11026 | /** |
| 11027 | * padding mode, digest, block_mode and purpose should ideally be repeated |
| 11028 | * fields. However, since statsd does not support repeated fields in |
| 11029 | * pushed atoms, they are represented using bitmaps. |
| 11030 | */ |
| 11031 | |
| 11032 | /** Track which padding mode is being used.*/ |
| 11033 | optional int32 padding_mode_bitmap = 6; |
| 11034 | |
| 11035 | /** Track which digest is being used. */ |
| 11036 | optional int32 digest_bitmap = 7; |
| 11037 | |
| 11038 | /** Track what block mode is being used (for encryption). */ |
| 11039 | optional int32 block_mode_bitmap = 8; |
| 11040 | |
| 11041 | /** Track what purpose is this key serving. */ |
| 11042 | optional int32 purpose_bitmap = 9; |
| 11043 | |
| 11044 | enum EcCurve { |
| 11045 | P_224 = 0; |
| 11046 | P_256 = 1; |
| 11047 | P_384 = 2; |
| 11048 | P_521 = 3; |
| 11049 | }; |
| 11050 | /** Which ec curve was selected if elliptic curve cryptography is in use **/ |
| 11051 | optional EcCurve ec_curve = 10; |
| 11052 | |
| 11053 | enum KeyBlobUsageRequirements { |
| 11054 | STANDALONE = 0; |
| 11055 | REQUIRES_FILE_SYSTEM = 1; |
| 11056 | }; |
| 11057 | /** Standalone or is a file system required */ |
| 11058 | optional KeyBlobUsageRequirements key_blob_usage_reqs = 11; |
| 11059 | |
| 11060 | enum Type { |
| 11061 | key_operation = 0; |
| 11062 | key_creation = 1; |
| 11063 | key_attestation = 2; |
| 11064 | } |
| 11065 | /** Key creation event, operation event or attestation event? */ |
| 11066 | optional Type type = 12; |
| 11067 | |
| 11068 | /** Was the key creation, operation, or attestation successful? */ |
| 11069 | optional bool was_successful = 13; |
| 11070 | |
| 11071 | /** Response code or error code */ |
| 11072 | optional int32 error_code = 14; |
| 11073 | } |
| 11074 | |
Michael Wachenschwanz | 1a7f7ab | 2020-06-09 20:16:27 -0700 | [diff] [blame] | 11075 | // Blob Committer stats |
| 11076 | // Keep in sync between: |
| 11077 | // frameworks/base/core/proto/android/server/blobstoremanagerservice.proto |
| 11078 | // frameworks/base/cmds/statsd/src/atoms.proto |
| 11079 | message BlobCommitterProto { |
| 11080 | // Committer app's uid |
| 11081 | optional int32 uid = 1 [(is_uid) = true]; |
| 11082 | |
| 11083 | // Unix epoch timestamp of the commit in milliseconds |
| 11084 | optional int64 commit_timestamp_millis = 2; |
| 11085 | |
| 11086 | // Flags of what access types the committer has set for the Blob |
| 11087 | optional int32 access_mode = 3; |
| 11088 | |
| 11089 | // Number of packages that have been whitelisted for ACCESS_TYPE_WHITELIST |
| 11090 | optional int32 num_whitelisted_package = 4; |
| 11091 | } |
| 11092 | |
| 11093 | // Blob Leasee stats |
| 11094 | // Keep in sync between: |
| 11095 | // frameworks/base/core/proto/android/server/blobstoremanagerservice.proto |
| 11096 | // frameworks/base/cmds/statsd/src/atoms.proto |
| 11097 | message BlobLeaseeProto { |
| 11098 | // Leasee app's uid |
| 11099 | optional int32 uid = 1 [(is_uid) = true]; |
| 11100 | |
| 11101 | // Unix epoch timestamp for lease expiration in milliseconds |
| 11102 | optional int64 lease_expiry_timestamp_millis = 2; |
| 11103 | } |
| 11104 | |
| 11105 | // List of Blob Committers |
| 11106 | // Keep in sync between: |
| 11107 | // frameworks/base/core/proto/android/server/blobstoremanagerservice.proto |
| 11108 | // frameworks/base/cmds/statsd/src/atoms.proto |
| 11109 | message BlobCommitterListProto { |
| 11110 | repeated BlobCommitterProto committer = 1; |
| 11111 | } |
| 11112 | |
| 11113 | // List of Blob Leasees |
| 11114 | // Keep in sync between: |
| 11115 | // frameworks/base/core/proto/android/server/blobstoremanagerservice.proto |
| 11116 | // frameworks/base/cmds/statsd/src/atoms.proto |
| 11117 | message BlobLeaseeListProto { |
| 11118 | repeated BlobLeaseeProto leasee = 1; |
| 11119 | } |
| 11120 | |
| 11121 | /** |
| 11122 | * Logs the current state of a Blob committed with BlobStoreManager |
| 11123 | * |
| 11124 | * Pulled from: |
| 11125 | * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java |
| 11126 | */ |
| 11127 | message BlobInfo { |
| 11128 | // Id of the Blob |
| 11129 | optional int64 blob_id = 1; |
| 11130 | |
| 11131 | // Size of the Blob data |
| 11132 | optional int64 size = 2; |
| 11133 | |
| 11134 | // Unix epoch timestamp of the Blob's expiration in milliseconds |
| 11135 | optional int64 expiry_timestamp_millis = 3; |
| 11136 | |
| 11137 | // List of committers of this Blob |
| 11138 | optional BlobCommitterListProto committers = 4; |
| 11139 | |
| 11140 | // List of leasees of this Blob |
| 11141 | optional BlobLeaseeListProto leasees = 5; |
| 11142 | } |