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"; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 27 | import "frameworks/base/core/proto/android/bluetooth/a2dp/enums.proto"; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 28 | import "frameworks/base/core/proto/android/bluetooth/enums.proto"; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 29 | import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto"; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 30 | import "frameworks/base/core/proto/android/bluetooth/hfp/enums.proto"; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 31 | import "frameworks/base/core/proto/android/bluetooth/smp/enums.proto"; |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 32 | import "frameworks/base/core/proto/android/debug/enums.proto"; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 33 | import "frameworks/base/core/proto/android/hardware/biometrics/enums.proto"; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 34 | import "frameworks/base/core/proto/android/hardware/sensor/assist/enums.proto"; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 35 | import "frameworks/base/core/proto/android/net/networkcapabilities.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 36 | import "frameworks/base/core/proto/android/os/enums.proto"; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 37 | import "frameworks/base/core/proto/android/server/connectivity/data_stall_event.proto"; |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 38 | import "frameworks/base/core/proto/android/server/enums.proto"; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 39 | import "frameworks/base/core/proto/android/server/job/enums.proto"; |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 40 | import "frameworks/base/core/proto/android/server/location/enums.proto"; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 41 | import "frameworks/base/core/proto/android/service/procstats_enum.proto"; |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 42 | import "frameworks/base/core/proto/android/service/usb.proto"; |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 43 | import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto"; |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 44 | import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 45 | import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto"; |
| 46 | import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto"; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 47 | import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto"; |
| 48 | import "frameworks/base/core/proto/android/stats/enums.proto"; |
| 49 | import "frameworks/base/core/proto/android/stats/intelligence/enums.proto"; |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 50 | import "frameworks/base/core/proto/android/stats/launcher/launcher.proto"; |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 51 | import "frameworks/base/core/proto/android/stats/location/location_enums.proto"; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 52 | import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto"; |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 53 | import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto"; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 54 | import "frameworks/base/core/proto/android/stats/style/style_enums.proto"; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 55 | import "frameworks/base/core/proto/android/telecomm/enums.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 56 | import "frameworks/base/core/proto/android/telephony/enums.proto"; |
| 57 | import "frameworks/base/core/proto/android/view/enums.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 58 | import "frameworks/base/core/proto/android/wifi/enums.proto"; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 59 | import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto"; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 60 | import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto"; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 61 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 62 | /** |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 63 | * The master atom class. This message defines all of the available |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 64 | * raw stats log events from the Android system, also known as "atoms." |
| 65 | * |
| 66 | * This field contains a single oneof with all of the available messages. |
| 67 | * The stats-log-api-gen tool runs as part of the Android build and |
| 68 | * generates the android.util.StatsLog class, which contains the constants |
| 69 | * and methods that Android uses to log. |
| 70 | * |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 71 | * This Atom class is not actually built into the Android system. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 72 | * Instead, statsd on Android constructs these messages synthetically, |
| 73 | * in the format defined here and in stats_log.proto. |
| 74 | */ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 75 | message Atom { |
| 76 | // Pushed atoms start at 2. |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 77 | oneof pushed { |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 78 | // For StatsLog reasons, 1 is illegal and will not work. Must start at 2. |
| 79 | BleScanStateChanged ble_scan_state_changed = 2; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 80 | ProcessStateChanged process_state_changed = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 81 | BleScanResultReceived ble_scan_result_received = 4; |
| 82 | SensorStateChanged sensor_state_changed = 5; |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 83 | GpsScanStateChanged gps_scan_state_changed = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 84 | SyncStateChanged sync_state_changed = 7; |
| 85 | ScheduledJobStateChanged scheduled_job_state_changed = 8; |
| 86 | ScreenBrightnessChanged screen_brightness_changed = 9; |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 87 | WakelockStateChanged wakelock_state_changed = 10; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 88 | LongPartialWakelockStateChanged long_partial_wakelock_state_changed = 11; |
| 89 | MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12; |
| 90 | WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 91 | ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = 14; |
| 92 | MemoryFactorStateChanged memory_factor_state_changed = 15; |
| 93 | ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16; |
| 94 | CachedKillReported cached_kill_reported = 17; |
| 95 | ProcessMemoryStatReported process_memory_stat_reported = 18; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 96 | LauncherUIChanged launcher_event = 19; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 97 | BatterySaverModeStateChanged battery_saver_mode_state_changed = 20; |
| 98 | DeviceIdleModeStateChanged device_idle_mode_state_changed = 21; |
| 99 | DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 100 | AudioStateChanged audio_state_changed = 23; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 101 | MediaCodecStateChanged media_codec_state_changed = 24; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 102 | CameraStateChanged camera_state_changed = 25; |
| 103 | FlashlightStateChanged flashlight_state_changed = 26; |
| 104 | UidProcessStateChanged uid_process_state_changed = 27; |
| 105 | ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28; |
| 106 | ScreenStateChanged screen_state_changed = 29; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 107 | BatteryLevelChanged battery_level_changed = 30; |
| 108 | ChargingStateChanged charging_state_changed = 31; |
| 109 | PluggedStateChanged plugged_state_changed = 32; |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 110 | InteractiveStateChanged interactive_state_changed = 33; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 111 | TouchEventReported touch_event_reported = 34; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 112 | WakeupAlarmOccurred wakeup_alarm_occurred = 35; |
| 113 | KernelWakeupReported kernel_wakeup_reported = 36; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 114 | WifiLockStateChanged wifi_lock_state_changed = 37; |
| 115 | WifiSignalStrengthChanged wifi_signal_strength_changed = 38; |
| 116 | WifiScanStateChanged wifi_scan_state_changed = 39; |
| 117 | PhoneSignalStrengthChanged phone_signal_strength_changed = 40; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 118 | SettingChanged setting_changed = 41; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 119 | ActivityForegroundStateChanged activity_foreground_state_changed = 42; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 120 | IsolatedUidChanged isolated_uid_changed = 43; |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 121 | PacketWakeupOccurred packet_wakeup_occurred = 44; |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 122 | WallClockTimeShifted wall_clock_time_shifted = 45; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 123 | AnomalyDetected anomaly_detected = 46; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 124 | AppBreadcrumbReported app_breadcrumb_reported = 47 [(allow_from_any_uid) = true]; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 125 | AppStartOccurred app_start_occurred = 48; |
| 126 | AppStartCanceled app_start_canceled = 49; |
| 127 | AppStartFullyDrawn app_start_fully_drawn = 50; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 128 | LmkKillOccurred lmk_kill_occurred = 51; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 129 | PictureInPictureStateChanged picture_in_picture_state_changed = 52; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 130 | WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 131 | LmkStateChanged lmk_state_changed = 54; |
| 132 | AppStartMemoryStateCaptured app_start_memory_state_captured = 55; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 133 | ShutdownSequenceReported shutdown_sequence_reported = 56; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 134 | BootSequenceReported boot_sequence_reported = 57; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 135 | DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 136 | OverlayStateChanged overlay_state_changed = 59; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 137 | ForegroundServiceStateChanged foreground_service_state_changed = 60; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 138 | CallStateChanged call_state_changed = 61; |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 139 | KeyguardStateChanged keyguard_state_changed = 62; |
| 140 | KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63; |
| 141 | KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 142 | AppDied app_died = 65; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 143 | ResourceConfigurationChanged resource_configuration_changed = 66; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 144 | BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67; |
| 145 | BluetoothConnectionStateChanged bluetooth_connection_state_changed = 68; |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 146 | GpsSignalQualityChanged gps_signal_quality_changed = 69; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 147 | UsbConnectorStateChanged usb_connector_state_changed = 70; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 148 | SpeakerImpedanceReported speaker_impedance_reported = 71; |
| 149 | HardwareFailed hardware_failed = 72; |
| 150 | PhysicalDropDetected physical_drop_detected = 73; |
| 151 | ChargeCyclesReported charge_cycles_reported = 74; |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 152 | MobileConnectionStateChanged mobile_connection_state_changed = 75; |
| 153 | MobileRadioTechnologyChanged mobile_radio_technology_changed = 76; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 154 | UsbDeviceAttached usb_device_attached = 77; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 155 | AppCrashOccurred app_crash_occurred = 78; |
| 156 | ANROccurred anr_occurred = 79; |
| 157 | WTFOccurred wtf_occurred = 80; |
| 158 | LowMemReported low_mem_reported = 81; |
Howard Ro | cb767f6 | 2018-06-19 19:58:05 -0700 | [diff] [blame] | 159 | GenericAtom generic_atom = 82; |
jianjin | 6eada30 | 2019-02-28 11:25:57 -0800 | [diff] [blame] | 160 | KeyValuePairsAtom key_value_pairs_atom = 83 [(allow_from_any_uid) = true]; |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 161 | VibratorStateChanged vibrator_state_changed = 84; |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 162 | DeferredJobStatsReported deferred_job_stats_reported = 85; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 163 | ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true]; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 164 | BiometricAcquired biometric_acquired = 87; |
| 165 | BiometricAuthenticated biometric_authenticated = 88; |
| 166 | BiometricErrorOccurred biometric_error_occurred = 89; |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 167 | UiEventReported ui_event_reported = 90; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 168 | BatteryHealthSnapshot battery_health_snapshot = 91; |
| 169 | SlowIo slow_io = 92; |
| 170 | BatteryCausedShutdown battery_caused_shutdown = 93; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 171 | PhoneServiceStateChanged phone_service_state_changed = 94; |
| 172 | PhoneStateChanged phone_state_changed = 95; |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 173 | UserRestrictionChanged user_restriction_changed = 96; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 174 | SettingsUIChanged settings_ui_changed = 97; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 175 | ConnectivityStateChanged connectivity_state_changed = 98; |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 176 | // TODO: service state change is very noisy shortly after boot, as well |
| 177 | // as at other transitions - coming out of doze, device plugged in, etc. |
| 178 | // Consider removing this if it becomes a problem |
| 179 | ServiceStateChanged service_state_changed = 99; |
| 180 | ServiceLaunchReported service_launch_reported = 100; |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 181 | FlagFlipUpdateOccurred flag_flip_update_occurred = 101; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 182 | BinaryPushStateChanged binary_push_state_changed = 102; |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 183 | DevicePolicyEvent device_policy_event = 103; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 184 | DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = |
| 185 | 104 [(log_from_module) = "docsui"]; |
| 186 | DocsUIFileOperationCopyMoveModeReported |
| 187 | docs_ui_file_op_copy_move_mode_reported = |
| 188 | 105 [(log_from_module) = "docsui"]; |
| 189 | DocsUIFileOperationFailureReported docs_ui_file_op_failure = |
| 190 | 106 [(log_from_module) = "docsui"]; |
| 191 | DocsUIFileOperationReported docs_ui_provider_file_op = |
| 192 | 107 [(log_from_module) = "docsui"]; |
| 193 | DocsUIInvalidScopedAccessRequestReported |
| 194 | docs_ui_invalid_scoped_access_request = |
| 195 | 108 [(log_from_module) = "docsui"]; |
| 196 | DocsUILaunchReported docs_ui_launch_reported = |
| 197 | 109 [(log_from_module) = "docsui"]; |
| 198 | DocsUIRootVisitedReported docs_ui_root_visited = |
| 199 | 110 [(log_from_module) = "docsui"]; |
| 200 | DocsUIStartupMsReported docs_ui_startup_ms = |
| 201 | 111 [(log_from_module) = "docsui"]; |
| 202 | DocsUIUserActionReported docs_ui_user_action_reported = |
| 203 | 112 [(log_from_module) = "docsui"]; |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 204 | WifiEnabledStateChanged wifi_enabled_state_changed = 113; |
| 205 | WifiRunningStateChanged wifi_running_state_changed = 114; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 206 | AppCompacted app_compacted = 115; |
lifr | e82d8f6 | 2019-03-25 20:33:21 +0800 | [diff] [blame] | 207 | NetworkDnsEventReported network_dns_event_reported = 116 [(log_from_module) = "resolv"]; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 208 | DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = |
| 209 | 117 [(log_from_module) = "docsui"]; |
| 210 | DocsUIPickResultReported docs_ui_pick_result_reported = |
| 211 | 118 [(log_from_module) = "docsui"]; |
| 212 | DocsUISearchModeReported docs_ui_search_mode_reported = |
| 213 | 119 [(log_from_module) = "docsui"]; |
| 214 | DocsUISearchTypeReported docs_ui_search_type_reported = |
| 215 | 120 [(log_from_module) = "docsui"]; |
Chiachang Wang | e512b26 | 2019-04-11 21:24:28 +0800 | [diff] [blame] | 216 | DataStallEvent data_stall_event = 121 [(log_from_module) = "network_stack"]; |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 217 | RescuePartyResetReported rescue_party_reset_reported = 122; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 218 | SignedConfigReported signed_config_reported = 123; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 219 | GnssNiEventReported gnss_ni_event_reported = 124; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 220 | BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = 125; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 221 | BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = 126; |
| 222 | BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = 127; |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 223 | AppDowngraded app_downgraded = 128; |
| 224 | AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; |
| 225 | LowStorageStateChanged low_storage_state_changed = 130; |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 226 | GnssNfwNotificationReported gnss_nfw_notification_reported = 131; |
| 227 | GnssConfigurationReported gnss_configuration_reported = 132; |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 228 | UsbPortOverheatEvent usb_port_overheat_event_reported = 133; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 229 | NfcErrorOccurred nfc_error_occurred = 134; |
| 230 | NfcStateChanged nfc_state_changed = 135; |
| 231 | NfcBeamOccurred nfc_beam_occurred = 136; |
| 232 | NfcCardemulationOccurred nfc_cardemulation_occurred = 137; |
| 233 | NfcTagOccurred nfc_tag_occurred = 138; |
| 234 | NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139; |
| 235 | SeStateChanged se_state_changed = 140; |
| 236 | SeOmapiReported se_omapi_reported = 141; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 237 | BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = 142; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 238 | AttentionManagerServiceResultReported attention_manager_service_result_reported = 143; |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 239 | AdbConnectionChanged adb_connection_changed = 144; |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 240 | SpeechDspStatReported speech_dsp_stat_reported = 145; |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 241 | UsbContaminantReported usb_contaminant_reported = 146; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 242 | WatchdogRollbackOccurred watchdog_rollback_occurred = 147; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 243 | BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = 148; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 244 | BubbleUIChanged bubble_ui_changed = 149; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 245 | ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 246 | BluetoothActiveDeviceChanged bluetooth_active_device_changed = 151; |
| 247 | BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = 152; |
| 248 | BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = 153; |
| 249 | BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = 154; |
| 250 | BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = 155; |
| 251 | BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = 156; |
| 252 | BluetoothDeviceRssiReported bluetooth_device_rssi_reported = 157; |
| 253 | BluetoothDeviceFailedContactCounterReported bluetooth_device_failed_contact_counter_reported = 158; |
| 254 | BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = 159; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 255 | BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = 160; |
| 256 | BluetoothQualityReportReported bluetooth_quality_report_reported = 161; |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 257 | BluetoothDeviceInfoReported bluetooth_device_info_reported = 162; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 258 | BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = 163; |
| 259 | BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = 164; |
| 260 | BluetoothBondStateChanged bluetooth_bond_state_changed = 165; |
| 261 | BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = 166; |
| 262 | BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 167; |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 263 | ScreenTimeoutExtensionReported screen_timeout_extension_reported = 168; |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 264 | ProcessStartTime process_start_time = 169; |
Philip P. Moltmann | b2f0c77 | 2019-04-11 14:41:21 -0700 | [diff] [blame] | 265 | PermissionGrantRequestResultReported permission_grant_request_result_reported = |
| 266 | 170 [(log_from_module) = "permissioncontroller"]; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 267 | BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 268 | DeviceIdentifierAccessDenied device_identifier_access_denied = 172; |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 269 | BubbleDeveloperErrorReported bubble_developer_error_reported = 173; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 270 | AssistGestureStageReported assist_gesture_stage_reported = 174; |
| 271 | AssistGestureFeedbackReported assist_gesture_feedback_reported = 175; |
| 272 | AssistGestureProgressReported assist_gesture_progress_reported = 176; |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 273 | TouchGestureClassified touch_gesture_classified = 177; |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 274 | HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true]; |
Kunhung Li | 286c52f | 2019-05-21 20:10:43 +0800 | [diff] [blame] | 275 | StyleUIChanged style_ui_changed = 179 [(log_from_module) = "style"]; |
Joel Galenson | 6f41b106 | 2019-04-16 12:22:41 -0700 | [diff] [blame] | 276 | PrivacyIndicatorsInteracted privacy_indicators_interacted = |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 277 | 180 [(log_from_module) = "permissioncontroller"]; |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 278 | AppInstallOnExternalStorageReported app_install_on_external_storage_reported = 181; |
Chiachang Wang | e512b26 | 2019-04-11 21:24:28 +0800 | [diff] [blame] | 279 | NetworkStackReported network_stack_reported = 182 [(log_from_module) = "network_stack"]; |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 280 | AppMovedStorageReported app_moved_storage_reported = 183; |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 281 | BiometricEnrolled biometric_enrolled = 184; |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 282 | SystemServerWatchdogOccurred system_server_watchdog_occurred = 185; |
| 283 | TombStoneOccurred tomb_stone_occurred = 186; |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 284 | BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = 187; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 285 | IntelligenceEventReported intelligence_event_reported = |
| 286 | 188 [(log_from_module) = "intelligence"]; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 287 | ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = 189; |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 288 | RoleRequestResultReported role_request_result_reported = |
| 289 | 190 [(log_from_module) = "permissioncontroller"]; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 290 | MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191; |
| 291 | MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192; |
| 292 | MediametricsAudiothreadReported mediametrics_audiothread_reported = 193; |
| 293 | MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194; |
| 294 | MediametricsCodecReported mediametrics_codec_reported = 195; |
| 295 | MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196; |
| 296 | MediametricsExtractorReported mediametrics_extractor_reported = 197; |
| 297 | MediametricsMediadrmReported mediametrics_mediadrm_reported = 198; |
| 298 | MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199; |
| 299 | MediametricsRecorderReported mediametrics_recorder_reported = 200; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 300 | MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201; |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 301 | CarPowerStateChanged car_power_state_changed = 203; |
| 302 | GarageModeInfo garage_mode_info = 204; |
Tej Singh | c920308 | 2019-05-03 13:42:23 -0700 | [diff] [blame] | 303 | TestAtomReported test_atom_reported = 205 [(log_from_module) = "cts"]; |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 304 | ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = 206; |
| 305 | ContentCaptureServiceEvents content_capture_service_events = 207; |
| 306 | ContentCaptureSessionEvents content_capture_session_events = 208; |
| 307 | ContentCaptureFlushed content_capture_flushed = 209; |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 308 | LocationManagerApiUsageReported location_manager_api_usage_reported = 210; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 309 | ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported = |
| 310 | 211 [(log_from_module) = "permissioncontroller"]; |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 311 | RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = |
| 312 | 212 [(log_from_module) = "permissioncontroller"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 313 | GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions = |
| 314 | 213 [(log_from_module) = "permissioncontroller"]; |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 315 | LocationAccessCheckNotificationAction location_access_check_notification_action = |
| 316 | 214 [(log_from_module) = "permissioncontroller"]; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 317 | AppPermissionFragmentActionReported app_permission_fragment_action_reported = |
| 318 | 215 [(log_from_module) = "permissioncontroller"]; |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 319 | AppPermissionFragmentViewed app_permission_fragment_viewed = |
| 320 | 216 [(log_from_module) = "permissioncontroller"]; |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 321 | AppPermissionsFragmentViewed app_permissions_fragment_viewed = |
| 322 | 217 [(log_from_module) = "permissioncontroller"]; |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 323 | PermissionAppsFragmentViewed permission_apps_fragment_viewed = |
| 324 | 218 [(log_from_module) = "permissioncontroller"]; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 325 | TextSelectionEvent text_selection_event = |
| 326 | 219 [(log_from_module) = "textclassifier"]; |
| 327 | TextLinkifyEvent text_linkify_event = |
| 328 | 220 [(log_from_module) = "textclassifier"]; |
| 329 | ConversationActionsEvent conversation_actions_event = |
| 330 | 221 [(log_from_module) = "textclassifier"]; |
| 331 | LanguageDetectionEvent language_detection_event = |
| 332 | 222 [(log_from_module) = "textclassifier"]; |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 333 | ExclusionRectStateChanged exclusion_rect_state_changed = 223; |
| 334 | BackGesture back_gesture_reported_reported = 224; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 335 | UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225; |
| 336 | UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226; |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 337 | CameraActionEvent camera_action_event = 227; |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 338 | AppCompatibilityChangeReported app_compatibility_change_reported = |
| 339 | 228 [(allow_from_any_uid) = true]; |
Hector Dearman | 40579f6 | 2019-11-01 13:19:30 +0000 | [diff] [blame] | 340 | PerfettoUploaded perfetto_uploaded = |
| 341 | 229 [(log_from_module) = "perfetto"]; |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 342 | VmsClientConnectionStateChanged vms_client_connection_state_changed = 230; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 343 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 344 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 345 | // Pulled events will start at field 10000. |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 346 | // Next: 10065 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 347 | oneof pulled { |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 348 | WifiBytesTransfer wifi_bytes_transfer = 10000; |
| 349 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001; |
| 350 | MobileBytesTransfer mobile_bytes_transfer = 10002; |
| 351 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 352 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 353 | KernelWakelock kernel_wakelock = 10004; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 354 | SubsystemSleepState subsystem_sleep_state = 10005; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 355 | CpuTimePerFreq cpu_time_per_freq = 10008; |
| 356 | CpuTimePerUid cpu_time_per_uid = 10009; |
| 357 | CpuTimePerUidFreq cpu_time_per_uid_freq = 10010; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 358 | WifiActivityInfo wifi_activity_info = 10011; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 359 | ModemActivityInfo modem_activity_info = 10012; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 360 | BluetoothActivityInfo bluetooth_activity_info = 10007; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 361 | ProcessMemoryState process_memory_state = 10013; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 362 | SystemElapsedRealtime system_elapsed_realtime = 10014; |
| 363 | SystemUptime system_uptime = 10015; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 364 | CpuActiveTime cpu_active_time = 10016; |
| 365 | CpuClusterTime cpu_cluster_time = 10017; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 366 | DiskSpace disk_space = 10018 [deprecated=true]; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 367 | RemainingBatteryCapacity remaining_battery_capacity = 10019; |
| 368 | FullBatteryCapacity full_battery_capacity = 10020; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 369 | Temperature temperature = 10021; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 370 | BinderCalls binder_calls = 10022; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 371 | BinderCallsExceptions binder_calls_exceptions = 10023; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 372 | LooperStats looper_stats = 10024; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 373 | DiskStats disk_stats = 10025; |
| 374 | DirectoryUsage directory_usage = 10026; |
| 375 | AppSize app_size = 10027; |
| 376 | CategorySize category_size = 10028; |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 377 | ProcStats proc_stats = 10029; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 378 | BatteryVoltage battery_voltage = 10030; |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 379 | NumFingerprintsEnrolled num_fingerprints_enrolled = 10031; |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 380 | DiskIo disk_io = 10032; |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 381 | PowerProfile power_profile = 10033; |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 382 | ProcStatsPkgProc proc_stats_pkg_proc = 10034; |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 383 | ProcessCpuTime process_cpu_time = 10035; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 384 | CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037; |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 385 | OnDevicePowerMeasurement on_device_power_measurement = 10038; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 386 | DeviceCalculatedPowerUse device_calculated_power_use = 10039; |
| 387 | DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = 10040; |
| 388 | DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = 10041; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 389 | ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042; |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 390 | BatteryLevel battery_level = 10043; |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 391 | BuildInformation build_information = 10044; |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 392 | BatteryCycleCount battery_cycle_count = 10045; |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 393 | DebugElapsedClock debug_elapsed_clock = 10046; |
| 394 | DebugFailingElapsedClock debug_failing_elapsed_clock = 10047; |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 395 | NumFacesEnrolled num_faces_enrolled = 10048; |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 396 | RoleHolder role_holder = 10049; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 397 | DangerousPermissionState dangerous_permission_state = 10050; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 398 | TrainInfo train_info = 10051; |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 399 | TimeZoneDataInfo time_zone_data_info = 10052; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 400 | ExternalStorageInfo external_storage_info = 10053; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 401 | GpuStatsGlobalInfo gpu_stats_global_info = 10054; |
| 402 | GpuStatsAppInfo gpu_stats_app_info = 10055; |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 403 | SystemIonHeapSize system_ion_heap_size = 10056; |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 404 | AppsOnExternalStorageInfo apps_on_external_storage_info = 10057; |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 405 | FaceSettings face_settings = 10058; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 406 | CoolingDevice cooling_device = 10059; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 407 | AppOps app_ops = 10060; |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 408 | ProcessSystemIonHeapSize process_system_ion_heap_size = 10061; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 409 | SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062; |
| 410 | SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063; |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 411 | ProcessMemorySnapshot process_memory_snapshot = 10064; |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 412 | VmsClientStats vms_client_stats = 10065; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 413 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 414 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 415 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 416 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 417 | // 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] | 418 | |
| 419 | reserved 10036; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 420 | } |
| 421 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 422 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 423 | * This proto represents a node of an attribution chain. |
| 424 | * Note: All attribution chains are represented as a repeated field of type |
| 425 | * AttributionNode. It is understood that in such arrays, the order is that |
| 426 | * 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] | 427 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 428 | message AttributionNode { |
| 429 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 430 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 431 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 432 | // The (optional) string tag for an element in the attribution chain. If the |
| 433 | // element has no tag, it is encoded as an empty string. |
| 434 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 435 | } |
| 436 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 437 | message KeyValuePair { |
| 438 | optional int32 key = 1; |
| 439 | oneof value { |
Howard Ro | 4078dd4 | 2018-09-27 17:41:08 -0700 | [diff] [blame] | 440 | int32 value_int = 2; |
| 441 | int64 value_long = 3; |
| 442 | string value_str = 4; |
| 443 | float value_float = 5; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 444 | } |
| 445 | } |
| 446 | |
| 447 | message KeyValuePairsAtom { |
| 448 | optional int32 uid = 1; |
| 449 | repeated KeyValuePair pairs = 2; |
| 450 | } |
| 451 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 452 | /* |
| 453 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 454 | * 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] | 455 | * |
| 456 | * RULES: |
| 457 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 458 | * Skipping field ids is not allowed. |
| 459 | * - These form an API, so renaming, renumbering or removing fields is |
| 460 | * not allowed between android releases. (This is not currently enforced, |
| 461 | * but there will be a tool to enforce this restriction). |
| 462 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 463 | * are allowed (yet). The bytes type is also not allowed. |
| 464 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 465 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 466 | * - 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] | 467 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 468 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 469 | * annotation. The generated code on android will be represented by UIDs, |
| 470 | * and those UIDs will be translated in xxx to those strings. |
| 471 | * |
| 472 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 473 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 474 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 475 | * ***************************************************************************** |
| 476 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 477 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 478 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 479 | * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 480 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 481 | * |
| 482 | * Logged from: |
| 483 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 484 | */ |
| 485 | message ThermalThrottlingStateChanged { |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 486 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 487 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 488 | |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 489 | // Throttling state, this field is DEPRECATED |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 490 | enum State { |
| 491 | UNKNOWN = 0; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 492 | START = 1; // START indicated that throttling was triggered. |
| 493 | STOP = 2; // STOP indicates that throttling was cleared. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 494 | } |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 495 | optional State state = 2; |
| 496 | |
| 497 | optional float temperature = 3; |
| 498 | } |
| 499 | |
| 500 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 501 | * Logs when the screen state changes. |
| 502 | * |
| 503 | * Logged from: |
| 504 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 505 | */ |
| 506 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 507 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 508 | optional android.view.DisplayStateEnum state = 1 [(state_field_option).option = EXCLUSIVE]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 509 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 510 | |
| 511 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 512 | * Logs that the process state of the uid, as determined by ActivityManager |
| 513 | * (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] | 514 | * |
| 515 | * Logged from: |
| 516 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 517 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 518 | message UidProcessStateChanged { |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 519 | optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 520 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 521 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 522 | optional android.app.ProcessStateEnum state = 2 [(state_field_option).option = EXCLUSIVE]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 523 | } |
| 524 | |
| 525 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 526 | * Logs process state change of a process, as per the activity manager. |
| 527 | * |
| 528 | * Logged from: |
| 529 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 530 | */ |
| 531 | message ProcessStateChanged { |
| 532 | optional int32 uid = 1; |
| 533 | optional string process_name = 2; |
| 534 | optional string package_name = 3; |
| 535 | // TODO: remove this when validation is done |
| 536 | optional int64 version = 5; |
| 537 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 538 | optional android.app.ProcessStateEnum state = 4; |
| 539 | } |
| 540 | |
| 541 | /** |
| 542 | * Logs when ActivityManagerService sleep state is changed. |
| 543 | * |
| 544 | * Logged from: |
| 545 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 546 | */ |
| 547 | message ActivityManagerSleepStateChanged { |
| 548 | // TODO: import frameworks proto |
| 549 | enum State { |
| 550 | UNKNOWN = 0; |
| 551 | ASLEEP = 1; |
| 552 | AWAKE = 2; |
| 553 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 554 | optional State state = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 555 | } |
| 556 | |
| 557 | /** |
| 558 | * Logs when system memory state changes. |
| 559 | * |
| 560 | * Logged from: |
| 561 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 562 | */ |
| 563 | message MemoryFactorStateChanged { |
| 564 | // TODO: import frameworks proto |
| 565 | enum State { |
| 566 | MEMORY_UNKNOWN = 0; |
| 567 | NORMAL = 1; // normal. |
| 568 | MODERATE = 2; // moderate memory pressure. |
| 569 | LOW = 3; // low memory. |
| 570 | CRITICAL = 4; // critical memory. |
| 571 | |
| 572 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 573 | optional State factor = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 574 | } |
| 575 | |
| 576 | /** |
| 577 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 578 | * |
| 579 | * Logged from: |
| 580 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 581 | */ |
| 582 | message ExcessiveCpuUsageReported { |
| 583 | optional int32 uid = 1; |
| 584 | optional string process_name = 2; |
| 585 | optional string package_name = 3; |
| 586 | // package version. TODO: remove this when validation is done |
| 587 | optional int64 version = 4; |
| 588 | } |
| 589 | |
| 590 | /** |
| 591 | * Logs when a cached process is killed, along with its pss. |
| 592 | * |
| 593 | * Logged from: |
| 594 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 595 | */ |
| 596 | message CachedKillReported { |
| 597 | optional int32 uid = 1; |
| 598 | optional string process_name = 2; |
| 599 | optional string package_name = 3; |
| 600 | // TODO: remove this when validation is done |
| 601 | optional int64 version = 5; |
| 602 | optional int64 pss = 4; |
| 603 | } |
| 604 | |
| 605 | /** |
| 606 | * Logs when memory stats of a process is reported. |
| 607 | * |
| 608 | * Logged from: |
| 609 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 610 | */ |
| 611 | message ProcessMemoryStatReported { |
| 612 | optional int32 uid = 1; |
| 613 | optional string process_name = 2; |
| 614 | optional string package_name = 3; |
| 615 | //TODO: remove this when validation is done |
| 616 | optional int64 version = 9; |
| 617 | optional int64 pss = 4; |
| 618 | optional int64 uss = 5; |
| 619 | optional int64 rss = 6; |
| 620 | enum Type { |
| 621 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 622 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 623 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 624 | ADD_PSS_EXTERNAL = 3; |
| 625 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 626 | } |
| 627 | optional Type type = 7; |
Muhammad Qureshi | dda7320 | 2019-03-07 13:54:20 -0800 | [diff] [blame] | 628 | optional int64 duration_millis = 8; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 629 | } |
| 630 | |
| 631 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 632 | * Logs that a process started, finished, crashed, or ANRed. |
| 633 | * |
| 634 | * Logged from: |
| 635 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 636 | */ |
| 637 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 638 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 639 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 640 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 641 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 642 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 643 | // What lifecycle state the process changed to. |
| 644 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 645 | enum State { |
| 646 | FINISHED = 0; |
| 647 | STARTED = 1; |
| 648 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 649 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 650 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 651 | } |
| 652 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 653 | /** |
| 654 | * Logs when the ble scan state changes. |
| 655 | * |
| 656 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 657 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 658 | */ |
| 659 | message BleScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 660 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 661 | |
| 662 | enum State { |
| 663 | OFF = 0; |
| 664 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 665 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 666 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 667 | } |
| 668 | optional State state = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 669 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 670 | // Does the scan have a filter. |
| 671 | optional bool is_filtered = 3; |
| 672 | // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally. |
| 673 | optional bool is_first_match = 4; |
| 674 | // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC). |
| 675 | optional bool is_opportunistic = 5; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 676 | } |
| 677 | |
| 678 | /** |
| 679 | * Logs reporting of a ble scan finding results. |
| 680 | * |
| 681 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 682 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 683 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 684 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 685 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 686 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 687 | |
| 688 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 689 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 690 | } |
| 691 | |
| 692 | /** |
| 693 | * Logs when a sensor state changes. |
| 694 | * |
| 695 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 696 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 697 | */ |
| 698 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 699 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 700 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 701 | // The id (int) of the sensor. |
| 702 | optional int32 sensor_id = 2; |
| 703 | |
| 704 | enum State { |
| 705 | OFF = 0; |
| 706 | ON = 1; |
| 707 | } |
| 708 | optional State state = 3; |
| 709 | } |
| 710 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 711 | /** |
| 712 | * Logs when GPS state changes. |
| 713 | * |
| 714 | * Logged from: |
| 715 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 716 | */ |
| 717 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 718 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 719 | |
| 720 | enum State { |
| 721 | OFF = 0; |
| 722 | ON = 1; |
| 723 | } |
| 724 | optional State state = 2; |
| 725 | } |
| 726 | |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 727 | /** |
| 728 | * Logs when GPS signal quality. |
| 729 | * |
| 730 | * Logged from: |
| 731 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 732 | */ |
| 733 | message GpsSignalQualityChanged { |
| 734 | optional android.server.location.GpsSignalQualityEnum level = 1; |
| 735 | } |
| 736 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 737 | |
| 738 | /** |
| 739 | * Logs when a sync manager sync state changes. |
| 740 | * |
| 741 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 742 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 743 | */ |
| 744 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 745 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 746 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 747 | // 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] | 748 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 749 | |
| 750 | enum State { |
| 751 | OFF = 0; |
| 752 | ON = 1; |
| 753 | } |
| 754 | optional State state = 3; |
| 755 | } |
| 756 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 757 | /* |
| 758 | * Deferred job stats. |
| 759 | * |
| 760 | * Logged from: |
| 761 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 762 | */ |
| 763 | message DeferredJobStatsReported { |
| 764 | repeated AttributionNode attribution_node = 1; |
| 765 | |
| 766 | // Number of jobs deferred. |
| 767 | optional int32 num_jobs_deferred = 2; |
| 768 | |
| 769 | // Time since the last job runs. |
| 770 | optional int64 time_since_last_job_millis = 3; |
| 771 | } |
| 772 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 773 | /** |
| 774 | * Logs when a job scheduler job state changes. |
| 775 | * |
| 776 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 777 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 778 | */ |
| 779 | message ScheduledJobStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 780 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 781 | |
| 782 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 783 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 784 | |
| 785 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 786 | FINISHED = 0; |
| 787 | STARTED = 1; |
| 788 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 789 | } |
| 790 | optional State state = 3; |
| 791 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 792 | // The reason a job has stopped. |
| 793 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 794 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 795 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 796 | |
| 797 | // The standby bucket of the app that scheduled the job. These match the framework constants |
| 798 | // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is |
| 799 | // already assigned 0. |
| 800 | enum Bucket { |
| 801 | UNKNOWN = -1; |
| 802 | ACTIVE = 0; |
| 803 | WORKING_SET = 1; |
| 804 | FREQUENT = 2; |
| 805 | RARE = 3; |
| 806 | NEVER = 4; |
| 807 | } |
| 808 | optional Bucket standby_bucket = 5 [default = UNKNOWN]; |
| 809 | |
| 810 | // The job id (as assigned by the app). |
| 811 | optional int32 job_id = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 812 | } |
| 813 | |
| 814 | /** |
| 815 | * Logs when the audio state changes. |
| 816 | * |
| 817 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 818 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 819 | */ |
| 820 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 821 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 822 | |
| 823 | enum State { |
| 824 | OFF = 0; |
| 825 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 826 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 827 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 828 | } |
| 829 | optional State state = 2; |
| 830 | } |
| 831 | |
| 832 | /** |
| 833 | * Logs when the video codec state changes. |
| 834 | * |
| 835 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 836 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 837 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 838 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 839 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 840 | |
| 841 | enum State { |
| 842 | OFF = 0; |
| 843 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 844 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 845 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 846 | } |
| 847 | optional State state = 2; |
| 848 | } |
| 849 | |
| 850 | /** |
| 851 | * Logs when the flashlight state changes. |
| 852 | * |
| 853 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 854 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 855 | */ |
| 856 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 857 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 858 | |
| 859 | enum State { |
| 860 | OFF = 0; |
| 861 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 862 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 863 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 864 | } |
| 865 | optional State state = 2; |
| 866 | } |
| 867 | |
| 868 | /** |
| 869 | * Logs when the camera state changes. |
| 870 | * |
| 871 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 872 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 873 | */ |
| 874 | message CameraStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 875 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 876 | |
| 877 | enum State { |
| 878 | OFF = 0; |
| 879 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 880 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 881 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 882 | } |
| 883 | optional State state = 2; |
| 884 | } |
| 885 | |
| 886 | /** |
| 887 | * 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] | 888 | * |
| 889 | * Logged from: |
| 890 | * TODO |
| 891 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 892 | message WakelockStateChanged { |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 893 | repeated AttributionNode attribution_node = 1; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 894 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 895 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 896 | // From frameworks/base/core/proto/android/os/enums.proto. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 897 | optional android.os.WakeLockLevelEnum type = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 898 | |
| 899 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 900 | optional string tag = 3; |
| 901 | |
| 902 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 903 | RELEASE = 0; |
| 904 | ACQUIRE = 1; |
| 905 | CHANGE_RELEASE = 2; |
| 906 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 907 | } |
| 908 | optional State state = 4; |
| 909 | } |
| 910 | |
| 911 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 912 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 913 | * |
| 914 | * Logged from: |
| 915 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 916 | */ |
| 917 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 918 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 919 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 920 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 921 | optional string tag = 2; |
| 922 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 923 | // TODO: I have no idea what this is. |
| 924 | optional string history_tag = 3; |
| 925 | |
| 926 | enum State { |
| 927 | OFF = 0; |
| 928 | ON = 1; |
| 929 | } |
| 930 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 931 | } |
| 932 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 933 | /** |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 934 | * Logs when the device is interactive, according to the PowerManager Notifier. |
| 935 | * |
| 936 | * Logged from: |
| 937 | * frameworks/base/services/core/java/com/android/server/power/Notifier.java |
| 938 | */ |
| 939 | message InteractiveStateChanged { |
| 940 | enum State { |
| 941 | OFF = 0; |
| 942 | ON = 1; |
| 943 | } |
| 944 | optional State state = 1; |
| 945 | } |
| 946 | |
| 947 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 948 | * Logs Battery Saver state change. |
| 949 | * |
| 950 | * Logged from: |
| 951 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 952 | */ |
| 953 | message BatterySaverModeStateChanged { |
| 954 | enum State { |
| 955 | OFF = 0; |
| 956 | ON = 1; |
| 957 | } |
| 958 | optional State state = 1; |
| 959 | } |
| 960 | |
| 961 | /** |
| 962 | * Logs Doze mode state change. |
| 963 | * |
| 964 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 965 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 966 | */ |
| 967 | message DeviceIdleModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 968 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 969 | } |
| 970 | |
| 971 | |
| 972 | /** |
| 973 | * Logs state change of Doze mode including maintenance windows. |
| 974 | * |
| 975 | * Logged from: |
| 976 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 977 | */ |
| 978 | message DeviceIdlingModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 979 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 980 | } |
| 981 | |
| 982 | /** |
| 983 | * Logs screen brightness level. |
| 984 | * |
| 985 | * Logged from: |
| 986 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 987 | */ |
| 988 | message ScreenBrightnessChanged { |
| 989 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 990 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 991 | } |
| 992 | |
| 993 | /** |
| 994 | * Logs battery level (percent full, from 0 to 100). |
| 995 | * |
| 996 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 997 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 998 | */ |
| 999 | message BatteryLevelChanged { |
| 1000 | // Battery level. Should be in [0, 100]. |
| 1001 | optional int32 battery_level = 1; |
| 1002 | } |
| 1003 | |
| 1004 | /** |
| 1005 | * Logs change in charging status of the device. |
| 1006 | * |
| 1007 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1008 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1009 | */ |
| 1010 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1011 | // State of the battery, from frameworks/base/core/proto/android/os/enums.proto. |
| 1012 | optional android.os.BatteryStatusEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1013 | } |
| 1014 | |
| 1015 | /** |
| 1016 | * Logs whether the device is plugged in, and what power source it is using. |
| 1017 | * |
| 1018 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1019 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1020 | */ |
| 1021 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1022 | // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto. |
| 1023 | optional android.os.BatteryPluggedStateEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1024 | } |
| 1025 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1026 | /** |
| 1027 | * Logs when an app's wakeup alarm fires. |
| 1028 | * |
| 1029 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1030 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1031 | */ |
| 1032 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1033 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1034 | |
| 1035 | // Name of the wakeup alarm. |
| 1036 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame] | 1037 | |
| 1038 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 1039 | optional string package_name = 3; |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1040 | |
| 1041 | // These enum values match the STANDBY_BUCKET_XXX constants defined in UsageStatsManager.java. |
| 1042 | enum Bucket { |
| 1043 | UNKNOWN = 0; |
| 1044 | EXEMPTED = 5; |
| 1045 | ACTIVE = 10; |
| 1046 | WORKING_SET = 20; |
| 1047 | FREQUENT = 30; |
| 1048 | RARE = 40; |
| 1049 | NEVER = 50; |
| 1050 | } |
| 1051 | // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired. |
| 1052 | optional Bucket app_standby_bucket = 4; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1053 | } |
| 1054 | |
| 1055 | /** |
| 1056 | * Logs when an an app causes the mobile radio to change state. |
| 1057 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 1058 | * |
| 1059 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1060 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1061 | */ |
| 1062 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1063 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1064 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1065 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1066 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1067 | } |
| 1068 | |
| 1069 | /** |
| 1070 | * Logs when an an app causes the wifi radio to change state. |
| 1071 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 1072 | * |
| 1073 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1074 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1075 | */ |
| 1076 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1077 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1078 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1079 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1080 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1081 | } |
| 1082 | |
| 1083 | /** |
| 1084 | * Logs kernel wakeup reasons and aborts. |
| 1085 | * |
| 1086 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 1087 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1088 | */ |
| 1089 | message KernelWakeupReported { |
| 1090 | // Name of the kernel wakeup reason (or abort). |
| 1091 | optional string wakeup_reason_name = 1; |
| 1092 | |
| 1093 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1094 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1095 | } |
| 1096 | |
| 1097 | /** |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1098 | * Logs when Wifi is toggled on/off. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1099 | * 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] | 1100 | * |
| 1101 | * Logged from: |
| 1102 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1103 | */ |
| 1104 | message WifiEnabledStateChanged { |
| 1105 | enum State { |
| 1106 | OFF = 0; |
| 1107 | ON = 1; |
| 1108 | } |
| 1109 | optional State state = 1; |
| 1110 | } |
| 1111 | |
| 1112 | /** |
| 1113 | * 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] | 1114 | * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'. |
| 1115 | * Note that Wifi Scanning is monitored separately in WifiScanStateChanged. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1116 | * |
| 1117 | * Logged from: |
| 1118 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1119 | */ |
| 1120 | message WifiRunningStateChanged { |
| 1121 | repeated AttributionNode attribution_node = 1; |
| 1122 | |
| 1123 | enum State { |
| 1124 | OFF = 0; |
| 1125 | ON = 1; |
| 1126 | } |
| 1127 | optional State state = 2; |
| 1128 | } |
| 1129 | |
| 1130 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1131 | * Logs wifi locks held by an app. |
| 1132 | * |
| 1133 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1134 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1135 | */ |
| 1136 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1137 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1138 | |
| 1139 | enum State { |
| 1140 | OFF = 0; |
| 1141 | ON = 1; |
| 1142 | } |
| 1143 | optional State state = 2; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 1144 | |
| 1145 | // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto. |
| 1146 | optional android.net.wifi.WifiModeEnum mode = 3; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1147 | } |
| 1148 | |
| 1149 | /** |
| 1150 | * Logs wifi signal strength changes. |
| 1151 | * |
| 1152 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1153 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1154 | */ |
| 1155 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1156 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1157 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1158 | } |
| 1159 | |
| 1160 | /** |
| 1161 | * Logs wifi scans performed by an app. |
| 1162 | * |
| 1163 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1164 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1165 | */ |
| 1166 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1167 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1168 | |
| 1169 | enum State { |
| 1170 | OFF = 0; |
| 1171 | ON = 1; |
| 1172 | } |
| 1173 | optional State state = 2; |
| 1174 | } |
| 1175 | |
| 1176 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1177 | * Logs wifi multicast locks held by an app |
| 1178 | * |
| 1179 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1180 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1181 | */ |
| 1182 | message WifiMulticastLockStateChanged { |
| 1183 | repeated AttributionNode attribution_node = 1; |
| 1184 | |
| 1185 | enum State { |
| 1186 | OFF = 0; |
| 1187 | ON = 1; |
| 1188 | } |
| 1189 | optional State state = 2; |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1190 | |
| 1191 | optional string tag = 3; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1192 | } |
| 1193 | |
| 1194 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1195 | * Logs shutdown reason and duration on next boot. |
| 1196 | * |
| 1197 | * Logged from: |
| 1198 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 1199 | */ |
| 1200 | message ShutdownSequenceReported { |
| 1201 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 1202 | optional bool reboot = 1; |
| 1203 | |
| 1204 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 1205 | optional string reason = 2; |
| 1206 | |
| 1207 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 1208 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1209 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1210 | |
| 1211 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1212 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1213 | } |
| 1214 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1215 | |
| 1216 | /** |
| 1217 | * Logs boot reason and duration. |
| 1218 | * |
| 1219 | * Logged from: |
| 1220 | * system/core/bootstat/bootstat.cpp |
| 1221 | */ |
| 1222 | message BootSequenceReported { |
| 1223 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 1224 | // Default: "<EMPTY>" if not available. |
| 1225 | optional string bootloader_reason = 1; |
| 1226 | |
| 1227 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 1228 | // Default: "<EMPTY>" if not available. |
| 1229 | optional string system_reason = 2; |
| 1230 | |
| 1231 | // 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] | 1232 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1233 | |
| 1234 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1235 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1236 | |
| 1237 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1238 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1239 | |
| 1240 | // Time since last boot in ms. Default: 0 if not available. |
| 1241 | optional int64 time_since_last_boot = 6; |
| 1242 | } |
| 1243 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 1244 | |
| 1245 | /** |
| 1246 | * Logs call state and disconnect cause (if applicable). |
| 1247 | * |
| 1248 | * Logged from: |
| 1249 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 1250 | */ |
| 1251 | message CallStateChanged { |
| 1252 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 1253 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1254 | optional android.telecom.CallStateEnum call_state = 1; |
| 1255 | |
| 1256 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 1257 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 1258 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 1259 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1260 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 1261 | |
| 1262 | // True if the call is self-managed, which are apps that use the |
| 1263 | // telecom infrastructure to make their own calls. |
| 1264 | optional bool self_managed = 3; |
| 1265 | |
| 1266 | // True if call is external. External calls are calls on connected Wear |
| 1267 | // devices but show up in Telecom so the user can pull them onto the device. |
| 1268 | optional bool external_call = 4; |
| 1269 | } |
| 1270 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1271 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1272 | * Logs keyguard state. The keyguard is the lock screen. |
| 1273 | * |
| 1274 | * Logged from: |
| 1275 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 1276 | */ |
| 1277 | message KeyguardStateChanged { |
| 1278 | enum State { |
| 1279 | UNKNOWN = 0; |
| 1280 | // The keyguard is hidden when the phone is unlocked. |
| 1281 | HIDDEN = 1; |
| 1282 | // The keyguard is shown when the phone is locked (screen turns off). |
| 1283 | SHOWN= 2; |
| 1284 | // The keyguard is occluded when something is overlaying the keyguard. |
| 1285 | // Eg. Opening the camera while on the lock screen. |
| 1286 | OCCLUDED = 3; |
| 1287 | } |
| 1288 | optional State state = 1; |
| 1289 | } |
| 1290 | |
| 1291 | /** |
| 1292 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 1293 | * prompts the user to enter a password (pattern, pin, etc). |
| 1294 | * |
| 1295 | * Logged from: |
| 1296 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 1297 | */ |
| 1298 | |
| 1299 | message KeyguardBouncerStateChanged { |
| 1300 | enum State { |
| 1301 | UNKNOWN = 0; |
| 1302 | // Bouncer is hidden, either as a result of successfully entering the |
| 1303 | // password, screen timing out, or user going back to lock screen. |
| 1304 | HIDDEN = 1; |
| 1305 | // This is when the user is being prompted to enter the password. |
| 1306 | SHOWN = 2; |
| 1307 | } |
| 1308 | optional State state = 1; |
| 1309 | } |
| 1310 | |
| 1311 | /** |
| 1312 | * Logs the result of entering a password into the keyguard bouncer. |
| 1313 | * |
| 1314 | * Logged from: |
| 1315 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 1316 | */ |
| 1317 | message KeyguardBouncerPasswordEntered { |
| 1318 | enum BouncerResult { |
| 1319 | UNKNOWN = 0; |
| 1320 | // The password entered was incorrect. |
| 1321 | FAILURE = 1; |
| 1322 | // The password entered was correct. |
| 1323 | SUCCESS = 2; |
| 1324 | } |
| 1325 | optional BouncerResult result = 1; |
| 1326 | } |
| 1327 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1328 | /* |
| 1329 | * Logs changes to the configuration of the device. The configuration is defined |
| 1330 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 1331 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1332 | * Please go there to interpret the possible values each field can be. |
| 1333 | * |
| 1334 | * Logged from: |
| 1335 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1336 | */ |
| 1337 | message ResourceConfigurationChanged { |
| 1338 | // Bit mask of color capabilities of the screen. |
| 1339 | // Contains information about the color gamut and hdr mode of the screen. |
| 1340 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1341 | optional int32 color_mode = 1; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1342 | |
| 1343 | // The target screen density being rendered to. |
| 1344 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1345 | optional int32 density_dpi = 2; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1346 | |
| 1347 | // Current user preference for the scaling factor for fonts, |
| 1348 | // relative to the base density scaling. |
| 1349 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1350 | optional float font_scale = 3; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1351 | |
| 1352 | // Flag indicating whether the hard keyboard is hidden. |
| 1353 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1354 | optional int32 hard_keyboard_hidden = 4; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1355 | |
| 1356 | // The type of keyboard attached to the device. |
| 1357 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1358 | optional int32 keyboard = 5; |
| 1359 | |
| 1360 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1361 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1362 | optional int32 keyboard_hidden = 6; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1363 | |
| 1364 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1365 | // 0 if undefined. |
| 1366 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1367 | optional int32 mcc = 7; |
| 1368 | |
| 1369 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1370 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1371 | // MNC_ZERO symbol defined in Configuration.java. |
| 1372 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1373 | optional int32 mnc = 8; |
| 1374 | |
| 1375 | // The kind of navigation available on the device. |
| 1376 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1377 | optional int32 navigation = 9; |
| 1378 | |
| 1379 | // Flag indicating whether the navigation is available. |
| 1380 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1381 | optional int32 navigation_hidden = 10; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1382 | |
| 1383 | // Overall orientation of the screen. |
| 1384 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1385 | optional int32 orientation = 11; |
| 1386 | |
| 1387 | // The current height of the available screen space, in dp units. |
| 1388 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1389 | optional int32 screen_height_dp = 12; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1390 | |
| 1391 | // Bit mask of overall layout of the screen. |
| 1392 | // Contains information about screen size, whether the screen is wider/taller |
| 1393 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1394 | // and whether the screen has a rounded shape. |
| 1395 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1396 | optional int32 screen_layout = 13; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1397 | |
| 1398 | // Current width of the available screen space, in dp units. |
| 1399 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1400 | optional int32 screen_width_dp = 14; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1401 | |
| 1402 | // The smallest screen size an application will see in normal operation. |
| 1403 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1404 | // in portrait and landscape. |
| 1405 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1406 | optional int32 smallest_screen_width_dp = 15; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1407 | |
| 1408 | // The type of touch screen attached to the device. |
| 1409 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1410 | optional int32 touchscreen = 16; |
| 1411 | |
| 1412 | // Bit mask of the ui mode. |
| 1413 | // Contains information about the overall ui mode of the device. |
| 1414 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1415 | // Also contains information about whether the device is in night mode. |
| 1416 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1417 | optional int32 ui_mode = 17; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1418 | } |
| 1419 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1420 | |
| 1421 | /** |
| 1422 | * Logs changes in the connection state of the mobile radio. |
| 1423 | * |
| 1424 | * Logged from: |
| 1425 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1426 | */ |
| 1427 | message MobileConnectionStateChanged { |
| 1428 | // States are from the state machine DataConnection.java. |
| 1429 | enum State { |
| 1430 | UNKNOWN = 0; |
| 1431 | // The connection is inactive, or disconnected. |
| 1432 | INACTIVE = 1; |
| 1433 | // The connection is being activated, or connecting. |
| 1434 | ACTIVATING = 2; |
| 1435 | // The connection is active, or connected. |
| 1436 | ACTIVE = 3; |
| 1437 | // The connection is disconnecting. |
| 1438 | DISCONNECTING = 4; |
| 1439 | // The connection is disconnecting after creating a connection. |
| 1440 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1441 | } |
| 1442 | optional State state = 1; |
| 1443 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1444 | optional int32 sim_slot_index = 2; |
| 1445 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1446 | // every new network created. Resets whenever the device reboots. |
| 1447 | optional int32 data_connection_id = 3; |
| 1448 | // A bitmask for the capabilities of this connection. |
| 1449 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1450 | // Default value (if we have no information): 0 |
| 1451 | optional int64 capabilities = 4; |
| 1452 | // If this connection has internet. |
| 1453 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1454 | optional bool has_internet = 5; |
| 1455 | } |
| 1456 | |
| 1457 | /** |
| 1458 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1459 | * |
| 1460 | * Logged from: |
| 1461 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1462 | */ |
| 1463 | message MobileRadioTechnologyChanged { |
| 1464 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1465 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1466 | optional int32 sim_slot_index = 2; |
| 1467 | } |
| 1468 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1469 | /** |
| 1470 | * Logs the VID and PID of any connected USB devices. |
| 1471 | * |
| 1472 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1473 | * |
| 1474 | * Logged by Vendor. |
| 1475 | */ |
| 1476 | message UsbDeviceAttached { |
| 1477 | optional int32 vid = 1; |
| 1478 | optional int32 pid = 2; |
| 1479 | optional bool has_audio = 3; |
| 1480 | optional bool has_hid = 4; |
| 1481 | optional bool has_storage = 5; |
Badhri Jagan Sridharan | 5ec629f | 2018-11-16 15:39:22 -0800 | [diff] [blame] | 1482 | enum State { |
| 1483 | STATE_DISCONNECTED = 0; |
| 1484 | STATE_CONNECTED = 1; |
| 1485 | } |
| 1486 | optional State state = 6; |
Badhri Jagan Sridharan | c2c54a2 | 2018-12-14 14:41:26 -0800 | [diff] [blame] | 1487 | optional int64 last_connect_duration_millis = 7; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1488 | } |
| 1489 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1490 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1491 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1492 | * Logs when Bluetooth is enabled and disabled. |
| 1493 | * |
| 1494 | * Logged from: |
| 1495 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1496 | */ |
| 1497 | message BluetoothEnabledStateChanged { |
| 1498 | repeated AttributionNode attribution_node = 1; |
| 1499 | // Whether or not bluetooth is enabled on the device. |
| 1500 | enum State { |
| 1501 | UNKNOWN = 0; |
| 1502 | ENABLED = 1; |
| 1503 | DISABLED = 2; |
| 1504 | } |
| 1505 | optional State state = 2; |
| 1506 | // The reason for being enabled/disabled. |
| 1507 | // Eg. Airplane mode, crash, application request. |
| 1508 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1509 | // 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] | 1510 | optional string pkg_name = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1511 | } |
| 1512 | |
| 1513 | /** |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1514 | * Logs when profiles on a Bluetooth device connects and disconnects. |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1515 | * |
| 1516 | * Logged from: |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1517 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 1518 | * |
| 1519 | * Next Tag: 5 |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1520 | */ |
| 1521 | message BluetoothConnectionStateChanged { |
| 1522 | // The state of the connection. |
| 1523 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1524 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1525 | // An identifier that can be used to match connect and disconnect events. |
| 1526 | // Currently is last two bytes of a hash of a device level ID and |
| 1527 | // the mac address of the bluetooth device that is connected. |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1528 | // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1529 | optional int32 obfuscated_id = 2 [deprecated = true]; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1530 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1531 | // From android.bluetooth.BluetoothAdapter.java |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1532 | // Default: 0 when not used |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1533 | optional int32 bt_profile = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1534 | // An identifier that can be used to match events for this device. |
| 1535 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1536 | // Salt: Randomly generated 256 bit value |
| 1537 | // Hash algorithm: HMAC-SHA256 |
| 1538 | // Size: 32 byte |
| 1539 | // Default: null or empty if the device identifier is not known |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1540 | optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1541 | } |
| 1542 | |
| 1543 | /** |
| 1544 | * Logs when a Bluetooth device connects and disconnects over ACL |
| 1545 | * |
| 1546 | * Logged from: |
| 1547 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1548 | * |
| 1549 | * Next Tag: 3 |
| 1550 | */ |
| 1551 | message BluetoothAclConnectionStateChanged { |
| 1552 | // An identifier that can be used to match events for this device. |
| 1553 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1554 | // Salt: Randomly generated 256 bit value |
| 1555 | // Hash algorithm: HMAC-SHA256 |
| 1556 | // Size: 32 byte |
| 1557 | // Default: null or empty if the device identifier is not known |
| 1558 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1559 | // The state of the connection. |
| 1560 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1561 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1562 | } |
| 1563 | |
| 1564 | /** |
| 1565 | * Logs when a Bluetooth device connects and disconnects over SCO |
| 1566 | * |
| 1567 | * Logged from: |
| 1568 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java |
| 1569 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java |
| 1570 | * |
| 1571 | * Next Tag: 4 |
| 1572 | */ |
| 1573 | message BluetoothScoConnectionStateChanged { |
| 1574 | // An identifier that can be used to match events for this device. |
| 1575 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1576 | // Salt: Randomly generated 256 bit value |
| 1577 | // Hash algorithm: HMAC-SHA256 |
| 1578 | // Size: 32 byte |
| 1579 | // Default: null or empty if the device identifier is not known |
| 1580 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1581 | // The state of the connection. |
| 1582 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1583 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1584 | // Codec used for this SCO connection |
| 1585 | // Default: UNKNOWN |
| 1586 | optional android.bluetooth.hfp.ScoCodec codec = 3; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1587 | } |
| 1588 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1589 | /** |
| 1590 | * Logged when active device of a profile changes |
| 1591 | * |
| 1592 | * Logged from: |
| 1593 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1594 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java |
| 1595 | * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java |
| 1596 | */ |
| 1597 | message BluetoothActiveDeviceChanged { |
| 1598 | // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID |
| 1599 | // From android.bluetooth.BluetoothProfile |
| 1600 | optional int32 bt_profile = 1; |
| 1601 | // An identifier that can be used to match events for this new active device. |
| 1602 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1603 | // Salt: Randomly generated 256 bit value |
| 1604 | // Hash algorithm: HMAC-SHA256 |
| 1605 | // Size: 32 byte |
| 1606 | // Default: null or empty if there is no active device for this profile |
| 1607 | optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1608 | } |
| 1609 | |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1610 | // Logs when there is an event affecting Bluetooth device's link layer connection. |
| 1611 | // - This event is triggered when there is a related HCI command or event |
| 1612 | // - Users of this metrics can deduce Bluetooth device's connection state from these events |
| 1613 | // - HCI commands are logged before the command is sent, after receiving command status, and after |
| 1614 | // receiving command complete |
| 1615 | // - HCI events are logged when they arrive |
| 1616 | // |
| 1617 | // Low level log from system/bt |
| 1618 | // |
| 1619 | // Bluetooth classic commands: |
| 1620 | // - CMD_CREATE_CONNECTION |
| 1621 | // - CMD_DISCONNECT |
| 1622 | // - CMD_CREATE_CONNECTION_CANCEL |
| 1623 | // - CMD_ACCEPT_CONNECTION_REQUEST |
| 1624 | // - CMD_REJECT_CONNECTION_REQUEST |
| 1625 | // - CMD_SETUP_ESCO_CONNECTION |
| 1626 | // - CMD_ACCEPT_ESCO_CONNECTION |
| 1627 | // - CMD_REJECT_ESCO_CONNECTION |
| 1628 | // - CMD_ENH_SETUP_ESCO_CONNECTION |
| 1629 | // - CMD_ENH_ACCEPT_ESCO_CONNECTION |
| 1630 | // |
| 1631 | // Bluetooth low energy commands: |
| 1632 | // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] |
| 1633 | // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] |
| 1634 | // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] |
| 1635 | // - CMD_BLE_CLEAR_WHITE_LIST |
| 1636 | // - CMD_BLE_ADD_WHITE_LIST |
| 1637 | // - CMD_BLE_REMOVE_WHITE_LIST |
| 1638 | // |
| 1639 | // Bluetooth classic events: |
| 1640 | // - EVT_CONNECTION_COMP |
| 1641 | // - EVT_CONNECTION_REQUEST |
| 1642 | // - EVT_DISCONNECTION_COMP |
| 1643 | // - EVT_ESCO_CONNECTION_COMP |
| 1644 | // - EVT_ESCO_CONNECTION_CHANGED |
| 1645 | // |
| 1646 | // Bluetooth low energy meta events: |
| 1647 | // - BLE_EVT_CONN_COMPLETE_EVT |
| 1648 | // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT |
| 1649 | // |
| 1650 | // Next tag: 10 |
| 1651 | message BluetoothLinkLayerConnectionEvent { |
| 1652 | // An identifier that can be used to match events for this device. |
| 1653 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1654 | // Salt: Randomly generated 256 bit value |
| 1655 | // Hash algorithm: HMAC-SHA256 |
| 1656 | // Size: 32 byte |
| 1657 | // Default: null or empty if the device identifier is not known |
| 1658 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1659 | // Connection handle of this connection if available |
| 1660 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1661 | // Default: 0xFFFF if the handle is unknown |
| 1662 | optional int32 connection_handle = 2; |
| 1663 | // Direction of the link |
| 1664 | // Default: DIRECTION_UNKNOWN |
| 1665 | optional android.bluetooth.DirectionEnum direction = 3; |
| 1666 | // Type of this link |
| 1667 | // Default: LINK_TYPE_UNKNOWN |
| 1668 | optional android.bluetooth.LinkTypeEnum type = 4; |
| 1669 | |
| 1670 | // Reason metadata for this link layer connection event, rules for interpretation: |
| 1671 | // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or |
| 1672 | // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case |
| 1673 | // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is |
| 1674 | // set and valid, ignore hci_ble_event |
| 1675 | |
| 1676 | // HCI command associated with this event |
| 1677 | // Default: CMD_UNKNOWN |
| 1678 | optional android.bluetooth.hci.CommandEnum hci_cmd = 5; |
| 1679 | // HCI event associated with this event |
| 1680 | // Default: EVT_UNKNOWN |
| 1681 | optional android.bluetooth.hci.EventEnum hci_event = 6; |
| 1682 | // HCI BLE meta event associated with this event |
| 1683 | // Default: BLE_EVT_UNKNOWN |
| 1684 | optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; |
| 1685 | // HCI command status code if this is triggerred by hci_cmd |
| 1686 | // Default: STATUS_UNKNOWN |
| 1687 | optional android.bluetooth.hci.StatusEnum cmd_status = 8; |
| 1688 | // HCI reason code associated with this event |
| 1689 | // Default: STATUS_UNKNOWN |
| 1690 | optional android.bluetooth.hci.StatusEnum reason_code = 9; |
| 1691 | } |
| 1692 | |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1693 | /** |
| 1694 | * Logs when a module is rolled back by Watchdog. |
| 1695 | * |
| 1696 | * Logged from: Rollback Manager |
| 1697 | */ |
| 1698 | message WatchdogRollbackOccurred { |
| 1699 | enum RollbackType { |
| 1700 | UNKNOWN = 0; |
| 1701 | ROLLBACK_INITIATE = 1; |
| 1702 | ROLLBACK_SUCCESS = 2; |
| 1703 | ROLLBACK_FAILURE = 3; |
Howard Ro | e4d6fed | 2019-03-04 16:54:19 -0800 | [diff] [blame] | 1704 | ROLLBACK_BOOT_TRIGGERED = 4; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1705 | } |
| 1706 | optional RollbackType rollback_type = 1; |
| 1707 | |
| 1708 | optional string package_name = 2; |
| 1709 | |
| 1710 | optional int32 package_version_code = 3; |
| 1711 | } |
| 1712 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1713 | /** |
| 1714 | * Logs when there is a change in Bluetooth A2DP playback state |
| 1715 | * |
| 1716 | * Logged from: |
| 1717 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1718 | */ |
| 1719 | message BluetoothA2dpPlaybackStateChanged { |
| 1720 | // An identifier that can be used to match events for this device. |
| 1721 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1722 | // Salt: Randomly generated 256 bit value |
| 1723 | // Hash algorithm: HMAC-SHA256 |
| 1724 | // Size: 32 byte |
| 1725 | // Default: null or empty if the device identifier is not known |
| 1726 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1727 | // Current playback state |
| 1728 | // Default: PLAYBACK_STATE_UNKNOWN |
| 1729 | optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; |
| 1730 | // Current audio coding mode |
| 1731 | // Default: AUDIO_CODING_MODE_UNKNOWN |
| 1732 | optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; |
| 1733 | } |
| 1734 | |
| 1735 | /** |
| 1736 | * Logs when there is a change in A2DP codec config for a particular remote device |
| 1737 | * |
| 1738 | * Logged from: |
| 1739 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1740 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1741 | */ |
| 1742 | message BluetoothA2dpCodecConfigChanged { |
| 1743 | // An identifier that can be used to match events for this device. |
| 1744 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1745 | // Salt: Randomly generated 256 bit value |
| 1746 | // Hash algorithm: HMAC-SHA256 |
| 1747 | // Size: 32 byte |
| 1748 | // Default: null or empty if the device identifier is not known |
| 1749 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1750 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1751 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1752 | optional int32 codec_type = 2; |
| 1753 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1754 | // Default: CODEC_PRIORITY_DEFAULT |
| 1755 | optional int32 codec_priority = 3; |
| 1756 | // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig |
| 1757 | // Default: SAMPLE_RATE_NONE |
| 1758 | optional int32 sample_rate = 4; |
| 1759 | // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig |
| 1760 | // Default: BITS_PER_SAMPLE_NONE |
| 1761 | optional int32 bits_per_sample = 5; |
| 1762 | // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig |
| 1763 | // Default: CHANNEL_MODE_NONE |
| 1764 | optional int32 channel_mode = 6; |
| 1765 | // Codec specific values |
| 1766 | // Default 0 |
| 1767 | optional int64 codec_specific_1 = 7; |
| 1768 | optional int64 codec_specific_2 = 8; |
| 1769 | optional int64 codec_specific_3 = 9; |
| 1770 | optional int64 codec_specific_4 = 10; |
| 1771 | } |
| 1772 | |
| 1773 | /** |
| 1774 | * Logs when there is a change in selectable A2DP codec capability for a paricular remote device |
| 1775 | * Each codec's capability is logged separately due to statsd restriction |
| 1776 | * |
| 1777 | * Logged from: |
| 1778 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1779 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1780 | */ |
| 1781 | message BluetoothA2dpCodecCapabilityChanged { |
| 1782 | // An identifier that can be used to match events for this device. |
| 1783 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1784 | // Salt: Randomly generated 256 bit value |
| 1785 | // Hash algorithm: HMAC-SHA256 |
| 1786 | // Size: 32 byte |
| 1787 | // Default: null or empty if the device identifier is not known |
| 1788 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1789 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1790 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1791 | optional int32 codec_type = 2; |
| 1792 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1793 | // Default: CODEC_PRIORITY_DEFAULT |
| 1794 | optional int32 codec_priority = 3; |
| 1795 | // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants |
| 1796 | // in BluetoothCodecConfig |
| 1797 | // Default: empty and SAMPLE_RATE_NONE for individual item |
| 1798 | optional int32 sample_rate = 4; |
| 1799 | // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants |
| 1800 | // in BluetoothCodecConfig |
| 1801 | // Default: empty and BITS_PER_SAMPLE_NONE for individual item |
| 1802 | optional int32 bits_per_sample = 5; |
| 1803 | // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in |
| 1804 | // BluetoothCodecConfig |
| 1805 | // Default: empty and CHANNEL_MODE_NONE for individual item |
| 1806 | optional int32 channel_mode = 6; |
| 1807 | // Codec specific values |
| 1808 | // Default 0 |
| 1809 | optional int64 codec_specific_1 = 7; |
| 1810 | optional int64 codec_specific_2 = 8; |
| 1811 | optional int64 codec_specific_3 = 9; |
| 1812 | optional int64 codec_specific_4 = 10; |
| 1813 | } |
| 1814 | |
| 1815 | /** |
| 1816 | * Logs when A2DP failed to read from PCM source. |
| 1817 | * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. |
| 1818 | * |
| 1819 | * Logged from: |
| 1820 | * system/bt |
| 1821 | */ |
| 1822 | message BluetoothA2dpAudioUnderrunReported { |
| 1823 | // An identifier that can be used to match events for this device. |
| 1824 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1825 | // Salt: Randomly generated 256 bit value |
| 1826 | // Hash algorithm: HMAC-SHA256 |
| 1827 | // Size: 32 byte |
| 1828 | // Default: null or empty if the device identifier is not known |
| 1829 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1830 | // Encoding interval in nanoseconds |
| 1831 | // Default: 0 |
| 1832 | optional int64 encoding_interval_nanos = 2; |
| 1833 | // Number of bytes of PCM data that could not be read from the source |
| 1834 | // Default: 0 |
| 1835 | optional int32 num_missing_pcm_bytes = 3; |
| 1836 | } |
| 1837 | |
| 1838 | /** |
| 1839 | * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit |
| 1840 | * buffer queue is full and we have to drop data |
| 1841 | * |
| 1842 | * Logged from: |
| 1843 | * system/bt |
| 1844 | */ |
| 1845 | message BluetoothA2dpAudioOverrunReported { |
| 1846 | // An identifier that can be used to match events for this device. |
| 1847 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1848 | // Salt: Randomly generated 256 bit value |
| 1849 | // Hash algorithm: HMAC-SHA256 |
| 1850 | // Size: 32 byte |
| 1851 | // Default: null or empty if the device identifier is not known |
| 1852 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1853 | // Encoding interval in nanoseconds |
| 1854 | // Default: 0 |
| 1855 | optional int64 encoding_interval_nanos = 2; |
| 1856 | // Number of buffers dropped in this event |
| 1857 | // Each buffer is encoded in one encoding interval and consists of multiple encoded frames |
| 1858 | // Default: 0 |
| 1859 | optional int32 num_dropped_buffers = 3; |
| 1860 | // Number of encoded buffers dropped in this event |
| 1861 | // Default 0 |
| 1862 | optional int32 num_dropped_encoded_frames = 4; |
| 1863 | // Number of encoded bytes dropped in this event |
| 1864 | // Default: 0 |
| 1865 | optional int32 num_dropped_encoded_bytes = 5; |
| 1866 | } |
| 1867 | |
| 1868 | /** |
| 1869 | * Logs when we receive reports regarding a device's RSSI value |
| 1870 | * |
| 1871 | * Logged from: |
| 1872 | * system/bt |
| 1873 | */ |
| 1874 | message BluetoothDeviceRssiReported { |
| 1875 | // An identifier that can be used to match events for this device. |
| 1876 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1877 | // Salt: Randomly generated 256 bit value |
| 1878 | // Hash algorithm: HMAC-SHA256 |
| 1879 | // Size: 32 byte |
| 1880 | // Default: null or empty if the device identifier is not known |
| 1881 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1882 | // Connection handle of this connection if available |
| 1883 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1884 | // Default: 0xFFFF if the handle is unknown |
| 1885 | optional int32 connection_handle = 2; |
| 1886 | // HCI command status code if this is triggerred by hci_cmd |
| 1887 | // Default: STATUS_UNKNOWN |
| 1888 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1889 | // BR/EDR |
| 1890 | // Range: -128 ≤ N ≤ 127 (signed integer) |
| 1891 | // Units: dB |
| 1892 | // LE: |
| 1893 | // Range: -127 to 20, 127 (signed integer) |
| 1894 | // Units: dBm |
| 1895 | // Invalid when an out of range value is reported |
| 1896 | optional int32 rssi = 4; |
| 1897 | } |
| 1898 | |
| 1899 | /** |
| 1900 | * Logs when we receive reports regarding how many consecutive failed contacts for a connection |
| 1901 | * |
| 1902 | * Logged from: |
| 1903 | * system/bt |
| 1904 | */ |
| 1905 | message BluetoothDeviceFailedContactCounterReported { |
| 1906 | // An identifier that can be used to match events for this device. |
| 1907 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1908 | // Salt: Randomly generated 256 bit value |
| 1909 | // Hash algorithm: HMAC-SHA256 |
| 1910 | // Size: 32 byte |
| 1911 | // Default: null or empty if the device identifier is not known |
| 1912 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1913 | // Connection handle of this connection if available |
| 1914 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1915 | // Default: 0xFFFF if the handle is unknown |
| 1916 | optional int32 connection_handle = 2; |
| 1917 | // HCI command status code if this is triggerred by hci_cmd |
| 1918 | // Default: STATUS_UNKNOWN |
| 1919 | optional android.bluetooth.hci.StatusEnum cmd_status = 3; |
| 1920 | // Number of consecutive failed contacts for a connection corresponding to the Handle |
| 1921 | // Range: uint16_t, 0-0xFFFF |
| 1922 | // Default: 0xFFFFF |
| 1923 | optional int32 failed_contact_counter = 4; |
| 1924 | } |
| 1925 | |
| 1926 | /** |
| 1927 | * Logs when we receive reports regarding the tranmit power level used for a specific connection |
| 1928 | * |
| 1929 | * Logged from: |
| 1930 | * system/bt |
| 1931 | */ |
| 1932 | message BluetoothDeviceTxPowerLevelReported { |
| 1933 | // An identifier that can be used to match events for this device. |
| 1934 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1935 | // Salt: Randomly generated 256 bit value |
| 1936 | // Hash algorithm: HMAC-SHA256 |
| 1937 | // Size: 32 byte |
| 1938 | // Default: null or empty if the device identifier is not known |
| 1939 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1940 | // Connection handle of this connection if available |
| 1941 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1942 | // Default: 0xFFFF if the handle is unknown |
| 1943 | optional int32 connection_handle = 2; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1944 | // HCI command status code if this is triggered by hci_cmd |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1945 | // Default: STATUS_UNKNOWN |
| 1946 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1947 | // Range: -30 ≤ N ≤ 20 |
| 1948 | // Units: dBm |
| 1949 | // Invalid when an out of range value is reported |
| 1950 | optional int32 transmit_power_level = 4; |
| 1951 | } |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1952 | |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1953 | /** |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1954 | * Logs when Bluetooth controller failed to reply with command status within a timeout period after |
| 1955 | * receiving an HCI command from the host |
| 1956 | * |
| 1957 | * Logged from: system/bt |
| 1958 | */ |
| 1959 | message BluetoothHciTimeoutReported { |
| 1960 | // HCI command associated with this event |
| 1961 | // Default: CMD_UNKNOWN |
| 1962 | optional android.bluetooth.hci.CommandEnum hci_command = 1; |
| 1963 | } |
| 1964 | |
| 1965 | /** |
| 1966 | * Logs when we receive Bluetooth Link Quality Report event from the controller |
| 1967 | * See Android Bluetooth HCI specification for more details |
| 1968 | * |
| 1969 | * Note: all count and bytes field are counted since last event |
| 1970 | * |
| 1971 | * Logged from: system/bt |
| 1972 | */ |
| 1973 | message BluetoothQualityReportReported { |
| 1974 | // Quality report ID |
| 1975 | // Original type: uint8_t |
| 1976 | // Default: BQR_ID_UNKNOWN |
| 1977 | optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; |
| 1978 | // Packet type of the connection |
| 1979 | // Original type: uint8_t |
| 1980 | // Default: BQR_PACKET_TYPE_UNKNOWN |
| 1981 | optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; |
| 1982 | // Connection handle of the connection |
| 1983 | // Original type: uint16_t |
| 1984 | optional int32 connection_handle = 3; |
| 1985 | // Performing Role for the connection |
| 1986 | // Original type: uint8_t |
| 1987 | optional int32 connection_role = 4; |
| 1988 | // Current Transmit Power Level for the connection. This value is the same as the controller's |
| 1989 | // response to the HCI_Read_Transmit_Power_Level HCI command |
| 1990 | // Original type: uint8_t |
| 1991 | optional int32 tx_power_level = 5; |
| 1992 | // Received Signal Strength Indication (RSSI) value for the connection. This value is an |
| 1993 | // absolute receiver signal strength value |
| 1994 | // Original type: int8_t |
| 1995 | optional int32 rssi = 6; |
| 1996 | // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the |
| 1997 | // channels used by the link currently |
| 1998 | // Original type: uint8_t |
| 1999 | optional int32 snr = 7; |
| 2000 | // Indicates the number of unused channels in AFH_channel_map |
| 2001 | // Original type: uint8_t |
| 2002 | optional int32 unused_afh_channel_count = 8; |
| 2003 | // Indicates the number of the channels which are interfered and quality is bad but are still |
| 2004 | // selected for AFH |
| 2005 | // Original type: uint8_t |
| 2006 | optional int32 afh_select_unideal_channel_count = 9; |
| 2007 | // Current Link Supervision Timeout Setting |
| 2008 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2009 | // Original type: uint16_t |
| 2010 | optional int32 lsto = 10; |
| 2011 | // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's |
| 2012 | // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of |
| 2013 | // 0x01 (Piconet Clock) |
| 2014 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2015 | // Original type: uint32_t |
| 2016 | optional int64 connection_piconet_clock = 11; |
| 2017 | // The count of retransmission |
| 2018 | // Original type: uint32_t |
| 2019 | optional int64 retransmission_count = 12; |
| 2020 | // The count of no RX |
| 2021 | // Original type: uint32_t |
| 2022 | optional int64 no_rx_count = 13; |
| 2023 | // The count of NAK (Negative Acknowledge) |
| 2024 | // Original type: uint32_t |
| 2025 | optional int64 nak_count = 14; |
| 2026 | // Controller timestamp of last TX ACK |
| 2027 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2028 | // Original type: uint32_t |
| 2029 | optional int64 last_tx_ack_timestamp = 15; |
| 2030 | // The count of Flow-off (STOP) |
| 2031 | // Original type: uint32_t |
| 2032 | optional int64 flow_off_count = 16; |
| 2033 | // Controller timestamp of last Flow-on (GO) |
| 2034 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2035 | // Original type: uint32_t |
| 2036 | optional int64 last_flow_on_timestamp = 17; |
| 2037 | // Buffer overflow count (how many bytes of TX data are dropped) since the last event |
| 2038 | // Original type: uint32_t |
| 2039 | optional int64 buffer_overflow_bytes = 18; |
| 2040 | // Buffer underflow count (in byte) since last event |
| 2041 | // Original type: uint32_t |
| 2042 | optional int64 buffer_underflow_bytes = 19; |
| 2043 | } |
| 2044 | |
| 2045 | /** |
| 2046 | * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack |
| 2047 | * |
| 2048 | * Notes: |
| 2049 | * - Each event can be partially filled as we might learn different pieces of device |
| 2050 | * information at different time |
| 2051 | * - Multiple device info events can be combined to give more complete picture |
| 2052 | * - When multiple device info events tries to describe the same information, the |
| 2053 | * later one wins |
| 2054 | * |
| 2055 | * Logged from: |
| 2056 | * packages/apps/Bluetooth |
| 2057 | */ |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 2058 | message BluetoothDeviceInfoReported { |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2059 | // An identifier that can be used to match events for this device. |
| 2060 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2061 | // Salt: Randomly generated 256 bit value |
| 2062 | // Hash algorithm: HMAC-SHA256 |
| 2063 | // Size: 32 byte |
| 2064 | // Default: null or empty if the device identifier is not known |
| 2065 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2066 | // Where is this device info obtained from |
| 2067 | optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; |
| 2068 | // Name of the data source |
| 2069 | // For EXTERNAL: package name of the data source |
| 2070 | // For INTERNAL: null for general case, component name otherwise |
| 2071 | optional string source_name = 3; |
| 2072 | // Name of the manufacturer of this device |
| 2073 | optional string manufacturer = 4; |
| 2074 | // Model of this device |
| 2075 | optional string model = 5; |
| 2076 | // Hardware version of this device |
| 2077 | optional string hardware_version = 6; |
| 2078 | // Software version of this device |
| 2079 | optional string software_version = 7; |
| 2080 | } |
| 2081 | |
| 2082 | /** |
| 2083 | * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote |
| 2084 | * device, as documented by the Bluetooth Core HCI specification |
| 2085 | * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification |
| 2086 | * Vol 2, Part E, Page 1118 |
| 2087 | * |
| 2088 | * Logged from: |
| 2089 | * system/bt |
| 2090 | */ |
| 2091 | message BluetoothRemoteVersionInfoReported { |
| 2092 | // Connection handle of the connection |
| 2093 | // Original type: uint16_t |
| 2094 | optional int32 connection_handle = 1; |
| 2095 | // HCI command status code |
| 2096 | // Default: STATUS_UNKNOWN |
| 2097 | optional android.bluetooth.hci.StatusEnum hci_status = 2; |
| 2098 | // 1 byte Version of current LMP in the remote controller |
| 2099 | optional int32 lmp_version = 3; |
| 2100 | // 2 bytes LMP manufacturer code of the remote controller |
| 2101 | // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers |
| 2102 | optional int32 lmp_manufacturer_code = 4; |
| 2103 | // 4 bytes subversion of the LMP in the remote controller |
| 2104 | optional int32 lmp_subversion = 5; |
| 2105 | } |
| 2106 | |
| 2107 | /** |
| 2108 | * Logs when certain Bluetooth SDP attributes are discovered |
| 2109 | * Constant definitions are from: |
| 2110 | * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery |
| 2111 | * |
| 2112 | * Current logged attributes: |
| 2113 | * - BluetoothProfileDescriptorList |
| 2114 | * - Supported Features Bitmask |
| 2115 | * |
| 2116 | * Logged from: |
| 2117 | * system/bt |
| 2118 | */ |
| 2119 | message BluetoothSdpAttributeReported { |
| 2120 | // An identifier that can be used to match events for this device. |
| 2121 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2122 | // Salt: Randomly generated 256 bit value |
| 2123 | // Hash algorithm: HMAC-SHA256 |
| 2124 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2125 | // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes |
| 2126 | // Original type: uint16_t |
| 2127 | optional int32 protocol_uuid = 2; |
| 2128 | // Short form UUIDs used to identify Bluetooth SDP attribute types |
| 2129 | // Original type: uint16_t |
| 2130 | optional int32 attribute_id = 3; |
| 2131 | // Attribute value for the particular attribute |
| 2132 | optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2133 | } |
| 2134 | |
| 2135 | /** |
| 2136 | * Logs when bond state of a Bluetooth device changes |
| 2137 | * |
| 2138 | * Logged from: |
| 2139 | * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| 2140 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2141 | */ |
| 2142 | message BluetoothBondStateChanged { |
| 2143 | // An identifier that can be used to match events for this device. |
| 2144 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2145 | // Salt: Randomly generated 256 bit value |
| 2146 | // Hash algorithm: HMAC-SHA256 |
| 2147 | // Size: 32 byte |
| 2148 | // Default: null or empty if the device identifier is not known |
| 2149 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2150 | // Preferred transport type to remote dual mode device |
| 2151 | // Default: TRANSPORT_AUTO means no preference |
| 2152 | optional android.bluetooth.TransportTypeEnum transport = 2; |
| 2153 | // The type of this Bluetooth device (Classic, LE, or Dual mode) |
| 2154 | // Default: UNKNOWN |
| 2155 | optional android.bluetooth.DeviceTypeEnum type = 3; |
| 2156 | // Current bond state (NONE, BONDING, BONDED) |
| 2157 | // Default: BOND_STATE_UNKNOWN |
| 2158 | optional android.bluetooth.BondStateEnum bond_state = 4; |
| 2159 | // Bonding sub state |
| 2160 | // Default: BOND_SUB_STATE_UNKNOWN |
| 2161 | optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; |
| 2162 | // Unbond Reason |
| 2163 | // Default: UNBOND_REASON_UNKNOWN |
| 2164 | optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; |
| 2165 | } |
| 2166 | |
| 2167 | /** |
| 2168 | * Logs there is an event related Bluetooth classic pairing |
| 2169 | * |
| 2170 | * Logged from: |
| 2171 | * system/bt |
| 2172 | */ |
| 2173 | message BluetoothClassicPairingEventReported { |
| 2174 | // An identifier that can be used to match events for this device. |
| 2175 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2176 | // Salt: Randomly generated 256 bit value |
| 2177 | // Hash algorithm: HMAC-SHA256 |
| 2178 | // Size: 32 byte |
| 2179 | // Default: null or empty if the device identifier is not known |
| 2180 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2181 | // Connection handle of this connection if available |
| 2182 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2183 | // Default: 0xFFFF if the handle is unknown |
| 2184 | optional int32 connection_handle = 2; |
| 2185 | // HCI command associated with this event |
| 2186 | // Default: CMD_UNKNOWN |
| 2187 | optional android.bluetooth.hci.CommandEnum hci_cmd = 3; |
| 2188 | // HCI event associated with this event |
| 2189 | // Default: EVT_UNKNOWN |
| 2190 | optional android.bluetooth.hci.EventEnum hci_event = 4; |
| 2191 | // HCI command status code if this is triggerred by hci_cmd |
| 2192 | // Default: STATUS_UNKNOWN |
| 2193 | optional android.bluetooth.hci.StatusEnum cmd_status = 5; |
| 2194 | // HCI reason code associated with this event |
| 2195 | // Default: STATUS_UNKNOWN |
| 2196 | optional android.bluetooth.hci.StatusEnum reason_code = 6; |
Jack He | 3b25983 | 2019-03-20 03:47:29 -0700 | [diff] [blame] | 2197 | // A status value related to this specific event |
| 2198 | // Default: 0 |
| 2199 | optional int64 event_value = 7; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2200 | } |
| 2201 | |
| 2202 | /** |
| 2203 | * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) |
| 2204 | * |
| 2205 | * Logged from: |
| 2206 | * system/bt |
| 2207 | */ |
| 2208 | message BluetoothSmpPairingEventReported { |
| 2209 | // An identifier that can be used to match events for this device. |
| 2210 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2211 | // Salt: Randomly generated 256 bit value |
| 2212 | // Hash algorithm: HMAC-SHA256 |
| 2213 | // Size: 32 byte |
| 2214 | // Default: null or empty if the device identifier is not known |
| 2215 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2216 | // SMP command sent or received over L2CAP |
| 2217 | // Default: CMD_UNKNOWN |
| 2218 | optional android.bluetooth.smp.CommandEnum smp_command = 2; |
| 2219 | // Whether this command is sent or received |
| 2220 | // Default: DIRECTION_UNKNOWN |
| 2221 | optional android.bluetooth.DirectionEnum direction = 3; |
| 2222 | // SMP failure reason code |
| 2223 | // Default: PAIRING_FAIL_REASON_DEFAULT |
| 2224 | optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; |
| 2225 | } |
| 2226 | |
| 2227 | /** |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2228 | * Logs when a Bluetooth socket’s connection state changed |
| 2229 | * |
| 2230 | * Logged from: |
| 2231 | * system/bt |
| 2232 | */ |
| 2233 | message BluetoothSocketConnectionStateChanged { |
| 2234 | // An identifier that can be used to match events for this device. |
| 2235 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2236 | // Salt: Randomly generated 256 bit value |
| 2237 | // Hash algorithm: HMAC-SHA256 |
| 2238 | // Size: 32 byte |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2239 | // Default: null or empty if this is a server listener socket |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2240 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2241 | // Temporary port of this socket for the current connection or session only |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2242 | // Default 0 when unknown or don't care |
| 2243 | optional int32 port = 2; |
| 2244 | // Socket type as mentioned in |
| 2245 | // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java |
| 2246 | // Default: SOCKET_TYPE_UNKNOWN |
| 2247 | optional android.bluetooth.SocketTypeEnum type = 3; |
| 2248 | // Socket connection state |
| 2249 | // Default: SOCKET_CONNECTION_STATE_UNKNOWN |
| 2250 | optional android.bluetooth.SocketConnectionstateEnum state = 4; |
| 2251 | // Number of bytes sent to remote device during this connection |
| 2252 | optional int64 tx_bytes = 5; |
| 2253 | // Number of bytes received from remote device during this connection |
| 2254 | optional int64 rx_bytes = 6; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2255 | // Socket owner's UID |
| 2256 | optional int32 uid = 7 [(is_uid) = true]; |
| 2257 | // Server port of this socket, if any. When both |server_port| and |port| fields are populated, |
| 2258 | // |port| must be spawned by |server_port| |
| 2259 | // Default 0 when unknown or don't care |
| 2260 | optional int32 server_port = 8; |
| 2261 | // Whether this is a server listener socket |
| 2262 | optional android.bluetooth.SocketRoleEnum is_server = 9; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2263 | } |
| 2264 | |
| 2265 | /** |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2266 | * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection |
| 2267 | * |
| 2268 | * Logged from: |
| 2269 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2270 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 2271 | * |
| 2272 | */ |
| 2273 | message BluetoothClassOfDeviceReported { |
| 2274 | // An identifier that can be used to match events for this device. |
| 2275 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2276 | // Salt: Randomly generated 256 bit value |
| 2277 | // Hash algorithm: HMAC-SHA256 |
| 2278 | // Size: 32 byte |
| 2279 | // Default: null or empty if this is a server listener socket |
| 2280 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2281 | // Class of Device (CoD) value including both Major, Minor device class and service class |
| 2282 | // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband |
| 2283 | // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass |
| 2284 | // Default: 0 |
| 2285 | optional int32 class_of_device = 2; |
| 2286 | } |
| 2287 | |
| 2288 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2289 | * Logs when something is plugged into or removed from the USB-C connector. |
| 2290 | * |
| 2291 | * Logged from: |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2292 | * UsbService |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2293 | */ |
| 2294 | message UsbConnectorStateChanged { |
| 2295 | enum State { |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2296 | STATE_DISCONNECTED = 0; |
| 2297 | STATE_CONNECTED = 1; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2298 | } |
| 2299 | optional State state = 1; |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2300 | optional string id = 2; |
Badhri Jagan Sridharan | faf6207 | 2018-11-16 17:17:03 -0800 | [diff] [blame] | 2301 | // Last active session in ms. |
| 2302 | // 0 when the port is in connected state. |
| 2303 | optional int64 last_connect_duration_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2304 | } |
| 2305 | |
| 2306 | /** |
| 2307 | * Logs the reported speaker impedance. |
| 2308 | * |
| 2309 | * Logged from: |
| 2310 | * Vendor audio implementation. |
| 2311 | */ |
| 2312 | message SpeakerImpedanceReported { |
| 2313 | optional int32 speaker_location = 1; |
| 2314 | optional int32 impedance = 2; |
| 2315 | } |
| 2316 | |
| 2317 | /** |
| 2318 | * Logs the report of a failed hardware. |
| 2319 | * |
| 2320 | * Logged from: |
| 2321 | * Vendor HALs. |
| 2322 | * |
| 2323 | */ |
| 2324 | message HardwareFailed { |
| 2325 | enum HardwareType { |
| 2326 | HARDWARE_FAILED_UNKNOWN = 0; |
| 2327 | HARDWARE_FAILED_MICROPHONE = 1; |
| 2328 | HARDWARE_FAILED_CODEC = 2; |
| 2329 | HARDWARE_FAILED_SPEAKER = 3; |
| 2330 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 2331 | } |
| 2332 | optional HardwareType hardware_type = 1; |
| 2333 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2334 | /** |
| 2335 | * hardware_location allows vendors to differentiate between multiple instances of |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2336 | * the same hardware_type. The specific locations are vendor defined integers, |
| 2337 | * referring to board-specific numbering schemes. |
| 2338 | */ |
| 2339 | optional int32 hardware_location = 2; |
| 2340 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2341 | /** |
| 2342 | * failure_code is specific to the HardwareType of the failed hardware. |
| 2343 | * It should use one of the enum values defined below. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2344 | */ |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2345 | enum HardwareErrorCode { |
| 2346 | UNKNOWN = 0; |
| 2347 | COMPLETE = 1; |
| 2348 | SPEAKER_HIGH_Z = 2; |
| 2349 | SPEAKER_SHORT = 3; |
| 2350 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 2351 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
Maggie White | b76cebc | 2019-02-05 15:21:29 -0800 | [diff] [blame] | 2352 | DEGRADE = 6; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2353 | } |
| 2354 | optional int32 failure_code = 3; |
| 2355 | } |
| 2356 | |
| 2357 | /** |
| 2358 | * Log an event when the device has been physically dropped. |
| 2359 | * Reported from the /vendor partition. |
| 2360 | */ |
| 2361 | message PhysicalDropDetected { |
| 2362 | // Confidence that the event was actually a drop, 0 -> 100 |
| 2363 | optional int32 confidence_pctg = 1; |
| 2364 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 2365 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 2366 | // Duration of freefall in ms |
| 2367 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2368 | } |
| 2369 | |
| 2370 | /** |
| 2371 | * Log bucketed battery charge cycles. |
| 2372 | * |
| 2373 | * Each bucket represents cycles of the battery past |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2374 | * a given charge point. For example, if 10 cycle buckets are |
| 2375 | * initialized, bucket 1 is the lowest 1/10th of the battery, |
| 2376 | * and bucket 10 is 100%. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2377 | * |
| 2378 | * Logged from: |
| 2379 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 2380 | */ |
| 2381 | message ChargeCyclesReported { |
| 2382 | optional int32 cycle_bucket_1 = 1; |
| 2383 | optional int32 cycle_bucket_2 = 2; |
| 2384 | optional int32 cycle_bucket_3 = 3; |
| 2385 | optional int32 cycle_bucket_4 = 4; |
| 2386 | optional int32 cycle_bucket_5 = 5; |
| 2387 | optional int32 cycle_bucket_6 = 6; |
| 2388 | optional int32 cycle_bucket_7 = 7; |
| 2389 | optional int32 cycle_bucket_8 = 8; |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2390 | optional int32 cycle_bucket_9 = 9; |
| 2391 | optional int32 cycle_bucket_10 = 10; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2392 | } |
| 2393 | |
| 2394 | /** |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2395 | * Log battery health snapshot. |
| 2396 | * |
| 2397 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 2398 | * are snapshotted periodically over 24hrs. |
| 2399 | */ |
| 2400 | message BatteryHealthSnapshot { |
| 2401 | enum BatterySnapshotType { |
| 2402 | UNKNOWN = 0; |
| 2403 | MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 2404 | MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 2405 | MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 2406 | MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 2407 | MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 2408 | MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 2409 | MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 2410 | MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 2411 | MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 2412 | MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 2413 | AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 2414 | } |
| 2415 | optional BatterySnapshotType type = 1; |
| 2416 | // Temperature, in 1/10ths of degree C. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2417 | optional int32 temperature_deci_celsius = 2; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2418 | // Voltage Battery Voltage, in microVolts. |
| 2419 | optional int32 voltage_micro_volt = 3; |
| 2420 | // Current Battery current, in microAmps. |
| 2421 | optional int32 current_micro_amps = 4; |
| 2422 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 2423 | optional int32 open_circuit_micro_volt = 5; |
| 2424 | // Resistance Battery Resistance, in microOhms. |
| 2425 | optional int32 resistance_micro_ohm = 6; |
| 2426 | // Level Battery Level, as % of full. |
| 2427 | optional int32 level_percent = 7; |
| 2428 | } |
| 2429 | |
| 2430 | /** |
| 2431 | * Log slow I/O operations on the primary storage. |
| 2432 | */ |
| 2433 | message SlowIo { |
| 2434 | // Classifications of IO Operations. |
| 2435 | enum IoOperation { |
| 2436 | UNKNOWN = 0; |
| 2437 | READ = 1; |
| 2438 | WRITE = 2; |
| 2439 | UNMAP = 3; |
| 2440 | SYNC = 4; |
| 2441 | } |
| 2442 | optional IoOperation operation = 1; |
| 2443 | |
| 2444 | // The number of slow IO operations of this type over 24 hours. |
| 2445 | optional int32 count = 2; |
| 2446 | } |
| 2447 | |
| 2448 | /** |
| 2449 | * Log battery caused shutdown with the last recorded voltage. |
| 2450 | */ |
| 2451 | message BatteryCausedShutdown { |
| 2452 | // The last recorded battery voltage prior to shutdown. |
| 2453 | optional int32 last_recorded_micro_volt = 1; |
| 2454 | } |
| 2455 | |
| 2456 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 2457 | * Logs when ThermalService receives throttling events. |
| 2458 | * |
| 2459 | * Logged from: |
| 2460 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 2461 | */ |
| 2462 | message ThermalThrottlingSeverityStateChanged { |
| 2463 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
| 2464 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 2465 | |
| 2466 | // The name of the temperature source. Eg. CPU0 |
| 2467 | optional string sensor_name = 2; |
| 2468 | |
| 2469 | // Temperature in tenths of a degree C. |
| 2470 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
| 2471 | optional int32 temperature_deci_celsius = 3; |
| 2472 | |
| 2473 | // Relative severity of the throttling, see enum definition. |
| 2474 | optional android.os.ThrottlingSeverityEnum severity = 4; |
| 2475 | } |
| 2476 | |
| 2477 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2478 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 2479 | * |
| 2480 | * Logged from: |
| 2481 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 2482 | */ |
| 2483 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2484 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2485 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2486 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2487 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2488 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2489 | } |
| 2490 | |
| 2491 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2492 | * Logs phone signal strength changes. |
| 2493 | * |
| 2494 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2495 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2496 | */ |
| 2497 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 2498 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 2499 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2500 | } |
| 2501 | |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 2502 | |
| 2503 | /** |
| 2504 | * Logs when the phone state, sim state or signal strength changes |
| 2505 | * |
| 2506 | * Logged from: |
| 2507 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2508 | */ |
| 2509 | message PhoneServiceStateChanged { |
| 2510 | optional android.telephony.ServiceStateEnum state = 1; |
| 2511 | optional android.telephony.SimStateEnum sim_state = 2; |
| 2512 | optional android.telephony.SignalStrengthEnum signal_strength = 3; |
| 2513 | } |
| 2514 | |
| 2515 | /** |
| 2516 | * Logs when the phone becomes on or off. |
| 2517 | * |
| 2518 | * Logged from: |
| 2519 | * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java |
| 2520 | */ |
| 2521 | message PhoneStateChanged { |
| 2522 | enum State { |
| 2523 | OFF = 0; |
| 2524 | ON = 1; |
| 2525 | } |
| 2526 | optional State state = 1; |
| 2527 | } |
| 2528 | |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 2529 | message BackGesture { |
| 2530 | enum BackType { |
| 2531 | DEFAULT_BACK_TYPE = 0; |
| 2532 | COMPLETED = 1; |
| 2533 | COMPLETED_REJECTED = 2; // successful because coming from rejected area |
| 2534 | INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area |
| 2535 | INCOMPLETE = 4; |
| 2536 | } |
| 2537 | optional BackType type = 1; |
| 2538 | |
| 2539 | optional int32 y_coordinate = 2; // y coordinate for ACTION_DOWN event |
| 2540 | enum WindowHorizontalLocation { |
| 2541 | DEFAULT_LOCATION = 0; |
| 2542 | LEFT = 1; |
| 2543 | RIGHT = 2; |
| 2544 | } |
| 2545 | optional WindowHorizontalLocation x_location = 3; |
| 2546 | } |
| 2547 | |
| 2548 | message ExclusionRectStateChanged { |
| 2549 | optional string component_name = 1; // if not available, simply packageName |
| 2550 | optional int32 requested_height = 2; // px |
| 2551 | optional int32 rejected_height = 3; // px |
| 2552 | |
| 2553 | enum WindowHorizontalLocation { |
| 2554 | DEFAULT_LOCATION = 0; |
| 2555 | LEFT = 1; |
| 2556 | RIGHT = 2; |
| 2557 | } |
| 2558 | optional WindowHorizontalLocation x_location = 4; |
| 2559 | optional bool landscape = 5; |
| 2560 | optional bool splitscreen = 6; |
| 2561 | optional int32 duration_millis = 7; |
| 2562 | } |
| 2563 | |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2564 | message LauncherUIChanged { |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 2565 | optional android.stats.launcher.LauncherAction action = 1; |
| 2566 | optional android.stats.launcher.LauncherState src_state = 2; |
| 2567 | optional android.stats.launcher.LauncherState dst_state = 3; |
| 2568 | optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES]; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2569 | optional bool is_swipe_up_enabled = 5; |
| 2570 | } |
| 2571 | |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2572 | message StyleUIChanged { |
| 2573 | optional android.stats.style.Action action = 1; |
| 2574 | optional int32 color_package_hash = 2; |
| 2575 | optional int32 font_package_hash = 3; |
| 2576 | optional int32 shape_package_hash = 4; |
| 2577 | optional int32 clock_package_hash = 5; |
| 2578 | optional int32 launcher_grid = 6; |
| 2579 | optional int32 wallpaper_category_hash = 7; |
| 2580 | optional int32 wallpaper_id_hash = 8; |
Kunhung Li | 286c52f | 2019-05-21 20:10:43 +0800 | [diff] [blame] | 2581 | optional int32 color_preference = 9; |
| 2582 | optional android.stats.style.LocationPreference location_preference = 10; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2583 | } |
| 2584 | |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2585 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2586 | * Logs when Settings UI has changed. |
| 2587 | * |
| 2588 | * Logged from: |
| 2589 | * packages/apps/Settings |
| 2590 | */ |
| 2591 | message SettingsUIChanged { |
| 2592 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2593 | * Where this SettingsUIChange event comes from. For example, if |
| 2594 | * it's a PAGE_VISIBLE event, where the page is opened from. |
| 2595 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2596 | optional android.app.settings.PageId attribution = 1; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2597 | |
| 2598 | /** |
| 2599 | * What the UI action is. |
| 2600 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2601 | optional android.app.settings.Action action = 2; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2602 | |
| 2603 | /** |
| 2604 | * Where the action is happening |
| 2605 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2606 | optional android.app.settings.PageId page_id = 3; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2607 | |
| 2608 | /** |
| 2609 | * What preference changed in this event. |
| 2610 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2611 | optional string changed_preference_key = 4; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2612 | |
| 2613 | /** |
| 2614 | * The new value of the changed preference. |
| 2615 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2616 | optional int64 changed_preference_int_value = 5; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2617 | } |
| 2618 | |
| 2619 | /** |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2620 | * Logs basic timing information about touch events. |
| 2621 | * Reported at most every 5 minutes while device is being interacted with. |
| 2622 | * |
| 2623 | * Logged from: |
| 2624 | * frameworks/native/services/inputflinger |
| 2625 | */ |
| 2626 | message TouchEventReported { |
| 2627 | /** |
| 2628 | * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 2629 | * and the standard deviation of the time spent processing touchscreen events |
| 2630 | * in the kernel and inputflinger. The units are microseconds. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2631 | * |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 2632 | * On supported devices, the starting point is taken during the hard interrupt inside the |
| 2633 | * kernel touch driver. On all other devices, the starting point is taken inside |
| 2634 | * the kernel's input event subsystem upon receipt of the input event. |
| 2635 | * The ending point is taken inside InputDispatcher, just after the input event |
| 2636 | * is sent to the app. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2637 | */ |
| 2638 | // Minimum value |
| 2639 | optional float latency_min_micros = 1; |
| 2640 | // Maximum value |
| 2641 | optional float latency_max_micros = 2; |
| 2642 | // Average value |
| 2643 | optional float latency_mean_micros = 3; |
| 2644 | // Standard deviation |
| 2645 | optional float latency_stdev_micros = 4; |
Siarhei Vishniakou | ca954f9 | 2019-03-22 16:41:14 -0700 | [diff] [blame] | 2646 | // Number of touch events (input_event) in this report |
| 2647 | optional int32 count = 5; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2648 | } |
| 2649 | |
| 2650 | /** |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 2651 | * Logs gesture classification and timing information for touch events. |
| 2652 | * |
| 2653 | * Logged from: |
| 2654 | * frameworks/base/core/java/android/view/GestureDetector.java |
| 2655 | * frameworks/base/core/java/android/view/View.java |
| 2656 | */ |
| 2657 | message TouchGestureClassified { |
| 2658 | // The source of the classification (e.g. Java class name). |
| 2659 | optional string source = 1; |
| 2660 | |
| 2661 | enum Classification { |
| 2662 | UNKNOWN_CLASSIFICATION = 0; |
| 2663 | SINGLE_TAP = 1; |
| 2664 | DOUBLE_TAP = 2; |
| 2665 | LONG_PRESS = 3; |
| 2666 | DEEP_PRESS = 4; |
| 2667 | SCROLL = 5; |
| 2668 | } |
| 2669 | // The classification of the gesture. |
| 2670 | optional Classification classification = 2; |
| 2671 | |
| 2672 | // The interval from the start of a touch event stream until the |
| 2673 | // classification was made. |
| 2674 | optional int32 latency_millis = 3; |
| 2675 | |
| 2676 | // The distance from the location of the first touch event to the |
| 2677 | // location of the touch event when the classification was made. |
| 2678 | optional float displacement_px = 4; |
| 2679 | } |
| 2680 | |
| 2681 | /** |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2682 | * Logs that a setting was updated. |
| 2683 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2684 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2685 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 2686 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 2687 | */ |
| 2688 | message SettingChanged { |
| 2689 | // The name of the setting. |
| 2690 | optional string setting = 1; |
| 2691 | |
| 2692 | // The change being imposed on this setting. May represent a number, eg "3". |
| 2693 | optional string value = 2; |
| 2694 | |
| 2695 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 2696 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 2697 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 2698 | // The +/- feature is currently only used for location_providers_allowed. |
| 2699 | optional string new_value = 3; |
| 2700 | |
| 2701 | // The previous value of this setting. |
| 2702 | optional string prev_value = 4; |
| 2703 | |
| 2704 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 2705 | optional string tag = 5; |
| 2706 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 2707 | // True if this setting with tag should be resettable. |
| 2708 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2709 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2710 | // 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] | 2711 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2712 | |
| 2713 | enum ChangeReason { |
| 2714 | UPDATED = 1; // Updated can be an insertion or an update. |
| 2715 | DELETED = 2; |
| 2716 | } |
| 2717 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2718 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 2719 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2720 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2721 | * Logs activity going to foreground or background |
| 2722 | * |
| 2723 | * Logged from: |
| 2724 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 2725 | */ |
| 2726 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2727 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 2728 | optional string pkg_name = 2; |
| 2729 | optional string class_name = 3; |
| 2730 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2731 | enum State { |
| 2732 | BACKGROUND = 0; |
| 2733 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2734 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2735 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2736 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 2737 | |
| 2738 | /** |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 2739 | * Logs when a volume entered low Storage state. |
| 2740 | * Logged from: |
| 2741 | * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java |
| 2742 | */ |
| 2743 | message LowStorageStateChanged { |
| 2744 | // Volume that ran out of storage. |
| 2745 | optional string volume_description = 1; |
| 2746 | |
| 2747 | enum State { |
| 2748 | UNKNOWN = 0; |
| 2749 | OFF = 1; |
| 2750 | ON = 2; |
| 2751 | } |
| 2752 | optional State state = 2; |
| 2753 | } |
| 2754 | |
| 2755 | /** |
| 2756 | * Logs when an app is downgraded. |
| 2757 | * Logged from: |
| 2758 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2759 | */ |
| 2760 | message AppDowngraded { |
| 2761 | optional string package_name = 1; |
| 2762 | // Size of the package (all data) before being downgraded. |
| 2763 | optional int64 size_in_bytes_before = 2; |
| 2764 | // Size of the package (all data) after being downgraded. |
| 2765 | optional int64 size_in_bytes_after = 3; |
| 2766 | |
| 2767 | optional bool aggressive = 4; |
| 2768 | } |
| 2769 | |
| 2770 | /** |
| 2771 | * Logs when an app is optimized after being downgraded. |
| 2772 | * Logged from: |
| 2773 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2774 | */ |
| 2775 | message AppOptimizedAfterDowngraded { |
| 2776 | optional string package_name = 1; |
| 2777 | } |
| 2778 | |
| 2779 | /** |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 2780 | * Logs whenever an app is installed on external storage. |
| 2781 | * Logged from: |
| 2782 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 2783 | */ |
| 2784 | message AppInstallOnExternalStorageReported { |
| 2785 | // The type of external storage. |
| 2786 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 2787 | // The name of the package that is installed on the sd card. |
| 2788 | optional string package_name = 2; |
| 2789 | } |
| 2790 | |
| 2791 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2792 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2793 | * Logged from: |
| 2794 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2795 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2796 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2797 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2798 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2799 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2800 | |
| 2801 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2802 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2803 | optional string process_name = 3; |
| 2804 | |
| 2805 | // The pid if available. -1 means not available. |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2806 | optional sint32 pid = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2807 | |
| 2808 | optional string package_name = 5; |
| 2809 | |
| 2810 | enum InstantApp { |
| 2811 | UNAVAILABLE = 0; |
| 2812 | FALSE = 1; |
| 2813 | TRUE = 2; |
| 2814 | } |
| 2815 | optional InstantApp is_instant_app = 6; |
| 2816 | |
| 2817 | enum ForegroundState { |
| 2818 | UNKNOWN = 0; |
| 2819 | BACKGROUND = 1; |
| 2820 | FOREGROUND = 2; |
| 2821 | } |
| 2822 | optional ForegroundState foreground_state = 7; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2823 | |
| 2824 | optional android.server.ErrorSource error_source = 8; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2825 | } |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2826 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2827 | /** |
| 2828 | * Logs when a WTF (What a Terrible Failure) happened. |
| 2829 | * Logged from: |
| 2830 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2831 | */ |
| 2832 | message WTFOccurred { |
| 2833 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2834 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2835 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2836 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2837 | // The name of the process. |
| 2838 | // system_server if it is not by an app |
| 2839 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2840 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2841 | // The pid if available. -1 means not available. |
| 2842 | optional sint32 pid = 4; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2843 | |
| 2844 | optional android.server.ErrorSource error_source = 5; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2845 | } |
| 2846 | |
| 2847 | /** |
| 2848 | * Logs when system server reports low memory. |
| 2849 | * Logged from: |
| 2850 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2851 | */ |
| 2852 | message LowMemReported { |
| 2853 | } |
| 2854 | |
| 2855 | /** |
| 2856 | * Logs when an app ANR (App Not Responding) occurs. |
| 2857 | * Logged from: |
| 2858 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 2859 | */ |
| 2860 | message ANROccurred { |
| 2861 | optional int32 uid = 1 [(is_uid) = true]; |
| 2862 | |
| 2863 | optional string process_name = 2; |
| 2864 | |
| 2865 | optional string short_component_name = 3; |
| 2866 | |
| 2867 | optional string reason = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2868 | |
| 2869 | enum InstantApp { |
| 2870 | UNAVAILABLE = 0; |
| 2871 | FALSE = 1; |
| 2872 | TRUE = 2; |
| 2873 | } |
| 2874 | optional InstantApp is_instant_app = 5; |
| 2875 | |
| 2876 | enum ForegroundState { |
| 2877 | UNKNOWN = 0; |
| 2878 | BACKGROUND = 1; |
| 2879 | FOREGROUND = 2; |
| 2880 | } |
| 2881 | optional ForegroundState foreground_state = 6; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2882 | |
| 2883 | optional android.server.ErrorSource error_source = 7; |
| 2884 | |
| 2885 | optional string package_name = 8; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2886 | } |
| 2887 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 2888 | /** |
| 2889 | * Logs when the vibrator state changes. |
| 2890 | * Logged from: |
| 2891 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 2892 | */ |
| 2893 | message VibratorStateChanged { |
| 2894 | repeated AttributionNode attribution_node = 1; |
| 2895 | |
| 2896 | enum State { |
| 2897 | OFF = 0; |
| 2898 | ON = 1; |
| 2899 | } |
| 2900 | optional State state = 2; |
| 2901 | |
| 2902 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 2903 | // Only applicable for State == ON. |
| 2904 | optional int64 duration_millis = 3; |
| 2905 | } |
| 2906 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2907 | /* |
| 2908 | * Allows other apps to push events into statsd. |
| 2909 | * Logged from: |
| 2910 | * frameworks/base/core/java/android/util/StatsLog.java |
| 2911 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2912 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2913 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2914 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2915 | |
| 2916 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 2917 | optional int32 label = 2; |
| 2918 | |
| 2919 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 2920 | // predicates for the metrics). |
| 2921 | enum State { |
| 2922 | UNKNOWN = 0; |
| 2923 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 2924 | STOP = 2; |
| 2925 | START = 3; |
| 2926 | } |
| 2927 | optional State state = 3; |
| 2928 | } |
| 2929 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2930 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 2931 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 2932 | * For example, this could be due to the user manually changing the time. |
| 2933 | * |
| 2934 | * Logged from: |
| 2935 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 2936 | */ |
| 2937 | message WallClockTimeShifted { |
| 2938 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 2939 | optional int64 wall_clock_timestamp_millis = 1; |
| 2940 | } |
| 2941 | |
| 2942 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2943 | * Logs when statsd detects an anomaly. |
| 2944 | * |
| 2945 | * Logged from: |
| 2946 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 2947 | */ |
| 2948 | message AnomalyDetected { |
| 2949 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2950 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2951 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 2952 | // Id of the config whose anomaly detection alert fired. |
| 2953 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2954 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 2955 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 2956 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2957 | } |
| 2958 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2959 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2960 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2961 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2962 | |
| 2963 | // The app package name. |
| 2964 | optional string pkg_name = 2; |
| 2965 | |
| 2966 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2967 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2968 | WARM = 1; |
| 2969 | HOT = 2; |
| 2970 | COLD = 3; |
| 2971 | } |
| 2972 | // The transition type. |
| 2973 | optional TransitionType type = 3; |
| 2974 | |
| 2975 | // The activity name. |
| 2976 | optional string activity_name = 4; |
| 2977 | |
| 2978 | // The name of the calling app. Empty if not set. |
| 2979 | optional string calling_pkg_name = 5; |
| 2980 | |
| 2981 | // Whether the app is an instant app. |
| 2982 | optional bool is_instant_app = 6; |
| 2983 | |
| 2984 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2985 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2986 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 2987 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2988 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2989 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2990 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2991 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2992 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2993 | optional int32 bind_application_delay_millis = 11; |
| 2994 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2995 | |
| 2996 | // Empty if not set. |
| 2997 | optional string launch_token = 13; |
| 2998 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 2999 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3000 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3001 | |
| 3002 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3003 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3004 | } |
| 3005 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3006 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3007 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3008 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3009 | |
| 3010 | // The app package name. |
| 3011 | optional string pkg_name = 2; |
| 3012 | |
| 3013 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3014 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3015 | WARM = 1; |
| 3016 | HOT = 2; |
| 3017 | COLD = 3; |
| 3018 | } |
| 3019 | // The transition type. |
| 3020 | optional TransitionType type = 3; |
| 3021 | |
| 3022 | // The activity name. |
| 3023 | optional string activity_name = 4; |
| 3024 | } |
| 3025 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3026 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3027 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3028 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3029 | |
| 3030 | // The app package name. |
| 3031 | optional string pkg_name = 2; |
| 3032 | |
| 3033 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3034 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3035 | WITH_BUNDLE = 1; |
| 3036 | WITHOUT_BUNDLE = 2; |
| 3037 | } |
| 3038 | // The transition type. |
| 3039 | optional TransitionType type = 3; |
| 3040 | |
| 3041 | // The activity name. |
| 3042 | optional string activity_name = 4; |
| 3043 | |
| 3044 | optional bool transition_process_running = 5; |
| 3045 | |
| 3046 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3047 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3048 | } |
| 3049 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3050 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3051 | * Logs a picture-in-picture action |
| 3052 | * Logged from: |
| 3053 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3054 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 3055 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 3056 | */ |
| 3057 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3058 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3059 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3060 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3061 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3062 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3063 | enum State { |
| 3064 | ENTERED = 1; |
| 3065 | EXPANDED_TO_FULL_SCREEN = 2; |
| 3066 | MINIMIZED = 3; |
| 3067 | DISMISSED = 4; |
| 3068 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3069 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3070 | } |
| 3071 | |
| 3072 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3073 | * Logs overlay action |
| 3074 | * Logged from: |
| 3075 | * services/core/java/com/android/server/wm/Session.java |
| 3076 | */ |
| 3077 | message OverlayStateChanged { |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3078 | optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3079 | |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3080 | optional string package_name = 2 [(state_field_option).option = PRIMARY]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3081 | |
| 3082 | optional bool using_alert_window = 3; |
| 3083 | |
| 3084 | enum State { |
| 3085 | ENTERED = 1; |
| 3086 | EXITED = 2; |
| 3087 | } |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3088 | optional State state = 4 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3089 | } |
| 3090 | |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3091 | /* |
| 3092 | * Logs foreground service starts and stops. |
| 3093 | * Note that this is not when a service starts or stops, but when it is |
| 3094 | * considered foreground. |
| 3095 | * Logged from |
| 3096 | * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 3097 | */ |
| 3098 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3099 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3100 | // package_name + "/" + class_name |
| 3101 | optional string short_name = 2; |
| 3102 | |
| 3103 | enum State { |
| 3104 | ENTER = 1; |
| 3105 | EXIT = 2; |
| 3106 | } |
| 3107 | optional State state = 3; |
| 3108 | } |
| 3109 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3110 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3111 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 3112 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 3113 | * attributed back to the parent (host) uid. One example is Chrome. |
| 3114 | * |
| 3115 | * Logged from: |
| 3116 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 3117 | */ |
| 3118 | message IsolatedUidChanged { |
| 3119 | // 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] | 3120 | // 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] | 3121 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3122 | optional int32 parent_uid = 1; |
| 3123 | |
| 3124 | optional int32 isolated_uid = 2; |
| 3125 | |
| 3126 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 3127 | enum Event { |
| 3128 | REMOVED = 0; |
| 3129 | CREATED = 1; |
| 3130 | } |
| 3131 | optional Event event = 3; |
| 3132 | } |
| 3133 | |
| 3134 | /* |
| 3135 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 3136 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 3137 | * and processed by WakeupController.cpp. |
| 3138 | */ |
| 3139 | message PacketWakeupOccurred { |
| 3140 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 3141 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3142 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3143 | // The interface name on which the packet was received. |
| 3144 | optional string iface = 2; |
| 3145 | // The ethertype value of the packet. |
| 3146 | optional int32 ethertype = 3; |
| 3147 | // String representation of the destination MAC address of the packet. |
| 3148 | optional string destination_hardware_address = 4; |
| 3149 | // String representation of the source address of the packet if this was an IP packet. |
| 3150 | optional string source_ip = 5; |
| 3151 | // String representation of the destination address of the packet if this was an IP packet. |
| 3152 | optional string destination_ip = 6; |
| 3153 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 3154 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 3155 | // families. |
| 3156 | optional int32 ip_next_header = 7; |
| 3157 | // The source port if this was a TCP or UDP packet. |
| 3158 | optional int32 source_port = 8; |
| 3159 | // The destination port if this was a TCP or UDP packet. |
| 3160 | optional int32 destination_port = 9; |
| 3161 | } |
| 3162 | |
| 3163 | /* |
| 3164 | * Logs the memory stats for an app on startup. |
| 3165 | * Logged from: |
| 3166 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3167 | */ |
| 3168 | message AppStartMemoryStateCaptured { |
| 3169 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3170 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3171 | |
| 3172 | // The process name. |
| 3173 | optional string process_name = 2; |
| 3174 | |
| 3175 | // The activity name. |
| 3176 | optional string activity_name = 3; |
| 3177 | |
| 3178 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3179 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3180 | |
| 3181 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3182 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3183 | |
| 3184 | // RSS |
| 3185 | optional int64 rss_in_bytes = 6; |
| 3186 | |
| 3187 | // CACHE |
| 3188 | optional int64 cache_in_bytes = 7; |
| 3189 | |
| 3190 | // SWAP |
| 3191 | optional int64 swap_in_bytes = 8; |
| 3192 | } |
| 3193 | |
| 3194 | /* |
| 3195 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 3196 | * for LMK event. |
| 3197 | * Logged from: |
| 3198 | * system/core/lmkd/lmkd.c |
| 3199 | */ |
| 3200 | message LmkStateChanged { |
| 3201 | enum State { |
| 3202 | UNKNOWN = 0; |
| 3203 | START = 1; |
| 3204 | STOP = 2; |
| 3205 | } |
| 3206 | optional State state = 1; |
| 3207 | } |
| 3208 | |
| 3209 | /* |
| 3210 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 3211 | * Logged from: |
| 3212 | * system/core/lmkd/lmkd.c |
| 3213 | */ |
| 3214 | message LmkKillOccurred { |
| 3215 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3216 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3217 | |
| 3218 | // The process name. |
| 3219 | optional string process_name = 2; |
| 3220 | |
| 3221 | // oom adj score. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3222 | optional int32 oom_adj_score = 3; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3223 | |
| 3224 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3225 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3226 | |
| 3227 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3228 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3229 | |
| 3230 | // RSS |
| 3231 | optional int64 rss_in_bytes = 6; |
| 3232 | |
| 3233 | // CACHE |
| 3234 | optional int64 cache_in_bytes = 7; |
| 3235 | |
| 3236 | // SWAP |
| 3237 | optional int64 swap_in_bytes = 8; |
Jim Blackler | 8593d1f | 2018-11-21 15:24:48 +0000 | [diff] [blame] | 3238 | |
| 3239 | // The elapsed real time of start of the process. |
| 3240 | optional int64 process_start_time_nanos = 9; |
Suren Baghdasaryan | 1fbaa1f | 2019-03-04 11:09:31 -0800 | [diff] [blame] | 3241 | |
| 3242 | // Min oom adj score considered by lmkd. |
| 3243 | optional int32 min_oom_score = 10; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3244 | } |
| 3245 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3246 | /* |
| 3247 | * Logs when the ActivityManagerService detects that an app died. |
| 3248 | * |
| 3249 | * Logged from: |
| 3250 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3251 | */ |
| 3252 | message AppDied { |
| 3253 | // timestamp(elapsedRealtime) of record creation |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 3254 | optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3255 | } |
| 3256 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3257 | /** |
| 3258 | * An atom for generic metrics logging. Available from Android Q. |
| 3259 | */ |
| 3260 | message GenericAtom { |
| 3261 | // The uid of the application that sent this custom atom. |
| 3262 | optional int32 uid = 1 [(is_uid) = true]; |
| 3263 | |
| 3264 | // An event_id indicates the type of event. |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 3265 | optional android.stats.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3266 | } |
| 3267 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3268 | /** |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3269 | * Atom for simple logging of user interaction and impression events, such as "the user touched |
| 3270 | * this button" or "this dialog was displayed". |
| 3271 | * Keep the UI event stream clean: don't use for system or background events. |
| 3272 | * Log using the UiEventLogger wrapper - don't write with the StatsLog API directly. |
| 3273 | */ |
| 3274 | message UiEventReported { |
| 3275 | // The event_id. |
| 3276 | optional int32 event_id = 1; |
| 3277 | // The event's source or target uid and package, if applicable. |
| 3278 | // For example, the package posting a notification, or the destination package of a share. |
| 3279 | optional int32 uid = 2 [(is_uid) = true]; |
| 3280 | optional string package_name = 3; |
| 3281 | } |
| 3282 | |
| 3283 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3284 | * Logs when a biometric acquire event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3285 | * |
| 3286 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3287 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3288 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3289 | message BiometricAcquired { |
| 3290 | // Biometric modality that was acquired. |
| 3291 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3292 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. |
| 3293 | optional int32 user = 2; |
| 3294 | // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3295 | optional bool is_crypto = 3; |
| 3296 | // Action that the device is performing. Acquired messages are only expected for enroll and |
| 3297 | // authenticate. Other actions may indicate an error. |
| 3298 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3299 | // The client that this acquisition was received for. |
| 3300 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3301 | // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager. |
| 3302 | optional int32 acquire_info = 6; |
| 3303 | // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. |
| 3304 | optional int32 acquire_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3305 | // Dictates if this message should trigger additional debugging. |
| 3306 | optional bool debug = 8; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3307 | } |
| 3308 | |
| 3309 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3310 | * Logs when a biometric authentication event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3311 | * |
| 3312 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3313 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3314 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3315 | message BiometricAuthenticated { |
| 3316 | // Biometric modality that was used. |
| 3317 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3318 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3319 | optional int32 user = 2; |
| 3320 | // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password |
| 3321 | // storage. |
| 3322 | optional bool is_crypto = 3; |
| 3323 | // The client that this acquisition was received for. |
| 3324 | optional android.hardware.biometrics.ClientEnum client = 4; |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3325 | // If authentication requires user confirmation. See BiometricPrompt's |
| 3326 | // setRequireConfirmation(bool) method. |
| 3327 | optional bool require_confirmation = 5; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3328 | |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3329 | enum State { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3330 | UNKNOWN = 0; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3331 | REJECTED = 1; |
| 3332 | PENDING_CONFIRMATION = 2; |
| 3333 | CONFIRMED = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3334 | } |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3335 | |
| 3336 | // State of the current auth attempt. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3337 | optional State state = 6; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3338 | // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is |
| 3339 | // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to |
| 3340 | // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to |
| 3341 | // CONFIRMED. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3342 | optional int64 latency_millis = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3343 | // Dictates if this message should trigger additional debugging. |
| 3344 | optional bool debug = 8; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3345 | } |
| 3346 | |
| 3347 | /** |
| 3348 | * Logs when a biometric error occurs. |
| 3349 | * |
| 3350 | * Logged from: |
| 3351 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3352 | */ |
| 3353 | message BiometricErrorOccurred { |
| 3354 | // Biometric modality that was used. |
| 3355 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3356 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3357 | optional int32 user = 2; |
| 3358 | // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3359 | optional bool is_crypto = 3; |
| 3360 | // Action that the device is performing. |
| 3361 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3362 | // The client that this acquisition was received for. |
| 3363 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3364 | // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors |
| 3365 | // are unique to modality. |
| 3366 | optional int32 error_info = 6; |
| 3367 | // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined |
| 3368 | // by the vendor and not specified by the HIDL interface. |
| 3369 | optional int32 error_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3370 | // Dictates if this message should trigger additional debugging. |
| 3371 | optional bool debug = 8; |
Kevin Chyn | 7fca236 | 2019-06-20 17:20:42 -0700 | [diff] [blame] | 3372 | // Time spent during the authentication attempt. |
| 3373 | optional int64 latency_millis = 9; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3374 | } |
| 3375 | |
| 3376 | /** |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3377 | * Logs when a system health issue is detected. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3378 | * Logged from: |
| 3379 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3380 | */ |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3381 | message BiometricSystemHealthIssueDetected { |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3382 | // Biometric modality. |
| 3383 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3384 | // Type of issue detected. |
| 3385 | optional android.hardware.biometrics.IssueEnum issue = 2; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3386 | // Dictates if this message should trigger additional debugging. |
| 3387 | optional bool debug = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3388 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3389 | |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 3390 | /** |
| 3391 | * Logs when a biometric enrollment occurs. |
| 3392 | * |
| 3393 | * Logged from: |
| 3394 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3395 | */ |
| 3396 | message BiometricEnrolled { |
| 3397 | // Biometric modality that was used. |
| 3398 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3399 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3400 | optional int32 user = 2; |
| 3401 | // The amount of time the enrollment took in milliseconds. |
| 3402 | optional int64 latency_millis = 3; |
| 3403 | // Whether or not the enrollment was successful. |
| 3404 | optional bool success = 4; |
| 3405 | } |
| 3406 | |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3407 | /* |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3408 | * 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] | 3409 | */ |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3410 | message FlagFlipUpdateOccurred { |
| 3411 | // If the event is from a flag config package, specify the package name. |
| 3412 | optional string flag_flip_package_name = 1; |
| 3413 | |
| 3414 | // The order id of the package |
| 3415 | optional int64 order_id = 2; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3416 | } |
| 3417 | |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3418 | /** |
| 3419 | * Potential experiment ids that goes with a train install. |
| 3420 | */ |
| 3421 | message TrainExperimentIds { |
| 3422 | repeated int64 experiment_id = 1; |
| 3423 | } |
| 3424 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3425 | /* |
| 3426 | * Logs when a binary push state changes. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3427 | * Logged by the installer via public api. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3428 | */ |
| 3429 | message BinaryPushStateChanged { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3430 | // Name of the train. |
| 3431 | optional string train_name = 1; |
| 3432 | // Version code for a "train" of packages that need to be installed atomically |
| 3433 | optional int64 train_version_code = 2; |
| 3434 | // After installation of this package, device requires a restart. |
| 3435 | optional bool requires_staging = 3; |
| 3436 | // Rollback should be enabled for this install. |
| 3437 | optional bool rollback_enabled = 4; |
| 3438 | // Requires low latency monitoring if possible. |
| 3439 | optional bool requires_low_latency_monitor = 5; |
| 3440 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3441 | enum State { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3442 | UNKNOWN = 0; |
| 3443 | INSTALL_REQUESTED = 1; |
| 3444 | INSTALL_STARTED = 2; |
| 3445 | INSTALL_STAGED_NOT_READY = 3; |
| 3446 | INSTALL_STAGED_READY = 4; |
| 3447 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3448 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 3449 | // and INSTALL_FAILURE_COMMIT. |
| 3450 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 3451 | // 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] | 3452 | INSTALL_CANCELLED = 7; |
| 3453 | INSTALLER_ROLLBACK_REQUESTED = 8; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 3454 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 3455 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 3456 | INSTALLER_ROLLBACK_STAGED = 11; |
| 3457 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 3458 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 3459 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 3460 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 3461 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 3462 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 3463 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 3464 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 3465 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 3466 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 3467 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3468 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 3469 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 3470 | INSTALL_FAILURE_COMMIT = 25; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3471 | } |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3472 | optional State state = 6; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3473 | // Possible experiment ids for monitoring this push. |
| 3474 | optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; |
| 3475 | // user id |
| 3476 | optional int32 user_id = 8; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3477 | } |
| 3478 | |
Tej Singh | c920308 | 2019-05-03 13:42:23 -0700 | [diff] [blame] | 3479 | /* Test atom, is not logged anywhere */ |
| 3480 | message TestAtomReported { |
| 3481 | repeated AttributionNode attribution_node = 1; |
| 3482 | optional int32 int_field = 2; |
| 3483 | optional int64 long_field = 3; |
| 3484 | optional float float_field = 4; |
| 3485 | optional string string_field = 5; |
| 3486 | optional bool boolean_field = 6; |
| 3487 | enum State { |
| 3488 | UNKNOWN = 0; |
| 3489 | OFF = 1; |
| 3490 | ON = 2; |
| 3491 | } |
| 3492 | optional State state = 7; |
| 3493 | optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 3494 | } |
| 3495 | |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 3496 | /** Represents USB port overheat event. */ |
| 3497 | message UsbPortOverheatEvent { |
| 3498 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 3499 | optional int32 plug_temperature_deci_c = 1; |
| 3500 | |
| 3501 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ |
| 3502 | optional int32 max_temperature_deci_c = 2; |
| 3503 | |
| 3504 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 3505 | optional int32 time_to_overheat_secs = 3; |
| 3506 | |
| 3507 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 3508 | optional int32 time_to_hysteresis_secs = 4; |
| 3509 | |
| 3510 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 3511 | optional int32 time_to_inactive_secs = 5; |
| 3512 | }; |
| 3513 | |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 3514 | /** |
| 3515 | * Logs total effective full charge and discharge cycles on a battery. |
| 3516 | * Here are some examples of one effective cycle: |
| 3517 | * 1) the battery charges from 0% to 100% and drains back to 0%, |
| 3518 | * 2) charging from 50% to 100% and draining back to 50% twice. |
| 3519 | * Pulled from: |
| 3520 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 3521 | */ |
| 3522 | message BatteryCycleCount { |
| 3523 | /* Number of total charge and discharge cycles on the system battery. */ |
| 3524 | optional int32 cycle_count = 1; |
| 3525 | } |
| 3526 | |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3527 | /** |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3528 | * Logs that external storage is mounted and information about it, the storage type (sd card/usb/ |
| 3529 | * others), its type (public or private) and the size in bytes. |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3530 | * Pulled from: |
| 3531 | * StatsCompanionService |
| 3532 | */ |
| 3533 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3534 | message ExternalStorageInfo { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3535 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3536 | enum VolumeType { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3537 | UNKNOWN = 0; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3538 | PUBLIC = 1; |
| 3539 | PRIVATE = 2; |
| 3540 | OTHER = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3541 | } |
| 3542 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3543 | // The type of external storage. |
| 3544 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 3545 | // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal. |
| 3546 | optional VolumeType volume_type = 2; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3547 | // Total size of the sd card in bytes. |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3548 | optional int64 size_bytes = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3549 | } |
| 3550 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3551 | /* |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3552 | * Logs when a connection becomes available and lost. |
| 3553 | * Logged in StatsCompanionService.java |
| 3554 | */ |
| 3555 | message ConnectivityStateChanged { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3556 | // Id of the network. |
| 3557 | optional int32 net_id = 1; |
| 3558 | |
| 3559 | enum State { |
| 3560 | UNKNOWN = 0; |
| 3561 | CONNECTED = 1; |
| 3562 | DISCONNECTED = 2; |
| 3563 | } |
| 3564 | // Connected state of a network. |
| 3565 | optional State state = 2; |
| 3566 | } |
| 3567 | |
| 3568 | /** |
| 3569 | * Logs when a service starts and stops. |
| 3570 | * Logged from: |
| 3571 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3572 | */ |
| 3573 | message ServiceStateChanged { |
| 3574 | |
| 3575 | optional int32 uid = 1 [(is_uid) = true]; |
| 3576 | |
| 3577 | optional string package_name = 2; |
| 3578 | |
| 3579 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3580 | |
| 3581 | enum State { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3582 | START = 1; |
| 3583 | STOP = 2; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3584 | } |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3585 | |
| 3586 | optional State state = 4; |
| 3587 | } |
| 3588 | |
| 3589 | /** |
| 3590 | * Logs when a service is launched. |
| 3591 | * Logged from: |
| 3592 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3593 | */ |
| 3594 | message ServiceLaunchReported { |
| 3595 | |
| 3596 | optional int32 uid = 1 [(is_uid) = true]; |
| 3597 | |
| 3598 | optional string package_name = 2; |
| 3599 | |
| 3600 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3601 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3602 | |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 3603 | /** |
| 3604 | * Logs when a hidden API is used. |
| 3605 | * |
| 3606 | * Logged from: |
| 3607 | * libcore/libart/src/main/java/dalvik/system/VMRuntime.java |
| 3608 | */ |
| 3609 | message HiddenApiUsed { |
| 3610 | // The uid of the app making the hidden access. |
| 3611 | optional int32 uid = 1 [(is_uid) = true]; |
| 3612 | |
| 3613 | // Signature of the method or field accessed. |
| 3614 | optional string signature = 2; |
| 3615 | |
| 3616 | enum AccessMethod { |
| 3617 | NONE = 0; |
| 3618 | REFLECTION = 1; |
| 3619 | JNI = 2; |
| 3620 | LINKING = 3; |
| 3621 | } |
| 3622 | |
| 3623 | // Type of access. |
| 3624 | optional AccessMethod access_method = 3; |
| 3625 | |
| 3626 | // Whether the access was prevented or not. |
| 3627 | optional bool access_denied = 4; |
| 3628 | } |
| 3629 | |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3630 | /** |
| 3631 | * Logs user interaction with the Privacy Indicators added in Q. In particular: |
| 3632 | * - When user sees privacy chip |
| 3633 | * - When user clicks privacy chip |
| 3634 | * - How does the user exit the Privacy Dialog |
| 3635 | * Logged from: |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3636 | * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java |
| 3637 | */ |
| 3638 | message PrivacyIndicatorsInteracted { |
| 3639 | |
| 3640 | enum Type { |
| 3641 | UNKNOWN = 0; |
| 3642 | CHIP_VIEWED = 1; |
| 3643 | CHIP_CLICKED = 2; |
| 3644 | DIALOG_PRIVACY_SETTINGS = 3; |
| 3645 | DIALOG_DISMISS = 4; |
| 3646 | DIALOG_LINE_ITEM = 5; |
| 3647 | } |
| 3648 | |
| 3649 | optional Type type = 1 [(state_field_option).option = EXCLUSIVE]; |
| 3650 | |
| 3651 | // Used if the type is LINE_ITEM |
| 3652 | optional string package_name = 2; |
| 3653 | } |
| 3654 | |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 3655 | /** |
| 3656 | * Logs information about a package that is moved from the internal to external storage and vice |
| 3657 | * versa. |
| 3658 | * It logs the package name, the type of the external storage where the package is installed |
| 3659 | * (if moved to external storage, or UNKNOWN if moved to internal storage), |
| 3660 | * and the move type: if it's from internal to external or the other way around. |
| 3661 | * |
| 3662 | * Logged from: |
| 3663 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 3664 | */ |
| 3665 | message AppMovedStorageReported { |
| 3666 | enum MoveType { |
| 3667 | UNKNOWN = 0; |
| 3668 | TO_EXTERNAL = 1; |
| 3669 | TO_INTERNAL = 2; |
| 3670 | } |
| 3671 | // The type of the external storage. |
| 3672 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 3673 | // The type of move. |
| 3674 | optional MoveType move_type = 2; |
| 3675 | // The name of the package that was moved. |
| 3676 | optional string package_name = 3; |
| 3677 | } |
| 3678 | |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 3679 | /** |
| 3680 | * Logs when system server watchdog occurs. |
| 3681 | * Logged from: |
| 3682 | * frameworks/base/services/core/java/com/android/server/Watchdog.java |
| 3683 | */ |
| 3684 | message SystemServerWatchdogOccurred { |
| 3685 | optional string subject = 1; |
| 3686 | } |
| 3687 | |
| 3688 | /** |
| 3689 | * Logs when new file added to tombstones. |
| 3690 | * Logged from: |
| 3691 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 3692 | */ |
| 3693 | message TombStoneOccurred { |
| 3694 | } |
| 3695 | |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 3696 | /* |
| 3697 | * Information about a role request |
| 3698 | * |
| 3699 | * Logged from: |
| 3700 | * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java |
| 3701 | */ |
| 3702 | message RoleRequestResultReported { |
| 3703 | // UID of application requesting the role |
| 3704 | optional int32 requesting_uid = 1; |
| 3705 | |
| 3706 | // Package name of application requesting the role |
| 3707 | optional string requesting_package_name = 2; |
| 3708 | |
| 3709 | // The role to be granted |
| 3710 | optional string role_name = 3; |
| 3711 | |
| 3712 | // The count of applications qualifying for the role |
| 3713 | optional int32 qualifying_count = 4; |
| 3714 | |
| 3715 | // UID of application current granted the role |
| 3716 | optional int32 current_uid = 5; |
| 3717 | |
| 3718 | // Package name of application current granted the role |
| 3719 | optional string current_package_name = 6; |
| 3720 | |
| 3721 | // UID of another application that user chose to grant the role to, instead of the requesting |
| 3722 | // application |
| 3723 | optional int32 granted_another_uid = 7; |
| 3724 | |
| 3725 | // Package name of another application that user chose to grant the role to, instead of the |
| 3726 | // requesting application |
| 3727 | optional string granted_another_package_name = 8; |
| 3728 | |
| 3729 | enum Result { |
| 3730 | UNDEFINED = 0; |
| 3731 | // role request was ignored |
| 3732 | IGNORED = 1; |
| 3733 | // role request was ignored because it's already granted |
| 3734 | IGNORED_ALREADY_GRANTED = 2; |
| 3735 | // role request was ignored because the application isn't qualified |
| 3736 | IGNORED_NOT_QUALIFIED = 3; |
| 3737 | // role request was ignored because user said it should be always denied |
| 3738 | IGNORED_USER_ALWAYS_DENIED = 4; |
| 3739 | // role was granted by user action |
| 3740 | USER_GRANTED = 5; |
| 3741 | // role was denied by user action |
| 3742 | USER_DENIED = 6; |
| 3743 | // role was denied by user granting another application the role |
| 3744 | USER_DENIED_GRANTED_ANOTHER = 7; |
| 3745 | // role was denied and set to be always denied by the user |
| 3746 | USER_DENIED_WITH_ALWAYS = 8; |
| 3747 | } |
| 3748 | // The result of the role request |
| 3749 | optional Result result = 9; |
| 3750 | } |
| 3751 | |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 3752 | /** |
| 3753 | * Logs when a Vehicle Maps Service client's connection state has changed |
| 3754 | * |
| 3755 | * Logged from: |
| 3756 | * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java |
| 3757 | */ |
| 3758 | message VmsClientConnectionStateChanged { |
| 3759 | // The UID of the VMS client app |
| 3760 | optional int32 uid = 1 [(is_uid) = true]; |
| 3761 | |
| 3762 | enum State { |
| 3763 | UNKNOWN = 0; |
| 3764 | // Attempting to connect to the client |
| 3765 | CONNECTING = 1; |
| 3766 | // Client connection established |
| 3767 | CONNECTED = 2; |
| 3768 | // Client connection closed unexpectedly |
| 3769 | DISCONNECTED = 3; |
| 3770 | // Client connection closed by VMS |
| 3771 | TERMINATED = 4; |
| 3772 | // Error establishing the client connection |
| 3773 | CONNECTION_ERROR = 5; |
| 3774 | } |
| 3775 | |
| 3776 | optional State state = 2; |
| 3777 | } |
| 3778 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3779 | ////////////////////////////////////////////////////////////////////// |
| 3780 | // Pulled atoms below this line // |
| 3781 | ////////////////////////////////////////////////////////////////////// |
| 3782 | |
| 3783 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3784 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 3785 | * |
| 3786 | * Pulled from: |
| 3787 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 3788 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3789 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3790 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3791 | |
| 3792 | optional int64 rx_bytes = 2; |
| 3793 | |
| 3794 | optional int64 rx_packets = 3; |
| 3795 | |
| 3796 | optional int64 tx_bytes = 4; |
| 3797 | |
| 3798 | optional int64 tx_packets = 5; |
| 3799 | } |
| 3800 | |
| 3801 | /** |
| 3802 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 3803 | * |
| 3804 | * Pulled from: |
| 3805 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 3806 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3807 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3808 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3809 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3810 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 3811 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3812 | |
| 3813 | optional int64 rx_bytes = 3; |
| 3814 | |
| 3815 | optional int64 rx_packets = 4; |
| 3816 | |
| 3817 | optional int64 tx_bytes = 5; |
| 3818 | |
| 3819 | optional int64 tx_packets = 6; |
| 3820 | } |
| 3821 | |
| 3822 | /** |
| 3823 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 3824 | * |
| 3825 | * Pulled from: |
| 3826 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 3827 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3828 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3829 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3830 | |
| 3831 | optional int64 rx_bytes = 2; |
| 3832 | |
| 3833 | optional int64 rx_packets = 3; |
| 3834 | |
| 3835 | optional int64 tx_bytes = 4; |
| 3836 | |
| 3837 | optional int64 tx_packets = 5; |
| 3838 | } |
| 3839 | |
| 3840 | /** |
| 3841 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 3842 | * |
| 3843 | * Pulled from: |
| 3844 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 3845 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3846 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3847 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3848 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3849 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 3850 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3851 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3852 | |
| 3853 | optional int64 rx_bytes = 3; |
| 3854 | |
| 3855 | optional int64 rx_packets = 4; |
| 3856 | |
| 3857 | optional int64 tx_bytes = 5; |
| 3858 | |
| 3859 | optional int64 tx_packets = 6; |
| 3860 | } |
| 3861 | |
| 3862 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3863 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 3864 | * |
| 3865 | * Pulled from: |
| 3866 | * StatsCompanionService |
| 3867 | */ |
| 3868 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3869 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3870 | |
| 3871 | optional int64 rx_bytes = 2; |
| 3872 | |
| 3873 | optional int64 tx_bytes = 3; |
| 3874 | } |
| 3875 | |
| 3876 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3877 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 3878 | * android/internal/os/KernelWakelockStats.java |
| 3879 | * |
| 3880 | * Pulled from: |
| 3881 | * StatsCompanionService using KernelWakelockReader. |
| 3882 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3883 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3884 | optional string name = 1; |
| 3885 | |
| 3886 | optional int32 count = 2; |
| 3887 | |
| 3888 | optional int32 version = 3; |
| 3889 | |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3890 | optional int64 time_micros = 4; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3891 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3892 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3893 | /** |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 3894 | * Pulls low power state information. If power.stats HAL is not available, this |
| 3895 | * includes platform and subsystem sleep state information, |
| 3896 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState |
| 3897 | * as defined in: |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3898 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3899 | * hardware/interfaces/power/1.1/types.hal |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 3900 | * If power.stats HAL is available, this includes PowerEntityStateResidencyResult |
| 3901 | * as defined in: |
| 3902 | * hardware/interfaces/power/stats/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3903 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3904 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3905 | // Subsystem name |
| 3906 | optional string subsystem_name = 1; |
| 3907 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 3908 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 3909 | // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the |
| 3910 | // powerEntityStateName from the corresponding PowerEntityStateInfo. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3911 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 3912 | // 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] | 3913 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 3914 | // 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] | 3915 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 3916 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3917 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3918 | /** |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 3919 | * Pulls on-device power measurement information. |
| 3920 | * Data defined by hardware/interfaces/power/stats/1.0/types.hal. |
| 3921 | * Pulled from: |
| 3922 | * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp |
| 3923 | */ |
| 3924 | message OnDevicePowerMeasurement { |
| 3925 | // Name of the subsystem (to which the rail belongs). |
| 3926 | optional string subsystem_name = 1; |
| 3927 | |
| 3928 | // Rail name. The rail lies within the subsystem. |
| 3929 | optional string rail_name = 2; |
| 3930 | |
| 3931 | // Time (in ms since boot) at which the rail energy value was measured. |
| 3932 | // This may differ slightly from the time that statsd logs this information. |
| 3933 | optional uint64 measurement_timestamp_millis = 3; |
| 3934 | |
| 3935 | // Accumulated energy used via the rail since device boot in uWs. |
| 3936 | optional uint64 energy_microwatt_secs = 4; |
| 3937 | } |
| 3938 | |
| 3939 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3940 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 3941 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 3942 | * starts from highest to lowest. The value should be monotonically |
| 3943 | * increasing since boot. However, if there is a cpu |
| 3944 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3945 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3946 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3947 | optional uint32 cluster = 1; |
| 3948 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3949 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3950 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3951 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3952 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3953 | * Pulls Cpu Time Per Uid. |
| 3954 | * Note that isolated process uid time should be attributed to host uids. |
| 3955 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3956 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3957 | optional int32 uid = 1 [(is_uid) = true]; |
Misha Wagner | 6bc6c91 | 2018-11-16 13:19:54 +0000 | [diff] [blame] | 3958 | optional uint64 user_time_micros = 2; |
| 3959 | optional uint64 sys_time_micros = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3960 | } |
| 3961 | |
| 3962 | /** |
| 3963 | * Pulls Cpu Time Per Uid per frequency. |
| 3964 | * Note that isolated process uid time should be attributed to host uids. |
| 3965 | * For each uid, we order the time by descending frequencies. |
| 3966 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3967 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3968 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 3969 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3970 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3971 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 3972 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3973 | /** |
| 3974 | * Pulls Wifi Controller Activity Energy Info |
| 3975 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3976 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3977 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3978 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3979 | // stack reported state |
| 3980 | // TODO: replace this with proto enum |
| 3981 | optional int32 stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3982 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3983 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3984 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3985 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3986 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3987 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3988 | // product of current(mA), voltage(V) and time(ms) |
| 3989 | optional uint64 controller_energy_used = 6; |
| 3990 | } |
| 3991 | |
| 3992 | /** |
| 3993 | * Pulls Modem Activity Energy Info |
| 3994 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3995 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3996 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3997 | optional uint64 timestamp_millis = 1; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3998 | // sleep time in millis. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3999 | optional uint64 sleep_time_millis = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4000 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4001 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4002 | /** |
| 4003 | * Tx power index |
| 4004 | * index 0 = tx_power < 0dBm |
| 4005 | * index 1 = 0dBm < tx_power < 5dBm |
| 4006 | * index 2 = 5dBm < tx_power < 15dBm |
| 4007 | * index 3 = 15dBm < tx_power < 20dBm |
| 4008 | * index 4 = tx_power > 20dBm |
| 4009 | */ |
| 4010 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4011 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4012 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4013 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4014 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4015 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4016 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4017 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4018 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4019 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4020 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4021 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4022 | // product of current(mA), voltage(V) and time(ms) |
Chen Xu | 7322e4a | 2019-09-07 15:51:22 -0700 | [diff] [blame] | 4023 | optional uint64 energy_used = 10 [deprecated=true]; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 4024 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 4025 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4026 | /** |
| 4027 | * Pulls Bluetooth Activity Energy Info |
| 4028 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 4029 | */ |
| 4030 | message BluetoothActivityInfo { |
| 4031 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4032 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4033 | // bluetooth stack state |
| 4034 | optional int32 bluetooth_stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4035 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4036 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4037 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4038 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4039 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4040 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4041 | // product of current(mA), voltage(V) and time(ms) |
| 4042 | optional uint64 energy_used = 6; |
| 4043 | } |
| 4044 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 4045 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4046 | * Logs the memory stats for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4047 | * |
| 4048 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4049 | */ |
| 4050 | message ProcessMemoryState { |
| 4051 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4052 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4053 | |
| 4054 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4055 | // Usually package name, "system" for system server. |
| 4056 | // Provided by ActivityManagerService. |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4057 | optional string process_name = 2; |
| 4058 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4059 | // Current OOM score adjustment. Value read from ProcessRecord. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4060 | optional int32 oom_adj_score = 3; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4061 | |
| 4062 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4063 | optional int64 page_fault = 4; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4064 | |
| 4065 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4066 | optional int64 page_major_fault = 5; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4067 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4068 | // RSS |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4069 | // Value is read from memory.stat, field total_rss if per-app memory |
| 4070 | // cgroups are enabled. Otherwise, value from /proc/pid/stat. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4071 | optional int64 rss_in_bytes = 6; |
| 4072 | |
| 4073 | // CACHE |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4074 | // Value is read from memory.stat, field total_cache if per-app memory |
| 4075 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4076 | optional int64 cache_in_bytes = 7; |
| 4077 | |
| 4078 | // SWAP |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4079 | // 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] | 4080 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4081 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | aaf6089 | 2018-09-12 13:04:30 +0100 | [diff] [blame] | 4082 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4083 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4084 | optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; |
Rafal Slawik | 272a816 | 2018-11-01 15:12:28 +0000 | [diff] [blame] | 4085 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4086 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 4087 | optional int64 start_time_nanos = 10 [deprecated = true]; |
Ioannis Ilkos | 466ad6c | 2019-06-18 17:42:00 +0100 | [diff] [blame] | 4088 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4089 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 4090 | optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true]; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 4091 | } |
| 4092 | |
| 4093 | /* |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4094 | * Logs the memory high-water mark for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4095 | * |
| 4096 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) |
| 4097 | * and for selected native processes. |
Rafal Slawik | 44b8814 | 2018-12-15 16:48:09 +0000 | [diff] [blame] | 4098 | * |
| 4099 | * Pulling this atom resets high-water mark counters for all processes. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4100 | */ |
| 4101 | message ProcessMemoryHighWaterMark { |
| 4102 | // The uid if available. -1 means not available. |
| 4103 | optional int32 uid = 1 [(is_uid) = true]; |
| 4104 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4105 | // The process name. |
| 4106 | // Usually package name or process cmdline. |
| 4107 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4108 | optional string process_name = 2; |
| 4109 | |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 4110 | // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is |
| 4111 | // computed by converting kilobytes to bytes. |
| 4112 | optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true]; |
| 4113 | |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4114 | // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in |
| 4115 | // /proc/PID/status. |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 4116 | optional int32 rss_high_water_mark_in_kilobytes = 4; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4117 | } |
| 4118 | |
| 4119 | /* |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 4120 | * Logs the memory stats for a process. |
| 4121 | * |
| 4122 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService) |
| 4123 | * and for selected native processes. |
| 4124 | */ |
| 4125 | message ProcessMemorySnapshot { |
| 4126 | // The uid if available. -1 means not available. |
| 4127 | optional int32 uid = 1 [(is_uid) = true]; |
| 4128 | |
| 4129 | // The process name. |
| 4130 | // Usually package name or process cmdline. |
| 4131 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
| 4132 | optional string process_name = 2; |
| 4133 | |
| 4134 | // The pid of the process. |
| 4135 | // Allows to disambiguate instances of the process. |
| 4136 | optional int32 pid = 3; |
| 4137 | |
| 4138 | // The current OOM score adjustment value. |
| 4139 | // Read from ProcessRecord for managed processes. |
| 4140 | // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones. |
| 4141 | optional int32 oom_score_adj = 4; |
| 4142 | |
| 4143 | // The current RSS of the process. |
| 4144 | // VmRSS from /proc/pid/status. |
| 4145 | optional int32 rss_in_kilobytes = 5; |
| 4146 | |
| 4147 | // The current anon RSS of the process. |
| 4148 | // RssAnon from /proc/pid/status. |
| 4149 | optional int32 anon_rss_in_kilobytes = 6; |
| 4150 | |
| 4151 | // The current swap size of the process. |
| 4152 | // VmSwap from /proc/pid/status. |
| 4153 | optional int32 swap_in_kilobytes = 7; |
| 4154 | |
| 4155 | // The sum of rss_in_kilobytes and swap_in_kilobytes. |
| 4156 | optional int32 anon_rss_and_swap_in_kilobytes = 8; |
| 4157 | } |
| 4158 | |
| 4159 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4160 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4161 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4162 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4163 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4164 | } |
| 4165 | |
| 4166 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4167 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4168 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4169 | message SystemUptime { |
| 4170 | // Milliseconds since the system was booted. |
| 4171 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 4172 | // for external input). |
| 4173 | // 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] | 4174 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4175 | } |
| 4176 | |
| 4177 | /* |
| 4178 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 4179 | * active: X (X is # cores) |
| 4180 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 4181 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 4182 | * ... |
| 4183 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 4184 | * The file contains a monotonically increasing count of time for a single boot. |
| 4185 | */ |
| 4186 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4187 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4188 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4189 | } |
| 4190 | |
| 4191 | /** |
| 4192 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 4193 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 4194 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4195 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4196 | * ... |
| 4197 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 4198 | * The file contains a monotonically increasing count of time for a single boot. |
| 4199 | */ |
| 4200 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4201 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4202 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4203 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 4204 | } |
| 4205 | |
| 4206 | /* |
| 4207 | * Pulls free disk space, for data, system partition and temporary directory. |
| 4208 | */ |
| 4209 | message DiskSpace { |
| 4210 | // available bytes in data partition |
| 4211 | optional uint64 data_available_bytes = 1; |
| 4212 | // available bytes in system partition |
| 4213 | optional uint64 system_available_bytes = 2; |
| 4214 | // available bytes in download cache or temp directories |
| 4215 | optional uint64 temp_available_bytes = 3; |
| 4216 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4217 | |
| 4218 | /** |
| 4219 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 9876a3b | 2019-01-11 14:28:35 -0800 | [diff] [blame] | 4220 | * |
| 4221 | * Pulled from StatsCompanionService.java |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4222 | */ |
| 4223 | message RemainingBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4224 | optional int32 charge_micro_ampere_hour = 1; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4225 | } |
| 4226 | |
| 4227 | /** |
| 4228 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4229 | * Pulled from: |
| 4230 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4231 | */ |
| 4232 | message FullBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4233 | optional int32 capacity_micro_ampere_hour = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4234 | } |
| 4235 | |
| 4236 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4237 | * Pulls battery voltage. |
| 4238 | * Pulled from: |
| 4239 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4240 | */ |
| 4241 | message BatteryVoltage { |
| 4242 | // The voltage of the battery, in millivolts. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4243 | optional int32 voltage_millivolt = 1; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4244 | } |
| 4245 | |
| 4246 | /** |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 4247 | * Pulls battery level (percent full, from 0 to 100). |
| 4248 | * |
| 4249 | * Pulled from: |
| 4250 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4251 | */ |
| 4252 | message BatteryLevel { |
| 4253 | // Battery level. Should be in [0, 100]. |
| 4254 | optional int32 battery_level = 1; |
| 4255 | } |
| 4256 | |
| 4257 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4258 | * Pulls the temperature of various parts of the device. |
| 4259 | * 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] | 4260 | * |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4261 | * Pulled from StatsCompanionService.java |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4262 | */ |
| 4263 | message Temperature { |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4264 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4265 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 4266 | |
| 4267 | // The name of the temperature source. Eg. CPU0 |
| 4268 | optional string sensor_name = 2; |
| 4269 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4270 | // Temperature in tenths of a degree C. |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4271 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4272 | optional int32 temperature_deci_celsius = 3; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4273 | |
| 4274 | // Relative severity of the throttling, see enum definition. |
| 4275 | optional android.os.ThrottlingSeverityEnum severity = 4; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 4276 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4277 | |
| 4278 | /** |
| 4279 | * Pulls the statistics of calls to Binder. |
| 4280 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 4281 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4282 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4283 | * |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4284 | * Next tag: 15 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4285 | */ |
| 4286 | message BinderCalls { |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4287 | // UID of the process responsible for the binder transaction. It will be set if the process |
| 4288 | // executing the binder transaction attribute the transaction to another uid using |
| 4289 | // Binder.setThreadWorkSource(). |
| 4290 | // |
| 4291 | // If not set, the value will be -1. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4292 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4293 | // UID of the process executing the binder transaction. |
| 4294 | optional int32 direct_caller_uid = 14; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4295 | // Fully qualified class name of the API call. |
| 4296 | // |
| 4297 | // This is a system server class name. |
| 4298 | // |
| 4299 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 4300 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 4301 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 4302 | // commonly used APIs. |
| 4303 | optional string service_class_name = 2; |
| 4304 | // Method name of the API call. It can also be a transaction code if we cannot |
| 4305 | // resolve it to a name. See Binder#getTransactionName. |
| 4306 | // |
| 4307 | // This is a system server method name. |
| 4308 | optional string service_method_name = 3; |
| 4309 | // Total number of API calls. |
| 4310 | optional int64 call_count = 4; |
| 4311 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 4312 | optional bool screen_interactive = 13; |
| 4313 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 4314 | // call_count will be equal to recorded_call_count. |
| 4315 | // |
| 4316 | // If recorded_call_count is different than call_count, it means data collection has been |
| 4317 | // sampled. All the fields below will be sampled in this case. |
| 4318 | optional int64 recorded_call_count = 12; |
| 4319 | // Number of exceptions thrown by the API. |
| 4320 | optional int64 recorded_exception_count = 5; |
| 4321 | // Total latency of all API calls. |
| 4322 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 4323 | optional int64 recorded_total_latency_micros = 6; |
| 4324 | // Maximum latency of one API call. |
| 4325 | optional int64 recorded_max_latency_micros = 7; |
| 4326 | // Total CPU usage of all API calls. |
| 4327 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 4328 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 4329 | optional int64 recorded_total_cpu_micros = 8; |
| 4330 | // Maximum CPU usage of one API call. |
| 4331 | optional int64 recorded_max_cpu_micros = 9; |
| 4332 | // Maximum parcel reply size of one API call. |
| 4333 | optional int64 recorded_max_reply_size_bytes = 10; |
| 4334 | // Maximum parcel request size of one API call. |
| 4335 | optional int64 recorded_max_request_size_bytes = 11; |
| 4336 | } |
| 4337 | |
| 4338 | /** |
| 4339 | * Pulls the statistics of exceptions during calls to Binder. |
| 4340 | * |
| 4341 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 4342 | * > adb shell dumpsys binder_calls_stats --reset |
| 4343 | */ |
| 4344 | message BinderCallsExceptions { |
| 4345 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 4346 | // |
| 4347 | // This is an exception class name thrown by the system server. |
| 4348 | optional string exception_class_name = 1; |
| 4349 | // Total number of exceptions. |
| 4350 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4351 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4352 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4353 | /** |
| 4354 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 4355 | * |
| 4356 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4357 | * config on the device. |
| 4358 | * |
| 4359 | * Next tag: 11 |
| 4360 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4361 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 4362 | // 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] | 4363 | optional int32 uid = 1 [(is_uid) = true]; |
| 4364 | |
| 4365 | // Fully qualified class name of the handler target class. |
| 4366 | // |
| 4367 | // This field does not contain PII. This is a system server class name. |
| 4368 | optional string handler_class_name = 2; |
| 4369 | |
| 4370 | // The name of the thread that runs the Looper. |
| 4371 | // |
| 4372 | // This field does not contain PII. This is a system server thread name. |
| 4373 | optional string looper_thread_name = 3; |
| 4374 | |
| 4375 | // The name of the dispatched message. |
| 4376 | // |
| 4377 | // This field does not contain PII. This is a system server constant or class |
| 4378 | // name. |
| 4379 | optional string message_name = 4; |
| 4380 | |
| 4381 | // Total number of successfully dispatched messages. |
| 4382 | optional int64 message_count = 5; |
| 4383 | |
| 4384 | // Total number of messages that failed dispatching. |
| 4385 | optional int64 exception_count = 6; |
| 4386 | |
| 4387 | // Total number of processed messages we have data recorded for. If we |
| 4388 | // collected data for all the messages, message_count will be equal to |
| 4389 | // recorded_message_count. |
| 4390 | // |
| 4391 | // If recorded_message_count is different than message_count, it means data |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 4392 | // 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] | 4393 | optional int64 recorded_message_count = 7; |
| 4394 | |
| 4395 | // Total latency of all processed messages. |
| 4396 | // Average can be computed using recorded_total_latency_micros / |
| 4397 | // recorded_message_count. |
| 4398 | optional int64 recorded_total_latency_micros = 8; |
| 4399 | |
| 4400 | // Total CPU usage of all processed message. |
| 4401 | // Average can be computed using recorded_total_cpu_micros / |
| 4402 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4403 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4404 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4405 | |
| 4406 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 4407 | optional bool screen_interactive = 10; |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 4408 | |
| 4409 | // Max recorded CPU usage of all processed messages. |
| 4410 | optional int64 recorded_max_cpu_micros = 11; |
| 4411 | |
| 4412 | // Max recorded latency of all processed messages. |
| 4413 | optional int64 recorded_max_latency_micros = 12; |
| 4414 | |
| 4415 | // Total number of messages we tracked the dispatching delay for. If we |
| 4416 | // collected data for all the messages, message_count will be equal to |
| 4417 | // recorded_delay_message_count. |
| 4418 | // |
| 4419 | // If recorded_delay_message_count is different than message_count, it means data |
| 4420 | // collection has been sampled or/and not all messages specified the target dispatch time. |
| 4421 | // The fields below will be sampled in this case. |
| 4422 | optional int64 recorded_delay_message_count = 13; |
| 4423 | |
| 4424 | // Total dispatching delay of all processed messages. |
| 4425 | // Calculated as a difference between the target dispatching time (Message.when) |
| 4426 | // and the actual dispatching time. |
| 4427 | // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. |
| 4428 | optional int64 recorded_total_delay_millis = 14; |
| 4429 | |
| 4430 | // Max dispatching delay of all processed messages. |
| 4431 | // Calculated as a difference between the target dispatching time (Message.when) |
| 4432 | // and the actual dispatching time. |
| 4433 | optional int64 recorded_max_delay_millis = 15; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4434 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 4435 | |
| 4436 | /** |
| 4437 | * Pulls disk information, such as write speed and latency. |
| 4438 | */ |
| 4439 | message DiskStats { |
| 4440 | // Time taken to open, write 512B to, and close a file. |
| 4441 | // -1 if error performing the check. |
| 4442 | optional int64 data_write_latency_millis = 1; |
| 4443 | |
| 4444 | optional bool file_based_encryption = 2; |
| 4445 | |
| 4446 | // Recent disk write speed in kB/s. |
| 4447 | // -1 if error querying storageed. |
| 4448 | // 0 if data is unavailable. |
| 4449 | optional int32 recent_disk_write_speed = 3; |
| 4450 | } |
| 4451 | |
| 4452 | |
| 4453 | /** |
| 4454 | * Free and total bytes of the Data, Cache, and System partition. |
| 4455 | */ |
| 4456 | message DirectoryUsage { |
| 4457 | enum Directory { |
| 4458 | UNKNOWN = 0; |
| 4459 | DATA = 1; |
| 4460 | CACHE = 2; |
| 4461 | SYSTEM = 3; |
| 4462 | } |
| 4463 | optional Directory directory = 1; |
| 4464 | optional int64 free_bytes = 2; |
| 4465 | optional int64 total_bytes = 3; |
| 4466 | } |
| 4467 | |
| 4468 | |
| 4469 | /** |
| 4470 | * Size of an application: apk size, data size, and cache size. |
| 4471 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 4472 | * Information is only reported for apps with the primary user (user 0). |
| 4473 | * Sizes are aggregated by package name. |
| 4474 | */ |
| 4475 | message AppSize { |
| 4476 | // Including uids will involve modifying diskstats logic. |
| 4477 | optional string package_name = 1; |
| 4478 | // App size in bytes. -1 if unavailable. |
| 4479 | optional int64 app_size_bytes = 2; |
| 4480 | // App data size in bytes. -1 if unavailable. |
| 4481 | optional int64 app_data_size_bytes = 3; |
| 4482 | // App cache size in bytes. -1 if unavailable. |
| 4483 | optional int64 app_cache_size_bytes = 4; |
| 4484 | // Time that the cache file was produced. |
| 4485 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 4486 | optional int64 cache_time_millis = 5; |
| 4487 | } |
| 4488 | |
| 4489 | |
| 4490 | /** |
| 4491 | * Size of a particular category. Eg: photos, videos. |
| 4492 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 4493 | */ |
| 4494 | message CategorySize { |
| 4495 | enum Category { |
| 4496 | UNKNOWN = 0; |
| 4497 | APP_SIZE = 1; |
| 4498 | APP_DATA_SIZE = 2; |
| 4499 | APP_CACHE_SIZE = 3; |
| 4500 | PHOTOS = 4; |
| 4501 | VIDEOS = 5; |
| 4502 | AUDIO = 6; |
| 4503 | DOWNLOADS = 7; |
| 4504 | SYSTEM = 8; |
| 4505 | OTHER = 9; |
| 4506 | } |
| 4507 | optional Category category = 1; |
| 4508 | // Category size in bytes. |
| 4509 | optional int64 size_bytes = 2; |
| 4510 | // Time that the cache file was produced. |
| 4511 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 4512 | optional int64 cache_time_millis = 3; |
| 4513 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4514 | |
| 4515 | /** |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 4516 | * Pulls per uid I/O stats. The stats are cumulative since boot. |
| 4517 | * |
| 4518 | * Read/write bytes are I/O events from a storage device |
| 4519 | * Read/write chars are data requested by read/write syscalls, and can be |
| 4520 | * satisfied by caching. |
| 4521 | * |
| 4522 | * Pulled from StatsCompanionService, which reads proc/uid_io/stats. |
| 4523 | */ |
| 4524 | message DiskIo { |
| 4525 | optional int32 uid = 1 [(is_uid) = true]; |
| 4526 | optional int64 fg_chars_read = 2; |
| 4527 | optional int64 fg_chars_write = 3; |
| 4528 | optional int64 fg_bytes_read = 4; |
| 4529 | optional int64 fg_bytes_write = 5; |
| 4530 | optional int64 bg_chars_read = 6; |
| 4531 | optional int64 bg_chars_write = 7; |
| 4532 | optional int64 bg_bytes_read = 8; |
| 4533 | optional int64 bg_bytes_write = 9; |
| 4534 | optional int64 fg_fsync = 10; |
| 4535 | optional int64 bg_fsync= 11; |
| 4536 | } |
| 4537 | |
| 4538 | |
| 4539 | /** |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4540 | * Pulls the number of fingerprints for each user. |
| 4541 | * |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4542 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4543 | */ |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 4544 | message NumFingerprintsEnrolled { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4545 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 4546 | // Defined in android/os/UserHandle.java |
| 4547 | optional int32 user = 1; |
| 4548 | // Number of fingerprints registered to that user. |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 4549 | optional int32 num_fingerprints_enrolled = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4550 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4551 | |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 4552 | /** |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 4553 | * Pulls the number of faces for each user. |
| 4554 | * |
| 4555 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
| 4556 | */ |
| 4557 | message NumFacesEnrolled { |
| 4558 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 4559 | // Defined in android/os/UserHandle.java |
| 4560 | optional int32 user = 1; |
| 4561 | // Number of faces registered to that user. |
| 4562 | optional int32 num_faces_enrolled = 2; |
| 4563 | } |
| 4564 | /** |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 4565 | * A mapping of role holder -> role |
| 4566 | */ |
| 4567 | message RoleHolder { |
| 4568 | // uid of the role holder |
| 4569 | optional int32 uid = 1 [(is_uid) = true]; |
| 4570 | |
| 4571 | // package name of the role holder |
| 4572 | optional string package_name = 2; |
| 4573 | |
| 4574 | // the role held |
| 4575 | optional string role = 3; |
| 4576 | } |
| 4577 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4578 | message AggStats { |
| 4579 | optional int64 min = 1; |
| 4580 | |
| 4581 | optional int64 average = 2; |
| 4582 | |
| 4583 | optional int64 max = 3; |
| 4584 | } |
| 4585 | |
| 4586 | message ProcessStatsStateProto { |
| 4587 | optional android.service.procstats.ScreenState screen_state = 1; |
| 4588 | |
| 4589 | optional android.service.procstats.MemoryState memory_state = 2; |
| 4590 | |
| 4591 | // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java |
| 4592 | // and not frameworks/base/core/java/android/app/ActivityManager.java |
| 4593 | optional android.service.procstats.ProcessState process_state = 3; |
| 4594 | |
| 4595 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4596 | optional int64 duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4597 | |
| 4598 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4599 | optional int64 realtime_duration_millis = 9; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4600 | |
| 4601 | // # of samples taken |
| 4602 | optional int32 sample_size = 5; |
| 4603 | |
| 4604 | // PSS is memory reserved for this process |
| 4605 | optional AggStats pss = 6; |
| 4606 | |
| 4607 | // USS is memory shared between processes, divided evenly for accounting |
| 4608 | optional AggStats uss = 7; |
| 4609 | |
| 4610 | // RSS is memory resident for this process |
| 4611 | optional AggStats rss = 8; |
| 4612 | } |
| 4613 | |
| 4614 | // Next Tag: 7 |
| 4615 | message ProcessStatsProto { |
| 4616 | // Name of process. |
| 4617 | optional string process = 1; |
| 4618 | |
| 4619 | // Uid of the process. |
| 4620 | optional int32 uid = 2; |
| 4621 | |
| 4622 | // Information about how often kills occurred |
| 4623 | message Kill { |
| 4624 | // Count of excessive CPU kills |
| 4625 | optional int32 cpu = 1; |
| 4626 | |
| 4627 | // Count of kills when cached |
| 4628 | optional int32 cached = 2; |
| 4629 | |
| 4630 | // PSS stats during cached kill |
| 4631 | optional AggStats cached_pss = 3; |
| 4632 | } |
| 4633 | optional Kill kill = 3; |
| 4634 | |
| 4635 | // Time and memory spent in various states. |
| 4636 | repeated ProcessStatsStateProto states = 5; |
| 4637 | |
| 4638 | // Total time process has been running... screen_state, memory_state, and process_state |
| 4639 | // will not be set. |
| 4640 | optional ProcessStatsStateProto total_running_state = 6; |
| 4641 | } |
| 4642 | |
| 4643 | message PackageServiceOperationStatsProto { |
| 4644 | // Operate enum: Started, Foreground, Bound, Executing |
| 4645 | optional android.service.procstats.ServiceOperationState operation = 1; |
| 4646 | |
| 4647 | // Number of times the service was in this operation. |
| 4648 | optional int32 count = 2; |
| 4649 | |
| 4650 | // Information about a state the service can be in. |
| 4651 | message StateStats { |
| 4652 | // Screen state enum. |
| 4653 | optional android.service.procstats.ScreenState screen_state = 1; |
| 4654 | // Memory state enum. |
| 4655 | optional android.service.procstats.MemoryState memory_state = 2; |
| 4656 | |
| 4657 | // duration in milliseconds. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4658 | optional int64 duration_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4659 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4660 | optional int64 realtime_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4661 | } |
| 4662 | repeated StateStats state_stats = 3; |
| 4663 | } |
| 4664 | |
| 4665 | message PackageServiceStatsProto { |
| 4666 | // Name of service component. |
| 4667 | optional string service_name = 1; |
| 4668 | |
| 4669 | // The operation stats. |
| 4670 | // The package_name, package_uid, package_version, service_name will not be set to save space. |
| 4671 | repeated PackageServiceOperationStatsProto operation_stats = 2; |
| 4672 | } |
| 4673 | |
| 4674 | message PackageAssociationSourceProcessStatsProto { |
| 4675 | // Uid of the process. |
| 4676 | optional int32 process_uid = 1; |
| 4677 | // Process name. |
| 4678 | optional string process_name = 2; |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4679 | // Package name. |
| 4680 | optional string package_name = 7; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4681 | // Total count of the times this association appeared. |
| 4682 | optional int32 total_count = 3; |
| 4683 | |
| 4684 | // Millisecond uptime total duration this association was around. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4685 | optional int64 total_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4686 | |
| 4687 | // Total count of the times this association became actively impacting its target process. |
| 4688 | optional int32 active_count = 5; |
| 4689 | |
| 4690 | // Information on one source in this association. |
| 4691 | message StateStats { |
| 4692 | // Process state enum. |
| 4693 | optional android.service.procstats.ProcessState process_state = 1; |
| 4694 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4695 | optional int64 duration_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4696 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4697 | optional int64 realtime_duration_mmillis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4698 | } |
| 4699 | repeated StateStats active_state_stats = 6; |
| 4700 | } |
| 4701 | |
| 4702 | message PackageAssociationProcessStatsProto { |
| 4703 | // Name of the target component. |
| 4704 | optional string component_name = 1; |
| 4705 | // Information on one source in this association. |
| 4706 | repeated PackageAssociationSourceProcessStatsProto sources = 2; |
| 4707 | } |
| 4708 | |
| 4709 | |
| 4710 | message ProcessStatsPackageProto { |
| 4711 | // Name of package. |
| 4712 | optional string package = 1; |
| 4713 | |
| 4714 | // Uid of the package. |
| 4715 | optional int32 uid = 2; |
| 4716 | |
| 4717 | // Version of the package. |
| 4718 | optional int64 version = 3; |
| 4719 | |
| 4720 | // Stats for each process running with the package loaded in to it. |
| 4721 | repeated ProcessStatsProto process_stats = 4; |
| 4722 | |
| 4723 | // Stats for each of the package's services. |
| 4724 | repeated PackageServiceStatsProto service_stats = 5; |
| 4725 | |
| 4726 | // Stats for each association with the package. |
| 4727 | repeated PackageAssociationProcessStatsProto association_stats = 6; |
| 4728 | } |
| 4729 | |
| 4730 | message ProcessStatsSectionProto { |
| 4731 | // Elapsed realtime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4732 | optional int64 start_realtime_millis = 1; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4733 | |
| 4734 | // Elapsed realtime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4735 | optional int64 end_realtime_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4736 | |
| 4737 | // CPU uptime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4738 | optional int64 start_uptime_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4739 | |
| 4740 | // CPU uptime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4741 | optional int64 end_uptime_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4742 | |
| 4743 | // System runtime library. e.g. "libdvm.so", "libart.so". |
| 4744 | optional string runtime = 5; |
| 4745 | |
| 4746 | // whether kernel reports swapped pss. |
| 4747 | optional bool has_swapped_pss = 6; |
| 4748 | |
| 4749 | // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". |
| 4750 | enum Status { |
| 4751 | STATUS_UNKNOWN = 0; |
| 4752 | STATUS_COMPLETE = 1; |
| 4753 | STATUS_PARTIAL = 2; |
| 4754 | STATUS_SHUTDOWN = 3; |
| 4755 | STATUS_SYSPROPS = 4; |
| 4756 | } |
| 4757 | repeated Status status = 7; |
| 4758 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4759 | // Number of pages available of various types and sizes, representation fragmentation. |
| 4760 | repeated ProcessStatsAvailablePagesProto available_pages = 10; |
| 4761 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4762 | // Stats for each process. |
| 4763 | repeated ProcessStatsProto process_stats = 8; |
| 4764 | |
| 4765 | // Stats for each package. |
| 4766 | repeated ProcessStatsPackageProto package_stats = 9; |
| 4767 | } |
| 4768 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4769 | message ProcessStatsAvailablePagesProto { |
| 4770 | // Node these pages are in (as per /proc/pagetypeinfo) |
| 4771 | optional int32 node = 1; |
| 4772 | |
| 4773 | // Zone these pages are in (as per /proc/pagetypeinfo) |
| 4774 | optional string zone = 2; |
| 4775 | |
| 4776 | // Label for the type of these pages (as per /proc/pagetypeinfo) |
| 4777 | optional string label = 3; |
| 4778 | |
| 4779 | // Distribution of number of pages available by order size. First entry in array is |
| 4780 | // order 0, second is order 1, etc. Each order increase is a doubling of page size. |
| 4781 | repeated int32 pages_per_order = 4; |
| 4782 | } |
| 4783 | |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4784 | /** |
| 4785 | * Pulled from ProcessStatsService.java |
| 4786 | */ |
| 4787 | message ProcStats { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4788 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 4789 | } |
| 4790 | |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 4791 | /** |
| 4792 | * Pulled from ProcessStatsService.java |
| 4793 | */ |
| 4794 | message ProcStatsPkgProc { |
| 4795 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 4796 | } |
| 4797 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4798 | message PowerProfileProto { |
| 4799 | optional double cpu_suspend = 1; |
| 4800 | |
| 4801 | optional double cpu_idle = 2; |
| 4802 | |
| 4803 | optional double cpu_active = 3; |
| 4804 | |
| 4805 | message CpuCluster { |
| 4806 | optional int32 id = 1; |
| 4807 | optional double cluster_power = 2; |
| 4808 | optional int32 cores = 3; |
| 4809 | repeated int64 speed = 4; |
| 4810 | repeated double core_power = 5; |
| 4811 | } |
| 4812 | |
| 4813 | repeated CpuCluster cpu_cluster = 40; |
| 4814 | |
| 4815 | optional double wifi_scan = 4; |
| 4816 | |
| 4817 | optional double wifi_on = 5; |
| 4818 | |
| 4819 | optional double wifi_active = 6; |
| 4820 | |
| 4821 | optional double wifi_controller_idle = 7; |
| 4822 | |
| 4823 | optional double wifi_controller_rx = 8; |
| 4824 | |
| 4825 | optional double wifi_controller_tx = 9; |
| 4826 | |
| 4827 | repeated double wifi_controller_tx_levels = 10; |
| 4828 | |
| 4829 | optional double wifi_controller_operating_voltage = 11; |
| 4830 | |
| 4831 | optional double bluetooth_controller_idle = 12; |
| 4832 | |
| 4833 | optional double bluetooth_controller_rx = 13; |
| 4834 | |
| 4835 | optional double bluetooth_controller_tx = 14; |
| 4836 | |
| 4837 | optional double bluetooth_controller_operating_voltage = 15; |
| 4838 | |
| 4839 | optional double modem_controller_sleep = 16; |
| 4840 | |
| 4841 | optional double modem_controller_idle = 17; |
| 4842 | |
| 4843 | optional double modem_controller_rx = 18; |
| 4844 | |
| 4845 | repeated double modem_controller_tx = 19; |
| 4846 | |
| 4847 | optional double modem_controller_operating_voltage = 20; |
| 4848 | |
| 4849 | optional double gps_on = 21; |
| 4850 | |
| 4851 | repeated double gps_signal_quality_based = 22; |
| 4852 | |
| 4853 | optional double gps_operating_voltage = 23; |
| 4854 | |
| 4855 | optional double bluetooth_on = 24; |
| 4856 | |
| 4857 | optional double bluetooth_active = 25; |
| 4858 | |
| 4859 | optional double bluetooth_at_cmd = 26; |
| 4860 | |
| 4861 | optional double ambient_display = 27; |
| 4862 | |
| 4863 | optional double screen_on = 28; |
| 4864 | |
| 4865 | optional double radio_on = 29; |
| 4866 | |
| 4867 | optional double radio_scanning = 30; |
| 4868 | |
| 4869 | optional double radio_active = 31; |
| 4870 | |
| 4871 | optional double screen_full = 32; |
| 4872 | |
| 4873 | optional double audio = 33; |
| 4874 | |
| 4875 | optional double video = 34; |
| 4876 | |
| 4877 | optional double flashlight = 35; |
| 4878 | |
| 4879 | optional double memory = 36; |
| 4880 | |
| 4881 | optional double camera = 37; |
| 4882 | |
| 4883 | optional double wifi_batched_scan = 38; |
| 4884 | |
| 4885 | optional double battery_capacity = 39; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4886 | } |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 4887 | |
| 4888 | /** |
| 4889 | * power_profile.xml and other constants for power model calculations. |
| 4890 | * Pulled from PowerProfile.java |
| 4891 | */ |
| 4892 | message PowerProfile { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4893 | optional PowerProfileProto power_profile = 1; |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 4894 | } |
Chenjie Yu | b35b5f7 | 2018-10-13 23:25:11 -0700 | [diff] [blame] | 4895 | |
| 4896 | /** |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 4897 | * Logs when a user restriction was added or removed. |
| 4898 | * |
| 4899 | * Logged from: |
| 4900 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 4901 | */ |
| 4902 | message UserRestrictionChanged { |
| 4903 | // The raw string of the user restriction as defined in UserManager. |
| 4904 | // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. |
| 4905 | optional string restriction = 1; |
| 4906 | // Whether the restriction is enabled or disabled. |
| 4907 | optional bool enabled = 2; |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 4908 | } |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 4909 | |
| 4910 | /** |
| 4911 | * Pulls process user time and system time. Puller takes a snapshot of all pids |
| 4912 | * in the system and returns cpu stats for those that are working at the time. |
| 4913 | * Dead pids will be dropped. Kernel processes are excluded. |
| 4914 | * Min cool-down is 5 sec. |
| 4915 | */ |
| 4916 | message ProcessCpuTime { |
| 4917 | optional int32 uid = 1 [(is_uid) = true]; |
| 4918 | |
| 4919 | optional string process_name = 2; |
| 4920 | // Process cpu time in user space, cumulative from boot/process start |
| 4921 | optional int64 user_time_millis = 3; |
| 4922 | // Process cpu time in system space, cumulative from boot/process start |
| 4923 | optional int64 system_time_millis = 4; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 4924 | } |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4925 | |
| 4926 | /** |
| 4927 | * Pulls the CPU usage for each thread. |
| 4928 | * |
| 4929 | * Read from /proc/$PID/task/$TID/time_in_state files. |
| 4930 | * |
| 4931 | * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and |
| 4932 | * time_in_state files not being present on some phones, have not been addressed. These should be |
| 4933 | * considered before a public release. |
| 4934 | */ |
| 4935 | message CpuTimePerThreadFreq { |
| 4936 | // UID that owns the process. |
| 4937 | optional int32 uid = 1 [(is_uid) = true]; |
| 4938 | // ID of the process. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 4939 | optional int32 process_id = 2; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4940 | // ID of the thread. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 4941 | optional int32 thread_id = 3; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4942 | // Name of the process taken from `/proc/$PID/cmdline`. |
| 4943 | optional string process_name = 4; |
| 4944 | // Name of the thread taken from `/proc/$PID/task/$TID/comm` |
| 4945 | optional string thread_name = 5; |
Misha Wagner | fde6958 | 2018-11-28 13:26:32 +0000 | [diff] [blame] | 4946 | |
| 4947 | // Report eight different frequencies, and how much time is spent in each frequency. Frequencies |
| 4948 | // are given in KHz, and time is given in milliseconds since the thread started. All eight |
| 4949 | // frequencies are given here as the alternative is sending eight separate atoms. This method |
| 4950 | // significantly reduces the amount of data created |
| 4951 | optional int32 frequency1_khz = 6; |
| 4952 | optional int32 time1_millis = 7; |
| 4953 | optional int32 frequency2_khz = 8; |
| 4954 | optional int32 time2_millis = 9; |
| 4955 | optional int32 frequency3_khz = 10; |
| 4956 | optional int32 time3_millis = 11; |
| 4957 | optional int32 frequency4_khz = 12; |
| 4958 | optional int32 time4_millis = 13; |
| 4959 | optional int32 frequency5_khz = 14; |
| 4960 | optional int32 time5_millis = 15; |
| 4961 | optional int32 frequency6_khz = 16; |
| 4962 | optional int32 time6_millis = 17; |
| 4963 | optional int32 frequency7_khz = 18; |
| 4964 | optional int32 time7_millis = 19; |
| 4965 | optional int32 frequency8_khz = 20; |
| 4966 | optional int32 time8_millis = 21; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4967 | } |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 4968 | |
| 4969 | /** |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 4970 | * Pulls information about the device's build. |
| 4971 | */ |
| 4972 | message BuildInformation { |
| 4973 | // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. |
| 4974 | // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. |
| 4975 | optional string fingerprint = 1; |
| 4976 | |
| 4977 | // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. |
| 4978 | optional string brand = 2; |
| 4979 | |
| 4980 | // Build.PRODUCT. The name of the overall product. |
| 4981 | optional string product = 3; |
| 4982 | |
| 4983 | // Build.DEVICE. The name of the industrial design. |
| 4984 | optional string device = 4; |
| 4985 | |
| 4986 | // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". |
| 4987 | optional string version_release = 5; |
| 4988 | |
| 4989 | // Build.ID. E.g. a label like "M4-rc20". |
| 4990 | optional string id = 6; |
| 4991 | |
| 4992 | // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to |
| 4993 | // represent this build. |
| 4994 | optional string version_incremental = 7; |
| 4995 | |
| 4996 | // Build.TYPE. The type of build, like "user" or "eng". |
| 4997 | optional string type = 8; |
| 4998 | |
| 4999 | // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". |
| 5000 | optional string tags = 9; |
| 5001 | } |
| 5002 | |
| 5003 | /** |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 5004 | * Logs information about mismatched caller for content capture. |
| 5005 | * |
| 5006 | * Logged from: |
| 5007 | * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java |
| 5008 | */ |
| 5009 | message ContentCaptureCallerMismatchReported { |
| 5010 | optional string intended_package = 1; |
| 5011 | optional string calling_package = 2; |
| 5012 | } |
| 5013 | |
| 5014 | /** |
| 5015 | * Logs information about content capture service events. |
| 5016 | * |
| 5017 | * Logged from: |
| 5018 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5019 | */ |
| 5020 | message ContentCaptureServiceEvents { |
| 5021 | // The type of event. |
| 5022 | enum Event { |
| 5023 | UNKNOWN = 0; |
| 5024 | ON_CONNECTED = 1; |
| 5025 | ON_DISCONNECTED = 2; |
| 5026 | SET_WHITELIST = 3; |
| 5027 | SET_DISABLED = 4; |
| 5028 | ON_USER_DATA_REMOVED = 5; |
| 5029 | } |
| 5030 | optional Event event = 1; |
| 5031 | // component/package of content capture service. |
| 5032 | optional string service_info = 2; |
| 5033 | // component/package of target. |
| 5034 | // it's a concatenated list of component/package for SET_WHITELIST event |
| 5035 | // separated by " ". |
| 5036 | optional string target_info = 3; |
| 5037 | } |
| 5038 | |
| 5039 | /** |
| 5040 | * Logs information about content capture session events. |
| 5041 | * |
| 5042 | * Logged from: |
| 5043 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5044 | */ |
| 5045 | message ContentCaptureSessionEvents { |
| 5046 | // The type of event. |
| 5047 | enum Event { |
| 5048 | UNKNOWN = 0; |
| 5049 | ON_SESSION_STARTED = 1; |
| 5050 | ON_SESSION_FINISHED = 2; |
| 5051 | SESSION_NOT_CREATED = 3; |
| 5052 | } |
| 5053 | optional int32 session_id = 1; |
| 5054 | optional Event event = 2; |
| 5055 | // (n/a on session finished) |
| 5056 | optional int32 state_flags = 3; |
| 5057 | // component/package of content capture service. |
| 5058 | optional string service_info = 4; |
| 5059 | // component/package of app. |
| 5060 | // (n/a on session finished) |
| 5061 | optional string app_info = 5; |
| 5062 | optional bool is_child_session = 6; |
| 5063 | } |
| 5064 | |
| 5065 | /** |
| 5066 | * Logs information about session being flushed. |
| 5067 | * |
| 5068 | * Logged from: |
| 5069 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5070 | */ |
| 5071 | message ContentCaptureFlushed { |
| 5072 | optional int32 session_id = 1; |
| 5073 | // component/package of content capture service. |
| 5074 | optional string service_info = 2; |
| 5075 | // component/package of app. |
| 5076 | optional string app_info = 3; |
| 5077 | // session start/finish events |
| 5078 | optional int32 child_session_started = 4; |
| 5079 | optional int32 child_session_finished = 5; |
| 5080 | // count of view events. |
| 5081 | optional int32 view_appeared_count = 6; |
| 5082 | optional int32 view_disappeared_count = 7; |
| 5083 | optional int32 view_text_changed_count = 8; |
| 5084 | |
| 5085 | // Flush stats. |
| 5086 | optional int32 max_events = 9; |
| 5087 | optional int32 idle_flush_freq = 10; |
| 5088 | optional int32 text_flush_freq = 11; |
| 5089 | optional int32 flush_reason = 12; |
| 5090 | } |
| 5091 | |
| 5092 | /** |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5093 | * Pulls on-device BatteryStats power use calculations for the overall device. |
| 5094 | */ |
| 5095 | message DeviceCalculatedPowerUse { |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5096 | // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5097 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5098 | // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). |
| 5099 | optional int64 computed_power_nano_amp_secs = 1; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5100 | } |
| 5101 | |
| 5102 | /** |
| 5103 | * Pulls on-device BatteryStats power use calculations broken down by uid. |
| 5104 | * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use |
| 5105 | * that is attributed to non-uid items. They must all be included to get the total power use. |
| 5106 | */ |
| 5107 | message DeviceCalculatedPowerBlameUid { |
| 5108 | // Uid being blamed. Note: isolated uids have already been mapped to host uid. |
| 5109 | optional int32 uid = 1 [(is_uid) = true]; |
| 5110 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5111 | // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5112 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5113 | optional int64 power_nano_amp_secs = 2; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5114 | } |
| 5115 | |
| 5116 | /** |
| 5117 | * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by |
| 5118 | * drain type. |
| 5119 | * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that |
| 5120 | * is attributed uids. They must all be included to get the total power use. |
| 5121 | */ |
| 5122 | message DeviceCalculatedPowerBlameOther { |
| 5123 | // The type of item whose power use is being reported. |
| 5124 | enum DrainType { |
| 5125 | AMBIENT_DISPLAY = 0; |
| 5126 | // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. |
| 5127 | BLUETOOTH = 2; |
| 5128 | CAMERA = 3; |
| 5129 | // Cell-standby |
| 5130 | CELL = 4; |
| 5131 | FLASHLIGHT = 5; |
| 5132 | IDLE = 6; |
| 5133 | MEMORY = 7; |
| 5134 | // Amount that total computed drain exceeded the drain estimated using the |
| 5135 | // battery level changes and capacity. |
| 5136 | OVERCOUNTED = 8; |
| 5137 | PHONE = 9; |
| 5138 | SCREEN = 10; |
| 5139 | // Amount that total computed drain was below the drain estimated using the |
| 5140 | // battery level changes and capacity. |
| 5141 | UNACCOUNTED = 11; |
| 5142 | // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. |
| 5143 | WIFI = 13; |
| 5144 | } |
| 5145 | optional DrainType drain_type = 1; |
| 5146 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5147 | // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5148 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5149 | optional int64 power_nano_amp_secs = 2; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5150 | } |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 5151 | |
| 5152 | /** |
| 5153 | * Logs device policy features. |
| 5154 | * |
| 5155 | * Logged from: |
| 5156 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 5157 | * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ |
| 5158 | */ |
| 5159 | message DevicePolicyEvent { |
| 5160 | // The event id - unique for each event. |
| 5161 | optional android.stats.devicepolicy.EventId event_id = 1; |
| 5162 | // The admin package name. |
| 5163 | optional string admin_package_name = 2; |
| 5164 | // A generic integer parameter. |
| 5165 | optional int32 integer_value = 3; |
| 5166 | // A generic boolean parameter. |
| 5167 | optional bool boolean_value = 4; |
| 5168 | // A parameter specifying a time period in milliseconds. |
| 5169 | optional uint64 time_period_millis = 5; |
| 5170 | // A parameter specifying a list of package names, bundle extras or string parameters. |
| 5171 | optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; |
| 5172 | } |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 5173 | |
| 5174 | /** |
| 5175 | * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. |
| 5176 | * |
| 5177 | * Logged from: |
| 5178 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5179 | */ |
| 5180 | message DocsUILaunchReported { |
| 5181 | optional android.stats.docsui.LaunchAction launch_action = 1; |
| 5182 | optional bool has_initial_uri = 2; |
| 5183 | optional android.stats.docsui.MimeType mime_type = 3; |
| 5184 | optional android.stats.docsui.Root initial_root = 4; |
| 5185 | } |
| 5186 | |
| 5187 | /** |
| 5188 | * Logs root/app visited event in file managers/picker. Call this when the user |
| 5189 | * taps on root/app in hamburger menu. |
| 5190 | * |
| 5191 | * Logged from: |
| 5192 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5193 | */ |
| 5194 | message DocsUIRootVisitedReported { |
| 5195 | optional android.stats.docsui.ContextScope scope = 1; |
| 5196 | optional android.stats.docsui.Root root = 2; |
| 5197 | } |
| 5198 | |
| 5199 | /** |
| 5200 | * Logs file operation stats. Call this when a file operation has completed. |
| 5201 | * |
| 5202 | * Logged from: |
| 5203 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5204 | */ |
| 5205 | message DocsUIFileOperationReported { |
| 5206 | optional android.stats.docsui.Provider provider = 1; |
| 5207 | optional android.stats.docsui.FileOperation file_op = 2; |
| 5208 | } |
| 5209 | |
| 5210 | /** |
| 5211 | * Logs file operation stats. Call this when a copy/move operation has completed with a specific |
| 5212 | * mode. |
| 5213 | * |
| 5214 | * Logged from: |
| 5215 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5216 | */ |
| 5217 | message DocsUIFileOperationCopyMoveModeReported { |
| 5218 | optional android.stats.docsui.FileOperation file_op = 1; |
| 5219 | optional android.stats.docsui.CopyMoveOpMode mode = 2; |
| 5220 | } |
| 5221 | |
| 5222 | |
| 5223 | /** |
| 5224 | * Logs file sub operation stats. Call this when a file operation has failed. |
| 5225 | * |
| 5226 | * Logged from: |
| 5227 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5228 | */ |
| 5229 | message DocsUIFileOperationFailureReported { |
| 5230 | optional android.stats.docsui.Authority authority = 1; |
| 5231 | optional android.stats.docsui.SubFileOperation sub_op = 2; |
| 5232 | } |
| 5233 | |
| 5234 | /** |
| 5235 | * Logs the cancellation of a file operation. Call this when a job is canceled |
| 5236 | * |
| 5237 | * Logged from: |
| 5238 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5239 | */ |
| 5240 | message DocsUIFileOperationCanceledReported { |
| 5241 | optional android.stats.docsui.FileOperation file_op = 1; |
| 5242 | } |
| 5243 | |
| 5244 | /** |
| 5245 | * Logs startup time in milliseconds. |
| 5246 | * |
| 5247 | * Logged from: |
| 5248 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5249 | */ |
| 5250 | message DocsUIStartupMsReported { |
| 5251 | optional int32 startup_millis = 1; |
| 5252 | } |
| 5253 | |
| 5254 | /** |
| 5255 | * Logs the action that was started by user. |
| 5256 | * |
| 5257 | * Logged from: |
| 5258 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5259 | */ |
| 5260 | message DocsUIUserActionReported { |
| 5261 | optional android.stats.docsui.UserAction action = 1; |
| 5262 | } |
| 5263 | |
| 5264 | /** |
| 5265 | * Logs the invalid type when invalid scoped access is requested. |
| 5266 | * |
| 5267 | * Logged from: |
| 5268 | * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java |
| 5269 | */ |
| 5270 | message DocsUIInvalidScopedAccessRequestReported { |
| 5271 | optional android.stats.docsui.InvalidScopedAccess type = 1; |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5272 | } |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5273 | |
| 5274 | /** |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 5275 | * Logs the package name that launches docsui picker mode. |
| 5276 | * |
| 5277 | * Logged from: |
| 5278 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5279 | */ |
| 5280 | message DocsUIPickerLaunchedFromReported { |
| 5281 | optional string package_name = 1; |
| 5282 | } |
| 5283 | |
| 5284 | /** |
| 5285 | * Logs the search type. |
| 5286 | * |
| 5287 | * Logged from: |
| 5288 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5289 | */ |
| 5290 | message DocsUISearchTypeReported { |
| 5291 | optional android.stats.docsui.SearchType search_type = 1; |
| 5292 | } |
| 5293 | |
| 5294 | /** |
| 5295 | * Logs the search mode. |
| 5296 | * |
| 5297 | * Logged from: |
| 5298 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5299 | */ |
| 5300 | message DocsUISearchModeReported { |
| 5301 | optional android.stats.docsui.SearchMode search_mode = 1; |
| 5302 | } |
| 5303 | |
| 5304 | /** |
| 5305 | * Logs the pick result information. |
| 5306 | * |
| 5307 | * Logged from: |
| 5308 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5309 | */ |
| 5310 | message DocsUIPickResultReported { |
| 5311 | optional int32 total_action_count = 1; |
| 5312 | optional int64 duration_millis = 2; |
| 5313 | optional int32 file_count= 3; |
| 5314 | optional bool is_searching = 4; |
| 5315 | optional android.stats.docsui.Root picked_from = 5; |
| 5316 | optional android.stats.docsui.MimeType mime_type = 6; |
| 5317 | optional int32 repeatedly_pick_times = 7; |
| 5318 | } |
| 5319 | |
| 5320 | /** |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5321 | * Logs when an app's memory is compacted. |
| 5322 | * |
| 5323 | * Logged from: |
| 5324 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 5325 | */ |
| 5326 | message AppCompacted { |
| 5327 | // The pid of the process being compacted. |
| 5328 | optional int32 pid = 1; |
| 5329 | |
| 5330 | // The name of the process being compacted. |
| 5331 | optional string process_name = 2; |
| 5332 | |
| 5333 | // The type of compaction. |
| 5334 | enum Action { |
| 5335 | UNKNOWN = 0; |
| 5336 | SOME = 1; |
| 5337 | FULL = 2; |
Ben Murdoch | 35c1420 | 2019-04-09 11:00:53 +0100 | [diff] [blame] | 5338 | PERSISTENT = 3; |
| 5339 | BFGS = 4; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5340 | } |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5341 | optional Action action = 3; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5342 | |
| 5343 | // Total RSS in kilobytes consumed by the process prior to compaction. |
| 5344 | optional int64 before_rss_total_kilobytes = 4; |
| 5345 | |
| 5346 | // File RSS in kilobytes consumed by the process prior to compaction. |
| 5347 | optional int64 before_rss_file_kilobytes = 5; |
| 5348 | |
| 5349 | // Anonymous RSS in kilobytes consumed by the process prior to compaction. |
| 5350 | optional int64 before_rss_anon_kilobytes = 6; |
| 5351 | |
| 5352 | // Swap in kilobytes consumed by the process prior to compaction. |
| 5353 | optional int64 before_swap_kilobytes = 7; |
| 5354 | |
| 5355 | // Total RSS in kilobytes consumed by the process after compaction. |
| 5356 | optional int64 after_rss_total_kilobytes = 8; |
| 5357 | |
| 5358 | // File RSS in kilobytes consumed by the process after compaction. |
| 5359 | optional int64 after_rss_file_kilobytes = 9; |
| 5360 | |
| 5361 | // Anonymous RSS in kilobytes consumed by the process after compaction. |
| 5362 | optional int64 after_rss_anon_kilobytes = 10; |
| 5363 | |
| 5364 | // Swap in kilobytes consumed by the process after compaction. |
| 5365 | optional int64 after_swap_kilobytes = 11; |
| 5366 | |
| 5367 | // The time taken to perform compaction in milliseconds. |
| 5368 | optional int64 time_to_compact_millis = 12; |
| 5369 | |
| 5370 | // The last compaction action performed for this app. |
| 5371 | optional Action last_action = 13; |
| 5372 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5373 | // The last time that compaction was attempted on this process in milliseconds |
| 5374 | // since boot, not including sleep (see SystemClock.uptimeMillis()). |
| 5375 | optional int64 last_compact_timestamp_ms_since_boot = 14; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5376 | |
Ben Murdoch | 885c21b | 2019-03-15 18:02:04 +0000 | [diff] [blame] | 5377 | // 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] | 5378 | optional int32 oom_score_adj = 15; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5379 | |
| 5380 | // The process state at the time of compaction. |
| 5381 | optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; |
Ben Murdoch | fdc5593 | 2019-01-30 10:43:15 +0000 | [diff] [blame] | 5382 | |
| 5383 | // Free ZRAM in kilobytes before compaction. |
| 5384 | optional int64 before_zram_free_kilobytes = 17; |
| 5385 | |
| 5386 | // Free ZRAM in kilobytes after compaction. |
| 5387 | optional int64 after_zram_free_kilobytes = 18; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5388 | } |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5389 | |
| 5390 | /** |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5391 | * Logs a DNS lookup operation initiated by the system resolver on behalf of an application |
| 5392 | * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). |
| 5393 | * |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5394 | * The NetworkDnsEventReported message represents the entire lookup operation, which may |
| 5395 | * result one or more queries to the recursive DNS resolvers. Those are individually logged |
| 5396 | * in DnsQueryEvents to enable computing error rates and network latency and timeouts |
| 5397 | * broken up by query type, transport, network interface, etc. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5398 | */ |
| 5399 | message NetworkDnsEventReported { |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5400 | optional android.stats.dnsresolver.EventType event_type = 1; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5401 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5402 | optional android.stats.dnsresolver.ReturnCode return_code = 2; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5403 | |
| 5404 | // The latency in microseconds of the entire DNS lookup operation. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5405 | optional int32 latency_micros = 3; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5406 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5407 | // Only valid for event_type = EVENT_GETADDRINFO. |
| 5408 | optional int32 hints_ai_flags = 4; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5409 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5410 | // Flags passed to android_res_nsend() defined in multinetwork.h |
| 5411 | // Only valid for event_type = EVENT_RESNSEND. |
| 5412 | optional int32 res_nsend_flags = 5; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5413 | |
lifr | ad9becc | 2019-05-20 11:04:41 +0800 | [diff] [blame] | 5414 | optional android.stats.dnsresolver.NetworkType network_type = 6; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5415 | |
| 5416 | // The DNS over TLS mode on a specific netId. |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5417 | optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5418 | |
| 5419 | // Additional pass-through fields opaque to statsd. |
| 5420 | // 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] | 5421 | optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; |
lifr | 2b9fab7 | 2019-07-20 15:28:28 +0800 | [diff] [blame] | 5422 | |
| 5423 | // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom. |
| 5424 | optional int32 sampling_rate_denom = 9; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5425 | } |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 5426 | |
| 5427 | /** |
| 5428 | * Logs when a data stall event occurs. |
| 5429 | * |
| 5430 | * Log from: |
| 5431 | * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 5432 | */ |
| 5433 | message DataStallEvent { |
| 5434 | // Data stall evaluation type. |
| 5435 | // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 5436 | // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. |
| 5437 | optional int32 evaluation_type = 1; |
| 5438 | // See definition in data_stall_event.proto. |
| 5439 | optional com.android.server.connectivity.ProbeResult validation_result = 2; |
| 5440 | // See definition in data_stall_event.proto. |
| 5441 | optional android.net.NetworkCapabilitiesProto.Transport network_type = 3; |
| 5442 | // See definition in data_stall_event.proto. |
| 5443 | optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; |
| 5444 | // See definition in data_stall_event.proto. |
| 5445 | optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; |
| 5446 | // See definition in data_stall_event.proto. |
| 5447 | optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; |
| 5448 | } |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 5449 | |
| 5450 | /* |
| 5451 | * Logs when RescueParty resets some set of experiment flags. |
| 5452 | * |
| 5453 | * Logged from: |
| 5454 | * frameworks/base/services/core/java/com/android/server/RescueParty.java |
| 5455 | */ |
| 5456 | message RescuePartyResetReported { |
| 5457 | // The rescue level of this reset. A value of 0 indicates missing or unknown level information. |
| 5458 | optional int32 rescue_level = 1; |
| 5459 | } |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 5460 | |
| 5461 | /** |
| 5462 | * Logs when signed config is received from an APK, and if that config was applied successfully. |
| 5463 | * Logged from: |
| 5464 | * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java |
| 5465 | */ |
| 5466 | message SignedConfigReported { |
| 5467 | enum Type { |
| 5468 | UNKNOWN_TYPE = 0; |
| 5469 | GLOBAL_SETTINGS = 1; |
| 5470 | } |
| 5471 | optional Type type = 1; |
| 5472 | |
| 5473 | // The final status of the signed config received. |
| 5474 | enum Status { |
| 5475 | UNKNOWN_STATUS = 0; |
| 5476 | APPLIED = 1; |
| 5477 | BASE64_FAILURE_CONFIG = 2; |
| 5478 | BASE64_FAILURE_SIGNATURE = 3; |
| 5479 | SECURITY_EXCEPTION = 4; |
| 5480 | INVALID_CONFIG = 5; |
| 5481 | OLD_CONFIG = 6; |
| 5482 | SIGNATURE_CHECK_FAILED = 7; |
| 5483 | NOT_APPLICABLE = 8; |
Mathew Inwood | 610d096 | 2019-01-15 11:50:28 +0000 | [diff] [blame] | 5484 | SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 5485 | } |
| 5486 | optional Status status = 2; |
| 5487 | |
| 5488 | // The version of the signed config processed. |
| 5489 | optional int32 version = 3; |
| 5490 | |
| 5491 | // The package name that the config was extracted from. |
| 5492 | optional string from_package = 4; |
| 5493 | |
| 5494 | enum Key { |
| 5495 | NO_KEY = 0; |
| 5496 | DEBUG = 1; |
| 5497 | PRODUCTION = 2; |
| 5498 | } |
| 5499 | // Which key was used to verify the config. |
| 5500 | optional Key verified_with = 5; |
| 5501 | } |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5502 | |
| 5503 | /* |
| 5504 | * Logs GNSS Network-Initiated (NI) location events. |
| 5505 | * |
| 5506 | * Logged from: |
| 5507 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 5508 | */ |
| 5509 | message GnssNiEventReported { |
| 5510 | // The type of GnssNiEvent. |
| 5511 | enum EventType { |
| 5512 | UNKNOWN = 0; |
| 5513 | NI_REQUEST = 1; |
| 5514 | NI_RESPONSE = 2; |
| 5515 | } |
| 5516 | optional EventType event_type = 1; |
| 5517 | |
| 5518 | // An ID generated by HAL to associate NI notifications and UI responses. |
| 5519 | optional int32 notification_id = 2; |
| 5520 | |
| 5521 | // 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] | 5522 | optional android.server.location.GnssNiType ni_type = 3; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5523 | |
| 5524 | // NI requires notification. |
| 5525 | optional bool need_notify = 4; |
| 5526 | |
| 5527 | // NI requires verification. |
| 5528 | optional bool need_verify = 5; |
| 5529 | |
| 5530 | // NI requires privacy override, no notification/minimal trace. |
| 5531 | optional bool privacy_override = 6; |
| 5532 | |
| 5533 | // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in |
| 5534 | // seconds. |
| 5535 | optional int32 timeout = 7; |
| 5536 | |
| 5537 | // Default response when timeout. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5538 | optional android.server.location.GnssUserResponseType default_response = 8; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5539 | |
| 5540 | // String representing the requester of the network inititated location request. |
| 5541 | optional string requestor_id = 9; |
| 5542 | |
| 5543 | // Notification message text string representing the service(for eg. SUPL-service) who sent the |
| 5544 | // network initiated location request. |
| 5545 | optional string text = 10; |
| 5546 | |
| 5547 | // requestorId decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5548 | optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5549 | |
| 5550 | // Notification message text decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5551 | optional android.server.location.GnssNiEncodingType text_encoding = 12; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5552 | |
| 5553 | // True if SUPL ES is enabled. |
| 5554 | optional bool is_supl_es_enabled = 13; |
| 5555 | |
| 5556 | // True if GNSS location is enabled. |
| 5557 | optional bool is_location_enabled = 14; |
| 5558 | |
| 5559 | // GNSS NI responses which define the response in NI structures. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5560 | optional android.server.location.GnssUserResponseType user_response = 15; |
| 5561 | } |
| 5562 | |
| 5563 | /** |
| 5564 | * Logs GNSS non-framework (NFW) location notification. |
| 5565 | * |
| 5566 | * Logged from: |
| 5567 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 5568 | */ |
| 5569 | message GnssNfwNotificationReported { |
| 5570 | // Package name of the Android proxy application representing the non-framework entity that |
| 5571 | // requested location. Set to empty string if unknown. |
| 5572 | optional string proxy_app_package_name = 1; |
| 5573 | |
| 5574 | // Protocol stack that initiated the non-framework location request. |
| 5575 | optional android.server.location.NfwProtocolStack protocol_stack = 2; |
| 5576 | |
| 5577 | // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, |
| 5578 | // set to empty string. This field is opaque to the framework and used for logging purposes. |
| 5579 | optional string other_protocol_stack_name = 3; |
| 5580 | |
| 5581 | // Source initiating/receiving the location information. |
| 5582 | optional android.server.location.NfwRequestor requestor = 4; |
| 5583 | |
| 5584 | // Identity of the endpoint receiving the location information. For example, carrier name, OEM |
| 5585 | // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework |
| 5586 | // and used for logging purposes. |
| 5587 | optional string requestor_id = 5; |
| 5588 | |
| 5589 | // Indicates whether location information was provided for this request. |
| 5590 | optional android.server.location.NfwResponseType response_type = 6; |
| 5591 | |
| 5592 | // True if the device is in user initiated emergency session. |
| 5593 | optional bool in_emergency_mode = 7; |
| 5594 | |
| 5595 | // True if cached location is provided. |
| 5596 | optional bool is_cached_location = 8; |
| 5597 | |
| 5598 | // True if proxy app permission mismatch between framework and GNSS HAL. |
| 5599 | optional bool is_permission_mismatched = 9; |
| 5600 | } |
| 5601 | |
| 5602 | /** |
| 5603 | * Logs GNSS configuration as defined in IGnssConfiguration.hal. |
| 5604 | * |
| 5605 | * Logged from: |
| 5606 | * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java |
| 5607 | */ |
| 5608 | message GnssConfigurationReported { |
| 5609 | // SUPL host name. |
| 5610 | optional string supl_host = 1; |
| 5611 | |
| 5612 | // SUPL port number. |
| 5613 | optional int32 supl_port = 2; |
| 5614 | |
| 5615 | // C2K host name. |
| 5616 | optional string c2k_host = 3; |
| 5617 | |
| 5618 | // C2K port number. |
| 5619 | optional int32 c2k_port = 4; |
| 5620 | |
| 5621 | // The SUPL version requested by Carrier. |
| 5622 | optional int32 supl_ver = 5; |
| 5623 | |
| 5624 | // The SUPL mode. |
| 5625 | optional android.server.location.SuplMode supl_mode = 6; |
| 5626 | |
| 5627 | // True if NI emergency SUPL restrictions is enabled. |
| 5628 | optional bool supl_es = 7; |
| 5629 | |
| 5630 | // LTE Positioning Profile settings |
| 5631 | optional android.server.location.LppProfile lpp_profile = 8; |
| 5632 | |
| 5633 | // Positioning protocol on A-Glonass system. |
| 5634 | optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; |
| 5635 | |
| 5636 | // True if emergency PDN is used. Otherwise, regular PDN is used. |
| 5637 | optional bool use_emergency_pdn_for_emergency_supl= 10; |
| 5638 | |
| 5639 | // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. |
| 5640 | optional android.server.location.GpsLock gps_lock = 11; |
| 5641 | |
| 5642 | // Number of seconds to extend the emergency session duration post emergency call. |
| 5643 | optional int32 es_extension_sec = 12; |
| 5644 | |
| 5645 | // The full list of package names of proxy Android applications representing the non-framework |
| 5646 | // location access entities (on/off the device) for which the framework user has granted |
| 5647 | // non-framework location access permission. The package names are concatenated in one string |
| 5648 | // with spaces as separators. |
| 5649 | optional string enabled_proxy_app_package_name_list = 13; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5650 | } |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5651 | |
| 5652 | /** |
| 5653 | * Logs when a NFC device's error occurred. |
| 5654 | * Logged from: |
| 5655 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 5656 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java |
| 5657 | */ |
| 5658 | message NfcErrorOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5659 | enum Type { |
| 5660 | UNKNOWN = 0; |
| 5661 | CMD_TIMEOUT = 1; |
| 5662 | ERROR_NOTIFICATION = 2; |
| 5663 | AID_OVERFLOW = 3; |
| 5664 | } |
| 5665 | optional Type type = 1; |
| 5666 | // If it's nci cmd timeout, log the timeout command. |
| 5667 | optional uint32 nci_cmd = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5668 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5669 | optional uint32 error_ntf_status_code = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5670 | } |
| 5671 | |
| 5672 | /** |
| 5673 | * Logs when a NFC device's state changed event |
| 5674 | * Logged from: |
| 5675 | * packages/apps/Nfc/src/com/android/nfc/NfcService.java |
| 5676 | */ |
| 5677 | message NfcStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5678 | enum State { |
| 5679 | UNKNOWN = 0; |
| 5680 | OFF = 1; |
| 5681 | ON = 2; |
| 5682 | ON_LOCKED = 3; // Secure Nfc enabled. |
| 5683 | CRASH_RESTART = 4; // NfcService watchdog timeout restart. |
| 5684 | } |
| 5685 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5686 | } |
| 5687 | |
| 5688 | /** |
| 5689 | * Logs when a NFC Beam Transaction occurred. |
| 5690 | * Logged from: |
| 5691 | * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java |
| 5692 | */ |
| 5693 | message NfcBeamOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5694 | enum Operation { |
| 5695 | UNKNOWN = 0; |
| 5696 | SEND = 1; |
| 5697 | RECEIVE = 2; |
| 5698 | } |
| 5699 | optional Operation operation = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5700 | } |
| 5701 | |
| 5702 | /** |
| 5703 | * Logs when a NFC Card Emulation Transaction occurred. |
| 5704 | * Logged from: |
| 5705 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java |
| 5706 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java |
| 5707 | */ |
| 5708 | message NfcCardemulationOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5709 | enum Category { |
| 5710 | UNKNOWN = 0; |
| 5711 | HCE_PAYMENT = 1; |
| 5712 | HCE_OTHER = 2; |
| 5713 | OFFHOST = 3; |
| 5714 | } |
| 5715 | // Transaction belongs to HCE payment or HCE other category, or offhost. |
| 5716 | optional Category category = 1; |
| 5717 | // SeName from transaction: SIMx, eSEx, HCE, HCEF. |
| 5718 | optional string se_name = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5719 | } |
| 5720 | |
| 5721 | /** |
| 5722 | * Logs when a NFC Tag event occurred. |
| 5723 | * Logged from: |
| 5724 | * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java |
| 5725 | */ |
| 5726 | message NfcTagOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5727 | enum Type { |
| 5728 | UNKNOWN = 0; |
| 5729 | URL = 1; |
| 5730 | BT_PAIRING = 2; |
| 5731 | PROVISION = 3; |
| 5732 | WIFI_CONNECT = 4; |
| 5733 | APP_LAUNCH = 5; |
| 5734 | OTHERS = 6; |
| 5735 | } |
| 5736 | optional Type type = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5737 | } |
| 5738 | |
| 5739 | /** |
| 5740 | * Logs when Hce transaction triggered |
| 5741 | * Logged from: |
| 5742 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 5743 | */ |
| 5744 | message NfcHceTransactionOccurred { |
| 5745 | // The latency period(in microseconds) it took for the first HCE data |
| 5746 | // exchange. |
| 5747 | optional uint32 latency_micros = 1; |
| 5748 | } |
| 5749 | |
| 5750 | /** |
| 5751 | * Logs when SecureElement state event changed |
| 5752 | * Logged from: |
| 5753 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 5754 | */ |
| 5755 | message SeStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5756 | enum State { |
| 5757 | UNKNOWN = 0; |
| 5758 | INITIALIZED = 1; |
| 5759 | DISCONNECTED = 2; |
| 5760 | CONNECTED = 3; |
| 5761 | HALCRASH = 4; |
| 5762 | } |
| 5763 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5764 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5765 | optional string state_change_reason = 2; |
| 5766 | // SIMx or eSEx. |
| 5767 | optional string terminal = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5768 | } |
| 5769 | |
| 5770 | /** |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 5771 | * Information about a permission grant request |
| 5772 | */ |
| 5773 | message PermissionGrantRequestResultReported { |
| 5774 | // unique value identifying an API call. A API call might result in multiple of these atoms |
| 5775 | optional int64 request_id = 1; |
| 5776 | |
| 5777 | // UID of package requesting the permission grant |
| 5778 | optional int32 requesting_uid = 2 [(is_uid) = true]; |
| 5779 | |
| 5780 | // Name of package requesting the permission grant |
| 5781 | optional string requesting_package_name = 3; |
| 5782 | |
| 5783 | // The permission to be granted |
| 5784 | optional string permission_name = 4; |
| 5785 | |
| 5786 | // If the permission was explicitly requested via the API or added by the system |
| 5787 | optional bool is_implicit = 5; |
| 5788 | |
| 5789 | enum Result { |
| 5790 | UNDEFINED = 0; |
| 5791 | // permission request was ignored |
| 5792 | IGNORED = 1; |
| 5793 | // permission request was ignored because it was user fixed |
| 5794 | IGNORED_USER_FIXED = 2; |
| 5795 | // permission request was ignored because it was policy fixed |
| 5796 | IGNORED_POLICY_FIXED = 3; |
| 5797 | // permission was granted by user action |
| 5798 | USER_GRANTED = 4; |
| 5799 | // permission was automatically granted |
| 5800 | AUTO_GRANTED = 5; |
| 5801 | // permission was denied by user action |
| 5802 | USER_DENIED = 6; |
| 5803 | // permission was denied with prejudice by the user |
| 5804 | USER_DENIED_WITH_PREJUDICE = 7; |
| 5805 | // permission was automatically denied |
| 5806 | AUTO_DENIED = 8; |
Svet Ganov | d8eb8b2 | 2019-04-05 18:52:08 -0700 | [diff] [blame] | 5807 | // permission request was ignored because permission is restricted |
| 5808 | IGNORED_RESTRICTED_PERMISSION = 9; |
Stanislav Zholnin | 066aefb | 2019-10-17 18:40:33 +0100 | [diff] [blame] | 5809 | // one time permission was granted by user action |
| 5810 | USER_GRANTED_ONE_TIME = 10; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 5811 | } |
| 5812 | // The result of the permission grant |
| 5813 | optional Result result = 6; |
| 5814 | } |
| 5815 | |
| 5816 | /** |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5817 | * Logs when Omapi API used |
| 5818 | * Logged from: |
| 5819 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 5820 | */ |
| 5821 | message SeOmapiReported { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5822 | enum Operation { |
| 5823 | UNKNOWN = 0; |
| 5824 | OPEN_CHANNEL = 1; |
| 5825 | } |
| 5826 | optional Operation operation = 1; |
| 5827 | // SIMx or eSEx. |
| 5828 | optional string terminal = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5829 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5830 | optional string package_name = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5831 | } |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 5832 | |
| 5833 | /** |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 5834 | * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. |
| 5835 | * The dispatch latency is the dispatchClockTime - enqueueClockTime. |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 5836 | * Logged from: |
| 5837 | * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java |
| 5838 | */ |
| 5839 | message BroadcastDispatchLatencyReported { |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 5840 | optional int64 dispatch_latency_millis = 1; |
| 5841 | } |
| 5842 | |
| 5843 | /** |
| 5844 | * Logs AttentionManagerService attention check result. |
| 5845 | * |
| 5846 | * Logged from: |
| 5847 | * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java |
| 5848 | */ |
| 5849 | message AttentionManagerServiceResultReported { |
| 5850 | // See core/java/android/service/attention/AttentionService.java |
| 5851 | enum AttentionCheckResult { |
| 5852 | UNKNOWN = 20; |
| 5853 | ATTENTION_SUCCESS_ABSENT = 0; |
| 5854 | ATTENTION_SUCCESS_PRESENT = 1; |
Alex Salo | dd028ba | 2019-04-17 13:33:49 -0700 | [diff] [blame] | 5855 | ATTENTION_FAILURE_UNKNOWN = 2; |
| 5856 | ATTENTION_FAILURE_CANCELLED = 3; |
| 5857 | ATTENTION_FAILURE_PREEMPTED = 4; |
| 5858 | ATTENTION_FAILURE_TIMED_OUT = 5; |
| 5859 | ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 5860 | } |
| 5861 | optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 5862 | } |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 5863 | |
| 5864 | /** |
| 5865 | * Logs when an adb connection changes state. |
| 5866 | * |
| 5867 | * Logged from: |
| 5868 | * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java |
| 5869 | */ |
| 5870 | message AdbConnectionChanged { |
| 5871 | // The last time this system connected via adb, or 0 if the 'always allow' option was not |
| 5872 | // previously selected for this system. |
| 5873 | optional int64 last_connection_time_millis = 1; |
| 5874 | |
| 5875 | // The time in ms within which a subsequent connection from an 'always allow' system is allowed |
| 5876 | // to reconnect via adb without user interaction. |
| 5877 | optional int64 auth_window_millis = 2; |
| 5878 | |
| 5879 | // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto. |
| 5880 | optional android.debug.AdbConnectionStateEnum state = 3; |
| 5881 | |
| 5882 | // True if the 'always allow' option was selected for this system. |
| 5883 | optional bool always_allow = 4; |
| 5884 | } |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 5885 | |
| 5886 | /* |
| 5887 | * Logs the reported speech DSP status. |
| 5888 | * |
| 5889 | * Logged from: |
| 5890 | * Vendor audio implementation. |
| 5891 | */ |
| 5892 | message SpeechDspStatReported { |
| 5893 | // The total Speech DSP uptime in milliseconds. |
| 5894 | optional int32 total_uptime_millis = 1; |
| 5895 | // The total Speech DSP downtime in milliseconds. |
| 5896 | optional int32 total_downtime_millis = 2; |
| 5897 | optional int32 total_crash_count = 3; |
| 5898 | optional int32 total_recover_count = 4; |
| 5899 | } |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 5900 | |
| 5901 | /** |
| 5902 | * Logs USB connector contaminant status. |
| 5903 | * |
| 5904 | * Logged from: USB Service. |
| 5905 | */ |
| 5906 | message UsbContaminantReported { |
| 5907 | optional string id = 1; |
| 5908 | optional android.service.usb.ContaminantPresenceStatus status = 2; |
| 5909 | } |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 5910 | |
| 5911 | /** |
| 5912 | * This atom is for debugging purpose. |
| 5913 | */ |
| 5914 | message DebugElapsedClock { |
| 5915 | // Monotically increasing value for each pull. |
| 5916 | optional int64 pull_count = 1; |
| 5917 | // Time from System.elapsedRealtime. |
| 5918 | optional int64 elapsed_clock_millis = 2; |
| 5919 | // Time from System.elapsedRealtime. |
| 5920 | optional int64 same_elapsed_clock_millis = 3; |
| 5921 | // Diff between current elapsed time and elapsed time from previous pull. |
| 5922 | optional int64 elapsed_clock_diff_millis = 4; |
| 5923 | |
| 5924 | enum Type { |
| 5925 | TYPE_UNKNOWN = 0; |
| 5926 | ALWAYS_PRESENT = 1; |
| 5927 | PRESENT_ON_ODD_PULLS = 2; |
| 5928 | } |
| 5929 | // Type of behavior for the pulled data. |
| 5930 | optional Type type = 5; |
| 5931 | } |
| 5932 | |
| 5933 | /** |
| 5934 | * This atom is for debugging purpose. |
| 5935 | */ |
| 5936 | message DebugFailingElapsedClock { |
| 5937 | // Monotically increasing value for each pull. |
| 5938 | optional int64 pull_count = 1; |
| 5939 | // Time from System.elapsedRealtime. |
| 5940 | optional int64 elapsed_clock_millis = 2; |
| 5941 | // Time from System.elapsedRealtime. |
| 5942 | optional int64 same_elapsed_clock_millis = 3; |
| 5943 | // Diff between current elapsed time and elapsed time from previous pull. |
| 5944 | optional int64 elapsed_clock_diff_millis = 4; |
| 5945 | } |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 5946 | |
| 5947 | /** Logs System UI bubbles event changed. |
| 5948 | * |
| 5949 | * Logged from: |
| 5950 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles |
| 5951 | */ |
| 5952 | message BubbleUIChanged { |
| 5953 | |
| 5954 | // The app package that is posting the bubble. |
| 5955 | optional string package_name = 1; |
| 5956 | |
| 5957 | // The notification channel that is posting the bubble. |
| 5958 | optional string notification_channel = 2; |
| 5959 | |
| 5960 | // The notification id associated with the posted bubble. |
| 5961 | optional int32 notification_id = 3; |
| 5962 | |
| 5963 | // The position of the bubble within the bubble stack. |
| 5964 | optional int32 position = 4; |
| 5965 | |
| 5966 | // The total number of bubbles within the bubble stack. |
| 5967 | optional int32 total_number = 5; |
| 5968 | |
| 5969 | // User interactions with the bubble. |
| 5970 | enum Action { |
| 5971 | UNKNOWN = 0; |
| 5972 | POSTED = 1; |
| 5973 | UPDATED = 2; |
| 5974 | EXPANDED = 3; |
| 5975 | COLLAPSED = 4; |
| 5976 | DISMISSED = 5; |
| 5977 | STACK_DISMISSED = 6; |
| 5978 | STACK_MOVED = 7; |
| 5979 | HEADER_GO_TO_APP = 8; |
| 5980 | HEADER_GO_TO_SETTINGS = 9; |
| 5981 | PERMISSION_OPT_IN = 10; |
| 5982 | PERMISSION_OPT_OUT = 11; |
Steven Wu | a62cb6a | 2019-02-15 17:12:51 -0500 | [diff] [blame] | 5983 | PERMISSION_DIALOG_SHOWN = 12; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 5984 | SWIPE_LEFT = 13; |
| 5985 | SWIPE_RIGHT = 14; |
Steven Wu | a254dab | 2019-01-29 11:30:39 -0500 | [diff] [blame] | 5986 | STACK_EXPANDED = 15; |
Steven Wu | 1684f2d | 2019-04-11 14:10:42 -0400 | [diff] [blame] | 5987 | FLYOUT = 16; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 5988 | } |
| 5989 | optional Action action = 6; |
| 5990 | |
| 5991 | // Normalized screen position of the bubble stack. The range is between 0 and 1. |
| 5992 | optional float normalized_x_position = 7; |
| 5993 | optional float normalized_y_position = 8; |
Steven Wu | 45e38ae | 2019-03-25 16:16:59 -0400 | [diff] [blame] | 5994 | |
| 5995 | // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon. |
| 5996 | optional bool is_unread = 9; |
Steven Wu | 8ba8ca9 | 2019-04-11 10:47:42 -0400 | [diff] [blame] | 5997 | |
| 5998 | // Whether the bubble is an on-going one. |
| 5999 | optional bool is_ongoing = 10; |
| 6000 | |
| 6001 | // Whether the bubble is produced by an app running in foreground. |
Mady Mellor | daa0a66 | 2019-06-24 16:42:35 -0700 | [diff] [blame] | 6002 | // This is deprecated and the value should be ignored. |
| 6003 | optional bool is_foreground = 11 [deprecated = true]; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6004 | } |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6005 | |
| 6006 | /** |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 6007 | * Logs System UI bubbles developer errors. |
| 6008 | * |
| 6009 | * Logged from: |
| 6010 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java |
| 6011 | */ |
| 6012 | message BubbleDeveloperErrorReported { |
| 6013 | |
| 6014 | // The app package that is posting the bubble. |
| 6015 | optional string package_name = 1; |
| 6016 | |
| 6017 | // Bubble developer error type enums. |
| 6018 | enum Error { |
| 6019 | UNKNOWN = 0; |
| 6020 | ACTIVITY_INFO_MISSING = 1; |
| 6021 | ACTIVITY_INFO_NOT_RESIZABLE = 2; |
| 6022 | DOCUMENT_LAUNCH_NOT_ALWAYS = 3; |
| 6023 | } |
| 6024 | optional Error error = 2 [default = UNKNOWN]; |
| 6025 | } |
| 6026 | |
| 6027 | /** |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6028 | * Logs that a constraint for a scheduled job has changed. |
| 6029 | * |
| 6030 | * Logged from: |
| 6031 | * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java |
| 6032 | */ |
| 6033 | message ScheduledJobConstraintChanged { |
| 6034 | repeated AttributionNode attribution_node = 1; |
| 6035 | |
| 6036 | // Name of the job. |
| 6037 | optional string job_name = 2; |
| 6038 | |
| 6039 | optional com.android.server.job.ConstraintEnum constraint = 3; |
| 6040 | |
| 6041 | enum State { |
Kweku Adams | e8db3ab | 2019-02-27 14:30:34 -0800 | [diff] [blame] | 6042 | UNKNOWN = 0; |
| 6043 | UNSATISFIED = 1; |
| 6044 | SATISFIED = 2; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6045 | } |
| 6046 | optional State state = 4; |
| 6047 | } |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6048 | |
| 6049 | /** |
| 6050 | * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check |
| 6051 | * returns true. |
| 6052 | * |
| 6053 | * Logged from: |
| 6054 | * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java |
| 6055 | */ |
| 6056 | message ScreenTimeoutExtensionReported { |
| 6057 | // Describes how many times in a row did the power manager reset the screen off timeout. |
| 6058 | optional uint32 consecutive_timeout_extended_count = 1; |
| 6059 | } |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 6060 | |
| 6061 | /* |
| 6062 | * Logs number of milliseconds it takes to start a process. |
| 6063 | * The definition of app process start time is from the app launch time to |
| 6064 | * the time that Zygote finished forking the app process and loaded the |
| 6065 | * application package's java classes. |
| 6066 | |
| 6067 | * This metric is different from AppStartOccurred which is for foreground |
| 6068 | * activity only. |
| 6069 | |
| 6070 | * ProcessStartTime can report all processes (both foreground and background) |
| 6071 | * start time. |
| 6072 | * |
| 6073 | * Logged from: |
| 6074 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 6075 | */ |
| 6076 | message ProcessStartTime { |
| 6077 | // The uid of the ProcessRecord. |
| 6078 | optional int32 uid = 1 [(is_uid) = true]; |
| 6079 | |
| 6080 | // The process pid. |
| 6081 | optional int32 pid = 2; |
| 6082 | |
| 6083 | // The process name. |
| 6084 | // Usually package name, "system" for system server. |
| 6085 | // Provided by ActivityManagerService. |
| 6086 | optional string process_name = 3; |
| 6087 | |
| 6088 | enum StartType { |
| 6089 | UNKNOWN = 0; |
| 6090 | WARM = 1; |
| 6091 | HOT = 2; |
| 6092 | COLD = 3; |
| 6093 | } |
| 6094 | |
| 6095 | // The start type. |
| 6096 | optional StartType type = 4; |
| 6097 | |
| 6098 | // The elapsed realtime at the start of the process. |
| 6099 | optional int64 process_start_time_millis = 5; |
| 6100 | |
| 6101 | // Number of milliseconds it takes to reach bind application. |
| 6102 | optional int32 bind_application_delay_millis = 6; |
| 6103 | |
| 6104 | // Number of milliseconds it takes to finish start of the process. |
| 6105 | optional int32 process_start_delay_millis = 7; |
| 6106 | |
| 6107 | // hostingType field in ProcessRecord, the component type such as "activity", |
| 6108 | // "service", "content provider", "broadcast" or other strings. |
| 6109 | optional string hosting_type = 8; |
| 6110 | |
| 6111 | // hostingNameStr field in ProcessRecord. The component class name that runs |
| 6112 | // in this process. |
| 6113 | optional string hosting_name = 9; |
| 6114 | } |
| 6115 | |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6116 | /** |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 6117 | * Track Media Codec usage |
| 6118 | * Logged from: |
| 6119 | * frameworks/av/media/libstagefright/MediaCodec.cpp |
| 6120 | * frameworks/av/services/mediaanalytics/statsd_codec.cpp |
| 6121 | */ |
| 6122 | message MediametricsCodecReported { |
| 6123 | optional int64 timestamp_nanos = 1; |
| 6124 | optional string package_name = 2; |
| 6125 | optional int64 package_version_code = 3; |
| 6126 | optional int64 media_apex_version = 4; |
| 6127 | |
| 6128 | optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6129 | } |
| 6130 | |
| 6131 | /** |
| 6132 | * Track Media Extractor (pulling video/audio streams out of containers) usage |
| 6133 | * Logged from: |
| 6134 | * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp |
| 6135 | * frameworks/av/services/mediaanalytics/statsd_extractor.cpp |
| 6136 | */ |
| 6137 | message MediametricsExtractorReported { |
| 6138 | optional int64 timestamp_nanos = 1; |
| 6139 | optional string package_name = 2; |
| 6140 | optional int64 package_version_code = 3; |
| 6141 | optional int64 media_apex_version = 4; |
| 6142 | |
| 6143 | optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6144 | } |
| 6145 | |
| 6146 | /** |
| 6147 | * Track how we arbitrate between microphone/input requests. |
| 6148 | * Logged from |
| 6149 | * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp |
| 6150 | * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp |
| 6151 | */ |
| 6152 | message MediametricsAudiopolicyReported { |
| 6153 | optional int64 timestamp_nanos = 1; |
| 6154 | optional string package_name = 2; |
| 6155 | optional int64 package_version_code = 3; |
| 6156 | optional int64 media_apex_version = 4; |
| 6157 | |
| 6158 | optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6159 | } |
| 6160 | |
| 6161 | /** |
| 6162 | * Track how we arbitrate between microphone requests. |
| 6163 | * Logged from |
| 6164 | * frameworks/av/media/libaudioclient/AudioRecord.cpp |
| 6165 | * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp |
| 6166 | */ |
| 6167 | message MediametricsAudiorecordReported { |
| 6168 | optional int64 timestamp_nanos = 1; |
| 6169 | optional string package_name = 2; |
| 6170 | optional int64 package_version_code = 3; |
| 6171 | optional int64 media_apex_version = 4; |
| 6172 | |
| 6173 | optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6174 | } |
| 6175 | |
| 6176 | /** |
| 6177 | * Track how we arbitrate between microphone/input requests. |
| 6178 | * Logged from |
| 6179 | * frameworks/av/media/libnblog/ReportPerformance.cpp |
| 6180 | * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp |
| 6181 | */ |
| 6182 | message MediametricsAudiothreadReported { |
| 6183 | optional int64 timestamp_nanos = 1; |
| 6184 | optional string package_name = 2; |
| 6185 | optional int64 package_version_code = 3; |
| 6186 | optional int64 media_apex_version = 4; |
| 6187 | |
| 6188 | optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6189 | } |
| 6190 | |
| 6191 | /** |
| 6192 | * Track how we arbitrate between microphone/input requests. |
| 6193 | * Logged from |
| 6194 | * frameworks/av/media/libaudioclient/AudioTrack.cpp |
| 6195 | * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp |
| 6196 | */ |
| 6197 | message MediametricsAudiotrackReported { |
| 6198 | optional int64 timestamp_nanos = 1; |
| 6199 | optional string package_name = 2; |
| 6200 | optional int64 package_version_code = 3; |
| 6201 | optional int64 media_apex_version = 4; |
| 6202 | |
| 6203 | optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6204 | } |
| 6205 | |
| 6206 | /** |
| 6207 | * Track information about DRM framework performance |
| 6208 | * Logged from |
| 6209 | * frameworks/av/drm/libmediadrm/DrmHal.cpp |
| 6210 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 6211 | */ |
| 6212 | message MediametricsMediadrmReported { |
| 6213 | optional int64 timestamp_nanos = 1; |
| 6214 | optional string package_name = 2; |
| 6215 | optional int64 package_version_code = 3; |
| 6216 | optional int64 media_apex_version = 4; |
| 6217 | |
| 6218 | // vendor+description tell about which DRM plugin is in use on this device |
| 6219 | optional string vendor = 5; |
| 6220 | optional string description = 6; |
| 6221 | // from frameworks/av/drm/libmediadrm/protos/metrics.proto |
| 6222 | optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6223 | } |
| 6224 | |
| 6225 | /** |
| 6226 | * Track information about the widevine DRM plugin performance |
| 6227 | * Logged from |
| 6228 | * vendor/widevine/libwvdrmengine/cdm/metrics |
| 6229 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 6230 | */ |
| 6231 | message MediametricsDrmWidevineReported { |
| 6232 | optional int64 timestamp_nanos = 1; |
| 6233 | optional string package_name = 2; |
| 6234 | optional int64 package_version_code = 3; |
| 6235 | optional int64 media_apex_version = 4; |
| 6236 | |
| 6237 | optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6238 | } |
| 6239 | |
| 6240 | /** |
| 6241 | * Track information about recordings (e.g. camcorder) |
| 6242 | * Logged from |
| 6243 | * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp |
| 6244 | * frameworks/av/services/mediaanalytics/statsd_recorder.cpp |
| 6245 | */ |
| 6246 | message MediametricsRecorderReported { |
| 6247 | optional int64 timestamp_nanos = 1; |
| 6248 | optional string package_name = 2; |
| 6249 | optional int64 package_version_code = 3; |
| 6250 | optional int64 media_apex_version = 4; |
| 6251 | |
| 6252 | optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6253 | } |
| 6254 | |
| 6255 | /** |
| 6256 | * Track Media Player usage |
| 6257 | * Logged from: |
| 6258 | * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp |
| 6259 | * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp |
| 6260 | */ |
| 6261 | message MediametricsNuPlayerReported { |
| 6262 | optional int64 timestamp_nanos = 1; |
| 6263 | optional string package_name = 2; |
| 6264 | optional int64 package_version_code = 3; |
| 6265 | optional int64 media_apex_version = 4; |
| 6266 | |
| 6267 | optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6268 | } |
| 6269 | |
| 6270 | /** |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 6271 | * Track Legacy DRM usage |
| 6272 | * Logged from |
| 6273 | * frameworks/av/drm/drmserver/DrmManager.cpp |
| 6274 | */ |
| 6275 | message MediametricsDrmManagerReported { |
| 6276 | optional int64 timestamp_nanos = 1; |
| 6277 | optional string package_name = 2; |
| 6278 | optional int64 package_version_code = 3; |
| 6279 | optional int64 media_apex_version = 4; |
| 6280 | |
| 6281 | enum Method { |
| 6282 | METHOD_NOT_FOUND = -1; |
| 6283 | GET_CONSTRAINTS = 0; |
| 6284 | GET_METADATA = 1; |
| 6285 | CAN_HANDLE = 2; |
| 6286 | PROCESS_DRM_INFO = 3; |
| 6287 | ACQUIRE_DRM_INFO = 4; |
| 6288 | SAVE_RIGHTS = 5; |
| 6289 | GET_ORIGINAL_MIME_TYPE = 6; |
| 6290 | GET_DRM_OBJECT_TYPE = 7; |
| 6291 | CHECK_RIGHTS_STATUS = 8; |
| 6292 | REMOVE_RIGHTS = 9; |
| 6293 | REMOVE_ALL_RIGHTS = 10; |
| 6294 | OPEN_CONVERT_SESSION = 11; |
| 6295 | OPEN_DECRYPT_SESSION = 12; |
| 6296 | } |
| 6297 | |
| 6298 | // plugin_id+description inform which Legacy DRM plugins are still in use on device |
| 6299 | optional string plugin_id = 5; |
| 6300 | optional string description = 6; |
| 6301 | optional Method method = 7; |
| 6302 | optional string mime_types = 8; |
| 6303 | } |
| 6304 | |
| 6305 | /** |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6306 | * State of a dangerous permission requested by a package |
| 6307 | */ |
| 6308 | message DangerousPermissionState { |
| 6309 | // Name of the permission |
| 6310 | optional string permission_name = 1; |
| 6311 | |
| 6312 | // Uid of the package |
| 6313 | optional int32 uid = 2 [(is_uid) = true]; |
| 6314 | |
| 6315 | // Package requesting the permission |
| 6316 | optional string package_name = 3; |
| 6317 | |
| 6318 | // If the permission is granted to the uid |
| 6319 | optional bool is_granted = 4; |
Stanislav Zholnin | 75c3fd1 | 2019-05-21 13:10:51 +0100 | [diff] [blame] | 6320 | |
| 6321 | // Permission flags as per android.content.pm.PermissionFlags |
| 6322 | optional int32 permission_flags = 5; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6323 | } |
| 6324 | |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 6325 | /** |
| 6326 | * Logs when a package is denied access to a device identifier based on the new access requirements. |
| 6327 | * |
| 6328 | * Logged from: |
| 6329 | * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java |
| 6330 | */ |
| 6331 | message DeviceIdentifierAccessDenied { |
| 6332 | // The name of the package denied access to the requested device identifier. |
| 6333 | optional string package_name = 1; |
| 6334 | |
| 6335 | // The name of the device identifier method the package attempted to invoke. |
| 6336 | optional string method_name = 2; |
| 6337 | |
| 6338 | // True if the package is preinstalled. |
| 6339 | optional bool is_preinstalled = 3; |
| 6340 | |
| 6341 | // True if the package is privileged. |
| 6342 | optional bool is_priv_app = 4; |
| 6343 | } |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6344 | |
| 6345 | /** |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6346 | * Pulls the ongoing mainline install train version code. |
| 6347 | * Pulled from StatsCompanionService |
| 6348 | */ |
| 6349 | message TrainInfo { |
| 6350 | optional int64 train_version_code = 1; |
| 6351 | |
| 6352 | optional TrainExperimentIds train_experiment_id = 2; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6353 | |
| 6354 | optional string train_name = 3; |
| 6355 | |
| 6356 | enum Status { |
| 6357 | UNKNOWN = 0; |
| 6358 | INSTALL_REQUESTED = 1; |
| 6359 | INSTALL_STARTED = 2; |
| 6360 | INSTALL_STAGED_NOT_READY = 3; |
| 6361 | INSTALL_STAGED_READY = 4; |
| 6362 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 6363 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 6364 | // and INSTALL_FAILURE_COMMIT. |
| 6365 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 6366 | // 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] | 6367 | INSTALL_CANCELLED = 7; |
| 6368 | INSTALLER_ROLLBACK_REQUESTED = 8; |
| 6369 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 6370 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 6371 | INSTALLER_ROLLBACK_STAGED = 11; |
| 6372 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 6373 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 6374 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 6375 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 6376 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 6377 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 6378 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 6379 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 6380 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 6381 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 6382 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 6383 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 6384 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 6385 | INSTALL_FAILURE_COMMIT = 25; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6386 | } |
| 6387 | optional Status status = 4; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6388 | } |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6389 | |
| 6390 | /** |
| 6391 | * Logs the gesture stage changed event. |
| 6392 | * |
| 6393 | * Logged from: |
| 6394 | * frameworks/base/packages/SystemUI/ |
| 6395 | */ |
| 6396 | message AssistGestureStageReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6397 | optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6398 | } |
| 6399 | |
| 6400 | /** |
| 6401 | * Logs the feedback type. |
| 6402 | * |
| 6403 | * Logged from: |
| 6404 | * frameworks/base/packages/SystemUI/ |
| 6405 | */ |
| 6406 | message AssistGestureFeedbackReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6407 | // Whether or not the gesture was used. |
| 6408 | optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6409 | } |
| 6410 | |
| 6411 | /** |
| 6412 | * Logs the progress. |
| 6413 | * |
| 6414 | * Logged from: |
| 6415 | * frameworks/base/packages/SystemUI/ |
| 6416 | */ |
| 6417 | message AssistGestureProgressReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6418 | // [0,100] progress for the assist gesture. |
| 6419 | optional int32 progress = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6420 | } |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 6421 | |
| 6422 | /* |
| 6423 | * Information about the time zone data on a device. |
| 6424 | */ |
| 6425 | message TimeZoneDataInfo { |
| 6426 | // A version identifier for the data set on device. e.g. "2018i" |
| 6427 | optional string tzdb_version = 1; |
| 6428 | } |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6429 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6430 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6431 | * Logs the GPU stats global health information. |
| 6432 | * |
| 6433 | * Logged from: |
| 6434 | * frameworks/native/services/gpuservice/gpustats/ |
| 6435 | */ |
| 6436 | message GpuStatsGlobalInfo { |
| 6437 | // Package name of the gpu driver. |
| 6438 | optional string driver_package_name = 1; |
| 6439 | |
| 6440 | // Version name of the gpu driver. |
| 6441 | optional string driver_version_name = 2; |
| 6442 | |
| 6443 | // Version code of the gpu driver. |
| 6444 | optional int64 driver_version_code = 3; |
| 6445 | |
| 6446 | // Build time of the gpu driver in UTC as seconds since January 1, 1970. |
| 6447 | optional int64 driver_build_time = 4; |
| 6448 | |
| 6449 | // Total count of the gl driver gets loaded. |
| 6450 | optional int64 gl_loading_count = 5; |
| 6451 | |
| 6452 | // Total count of the gl driver fails to be loaded. |
| 6453 | optional int64 gl_loading_failure_count = 6; |
| 6454 | |
| 6455 | // Total count of the Vulkan driver gets loaded. |
| 6456 | optional int64 vk_loading_count = 7; |
| 6457 | |
| 6458 | // Total count of the Vulkan driver fails to be loaded. |
| 6459 | optional int64 vk_loading_failure_count = 8; |
Yiwei Zhang | 63852d2a | 2019-05-06 19:31:20 -0700 | [diff] [blame] | 6460 | |
| 6461 | // Api version of the system Vulkan driver. |
| 6462 | optional int32 vulkan_version = 9; |
| 6463 | |
| 6464 | // Api version of the system CPU Vulkan driver. |
| 6465 | optional int32 cpu_vulkan_version = 10; |
| 6466 | |
| 6467 | // Api version of the system GLES driver. |
| 6468 | optional int32 gles_version = 11; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 6469 | |
| 6470 | // Total count of the angle driver gets loaded. |
| 6471 | optional int64 angle_loading_count = 12; |
| 6472 | |
| 6473 | // Total count of the angle driver fails to be loaded. |
| 6474 | optional int64 angle_loading_failure_count = 13; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6475 | } |
| 6476 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6477 | /** |
| 6478 | * GPU driver loading time info. |
| 6479 | */ |
| 6480 | message GpuDriverLoadingTime { |
| 6481 | // List of all the driver loading times for this app. The list size is |
| 6482 | // capped at 50. |
| 6483 | repeated int64 driver_loading_time = 1; |
| 6484 | } |
| 6485 | |
| 6486 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6487 | * Logs the GPU stats per app health information. |
| 6488 | * |
| 6489 | * Logged from: |
| 6490 | * frameworks/native/services/gpuservice/gpustats/ |
| 6491 | */ |
| 6492 | message GpuStatsAppInfo { |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6493 | // Package name of the application that loads the gpu driver. Total number |
| 6494 | // of different packages is capped at 100. |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6495 | optional string app_package_name = 1; |
| 6496 | |
| 6497 | // Version code of the gpu driver this app loads. |
| 6498 | optional int64 driver_version_code = 2; |
| 6499 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6500 | // gl driver loading time info. |
| 6501 | optional GpuDriverLoadingTime gl_driver_loading_time = 3 |
| 6502 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6503 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6504 | // Vulkan driver loading time info. |
| 6505 | optional GpuDriverLoadingTime vk_driver_loading_time = 4 |
| 6506 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 6507 | |
| 6508 | // Angle driver loading time info. |
| 6509 | optional GpuDriverLoadingTime angle_driver_loading_time = 5 |
| 6510 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 7c70930 | 2019-05-09 15:00:46 -0700 | [diff] [blame] | 6511 | |
| 6512 | // CPU Vulkan implementation is in use. |
| 6513 | optional bool cpu_vulkan_in_use = 6; |
Yiwei Zhang | a763861 | 2019-07-03 17:34:12 -0700 | [diff] [blame] | 6514 | |
| 6515 | // App is not doing pre-rotation correctly. |
| 6516 | optional bool false_prerotation = 7; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6517 | } |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 6518 | |
| 6519 | /* |
| 6520 | * Logs the size of the system ion heap. |
| 6521 | * |
| 6522 | * Pulled from StatsCompanionService. |
| 6523 | */ |
| 6524 | message SystemIonHeapSize { |
| 6525 | // Size of the system ion heap in bytes. |
| 6526 | optional int64 size_in_bytes = 1; |
| 6527 | } |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 6528 | |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 6529 | /* |
| 6530 | * Logs the per-process size of the system ion heap. |
| 6531 | * |
| 6532 | * Pulled from StatsCompanionService. |
| 6533 | */ |
| 6534 | message ProcessSystemIonHeapSize { |
| 6535 | // The uid if available. -1 means not available. |
| 6536 | optional int32 uid = 1 [(is_uid) = true]; |
| 6537 | |
| 6538 | // The process name (from /proc/PID/cmdline). |
| 6539 | optional string process_name = 2; |
| 6540 | |
| 6541 | // Sum of sizes of all allocations. |
| 6542 | optional int32 total_size_in_kilobytes = 3; |
| 6543 | |
| 6544 | // Number of allocations. |
| 6545 | optional int32 allocation_count = 4; |
| 6546 | |
| 6547 | // Size of the largest allocation. |
| 6548 | optional int32 max_size_in_kilobytes = 5; |
| 6549 | } |
| 6550 | |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 6551 | /** |
| 6552 | * Push network stack events. |
| 6553 | * |
| 6554 | * Log from: |
| 6555 | * frameworks/base/packages/NetworkStack/ |
| 6556 | */ |
| 6557 | message NetworkStackReported { |
Chiachang Wang | 729d267 | 2019-03-27 17:33:52 +0800 | [diff] [blame] | 6558 | // The id that indicates the event reported from NetworkStack. |
| 6559 | optional int32 event_id = 1; |
| 6560 | // The data for the reported events. |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 6561 | optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES]; |
| 6562 | } |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 6563 | |
| 6564 | /** |
| 6565 | * Logs the apps that are installed on the external storage. |
| 6566 | * Pulled from: |
| 6567 | * StatsCompanionService |
| 6568 | */ |
| 6569 | message AppsOnExternalStorageInfo { |
| 6570 | // The type of the external storage. |
| 6571 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 6572 | // The name of the package that is installed on the external storage. |
| 6573 | optional string package_name = 2; |
| 6574 | } |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 6575 | |
| 6576 | /** |
| 6577 | * Logs the settings related to Face. |
| 6578 | * Logged from: |
| 6579 | * frameworks/base/services/core/java/com/android/server/stats |
| 6580 | */ |
| 6581 | message FaceSettings { |
| 6582 | // Whether or not face unlock is allowed on Keyguard. |
| 6583 | optional bool unlock_keyguard_enabled = 1; |
| 6584 | // Whether or not face unlock dismisses the Keyguard. |
| 6585 | optional bool unlock_dismisses_keyguard = 2; |
| 6586 | // Whether or not face unlock requires attention. |
| 6587 | optional bool unlock_attention_required = 3; |
| 6588 | // Whether or not face unlock is allowed for apps (through BiometricPrompt). |
| 6589 | optional bool unlock_app_enabled = 4; |
| 6590 | // Whether or not face unlock always requires user confirmation. |
| 6591 | optional bool unlock_always_require_confirmation = 5; |
| 6592 | // Whether or not a diverse set of poses are required during enrollment. |
| 6593 | optional bool unlock_diversity_required = 6; |
| 6594 | } |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 6595 | |
| 6596 | /** |
| 6597 | * Logs cooling devices maintained by the kernel. |
| 6598 | * |
| 6599 | * Pulled from StatsCompanionService.java |
| 6600 | */ |
| 6601 | message CoolingDevice { |
| 6602 | // The type of cooling device being reported. Eg. CPU, GPU... |
| 6603 | optional android.os.CoolingTypeEnum device_location = 1; |
| 6604 | // The name of the cooling device source. Eg. CPU0 |
| 6605 | optional string device_name = 2; |
| 6606 | // Current throttle state of the cooling device. The value can any unsigned |
| 6607 | // integer between 0 and max_state defined in its driver. 0 means device is |
| 6608 | // not in throttling, higher value means deeper throttling. |
| 6609 | optional int32 state = 3; |
| 6610 | } |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 6611 | |
| 6612 | /** |
| 6613 | * Intelligence has several counter-type events that don't warrant a |
| 6614 | * full separate atom. These are primarily API call counters but also include |
| 6615 | * counters for feature usage and specific failure modes. |
| 6616 | * |
| 6617 | * Logged from the Intelligence mainline module. |
| 6618 | */ |
| 6619 | message IntelligenceEventReported { |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 6620 | // The event type. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 6621 | optional android.stats.intelligence.EventType event_id = 1; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 6622 | // Success, failure. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 6623 | optional android.stats.intelligence.Status status = 2; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 6624 | // How many times the event occured (to report a batch of high frequency events). |
| 6625 | optional int32 count = 3; |
Ben Blount | e3223f3d | 2019-05-02 22:49:03 -0700 | [diff] [blame] | 6626 | // How long the event took (sum of durations if count > 1) |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 6627 | optional int64 duration_millis = 4; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 6628 | } |
Andrew T Nguyen | ee615d6 | 2019-05-01 14:40:19 -0700 | [diff] [blame] | 6629 | |
| 6630 | /** |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 6631 | * Logs when Car Power state changed. |
| 6632 | * |
| 6633 | * Logged from: |
| 6634 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 6635 | */ |
| 6636 | message CarPowerStateChanged { |
| 6637 | // States come from CpmsState in CarPowerManagementService.java. |
| 6638 | enum State { |
| 6639 | WAIT_FOR_VHAL = 0; |
| 6640 | ON = 1; |
| 6641 | SHUTDOWN_PREPARE = 2; |
| 6642 | WAIT_FOR_FINISH = 3; |
| 6643 | SUSPEND = 4; |
| 6644 | SIMULATE_SLEEP = 5; |
| 6645 | } |
| 6646 | optional State state = 1; |
| 6647 | } |
| 6648 | |
| 6649 | /** |
| 6650 | * Logs whether GarageMode is entered. |
| 6651 | * |
| 6652 | * Logged from: |
| 6653 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 6654 | */ |
| 6655 | message GarageModeInfo { |
| 6656 | // Whether GarageMode is entered. |
| 6657 | optional bool is_garage_mode = 1; |
| 6658 | } |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 6659 | |
| 6660 | /** |
| 6661 | * Historical app ops data per package. |
| 6662 | */ |
| 6663 | message AppOps { |
| 6664 | // Uid of the package requesting the op |
| 6665 | optional int32 uid = 1 [(is_uid) = true]; |
| 6666 | |
| 6667 | // Nmae of the package performing the op |
| 6668 | optional string package_name = 2; |
| 6669 | |
| 6670 | // operation id; maps to the OP_* constants in AppOpsManager.java |
| 6671 | optional int32 op_id = 3; |
| 6672 | |
| 6673 | // The number of times the op was granted while the app was in the |
| 6674 | // foreground (only for trusted requests) |
| 6675 | optional int64 trusted_foreground_granted_count = 4; |
| 6676 | |
| 6677 | // The number of times the op was granted while the app was in the |
| 6678 | // background (only for trusted requests) |
| 6679 | optional int64 trusted_background_granted_count = 5; |
| 6680 | |
| 6681 | // The number of times the op was rejected while the app was in the |
| 6682 | // foreground (only for trusted requests) |
| 6683 | optional int64 trusted_foreground_rejected_count = 6; |
| 6684 | |
| 6685 | // The number of times the op was rejected while the app was in the |
| 6686 | // background (only for trusted requests) |
| 6687 | optional int64 trusted_background_rejected_count = 7; |
| 6688 | |
| 6689 | // For long-running operations, total duration of the operation |
| 6690 | // while the app was in the foreground (only for trusted requests) |
| 6691 | optional int64 trusted_foreground_duration_millis = 8; |
| 6692 | |
| 6693 | // For long-running operations, total duration of the operation |
| 6694 | // while the app was in the background (only for trusted requests) |
| 6695 | optional int64 trusted_background_duration_millis = 9; |
| 6696 | } |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 6697 | |
| 6698 | /** |
| 6699 | * Location Manager API Usage information(e.g. API under usage, |
| 6700 | * API call's parameters). |
| 6701 | * Logged from: |
| 6702 | * frameworks/base/services/core/java/com/android/server/LocationManagerService.java |
| 6703 | */ |
| 6704 | message LocationManagerApiUsageReported { |
| 6705 | |
| 6706 | // Indicating if usage starts or usage ends. |
| 6707 | optional android.stats.location.UsageState state = 1; |
| 6708 | |
| 6709 | // LocationManagerService's API in use. |
| 6710 | // We can identify which API from LocationManager is |
| 6711 | // invoking current LMS API by the combination of |
| 6712 | // API parameter(e.g. is_listener_null, is_intent_null, |
| 6713 | // is_location_request_null) |
| 6714 | optional android.stats.location.LocationManagerServiceApi api_in_use = 2; |
| 6715 | |
| 6716 | // Name of the package calling the API. |
| 6717 | optional string calling_package_name = 3; |
| 6718 | |
| 6719 | // Type of the location provider. |
| 6720 | optional android.stats.location.ProviderType provider = 4; |
| 6721 | |
| 6722 | // Quality of the location request |
| 6723 | optional android.stats.location.LocationRequestQuality quality = 5; |
| 6724 | |
| 6725 | // The desired interval for active location updates, in milliseconds. |
| 6726 | // Bucketized to reduce cardinality. |
| 6727 | optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6; |
| 6728 | |
| 6729 | // Minimum distance between location updates, in meters. |
| 6730 | // Bucketized to reduce cardinality. |
| 6731 | optional android.stats.location.SmallestDisplacementBucket |
| 6732 | bucketized_smallest_displacement = 7; |
| 6733 | |
| 6734 | // The number of location updates. |
| 6735 | optional int64 num_updates = 8; |
| 6736 | |
| 6737 | // The request expiration time, in millisecond since boot. |
| 6738 | // Bucketized to reduce cardinality. |
| 6739 | optional android.stats.location.ExpirationBucket |
| 6740 | bucketized_expire_in = 9; |
| 6741 | |
| 6742 | // Type of Callback passed in for this API. |
| 6743 | optional android.stats.location.CallbackType callback_type = 10; |
| 6744 | |
| 6745 | // The radius of the central point of the alert |
| 6746 | // region, in meters. Only for API REQUEST_GEOFENCE. |
| 6747 | // Bucketized to reduce cardinality. |
| 6748 | optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11; |
| 6749 | |
| 6750 | // Activity Importance of API caller. |
| 6751 | // Categorized to 3 types that are interesting from location's perspective. |
| 6752 | optional android.stats.location.ActivityImportance activiy_importance = 12; |
| 6753 | } |
Stanislav Zholnin | 3d215df1 | 2019-06-05 16:48:20 +0100 | [diff] [blame] | 6754 | |
| 6755 | /** |
| 6756 | * Information about a permission grant or denial made by user inside ReviewPermissionsFragment |
| 6757 | */ |
| 6758 | message ReviewPermissionsFragmentResultReported { |
| 6759 | // unique value identifying a permission group change. A permission group change might result |
| 6760 | // in multiple of these atoms |
| 6761 | optional int64 change_id = 1; |
| 6762 | |
| 6763 | // UID of package the permission belongs to |
| 6764 | optional int32 uid = 2 [(is_uid) = true]; |
| 6765 | |
| 6766 | // Name of package the permission belongs to |
| 6767 | optional string package_name = 3; |
| 6768 | |
| 6769 | // The permission to be granted |
| 6770 | optional string permission_name = 4; |
| 6771 | |
| 6772 | // The result of the permission grant |
| 6773 | optional bool permission_granted = 5; |
| 6774 | } |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 6775 | |
| 6776 | /** |
| 6777 | * Information about results of permission upgrade by RuntimePermissionsUpgradeController |
| 6778 | * Logged from: RuntimePermissionUpdgradeController |
| 6779 | */ |
| 6780 | message RuntimePermissionsUpgradeResult { |
| 6781 | // Permission granted as result of upgrade |
| 6782 | optional string permission_name = 1; |
| 6783 | |
| 6784 | // UID of package granted permission |
| 6785 | optional int32 uid = 2 [(is_uid) = true]; |
| 6786 | |
| 6787 | // Name of package granted permission |
| 6788 | optional string package_name = 3; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 6789 | } |
| 6790 | |
| 6791 | /** |
| 6792 | * Information about a buttons presented in GrantPermissionsActivty and choice made by user |
| 6793 | */ |
| 6794 | message GrantPermissionsActivityButtonActions { |
| 6795 | // Permission granted as result of upgrade |
| 6796 | optional string permission_group_name = 1; |
| 6797 | |
| 6798 | // UID of package granted permission |
| 6799 | optional int32 uid = 2 [(is_uid) = true]; |
| 6800 | |
| 6801 | // Name of package requesting permission |
| 6802 | optional string package_name = 3; |
| 6803 | |
| 6804 | // Buttons presented in the dialog - bit flags, bit numbers are in accordance with |
| 6805 | // LABEL_ constants in GrantPermissionActivity.java |
| 6806 | optional int32 buttons_presented = 4; |
| 6807 | |
| 6808 | // Button clicked by user - same as bit flags in buttons_presented with only single bit set |
| 6809 | optional int32 button_clicked = 5; |
| 6810 | } |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 6811 | |
| 6812 | /** |
| 6813 | * Information about LocationAccessCheck notification presented to user |
| 6814 | */ |
| 6815 | message LocationAccessCheckNotificationAction { |
| 6816 | |
| 6817 | // id which identifies single session of user interacting with permission controller |
| 6818 | optional int64 session_id = 1; |
| 6819 | |
| 6820 | // Uid of package for which location access check is presented |
| 6821 | optional int32 package_uid = 2; |
| 6822 | |
| 6823 | // Name of package for which location access check is presented |
| 6824 | optional string package_name = 3; |
| 6825 | |
| 6826 | enum Result { |
| 6827 | UNDEFINED = 0; |
| 6828 | // notification was presented to the user |
| 6829 | NOTIFICATION_PRESENTED = 1; |
| 6830 | // notification was declined by the user |
| 6831 | NOTIFICATION_DECLINED = 2; |
| 6832 | // notification was clicked by the user |
| 6833 | NOTIFICATION_CLICKED = 3; |
| 6834 | } |
| 6835 | |
| 6836 | // View / interaction recorded |
| 6837 | optional Result result = 4; |
| 6838 | } |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 6839 | |
| 6840 | /** |
| 6841 | * Information about a permission grant or revoke made by user inside AppPermissionFragment |
| 6842 | */ |
| 6843 | message AppPermissionFragmentActionReported { |
| 6844 | // id which identifies single session of user interacting with permission controller |
| 6845 | optional int64 session_id = 1; |
| 6846 | |
| 6847 | // unique value identifying a permission group change. A permission group change might result |
| 6848 | // in multiple of these atoms |
| 6849 | optional int64 change_id = 2; |
| 6850 | |
| 6851 | // UID of package the permission belongs to |
| 6852 | optional int32 uid = 3 [(is_uid) = true]; |
| 6853 | |
| 6854 | // Name of package the permission belongs to |
| 6855 | optional string package_name = 4; |
| 6856 | |
| 6857 | // The permission to be granted |
| 6858 | optional string permission_name = 5; |
| 6859 | |
| 6860 | // The result of the permission grant |
| 6861 | optional bool permission_granted = 6; |
| 6862 | } |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 6863 | |
| 6864 | /** |
| 6865 | * Information about a AppPermissionFragment viewed by user |
| 6866 | */ |
| 6867 | message AppPermissionFragmentViewed { |
| 6868 | // id which identifies single session of user interacting with permission controller |
| 6869 | optional int64 session_id = 1; |
| 6870 | |
| 6871 | // UID of package for which permissions are viewed |
| 6872 | optional int32 uid = 2 [(is_uid) = true]; |
| 6873 | |
| 6874 | // Name of package for which permissions are viewed |
| 6875 | optional string package_name = 3; |
| 6876 | |
| 6877 | // Permission group viewed |
| 6878 | optional string permission_group_name = 4; |
| 6879 | } |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 6880 | |
| 6881 | /** |
| 6882 | * Information about a AppPermissionsFragment viewed by user |
| 6883 | */ |
| 6884 | message AppPermissionsFragmentViewed { |
| 6885 | // id which identifies single session of user interacting with permission controller |
| 6886 | optional int64 session_id = 1; |
| 6887 | |
| 6888 | // id which identifies single view as every view might have several logging records |
| 6889 | // with different package information attached |
| 6890 | optional int64 view_id = 2; |
| 6891 | |
| 6892 | // Permission group viewed |
| 6893 | optional string permission_group_name = 3; |
| 6894 | |
| 6895 | // UID of package for which permissions are viewed |
| 6896 | optional int32 uid = 4 [(is_uid) = true]; |
| 6897 | |
| 6898 | // Name of package for which permissions are viewed |
| 6899 | optional string package_name = 5; |
| 6900 | |
| 6901 | // Category in which permission is included |
| 6902 | enum Category { |
| 6903 | UNDEFINED = 0; |
| 6904 | ALLOWED = 1; |
| 6905 | ALLOWED_FOREGROUND = 2; |
| 6906 | DENIED = 3; |
| 6907 | } |
| 6908 | optional Category category = 6; |
| 6909 | } |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 6910 | |
| 6911 | /** |
| 6912 | * Information about a PermissionAppsFragment viewed by user. |
| 6913 | * Logged from ui/handheld/PermissionAppsFragment.java |
| 6914 | */ |
| 6915 | message PermissionAppsFragmentViewed { |
| 6916 | // id which identifies single session of user interacting with permission controller |
| 6917 | optional int64 session_id = 1; |
| 6918 | |
| 6919 | // id which identifies single view as every view might have several logging records |
| 6920 | // with different package information attached |
| 6921 | optional int64 view_id = 2; |
| 6922 | |
| 6923 | // Permission group viewed |
| 6924 | optional string permission_group_name = 3; |
| 6925 | |
| 6926 | // UID of package for which permissions are viewed |
| 6927 | optional int32 uid = 4 [(is_uid) = true]; |
| 6928 | |
| 6929 | // Name of package for which permissions are viewed |
| 6930 | optional string package_name = 5; |
| 6931 | |
| 6932 | // Category in which app is included |
| 6933 | enum Category { |
| 6934 | UNDEFINED = 0; |
| 6935 | ALLOWED = 1; |
| 6936 | ALLOWED_FOREGROUND = 2; |
| 6937 | DENIED = 3; |
| 6938 | } |
| 6939 | optional Category category = 6; |
| 6940 | } |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 6941 | |
| 6942 | /** |
| 6943 | * Logs when there is a smart selection related event. |
| 6944 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 6945 | * Logged from: TextClassifierEventLogger.java |
| 6946 | */ |
| 6947 | message TextSelectionEvent { |
| 6948 | // A session ID. |
| 6949 | optional string session_id = 1; |
| 6950 | |
| 6951 | // Event type of this event. |
| 6952 | optional android.stats.textclassifier.EventType event_type = 2; |
| 6953 | |
| 6954 | // Name of the model that is involved in this event. |
| 6955 | optional string model_name = 3; |
| 6956 | |
| 6957 | // Type of widget that was involved in triggering this event. |
| 6958 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 6959 | |
| 6960 | // Index of this event in a session. |
| 6961 | optional int32 event_index = 5; |
| 6962 | |
| 6963 | // Entity type that is involved. |
| 6964 | optional string entity_type = 6; |
| 6965 | |
| 6966 | // Relative word index of the start of the selection. |
| 6967 | optional int32 relative_word_start_index = 7; |
| 6968 | |
| 6969 | // Relative word (exclusive) index of the end of the selection. |
| 6970 | optional int32 relative_word_end_index = 8; |
| 6971 | |
| 6972 | // Relative word index of the start of the smart selection. |
| 6973 | optional int32 relative_suggested_word_start_index = 9; |
| 6974 | |
| 6975 | // Relative word (exclusive) index of the end of the smart selection. |
| 6976 | optional int32 relative_suggested_word_end_index = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 6977 | |
| 6978 | // Name of source package. |
| 6979 | optional string package_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 6980 | } |
| 6981 | |
| 6982 | /** |
| 6983 | * Logs when there is a smart linkify related event. |
| 6984 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 6985 | * Logged from: TextClassifierEventLogger.java |
| 6986 | */ |
| 6987 | message TextLinkifyEvent { |
| 6988 | // A session ID. |
| 6989 | optional string session_id = 1; |
| 6990 | |
| 6991 | // Event type of this event. |
| 6992 | optional android.stats.textclassifier.EventType event_type = 2; |
| 6993 | |
| 6994 | // Name of the model that is involved in this event. |
| 6995 | optional string model_name = 3; |
| 6996 | |
| 6997 | // Type of widget that was involved in triggering this event. |
| 6998 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 6999 | |
| 7000 | // Index of this event in a session. |
| 7001 | optional int32 event_index = 5; |
| 7002 | |
| 7003 | // Entity type that is involved. |
| 7004 | optional string entity_type = 6; |
| 7005 | |
| 7006 | // Number of links detected. |
| 7007 | optional int32 num_links = 7; |
| 7008 | |
| 7009 | // The total length of all links. |
| 7010 | optional int32 linked_text_length = 8; |
| 7011 | |
| 7012 | // Length of input text. |
| 7013 | optional int32 text_length = 9; |
| 7014 | |
| 7015 | // Time spent on generating links in ms. |
| 7016 | optional int64 latency_millis = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7017 | |
| 7018 | // Name of source package. |
| 7019 | optional string package_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7020 | } |
| 7021 | |
| 7022 | /** |
| 7023 | * Logs when there is a conversation actions related event. |
| 7024 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7025 | * Logged from: TextClassifierEventLogger.java |
| 7026 | */ |
| 7027 | message ConversationActionsEvent { |
| 7028 | // A session ID. |
| 7029 | optional string session_id = 1; |
| 7030 | |
| 7031 | // Event type of this event. |
| 7032 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7033 | |
| 7034 | // Name of the model that is involved in this event. |
| 7035 | optional string model_name = 3; |
| 7036 | |
| 7037 | // Type of widget that was involved in triggering this event. |
| 7038 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7039 | |
| 7040 | // The first entity type that is involved. |
| 7041 | optional string first_entity_type = 5; |
| 7042 | |
| 7043 | // The second entity type that is involved. |
| 7044 | optional string second_entity_type = 6; |
| 7045 | |
| 7046 | // The third entity type that is involved. |
| 7047 | optional string third_entity_type = 7; |
| 7048 | |
| 7049 | // The score of the first entity type. |
| 7050 | optional float score = 8; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7051 | |
| 7052 | // Name of source package. |
| 7053 | optional string package_name = 9; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7054 | } |
| 7055 | |
| 7056 | /** |
| 7057 | * Logs when there is a language detection related event. |
| 7058 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7059 | * Logged from: TextClassifierEventLogger.java |
| 7060 | */ |
| 7061 | message LanguageDetectionEvent { |
| 7062 | // A session ID. |
| 7063 | optional string session_id = 1; |
| 7064 | |
| 7065 | // Event type of this event. |
| 7066 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7067 | |
| 7068 | // Name of the model that is involved in this event. |
| 7069 | optional string model_name = 3; |
| 7070 | |
| 7071 | // Type of widget that was involved in triggering this event. |
| 7072 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7073 | |
| 7074 | // Detected language. |
| 7075 | optional string language_tag = 5; |
| 7076 | |
| 7077 | // Score of the detected language. |
| 7078 | optional float score = 6; |
| 7079 | |
| 7080 | // Position of this action. |
| 7081 | optional int32 action_index = 7; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7082 | |
| 7083 | // Name of source package. |
| 7084 | optional string package_name = 8; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7085 | } |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 7086 | |
| 7087 | /** |
| 7088 | * Information about an OTA update attempt by update_engine. |
| 7089 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 7090 | */ |
| 7091 | message UpdateEngineUpdateAttemptReported { |
| 7092 | // The number of attempts for the update engine to apply a given payload. |
| 7093 | optional int32 attempt_number = 1; |
| 7094 | |
| 7095 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 7096 | |
| 7097 | // The total time in minutes for the update engine to apply a given payload. |
| 7098 | // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and |
| 7099 | // it's increased when the system is sleeping. |
| 7100 | optional int32 duration_boottime_in_minutes = 3; |
| 7101 | |
| 7102 | // The total time in minutes for the update engine to apply a given payload. |
| 7103 | // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW; |
| 7104 | // and it's not increased when the system is sleeping. |
| 7105 | optional int32 duration_monotonic_in_minutes = 4; |
| 7106 | |
| 7107 | // The size of the payload in MiBs. |
| 7108 | optional int32 payload_size_mib = 5; |
| 7109 | |
| 7110 | // The attempt result reported by the update engine for an OTA update. |
| 7111 | optional android.stats.otaupdate.AttemptResult attempt_result = 6; |
| 7112 | |
| 7113 | // The error code reported by the update engine after an OTA update attempt |
| 7114 | // on A/B devices. |
| 7115 | optional android.stats.otaupdate.ErrorCode error_code = 7; |
| 7116 | |
| 7117 | // The build fingerprint of the source system. The value is read from a |
| 7118 | // system property when the device takes the update. e.g. |
| 7119 | // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys |
| 7120 | optional string source_fingerprint = 8; |
| 7121 | } |
| 7122 | |
| 7123 | /** |
| 7124 | * Information about all the attempts the device make before finishing the |
| 7125 | * successful update. |
| 7126 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 7127 | */ |
| 7128 | message UpdateEngineSuccessfulUpdateReported { |
| 7129 | // The number of attempts for the update engine to apply the payload for a |
| 7130 | // successful update. |
| 7131 | optional int32 attempt_count = 1; |
| 7132 | |
| 7133 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 7134 | |
| 7135 | optional int32 payload_size_mib = 3; |
| 7136 | |
| 7137 | // The total number of bytes downloaded by update_engine since the last |
| 7138 | // successful update. |
| 7139 | optional int32 total_bytes_downloaded_mib = 4; |
| 7140 | |
| 7141 | // The ratio in percentage of the over-downloaded bytes compared to the |
| 7142 | // total bytes needed to successfully install the update. e.g. 200 if we |
| 7143 | // download 200MiB in total for a 100MiB package. |
| 7144 | optional int32 download_overhead_percentage = 5; |
| 7145 | |
| 7146 | // The total time in minutes for the update engine to apply the payload for a |
| 7147 | // successful update. |
| 7148 | optional int32 total_duration_minutes = 6; |
| 7149 | |
| 7150 | // The number of reboot of the device during a successful update. |
| 7151 | optional int32 reboot_count = 7; |
| 7152 | } |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 7153 | |
| 7154 | /** |
| 7155 | * Global display pipeline metrics reported by SurfaceFlinger. |
| 7156 | * Pulled from: |
| 7157 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 7158 | */ |
| 7159 | message SurfaceflingerStatsGlobalInfo { |
| 7160 | // Total number of frames presented during the tracing period |
| 7161 | optional int64 total_frames = 1; |
| 7162 | // Total number of frames missed |
| 7163 | optional int64 missed_frames = 2; |
| 7164 | // Total number of frames that fell back to client composition |
| 7165 | optional int64 client_composition_frames = 3; |
| 7166 | // Total time the display was turned on |
| 7167 | optional int64 display_on_millis = 4; |
| 7168 | // Total time that was spent performing animations. |
| 7169 | // This is derived from the present-to-present layer histogram |
| 7170 | optional int64 animation_millis = 5; |
| 7171 | } |
| 7172 | |
| 7173 | /** |
| 7174 | * Per-layer display pipeline metrics reported by SurfaceFlinger. |
| 7175 | * The number of layers uploaded will be restricted due to size limitations. |
| 7176 | * Pulled from: |
| 7177 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 7178 | */ |
| 7179 | message SurfaceflingerStatsLayerInfo { |
| 7180 | // The layer for this set of metrics |
| 7181 | // For now we can infer that the package name is included in the layer |
| 7182 | // name. |
| 7183 | optional string layer_name = 1; |
| 7184 | // Total number of frames presented |
| 7185 | optional int64 total_frames = 2; |
| 7186 | // Total number of dropped frames while latching a buffer for this layer. |
| 7187 | optional int64 dropped_frames = 3; |
| 7188 | // Set of timings measured between successive presentation timestamps. |
| 7189 | optional FrameTimingHistogram present_to_present = 4 |
| 7190 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7191 | // Set of timings measured from when an app queued a buffer for |
| 7192 | // presentation, until the buffer was actually presented to the |
| 7193 | // display. |
| 7194 | optional FrameTimingHistogram post_to_present = 5 |
| 7195 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7196 | // Set of timings measured from when a buffer is ready to be presented, |
| 7197 | // until the buffer was actually presented to the display. |
| 7198 | optional FrameTimingHistogram acquire_to_present = 6 |
| 7199 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7200 | // Set of timings measured from when a buffer was latched by |
| 7201 | // SurfaceFlinger, until the buffer was presented to the display |
| 7202 | optional FrameTimingHistogram latch_to_present = 7 |
| 7203 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7204 | // Set of timings measured from the desired presentation to the actual |
| 7205 | // presentation time |
| 7206 | optional FrameTimingHistogram desired_to_present = 8 |
| 7207 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7208 | // Set of timings measured from when an app queued a buffer for |
| 7209 | // presentation, until the buffer was ready to be presented. |
| 7210 | optional FrameTimingHistogram post_to_acquire = 9 |
| 7211 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7212 | } |
| 7213 | |
| 7214 | /** |
| 7215 | * Histogram of frame counts bucketed by time in milliseconds. |
| 7216 | * Because of size limitations, we hard-cap the number of buckets, with |
| 7217 | * buckets for corresponding to larger milliseconds being less precise. |
| 7218 | */ |
| 7219 | message FrameTimingHistogram { |
| 7220 | // Timings in milliseconds that describes a set of histogram buckets |
| 7221 | repeated int32 time_millis_buckets = 1; |
| 7222 | // Number of frames that match to each time_millis, i.e. the bucket |
| 7223 | // contents |
| 7224 | // It's required that len(time_millis) == len(frame_count) |
| 7225 | repeated int64 frame_counts = 2; |
| 7226 | } |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 7227 | |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 7228 | /** |
| 7229 | * Information about camera facing and API level usage. |
| 7230 | * Logged from: |
| 7231 | * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java |
| 7232 | */ |
| 7233 | message CameraActionEvent { |
| 7234 | // Camera session duration |
| 7235 | optional int64 duration = 1; |
| 7236 | |
| 7237 | // Camera API level used |
| 7238 | optional int32 api_level = 2; |
| 7239 | |
| 7240 | // Name of client package |
| 7241 | optional string package_name = 3; |
| 7242 | |
| 7243 | // Camera facing |
| 7244 | enum Facing { |
| 7245 | UNKNOWN = 0; |
| 7246 | BACK = 1; |
| 7247 | FRONT = 2; |
| 7248 | EXTERNAL = 3; |
| 7249 | } |
| 7250 | optional Facing facing = 4; |
| 7251 | } |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 7252 | |
| 7253 | /** |
| 7254 | * Logs when a compatibility change is affecting an app. |
| 7255 | * |
| 7256 | * Logged from: |
| 7257 | * frameworks/base/core/java/android/app/AppCompatCallbacks.java and |
| 7258 | * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java |
| 7259 | */ |
| 7260 | message AppCompatibilityChangeReported { |
| 7261 | // The UID of the app being affected by the compatibilty change. |
| 7262 | optional int32 uid = 1 [(is_uid) = true]; |
| 7263 | |
| 7264 | // The ID of the change affecting the app. |
| 7265 | optional int64 change_id = 2; |
| 7266 | |
| 7267 | enum State { |
| 7268 | UNKNOWN_STATE = 0; |
| 7269 | ENABLED = 1; |
| 7270 | DISABLED = 2; |
| 7271 | LOGGED = 3; |
| 7272 | } |
| 7273 | |
| 7274 | // The state of the change - if logged from gating whether it was enabled or disabled, or just |
| 7275 | // logged otherwise. |
| 7276 | optional State state = 3; |
| 7277 | |
| 7278 | enum Source { |
| 7279 | UNKNOWN_SOURCE = 0; |
| 7280 | APP_PROCESS = 1; |
| 7281 | SYSTEM_SERVER = 2; |
| 7282 | } |
| 7283 | |
| 7284 | // Where it was logged from. |
| 7285 | optional Source source = 4; |
| 7286 | |
| 7287 | } |
Hector Dearman | 40579f6 | 2019-11-01 13:19:30 +0000 | [diff] [blame] | 7288 | |
| 7289 | /** |
| 7290 | * Logged from |
| 7291 | * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc |
| 7292 | */ |
| 7293 | message PerfettoUploaded { |
| 7294 | enum Event { |
| 7295 | PERFETTO_UNDEFINED = 0; |
| 7296 | PERFETTO_TRACE_BEGIN = 1; |
| 7297 | PERFETTO_BACKGROUND_TRACE_BEGIN = 2; |
| 7298 | PERFETTO_ON_CONNECT = 3; |
| 7299 | PERFETTO_ON_TRACING_DISABLED = 4; |
| 7300 | PERFETTO_UPLOAD_DROPBOX_BEGIN = 5; |
| 7301 | PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6; |
| 7302 | PERFETTO_UPLOAD_DROPBOX_FAILURE = 7; |
| 7303 | PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; |
| 7304 | PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9; |
| 7305 | PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; |
| 7306 | PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; |
| 7307 | PERFETTO_TRIGGER_BEGIN = 12; |
| 7308 | PERFETTO_TRIGGER_SUCCESS = 13; |
| 7309 | PERFETTO_TRIGGER_FAILURE = 14; |
| 7310 | PERFETTO_HIT_GUARDRAILS = 15; |
| 7311 | PERFETTO_ON_TIMEOUT = 16; |
| 7312 | PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; |
| 7313 | } |
| 7314 | |
| 7315 | // Which stage of the pipeline we are reporting from. |
| 7316 | optional Event event = 1; |
| 7317 | |
| 7318 | // UUID matching the one set inside the SystemInfo trace packet. |
| 7319 | optional int64 trace_uuid_lsb = 2; |
| 7320 | optional int64 trace_uuid_msb = 3; |
| 7321 | } |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 7322 | |
| 7323 | /** |
| 7324 | * Pulls client metrics on data transferred via Vehicle Maps Service. |
| 7325 | * Metrics are keyed by uid + layer. |
| 7326 | * |
| 7327 | * Pulled from: |
| 7328 | * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java |
| 7329 | */ |
| 7330 | message VmsClientStats { |
| 7331 | // UID of the VMS client app |
| 7332 | optional int32 uid = 1 [(is_uid) = true]; |
| 7333 | |
| 7334 | // VMS layer definition |
| 7335 | optional int32 layer_type = 2; |
| 7336 | optional int32 layer_channel = 3; |
| 7337 | optional int32 layer_version = 4; |
| 7338 | |
| 7339 | // Bytes and packets sent by the client for the layer |
| 7340 | optional int64 tx_bytes = 5; |
| 7341 | optional int64 tx_packets = 6; |
| 7342 | |
| 7343 | // Bytes and packets received by the client for the layer |
| 7344 | optional int64 rx_bytes = 7; |
| 7345 | optional int64 rx_packets = 8; |
| 7346 | |
| 7347 | // Bytes and packets dropped due to client error |
| 7348 | optional int64 dropped_bytes = 9; |
| 7349 | optional int64 dropped_packets = 10; |
| 7350 | } |