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