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"; |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 25 | import "frameworks/base/core/proto/android/app/settings_enums.proto"; |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 26 | import "frameworks/base/core/proto/android/app/job/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"; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 43 | import "frameworks/base/core/proto/android/stats/enums.proto"; |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 44 | import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.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"; |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 47 | import "frameworks/base/core/proto/android/stats/launcher/launcher.proto"; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 48 | import "frameworks/base/core/proto/android/telecomm/enums.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 49 | import "frameworks/base/core/proto/android/telephony/enums.proto"; |
| 50 | import "frameworks/base/core/proto/android/view/enums.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 51 | import "frameworks/base/core/proto/android/wifi/enums.proto"; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 52 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 53 | /** |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 54 | * The master atom class. This message defines all of the available |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 55 | * raw stats log events from the Android system, also known as "atoms." |
| 56 | * |
| 57 | * This field contains a single oneof with all of the available messages. |
| 58 | * The stats-log-api-gen tool runs as part of the Android build and |
| 59 | * generates the android.util.StatsLog class, which contains the constants |
| 60 | * and methods that Android uses to log. |
| 61 | * |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 62 | * This Atom class is not actually built into the Android system. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 63 | * Instead, statsd on Android constructs these messages synthetically, |
| 64 | * in the format defined here and in stats_log.proto. |
| 65 | */ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 66 | message Atom { |
| 67 | // Pushed atoms start at 2. |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 68 | oneof pushed { |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 69 | // For StatsLog reasons, 1 is illegal and will not work. Must start at 2. |
| 70 | BleScanStateChanged ble_scan_state_changed = 2; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 71 | ProcessStateChanged process_state_changed = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 72 | BleScanResultReceived ble_scan_result_received = 4; |
| 73 | SensorStateChanged sensor_state_changed = 5; |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 74 | GpsScanStateChanged gps_scan_state_changed = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 75 | SyncStateChanged sync_state_changed = 7; |
| 76 | ScheduledJobStateChanged scheduled_job_state_changed = 8; |
| 77 | ScreenBrightnessChanged screen_brightness_changed = 9; |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 78 | WakelockStateChanged wakelock_state_changed = 10; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 79 | LongPartialWakelockStateChanged long_partial_wakelock_state_changed = 11; |
| 80 | MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12; |
| 81 | WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 82 | ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = 14; |
| 83 | MemoryFactorStateChanged memory_factor_state_changed = 15; |
| 84 | ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16; |
| 85 | CachedKillReported cached_kill_reported = 17; |
| 86 | ProcessMemoryStatReported process_memory_stat_reported = 18; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 87 | LauncherUIChanged launcher_event = 19; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 88 | BatterySaverModeStateChanged battery_saver_mode_state_changed = 20; |
| 89 | DeviceIdleModeStateChanged device_idle_mode_state_changed = 21; |
| 90 | DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 91 | AudioStateChanged audio_state_changed = 23; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 92 | MediaCodecStateChanged media_codec_state_changed = 24; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 93 | CameraStateChanged camera_state_changed = 25; |
| 94 | FlashlightStateChanged flashlight_state_changed = 26; |
| 95 | UidProcessStateChanged uid_process_state_changed = 27; |
| 96 | ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28; |
| 97 | ScreenStateChanged screen_state_changed = 29; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 98 | BatteryLevelChanged battery_level_changed = 30; |
| 99 | ChargingStateChanged charging_state_changed = 31; |
| 100 | PluggedStateChanged plugged_state_changed = 32; |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 101 | InteractiveStateChanged interactive_state_changed = 33; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 102 | TouchEventReported touch_event_reported = 34; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 103 | WakeupAlarmOccurred wakeup_alarm_occurred = 35; |
| 104 | KernelWakeupReported kernel_wakeup_reported = 36; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 105 | WifiLockStateChanged wifi_lock_state_changed = 37; |
| 106 | WifiSignalStrengthChanged wifi_signal_strength_changed = 38; |
| 107 | WifiScanStateChanged wifi_scan_state_changed = 39; |
| 108 | PhoneSignalStrengthChanged phone_signal_strength_changed = 40; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 109 | SettingChanged setting_changed = 41; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 110 | ActivityForegroundStateChanged activity_foreground_state_changed = 42; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 111 | IsolatedUidChanged isolated_uid_changed = 43; |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 112 | PacketWakeupOccurred packet_wakeup_occurred = 44; |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 113 | WallClockTimeShifted wall_clock_time_shifted = 45; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 114 | AnomalyDetected anomaly_detected = 46; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 115 | AppBreadcrumbReported app_breadcrumb_reported = 47 [(allow_from_any_uid) = true]; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 116 | AppStartOccurred app_start_occurred = 48; |
| 117 | AppStartCanceled app_start_canceled = 49; |
| 118 | AppStartFullyDrawn app_start_fully_drawn = 50; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 119 | LmkKillOccurred lmk_kill_occurred = 51; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 120 | PictureInPictureStateChanged picture_in_picture_state_changed = 52; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 121 | WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 122 | LmkStateChanged lmk_state_changed = 54; |
| 123 | AppStartMemoryStateCaptured app_start_memory_state_captured = 55; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 124 | ShutdownSequenceReported shutdown_sequence_reported = 56; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 125 | BootSequenceReported boot_sequence_reported = 57; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 126 | DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 127 | OverlayStateChanged overlay_state_changed = 59; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 128 | ForegroundServiceStateChanged foreground_service_state_changed = 60; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 129 | CallStateChanged call_state_changed = 61; |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 130 | KeyguardStateChanged keyguard_state_changed = 62; |
| 131 | KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63; |
| 132 | KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 133 | AppDied app_died = 65; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 134 | ResourceConfigurationChanged resource_configuration_changed = 66; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 135 | BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67; |
| 136 | BluetoothConnectionStateChanged bluetooth_connection_state_changed = 68; |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 137 | GpsSignalQualityChanged gps_signal_quality_changed = 69; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 138 | UsbConnectorStateChanged usb_connector_state_changed = 70; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 139 | SpeakerImpedanceReported speaker_impedance_reported = 71; |
| 140 | HardwareFailed hardware_failed = 72; |
| 141 | PhysicalDropDetected physical_drop_detected = 73; |
| 142 | ChargeCyclesReported charge_cycles_reported = 74; |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 143 | MobileConnectionStateChanged mobile_connection_state_changed = 75; |
| 144 | MobileRadioTechnologyChanged mobile_radio_technology_changed = 76; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 145 | UsbDeviceAttached usb_device_attached = 77; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 146 | AppCrashOccurred app_crash_occurred = 78; |
| 147 | ANROccurred anr_occurred = 79; |
| 148 | WTFOccurred wtf_occurred = 80; |
| 149 | LowMemReported low_mem_reported = 81; |
Howard Ro | cb767f6 | 2018-06-19 19:58:05 -0700 | [diff] [blame] | 150 | GenericAtom generic_atom = 82; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 151 | KeyValuePairsAtom key_value_pairs_atom = 83; |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 152 | VibratorStateChanged vibrator_state_changed = 84; |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 153 | DeferredJobStatsReported deferred_job_stats_reported = 85; |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 154 | ThermalThrottlingStateChanged thermal_throttling = 86; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 155 | BiometricAcquired biometric_acquired = 87; |
| 156 | BiometricAuthenticated biometric_authenticated = 88; |
| 157 | BiometricErrorOccurred biometric_error_occurred = 89; |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 158 | Notification notification = 90; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 159 | BatteryHealthSnapshot battery_health_snapshot = 91; |
| 160 | SlowIo slow_io = 92; |
| 161 | BatteryCausedShutdown battery_caused_shutdown = 93; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 162 | PhoneServiceStateChanged phone_service_state_changed = 94; |
| 163 | PhoneStateChanged phone_state_changed = 95; |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 164 | UserRestrictionChanged user_restriction_changed = 96; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 165 | SettingsUIChanged settings_ui_changed = 97; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 166 | ConnectivityStateChanged connectivity_state_changed = 98; |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 167 | // TODO: service state change is very noisy shortly after boot, as well |
| 168 | // as at other transitions - coming out of doze, device plugged in, etc. |
| 169 | // Consider removing this if it becomes a problem |
| 170 | ServiceStateChanged service_state_changed = 99; |
| 171 | ServiceLaunchReported service_launch_reported = 100; |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 172 | FlagFlipUpdateOccurred flag_flip_update_occurred = 101; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 173 | BinaryPushStateChanged binary_push_state_changed = 102; |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 174 | DevicePolicyEvent device_policy_event = 103; |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 175 | DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104; |
| 176 | DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported = 105; |
| 177 | DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106; |
| 178 | DocsUIFileOperationReported docs_ui_provider_file_op = 107; |
| 179 | DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request = 108; |
| 180 | DocsUILaunchReported docs_ui_launch_reported = 109; |
| 181 | DocsUIRootVisitedReported docs_ui_root_visited = 110; |
| 182 | DocsUIStartupMsReported docs_ui_startup_ms = 111; |
| 183 | DocsUIUserActionReported docs_ui_user_action_reported = 112; |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 184 | WifiEnabledStateChanged wifi_enabled_state_changed = 113; |
| 185 | WifiRunningStateChanged wifi_running_state_changed = 114; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 186 | AppCompacted app_compacted = 115; |
lifr | 030d23a | 2019-01-11 16:54:51 +0800 | [diff] [blame] | 187 | NetworkDnsEventReported network_dns_event_reported = 116; |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 188 | DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = 117; |
| 189 | DocsUIPickResultReported docs_ui_pick_result_reported = 118; |
| 190 | DocsUISearchModeReported docs_ui_search_mode_reported = 119; |
| 191 | DocsUISearchTypeReported docs_ui_search_type_reported = 120; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 192 | DataStallEvent data_stall_event = 121; |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 193 | RescuePartyResetReported rescue_party_reset_reported = 122; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 194 | SignedConfigReported signed_config_reported = 123; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 195 | GnssNiEventReported gnss_ni_event_reported = 124; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 196 | BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = 125; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 197 | BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = 126; |
| 198 | BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = 127; |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 199 | AppDowngraded app_downgraded = 128; |
| 200 | AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; |
| 201 | LowStorageStateChanged low_storage_state_changed = 130; |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 202 | GnssNfwNotificationReported gnss_nfw_notification_reported = 131; |
| 203 | GnssConfigurationReported gnss_configuration_reported = 132; |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 204 | UsbPortOverheatEvent usb_port_overheat_event_reported = 133; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 205 | NfcErrorOccurred nfc_error_occurred = 134; |
| 206 | NfcStateChanged nfc_state_changed = 135; |
| 207 | NfcBeamOccurred nfc_beam_occurred = 136; |
| 208 | NfcCardemulationOccurred nfc_cardemulation_occurred = 137; |
| 209 | NfcTagOccurred nfc_tag_occurred = 138; |
| 210 | NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139; |
| 211 | SeStateChanged se_state_changed = 140; |
| 212 | SeOmapiReported se_omapi_reported = 141; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 213 | BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = 142; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 214 | AttentionManagerServiceResultReported attention_manager_service_result_reported = 143; |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 215 | AdbConnectionChanged adb_connection_changed = 144; |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 216 | SpeechDspStatReported speech_dsp_stat_reported = 145; |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 217 | UsbContaminantReported usb_contaminant_reported = 146; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 218 | WatchdogRollbackOccurred watchdog_rollback_occurred = 147; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 219 | BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = 148; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 220 | BubbleUIChanged bubble_ui_changed = 149; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 221 | ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 222 | BluetoothActiveDeviceChanged bluetooth_active_device_changed = 151; |
| 223 | BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = 152; |
| 224 | BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = 153; |
| 225 | BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = 154; |
| 226 | BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = 155; |
| 227 | BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = 156; |
| 228 | BluetoothDeviceRssiReported bluetooth_device_rssi_reported = 157; |
| 229 | BluetoothDeviceFailedContactCounterReported bluetooth_device_failed_contact_counter_reported = 158; |
| 230 | BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = 159; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 231 | BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = 160; |
| 232 | BluetoothQualityReportReported bluetooth_quality_report_reported = 161; |
| 233 | BluetoothManufacturerInfoReported bluetooth_device_info_reported = 162; |
| 234 | BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = 163; |
| 235 | BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = 164; |
| 236 | BluetoothBondStateChanged bluetooth_bond_state_changed = 165; |
| 237 | BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = 166; |
| 238 | BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 167; |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 239 | ScreenTimeoutExtensionReported screen_timeout_extension_reported = 168; |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 240 | ProcessStartTime process_start_time = 169; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 241 | PermissionGrantRequestResultReported permission_grant_request_result_reported = 170; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 242 | BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 243 | DeviceIdentifierAccessDenied device_identifier_access_denied = 172; |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 244 | BubbleDeveloperErrorReported bubble_developer_error_reported = 173; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 245 | AssistGestureStageReported assist_gesture_stage_reported = 174; |
| 246 | AssistGestureFeedbackReported assist_gesture_feedback_reported = 175; |
| 247 | AssistGestureProgressReported assist_gesture_progress_reported = 176; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 248 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 249 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 250 | // Pulled events will start at field 10000. |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 251 | // Next: 10048 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 252 | oneof pulled { |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 253 | WifiBytesTransfer wifi_bytes_transfer = 10000; |
| 254 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001; |
| 255 | MobileBytesTransfer mobile_bytes_transfer = 10002; |
| 256 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 257 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 258 | KernelWakelock kernel_wakelock = 10004; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 259 | SubsystemSleepState subsystem_sleep_state = 10005; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 260 | CpuTimePerFreq cpu_time_per_freq = 10008; |
| 261 | CpuTimePerUid cpu_time_per_uid = 10009; |
| 262 | CpuTimePerUidFreq cpu_time_per_uid_freq = 10010; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 263 | WifiActivityInfo wifi_activity_info = 10011; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 264 | ModemActivityInfo modem_activity_info = 10012; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 265 | BluetoothActivityInfo bluetooth_activity_info = 10007; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 266 | ProcessMemoryState process_memory_state = 10013; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 267 | SystemElapsedRealtime system_elapsed_realtime = 10014; |
| 268 | SystemUptime system_uptime = 10015; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 269 | CpuActiveTime cpu_active_time = 10016; |
| 270 | CpuClusterTime cpu_cluster_time = 10017; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 271 | DiskSpace disk_space = 10018 [deprecated=true]; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 272 | RemainingBatteryCapacity remaining_battery_capacity = 10019; |
| 273 | FullBatteryCapacity full_battery_capacity = 10020; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 274 | Temperature temperature = 10021; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 275 | BinderCalls binder_calls = 10022; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 276 | BinderCallsExceptions binder_calls_exceptions = 10023; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 277 | LooperStats looper_stats = 10024; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 278 | DiskStats disk_stats = 10025; |
| 279 | DirectoryUsage directory_usage = 10026; |
| 280 | AppSize app_size = 10027; |
| 281 | CategorySize category_size = 10028; |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 282 | ProcStats proc_stats = 10029; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 283 | BatteryVoltage battery_voltage = 10030; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 284 | NumBiometricsEnrolled num_fingerprints_enrolled = 10031; |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 285 | DiskIo disk_io = 10032; |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 286 | PowerProfile power_profile = 10033; |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 287 | ProcStatsPkgProc proc_stats_pkg_proc = 10034; |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 288 | ProcessCpuTime process_cpu_time = 10035; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 289 | NativeProcessMemoryState native_process_memory_state = 10036; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 290 | CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037; |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 291 | OnDevicePowerMeasurement on_device_power_measurement = 10038; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 292 | DeviceCalculatedPowerUse device_calculated_power_use = 10039; |
| 293 | DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = 10040; |
| 294 | DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = 10041; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 295 | ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042; |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 296 | BatteryLevel battery_level = 10043; |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 297 | BuildInformation build_information = 10044; |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 298 | BatteryCycleCount battery_cycle_count = 10045; |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 299 | DebugElapsedClock debug_elapsed_clock = 10046; |
| 300 | DebugFailingElapsedClock debug_failing_elapsed_clock = 10047; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 301 | NumBiometricsEnrolled num_faces_enrolled = 10048; |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 302 | RoleHolder role_holder = 10049; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 303 | DangerousPermissionState dangerous_permission_state = 10050; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 304 | TrainInfo train_info = 10051; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 305 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 306 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 307 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 308 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 309 | // Field numbers 200,000 and above are reserved for future use; do not use them at all. |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 310 | } |
| 311 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 312 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 313 | * This proto represents a node of an attribution chain. |
| 314 | * Note: All attribution chains are represented as a repeated field of type |
| 315 | * AttributionNode. It is understood that in such arrays, the order is that |
| 316 | * 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] | 317 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 318 | message AttributionNode { |
| 319 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 320 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 321 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 322 | // The (optional) string tag for an element in the attribution chain. If the |
| 323 | // element has no tag, it is encoded as an empty string. |
| 324 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 325 | } |
| 326 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 327 | message KeyValuePair { |
| 328 | optional int32 key = 1; |
| 329 | oneof value { |
Howard Ro | 4078dd4 | 2018-09-27 17:41:08 -0700 | [diff] [blame] | 330 | int32 value_int = 2; |
| 331 | int64 value_long = 3; |
| 332 | string value_str = 4; |
| 333 | float value_float = 5; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 334 | } |
| 335 | } |
| 336 | |
| 337 | message KeyValuePairsAtom { |
| 338 | optional int32 uid = 1; |
| 339 | repeated KeyValuePair pairs = 2; |
| 340 | } |
| 341 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 342 | /* |
| 343 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 344 | * 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] | 345 | * |
| 346 | * RULES: |
| 347 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 348 | * Skipping field ids is not allowed. |
| 349 | * - These form an API, so renaming, renumbering or removing fields is |
| 350 | * not allowed between android releases. (This is not currently enforced, |
| 351 | * but there will be a tool to enforce this restriction). |
| 352 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 353 | * are allowed (yet). The bytes type is also not allowed. |
| 354 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 355 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 356 | * - 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] | 357 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 358 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 359 | * annotation. The generated code on android will be represented by UIDs, |
| 360 | * and those UIDs will be translated in xxx to those strings. |
| 361 | * |
| 362 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 363 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 364 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 365 | * ***************************************************************************** |
| 366 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 367 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 368 | /** |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 369 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 370 | * |
| 371 | * Logged from: |
| 372 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 373 | */ |
| 374 | message ThermalThrottlingStateChanged { |
| 375 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 376 | |
| 377 | enum State { |
| 378 | UNKNOWN = 0; |
| 379 | START = 1; |
| 380 | STOP = 2; |
| 381 | } |
| 382 | |
| 383 | optional State state = 2; |
| 384 | |
| 385 | optional float temperature = 3; |
| 386 | } |
| 387 | |
| 388 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 389 | * Logs when the screen state changes. |
| 390 | * |
| 391 | * Logged from: |
| 392 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 393 | */ |
| 394 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 395 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 396 | optional android.view.DisplayStateEnum state = 1 [(state_field_option).option = EXCLUSIVE]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 397 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 398 | |
| 399 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 400 | * Logs that the process state of the uid, as determined by ActivityManager |
| 401 | * (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] | 402 | * |
| 403 | * Logged from: |
| 404 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 405 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 406 | message UidProcessStateChanged { |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 407 | optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 408 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 409 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 410 | optional android.app.ProcessStateEnum state = 2 [(state_field_option).option = EXCLUSIVE]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 411 | } |
| 412 | |
| 413 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 414 | * Logs process state change of a process, as per the activity manager. |
| 415 | * |
| 416 | * Logged from: |
| 417 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 418 | */ |
| 419 | message ProcessStateChanged { |
| 420 | optional int32 uid = 1; |
| 421 | optional string process_name = 2; |
| 422 | optional string package_name = 3; |
| 423 | // TODO: remove this when validation is done |
| 424 | optional int64 version = 5; |
| 425 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 426 | optional android.app.ProcessStateEnum state = 4; |
| 427 | } |
| 428 | |
| 429 | /** |
| 430 | * Logs when ActivityManagerService sleep state is changed. |
| 431 | * |
| 432 | * Logged from: |
| 433 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 434 | */ |
| 435 | message ActivityManagerSleepStateChanged { |
| 436 | // TODO: import frameworks proto |
| 437 | enum State { |
| 438 | UNKNOWN = 0; |
| 439 | ASLEEP = 1; |
| 440 | AWAKE = 2; |
| 441 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 442 | optional State state = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 443 | } |
| 444 | |
| 445 | /** |
| 446 | * Logs when system memory state changes. |
| 447 | * |
| 448 | * Logged from: |
| 449 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 450 | */ |
| 451 | message MemoryFactorStateChanged { |
| 452 | // TODO: import frameworks proto |
| 453 | enum State { |
| 454 | MEMORY_UNKNOWN = 0; |
| 455 | NORMAL = 1; // normal. |
| 456 | MODERATE = 2; // moderate memory pressure. |
| 457 | LOW = 3; // low memory. |
| 458 | CRITICAL = 4; // critical memory. |
| 459 | |
| 460 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 461 | optional State factor = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 462 | } |
| 463 | |
| 464 | /** |
| 465 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 466 | * |
| 467 | * Logged from: |
| 468 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 469 | */ |
| 470 | message ExcessiveCpuUsageReported { |
| 471 | optional int32 uid = 1; |
| 472 | optional string process_name = 2; |
| 473 | optional string package_name = 3; |
| 474 | // package version. TODO: remove this when validation is done |
| 475 | optional int64 version = 4; |
| 476 | } |
| 477 | |
| 478 | /** |
| 479 | * Logs when a cached process is killed, along with its pss. |
| 480 | * |
| 481 | * Logged from: |
| 482 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 483 | */ |
| 484 | message CachedKillReported { |
| 485 | optional int32 uid = 1; |
| 486 | optional string process_name = 2; |
| 487 | optional string package_name = 3; |
| 488 | // TODO: remove this when validation is done |
| 489 | optional int64 version = 5; |
| 490 | optional int64 pss = 4; |
| 491 | } |
| 492 | |
| 493 | /** |
| 494 | * Logs when memory stats of a process is reported. |
| 495 | * |
| 496 | * Logged from: |
| 497 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 498 | */ |
| 499 | message ProcessMemoryStatReported { |
| 500 | optional int32 uid = 1; |
| 501 | optional string process_name = 2; |
| 502 | optional string package_name = 3; |
| 503 | //TODO: remove this when validation is done |
| 504 | optional int64 version = 9; |
| 505 | optional int64 pss = 4; |
| 506 | optional int64 uss = 5; |
| 507 | optional int64 rss = 6; |
| 508 | enum Type { |
| 509 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 510 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 511 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 512 | ADD_PSS_EXTERNAL = 3; |
| 513 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 514 | } |
| 515 | optional Type type = 7; |
| 516 | optional int64 duration = 8; |
| 517 | } |
| 518 | |
| 519 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 520 | * Logs that a process started, finished, crashed, or ANRed. |
| 521 | * |
| 522 | * Logged from: |
| 523 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 524 | */ |
| 525 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 526 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 527 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 528 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 529 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 530 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 531 | // What lifecycle state the process changed to. |
| 532 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 533 | enum State { |
| 534 | FINISHED = 0; |
| 535 | STARTED = 1; |
| 536 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 537 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 538 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 539 | } |
| 540 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 541 | /** |
| 542 | * Logs when the ble scan state changes. |
| 543 | * |
| 544 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 545 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 546 | */ |
| 547 | message BleScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 548 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 549 | |
| 550 | enum State { |
| 551 | OFF = 0; |
| 552 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 553 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 554 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 555 | } |
| 556 | optional State state = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 557 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 558 | // Does the scan have a filter. |
| 559 | optional bool is_filtered = 3; |
| 560 | // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally. |
| 561 | optional bool is_first_match = 4; |
| 562 | // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC). |
| 563 | optional bool is_opportunistic = 5; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 564 | } |
| 565 | |
| 566 | /** |
| 567 | * Logs reporting of a ble scan finding results. |
| 568 | * |
| 569 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 570 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 571 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 572 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 573 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 574 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 575 | |
| 576 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 577 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 578 | } |
| 579 | |
| 580 | /** |
| 581 | * Logs when a sensor state changes. |
| 582 | * |
| 583 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 584 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 585 | */ |
| 586 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 587 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 588 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 589 | // The id (int) of the sensor. |
| 590 | optional int32 sensor_id = 2; |
| 591 | |
| 592 | enum State { |
| 593 | OFF = 0; |
| 594 | ON = 1; |
| 595 | } |
| 596 | optional State state = 3; |
| 597 | } |
| 598 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 599 | /** |
| 600 | * Logs when GPS state changes. |
| 601 | * |
| 602 | * Logged from: |
| 603 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 604 | */ |
| 605 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 606 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 607 | |
| 608 | enum State { |
| 609 | OFF = 0; |
| 610 | ON = 1; |
| 611 | } |
| 612 | optional State state = 2; |
| 613 | } |
| 614 | |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 615 | /** |
| 616 | * Logs when GPS signal quality. |
| 617 | * |
| 618 | * Logged from: |
| 619 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 620 | */ |
| 621 | message GpsSignalQualityChanged { |
| 622 | optional android.server.location.GpsSignalQualityEnum level = 1; |
| 623 | } |
| 624 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 625 | |
| 626 | /** |
| 627 | * Logs when a sync manager sync state changes. |
| 628 | * |
| 629 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 630 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 631 | */ |
| 632 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 633 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 634 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 635 | // 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] | 636 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 637 | |
| 638 | enum State { |
| 639 | OFF = 0; |
| 640 | ON = 1; |
| 641 | } |
| 642 | optional State state = 3; |
| 643 | } |
| 644 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 645 | /* |
| 646 | * Deferred job stats. |
| 647 | * |
| 648 | * Logged from: |
| 649 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 650 | */ |
| 651 | message DeferredJobStatsReported { |
| 652 | repeated AttributionNode attribution_node = 1; |
| 653 | |
| 654 | // Number of jobs deferred. |
| 655 | optional int32 num_jobs_deferred = 2; |
| 656 | |
| 657 | // Time since the last job runs. |
| 658 | optional int64 time_since_last_job_millis = 3; |
| 659 | } |
| 660 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 661 | /** |
| 662 | * Logs when a job scheduler job state changes. |
| 663 | * |
| 664 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 665 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 666 | */ |
| 667 | message ScheduledJobStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 668 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 669 | |
| 670 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 671 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 672 | |
| 673 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 674 | FINISHED = 0; |
| 675 | STARTED = 1; |
| 676 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 677 | } |
| 678 | optional State state = 3; |
| 679 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 680 | // The reason a job has stopped. |
| 681 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 682 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 683 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 684 | } |
| 685 | |
| 686 | /** |
| 687 | * Logs when the audio state changes. |
| 688 | * |
| 689 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 690 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 691 | */ |
| 692 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 693 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 694 | |
| 695 | enum State { |
| 696 | OFF = 0; |
| 697 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 698 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 699 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 700 | } |
| 701 | optional State state = 2; |
| 702 | } |
| 703 | |
| 704 | /** |
| 705 | * Logs when the video codec state changes. |
| 706 | * |
| 707 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 708 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 709 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 710 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 711 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 712 | |
| 713 | enum State { |
| 714 | OFF = 0; |
| 715 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 716 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 717 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 718 | } |
| 719 | optional State state = 2; |
| 720 | } |
| 721 | |
| 722 | /** |
| 723 | * Logs when the flashlight state changes. |
| 724 | * |
| 725 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 726 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 727 | */ |
| 728 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 729 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 730 | |
| 731 | enum State { |
| 732 | OFF = 0; |
| 733 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 734 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 735 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 736 | } |
| 737 | optional State state = 2; |
| 738 | } |
| 739 | |
| 740 | /** |
| 741 | * Logs when the camera state changes. |
| 742 | * |
| 743 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 744 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 745 | */ |
| 746 | message CameraStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 747 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 748 | |
| 749 | enum State { |
| 750 | OFF = 0; |
| 751 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 752 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 753 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 754 | } |
| 755 | optional State state = 2; |
| 756 | } |
| 757 | |
| 758 | /** |
| 759 | * 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] | 760 | * |
| 761 | * Logged from: |
| 762 | * TODO |
| 763 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 764 | message WakelockStateChanged { |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 765 | repeated AttributionNode attribution_node = 1; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 766 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 767 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 768 | // From frameworks/base/core/proto/android/os/enums.proto. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 769 | optional android.os.WakeLockLevelEnum type = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 770 | |
| 771 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 772 | optional string tag = 3; |
| 773 | |
| 774 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 775 | RELEASE = 0; |
| 776 | ACQUIRE = 1; |
| 777 | CHANGE_RELEASE = 2; |
| 778 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 779 | } |
| 780 | optional State state = 4; |
| 781 | } |
| 782 | |
| 783 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 784 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 785 | * |
| 786 | * Logged from: |
| 787 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 788 | */ |
| 789 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 790 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 791 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 792 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 793 | optional string tag = 2; |
| 794 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 795 | // TODO: I have no idea what this is. |
| 796 | optional string history_tag = 3; |
| 797 | |
| 798 | enum State { |
| 799 | OFF = 0; |
| 800 | ON = 1; |
| 801 | } |
| 802 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 803 | } |
| 804 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 805 | /** |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 806 | * Logs when the device is interactive, according to the PowerManager Notifier. |
| 807 | * |
| 808 | * Logged from: |
| 809 | * frameworks/base/services/core/java/com/android/server/power/Notifier.java |
| 810 | */ |
| 811 | message InteractiveStateChanged { |
| 812 | enum State { |
| 813 | OFF = 0; |
| 814 | ON = 1; |
| 815 | } |
| 816 | optional State state = 1; |
| 817 | } |
| 818 | |
| 819 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 820 | * Logs Battery Saver state change. |
| 821 | * |
| 822 | * Logged from: |
| 823 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 824 | */ |
| 825 | message BatterySaverModeStateChanged { |
| 826 | enum State { |
| 827 | OFF = 0; |
| 828 | ON = 1; |
| 829 | } |
| 830 | optional State state = 1; |
| 831 | } |
| 832 | |
| 833 | /** |
| 834 | * Logs Doze mode state change. |
| 835 | * |
| 836 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 837 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 838 | */ |
| 839 | message DeviceIdleModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 840 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 841 | } |
| 842 | |
| 843 | |
| 844 | /** |
| 845 | * Logs state change of Doze mode including maintenance windows. |
| 846 | * |
| 847 | * Logged from: |
| 848 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 849 | */ |
| 850 | message DeviceIdlingModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 851 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 852 | } |
| 853 | |
| 854 | /** |
| 855 | * Logs screen brightness level. |
| 856 | * |
| 857 | * Logged from: |
| 858 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 859 | */ |
| 860 | message ScreenBrightnessChanged { |
| 861 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 862 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 863 | } |
| 864 | |
| 865 | /** |
| 866 | * Logs battery level (percent full, from 0 to 100). |
| 867 | * |
| 868 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 869 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 870 | */ |
| 871 | message BatteryLevelChanged { |
| 872 | // Battery level. Should be in [0, 100]. |
| 873 | optional int32 battery_level = 1; |
| 874 | } |
| 875 | |
| 876 | /** |
| 877 | * Logs change in charging status of the device. |
| 878 | * |
| 879 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 880 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 881 | */ |
| 882 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 883 | // State of the battery, from frameworks/base/core/proto/android/os/enums.proto. |
| 884 | optional android.os.BatteryStatusEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 885 | } |
| 886 | |
| 887 | /** |
| 888 | * Logs whether the device is plugged in, and what power source it is using. |
| 889 | * |
| 890 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 891 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 892 | */ |
| 893 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 894 | // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto. |
| 895 | optional android.os.BatteryPluggedStateEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 896 | } |
| 897 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 898 | /** |
| 899 | * Logs when an app's wakeup alarm fires. |
| 900 | * |
| 901 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 902 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 903 | */ |
| 904 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 905 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 906 | |
| 907 | // Name of the wakeup alarm. |
| 908 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame] | 909 | |
| 910 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 911 | optional string package_name = 3; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 912 | } |
| 913 | |
| 914 | /** |
| 915 | * Logs when an an app causes the mobile radio to change state. |
| 916 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 917 | * |
| 918 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 919 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 920 | */ |
| 921 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 922 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 923 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 924 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 925 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 926 | } |
| 927 | |
| 928 | /** |
| 929 | * Logs when an an app causes the wifi radio to change state. |
| 930 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 931 | * |
| 932 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 933 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 934 | */ |
| 935 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 936 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 937 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 938 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 939 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 940 | } |
| 941 | |
| 942 | /** |
| 943 | * Logs kernel wakeup reasons and aborts. |
| 944 | * |
| 945 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 946 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 947 | */ |
| 948 | message KernelWakeupReported { |
| 949 | // Name of the kernel wakeup reason (or abort). |
| 950 | optional string wakeup_reason_name = 1; |
| 951 | |
| 952 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 953 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 954 | } |
| 955 | |
| 956 | /** |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 957 | * Logs when Wifi is toggled on/off. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 958 | * 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] | 959 | * |
| 960 | * Logged from: |
| 961 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 962 | */ |
| 963 | message WifiEnabledStateChanged { |
| 964 | enum State { |
| 965 | OFF = 0; |
| 966 | ON = 1; |
| 967 | } |
| 968 | optional State state = 1; |
| 969 | } |
| 970 | |
| 971 | /** |
| 972 | * 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] | 973 | * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'. |
| 974 | * Note that Wifi Scanning is monitored separately in WifiScanStateChanged. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 975 | * |
| 976 | * Logged from: |
| 977 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 978 | */ |
| 979 | message WifiRunningStateChanged { |
| 980 | repeated AttributionNode attribution_node = 1; |
| 981 | |
| 982 | enum State { |
| 983 | OFF = 0; |
| 984 | ON = 1; |
| 985 | } |
| 986 | optional State state = 2; |
| 987 | } |
| 988 | |
| 989 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 990 | * Logs wifi locks held by an app. |
| 991 | * |
| 992 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 993 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 994 | */ |
| 995 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 996 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 997 | |
| 998 | enum State { |
| 999 | OFF = 0; |
| 1000 | ON = 1; |
| 1001 | } |
| 1002 | optional State state = 2; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 1003 | |
| 1004 | // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto. |
| 1005 | optional android.net.wifi.WifiModeEnum mode = 3; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1006 | } |
| 1007 | |
| 1008 | /** |
| 1009 | * Logs wifi signal strength changes. |
| 1010 | * |
| 1011 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1012 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1013 | */ |
| 1014 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1015 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1016 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1017 | } |
| 1018 | |
| 1019 | /** |
| 1020 | * Logs wifi scans performed by an app. |
| 1021 | * |
| 1022 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1023 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1024 | */ |
| 1025 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1026 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1027 | |
| 1028 | enum State { |
| 1029 | OFF = 0; |
| 1030 | ON = 1; |
| 1031 | } |
| 1032 | optional State state = 2; |
| 1033 | } |
| 1034 | |
| 1035 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1036 | * Logs wifi multicast locks held by an app |
| 1037 | * |
| 1038 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1039 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1040 | */ |
| 1041 | message WifiMulticastLockStateChanged { |
| 1042 | repeated AttributionNode attribution_node = 1; |
| 1043 | |
| 1044 | enum State { |
| 1045 | OFF = 0; |
| 1046 | ON = 1; |
| 1047 | } |
| 1048 | optional State state = 2; |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1049 | |
| 1050 | optional string tag = 3; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1051 | } |
| 1052 | |
| 1053 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1054 | * Logs shutdown reason and duration on next boot. |
| 1055 | * |
| 1056 | * Logged from: |
| 1057 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 1058 | */ |
| 1059 | message ShutdownSequenceReported { |
| 1060 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 1061 | optional bool reboot = 1; |
| 1062 | |
| 1063 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 1064 | optional string reason = 2; |
| 1065 | |
| 1066 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 1067 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1068 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1069 | |
| 1070 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1071 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1072 | } |
| 1073 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1074 | |
| 1075 | /** |
| 1076 | * Logs boot reason and duration. |
| 1077 | * |
| 1078 | * Logged from: |
| 1079 | * system/core/bootstat/bootstat.cpp |
| 1080 | */ |
| 1081 | message BootSequenceReported { |
| 1082 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 1083 | // Default: "<EMPTY>" if not available. |
| 1084 | optional string bootloader_reason = 1; |
| 1085 | |
| 1086 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 1087 | // Default: "<EMPTY>" if not available. |
| 1088 | optional string system_reason = 2; |
| 1089 | |
| 1090 | // 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] | 1091 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1092 | |
| 1093 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1094 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1095 | |
| 1096 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1097 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1098 | |
| 1099 | // Time since last boot in ms. Default: 0 if not available. |
| 1100 | optional int64 time_since_last_boot = 6; |
| 1101 | } |
| 1102 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 1103 | |
| 1104 | /** |
| 1105 | * Logs call state and disconnect cause (if applicable). |
| 1106 | * |
| 1107 | * Logged from: |
| 1108 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 1109 | */ |
| 1110 | message CallStateChanged { |
| 1111 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 1112 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1113 | optional android.telecom.CallStateEnum call_state = 1; |
| 1114 | |
| 1115 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 1116 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 1117 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 1118 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1119 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 1120 | |
| 1121 | // True if the call is self-managed, which are apps that use the |
| 1122 | // telecom infrastructure to make their own calls. |
| 1123 | optional bool self_managed = 3; |
| 1124 | |
| 1125 | // True if call is external. External calls are calls on connected Wear |
| 1126 | // devices but show up in Telecom so the user can pull them onto the device. |
| 1127 | optional bool external_call = 4; |
| 1128 | } |
| 1129 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1130 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1131 | * Logs keyguard state. The keyguard is the lock screen. |
| 1132 | * |
| 1133 | * Logged from: |
| 1134 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 1135 | */ |
| 1136 | message KeyguardStateChanged { |
| 1137 | enum State { |
| 1138 | UNKNOWN = 0; |
| 1139 | // The keyguard is hidden when the phone is unlocked. |
| 1140 | HIDDEN = 1; |
| 1141 | // The keyguard is shown when the phone is locked (screen turns off). |
| 1142 | SHOWN= 2; |
| 1143 | // The keyguard is occluded when something is overlaying the keyguard. |
| 1144 | // Eg. Opening the camera while on the lock screen. |
| 1145 | OCCLUDED = 3; |
| 1146 | } |
| 1147 | optional State state = 1; |
| 1148 | } |
| 1149 | |
| 1150 | /** |
| 1151 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 1152 | * prompts the user to enter a password (pattern, pin, etc). |
| 1153 | * |
| 1154 | * Logged from: |
| 1155 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 1156 | */ |
| 1157 | |
| 1158 | message KeyguardBouncerStateChanged { |
| 1159 | enum State { |
| 1160 | UNKNOWN = 0; |
| 1161 | // Bouncer is hidden, either as a result of successfully entering the |
| 1162 | // password, screen timing out, or user going back to lock screen. |
| 1163 | HIDDEN = 1; |
| 1164 | // This is when the user is being prompted to enter the password. |
| 1165 | SHOWN = 2; |
| 1166 | } |
| 1167 | optional State state = 1; |
| 1168 | } |
| 1169 | |
| 1170 | /** |
| 1171 | * Logs the result of entering a password into the keyguard bouncer. |
| 1172 | * |
| 1173 | * Logged from: |
| 1174 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 1175 | */ |
| 1176 | message KeyguardBouncerPasswordEntered { |
| 1177 | enum BouncerResult { |
| 1178 | UNKNOWN = 0; |
| 1179 | // The password entered was incorrect. |
| 1180 | FAILURE = 1; |
| 1181 | // The password entered was correct. |
| 1182 | SUCCESS = 2; |
| 1183 | } |
| 1184 | optional BouncerResult result = 1; |
| 1185 | } |
| 1186 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1187 | /* |
| 1188 | * Logs changes to the configuration of the device. The configuration is defined |
| 1189 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 1190 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1191 | * Please go there to interpret the possible values each field can be. |
| 1192 | * |
| 1193 | * Logged from: |
| 1194 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1195 | */ |
| 1196 | message ResourceConfigurationChanged { |
| 1197 | // Bit mask of color capabilities of the screen. |
| 1198 | // Contains information about the color gamut and hdr mode of the screen. |
| 1199 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1200 | optional int32 color_mode = 1; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1201 | |
| 1202 | // The target screen density being rendered to. |
| 1203 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1204 | optional int32 density_dpi = 2; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1205 | |
| 1206 | // Current user preference for the scaling factor for fonts, |
| 1207 | // relative to the base density scaling. |
| 1208 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1209 | optional float font_scale = 3; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1210 | |
| 1211 | // Flag indicating whether the hard keyboard is hidden. |
| 1212 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1213 | optional int32 hard_keyboard_hidden = 4; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1214 | |
| 1215 | // The type of keyboard attached to the device. |
| 1216 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1217 | optional int32 keyboard = 5; |
| 1218 | |
| 1219 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1220 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1221 | optional int32 keyboard_hidden = 6; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1222 | |
| 1223 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1224 | // 0 if undefined. |
| 1225 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1226 | optional int32 mcc = 7; |
| 1227 | |
| 1228 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1229 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1230 | // MNC_ZERO symbol defined in Configuration.java. |
| 1231 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1232 | optional int32 mnc = 8; |
| 1233 | |
| 1234 | // The kind of navigation available on the device. |
| 1235 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1236 | optional int32 navigation = 9; |
| 1237 | |
| 1238 | // Flag indicating whether the navigation is available. |
| 1239 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1240 | optional int32 navigation_hidden = 10; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1241 | |
| 1242 | // Overall orientation of the screen. |
| 1243 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1244 | optional int32 orientation = 11; |
| 1245 | |
| 1246 | // The current height of the available screen space, in dp units. |
| 1247 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1248 | optional int32 screen_height_dp = 12; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1249 | |
| 1250 | // Bit mask of overall layout of the screen. |
| 1251 | // Contains information about screen size, whether the screen is wider/taller |
| 1252 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1253 | // and whether the screen has a rounded shape. |
| 1254 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1255 | optional int32 screen_layout = 13; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1256 | |
| 1257 | // Current width of the available screen space, in dp units. |
| 1258 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1259 | optional int32 screen_width_dp = 14; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1260 | |
| 1261 | // The smallest screen size an application will see in normal operation. |
| 1262 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1263 | // in portrait and landscape. |
| 1264 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1265 | optional int32 smallest_screen_width_dp = 15; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1266 | |
| 1267 | // The type of touch screen attached to the device. |
| 1268 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1269 | optional int32 touchscreen = 16; |
| 1270 | |
| 1271 | // Bit mask of the ui mode. |
| 1272 | // Contains information about the overall ui mode of the device. |
| 1273 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1274 | // Also contains information about whether the device is in night mode. |
| 1275 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1276 | optional int32 ui_mode = 17; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1277 | } |
| 1278 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1279 | |
| 1280 | /** |
| 1281 | * Logs changes in the connection state of the mobile radio. |
| 1282 | * |
| 1283 | * Logged from: |
| 1284 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1285 | */ |
| 1286 | message MobileConnectionStateChanged { |
| 1287 | // States are from the state machine DataConnection.java. |
| 1288 | enum State { |
| 1289 | UNKNOWN = 0; |
| 1290 | // The connection is inactive, or disconnected. |
| 1291 | INACTIVE = 1; |
| 1292 | // The connection is being activated, or connecting. |
| 1293 | ACTIVATING = 2; |
| 1294 | // The connection is active, or connected. |
| 1295 | ACTIVE = 3; |
| 1296 | // The connection is disconnecting. |
| 1297 | DISCONNECTING = 4; |
| 1298 | // The connection is disconnecting after creating a connection. |
| 1299 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1300 | } |
| 1301 | optional State state = 1; |
| 1302 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1303 | optional int32 sim_slot_index = 2; |
| 1304 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1305 | // every new network created. Resets whenever the device reboots. |
| 1306 | optional int32 data_connection_id = 3; |
| 1307 | // A bitmask for the capabilities of this connection. |
| 1308 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1309 | // Default value (if we have no information): 0 |
| 1310 | optional int64 capabilities = 4; |
| 1311 | // If this connection has internet. |
| 1312 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1313 | optional bool has_internet = 5; |
| 1314 | } |
| 1315 | |
| 1316 | /** |
| 1317 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1318 | * |
| 1319 | * Logged from: |
| 1320 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1321 | */ |
| 1322 | message MobileRadioTechnologyChanged { |
| 1323 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1324 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1325 | optional int32 sim_slot_index = 2; |
| 1326 | } |
| 1327 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1328 | /** |
| 1329 | * Logs the VID and PID of any connected USB devices. |
| 1330 | * |
| 1331 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1332 | * |
| 1333 | * Logged by Vendor. |
| 1334 | */ |
| 1335 | message UsbDeviceAttached { |
| 1336 | optional int32 vid = 1; |
| 1337 | optional int32 pid = 2; |
| 1338 | optional bool has_audio = 3; |
| 1339 | optional bool has_hid = 4; |
| 1340 | optional bool has_storage = 5; |
Badhri Jagan Sridharan | 5ec629f | 2018-11-16 15:39:22 -0800 | [diff] [blame] | 1341 | enum State { |
| 1342 | STATE_DISCONNECTED = 0; |
| 1343 | STATE_CONNECTED = 1; |
| 1344 | } |
| 1345 | optional State state = 6; |
Badhri Jagan Sridharan | c2c54a2 | 2018-12-14 14:41:26 -0800 | [diff] [blame] | 1346 | optional int64 last_connect_duration_millis = 7; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1347 | } |
| 1348 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1349 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1350 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1351 | * Logs when Bluetooth is enabled and disabled. |
| 1352 | * |
| 1353 | * Logged from: |
| 1354 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1355 | */ |
| 1356 | message BluetoothEnabledStateChanged { |
| 1357 | repeated AttributionNode attribution_node = 1; |
| 1358 | // Whether or not bluetooth is enabled on the device. |
| 1359 | enum State { |
| 1360 | UNKNOWN = 0; |
| 1361 | ENABLED = 1; |
| 1362 | DISABLED = 2; |
| 1363 | } |
| 1364 | optional State state = 2; |
| 1365 | // The reason for being enabled/disabled. |
| 1366 | // Eg. Airplane mode, crash, application request. |
| 1367 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1368 | // 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] | 1369 | optional string pkg_name = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1370 | } |
| 1371 | |
| 1372 | /** |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1373 | * Logs when profiles on a Bluetooth device connects and disconnects. |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1374 | * |
| 1375 | * Logged from: |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1376 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 1377 | * |
| 1378 | * Next Tag: 5 |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1379 | */ |
| 1380 | message BluetoothConnectionStateChanged { |
| 1381 | // The state of the connection. |
| 1382 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1383 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1384 | // An identifier that can be used to match connect and disconnect events. |
| 1385 | // Currently is last two bytes of a hash of a device level ID and |
| 1386 | // the mac address of the bluetooth device that is connected. |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1387 | // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ |
| 1388 | optional int32 OBSOLETE_obfuscated_id = 2 [deprecated = true]; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1389 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1390 | // From android.bluetooth.BluetoothAdapter.java |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1391 | // Default: 0 when not used |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1392 | optional int32 bt_profile = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1393 | // An identifier that can be used to match events for this device. |
| 1394 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1395 | // Salt: Randomly generated 256 bit value |
| 1396 | // Hash algorithm: HMAC-SHA256 |
| 1397 | // Size: 32 byte |
| 1398 | // Default: null or empty if the device identifier is not known |
| 1399 | optional bytes obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1400 | } |
| 1401 | |
| 1402 | /** |
| 1403 | * Logs when a Bluetooth device connects and disconnects over ACL |
| 1404 | * |
| 1405 | * Logged from: |
| 1406 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1407 | * |
| 1408 | * Next Tag: 3 |
| 1409 | */ |
| 1410 | message BluetoothAclConnectionStateChanged { |
| 1411 | // An identifier that can be used to match events for this device. |
| 1412 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1413 | // Salt: Randomly generated 256 bit value |
| 1414 | // Hash algorithm: HMAC-SHA256 |
| 1415 | // Size: 32 byte |
| 1416 | // Default: null or empty if the device identifier is not known |
| 1417 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1418 | // The state of the connection. |
| 1419 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1420 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1421 | } |
| 1422 | |
| 1423 | /** |
| 1424 | * Logs when a Bluetooth device connects and disconnects over SCO |
| 1425 | * |
| 1426 | * Logged from: |
| 1427 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java |
| 1428 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java |
| 1429 | * |
| 1430 | * Next Tag: 4 |
| 1431 | */ |
| 1432 | message BluetoothScoConnectionStateChanged { |
| 1433 | // An identifier that can be used to match events for this device. |
| 1434 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1435 | // Salt: Randomly generated 256 bit value |
| 1436 | // Hash algorithm: HMAC-SHA256 |
| 1437 | // Size: 32 byte |
| 1438 | // Default: null or empty if the device identifier is not known |
| 1439 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1440 | // The state of the connection. |
| 1441 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1442 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1443 | // Codec used for this SCO connection |
| 1444 | // Default: UNKNOWN |
| 1445 | optional android.bluetooth.hfp.ScoCodec codec = 3; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1446 | } |
| 1447 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1448 | /** |
| 1449 | * Logged when active device of a profile changes |
| 1450 | * |
| 1451 | * Logged from: |
| 1452 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1453 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java |
| 1454 | * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java |
| 1455 | */ |
| 1456 | message BluetoothActiveDeviceChanged { |
| 1457 | // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID |
| 1458 | // From android.bluetooth.BluetoothProfile |
| 1459 | optional int32 bt_profile = 1; |
| 1460 | // An identifier that can be used to match events for this new active device. |
| 1461 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1462 | // Salt: Randomly generated 256 bit value |
| 1463 | // Hash algorithm: HMAC-SHA256 |
| 1464 | // Size: 32 byte |
| 1465 | // Default: null or empty if there is no active device for this profile |
| 1466 | optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1467 | } |
| 1468 | |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1469 | // Logs when there is an event affecting Bluetooth device's link layer connection. |
| 1470 | // - This event is triggered when there is a related HCI command or event |
| 1471 | // - Users of this metrics can deduce Bluetooth device's connection state from these events |
| 1472 | // - HCI commands are logged before the command is sent, after receiving command status, and after |
| 1473 | // receiving command complete |
| 1474 | // - HCI events are logged when they arrive |
| 1475 | // |
| 1476 | // Low level log from system/bt |
| 1477 | // |
| 1478 | // Bluetooth classic commands: |
| 1479 | // - CMD_CREATE_CONNECTION |
| 1480 | // - CMD_DISCONNECT |
| 1481 | // - CMD_CREATE_CONNECTION_CANCEL |
| 1482 | // - CMD_ACCEPT_CONNECTION_REQUEST |
| 1483 | // - CMD_REJECT_CONNECTION_REQUEST |
| 1484 | // - CMD_SETUP_ESCO_CONNECTION |
| 1485 | // - CMD_ACCEPT_ESCO_CONNECTION |
| 1486 | // - CMD_REJECT_ESCO_CONNECTION |
| 1487 | // - CMD_ENH_SETUP_ESCO_CONNECTION |
| 1488 | // - CMD_ENH_ACCEPT_ESCO_CONNECTION |
| 1489 | // |
| 1490 | // Bluetooth low energy commands: |
| 1491 | // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] |
| 1492 | // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] |
| 1493 | // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] |
| 1494 | // - CMD_BLE_CLEAR_WHITE_LIST |
| 1495 | // - CMD_BLE_ADD_WHITE_LIST |
| 1496 | // - CMD_BLE_REMOVE_WHITE_LIST |
| 1497 | // |
| 1498 | // Bluetooth classic events: |
| 1499 | // - EVT_CONNECTION_COMP |
| 1500 | // - EVT_CONNECTION_REQUEST |
| 1501 | // - EVT_DISCONNECTION_COMP |
| 1502 | // - EVT_ESCO_CONNECTION_COMP |
| 1503 | // - EVT_ESCO_CONNECTION_CHANGED |
| 1504 | // |
| 1505 | // Bluetooth low energy meta events: |
| 1506 | // - BLE_EVT_CONN_COMPLETE_EVT |
| 1507 | // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT |
| 1508 | // |
| 1509 | // Next tag: 10 |
| 1510 | message BluetoothLinkLayerConnectionEvent { |
| 1511 | // An identifier that can be used to match events for this device. |
| 1512 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1513 | // Salt: Randomly generated 256 bit value |
| 1514 | // Hash algorithm: HMAC-SHA256 |
| 1515 | // Size: 32 byte |
| 1516 | // Default: null or empty if the device identifier is not known |
| 1517 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1518 | // Connection handle of this connection if available |
| 1519 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1520 | // Default: 0xFFFF if the handle is unknown |
| 1521 | optional int32 connection_handle = 2; |
| 1522 | // Direction of the link |
| 1523 | // Default: DIRECTION_UNKNOWN |
| 1524 | optional android.bluetooth.DirectionEnum direction = 3; |
| 1525 | // Type of this link |
| 1526 | // Default: LINK_TYPE_UNKNOWN |
| 1527 | optional android.bluetooth.LinkTypeEnum type = 4; |
| 1528 | |
| 1529 | // Reason metadata for this link layer connection event, rules for interpretation: |
| 1530 | // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or |
| 1531 | // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case |
| 1532 | // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is |
| 1533 | // set and valid, ignore hci_ble_event |
| 1534 | |
| 1535 | // HCI command associated with this event |
| 1536 | // Default: CMD_UNKNOWN |
| 1537 | optional android.bluetooth.hci.CommandEnum hci_cmd = 5; |
| 1538 | // HCI event associated with this event |
| 1539 | // Default: EVT_UNKNOWN |
| 1540 | optional android.bluetooth.hci.EventEnum hci_event = 6; |
| 1541 | // HCI BLE meta event associated with this event |
| 1542 | // Default: BLE_EVT_UNKNOWN |
| 1543 | optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; |
| 1544 | // HCI command status code if this is triggerred by hci_cmd |
| 1545 | // Default: STATUS_UNKNOWN |
| 1546 | optional android.bluetooth.hci.StatusEnum cmd_status = 8; |
| 1547 | // HCI reason code associated with this event |
| 1548 | // Default: STATUS_UNKNOWN |
| 1549 | optional android.bluetooth.hci.StatusEnum reason_code = 9; |
| 1550 | } |
| 1551 | |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1552 | /** |
| 1553 | * Logs when a module is rolled back by Watchdog. |
| 1554 | * |
| 1555 | * Logged from: Rollback Manager |
| 1556 | */ |
| 1557 | message WatchdogRollbackOccurred { |
| 1558 | enum RollbackType { |
| 1559 | UNKNOWN = 0; |
| 1560 | ROLLBACK_INITIATE = 1; |
| 1561 | ROLLBACK_SUCCESS = 2; |
| 1562 | ROLLBACK_FAILURE = 3; |
| 1563 | } |
| 1564 | optional RollbackType rollback_type = 1; |
| 1565 | |
| 1566 | optional string package_name = 2; |
| 1567 | |
| 1568 | optional int32 package_version_code = 3; |
| 1569 | } |
| 1570 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1571 | /** |
| 1572 | * Logs when there is a change in Bluetooth A2DP playback state |
| 1573 | * |
| 1574 | * Logged from: |
| 1575 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1576 | */ |
| 1577 | message BluetoothA2dpPlaybackStateChanged { |
| 1578 | // An identifier that can be used to match events for this device. |
| 1579 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1580 | // Salt: Randomly generated 256 bit value |
| 1581 | // Hash algorithm: HMAC-SHA256 |
| 1582 | // Size: 32 byte |
| 1583 | // Default: null or empty if the device identifier is not known |
| 1584 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1585 | // Current playback state |
| 1586 | // Default: PLAYBACK_STATE_UNKNOWN |
| 1587 | optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; |
| 1588 | // Current audio coding mode |
| 1589 | // Default: AUDIO_CODING_MODE_UNKNOWN |
| 1590 | optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; |
| 1591 | } |
| 1592 | |
| 1593 | /** |
| 1594 | * Logs when there is a change in A2DP codec config for a particular remote device |
| 1595 | * |
| 1596 | * Logged from: |
| 1597 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1598 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1599 | */ |
| 1600 | message BluetoothA2dpCodecConfigChanged { |
| 1601 | // An identifier that can be used to match events for this 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 the device identifier is not known |
| 1607 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1608 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1609 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1610 | optional int32 codec_type = 2; |
| 1611 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1612 | // Default: CODEC_PRIORITY_DEFAULT |
| 1613 | optional int32 codec_priority = 3; |
| 1614 | // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig |
| 1615 | // Default: SAMPLE_RATE_NONE |
| 1616 | optional int32 sample_rate = 4; |
| 1617 | // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig |
| 1618 | // Default: BITS_PER_SAMPLE_NONE |
| 1619 | optional int32 bits_per_sample = 5; |
| 1620 | // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig |
| 1621 | // Default: CHANNEL_MODE_NONE |
| 1622 | optional int32 channel_mode = 6; |
| 1623 | // Codec specific values |
| 1624 | // Default 0 |
| 1625 | optional int64 codec_specific_1 = 7; |
| 1626 | optional int64 codec_specific_2 = 8; |
| 1627 | optional int64 codec_specific_3 = 9; |
| 1628 | optional int64 codec_specific_4 = 10; |
| 1629 | } |
| 1630 | |
| 1631 | /** |
| 1632 | * Logs when there is a change in selectable A2DP codec capability for a paricular remote device |
| 1633 | * Each codec's capability is logged separately due to statsd restriction |
| 1634 | * |
| 1635 | * Logged from: |
| 1636 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1637 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1638 | */ |
| 1639 | message BluetoothA2dpCodecCapabilityChanged { |
| 1640 | // An identifier that can be used to match events for this device. |
| 1641 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1642 | // Salt: Randomly generated 256 bit value |
| 1643 | // Hash algorithm: HMAC-SHA256 |
| 1644 | // Size: 32 byte |
| 1645 | // Default: null or empty if the device identifier is not known |
| 1646 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1647 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1648 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1649 | optional int32 codec_type = 2; |
| 1650 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1651 | // Default: CODEC_PRIORITY_DEFAULT |
| 1652 | optional int32 codec_priority = 3; |
| 1653 | // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants |
| 1654 | // in BluetoothCodecConfig |
| 1655 | // Default: empty and SAMPLE_RATE_NONE for individual item |
| 1656 | optional int32 sample_rate = 4; |
| 1657 | // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants |
| 1658 | // in BluetoothCodecConfig |
| 1659 | // Default: empty and BITS_PER_SAMPLE_NONE for individual item |
| 1660 | optional int32 bits_per_sample = 5; |
| 1661 | // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in |
| 1662 | // BluetoothCodecConfig |
| 1663 | // Default: empty and CHANNEL_MODE_NONE for individual item |
| 1664 | optional int32 channel_mode = 6; |
| 1665 | // Codec specific values |
| 1666 | // Default 0 |
| 1667 | optional int64 codec_specific_1 = 7; |
| 1668 | optional int64 codec_specific_2 = 8; |
| 1669 | optional int64 codec_specific_3 = 9; |
| 1670 | optional int64 codec_specific_4 = 10; |
| 1671 | } |
| 1672 | |
| 1673 | /** |
| 1674 | * Logs when A2DP failed to read from PCM source. |
| 1675 | * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. |
| 1676 | * |
| 1677 | * Logged from: |
| 1678 | * system/bt |
| 1679 | */ |
| 1680 | message BluetoothA2dpAudioUnderrunReported { |
| 1681 | // An identifier that can be used to match events for this device. |
| 1682 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1683 | // Salt: Randomly generated 256 bit value |
| 1684 | // Hash algorithm: HMAC-SHA256 |
| 1685 | // Size: 32 byte |
| 1686 | // Default: null or empty if the device identifier is not known |
| 1687 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1688 | // Encoding interval in nanoseconds |
| 1689 | // Default: 0 |
| 1690 | optional int64 encoding_interval_nanos = 2; |
| 1691 | // Number of bytes of PCM data that could not be read from the source |
| 1692 | // Default: 0 |
| 1693 | optional int32 num_missing_pcm_bytes = 3; |
| 1694 | } |
| 1695 | |
| 1696 | /** |
| 1697 | * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit |
| 1698 | * buffer queue is full and we have to drop data |
| 1699 | * |
| 1700 | * Logged from: |
| 1701 | * system/bt |
| 1702 | */ |
| 1703 | message BluetoothA2dpAudioOverrunReported { |
| 1704 | // An identifier that can be used to match events for this device. |
| 1705 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1706 | // Salt: Randomly generated 256 bit value |
| 1707 | // Hash algorithm: HMAC-SHA256 |
| 1708 | // Size: 32 byte |
| 1709 | // Default: null or empty if the device identifier is not known |
| 1710 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1711 | // Encoding interval in nanoseconds |
| 1712 | // Default: 0 |
| 1713 | optional int64 encoding_interval_nanos = 2; |
| 1714 | // Number of buffers dropped in this event |
| 1715 | // Each buffer is encoded in one encoding interval and consists of multiple encoded frames |
| 1716 | // Default: 0 |
| 1717 | optional int32 num_dropped_buffers = 3; |
| 1718 | // Number of encoded buffers dropped in this event |
| 1719 | // Default 0 |
| 1720 | optional int32 num_dropped_encoded_frames = 4; |
| 1721 | // Number of encoded bytes dropped in this event |
| 1722 | // Default: 0 |
| 1723 | optional int32 num_dropped_encoded_bytes = 5; |
| 1724 | } |
| 1725 | |
| 1726 | /** |
| 1727 | * Logs when we receive reports regarding a device's RSSI value |
| 1728 | * |
| 1729 | * Logged from: |
| 1730 | * system/bt |
| 1731 | */ |
| 1732 | message BluetoothDeviceRssiReported { |
| 1733 | // An identifier that can be used to match events for this device. |
| 1734 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1735 | // Salt: Randomly generated 256 bit value |
| 1736 | // Hash algorithm: HMAC-SHA256 |
| 1737 | // Size: 32 byte |
| 1738 | // Default: null or empty if the device identifier is not known |
| 1739 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1740 | // Connection handle of this connection if available |
| 1741 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1742 | // Default: 0xFFFF if the handle is unknown |
| 1743 | optional int32 connection_handle = 2; |
| 1744 | // HCI command status code if this is triggerred by hci_cmd |
| 1745 | // Default: STATUS_UNKNOWN |
| 1746 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1747 | // BR/EDR |
| 1748 | // Range: -128 ≤ N ≤ 127 (signed integer) |
| 1749 | // Units: dB |
| 1750 | // LE: |
| 1751 | // Range: -127 to 20, 127 (signed integer) |
| 1752 | // Units: dBm |
| 1753 | // Invalid when an out of range value is reported |
| 1754 | optional int32 rssi = 4; |
| 1755 | } |
| 1756 | |
| 1757 | /** |
| 1758 | * Logs when we receive reports regarding how many consecutive failed contacts for a connection |
| 1759 | * |
| 1760 | * Logged from: |
| 1761 | * system/bt |
| 1762 | */ |
| 1763 | message BluetoothDeviceFailedContactCounterReported { |
| 1764 | // An identifier that can be used to match events for this device. |
| 1765 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1766 | // Salt: Randomly generated 256 bit value |
| 1767 | // Hash algorithm: HMAC-SHA256 |
| 1768 | // Size: 32 byte |
| 1769 | // Default: null or empty if the device identifier is not known |
| 1770 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1771 | // Connection handle of this connection if available |
| 1772 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1773 | // Default: 0xFFFF if the handle is unknown |
| 1774 | optional int32 connection_handle = 2; |
| 1775 | // HCI command status code if this is triggerred by hci_cmd |
| 1776 | // Default: STATUS_UNKNOWN |
| 1777 | optional android.bluetooth.hci.StatusEnum cmd_status = 3; |
| 1778 | // Number of consecutive failed contacts for a connection corresponding to the Handle |
| 1779 | // Range: uint16_t, 0-0xFFFF |
| 1780 | // Default: 0xFFFFF |
| 1781 | optional int32 failed_contact_counter = 4; |
| 1782 | } |
| 1783 | |
| 1784 | /** |
| 1785 | * Logs when we receive reports regarding the tranmit power level used for a specific connection |
| 1786 | * |
| 1787 | * Logged from: |
| 1788 | * system/bt |
| 1789 | */ |
| 1790 | message BluetoothDeviceTxPowerLevelReported { |
| 1791 | // An identifier that can be used to match events for this device. |
| 1792 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1793 | // Salt: Randomly generated 256 bit value |
| 1794 | // Hash algorithm: HMAC-SHA256 |
| 1795 | // Size: 32 byte |
| 1796 | // Default: null or empty if the device identifier is not known |
| 1797 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1798 | // Connection handle of this connection if available |
| 1799 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1800 | // Default: 0xFFFF if the handle is unknown |
| 1801 | optional int32 connection_handle = 2; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1802 | // HCI command status code if this is triggered by hci_cmd |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1803 | // Default: STATUS_UNKNOWN |
| 1804 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1805 | // Range: -30 ≤ N ≤ 20 |
| 1806 | // Units: dBm |
| 1807 | // Invalid when an out of range value is reported |
| 1808 | optional int32 transmit_power_level = 4; |
| 1809 | } |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1810 | |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1811 | /** |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1812 | * Logs when Bluetooth controller failed to reply with command status within a timeout period after |
| 1813 | * receiving an HCI command from the host |
| 1814 | * |
| 1815 | * Logged from: system/bt |
| 1816 | */ |
| 1817 | message BluetoothHciTimeoutReported { |
| 1818 | // HCI command associated with this event |
| 1819 | // Default: CMD_UNKNOWN |
| 1820 | optional android.bluetooth.hci.CommandEnum hci_command = 1; |
| 1821 | } |
| 1822 | |
| 1823 | /** |
| 1824 | * Logs when we receive Bluetooth Link Quality Report event from the controller |
| 1825 | * See Android Bluetooth HCI specification for more details |
| 1826 | * |
| 1827 | * Note: all count and bytes field are counted since last event |
| 1828 | * |
| 1829 | * Logged from: system/bt |
| 1830 | */ |
| 1831 | message BluetoothQualityReportReported { |
| 1832 | // Quality report ID |
| 1833 | // Original type: uint8_t |
| 1834 | // Default: BQR_ID_UNKNOWN |
| 1835 | optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; |
| 1836 | // Packet type of the connection |
| 1837 | // Original type: uint8_t |
| 1838 | // Default: BQR_PACKET_TYPE_UNKNOWN |
| 1839 | optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; |
| 1840 | // Connection handle of the connection |
| 1841 | // Original type: uint16_t |
| 1842 | optional int32 connection_handle = 3; |
| 1843 | // Performing Role for the connection |
| 1844 | // Original type: uint8_t |
| 1845 | optional int32 connection_role = 4; |
| 1846 | // Current Transmit Power Level for the connection. This value is the same as the controller's |
| 1847 | // response to the HCI_Read_Transmit_Power_Level HCI command |
| 1848 | // Original type: uint8_t |
| 1849 | optional int32 tx_power_level = 5; |
| 1850 | // Received Signal Strength Indication (RSSI) value for the connection. This value is an |
| 1851 | // absolute receiver signal strength value |
| 1852 | // Original type: int8_t |
| 1853 | optional int32 rssi = 6; |
| 1854 | // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the |
| 1855 | // channels used by the link currently |
| 1856 | // Original type: uint8_t |
| 1857 | optional int32 snr = 7; |
| 1858 | // Indicates the number of unused channels in AFH_channel_map |
| 1859 | // Original type: uint8_t |
| 1860 | optional int32 unused_afh_channel_count = 8; |
| 1861 | // Indicates the number of the channels which are interfered and quality is bad but are still |
| 1862 | // selected for AFH |
| 1863 | // Original type: uint8_t |
| 1864 | optional int32 afh_select_unideal_channel_count = 9; |
| 1865 | // Current Link Supervision Timeout Setting |
| 1866 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 1867 | // Original type: uint16_t |
| 1868 | optional int32 lsto = 10; |
| 1869 | // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's |
| 1870 | // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of |
| 1871 | // 0x01 (Piconet Clock) |
| 1872 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 1873 | // Original type: uint32_t |
| 1874 | optional int64 connection_piconet_clock = 11; |
| 1875 | // The count of retransmission |
| 1876 | // Original type: uint32_t |
| 1877 | optional int64 retransmission_count = 12; |
| 1878 | // The count of no RX |
| 1879 | // Original type: uint32_t |
| 1880 | optional int64 no_rx_count = 13; |
| 1881 | // The count of NAK (Negative Acknowledge) |
| 1882 | // Original type: uint32_t |
| 1883 | optional int64 nak_count = 14; |
| 1884 | // Controller timestamp of last TX ACK |
| 1885 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 1886 | // Original type: uint32_t |
| 1887 | optional int64 last_tx_ack_timestamp = 15; |
| 1888 | // The count of Flow-off (STOP) |
| 1889 | // Original type: uint32_t |
| 1890 | optional int64 flow_off_count = 16; |
| 1891 | // Controller timestamp of last Flow-on (GO) |
| 1892 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 1893 | // Original type: uint32_t |
| 1894 | optional int64 last_flow_on_timestamp = 17; |
| 1895 | // Buffer overflow count (how many bytes of TX data are dropped) since the last event |
| 1896 | // Original type: uint32_t |
| 1897 | optional int64 buffer_overflow_bytes = 18; |
| 1898 | // Buffer underflow count (in byte) since last event |
| 1899 | // Original type: uint32_t |
| 1900 | optional int64 buffer_underflow_bytes = 19; |
| 1901 | } |
| 1902 | |
| 1903 | /** |
| 1904 | * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack |
| 1905 | * |
| 1906 | * Notes: |
| 1907 | * - Each event can be partially filled as we might learn different pieces of device |
| 1908 | * information at different time |
| 1909 | * - Multiple device info events can be combined to give more complete picture |
| 1910 | * - When multiple device info events tries to describe the same information, the |
| 1911 | * later one wins |
| 1912 | * |
| 1913 | * Logged from: |
| 1914 | * packages/apps/Bluetooth |
| 1915 | */ |
| 1916 | message BluetoothManufacturerInfoReported { |
| 1917 | // An identifier that can be used to match events for this device. |
| 1918 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1919 | // Salt: Randomly generated 256 bit value |
| 1920 | // Hash algorithm: HMAC-SHA256 |
| 1921 | // Size: 32 byte |
| 1922 | // Default: null or empty if the device identifier is not known |
| 1923 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1924 | // Where is this device info obtained from |
| 1925 | optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; |
| 1926 | // Name of the data source |
| 1927 | // For EXTERNAL: package name of the data source |
| 1928 | // For INTERNAL: null for general case, component name otherwise |
| 1929 | optional string source_name = 3; |
| 1930 | // Name of the manufacturer of this device |
| 1931 | optional string manufacturer = 4; |
| 1932 | // Model of this device |
| 1933 | optional string model = 5; |
| 1934 | // Hardware version of this device |
| 1935 | optional string hardware_version = 6; |
| 1936 | // Software version of this device |
| 1937 | optional string software_version = 7; |
| 1938 | } |
| 1939 | |
| 1940 | /** |
| 1941 | * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote |
| 1942 | * device, as documented by the Bluetooth Core HCI specification |
| 1943 | * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification |
| 1944 | * Vol 2, Part E, Page 1118 |
| 1945 | * |
| 1946 | * Logged from: |
| 1947 | * system/bt |
| 1948 | */ |
| 1949 | message BluetoothRemoteVersionInfoReported { |
| 1950 | // Connection handle of the connection |
| 1951 | // Original type: uint16_t |
| 1952 | optional int32 connection_handle = 1; |
| 1953 | // HCI command status code |
| 1954 | // Default: STATUS_UNKNOWN |
| 1955 | optional android.bluetooth.hci.StatusEnum hci_status = 2; |
| 1956 | // 1 byte Version of current LMP in the remote controller |
| 1957 | optional int32 lmp_version = 3; |
| 1958 | // 2 bytes LMP manufacturer code of the remote controller |
| 1959 | // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers |
| 1960 | optional int32 lmp_manufacturer_code = 4; |
| 1961 | // 4 bytes subversion of the LMP in the remote controller |
| 1962 | optional int32 lmp_subversion = 5; |
| 1963 | } |
| 1964 | |
| 1965 | /** |
| 1966 | * Logs when certain Bluetooth SDP attributes are discovered |
| 1967 | * Constant definitions are from: |
| 1968 | * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery |
| 1969 | * |
| 1970 | * Current logged attributes: |
| 1971 | * - BluetoothProfileDescriptorList |
| 1972 | * - Supported Features Bitmask |
| 1973 | * |
| 1974 | * Logged from: |
| 1975 | * system/bt |
| 1976 | */ |
| 1977 | message BluetoothSdpAttributeReported { |
| 1978 | // An identifier that can be used to match events for this device. |
| 1979 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1980 | // Salt: Randomly generated 256 bit value |
| 1981 | // Hash algorithm: HMAC-SHA256 |
| 1982 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1983 | // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes |
| 1984 | // Original type: uint16_t |
| 1985 | optional int32 protocol_uuid = 2; |
| 1986 | // Short form UUIDs used to identify Bluetooth SDP attribute types |
| 1987 | // Original type: uint16_t |
| 1988 | optional int32 attribute_id = 3; |
| 1989 | // Attribute value for the particular attribute |
| 1990 | optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1991 | } |
| 1992 | |
| 1993 | /** |
| 1994 | * Logs when bond state of a Bluetooth device changes |
| 1995 | * |
| 1996 | * Logged from: |
| 1997 | * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| 1998 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 1999 | */ |
| 2000 | message BluetoothBondStateChanged { |
| 2001 | // An identifier that can be used to match events for this device. |
| 2002 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2003 | // Salt: Randomly generated 256 bit value |
| 2004 | // Hash algorithm: HMAC-SHA256 |
| 2005 | // Size: 32 byte |
| 2006 | // Default: null or empty if the device identifier is not known |
| 2007 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2008 | // Preferred transport type to remote dual mode device |
| 2009 | // Default: TRANSPORT_AUTO means no preference |
| 2010 | optional android.bluetooth.TransportTypeEnum transport = 2; |
| 2011 | // The type of this Bluetooth device (Classic, LE, or Dual mode) |
| 2012 | // Default: UNKNOWN |
| 2013 | optional android.bluetooth.DeviceTypeEnum type = 3; |
| 2014 | // Current bond state (NONE, BONDING, BONDED) |
| 2015 | // Default: BOND_STATE_UNKNOWN |
| 2016 | optional android.bluetooth.BondStateEnum bond_state = 4; |
| 2017 | // Bonding sub state |
| 2018 | // Default: BOND_SUB_STATE_UNKNOWN |
| 2019 | optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; |
| 2020 | // Unbond Reason |
| 2021 | // Default: UNBOND_REASON_UNKNOWN |
| 2022 | optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; |
| 2023 | } |
| 2024 | |
| 2025 | /** |
| 2026 | * Logs there is an event related Bluetooth classic pairing |
| 2027 | * |
| 2028 | * Logged from: |
| 2029 | * system/bt |
| 2030 | */ |
| 2031 | message BluetoothClassicPairingEventReported { |
| 2032 | // An identifier that can be used to match events for this device. |
| 2033 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2034 | // Salt: Randomly generated 256 bit value |
| 2035 | // Hash algorithm: HMAC-SHA256 |
| 2036 | // Size: 32 byte |
| 2037 | // Default: null or empty if the device identifier is not known |
| 2038 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2039 | // Connection handle of this connection if available |
| 2040 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2041 | // Default: 0xFFFF if the handle is unknown |
| 2042 | optional int32 connection_handle = 2; |
| 2043 | // HCI command associated with this event |
| 2044 | // Default: CMD_UNKNOWN |
| 2045 | optional android.bluetooth.hci.CommandEnum hci_cmd = 3; |
| 2046 | // HCI event associated with this event |
| 2047 | // Default: EVT_UNKNOWN |
| 2048 | optional android.bluetooth.hci.EventEnum hci_event = 4; |
| 2049 | // HCI command status code if this is triggerred by hci_cmd |
| 2050 | // Default: STATUS_UNKNOWN |
| 2051 | optional android.bluetooth.hci.StatusEnum cmd_status = 5; |
| 2052 | // HCI reason code associated with this event |
| 2053 | // Default: STATUS_UNKNOWN |
| 2054 | optional android.bluetooth.hci.StatusEnum reason_code = 6; |
| 2055 | } |
| 2056 | |
| 2057 | /** |
| 2058 | * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) |
| 2059 | * |
| 2060 | * Logged from: |
| 2061 | * system/bt |
| 2062 | */ |
| 2063 | message BluetoothSmpPairingEventReported { |
| 2064 | // An identifier that can be used to match events for this device. |
| 2065 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2066 | // Salt: Randomly generated 256 bit value |
| 2067 | // Hash algorithm: HMAC-SHA256 |
| 2068 | // Size: 32 byte |
| 2069 | // Default: null or empty if the device identifier is not known |
| 2070 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2071 | // SMP command sent or received over L2CAP |
| 2072 | // Default: CMD_UNKNOWN |
| 2073 | optional android.bluetooth.smp.CommandEnum smp_command = 2; |
| 2074 | // Whether this command is sent or received |
| 2075 | // Default: DIRECTION_UNKNOWN |
| 2076 | optional android.bluetooth.DirectionEnum direction = 3; |
| 2077 | // SMP failure reason code |
| 2078 | // Default: PAIRING_FAIL_REASON_DEFAULT |
| 2079 | optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; |
| 2080 | } |
| 2081 | |
| 2082 | /** |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2083 | * Logs when a Bluetooth socket’s connection state changed |
| 2084 | * |
| 2085 | * Logged from: |
| 2086 | * system/bt |
| 2087 | */ |
| 2088 | message BluetoothSocketConnectionStateChanged { |
| 2089 | // An identifier that can be used to match events for this device. |
| 2090 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2091 | // Salt: Randomly generated 256 bit value |
| 2092 | // Hash algorithm: HMAC-SHA256 |
| 2093 | // Size: 32 byte |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2094 | // Default: null or empty if this is a server listener socket |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2095 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2096 | // Temporary port of this socket for the current connection or session only |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2097 | // Default 0 when unknown or don't care |
| 2098 | optional int32 port = 2; |
| 2099 | // Socket type as mentioned in |
| 2100 | // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java |
| 2101 | // Default: SOCKET_TYPE_UNKNOWN |
| 2102 | optional android.bluetooth.SocketTypeEnum type = 3; |
| 2103 | // Socket connection state |
| 2104 | // Default: SOCKET_CONNECTION_STATE_UNKNOWN |
| 2105 | optional android.bluetooth.SocketConnectionstateEnum state = 4; |
| 2106 | // Number of bytes sent to remote device during this connection |
| 2107 | optional int64 tx_bytes = 5; |
| 2108 | // Number of bytes received from remote device during this connection |
| 2109 | optional int64 rx_bytes = 6; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2110 | // Socket owner's UID |
| 2111 | optional int32 uid = 7 [(is_uid) = true]; |
| 2112 | // Server port of this socket, if any. When both |server_port| and |port| fields are populated, |
| 2113 | // |port| must be spawned by |server_port| |
| 2114 | // Default 0 when unknown or don't care |
| 2115 | optional int32 server_port = 8; |
| 2116 | // Whether this is a server listener socket |
| 2117 | optional android.bluetooth.SocketRoleEnum is_server = 9; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2118 | } |
| 2119 | |
| 2120 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2121 | * Logs when something is plugged into or removed from the USB-C connector. |
| 2122 | * |
| 2123 | * Logged from: |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2124 | * UsbService |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2125 | */ |
| 2126 | message UsbConnectorStateChanged { |
| 2127 | enum State { |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2128 | STATE_DISCONNECTED = 0; |
| 2129 | STATE_CONNECTED = 1; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2130 | } |
| 2131 | optional State state = 1; |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2132 | optional string id = 2; |
Badhri Jagan Sridharan | faf6207 | 2018-11-16 17:17:03 -0800 | [diff] [blame] | 2133 | // Last active session in ms. |
| 2134 | // 0 when the port is in connected state. |
| 2135 | optional int64 last_connect_duration_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2136 | } |
| 2137 | |
| 2138 | /** |
| 2139 | * Logs the reported speaker impedance. |
| 2140 | * |
| 2141 | * Logged from: |
| 2142 | * Vendor audio implementation. |
| 2143 | */ |
| 2144 | message SpeakerImpedanceReported { |
| 2145 | optional int32 speaker_location = 1; |
| 2146 | optional int32 impedance = 2; |
| 2147 | } |
| 2148 | |
| 2149 | /** |
| 2150 | * Logs the report of a failed hardware. |
| 2151 | * |
| 2152 | * Logged from: |
| 2153 | * Vendor HALs. |
| 2154 | * |
| 2155 | */ |
| 2156 | message HardwareFailed { |
| 2157 | enum HardwareType { |
| 2158 | HARDWARE_FAILED_UNKNOWN = 0; |
| 2159 | HARDWARE_FAILED_MICROPHONE = 1; |
| 2160 | HARDWARE_FAILED_CODEC = 2; |
| 2161 | HARDWARE_FAILED_SPEAKER = 3; |
| 2162 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 2163 | } |
| 2164 | optional HardwareType hardware_type = 1; |
| 2165 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2166 | /** |
| 2167 | * hardware_location allows vendors to differentiate between multiple instances of |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2168 | * the same hardware_type. The specific locations are vendor defined integers, |
| 2169 | * referring to board-specific numbering schemes. |
| 2170 | */ |
| 2171 | optional int32 hardware_location = 2; |
| 2172 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2173 | /** |
| 2174 | * failure_code is specific to the HardwareType of the failed hardware. |
| 2175 | * It should use one of the enum values defined below. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2176 | */ |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2177 | enum HardwareErrorCode { |
| 2178 | UNKNOWN = 0; |
| 2179 | COMPLETE = 1; |
| 2180 | SPEAKER_HIGH_Z = 2; |
| 2181 | SPEAKER_SHORT = 3; |
| 2182 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 2183 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
Maggie White | b76cebc | 2019-02-05 15:21:29 -0800 | [diff] [blame] | 2184 | DEGRADE = 6; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2185 | } |
| 2186 | optional int32 failure_code = 3; |
| 2187 | } |
| 2188 | |
| 2189 | /** |
| 2190 | * Log an event when the device has been physically dropped. |
| 2191 | * Reported from the /vendor partition. |
| 2192 | */ |
| 2193 | message PhysicalDropDetected { |
| 2194 | // Confidence that the event was actually a drop, 0 -> 100 |
| 2195 | optional int32 confidence_pctg = 1; |
| 2196 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 2197 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 2198 | // Duration of freefall in ms |
| 2199 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2200 | } |
| 2201 | |
| 2202 | /** |
| 2203 | * Log bucketed battery charge cycles. |
| 2204 | * |
| 2205 | * Each bucket represents cycles of the battery past |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2206 | * a given charge point. For example, if 10 cycle buckets are |
| 2207 | * initialized, bucket 1 is the lowest 1/10th of the battery, |
| 2208 | * and bucket 10 is 100%. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2209 | * |
| 2210 | * Logged from: |
| 2211 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 2212 | */ |
| 2213 | message ChargeCyclesReported { |
| 2214 | optional int32 cycle_bucket_1 = 1; |
| 2215 | optional int32 cycle_bucket_2 = 2; |
| 2216 | optional int32 cycle_bucket_3 = 3; |
| 2217 | optional int32 cycle_bucket_4 = 4; |
| 2218 | optional int32 cycle_bucket_5 = 5; |
| 2219 | optional int32 cycle_bucket_6 = 6; |
| 2220 | optional int32 cycle_bucket_7 = 7; |
| 2221 | optional int32 cycle_bucket_8 = 8; |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2222 | optional int32 cycle_bucket_9 = 9; |
| 2223 | optional int32 cycle_bucket_10 = 10; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2224 | } |
| 2225 | |
| 2226 | /** |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2227 | * Log battery health snapshot. |
| 2228 | * |
| 2229 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 2230 | * are snapshotted periodically over 24hrs. |
| 2231 | */ |
| 2232 | message BatteryHealthSnapshot { |
| 2233 | enum BatterySnapshotType { |
| 2234 | UNKNOWN = 0; |
| 2235 | MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 2236 | MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 2237 | MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 2238 | MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 2239 | MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 2240 | MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 2241 | MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 2242 | MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 2243 | MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 2244 | MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 2245 | AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 2246 | } |
| 2247 | optional BatterySnapshotType type = 1; |
| 2248 | // Temperature, in 1/10ths of degree C. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2249 | optional int32 temperature_deci_celsius = 2; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2250 | // Voltage Battery Voltage, in microVolts. |
| 2251 | optional int32 voltage_micro_volt = 3; |
| 2252 | // Current Battery current, in microAmps. |
| 2253 | optional int32 current_micro_amps = 4; |
| 2254 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 2255 | optional int32 open_circuit_micro_volt = 5; |
| 2256 | // Resistance Battery Resistance, in microOhms. |
| 2257 | optional int32 resistance_micro_ohm = 6; |
| 2258 | // Level Battery Level, as % of full. |
| 2259 | optional int32 level_percent = 7; |
| 2260 | } |
| 2261 | |
| 2262 | /** |
| 2263 | * Log slow I/O operations on the primary storage. |
| 2264 | */ |
| 2265 | message SlowIo { |
| 2266 | // Classifications of IO Operations. |
| 2267 | enum IoOperation { |
| 2268 | UNKNOWN = 0; |
| 2269 | READ = 1; |
| 2270 | WRITE = 2; |
| 2271 | UNMAP = 3; |
| 2272 | SYNC = 4; |
| 2273 | } |
| 2274 | optional IoOperation operation = 1; |
| 2275 | |
| 2276 | // The number of slow IO operations of this type over 24 hours. |
| 2277 | optional int32 count = 2; |
| 2278 | } |
| 2279 | |
| 2280 | /** |
| 2281 | * Log battery caused shutdown with the last recorded voltage. |
| 2282 | */ |
| 2283 | message BatteryCausedShutdown { |
| 2284 | // The last recorded battery voltage prior to shutdown. |
| 2285 | optional int32 last_recorded_micro_volt = 1; |
| 2286 | } |
| 2287 | |
| 2288 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2289 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 2290 | * |
| 2291 | * Logged from: |
| 2292 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 2293 | */ |
| 2294 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2295 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2296 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2297 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2298 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2299 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2300 | } |
| 2301 | |
| 2302 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2303 | * Logs phone signal strength changes. |
| 2304 | * |
| 2305 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2306 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2307 | */ |
| 2308 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 2309 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 2310 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2311 | } |
| 2312 | |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 2313 | |
| 2314 | /** |
| 2315 | * Logs when the phone state, sim state or signal strength changes |
| 2316 | * |
| 2317 | * Logged from: |
| 2318 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2319 | */ |
| 2320 | message PhoneServiceStateChanged { |
| 2321 | optional android.telephony.ServiceStateEnum state = 1; |
| 2322 | optional android.telephony.SimStateEnum sim_state = 2; |
| 2323 | optional android.telephony.SignalStrengthEnum signal_strength = 3; |
| 2324 | } |
| 2325 | |
| 2326 | /** |
| 2327 | * Logs when the phone becomes on or off. |
| 2328 | * |
| 2329 | * Logged from: |
| 2330 | * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java |
| 2331 | */ |
| 2332 | message PhoneStateChanged { |
| 2333 | enum State { |
| 2334 | OFF = 0; |
| 2335 | ON = 1; |
| 2336 | } |
| 2337 | optional State state = 1; |
| 2338 | } |
| 2339 | |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2340 | message LauncherUIChanged { |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 2341 | optional android.stats.launcher.LauncherAction action = 1; |
| 2342 | optional android.stats.launcher.LauncherState src_state = 2; |
| 2343 | optional android.stats.launcher.LauncherState dst_state = 3; |
| 2344 | optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES]; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2345 | optional bool is_swipe_up_enabled = 5; |
| 2346 | } |
| 2347 | |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2348 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2349 | * Logs when Settings UI has changed. |
| 2350 | * |
| 2351 | * Logged from: |
| 2352 | * packages/apps/Settings |
| 2353 | */ |
| 2354 | message SettingsUIChanged { |
| 2355 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2356 | * Where this SettingsUIChange event comes from. For example, if |
| 2357 | * it's a PAGE_VISIBLE event, where the page is opened from. |
| 2358 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2359 | optional android.app.settings.PageId attribution = 1; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2360 | |
| 2361 | /** |
| 2362 | * What the UI action is. |
| 2363 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2364 | optional android.app.settings.Action action = 2; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2365 | |
| 2366 | /** |
| 2367 | * Where the action is happening |
| 2368 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2369 | optional android.app.settings.PageId page_id = 3; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2370 | |
| 2371 | /** |
| 2372 | * What preference changed in this event. |
| 2373 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2374 | optional string changed_preference_key = 4; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2375 | |
| 2376 | /** |
| 2377 | * The new value of the changed preference. |
| 2378 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2379 | optional int64 changed_preference_int_value = 5; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2380 | } |
| 2381 | |
| 2382 | /** |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2383 | * Logs basic timing information about touch events. |
| 2384 | * Reported at most every 5 minutes while device is being interacted with. |
| 2385 | * |
| 2386 | * Logged from: |
| 2387 | * frameworks/native/services/inputflinger |
| 2388 | */ |
| 2389 | message TouchEventReported { |
| 2390 | /** |
| 2391 | * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, |
| 2392 | * and the standard deviation of latency between the kernel and framework |
| 2393 | * for touchscreen events. The units are microseconds. |
| 2394 | * |
| 2395 | * The number is measured as the difference between the time at which |
| 2396 | * the input event was received in the evdev driver, |
| 2397 | * and the time at which the input event was received in EventHub. |
| 2398 | */ |
| 2399 | // Minimum value |
| 2400 | optional float latency_min_micros = 1; |
| 2401 | // Maximum value |
| 2402 | optional float latency_max_micros = 2; |
| 2403 | // Average value |
| 2404 | optional float latency_mean_micros = 3; |
| 2405 | // Standard deviation |
| 2406 | optional float latency_stdev_micros = 4; |
| 2407 | } |
| 2408 | |
| 2409 | /** |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2410 | * Logs that a setting was updated. |
| 2411 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2412 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2413 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 2414 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 2415 | */ |
| 2416 | message SettingChanged { |
| 2417 | // The name of the setting. |
| 2418 | optional string setting = 1; |
| 2419 | |
| 2420 | // The change being imposed on this setting. May represent a number, eg "3". |
| 2421 | optional string value = 2; |
| 2422 | |
| 2423 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 2424 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 2425 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 2426 | // The +/- feature is currently only used for location_providers_allowed. |
| 2427 | optional string new_value = 3; |
| 2428 | |
| 2429 | // The previous value of this setting. |
| 2430 | optional string prev_value = 4; |
| 2431 | |
| 2432 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 2433 | optional string tag = 5; |
| 2434 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 2435 | // True if this setting with tag should be resettable. |
| 2436 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2437 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2438 | // 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] | 2439 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2440 | |
| 2441 | enum ChangeReason { |
| 2442 | UPDATED = 1; // Updated can be an insertion or an update. |
| 2443 | DELETED = 2; |
| 2444 | } |
| 2445 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2446 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 2447 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2448 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2449 | * Logs activity going to foreground or background |
| 2450 | * |
| 2451 | * Logged from: |
| 2452 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 2453 | */ |
| 2454 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2455 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 2456 | optional string pkg_name = 2; |
| 2457 | optional string class_name = 3; |
| 2458 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2459 | enum State { |
| 2460 | BACKGROUND = 0; |
| 2461 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2462 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2463 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2464 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 2465 | |
| 2466 | /** |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 2467 | * Logs when a volume entered low Storage state. |
| 2468 | * Logged from: |
| 2469 | * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java |
| 2470 | */ |
| 2471 | message LowStorageStateChanged { |
| 2472 | // Volume that ran out of storage. |
| 2473 | optional string volume_description = 1; |
| 2474 | |
| 2475 | enum State { |
| 2476 | UNKNOWN = 0; |
| 2477 | OFF = 1; |
| 2478 | ON = 2; |
| 2479 | } |
| 2480 | optional State state = 2; |
| 2481 | } |
| 2482 | |
| 2483 | /** |
| 2484 | * Logs when an app is downgraded. |
| 2485 | * Logged from: |
| 2486 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2487 | */ |
| 2488 | message AppDowngraded { |
| 2489 | optional string package_name = 1; |
| 2490 | // Size of the package (all data) before being downgraded. |
| 2491 | optional int64 size_in_bytes_before = 2; |
| 2492 | // Size of the package (all data) after being downgraded. |
| 2493 | optional int64 size_in_bytes_after = 3; |
| 2494 | |
| 2495 | optional bool aggressive = 4; |
| 2496 | } |
| 2497 | |
| 2498 | /** |
| 2499 | * Logs when an app is optimized after being downgraded. |
| 2500 | * Logged from: |
| 2501 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2502 | */ |
| 2503 | message AppOptimizedAfterDowngraded { |
| 2504 | optional string package_name = 1; |
| 2505 | } |
| 2506 | |
| 2507 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2508 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2509 | * Logged from: |
| 2510 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2511 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2512 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2513 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2514 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2515 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2516 | |
| 2517 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2518 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2519 | optional string process_name = 3; |
| 2520 | |
| 2521 | // The pid if available. -1 means not available. |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2522 | optional sint32 pid = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2523 | |
| 2524 | optional string package_name = 5; |
| 2525 | |
| 2526 | enum InstantApp { |
| 2527 | UNAVAILABLE = 0; |
| 2528 | FALSE = 1; |
| 2529 | TRUE = 2; |
| 2530 | } |
| 2531 | optional InstantApp is_instant_app = 6; |
| 2532 | |
| 2533 | enum ForegroundState { |
| 2534 | UNKNOWN = 0; |
| 2535 | BACKGROUND = 1; |
| 2536 | FOREGROUND = 2; |
| 2537 | } |
| 2538 | optional ForegroundState foreground_state = 7; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2539 | |
| 2540 | optional android.server.ErrorSource error_source = 8; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2541 | } |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2542 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2543 | /** |
| 2544 | * Logs when a WTF (What a Terrible Failure) happened. |
| 2545 | * Logged from: |
| 2546 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2547 | */ |
| 2548 | message WTFOccurred { |
| 2549 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2550 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2551 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2552 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2553 | // The name of the process. |
| 2554 | // system_server if it is not by an app |
| 2555 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2556 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2557 | // The pid if available. -1 means not available. |
| 2558 | optional sint32 pid = 4; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2559 | |
| 2560 | optional android.server.ErrorSource error_source = 5; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2561 | } |
| 2562 | |
| 2563 | /** |
| 2564 | * Logs when system server reports low memory. |
| 2565 | * Logged from: |
| 2566 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2567 | */ |
| 2568 | message LowMemReported { |
| 2569 | } |
| 2570 | |
| 2571 | /** |
| 2572 | * Logs when an app ANR (App Not Responding) occurs. |
| 2573 | * Logged from: |
| 2574 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 2575 | */ |
| 2576 | message ANROccurred { |
| 2577 | optional int32 uid = 1 [(is_uid) = true]; |
| 2578 | |
| 2579 | optional string process_name = 2; |
| 2580 | |
| 2581 | optional string short_component_name = 3; |
| 2582 | |
| 2583 | optional string reason = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2584 | |
| 2585 | enum InstantApp { |
| 2586 | UNAVAILABLE = 0; |
| 2587 | FALSE = 1; |
| 2588 | TRUE = 2; |
| 2589 | } |
| 2590 | optional InstantApp is_instant_app = 5; |
| 2591 | |
| 2592 | enum ForegroundState { |
| 2593 | UNKNOWN = 0; |
| 2594 | BACKGROUND = 1; |
| 2595 | FOREGROUND = 2; |
| 2596 | } |
| 2597 | optional ForegroundState foreground_state = 6; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2598 | |
| 2599 | optional android.server.ErrorSource error_source = 7; |
| 2600 | |
| 2601 | optional string package_name = 8; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2602 | } |
| 2603 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 2604 | /** |
| 2605 | * Logs when the vibrator state changes. |
| 2606 | * Logged from: |
| 2607 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 2608 | */ |
| 2609 | message VibratorStateChanged { |
| 2610 | repeated AttributionNode attribution_node = 1; |
| 2611 | |
| 2612 | enum State { |
| 2613 | OFF = 0; |
| 2614 | ON = 1; |
| 2615 | } |
| 2616 | optional State state = 2; |
| 2617 | |
| 2618 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 2619 | // Only applicable for State == ON. |
| 2620 | optional int64 duration_millis = 3; |
| 2621 | } |
| 2622 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2623 | /* |
| 2624 | * Allows other apps to push events into statsd. |
| 2625 | * Logged from: |
| 2626 | * frameworks/base/core/java/android/util/StatsLog.java |
| 2627 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2628 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2629 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2630 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2631 | |
| 2632 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 2633 | optional int32 label = 2; |
| 2634 | |
| 2635 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 2636 | // predicates for the metrics). |
| 2637 | enum State { |
| 2638 | UNKNOWN = 0; |
| 2639 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 2640 | STOP = 2; |
| 2641 | START = 3; |
| 2642 | } |
| 2643 | optional State state = 3; |
| 2644 | } |
| 2645 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2646 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 2647 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 2648 | * For example, this could be due to the user manually changing the time. |
| 2649 | * |
| 2650 | * Logged from: |
| 2651 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 2652 | */ |
| 2653 | message WallClockTimeShifted { |
| 2654 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 2655 | optional int64 wall_clock_timestamp_millis = 1; |
| 2656 | } |
| 2657 | |
| 2658 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2659 | * Logs when statsd detects an anomaly. |
| 2660 | * |
| 2661 | * Logged from: |
| 2662 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 2663 | */ |
| 2664 | message AnomalyDetected { |
| 2665 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2666 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2667 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 2668 | // Id of the config whose anomaly detection alert fired. |
| 2669 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2670 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 2671 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 2672 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2673 | } |
| 2674 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2675 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2676 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2677 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2678 | |
| 2679 | // The app package name. |
| 2680 | optional string pkg_name = 2; |
| 2681 | |
| 2682 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2683 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2684 | WARM = 1; |
| 2685 | HOT = 2; |
| 2686 | COLD = 3; |
| 2687 | } |
| 2688 | // The transition type. |
| 2689 | optional TransitionType type = 3; |
| 2690 | |
| 2691 | // The activity name. |
| 2692 | optional string activity_name = 4; |
| 2693 | |
| 2694 | // The name of the calling app. Empty if not set. |
| 2695 | optional string calling_pkg_name = 5; |
| 2696 | |
| 2697 | // Whether the app is an instant app. |
| 2698 | optional bool is_instant_app = 6; |
| 2699 | |
| 2700 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2701 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2702 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 2703 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2704 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2705 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2706 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2707 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2708 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2709 | optional int32 bind_application_delay_millis = 11; |
| 2710 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2711 | |
| 2712 | // Empty if not set. |
| 2713 | optional string launch_token = 13; |
| 2714 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 2715 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 2716 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 2717 | |
| 2718 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 2719 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2720 | } |
| 2721 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2722 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2723 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2724 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2725 | |
| 2726 | // The app package name. |
| 2727 | optional string pkg_name = 2; |
| 2728 | |
| 2729 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2730 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2731 | WARM = 1; |
| 2732 | HOT = 2; |
| 2733 | COLD = 3; |
| 2734 | } |
| 2735 | // The transition type. |
| 2736 | optional TransitionType type = 3; |
| 2737 | |
| 2738 | // The activity name. |
| 2739 | optional string activity_name = 4; |
| 2740 | } |
| 2741 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2742 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2743 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2744 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2745 | |
| 2746 | // The app package name. |
| 2747 | optional string pkg_name = 2; |
| 2748 | |
| 2749 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2750 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2751 | WITH_BUNDLE = 1; |
| 2752 | WITHOUT_BUNDLE = 2; |
| 2753 | } |
| 2754 | // The transition type. |
| 2755 | optional TransitionType type = 3; |
| 2756 | |
| 2757 | // The activity name. |
| 2758 | optional string activity_name = 4; |
| 2759 | |
| 2760 | optional bool transition_process_running = 5; |
| 2761 | |
| 2762 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2763 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2764 | } |
| 2765 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2766 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 2767 | * Logs a picture-in-picture action |
| 2768 | * Logged from: |
| 2769 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2770 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 2771 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 2772 | */ |
| 2773 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 2774 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2775 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 2776 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 2777 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 2778 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 2779 | enum State { |
| 2780 | ENTERED = 1; |
| 2781 | EXPANDED_TO_FULL_SCREEN = 2; |
| 2782 | MINIMIZED = 3; |
| 2783 | DISMISSED = 4; |
| 2784 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 2785 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 2786 | } |
| 2787 | |
| 2788 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 2789 | * Logs overlay action |
| 2790 | * Logged from: |
| 2791 | * services/core/java/com/android/server/wm/Session.java |
| 2792 | */ |
| 2793 | message OverlayStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2794 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 2795 | |
| 2796 | optional string package_name = 2; |
| 2797 | |
| 2798 | optional bool using_alert_window = 3; |
| 2799 | |
| 2800 | enum State { |
| 2801 | ENTERED = 1; |
| 2802 | EXITED = 2; |
| 2803 | } |
| 2804 | optional State state = 4; |
| 2805 | } |
| 2806 | |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 2807 | /* |
| 2808 | * Logs foreground service starts and stops. |
| 2809 | * Note that this is not when a service starts or stops, but when it is |
| 2810 | * considered foreground. |
| 2811 | * Logged from |
| 2812 | * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 2813 | */ |
| 2814 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2815 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 2816 | // package_name + "/" + class_name |
| 2817 | optional string short_name = 2; |
| 2818 | |
| 2819 | enum State { |
| 2820 | ENTER = 1; |
| 2821 | EXIT = 2; |
| 2822 | } |
| 2823 | optional State state = 3; |
| 2824 | } |
| 2825 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 2826 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2827 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 2828 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 2829 | * attributed back to the parent (host) uid. One example is Chrome. |
| 2830 | * |
| 2831 | * Logged from: |
| 2832 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2833 | */ |
| 2834 | message IsolatedUidChanged { |
| 2835 | // 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] | 2836 | // 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] | 2837 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2838 | optional int32 parent_uid = 1; |
| 2839 | |
| 2840 | optional int32 isolated_uid = 2; |
| 2841 | |
| 2842 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 2843 | enum Event { |
| 2844 | REMOVED = 0; |
| 2845 | CREATED = 1; |
| 2846 | } |
| 2847 | optional Event event = 3; |
| 2848 | } |
| 2849 | |
| 2850 | /* |
| 2851 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 2852 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 2853 | * and processed by WakeupController.cpp. |
| 2854 | */ |
| 2855 | message PacketWakeupOccurred { |
| 2856 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 2857 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2858 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2859 | // The interface name on which the packet was received. |
| 2860 | optional string iface = 2; |
| 2861 | // The ethertype value of the packet. |
| 2862 | optional int32 ethertype = 3; |
| 2863 | // String representation of the destination MAC address of the packet. |
| 2864 | optional string destination_hardware_address = 4; |
| 2865 | // String representation of the source address of the packet if this was an IP packet. |
| 2866 | optional string source_ip = 5; |
| 2867 | // String representation of the destination address of the packet if this was an IP packet. |
| 2868 | optional string destination_ip = 6; |
| 2869 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 2870 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 2871 | // families. |
| 2872 | optional int32 ip_next_header = 7; |
| 2873 | // The source port if this was a TCP or UDP packet. |
| 2874 | optional int32 source_port = 8; |
| 2875 | // The destination port if this was a TCP or UDP packet. |
| 2876 | optional int32 destination_port = 9; |
| 2877 | } |
| 2878 | |
| 2879 | /* |
| 2880 | * Logs the memory stats for an app on startup. |
| 2881 | * Logged from: |
| 2882 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2883 | */ |
| 2884 | message AppStartMemoryStateCaptured { |
| 2885 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2886 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2887 | |
| 2888 | // The process name. |
| 2889 | optional string process_name = 2; |
| 2890 | |
| 2891 | // The activity name. |
| 2892 | optional string activity_name = 3; |
| 2893 | |
| 2894 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2895 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2896 | |
| 2897 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2898 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2899 | |
| 2900 | // RSS |
| 2901 | optional int64 rss_in_bytes = 6; |
| 2902 | |
| 2903 | // CACHE |
| 2904 | optional int64 cache_in_bytes = 7; |
| 2905 | |
| 2906 | // SWAP |
| 2907 | optional int64 swap_in_bytes = 8; |
| 2908 | } |
| 2909 | |
| 2910 | /* |
| 2911 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 2912 | * for LMK event. |
| 2913 | * Logged from: |
| 2914 | * system/core/lmkd/lmkd.c |
| 2915 | */ |
| 2916 | message LmkStateChanged { |
| 2917 | enum State { |
| 2918 | UNKNOWN = 0; |
| 2919 | START = 1; |
| 2920 | STOP = 2; |
| 2921 | } |
| 2922 | optional State state = 1; |
| 2923 | } |
| 2924 | |
| 2925 | /* |
| 2926 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 2927 | * Logged from: |
| 2928 | * system/core/lmkd/lmkd.c |
| 2929 | */ |
| 2930 | message LmkKillOccurred { |
| 2931 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2932 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2933 | |
| 2934 | // The process name. |
| 2935 | optional string process_name = 2; |
| 2936 | |
| 2937 | // oom adj score. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2938 | optional int32 oom_adj_score = 3; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2939 | |
| 2940 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2941 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2942 | |
| 2943 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2944 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2945 | |
| 2946 | // RSS |
| 2947 | optional int64 rss_in_bytes = 6; |
| 2948 | |
| 2949 | // CACHE |
| 2950 | optional int64 cache_in_bytes = 7; |
| 2951 | |
| 2952 | // SWAP |
| 2953 | optional int64 swap_in_bytes = 8; |
Jim Blackler | 8593d1f | 2018-11-21 15:24:48 +0000 | [diff] [blame] | 2954 | |
| 2955 | // The elapsed real time of start of the process. |
| 2956 | optional int64 process_start_time_nanos = 9; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2957 | } |
| 2958 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 2959 | /* |
| 2960 | * Logs when the ActivityManagerService detects that an app died. |
| 2961 | * |
| 2962 | * Logged from: |
| 2963 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2964 | */ |
| 2965 | message AppDied { |
| 2966 | // timestamp(elapsedRealtime) of record creation |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 2967 | optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 2968 | } |
| 2969 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 2970 | /** |
| 2971 | * An atom for generic metrics logging. Available from Android Q. |
| 2972 | */ |
| 2973 | message GenericAtom { |
| 2974 | // The uid of the application that sent this custom atom. |
| 2975 | optional int32 uid = 1 [(is_uid) = true]; |
| 2976 | |
| 2977 | // An event_id indicates the type of event. |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 2978 | optional android.stats.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 2979 | } |
| 2980 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 2981 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 2982 | * Logs when a biometric acquire event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 2983 | * |
| 2984 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 2985 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 2986 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 2987 | message BiometricAcquired { |
| 2988 | // Biometric modality that was acquired. |
| 2989 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 2990 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. |
| 2991 | optional int32 user = 2; |
| 2992 | // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 2993 | optional bool is_crypto = 3; |
| 2994 | // Action that the device is performing. Acquired messages are only expected for enroll and |
| 2995 | // authenticate. Other actions may indicate an error. |
| 2996 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 2997 | // The client that this acquisition was received for. |
| 2998 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 2999 | // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager. |
| 3000 | optional int32 acquire_info = 6; |
| 3001 | // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. |
| 3002 | optional int32 acquire_info_vendor = 7; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3003 | } |
| 3004 | |
| 3005 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3006 | * Logs when a biometric authentication event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3007 | * |
| 3008 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3009 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3010 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3011 | message BiometricAuthenticated { |
| 3012 | // Biometric modality that was used. |
| 3013 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3014 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3015 | optional int32 user = 2; |
| 3016 | // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password |
| 3017 | // storage. |
| 3018 | optional bool is_crypto = 3; |
| 3019 | // The client that this acquisition was received for. |
| 3020 | optional android.hardware.biometrics.ClientEnum client = 4; |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3021 | // If authentication requires user confirmation. See BiometricPrompt's |
| 3022 | // setRequireConfirmation(bool) method. |
| 3023 | optional bool require_confirmation = 5; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3024 | |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3025 | enum State { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3026 | UNKNOWN = 0; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3027 | REJECTED = 1; |
| 3028 | PENDING_CONFIRMATION = 2; |
| 3029 | CONFIRMED = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3030 | } |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3031 | |
| 3032 | // State of the current auth attempt. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3033 | optional State state = 6; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3034 | // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is |
| 3035 | // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to |
| 3036 | // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to |
| 3037 | // CONFIRMED. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3038 | optional int64 latency_millis = 7; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3039 | } |
| 3040 | |
| 3041 | /** |
| 3042 | * Logs when a biometric error occurs. |
| 3043 | * |
| 3044 | * Logged from: |
| 3045 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3046 | */ |
| 3047 | message BiometricErrorOccurred { |
| 3048 | // Biometric modality that was used. |
| 3049 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3050 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3051 | optional int32 user = 2; |
| 3052 | // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3053 | optional bool is_crypto = 3; |
| 3054 | // Action that the device is performing. |
| 3055 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3056 | // The client that this acquisition was received for. |
| 3057 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3058 | // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors |
| 3059 | // are unique to modality. |
| 3060 | optional int32 error_info = 6; |
| 3061 | // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined |
| 3062 | // by the vendor and not specified by the HIDL interface. |
| 3063 | optional int32 error_info_vendor = 7; |
| 3064 | } |
| 3065 | |
| 3066 | /** |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3067 | * Logs when a system health issue is detected. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3068 | * Logged from: |
| 3069 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3070 | */ |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3071 | message BiometricSystemHealthIssueDetected { |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3072 | // Biometric modality. |
| 3073 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3074 | // Type of issue detected. |
| 3075 | optional android.hardware.biometrics.IssueEnum issue = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3076 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3077 | |
| 3078 | message Notification { |
| 3079 | |
| 3080 | // Type of notification event. |
| 3081 | enum Type { |
| 3082 | TYPE_UNKNOWN = 0; |
| 3083 | // Notification became visible to the user. |
| 3084 | TYPE_OPEN = 1; |
| 3085 | // Notification became hidden. |
| 3086 | TYPE_CLOSE = 2; |
| 3087 | // Notification switched to detail mode. |
| 3088 | TYPE_DETAIL = 3; |
| 3089 | // Notification was clicked. |
| 3090 | TYPE_ACTION = 4; |
| 3091 | // Notification was dismissed. |
| 3092 | TYPE_DISMISS = 5; |
| 3093 | // Notification switched to summary mode. The enum value of 14 is to |
| 3094 | // match that of metrics_constants. |
| 3095 | TYPE_COLLAPSE = 14; |
| 3096 | } |
| 3097 | optional Type type = 1; |
| 3098 | |
| 3099 | // Package name associated with the notification. |
| 3100 | optional string package_name = 2; |
| 3101 | |
| 3102 | // Tag associated with notification. |
| 3103 | optional string tag = 3; |
| 3104 | |
| 3105 | // Application-supplied ID associated with the notification. |
| 3106 | optional int32 id = 4; |
| 3107 | |
| 3108 | // Index of notification in the notification panel. |
| 3109 | optional int32 shade_index = 5; |
| 3110 | |
| 3111 | // The number of notifications in the notification panel. |
| 3112 | optional int32 shade_count = 6; |
| 3113 | |
| 3114 | // Importance for the notification. |
| 3115 | optional int32 importance = 7; |
| 3116 | |
| 3117 | // ID for the notification channel. |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 3118 | optional string channel_id = 8; |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3119 | |
| 3120 | // Importance for the notification channel. |
| 3121 | optional int32 channel_importance = 9; |
| 3122 | |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 3123 | // Application-supplied ID associated with the notifications group. |
| 3124 | optional string group_id = 10; |
| 3125 | |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3126 | // Whether notification was a group summary. |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 3127 | optional bool group_summary = 11; |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3128 | |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 3129 | // Reason for dismissal of a notification. This field is only meaningful for |
| 3130 | // TYPE_DISMISS events. |
| 3131 | optional int32 dismiss_reason = 12; |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3132 | |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 3133 | // The first post time of notification, stable across updates. |
| 3134 | optional int64 creation_millis = 13; |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3135 | |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 3136 | // The most recent interruption time, or the creation time if no updates. |
| 3137 | // Differs from update_millis because updates are filtered based on whether |
| 3138 | // they actually interrupted the user. |
| 3139 | optional int64 interruption_millis = 14; |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3140 | |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 3141 | // The most recent update time, or the creation time if no updates. |
| 3142 | optional int64 update_millis = 15; |
| 3143 | |
| 3144 | // The most recent visibility event. |
| 3145 | optional int64 visible_millis = 16; |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3146 | } |
| 3147 | |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3148 | /* |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3149 | * 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] | 3150 | */ |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3151 | message FlagFlipUpdateOccurred { |
| 3152 | // If the event is from a flag config package, specify the package name. |
| 3153 | optional string flag_flip_package_name = 1; |
| 3154 | |
| 3155 | // The order id of the package |
| 3156 | optional int64 order_id = 2; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3157 | } |
| 3158 | |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3159 | /** |
| 3160 | * Potential experiment ids that goes with a train install. |
| 3161 | */ |
| 3162 | message TrainExperimentIds { |
| 3163 | repeated int64 experiment_id = 1; |
| 3164 | } |
| 3165 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3166 | /* |
| 3167 | * Logs when a binary push state changes. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3168 | * Logged by the installer via public api. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3169 | */ |
| 3170 | message BinaryPushStateChanged { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3171 | // Name of the train. |
| 3172 | optional string train_name = 1; |
| 3173 | // Version code for a "train" of packages that need to be installed atomically |
| 3174 | optional int64 train_version_code = 2; |
| 3175 | // After installation of this package, device requires a restart. |
| 3176 | optional bool requires_staging = 3; |
| 3177 | // Rollback should be enabled for this install. |
| 3178 | optional bool rollback_enabled = 4; |
| 3179 | // Requires low latency monitoring if possible. |
| 3180 | optional bool requires_low_latency_monitor = 5; |
| 3181 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3182 | enum State { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3183 | UNKNOWN = 0; |
| 3184 | INSTALL_REQUESTED = 1; |
| 3185 | INSTALL_STARTED = 2; |
| 3186 | INSTALL_STAGED_NOT_READY = 3; |
| 3187 | INSTALL_STAGED_READY = 4; |
| 3188 | INSTALL_SUCCESS = 5; |
| 3189 | INSTALL_FAILURE = 6; |
| 3190 | INSTALL_CANCELLED = 7; |
| 3191 | INSTALLER_ROLLBACK_REQUESTED = 8; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3192 | INSTALLER_ROLLBACK_SUCCESS = 9; |
| 3193 | INSTALLER_ROLLBACK_FAILURE = 10; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3194 | } |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3195 | optional State state = 6; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3196 | // Possible experiment ids for monitoring this push. |
| 3197 | optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; |
| 3198 | // user id |
| 3199 | optional int32 user_id = 8; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3200 | } |
| 3201 | |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 3202 | /** Represents USB port overheat event. */ |
| 3203 | message UsbPortOverheatEvent { |
| 3204 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 3205 | optional int32 plug_temperature_deci_c = 1; |
| 3206 | |
| 3207 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ |
| 3208 | optional int32 max_temperature_deci_c = 2; |
| 3209 | |
| 3210 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 3211 | optional int32 time_to_overheat_secs = 3; |
| 3212 | |
| 3213 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 3214 | optional int32 time_to_hysteresis_secs = 4; |
| 3215 | |
| 3216 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 3217 | optional int32 time_to_inactive_secs = 5; |
| 3218 | }; |
| 3219 | |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 3220 | /** |
| 3221 | * Logs total effective full charge and discharge cycles on a battery. |
| 3222 | * Here are some examples of one effective cycle: |
| 3223 | * 1) the battery charges from 0% to 100% and drains back to 0%, |
| 3224 | * 2) charging from 50% to 100% and draining back to 50% twice. |
| 3225 | * Pulled from: |
| 3226 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 3227 | */ |
| 3228 | message BatteryCycleCount { |
| 3229 | /* Number of total charge and discharge cycles on the system battery. */ |
| 3230 | optional int32 cycle_count = 1; |
| 3231 | } |
| 3232 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3233 | /* |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3234 | * Logs when a connection becomes available and lost. |
| 3235 | * Logged in StatsCompanionService.java |
| 3236 | */ |
| 3237 | message ConnectivityStateChanged { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3238 | // Id of the network. |
| 3239 | optional int32 net_id = 1; |
| 3240 | |
| 3241 | enum State { |
| 3242 | UNKNOWN = 0; |
| 3243 | CONNECTED = 1; |
| 3244 | DISCONNECTED = 2; |
| 3245 | } |
| 3246 | // Connected state of a network. |
| 3247 | optional State state = 2; |
| 3248 | } |
| 3249 | |
| 3250 | /** |
| 3251 | * Logs when a service starts and stops. |
| 3252 | * Logged from: |
| 3253 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3254 | */ |
| 3255 | message ServiceStateChanged { |
| 3256 | |
| 3257 | optional int32 uid = 1 [(is_uid) = true]; |
| 3258 | |
| 3259 | optional string package_name = 2; |
| 3260 | |
| 3261 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3262 | |
| 3263 | enum State { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3264 | START = 1; |
| 3265 | STOP = 2; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3266 | } |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3267 | |
| 3268 | optional State state = 4; |
| 3269 | } |
| 3270 | |
| 3271 | /** |
| 3272 | * Logs when a service is launched. |
| 3273 | * Logged from: |
| 3274 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3275 | */ |
| 3276 | message ServiceLaunchReported { |
| 3277 | |
| 3278 | optional int32 uid = 1 [(is_uid) = true]; |
| 3279 | |
| 3280 | optional string package_name = 2; |
| 3281 | |
| 3282 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3283 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3284 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3285 | ////////////////////////////////////////////////////////////////////// |
| 3286 | // Pulled atoms below this line // |
| 3287 | ////////////////////////////////////////////////////////////////////// |
| 3288 | |
| 3289 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3290 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 3291 | * |
| 3292 | * Pulled from: |
| 3293 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 3294 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3295 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3296 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3297 | |
| 3298 | optional int64 rx_bytes = 2; |
| 3299 | |
| 3300 | optional int64 rx_packets = 3; |
| 3301 | |
| 3302 | optional int64 tx_bytes = 4; |
| 3303 | |
| 3304 | optional int64 tx_packets = 5; |
| 3305 | } |
| 3306 | |
| 3307 | /** |
| 3308 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 3309 | * |
| 3310 | * Pulled from: |
| 3311 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 3312 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3313 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3314 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3315 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3316 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 3317 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3318 | |
| 3319 | optional int64 rx_bytes = 3; |
| 3320 | |
| 3321 | optional int64 rx_packets = 4; |
| 3322 | |
| 3323 | optional int64 tx_bytes = 5; |
| 3324 | |
| 3325 | optional int64 tx_packets = 6; |
| 3326 | } |
| 3327 | |
| 3328 | /** |
| 3329 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 3330 | * |
| 3331 | * Pulled from: |
| 3332 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 3333 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3334 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3335 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3336 | |
| 3337 | optional int64 rx_bytes = 2; |
| 3338 | |
| 3339 | optional int64 rx_packets = 3; |
| 3340 | |
| 3341 | optional int64 tx_bytes = 4; |
| 3342 | |
| 3343 | optional int64 tx_packets = 5; |
| 3344 | } |
| 3345 | |
| 3346 | /** |
| 3347 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 3348 | * |
| 3349 | * Pulled from: |
| 3350 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 3351 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3352 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3353 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3354 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3355 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 3356 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3357 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3358 | |
| 3359 | optional int64 rx_bytes = 3; |
| 3360 | |
| 3361 | optional int64 rx_packets = 4; |
| 3362 | |
| 3363 | optional int64 tx_bytes = 5; |
| 3364 | |
| 3365 | optional int64 tx_packets = 6; |
| 3366 | } |
| 3367 | |
| 3368 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3369 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 3370 | * |
| 3371 | * Pulled from: |
| 3372 | * StatsCompanionService |
| 3373 | */ |
| 3374 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3375 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3376 | |
| 3377 | optional int64 rx_bytes = 2; |
| 3378 | |
| 3379 | optional int64 tx_bytes = 3; |
| 3380 | } |
| 3381 | |
| 3382 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3383 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 3384 | * android/internal/os/KernelWakelockStats.java |
| 3385 | * |
| 3386 | * Pulled from: |
| 3387 | * StatsCompanionService using KernelWakelockReader. |
| 3388 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3389 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3390 | optional string name = 1; |
| 3391 | |
| 3392 | optional int32 count = 2; |
| 3393 | |
| 3394 | optional int32 version = 3; |
| 3395 | |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3396 | optional int64 time_micros = 4; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3397 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3398 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3399 | /** |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 3400 | * Pulls low power state information. If power.stats HAL is not available, this |
| 3401 | * includes platform and subsystem sleep state information, |
| 3402 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState |
| 3403 | * as defined in: |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3404 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3405 | * hardware/interfaces/power/1.1/types.hal |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 3406 | * If power.stats HAL is available, this includes PowerEntityStateResidencyResult |
| 3407 | * as defined in: |
| 3408 | * hardware/interfaces/power/stats/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3409 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3410 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3411 | // Subsystem name |
| 3412 | optional string subsystem_name = 1; |
| 3413 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 3414 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 3415 | // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the |
| 3416 | // powerEntityStateName from the corresponding PowerEntityStateInfo. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3417 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 3418 | // 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] | 3419 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 3420 | // 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] | 3421 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 3422 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3423 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3424 | /** |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 3425 | * Pulls on-device power measurement information. |
| 3426 | * Data defined by hardware/interfaces/power/stats/1.0/types.hal. |
| 3427 | * Pulled from: |
| 3428 | * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp |
| 3429 | */ |
| 3430 | message OnDevicePowerMeasurement { |
| 3431 | // Name of the subsystem (to which the rail belongs). |
| 3432 | optional string subsystem_name = 1; |
| 3433 | |
| 3434 | // Rail name. The rail lies within the subsystem. |
| 3435 | optional string rail_name = 2; |
| 3436 | |
| 3437 | // Time (in ms since boot) at which the rail energy value was measured. |
| 3438 | // This may differ slightly from the time that statsd logs this information. |
| 3439 | optional uint64 measurement_timestamp_millis = 3; |
| 3440 | |
| 3441 | // Accumulated energy used via the rail since device boot in uWs. |
| 3442 | optional uint64 energy_microwatt_secs = 4; |
| 3443 | } |
| 3444 | |
| 3445 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3446 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 3447 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 3448 | * starts from highest to lowest. The value should be monotonically |
| 3449 | * increasing since boot. However, if there is a cpu |
| 3450 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3451 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3452 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3453 | optional uint32 cluster = 1; |
| 3454 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3455 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3456 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3457 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3458 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3459 | * Pulls Cpu Time Per Uid. |
| 3460 | * Note that isolated process uid time should be attributed to host uids. |
| 3461 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3462 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3463 | optional int32 uid = 1 [(is_uid) = true]; |
Misha Wagner | 6bc6c91 | 2018-11-16 13:19:54 +0000 | [diff] [blame] | 3464 | optional uint64 user_time_micros = 2; |
| 3465 | optional uint64 sys_time_micros = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3466 | } |
| 3467 | |
| 3468 | /** |
| 3469 | * Pulls Cpu Time Per Uid per frequency. |
| 3470 | * Note that isolated process uid time should be attributed to host uids. |
| 3471 | * For each uid, we order the time by descending frequencies. |
| 3472 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3473 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3474 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 3475 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3476 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3477 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 3478 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3479 | /** |
| 3480 | * Pulls Wifi Controller Activity Energy Info |
| 3481 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3482 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3483 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3484 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3485 | // stack reported state |
| 3486 | // TODO: replace this with proto enum |
| 3487 | optional int32 stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3488 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3489 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3490 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3491 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3492 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3493 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3494 | // product of current(mA), voltage(V) and time(ms) |
| 3495 | optional uint64 controller_energy_used = 6; |
| 3496 | } |
| 3497 | |
| 3498 | /** |
| 3499 | * Pulls Modem Activity Energy Info |
| 3500 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3501 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3502 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3503 | optional uint64 timestamp_millis = 1; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3504 | // sleep time in millis. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3505 | optional uint64 sleep_time_millis = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3506 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3507 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3508 | /** |
| 3509 | * Tx power index |
| 3510 | * index 0 = tx_power < 0dBm |
| 3511 | * index 1 = 0dBm < tx_power < 5dBm |
| 3512 | * index 2 = 5dBm < tx_power < 15dBm |
| 3513 | * index 3 = 15dBm < tx_power < 20dBm |
| 3514 | * index 4 = tx_power > 20dBm |
| 3515 | */ |
| 3516 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3517 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3518 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3519 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3520 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3521 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3522 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3523 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3524 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3525 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3526 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3527 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3528 | // product of current(mA), voltage(V) and time(ms) |
| 3529 | optional uint64 energy_used = 10; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 3530 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 3531 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3532 | /** |
| 3533 | * Pulls Bluetooth Activity Energy Info |
| 3534 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 3535 | */ |
| 3536 | message BluetoothActivityInfo { |
| 3537 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3538 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3539 | // bluetooth stack state |
| 3540 | optional int32 bluetooth_stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3541 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3542 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3543 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3544 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3545 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3546 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3547 | // product of current(mA), voltage(V) and time(ms) |
| 3548 | optional uint64 energy_used = 6; |
| 3549 | } |
| 3550 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 3551 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3552 | * Logs the memory stats for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3553 | * |
| 3554 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3555 | */ |
| 3556 | message ProcessMemoryState { |
| 3557 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3558 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3559 | |
| 3560 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3561 | // Usually package name, "system" for system server. |
| 3562 | // Provided by ActivityManagerService. |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3563 | optional string process_name = 2; |
| 3564 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3565 | // Current OOM score adjustment. Value read from ProcessRecord. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3566 | optional int32 oom_adj_score = 3; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3567 | |
| 3568 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3569 | optional int64 page_fault = 4; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3570 | |
| 3571 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3572 | optional int64 page_major_fault = 5; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3573 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 3574 | // RSS |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3575 | // Value is read from /proc/PID/stat, field 24. Or from memory.stat, field |
| 3576 | // total_rss if per-app memory cgroups are enabled. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 3577 | optional int64 rss_in_bytes = 6; |
| 3578 | |
| 3579 | // CACHE |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3580 | // Value is read from memory.stat, field total_cache if per-app memory |
| 3581 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 3582 | optional int64 cache_in_bytes = 7; |
| 3583 | |
| 3584 | // SWAP |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3585 | // Value is read from memory.stat, field total_swap if per-app memory |
| 3586 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 3587 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | aaf6089 | 2018-09-12 13:04:30 +0100 | [diff] [blame] | 3588 | |
Rafal Slawik | d03ae42 | 2018-11-20 11:27:45 +0000 | [diff] [blame] | 3589 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 3590 | optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; |
Rafal Slawik | 272a816 | 2018-11-01 15:12:28 +0000 | [diff] [blame] | 3591 | |
| 3592 | // Elapsed real time when the process started. |
| 3593 | // Value is read from /proc/PID/stat, field 22. 0 if read from per-app memory cgroups. |
| 3594 | optional int64 start_time_nanos = 10; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3595 | } |
| 3596 | |
| 3597 | /* |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3598 | * Logs the memory stats for a native process (from procfs). |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3599 | * |
| 3600 | * Pulled from StatsCompanionService for selected native processes. |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3601 | */ |
| 3602 | message NativeProcessMemoryState { |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3603 | // The uid if available. -1 means not available. |
| 3604 | optional int32 uid = 1 [(is_uid) = true]; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3605 | |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3606 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3607 | // Value read from /proc/PID/cmdline. |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3608 | optional string process_name = 2; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3609 | |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3610 | // # of page-faults |
| 3611 | optional int64 page_fault = 3; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3612 | |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3613 | // # of major page-faults |
| 3614 | optional int64 page_major_fault = 4; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3615 | |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3616 | // RSS |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3617 | // Value read from /proc/PID/stat, field 24. |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3618 | optional int64 rss_in_bytes = 5; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3619 | |
Rafal Slawik | d03ae42 | 2018-11-20 11:27:45 +0000 | [diff] [blame] | 3620 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 3621 | optional int64 rss_high_watermark_in_bytes = 6 [deprecated = true]; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3622 | |
| 3623 | // Elapsed real time when the process started. |
| 3624 | // Value is read from /proc/PID/stat, field 22. |
| 3625 | optional int64 start_time_nanos = 7; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3626 | } |
| 3627 | |
| 3628 | /* |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 3629 | * Logs the memory high-water mark for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3630 | * |
| 3631 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) |
| 3632 | * and for selected native processes. |
Rafal Slawik | 44b8814 | 2018-12-15 16:48:09 +0000 | [diff] [blame] | 3633 | * |
| 3634 | * Pulling this atom resets high-water mark counters for all processes. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 3635 | */ |
| 3636 | message ProcessMemoryHighWaterMark { |
| 3637 | // The uid if available. -1 means not available. |
| 3638 | optional int32 uid = 1 [(is_uid) = true]; |
| 3639 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3640 | // The process name. |
| 3641 | // Usually package name or process cmdline. |
| 3642 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 3643 | optional string process_name = 2; |
| 3644 | |
| 3645 | // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in |
| 3646 | // /proc/PID/status. |
| 3647 | optional int64 rss_high_water_mark_in_bytes = 3; |
| 3648 | } |
| 3649 | |
| 3650 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3651 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 3652 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3653 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3654 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 3655 | } |
| 3656 | |
| 3657 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3658 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 3659 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3660 | message SystemUptime { |
| 3661 | // Milliseconds since the system was booted. |
| 3662 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 3663 | // for external input). |
| 3664 | // 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] | 3665 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 3666 | } |
| 3667 | |
| 3668 | /* |
| 3669 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 3670 | * active: X (X is # cores) |
| 3671 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 3672 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 3673 | * ... |
| 3674 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 3675 | * The file contains a monotonically increasing count of time for a single boot. |
| 3676 | */ |
| 3677 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3678 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 3679 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 3680 | } |
| 3681 | |
| 3682 | /** |
| 3683 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 3684 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 3685 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 3686 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 3687 | * ... |
| 3688 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 3689 | * The file contains a monotonically increasing count of time for a single boot. |
| 3690 | */ |
| 3691 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3692 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 3693 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3694 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 3695 | } |
| 3696 | |
| 3697 | /* |
| 3698 | * Pulls free disk space, for data, system partition and temporary directory. |
| 3699 | */ |
| 3700 | message DiskSpace { |
| 3701 | // available bytes in data partition |
| 3702 | optional uint64 data_available_bytes = 1; |
| 3703 | // available bytes in system partition |
| 3704 | optional uint64 system_available_bytes = 2; |
| 3705 | // available bytes in download cache or temp directories |
| 3706 | optional uint64 temp_available_bytes = 3; |
| 3707 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 3708 | |
| 3709 | /** |
| 3710 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 9876a3b | 2019-01-11 14:28:35 -0800 | [diff] [blame] | 3711 | * |
| 3712 | * Pulled from StatsCompanionService.java |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 3713 | */ |
| 3714 | message RemainingBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3715 | optional int32 charge_micro_ampere_hour = 1; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 3716 | } |
| 3717 | |
| 3718 | /** |
| 3719 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 3720 | * Pulled from: |
| 3721 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 3722 | */ |
| 3723 | message FullBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3724 | optional int32 capacity_micro_ampere_hour = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 3725 | } |
| 3726 | |
| 3727 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 3728 | * Pulls battery voltage. |
| 3729 | * Pulled from: |
| 3730 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 3731 | */ |
| 3732 | message BatteryVoltage { |
| 3733 | // The voltage of the battery, in millivolts. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3734 | optional int32 voltage_millivolt = 1; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 3735 | } |
| 3736 | |
| 3737 | /** |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 3738 | * Pulls battery level (percent full, from 0 to 100). |
| 3739 | * |
| 3740 | * Pulled from: |
| 3741 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 3742 | */ |
| 3743 | message BatteryLevel { |
| 3744 | // Battery level. Should be in [0, 100]. |
| 3745 | optional int32 battery_level = 1; |
| 3746 | } |
| 3747 | |
| 3748 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 3749 | * Pulls the temperature of various parts of the device. |
| 3750 | * 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] | 3751 | * |
| 3752 | * Pulled from: |
| 3753 | * frameworks/base/cmds/statsd/src/external/ResourceThermalManagerPuller.cpp |
| 3754 | */ |
| 3755 | message Temperature { |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 3756 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 3757 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 3758 | |
| 3759 | // The name of the temperature source. Eg. CPU0 |
| 3760 | optional string sensor_name = 2; |
| 3761 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 3762 | // Temperature in tenths of a degree C. |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 3763 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3764 | optional int32 temperature_deci_celsius = 3; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 3765 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 3766 | |
| 3767 | /** |
| 3768 | * Pulls the statistics of calls to Binder. |
| 3769 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 3770 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 3771 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 3772 | * |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 3773 | * Next tag: 15 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 3774 | */ |
| 3775 | message BinderCalls { |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 3776 | // UID of the process responsible for the binder transaction. It will be set if the process |
| 3777 | // executing the binder transaction attribute the transaction to another uid using |
| 3778 | // Binder.setThreadWorkSource(). |
| 3779 | // |
| 3780 | // If not set, the value will be -1. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 3781 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 3782 | // UID of the process executing the binder transaction. |
| 3783 | optional int32 direct_caller_uid = 14; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 3784 | // Fully qualified class name of the API call. |
| 3785 | // |
| 3786 | // This is a system server class name. |
| 3787 | // |
| 3788 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 3789 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 3790 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 3791 | // commonly used APIs. |
| 3792 | optional string service_class_name = 2; |
| 3793 | // Method name of the API call. It can also be a transaction code if we cannot |
| 3794 | // resolve it to a name. See Binder#getTransactionName. |
| 3795 | // |
| 3796 | // This is a system server method name. |
| 3797 | optional string service_method_name = 3; |
| 3798 | // Total number of API calls. |
| 3799 | optional int64 call_count = 4; |
| 3800 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 3801 | optional bool screen_interactive = 13; |
| 3802 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 3803 | // call_count will be equal to recorded_call_count. |
| 3804 | // |
| 3805 | // If recorded_call_count is different than call_count, it means data collection has been |
| 3806 | // sampled. All the fields below will be sampled in this case. |
| 3807 | optional int64 recorded_call_count = 12; |
| 3808 | // Number of exceptions thrown by the API. |
| 3809 | optional int64 recorded_exception_count = 5; |
| 3810 | // Total latency of all API calls. |
| 3811 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 3812 | optional int64 recorded_total_latency_micros = 6; |
| 3813 | // Maximum latency of one API call. |
| 3814 | optional int64 recorded_max_latency_micros = 7; |
| 3815 | // Total CPU usage of all API calls. |
| 3816 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 3817 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 3818 | optional int64 recorded_total_cpu_micros = 8; |
| 3819 | // Maximum CPU usage of one API call. |
| 3820 | optional int64 recorded_max_cpu_micros = 9; |
| 3821 | // Maximum parcel reply size of one API call. |
| 3822 | optional int64 recorded_max_reply_size_bytes = 10; |
| 3823 | // Maximum parcel request size of one API call. |
| 3824 | optional int64 recorded_max_request_size_bytes = 11; |
| 3825 | } |
| 3826 | |
| 3827 | /** |
| 3828 | * Pulls the statistics of exceptions during calls to Binder. |
| 3829 | * |
| 3830 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 3831 | * > adb shell dumpsys binder_calls_stats --reset |
| 3832 | */ |
| 3833 | message BinderCallsExceptions { |
| 3834 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 3835 | // |
| 3836 | // This is an exception class name thrown by the system server. |
| 3837 | optional string exception_class_name = 1; |
| 3838 | // Total number of exceptions. |
| 3839 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 3840 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 3841 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 3842 | /** |
| 3843 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 3844 | * |
| 3845 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 3846 | * config on the device. |
| 3847 | * |
| 3848 | * Next tag: 11 |
| 3849 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 3850 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 3851 | // 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] | 3852 | optional int32 uid = 1 [(is_uid) = true]; |
| 3853 | |
| 3854 | // Fully qualified class name of the handler target class. |
| 3855 | // |
| 3856 | // This field does not contain PII. This is a system server class name. |
| 3857 | optional string handler_class_name = 2; |
| 3858 | |
| 3859 | // The name of the thread that runs the Looper. |
| 3860 | // |
| 3861 | // This field does not contain PII. This is a system server thread name. |
| 3862 | optional string looper_thread_name = 3; |
| 3863 | |
| 3864 | // The name of the dispatched message. |
| 3865 | // |
| 3866 | // This field does not contain PII. This is a system server constant or class |
| 3867 | // name. |
| 3868 | optional string message_name = 4; |
| 3869 | |
| 3870 | // Total number of successfully dispatched messages. |
| 3871 | optional int64 message_count = 5; |
| 3872 | |
| 3873 | // Total number of messages that failed dispatching. |
| 3874 | optional int64 exception_count = 6; |
| 3875 | |
| 3876 | // Total number of processed messages we have data recorded for. If we |
| 3877 | // collected data for all the messages, message_count will be equal to |
| 3878 | // recorded_message_count. |
| 3879 | // |
| 3880 | // If recorded_message_count is different than message_count, it means data |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 3881 | // 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] | 3882 | optional int64 recorded_message_count = 7; |
| 3883 | |
| 3884 | // Total latency of all processed messages. |
| 3885 | // Average can be computed using recorded_total_latency_micros / |
| 3886 | // recorded_message_count. |
| 3887 | optional int64 recorded_total_latency_micros = 8; |
| 3888 | |
| 3889 | // Total CPU usage of all processed message. |
| 3890 | // Average can be computed using recorded_total_cpu_micros / |
| 3891 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 3892 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 3893 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 3894 | |
| 3895 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 3896 | optional bool screen_interactive = 10; |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 3897 | |
| 3898 | // Max recorded CPU usage of all processed messages. |
| 3899 | optional int64 recorded_max_cpu_micros = 11; |
| 3900 | |
| 3901 | // Max recorded latency of all processed messages. |
| 3902 | optional int64 recorded_max_latency_micros = 12; |
| 3903 | |
| 3904 | // Total number of messages we tracked the dispatching delay for. If we |
| 3905 | // collected data for all the messages, message_count will be equal to |
| 3906 | // recorded_delay_message_count. |
| 3907 | // |
| 3908 | // If recorded_delay_message_count is different than message_count, it means data |
| 3909 | // collection has been sampled or/and not all messages specified the target dispatch time. |
| 3910 | // The fields below will be sampled in this case. |
| 3911 | optional int64 recorded_delay_message_count = 13; |
| 3912 | |
| 3913 | // Total dispatching delay of all processed messages. |
| 3914 | // Calculated as a difference between the target dispatching time (Message.when) |
| 3915 | // and the actual dispatching time. |
| 3916 | // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. |
| 3917 | optional int64 recorded_total_delay_millis = 14; |
| 3918 | |
| 3919 | // Max dispatching delay of all processed messages. |
| 3920 | // Calculated as a difference between the target dispatching time (Message.when) |
| 3921 | // and the actual dispatching time. |
| 3922 | optional int64 recorded_max_delay_millis = 15; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 3923 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 3924 | |
| 3925 | /** |
| 3926 | * Pulls disk information, such as write speed and latency. |
| 3927 | */ |
| 3928 | message DiskStats { |
| 3929 | // Time taken to open, write 512B to, and close a file. |
| 3930 | // -1 if error performing the check. |
| 3931 | optional int64 data_write_latency_millis = 1; |
| 3932 | |
| 3933 | optional bool file_based_encryption = 2; |
| 3934 | |
| 3935 | // Recent disk write speed in kB/s. |
| 3936 | // -1 if error querying storageed. |
| 3937 | // 0 if data is unavailable. |
| 3938 | optional int32 recent_disk_write_speed = 3; |
| 3939 | } |
| 3940 | |
| 3941 | |
| 3942 | /** |
| 3943 | * Free and total bytes of the Data, Cache, and System partition. |
| 3944 | */ |
| 3945 | message DirectoryUsage { |
| 3946 | enum Directory { |
| 3947 | UNKNOWN = 0; |
| 3948 | DATA = 1; |
| 3949 | CACHE = 2; |
| 3950 | SYSTEM = 3; |
| 3951 | } |
| 3952 | optional Directory directory = 1; |
| 3953 | optional int64 free_bytes = 2; |
| 3954 | optional int64 total_bytes = 3; |
| 3955 | } |
| 3956 | |
| 3957 | |
| 3958 | /** |
| 3959 | * Size of an application: apk size, data size, and cache size. |
| 3960 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 3961 | * Information is only reported for apps with the primary user (user 0). |
| 3962 | * Sizes are aggregated by package name. |
| 3963 | */ |
| 3964 | message AppSize { |
| 3965 | // Including uids will involve modifying diskstats logic. |
| 3966 | optional string package_name = 1; |
| 3967 | // App size in bytes. -1 if unavailable. |
| 3968 | optional int64 app_size_bytes = 2; |
| 3969 | // App data size in bytes. -1 if unavailable. |
| 3970 | optional int64 app_data_size_bytes = 3; |
| 3971 | // App cache size in bytes. -1 if unavailable. |
| 3972 | optional int64 app_cache_size_bytes = 4; |
| 3973 | // Time that the cache file was produced. |
| 3974 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 3975 | optional int64 cache_time_millis = 5; |
| 3976 | } |
| 3977 | |
| 3978 | |
| 3979 | /** |
| 3980 | * Size of a particular category. Eg: photos, videos. |
| 3981 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 3982 | */ |
| 3983 | message CategorySize { |
| 3984 | enum Category { |
| 3985 | UNKNOWN = 0; |
| 3986 | APP_SIZE = 1; |
| 3987 | APP_DATA_SIZE = 2; |
| 3988 | APP_CACHE_SIZE = 3; |
| 3989 | PHOTOS = 4; |
| 3990 | VIDEOS = 5; |
| 3991 | AUDIO = 6; |
| 3992 | DOWNLOADS = 7; |
| 3993 | SYSTEM = 8; |
| 3994 | OTHER = 9; |
| 3995 | } |
| 3996 | optional Category category = 1; |
| 3997 | // Category size in bytes. |
| 3998 | optional int64 size_bytes = 2; |
| 3999 | // Time that the cache file was produced. |
| 4000 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 4001 | optional int64 cache_time_millis = 3; |
| 4002 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4003 | |
| 4004 | /** |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 4005 | * Pulls per uid I/O stats. The stats are cumulative since boot. |
| 4006 | * |
| 4007 | * Read/write bytes are I/O events from a storage device |
| 4008 | * Read/write chars are data requested by read/write syscalls, and can be |
| 4009 | * satisfied by caching. |
| 4010 | * |
| 4011 | * Pulled from StatsCompanionService, which reads proc/uid_io/stats. |
| 4012 | */ |
| 4013 | message DiskIo { |
| 4014 | optional int32 uid = 1 [(is_uid) = true]; |
| 4015 | optional int64 fg_chars_read = 2; |
| 4016 | optional int64 fg_chars_write = 3; |
| 4017 | optional int64 fg_bytes_read = 4; |
| 4018 | optional int64 fg_bytes_write = 5; |
| 4019 | optional int64 bg_chars_read = 6; |
| 4020 | optional int64 bg_chars_write = 7; |
| 4021 | optional int64 bg_bytes_read = 8; |
| 4022 | optional int64 bg_bytes_write = 9; |
| 4023 | optional int64 fg_fsync = 10; |
| 4024 | optional int64 bg_fsync= 11; |
| 4025 | } |
| 4026 | |
| 4027 | |
| 4028 | /** |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4029 | * Pulls the number of fingerprints for each user. |
| 4030 | * |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4031 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4032 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4033 | message NumBiometricsEnrolled { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4034 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 4035 | // Defined in android/os/UserHandle.java |
| 4036 | optional int32 user = 1; |
| 4037 | // Number of fingerprints registered to that user. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4038 | optional int32 num_enrolled = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4039 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4040 | |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 4041 | /** |
| 4042 | * A mapping of role holder -> role |
| 4043 | */ |
| 4044 | message RoleHolder { |
| 4045 | // uid of the role holder |
| 4046 | optional int32 uid = 1 [(is_uid) = true]; |
| 4047 | |
| 4048 | // package name of the role holder |
| 4049 | optional string package_name = 2; |
| 4050 | |
| 4051 | // the role held |
| 4052 | optional string role = 3; |
| 4053 | } |
| 4054 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4055 | message AggStats { |
| 4056 | optional int64 min = 1; |
| 4057 | |
| 4058 | optional int64 average = 2; |
| 4059 | |
| 4060 | optional int64 max = 3; |
| 4061 | } |
| 4062 | |
| 4063 | message ProcessStatsStateProto { |
| 4064 | optional android.service.procstats.ScreenState screen_state = 1; |
| 4065 | |
| 4066 | optional android.service.procstats.MemoryState memory_state = 2; |
| 4067 | |
| 4068 | // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java |
| 4069 | // and not frameworks/base/core/java/android/app/ActivityManager.java |
| 4070 | optional android.service.procstats.ProcessState process_state = 3; |
| 4071 | |
| 4072 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4073 | optional int64 duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4074 | |
| 4075 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4076 | optional int64 realtime_duration_millis = 9; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4077 | |
| 4078 | // # of samples taken |
| 4079 | optional int32 sample_size = 5; |
| 4080 | |
| 4081 | // PSS is memory reserved for this process |
| 4082 | optional AggStats pss = 6; |
| 4083 | |
| 4084 | // USS is memory shared between processes, divided evenly for accounting |
| 4085 | optional AggStats uss = 7; |
| 4086 | |
| 4087 | // RSS is memory resident for this process |
| 4088 | optional AggStats rss = 8; |
| 4089 | } |
| 4090 | |
| 4091 | // Next Tag: 7 |
| 4092 | message ProcessStatsProto { |
| 4093 | // Name of process. |
| 4094 | optional string process = 1; |
| 4095 | |
| 4096 | // Uid of the process. |
| 4097 | optional int32 uid = 2; |
| 4098 | |
| 4099 | // Information about how often kills occurred |
| 4100 | message Kill { |
| 4101 | // Count of excessive CPU kills |
| 4102 | optional int32 cpu = 1; |
| 4103 | |
| 4104 | // Count of kills when cached |
| 4105 | optional int32 cached = 2; |
| 4106 | |
| 4107 | // PSS stats during cached kill |
| 4108 | optional AggStats cached_pss = 3; |
| 4109 | } |
| 4110 | optional Kill kill = 3; |
| 4111 | |
| 4112 | // Time and memory spent in various states. |
| 4113 | repeated ProcessStatsStateProto states = 5; |
| 4114 | |
| 4115 | // Total time process has been running... screen_state, memory_state, and process_state |
| 4116 | // will not be set. |
| 4117 | optional ProcessStatsStateProto total_running_state = 6; |
| 4118 | } |
| 4119 | |
| 4120 | message PackageServiceOperationStatsProto { |
| 4121 | // Operate enum: Started, Foreground, Bound, Executing |
| 4122 | optional android.service.procstats.ServiceOperationState operation = 1; |
| 4123 | |
| 4124 | // Number of times the service was in this operation. |
| 4125 | optional int32 count = 2; |
| 4126 | |
| 4127 | // Information about a state the service can be in. |
| 4128 | message StateStats { |
| 4129 | // Screen state enum. |
| 4130 | optional android.service.procstats.ScreenState screen_state = 1; |
| 4131 | // Memory state enum. |
| 4132 | optional android.service.procstats.MemoryState memory_state = 2; |
| 4133 | |
| 4134 | // duration in milliseconds. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4135 | optional int64 duration_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4136 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4137 | optional int64 realtime_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4138 | } |
| 4139 | repeated StateStats state_stats = 3; |
| 4140 | } |
| 4141 | |
| 4142 | message PackageServiceStatsProto { |
| 4143 | // Name of service component. |
| 4144 | optional string service_name = 1; |
| 4145 | |
| 4146 | // The operation stats. |
| 4147 | // The package_name, package_uid, package_version, service_name will not be set to save space. |
| 4148 | repeated PackageServiceOperationStatsProto operation_stats = 2; |
| 4149 | } |
| 4150 | |
| 4151 | message PackageAssociationSourceProcessStatsProto { |
| 4152 | // Uid of the process. |
| 4153 | optional int32 process_uid = 1; |
| 4154 | // Process name. |
| 4155 | optional string process_name = 2; |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4156 | // Package name. |
| 4157 | optional string package_name = 7; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4158 | // Total count of the times this association appeared. |
| 4159 | optional int32 total_count = 3; |
| 4160 | |
| 4161 | // Millisecond uptime total duration this association was around. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4162 | optional int64 total_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4163 | |
| 4164 | // Total count of the times this association became actively impacting its target process. |
| 4165 | optional int32 active_count = 5; |
| 4166 | |
| 4167 | // Information on one source in this association. |
| 4168 | message StateStats { |
| 4169 | // Process state enum. |
| 4170 | optional android.service.procstats.ProcessState process_state = 1; |
| 4171 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4172 | optional int64 duration_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4173 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4174 | optional int64 realtime_duration_mmillis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4175 | } |
| 4176 | repeated StateStats active_state_stats = 6; |
| 4177 | } |
| 4178 | |
| 4179 | message PackageAssociationProcessStatsProto { |
| 4180 | // Name of the target component. |
| 4181 | optional string component_name = 1; |
| 4182 | // Information on one source in this association. |
| 4183 | repeated PackageAssociationSourceProcessStatsProto sources = 2; |
| 4184 | } |
| 4185 | |
| 4186 | |
| 4187 | message ProcessStatsPackageProto { |
| 4188 | // Name of package. |
| 4189 | optional string package = 1; |
| 4190 | |
| 4191 | // Uid of the package. |
| 4192 | optional int32 uid = 2; |
| 4193 | |
| 4194 | // Version of the package. |
| 4195 | optional int64 version = 3; |
| 4196 | |
| 4197 | // Stats for each process running with the package loaded in to it. |
| 4198 | repeated ProcessStatsProto process_stats = 4; |
| 4199 | |
| 4200 | // Stats for each of the package's services. |
| 4201 | repeated PackageServiceStatsProto service_stats = 5; |
| 4202 | |
| 4203 | // Stats for each association with the package. |
| 4204 | repeated PackageAssociationProcessStatsProto association_stats = 6; |
| 4205 | } |
| 4206 | |
| 4207 | message ProcessStatsSectionProto { |
| 4208 | // Elapsed realtime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4209 | optional int64 start_realtime_millis = 1; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4210 | |
| 4211 | // Elapsed realtime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4212 | optional int64 end_realtime_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4213 | |
| 4214 | // CPU uptime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4215 | optional int64 start_uptime_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4216 | |
| 4217 | // CPU uptime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4218 | optional int64 end_uptime_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4219 | |
| 4220 | // System runtime library. e.g. "libdvm.so", "libart.so". |
| 4221 | optional string runtime = 5; |
| 4222 | |
| 4223 | // whether kernel reports swapped pss. |
| 4224 | optional bool has_swapped_pss = 6; |
| 4225 | |
| 4226 | // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". |
| 4227 | enum Status { |
| 4228 | STATUS_UNKNOWN = 0; |
| 4229 | STATUS_COMPLETE = 1; |
| 4230 | STATUS_PARTIAL = 2; |
| 4231 | STATUS_SHUTDOWN = 3; |
| 4232 | STATUS_SYSPROPS = 4; |
| 4233 | } |
| 4234 | repeated Status status = 7; |
| 4235 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4236 | // Number of pages available of various types and sizes, representation fragmentation. |
| 4237 | repeated ProcessStatsAvailablePagesProto available_pages = 10; |
| 4238 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4239 | // Stats for each process. |
| 4240 | repeated ProcessStatsProto process_stats = 8; |
| 4241 | |
| 4242 | // Stats for each package. |
| 4243 | repeated ProcessStatsPackageProto package_stats = 9; |
| 4244 | } |
| 4245 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4246 | message ProcessStatsAvailablePagesProto { |
| 4247 | // Node these pages are in (as per /proc/pagetypeinfo) |
| 4248 | optional int32 node = 1; |
| 4249 | |
| 4250 | // Zone these pages are in (as per /proc/pagetypeinfo) |
| 4251 | optional string zone = 2; |
| 4252 | |
| 4253 | // Label for the type of these pages (as per /proc/pagetypeinfo) |
| 4254 | optional string label = 3; |
| 4255 | |
| 4256 | // Distribution of number of pages available by order size. First entry in array is |
| 4257 | // order 0, second is order 1, etc. Each order increase is a doubling of page size. |
| 4258 | repeated int32 pages_per_order = 4; |
| 4259 | } |
| 4260 | |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4261 | /** |
| 4262 | * Pulled from ProcessStatsService.java |
| 4263 | */ |
| 4264 | message ProcStats { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4265 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 4266 | } |
| 4267 | |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 4268 | /** |
| 4269 | * Pulled from ProcessStatsService.java |
| 4270 | */ |
| 4271 | message ProcStatsPkgProc { |
| 4272 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 4273 | } |
| 4274 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4275 | message PowerProfileProto { |
| 4276 | optional double cpu_suspend = 1; |
| 4277 | |
| 4278 | optional double cpu_idle = 2; |
| 4279 | |
| 4280 | optional double cpu_active = 3; |
| 4281 | |
| 4282 | message CpuCluster { |
| 4283 | optional int32 id = 1; |
| 4284 | optional double cluster_power = 2; |
| 4285 | optional int32 cores = 3; |
| 4286 | repeated int64 speed = 4; |
| 4287 | repeated double core_power = 5; |
| 4288 | } |
| 4289 | |
| 4290 | repeated CpuCluster cpu_cluster = 40; |
| 4291 | |
| 4292 | optional double wifi_scan = 4; |
| 4293 | |
| 4294 | optional double wifi_on = 5; |
| 4295 | |
| 4296 | optional double wifi_active = 6; |
| 4297 | |
| 4298 | optional double wifi_controller_idle = 7; |
| 4299 | |
| 4300 | optional double wifi_controller_rx = 8; |
| 4301 | |
| 4302 | optional double wifi_controller_tx = 9; |
| 4303 | |
| 4304 | repeated double wifi_controller_tx_levels = 10; |
| 4305 | |
| 4306 | optional double wifi_controller_operating_voltage = 11; |
| 4307 | |
| 4308 | optional double bluetooth_controller_idle = 12; |
| 4309 | |
| 4310 | optional double bluetooth_controller_rx = 13; |
| 4311 | |
| 4312 | optional double bluetooth_controller_tx = 14; |
| 4313 | |
| 4314 | optional double bluetooth_controller_operating_voltage = 15; |
| 4315 | |
| 4316 | optional double modem_controller_sleep = 16; |
| 4317 | |
| 4318 | optional double modem_controller_idle = 17; |
| 4319 | |
| 4320 | optional double modem_controller_rx = 18; |
| 4321 | |
| 4322 | repeated double modem_controller_tx = 19; |
| 4323 | |
| 4324 | optional double modem_controller_operating_voltage = 20; |
| 4325 | |
| 4326 | optional double gps_on = 21; |
| 4327 | |
| 4328 | repeated double gps_signal_quality_based = 22; |
| 4329 | |
| 4330 | optional double gps_operating_voltage = 23; |
| 4331 | |
| 4332 | optional double bluetooth_on = 24; |
| 4333 | |
| 4334 | optional double bluetooth_active = 25; |
| 4335 | |
| 4336 | optional double bluetooth_at_cmd = 26; |
| 4337 | |
| 4338 | optional double ambient_display = 27; |
| 4339 | |
| 4340 | optional double screen_on = 28; |
| 4341 | |
| 4342 | optional double radio_on = 29; |
| 4343 | |
| 4344 | optional double radio_scanning = 30; |
| 4345 | |
| 4346 | optional double radio_active = 31; |
| 4347 | |
| 4348 | optional double screen_full = 32; |
| 4349 | |
| 4350 | optional double audio = 33; |
| 4351 | |
| 4352 | optional double video = 34; |
| 4353 | |
| 4354 | optional double flashlight = 35; |
| 4355 | |
| 4356 | optional double memory = 36; |
| 4357 | |
| 4358 | optional double camera = 37; |
| 4359 | |
| 4360 | optional double wifi_batched_scan = 38; |
| 4361 | |
| 4362 | optional double battery_capacity = 39; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4363 | } |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 4364 | |
| 4365 | /** |
| 4366 | * power_profile.xml and other constants for power model calculations. |
| 4367 | * Pulled from PowerProfile.java |
| 4368 | */ |
| 4369 | message PowerProfile { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4370 | optional PowerProfileProto power_profile = 1; |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 4371 | } |
Chenjie Yu | b35b5f7 | 2018-10-13 23:25:11 -0700 | [diff] [blame] | 4372 | |
| 4373 | /** |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 4374 | * Logs when a user restriction was added or removed. |
| 4375 | * |
| 4376 | * Logged from: |
| 4377 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 4378 | */ |
| 4379 | message UserRestrictionChanged { |
| 4380 | // The raw string of the user restriction as defined in UserManager. |
| 4381 | // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. |
| 4382 | optional string restriction = 1; |
| 4383 | // Whether the restriction is enabled or disabled. |
| 4384 | optional bool enabled = 2; |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 4385 | } |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 4386 | |
| 4387 | /** |
| 4388 | * Pulls process user time and system time. Puller takes a snapshot of all pids |
| 4389 | * in the system and returns cpu stats for those that are working at the time. |
| 4390 | * Dead pids will be dropped. Kernel processes are excluded. |
| 4391 | * Min cool-down is 5 sec. |
| 4392 | */ |
| 4393 | message ProcessCpuTime { |
| 4394 | optional int32 uid = 1 [(is_uid) = true]; |
| 4395 | |
| 4396 | optional string process_name = 2; |
| 4397 | // Process cpu time in user space, cumulative from boot/process start |
| 4398 | optional int64 user_time_millis = 3; |
| 4399 | // Process cpu time in system space, cumulative from boot/process start |
| 4400 | optional int64 system_time_millis = 4; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 4401 | } |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4402 | |
| 4403 | /** |
| 4404 | * Pulls the CPU usage for each thread. |
| 4405 | * |
| 4406 | * Read from /proc/$PID/task/$TID/time_in_state files. |
| 4407 | * |
| 4408 | * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and |
| 4409 | * time_in_state files not being present on some phones, have not been addressed. These should be |
| 4410 | * considered before a public release. |
| 4411 | */ |
| 4412 | message CpuTimePerThreadFreq { |
| 4413 | // UID that owns the process. |
| 4414 | optional int32 uid = 1 [(is_uid) = true]; |
| 4415 | // ID of the process. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 4416 | optional int32 process_id = 2; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4417 | // ID of the thread. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 4418 | optional int32 thread_id = 3; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4419 | // Name of the process taken from `/proc/$PID/cmdline`. |
| 4420 | optional string process_name = 4; |
| 4421 | // Name of the thread taken from `/proc/$PID/task/$TID/comm` |
| 4422 | optional string thread_name = 5; |
Misha Wagner | fde6958 | 2018-11-28 13:26:32 +0000 | [diff] [blame] | 4423 | |
| 4424 | // Report eight different frequencies, and how much time is spent in each frequency. Frequencies |
| 4425 | // are given in KHz, and time is given in milliseconds since the thread started. All eight |
| 4426 | // frequencies are given here as the alternative is sending eight separate atoms. This method |
| 4427 | // significantly reduces the amount of data created |
| 4428 | optional int32 frequency1_khz = 6; |
| 4429 | optional int32 time1_millis = 7; |
| 4430 | optional int32 frequency2_khz = 8; |
| 4431 | optional int32 time2_millis = 9; |
| 4432 | optional int32 frequency3_khz = 10; |
| 4433 | optional int32 time3_millis = 11; |
| 4434 | optional int32 frequency4_khz = 12; |
| 4435 | optional int32 time4_millis = 13; |
| 4436 | optional int32 frequency5_khz = 14; |
| 4437 | optional int32 time5_millis = 15; |
| 4438 | optional int32 frequency6_khz = 16; |
| 4439 | optional int32 time6_millis = 17; |
| 4440 | optional int32 frequency7_khz = 18; |
| 4441 | optional int32 time7_millis = 19; |
| 4442 | optional int32 frequency8_khz = 20; |
| 4443 | optional int32 time8_millis = 21; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4444 | } |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 4445 | |
| 4446 | /** |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 4447 | * Pulls information about the device's build. |
| 4448 | */ |
| 4449 | message BuildInformation { |
| 4450 | // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. |
| 4451 | // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. |
| 4452 | optional string fingerprint = 1; |
| 4453 | |
| 4454 | // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. |
| 4455 | optional string brand = 2; |
| 4456 | |
| 4457 | // Build.PRODUCT. The name of the overall product. |
| 4458 | optional string product = 3; |
| 4459 | |
| 4460 | // Build.DEVICE. The name of the industrial design. |
| 4461 | optional string device = 4; |
| 4462 | |
| 4463 | // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". |
| 4464 | optional string version_release = 5; |
| 4465 | |
| 4466 | // Build.ID. E.g. a label like "M4-rc20". |
| 4467 | optional string id = 6; |
| 4468 | |
| 4469 | // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to |
| 4470 | // represent this build. |
| 4471 | optional string version_incremental = 7; |
| 4472 | |
| 4473 | // Build.TYPE. The type of build, like "user" or "eng". |
| 4474 | optional string type = 8; |
| 4475 | |
| 4476 | // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". |
| 4477 | optional string tags = 9; |
| 4478 | } |
| 4479 | |
| 4480 | /** |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 4481 | * Pulls on-device BatteryStats power use calculations for the overall device. |
| 4482 | */ |
| 4483 | message DeviceCalculatedPowerUse { |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 4484 | // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 4485 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 4486 | // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). |
| 4487 | optional int64 computed_power_nano_amp_secs = 1; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 4488 | } |
| 4489 | |
| 4490 | /** |
| 4491 | * Pulls on-device BatteryStats power use calculations broken down by uid. |
| 4492 | * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use |
| 4493 | * that is attributed to non-uid items. They must all be included to get the total power use. |
| 4494 | */ |
| 4495 | message DeviceCalculatedPowerBlameUid { |
| 4496 | // Uid being blamed. Note: isolated uids have already been mapped to host uid. |
| 4497 | optional int32 uid = 1 [(is_uid) = true]; |
| 4498 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 4499 | // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 4500 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 4501 | optional int64 power_nano_amp_secs = 2; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 4502 | } |
| 4503 | |
| 4504 | /** |
| 4505 | * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by |
| 4506 | * drain type. |
| 4507 | * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that |
| 4508 | * is attributed uids. They must all be included to get the total power use. |
| 4509 | */ |
| 4510 | message DeviceCalculatedPowerBlameOther { |
| 4511 | // The type of item whose power use is being reported. |
| 4512 | enum DrainType { |
| 4513 | AMBIENT_DISPLAY = 0; |
| 4514 | // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. |
| 4515 | BLUETOOTH = 2; |
| 4516 | CAMERA = 3; |
| 4517 | // Cell-standby |
| 4518 | CELL = 4; |
| 4519 | FLASHLIGHT = 5; |
| 4520 | IDLE = 6; |
| 4521 | MEMORY = 7; |
| 4522 | // Amount that total computed drain exceeded the drain estimated using the |
| 4523 | // battery level changes and capacity. |
| 4524 | OVERCOUNTED = 8; |
| 4525 | PHONE = 9; |
| 4526 | SCREEN = 10; |
| 4527 | // Amount that total computed drain was below the drain estimated using the |
| 4528 | // battery level changes and capacity. |
| 4529 | UNACCOUNTED = 11; |
| 4530 | // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. |
| 4531 | WIFI = 13; |
| 4532 | } |
| 4533 | optional DrainType drain_type = 1; |
| 4534 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 4535 | // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 4536 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 4537 | optional int64 power_nano_amp_secs = 2; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4538 | } |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 4539 | |
| 4540 | /** |
| 4541 | * Logs device policy features. |
| 4542 | * |
| 4543 | * Logged from: |
| 4544 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 4545 | * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ |
| 4546 | */ |
| 4547 | message DevicePolicyEvent { |
| 4548 | // The event id - unique for each event. |
| 4549 | optional android.stats.devicepolicy.EventId event_id = 1; |
| 4550 | // The admin package name. |
| 4551 | optional string admin_package_name = 2; |
| 4552 | // A generic integer parameter. |
| 4553 | optional int32 integer_value = 3; |
| 4554 | // A generic boolean parameter. |
| 4555 | optional bool boolean_value = 4; |
| 4556 | // A parameter specifying a time period in milliseconds. |
| 4557 | optional uint64 time_period_millis = 5; |
| 4558 | // A parameter specifying a list of package names, bundle extras or string parameters. |
| 4559 | optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; |
| 4560 | } |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 4561 | |
| 4562 | /** |
| 4563 | * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. |
| 4564 | * |
| 4565 | * Logged from: |
| 4566 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4567 | */ |
| 4568 | message DocsUILaunchReported { |
| 4569 | optional android.stats.docsui.LaunchAction launch_action = 1; |
| 4570 | optional bool has_initial_uri = 2; |
| 4571 | optional android.stats.docsui.MimeType mime_type = 3; |
| 4572 | optional android.stats.docsui.Root initial_root = 4; |
| 4573 | } |
| 4574 | |
| 4575 | /** |
| 4576 | * Logs root/app visited event in file managers/picker. Call this when the user |
| 4577 | * taps on root/app in hamburger menu. |
| 4578 | * |
| 4579 | * Logged from: |
| 4580 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4581 | */ |
| 4582 | message DocsUIRootVisitedReported { |
| 4583 | optional android.stats.docsui.ContextScope scope = 1; |
| 4584 | optional android.stats.docsui.Root root = 2; |
| 4585 | } |
| 4586 | |
| 4587 | /** |
| 4588 | * Logs file operation stats. Call this when a file operation has completed. |
| 4589 | * |
| 4590 | * Logged from: |
| 4591 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4592 | */ |
| 4593 | message DocsUIFileOperationReported { |
| 4594 | optional android.stats.docsui.Provider provider = 1; |
| 4595 | optional android.stats.docsui.FileOperation file_op = 2; |
| 4596 | } |
| 4597 | |
| 4598 | /** |
| 4599 | * Logs file operation stats. Call this when a copy/move operation has completed with a specific |
| 4600 | * mode. |
| 4601 | * |
| 4602 | * Logged from: |
| 4603 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4604 | */ |
| 4605 | message DocsUIFileOperationCopyMoveModeReported { |
| 4606 | optional android.stats.docsui.FileOperation file_op = 1; |
| 4607 | optional android.stats.docsui.CopyMoveOpMode mode = 2; |
| 4608 | } |
| 4609 | |
| 4610 | |
| 4611 | /** |
| 4612 | * Logs file sub operation stats. Call this when a file operation has failed. |
| 4613 | * |
| 4614 | * Logged from: |
| 4615 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4616 | */ |
| 4617 | message DocsUIFileOperationFailureReported { |
| 4618 | optional android.stats.docsui.Authority authority = 1; |
| 4619 | optional android.stats.docsui.SubFileOperation sub_op = 2; |
| 4620 | } |
| 4621 | |
| 4622 | /** |
| 4623 | * Logs the cancellation of a file operation. Call this when a job is canceled |
| 4624 | * |
| 4625 | * Logged from: |
| 4626 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4627 | */ |
| 4628 | message DocsUIFileOperationCanceledReported { |
| 4629 | optional android.stats.docsui.FileOperation file_op = 1; |
| 4630 | } |
| 4631 | |
| 4632 | /** |
| 4633 | * Logs startup time in milliseconds. |
| 4634 | * |
| 4635 | * Logged from: |
| 4636 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4637 | */ |
| 4638 | message DocsUIStartupMsReported { |
| 4639 | optional int32 startup_millis = 1; |
| 4640 | } |
| 4641 | |
| 4642 | /** |
| 4643 | * Logs the action that was started by user. |
| 4644 | * |
| 4645 | * Logged from: |
| 4646 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4647 | */ |
| 4648 | message DocsUIUserActionReported { |
| 4649 | optional android.stats.docsui.UserAction action = 1; |
| 4650 | } |
| 4651 | |
| 4652 | /** |
| 4653 | * Logs the invalid type when invalid scoped access is requested. |
| 4654 | * |
| 4655 | * Logged from: |
| 4656 | * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java |
| 4657 | */ |
| 4658 | message DocsUIInvalidScopedAccessRequestReported { |
| 4659 | optional android.stats.docsui.InvalidScopedAccess type = 1; |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4660 | } |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 4661 | |
| 4662 | /** |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 4663 | * Logs the package name that launches docsui picker mode. |
| 4664 | * |
| 4665 | * Logged from: |
| 4666 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4667 | */ |
| 4668 | message DocsUIPickerLaunchedFromReported { |
| 4669 | optional string package_name = 1; |
| 4670 | } |
| 4671 | |
| 4672 | /** |
| 4673 | * Logs the search type. |
| 4674 | * |
| 4675 | * Logged from: |
| 4676 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4677 | */ |
| 4678 | message DocsUISearchTypeReported { |
| 4679 | optional android.stats.docsui.SearchType search_type = 1; |
| 4680 | } |
| 4681 | |
| 4682 | /** |
| 4683 | * Logs the search mode. |
| 4684 | * |
| 4685 | * Logged from: |
| 4686 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4687 | */ |
| 4688 | message DocsUISearchModeReported { |
| 4689 | optional android.stats.docsui.SearchMode search_mode = 1; |
| 4690 | } |
| 4691 | |
| 4692 | /** |
| 4693 | * Logs the pick result information. |
| 4694 | * |
| 4695 | * Logged from: |
| 4696 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4697 | */ |
| 4698 | message DocsUIPickResultReported { |
| 4699 | optional int32 total_action_count = 1; |
| 4700 | optional int64 duration_millis = 2; |
| 4701 | optional int32 file_count= 3; |
| 4702 | optional bool is_searching = 4; |
| 4703 | optional android.stats.docsui.Root picked_from = 5; |
| 4704 | optional android.stats.docsui.MimeType mime_type = 6; |
| 4705 | optional int32 repeatedly_pick_times = 7; |
| 4706 | } |
| 4707 | |
| 4708 | /** |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 4709 | * Logs when an app's memory is compacted. |
| 4710 | * |
| 4711 | * Logged from: |
| 4712 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 4713 | */ |
| 4714 | message AppCompacted { |
| 4715 | // The pid of the process being compacted. |
| 4716 | optional int32 pid = 1; |
| 4717 | |
| 4718 | // The name of the process being compacted. |
| 4719 | optional string process_name = 2; |
| 4720 | |
| 4721 | // The type of compaction. |
| 4722 | enum Action { |
| 4723 | UNKNOWN = 0; |
| 4724 | SOME = 1; |
| 4725 | FULL = 2; |
| 4726 | } |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 4727 | optional Action action = 3; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 4728 | |
| 4729 | // Total RSS in kilobytes consumed by the process prior to compaction. |
| 4730 | optional int64 before_rss_total_kilobytes = 4; |
| 4731 | |
| 4732 | // File RSS in kilobytes consumed by the process prior to compaction. |
| 4733 | optional int64 before_rss_file_kilobytes = 5; |
| 4734 | |
| 4735 | // Anonymous RSS in kilobytes consumed by the process prior to compaction. |
| 4736 | optional int64 before_rss_anon_kilobytes = 6; |
| 4737 | |
| 4738 | // Swap in kilobytes consumed by the process prior to compaction. |
| 4739 | optional int64 before_swap_kilobytes = 7; |
| 4740 | |
| 4741 | // Total RSS in kilobytes consumed by the process after compaction. |
| 4742 | optional int64 after_rss_total_kilobytes = 8; |
| 4743 | |
| 4744 | // File RSS in kilobytes consumed by the process after compaction. |
| 4745 | optional int64 after_rss_file_kilobytes = 9; |
| 4746 | |
| 4747 | // Anonymous RSS in kilobytes consumed by the process after compaction. |
| 4748 | optional int64 after_rss_anon_kilobytes = 10; |
| 4749 | |
| 4750 | // Swap in kilobytes consumed by the process after compaction. |
| 4751 | optional int64 after_swap_kilobytes = 11; |
| 4752 | |
| 4753 | // The time taken to perform compaction in milliseconds. |
| 4754 | optional int64 time_to_compact_millis = 12; |
| 4755 | |
| 4756 | // The last compaction action performed for this app. |
| 4757 | optional Action last_action = 13; |
| 4758 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 4759 | // The last time that compaction was attempted on this process in milliseconds |
| 4760 | // since boot, not including sleep (see SystemClock.uptimeMillis()). |
| 4761 | optional int64 last_compact_timestamp_ms_since_boot = 14; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 4762 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 4763 | // The oom_score_adj at the time of compaction. |
| 4764 | optional int32 oom_score_adj = 15; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 4765 | |
| 4766 | // The process state at the time of compaction. |
| 4767 | optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; |
| 4768 | } |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 4769 | |
| 4770 | /** |
| 4771 | * Logs the latency period(in microseconds) and the return code of |
| 4772 | * the DNS(Domain Name System) lookups. |
| 4773 | * These 4 methods(GETADDRINFO,GETHOSTBYNAME,GETHOSTBYADDR,RES_NSEND) |
| 4774 | * to get info(address or hostname) from DNS server(or DNS cache). |
| 4775 | * Logged from: |
| 4776 | * /system/netd/server/DnsProxyListener.cpp |
| 4777 | */ |
| 4778 | message NetworkDnsEventReported { |
| 4779 | // The types of the DNS lookups, as defined in |
| 4780 | //system/netd/server/binder/android/net/metrics/INetdEventListener.aidl |
| 4781 | enum EventType { |
| 4782 | EVENT_UNKNOWN = 0; |
| 4783 | EVENT_GETADDRINFO = 1; |
| 4784 | EVENT_GETHOSTBYNAME = 2; |
| 4785 | EVENT_GETHOSTBYADDR = 3; |
| 4786 | EVENT_RES_NSEND = 4; |
| 4787 | } |
| 4788 | optional EventType event_type = 1; |
| 4789 | |
| 4790 | // The return value of the DNS resolver for each DNS lookups. |
| 4791 | //bionic/libc/include/netdb.h |
| 4792 | //system/netd/resolv/include/netd_resolv/resolv.h |
| 4793 | enum ReturnCode { |
lifr | 357b7cf | 2019-01-15 02:05:45 +0800 | [diff] [blame] | 4794 | EAI_NO_ERROR = 0; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 4795 | EAI_ADDRFAMILY = 1; |
| 4796 | EAI_AGAIN = 2; |
| 4797 | EAI_BADFLAGS = 3; |
| 4798 | EAI_FAIL = 4; |
| 4799 | EAI_FAMILY = 5; |
| 4800 | EAI_MEMORY = 6; |
| 4801 | EAI_NODATA = 7; |
| 4802 | EAI_NONAME = 8; |
| 4803 | EAI_SERVICE = 9; |
| 4804 | EAI_SOCKTYPE = 10; |
| 4805 | EAI_SYSTEM = 11; |
| 4806 | EAI_BADHINTS = 12; |
| 4807 | EAI_PROTOCOL = 13; |
| 4808 | EAI_OVERFLOW = 14; |
| 4809 | RESOLV_TIMEOUT = 255; |
| 4810 | EAI_MAX = 256; |
| 4811 | } |
| 4812 | optional ReturnCode return_code = 2; |
| 4813 | |
| 4814 | // The latency period(in microseconds) it took for this DNS lookup to complete. |
| 4815 | optional int32 latency_micros = 3; |
| 4816 | } |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 4817 | |
| 4818 | /** |
| 4819 | * Logs when a data stall event occurs. |
| 4820 | * |
| 4821 | * Log from: |
| 4822 | * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 4823 | */ |
| 4824 | message DataStallEvent { |
| 4825 | // Data stall evaluation type. |
| 4826 | // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 4827 | // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. |
| 4828 | optional int32 evaluation_type = 1; |
| 4829 | // See definition in data_stall_event.proto. |
| 4830 | optional com.android.server.connectivity.ProbeResult validation_result = 2; |
| 4831 | // See definition in data_stall_event.proto. |
| 4832 | optional android.net.NetworkCapabilitiesProto.Transport network_type = 3; |
| 4833 | // See definition in data_stall_event.proto. |
| 4834 | optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; |
| 4835 | // See definition in data_stall_event.proto. |
| 4836 | optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; |
| 4837 | // See definition in data_stall_event.proto. |
| 4838 | optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; |
| 4839 | } |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 4840 | |
| 4841 | /* |
| 4842 | * Logs when RescueParty resets some set of experiment flags. |
| 4843 | * |
| 4844 | * Logged from: |
| 4845 | * frameworks/base/services/core/java/com/android/server/RescueParty.java |
| 4846 | */ |
| 4847 | message RescuePartyResetReported { |
| 4848 | // The rescue level of this reset. A value of 0 indicates missing or unknown level information. |
| 4849 | optional int32 rescue_level = 1; |
| 4850 | } |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 4851 | |
| 4852 | /** |
| 4853 | * Logs when signed config is received from an APK, and if that config was applied successfully. |
| 4854 | * Logged from: |
| 4855 | * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java |
| 4856 | */ |
| 4857 | message SignedConfigReported { |
| 4858 | enum Type { |
| 4859 | UNKNOWN_TYPE = 0; |
| 4860 | GLOBAL_SETTINGS = 1; |
| 4861 | } |
| 4862 | optional Type type = 1; |
| 4863 | |
| 4864 | // The final status of the signed config received. |
| 4865 | enum Status { |
| 4866 | UNKNOWN_STATUS = 0; |
| 4867 | APPLIED = 1; |
| 4868 | BASE64_FAILURE_CONFIG = 2; |
| 4869 | BASE64_FAILURE_SIGNATURE = 3; |
| 4870 | SECURITY_EXCEPTION = 4; |
| 4871 | INVALID_CONFIG = 5; |
| 4872 | OLD_CONFIG = 6; |
| 4873 | SIGNATURE_CHECK_FAILED = 7; |
| 4874 | NOT_APPLICABLE = 8; |
Mathew Inwood | 610d096 | 2019-01-15 11:50:28 +0000 | [diff] [blame] | 4875 | SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 4876 | } |
| 4877 | optional Status status = 2; |
| 4878 | |
| 4879 | // The version of the signed config processed. |
| 4880 | optional int32 version = 3; |
| 4881 | |
| 4882 | // The package name that the config was extracted from. |
| 4883 | optional string from_package = 4; |
| 4884 | |
| 4885 | enum Key { |
| 4886 | NO_KEY = 0; |
| 4887 | DEBUG = 1; |
| 4888 | PRODUCTION = 2; |
| 4889 | } |
| 4890 | // Which key was used to verify the config. |
| 4891 | optional Key verified_with = 5; |
| 4892 | } |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 4893 | |
| 4894 | /* |
| 4895 | * Logs GNSS Network-Initiated (NI) location events. |
| 4896 | * |
| 4897 | * Logged from: |
| 4898 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 4899 | */ |
| 4900 | message GnssNiEventReported { |
| 4901 | // The type of GnssNiEvent. |
| 4902 | enum EventType { |
| 4903 | UNKNOWN = 0; |
| 4904 | NI_REQUEST = 1; |
| 4905 | NI_RESPONSE = 2; |
| 4906 | } |
| 4907 | optional EventType event_type = 1; |
| 4908 | |
| 4909 | // An ID generated by HAL to associate NI notifications and UI responses. |
| 4910 | optional int32 notification_id = 2; |
| 4911 | |
| 4912 | // 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] | 4913 | optional android.server.location.GnssNiType ni_type = 3; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 4914 | |
| 4915 | // NI requires notification. |
| 4916 | optional bool need_notify = 4; |
| 4917 | |
| 4918 | // NI requires verification. |
| 4919 | optional bool need_verify = 5; |
| 4920 | |
| 4921 | // NI requires privacy override, no notification/minimal trace. |
| 4922 | optional bool privacy_override = 6; |
| 4923 | |
| 4924 | // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in |
| 4925 | // seconds. |
| 4926 | optional int32 timeout = 7; |
| 4927 | |
| 4928 | // Default response when timeout. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 4929 | optional android.server.location.GnssUserResponseType default_response = 8; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 4930 | |
| 4931 | // String representing the requester of the network inititated location request. |
| 4932 | optional string requestor_id = 9; |
| 4933 | |
| 4934 | // Notification message text string representing the service(for eg. SUPL-service) who sent the |
| 4935 | // network initiated location request. |
| 4936 | optional string text = 10; |
| 4937 | |
| 4938 | // requestorId decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 4939 | optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 4940 | |
| 4941 | // Notification message text decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 4942 | optional android.server.location.GnssNiEncodingType text_encoding = 12; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 4943 | |
| 4944 | // True if SUPL ES is enabled. |
| 4945 | optional bool is_supl_es_enabled = 13; |
| 4946 | |
| 4947 | // True if GNSS location is enabled. |
| 4948 | optional bool is_location_enabled = 14; |
| 4949 | |
| 4950 | // GNSS NI responses which define the response in NI structures. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 4951 | optional android.server.location.GnssUserResponseType user_response = 15; |
| 4952 | } |
| 4953 | |
| 4954 | /** |
| 4955 | * Logs GNSS non-framework (NFW) location notification. |
| 4956 | * |
| 4957 | * Logged from: |
| 4958 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 4959 | */ |
| 4960 | message GnssNfwNotificationReported { |
| 4961 | // Package name of the Android proxy application representing the non-framework entity that |
| 4962 | // requested location. Set to empty string if unknown. |
| 4963 | optional string proxy_app_package_name = 1; |
| 4964 | |
| 4965 | // Protocol stack that initiated the non-framework location request. |
| 4966 | optional android.server.location.NfwProtocolStack protocol_stack = 2; |
| 4967 | |
| 4968 | // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, |
| 4969 | // set to empty string. This field is opaque to the framework and used for logging purposes. |
| 4970 | optional string other_protocol_stack_name = 3; |
| 4971 | |
| 4972 | // Source initiating/receiving the location information. |
| 4973 | optional android.server.location.NfwRequestor requestor = 4; |
| 4974 | |
| 4975 | // Identity of the endpoint receiving the location information. For example, carrier name, OEM |
| 4976 | // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework |
| 4977 | // and used for logging purposes. |
| 4978 | optional string requestor_id = 5; |
| 4979 | |
| 4980 | // Indicates whether location information was provided for this request. |
| 4981 | optional android.server.location.NfwResponseType response_type = 6; |
| 4982 | |
| 4983 | // True if the device is in user initiated emergency session. |
| 4984 | optional bool in_emergency_mode = 7; |
| 4985 | |
| 4986 | // True if cached location is provided. |
| 4987 | optional bool is_cached_location = 8; |
| 4988 | |
| 4989 | // True if proxy app permission mismatch between framework and GNSS HAL. |
| 4990 | optional bool is_permission_mismatched = 9; |
| 4991 | } |
| 4992 | |
| 4993 | /** |
| 4994 | * Logs GNSS configuration as defined in IGnssConfiguration.hal. |
| 4995 | * |
| 4996 | * Logged from: |
| 4997 | * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java |
| 4998 | */ |
| 4999 | message GnssConfigurationReported { |
| 5000 | // SUPL host name. |
| 5001 | optional string supl_host = 1; |
| 5002 | |
| 5003 | // SUPL port number. |
| 5004 | optional int32 supl_port = 2; |
| 5005 | |
| 5006 | // C2K host name. |
| 5007 | optional string c2k_host = 3; |
| 5008 | |
| 5009 | // C2K port number. |
| 5010 | optional int32 c2k_port = 4; |
| 5011 | |
| 5012 | // The SUPL version requested by Carrier. |
| 5013 | optional int32 supl_ver = 5; |
| 5014 | |
| 5015 | // The SUPL mode. |
| 5016 | optional android.server.location.SuplMode supl_mode = 6; |
| 5017 | |
| 5018 | // True if NI emergency SUPL restrictions is enabled. |
| 5019 | optional bool supl_es = 7; |
| 5020 | |
| 5021 | // LTE Positioning Profile settings |
| 5022 | optional android.server.location.LppProfile lpp_profile = 8; |
| 5023 | |
| 5024 | // Positioning protocol on A-Glonass system. |
| 5025 | optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; |
| 5026 | |
| 5027 | // True if emergency PDN is used. Otherwise, regular PDN is used. |
| 5028 | optional bool use_emergency_pdn_for_emergency_supl= 10; |
| 5029 | |
| 5030 | // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. |
| 5031 | optional android.server.location.GpsLock gps_lock = 11; |
| 5032 | |
| 5033 | // Number of seconds to extend the emergency session duration post emergency call. |
| 5034 | optional int32 es_extension_sec = 12; |
| 5035 | |
| 5036 | // The full list of package names of proxy Android applications representing the non-framework |
| 5037 | // location access entities (on/off the device) for which the framework user has granted |
| 5038 | // non-framework location access permission. The package names are concatenated in one string |
| 5039 | // with spaces as separators. |
| 5040 | optional string enabled_proxy_app_package_name_list = 13; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5041 | } |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5042 | |
| 5043 | /** |
| 5044 | * Logs when a NFC device's error occurred. |
| 5045 | * Logged from: |
| 5046 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 5047 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java |
| 5048 | */ |
| 5049 | message NfcErrorOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5050 | enum Type { |
| 5051 | UNKNOWN = 0; |
| 5052 | CMD_TIMEOUT = 1; |
| 5053 | ERROR_NOTIFICATION = 2; |
| 5054 | AID_OVERFLOW = 3; |
| 5055 | } |
| 5056 | optional Type type = 1; |
| 5057 | // If it's nci cmd timeout, log the timeout command. |
| 5058 | optional uint32 nci_cmd = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5059 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5060 | optional uint32 error_ntf_status_code = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5061 | } |
| 5062 | |
| 5063 | /** |
| 5064 | * Logs when a NFC device's state changed event |
| 5065 | * Logged from: |
| 5066 | * packages/apps/Nfc/src/com/android/nfc/NfcService.java |
| 5067 | */ |
| 5068 | message NfcStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5069 | enum State { |
| 5070 | UNKNOWN = 0; |
| 5071 | OFF = 1; |
| 5072 | ON = 2; |
| 5073 | ON_LOCKED = 3; // Secure Nfc enabled. |
| 5074 | CRASH_RESTART = 4; // NfcService watchdog timeout restart. |
| 5075 | } |
| 5076 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5077 | } |
| 5078 | |
| 5079 | /** |
| 5080 | * Logs when a NFC Beam Transaction occurred. |
| 5081 | * Logged from: |
| 5082 | * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java |
| 5083 | */ |
| 5084 | message NfcBeamOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5085 | enum Operation { |
| 5086 | UNKNOWN = 0; |
| 5087 | SEND = 1; |
| 5088 | RECEIVE = 2; |
| 5089 | } |
| 5090 | optional Operation operation = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5091 | } |
| 5092 | |
| 5093 | /** |
| 5094 | * Logs when a NFC Card Emulation Transaction occurred. |
| 5095 | * Logged from: |
| 5096 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java |
| 5097 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java |
| 5098 | */ |
| 5099 | message NfcCardemulationOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5100 | enum Category { |
| 5101 | UNKNOWN = 0; |
| 5102 | HCE_PAYMENT = 1; |
| 5103 | HCE_OTHER = 2; |
| 5104 | OFFHOST = 3; |
| 5105 | } |
| 5106 | // Transaction belongs to HCE payment or HCE other category, or offhost. |
| 5107 | optional Category category = 1; |
| 5108 | // SeName from transaction: SIMx, eSEx, HCE, HCEF. |
| 5109 | optional string se_name = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5110 | } |
| 5111 | |
| 5112 | /** |
| 5113 | * Logs when a NFC Tag event occurred. |
| 5114 | * Logged from: |
| 5115 | * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java |
| 5116 | */ |
| 5117 | message NfcTagOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5118 | enum Type { |
| 5119 | UNKNOWN = 0; |
| 5120 | URL = 1; |
| 5121 | BT_PAIRING = 2; |
| 5122 | PROVISION = 3; |
| 5123 | WIFI_CONNECT = 4; |
| 5124 | APP_LAUNCH = 5; |
| 5125 | OTHERS = 6; |
| 5126 | } |
| 5127 | optional Type type = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5128 | } |
| 5129 | |
| 5130 | /** |
| 5131 | * Logs when Hce transaction triggered |
| 5132 | * Logged from: |
| 5133 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 5134 | */ |
| 5135 | message NfcHceTransactionOccurred { |
| 5136 | // The latency period(in microseconds) it took for the first HCE data |
| 5137 | // exchange. |
| 5138 | optional uint32 latency_micros = 1; |
| 5139 | } |
| 5140 | |
| 5141 | /** |
| 5142 | * Logs when SecureElement state event changed |
| 5143 | * Logged from: |
| 5144 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 5145 | */ |
| 5146 | message SeStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5147 | enum State { |
| 5148 | UNKNOWN = 0; |
| 5149 | INITIALIZED = 1; |
| 5150 | DISCONNECTED = 2; |
| 5151 | CONNECTED = 3; |
| 5152 | HALCRASH = 4; |
| 5153 | } |
| 5154 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5155 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5156 | optional string state_change_reason = 2; |
| 5157 | // SIMx or eSEx. |
| 5158 | optional string terminal = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5159 | } |
| 5160 | |
| 5161 | /** |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 5162 | * Information about a permission grant request |
| 5163 | */ |
| 5164 | message PermissionGrantRequestResultReported { |
| 5165 | // unique value identifying an API call. A API call might result in multiple of these atoms |
| 5166 | optional int64 request_id = 1; |
| 5167 | |
| 5168 | // UID of package requesting the permission grant |
| 5169 | optional int32 requesting_uid = 2 [(is_uid) = true]; |
| 5170 | |
| 5171 | // Name of package requesting the permission grant |
| 5172 | optional string requesting_package_name = 3; |
| 5173 | |
| 5174 | // The permission to be granted |
| 5175 | optional string permission_name = 4; |
| 5176 | |
| 5177 | // If the permission was explicitly requested via the API or added by the system |
| 5178 | optional bool is_implicit = 5; |
| 5179 | |
| 5180 | enum Result { |
| 5181 | UNDEFINED = 0; |
| 5182 | // permission request was ignored |
| 5183 | IGNORED = 1; |
| 5184 | // permission request was ignored because it was user fixed |
| 5185 | IGNORED_USER_FIXED = 2; |
| 5186 | // permission request was ignored because it was policy fixed |
| 5187 | IGNORED_POLICY_FIXED = 3; |
| 5188 | // permission was granted by user action |
| 5189 | USER_GRANTED = 4; |
| 5190 | // permission was automatically granted |
| 5191 | AUTO_GRANTED = 5; |
| 5192 | // permission was denied by user action |
| 5193 | USER_DENIED = 6; |
| 5194 | // permission was denied with prejudice by the user |
| 5195 | USER_DENIED_WITH_PREJUDICE = 7; |
| 5196 | // permission was automatically denied |
| 5197 | AUTO_DENIED = 8; |
| 5198 | } |
| 5199 | // The result of the permission grant |
| 5200 | optional Result result = 6; |
| 5201 | } |
| 5202 | |
| 5203 | /** |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5204 | * Logs when Omapi API used |
| 5205 | * Logged from: |
| 5206 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 5207 | */ |
| 5208 | message SeOmapiReported { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5209 | enum Operation { |
| 5210 | UNKNOWN = 0; |
| 5211 | OPEN_CHANNEL = 1; |
| 5212 | } |
| 5213 | optional Operation operation = 1; |
| 5214 | // SIMx or eSEx. |
| 5215 | optional string terminal = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5216 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5217 | optional string package_name = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5218 | } |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 5219 | |
| 5220 | /** |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 5221 | * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. |
| 5222 | * The dispatch latency is the dispatchClockTime - enqueueClockTime. |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 5223 | * Logged from: |
| 5224 | * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java |
| 5225 | */ |
| 5226 | message BroadcastDispatchLatencyReported { |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 5227 | optional int64 dispatch_latency_millis = 1; |
| 5228 | } |
| 5229 | |
| 5230 | /** |
| 5231 | * Logs AttentionManagerService attention check result. |
| 5232 | * |
| 5233 | * Logged from: |
| 5234 | * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java |
| 5235 | */ |
| 5236 | message AttentionManagerServiceResultReported { |
| 5237 | // See core/java/android/service/attention/AttentionService.java |
| 5238 | enum AttentionCheckResult { |
| 5239 | UNKNOWN = 20; |
| 5240 | ATTENTION_SUCCESS_ABSENT = 0; |
| 5241 | ATTENTION_SUCCESS_PRESENT = 1; |
| 5242 | ATTENTION_FAILURE_PREEMPTED = 2; |
| 5243 | ATTENTION_FAILURE_TIMED_OUT = 3; |
| 5244 | ATTENTION_FAILURE_UNKNOWN = 4; |
| 5245 | } |
| 5246 | optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 5247 | } |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 5248 | |
| 5249 | /** |
| 5250 | * Logs when an adb connection changes state. |
| 5251 | * |
| 5252 | * Logged from: |
| 5253 | * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java |
| 5254 | */ |
| 5255 | message AdbConnectionChanged { |
| 5256 | // The last time this system connected via adb, or 0 if the 'always allow' option was not |
| 5257 | // previously selected for this system. |
| 5258 | optional int64 last_connection_time_millis = 1; |
| 5259 | |
| 5260 | // The time in ms within which a subsequent connection from an 'always allow' system is allowed |
| 5261 | // to reconnect via adb without user interaction. |
| 5262 | optional int64 auth_window_millis = 2; |
| 5263 | |
| 5264 | // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto. |
| 5265 | optional android.debug.AdbConnectionStateEnum state = 3; |
| 5266 | |
| 5267 | // True if the 'always allow' option was selected for this system. |
| 5268 | optional bool always_allow = 4; |
| 5269 | } |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 5270 | |
| 5271 | /* |
| 5272 | * Logs the reported speech DSP status. |
| 5273 | * |
| 5274 | * Logged from: |
| 5275 | * Vendor audio implementation. |
| 5276 | */ |
| 5277 | message SpeechDspStatReported { |
| 5278 | // The total Speech DSP uptime in milliseconds. |
| 5279 | optional int32 total_uptime_millis = 1; |
| 5280 | // The total Speech DSP downtime in milliseconds. |
| 5281 | optional int32 total_downtime_millis = 2; |
| 5282 | optional int32 total_crash_count = 3; |
| 5283 | optional int32 total_recover_count = 4; |
| 5284 | } |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 5285 | |
| 5286 | /** |
| 5287 | * Logs USB connector contaminant status. |
| 5288 | * |
| 5289 | * Logged from: USB Service. |
| 5290 | */ |
| 5291 | message UsbContaminantReported { |
| 5292 | optional string id = 1; |
| 5293 | optional android.service.usb.ContaminantPresenceStatus status = 2; |
| 5294 | } |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 5295 | |
| 5296 | /** |
| 5297 | * This atom is for debugging purpose. |
| 5298 | */ |
| 5299 | message DebugElapsedClock { |
| 5300 | // Monotically increasing value for each pull. |
| 5301 | optional int64 pull_count = 1; |
| 5302 | // Time from System.elapsedRealtime. |
| 5303 | optional int64 elapsed_clock_millis = 2; |
| 5304 | // Time from System.elapsedRealtime. |
| 5305 | optional int64 same_elapsed_clock_millis = 3; |
| 5306 | // Diff between current elapsed time and elapsed time from previous pull. |
| 5307 | optional int64 elapsed_clock_diff_millis = 4; |
| 5308 | |
| 5309 | enum Type { |
| 5310 | TYPE_UNKNOWN = 0; |
| 5311 | ALWAYS_PRESENT = 1; |
| 5312 | PRESENT_ON_ODD_PULLS = 2; |
| 5313 | } |
| 5314 | // Type of behavior for the pulled data. |
| 5315 | optional Type type = 5; |
| 5316 | } |
| 5317 | |
| 5318 | /** |
| 5319 | * This atom is for debugging purpose. |
| 5320 | */ |
| 5321 | message DebugFailingElapsedClock { |
| 5322 | // Monotically increasing value for each pull. |
| 5323 | optional int64 pull_count = 1; |
| 5324 | // Time from System.elapsedRealtime. |
| 5325 | optional int64 elapsed_clock_millis = 2; |
| 5326 | // Time from System.elapsedRealtime. |
| 5327 | optional int64 same_elapsed_clock_millis = 3; |
| 5328 | // Diff between current elapsed time and elapsed time from previous pull. |
| 5329 | optional int64 elapsed_clock_diff_millis = 4; |
| 5330 | } |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 5331 | |
| 5332 | /** Logs System UI bubbles event changed. |
| 5333 | * |
| 5334 | * Logged from: |
| 5335 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles |
| 5336 | */ |
| 5337 | message BubbleUIChanged { |
| 5338 | |
| 5339 | // The app package that is posting the bubble. |
| 5340 | optional string package_name = 1; |
| 5341 | |
| 5342 | // The notification channel that is posting the bubble. |
| 5343 | optional string notification_channel = 2; |
| 5344 | |
| 5345 | // The notification id associated with the posted bubble. |
| 5346 | optional int32 notification_id = 3; |
| 5347 | |
| 5348 | // The position of the bubble within the bubble stack. |
| 5349 | optional int32 position = 4; |
| 5350 | |
| 5351 | // The total number of bubbles within the bubble stack. |
| 5352 | optional int32 total_number = 5; |
| 5353 | |
| 5354 | // User interactions with the bubble. |
| 5355 | enum Action { |
| 5356 | UNKNOWN = 0; |
| 5357 | POSTED = 1; |
| 5358 | UPDATED = 2; |
| 5359 | EXPANDED = 3; |
| 5360 | COLLAPSED = 4; |
| 5361 | DISMISSED = 5; |
| 5362 | STACK_DISMISSED = 6; |
| 5363 | STACK_MOVED = 7; |
| 5364 | HEADER_GO_TO_APP = 8; |
| 5365 | HEADER_GO_TO_SETTINGS = 9; |
| 5366 | PERMISSION_OPT_IN = 10; |
| 5367 | PERMISSION_OPT_OUT = 11; |
| 5368 | PERMISSION_IGNORED = 12; |
| 5369 | SWIPE_LEFT = 13; |
| 5370 | SWIPE_RIGHT = 14; |
Steven Wu | a254dab | 2019-01-29 11:30:39 -0500 | [diff] [blame] | 5371 | STACK_EXPANDED = 15; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 5372 | } |
| 5373 | optional Action action = 6; |
| 5374 | |
| 5375 | // Normalized screen position of the bubble stack. The range is between 0 and 1. |
| 5376 | optional float normalized_x_position = 7; |
| 5377 | optional float normalized_y_position = 8; |
| 5378 | } |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 5379 | |
| 5380 | /** |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 5381 | * Logs System UI bubbles developer errors. |
| 5382 | * |
| 5383 | * Logged from: |
| 5384 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java |
| 5385 | */ |
| 5386 | message BubbleDeveloperErrorReported { |
| 5387 | |
| 5388 | // The app package that is posting the bubble. |
| 5389 | optional string package_name = 1; |
| 5390 | |
| 5391 | // Bubble developer error type enums. |
| 5392 | enum Error { |
| 5393 | UNKNOWN = 0; |
| 5394 | ACTIVITY_INFO_MISSING = 1; |
| 5395 | ACTIVITY_INFO_NOT_RESIZABLE = 2; |
| 5396 | DOCUMENT_LAUNCH_NOT_ALWAYS = 3; |
| 5397 | } |
| 5398 | optional Error error = 2 [default = UNKNOWN]; |
| 5399 | } |
| 5400 | |
| 5401 | /** |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 5402 | * Logs that a constraint for a scheduled job has changed. |
| 5403 | * |
| 5404 | * Logged from: |
| 5405 | * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java |
| 5406 | */ |
| 5407 | message ScheduledJobConstraintChanged { |
| 5408 | repeated AttributionNode attribution_node = 1; |
| 5409 | |
| 5410 | // Name of the job. |
| 5411 | optional string job_name = 2; |
| 5412 | |
| 5413 | optional com.android.server.job.ConstraintEnum constraint = 3; |
| 5414 | |
| 5415 | enum State { |
| 5416 | UNSATISFIED = 0; |
| 5417 | SATISFIED = 1; |
| 5418 | } |
| 5419 | optional State state = 4; |
| 5420 | } |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5421 | |
| 5422 | /** |
| 5423 | * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check |
| 5424 | * returns true. |
| 5425 | * |
| 5426 | * Logged from: |
| 5427 | * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java |
| 5428 | */ |
| 5429 | message ScreenTimeoutExtensionReported { |
| 5430 | // Describes how many times in a row did the power manager reset the screen off timeout. |
| 5431 | optional uint32 consecutive_timeout_extended_count = 1; |
| 5432 | } |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 5433 | |
| 5434 | /* |
| 5435 | * Logs number of milliseconds it takes to start a process. |
| 5436 | * The definition of app process start time is from the app launch time to |
| 5437 | * the time that Zygote finished forking the app process and loaded the |
| 5438 | * application package's java classes. |
| 5439 | |
| 5440 | * This metric is different from AppStartOccurred which is for foreground |
| 5441 | * activity only. |
| 5442 | |
| 5443 | * ProcessStartTime can report all processes (both foreground and background) |
| 5444 | * start time. |
| 5445 | * |
| 5446 | * Logged from: |
| 5447 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 5448 | */ |
| 5449 | message ProcessStartTime { |
| 5450 | // The uid of the ProcessRecord. |
| 5451 | optional int32 uid = 1 [(is_uid) = true]; |
| 5452 | |
| 5453 | // The process pid. |
| 5454 | optional int32 pid = 2; |
| 5455 | |
| 5456 | // The process name. |
| 5457 | // Usually package name, "system" for system server. |
| 5458 | // Provided by ActivityManagerService. |
| 5459 | optional string process_name = 3; |
| 5460 | |
| 5461 | enum StartType { |
| 5462 | UNKNOWN = 0; |
| 5463 | WARM = 1; |
| 5464 | HOT = 2; |
| 5465 | COLD = 3; |
| 5466 | } |
| 5467 | |
| 5468 | // The start type. |
| 5469 | optional StartType type = 4; |
| 5470 | |
| 5471 | // The elapsed realtime at the start of the process. |
| 5472 | optional int64 process_start_time_millis = 5; |
| 5473 | |
| 5474 | // Number of milliseconds it takes to reach bind application. |
| 5475 | optional int32 bind_application_delay_millis = 6; |
| 5476 | |
| 5477 | // Number of milliseconds it takes to finish start of the process. |
| 5478 | optional int32 process_start_delay_millis = 7; |
| 5479 | |
| 5480 | // hostingType field in ProcessRecord, the component type such as "activity", |
| 5481 | // "service", "content provider", "broadcast" or other strings. |
| 5482 | optional string hosting_type = 8; |
| 5483 | |
| 5484 | // hostingNameStr field in ProcessRecord. The component class name that runs |
| 5485 | // in this process. |
| 5486 | optional string hosting_name = 9; |
| 5487 | } |
| 5488 | |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 5489 | /** |
| 5490 | * State of a dangerous permission requested by a package |
| 5491 | */ |
| 5492 | message DangerousPermissionState { |
| 5493 | // Name of the permission |
| 5494 | optional string permission_name = 1; |
| 5495 | |
| 5496 | // Uid of the package |
| 5497 | optional int32 uid = 2 [(is_uid) = true]; |
| 5498 | |
| 5499 | // Package requesting the permission |
| 5500 | optional string package_name = 3; |
| 5501 | |
| 5502 | // If the permission is granted to the uid |
| 5503 | optional bool is_granted = 4; |
| 5504 | } |
| 5505 | |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 5506 | /** |
| 5507 | * Logs when a package is denied access to a device identifier based on the new access requirements. |
| 5508 | * |
| 5509 | * Logged from: |
| 5510 | * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java |
| 5511 | */ |
| 5512 | message DeviceIdentifierAccessDenied { |
| 5513 | // The name of the package denied access to the requested device identifier. |
| 5514 | optional string package_name = 1; |
| 5515 | |
| 5516 | // The name of the device identifier method the package attempted to invoke. |
| 5517 | optional string method_name = 2; |
| 5518 | |
| 5519 | // True if the package is preinstalled. |
| 5520 | optional bool is_preinstalled = 3; |
| 5521 | |
| 5522 | // True if the package is privileged. |
| 5523 | optional bool is_priv_app = 4; |
| 5524 | } |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 5525 | |
| 5526 | /** |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 5527 | * Pulls the ongoing mainline install train version code. |
| 5528 | * Pulled from StatsCompanionService |
| 5529 | */ |
| 5530 | message TrainInfo { |
| 5531 | optional int64 train_version_code = 1; |
| 5532 | |
| 5533 | optional TrainExperimentIds train_experiment_id = 2; |
| 5534 | } |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 5535 | |
| 5536 | /** |
| 5537 | * Logs the gesture stage changed event. |
| 5538 | * |
| 5539 | * Logged from: |
| 5540 | * frameworks/base/packages/SystemUI/ |
| 5541 | */ |
| 5542 | message AssistGestureStageReported { |
| 5543 | optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; |
| 5544 | } |
| 5545 | |
| 5546 | /** |
| 5547 | * Logs the feedback type. |
| 5548 | * |
| 5549 | * Logged from: |
| 5550 | * frameworks/base/packages/SystemUI/ |
| 5551 | */ |
| 5552 | message AssistGestureFeedbackReported { |
| 5553 | // Whether or not the gesture was used. |
| 5554 | optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; |
| 5555 | } |
| 5556 | |
| 5557 | /** |
| 5558 | * Logs the progress. |
| 5559 | * |
| 5560 | * Logged from: |
| 5561 | * frameworks/base/packages/SystemUI/ |
| 5562 | */ |
| 5563 | message AssistGestureProgressReported { |
| 5564 | // [0,100] progress for the assist gesture. |
| 5565 | optional int32 progress = 1; |
| 5566 | } |