Merge "Keystore SPI: Initialize KeymasterDefs contants with AIDL generated enums"
diff --git a/Android.bp b/Android.bp
index dcb6ac7..fdf38c6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -671,6 +671,7 @@
srcs: [
":ipconnectivity-proto-src",
+ ":libstats_atom_enum_protos",
"core/proto/**/*.proto",
"libs/incident/**/*.proto",
],
@@ -697,6 +698,7 @@
srcs: [
":ipconnectivity-proto-src",
+ ":libstats_atom_enum_protos",
"core/proto/**/*.proto",
"libs/incident/**/*.proto",
],
@@ -812,13 +814,18 @@
name: "platformprotos",
srcs: [
":ipconnectivity-proto-src",
+ ":libstats_atom_enum_protos",
+ ":libstats_internal_protos",
"cmds/am/proto/instrumentation_data.proto",
"cmds/statsd/src/**/*.proto",
"core/proto/**/*.proto",
"libs/incident/proto/**/*.proto",
],
proto: {
- include_dirs: ["external/protobuf/src"],
+ include_dirs: [
+ "external/protobuf/src",
+ "frameworks/proto_logging/stats",
+ ],
type: "full",
},
errorprone: {
@@ -841,6 +848,7 @@
sdk_version: "9",
srcs: [
":ipconnectivity-proto-src",
+ ":libstats_atom_enum_protos",
"core/proto/**/*.proto",
"libs/incident/proto/android/os/**/*.proto",
],
@@ -856,6 +864,7 @@
srcs: [
":ipconnectivity-proto-src",
+ ":libstats_atom_enum_protos",
"core/proto/**/*.proto",
"libs/incident/proto/android/os/**/*.proto",
],
@@ -876,7 +885,9 @@
proto: {
export_proto_headers: true,
- include_dirs: ["external/protobuf/src"],
+ include_dirs: [
+ "external/protobuf/src",
+ ],
},
cflags: [
@@ -887,6 +898,7 @@
srcs: [
":ipconnectivity-proto-src",
+ ":libstats_atom_enum_protos",
"core/proto/**/*.proto",
],
}
diff --git a/cmds/statsd/Android.bp b/cmds/statsd/Android.bp
index 0617eb6..e1b7c53 100644
--- a/cmds/statsd/Android.bp
+++ b/cmds/statsd/Android.bp
@@ -14,34 +14,6 @@
// limitations under the License.
//
-// ==========================================================
-// Build the library for use on the host
-// ==========================================================
-cc_library_host_shared {
- name: "libstats_proto_host",
- srcs: [
- "src/atoms.proto",
- "src/atom_field_options.proto",
- ],
-
- shared_libs: [
- "libplatformprotos",
- ],
-
- proto: {
- type: "full",
- export_proto_headers: true,
- include_dirs: [
- "external/protobuf/src",
- ],
- },
-
- export_shared_lib_headers: [
- "libplatformprotos",
- ]
-
-}
-
cc_defaults {
name: "statsd_defaults",
@@ -275,9 +247,8 @@
// atom_field_options.proto needs field_options.proto, but that is
// not included in libprotobuf-cpp-lite, so compile it here.
":libprotobuf-internal-protos",
+ ":libstats_internal_protos",
- "src/atom_field_options.proto",
- "src/atoms.proto",
"src/shell/shell_data.proto",
"src/stats_log.proto",
"tests/AlarmMonitor_test.cpp",
@@ -341,7 +312,10 @@
proto: {
type: "lite",
- include_dirs: ["external/protobuf/src"],
+ include_dirs: [
+ "external/protobuf/src",
+ "frameworks/proto_logging/stats",
+ ],
},
}
@@ -358,6 +332,7 @@
// atom_field_options.proto needs field_options.proto, but that is
// not included in libprotobuf-cpp-lite, so compile it here.
":libprotobuf-internal-protos",
+ ":libstats_internal_protos",
"benchmark/duration_metric_benchmark.cpp",
"benchmark/filter_value_benchmark.cpp",
@@ -367,14 +342,15 @@
"benchmark/main.cpp",
"benchmark/metric_util.cpp",
"benchmark/stats_write_benchmark.cpp",
- "src/atom_field_options.proto",
- "src/atoms.proto",
"src/stats_log.proto",
],
proto: {
type: "lite",
- include_dirs: ["external/protobuf/src"],
+ include_dirs: [
+ "external/protobuf/src",
+ "frameworks/proto_logging/stats",
+ ],
},
cflags: [
@@ -406,11 +382,14 @@
sdk_version: "core_current",
proto: {
type: "lite",
- include_dirs: ["external/protobuf/src"],
+ include_dirs: [
+ "external/protobuf/src",
+ "frameworks/proto_logging/stats",
+ ],
},
srcs: [
- "src/atoms.proto",
+ ":libstats_atoms_proto",
"src/shell/shell_config.proto",
"src/shell/shell_data.proto",
"src/stats_log.proto",
diff --git a/cmds/statsd/src/atom_field_options.proto b/cmds/statsd/src/atom_field_options.proto
deleted file mode 100644
index ff5717e..0000000
--- a/cmds/statsd/src/atom_field_options.proto
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-option java_package = "com.android.os";
-option java_multiple_files = true;
-option java_outer_classname = "AtomFieldOptions";
-
-import "google/protobuf/descriptor.proto";
-
-// Used to annotate an atom that represents a state change. A state change atom must have exactly
-// ONE exclusive state field, and any number of primary key fields. For example, message
-// UidProcessStateChanged {
-// optional int32 uid = 1 [(state_field_option).primary_field = true];
-// optional android.app.ProcessStateEnum state =
-// 2 [(state_field_option).exclusive_state = true];
-// }
-// Each UidProcessStateChanged atom event represents a state change for a specific uid.
-// A new state automatically overrides the previous state.
-//
-// If the atom has 2 or more primary fields, it means the combination of the
-// primary fields are the primary key.
-// For example:
-// message ThreadStateChanged {
-// optional int32 pid = 1 [(state_field_option).primary_field = true];
-// optional int32 tid = 2 [(state_field_option).primary_field = true];
-// optional int32 state = 3 [(state_field_option).exclusive_state = true];
-// }
-//
-// Sometimes, there is no primary key field, when the state is GLOBAL.
-// For example,
-// message ScreenStateChanged {
-// optional android.view.DisplayStateEnum state =
-// 1 [(state_field_option).exclusive_state = true];
-// }
-//
-// For state atoms with attribution chain, sometimes the primary key is the first uid in the chain.
-// For example:
-// message AudioStateChanged {
-// repeated AttributionNode attribution_node = 1
-// [(stateFieldOption).primary_field_first_uid = true];
-//
-// enum State {
-// OFF = 0;
-// ON = 1;
-// // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes).
-// RESET = 2;
-// }
-// optional State state = 2 [(stateFieldOption).exclusive_state = true];
-// }
-message StateAtomFieldOption {
- // Fields that represent the key that the state belongs to.
- // Used on simple proto fields. Do not use on attribution chains.
- optional bool primary_field = 1 [default = false];
-
- // The field that represents the state. It's an exclusive state.
- optional bool exclusive_state = 2 [default = false];
-
- // Used on an attribution chain field to indicate that the first uid is the
- // primary field.
- optional bool primary_field_first_uid = 3 [default = false];
-
- // Note: We cannot annotate directly on the enums because many enums are imported from other
- // proto files in the platform. proto-lite cc library does not support annotations unfortunately
-
- // Knowing the default state value allows state trackers to remove entries that become the
- // default state. If there is no default value specified, the default value is unknown, and all
- // states will be tracked in memory.
- optional int32 default_state_value = 4;
-
- // A reset state signals all states go to default value. For example, BLE reset means all active
- // BLE scans are to be turned off.
- optional int32 trigger_state_reset_value = 5;
-
- // If the state change needs to count nesting.
- optional bool nested = 6 [default = true];
-}
-
-// Used to generate StatsLog.write APIs.
-enum LogMode {
- MODE_UNSET = 0;
- // Log fields as their actual types e.g., all primary data types.
- // Or fields that are hardcoded in stats_log_api_gen tool e.g., AttributionNode
- MODE_AUTOMATIC = 1;
- // Log fields in their proto binary format. These fields will not be parsed in statsd
- MODE_BYTES = 2;
-}
-
-extend google.protobuf.FieldOptions {
- // Flags to decorate an atom that presents a state change.
- optional StateAtomFieldOption state_field_option = 50000;
-
- // Flags to decorate the uid fields in an atom.
- optional bool is_uid = 50001 [default = false];
-
- optional LogMode log_mode = 50002 [default = MODE_AUTOMATIC];
-
- repeated string module = 50004;
-
- optional bool truncate_timestamp = 50005 [default = false];
-}
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
deleted file mode 100644
index cca6299..0000000
--- a/cmds/statsd/src/atoms.proto
+++ /dev/null
@@ -1,11217 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.os.statsd;
-option java_package = "com.android.os";
-option java_outer_classname = "AtomsProto";
-
-import "frameworks/base/cmds/statsd/src/atom_field_options.proto";
-import "frameworks/base/core/proto/android/app/enums.proto";
-import "frameworks/base/core/proto/android/app/job/enums.proto";
-import "frameworks/base/core/proto/android/app/settings_enums.proto";
-import "frameworks/base/core/proto/android/app/media_output_enum.proto";
-import "frameworks/base/core/proto/android/app/tvsettings_enums.proto";
-import "frameworks/base/core/proto/android/bluetooth/a2dp/enums.proto";
-import "frameworks/base/core/proto/android/bluetooth/enums.proto";
-import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto";
-import "frameworks/base/core/proto/android/bluetooth/hfp/enums.proto";
-import "frameworks/base/core/proto/android/bluetooth/smp/enums.proto";
-import "frameworks/base/core/proto/android/debug/enums.proto";
-import "frameworks/base/core/proto/android/hardware/biometrics/enums.proto";
-import "frameworks/base/core/proto/android/hardware/sensor/assist/enums.proto";
-import "frameworks/base/core/proto/android/net/networkcapabilities.proto";
-import "frameworks/base/core/proto/android/os/enums.proto";
-import "frameworks/base/core/proto/android/server/connectivity/data_stall_event.proto";
-import "frameworks/base/core/proto/android/server/enums.proto";
-import "frameworks/base/core/proto/android/server/job/enums.proto";
-import "frameworks/base/core/proto/android/server/location/enums.proto";
-import "frameworks/base/core/proto/android/service/procstats_enum.proto";
-import "frameworks/base/core/proto/android/service/usb.proto";
-import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto";
-import "frameworks/base/core/proto/android/stats/connectivity/tethering.proto";
-import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto";
-import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto";
-import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto";
-import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto";
-import "frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto";
-import "frameworks/base/core/proto/android/stats/enums.proto";
-import "frameworks/base/core/proto/android/stats/intelligence/enums.proto";
-import "frameworks/base/core/proto/android/stats/launcher/launcher.proto";
-import "frameworks/base/core/proto/android/stats/location/location_enums.proto";
-import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto";
-import "frameworks/base/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto";
-import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto";
-import "frameworks/base/core/proto/android/stats/style/style_enums.proto";
-import "frameworks/base/core/proto/android/stats/sysui/notification_enums.proto";
-import "frameworks/base/core/proto/android/stats/tls/enums.proto";
-import "frameworks/base/core/proto/android/telecomm/enums.proto";
-import "frameworks/base/core/proto/android/telephony/enums.proto";
-import "frameworks/base/core/proto/android/view/enums.proto";
-import "frameworks/base/core/proto/android/wifi/enums.proto";
-import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto";
-import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto";
-
-/**
- * The primary atom class. This message defines all of the available
- * raw stats log events from the Android system, also known as "atoms."
- *
- * This field contains a single oneof with all of the available messages.
- * The stats-log-api-gen tool runs as part of the Android build and
- * generates the android.util.StatsLog class, which contains the constants
- * and methods that Android uses to log.
- *
- * This Atom class is not actually built into the Android system.
- * Instead, statsd on Android constructs these messages synthetically,
- * in the format defined here and in stats_log.proto.
- */
-message Atom {
- // Pushed atoms start at 2.
- oneof pushed {
- // For StatsLog reasons, 1 is illegal and will not work. Must start at 2.
- BleScanStateChanged ble_scan_state_changed = 2
- [(module) = "bluetooth", (module) = "statsdtest"];
- ProcessStateChanged process_state_changed = 3 [(module) = "framework"];
- BleScanResultReceived ble_scan_result_received = 4 [(module) = "bluetooth"];
- SensorStateChanged sensor_state_changed =
- 5 [(module) = "framework", (module) = "statsdtest"];
- GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"];
- SyncStateChanged sync_state_changed = 7 [(module) = "framework", (module) = "statsdtest"];
- ScheduledJobStateChanged scheduled_job_state_changed =
- 8 [(module) = "framework", (module) = "statsdtest"];
- ScreenBrightnessChanged screen_brightness_changed =
- 9 [(module) = "framework", (module) = "statsdtest"];
- WakelockStateChanged wakelock_state_changed =
- 10 [(module) = "framework", (module) = "statsdtest"];
- LongPartialWakelockStateChanged long_partial_wakelock_state_changed =
- 11 [(module) = "framework"];
- MobileRadioPowerStateChanged mobile_radio_power_state_changed =
- 12 [(module) = "framework", (truncate_timestamp) = true];
- WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(module) = "framework"];
- ActivityManagerSleepStateChanged activity_manager_sleep_state_changed =
- 14 [(module) = "framework"];
- MemoryFactorStateChanged memory_factor_state_changed = 15 [(module) = "framework"];
- ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16 [(module) = "framework"];
- CachedKillReported cached_kill_reported = 17 [(module) = "framework"];
- ProcessMemoryStatReported process_memory_stat_reported = 18 [(module) = "framework"];
- LauncherUIChanged launcher_event = 19 [(module) = "sysui"];
- BatterySaverModeStateChanged battery_saver_mode_state_changed =
- 20 [(module) = "framework", (module) = "statsdtest"];
- DeviceIdleModeStateChanged device_idle_mode_state_changed = 21 [(module) = "framework"];
- DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22 [(module) = "framework"];
- AudioStateChanged audio_state_changed =
- 23 [(module) = "framework", (truncate_timestamp) = true];
- MediaCodecStateChanged media_codec_state_changed = 24 [(module) = "framework"];
- CameraStateChanged camera_state_changed = 25 [(module) = "framework"];
- FlashlightStateChanged flashlight_state_changed = 26 [(module) = "framework"];
- UidProcessStateChanged uid_process_state_changed =
- 27 [(module) = "framework", (module) = "statsdtest"];
- ProcessLifeCycleStateChanged process_life_cycle_state_changed =
- 28 [(module) = "framework", (module) = "statsdtest"];
- ScreenStateChanged screen_state_changed =
- 29 [(module) = "framework", (module) = "statsdtest"];
- BatteryLevelChanged battery_level_changed =
- 30 [(module) = "framework", (module) = "statsdtest"];
- ChargingStateChanged charging_state_changed = 31 [(module) = "framework"];
- PluggedStateChanged plugged_state_changed = 32
- [(module) = "framework", (module) = "statsdtest"];
- InteractiveStateChanged interactive_state_changed = 33 [(module) = "framework"];
- TouchEventReported touch_event_reported = 34;
- WakeupAlarmOccurred wakeup_alarm_occurred = 35 [(module) = "framework"];
- KernelWakeupReported kernel_wakeup_reported = 36 [(module) = "framework"];
- WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"];
- WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"];
- WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"];
- PhoneSignalStrengthChanged phone_signal_strength_changed =
- 40 [(module) = "framework", (truncate_timestamp) = true];
- SettingChanged setting_changed = 41 [(module) = "framework"];
- ActivityForegroundStateChanged activity_foreground_state_changed =
- 42 [(module) = "framework", (module) = "statsdtest"];
- IsolatedUidChanged isolated_uid_changed =
- 43 [(module) = "framework", (module) = "statsd", (module) = "statsdtest"];
- PacketWakeupOccurred packet_wakeup_occurred = 44 [(module) = "framework"];
- WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"];
- AnomalyDetected anomaly_detected = 46 [(module) = "statsd"];
- AppBreadcrumbReported app_breadcrumb_reported = 47 [(module) = "statsd"];
- AppStartOccurred app_start_occurred = 48 [(module) = "framework", (module) = "statsdtest"];
- AppStartCanceled app_start_canceled = 49 [(module) = "framework"];
- AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"];
- LmkKillOccurred lmk_kill_occurred = 51 [(module) = "lmkd"];
- PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"];
- WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"];
- LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"];
- AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"];
- ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"];
- BootSequenceReported boot_sequence_reported = 57;
- DaveyOccurred davey_occurred = 58 [(module) = "statsd"];
- OverlayStateChanged overlay_state_changed =
- 59 [(module) = "framework", (module) = "statsdtest"];
- ForegroundServiceStateChanged foreground_service_state_changed
- = 60 [(module) = "framework"];
- CallStateChanged call_state_changed =
- 61 [(module) = "telecom", (truncate_timestamp) = true];
- KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"];
- KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"];
- KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"];
- AppDied app_died = 65 [(module) = "framework"];
- ResourceConfigurationChanged resource_configuration_changed = 66 [(module) = "framework"];
- BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67 [(module) = "framework"];
- BluetoothConnectionStateChanged bluetooth_connection_state_changed =
- 68 [(module) = "bluetooth"];
- GpsSignalQualityChanged gps_signal_quality_changed = 69 [(module) = "framework"];
- UsbConnectorStateChanged usb_connector_state_changed = 70 [(module) = "framework"];
- SpeakerImpedanceReported speaker_impedance_reported = 71;
- HardwareFailed hardware_failed = 72;
- PhysicalDropDetected physical_drop_detected = 73;
- ChargeCyclesReported charge_cycles_reported = 74;
- MobileConnectionStateChanged mobile_connection_state_changed = 75 [(module) = "telephony"];
- MobileRadioTechnologyChanged mobile_radio_technology_changed = 76 [(module) = "telephony"];
- UsbDeviceAttached usb_device_attached = 77 [(module) = "framework"];
- AppCrashOccurred app_crash_occurred = 78 [(module) = "framework", (module) = "statsdtest"];
- ANROccurred anr_occurred = 79 [(module) = "framework"];
- WTFOccurred wtf_occurred = 80 [(module) = "framework"];
- LowMemReported low_mem_reported = 81 [(module) = "framework"];
- GenericAtom generic_atom = 82;
- KeyValuePairsAtom key_value_pairs_atom = 83 [(module) = "framework", (module) = "statsd"];
- VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"];
- DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"];
- ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true];
- BiometricAcquired biometric_acquired = 87 [(module) = "framework"];
- BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"];
- BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"];
- UiEventReported ui_event_reported = 90 [(module) = "framework", (module) = "sysui"];
- BatteryHealthSnapshot battery_health_snapshot = 91;
- SlowIo slow_io = 92;
- BatteryCausedShutdown battery_caused_shutdown = 93;
- PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"];
- PhoneStateChanged phone_state_changed = 95 [(module) = "framework"];
- UserRestrictionChanged user_restriction_changed = 96;
- SettingsUIChanged settings_ui_changed = 97 [(module) = "settings"];
- ConnectivityStateChanged connectivity_state_changed = 98 [(module) = "framework"];
- // TODO: service state change is very noisy shortly after boot, as well
- // as at other transitions - coming out of doze, device plugged in, etc.
- // Consider removing this if it becomes a problem
- ServiceStateChanged service_state_changed = 99 [(module) = "framework"];
- ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"];
- FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"];
- BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "statsd"];
- DevicePolicyEvent device_policy_event = 103 [(module) = "framework"];
- DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"];
- DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported =
- 105 [(module) = "docsui"];
- DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"];
- DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"];
- DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request =
- 108 [(module) = "docsui"];
- DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"];
- DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"];
- DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"];
- DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"];
- WifiEnabledStateChanged wifi_enabled_state_changed = 113 [(module) = "framework"];
- WifiRunningStateChanged wifi_running_state_changed = 114
- [(module) = "framework", deprecated = true];
- AppCompacted app_compacted = 115 [(module) = "framework"];
- NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"];
- DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported =
- 117 [(module) = "docsui"];
- DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"];
- DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"];
- DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"];
- DataStallEvent data_stall_event = 121 [(module) = "network_stack"];
- RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"];
- SignedConfigReported signed_config_reported = 123 [(module) = "framework"];
- GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"];
- BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event =
- 125 [(module) = "bluetooth"];
- BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed =
- 126 [(module) = "bluetooth"];
- BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed =
- 127 [(module) = "bluetooth"];
- AppDowngraded app_downgraded = 128 [(module) = "framework"];
- AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129;
- LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"];
- GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"];
- GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"];
- UsbPortOverheatEvent usb_port_overheat_event_reported = 133;
- NfcErrorOccurred nfc_error_occurred = 134 [(module) = "nfc"];
- NfcStateChanged nfc_state_changed = 135 [(module) = "nfc"];
- NfcBeamOccurred nfc_beam_occurred = 136 [(module) = "nfc"];
- NfcCardemulationOccurred nfc_cardemulation_occurred = 137 [(module) = "nfc"];
- NfcTagOccurred nfc_tag_occurred = 138 [(module) = "nfc"];
- NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139 [(module) = "nfc"];
- SeStateChanged se_state_changed = 140 [(module) = "secure_element"];
- SeOmapiReported se_omapi_reported = 141 [(module) = "secure_element"];
- BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported =
- 142 [(module) = "framework"];
- AttentionManagerServiceResultReported attention_manager_service_result_reported =
- 143 [(module) = "framework"];
- AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"];
- SpeechDspStatReported speech_dsp_stat_reported = 145;
- UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"];
- WatchdogRollbackOccurred watchdog_rollback_occurred =
- 147 [(module) = "framework", (module) = "statsd"];
- BiometricSystemHealthIssueDetected biometric_system_health_issue_detected =
- 148 [(module) = "framework"];
- BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"];
- ScheduledJobConstraintChanged scheduled_job_constraint_changed =
- 150 [(module) = "framework"];
- BluetoothActiveDeviceChanged bluetooth_active_device_changed =
- 151 [(module) = "bluetooth"];
- BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed =
- 152 [(module) = "bluetooth"];
- BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed =
- 153 [(module) = "bluetooth"];
- BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed =
- 154 [(module) = "bluetooth"];
- BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported =
- 155 [(module) = "bluetooth"];
- BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported =
- 156 [(module) = "bluetooth"];
- BluetoothDeviceRssiReported bluetooth_device_rssi_reported =
- 157 [(module) = "bluetooth"];
- BluetoothDeviceFailedContactCounterReported
- bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"];
- BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported =
- 159 [(module) = "bluetooth"];
- BluetoothHciTimeoutReported bluetooth_hci_timeout_reported =
- 160 [(module) = "bluetooth"];
- BluetoothQualityReportReported bluetooth_quality_report_reported =
- 161 [(module) = "bluetooth"];
- BluetoothDeviceInfoReported bluetooth_device_info_reported =
- 162 [(module) = "bluetooth"];
- BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported =
- 163 [(module) = "bluetooth"];
- BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported =
- 164 [(module) = "bluetooth"];
- BluetoothBondStateChanged bluetooth_bond_state_changed =
- 165 [(module) = "bluetooth"];
- BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported =
- 166 [(module) = "bluetooth"];
- BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported =
- 167 [(module) = "bluetooth"];
- ScreenTimeoutExtensionReported screen_timeout_extension_reported =
- 168 [(module) = "framework"];
- ProcessStartTime process_start_time = 169 [(module) = "framework"];
- PermissionGrantRequestResultReported permission_grant_request_result_reported =
- 170 [(module) = "permissioncontroller"];
- BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
- DeviceIdentifierAccessDenied device_identifier_access_denied =
- 172 [(module) = "telephony_common"];
- BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"];
- AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"];
- AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"];
- AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"];
- TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"];
- HiddenApiUsed hidden_api_used = 178 [(module) = "framework"];
- StyleUIChanged style_ui_changed = 179 [(module) = "sysui"];
- PrivacyIndicatorsInteracted privacy_indicators_interacted =
- 180 [(module) = "permissioncontroller"];
- AppInstallOnExternalStorageReported app_install_on_external_storage_reported =
- 181 [(module) = "framework"];
- NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"];
- AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"];
- BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"];
- SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"];
- TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"];
- BluetoothClassOfDeviceReported bluetooth_class_of_device_reported =
- 187 [(module) = "bluetooth"];
- IntelligenceEventReported intelligence_event_reported =
- 188 [(module) = "intelligence"];
- ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed =
- 189 [(module) = "framework"];
- RoleRequestResultReported role_request_result_reported =
- 190 [(module) = "permissioncontroller"];
- MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191;
- MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192;
- MediametricsAudiothreadReported mediametrics_audiothread_reported = 193;
- MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194;
- MediametricsCodecReported mediametrics_codec_reported = 195;
- MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196;
- MediametricsExtractorReported mediametrics_extractor_reported = 197;
- MediametricsMediadrmReported mediametrics_mediadrm_reported = 198;
- MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199;
- MediametricsRecorderReported mediametrics_recorder_reported = 200;
- MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201;
- CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"];
- GarageModeInfo garage_mode_info = 204 [(module) = "car"];
- TestAtomReported test_atom_reported = 205 [(module) = "cts"];
- ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported =
- 206 [(module) = "framework"];
- ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"];
- ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"];
- ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"];
- LocationManagerApiUsageReported location_manager_api_usage_reported =
- 210 [(module) = "framework"];
- ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported =
- 211 [(module) = "permissioncontroller"];
- RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result =
- 212 [(module) = "permissioncontroller"];
- GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions =
- 213 [(module) = "permissioncontroller"];
- LocationAccessCheckNotificationAction location_access_check_notification_action =
- 214 [(module) = "permissioncontroller"];
- AppPermissionFragmentActionReported app_permission_fragment_action_reported =
- 215 [(module) = "permissioncontroller"];
- AppPermissionFragmentViewed app_permission_fragment_viewed =
- 216 [(module) = "permissioncontroller"];
- AppPermissionsFragmentViewed app_permissions_fragment_viewed =
- 217 [(module) = "permissioncontroller"];
- PermissionAppsFragmentViewed permission_apps_fragment_viewed =
- 218 [(module) = "permissioncontroller"];
- TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"];
- TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"];
- ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"];
- LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"];
- ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"];
- BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"];
- UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225;
- UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226;
- CameraActionEvent camera_action_event = 227 [(module) = "framework"];
- AppCompatibilityChangeReported app_compatibility_change_reported =
- 228 [(module) = "framework"];
- PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"];
- VmsClientConnectionStateChanged vms_client_connection_state_changed =
- 230 [(module) = "car"];
- MediaProviderScanOccurred media_provider_scan_occurred = 233 [(module) = "mediaprovider"];
- MediaContentDeleted media_content_deleted = 234 [(module) = "mediaprovider"];
- MediaProviderPermissionRequested media_provider_permission_requested =
- 235 [(module) = "mediaprovider"];
- MediaProviderSchemaChanged media_provider_schema_changed = 236 [(module) = "mediaprovider"];
- MediaProviderIdleMaintenanceFinished media_provider_idle_maintenance_finished =
- 237 [(module) = "mediaprovider"];
- RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"];
- BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"];
- BootTimeEventElapsedTime boot_time_event_elapsed_time_reported =
- 240 [(module) = "framework"];
- BootTimeEventUtcTime boot_time_event_utc_time_reported = 241;
- BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"];
- UserspaceRebootReported userspace_reboot_reported = 243 [(module) = "framework"];
- NotificationReported notification_reported = 244 [(module) = "framework"];
- NotificationPanelReported notification_panel_reported = 245 [(module) = "sysui"];
- NotificationChannelModified notification_channel_modified = 246 [(module) = "framework"];
- IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"];
- IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"];
- CellBroadcastMessageReported cb_message_reported =
- 249 [(module) = "cellbroadcast"];
- CellBroadcastMessageError cb_message_error =
- 250 [(module) = "cellbroadcast"];
- WifiHealthStatReported wifi_health_stat_reported = 251 [(module) = "wifi"];
- WifiFailureStatReported wifi_failure_stat_reported = 252 [(module) = "wifi"];
- WifiConnectionResultReported wifi_connection_result_reported = 253 [(module) = "wifi"];
- AppFreezeChanged app_freeze_changed = 254 [(module) = "framework"];
- SnapshotMergeReported snapshot_merge_reported = 255;
- ForegroundServiceAppOpSessionEnded foreground_service_app_op_session_ended =
- 256 [(module) = "framework"];
- DisplayJankReported display_jank_reported = 257;
- AppStandbyBucketChanged app_standby_bucket_changed = 258 [(module) = "framework"];
- SharesheetStarted sharesheet_started = 259 [(module) = "framework"];
- RankingSelected ranking_selected = 260 [(module) = "framework", (module) = "sysui"];
- TvSettingsUIInteracted tvsettings_ui_interacted = 261 [(module) = "tv_settings"];
- LauncherStaticLayout launcher_snapshot = 262 [(module) = "sysui"];
- PackageInstallerV2Reported package_installer_v2_reported = 263 [(module) = "framework"];
- UserLifecycleJourneyReported user_lifecycle_journey_reported = 264 [(module) = "framework"];
- UserLifecycleEventOccurred user_lifecycle_event_occurred = 265 [(module) = "framework"];
- AccessibilityShortcutReported accessibility_shortcut_reported =
- 266 [(module) = "framework"];
- AccessibilityServiceReported accessibility_service_reported = 267 [(module) = "settings"];
- DocsUIDragAndDropReported docs_ui_drag_and_drop_reported = 268 [(module) = "docsui"];
- AppUsageEventOccurred app_usage_event_occurred = 269 [(module) = "framework"];
- AutoRevokeNotificationClicked auto_revoke_notification_clicked =
- 270 [(module) = "permissioncontroller"];
- AutoRevokeFragmentAppViewed auto_revoke_fragment_app_viewed =
- 271 [(module) = "permissioncontroller"];
- AutoRevokedAppInteraction auto_revoked_app_interaction =
- 272 [(module) = "permissioncontroller", (module) = "settings"];
- AppPermissionGroupsFragmentAutoRevokeAction
- app_permission_groups_fragment_auto_revoke_action =
- 273 [(module) = "permissioncontroller"];
- EvsUsageStatsReported evs_usage_stats_reported = 274 [(module) = "evs"];
- AudioPowerUsageDataReported audio_power_usage_data_reported = 275;
- TvTunerStateChanged tv_tuner_state_changed = 276 [(module) = "framework"];
- MediaOutputOpSwitchReported mediaoutput_op_switch_reported =
- 277 [(module) = "settings"];
- CellBroadcastMessageFiltered cb_message_filtered =
- 278 [(module) = "cellbroadcast"];
- TvTunerDvrStatus tv_tuner_dvr_status = 279 [(module) = "framework"];
- TvCasSessionOpenStatus tv_cas_session_open_status =
- 280 [(module) = "framework"];
- AssistantInvocationReported assistant_invocation_reported = 281 [(module) = "framework"];
- DisplayWakeReported display_wake_reported = 282 [(module) = "framework"];
- CarUserHalModifyUserRequestReported car_user_hal_modify_user_request_reported =
- 283 [(module) = "car"];
- CarUserHalModifyUserResponseReported car_user_hal_modify_user_response_reported =
- 284 [(module) = "car"];
- CarUserHalPostSwitchResponseReported car_user_hal_post_switch_response_reported =
- 285 [(module) = "car"];
- CarUserHalInitialUserInfoRequestReported car_user_hal_initial_user_info_request_reported =
- 286 [(module) = "car"];
- CarUserHalInitialUserInfoResponseReported car_user_hal_initial_user_info_response_reported =
- 287 [(module) = "car"];
- CarUserHalUserAssociationRequestReported car_user_hal_user_association_request_reported =
- 288 [(module) = "car"];
- CarUserHalSetUserAssociationResponseReported car_user_hal_set_user_association_response_reported =
- 289 [(module) = "car"];
- NetworkIpProvisioningReported network_ip_provisioning_reported =
- 290 [(module) = "network_stack"];
- NetworkDhcpRenewReported network_dhcp_renew_reported = 291 [(module) = "network_stack"];
- NetworkValidationReported network_validation_reported = 292 [(module) = "network_stack"];
- NetworkStackQuirkReported network_stack_quirk_reported = 293 [(module) = "network_stack"];
- MediametricsAudioRecordDeviceUsageReported mediametrics_audiorecorddeviceusage_reported =
- 294;
- MediametricsAudioThreadDeviceUsageReported mediametrics_audiothreaddeviceusage_reported =
- 295;
- MediametricsAudioTrackDeviceUsageReported mediametrics_audiotrackdeviceusage_reported =
- 296;
- MediametricsAudioDeviceConnectionReported mediametrics_audiodeviceconnection_reported =
- 297;
- BlobCommitted blob_committed = 298 [(module) = "framework"];
- BlobLeased blob_leased = 299 [(module) = "framework"];
- BlobOpened blob_opened = 300 [(module) = "framework"];
- ContactsProviderStatusReported contacts_provider_status_reported = 301;
- KeystoreKeyEventReported keystore_key_event_reported = 302;
- NetworkTetheringReported network_tethering_reported =
- 303 [(module) = "network_tethering"];
- ImeTouchReported ime_touch_reported = 304 [(module) = "sysui"];
- TlsHandshakeReported tls_handshake_reported = 317 [(module) = "conscrypt"];
-
- // StatsdStats tracks platform atoms with ids upto 500.
- // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
- }
-
- // Pulled events will start at field 10000.
- // Next: 10084
- oneof pulled {
- WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"];
- WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"];
- MobileBytesTransfer mobile_bytes_transfer =
- 10002 [(module) = "framework", (truncate_timestamp) = true];
- MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg =
- 10003 [(module) = "framework", (truncate_timestamp) = true];
- BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"];
- KernelWakelock kernel_wakelock = 10004 [(module) = "framework"];
- SubsystemSleepState subsystem_sleep_state = 10005 [(module) = "statsdtest"];
- CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"];
- CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework", (module) = "statsdtest"];
- CpuTimePerUidFreq cpu_time_per_uid_freq =
- 10010 [(module) = "framework", (module) = "statsd"];
- WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"];
- ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"];
- BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"];
- ProcessMemoryState process_memory_state = 10013 [(module) = "framework"];
- SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"];
- SystemUptime system_uptime = 10015 [(module) = "framework"];
- CpuActiveTime cpu_active_time = 10016 [(module) = "framework", (module) = "statsdtest"];
- CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"];
- DiskSpace disk_space = 10018 [deprecated=true, (module) = "statsdtest"];
- RemainingBatteryCapacity remaining_battery_capacity = 10019 [(module) = "framework"];
- FullBatteryCapacity full_battery_capacity = 10020 [(module) = "framework"];
- Temperature temperature = 10021 [(module) = "framework", (module) = "statsdtest"];
- BinderCalls binder_calls = 10022 [(module) = "framework", (module) = "statsd"];
- BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"];
- LooperStats looper_stats = 10024 [(module) = "framework", (module) = "statsd"];
- DiskStats disk_stats = 10025 [(module) = "framework"];
- DirectoryUsage directory_usage = 10026 [(module) = "framework"];
- AppSize app_size = 10027 [(module) = "framework"];
- CategorySize category_size = 10028 [(module) = "framework"];
- ProcStats proc_stats = 10029 [(module) = "framework"];
- BatteryVoltage battery_voltage = 10030 [(module) = "framework"];
- NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"];
- DiskIo disk_io = 10032 [(module) = "framework"];
- PowerProfile power_profile = 10033 [(module) = "framework"];
- ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"];
- ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"];
- CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"];
- OnDevicePowerMeasurement on_device_power_measurement = 10038;
- DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"];
- DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid =
- 10040 [(module) = "framework"];
- DeviceCalculatedPowerBlameOther device_calculated_power_blame_other =
- 10041 [(module) = "framework"];
- ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"];
- BatteryLevel battery_level = 10043 [(module) = "framework"];
- BuildInformation build_information = 10044 [(module) = "framework"];
- BatteryCycleCount battery_cycle_count = 10045 [(module) = "framework"];
- DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"];
- DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"];
- NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"];
- RoleHolder role_holder = 10049 [(module) = "framework"];
- DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"];
- TrainInfo train_info = 10051 [(module) = "statsd"];
- TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"];
- ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"];
- GpuStatsGlobalInfo gpu_stats_global_info = 10054;
- GpuStatsAppInfo gpu_stats_app_info = 10055;
- SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"];
- AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"];
- FaceSettings face_settings = 10058 [(module) = "framework"];
- CoolingDevice cooling_device = 10059 [(module) = "framework"];
- AppOps app_ops = 10060 [(module) = "framework"];
- ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"];
- SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062;
- SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063;
- ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"];
- VmsClientStats vms_client_stats = 10065 [(module) = "car"];
- NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"];
- DangerousPermissionStateSampled dangerous_permission_state_sampled =
- 10067 [(module) = "framework"];
- GraphicsStats graphics_stats = 10068;
- RuntimeAppOpAccess runtime_app_op_access = 10069 [(module) = "framework"];
- IonHeapSize ion_heap_size = 10070 [(module) = "framework"];
- PackageNotificationPreferences package_notification_preferences =
- 10071 [(module) = "framework"];
- PackageNotificationChannelPreferences package_notification_channel_preferences =
- 10072 [(module) = "framework"];
- PackageNotificationChannelGroupPreferences package_notification_channel_group_preferences =
- 10073 [(module) = "framework"];
- GnssStats gnss_stats = 10074 [(module) = "framework"];
- AttributedAppOps attributed_app_ops = 10075 [(module) = "framework"];
- VoiceCallSession voice_call_session = 10076 [(module) = "telephony"];
- VoiceCallRatUsage voice_call_rat_usage = 10077 [(module) = "telephony"];
- SimSlotState sim_slot_state = 10078 [(module) = "telephony"];
- SupportedRadioAccessFamily supported_radio_access_family = 10079 [(module) = "telephony"];
- SettingSnapshot setting_snapshot = 10080 [(module) = "framework"];
- BlobInfo blob_info = 10081 [(module) = "framework"];
- DataUsageBytesTransfer data_usage_bytes_transfer = 10082 [(module) = "framework"];
- BytesTransferByTagAndMetered bytes_transfer_by_tag_and_metered =
- 10083 [(module) = "framework"];
- DNDModeProto dnd_mode_rule = 10084 [(module) = "framework"];
- GeneralExternalStorageAccessStats general_external_storage_access_stats =
- 10085 [(module) = "mediaprovider"];
- }
-
- // DO NOT USE field numbers above 100,000 in AOSP.
- // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use.
- // Field numbers 200,000 and above are reserved for future use; do not use them at all.
-
- reserved 10036;
-}
-
-/**
- * This proto represents a node of an attribution chain.
- * Note: All attribution chains are represented as a repeated field of type
- * AttributionNode. It is understood that in such arrays, the order is that
- * of calls, that is [A, B, C] if A calls B that calls C.
- */
-message AttributionNode {
- // The uid for a given element in the attribution chain.
- optional int32 uid = 1;
-
- // The (optional) string tag for an element in the attribution chain. If the
- // element has no tag, it is encoded as an empty string.
- optional string tag = 2;
-}
-
-message KeyValuePair {
- optional int32 key = 1;
- oneof value {
- int32 value_int = 2;
- int64 value_long = 3;
- string value_str = 4;
- float value_float = 5;
- }
-}
-
-message KeyValuePairsAtom {
- optional int32 uid = 1;
- repeated KeyValuePair pairs = 2;
-}
-
-/*
- * *****************************************************************************
- * Below are all of the individual atoms that are logged by Android via statsd.
- *
- * RULES:
- * - The field ids for each atom must start at 1, and count upwards by 1.
- * Skipping field ids is not allowed.
- * - These form an API, so renaming, renumbering or removing fields is
- * not allowed between android releases. (This is not currently enforced,
- * but there will be a tool to enforce this restriction).
- * - The types must be built-in protocol buffer types, namely, no sub-messages
- * are allowed (yet). The bytes type is also not allowed.
- * - The CamelCase name of the message type should match the
- * underscore_separated name as defined in Atom.
- * - If an atom represents work that can be attributed to an app, there can
- * be exactly one AttributionChain field. It must be field number 1.
- * - A field that is a uid should be a string field, tagged with the [xxx]
- * annotation. The generated code on android will be represented by UIDs,
- * and those UIDs will be translated in xxx to those strings.
- *
- * CONVENTIONS:
- * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange.
- * - If there is a UID, it goes first. Think in an object-oriented fashion.
- * *****************************************************************************
- */
-
-/**
- * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged.
- * Logs when the Thermal service HAL notifies the throttling start/stop events.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
- */
-message ThermalThrottlingStateChanged {
- // The type of temperature being reported (CPU, GPU, SKIN, etc)
- optional android.os.TemperatureTypeEnum sensor_type = 1;
-
- // Throttling state, this field is DEPRECATED
- enum State {
- UNKNOWN = 0;
- START = 1; // START indicated that throttling was triggered.
- STOP = 2; // STOP indicates that throttling was cleared.
- }
- optional State state = 2;
-
- optional float temperature = 3;
-}
-
-/**
- * Logs when the screen state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message ScreenStateChanged {
- // New screen state, from frameworks/base/core/proto/android/view/enums.proto.
- optional android.view.DisplayStateEnum state = 1
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs that the process state of the uid, as determined by ActivityManager
- * (i.e. the highest process state of that uid's processes) has changed.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message UidProcessStateChanged {
- optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true];
-
- // The state, from frameworks/base/core/proto/android/app/enums.proto.
- optional android.app.ProcessStateEnum state = 2
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs process state change of a process, as per the activity manager.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
- */
-message ProcessStateChanged {
- optional int32 uid = 1;
- optional string process_name = 2;
- optional string package_name = 3;
- // TODO: remove this when validation is done
- optional int64 version = 5;
- // The state, from frameworks/base/core/proto/android/app/enums.proto.
- optional android.app.ProcessStateEnum state = 4;
-}
-
-/**
- * Logs when ActivityManagerService sleep state is changed.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java
- */
-message ActivityManagerSleepStateChanged {
- // TODO: import frameworks proto
- enum State {
- UNKNOWN = 0;
- ASLEEP = 1;
- AWAKE = 2;
- }
- optional State state = 1
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs when system memory state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message MemoryFactorStateChanged {
- // TODO: import frameworks proto
- enum State {
- MEMORY_UNKNOWN = 0;
- NORMAL = 1; // normal.
- MODERATE = 2; // moderate memory pressure.
- LOW = 3; // low memory.
- CRITICAL = 4; // critical memory.
-
- }
- optional State factor = 1 [(state_field_option).exclusive_state = true];
-}
-
-/**
- * Logs when app is using too much cpu, according to ActivityManagerService.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message ExcessiveCpuUsageReported {
- optional int32 uid = 1;
- optional string process_name = 2;
- optional string package_name = 3;
- // package version. TODO: remove this when validation is done
- optional int64 version = 4;
-}
-
-/**
- * Logs when a cached process is killed, along with its pss.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message CachedKillReported {
- optional int32 uid = 1;
- optional string process_name = 2;
- optional string package_name = 3;
- // TODO: remove this when validation is done
- optional int64 version = 5;
- optional int64 pss = 4;
-}
-
-/**
- * Logs the change in wifi health.
- *
- * Logged from:
- * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDataStall.java
- */
-message WifiHealthStatReported {
- enum Band {
- UNKNOWN = 0;
- // All of 2.4GHz band
- BAND_2G = 1;
- // Frequencies in the range of [5150, 5250) GHz
- BAND_5G_LOW = 2;
- // Frequencies in the range of [5250, 5725) GHz
- BAND_5G_MIDDLE = 3;
- // Frequencies in the range of [5725, 5850) GHz
- BAND_5G_HIGH = 4;
- // Frequencies in the range of [5925, 6425) GHz
- BAND_6G_LOW = 5;
- // Frequencies in the range of [6425, 6875) GHz
- BAND_6G_MIDDLE = 6;
- // Frequencies in the range of [6875, 7125) GHz
- BAND_6G_HIGH = 7;
- }
- // duration this stat is obtained over in milliseconds
- optional int32 duration_millis = 1;
- // whether wifi is classified as sufficient for the user's data traffic, determined
- // by whether the calculated throughput exceeds the average demand within |duration_millis|
- optional bool is_sufficient = 2;
- // whether cellular data is available
- optional bool is_cell_data_available = 3;
- // the Band bucket the connected network is on
- optional Band band = 4;
-}
-
-/**
- * Logged when wifi detects a significant change in connection failure rate.
- *
- * Logged from: frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiHealthMonitor.java
- *
- */
-message WifiFailureStatReported {
- enum AbnormalityType {
- UNKNOWN = 0;
- SIGNIFICANT_INCREASE = 1;
- SIGNIFICANT_DECREASE = 2;
- SIMPLY_HIGH = 3;
- }
- enum FailureType {
- FAILURE_UNKNOWN = 0;
- FAILURE_CONNECTION = 1;
- FAILURE_ASSOCIATION_REJECTION = 2;
- FAILURE_ASSOCIATION_TIMEOUT = 3;
- FAILURE_AUTHENTICATION = 4;
- FAILURE_NON_LOCAL_DISCONNECTION = 5;
- FAILURE_SHORT_CONNECTION_DUE_TO_NON_LOCAL_DISCONNECTION = 6;
- }
- // Reason for uploading this stat
- optional AbnormalityType abnormality_type = 1;
- // The particular type of failure
- optional FailureType failure_type = 2;
- // How many times we have encountered this combination of AbnormalityType and FailureType
- optional int32 failure_count = 3;
-}
-
-/**
- * Logs whether a wifi connection is successful and reasons for failure if it isn't.
- *
- * Logged from:
- * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
- */
-message WifiConnectionResultReported {
- enum FailureCode {
- FAILURE_UNKNOWN = 0;
- FAILURE_ASSOCIATION_TIMEOUT = 1;
- FAILURE_ASSOCIATION_REJECTION = 2;
- FAILURE_AUTHENTICATION_GENERAL = 3;
- FAILURE_AUTHENTICATION_EAP = 4;
- FAILURE_DHCP = 5;
- FAILURE_NETWORK_DISCONNECTION = 6;
- FAILURE_ROAM_TIMEOUT = 7;
- }
- // true represents a successful connection
- optional bool connection_result = 1;
- // reason for the connection failure
- optional FailureCode failure_code = 2;
- // scan rssi before the connection attempt
- optional int32 rssi = 3;
-}
-
-/**
- * Logs when memory stats of a process is reported.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
- */
-message ProcessMemoryStatReported {
- optional int32 uid = 1;
- optional string process_name = 2;
- optional string package_name = 3;
- //TODO: remove this when validation is done
- optional int64 version = 9;
- optional int64 pss = 4;
- optional int64 uss = 5;
- optional int64 rss = 6;
- enum Type {
- ADD_PSS_INTERNAL_SINGLE = 0;
- ADD_PSS_INTERNAL_ALL_MEM = 1;
- ADD_PSS_INTERNAL_ALL_POLL = 2;
- ADD_PSS_EXTERNAL = 3;
- ADD_PSS_EXTERNAL_SLOW = 4;
- }
- optional Type type = 7;
- optional int64 duration_millis = 8;
-}
-
-/**
- * Logs that a process started, finished, crashed, or ANRed.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message ProcessLifeCycleStateChanged {
- optional int32 uid = 1 [(is_uid) = true];
-
- // The process name (usually same as the app name).
- optional string process_name = 2;
-
- // What lifecycle state the process changed to.
- // This enum is specific to atoms.proto.
- enum State {
- FINISHED = 0;
- STARTED = 1;
- CRASHED = 2;
- }
- optional State state = 3;
-}
-
-/**
- * Logs when the ble scan state changes.
- *
- * Logged from:
- * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
- */
-message BleScanStateChanged {
- repeated AttributionNode attribution_node = 1
- [(state_field_option).primary_field_first_uid = true];
-
- enum State {
- OFF = 0;
- ON = 1;
- // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes).
- RESET = 2;
- }
- optional State state = 2 [
- (state_field_option).exclusive_state = true,
- (state_field_option).default_state_value = 0 /* State.OFF */,
- (state_field_option).trigger_state_reset_value = 2 /* State.RESET */,
- (state_field_option).nested = true
- ];
-
- // Does the scan have a filter.
- optional bool is_filtered = 3 [(state_field_option).primary_field = true];
- // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally.
- optional bool is_first_match = 4 [(state_field_option).primary_field = true];
- // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC).
- optional bool is_opportunistic = 5 [(state_field_option).primary_field = true];
-}
-
-/**
- * Logs reporting of a ble scan finding results.
- *
- * Logged from:
- * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
- */
-// TODO: Consider also tracking per-scanner-id.
-message BleScanResultReceived {
- repeated AttributionNode attribution_node = 1;
-
- // Number of ble scan results returned.
- optional int32 num_results = 2;
-}
-
-/**
- * Logs when a sensor state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message SensorStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- // The id (int) of the sensor.
- optional int32 sensor_id = 2;
-
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 3;
-}
-
-/**
- * Logs when GPS state changes.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message GpsScanStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 2;
-}
-
-/**
- * Logs when GPS signal quality.
- *
- * Logged from:
- * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
- */
-message GpsSignalQualityChanged {
- optional android.server.location.GpsSignalQualityEnum level = 1;
-}
-
-
-/**
- * Logs when a sync manager sync state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message SyncStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- // Name of the sync (as named in the app). Can be chosen at run-time.
- optional string sync_name = 2;
-
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 3;
-}
-
-/*
- * Deferred job stats.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java
-*/
-message DeferredJobStatsReported {
- repeated AttributionNode attribution_node = 1;
-
- // Number of jobs deferred.
- optional int32 num_jobs_deferred = 2;
-
- // Time since the last job runs.
- optional int64 time_since_last_job_millis = 3;
-}
-
-/**
- * Logs when a job scheduler job state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message ScheduledJobStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- // Name of the job (as named in the app)
- optional string job_name = 2;
-
- enum State {
- FINISHED = 0;
- STARTED = 1;
- SCHEDULED = 2;
- }
- optional State state = 3;
-
- // The reason a job has stopped.
- // This is only applicable when the state is FINISHED.
- // The default value is STOP_REASON_UNKNOWN.
- optional android.app.job.StopReasonEnum stop_reason = 4;
-
- // The standby bucket of the app that scheduled the job. These match the framework constants
- // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is
- // already assigned 0.
- enum Bucket {
- UNKNOWN = -1;
- ACTIVE = 0;
- WORKING_SET = 1;
- FREQUENT = 2;
- RARE = 3;
- NEVER = 4;
- RESTRICTED = 5;
- }
- optional Bucket standby_bucket = 5 [default = UNKNOWN];
-
- // The job id (as assigned by the app).
- optional int32 job_id = 6;
-
- // One flag for each of the API constraints defined by Jobscheduler. Does not include implcit
- // constraints as they are always assumed to be set.
- optional bool has_charging_constraint = 7;
- optional bool has_battery_not_low_constraint = 8;
- optional bool has_storage_not_low_constraint = 9;
- optional bool has_timing_delay_constraint = 10;
- optional bool has_deadline_constraint = 11;
- optional bool has_idle_constraint = 12;
- optional bool has_connectivity_constraint = 13;
- optional bool has_content_trigger_constraint = 14;
-}
-
-/**
- * Logs when the audio state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message AudioStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes).
- RESET = 2;
- }
- optional State state = 2;
-}
-
-/**
- * Logs when the video codec state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message MediaCodecStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes).
- RESET = 2;
- }
- optional State state = 2;
-}
-
-/**
- * Logs when the flashlight state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message FlashlightStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes).
- RESET = 2;
- }
- optional State state = 2;
-}
-
-/**
- * Logs when the camera state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message CameraStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes).
- RESET = 2;
- }
- optional State state = 2;
-}
-
-/**
- * Logs that the state of a wakelock (per app and per wakelock name) has changed.
- *
- * Logged from:
- * TODO
- */
-message WakelockStateChanged {
- repeated AttributionNode attribution_node = 1
- [(state_field_option).primary_field_first_uid = true];
-
- // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock.
- // From frameworks/base/core/proto/android/os/enums.proto.
- optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).primary_field = true];
-
- // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
- optional string tag = 3 [(state_field_option).primary_field = true];
-
- enum State {
- RELEASE = 0;
- ACQUIRE = 1;
- CHANGE_RELEASE = 2;
- CHANGE_ACQUIRE = 3;
- }
- optional State state = 4 [
- (state_field_option).exclusive_state = true,
- (state_field_option).default_state_value = 0,
- (state_field_option).nested = true
- ];
-}
-
-/**
- * Logs when a partial wakelock is considered 'long' (over 1 min).
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message LongPartialWakelockStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
- optional string tag = 2;
-
- // TODO: I have no idea what this is.
- optional string history_tag = 3;
-
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 4;
-}
-
-/**
- * Logs when the device is interactive, according to the PowerManager Notifier.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/power/Notifier.java
- */
-message InteractiveStateChanged {
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 1;
-}
-
-/**
- * Logs Battery Saver state change.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message BatterySaverModeStateChanged {
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 1
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs Doze mode state change.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message DeviceIdleModeStateChanged {
- optional android.server.DeviceIdleModeEnum state = 1
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-
-/**
- * Logs state change of Doze mode including maintenance windows.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message DeviceIdlingModeStateChanged {
- optional android.server.DeviceIdleModeEnum state = 1
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs screen brightness level.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message ScreenBrightnessChanged {
- // Screen brightness level. Should be in [-1, 255] according to PowerManager.java.
- optional int32 level = 1;
-}
-
-/**
- * Logs battery level (percent full, from 0 to 100).
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message BatteryLevelChanged {
- // Battery level. Should be in [0, 100].
- optional int32 battery_level = 1;
-}
-
-/**
- * Logs change in charging status of the device.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message ChargingStateChanged {
- // State of the battery, from frameworks/base/core/proto/android/os/enums.proto.
- optional android.os.BatteryStatusEnum state = 1
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs whether the device is plugged in, and what power source it is using.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message PluggedStateChanged {
- // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto.
- optional android.os.BatteryPluggedStateEnum state = 1
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs when an app's wakeup alarm fires.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message WakeupAlarmOccurred {
- repeated AttributionNode attribution_node = 1;
-
- // Name of the wakeup alarm.
- optional string tag = 2;
-
- // Name of source package (for historical reasons, since BatteryStats tracked it).
- optional string package_name = 3;
-
- // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired.
- optional AppStandbyBucketChanged.Bucket app_standby_bucket = 4;
-}
-
-/**
- * Logs when an an app causes the mobile radio to change state.
- * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
- */
-message MobileRadioPowerStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
- optional android.telephony.DataConnectionPowerStateEnum state = 2;
-}
-
-/**
- * Logs when an an app causes the wifi radio to change state.
- * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
- */
-message WifiRadioPowerStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
- optional android.telephony.DataConnectionPowerStateEnum state = 2;
-}
-
-/**
- * Logs kernel wakeup reasons and aborts.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message KernelWakeupReported {
- // Name of the kernel wakeup reason (or abort).
- optional string wakeup_reason_name = 1;
-
- // Duration (in microseconds) for the wake-up interrupt to be serviced.
- optional int64 duration_micros = 2;
-}
-
-/**
- * Logs when Wifi is toggled on/off.
- * Note that Wifi may still perform certain functions (e.g. location scanning) even when disabled.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message WifiEnabledStateChanged {
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 1;
-}
-
-/**
- * This atom is deprecated starting in R.
- *
- * Logs when an app causes Wifi to run. In this context, 'to run' means to use Wifi Client Mode.
- * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'.
- * Note that Wifi Scanning is monitored separately in WifiScanStateChanged.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
- */
-message WifiRunningStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 2;
-}
-
-/**
- * Logs wifi locks held by an app.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message WifiLockStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 2;
-
- // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto.
- optional android.net.wifi.WifiModeEnum mode = 3;
-}
-
-/**
- * Logs wifi signal strength changes.
- *
- * Logged from:
- * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
- */
-message WifiSignalStrengthChanged {
- // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
- optional android.telephony.SignalStrengthEnum signal_strength = 1;
-}
-
-/**
- * Logs wifi scans performed by an app.
- *
- * Logged from:
- * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
- */
-message WifiScanStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 2;
-}
-
-/**
- * Logs wifi multicast locks held by an app
- *
- * Logged from:
- * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java
- */
-message WifiMulticastLockStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 2;
-
- optional string tag = 3;
-}
-
-/**
- * Logs shutdown reason and duration on next boot.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/server/BootReceiver.java
- */
-message ShutdownSequenceReported {
- // True if shutdown is for a reboot. Default: false if we do not know.
- optional bool reboot = 1;
-
- // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>".
- optional string reason = 2;
-
- // Beginning of shutdown time in ms using wall clock time since unix epoch.
- // Default: 0 if no start time received.
- optional int64 start_time_millis = 3;
-
- // Duration of shutdown in ms. Default: 0 if no duration received.
- optional int64 duration_millis = 4;
-}
-
-
-/**
- * Logs boot reason and duration.
- *
- * Logged from:
- * system/core/bootstat/bootstat.cpp
- */
-message BootSequenceReported {
- // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list
- // Default: "<EMPTY>" if not available.
- optional string bootloader_reason = 1;
-
- // Reason for system boot. Eg. bootloader, reboot,userrequested
- // Default: "<EMPTY>" if not available.
- optional string system_reason = 2;
-
- // End of boot time in ms from unix epoch using system wall clock.
- optional int64 end_time_millis = 3;
-
- // Total boot duration in ms.
- optional int64 total_duration_millis = 4;
-
- // Bootloader duration in ms.
- optional int64 bootloader_duration_millis = 5;
-
- // Time since last boot in ms. Default: 0 if not available.
- optional int64 time_since_last_boot = 6;
-}
-
-
-/**
- * Logs call state and disconnect cause (if applicable).
- *
- * Logged from:
- * packages/services/Telecomm/src/com/android/server/telecom/Call.java
- */
-message CallStateChanged {
- // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED.
- // From frameworks/base/core/proto/android/telecomm/enums.proto.
- optional android.telecom.CallStateEnum call_state = 1;
-
- // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY.
- // This value is only applicable when the call_state is DISCONNECTED, and
- // should always be UNKNOWN if the call_state is not DISCONNECTED.
- // From frameworks/base/core/proto/android/telecomm/enums.proto.
- optional android.telecom.DisconnectCauseEnum disconnect_cause = 2;
-
- // True if the call is self-managed, which are apps that use the
- // telecom infrastructure to make their own calls.
- optional bool self_managed = 3;
-
- // True if call is external. External calls are calls on connected Wear
- // devices but show up in Telecom so the user can pull them onto the device.
- optional bool external_call = 4;
-}
-
-/**
- * Logs keyguard state. The keyguard is the lock screen.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
- */
-message KeyguardStateChanged {
- enum State {
- UNKNOWN = 0;
- // The keyguard is hidden when the phone is unlocked.
- HIDDEN = 1;
- // The keyguard is shown when the phone is locked (screen turns off).
- SHOWN= 2;
- // The keyguard is occluded when something is overlaying the keyguard.
- // Eg. Opening the camera while on the lock screen.
- OCCLUDED = 3;
- }
- optional State state = 1;
-}
-
-/**
- * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and
- * prompts the user to enter a password (pattern, pin, etc).
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
- */
-
-message KeyguardBouncerStateChanged {
- enum State {
- UNKNOWN = 0;
- // Bouncer is hidden, either as a result of successfully entering the
- // password, screen timing out, or user going back to lock screen.
- HIDDEN = 1;
- // This is when the user is being prompted to enter the password.
- SHOWN = 2;
- }
- optional State state = 1;
-}
-
-/**
- * Logs the result of entering a password into the keyguard bouncer.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
- */
-message KeyguardBouncerPasswordEntered {
- enum BouncerResult {
- UNKNOWN = 0;
- // The password entered was incorrect.
- FAILURE = 1;
- // The password entered was correct.
- SUCCESS = 2;
- }
- optional BouncerResult result = 1;
-}
-
-/*
- * Logs changes to the configuration of the device. The configuration is defined
- * in frameworks/base/core/java/android/content/res/Configuration.java
- * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html
- * Please go there to interpret the possible values each field can be.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message ResourceConfigurationChanged {
- // Bit mask of color capabilities of the screen.
- // Contains information about the color gamut and hdr mode of the screen.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode
- optional int32 color_mode = 1;
-
- // The target screen density being rendered to.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi
- optional int32 density_dpi = 2;
-
- // Current user preference for the scaling factor for fonts,
- // relative to the base density scaling.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale
- optional float font_scale = 3;
-
- // Flag indicating whether the hard keyboard is hidden.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden
- optional int32 hard_keyboard_hidden = 4;
-
- // The type of keyboard attached to the device.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard
- optional int32 keyboard = 5;
-
- // Flag indicating whether any keyboard is available. Takes soft keyboards into account.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden
- optional int32 keyboard_hidden = 6;
-
- // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier.
- // 0 if undefined.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc
- optional int32 mcc = 7;
-
- // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier.
- // 0 if undefined. Note: the actual MNC may be 0, to check for this use the
- // MNC_ZERO symbol defined in Configuration.java.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc
- optional int32 mnc = 8;
-
- // The kind of navigation available on the device.
- // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation
- optional int32 navigation = 9;
-
- // Flag indicating whether the navigation is available.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden
- optional int32 navigation_hidden = 10;
-
- // Overall orientation of the screen.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation
- optional int32 orientation = 11;
-
- // The current height of the available screen space, in dp units.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp
- optional int32 screen_height_dp = 12;
-
- // Bit mask of overall layout of the screen.
- // Contains information about screen size, whether the screen is wider/taller
- // than normal, whether the screen layout is right-tl-left or left-to-right,
- // and whether the screen has a rounded shape.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout
- optional int32 screen_layout = 13;
-
- // Current width of the available screen space, in dp units.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp
- optional int32 screen_width_dp = 14;
-
- // The smallest screen size an application will see in normal operation.
- // This is the smallest value of both screenWidthDp and screenHeightDp
- // in portrait and landscape.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp
- optional int32 smallest_screen_width_dp = 15;
-
- // The type of touch screen attached to the device.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen
- optional int32 touchscreen = 16;
-
- // Bit mask of the ui mode.
- // Contains information about the overall ui mode of the device.
- // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET
- // Also contains information about whether the device is in night mode.
- // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode
- optional int32 ui_mode = 17;
-}
-
-
-/**
- * Logs changes in the connection state of the mobile radio.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java
- */
-message MobileConnectionStateChanged {
- // States are from the state machine DataConnection.java.
- enum State {
- UNKNOWN = 0;
- // The connection is inactive, or disconnected.
- INACTIVE = 1;
- // The connection is being activated, or connecting.
- ACTIVATING = 2;
- // The connection is active, or connected.
- ACTIVE = 3;
- // The connection is disconnecting.
- DISCONNECTING = 4;
- // The connection is disconnecting after creating a connection.
- DISCONNECTION_ERROR_CREATING_CONNECTION = 5;
- }
- optional State state = 1;
- // For multi-sim phones, this distinguishes between the sim cards.
- optional int32 sim_slot_index = 2;
- // Used to identify the connection. Starts at 0 and increments by 1 for
- // every new network created. Resets whenever the device reboots.
- optional int32 data_connection_id = 3;
- // A bitmask for the capabilities of this connection.
- // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS.
- // Default value (if we have no information): 0
- optional int64 capabilities = 4;
- // If this connection has internet.
- // This just checks if the DEFAULT bit of capabilities is set.
- optional bool has_internet = 5;
-}
-
-/**
- * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java
- */
-message MobileRadioTechnologyChanged {
- optional android.telephony.NetworkTypeEnum state = 1;
- // For multi-sim phones, this distinguishes between the sim cards.
- optional int32 sim_slot_index = 2;
-}
-
-/**
- * Logs the VID and PID of any connected USB devices.
- *
- * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present.
- *
- * Logged by Vendor.
- */
-message UsbDeviceAttached {
- optional int32 vid = 1;
- optional int32 pid = 2;
- optional bool has_audio = 3;
- optional bool has_hid = 4;
- optional bool has_storage = 5;
- enum State {
- STATE_DISCONNECTED = 0;
- STATE_CONNECTED = 1;
- }
- optional State state = 6;
- optional int64 last_connect_duration_millis = 7;
-}
-
-
-/**
- * Logs when Bluetooth is enabled and disabled.
- *
- * Logged from:
- * services/core/java/com/android/server/BluetoothManagerService.java
- */
-message BluetoothEnabledStateChanged {
- repeated AttributionNode attribution_node = 1;
- // Whether or not bluetooth is enabled on the device.
- enum State {
- UNKNOWN = 0;
- ENABLED = 1;
- DISABLED = 2;
- }
- optional State state = 2;
- // The reason for being enabled/disabled.
- // Eg. Airplane mode, crash, application request.
- optional android.bluetooth.EnableDisableReasonEnum reason = 3;
- // If the reason is an application request, this will be the package name.
- optional string pkg_name = 4;
-}
-
-/**
- * Logs when profiles on a Bluetooth device connects and disconnects.
- *
- * Logged from:
- * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
- *
- * Next Tag: 6
- */
-message BluetoothConnectionStateChanged {
- // The state of the connection.
- // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
- optional android.bluetooth.ConnectionStateEnum state = 1;
- // An identifier that can be used to match connect and disconnect events.
- // Currently is last two bytes of a hash of a device level ID and
- // the mac address of the bluetooth device that is connected.
- // Deprecated: use obfuscated_id instead, this one is always 0 for Q+
- optional int32 obfuscated_id = 2 [deprecated = true];
- // The profile that is connected. Eg. GATT, A2DP, HEADSET.
- // From android.bluetooth.BluetoothAdapter.java
- // Default: 0 when not used
- optional int32 bt_profile = 3;
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 5;
-}
-
-/**
- * Logs when a Bluetooth device connects and disconnects over ACL
- *
- * Logged from:
- * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
- *
- * Next Tag: 4
- */
-message BluetoothAclConnectionStateChanged {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // The state of the connection.
- // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
- optional android.bluetooth.ConnectionStateEnum state = 2;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 3;
-}
-
-/**
- * Logs when a Bluetooth device connects and disconnects over SCO
- *
- * Logged from:
- * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
- * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java
- *
- * Next Tag: 5
- */
-message BluetoothScoConnectionStateChanged {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // The state of the connection.
- // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
- optional android.bluetooth.ConnectionStateEnum state = 2;
- // Codec used for this SCO connection
- // Default: UNKNOWN
- optional android.bluetooth.hfp.ScoCodec codec = 3;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 4;
-}
-
-/**
- * Logged when active device of a profile changes
- *
- * Logged from:
- * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
- * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java
- * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java
- */
-message BluetoothActiveDeviceChanged {
- // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID
- // From android.bluetooth.BluetoothProfile
- optional int32 bt_profile = 1;
- // An identifier that can be used to match events for this new active device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if there is no active device for this profile
- optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES];
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 3;
-}
-
-// Logs when there is an event affecting Bluetooth device's link layer connection.
-// - This event is triggered when there is a related HCI command or event
-// - Users of this metrics can deduce Bluetooth device's connection state from these events
-// - HCI commands are logged before the command is sent, after receiving command status, and after
-// receiving command complete
-// - HCI events are logged when they arrive
-//
-// Low level log from system/bt
-//
-// Bluetooth classic commands:
-// - CMD_CREATE_CONNECTION
-// - CMD_DISCONNECT
-// - CMD_CREATE_CONNECTION_CANCEL
-// - CMD_ACCEPT_CONNECTION_REQUEST
-// - CMD_REJECT_CONNECTION_REQUEST
-// - CMD_SETUP_ESCO_CONNECTION
-// - CMD_ACCEPT_ESCO_CONNECTION
-// - CMD_REJECT_ESCO_CONNECTION
-// - CMD_ENH_SETUP_ESCO_CONNECTION
-// - CMD_ENH_ACCEPT_ESCO_CONNECTION
-//
-// Bluetooth low energy commands:
-// - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00]
-// - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error]
-// - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00]
-// - CMD_BLE_CLEAR_WHITE_LIST
-// - CMD_BLE_ADD_WHITE_LIST
-// - CMD_BLE_REMOVE_WHITE_LIST
-//
-// Bluetooth classic events:
-// - EVT_CONNECTION_COMP
-// - EVT_CONNECTION_REQUEST
-// - EVT_DISCONNECTION_COMP
-// - EVT_ESCO_CONNECTION_COMP
-// - EVT_ESCO_CONNECTION_CHANGED
-//
-// Bluetooth low energy meta events:
-// - BLE_EVT_CONN_COMPLETE_EVT
-// - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT
-//
-// Next tag: 10
-message BluetoothLinkLayerConnectionEvent {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Connection handle of this connection if available
- // Range: 0x0000 - 0x0EFF (12 bits)
- // Default: 0xFFFF if the handle is unknown
- optional int32 connection_handle = 2;
- // Direction of the link
- // Default: DIRECTION_UNKNOWN
- optional android.bluetooth.DirectionEnum direction = 3;
- // Type of this link
- // Default: LINK_TYPE_UNKNOWN
- optional android.bluetooth.LinkTypeEnum type = 4;
-
- // Reason metadata for this link layer connection event, rules for interpretation:
- // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or
- // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case
- // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is
- // set and valid, ignore hci_ble_event
-
- // HCI command associated with this event
- // Default: CMD_UNKNOWN
- optional android.bluetooth.hci.CommandEnum hci_cmd = 5;
- // HCI event associated with this event
- // Default: EVT_UNKNOWN
- optional android.bluetooth.hci.EventEnum hci_event = 6;
- // HCI BLE meta event associated with this event
- // Default: BLE_EVT_UNKNOWN
- optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7;
- // HCI command status code if this is triggerred by hci_cmd
- // Default: STATUS_UNKNOWN
- optional android.bluetooth.hci.StatusEnum cmd_status = 8;
- // HCI reason code associated with this event
- // Default: STATUS_UNKNOWN
- optional android.bluetooth.hci.StatusEnum reason_code = 9;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 10;
-}
-
-/**
- * Logs when a module is rolled back by Watchdog.
- *
- * Logged from: Rollback Manager
- */
-message WatchdogRollbackOccurred {
- enum RollbackType {
- UNKNOWN = 0;
- ROLLBACK_INITIATE = 1;
- ROLLBACK_SUCCESS = 2;
- ROLLBACK_FAILURE = 3;
- ROLLBACK_BOOT_TRIGGERED = 4;
- }
- optional RollbackType rollback_type = 1;
-
- optional string package_name = 2;
-
- optional int32 package_version_code = 3;
-
- enum RollbackReasonType {
- REASON_UNKNOWN = 0;
- REASON_NATIVE_CRASH = 1;
- REASON_EXPLICIT_HEALTH_CHECK = 2;
- REASON_APP_CRASH = 3;
- REASON_APP_NOT_RESPONDING = 4;
- REASON_NATIVE_CRASH_DURING_BOOT = 5;
- }
- optional RollbackReasonType rollback_reason = 4;
-
- // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback
- // is initiated. Empty if the package is unknown.
- optional string failing_package_name = 5;
-
- optional TrainExperimentIds experiment_ids = 6 [(log_mode) = MODE_BYTES];
-}
-
-/**
- * Logs when there is a change in Bluetooth A2DP playback state
- *
- * Logged from:
- * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
- */
-message BluetoothA2dpPlaybackStateChanged {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Current playback state
- // Default: PLAYBACK_STATE_UNKNOWN
- optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2;
- // Current audio coding mode
- // Default: AUDIO_CODING_MODE_UNKNOWN
- optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 4;
-}
-
-/**
- * Logs when there is a change in A2DP codec config for a particular remote device
- *
- * Logged from:
- * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
- * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
- */
-message BluetoothA2dpCodecConfigChanged {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
- // Default SOURCE_CODEC_TYPE_INVALID
- optional int32 codec_type = 2;
- // Codec priroity, the higher the more preferred, -1 for disabled
- // Default: CODEC_PRIORITY_DEFAULT
- optional int32 codec_priority = 3;
- // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig
- // Default: SAMPLE_RATE_NONE
- optional int32 sample_rate = 4;
- // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig
- // Default: BITS_PER_SAMPLE_NONE
- optional int32 bits_per_sample = 5;
- // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig
- // Default: CHANNEL_MODE_NONE
- optional int32 channel_mode = 6;
- // Codec specific values
- // Default 0
- optional int64 codec_specific_1 = 7;
- optional int64 codec_specific_2 = 8;
- optional int64 codec_specific_3 = 9;
- optional int64 codec_specific_4 = 10;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 11;
-}
-
-/**
- * Logs when there is a change in selectable A2DP codec capability for a paricular remote device
- * Each codec's capability is logged separately due to statsd restriction
- *
- * Logged from:
- * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
- * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
- */
-message BluetoothA2dpCodecCapabilityChanged {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
- // Default SOURCE_CODEC_TYPE_INVALID
- optional int32 codec_type = 2;
- // Codec priroity, the higher the more preferred, -1 for disabled
- // Default: CODEC_PRIORITY_DEFAULT
- optional int32 codec_priority = 3;
- // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants
- // in BluetoothCodecConfig
- // Default: empty and SAMPLE_RATE_NONE for individual item
- optional int32 sample_rate = 4;
- // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants
- // in BluetoothCodecConfig
- // Default: empty and BITS_PER_SAMPLE_NONE for individual item
- optional int32 bits_per_sample = 5;
- // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in
- // BluetoothCodecConfig
- // Default: empty and CHANNEL_MODE_NONE for individual item
- optional int32 channel_mode = 6;
- // Codec specific values
- // Default 0
- optional int64 codec_specific_1 = 7;
- optional int64 codec_specific_2 = 8;
- optional int64 codec_specific_3 = 9;
- optional int64 codec_specific_4 = 10;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 11;
-}
-
-/**
- * Logs when A2DP failed to read from PCM source.
- * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding.
- *
- * Logged from:
- * system/bt
- */
-message BluetoothA2dpAudioUnderrunReported {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Encoding interval in nanoseconds
- // Default: 0
- optional int64 encoding_interval_nanos = 2;
- // Number of bytes of PCM data that could not be read from the source
- // Default: 0
- optional int32 num_missing_pcm_bytes = 3;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 4;
-}
-
-/**
- * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit
- * buffer queue is full and we have to drop data
- *
- * Logged from:
- * system/bt
- */
-message BluetoothA2dpAudioOverrunReported {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Encoding interval in nanoseconds
- // Default: 0
- optional int64 encoding_interval_nanos = 2;
- // Number of buffers dropped in this event
- // Each buffer is encoded in one encoding interval and consists of multiple encoded frames
- // Default: 0
- optional int32 num_dropped_buffers = 3;
- // Number of encoded buffers dropped in this event
- // Default 0
- optional int32 num_dropped_encoded_frames = 4;
- // Number of encoded bytes dropped in this event
- // Default: 0
- optional int32 num_dropped_encoded_bytes = 5;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 6;
-}
-
-/**
- * Logs when we receive reports regarding a device's RSSI value
- *
- * Logged from:
- * system/bt
- */
-message BluetoothDeviceRssiReported {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Connection handle of this connection if available
- // Range: 0x0000 - 0x0EFF (12 bits)
- // Default: 0xFFFF if the handle is unknown
- optional int32 connection_handle = 2;
- // HCI command status code if this is triggerred by hci_cmd
- // Default: STATUS_UNKNOWN
- optional android.bluetooth.hci.StatusEnum hci_status = 3;
- // BR/EDR
- // Range: -128 ≤ N ≤ 127 (signed integer)
- // Units: dB
- // LE:
- // Range: -127 to 20, 127 (signed integer)
- // Units: dBm
- // Invalid when an out of range value is reported
- optional int32 rssi = 4;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 5;
-}
-
-/**
- * Logs when we receive reports regarding how many consecutive failed contacts for a connection
- *
- * Logged from:
- * system/bt
- */
-message BluetoothDeviceFailedContactCounterReported {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Connection handle of this connection if available
- // Range: 0x0000 - 0x0EFF (12 bits)
- // Default: 0xFFFF if the handle is unknown
- optional int32 connection_handle = 2;
- // HCI command status code if this is triggerred by hci_cmd
- // Default: STATUS_UNKNOWN
- optional android.bluetooth.hci.StatusEnum cmd_status = 3;
- // Number of consecutive failed contacts for a connection corresponding to the Handle
- // Range: uint16_t, 0-0xFFFF
- // Default: 0xFFFFF
- optional int32 failed_contact_counter = 4;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 5;
-}
-
-/**
- * Logs when we receive reports regarding the tranmit power level used for a specific connection
- *
- * Logged from:
- * system/bt
- */
-message BluetoothDeviceTxPowerLevelReported {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Connection handle of this connection if available
- // Range: 0x0000 - 0x0EFF (12 bits)
- // Default: 0xFFFF if the handle is unknown
- optional int32 connection_handle = 2;
- // HCI command status code if this is triggered by hci_cmd
- // Default: STATUS_UNKNOWN
- optional android.bluetooth.hci.StatusEnum hci_status = 3;
- // Range: -30 ≤ N ≤ 20
- // Units: dBm
- // Invalid when an out of range value is reported
- optional int32 transmit_power_level = 4;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 5;
-}
-
-/**
- * Logs when Bluetooth controller failed to reply with command status within a timeout period after
- * receiving an HCI command from the host
- *
- * Logged from: system/bt
- */
-message BluetoothHciTimeoutReported {
- // HCI command associated with this event
- // Default: CMD_UNKNOWN
- optional android.bluetooth.hci.CommandEnum hci_command = 1;
-}
-
-/**
- * Logs when we receive Bluetooth Link Quality Report event from the controller
- * See Android Bluetooth HCI specification for more details
- *
- * Note: all count and bytes field are counted since last event
- *
- * Logged from: system/bt
- */
-message BluetoothQualityReportReported {
- // Quality report ID
- // Original type: uint8_t
- // Default: BQR_ID_UNKNOWN
- optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1;
- // Packet type of the connection
- // Original type: uint8_t
- // Default: BQR_PACKET_TYPE_UNKNOWN
- optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2;
- // Connection handle of the connection
- // Original type: uint16_t
- optional int32 connection_handle = 3;
- // Performing Role for the connection
- // Original type: uint8_t
- optional int32 connection_role = 4;
- // Current Transmit Power Level for the connection. This value is the same as the controller's
- // response to the HCI_Read_Transmit_Power_Level HCI command
- // Original type: uint8_t
- optional int32 tx_power_level = 5;
- // Received Signal Strength Indication (RSSI) value for the connection. This value is an
- // absolute receiver signal strength value
- // Original type: int8_t
- optional int32 rssi = 6;
- // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the
- // channels used by the link currently
- // Original type: uint8_t
- optional int32 snr = 7;
- // Indicates the number of unused channels in AFH_channel_map
- // Original type: uint8_t
- optional int32 unused_afh_channel_count = 8;
- // Indicates the number of the channels which are interfered and quality is bad but are still
- // selected for AFH
- // Original type: uint8_t
- optional int32 afh_select_unideal_channel_count = 9;
- // Current Link Supervision Timeout Setting
- // Unit: N * 0.3125 ms (1 Bluetooth Clock)
- // Original type: uint16_t
- optional int32 lsto = 10;
- // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's
- // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of
- // 0x01 (Piconet Clock)
- // Unit: N * 0.3125 ms (1 Bluetooth Clock)
- // Original type: uint32_t
- optional int64 connection_piconet_clock = 11;
- // The count of retransmission
- // Original type: uint32_t
- optional int64 retransmission_count = 12;
- // The count of no RX
- // Original type: uint32_t
- optional int64 no_rx_count = 13;
- // The count of NAK (Negative Acknowledge)
- // Original type: uint32_t
- optional int64 nak_count = 14;
- // Controller timestamp of last TX ACK
- // Unit: N * 0.3125 ms (1 Bluetooth Clock)
- // Original type: uint32_t
- optional int64 last_tx_ack_timestamp = 15;
- // The count of Flow-off (STOP)
- // Original type: uint32_t
- optional int64 flow_off_count = 16;
- // Controller timestamp of last Flow-on (GO)
- // Unit: N * 0.3125 ms (1 Bluetooth Clock)
- // Original type: uint32_t
- optional int64 last_flow_on_timestamp = 17;
- // Buffer overflow count (how many bytes of TX data are dropped) since the last event
- // Original type: uint32_t
- optional int64 buffer_overflow_bytes = 18;
- // Buffer underflow count (in byte) since last event
- // Original type: uint32_t
- optional int64 buffer_underflow_bytes = 19;
-}
-
-/**
- * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack
- *
- * Notes:
- * - Each event can be partially filled as we might learn different pieces of device
- * information at different time
- * - Multiple device info events can be combined to give more complete picture
- * - When multiple device info events tries to describe the same information, the
- * later one wins
- *
- * Logged from:
- * packages/apps/Bluetooth
- */
-message BluetoothDeviceInfoReported {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Where is this device info obtained from
- optional android.bluetooth.DeviceInfoSrcEnum source_type = 2;
- // Name of the data source
- // For EXTERNAL: package name of the data source
- // For INTERNAL: null for general case, component name otherwise
- optional string source_name = 3;
- // Name of the manufacturer of this device
- optional string manufacturer = 4;
- // Model of this device
- optional string model = 5;
- // Hardware version of this device
- optional string hardware_version = 6;
- // Software version of this device
- optional string software_version = 7;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 8;
-}
-
-/**
- * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote
- * device, as documented by the Bluetooth Core HCI specification
- * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification
- * Vol 2, Part E, Page 1118
- *
- * Logged from:
- * system/bt
- */
-message BluetoothRemoteVersionInfoReported {
- // Connection handle of the connection
- // Original type: uint16_t
- optional int32 connection_handle = 1;
- // HCI command status code
- // Default: STATUS_UNKNOWN
- optional android.bluetooth.hci.StatusEnum hci_status = 2;
- // 1 byte Version of current LMP in the remote controller
- optional int32 lmp_version = 3;
- // 2 bytes LMP manufacturer code of the remote controller
- // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
- optional int32 lmp_manufacturer_code = 4;
- // 4 bytes subversion of the LMP in the remote controller
- optional int32 lmp_subversion = 5;
-}
-
-/**
- * Logs when certain Bluetooth SDP attributes are discovered
- * Constant definitions are from:
- * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery
- *
- * Current logged attributes:
- * - BluetoothProfileDescriptorList
- * - Supported Features Bitmask
- *
- * Logged from:
- * system/bt
- */
-message BluetoothSdpAttributeReported {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes
- // Original type: uint16_t
- optional int32 protocol_uuid = 2;
- // Short form UUIDs used to identify Bluetooth SDP attribute types
- // Original type: uint16_t
- optional int32 attribute_id = 3;
- // Attribute value for the particular attribute
- optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 5;
-}
-
-/**
- * Logs when bond state of a Bluetooth device changes
- *
- * Logged from:
- * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
- * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
- */
-message BluetoothBondStateChanged {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Preferred transport type to remote dual mode device
- // Default: TRANSPORT_AUTO means no preference
- optional android.bluetooth.TransportTypeEnum transport = 2;
- // The type of this Bluetooth device (Classic, LE, or Dual mode)
- // Default: UNKNOWN
- optional android.bluetooth.DeviceTypeEnum type = 3;
- // Current bond state (NONE, BONDING, BONDED)
- // Default: BOND_STATE_UNKNOWN
- optional android.bluetooth.BondStateEnum bond_state = 4;
- // Bonding sub state
- // Default: BOND_SUB_STATE_UNKNOWN
- optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5;
- // Unbond Reason
- // Default: UNBOND_REASON_UNKNOWN
- optional android.bluetooth.UnbondReasonEnum unbond_reason = 6;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 7;
-}
-
-/**
- * Logs there is an event related Bluetooth classic pairing
- *
- * Logged from:
- * system/bt
- */
-message BluetoothClassicPairingEventReported {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Connection handle of this connection if available
- // Range: 0x0000 - 0x0EFF (12 bits)
- // Default: 0xFFFF if the handle is unknown
- optional int32 connection_handle = 2;
- // HCI command associated with this event
- // Default: CMD_UNKNOWN
- optional android.bluetooth.hci.CommandEnum hci_cmd = 3;
- // HCI event associated with this event
- // Default: EVT_UNKNOWN
- optional android.bluetooth.hci.EventEnum hci_event = 4;
- // HCI command status code if this is triggerred by hci_cmd
- // Default: STATUS_UNKNOWN
- optional android.bluetooth.hci.StatusEnum cmd_status = 5;
- // HCI reason code associated with this event
- // Default: STATUS_UNKNOWN
- optional android.bluetooth.hci.StatusEnum reason_code = 6;
- // A status value related to this specific event
- // Default: 0
- optional int64 event_value = 7;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 8;
-}
-
-/**
- * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP)
- *
- * Logged from:
- * system/bt
- */
-message BluetoothSmpPairingEventReported {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if the device identifier is not known
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // SMP command sent or received over L2CAP
- // Default: CMD_UNKNOWN
- optional android.bluetooth.smp.CommandEnum smp_command = 2;
- // Whether this command is sent or received
- // Default: DIRECTION_UNKNOWN
- optional android.bluetooth.DirectionEnum direction = 3;
- // SMP failure reason code
- // Default: PAIRING_FAIL_REASON_DEFAULT
- optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 5;
-}
-
-/**
- * Logs when a Bluetooth socket’s connection state changed
- *
- * Logged from:
- * system/bt
- */
-message BluetoothSocketConnectionStateChanged {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if this is a server listener socket
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Temporary port of this socket for the current connection or session only
- // Default 0 when unknown or don't care
- optional int32 port = 2;
- // Socket type as mentioned in
- // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
- // Default: SOCKET_TYPE_UNKNOWN
- optional android.bluetooth.SocketTypeEnum type = 3;
- // Socket connection state
- // Default: SOCKET_CONNECTION_STATE_UNKNOWN
- optional android.bluetooth.SocketConnectionstateEnum state = 4;
- // Number of bytes sent to remote device during this connection
- optional int64 tx_bytes = 5;
- // Number of bytes received from remote device during this connection
- optional int64 rx_bytes = 6;
- // Socket owner's UID
- optional int32 uid = 7 [(is_uid) = true];
- // Server port of this socket, if any. When both |server_port| and |port| fields are populated,
- // |port| must be spawned by |server_port|
- // Default 0 when unknown or don't care
- optional int32 server_port = 8;
- // Whether this is a server listener socket
- optional android.bluetooth.SocketRoleEnum is_server = 9;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 10;
-}
-
-/**
- * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection
- *
- * Logged from:
- * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
- * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
- *
- */
-message BluetoothClassOfDeviceReported {
- // An identifier that can be used to match events for this device.
- // Currently, this is a salted hash of the MAC address of this Bluetooth device.
- // Salt: Randomly generated 256 bit value
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- // Default: null or empty if this is a server listener socket
- optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Class of Device (CoD) value including both Major, Minor device class and service class
- // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband
- // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass
- // Default: 0
- optional int32 class_of_device = 2;
- // An identifier that can be used to match events for this device.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired devices, it stays consistent between Bluetooth toggling for the
- // same remote device.
- // For unpaired devices, it stays consistent within the same Bluetooth adapter
- // session for the same remote device.
- // Default: 0 if the device's metric id is unknown.
- optional int32 metric_id = 3;
-}
-
-/**
- * Logs when something is plugged into or removed from the USB-C connector.
- *
- * Logged from:
- * UsbService
- */
-message UsbConnectorStateChanged {
- enum State {
- STATE_DISCONNECTED = 0;
- STATE_CONNECTED = 1;
- }
- optional State state = 1
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
- optional string id = 2 [(state_field_option).primary_field = true];
- // Last active session in ms.
- // 0 when the port is in connected state.
- optional int64 last_connect_duration_millis = 3;
-}
-
-/**
- * Logs the reported speaker impedance.
- *
- * Logged from:
- * Vendor audio implementation.
- */
-message SpeakerImpedanceReported {
- optional int32 speaker_location = 1;
- optional int32 impedance = 2;
-}
-
-/**
- * Logs the report of a failed hardware.
- *
- * Logged from:
- * Vendor HALs.
- *
- */
-message HardwareFailed {
- enum HardwareType {
- HARDWARE_FAILED_UNKNOWN = 0;
- HARDWARE_FAILED_MICROPHONE = 1;
- HARDWARE_FAILED_CODEC = 2;
- HARDWARE_FAILED_SPEAKER = 3;
- HARDWARE_FAILED_FINGERPRINT = 4;
- }
- optional HardwareType hardware_type = 1;
-
- /**
- * hardware_location allows vendors to differentiate between multiple instances of
- * the same hardware_type. The specific locations are vendor defined integers,
- * referring to board-specific numbering schemes.
- */
- optional int32 hardware_location = 2;
-
- /**
- * failure_code is specific to the HardwareType of the failed hardware.
- * It should use one of the enum values defined below.
- */
- enum HardwareErrorCode {
- UNKNOWN = 0;
- COMPLETE = 1;
- SPEAKER_HIGH_Z = 2;
- SPEAKER_SHORT = 3;
- FINGERPRINT_SENSOR_BROKEN = 4;
- FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5;
- DEGRADE = 6;
- }
- optional int32 failure_code = 3;
-}
-
-/**
- * Log an event when the device has been physically dropped.
- * Reported from the /vendor partition.
- */
-message PhysicalDropDetected {
- // Confidence that the event was actually a drop, 0 -> 100
- optional int32 confidence_pctg = 1;
- // Peak acceleration of the drop, in 1/1000s of a g.
- optional int32 accel_peak_thousandths_g = 2;
- // Duration of freefall in ms
- optional int32 freefall_time_millis = 3;
-}
-
-/**
- * Log bucketed battery charge cycles.
- *
- * Each bucket represents cycles of the battery past
- * a given charge point. For example, if 10 cycle buckets are
- * initialized, bucket 1 is the lowest 1/10th of the battery,
- * and bucket 10 is 100%.
- *
- * Logged from:
- * /sys/class/power_supply/bms/cycle_count, via Vendor.
- */
-message ChargeCyclesReported {
- optional int32 cycle_bucket_1 = 1;
- optional int32 cycle_bucket_2 = 2;
- optional int32 cycle_bucket_3 = 3;
- optional int32 cycle_bucket_4 = 4;
- optional int32 cycle_bucket_5 = 5;
- optional int32 cycle_bucket_6 = 6;
- optional int32 cycle_bucket_7 = 7;
- optional int32 cycle_bucket_8 = 8;
- optional int32 cycle_bucket_9 = 9;
- optional int32 cycle_bucket_10 = 10;
-}
-
-/**
- * Log battery health snapshot.
- *
- * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level
- * are snapshotted periodically over 24hrs.
- */
-message BatteryHealthSnapshot {
- enum BatterySnapshotType {
- UNKNOWN = 0;
- MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs.
- MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs.
- MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs.
- MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs.
- MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs.
- MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs.
- MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs.
- MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs.
- MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs.
- MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs.
- AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs.
- }
- optional BatterySnapshotType type = 1;
- // Temperature, in 1/10ths of degree C.
- optional int32 temperature_deci_celsius = 2;
- // Voltage Battery Voltage, in microVolts.
- optional int32 voltage_micro_volt = 3;
- // Current Battery current, in microAmps.
- optional int32 current_micro_amps = 4;
- // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts.
- optional int32 open_circuit_micro_volt = 5;
- // Resistance Battery Resistance, in microOhms.
- optional int32 resistance_micro_ohm = 6;
- // Level Battery Level, as % of full.
- optional int32 level_percent = 7;
-}
-
-/**
- * Log slow I/O operations on the primary storage.
- */
-message SlowIo {
- // Classifications of IO Operations.
- enum IoOperation {
- UNKNOWN = 0;
- READ = 1;
- WRITE = 2;
- UNMAP = 3;
- SYNC = 4;
- }
- optional IoOperation operation = 1;
-
- // The number of slow IO operations of this type over 24 hours.
- optional int32 count = 2;
-}
-
-/**
- * Log battery caused shutdown with the last recorded voltage.
- */
-message BatteryCausedShutdown {
- // The last recorded battery voltage prior to shutdown.
- optional int32 last_recorded_micro_volt = 1;
-}
-
-/**
- * Logs when ThermalService receives throttling events.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
- */
-message ThermalThrottlingSeverityStateChanged {
- // The type of temperature being reported (CPU, GPU, SKIN, etc)
- optional android.os.TemperatureTypeEnum sensor_type = 1;
-
- // The name of the temperature source. Eg. CPU0
- optional string sensor_name = 2;
-
- // Temperature in tenths of a degree C.
- // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
- optional int32 temperature_deci_celsius = 3;
-
- // Relative severity of the throttling, see enum definition.
- optional android.os.ThrottlingSeverityEnum severity = 4;
-}
-
-/**
- * Logs the duration of a davey (jank of >=700ms) when it occurs
- *
- * Logged from:
- * frameworks/base/libs/hwui/JankTracker.cpp
- */
-message DaveyOccurred {
- // The UID that logged this atom.
- optional int32 uid = 1 [(is_uid) = true];
-
- // Amount of time it took to render the frame. Should be >=700ms.
- optional int64 jank_duration_millis = 2;
-}
-
-/**
- * Logs phone signal strength changes.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message PhoneSignalStrengthChanged {
- // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
- optional android.telephony.SignalStrengthEnum signal_strength = 1;
-}
-
-
-/**
- * Logs when the phone state, sim state or signal strength changes
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message PhoneServiceStateChanged {
- optional android.telephony.ServiceStateEnum state = 1;
- optional android.telephony.SimStateEnum sim_state = 2;
- optional android.telephony.SignalStrengthEnum signal_strength = 3;
-}
-
-/**
- * Logs when the phone becomes on or off.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java
- */
-message PhoneStateChanged {
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 1;
-}
-
-message BackGesture {
- enum BackType {
- DEFAULT_BACK_TYPE = 0;
- COMPLETED = 1;
- COMPLETED_REJECTED = 2; // successful because coming from rejected area
- INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area
- INCOMPLETE = 4; // Unsuccessful, for reasons other than below.
- INCOMPLETE_FAR_FROM_EDGE = 5; // Unsuccessful, far from the edge.
- INCOMPLETE_MULTI_TOUCH = 6; // Unsuccessful, multi touch.
- INCOMPLETE_LONG_PRESS = 7; // Unsuccessful, long press.
- INCOMPLETE_VERTICAL_MOVE = 8; // Unsuccessful, move vertically.
- }
- optional BackType type = 1;
-
- optional int32 y_coordinate = 2 [deprecated = true]; // y coordinate for ACTION_DOWN event
- optional int32 start_x = 4; // X coordinate for ACTION_DOWN event.
- optional int32 start_y = 5; // Y coordinate for ACTION_DOWN event.
- optional int32 end_x = 6; // X coordinate for ACTION_MOVE event.
- optional int32 end_y = 7; // Y coordinate for ACTION_MOVE event.
- optional int32 left_boundary = 8; // left edge width + left inset
- optional int32 right_boundary = 9; // screen width - (right edge width + right inset)
-
- enum WindowHorizontalLocation {
- DEFAULT_LOCATION = 0;
- LEFT = 1;
- RIGHT = 2;
- }
- optional WindowHorizontalLocation x_location = 3 [deprecated = true];
-}
-
-message ExclusionRectStateChanged {
- optional string component_name = 1; // if not available, simply packageName
- optional int32 requested_height = 2; // px
- optional int32 rejected_height = 3; // px
-
- enum WindowHorizontalLocation {
- DEFAULT_LOCATION = 0;
- LEFT = 1;
- RIGHT = 2;
- }
- optional WindowHorizontalLocation x_location = 4;
- optional bool landscape = 5;
- optional bool splitscreen = 6;
- optional int32 duration_millis = 7;
-}
-
-/**
- * Logs when IME is on.
- *
- * Logged from: /packages/SystemUI/src/com/android/systemui/
- statusbar/phone/NavigationBarView.java
- *
- */
-message ImeTouchReported {
- optional int32 x_coordinate = 1; // X coordinate for ACTION_DOWN event.
- optional int32 y_coordinate = 2; // Y coordinate for ACTION_DOWN event.
-}
-
-/**
- * Logs when Launcher (HomeScreen) UI has changed or was interacted.
- *
- * Logged from:
- * packages/apps/Launcher3
- */
-message LauncherUIChanged {
- optional android.stats.launcher.LauncherAction action = 1 [deprecated = true];
- optional android.stats.launcher.LauncherState src_state = 2;
- optional android.stats.launcher.LauncherState dst_state = 3;
- optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES, deprecated = true];
- optional bool is_swipe_up_enabled = 5 [deprecated = true];
-
- // The event id (e.g., app launch, drag and drop, long press)
- optional int32 event_id = 6;
- // The event's source or target id (e.g., icon, task, button)
- optional int32 target_id = 7;
- // If the target needs to be tracked, use this id field
- optional int32 instance_id = 8;
- optional int32 uid = 9 [(is_uid) = true];
- optional string package_name = 10;
- optional string component_name = 11;
-
- // (x, y) coordinate and the index information of the target on the container
- optional int32 grid_x = 12 [default = -1];
- optional int32 grid_y = 13 [default = -1];
- optional int32 page_id = 14 [default = -2];
-
- // e.g., folder icon's (x, y) location and index information on the workspace
- optional int32 grid_x_parent = 15 [default = -1];
- optional int32 grid_y_parent = 16 [default = -1];
- optional int32 page_id_parent = 17 [default = -2];
-
- // e.g., SEARCHBOX_ALLAPPS, FOLDER_WORKSPACE
- optional int32 hierarchy = 18;
-
- optional bool is_work_profile = 19;
-
- // Used to store the predicted rank of the target
- optional int32 rank = 20 [default = -1];
-
- // e.g., folderLabelState can be captured in the following two fields
- optional int32 from_state = 21;
- optional int32 to_state = 22;
-
- // e.g., autofilled or suggested texts that are not user entered
- optional string edittext = 23;
-
- // e.g., number of contents inside a container (e.g., icons inside a folder)
- optional int32 cardinality = 24;
-}
-
-/**
- * Used for snapshot of the HomeScreen UI elements
- *
- * Logged from:
- * packages/apps/Launcher3
- */
-message LauncherStaticLayout {
- // The event id (e.g., snapshot, drag and drop)
- optional int32 event_id = 1;
- // The event's source or target id (e.g., icon, shortcut, widget)
- optional int32 target_id = 2;
- // If the target needs to be tracked, use this id field
- optional int32 instance_id = 3;
- optional int32 uid = 4 [(is_uid) = true];
- optional string package_name = 5;
- optional string component_name = 6;
-
- // (x, y) coordinate and the index information of the target on the container
- optional int32 grid_x = 7 [default = -1];
- optional int32 grid_y = 8 [default = -1];
- optional int32 page_id = 9 [default = -2];
-
- // e.g., folder icon's (x, y) location and index information on the workspace
- // e.g., when used with widgets target, use these values for (span_x, span_y)
- optional int32 grid_x_parent = 10 [default = -1];
- optional int32 grid_y_parent = 11 [default = -1];
- optional int32 page_id_parent = 12 [default = -2];
-
- // UNKNOWN = 0
- // HOTSEAT = 1
- // WORKSPACE = 2
- // FOLDER_HOTSEAT = 3
- // FOLDER_WORKSPACE = 4
- optional int32 hierarchy = 13;
-
- optional bool is_work_profile = 14;
-
- // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION
- optional int32 origin = 15;
-
- // e.g., number of icons inside a folder
- optional int32 cardinality = 16;
-
- // e.g., (x, y) span of the widget inside homescreen grid system
- optional int32 span_x = 17 [default = 1];
- optional int32 span_y = 18 [default = 1];
-}
-
-/**
- * Logs when Wallpaper or ThemePicker UI has changed.
- *
- * Logged from:
- * packages/apps/ThemePicker
- * packages/apps/WallpaperPicker2
- */
-message StyleUIChanged {
- optional android.stats.style.Action action = 1;
- optional int32 color_package_hash = 2;
- optional int32 font_package_hash = 3;
- optional int32 shape_package_hash = 4;
- optional int32 clock_package_hash = 5;
- optional int32 launcher_grid = 6;
- optional int32 wallpaper_category_hash = 7;
- optional int32 wallpaper_id_hash = 8;
- optional int32 color_preference = 9;
- optional android.stats.style.LocationPreference location_preference = 10;
-}
-
-/**
- * Logs when Settings UI has changed.
- *
- * Logged from:
- * packages/apps/Settings
- */
-message SettingsUIChanged {
- /**
- * Where this SettingsUIChange event comes from. For example, if
- * it's a PAGE_VISIBLE event, where the page is opened from.
- */
- optional android.app.settings.PageId attribution = 1;
-
- /**
- * What the UI action is.
- */
- optional android.app.settings.Action action = 2;
-
- /**
- * Where the action is happening
- */
- optional android.app.settings.PageId page_id = 3;
-
- /**
- * What preference changed in this event.
- */
- optional string changed_preference_key = 4;
-
- /**
- * The new value of the changed preference.
- */
- optional int64 changed_preference_int_value = 5;
-}
-
-/**
- * Logs basic timing information about touch events.
- * Reported at most every 5 minutes while device is being interacted with.
- *
- * Logged from:
- * frameworks/native/services/inputflinger
- */
-message TouchEventReported {
- /**
- * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean,
- * and the standard deviation of the time spent processing touchscreen events
- * in the kernel and inputflinger. The units are microseconds.
- *
- * On supported devices, the starting point is taken during the hard interrupt inside the
- * kernel touch driver. On all other devices, the starting point is taken inside
- * the kernel's input event subsystem upon receipt of the input event.
- * The ending point is taken inside InputDispatcher, just after the input event
- * is sent to the app.
- */
- // Minimum value
- optional float latency_min_micros = 1;
- // Maximum value
- optional float latency_max_micros = 2;
- // Average value
- optional float latency_mean_micros = 3;
- // Standard deviation
- optional float latency_stdev_micros = 4;
- // Number of touch events (input_event) in this report
- optional int32 count = 5;
-}
-
-/**
- * Logs gesture classification and timing information for touch events.
- *
- * Logged from:
- * frameworks/base/core/java/android/view/GestureDetector.java
- * frameworks/base/core/java/android/view/View.java
- */
-message TouchGestureClassified {
- // The source of the classification (e.g. Java class name).
- optional string source = 1;
-
- enum Classification {
- UNKNOWN_CLASSIFICATION = 0;
- SINGLE_TAP = 1;
- DOUBLE_TAP = 2;
- LONG_PRESS = 3;
- DEEP_PRESS = 4;
- SCROLL = 5;
- }
- // The classification of the gesture.
- optional Classification classification = 2;
-
- // The interval from the start of a touch event stream until the
- // classification was made.
- optional int32 latency_millis = 3;
-
- // The distance from the location of the first touch event to the
- // location of the touch event when the classification was made.
- optional float displacement_px = 4;
-}
-
-/**
- * Logs that a setting was updated.
- * Logged from:
- * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
- * The tag and is_default allow resetting of settings to default values based on the specified
- * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details.
- */
-message SettingChanged {
- // The name of the setting.
- optional string setting = 1;
-
- // The change being imposed on this setting. May represent a number, eg "3".
- optional string value = 2;
-
- // The new value of this setting. For most settings, this is same as value. For some settings,
- // value is +X or -X where X represents an element in a set. For example, if the previous value
- // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C.
- // The +/- feature is currently only used for location_providers_allowed.
- optional string new_value = 3;
-
- // The previous value of this setting.
- optional string prev_value = 4;
-
- // The tag used with the is_default for resetting sets of settings. This is generally null.
- optional string tag = 5;
-
- // True if this setting with tag should be resettable.
- optional bool is_default = 6;
-
- // The associated user (for multi-user feature). Defined in android/os/UserHandle.java
- optional int32 user = 7;
-
- enum ChangeReason {
- UPDATED = 1; // Updated can be an insertion or an update.
- DELETED = 2;
- }
- optional ChangeReason reason = 8;
-}
-
-/**
- * Logs activity going to foreground or background
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java
- */
-message ActivityForegroundStateChanged {
- optional int32 uid = 1 [(is_uid) = true];
- optional string pkg_name = 2;
- optional string class_name = 3;
-
- enum State {
- BACKGROUND = 0;
- FOREGROUND = 1;
- }
- optional State state = 4;
-}
-
-/**
- * Logs when a volume entered low Storage state.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java
- */
-message LowStorageStateChanged {
- // Volume that ran out of storage.
- optional string volume_description = 1;
-
- enum State {
- UNKNOWN = 0;
- OFF = 1;
- ON = 2;
- }
- optional State state = 2;
-}
-
-/**
- * Logs when an app is downgraded.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
- */
-message AppDowngraded {
- optional string package_name = 1;
- // Size of the package (all data) before being downgraded.
- optional int64 size_in_bytes_before = 2;
- // Size of the package (all data) after being downgraded.
- optional int64 size_in_bytes_after = 3;
-
- optional bool aggressive = 4;
-}
-
-/**
- * Logs when an app is optimized after being downgraded.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
- */
-message AppOptimizedAfterDowngraded {
- optional string package_name = 1;
-}
-
-/**
- * Logs whenever an app is installed on external storage.
- * Logged from:
- frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
- */
-message AppInstallOnExternalStorageReported {
- // The type of external storage.
- optional android.stats.storage.ExternalStorageType storage_type = 1;
- // The name of the package that is installed on the sd card.
- optional string package_name = 2;
-}
-
-/**
- * Logs when an app crashes.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message AppCrashOccurred {
- optional int32 uid = 1 [(is_uid) = true];
-
- optional string event_type = 2;
-
- // The name of the process.
- // system_server if it is not by an app
- optional string process_name = 3;
-
- // The pid if available. -1 means not available.
- optional int32 pid = 4;
-
- optional string package_name = 5;
-
- enum InstantApp {
- UNAVAILABLE = 0;
- FALSE = 1;
- TRUE = 2;
- }
- optional InstantApp is_instant_app = 6;
-
- enum ForegroundState {
- UNKNOWN = 0;
- BACKGROUND = 1;
- FOREGROUND = 2;
- }
- optional ForegroundState foreground_state = 7;
-
- optional android.server.ErrorSource error_source = 8;
-}
-
-/**
- * Logs when a WTF (What a Terrible Failure) happened.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message WTFOccurred {
- optional int32 uid = 1 [(is_uid) = true];
-
- optional string tag = 2;
-
- // The name of the process.
- // system_server if it is not by an app
- optional string process_name = 3;
-
- // The pid if available. -1 means not available.
- optional int32 pid = 4;
-
- optional android.server.ErrorSource error_source = 5;
-}
-
-/**
- * Logs when system server reports low memory.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message LowMemReported {
-}
-
-/**
- * Logs when an app ANR (App Not Responding) occurs.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/AppErrors.java
- */
-message ANROccurred {
- optional int32 uid = 1 [(is_uid) = true];
-
- optional string process_name = 2;
-
- optional string short_component_name = 3;
-
- optional string reason = 4;
-
- enum InstantApp {
- UNAVAILABLE = 0;
- FALSE = 1;
- TRUE = 2;
- }
- optional InstantApp is_instant_app = 5;
-
- enum ForegroundState {
- UNKNOWN = 0;
- BACKGROUND = 1;
- FOREGROUND = 2;
- }
- optional ForegroundState foreground_state = 6;
-
- optional android.server.ErrorSource error_source = 7;
-
- optional string package_name = 8;
-}
-
-/**
- * Logs when the vibrator state changes.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/VibratorService.java
- */
-message VibratorStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 2;
-
- // Duration (in milliseconds) requested to keep the vibrator on.
- // Only applicable for State == ON.
- optional int64 duration_millis = 3;
-}
-
-/*
- * Allows other apps to push events into statsd.
- * Logged from:
- * frameworks/base/core/java/android/util/StatsLog.java
- */
-message AppBreadcrumbReported {
- // The uid of the application that sent this custom atom.
- optional int32 uid = 1 [(is_uid) = true];
-
- // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16).
- optional int32 label = 2;
-
- // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom
- // predicates for the metrics).
- enum State {
- UNKNOWN = 0;
- UNSPECIFIED = 1; // For events that are known to not represent START/STOP.
- STOP = 2;
- START = 3;
- }
- optional State state = 3;
-}
-
-/**
- * Logs the wall-clock time when a significant wall-clock time shift occurs.
- * For example, this could be due to the user manually changing the time.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java
- */
-message WallClockTimeShifted {
- // New wall-clock time in milliseconds, according to System.currentTimeMillis().
- optional int64 wall_clock_timestamp_millis = 1;
-}
-
-/**
- * Logs when statsd detects an anomaly.
- *
- * Logged from:
- * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp
- */
-message AnomalyDetected {
- // Uid that owns the config whose anomaly detection alert fired.
- optional int32 config_uid = 1 [(is_uid) = true];
-
- // Id of the config whose anomaly detection alert fired.
- optional int64 config_id = 2;
-
- // Id of the alert (i.e. name of the anomaly that was detected).
- optional int64 alert_id = 3;
-}
-
-message AppStartOccurred {
- // The uid if available. -1 means not available.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The app package name.
- optional string pkg_name = 2;
-
- enum TransitionType {
- UNKNOWN = 0;
- WARM = 1;
- HOT = 2;
- COLD = 3;
- }
- // The transition type.
- optional TransitionType type = 3;
-
- // The activity name.
- optional string activity_name = 4;
-
- // The name of the calling app. Empty if not set.
- optional string calling_pkg_name = 5;
-
- // Whether the app is an instant app.
- optional bool is_instant_app = 6;
-
- // Device uptime when activity started.
- optional int64 activity_start_millis = 7;
-
- optional android.app.AppTransitionReasonEnum reason = 8;
-
- optional int32 transition_delay_millis = 9;
- // -1 if not set.
- optional int32 starting_window_delay_millis = 10;
- // -1 if not set.
- optional int32 bind_application_delay_millis = 11;
- optional int32 windows_drawn_delay_millis = 12;
-
- // Empty if not set.
- optional string launch_token = 13;
-
- // The compiler filter used when when the package was optimized.
- optional int32 package_optimization_compilation_filter = 14;
-
- // The reason why the package was optimized.
- optional int32 package_optimization_compilation_reason = 15;
-}
-
-message AppStartCanceled {
- // The uid if available. -1 means not available.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The app package name.
- optional string pkg_name = 2;
-
- enum TransitionType {
- UNKNOWN = 0;
- WARM = 1;
- HOT = 2;
- COLD = 3;
- }
- // The transition type.
- optional TransitionType type = 3;
-
- // The activity name.
- optional string activity_name = 4;
-}
-
-message AppStartFullyDrawn {
- // The uid if available. -1 means not available.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The app package name.
- optional string pkg_name = 2;
-
- enum TransitionType {
- UNKNOWN = 0;
- WITH_BUNDLE = 1;
- WITHOUT_BUNDLE = 2;
- }
- // The transition type.
- optional TransitionType type = 3;
-
- // The activity name.
- optional string activity_name = 4;
-
- optional bool transition_process_running = 5;
-
- // App startup time (until call to Activity#reportFullyDrawn()).
- optional int64 app_startup_time_millis = 6;
-}
-
-/**
- * Logs a picture-in-picture action
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java
- * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
- */
-message PictureInPictureStateChanged {
- // -1 if it is not available
- optional int32 uid = 1 [(is_uid) = true];
-
- optional string short_name = 2;
-
- enum State {
- ENTERED = 1;
- EXPANDED_TO_FULL_SCREEN = 2;
- MINIMIZED = 3;
- DISMISSED = 4;
- }
- optional State state = 3;
-}
-
-/**
- * Logs overlay action
- * Logged from:
- * services/core/java/com/android/server/wm/Session.java
- */
-message OverlayStateChanged {
- optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true];
-
- optional string package_name = 2 [(state_field_option).primary_field = true];
-
- optional bool using_alert_window = 3;
-
- enum State {
- ENTERED = 1;
- EXITED = 2;
- }
- optional State state = 4
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
-}
-
-/**
- * Logs foreground service starts and stops.
- * Note that this is not when a service starts or stops, but when it is
- * considered foreground.
- * Logged from
- * frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
- */
-message ForegroundServiceStateChanged {
- optional int32 uid = 1 [(is_uid) = true];
- // package_name + "/" + class_name
- optional string short_name = 2;
-
- enum State {
- ENTER = 1;
- EXIT = 2;
- }
- optional State state = 3;
-
- // Whether the fgs is allowed while-in-use permissions, i.e. is considered 'in-use' to the user.
- // (If the fgs was started while the app wasn't TOP it usually will be denied these permissions)
- optional bool allow_while_in_use_permission = 4;
-}
-
-/**
- * Logs the number of times a uid accesses a sensitive AppOp during a foreground service session.
- * A foreground service session is any continuous period during which the uid holds at least one
- * foreground service; the atom will be pushed when the uid no longer holds any foreground services.
- * Accesses initiated while the uid is in the TOP state are ignored.
- * Sessions with no attempted accesses are not logged.
- * Logged from
- * frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
- */
-message ForegroundServiceAppOpSessionEnded {
- optional int32 uid = 1 [(is_uid) = true];
-
- // The operation's name.
- // Only following four ops are logged
- // COARSE_LOCATION = 0
- // FINE_LOCATION = 1
- // CAMERA = 26
- // RECORD_AUDIO = 27
- optional android.app.AppOpEnum app_op_name = 2 [default = APP_OP_NONE];
-
- // The uid's permission mode for accessing the AppOp during this fgs session.
- enum Mode {
- MODE_UNKNOWN = 0;
- MODE_ALLOWED = 1; // Always allowed
- MODE_IGNORED = 2; // Denied
- MODE_FOREGROUND = 3; // Allow-while-in-use (or allowed-one-time)
- }
- optional Mode app_op_mode = 3;
-
- // Number of times this AppOp was requested and allowed.
- optional int32 count_ops_accepted = 4;
- // Number of times this AppOp was requested but denied.
- optional int32 count_ops_rejected = 5;
-}
-
-/**
- * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky
- * behavior in its own uid. However, the metrics of these isolated uid's almost always should be
- * attributed back to the parent (host) uid. One example is Chrome.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message IsolatedUidChanged {
- // The host UID. Generally, we should attribute metrics from the isolated uid to the host uid.
- // NOTE: DO NOT annotate uid field in this atom. This atom is specially handled in statsd.
- // This field is ignored when event == REMOVED.
- optional int32 parent_uid = 1;
-
- optional int32 isolated_uid = 2;
-
- // We expect an isolated uid to be removed before if it's used for another parent uid.
- enum Event {
- REMOVED = 0;
- CREATED = 1;
- }
- optional Event event = 3;
-}
-
-/*
- * Logs the reception of an incoming network packet causing the main system to wake up for
- * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd
- * and processed by WakeupController.cpp.
- */
-message PacketWakeupOccurred {
- // The uid owning the socket into which the packet was delivered, or -1 if the packet was
- // delivered nowhere.
- optional int32 uid = 1 [(is_uid) = true];
- // The interface name on which the packet was received.
- optional string iface = 2;
- // The ethertype value of the packet.
- optional int32 ethertype = 3;
- // String representation of the destination MAC address of the packet.
- optional string destination_hardware_address = 4;
- // String representation of the source address of the packet if this was an IP packet.
- optional string source_ip = 5;
- // String representation of the destination address of the packet if this was an IP packet.
- optional string destination_ip = 6;
- // The value of the protocol field if this was an IPv4 packet or the value of the Next Header
- // field if this was an IPv6 packet. The range of possible values is the same for both IP
- // families.
- optional int32 ip_next_header = 7;
- // The source port if this was a TCP or UDP packet.
- optional int32 source_port = 8;
- // The destination port if this was a TCP or UDP packet.
- optional int32 destination_port = 9;
-}
-
-/*
- * Logs the memory stats for an app on startup.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message AppStartMemoryStateCaptured {
- // The uid if available. -1 means not available.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The process name.
- optional string process_name = 2;
-
- // The activity name.
- optional string activity_name = 3;
-
- // # of page-faults
- optional int64 page_fault = 4;
-
- // # of major page-faults
- optional int64 page_major_fault = 5;
-
- // RSS
- optional int64 rss_in_bytes = 6;
-
- // CACHE
- optional int64 cache_in_bytes = 7;
-
- // SWAP
- optional int64 swap_in_bytes = 8;
-}
-
-/*
- * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries
- * for LMK event.
- * Logged from:
- * system/core/lmkd/lmkd.c
- */
-message LmkStateChanged {
- enum State {
- UNKNOWN = 0;
- START = 1;
- STOP = 2;
- }
- optional State state = 1;
-}
-
-/*
- * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure.
- * Logged from:
- * system/core/lmkd/lmkd.c
- */
-message LmkKillOccurred {
- enum Reason {
- UNKNOWN = 0;
- PRESSURE_AFTER_KILL = 1;
- NOT_RESPONDING = 2;
- LOW_SWAP_AND_THRASHING = 3;
- LOW_MEM_AND_SWAP = 4;
- LOW_MEM_AND_THRASHING = 5;
- DIRECT_RECL_AND_THRASHING = 6;
- LOW_MEM_AND_SWAP_UTIL = 7;
- }
-
- // The uid if available. -1 means not available.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The process name.
- optional string process_name = 2;
-
- // oom adj score.
- optional int32 oom_adj_score = 3;
-
- // # of page-faults
- optional int64 page_fault = 4;
-
- // # of major page-faults
- optional int64 page_major_fault = 5;
-
- // RSS
- optional int64 rss_in_bytes = 6;
-
- // CACHE
- optional int64 cache_in_bytes = 7;
-
- // SWAP
- optional int64 swap_in_bytes = 8;
-
- // The elapsed real time of start of the process.
- optional int64 process_start_time_nanos = 9;
-
- // Min oom adj score considered by lmkd.
- optional int32 min_oom_score = 10;
-
- // Free physical memory on device at LMK time.
- optional int32 free_mem_kb = 11;
-
- // Free swap on device at LMK time.
- optional int32 free_swap_kb = 12;
-
- // What triggered the LMK event.
- optional Reason reason = 13;
-}
-
-/*
- * Logs when the ActivityManagerService detects that an app died.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message AppDied {
- // timestamp(elapsedRealtime) of record creation
- optional uint64 timestamp_millis = 1 [(state_field_option).exclusive_state = true];
-}
-
-/**
- * An atom for generic metrics logging. Available from Android Q.
- */
-message GenericAtom {
- // The uid of the application that sent this custom atom.
- optional int32 uid = 1 [(is_uid) = true];
-
- // An event_id indicates the type of event.
- optional android.stats.EventType event_id = 2;
-}
-
-/**
- * Atom for simple logging of user interaction and impression events, such as "the user touched
- * this button" or "this dialog was displayed".
- * Keep the UI event stream clean: don't use for system or background events.
- * Log using the UiEventLogger wrapper - don't write with the StatsLog API directly.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/
- * frameworks/base/packages/SystemUI/src/com/android/systemui/
- */
-message UiEventReported {
- // The event_id.
- optional int32 event_id = 1;
- // The event's source or target uid and package, if applicable.
- // For example, the package posting a notification, or the destination package of a share.
- optional int32 uid = 2 [(is_uid) = true];
- optional string package_name = 3;
- // An identifier used to disambiguate which logs refer to a particular instance of some
- // UI element. Useful when there might be multiple instances simultaneously active.
- optional int32 instance_id = 4;
-}
-
-/**
- * Reports a notification was created or updated.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/notification/
- */
-message NotificationReported {
- // The event_id (as for UiEventReported).
- optional int32 event_id = 1;
- // The notifying app's uid and package.
- optional int32 uid = 2 [(is_uid) = true];
- optional string package_name = 3;
- // A small system-assigned identifier for the notification.
- // Locally probably-unique, but expect collisions across users and/or days.
- optional int32 instance_id = 4;
- optional int32 notification_id_hash = 5; // Small hash of the app-assigned notif ID + tag
- optional int32 channel_id_hash = 6; // Small hash of app-assigned channel ID
-
- // Grouping information
- optional int32 group_id_hash = 7; // Small hash of the group ID of the notification
- optional int32 group_instance_id = 8; // Instance_id of the group-summary notification
- optional bool is_group_summary = 9; // Tags the group-summary notification
-
- // Attributes
- optional string category = 10; // App-assigned notification category (API-defined strings)
- optional int32 style = 11; // App-assigned notification style
- optional int32 num_people = 12; // Number of Person records attached to the notification
-
- // Ordering, importance and interruptiveness
-
- optional int32 position = 13; // Position in NotificationManager's list
-
- optional android.stats.sysui.NotificationImportance importance = 14;
- optional int32 alerting = 15; // Bitfield, 1=buzz 2=beep 4=blink
-
- enum NotificationImportanceExplanation {
- IMPORTANCE_EXPLANATION_UNKNOWN = 0;
- IMPORTANCE_EXPLANATION_APP = 1; // App-specified channel importance.
- IMPORTANCE_EXPLANATION_USER = 2; // User-specified channel importance.
- IMPORTANCE_EXPLANATION_ASST = 3; // Notification Assistant override.
- IMPORTANCE_EXPLANATION_SYSTEM = 4; // System override.
- // Like _APP, but based on pre-channels priority signal.
- IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5;
- }
-
- optional NotificationImportanceExplanation importance_source = 16;
- optional android.stats.sysui.NotificationImportance importance_initial = 17;
- optional NotificationImportanceExplanation importance_initial_source = 18;
- optional android.stats.sysui.NotificationImportance importance_asst = 19;
- optional int32 assistant_hash = 20;
- optional float assistant_ranking_score = 21;
-}
-
-message Notification {
- // The notifying app's uid and package.
- optional int32 uid = 1 [(is_uid) = true];
- optional string package_name = 2;
- // A small system-assigned identifier for the notification.
- optional int32 instance_id = 3;
-
- // Grouping information.
- optional int32 group_instance_id = 4;
- optional bool is_group_summary = 5;
-
- // The section of the shade that the notification is in.
- // See NotificationSectionsManager.PriorityBucket.
- enum NotificationSection {
- SECTION_UNKNOWN = 0;
- SECTION_HEADS_UP = 1;
- SECTION_MEDIA_CONTROLS = 2;
- SECTION_PEOPLE = 3;
- SECTION_ALERTING = 4;
- SECTION_SILENT = 5;
- }
- optional NotificationSection section = 6;
-}
-
-message NotificationList {
- repeated Notification notifications = 1; // An ordered sequence of notifications.
-}
-
-/**
- * Reports a notification panel was displayed, e.g. from the lockscreen or status bar.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
- */
-message NotificationPanelReported {
- // The event_id (as for UiEventReported).
- optional int32 event_id = 1;
- optional int32 num_notifications = 2;
- // The notifications in the panel, in the order that they appear there.
- optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES];
-}
-
-/**
- * Reports a notification channel, or channel group, was created, updated, or deleted.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/notification/
- */
-message NotificationChannelModified {
- // The event_id (as for UiEventReported).
- optional int32 event_id = 1;
- // The notifying app's uid and package.
- optional int32 uid = 2 [(is_uid) = true];
- optional string package_name = 3;
- // Hash of app-assigned notification channel ID or channel-group ID
- optional int32 channel_id_hash = 4;
- // Previous importance setting, if applicable
- optional android.stats.sysui.NotificationImportance old_importance = 5;
- // New importance setting
- optional android.stats.sysui.NotificationImportance importance = 6;
-}
-
-
-/**
- * Logs when a biometric acquire event occurs.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/biometrics
- */
-message BiometricAcquired {
- // Biometric modality that was acquired.
- optional android.hardware.biometrics.ModalityEnum modality = 1;
- // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java.
- optional int32 user = 2;
- // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage.
- optional bool is_crypto = 3;
- // Action that the device is performing. Acquired messages are only expected for enroll and
- // authenticate. Other actions may indicate an error.
- optional android.hardware.biometrics.ActionEnum action = 4;
- // The client that this acquisition was received for.
- optional android.hardware.biometrics.ClientEnum client = 5;
- // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager.
- optional int32 acquire_info = 6;
- // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR.
- optional int32 acquire_info_vendor = 7;
- // Dictates if this message should trigger additional debugging.
- optional bool debug = 8;
-}
-
-/**
- * Logs when a biometric authentication event occurs.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/biometrics
- */
-message BiometricAuthenticated {
- // Biometric modality that was used.
- optional android.hardware.biometrics.ModalityEnum modality = 1;
- // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
- optional int32 user = 2;
- // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password
- // storage.
- optional bool is_crypto = 3;
- // The client that this acquisition was received for.
- optional android.hardware.biometrics.ClientEnum client = 4;
- // If authentication requires user confirmation. See BiometricPrompt's
- // setRequireConfirmation(bool) method.
- optional bool require_confirmation = 5;
-
- enum State {
- UNKNOWN = 0;
- REJECTED = 1;
- PENDING_CONFIRMATION = 2;
- CONFIRMED = 3;
- }
-
- // State of the current auth attempt.
- optional State state = 6;
- // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is
- // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to
- // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to
- // CONFIRMED.
- optional int64 latency_millis = 7;
- // Dictates if this message should trigger additional debugging.
- optional bool debug = 8;
-}
-
-/**
- * Logs when a biometric error occurs.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/biometrics
- */
-message BiometricErrorOccurred {
- // Biometric modality that was used.
- optional android.hardware.biometrics.ModalityEnum modality = 1;
- // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
- optional int32 user = 2;
- // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage.
- optional bool is_crypto = 3;
- // Action that the device is performing.
- optional android.hardware.biometrics.ActionEnum action = 4;
- // The client that this acquisition was received for.
- optional android.hardware.biometrics.ClientEnum client = 5;
- // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors
- // are unique to modality.
- optional int32 error_info = 6;
- // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined
- // by the vendor and not specified by the HIDL interface.
- optional int32 error_info_vendor = 7;
- // Dictates if this message should trigger additional debugging.
- optional bool debug = 8;
- // Time spent during the authentication attempt.
- optional int64 latency_millis = 9;
-}
-
-/**
- * Logs when a system health issue is detected.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/biometrics
- */
-message BiometricSystemHealthIssueDetected {
- // Biometric modality.
- optional android.hardware.biometrics.ModalityEnum modality = 1;
- // Type of issue detected.
- optional android.hardware.biometrics.IssueEnum issue = 2;
- // Dictates if this message should trigger additional debugging.
- optional bool debug = 3;
-}
-
-/**
- * Logs when a biometric enrollment occurs.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/biometrics
- */
-message BiometricEnrolled {
- // Biometric modality that was used.
- optional android.hardware.biometrics.ModalityEnum modality = 1;
- // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
- optional int32 user = 2;
- // The amount of time the enrollment took in milliseconds.
- optional int64 latency_millis = 3;
- // Whether or not the enrollment was successful.
- optional bool success = 4;
-}
-
-/*
- * Logs when a flag flip update occurrs. Used for mainline modules that update via flag flips.
- */
-message FlagFlipUpdateOccurred {
- // If the event is from a flag config package, specify the package name.
- optional string flag_flip_package_name = 1;
-
- // The order id of the package
- optional int64 order_id = 2;
-}
-
-/**
- * Potential experiment ids that goes with a train install.
- * Should be kept in sync with experiment_ids.proto.
- */
-message TrainExperimentIds {
- repeated int64 experiment_id = 1;
-}
-
-/*
- * Logs when a binary push state changes.
- * Logged by the installer via public api.
- */
-message BinaryPushStateChanged {
- // Name of the train.
- optional string train_name = 1;
- // Version code for a "train" of packages that need to be installed atomically
- optional int64 train_version_code = 2;
- // After installation of this package, device requires a restart.
- optional bool requires_staging = 3;
- // Rollback should be enabled for this install.
- optional bool rollback_enabled = 4;
- // Requires low latency monitoring if possible.
- optional bool requires_low_latency_monitor = 5;
-
- enum State {
- UNKNOWN = 0;
- INSTALL_REQUESTED = 1;
- INSTALL_STARTED = 2;
- INSTALL_STAGED_NOT_READY = 3;
- INSTALL_STAGED_READY = 4;
- INSTALL_SUCCESS = 5;
- // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH,
- // and INSTALL_FAILURE_COMMIT.
- INSTALL_FAILURE = 6 [deprecated = true];
- // This enum is for installs that are manually cancelled via the Manual Update UI.
- INSTALL_CANCELLED = 7;
- INSTALLER_ROLLBACK_REQUESTED = 8;
- INSTALLER_ROLLBACK_INITIATED = 9;
- INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
- INSTALLER_ROLLBACK_STAGED = 11;
- INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
- INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
- INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
- INSTALLER_ROLLBACK_SUCCESS = 15;
- INSTALLER_ROLLBACK_FAILURE = 16;
- INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17;
- INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18;
- INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19;
- INSTALL_STAGED_CANCEL_REQUESTED = 20;
- INSTALL_STAGED_CANCEL_SUCCESS = 21;
- INSTALL_STAGED_CANCEL_FAILURE = 22;
- INSTALL_FAILURE_DOWNLOAD = 23;
- INSTALL_FAILURE_STATE_MISMATCH = 24;
- INSTALL_FAILURE_COMMIT = 25;
- REBOOT_TRIGGERED = 26;
- }
- optional State state = 6;
- // Possible experiment ids for monitoring this push.
- optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES];
- // user id
- optional int32 user_id = 8;
- optional int32 reason = 9;
- // Whether or not this is a rollback event
- optional bool is_rollback = 10;
-}
-
-/* Test atom, is not logged anywhere */
-message TestAtomReported {
- repeated AttributionNode attribution_node = 1;
- optional int32 int_field = 2;
- optional int64 long_field = 3;
- optional float float_field = 4;
- optional string string_field = 5;
- optional bool boolean_field = 6;
- enum State {
- UNKNOWN = 0;
- OFF = 1;
- ON = 2;
- }
- optional State state = 7;
- optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/** Represents USB port overheat event. */
-message UsbPortOverheatEvent {
- /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */
- optional int32 plug_temperature_deci_c = 1;
-
- /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */
- optional int32 max_temperature_deci_c = 2;
-
- /* Time between USB plug event and overheat threshold trip, in seconds. */
- optional int32 time_to_overheat_secs = 3;
-
- /* Time between overheat threshold trip and hysteresis, in seconds. */
- optional int32 time_to_hysteresis_secs = 4;
-
- /* Time between hysteresis and active mitigation ending, in seconds. */
- optional int32 time_to_inactive_secs = 5;
-};
-
-/**
- * Logs total effective full charge and discharge cycles on a battery.
- * Here are some examples of one effective cycle:
- * 1) the battery charges from 0% to 100% and drains back to 0%,
- * 2) charging from 50% to 100% and draining back to 50% twice.
- * Pulled from:
- * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
- */
-message BatteryCycleCount {
- /* Number of total charge and discharge cycles on the system battery. */
- optional int32 cycle_count = 1;
-}
-
-/**
- * Logs that external storage is mounted and information about it, the storage type (sd card/usb/
- * others), its type (public or private) and the size in bytes.
- * Pulled from:
- * StatsCompanionService
- */
-
-message ExternalStorageInfo {
-
- enum VolumeType {
- UNKNOWN = 0;
- PUBLIC = 1;
- PRIVATE = 2;
- OTHER = 3;
- }
-
- // The type of external storage.
- optional android.stats.storage.ExternalStorageType storage_type = 1;
- // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal.
- optional VolumeType volume_type = 2;
- // Total size of the sd card in bytes.
- optional int64 size_bytes = 3;
-}
-
-/*
- * Logs when a connection becomes available and lost.
- * Logged in StatsCompanionService.java
- */
-message ConnectivityStateChanged {
- // Id of the network.
- optional int32 net_id = 1;
-
- enum State {
- UNKNOWN = 0;
- CONNECTED = 1;
- DISCONNECTED = 2;
- }
- // Connected state of a network.
- optional State state = 2;
-}
-
-/**
- * Logs when a service starts and stops.
- * Logged from:
- * services/core/java/com/android/server/am/ActiveServices.java
- */
-message ServiceStateChanged {
-
- optional int32 uid = 1 [(is_uid) = true];
-
- optional string package_name = 2;
-
- optional string service_name = 3;
-
- enum State {
- START = 1;
- STOP = 2;
- }
-
- optional State state = 4;
-}
-
-/**
- * Logs when a service is launched.
- * Logged from:
- * services/core/java/com/android/server/am/ActiveServices.java
- */
-message ServiceLaunchReported {
-
- optional int32 uid = 1 [(is_uid) = true];
-
- optional string package_name = 2;
-
- optional string service_name = 3;
-}
-
-/**
- * Logs when a hidden API is used.
- *
- * Logged from:
- * libcore/libart/src/main/java/dalvik/system/VMRuntime.java
- */
-message HiddenApiUsed {
- // The uid of the app making the hidden access.
- optional int32 uid = 1 [(is_uid) = true];
-
- // Signature of the method or field accessed.
- optional string signature = 2;
-
- enum AccessMethod {
- NONE = 0;
- REFLECTION = 1;
- JNI = 2;
- LINKING = 3;
- }
-
- // Type of access.
- optional AccessMethod access_method = 3;
-
- // Whether the access was prevented or not.
- optional bool access_denied = 4;
-}
-
-/**
- * Logs user interaction with the Privacy Indicators added in Q. In particular:
- * - When user sees privacy chip
- * - When user clicks privacy chip
- * - How does the user exit the Privacy Dialog
- * Logged from:
- * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
- */
-message PrivacyIndicatorsInteracted {
-
- enum Type {
- UNKNOWN = 0;
- CHIP_VIEWED = 1;
- CHIP_CLICKED = 2;
- DIALOG_PRIVACY_SETTINGS = 3;
- DIALOG_DISMISS = 4;
- DIALOG_LINE_ITEM = 5;
- }
-
- optional Type type = 1 [(state_field_option).exclusive_state = true];
-
- // Used if the type is LINE_ITEM
- optional string package_name = 2;
-}
-
-/**
- * Logs information about a package that is moved from the internal to external storage and vice
- * versa.
- * It logs the package name, the type of the external storage where the package is installed
- * (if moved to external storage, or UNKNOWN if moved to internal storage),
- * and the move type: if it's from internal to external or the other way around.
- *
- * Logged from:
- frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
- */
-message AppMovedStorageReported {
- enum MoveType {
- UNKNOWN = 0;
- TO_EXTERNAL = 1;
- TO_INTERNAL = 2;
- }
- // The type of the external storage.
- optional android.stats.storage.ExternalStorageType external_storage_type = 1;
- // The type of move.
- optional MoveType move_type = 2;
- // The name of the package that was moved.
- optional string package_name = 3;
-}
-
-/**
- * Logs when system server watchdog occurs.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/Watchdog.java
- */
-message SystemServerWatchdogOccurred {
- optional string subject = 1;
-}
-
-/**
- * Logs when new file added to tombstones.
- * Logged from:
- * frameworks/base/core/java/com/android/server/BootReceiver.java
- */
-message TombStoneOccurred {
-}
-
-/*
- * Information about a role request
- *
- * Logged from:
- * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java
- */
-message RoleRequestResultReported {
- // UID of application requesting the role
- optional int32 requesting_uid = 1;
-
- // Package name of application requesting the role
- optional string requesting_package_name = 2;
-
- // The role to be granted
- optional string role_name = 3;
-
- // The count of applications qualifying for the role
- optional int32 qualifying_count = 4;
-
- // UID of application current granted the role
- optional int32 current_uid = 5;
-
- // Package name of application current granted the role
- optional string current_package_name = 6;
-
- // UID of another application that user chose to grant the role to, instead of the requesting
- // application
- optional int32 granted_another_uid = 7;
-
- // Package name of another application that user chose to grant the role to, instead of the
- // requesting application
- optional string granted_another_package_name = 8;
-
- enum Result {
- UNDEFINED = 0;
- // role request was ignored
- IGNORED = 1;
- // role request was ignored because it's already granted
- IGNORED_ALREADY_GRANTED = 2;
- // role request was ignored because the application isn't qualified
- IGNORED_NOT_QUALIFIED = 3;
- // role request was ignored because user said it should be always denied
- IGNORED_USER_ALWAYS_DENIED = 4;
- // role was granted by user action
- USER_GRANTED = 5;
- // role was denied by user action
- USER_DENIED = 6;
- // role was denied by user granting another application the role
- USER_DENIED_GRANTED_ANOTHER = 7;
- // role was denied and set to be always denied by the user
- USER_DENIED_WITH_ALWAYS = 8;
- }
- // The result of the role request
- optional Result result = 9;
-}
-
-/**
- * Logs when a Vehicle Maps Service client's connection state has changed
- *
- * Logged from:
- * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java
- */
-message VmsClientConnectionStateChanged {
- // The UID of the VMS client app
- optional int32 uid = 1 [(is_uid) = true];
-
- enum State {
- UNKNOWN = 0;
- // Attempting to connect to the client
- CONNECTING = 1;
- // Client connection established
- CONNECTED = 2;
- // Client connection closed unexpectedly
- DISCONNECTED = 3;
- // Client connection closed by VMS
- TERMINATED = 4;
- // Error establishing the client connection
- CONNECTION_ERROR = 5;
- }
-
- optional State state = 2;
-}
-
-message MimeTypes {
- repeated string mime_types = 1;
-}
-
-/**
- * Logs statistics regarding accesses to external storage.
- * All stats are normalized for one day period.
- *
- * Logged from:
- * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
- */
-message GeneralExternalStorageAccessStats {
- optional int32 uid = 1 [(is_uid) = true];
- // Total number of accesses like creation, open, delete and rename/update.
- // Includes file path and ContentResolver accesses
- optional uint32 total_accesses = 2;
- // Number of file path accesses, as opposed to file path and ContentResolver.
- optional uint32 file_path_accesses = 3;
- // Number of accesses on secondary volumes like SD cards.
- // Includes file path and ContentResolver accesses
- optional uint32 secondary_storage_accesses = 4;
- // Comma-separated list of mime types that were accessed.
- optional MimeTypes mime_types_accessed = 5;
-}
-
-/**
- * Logs when MediaProvider has successfully finished scanning a storage volume.
- *
- * Logged from:
- * packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java
- */
-message MediaProviderScanOccurred {
- enum Reason {
- // Scan triggered due to unknown reason
- UNKNOWN = 0;
- // Scan triggered due to storage volume being mounted
- MOUNTED = 1;
- // Scan triggered due to explicit user action or app request
- DEMAND = 2;
- // Scan triggered due to idle maintenance
- IDLE = 3;
- }
-
- // Volume type that this event pertains to
- optional android.stats.mediaprovider.VolumeType volume_type = 1;
- // Reason why this scan was triggered
- optional Reason reason = 2;
- // Total number of files scanned
- optional int64 item_count = 3;
- // Duration of scan, normalized per file
- optional float normalized_duration_millis = 4;
- // Number of database inserts, normalized per file
- optional float normalized_insert_count = 5;
- // Number of database updates, normalized per file
- optional float normalized_update_count = 6;
- // Number of database deletes, normalized per file
- optional float normalized_delete_count = 7;
-}
-
-/**
- * Logs when an app has asked MediaProvider to delete media belonging to the user.
- *
- * Logged from:
- * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
- */
-message MediaContentDeleted {
- // Volume type that this event pertains to
- optional android.stats.mediaprovider.VolumeType volume_type = 1;
- // UID of app that requested deletion
- optional int32 uid = 2 [(is_uid) = true];
- // Number of items that were deleted
- optional int32 item_count = 3;
-}
-
-/**
- * Logs when an app has asked MediaProvider to grant them access to media belonging to the user.
- *
- * Logged from:
- * packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java
- */
-message MediaProviderPermissionRequested {
- enum Result {
- UNKNOWN = 0;
- USER_GRANTED = 1;
- AUTO_GRANTED = 2;
- USER_DENIED = 3;
- USER_DENIED_WITH_PREJUDICE = 4;
- AUTO_DENIED = 5;
- }
-
- // Volume type that this event pertains to
- optional android.stats.mediaprovider.VolumeType volume_type = 1;
- // UID of app that requested permission
- optional int32 uid = 2 [(is_uid) = true];
- // Number of items that were requested
- optional int32 item_count = 3;
- // Result of this request
- optional Result result = 4;
-}
-
-/**
- * Logs when MediaProvider has finished upgrading or downgrading its database schema.
- *
- * Logged from:
- * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java
- */
-message MediaProviderSchemaChanged {
- // Volume type that this event pertains to
- optional android.stats.mediaprovider.VolumeType volume_type = 1;
- // Old database version code
- optional int32 version_from = 2;
- // New database version code
- optional int32 version_to = 3;
- // Total number of files in database
- optional int64 item_count = 4;
- // Duration of schema change, normalized per file
- optional float normalized_duration_millis = 5;
-}
-
-/**
- * Logs when MediaProvider has finished an idle maintenance job.
- *
- * Logged from:
- * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
- */
-message MediaProviderIdleMaintenanceFinished {
- // Volume type that this event pertains to
- optional android.stats.mediaprovider.VolumeType volume_type = 1;
-
- // Total number of files in database
- optional int64 item_count = 2;
- // Duration of idle maintenance, normalized per file
- optional float normalized_duration_millis = 3;
- // Number of thumbnails found to be stale, normalized per file
- optional float normalized_stale_thumbnails = 4;
- // Number of items found to be expired, normalized per file
- optional float normalized_expired_media = 5;
-}
-
-/**
- * Represents boot time event with duration in ms.
- *
- * Logged from: bootstat and various system server components. Check each enums for details.
- */
-message BootTimeEventDuration {
- enum DurationEvent {
- UNKNOWN = 0;
- // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat.
- ABSOLUTE_BOOT_TIME = 1;
- // Bootloader's 1st stage execution time.
- // Logged from bootstat.
- BOOTLOADER_FIRST_STAGE_EXEC = 2;
- // Bootloader's 1st stage loading time.
- // Logged from bootstat.
- BOOTLOADER_FIRST_STAGE_LOAD = 3;
- // Bootloader's kernel loading time.
- // Logged from bootstat.
- BOOTLOADER_KERNEL_LOAD = 4;
- // Bootloader's 2nd stage execution time.
- // Logged from bootstat.
- BOOTLOADER_SECOND_STAGE_EXEC = 5;
- // Bootloader's 2nd stage loading time.
- // Logged from bootstat.
- BOOTLOADER_SECOND_STAGE_LOAD = 6;
- // Duration for Bootloader to show unlocked device's warning UI. This should not happen
- // for locked device.
- // Logged from bootstat.
- BOOTLOADER_UI_WAIT = 7;
- // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above.
- // Logged from bootstat.
- BOOTLOADER_TOTAL = 8;
- // Shutdown duration inside init for the reboot before the current boot up.
- // Logged from f/b/services/.../BootReceiver.java.
- SHUTDOWN_DURATION = 9;
- // Total time for mounting of disk devices during bootup.
- // Logged from f/b/services/.../BootReceiver.java.
- MOUNT_DEFAULT_DURATION = 10;
- // Total time for early stage mounting of disk devices during bootup.
- // Logged from f/b/services/.../BootReceiver.java.
- MOUNT_EARLY_DURATION = 11;
- // Total time for late stage mounting of disk devices during bootup.
- // Logged from f/b/services/.../BootReceiver.java.
- MOUNT_LATE_DURATION = 12;
- // Average time to scan non-system app after OTA
- // Logged from f/b/services/.../PackageManagerService.java
- OTA_PACKAGE_MANAGER_INIT_TIME = 13;
- // Time to initialize Package manager after OTA
- // Logged from f/b/services/.../PackageManagerService.java
- OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14;
- // Time to scan all system app from Package manager after OTA
- // Logged from f/b/services/.../PackageManagerService.java
- OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15;
- // Init's total time for cold boot stage.
- // Logged from bootstat.
- COLDBOOT_WAIT = 16;
- // Init's total time for initializing selinux.
- // Logged from bootstat.
- SELINUX_INIT = 17;
- // Time since last factory reset.
- // Logged from bootstat.
- FACTORY_RESET_TIME_SINCE_RESET = 18;
- // Init's total time spent for completing the 1st stage.
- // Logged from bootstat.
- ANDROID_INIT_STAGE_1 = 19;
- }
-
- // Type of the event.
- optional DurationEvent event = 1;
- // Duration of the event in ms.
- optional int64 duration_millis = 2;
-}
-
-/**
- * Represents the start of specific boot time event during bootup in ms. This is usually a time
- * since boot-up.
- *
- * Logged from: bootstat and various system server components. Check each enums for details.
- */
-message BootTimeEventElapsedTime {
- enum ElapsedTimeEvent {
- UNKNOWN = 0;
- // Time when init starts 1st stage. Logged from bootstat.
- ANDROID_INIT_STAGE_1 = 1;
- // Time when sys.boot_completed prop is set.
- // Logged from bootstat.
- BOOT_COMPLETE = 2;
- // BOOT_COMPLETE for encrypted device.
- BOOT_COMPLETE_ENCRYPTION = 3;
- // BOOT_COMPLETE for device with no encryption.
- BOOT_COMPLETE_NO_ENCRYPTION = 4;
- // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time.
- BOOT_COMPLETE_POST_DECRYPT = 5;
- // BOOT_COMPLETE after factory reset.
- FACTORY_RESET_BOOT_COMPLETE = 6;
- // BOOT_COMPLETE_NO_ENCRYPTION after factory reset.
- FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7;
- // BOOT_COMPLETE_POST_DECRYPT after factory reset.
- FACTORY_RESET_BOOT_COMPLETE_POST_DECRYPT = 8;
- // BOOT_COMPLETE after OTA.
- OTA_BOOT_COMPLETE = 9;
- // BOOT_COMPLETE_NO_ENCRYPTION after OTA.
- OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10;
- // BOOT_COMPLETE_POST_DECRYPT after OTA.
- OTA_BOOT_COMPLETE_POST_DECRYPT = 11;
- // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast.
- // Logged from f/b/services/.../UserController.java
- FRAMEWORK_LOCKED_BOOT_COMPLETED = 12;
- // Time when the system starts sending BOOT_COMPLETED broadcast.
- // Logged from f/b/services/.../UserController.java
- FRAMEWORK_BOOT_COMPLETED = 13;
- // Time when the package manager starts init.
- // Logged from f/b/services/.../SystemServer.java
- PACKAGE_MANAGER_INIT_START = 14;
- // Time when package manager is ready
- // Logged from f/b/services/.../SystemServer.java
- PACKAGE_MANAGER_INIT_READY = 15;
- // Represents the time when user has entered unlock credential for system with user pin.
- // Logged from bootstat.
- POST_DECRYPT = 16;
- // Represents the start of zygote's init.
- // Logged from zygote itself.
- ZYGOTE_INIT_START = 17;
- // Represents the start of secondary zygote's init.
- // TODO: add logging to zygote
- SECONDARY_ZYGOTE_INIT_START = 18;
- // Represents the start of system server's init.
- // Logged from f/b/services/.../SystemServer.java
- SYSTEM_SERVER_INIT_START = 19;
- // Represents the completion of system server's init.
- // Logged from f/b/services/.../SystemServer.java
- SYSTEM_SERVER_READY = 20;
- // Represents the start of launcher during boot-up.
- // TODO: add logging
- LAUNCHER_START = 21;
- // Represents the completion of launcher's initial rendering. User can use other apps from
- // launcher from this point.
- // TODO: add logging
- LAUNCHER_SHOWN = 22;
- }
-
- // Type of the event.
- optional ElapsedTimeEvent event = 1;
- // Time since bootup for the event.
- // It should be acquired from SystemClock elapsedRealtime() call or equivalent.
- optional int64 time_millis = 2;
-}
-
-/**
- * Boot time events with UTC time.
- *
- * Logged from: bootstat and various system server components. Check each enums for details.
- */
-message BootTimeEventUtcTime {
- enum UtcTimeEvent {
- UNKNOWN = 0;
- // Time of the bootstat's marking of 1st boot after the last factory reset.
- // Logged from bootstat.
- FACTORY_RESET_RESET_TIME = 1;
- // The time when bootstat records FACTORY_RESET_* events. This is close to
- // BOOT_COMPLETE time for the current bootup.
- // Logged from bootstat.
- FACTORY_RESET_CURRENT_TIME = 2;
- // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose.
- // Logged from bootstat.
- FACTORY_RESET_RECORD_VALUE = 3;
- }
-
- // Type of the event.
- optional UtcTimeEvent event = 1;
- // UTC time for the event.
- optional int64 utc_time_secs = 2;
-}
-
-/**
- * Boot time events representing specific error code during bootup.
- * Meaning of error code can be different per each event type.
- *
- * Logged from: bootstat and various system server components. Check each enums for details.
- */
-message BootTimeEventErrorCode {
- enum ErrorCodeEvent {
- UNKNOWN = 0;
- // Linux error code for time() call to get the current UTC time.
- // Logged from bootstat.
- FACTORY_RESET_CURRENT_TIME_FAILURE = 1;
- // Represents UmountStat before the reboot for the current boot up. Error codes defined
- // as UMOUNT_STAT_* from init/reboot.cpp.
- // Logged from f/b/services/.../BootReceiver.java.
- SHUTDOWN_UMOUNT_STAT = 2;
- // Reprepsents fie system mounting error code of /data partition for the current boot.
- // Error codes defined as combination of FsStatFlags from system/core/fs_mgr/fs_mgr.cpp.
- // Logged from f/b/services/.../BootReceiver.java.
- FS_MGR_FS_STAT_DATA_PARTITION = 3;
- }
-
- // Type of the event.
- optional ErrorCodeEvent event = 1;
- // error code defined per each event type.
- // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of
- // FS_MGR_FS_STAT.
- optional int32 error_code = 2;
-}
-
-/**
- * Collects Virtual A/B statistics related to the use of dm-snapshot performed
- * after an OTA.
- *
- * Logged from:
- * - system/update_engine/cleanup_previous_update_action.cc
- */
-message SnapshotMergeReported {
- // Keep in sync with
- // system/core/fs_mgr/libsnapshot/android/snapshot/snapshot.proto
- enum UpdateState {
- // No update or merge is in progress.
- NONE = 0;
- // An update is applying; snapshots may already exist.
- INITIATED = 1;
- // An update is pending, but has not been successfully booted yet.
- UNVERIFIED = 2;
- // The kernel is merging in the background.
- MERGING = 3;
- // Post-merge cleanup steps could not be completed due to a transient
- // error, but the next reboot will finish any pending operations.
- MERGE_NEEDS_REBOOT = 4;
- // Merging is complete, and needs to be acknowledged.
- MERGE_COMPLETED = 5;
- // Merging failed due to an unrecoverable error.
- MERGE_FAILED = 6;
- // The update was implicitly cancelled, either by a rollback or a flash
- // operation via fastboot. This state can only be returned by WaitForMerge.
- CANCELLED = 7;
- };
-
- // Status of the update after the merge attempts.
- optional UpdateState final_state = 1;
-
- // Time to complete a merge operation in milliseconds.
- // A negative value corresponds to the case in which the merge operation
- // was interrupted and resumed (e.g. in case of a system reboot during the
- // merge).
- optional int64 duration_millis = 2;
-
- // Number of reboots that occurred after issuing and before completing the
- // merge of all the snapshot devices.
- optional int32 intermediate_reboots = 3;
-
- // The device has been upgraded to Virtual A/B.
- optional bool is_vab_retrofit = 4;
-
- // Space that has been temporarily allocated in the /data partition
- // containing the dm-snapshot's copy-on-write data generated during a
- // Virtual A/B update.
- optional int64 cow_file_size_bytes = 5;
-}
-
-/**
- * Event representing when BlobStoreManager.Session#commit() is called
- *
- * Logged from:
- * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
- */
-message BlobCommitted {
- // Uid of the Blob committer
- optional int32 uid = 1 [(is_uid) = true];
-
- // Id of the Blob committed
- optional int64 blob_id = 2;
-
- // Size of the Blob
- optional int64 size = 3;
-
- enum Result {
- UNKNOWN = 0;
- // Commit Succeeded
- SUCCESS = 1;
- // Commit Failed: Error occurred during commit
- ERROR_DURING_COMMIT = 2;
- // Commit Failed: Digest of the data did not match Blob digest
- DIGEST_MISMATCH = 3;
- // Commit Failed: Allowed count limit exceeded
- COUNT_LIMIT_EXCEEDED = 4;
- }
- optional Result result = 4;
-}
-
-/**
- * Event representing when BlobStoreManager#acquireLease() is called
- *
- * Logged from:
- * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
- */
-message BlobLeased{
- // Uid of the Blob leasee
- optional int32 uid = 1 [(is_uid) = true];
-
- // Id of the Blob leased or 0 if the Blob does not exist
- optional int64 blob_id = 2;
-
- // Size of the Blob or 0 if the Blob does not exist
- optional int64 size = 3;
-
- enum Result {
- UNKNOWN = 0;
- // Lease Succeeded
- SUCCESS = 1;
- // Lease Failed: Blob does not exist
- BLOB_DNE = 2;
- // Lease Failed: Leasee does not have access to the Blob
- ACCESS_NOT_ALLOWED = 3;
- // Lease Failed: Leasee requested an invalid expiry duration
- LEASE_EXPIRY_INVALID = 4;
- // Lease Failed: Leasee has exceeded the total data lease limit
- DATA_SIZE_LIMIT_EXCEEDED = 5;
- // Leasee Failed: Allowed count limit exceeded
- COUNT_LIMIT_EXCEEDED = 6;
- }
- optional Result result = 4;
-}
-
-/**
- * Event representing when BlobStoreManager#openBlob() is called
- *
- * Logged from:
- * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
- */
-message BlobOpened{
- // Uid of the Blob opener
- optional int32 uid = 1 [(is_uid) = true];
-
- // Id of the Blob opened or 0 if the Blob does not exist
- optional int64 blob_id = 2;
-
- // Size of the Blob or 0 if the Blob does not exist
- optional int64 size = 3;
-
- enum Result {
- UNKNOWN = 0;
- // Open Succeeded
- SUCCESS = 1;
- // Open Failed: Blob does not exist
- BLOB_DNE = 2;
- // Open Failed: Opener does not have access to the Blob
- ACCESS_NOT_ALLOWED = 3;
- }
- optional Result result = 4;
-}
-
-//////////////////////////////////////////////////////////////////////
-// Pulled atoms below this line //
-//////////////////////////////////////////////////////////////////////
-
-/**
- * Pulls bytes transferred via wifi (Sum of foreground and background usage).
- *
- * Pulled from:
- * StatsCompanionService (using BatteryStats to get which interfaces are wifi)
- */
-message WifiBytesTransfer {
- optional int32 uid = 1 [(is_uid) = true];
-
- optional int64 rx_bytes = 2;
-
- optional int64 rx_packets = 3;
-
- optional int64 tx_bytes = 4;
-
- optional int64 tx_packets = 5;
-}
-
-/**
- * Pulls bytes transferred via wifi (separated by foreground and background usage).
- *
- * Pulled from:
- * StatsCompanionService (using BatteryStats to get which interfaces are wifi)
- */
-message WifiBytesTransferByFgBg {
- optional int32 uid = 1 [(is_uid) = true];
-
- // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats.
- optional bool is_foreground = 2;
-
- optional int64 rx_bytes = 3;
-
- optional int64 rx_packets = 4;
-
- optional int64 tx_bytes = 5;
-
- optional int64 tx_packets = 6;
-}
-
-/**
- * Pulls bytes transferred via mobile networks (Sum of foreground and background usage).
- *
- * Pulled from:
- * StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
- */
-message MobileBytesTransfer {
- optional int32 uid = 1 [(is_uid) = true];
-
- optional int64 rx_bytes = 2;
-
- optional int64 rx_packets = 3;
-
- optional int64 tx_bytes = 4;
-
- optional int64 tx_packets = 5;
-}
-
-/**
- * Pulls bytes transferred via mobile networks (separated by foreground and background usage).
- *
- * Pulled from:
- * StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
- */
-message MobileBytesTransferByFgBg {
- optional int32 uid = 1 [(is_uid) = true];
-
- // 1 denotes foreground and 0 denotes background. This is called Set in
- // NetworkStats.
- optional bool is_foreground = 2;
-
- optional int64 rx_bytes = 3;
-
- optional int64 rx_packets = 4;
-
- optional int64 tx_bytes = 5;
-
- optional int64 tx_packets = 6;
-}
-
-/**
- * Used for pull network statistics via mobile|wifi networks, and sliced by interesting dimensions.
- * Note that the data is expected to be sliced into more dimensions in future. In other words,
- * the caller must not assume any row of data is one full report when filtering with a set of
- * matching conditions, because future data may represent with multiple rows what is currently
- * represented by one.
- * To avoid being broken by future slicing, callers must take care to aggregate rows even if they
- * query all the existing columns.
- *
- * Pulled from:
- * StatsPullAtomService (using NetworkStatsService to get NetworkStats)
- */
-message DataUsageBytesTransfer {
- // State of this record. Should be NetworkStats#SET_DEFAULT or NetworkStats#SET_FOREGROUND to
- // indicate the foreground state, or NetworkStats#SET_ALL to indicate the record is for all
- // states combined, not including debug states. See NetworkStats#SET_*.
- optional int32 state = 1;
-
- optional int64 rx_bytes = 2;
-
- optional int64 rx_packets = 3;
-
- optional int64 tx_bytes = 4;
-
- optional int64 tx_packets = 5;
-
- // Radio Access Technology (RAT) type of this record, should be one of
- // TelephonyManager#NETWORK_TYPE_* constants, or NetworkTemplate#NETWORK_TYPE_ALL to indicate
- // the record is for all rat types combined.
- optional int32 rat_type = 6;
-
- // Mcc/Mnc read from sim if the record is for a specific subscription, null indicates the
- // record is combined across subscriptions.
- optional string sim_mcc = 7;
- optional string sim_mnc = 8;
-
- // Allows mobile virtual network operators (MVNOs) to be identified with individual IDs.
- // See TelephonyManager#getSimCarrierId.
- optional int32 carrier_id = 9;
-
- // Enumeration of opportunistic states with an additional ALL state indicates the record is
- // combined regardless of the boolean value in its field.
- enum DataSubscriptionState {
- UNKNOWN = 0; // For server side backward compatibility.
- ALL = 1;
- OPPORTUNISTIC = 2;
- NOT_OPPORTUNISTIC = 3;
- }
- // Mark whether the subscription is an opportunistic data subscription, and ALL indicates the
- // record is combined across opportunistic data subscriptions.
- // See {@link SubscriptionManager#setOpportunistic}.
- optional DataSubscriptionState opportunistic_data_sub = 10;
-
- // Indicate whether NR is connected, server side could use this with RAT type to determine if
- // the record is for 5G NSA (Non Stand Alone) mode, where the primary cell is still LTE and
- // network allocates a secondary 5G cell so telephony reports RAT = LTE along with NR state as
- // connected.
- optional bool is_nr_connected = 11;
-}
-
-/**
- * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller.
- *
- * Pulled from:
- * StatsCompanionService
- */
-message BluetoothBytesTransfer {
- optional int32 uid = 1 [(is_uid) = true];
-
- optional int64 rx_bytes = 2;
-
- optional int64 tx_bytes = 3;
-}
-
-/**
- * Pulls the kernel wakelock durations. This atom is adapted from
- * android/internal/os/KernelWakelockStats.java
- *
- * Pulled from:
- * StatsCompanionService using KernelWakelockReader.
- */
-message KernelWakelock {
- optional string name = 1;
-
- optional int32 count = 2;
-
- optional int32 version = 3;
-
- optional int64 time_micros = 4;
-}
-
-/**
- * Pulls low power state information. If power.stats HAL is not available, this
- * includes platform and subsystem sleep state information,
- * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState
- * as defined in:
- * hardware/interfaces/power/1.0/types.hal
- * hardware/interfaces/power/1.1/types.hal
- * If power.stats HAL is available, this includes PowerEntityStateResidencyResult
- * as defined in:
- * hardware/interfaces/power/stats/1.0/types.hal
- */
-message SubsystemSleepState {
- // Subsystem name
- optional string subsystem_name = 1;
- // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty.
- // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name.
- // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the
- // powerEntityStateName from the corresponding PowerEntityStateInfo.
- optional string subname = 2;
- // The number of times it entered, or voted for entering the sleep state
- optional uint64 count = 3;
- // The length of time spent in, or spent voting for, the sleep state
- optional uint64 time_millis = 4;
-}
-
-/**
- * Pulls on-device power measurement information.
- * Data defined by hardware/interfaces/power/stats/1.0/types.hal.
- * Pulled from:
- * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp
- */
-message OnDevicePowerMeasurement {
- // Name of the subsystem (to which the rail belongs).
- optional string subsystem_name = 1;
-
- // Rail name. The rail lies within the subsystem.
- optional string rail_name = 2;
-
- // Time (in ms since boot) at which the rail energy value was measured.
- // This may differ slightly from the time that statsd logs this information.
- optional uint64 measurement_timestamp_millis = 3;
-
- // Accumulated energy used via the rail since device boot in uWs.
- optional uint64 energy_microwatt_secs = 4;
-}
-
-/**
- * Pulls Cpu time per frequency.
- * Pulls the time the cpu spend on the frequency index. Frequency index
- * starts from highest to lowest. The value should be monotonically
- * increasing since boot. However, if there is a cpu
- * hotplug event, the value would be reset as well.
- */
-message CpuTimePerFreq {
- optional uint32 cluster = 1;
- optional uint32 freq_index = 2;
- optional uint64 time_millis = 3;
-}
-
-/**
- * Pulls Cpu Time Per Uid.
- * Note that isolated process uid time should be attributed to host uids.
- */
-message CpuTimePerUid {
- optional int32 uid = 1 [(is_uid) = true];
- optional uint64 user_time_micros = 2;
- optional uint64 sys_time_micros = 3;
-}
-
-/**
- * Pulls Cpu Time Per Uid per frequency.
- * Note that isolated process uid time should be attributed to host uids.
- * For each uid, we order the time by descending frequencies.
- */
-message CpuTimePerUidFreq {
- optional int32 uid = 1 [(is_uid) = true];
- optional uint32 freq_index = 2;
- optional uint64 time_millis = 3;
-}
-
-/**
- * Pulls Wifi Controller Activity Energy Info
- */
-message WifiActivityInfo {
- // timestamp(wall clock) of record creation
- optional uint64 timestamp_millis = 1;
- // stack reported state
- // TODO: replace this with proto enum
- optional int32 stack_state = 2;
- // tx time in millis
- optional uint64 controller_tx_time_millis = 3;
- // rx time in millis
- optional uint64 controller_rx_time_millis = 4;
- // idle time in millis
- optional uint64 controller_idle_time_millis = 5;
- // product of current(mA), voltage(V) and time(ms)
- optional uint64 controller_energy_used = 6;
-}
-
-/**
- * Pulls Modem Activity Energy Info
- */
-message ModemActivityInfo {
- // timestamp(wall clock) of record creation
- optional uint64 timestamp_millis = 1;
- // sleep time in millis.
- optional uint64 sleep_time_millis = 2;
- // idle time in millis
- optional uint64 controller_idle_time_millis = 3;
- /**
- * Tx power index
- * index 0 = tx_power < 0dBm
- * index 1 = 0dBm < tx_power < 5dBm
- * index 2 = 5dBm < tx_power < 15dBm
- * index 3 = 15dBm < tx_power < 20dBm
- * index 4 = tx_power > 20dBm
- */
- // tx time in ms at power level 0
- optional uint64 controller_tx_time_pl0_millis = 4;
- // tx time in ms at power level 1
- optional uint64 controller_tx_time_pl1_millis = 5;
- // tx time in ms at power level 2
- optional uint64 controller_tx_time_pl2_millis = 6;
- // tx time in ms at power level 3
- optional uint64 controller_tx_time_pl3_millis = 7;
- // tx time in ms at power level 4
- optional uint64 controller_tx_time_pl4_millis = 8;
- // rx time in ms at power level 5
- optional uint64 controller_rx_time_millis = 9;
- // product of current(mA), voltage(V) and time(ms)
- optional uint64 energy_used = 10 [deprecated=true];
-}
-
-/**
- * Pulls Bluetooth Activity Energy Info
- * Note: BluetoothBytesTransfer is pulled at the same time from the controller.
- */
-message BluetoothActivityInfo {
- // timestamp(wall clock) of record creation
- optional uint64 timestamp_millis = 1;
- // bluetooth stack state
- optional int32 bluetooth_stack_state = 2;
- // tx time in millis
- optional uint64 controller_tx_time_millis = 3;
- // rx time in millis
- optional uint64 controller_rx_time_millis = 4;
- // idle time in millis
- optional uint64 controller_idle_time_millis = 5;
- // product of current(mA), voltage(V) and time(ms)
- optional uint64 energy_used = 6;
-}
-
-/*
- * Logs the memory stats for a process.
- *
- * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService).
- */
-message ProcessMemoryState {
- // The uid if available. -1 means not available.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The process name.
- // Usually package name, "system" for system server.
- // Provided by ActivityManagerService.
- optional string process_name = 2;
-
- // Current OOM score adjustment. Value read from ProcessRecord.
- optional int32 oom_adj_score = 3;
-
- // # of page-faults
- optional int64 page_fault = 4;
-
- // # of major page-faults
- optional int64 page_major_fault = 5;
-
- // RSS
- // Value is read from memory.stat, field total_rss if per-app memory
- // cgroups are enabled. Otherwise, value from /proc/pid/stat.
- optional int64 rss_in_bytes = 6;
-
- // CACHE
- // Value is read from memory.stat, field total_cache if per-app memory
- // cgroups are enabled. Otherwise, 0.
- optional int64 cache_in_bytes = 7;
-
- // SWAP
- // Value is read from memory.stat, field total_swap if per-app memory
- // cgroups are enabled. Otherwise, 0.
- optional int64 swap_in_bytes = 8;
-
- // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1.
- optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true];
-
- // Deprecated: use ProcessMemorySnapshot atom instead. Always -1.
- optional int64 start_time_nanos = 10 [deprecated = true];
-
- // Deprecated: use ProcessMemorySnapshot atom instead. Always -1.
- optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true];
-}
-
-/*
- * Logs the memory high-water mark for a process.
- *
- * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie)
- * and for selected native processes.
- *
- * Pulling this atom resets high-water mark counters for all processes.
- */
-message ProcessMemoryHighWaterMark {
- // The uid if available. -1 means not available.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The process name.
- // Usually package name or process cmdline.
- // Provided by ActivityManagerService or read from /proc/PID/cmdline.
- optional string process_name = 2;
-
- // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is
- // computed by converting kilobytes to bytes.
- optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true];
-
- // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in
- // /proc/PID/status.
- optional int32 rss_high_water_mark_in_kilobytes = 4;
-}
-
-/*
- * Logs the memory stats for a process.
- *
- * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService)
- * and for selected native processes.
- */
-message ProcessMemorySnapshot {
- // The uid if available. -1 means not available.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The process name.
- // Usually package name or process cmdline.
- // Provided by ActivityManagerService or read from /proc/PID/cmdline.
- optional string process_name = 2;
-
- // The pid of the process.
- // Allows to disambiguate instances of the process.
- optional int32 pid = 3;
-
- // The current OOM score adjustment value.
- // Read from ProcessRecord for managed processes.
- // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones.
- optional int32 oom_score_adj = 4;
-
- // The current RSS of the process.
- // VmRSS from /proc/pid/status.
- optional int32 rss_in_kilobytes = 5;
-
- // The current anon RSS of the process.
- // RssAnon from /proc/pid/status.
- optional int32 anon_rss_in_kilobytes = 6;
-
- // The current swap size of the process.
- // VmSwap from /proc/pid/status.
- optional int32 swap_in_kilobytes = 7;
-
- // The sum of rss_in_kilobytes and swap_in_kilobytes.
- optional int32 anon_rss_and_swap_in_kilobytes = 8;
-}
-
-/*
- * Elapsed real time from SystemClock.
- */
-message SystemElapsedRealtime {
- optional uint64 time_millis = 1;
-}
-
-/*
- * Up time from SystemClock.
- */
-message SystemUptime {
- // Milliseconds since the system was booted.
- // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting
- // for external input).
- // It is not affected by clock scaling, idle, or other power saving mechanisms.
- optional uint64 uptime_millis = 1;
-}
-
-/*
- * Reads from /proc/uid_concurrent_active_time which has the format:
- * active: X (X is # cores)
- * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores)
- * [uid1]: [time-0] [time-1] [time-2] ... ...
- * ...
- * Time-N means the CPU time a UID spent running concurrently with N other processes.
- * The file contains a monotonically increasing count of time for a single boot.
- */
-message CpuActiveTime {
- optional int32 uid = 1 [(is_uid) = true];
- optional uint64 time_millis = 2;
-}
-
-/**
- * Reads from /proc/uid_concurrent_policy_time which has the format:
- * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4)
- * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
- * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
- * ...
- * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes.
- * The file contains a monotonically increasing count of time for a single boot.
- */
-message CpuClusterTime {
- optional int32 uid = 1 [(is_uid) = true];
- optional int32 cluster_index = 2;
- optional uint64 time_millis = 3;
-}
-
-/*
- * Pulls free disk space, for data, system partition and temporary directory.
- */
-message DiskSpace {
- // available bytes in data partition
- optional uint64 data_available_bytes = 1;
- // available bytes in system partition
- optional uint64 system_available_bytes = 2;
- // available bytes in download cache or temp directories
- optional uint64 temp_available_bytes = 3;
-}
-
-/**
- * Pulls battery coulomb counter, which is the remaining battery charge in uAh.
- *
- * Pulled from StatsCompanionService.java
- */
-message RemainingBatteryCapacity {
- optional int32 charge_micro_ampere_hour = 1;
-}
-
-/**
- * Pulls battery capacity, which is the battery capacity when full in uAh.
- * Pulled from:
- * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
- */
-message FullBatteryCapacity {
- optional int32 capacity_micro_ampere_hour = 1;
-}
-
-/**
- * Pulls battery voltage.
- * Pulled from:
- * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
- */
-message BatteryVoltage {
- // The voltage of the battery, in millivolts.
- optional int32 voltage_millivolt = 1;
-}
-
-/**
- * Pulls battery level (percent full, from 0 to 100).
- *
- * Pulled from:
- * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
- */
-message BatteryLevel {
- // Battery level. Should be in [0, 100].
- optional int32 battery_level = 1;
-}
-
-/**
- * Pulls the temperature of various parts of the device.
- * The units are tenths of a degree Celsius. Eg: 30.3C is reported as 303.
- *
- * Pulled from StatsCompanionService.java
- */
-message Temperature {
- // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_.
- optional android.os.TemperatureTypeEnum sensor_location = 1;
-
- // The name of the temperature source. Eg. CPU0
- optional string sensor_name = 2;
-
- // Temperature in tenths of a degree C.
- // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
- optional int32 temperature_deci_celsius = 3;
-
- // Relative severity of the throttling, see enum definition.
- optional android.os.ThrottlingSeverityEnum severity = 4;
-}
-
-/**
- * Pulls the statistics of calls to Binder.
- *
- * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one
- * config on the device.
- *
- * Next tag: 15
- */
-message BinderCalls {
- // UID of the process responsible for the binder transaction. It will be set if the process
- // executing the binder transaction attribute the transaction to another uid using
- // Binder.setThreadWorkSource().
- //
- // If not set, the value will be -1.
- optional int32 uid = 1 [(is_uid) = true];
- // UID of the process executing the binder transaction.
- optional int32 direct_caller_uid = 14;
- // Fully qualified class name of the API call.
- //
- // This is a system server class name.
- //
- // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid
- // gets recycled and we have isolated uids, we might attribute the data incorrectly.
- // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less
- // commonly used APIs.
- optional string service_class_name = 2;
- // Method name of the API call. It can also be a transaction code if we cannot
- // resolve it to a name. See Binder#getTransactionName.
- //
- // This is a system server method name.
- optional string service_method_name = 3;
- // Total number of API calls.
- optional int64 call_count = 4;
- // True if the screen was interactive PowerManager#isInteractive at the end of the call.
- optional bool screen_interactive = 13;
- // Total number of API calls we have data recorded for. If we collected data for all the calls,
- // call_count will be equal to recorded_call_count.
- //
- // If recorded_call_count is different than call_count, it means data collection has been
- // sampled. All the fields below will be sampled in this case.
- optional int64 recorded_call_count = 12;
- // Number of exceptions thrown by the API.
- optional int64 recorded_exception_count = 5;
- // Total latency of all API calls.
- // Average can be computed using total_latency_micros / recorded_call_count.
- optional int64 recorded_total_latency_micros = 6;
- // Maximum latency of one API call.
- optional int64 recorded_max_latency_micros = 7;
- // Total CPU usage of all API calls.
- // Average can be computed using total_cpu_micros / recorded_call_count.
- // Total can be computed using total_cpu_micros / recorded_call_count * call_count.
- optional int64 recorded_total_cpu_micros = 8;
- // Maximum CPU usage of one API call.
- optional int64 recorded_max_cpu_micros = 9;
- // Maximum parcel reply size of one API call.
- optional int64 recorded_max_reply_size_bytes = 10;
- // Maximum parcel request size of one API call.
- optional int64 recorded_max_request_size_bytes = 11;
-}
-
-/**
- * Pulls the statistics of exceptions during calls to Binder.
- *
- * Binder stats are cumulative from boot unless somebody reset the data using
- * > adb shell dumpsys binder_calls_stats --reset
- */
-message BinderCallsExceptions {
- // Exception class name, e.g. java.lang.IllegalArgumentException.
- //
- // This is an exception class name thrown by the system server.
- optional string exception_class_name = 1;
- // Total number of exceptions.
- optional int64 exception_count = 2;
-}
-
-/**
- * Pulls the statistics of message dispatching on HandlerThreads.
- *
- * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one
- * config on the device.
- *
- * Next tag: 11
- */
-message LooperStats {
- // The uid that made a call to the System Server and caused the message to be enqueued.
- optional int32 uid = 1 [(is_uid) = true];
-
- // Fully qualified class name of the handler target class.
- //
- // This field does not contain PII. This is a system server class name.
- optional string handler_class_name = 2;
-
- // The name of the thread that runs the Looper.
- //
- // This field does not contain PII. This is a system server thread name.
- optional string looper_thread_name = 3;
-
- // The name of the dispatched message.
- //
- // This field does not contain PII. This is a system server constant or class
- // name.
- optional string message_name = 4;
-
- // Total number of successfully dispatched messages.
- optional int64 message_count = 5;
-
- // Total number of messages that failed dispatching.
- optional int64 exception_count = 6;
-
- // Total number of processed messages we have data recorded for. If we
- // collected data for all the messages, message_count will be equal to
- // recorded_message_count.
- //
- // If recorded_message_count is different than message_count, it means data
- // collection has been sampled. The fields below will be sampled in this case.
- optional int64 recorded_message_count = 7;
-
- // Total latency of all processed messages.
- // Average can be computed using recorded_total_latency_micros /
- // recorded_message_count.
- optional int64 recorded_total_latency_micros = 8;
-
- // Total CPU usage of all processed message.
- // Average can be computed using recorded_total_cpu_micros /
- // recorded_message_count. Total can be computed using
- // recorded_total_cpu_micros / recorded_message_count * message_count.
- optional int64 recorded_total_cpu_micros = 9;
-
- // True if the screen was interactive PowerManager#isInteractive at the end of the call.
- optional bool screen_interactive = 10;
-
- // Max recorded CPU usage of all processed messages.
- optional int64 recorded_max_cpu_micros = 11;
-
- // Max recorded latency of all processed messages.
- optional int64 recorded_max_latency_micros = 12;
-
- // Total number of messages we tracked the dispatching delay for. If we
- // collected data for all the messages, message_count will be equal to
- // recorded_delay_message_count.
- //
- // If recorded_delay_message_count is different than message_count, it means data
- // collection has been sampled or/and not all messages specified the target dispatch time.
- // The fields below will be sampled in this case.
- optional int64 recorded_delay_message_count = 13;
-
- // Total dispatching delay of all processed messages.
- // Calculated as a difference between the target dispatching time (Message.when)
- // and the actual dispatching time.
- // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count.
- optional int64 recorded_total_delay_millis = 14;
-
- // Max dispatching delay of all processed messages.
- // Calculated as a difference between the target dispatching time (Message.when)
- // and the actual dispatching time.
- optional int64 recorded_max_delay_millis = 15;
-}
-
-/**
- * Pulls disk information, such as write speed and latency.
- */
-message DiskStats {
- // Time taken to open, write 512B to, and close a file.
- // -1 if error performing the check.
- optional int64 data_write_latency_millis = 1;
-
- optional bool file_based_encryption = 2;
-
- // Recent disk write speed in kB/s.
- // -1 if error querying storageed.
- // 0 if data is unavailable.
- optional int32 recent_disk_write_speed = 3;
-}
-
-
-/**
- * Free and total bytes of the Data, Cache, and System partition.
- */
-message DirectoryUsage {
- enum Directory {
- UNKNOWN = 0;
- DATA = 1;
- CACHE = 2;
- SYSTEM = 3;
- }
- optional Directory directory = 1;
- optional int64 free_bytes = 2;
- optional int64 total_bytes = 3;
-}
-
-
-/**
- * Size of an application: apk size, data size, and cache size.
- * Reads from a cached file produced daily by DiskStatsLoggingService.java.
- * Information is only reported for apps with the primary user (user 0).
- * Sizes are aggregated by package name.
- */
-message AppSize {
- // Including uids will involve modifying diskstats logic.
- optional string package_name = 1;
- // App size in bytes. -1 if unavailable.
- optional int64 app_size_bytes = 2;
- // App data size in bytes. -1 if unavailable.
- optional int64 app_data_size_bytes = 3;
- // App cache size in bytes. -1 if unavailable.
- optional int64 app_cache_size_bytes = 4;
- // Time that the cache file was produced.
- // Uses System.currentTimeMillis(), which is wall clock time.
- optional int64 cache_time_millis = 5;
-}
-
-
-/**
- * Size of a particular category. Eg: photos, videos.
- * Reads from a cached file produced daily by DiskStatsLoggingService.java.
- */
-message CategorySize {
- enum Category {
- UNKNOWN = 0;
- APP_SIZE = 1;
- APP_DATA_SIZE = 2;
- APP_CACHE_SIZE = 3;
- PHOTOS = 4;
- VIDEOS = 5;
- AUDIO = 6;
- DOWNLOADS = 7;
- SYSTEM = 8;
- OTHER = 9;
- }
- optional Category category = 1;
- // Category size in bytes.
- optional int64 size_bytes = 2;
- // Time that the cache file was produced.
- // Uses System.currentTimeMillis(), which is wall clock time.
- optional int64 cache_time_millis = 3;
-}
-
-/**
- * Pulls per uid I/O stats. The stats are cumulative since boot.
- *
- * Read/write bytes are I/O events from a storage device
- * Read/write chars are data requested by read/write syscalls, and can be
- * satisfied by caching.
- *
- * Pulled from StatsCompanionService, which reads proc/uid_io/stats.
- */
-message DiskIo {
- optional int32 uid = 1 [(is_uid) = true];
- optional int64 fg_chars_read = 2;
- optional int64 fg_chars_write = 3;
- optional int64 fg_bytes_read = 4;
- optional int64 fg_bytes_write = 5;
- optional int64 bg_chars_read = 6;
- optional int64 bg_chars_write = 7;
- optional int64 bg_bytes_read = 8;
- optional int64 bg_bytes_write = 9;
- optional int64 fg_fsync = 10;
- optional int64 bg_fsync= 11;
-}
-
-
-/**
- * Pulls the number of fingerprints for each user.
- *
- * Pulled from StatsCompanionService, which queries <Biometric>Manager.
- */
-message NumFingerprintsEnrolled {
- // The associated user. Eg: 0 for owners, 10+ for others.
- // Defined in android/os/UserHandle.java
- optional int32 user = 1;
- // Number of fingerprints registered to that user.
- optional int32 num_fingerprints_enrolled = 2;
-}
-
-/**
- * Pulls the number of faces for each user.
- *
- * Pulled from StatsCompanionService, which queries <Biometric>Manager.
- */
-message NumFacesEnrolled {
- // The associated user. Eg: 0 for owners, 10+ for others.
- // Defined in android/os/UserHandle.java
- optional int32 user = 1;
- // Number of faces registered to that user.
- optional int32 num_faces_enrolled = 2;
-}
-/**
- * A mapping of role holder -> role
- */
-message RoleHolder {
- // uid of the role holder
- optional int32 uid = 1 [(is_uid) = true];
-
- // package name of the role holder
- optional string package_name = 2;
-
- // the role held
- optional string role = 3;
-}
-
-message AggStats {
- // These are all in byte resolution.
- optional int64 min = 1 [deprecated = true];
- optional int64 average = 2 [deprecated = true];
- optional int64 max = 3 [deprecated = true];
-
- // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above
- // int64 fields.
- optional int32 mean_kb = 4;
- optional int32 max_kb = 5;
-}
-
-// A reduced subset of process states; reducing the number of possible states allows more
-// aggressive device-side aggregation of statistics and hence reduces metric upload size.
-enum ProcessStateAggregated {
- PROCESS_STATE_UNKNOWN = 0;
- // Persistent system process.
- PROCESS_STATE_PERSISTENT = 1;
- // Top activity; actually any visible activity.
- PROCESS_STATE_TOP = 2;
- // Process binding to top or a foreground service.
- PROCESS_STATE_BOUND_TOP_OR_FGS = 3;
- // Processing running a foreground service.
- PROCESS_STATE_FGS = 4;
- // Important foreground process (ime, wallpaper, etc).
- PROCESS_STATE_IMPORTANT_FOREGROUND = 5;
- // Important background process.
- PROCESS_STATE_BACKGROUND = 6;
- // Process running a receiver.
- PROCESS_STATE_RECEIVER = 7;
- // All kinds of cached processes.
- PROCESS_STATE_CACHED = 8;
-}
-
-// Next tag: 13
-message ProcessStatsStateProto {
- optional android.service.procstats.ScreenState screen_state = 1;
-
- optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true];
-
- // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
- // and not frameworks/base/core/java/android/app/ActivityManager.java
- optional android.service.procstats.ProcessState process_state = 3 [deprecated = true];
-
- optional ProcessStateAggregated process_state_aggregated = 10;
-
- // Millisecond uptime duration spent in this state
- optional int64 duration_millis = 4 [deprecated = true];
- // Same as above, but with minute resolution so it fits into an int32.
- optional int32 duration_minutes = 11;
-
- // Millisecond elapsed realtime duration spent in this state
- optional int64 realtime_duration_millis = 9 [deprecated = true];
- // Same as above, but with minute resolution so it fits into an int32.
- optional int32 realtime_duration_minutes = 12;
-
- // # of samples taken
- optional int32 sample_size = 5;
-
- // PSS is memory reserved for this process
- optional AggStats pss = 6 [deprecated = true];
-
- // USS is memory shared between processes, divided evenly for accounting
- optional AggStats uss = 7 [deprecated = true];
-
- // RSS is memory resident for this process
- optional AggStats rss = 8;
-}
-
-// Next Tag: 8
-message ProcessStatsProto {
- // Name of process.
- optional string process = 1;
-
- // Uid of the process.
- optional int32 uid = 2 [(is_uid) = true];
-
- // Information about how often kills occurred
- message Kill {
- // Count of excessive CPU kills
- optional int32 cpu = 1;
-
- // Count of kills when cached
- optional int32 cached = 2;
-
- // PSS stats during cached kill
- optional AggStats cached_pss = 3;
- }
- optional Kill kill = 3 [deprecated = true];
-
- // Time and memory spent in various states.
- repeated ProcessStatsStateProto states = 5;
-
- // Total time process has been running... screen_state, memory_state, and process_state
- // will not be set.
- optional ProcessStatsStateProto total_running_state = 6;
-
- // Association data for this process in this state;
- // each entry here is one association.
- repeated ProcessStatsAssociationProto assocs = 7;
-}
-
-// Next Tag: 6
-message ProcessStatsAssociationProto {
- // Procss Name of the associated process (client process of service binding)
- optional string assoc_process_name = 1;
-
- // Package Name of the associated package (client package of service binding)
- optional string assoc_package_name = 2 [deprecated = true];
-
- // UID of the associated process/package (client package of service binding)
- optional int32 assoc_uid = 5 [(is_uid) = true];
-
- // Total count of the times this association (service binding) appeared.
- optional int32 total_count = 3;
-
- // Uptime total duration in seconds this association (service binding) was around.
- optional int32 total_duration_secs = 4;
-}
-
-message PackageServiceOperationStatsProto {
- // Operate enum: Started, Foreground, Bound, Executing
- optional android.service.procstats.ServiceOperationState operation = 1;
-
- // Number of times the service was in this operation.
- optional int32 count = 2;
-
- // Information about a state the service can be in.
- message StateStats {
- // Screen state enum.
- optional android.service.procstats.ScreenState screen_state = 1;
- // Memory state enum.
- optional android.service.procstats.MemoryState memory_state = 2;
-
- // duration in milliseconds.
- optional int64 duration_millis = 3;
- // Millisecond elapsed realtime duration spent in this state
- optional int64 realtime_duration_millis = 4;
- }
- repeated StateStats state_stats = 3;
-}
-
-message PackageServiceStatsProto {
- // Name of service component.
- optional string service_name = 1;
-
- // The operation stats.
- // The package_name, package_uid, package_version, service_name will not be set to save space.
- repeated PackageServiceOperationStatsProto operation_stats = 2;
-}
-
-message PackageAssociationSourceProcessStatsProto {
- // Uid of the process.
- optional int32 process_uid = 1;
- // Process name.
- optional string process_name = 2;
- // Package name.
- optional string package_name = 7;
- // Total count of the times this association appeared.
- optional int32 total_count = 3;
-
- // Millisecond uptime total duration this association was around.
- optional int64 total_duration_millis = 4;
-
- // Total count of the times this association became actively impacting its target process.
- optional int32 active_count = 5;
-
- // Information on one source in this association.
- message StateStats {
- // Process state enum.
- optional android.service.procstats.ProcessState process_state = 1;
- // Millisecond uptime duration spent in this state
- optional int64 duration_millis = 2;
- // Millisecond elapsed realtime duration spent in this state
- optional int64 realtime_duration_mmillis = 3;
- }
- repeated StateStats active_state_stats = 6;
-}
-
-message PackageAssociationProcessStatsProto {
- // Name of the target component.
- optional string component_name = 1;
- // Information on one source in this association.
- repeated PackageAssociationSourceProcessStatsProto sources = 2;
-}
-
-
-message ProcessStatsPackageProto {
- // Name of package.
- optional string package = 1;
-
- // Uid of the package.
- optional int32 uid = 2;
-
- // Version of the package.
- optional int64 version = 3;
-
- // Stats for each process running with the package loaded in to it.
- repeated ProcessStatsProto process_stats = 4;
-
- // Stats for each of the package's services.
- repeated PackageServiceStatsProto service_stats = 5;
-
- // Stats for each association with the package.
- repeated PackageAssociationProcessStatsProto association_stats = 6;
-}
-
-message ProcessStatsSectionProto {
- // Elapsed realtime at start of report.
- optional int64 start_realtime_millis = 1;
-
- // Elapsed realtime at end of report.
- optional int64 end_realtime_millis = 2;
-
- // CPU uptime at start of report.
- optional int64 start_uptime_millis = 3;
-
- // CPU uptime at end of report.
- optional int64 end_uptime_millis = 4;
-
- // System runtime library. e.g. "libdvm.so", "libart.so".
- optional string runtime = 5;
-
- // whether kernel reports swapped pss.
- optional bool has_swapped_pss = 6;
-
- // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops".
- enum Status {
- STATUS_UNKNOWN = 0;
- STATUS_COMPLETE = 1;
- STATUS_PARTIAL = 2;
- STATUS_SHUTDOWN = 3;
- STATUS_SYSPROPS = 4;
- }
- repeated Status status = 7;
-
- // Number of pages available of various types and sizes, representation fragmentation.
- repeated ProcessStatsAvailablePagesProto available_pages = 10;
-
- // Stats for each process.
- repeated ProcessStatsProto process_stats = 8;
-
- // Stats for each package.
- repeated ProcessStatsPackageProto package_stats = 9;
-}
-
-message ProcessStatsAvailablePagesProto {
- // Node these pages are in (as per /proc/pagetypeinfo)
- optional int32 node = 1;
-
- // Zone these pages are in (as per /proc/pagetypeinfo)
- optional string zone = 2;
-
- // Label for the type of these pages (as per /proc/pagetypeinfo)
- optional string label = 3;
-
- // Distribution of number of pages available by order size. First entry in array is
- // order 0, second is order 1, etc. Each order increase is a doubling of page size.
- repeated int32 pages_per_order = 4;
-}
-
-/**
- * Pulled from ProcessStatsService.java
- */
-message ProcStats {
- optional ProcessStatsSectionProto proc_stats_section = 1;
- // Data pulled from device into this is sometimes sharded across multiple atoms to work around
- // a size limit. When this happens, this shard ID will contain an increasing 1-indexed integer
- // with the number of this shard.
- optional int32 shard_id = 2;
-}
-
-/**
- * Pulled from ProcessStatsService.java
- */
-message ProcStatsPkgProc {
- optional ProcessStatsSectionProto proc_stats_section = 1;
-}
-
-// Next Tag: 2
-message PackageRemoteViewInfoProto {
- optional string package_name = 1;
- // add per-package additional info here (like channels)
-}
-
-// Next Tag: 2
-message NotificationRemoteViewsProto {
- repeated PackageRemoteViewInfoProto package_remote_view_info = 1;
-}
-
-/**
- * Pulled from NotificationManagerService.java
- */
-message NotificationRemoteViews {
- optional NotificationRemoteViewsProto notification_remote_views = 1;
-}
-
-/**
- * Atom that contains a list of a package's preferences, pulled from NotificationManagerService.java
- */
-message PackageNotificationPreferences {
- // Uid under which the package is installed.
- optional int32 uid = 1 [(is_uid) = true];
- // Notification importance, which specifies when and how a notification is displayed.
- // Specified under core/java/android/app/NotificationManager.java.
- optional int32 importance = 2;
- // Lockscreen visibility as set by the user.
- optional int32 visibility = 3;
- // Bitfield mask indicating what fields were locked by the user (see LockableAppfields in
- // PreferencesHelper.java)
- optional int32 user_locked_fields = 4;
-}
-
-/**
- * Atom that contains a list of a package's channel preferences, pulled from
- * NotificationManagerService.java.
- */
-message PackageNotificationChannelPreferences {
- // Uid under which the package is installed.
- optional int32 uid = 1 [(is_uid) = true];
- // Channel's ID. Should always be available.
- optional string channel_id = 2;
- // Channel's name. Should always be available.
- optional string channel_name = 3;
- // Channel's description. Optionally set by the channel creator.
- optional string description = 4;
- // Notification importance, which specifies when and how a notification is displayed. Specified
- // under core/java/android/app/NotificationManager.java.
- optional int32 importance = 5;
- // Bitmask representing which fields have been set by the user. See field bitmask descriptions
- // at core/java/android/app/NotificationChannel.java
- optional int32 user_locked_fields = 6;
- // Indicates if the channel was deleted by the app.
- optional bool is_deleted = 7;
- // Indicates if the channel was marked as a conversation by the app.
- optional bool is_conversation = 8;
- // Indicates if the channel is a conversation that was demoted by the user.
- optional bool is_demoted_conversation = 9;
- // Indicates if the channel is a conversation that was marked as important by the user.
- optional bool is_important_conversation = 10;
-}
-
-/**
- * Atom that represents an item in the list of Do Not Disturb rules, pulled from
- * NotificationManagerService.java.
- */
-message DNDModeProto {
- enum Mode {
- ROOT_CONFIG = -1; // Used to distinguish the config (one per user) from the rules.
- ZEN_MODE_OFF = 0;
- ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
- ZEN_MODE_NO_INTERRUPTIONS = 2;
- ZEN_MODE_ALARMS = 3;
- }
- optional int32 user = 1; // Android user ID (0, 1, 10, ...)
- optional bool enabled = 2; // true for ROOT_CONFIG if a manualRule is enabled
- optional bool channels_bypassing = 3; // only valid for ROOT_CONFIG
- optional Mode zen_mode = 4;
- // id is one of the system default rule IDs, or empty
- // May also be "MANUAL_RULE" to indicate app-activation of the manual rule.
- optional string id = 5;
- optional int32 uid = 6 [(is_uid) = true]; // currently only SYSTEM_UID or 0 for other
- optional DNDPolicyProto policy = 7;
-}
-
-/**
- * Atom that represents a Do Not Disturb policy, an optional detail proto for DNDModeProto.
- */
-message DNDPolicyProto {
- enum State {
- STATE_UNSET = 0;
- STATE_ALLOW = 1;
- STATE_DISALLOW = 2;
- }
- optional State calls = 1;
- optional State repeat_callers = 2;
- optional State messages = 3;
- optional State conversations = 4;
- optional State reminders = 5;
- optional State events = 6;
- optional State alarms = 7;
- optional State media = 8;
- optional State system = 9;
- optional State fullscreen = 10;
- optional State lights = 11;
- optional State peek = 12;
- optional State status_bar = 13;
- optional State badge = 14;
- optional State ambient = 15;
- optional State notification_list = 16;
-
- enum PeopleType {
- PEOPLE_UNSET = 0;
- PEOPLE_ANYONE = 1;
- PEOPLE_CONTACTS = 2;
- PEOPLE_STARRED = 3;
- PEOPLE_NONE = 4;
- }
-
- optional PeopleType allow_calls_from = 17;
- optional PeopleType allow_messages_from = 18;
-
- enum ConversationType {
- CONV_UNSET = 0;
- CONV_ANYONE = 1;
- CONV_IMPORTANT = 2;
- CONV_NONE = 3;
- }
-
- optional ConversationType allow_conversations_from = 19;
-}
-
-/**
- * Atom that contains a list of a package's channel group preferences, pulled from
- * NotificationManagerService.java.
- */
-message PackageNotificationChannelGroupPreferences {
- // Uid under which the package is installed.
- optional int32 uid = 1 [(is_uid) = true];
- // Channel Group's ID. Should always be available.
- optional string group_id = 2;
- // Channel Group's name. Should always be available.
- optional string group_name = 3;
- // Channel Group's description. Optionally set by group creator.
- optional string description = 4;
- // Indicates if notifications from this channel group are blocked.
- optional bool is_blocked = 5;
- // Bitmask representing which fields have been set by the user. See field bitmask descriptions
- // at core/java/android/app/NotificationChannelGroup.java
- optional int32 user_locked_fields = 6;
-}
-
-message PowerProfileProto {
- optional double cpu_suspend = 1;
-
- optional double cpu_idle = 2;
-
- optional double cpu_active = 3;
-
- message CpuCluster {
- optional int32 id = 1;
- optional double cluster_power = 2;
- optional int32 cores = 3;
- repeated int64 speed = 4;
- repeated double core_power = 5;
- }
-
- repeated CpuCluster cpu_cluster = 40;
-
- optional double wifi_scan = 4;
-
- optional double wifi_on = 5;
-
- optional double wifi_active = 6;
-
- optional double wifi_controller_idle = 7;
-
- optional double wifi_controller_rx = 8;
-
- optional double wifi_controller_tx = 9;
-
- repeated double wifi_controller_tx_levels = 10;
-
- optional double wifi_controller_operating_voltage = 11;
-
- optional double bluetooth_controller_idle = 12;
-
- optional double bluetooth_controller_rx = 13;
-
- optional double bluetooth_controller_tx = 14;
-
- optional double bluetooth_controller_operating_voltage = 15;
-
- optional double modem_controller_sleep = 16;
-
- optional double modem_controller_idle = 17;
-
- optional double modem_controller_rx = 18;
-
- repeated double modem_controller_tx = 19;
-
- optional double modem_controller_operating_voltage = 20;
-
- optional double gps_on = 21;
-
- repeated double gps_signal_quality_based = 22;
-
- optional double gps_operating_voltage = 23;
-
- optional double bluetooth_on = 24;
-
- optional double bluetooth_active = 25;
-
- optional double bluetooth_at_cmd = 26;
-
- optional double ambient_display = 27;
-
- optional double screen_on = 28;
-
- optional double radio_on = 29;
-
- optional double radio_scanning = 30;
-
- optional double radio_active = 31;
-
- optional double screen_full = 32;
-
- optional double audio = 33;
-
- optional double video = 34;
-
- optional double flashlight = 35;
-
- optional double memory = 36;
-
- optional double camera = 37;
-
- optional double wifi_batched_scan = 38;
-
- optional double battery_capacity = 39;
-}
-
-/**
- * power_profile.xml and other constants for power model calculations.
- * Pulled from PowerProfile.java
- */
-message PowerProfile {
- optional PowerProfileProto power_profile = 1;
-}
-
-/**
- * Logs when a user restriction was added or removed.
- *
- * Logged from:
- * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
- */
-message UserRestrictionChanged {
- // The raw string of the user restriction as defined in UserManager.
- // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS.
- optional string restriction = 1;
- // Whether the restriction is enabled or disabled.
- optional bool enabled = 2;
-}
-
-/**
- * Pulls process user time and system time. Puller takes a snapshot of all pids
- * in the system and returns cpu stats for those that are working at the time.
- * Dead pids will be dropped. Kernel processes are excluded.
- * Min cool-down is 5 sec.
- */
-message ProcessCpuTime {
- optional int32 uid = 1 [(is_uid) = true];
-
- optional string process_name = 2;
- // Process cpu time in user space, cumulative from boot/process start
- optional int64 user_time_millis = 3;
- // Process cpu time in system space, cumulative from boot/process start
- optional int64 system_time_millis = 4;
-}
-
-/**
- * Pulls the CPU usage for each thread.
- *
- * Read from /proc/$PID/task/$TID/time_in_state files.
- *
- * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and
- * time_in_state files not being present on some phones, have not been addressed. These should be
- * considered before a public release.
- */
-message CpuTimePerThreadFreq {
- // UID that owns the process.
- optional int32 uid = 1 [(is_uid) = true];
- // ID of the process.
- optional int32 process_id = 2;
- // ID of the thread.
- optional int32 thread_id = 3;
- // Name of the process taken from `/proc/$PID/cmdline`.
- optional string process_name = 4;
- // Name of the thread taken from `/proc/$PID/task/$TID/comm`
- optional string thread_name = 5;
-
- // Report eight different frequencies, and how much time is spent in each frequency. Frequencies
- // are given in KHz, and time is given in milliseconds since the thread started. All eight
- // frequencies are given here as the alternative is sending eight separate atoms. This method
- // significantly reduces the amount of data created
- optional int32 frequency1_khz = 6;
- optional int32 time1_millis = 7;
- optional int32 frequency2_khz = 8;
- optional int32 time2_millis = 9;
- optional int32 frequency3_khz = 10;
- optional int32 time3_millis = 11;
- optional int32 frequency4_khz = 12;
- optional int32 time4_millis = 13;
- optional int32 frequency5_khz = 14;
- optional int32 time5_millis = 15;
- optional int32 frequency6_khz = 16;
- optional int32 time6_millis = 17;
- optional int32 frequency7_khz = 18;
- optional int32 time7_millis = 19;
- optional int32 frequency8_khz = 20;
- optional int32 time8_millis = 21;
-}
-
-/**
- * Pulls information about the device's build.
- */
-message BuildInformation {
- // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse.
- // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags.
- optional string fingerprint = 1;
-
- // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated.
- optional string brand = 2;
-
- // Build.PRODUCT. The name of the overall product.
- optional string product = 3;
-
- // Build.DEVICE. The name of the industrial design.
- optional string device = 4;
-
- // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas".
- optional string version_release = 5;
-
- // Build.ID. E.g. a label like "M4-rc20".
- optional string id = 6;
-
- // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to
- // represent this build.
- optional string version_incremental = 7;
-
- // Build.TYPE. The type of build, like "user" or "eng".
- optional string type = 8;
-
- // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug".
- optional string tags = 9;
-}
-
-/**
- * Logs information about mismatched caller for content capture.
- *
- * Logged from:
- * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java
- */
-message ContentCaptureCallerMismatchReported {
- optional string intended_package = 1;
- optional string calling_package = 2;
-}
-
-/**
- * Logs information about content capture service events.
- *
- * Logged from:
- * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
- */
-message ContentCaptureServiceEvents {
- // The type of event.
- enum Event {
- UNKNOWN = 0;
- ON_CONNECTED = 1;
- ON_DISCONNECTED = 2;
- SET_WHITELIST = 3;
- SET_DISABLED = 4;
- ON_USER_DATA_REMOVED = 5;
- ON_DATA_SHARE_REQUEST = 6;
- ACCEPT_DATA_SHARE_REQUEST = 7;
- REJECT_DATA_SHARE_REQUEST = 8;
- DATA_SHARE_WRITE_FINISHED = 9;
- DATA_SHARE_ERROR_IOEXCEPTION = 10;
- DATA_SHARE_ERROR_EMPTY_DATA = 11;
- DATA_SHARE_ERROR_CLIENT_PIPE_FAIL = 12;
- DATA_SHARE_ERROR_SERVICE_PIPE_FAIL = 13;
- DATA_SHARE_ERROR_CONCURRENT_REQUEST = 14;
- DATA_SHARE_ERROR_TIMEOUT_INTERRUPTED = 15;
- }
- optional Event event = 1;
- // component/package of content capture service.
- optional string service_info = 2;
- // component/package of target.
- // it's a concatenated list of component/package for SET_WHITELIST event
- // separated by " ".
- optional string target_info = 3;
-}
-
-/**
- * Logs information about content capture session events.
- *
- * Logged from:
- * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
- */
-message ContentCaptureSessionEvents {
- // The type of event.
- enum Event {
- UNKNOWN = 0;
- ON_SESSION_STARTED = 1;
- ON_SESSION_FINISHED = 2;
- SESSION_NOT_CREATED = 3;
- }
- optional int32 session_id = 1;
- optional Event event = 2;
- // (n/a on session finished)
- optional int32 state_flags = 3;
- // component/package of content capture service.
- optional string service_info = 4;
- // component/package of app.
- // (n/a on session finished)
- optional string app_info = 5;
- optional bool is_child_session = 6;
-}
-
-/**
- * Logs information about session being flushed.
- *
- * Logged from:
- * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
- */
-message ContentCaptureFlushed {
- optional int32 session_id = 1;
- // component/package of content capture service.
- optional string service_info = 2;
- // component/package of app.
- optional string app_info = 3;
- // session start/finish events
- optional int32 child_session_started = 4;
- optional int32 child_session_finished = 5;
- // count of view events.
- optional int32 view_appeared_count = 6;
- optional int32 view_disappeared_count = 7;
- optional int32 view_text_changed_count = 8;
-
- // Flush stats.
- optional int32 max_events = 9;
- optional int32 idle_flush_freq = 10;
- optional int32 text_flush_freq = 11;
- optional int32 flush_reason = 12;
-}
-
-/**
- * Pulls on-device BatteryStats power use calculations for the overall device.
- */
-message DeviceCalculatedPowerUse {
- // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
- // BatteryStats last reset (i.e. roughly since device was last significantly charged).
- // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()).
- optional int64 computed_power_nano_amp_secs = 1;
-}
-
-/**
- * Pulls on-device BatteryStats power use calculations broken down by uid.
- * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use
- * that is attributed to non-uid items. They must all be included to get the total power use.
- */
-message DeviceCalculatedPowerBlameUid {
- // Uid being blamed. Note: isolated uids have already been mapped to host uid.
- optional int32 uid = 1 [(is_uid) = true];
-
- // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
- // BatteryStats last reset (i.e. roughly since device was last significantly charged).
- optional int64 power_nano_amp_secs = 2;
-}
-
-/**
- * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by
- * drain type.
- * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that
- * is attributed uids. They must all be included to get the total power use.
- */
-message DeviceCalculatedPowerBlameOther {
- // The type of item whose power use is being reported.
- enum DrainType {
- AMBIENT_DISPLAY = 0;
- // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid.
- BLUETOOTH = 2;
- CAMERA = 3;
- // Cell-standby
- CELL = 4;
- FLASHLIGHT = 5;
- IDLE = 6;
- MEMORY = 7;
- // Amount that total computed drain exceeded the drain estimated using the
- // battery level changes and capacity.
- OVERCOUNTED = 8;
- PHONE = 9;
- SCREEN = 10;
- // Amount that total computed drain was below the drain estimated using the
- // battery level changes and capacity.
- UNACCOUNTED = 11;
- // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported.
- WIFI = 13;
- }
- optional DrainType drain_type = 1;
-
- // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
- // BatteryStats last reset (i.e. roughly since device was last significantly charged).
- optional int64 power_nano_amp_secs = 2;
-}
-
-/**
- * Logs device policy features.
- *
- * Logged from:
- * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
- * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/
- */
-message DevicePolicyEvent {
- // The event id - unique for each event.
- optional android.stats.devicepolicy.EventId event_id = 1;
- // The admin package name.
- optional string admin_package_name = 2;
- // A generic integer parameter.
- optional int32 integer_value = 3;
- // A generic boolean parameter.
- optional bool boolean_value = 4;
- // A parameter specifying a time period in milliseconds.
- optional uint64 time_period_millis = 5;
- // A parameter specifying a list of package names, bundle extras or string parameters.
- optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES];
-}
-
-/**
- * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUILaunchReported {
- optional android.stats.docsui.LaunchAction launch_action = 1;
- optional bool has_initial_uri = 2;
- optional android.stats.docsui.MimeType mime_type = 3;
- optional android.stats.docsui.Root initial_root = 4;
-}
-
-/**
- * Logs root/app visited event in file managers/picker. Call this when the user
- * taps on root/app in hamburger menu.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIRootVisitedReported {
- optional android.stats.docsui.ContextScope scope = 1;
- optional android.stats.docsui.Root root = 2;
-}
-
-/**
- * Logs file operation stats. Call this when a file operation has completed.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIFileOperationReported {
- optional android.stats.docsui.Provider provider = 1;
- optional android.stats.docsui.FileOperation file_op = 2;
-}
-
-/**
- * Logs file operation stats. Call this when a copy/move operation has completed with a specific
- * mode.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIFileOperationCopyMoveModeReported {
- optional android.stats.docsui.FileOperation file_op = 1;
- optional android.stats.docsui.CopyMoveOpMode mode = 2;
-}
-
-
-/**
- * Logs file sub operation stats. Call this when a file operation has failed.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIFileOperationFailureReported {
- optional android.stats.docsui.Authority authority = 1;
- optional android.stats.docsui.SubFileOperation sub_op = 2;
-}
-
-/**
-* Logs the cancellation of a file operation. Call this when a job is canceled
-*
-* Logged from:
-* package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
-*/
-message DocsUIFileOperationCanceledReported {
- optional android.stats.docsui.FileOperation file_op = 1;
-}
-
-/**
- * Logs startup time in milliseconds.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIStartupMsReported {
- optional int32 startup_millis = 1;
-}
-
-/**
- * Logs the action that was started by user.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIUserActionReported {
- optional android.stats.docsui.UserAction action = 1;
-}
-
-/**
- * Logs the invalid type when invalid scoped access is requested.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java
- */
-message DocsUIInvalidScopedAccessRequestReported {
- optional android.stats.docsui.InvalidScopedAccess type = 1;
-}
-
-/**
- * Logs the package name that launches docsui picker mode.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIPickerLaunchedFromReported {
- optional string package_name = 1;
-}
-
-/**
- * Logs the search type.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUISearchTypeReported {
- optional android.stats.docsui.SearchType search_type = 1;
-}
-
-/**
- * Logs the search mode.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUISearchModeReported {
- optional android.stats.docsui.SearchMode search_mode = 1;
-}
-
-/**
- * Logs the pick result information.
- *
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIPickResultReported {
- optional int32 total_action_count = 1;
- optional int64 duration_millis = 2;
- optional int32 file_count= 3;
- optional bool is_searching = 4;
- optional android.stats.docsui.Root picked_from = 5;
- optional android.stats.docsui.MimeType mime_type = 6;
- optional int32 repeatedly_pick_times = 7;
-}
-
-/** Logs the drag and drop of files.
-
- * Logged from:
- * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
- */
-message DocsUIDragAndDropReported {
- optional bool drag_initiated_from_docsui = 1;
-}
-
-/**
- * Logs when an app's memory is compacted.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
- */
-message AppCompacted {
- // The pid of the process being compacted.
- optional int32 pid = 1;
-
- // The name of the process being compacted.
- optional string process_name = 2;
-
- // The type of compaction.
- enum Action {
- UNKNOWN = 0;
- SOME = 1;
- FULL = 2;
- PERSISTENT = 3;
- BFGS = 4;
- }
- optional Action action = 3;
-
- // Total RSS in kilobytes consumed by the process prior to compaction.
- optional int64 before_rss_total_kilobytes = 4;
-
- // File RSS in kilobytes consumed by the process prior to compaction.
- optional int64 before_rss_file_kilobytes = 5;
-
- // Anonymous RSS in kilobytes consumed by the process prior to compaction.
- optional int64 before_rss_anon_kilobytes = 6;
-
- // Swap in kilobytes consumed by the process prior to compaction.
- optional int64 before_swap_kilobytes = 7;
-
- // Total RSS in kilobytes consumed by the process after compaction.
- optional int64 after_rss_total_kilobytes = 8;
-
- // File RSS in kilobytes consumed by the process after compaction.
- optional int64 after_rss_file_kilobytes = 9;
-
- // Anonymous RSS in kilobytes consumed by the process after compaction.
- optional int64 after_rss_anon_kilobytes = 10;
-
- // Swap in kilobytes consumed by the process after compaction.
- optional int64 after_swap_kilobytes = 11;
-
- // The time taken to perform compaction in milliseconds.
- optional int64 time_to_compact_millis = 12;
-
- // The last compaction action performed for this app.
- optional Action last_action = 13;
-
- // The last time that compaction was attempted on this process in milliseconds
- // since boot, not including sleep (see SystemClock.uptimeMillis()).
- optional int64 last_compact_timestamp_ms_since_boot = 14;
-
- // The "setAdj" (i.e. previous) oom_score_adj at the time of compaction.
- optional int32 oom_score_adj = 15;
-
- // The process state at the time of compaction.
- optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN];
-
- // Free ZRAM in kilobytes before compaction.
- optional int64 before_zram_free_kilobytes = 17;
-
- // Free ZRAM in kilobytes after compaction.
- optional int64 after_zram_free_kilobytes = 18;
-}
-
-/**
- * Logs when a Tethering event occurs.
- *
- */
-message NetworkTetheringReported {
- // tethering error code
- optional android.stats.connectivity.ErrorCode error_code = 1;
-
- // tethering downstream type
- optional android.stats.connectivity.DownstreamType downstream_type = 2;
-
- // transport type of upstream network
- optional android.stats.connectivity.UpstreamType upstream_type = 3;
-
- // The user type of Tethering
- optional android.stats.connectivity.UserType user_type= 4;
-}
-
-/**
- * Logs a DNS lookup operation initiated by the system resolver on behalf of an application
- * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName().
- *
- * The NetworkDnsEventReported message represents the entire lookup operation, which may
- * result one or more queries to the recursive DNS resolvers. Those are individually logged
- * in DnsQueryEvents to enable computing error rates and network latency and timeouts
- * broken up by query type, transport, network interface, etc.
- */
-message NetworkDnsEventReported {
- optional android.stats.dnsresolver.EventType event_type = 1;
-
- optional android.stats.dnsresolver.ReturnCode return_code = 2;
-
- // The latency in microseconds of the entire DNS lookup operation.
- optional int32 latency_micros = 3;
-
- // Only valid for event_type = EVENT_GETADDRINFO.
- optional int32 hints_ai_flags = 4;
-
- // Flags passed to android_res_nsend() defined in multinetwork.h
- // Only valid for event_type = EVENT_RESNSEND.
- optional int32 res_nsend_flags = 5;
-
- optional android.stats.dnsresolver.NetworkType network_type = 6;
-
- // The DNS over TLS mode on a specific netId.
- optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7;
-
- // Additional pass-through fields opaque to statsd.
- // The DNS resolver Mainline module can add new fields here without requiring an OS update.
- optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES];
-
- // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom.
- optional int32 sampling_rate_denom = 9;
-}
-
-/**
- * logs the CapportApiData info
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- */
-message CapportApiData {
- // The TTL of the network connection provided by captive portal
- optional int32 remaining_ttl_secs = 1;
-
- // The limit traffic data of the network connection provided by captive portal
- optional int32 remaining_bytes = 2;
-
- // Is portal url option included in the DHCP packet (Yes, No)
- optional bool has_portal_url = 3;
-
- // Is venue info (e.g. store info, maps, flight status) included (Yes, No)
- optional bool has_venue_info = 4;
-}
-
-/**
- * logs a network Probe Event
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- */
-message ProbeEvent {
- // The probe type (http or https, or captive portal API...)
- optional android.stats.connectivity.ProbeType probe_type = 1;
-
- // The latency in microseconds of the probe event
- optional int32 latency_micros = 2;
-
- // The result of the probe event
- optional android.stats.connectivity.ProbeResult probe_result = 3;
-
- // The CaptivePortal API info
- optional CapportApiData capport_api_data = 4;
-}
-
-/**
- * log each ProbeEvent in ProbeEvents
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- */
-message ProbeEvents {
- // Record probe event during the validation
- repeated ProbeEvent probe_event = 1;
-}
-
-/**
- * The DHCP (Dynamic Host Configuration Protocol) session info
- * Logged from:
- * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java
- */
-message DhcpSession {
- // The DHCP Feature(s) enabled in this session
- repeated android.stats.connectivity.DhcpFeature used_features = 1;
-
- // The discover packet (re)transmit count
- optional int32 discover_count = 2;
-
- // The request packet (re)transmit count
- optional int32 request_count = 3;
-
- // The IPv4 address conflict count
- // (only be meaningful when duplicate address detection is enabled)
- optional int32 conflict_count = 4;
-
- // The DHCP packet parsing error code in this session
- // (defined in android.net.metrics.DhcpErrorEvent)
- repeated android.stats.connectivity.DhcpErrorCode error_code = 5;
-
- // The result of DHCP hostname transliteration
- optional android.stats.connectivity.HostnameTransResult ht_result = 6;
-}
-
-/**
- * Logs Network IP provisioning event
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/networkstack/metrics/NetworkIpProvisioningMetrics.java
- */
-message NetworkIpProvisioningReported {
- // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
- optional android.stats.connectivity.TransportType transport_type = 1;
-
- // The latency in microseconds of IP Provisioning over IPV4
- optional int32 ipv4_latency_micros = 2;
-
- // The latency in microseconds of IP Provisioning over IPV6
- optional int32 ipv6_latency_micros = 3;
-
- // The time duration between provisioning start and end (success or failure)
- optional int64 provisioning_duration_micros = 4;
-
- // The specific disconnect reason for this IP provisioning
- optional android.stats.connectivity.DisconnectCode disconnect_code = 5;
-
- // Log DHCP session info (Only valid for IPv4)
- optional DhcpSession dhcp_session = 6 [(log_mode) = MODE_BYTES];
-
- // The random number between 0 ~ 999 for sampling
- optional int32 random_number = 7;
-}
-
-/**
- * Logs Network DHCP Renew event
- * Logged from:
- * packages/modules/NetworkStack/src/android/net/dhcp/DhcpClient.java
- */
-message NetworkDhcpRenewReported {
- // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
- optional android.stats.connectivity.TransportType transport_type = 1;
-
- // The request packet (re)transmit count
- optional int32 request_count = 2;
-
- // The latency in microseconds of DHCP Renew
- optional int32 latency_micros = 3;
-
- // The DHCP error code is defined in android.net.metrics.DhcpErrorEvent
- optional android.stats.connectivity.DhcpErrorCode error_code = 4;
-
- // The result of DHCP renew
- optional android.stats.connectivity.DhcpRenewResult renew_result = 5;
-
- // The random number between 0 ~ 999 for sampling
- optional int32 random_number = 6;
-}
-
-/**
- * Logs Network Validation event
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- */
-message NetworkValidationReported {
- // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
- optional android.stats.connectivity.TransportType transport_type = 1;
-
- // Record each probe event
- optional ProbeEvents probe_events = 2 [(log_mode) = MODE_BYTES];
-
- // The result of the network validation
- optional android.stats.connectivity.ValidationResult validation_result = 3;
-
- // The latency in microseconds of network validation
- optional int32 latency_micros = 4;
-
- // The validation index (the first validation attempt or second, third...)
- optional int32 validation_index = 5;
-
- // The random number between 0 ~ 999 for sampling
- optional int32 random_number = 6;
-}
-
-/**
- * Logs NetworkStack Quirk event
- * Logged from:
- * packages/modules/NetworkStack/src/com/android/networkstack/
- */
-message NetworkStackQuirkReported {
- // Transport type (WIFI, CELLULAR, BLUETOOTH, ..)
- optional android.stats.connectivity.TransportType transport_type = 1;
-
- // Record each Quirk event
- optional android.stats.connectivity.NetworkQuirkEvent event = 2;
-}
-
-/**
- * Logs when a data stall event occurs.
- *
- * Log from:
- * packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- */
-message DataStallEvent {
- // Data stall evaluation type.
- // See packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
- // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*.
- optional int32 evaluation_type = 1;
- // See definition in data_stall_event.proto.
- optional com.android.server.connectivity.ProbeResult validation_result = 2;
- // See definition in data_stall_event.proto.
- optional android.net.NetworkCapabilitiesProto.Transport network_type = 3;
- // See definition in data_stall_event.proto.
- optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES];
- // See definition in data_stall_event.proto.
- optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES];
- // See definition in data_stall_event.proto.
- optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES];
- // The tcp packets fail rate from the latest tcp polling.
- optional int32 tcp_fail_rate = 7;
- // Number of packets sent since the last received packet.
- optional int32 tcp_sent_since_last_recv = 8;
-}
-
-/*
- * Logs when RescueParty resets some set of experiment flags.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/RescueParty.java
- */
-message RescuePartyResetReported {
- // The rescue level of this reset. A value of 0 indicates missing or unknown level information.
- optional int32 rescue_level = 1;
-}
-
-/**
- * Logs when signed config is received from an APK, and if that config was applied successfully.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java
- */
-message SignedConfigReported {
- enum Type {
- UNKNOWN_TYPE = 0;
- GLOBAL_SETTINGS = 1;
- }
- optional Type type = 1;
-
- // The final status of the signed config received.
- enum Status {
- UNKNOWN_STATUS = 0;
- APPLIED = 1;
- BASE64_FAILURE_CONFIG = 2;
- BASE64_FAILURE_SIGNATURE = 3;
- SECURITY_EXCEPTION = 4;
- INVALID_CONFIG = 5;
- OLD_CONFIG = 6;
- SIGNATURE_CHECK_FAILED = 7;
- NOT_APPLICABLE = 8;
- SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9;
- }
- optional Status status = 2;
-
- // The version of the signed config processed.
- optional int32 version = 3;
-
- // The package name that the config was extracted from.
- optional string from_package = 4;
-
- enum Key {
- NO_KEY = 0;
- DEBUG = 1;
- PRODUCTION = 2;
- }
- // Which key was used to verify the config.
- optional Key verified_with = 5;
-}
-
-/*
- * Logs GNSS Network-Initiated (NI) location events.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
- */
-message GnssNiEventReported {
- // The type of GnssNiEvent.
- enum EventType {
- UNKNOWN = 0;
- NI_REQUEST = 1;
- NI_RESPONSE = 2;
- }
- optional EventType event_type = 1;
-
- // An ID generated by HAL to associate NI notifications and UI responses.
- optional int32 notification_id = 2;
-
- // A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc.
- optional android.server.location.GnssNiType ni_type = 3;
-
- // NI requires notification.
- optional bool need_notify = 4;
-
- // NI requires verification.
- optional bool need_verify = 5;
-
- // NI requires privacy override, no notification/minimal trace.
- optional bool privacy_override = 6;
-
- // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in
- // seconds.
- optional int32 timeout = 7;
-
- // Default response when timeout.
- optional android.server.location.GnssUserResponseType default_response = 8;
-
- // String representing the requester of the network inititated location request.
- optional string requestor_id = 9;
-
- // Notification message text string representing the service(for eg. SUPL-service) who sent the
- // network initiated location request.
- optional string text = 10;
-
- // requestorId decoding scheme.
- optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11;
-
- // Notification message text decoding scheme.
- optional android.server.location.GnssNiEncodingType text_encoding = 12;
-
- // True if SUPL ES is enabled.
- optional bool is_supl_es_enabled = 13;
-
- // True if GNSS location is enabled.
- optional bool is_location_enabled = 14;
-
- // GNSS NI responses which define the response in NI structures.
- optional android.server.location.GnssUserResponseType user_response = 15;
-}
-
-/**
- * Logs GNSS non-framework (NFW) location notification.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
- */
-message GnssNfwNotificationReported {
- // Package name of the Android proxy application representing the non-framework entity that
- // requested location. Set to empty string if unknown.
- optional string proxy_app_package_name = 1;
-
- // Protocol stack that initiated the non-framework location request.
- optional android.server.location.NfwProtocolStack protocol_stack = 2;
-
- // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise,
- // set to empty string. This field is opaque to the framework and used for logging purposes.
- optional string other_protocol_stack_name = 3;
-
- // Source initiating/receiving the location information.
- optional android.server.location.NfwRequestor requestor = 4;
-
- // Identity of the endpoint receiving the location information. For example, carrier name, OEM
- // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework
- // and used for logging purposes.
- optional string requestor_id = 5;
-
- // Indicates whether location information was provided for this request.
- optional android.server.location.NfwResponseType response_type = 6;
-
- // True if the device is in user initiated emergency session.
- optional bool in_emergency_mode = 7;
-
- // True if cached location is provided.
- optional bool is_cached_location = 8;
-
- // True if proxy app permission mismatch between framework and GNSS HAL.
- optional bool is_permission_mismatched = 9;
-}
-
-/**
- * Logs GNSS configuration as defined in IGnssConfiguration.hal.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java
- */
-message GnssConfigurationReported {
- // SUPL host name.
- optional string supl_host = 1;
-
- // SUPL port number.
- optional int32 supl_port = 2;
-
- // C2K host name.
- optional string c2k_host = 3;
-
- // C2K port number.
- optional int32 c2k_port = 4;
-
- // The SUPL version requested by Carrier.
- optional int32 supl_ver = 5;
-
- // The SUPL mode.
- optional android.server.location.SuplMode supl_mode = 6;
-
- // True if NI emergency SUPL restrictions is enabled.
- optional bool supl_es = 7;
-
- // LTE Positioning Profile settings
- optional android.server.location.LppProfile lpp_profile = 8;
-
- // Positioning protocol on A-Glonass system.
- optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9;
-
- // True if emergency PDN is used. Otherwise, regular PDN is used.
- optional bool use_emergency_pdn_for_emergency_supl= 10;
-
- // Configurations of how GPS functionalities should be locked when user turns off GPS On setting.
- optional android.server.location.GpsLock gps_lock = 11;
-
- // Number of seconds to extend the emergency session duration post emergency call.
- optional int32 es_extension_sec = 12;
-
- // The full list of package names of proxy Android applications representing the non-framework
- // location access entities (on/off the device) for which the framework user has granted
- // non-framework location access permission. The package names are concatenated in one string
- // with spaces as separators.
- optional string enabled_proxy_app_package_name_list = 13;
-}
-
-/**
- * Logs when a NFC device's error occurred.
- * Logged from:
- * system/nfc/src/nfc/nfc/nfc_ncif.cc
- * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java
- */
-message NfcErrorOccurred {
- enum Type {
- UNKNOWN = 0;
- CMD_TIMEOUT = 1;
- ERROR_NOTIFICATION = 2;
- AID_OVERFLOW = 3;
- }
- optional Type type = 1;
- // If it's nci cmd timeout, log the timeout command.
- optional uint32 nci_cmd = 2;
-
- optional uint32 error_ntf_status_code = 3;
-}
-
-/**
- * Logs when a NFC device's state changed event
- * Logged from:
- * packages/apps/Nfc/src/com/android/nfc/NfcService.java
- */
-message NfcStateChanged {
- enum State {
- UNKNOWN = 0;
- OFF = 1;
- ON = 2;
- ON_LOCKED = 3; // Secure Nfc enabled.
- CRASH_RESTART = 4; // NfcService watchdog timeout restart.
- }
- optional State state = 1;
-}
-
-/**
- * Logs when a NFC Beam Transaction occurred.
- * Logged from:
- * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
- */
-message NfcBeamOccurred {
- enum Operation {
- UNKNOWN = 0;
- SEND = 1;
- RECEIVE = 2;
- }
- optional Operation operation = 1;
-}
-
-/**
- * Logs when a NFC Card Emulation Transaction occurred.
- * Logged from:
- * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java
- * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java
- */
-message NfcCardemulationOccurred {
- enum Category {
- UNKNOWN = 0;
- HCE_PAYMENT = 1;
- HCE_OTHER = 2;
- OFFHOST = 3;
- }
- // Transaction belongs to HCE payment or HCE other category, or offhost.
- optional Category category = 1;
- // SeName from transaction: SIMx, eSEx, HCE, HCEF.
- optional string se_name = 2;
-}
-
-/**
- * Logs when a NFC Tag event occurred.
- * Logged from:
- * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java
- */
-message NfcTagOccurred {
- enum Type {
- UNKNOWN = 0;
- URL = 1;
- BT_PAIRING = 2;
- PROVISION = 3;
- WIFI_CONNECT = 4;
- APP_LAUNCH = 5;
- OTHERS = 6;
- }
- optional Type type = 1;
-}
-
-/**
- * Logs when Hce transaction triggered
- * Logged from:
- * system/nfc/src/nfc/nfc/nfc_ncif.cc
- */
-message NfcHceTransactionOccurred {
- // The latency period(in microseconds) it took for the first HCE data
- // exchange.
- optional uint32 latency_micros = 1;
-}
-
-/**
- * Logs when SecureElement state event changed
- * Logged from:
- * packages/apps/SecureElement/src/com/android/se/Terminal.java
- */
-message SeStateChanged {
- enum State {
- UNKNOWN = 0;
- INITIALIZED = 1;
- DISCONNECTED = 2;
- CONNECTED = 3;
- HALCRASH = 4;
- }
- optional State state = 1;
-
- optional string state_change_reason = 2;
- // SIMx or eSEx.
- optional string terminal = 3;
-}
-
-/**
- * Information about a permission grant request
- */
-message PermissionGrantRequestResultReported {
- // unique value identifying an API call. A API call might result in multiple of these atoms
- optional int64 request_id = 1;
-
- // UID of package requesting the permission grant
- optional int32 uid = 2 [(is_uid) = true];
-
- // Name of package requesting the permission grant
- optional string package_name = 3;
-
- // The permission to be granted
- optional string permission_name = 4;
-
- // If the permission was explicitly requested via the API or added by the system
- optional bool is_implicit = 5;
-
- enum Result {
- UNDEFINED = 0;
- // permission request was ignored
- IGNORED = 1;
- // permission request was ignored because it was user fixed
- IGNORED_USER_FIXED = 2;
- // permission request was ignored because it was policy fixed
- IGNORED_POLICY_FIXED = 3;
- // permission was granted by user action
- USER_GRANTED = 4;
- // permission was automatically granted
- AUTO_GRANTED = 5;
- // permission was denied by user action
- USER_DENIED = 6;
- // permission was denied with prejudice by the user
- USER_DENIED_WITH_PREJUDICE = 7;
- // permission was automatically denied
- AUTO_DENIED = 8;
- // permission request was ignored because permission is restricted
- IGNORED_RESTRICTED_PERMISSION = 9;
- // one time permission was granted by user action
- USER_GRANTED_ONE_TIME = 10;
- // user ignored request by leaving the request screen without choosing any option
- USER_IGNORED = 11;
- // user granted the permission after being linked to settings
- USER_GRANTED_IN_SETTINGS = 12;
- // user denied the permission after being linked to settings
- USER_DENIED_IN_SETTINGS = 13;
- // user denied the permission with prejudice after being linked to settings
- USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14;
- // permission was automatically revoked after one-time permission expired
- AUTO_ONE_TIME_PERMISSION_REVOKED = 15;
- // permission was automatically revoked for unused app
- AUTO_UNUSED_APP_PERMISSION_REVOKED = 16;
- }
- // The result of the permission grant
- optional Result result = 6;
-}
-
-/**
- * Logs when Omapi API used
- * Logged from:
- * packages/apps/SecureElement/src/com/android/se/Terminal.java
- */
-message SeOmapiReported {
- enum Operation {
- UNKNOWN = 0;
- OPEN_CHANNEL = 1;
- }
- optional Operation operation = 1;
- // SIMx or eSEx.
- optional string terminal = 2;
-
- optional string package_name = 3;
-}
-
-/**
- * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED.
- * The dispatch latency is the dispatchClockTime - enqueueClockTime.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
- */
-message BroadcastDispatchLatencyReported {
- optional int64 dispatch_latency_millis = 1;
-}
-
-/**
- * Logs AttentionManagerService attention check result.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java
- */
-message AttentionManagerServiceResultReported {
- // See core/java/android/service/attention/AttentionService.java
- enum AttentionCheckResult {
- UNKNOWN = 20;
- ATTENTION_SUCCESS_ABSENT = 0;
- ATTENTION_SUCCESS_PRESENT = 1;
- ATTENTION_FAILURE_UNKNOWN = 2;
- ATTENTION_FAILURE_CANCELLED = 3;
- ATTENTION_FAILURE_PREEMPTED = 4;
- ATTENTION_FAILURE_TIMED_OUT = 5;
- ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6;
- }
- optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN];
-}
-
-/**
- * Logs when an adb connection changes state.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java
- */
-message AdbConnectionChanged {
- // The last time this system connected via adb, or 0 if the 'always allow' option was not
- // previously selected for this system.
- optional int64 last_connection_time_millis = 1;
-
- // The time in ms within which a subsequent connection from an 'always allow' system is allowed
- // to reconnect via adb without user interaction.
- optional int64 auth_window_millis = 2;
-
- // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto.
- optional android.debug.AdbConnectionStateEnum state = 3;
-
- // True if the 'always allow' option was selected for this system.
- optional bool always_allow = 4;
-}
-
-/*
- * Logs the reported speech DSP status.
- *
- * Logged from:
- * Vendor audio implementation.
- */
-message SpeechDspStatReported {
- // The total Speech DSP uptime in milliseconds.
- optional int32 total_uptime_millis = 1;
- // The total Speech DSP downtime in milliseconds.
- optional int32 total_downtime_millis = 2;
- optional int32 total_crash_count = 3;
- optional int32 total_recover_count = 4;
-}
-
-/**
- * Logs USB connector contaminant status.
- *
- * Logged from: USB Service.
- */
-message UsbContaminantReported {
- optional string id = 1;
- optional android.service.usb.ContaminantPresenceStatus status = 2;
-}
-
-/**
- * This atom is for debugging purpose.
- */
-message DebugElapsedClock {
- // Monotically increasing value for each pull.
- optional int64 pull_count = 1;
- // Time from System.elapsedRealtime.
- optional int64 elapsed_clock_millis = 2;
- // Time from System.elapsedRealtime.
- optional int64 same_elapsed_clock_millis = 3;
- // Diff between current elapsed time and elapsed time from previous pull.
- optional int64 elapsed_clock_diff_millis = 4;
-
- enum Type {
- TYPE_UNKNOWN = 0;
- ALWAYS_PRESENT = 1;
- PRESENT_ON_ODD_PULLS = 2;
- }
- // Type of behavior for the pulled data.
- optional Type type = 5;
-}
-
-/**
- * This atom is for debugging purpose.
- */
-message DebugFailingElapsedClock {
- // Monotically increasing value for each pull.
- optional int64 pull_count = 1;
- // Time from System.elapsedRealtime.
- optional int64 elapsed_clock_millis = 2;
- // Time from System.elapsedRealtime.
- optional int64 same_elapsed_clock_millis = 3;
- // Diff between current elapsed time and elapsed time from previous pull.
- optional int64 elapsed_clock_diff_millis = 4;
-}
-
-/** Logs System UI bubbles event changed.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles
- */
-message BubbleUIChanged {
-
- // The app package that is posting the bubble.
- optional string package_name = 1;
-
- // The notification channel that is posting the bubble.
- optional string notification_channel = 2;
-
- // The notification id associated with the posted bubble.
- optional int32 notification_id = 3;
-
- // The position of the bubble within the bubble stack.
- optional int32 position = 4;
-
- // The total number of bubbles within the bubble stack.
- optional int32 total_number = 5;
-
- // User interactions with the bubble.
- enum Action {
- UNKNOWN = 0;
- POSTED = 1;
- UPDATED = 2;
- EXPANDED = 3;
- COLLAPSED = 4;
- DISMISSED = 5;
- STACK_DISMISSED = 6;
- STACK_MOVED = 7;
- HEADER_GO_TO_APP = 8;
- HEADER_GO_TO_SETTINGS = 9;
- PERMISSION_OPT_IN = 10;
- PERMISSION_OPT_OUT = 11;
- PERMISSION_DIALOG_SHOWN = 12;
- SWIPE_LEFT = 13;
- SWIPE_RIGHT = 14;
- STACK_EXPANDED = 15;
- FLYOUT = 16;
- }
- optional Action action = 6;
-
- // Normalized screen position of the bubble stack. The range is between 0 and 1.
- optional float normalized_x_position = 7;
- optional float normalized_y_position = 8;
-
- // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon.
- optional bool is_unread = 9;
-
- // Whether the bubble is an on-going one.
- optional bool is_ongoing = 10;
-
- // Whether the bubble is produced by an app running in foreground.
- // This is deprecated and the value should be ignored.
- optional bool is_foreground = 11 [deprecated = true];
-}
-
-/**
- * Logs System UI bubbles developer errors.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
- */
-message BubbleDeveloperErrorReported {
-
- // The app package that is posting the bubble.
- optional string package_name = 1;
-
- // Bubble developer error type enums.
- enum Error {
- UNKNOWN = 0;
- ACTIVITY_INFO_MISSING = 1;
- ACTIVITY_INFO_NOT_RESIZABLE = 2;
- DOCUMENT_LAUNCH_NOT_ALWAYS = 3;
- }
- optional Error error = 2 [default = UNKNOWN];
-}
-
-/**
- * Logs that a constraint for a scheduled job has changed.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java
- */
-message ScheduledJobConstraintChanged {
- repeated AttributionNode attribution_node = 1;
-
- // Name of the job.
- optional string job_name = 2;
-
- optional com.android.server.job.ConstraintEnum constraint = 3;
-
- enum State {
- UNKNOWN = 0;
- UNSATISFIED = 1;
- SATISFIED = 2;
- }
- optional State state = 4;
-}
-
-/**
- * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check
- * returns true.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
- */
-message ScreenTimeoutExtensionReported {
- // Describes how many times in a row did the power manager reset the screen off timeout.
- optional uint32 consecutive_timeout_extended_count = 1;
-}
-
-/*
-* Logs number of milliseconds it takes to start a process.
-* The definition of app process start time is from the app launch time to
-* the time that Zygote finished forking the app process and loaded the
-* application package's java classes.
-
-* This metric is different from AppStartOccurred which is for foreground
-* activity only.
-
-* ProcessStartTime can report all processes (both foreground and background)
-* start time.
-*
-* Logged from:
-* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
-*/
-message ProcessStartTime {
- // The uid of the ProcessRecord.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The process pid.
- optional int32 pid = 2;
-
- // The process name.
- // Usually package name, "system" for system server.
- // Provided by ActivityManagerService.
- optional string process_name = 3;
-
- enum StartType {
- UNKNOWN = 0;
- WARM = 1;
- HOT = 2;
- COLD = 3;
- }
-
- // The start type.
- optional StartType type = 4;
-
- // The elapsed realtime at the start of the process.
- optional int64 process_start_time_millis = 5;
-
- // Number of milliseconds it takes to reach bind application.
- optional int32 bind_application_delay_millis = 6;
-
- // Number of milliseconds it takes to finish start of the process.
- optional int32 process_start_delay_millis = 7;
-
- // hostingType field in ProcessRecord, the component type such as "activity",
- // "service", "content provider", "broadcast" or other strings.
- optional string hosting_type = 8;
-
- // hostingNameStr field in ProcessRecord. The component class name that runs
- // in this process.
- optional string hosting_name = 9;
-}
-
-/**
- * Track Media Codec usage
- * Logged from:
- * frameworks/av/media/libstagefright/MediaCodec.cpp
- * frameworks/av/services/mediaanalytics/statsd_codec.cpp
- */
-message MediametricsCodecReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track Media Extractor (pulling video/audio streams out of containers) usage
- * Logged from:
- * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp
- * frameworks/av/services/mediaanalytics/statsd_extractor.cpp
- */
-message MediametricsExtractorReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track how we arbitrate between microphone/input requests.
- * Logged from
- * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
- * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp
- */
-message MediametricsAudiopolicyReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track how we arbitrate between microphone requests.
- * Logged from
- * frameworks/av/media/libaudioclient/AudioRecord.cpp
- * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp
- */
-message MediametricsAudiorecordReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track how we arbitrate between microphone/input requests.
- * Logged from
- * frameworks/av/media/libnblog/ReportPerformance.cpp
- * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp
- */
-message MediametricsAudiothreadReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track how we arbitrate between microphone/input requests.
- * Logged from
- * frameworks/av/media/libaudioclient/AudioTrack.cpp
- * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp
- */
-message MediametricsAudiotrackReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track information about DRM framework performance
- * Logged from
- * frameworks/av/drm/libmediadrm/DrmHal.cpp
- * frameworks/av/services/mediaanalytics/statsd_drm.cpp
- */
-message MediametricsMediadrmReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- // vendor+description tell about which DRM plugin is in use on this device
- optional string vendor = 5;
- optional string description = 6;
- // from frameworks/av/drm/libmediadrm/protos/metrics.proto
- optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track information about the widevine DRM plugin performance
- * Logged from
- * vendor/widevine/libwvdrmengine/cdm/metrics
- * frameworks/av/services/mediaanalytics/statsd_drm.cpp
- */
-message MediametricsDrmWidevineReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track information about recordings (e.g. camcorder)
- * Logged from
- * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp
- * frameworks/av/services/mediaanalytics/statsd_recorder.cpp
- */
-message MediametricsRecorderReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track Media Player usage
- * Logged from:
- * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
- * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp
- */
-message MediametricsNuPlayerReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Track Legacy DRM usage
- * Logged from
- * frameworks/av/drm/drmserver/DrmManager.cpp
- */
-message MediametricsDrmManagerReported {
- optional int64 timestamp_nanos = 1;
- optional string package_name = 2;
- optional int64 package_version_code = 3;
- optional int64 media_apex_version = 4;
-
- enum Method {
- METHOD_NOT_FOUND = -1;
- GET_CONSTRAINTS = 0;
- GET_METADATA = 1;
- CAN_HANDLE = 2;
- PROCESS_DRM_INFO = 3;
- ACQUIRE_DRM_INFO = 4;
- SAVE_RIGHTS = 5;
- GET_ORIGINAL_MIME_TYPE = 6;
- GET_DRM_OBJECT_TYPE = 7;
- CHECK_RIGHTS_STATUS = 8;
- REMOVE_RIGHTS = 9;
- REMOVE_ALL_RIGHTS = 10;
- OPEN_CONVERT_SESSION = 11;
- OPEN_DECRYPT_SESSION = 12;
- }
-
- // plugin_id+description inform which Legacy DRM plugins are still in use on device
- optional string plugin_id = 5;
- optional string description = 6;
- optional Method method = 7;
- optional string mime_types = 8;
-
- optional int64 get_constraints_count = 9;
- optional int64 get_metadata_count = 10;
- optional int64 can_handle_count = 11;
- optional int64 process_drm_info_count = 12;
- optional int64 acquire_drm_info_count = 13;
- optional int64 save_rights_count = 14;
- optional int64 get_original_mime_type_count = 15;
- optional int64 get_drm_object_type_count = 16;
- optional int64 check_rights_status_count = 17;
- optional int64 remove_rights_count = 18;
- optional int64 remove_all_rights_count = 19;
- optional int64 open_convert_session_count = 20;
- optional int64 open_decrypt_session_count = 21;
-}
-
-/**
- * State of a dangerous permission requested by a package
- * Pulled from: StatsCompanionService
-*/
-message DangerousPermissionState {
- // Name of the permission
- optional string permission_name = 1;
-
- // Uid of the package
- optional int32 uid = 2 [(is_uid) = true];
-
- // Package requesting the permission
- optional string package_name = 3;
-
- // If the permission is granted to the uid
- optional bool is_granted = 4;
-
- // Permission flags as per android.content.pm.PermissionFlags
- optional int32 permission_flags = 5;
-}
-
-/**
- * Logs when a package is denied access to a device identifier based on the new access requirements.
- *
- * Logged from:
- * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
- */
-message DeviceIdentifierAccessDenied {
- // The name of the package denied access to the requested device identifier.
- optional string package_name = 1;
-
- // The name of the device identifier method the package attempted to invoke.
- optional string method_name = 2;
-
- // True if the package is preinstalled.
- // Starting from Android 11, this boolean is not set and will always be false.
- optional bool is_preinstalled = 3 [deprecated = true];
-
- // True if the package is privileged.
- // Starting from Android 11, this boolean is not set and will always be false.
- optional bool is_priv_app = 4 [deprecated = true];
-}
-
-/**
- * Pulls the ongoing mainline install train version code.
- * Pulled from StatsCompanionService
- */
-message TrainInfo {
- optional int64 train_version_code = 1;
-
- optional TrainExperimentIds train_experiment_id = 2;
-
- optional string train_name = 3;
-
- enum Status {
- UNKNOWN = 0;
- INSTALL_REQUESTED = 1;
- INSTALL_STARTED = 2;
- INSTALL_STAGED_NOT_READY = 3;
- INSTALL_STAGED_READY = 4;
- INSTALL_SUCCESS = 5;
- // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH,
- // and INSTALL_FAILURE_COMMIT.
- INSTALL_FAILURE = 6 [deprecated = true];
- // This enum is for installs that are manually cancelled via the Manual Update UI.
- INSTALL_CANCELLED = 7;
- INSTALLER_ROLLBACK_REQUESTED = 8;
- INSTALLER_ROLLBACK_INITIATED = 9;
- INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
- INSTALLER_ROLLBACK_STAGED = 11;
- INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
- INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
- INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
- INSTALLER_ROLLBACK_SUCCESS = 15;
- INSTALLER_ROLLBACK_FAILURE = 16;
- INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17;
- INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18;
- INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19;
- INSTALL_STAGED_CANCEL_REQUESTED = 20;
- INSTALL_STAGED_CANCEL_SUCCESS = 21;
- INSTALL_STAGED_CANCEL_FAILURE = 22;
- INSTALL_FAILURE_DOWNLOAD = 23;
- INSTALL_FAILURE_STATE_MISMATCH = 24;
- INSTALL_FAILURE_COMMIT = 25;
- REBOOT_TRIGGERED = 26;
- }
- optional Status status = 4;
-}
-
-/**
- * Logs the gesture stage changed event.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/
- */
-message AssistGestureStageReported {
- optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1;
-}
-
-/**
- * Logs the feedback type.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/
- */
-message AssistGestureFeedbackReported {
- // Whether or not the gesture was used.
- optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1;
-}
-
-/**
- * Logs the progress.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/
- */
-message AssistGestureProgressReported {
- // [0,100] progress for the assist gesture.
- optional int32 progress = 1;
-}
-
-/*
- * Information about the time zone data on a device.
- */
-message TimeZoneDataInfo {
- // A version identifier for the data set on device. e.g. "2018i"
- optional string tzdb_version = 1;
-}
-
-/**
- * Logs the GPU stats global health information.
- *
- * Logged from:
- * frameworks/native/services/gpuservice/gpustats/
- */
-message GpuStatsGlobalInfo {
- // Package name of the gpu driver.
- optional string driver_package_name = 1;
-
- // Version name of the gpu driver.
- optional string driver_version_name = 2;
-
- // Version code of the gpu driver.
- optional int64 driver_version_code = 3;
-
- // Build time of the gpu driver in UTC as seconds since January 1, 1970.
- optional int64 driver_build_time = 4;
-
- // Total count of the gl driver gets loaded.
- optional int64 gl_loading_count = 5;
-
- // Total count of the gl driver fails to be loaded.
- optional int64 gl_loading_failure_count = 6;
-
- // Total count of the Vulkan driver gets loaded.
- optional int64 vk_loading_count = 7;
-
- // Total count of the Vulkan driver fails to be loaded.
- optional int64 vk_loading_failure_count = 8;
-
- // Api version of the system Vulkan driver.
- optional int32 vulkan_version = 9;
-
- // Api version of the system CPU Vulkan driver.
- optional int32 cpu_vulkan_version = 10;
-
- // Api version of the system GLES driver.
- optional int32 gles_version = 11;
-
- // Total count of the angle driver gets loaded.
- optional int64 angle_loading_count = 12;
-
- // Total count of the angle driver fails to be loaded.
- optional int64 angle_loading_failure_count = 13;
-}
-
-/**
- * GPU driver loading time info.
- */
-message GpuDriverLoadingTime {
- // List of all the driver loading times for this app. The list size is
- // capped at 50.
- repeated int64 driver_loading_time = 1;
-}
-
-/**
- * Logs the GPU stats per app health information.
- *
- * Logged from:
- * frameworks/native/services/gpuservice/gpustats/
- */
-message GpuStatsAppInfo {
- // Package name of the application that loads the gpu driver. Total number
- // of different packages is capped at 100.
- optional string app_package_name = 1;
-
- // Version code of the gpu driver this app loads.
- optional int64 driver_version_code = 2;
-
- // gl driver loading time info.
- optional GpuDriverLoadingTime gl_driver_loading_time = 3
- [(android.os.statsd.log_mode) = MODE_BYTES];
-
- // Vulkan driver loading time info.
- optional GpuDriverLoadingTime vk_driver_loading_time = 4
- [(android.os.statsd.log_mode) = MODE_BYTES];
-
- // Angle driver loading time info.
- optional GpuDriverLoadingTime angle_driver_loading_time = 5
- [(android.os.statsd.log_mode) = MODE_BYTES];
-
- // CPU Vulkan implementation is in use.
- optional bool cpu_vulkan_in_use = 6;
-
- // App is not doing pre-rotation correctly.
- optional bool false_prerotation = 7;
-
- // App creates GLESv1 context.
- optional bool gles_1_in_use = 8;
-}
-
-/*
- * Logs the size of the system ion heap.
- *
- * Pulled from StatsCompanionService.
- */
-message SystemIonHeapSize {
- // Deprecated due to limited support of ion stats in debugfs.
- // Use `IonHeapSize` instead.
- option deprecated = true;
-
- // Size of the system ion heap in bytes.
- // Read from debugfs.
- optional int64 size_in_bytes = 1;
-}
-
-/*
- * Logs the total size of the ion heap.
- *
- * Pulled from StatsCompanionService.
- */
-message IonHeapSize {
- // Total size of all ion heaps in kilobytes.
- // Read from: /sys/kernel/ion/total_heaps_kb.
- optional int32 total_size_kb = 1;
-}
-
-/*
- * Logs the per-process size of the system ion heap.
- *
- * Pulled from StatsCompanionService.
- */
-message ProcessSystemIonHeapSize {
- // The uid if available. -1 means not available.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The process name (from /proc/PID/cmdline).
- optional string process_name = 2;
-
- // Sum of sizes of all allocations.
- optional int32 total_size_in_kilobytes = 3;
-
- // Number of allocations.
- optional int32 allocation_count = 4;
-
- // Size of the largest allocation.
- optional int32 max_size_in_kilobytes = 5;
-}
-
-/**
- * Push network stack events.
- *
- * Log from:
- * frameworks/base/packages/NetworkStack/
- */
-message NetworkStackReported {
- // The id that indicates the event reported from NetworkStack.
- optional int32 event_id = 1;
- // The data for the reported events.
- optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES];
-}
-
-/**
- * Logs the apps that are installed on the external storage.
- * Pulled from:
- * StatsCompanionService
- */
-message AppsOnExternalStorageInfo {
- // The type of the external storage.
- optional android.stats.storage.ExternalStorageType external_storage_type = 1;
- // The name of the package that is installed on the external storage.
- optional string package_name = 2;
-}
-
-/**
- * Logs the settings related to Face.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/stats
- */
-message FaceSettings {
- // Whether or not face unlock is allowed on Keyguard.
- optional bool unlock_keyguard_enabled = 1;
- // Whether or not face unlock dismisses the Keyguard.
- optional bool unlock_dismisses_keyguard = 2;
- // Whether or not face unlock requires attention.
- optional bool unlock_attention_required = 3;
- // Whether or not face unlock is allowed for apps (through BiometricPrompt).
- optional bool unlock_app_enabled = 4;
- // Whether or not face unlock always requires user confirmation.
- optional bool unlock_always_require_confirmation = 5;
- // Whether or not a diverse set of poses are required during enrollment.
- optional bool unlock_diversity_required = 6;
-}
-
-/**
- * Logs cooling devices maintained by the kernel.
- *
- * Pulled from StatsCompanionService.java
- */
-message CoolingDevice {
- // The type of cooling device being reported. Eg. CPU, GPU...
- optional android.os.CoolingTypeEnum device_location = 1;
- // The name of the cooling device source. Eg. CPU0
- optional string device_name = 2;
- // Current throttle state of the cooling device. The value can any unsigned
- // integer between 0 and max_state defined in its driver. 0 means device is
- // not in throttling, higher value means deeper throttling.
- optional int32 state = 3;
-}
-
-/**
- * Intelligence has several counter-type events that don't warrant a
- * full separate atom. These are primarily API call counters but also include
- * counters for feature usage and specific failure modes.
- *
- * Logged from the Intelligence mainline module.
- */
-message IntelligenceEventReported {
- // The event type.
- optional android.stats.intelligence.EventType event_id = 1;
- // Success, failure.
- optional android.stats.intelligence.Status status = 2;
- // How many times the event occured (to report a batch of high frequency events).
- optional int32 count = 3;
- // How long the event took (sum of durations if count > 1)
- optional int64 duration_millis = 4;
-}
-
-/**
- * Logs when Car Power state changed.
- *
- * Logged from:
- * packages/services/Car/service/src/com/android/car/CarStatsLog.java
- */
-message CarPowerStateChanged {
- // States come from CpmsState in CarPowerManagementService.java.
- enum State {
- WAIT_FOR_VHAL = 0;
- ON = 1;
- SHUTDOWN_PREPARE = 2;
- WAIT_FOR_FINISH = 3;
- SUSPEND = 4;
- SIMULATE_SLEEP = 5;
- }
- optional State state = 1;
-}
-
-/**
- * Logs when Car User Hal is requested to switch/create/remove user.
- *
- * Logged from:
- * packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalModifyUserRequestReported {
- // Request id for the request.
- optional int32 request_id = 1;
- // Request type.
- enum RequestType {
- UNKNOWN = 0;
- // Car user manager requested user switch.
- SWITCH_REQUEST_ANDROID = 1;
- // OEM requested User switch.
- SWITCH_REQUEST_OEM = 2;
- // Hal switch requested after android switch using activity manager.
- SWITCH_REQUEST_LEGACY = 3;
- // Create User
- CREATE_REQUEST = 4;
- // Remove User
- REMOVE_REQUEST = 5;
- }
- optional RequestType request_type = 2;
- // Android User id of the current user which can only be 0, 10, 11 and so on.
- // -1 if not available.
- optional int32 user_id = 3;
- // VHAL flags of the current user. (-1 if not available)
- optional int32 user_flags = 4;
- // Android User id of the target user for switch/create/remove. It can only
- // be 0, 10, 11 and so on. -1 if not available.
- optional int32 target_user_id = 5;
- // VHAL flags of the target user for switch/create/remove. (-1 if not available)
- optional int32 target_user_flags = 6;
- // Request timeout Milliseconds (-1 if not available)
- optional int32 timeout_millis = 7;
-}
-
-/**
- * Logs when Car User Hal responds to switch/create user request.
- *
- * Logged from:
- * packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalModifyUserResponseReported {
- // Request id of the request associated with the response.
- optional int32 request_id = 1;
- // Car user hal callback status.
- enum CallbackStatus {
- UNKNOWN = 0;
- // Hal response was invalid.
- INVALID = 1;
- // Hal response was ok.
- OK = 2;
- // Hal timeout during set call.
- HAL_SET_TIMEOUT = 3;
- // Hal response timeout.
- HAL_RESPONSE_TIMEOUT = 4;
- // Hal responded with wrong info.
- WRONG_HAL_RESPONSE = 5;
- // Hal is processing multiple requests simultaneously.
- CONCURRENT_OPERATION = 6;
- }
- optional CallbackStatus callback_status = 2;
-
- // Hal request status for user switch/create/remove.
- enum HalRequestStatus {
- UNSPECIFIED = 0;
- // Hal request for user switch/create is successful.
- SUCCESS = 1;
- // Hal request for user switch/create failed.
- FAILURE = 2;
- }
- optional HalRequestStatus request_status = 3;
-}
-
-/**
- * Logs when post switch response is posted to Car User Hal.
- *
- * Logged from:
- * packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalPostSwitchResponseReported {
- // Request id.
- optional int32 request_id = 1;
-
- // Android user switch status.
- enum UserSwitchStatus {
- UNKNOWN = 0;
- // Android user switch is successful.
- SUCCESS = 1;
- // Android user switch failed.
- FAILURE = 2;
- }
- optional UserSwitchStatus switch_status = 2;
-}
-
-/**
- * Logs when initial user information is requested from Car User Hal.
- *
- * Logged from:
- * packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalInitialUserInfoRequestReported {
- // Request id for the request.
- optional int32 request_id = 1;
-
- // Request type for initial user information.
- enum InitialUserInfoRequestType {
- UNKNOWN = 0;
- // At the first time Android was booted (or after a factory reset).
- FIRST_BOOT = 1;
- // At the first time Android was booted after the system was updated.
- FIRST_BOOT_AFTER_OTA = 2;
- // When Android was booted "from scratch".
- COLD_BOOT = 3;
- // When Android was resumed after the system was suspended to memory.
- RESUME = 4;
- }
- optional InitialUserInfoRequestType request_type = 2;
- // Request timeout Milliseconds (-1 if not available)
- optional int32 timeout_millis = 3;
-}
-
-/**
- * Logs when Car User Hal responds to initial user information requests.
- *
- * Logged from:
- * packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalInitialUserInfoResponseReported {
- // Request id of the request associated with the response.
- optional int32 request_id = 1;
- // Car user hal callback status.
- enum CallbackStatus {
- UNKNOWN = 0;
- // Hal response was invalid.
- INVALID = 1;
- // Hal response was ok.
- OK = 2;
- // Hal timeout during set call.
- HAL_SET_TIMEOUT = 3;
- // Hal response timeout.
- HAL_RESPONSE_TIMEOUT = 4;
- // Hal responded with wrong info.
- WRONG_HAL_RESPONSE = 5;
- // Hal is processing multiple requests simultaneously.
- CONCURRENT_OPERATION = 6;
- }
- optional CallbackStatus callback_status = 2;
- // Response for initial user information request.
- enum InitialUserInfoResponseAction {
- UNSPECIFIED = 0;
- // Let the Android System decide what to do.
- DEFAULT = 1;
- // Switch to an existing Android user.
- SWITCH = 2;
- // Create a new Android user (and switch to it).
- CREATE = 3;
- }
- optional InitialUserInfoResponseAction response_action = 3;
- // Android User id of the target user which can only be 0, 10, 11 and so on.
- // -1 if not available.
- optional int32 target_user = 4;
- // VHAL flags of the current user. (-1 if not available)
- optional int32 target_user_flags = 5;
- // User locales
- optional string user_locales = 6;
-}
-
-/**
- * Logs when set user association is requested from Car User Hal.
- *
- * Logged from:
- * packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalUserAssociationRequestReported {
- // Request id for the request.
- optional int32 request_id = 1;
- // Request type.
- enum RequestType {
- UNKNOWN = 0;
- // For setting user association information.
- SET = 1;
- // For getting user association information.
- GET = 2;
- }
- optional RequestType request_type = 2;
- // Android User id of the current user which can only be 0, 10, 11 and so on.
- // -1 if not available.
- optional int32 current_user_id = 3;
- // VHAL flags of the current user. (-1 if not available)
- optional int32 current_user_flags = 4;
- // Number of the set associations requested.
- optional int32 number_associations = 5;
- // Concatenated string for the types from set associations request.
- // This is a string converted from an array of integers.
- optional string user_identification_association_types = 6;
- // Concatenated string for the values from set associations request.
- // This is a string converted from an array of integers.
- optional string user_identification_association_values = 7;
-}
-
-/**
- * Logs when Car User Hal responds to set user association requests.
- *
- * Logged from:
- * packages/services/Car/service/src/com/android/car/hal/UserHalService.java
- */
-message CarUserHalSetUserAssociationResponseReported {
- // Request id of the request associated with the response.
- optional int32 request_id = 1;
- // Car user hal callback status.
- enum CallbackStatus {
- UNKNOWN = 0;
- // Hal response was invalid.
- INVALID = 1;
- // Hal response was ok.
- OK = 2;
- // Hal timeout during set call.
- HAL_SET_TIMEOUT = 3;
- // Hal response timeout.
- HAL_RESPONSE_TIMEOUT = 4;
- // Hal responded with wrong info.
- WRONG_HAL_RESPONSE = 5;
- // Hal is processing multiple requests simultaneously.
- CONCURRENT_OPERATION = 6;
- }
- optional CallbackStatus callback_status = 2;
- // Number of the set associations in the response.
- optional int32 number_associations = 3;
- // Concatenated string for the types from set associations request.
- // This is a string converted from an array of integers.
- optional string user_identification_association_types = 4;
- // Concatenated string for the values from set associations request.
- // This is a string converted from an array of integers.
- optional string user_identification_association_values = 5;
-}
-
-/**
- * Logs whether GarageMode is entered.
- *
- * Logged from:
- * packages/services/Car/service/src/com/android/car/CarStatsLog.java
- */
-message GarageModeInfo {
- // Whether GarageMode is entered.
- optional bool is_garage_mode = 1;
-}
-
-/**
- * Historical app ops data per package.
- */
-message AppOps {
- // Uid of the package requesting the op
- optional int32 uid = 1 [(is_uid) = true];
-
- // Name of the package performing the op
- optional string package_name = 2;
-
- // operation id
- optional android.app.AppOpEnum op_id = 3 [default = APP_OP_NONE];
-
- // The number of times the op was granted while the app was in the
- // foreground (only for trusted requests)
- optional int64 trusted_foreground_granted_count = 4;
-
- // The number of times the op was granted while the app was in the
- // background (only for trusted requests)
- optional int64 trusted_background_granted_count = 5;
-
- // The number of times the op was rejected while the app was in the
- // foreground (only for trusted requests)
- optional int64 trusted_foreground_rejected_count = 6;
-
- // The number of times the op was rejected while the app was in the
- // background (only for trusted requests)
- optional int64 trusted_background_rejected_count = 7;
-
- // For long-running operations, total duration of the operation
- // while the app was in the foreground (only for trusted requests)
- optional int64 trusted_foreground_duration_millis = 8;
-
- // For long-running operations, total duration of the operation
- // while the app was in the background (only for trusted requests)
- optional int64 trusted_background_duration_millis = 9;
-
- // Whether AppOps is guarded by Runtime permission
- optional bool is_runtime_permission = 10;
-}
-
-/**
- * Historical app ops data per package and attribution tag.
- */
-message AttributedAppOps {
- // Uid of the package requesting the op
- optional int32 uid = 1 [(is_uid) = true];
-
- // Name of the package performing the op
- optional string package_name = 2;
-
- // tag; provided by developer when accessing related API, limited at 50 chars by API.
- // Attributions must be provided through manifest using <attribution> tag available in R and
- // above.
- optional string tag = 3;
-
- // operation id
- optional android.app.AppOpEnum op = 4 [default = APP_OP_NONE];
-
- // The number of times the op was granted while the app was in the
- // foreground (only for trusted requests)
- optional int64 trusted_foreground_granted_count = 5;
-
- // The number of times the op was granted while the app was in the
- // background (only for trusted requests)
- optional int64 trusted_background_granted_count = 6;
-
- // The number of times the op was rejected while the app was in the
- // foreground (only for trusted requests)
- optional int64 trusted_foreground_rejected_count = 7;
-
- // The number of times the op was rejected while the app was in the
- // background (only for trusted requests)
- optional int64 trusted_background_rejected_count = 8;
-
- // For long-running operations, total duration of the operation
- // while the app was in the foreground (only for trusted requests)
- optional int64 trusted_foreground_duration_millis = 9;
-
- // For long-running operations, total duration of the operation
- // while the app was in the background (only for trusted requests)
- optional int64 trusted_background_duration_millis = 10;
-
- // Whether AppOps is guarded by Runtime permission
- optional bool is_runtime_permission = 11;
-
- // Sampling rate used on device, from 0 to 100
- optional int32 sampling_rate = 12;
-}
-
-/**
- * Location Manager API Usage information(e.g. API under usage,
- * API call's parameters).
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/LocationManagerService.java
- */
-message LocationManagerApiUsageReported {
-
- // Indicating if usage starts or usage ends.
- optional android.stats.location.UsageState state = 1;
-
- // LocationManagerService's API in use.
- // We can identify which API from LocationManager is
- // invoking current LMS API by the combination of
- // API parameter(e.g. is_listener_null, is_intent_null,
- // is_location_request_null)
- optional android.stats.location.LocationManagerServiceApi api_in_use = 2;
-
- // Name of the package calling the API.
- optional string calling_package_name = 3;
-
- // Type of the location provider.
- optional android.stats.location.ProviderType provider = 4;
-
- // Quality of the location request
- optional android.stats.location.LocationRequestQuality quality = 5;
-
- // The desired interval for active location updates, in milliseconds.
- // Bucketized to reduce cardinality.
- optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6;
-
- // Minimum distance between location updates, in meters.
- // Bucketized to reduce cardinality.
- optional android.stats.location.SmallestDisplacementBucket
- bucketized_smallest_displacement = 7;
-
- // The number of location updates.
- optional int64 num_updates = 8;
-
- // The request expiration time, in millisecond since boot.
- // Bucketized to reduce cardinality.
- optional android.stats.location.ExpirationBucket
- bucketized_expire_in = 9;
-
- // Type of Callback passed in for this API.
- optional android.stats.location.CallbackType callback_type = 10;
-
- // The radius of the central point of the alert
- // region, in meters. Only for API REQUEST_GEOFENCE.
- // Bucketized to reduce cardinality.
- optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11;
-
- // Activity Importance of API caller.
- // Categorized to 3 types that are interesting from location's perspective.
- optional android.stats.location.ActivityImportance activiy_importance = 12;
-}
-
-/**
- * Information about a permission grant or denial made by user inside ReviewPermissionsFragment
- */
-message ReviewPermissionsFragmentResultReported {
- // unique value identifying a permission group change. A permission group change might result
- // in multiple of these atoms
- optional int64 change_id = 1;
-
- // UID of package the permission belongs to
- optional int32 uid = 2 [(is_uid) = true];
-
- // Name of package the permission belongs to
- optional string package_name = 3;
-
- // The permission to be granted
- optional string permission_name = 4;
-
- // The result of the permission grant
- optional bool permission_granted = 5;
-}
-
-/**
-* Information about results of permission upgrade by RuntimePermissionsUpgradeController
-* Logged from: RuntimePermissionUpdgradeController
-*/
-message RuntimePermissionsUpgradeResult {
- // Permission granted as result of upgrade
- optional string permission_name = 1;
-
- // UID of package granted permission
- optional int32 uid = 2 [(is_uid) = true];
-
- // Name of package granted permission
- optional string package_name = 3;
-}
-
-/**
-* Information about a buttons presented in GrantPermissionsActivty and choice made by user
-*/
-message GrantPermissionsActivityButtonActions {
- // Permission granted as result of upgrade
- optional string permission_group_name = 1;
-
- // UID of package granted permission
- optional int32 uid = 2 [(is_uid) = true];
-
- // Name of package requesting permission
- optional string package_name = 3;
-
- // Buttons presented in the dialog - bit flags, bit numbers are in accordance with
- // LABEL_ constants in GrantPermissionActivity.java
- optional int32 buttons_presented = 4;
-
- // Button clicked by user - same as bit flags in buttons_presented with only single bit set
- optional int32 button_clicked = 5;
-
- // id which identifies single session of user interacting with permission controller
- optional int64 session_id = 6;
-}
-
-/**
- * Information about LocationAccessCheck notification presented to user
- */
-message LocationAccessCheckNotificationAction {
-
- // id which identifies single session of user interacting with permission controller
- optional int64 session_id = 1;
-
- // Uid of package for which location access check is presented
- optional int32 package_uid = 2;
-
- // Name of package for which location access check is presented
- optional string package_name = 3;
-
- enum Result {
- UNDEFINED = 0;
- // notification was presented to the user
- NOTIFICATION_PRESENTED = 1;
- // notification was declined by the user
- NOTIFICATION_DECLINED = 2;
- // notification was clicked by the user
- NOTIFICATION_CLICKED = 3;
- }
-
- // View / interaction recorded
- optional Result result = 4;
-}
-
-/**
- * Information about a permission grant or revoke made by user inside AppPermissionFragment
- */
-message AppPermissionFragmentActionReported {
- // id which identifies single session of user interacting with permission controller
- optional int64 session_id = 1;
-
- // unique value identifying a permission group change. A permission group change might result
- // in multiple of these atoms
- optional int64 change_id = 2;
-
- // UID of package the permission belongs to
- optional int32 uid = 3 [(is_uid) = true];
-
- // Name of package the permission belongs to
- optional string package_name = 4;
-
- // The permission to be granted
- optional string permission_name = 5;
-
- // The result of the permission grant
- optional bool permission_granted = 6;
-
- // State of Permission Flags after grant as per android.content.pm.PermissionFlags
- optional int32 permission_flags = 7;
-
- enum Button {
- UNDEFINED = 0;
- // Allow button
- ALLOW = 1;
- // Deny button
- DENY = 2;
- // Ask every time button
- ASK_EVERY_TIME = 3;
- // Allow all the time button
- ALLOW_ALWAYS = 4;
- // Allow only while using the app button
- ALLOW_FOREGROUND = 5;
- // Same is Deny button but shown in while in use dialog
- DENY_FOREGROUND = 6;
- }
-
- // Button pressed in the dialog
- optional Button button_pressed = 8;
-}
-
-/**
-* Information about a AppPermissionFragment viewed by user
-*/
-message AppPermissionFragmentViewed {
- // id which identifies single session of user interacting with permission controller
- optional int64 session_id = 1;
-
- // UID of package for which permissions are viewed
- optional int32 uid = 2 [(is_uid) = true];
-
- // Name of package for which permissions are viewed
- optional string package_name = 3;
-
- // Permission group viewed
- optional string permission_group_name = 4;
-}
-
-/**
-* Information about a AppPermissionGroupsFragment viewed by user. Fragment has been renamed, but
-* the log retains the old fragment name.
-*/
-message AppPermissionsFragmentViewed {
- // id which identifies single session of user interacting with permission controller
- optional int64 session_id = 1;
-
- // id which identifies single view as every view might have several logging records
- // with different package information attached
- optional int64 view_id = 2;
-
- // Permission group viewed
- optional string permission_group_name = 3;
-
- // UID of package for which permissions are viewed
- optional int32 uid = 4 [(is_uid) = true];
-
- // Name of package for which permissions are viewed
- optional string package_name = 5;
-
- // Category in which permission is included
- enum Category {
- UNDEFINED = 0;
- ALLOWED = 1;
- ALLOWED_FOREGROUND = 2;
- DENIED = 3;
- }
- optional Category category = 6;
-}
-/**
-* Information about a PermissionAppsFragment viewed by user.
-* Logged from ui/handheld/PermissionAppsFragment.java
-*/
-message PermissionAppsFragmentViewed {
- // id which identifies single session of user interacting with permission controller
- optional int64 session_id = 1;
-
- // id which identifies single view as every view might have several logging records
- // with different package information attached
- optional int64 view_id = 2;
-
- // Permission group viewed
- optional string permission_group_name = 3;
-
- // UID of package for which permissions are viewed
- optional int32 uid = 4 [(is_uid) = true];
-
- // Name of package for which permissions are viewed
- optional string package_name = 5;
-
- // Category in which app is included
- enum Category {
- UNDEFINED = 0;
- ALLOWED = 1;
- ALLOWED_FOREGROUND = 2;
- DENIED = 3;
- }
- optional Category category = 6;
-}
-
-/**
-* Log that the Auto Revoke notification has been clicked
-* Logged from ui/ManagePermissionsActivity
-*/
-message AutoRevokeNotificationClicked {
- // id which identifies single session of user interacting with permission controller
- optional int64 session_id = 1;
-}
-
-/**
-* Log that an app has been displayed on the auto revoke page, and lists one permission that was
-* auto revoked for it.
-* Logged from ui/handheld/AutoRevokeFragment
-*/
-message AutoRevokeFragmentAppViewed {
- // id which identifies single session of user interacting with permission controller
- optional int64 session_id = 1;
-
- // UID of package for which permissions are viewed
- optional int32 uid = 2 [(is_uid) = true];
-
- // Name of package for which permissions are viewed
- optional string package_name = 3;
-
- // The name of a permission group that has been revoked
- optional string permission_group_name = 4;
-
- // The age of the app- more than three months old, or more than six months
- enum Age {
- UNDEFINED = 0;
- NEWER_BUCKET = 1;
- OLDER_BUCKET = 2;
- }
-
- // How long the app has been unused. Currently, newer bucket is 3 months, older is 6 months
- optional Age age = 5;
-}
-
-/**
-* Log that the user has interacted with an app on the auto revoke fragment
-* Logged from ui/handheld/AutoRevokeFragment
-*/
-message AutoRevokedAppInteraction {
- // id which identifies single session of user interacting with permission controller
- optional int64 session_id = 1;
-
- // UID of package for which permissions are viewed
- optional int32 uid = 2 [(is_uid) = true];
-
- // Name of package for which permissions are viewed
- optional string package_name = 3;
-
- enum Action {
- UNDEFINED = 0;
- REMOVE = 1;
- OPEN = 2;
- APP_INFO = 3;
- PERMISSIONS = 4;
- REMOVE_IN_SETTINGS = 5;
- OPEN_IN_SETTINGS = 6;
- }
-
- // The action the user took to interact with the app
- optional Action action = 4;
-}
-
-/**
-* Log that the AppPermissionGroupsFragment has been interacted with for the possible purposes of
-* auto revoke, or that the auto revoke switch has been changed
-* Logged from ui/handheld/AppPermissionGroupsFragment
- */
-message AppPermissionGroupsFragmentAutoRevokeAction {
- // id which identifies single session of user interacting with permission controller
- optional int64 session_id = 1;
-
- // UID of package for which permissions are viewed
- optional int32 uid = 2 [(is_uid) = true];
-
- // Name of package for which permissions are viewed
- optional string package_name = 3;
-
- enum Action {
- UNDEFINED = 0;
- OPENED_FOR_AUTO_REVOKE = 1;
- OPENED_FROM_INTENT = 2;
- SWITCH_ENABLED = 3;
- SWITCH_DISABLED = 4;
- }
-
- // The action the user took to interact with the fragment
- optional Action action = 4;
-}
-
-/**
- * Logs when there is a smart selection related event.
- * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
- * Logged from: TextClassifierEventLogger.java
- */
-message TextSelectionEvent {
- // A session ID.
- optional string session_id = 1;
-
- // Event type of this event.
- optional android.stats.textclassifier.EventType event_type = 2;
-
- // Name of the annotator model that is involved in this event.
- optional string model_name = 3;
-
- // Type of widget that was involved in triggering this event.
- optional android.stats.textclassifier.WidgetType widget_type = 4;
-
- // Index of this event in a session.
- optional int32 event_index = 5;
-
- // Entity type that is involved.
- optional string entity_type = 6;
-
- // Relative word index of the start of the selection.
- optional int32 relative_word_start_index = 7;
-
- // Relative word (exclusive) index of the end of the selection.
- optional int32 relative_word_end_index = 8;
-
- // Relative word index of the start of the smart selection.
- optional int32 relative_suggested_word_start_index = 9;
-
- // Relative word (exclusive) index of the end of the smart selection.
- optional int32 relative_suggested_word_end_index = 10;
-
- // Name of source package.
- optional string package_name = 11;
-
- // Name of the LangID model that is involved in this event.
- optional string langid_model_name = 12;
-}
-
-/**
- * Logs when there is a smart linkify related event.
- * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
- * Logged from: TextClassifierEventLogger.java
- */
-message TextLinkifyEvent {
- // A session ID.
- optional string session_id = 1;
-
- // Event type of this event.
- optional android.stats.textclassifier.EventType event_type = 2;
-
- // Name of the annotator model that is involved in this event.
- optional string model_name = 3;
-
- // Type of widget that was involved in triggering this event.
- optional android.stats.textclassifier.WidgetType widget_type = 4;
-
- // Index of this event in a session.
- optional int32 event_index = 5;
-
- // Entity type that is involved.
- optional string entity_type = 6;
-
- // Number of links detected.
- optional int32 num_links = 7;
-
- // The total length of all links.
- optional int32 linked_text_length = 8;
-
- // Length of input text.
- optional int32 text_length = 9;
-
- // Time spent on generating links in ms.
- optional int64 latency_millis = 10;
-
- // Name of source package.
- optional string package_name = 11;
-
- // Name of the LangID model that is involved in this event.
- optional string langid_model_name = 12;
-}
-
-/**
- * Logs when there is a conversation actions related event.
- * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
- * Logged from: TextClassifierEventLogger.java
- */
-message ConversationActionsEvent {
- // A session ID.
- optional string session_id = 1;
-
- // Event type of this event.
- optional android.stats.textclassifier.EventType event_type = 2;
-
- // Name of the actions model that is involved in this event.
- optional string model_name = 3;
-
- // Type of widget that was involved in triggering this event.
- optional android.stats.textclassifier.WidgetType widget_type = 4;
-
- // The first entity type that is involved.
- optional string first_entity_type = 5;
-
- // The second entity type that is involved.
- optional string second_entity_type = 6;
-
- // The third entity type that is involved.
- optional string third_entity_type = 7;
-
- // The score of the first entity type.
- optional float score = 8;
-
- // Name of source package.
- optional string package_name = 9;
-
- // Name of the annotator model that is involved in this event.
- optional string annotator_model_name = 10;
-
- // Name of the LangID model that is involved in this event.
- optional string langid_model_name = 11;
-}
-
-/**
- * Logs when there is a language detection related event.
- * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
- * Logged from: TextClassifierEventLogger.java
- */
-message LanguageDetectionEvent {
- // A session ID.
- optional string session_id = 1;
-
- // Event type of this event.
- optional android.stats.textclassifier.EventType event_type = 2;
-
- // Name of the language detection model that is involved in this event.
- optional string model_name = 3;
-
- // Type of widget that was involved in triggering this event.
- optional android.stats.textclassifier.WidgetType widget_type = 4;
-
- // Detected language.
- optional string language_tag = 5;
-
- // Score of the detected language.
- optional float score = 6;
-
- // Position of this action.
- optional int32 action_index = 7;
-
- // Name of source package.
- optional string package_name = 8;
-}
-
-/**
- * Information about an OTA update attempt by update_engine.
- * Logged from platform/system/update_engine/metrics_reporter_android.cc
- */
-message UpdateEngineUpdateAttemptReported {
- // The number of attempts for the update engine to apply a given payload.
- optional int32 attempt_number = 1;
-
- optional android.stats.otaupdate.PayloadType payload_type = 2;
-
- // The total time in minutes for the update engine to apply a given payload.
- // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and
- // it's increased when the system is sleeping.
- optional int32 duration_boottime_in_minutes = 3;
-
- // The total time in minutes for the update engine to apply a given payload.
- // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW;
- // and it's not increased when the system is sleeping.
- optional int32 duration_monotonic_in_minutes = 4;
-
- // The size of the payload in MiBs.
- optional int32 payload_size_mib = 5;
-
- // The attempt result reported by the update engine for an OTA update.
- optional android.stats.otaupdate.AttemptResult attempt_result = 6;
-
- // The error code reported by the update engine after an OTA update attempt
- // on A/B devices.
- optional android.stats.otaupdate.ErrorCode error_code = 7;
-
- // The build fingerprint of the source system. The value is read from a
- // system property when the device takes the update. e.g.
- // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys
- optional string source_fingerprint = 8;
-
- // Size of super partition.
- optional int64 super_partition_size_bytes = 9;
-
- // Size of current slot within the super partition.
- optional int64 slot_size_bytes = 10;
-
- // Free space available in the super partition.
- optional int64 super_free_space_bytes = 11;
-}
-
-/**
- * Information about all the attempts the device make before finishing the
- * successful update.
- * Logged from platform/system/update_engine/metrics_reporter_android.cc
- */
-message UpdateEngineSuccessfulUpdateReported {
- // The number of attempts for the update engine to apply the payload for a
- // successful update.
- optional int32 attempt_count = 1;
-
- optional android.stats.otaupdate.PayloadType payload_type = 2;
-
- optional int32 payload_size_mib = 3;
-
- // The total number of bytes downloaded by update_engine since the last
- // successful update.
- optional int32 total_bytes_downloaded_mib = 4;
-
- // The ratio in percentage of the over-downloaded bytes compared to the
- // total bytes needed to successfully install the update. e.g. 200 if we
- // download 200MiB in total for a 100MiB package.
- optional int32 download_overhead_percentage = 5;
-
- // The total time in minutes for the update engine to apply the payload for a
- // successful update.
- optional int32 total_duration_minutes = 6;
-
- // The number of reboot of the device during a successful update.
- optional int32 reboot_count = 7;
-}
-
-/**
- * Reported when the RebootEscrow HAL has attempted to recover the escrowed
- * key to indicate whether it was successful or not.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java
- */
-message RebootEscrowRecoveryReported {
- optional bool successful = 1;
-}
-
-/**
- * Global display pipeline metrics reported by SurfaceFlinger.
- * Pulled from:
- * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp
- */
-message SurfaceflingerStatsGlobalInfo {
- // Total number of frames presented during the tracing period
- optional int64 total_frames = 1;
- // Total number of frames missed
- optional int64 missed_frames = 2;
- // Total number of frames that fell back to client composition
- optional int64 client_composition_frames = 3;
- // Total time the display was turned on
- optional int64 display_on_millis = 4;
- // Total time that was spent performing animations.
- // This is derived from the present-to-present layer histogram
- optional int64 animation_millis = 5;
- // Total number of event connections tracked by SurfaceFlinger at the time
- // of this pull. If this number grows prohibitively large, then this can
- // cause jank due to resource contention.
- optional int32 event_connection_count = 6;
- // Set of timings measured from when SurfaceFlinger began compositing a
- // frame, until the frame was requested to be presented to the display. This
- // measures SurfaceFlinger's total CPU walltime on the critical path per
- // frame.
- optional FrameTimingHistogram frame_duration = 7
- [(android.os.statsd.log_mode) = MODE_BYTES];
- // Set of timings measured from when SurfaceFlinger first began using the
- // GPU to composite a frame, until the GPU has finished compositing that
- // frame. This measures the total additional time SurfaceFlinger needed to
- // perform due to falling back into GPU composition.
- optional FrameTimingHistogram render_engine_timing = 8
- [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-/**
- * Per-layer display pipeline metrics reported by SurfaceFlinger.
- * The number of layers uploaded will be restricted due to size limitations.
- * Pulled from:
- * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp
- */
-message SurfaceflingerStatsLayerInfo {
- // The layer for this set of metrics
- // For now we can infer that the package name is included in the layer
- // name.
- optional string layer_name = 1;
- // Total number of frames presented
- optional int64 total_frames = 2;
- // Total number of dropped frames while latching a buffer for this layer.
- optional int64 dropped_frames = 3;
- // Set of timings measured between successive presentation timestamps.
- optional FrameTimingHistogram present_to_present = 4
- [(android.os.statsd.log_mode) = MODE_BYTES];
- // Set of timings measured from when an app queued a buffer for
- // presentation, until the buffer was actually presented to the
- // display.
- optional FrameTimingHistogram post_to_present = 5
- [(android.os.statsd.log_mode) = MODE_BYTES];
- // Set of timings measured from when a buffer is ready to be presented,
- // until the buffer was actually presented to the display.
- optional FrameTimingHistogram acquire_to_present = 6
- [(android.os.statsd.log_mode) = MODE_BYTES];
- // Set of timings measured from when a buffer was latched by
- // SurfaceFlinger, until the buffer was presented to the display
- optional FrameTimingHistogram latch_to_present = 7
- [(android.os.statsd.log_mode) = MODE_BYTES];
- // Set of timings measured from the desired presentation to the actual
- // presentation time
- optional FrameTimingHistogram desired_to_present = 8
- [(android.os.statsd.log_mode) = MODE_BYTES];
- // Set of timings measured from when an app queued a buffer for
- // presentation, until the buffer was ready to be presented.
- optional FrameTimingHistogram post_to_acquire = 9
- [(android.os.statsd.log_mode) = MODE_BYTES];
- // Frames missed latch because the acquire fence didn't fire
- optional int64 late_acquire_frames = 10;
- // Frames latched early because the desired present time was bad
- optional int64 bad_desired_present_frames = 11;
-}
-
-/**
- * Histogram of frame counts bucketed by time in milliseconds.
- * Because of size limitations, we hard-cap the number of buckets, with
- * buckets for corresponding to larger milliseconds being less precise.
- */
-message FrameTimingHistogram {
- // Timings in milliseconds that describes a set of histogram buckets
- repeated int32 time_millis_buckets = 1;
- // Number of frames that match to each time_millis, i.e. the bucket
- // contents
- // It's required that len(time_millis) == len(frame_count)
- repeated int64 frame_counts = 2;
-}
-
-/**
- * Janky event as reported by SurfaceFlinger.
- * This event is intended to be consumed by a Perfetto subscriber for
- * automated trace collection.
- *
- * Logged from:
- * frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp
- */
-message DisplayJankReported {
- // Informational field for how long the janky event lasted in milliseconds
- optional int64 event_duration_millis = 1;
- // Number of frame deadlines missed, where SurfaceFlinger failed to update
- // the display on time.
- optional int32 present_deadlines_missed = 2;
-}
-
-/**
- * Information about camera facing and API level usage.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java
- */
-message CameraActionEvent {
- // Camera session duration
- optional int64 duration_millis = 1;
-
- // Camera API level used
- optional int32 api_level = 2;
-
- // Name of client package
- optional string package_name = 3;
-
- // Camera facing
- enum Facing {
- UNKNOWN = 0;
- BACK = 1;
- FRONT = 2;
- EXTERNAL = 3;
- }
- optional Facing facing = 4;
-}
-
-/**
- * Logs when a compatibility change is affecting an app.
- *
- * Logged from:
- * frameworks/base/core/java/android/app/AppCompatCallbacks.java and
- * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java
- */
-message AppCompatibilityChangeReported {
- // The UID of the app being affected by the compatibilty change.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The ID of the change affecting the app.
- optional int64 change_id = 2;
-
- enum State {
- UNKNOWN_STATE = 0;
- ENABLED = 1;
- DISABLED = 2;
- LOGGED = 3;
- }
-
- // The state of the change - if logged from gating whether it was enabled or disabled, or just
- // logged otherwise.
- optional State state = 3;
-
- enum Source {
- UNKNOWN_SOURCE = 0;
- APP_PROCESS = 1;
- SYSTEM_SERVER = 2;
- }
-
- // Where it was logged from.
- optional Source source = 4;
-
-}
-
-/**
- * Logged from
- * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc
- */
-message PerfettoUploaded {
- enum Event {
- PERFETTO_UNDEFINED = 0;
- PERFETTO_TRACE_BEGIN = 1;
- PERFETTO_BACKGROUND_TRACE_BEGIN = 2;
- PERFETTO_ON_CONNECT = 3;
- PERFETTO_ON_TRACING_DISABLED = 4;
- PERFETTO_UPLOAD_DROPBOX_BEGIN = 5;
- PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6;
- PERFETTO_UPLOAD_DROPBOX_FAILURE = 7;
- PERFETTO_UPLOAD_INCIDENT_BEGIN = 8;
- PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9;
- PERFETTO_UPLOAD_INCIDENT_FAILURE = 10;
- PERFETTO_FINALIZE_TRACE_AND_EXIT = 11;
- PERFETTO_TRIGGER_BEGIN = 12;
- PERFETTO_TRIGGER_SUCCESS = 13;
- PERFETTO_TRIGGER_FAILURE = 14;
- PERFETTO_HIT_GUARDRAILS = 15;
- PERFETTO_ON_TIMEOUT = 16;
- PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17;
- }
-
- // Which stage of the pipeline we are reporting from.
- optional Event event = 1;
-
- // UUID matching the one set inside the SystemInfo trace packet.
- optional int64 trace_uuid_lsb = 2;
- optional int64 trace_uuid_msb = 3;
-}
-
-/**
- * Pulls client metrics on data transferred via Vehicle Maps Service.
- * Metrics are keyed by uid + layer.
- *
- * Pulled from:
- * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java
- */
-message VmsClientStats {
- // UID of the VMS client app
- optional int32 uid = 1 [(is_uid) = true];
-
- // VMS layer definition
- optional int32 layer_type = 2;
- optional int32 layer_channel = 3;
- optional int32 layer_version = 4;
-
- // Bytes and packets sent by the client for the layer
- optional int64 tx_bytes = 5;
- optional int64 tx_packets = 6;
-
- // Bytes and packets received by the client for the layer
- optional int64 rx_bytes = 7;
- optional int64 rx_packets = 8;
-
- // Bytes and packets dropped due to client error
- optional int64 dropped_bytes = 9;
- optional int64 dropped_packets = 10;
-}
-
-/**
- * State of a dangerous permission requested by a package - sampled
- * Pulled from: StatsCompanionService.java with data obtained from PackageManager API
-*/
-message DangerousPermissionStateSampled {
- // Name of the permission
- optional string permission_name = 1;
-
- // Uid of the package
- optional int32 uid = 2 [(is_uid) = true];
-
- // If the permission is granted to the uid
- optional bool is_granted = 3;
-
- // Permission flags as per android.content.pm.PermissionFlags
- optional int32 permission_flags = 4;
-}
-
-/**
- * HWUI stats for a given app.
- */
-message GraphicsStats {
- // The package name of the app
- optional string package_name = 1;
-
- // The version code of the app
- optional int64 version_code = 2;
-
- // The start & end timestamps in UTC as
- // milliseconds since January 1, 1970
- // Compatible with java.util.Date#setTime()
- optional int64 start_millis = 3;
-
- optional int64 end_millis = 4;
-
- // HWUI renders pipeline type: GL (1) or Vulkan (2).
- enum PipelineType {
- UNKNOWN = 0;
- GL = 1;
- VULKAN = 2;
- }
-
- // HWUI renders pipeline type: GL or Vulkan.
- optional PipelineType pipeline = 5;
-
- // Distinct frame count.
- optional int32 total_frames = 6;
-
- // Number of "missed vsync" events.
- optional int32 missed_vsync_count = 7;
-
- // Number of frames in triple-buffering scenario (high input latency)
- optional int32 high_input_latency_count = 8;
-
- // Number of "slow UI thread" events.
- optional int32 slow_ui_thread_count = 9;
-
- // Number of "slow bitmap upload" events.
- optional int32 slow_bitmap_upload_count = 10;
-
- // Number of "slow draw" events.
- optional int32 slow_draw_count = 11;
-
- // Number of frames that missed their deadline (aka, visibly janked)
- optional int32 missed_deadline_count = 12;
-
- // The frame time histogram for the package
- optional FrameTimingHistogram cpu_histogram = 13
- [(android.os.statsd.log_mode) = MODE_BYTES];
-
- // The gpu frame time histogram for the package
- optional FrameTimingHistogram gpu_histogram = 14
- [(android.os.statsd.log_mode) = MODE_BYTES];
-
- // UI mainline module version.
- optional int64 version_ui_module = 15;
-
- // If true, these are HWUI stats for up to a 24h period for a given app from today.
- // If false, these are HWUI stats for a 24h period for a given app from the last complete
- // day (yesterday). Stats from yesterday stay constant, while stats from today may change as
- // more apps are running / rendering.
- optional bool is_today = 16;
-}
-
-/**
- * Message related to dangerous (runtime) app ops access
- */
-message RuntimeAppOpAccess {
- // Uid of the package accessing app op
- optional int32 uid = 1 [(is_uid) = true];
-
- // Name of the package accessing app op
- optional string package_name = 2;
-
- // deprecated - set to empty string
- optional string op_deprecated = 3 [deprecated = true];
-
- // attribution_tag; provided by developer when accessing related API, limited at 50 chars by
- // API. Attributions must be provided through manifest using <attribution> tag available in R
- // and above.
- optional string attribution_tag = 4;
-
- // message related to app op access, limited to 600 chars by API
- optional string message = 5;
-
- enum SamplingStrategy {
- DEFAULT = 0;
- UNIFORM = 1;
- RARELY_USED = 2;
- BOOT_TIME_SAMPLING = 3;
- UNIFORM_OPS = 4;
- }
-
- // sampling strategy used to collect this message
- optional SamplingStrategy sampling_strategy = 6;
-
- // operation id
- optional android.app.AppOpEnum op = 7 [default = APP_OP_NONE];
-}
-
-/*
- * Logs userspace reboot outcome and duration.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/server/BootReceiver.java
- */
-message UserspaceRebootReported {
- // Possible outcomes of userspace reboot.
- enum Outcome {
- // Default value in case platform failed to determine the outcome.
- OUTCOME_UNKNOWN = 0;
- // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot).
- SUCCESS = 1;
- // Userspace reboot shutdown sequence was aborted.
- FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2;
- // Remounting userdata into checkpointing mode failed.
- FAILED_USERDATA_REMOUNT = 3;
- // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard
- // reboot.
- FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4;
- }
- // Outcome of userspace reboot. Always set.
- optional Outcome outcome = 1;
- // Duration of userspace reboot in case it has a successful outcome.
- // Duration is measured as time between userspace reboot was initiated and until boot completed
- // (e.g. sys.boot_completed=1).
- optional int64 duration_millis = 2;
- // State of primary user's (user0) credential encryption storage.
- enum UserEncryptionState {
- // Default value.
- USER_ENCRYPTION_STATE_UNKNOWN = 0;
- // Credential encrypted storage is unlocked.
- UNLOCKED = 1;
- // Credential encrypted storage is locked.
- LOCKED = 2;
- }
- // State of primary user's encryption storage at the moment boot completed. Always set.
- optional UserEncryptionState user_encryption_state = 3;
-}
-
-/*
- * Logs integrity check information during each install.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
- */
-message IntegrityCheckResultReported {
- optional string package_name = 1;
- optional string app_certificate_hash = 2;
- optional int64 version_code = 3;
- optional string installer_package_name = 4;
- enum Response {
- UNKNOWN = 0;
- ALLOWED = 1;
- REJECTED = 2;
- FORCE_ALLOWED = 3;
- }
- optional Response response = 5;
- // An estimate on the cause of the response. This will only be populated for
- // REJECTED and FORCE_ALLOWED
- optional bool caused_by_app_cert_rule = 6;
- optional bool caused_by_installer_rule = 7;
-}
-
-/**
- * Logs the information about the rules and the provider whenever rules are
- * pushed into AppIntegrityManager.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
- */
-message IntegrityRulesPushed {
- optional bool success = 1;
- // Package name of the app that pushed the rules.
- optional string rule_provider = 2;
- // Version string of arbitrary format provided by the rule provider to
- // identify the rules.
- optional string rule_version = 3;
-}
-
-/**
- * Logs when a cell broadcast message is received on the device.
- *
- * Logged from Cell Broadcast module and platform:
- * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
- * packages/apps/CellBroadcastReceiver/
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/CellBroadcastServiceManager.java
- */
-message CellBroadcastMessageReported {
- // The type of Cell Broadcast message
- enum CbType {
- UNKNOWN_TYPE = 0;
- GSM = 1;
- CDMA = 2;
- CDMA_SPC = 3;
- }
-
- // The parts of the cell broadcast message pipeline
- enum ReportSource {
- UNKNOWN_SOURCE = 0;
- FRAMEWORK = 1;
- CB_SERVICE = 2;
- CB_RECEIVER_APP = 3;
- }
-
- // GSM, CDMA, CDMA-SCP
- optional CbType type = 1;
-
- // The source of the report
- optional ReportSource source = 2;
-}
-
-/**
- * Logs when a cell broadcast message is filtered out, or otherwise intentionally not sent to CBR.
- *
- * Logged from CellBroadcastService module:
- * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
- */
-message CellBroadcastMessageFiltered {
- enum FilterReason {
- NOT_FILTERED = 0;
- DUPLICATE_MESSAGE = 1;
- GEOFENCED_MESSAGE = 2;
- AREA_INFO_MESSAGE = 3;
- }
-
- // GSM, CDMA, CDMA-SCP
- optional CellBroadcastMessageReported.CbType type = 1;
-
- // The source of the report
- optional FilterReason filter = 2;
-}
-
-/**
- * Logs when an error occurs while handling a cell broadcast message;
- *
- * Logged from CellBroadcastService module:
- * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
- */
-message CellBroadcastMessageError {
- // The type of error raised when trying to handle a cell broadcast message
- enum ErrorType {
- UNKNOWN_TYPE = 0;
- CDMA_DECODING_ERROR = 1;
- CDMA_SCP_EMPTY = 2;
- CDMA_SCP_HANDLING_ERROR = 3;
- GSM_INVALID_HEADER_LENGTH = 4;
- GSM_UNSUPPORTED_HEADER_MESSAGE_TYPE = 5;
- GSM_UNSUPPORTED_HEADER_DATA_CODING_SCHEME = 6;
- GSM_INVALID_PDU = 7;
- GSM_INVALID_GEO_FENCING_DATA = 8;
- GSM_UMTS_INVALID_WAC = 9;
- FAILED_TO_INSERT_TO_DB = 10;
- UNEXPECTED_GEOMETRY_FROM_FWK = 11;
- UNEXPECTED_GSM_MESSAGE_TYPE_FROM_FWK = 12;
- UNEXPECTED_CDMA_MESSAGE_TYPE_FROM_FWK = 13;
- UNEXPECTED_CDMA_SCP_MESSAGE_TYPE_FROM_FWK = 14;
- NO_CONNECTION_TO_CB_SERVICE = 15;
- }
-
- // What kind of error occurred
- optional ErrorType type = 1;
-
- // Exception message (or log message) associated with the error (max 1000 chars)
- optional string exception_message = 2;
-}
-
-/**
- * Logs when a tune occurs through device's Frontend.
- * This is atom ID 276.
- *
- * Logged from:
- * frameworks/base/media/java/android/media/tv/tuner/Tuner.java
- */
-message TvTunerStateChanged {
- enum State {
- UNKNOWN = 0;
- TUNING = 1; // Signal is tuned
- LOCKED = 2; // the signal is locked
- NOT_LOCKED = 3; // the signal isn’t locked.
- SIGNAL_LOST = 4; // the signal was locked, but is lost now.
- SCANNING = 5; // the signal is scanned
- SCAN_STOPPED = 6; // the scan is stopped.
- }
- // The uid of the application that sent this custom atom.
- optional int32 uid = 1 [(is_uid) = true];
- // new state
- optional State state = 2;
-}
-
-/**
- * Logs the status of a dvr playback or record.
- * This is atom ID 279.
- *
- * Logged from:
- * frameworks/base/media/java/android/media/tv/tuner/dvr
- */
-message TvTunerDvrStatus {
- enum Type {
- UNKNOWN_TYPE = 0;
- PLAYBACK = 1; // is a playback
- RECORD = 2; // is a record
- }
- enum State {
- UNKNOWN_STATE = 0;
- STARTED = 1; // DVR is started
- STOPPED = 2; // DVR is stopped
- }
- // The uid of the application that sent this custom atom.
- optional int32 uid = 1 [(is_uid) = true];
- // DVR type
- optional Type type = 2;
- // DVR state
- optional State state = 3;
- // Identify the segment of a record or playback
- optional int32 segment_id = 4;
- // indicate how many overflow or underflow happened between started to stopped
- optional int32 overflow_underflow_count = 5;
-}
-
-/**
- * Logs when a cas session opened through MediaCas.
- * This is atom ID 280.
- *
- * Logged from:
- * frameworks/base/media/java/android/media/MediaCas.java
- */
-message TvCasSessionOpenStatus {
- enum State {
- UNKNOWN = 0;
- SUCCEEDED = 1; // indicate that the session is opened successfully.
- FAILED = 2; // indicate that the session isn’t opened successfully.
- }
- // The uid of the application that sent this custom atom.
- optional int32 uid = 1 [(is_uid) = true];
- // Cas system Id
- optional int32 cas_system_id = 2;
- // State of the session
- optional State state = 3;
-}
-
-/**
- * Logs for ContactsProvider general usage.
- * This is atom ID 301.
- *
- * Logged from:
- * packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsProvider2.java
- */
-message ContactsProviderStatusReported {
- enum ApiType {
- UNKNOWN_API = 0;
- QUERY = 1;
- // INSERT includes insert and bulkInsert, and inserts triggered by applyBatch.
- INSERT = 2;
- // UPDATE and DELETE includes update/delete and the ones triggered by applyBatch.
- UPDATE = 3;
- DELETE = 4;
- }
-
- enum ResultType {
- UNKNOWN_RESULT = 0;
- SUCCESS = 1;
- FAIL = 2;
- ILLEGAL_ARGUMENT = 3;
- UNSUPPORTED_OPERATION = 4;
- }
-
- enum CallerType {
- UNSPECIFIED_CALLER_TYPE = 0;
- CALLER_IS_SYNC_ADAPTER = 1;
- CALLER_IS_NOT_SYNC_ADAPTER = 2;
- }
-
- optional ApiType api_type = 1;
- // Defined in
- // packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsProvider2.java
- optional int32 uri_type = 2;
- optional CallerType caller_type = 3;
- optional ResultType result_type = 4;
- optional int32 result_count = 5;
- optional int64 latency_micros = 6;
-}
-
-/**
- * Logs when an app is frozen or unfrozen.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/CachedAppOptimizer.java
- */
-message AppFreezeChanged {
- // The type of event.
- enum Action {
- UNKNOWN = 0;
- FREEZE_APP = 1;
- UNFREEZE_APP = 2;
- }
- optional Action action = 1;
-
- // Pid of the process being frozen.
- optional int32 pid = 2;
-
- // Name of the process being frozen.
- optional string process_name = 3;
-
- // Time since last unfrozen.
- optional int64 time_unfrozen_millis = 4;
-}
-
-/**
- * Pulls information for a single voice call.
- *
- * Each pull creates multiple atoms, one for each call. The sequence is randomized when pulled.
- *
- * Pulled from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message VoiceCallSession {
- // Bearer (IMS or CS) when the call started.
- optional android.telephony.CallBearerEnum bearer_at_start = 1;
-
- // Bearer (IMS or CS) when the call ended.
- // The bearer may change during the call, e.g. due to SRVCC.
- optional android.telephony.CallBearerEnum bearer_at_end = 2;
-
- // Direction of the call (incoming or outgoing).
- optional android.telephony.CallDirectionEnum direction = 3;
-
- // Time spent setting up the call.
- optional android.telephony.CallSetupDurationEnum setup_duration = 4;
-
- // Whether the call ended before the setup was completed.
- optional bool setup_failed = 5;
-
- // IMS reason code or CS disconnect cause.
- // For IMS, see: frameworks/base/telephony/java/android/telephony/ims/ImsReasonInfo.java
- // For CS, see: frameworks/base/telephony/java/android/telephony/DisconnectCause.java
- optional int32 disconnect_reason_code = 6;
-
- // IMS extra code or CS precise disconnect cause.
- // For IMS, this code is vendor-specific
- // For CS, see: frameworks/base/telephony/java/android/telephony/PreciseDisconnectCause.java
- optional int32 disconnect_extra_code = 7;
-
- // IMS extra message or CS vendor cause.
- optional string disconnect_extra_message = 8;
-
- // Radio access technology (RAT) used when call started.
- optional android.telephony.NetworkTypeEnum rat_at_start = 9;
-
- // Radio access technology (RAT) used when call terminated.
- optional android.telephony.NetworkTypeEnum rat_at_end = 10;
-
- // Number of times RAT changed during the call.
- optional int64 rat_switch_count = 11;
-
- // A bitmask of all codecs used during the call.
- // See: frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/VoiceCallSessionStats.java
- optional int64 codec_bitmask = 12;
-
- // Number of other calls going on during call setup, for the same SIM slot.
- optional int32 concurrent_call_count_at_start = 13;
-
- // Number of other calls going on during call termination, for the same SIM slot.
- optional int32 concurrent_call_count_at_end = 14;
-
- // Index of the SIM is used, 0 for single-SIM devices.
- optional int32 sim_slot_index = 15;
-
- // Whether the device was in multi-SIM mode (with multiple active SIM profiles).
- optional bool is_multi_sim = 16;
-
- // Whether the call was made with an eSIM profile.
- optional bool is_esim = 17;
-
- // Carrier ID of the SIM card.
- // See https://source.android.com/devices/tech/config/carrierid.
- optional int32 carrier_id = 18;
-
- // Whether an SRVCC has been completed successfully for this call.
- optional bool srvcc_completed = 19;
-
- // Number of SRVCC failures.
- optional int64 srvcc_failure_count = 20;
-
- // Number of SRVCC cancellations.
- optional int64 srvcc_cancellation_count = 21;
-
- // Whether the Real-Time Text (RTT) was ever used in the call (rather than whether RTT was
- // enabled in the dialer's settings).
- optional bool rtt_enabled = 22;
-
- // Whether this was an emergency call.
- optional bool is_emergency = 23;
-
- // Whether the call was performed while roaming.
- optional bool is_roaming = 24;
-
- // A random number used as the dimension field to pull multiple atoms.
- optional int32 dimension = 25;
-}
-
-/**
- * Pulls voice call radio access technology (RAT) usage.
- *
- * Each pull creates multiple atoms, one for each carrier/RAT, the order of which is irrelevant to
- * time. The atom will be skipped if not enough data is available.
- *
- * Pulled from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message VoiceCallRatUsage {
- // Carrier ID (https://source.android.com/devices/tech/config/carrierid).
- optional int32 carrier_id = 1;
-
- // Radio access technology.
- optional android.telephony.NetworkTypeEnum rat = 2;
-
- // Total duration that voice calls spent on this carrier and RAT.
- optional int64 total_duration_seconds = 3;
-
- // Total number of calls using this carrier and RAT.
- // A call is counted once even if it used the RAT multiple times.
- optional int64 call_count = 4;
-}
-
-/**
- * Pulls the number of active SIM slots and SIMs/eSIM profiles.
- *
- * Pulled from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message SimSlotState {
- // Number of active SIM slots (both physical and eSIM profiles) in the device.
- optional int32 active_slot_count = 1;
-
- // Number of SIM cards (both physical and active eSIM profiles).
- // This number is always equal to or less than the number of active SIM slots.
- optional int32 sim_count = 2;
-
- // Number of active eSIM profiles.
- // This number is always equal to or less than the number of SIMs.
- optional int32 esim_count = 3;
-}
-
-/**
- * Pulls supported cellular radio access technologies.
- *
- * This atom reports the capabilities of the device, rather than the network it has access to.
- *
- * Pulled from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message SupportedRadioAccessFamily {
- // A bitmask of supported radio technologies.
- // See android.telephony.TelephonyManager.NetworkTypeBitMask.
- optional int64 network_type_bitmask = 1;
-}
-
-/**
- * Logs gnss stats from location service provider
- *
- * Pulled from:
- * frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
- */
-
-message GnssStats {
- // Number of location reports since boot
- optional int64 location_reports = 1;
-
- // Total pulled reports of Location failures since boot
- optional int64 location_failure_reports = 2;
-
- // Number of time to first fix reports since boot
- optional int64 time_to_first_fix_reports = 3;
-
- // Total pulled reported time to first fix (in milli-seconds) since boot
- optional int64 time_to_first_fix_millis = 4;
-
- // Number of position accuracy reports since boot
- optional int64 position_accuracy_reports = 5;
-
- // Total pulled reported position accuracy (in meters) since boot
- optional int64 position_accuracy_meters = 6;
-
- // Number of top 4 average CN0 reports since boot
- optional int64 top_four_average_cn0_reports = 7;
-
- // Total pulled reported of top 4 average CN0 (dB-mHz) since boot
- optional int64 top_four_average_cn0_db_mhz = 8;
-
- // Number of l5 top 4 average CN0 reports since boot
- optional int64 l5_top_four_average_cn0_reports = 9;
-
- // Total pulled reported of l5 top 4 average CN0 (dB-mHz) since boot
- optional int64 l5_top_four_average_cn0_db_mhz = 10;
-
- // Total number of sv status messages reports since boot
- optional int64 sv_status_reports = 11;
-
- // Total number of sv status messages reports, where sv is used in fix since boot
- optional int64 sv_status_reports_used_in_fix = 12;
-
- // Total number of L5 sv status messages reports since boot
- optional int64 l5_sv_status_reports = 13;
-
- // Total number of L5 sv status messages reports, where sv is used in fix since boot
- optional int64 l5_sv_status_reports_used_in_fix = 14;
-}
-
-/**
- * Logs when an app is moved to a different standby bucket.
- *
- * Logged from:
- * frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/AppIdleHistory.java
- */
-message AppStandbyBucketChanged {
- optional string package_name = 1;
-
- // Should be 0, 10, 11, 12, etc. where 0 is the owner. See UserHandle for more documentation.
- optional int32 user_id = 2;
-
- // These enum values match the constants defined in UsageStatsManager.java.
- enum Bucket {
- BUCKET_UNKNOWN = 0;
- BUCKET_EXEMPTED = 5;
- BUCKET_ACTIVE = 10;
- BUCKET_WORKING_SET = 20;
- BUCKET_FREQUENT = 30;
- BUCKET_RARE = 40;
- BUCKET_RESTRICTED = 45;
- BUCKET_NEVER = 50;
- }
- optional Bucket bucket = 3;
-
- enum MainReason {
- MAIN_UNKNOWN = 0;
- MAIN_DEFAULT = 0x0100;
- MAIN_TIMEOUT = 0x0200;
- MAIN_USAGE = 0x0300;
- MAIN_FORCED_BY_USER = 0x0400;
- MAIN_PREDICTED = 0x0500;
- MAIN_FORCED_BY_SYSTEM = 0x0600;
- }
- optional MainReason main_reason = 4;
-
- // A more detailed reason for the standby bucket change. The sub reason name is dependent on
- // the main reason. Values are one of the REASON_SUB_XXX constants defined in
- // UsageStatsManager.java.
- optional int32 sub_reason = 5;
-}
-
-/**
-* Reports a started sharesheet transaction.
-*
-* Logged from:
-* frameworks/base/core/java/com/android/internal/app/ChooserActivity.java
-*/
-message SharesheetStarted {
- // The event_id (as for UiEventReported).
- optional int32 event_id = 1;
- // The calling app's package name.
- optional string package_name = 2;
- // An identifier to tie together multiple logs relating to the same share event
- optional int32 instance_id = 3;
- // The mime type of the share
- optional string mime_type = 4;
- // The number of direct targets the calling app is providing that will be shown.
- optional int32 num_app_provided_direct_targets = 5;
- // The number of app targets the calling app is providing that will be shown.
- optional int32 num_app_provided_app_targets = 6;
- // True if the share originates from the workprofile
- optional bool is_workprofile = 7;
-
- enum SharesheetPreviewType { // Constants from ChooserActivity.java
- CONTENT_PREVIEW_TYPE_UNKNOWN = 0; // Default for proto 2 / 3 compatibility.
- CONTENT_PREVIEW_IMAGE = 1; // The preview shown in the sharesheet is an image.
- CONTENT_PREVIEW_FILE = 2; // The preview shown in the sharesheet is a file.
- CONTENT_PREVIEW_TEXT = 3; // The preview shown in the sharesheet is text.
- }
- // How the sharesheet preview is presented.
- optional SharesheetPreviewType preview_type = 8;
-
- enum ResolverActivityIntent { // Intents handled by ResolverActivity.java
- INTENT_DEFAULT = 0;
- INTENT_ACTION_VIEW = 1;
- INTENT_ACTION_EDIT = 2;
- INTENT_ACTION_SEND = 3;
- INTENT_ACTION_SENDTO = 4;
- INTENT_ACTION_SEND_MULTIPLE = 5;
- INTENT_ACTION_IMAGE_CAPTURE = 6;
- INTENT_ACTION_MAIN = 7;
- }
- // The intent being processed (only SEND and SEND_MULTIPLE are system sharesheet)
- optional ResolverActivityIntent intent_type = 9;
-}
-
-/**
- * Reports a ranking selection event.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/app/ChooserActivity.java (sharesheet)
- */
-message RankingSelected {
- // The event_id (as for UiEventReported).
- optional int32 event_id = 1;
- // The relevant app's package name (can be source or picked package).
- optional string package_name = 2;
- // An identifier to tie together multiple logs relating to the same share event.
- optional int32 instance_id = 3;
- // Which of the ranked targets got picked, default starting position 0.
- optional int32 position_picked = 4;
-}
-
-/**
- * Logs when TvSettings UI is interacted at.
- *
- * Logged from: packages/apps/TvSettings
- */
-message TvSettingsUIInteracted {
-
- /** The UI action category */
- optional android.app.tvsettings.Action action = 1;
-
- /** The ID of the entry that the users actioned on */
- optional android.app.tvsettings.ItemId item_id = 2;
-}
-
-/**
- * Logs information about a package installation using package installer V2 APIs.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/pm/PackageInstallerSession.java
- */
-message PackageInstallerV2Reported {
- // Whether this installation uses Incremental File System
- optional bool is_incremental = 1;
- // Name of the package that is intended to be installed
- optional string package_name = 2;
- // The duration between when the install was requested to when the install has completed
- optional int64 duration_millis = 3;
- // Installation result in final integer, which are SystemApi's.
- // Return_code 1 indicates success.
- // For full list, see frameworks/base/core/java/android/content/pm/PackageManager.java
- optional int32 return_code = 4;
- // Total size of the APKs installed for this package
- optional int64 apks_size_bytes = 5;
-}
-
-/**
- * Logs settings provider values.
- *
- * Use DeviceConfig.getProperties to get a list Setting key, query the data from content provider,
- * then write the value to proto.
- *
- */
-message SettingSnapshot {
-
- // Setting key
- optional string name = 1;
-
- enum SettingsValueType {
- NOTASSIGNED = 0;
- ASSIGNED_BOOL_TYPE = 1;
- ASSIGNED_INT_TYPE = 2;
- ASSIGNED_FLOAT_TYPE = 3;
- ASSIGNED_STRING_TYPE = 4;
- };
- // Setting value type
- optional SettingsValueType type = 2;
-
- optional bool bool_value = 3;
-
- optional int32 int_value = 4;
-
- optional float float_value = 5;
-
- optional string str_value = 6;
-
- // Android user index. 0 for primary user, 10, 11 for secondary or profile user
- optional int32 user_id = 7;
-}
-
-/**
- * An event logged to indicate that a user journey is about to be performed. This atom includes
- * relevant information about the users involved in the journey. A UserLifecycleEventOccurred event
- * will immediately follow this atom which will describe the event(s) and its state.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/UserController.java
- * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java
- */
-message UserLifecycleJourneyReported {
- // An identifier to track a chain of user lifecycle events occurring (referenced in the
- // UserLifecycleEventOccurred atom)
- optional int64 session_id = 1;
-
- // Indicates what type of user journey this session is related to
- enum Journey {
- UNKNOWN = 0; // Undefined user lifecycle journey
- USER_SWITCH_UI = 1; // A user switch journey where a UI is shown
- USER_SWITCH_FG = 2; // A user switch journey without a UI shown
- USER_START = 3; // A user start journey
- USER_CREATE = 4; // A user creation journey
- }
- optional Journey journey = 2;
- // Which user the journey is originating from - could be -1 for certain phases (eg USER_CREATE)
- // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest)
- optional int32 origin_user = 3;
- // Which user the journey is targeting
- // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest)
- optional int32 target_user = 4;
-
- // What is the user type of the target user
- // These should be in sync with USER_TYPE_* flags defined in UserManager.java
- enum UserType {
- TYPE_UNKNOWN = 0;
- FULL_SYSTEM = 1;
- FULL_SECONDARY = 2;
- FULL_GUEST = 3;
- FULL_DEMO = 4;
- FULL_RESTRICTED = 5;
- PROFILE_MANAGED = 6;
- SYSTEM_HEADLESS = 7;
- }
- optional UserType user_type = 5;
- // What are the flags attached to the target user
- optional int32 user_flags = 6;
-}
-
-/**
- * An event logged when a specific user lifecycle event is performed. These events should be
- * correlated with a UserLifecycleJourneyReported atom via the session_id.
- * Note: journeys can span over multiple events, hence some events may share a single session id.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/UserController.java
- * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java
- */
-message UserLifecycleEventOccurred {
- // An id which links back to user details (reported in the UserLifecycleJourneyReported atom)
- optional int64 session_id = 1;
- // The target user for this event (same as target_user in the UserLifecycleJourneyReported atom)
- // This integer is a UserIdInt (eg 0 for the system user, 10 for secondary/guest)
- optional int32 user_id = 2;
-
- enum Event {
- UNKNOWN = 0; // Indicates that the associated user journey timed-out or resulted in an error
- SWITCH_USER = 1; // Indicates that this is a user switch event
- START_USER = 2; // Indicates that this is a user start event
- CREATE_USER = 3; // Indicates that this is a user create event
- USER_RUNNING_LOCKED = 4; // Indicates that user is running in locked state
- UNLOCKING_USER = 5; // Indicates that this is a user unlocking event
- UNLOCKED_USER = 6; // Indicates that this is a user unlocked event
- }
- optional Event event = 3;
-
- enum State {
- NONE = 0; // Indicates the associated event has no start/end defined
- BEGIN = 1;
- FINISH = 2;
- }
- optional State state = 4; // Represents the state of an event (beginning/ending)
-}
-
-/**
- * Logs when accessibility shortcut clicked.
- *
- * Logged from:
- * frameworks/base/services/accessibility/java/com/android/server/accessibility
- */
-message AccessibilityShortcutReported {
- // The accessibility feature(including installed a11y service, framework a11y feature,
- // and installed a11y activity) package name that is assigned to the accessibility shortcut.
- optional string package_name = 1;
-
- // The definition of the accessibility shortcut.
- // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto.
- optional android.stats.accessibility.ShortcutType shortcut_type = 2;
-
- // The definition of the service status.
- // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto.
- optional android.stats.accessibility.ServiceStatus service_status = 3;
-}
-
-/**
- * Logs when accessibility service status changed.
- *
- * Logged from:
- * packages/apps/Settings/src/com/android/settings/accessibility
- */
-message AccessibilityServiceReported {
- // The accessibility service package name.
- optional string package_name = 1;
-
- // The definition of the service status.
- // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto.
- optional android.stats.accessibility.ServiceStatus service_status = 2;
-}
-
-/**
- * Logs when display wake up.
- *
- * Logged from:
- * services/core/java/com/android/server/power/Notifier.java
- */
-
-message DisplayWakeReported {
- // Wake_up_reason code
- // If LOWORD(wake_up_reason) = 0
- // reference to HIWORD(wake_up_reason) PowerManager.WAKE_REASON_XXX
- // else reference wake_up_reason to
- // services/core/java/com/android/server/power/Notifier.java#onWakeUp
- optional int32 wake_up_reason = 1;
-}
-
-/**
- * Logs app usage events.
- */
-message AppUsageEventOccurred {
- optional int32 uid = 1 [(is_uid) = true];
- optional string package_name = 2;
- optional string class_name = 3;
-
- enum EventType {
- NONE = 0;
- MOVE_TO_FOREGROUND = 1;
- MOVE_TO_BACKGROUND = 2;
- }
- optional EventType event_type = 4;
-}
-
-/*
- * Quality metrics logged when EVS cameras are active.
- *
- * Logged from:
- * packages/services/Car/evs/manager/1.1/Enumerator.cpp
- */
-message EvsUsageStatsReported {
-
- // Camera identifier to distinguish the source camera device. This is not
- // globally unique and therefore cannot be used to identify the user and/or
- // the device.
- optional int32 device_id = 1;
-
- // Peak number of clients during the service
- optional int32 peak_num_clients = 2;
-
- // Number of erroneous events during the service
- optional int32 num_errors = 3;
-
- // Round trip latency of the very first frame
- optional int64 first_latency_millis = 4;
-
- // Average frame round trip latency
- optional float avg_latency_millis = 5;
-
- // Peak frame round trip latency
- optional int64 peak_latency_millis = 6;
-
- // Total number of frames received
- optional int64 total_frames = 7;
-
- // Number of frames ignored
- optional int64 ignored_frames = 8;
-
- // Number of dropped frames to synchronize camera devices
- optional int64 dropped_frames_to_sync = 9;
-
- // The duration of the service
- optional int64 duration_millis = 10;
-}
-
-/**
- * Logs audio power usage stats.
- *
- * Pushed from:
- * frameworks/av/services/mediametrics/AudioPowerUsage.cpp
- */
-message AudioPowerUsageDataReported {
- /**
- * Device used for input/output
- *
- * All audio devices please refer to below file:
- * system/media/audio/include/system/audio-base.h
- *
- * Define our own enum values because we don't report all audio devices.
- * Currently, we only report built-in audio devices such as handset, speaker,
- * built-in mics, common audio devices such as wired headset, usb headset
- * and bluetooth devices.
- */
- enum AudioDevice {
- OUTPUT_EARPIECE = 0x1; // handset
- OUTPUT_SPEAKER = 0x2; // dual speaker
- OUTPUT_WIRED_HEADSET = 0x4; // 3.5mm headset
- OUTPUT_USB_HEADSET = 0x8; // usb headset
- OUTPUT_BLUETOOTH_SCO = 0x10; // bluetooth sco
- OUTPUT_BLUETOOTH_A2DP = 0x20; // a2dp
- OUTPUT_SPEAKER_SAFE = 0x40; // bottom speaker
-
- INPUT_DEVICE_BIT = 0x40000000; // non-negative positive int32.
- INPUT_BUILTIN_MIC = 0x40000001; // buildin mic
- INPUT_BUILTIN_BACK_MIC = 0x40000002; // buildin back mic
- INPUT_WIRED_HEADSET_MIC = 0x40000004; // 3.5mm headset mic
- INPUT_USB_HEADSET_MIC = 0x40000008; // usb headset mic
- INPUT_BLUETOOTH_SCO = 0x40000010; // bluetooth sco mic
- }
- optional AudioDevice audio_device = 1;
-
- // Duration of the audio in seconds
- optional int32 duration_secs = 2;
-
- // Average volume (0 ... 1.0)
- optional float average_volume = 3;
-
- enum AudioType {
- UNKNOWN_TYPE = 0;
- VOICE_CALL_TYPE = 1; // voice call
- VOIP_CALL_TYPE = 2; // voip call, including uplink and downlink
- MEDIA_TYPE = 3; // music and system sound
- RINGTONE_NOTIFICATION_TYPE = 4; // ringtone and notification
- ALARM_TYPE = 5; // alarm type
- // record type
- CAMCORDER_TYPE = 6; // camcorder
- RECORD_TYPE = 7; // other recording
- }
- optional AudioType type = 4;
-}
-
-/**
- * Pulls bytes transferred over WiFi and mobile networks sliced by uid, is_metered, and tag.
- *
- * Pulled from:
- * StatsPullAtomService, which uses NetworkStatsService to query NetworkStats.
- */
-message BytesTransferByTagAndMetered {
- optional int32 uid = 1 [(is_uid) = true];
-
- optional bool is_metered = 2;
-
- optional int32 tag = 3;
-
- optional int64 rx_bytes = 4;
-
- optional int64 rx_packets = 5;
-
- optional int64 tx_bytes = 6;
-
- optional int64 tx_packets = 7;
-}
-
-/*
- * Logs when the Media Output Switcher finishes a media switch operation.
- *
- * Logged from:
- * packages/apps/Settings/src/com/android/settings/media/MediaOutputSliceWorker.java
- */
-message MediaOutputOpSwitchReported {
- // Source medium type before switching.
- optional android.app.settings.mediaoutput.MediumType source = 1;
-
- // Target medium type after switching.
- optional android.app.settings.mediaoutput.MediumType target = 2;
-
- // The result of switching.
- optional android.app.settings.mediaoutput.SwitchResult result = 3;
-
- // The detail code of a switching result.
- optional android.app.settings.mediaoutput.SubResult subresult = 4;
-
- /*
- * The package name of a pre-installed app, whose media session is being switched.
- */
- optional string media_session_package_name = 5;
-
- // The amount of available wired devices when a switching is being performed.
- optional int32 available_wired_device_count = 6;
-
- // The amount of available Bluetooth devices a switching is being performed.
- optional int32 available_bt_device_count = 7;
-
- // The amount of available remote devices when a switching is being performed.
- optional int32 available_remote_device_count = 8;
-
- // The amount of applied devices within a remote dynamic group after a switching is done.
- optional int32 applied_device_count_within_remote_group = 9;
-}
-
-/**
- * Logs when the Assistant is invoked.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
- */
-message AssistantInvocationReported {
-
- // The event_id (as for UiEventReported).
- optional int32 event_id = 1;
-
- // The registered Assistant's uid and package (as for UiEventReported).
- optional int32 uid = 2 [(is_uid) = true];
- optional string package_name = 3;
-
- // An identifier used to disambiguate which logs refer to a particular invocation of the
- // Assistant (as for UiEventReported).
- optional int32 instance_id = 4;
-
- // The state of the device at the time of invocation.
- enum DeviceState {
- UNKNOWN_DEVICE_STATE = 0;
- AOD1 = 1;
- AOD2 = 2;
- BOUNCER = 3;
- UNLOCKED_LOCKSCREEN = 4;
- LAUNCHER_HOME = 5;
- LAUNCHER_OVERVIEW = 6;
- LAUNCHER_ALL_APPS = 7;
- APP_DEFAULT = 8;
- APP_IMMERSIVE = 9;
- APP_FULLSCREEN = 10;
- }
- optional DeviceState device_state = 5;
-
- // Whether the Assistant handles were showing at the time of invocation.
- optional bool assistant_handles_showing = 6;
-}
-
-/**
- * Logs when an AudioRecord finishes running on an audio device
- *
- * Logged from:
- * frameworks/av/services/mediametrics/AudioAnalytics.cpp
- */
-message MediametricsAudioRecordDeviceUsageReported {
- // The devices connected to this AudioRecord.
- // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2".
- // See lookup<INPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
- // See audio_device_t in system/media/audio/include/system/audio-base.h
- optional string devices = 1;
-
- // The name of the remote device attached to the device, typically available for USB or BT.
- // This may be empty for a fixed device, or separated by "|" if more than one.
- optional string device_names = 2;
-
- // The amount of time spent in the device as measured by the active track in AudioFlinger.
- optional int64 device_time_nanos = 3;
-
- // The audio data format used for encoding.
- // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t
- optional string encoding = 4;
-
- // The client-server buffer framecount.
- // The framecount is generally between 960 - 48000 for PCM encoding.
- // The framecount represents raw buffer size in bytes for non-PCM encoding.
- optional int32 frame_count = 5;
-
- // The number of audio intervals (contiguous, continuous playbacks).
- optional int32 interval_count = 6;
-
- // The sample rate of the AudioRecord.
- // A number generally between 8000-96000 (frames per second).
- optional int32 sample_rate = 7;
-
- // The audio input flags used to construct the AudioRecord.
- // A string OR from system/media/audio/include/system/audio-base.h audio_input_flags_t
- optional string flags = 8;
-
- // The santized package name of the audio client associated with the AudioRecord.
- // See getSanitizedPackageNameAndVersionCode() in
- // frameworks/av/services/mediametrics/MediaMetricsService.cpp
- optional string package_name = 9;
-
- // The selected device id (nonzero if a non-default device is selected)
- optional int32 selected_device_id = 10;
-
- // The caller of the AudioRecord.
- // See lookup<CALLER_NAME>() in frameworks/av/services/mediametrics/AudioTypes.cpp
- optional string caller = 11;
-
- // The audio source for AudioRecord.
- // An enumeration from system/media/audio/include/system/audio-base.h audio_source_t
- optional string source = 12;
-}
-
-/**
- * Logs when an AudioThread finishes running on an audio device
- *
- * Logged from:
- * frameworks/av/services/mediametrics/AudioAnalytics.cpp
- */
-message MediametricsAudioThreadDeviceUsageReported {
- // The devices connected to this audio thread.
- // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2".
- // (for record threads):
- // See lookup<INPUT_DEVICE> in frameworks/av/services/mediametrics/AudioTypes.cpp
- // (for playback threads):
- // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
- // See audio_device_t in system/media/audio/include/system/audio-base.h
- optional string devices = 1;
-
- // The name of the remote device attached to the device, typically available for USB or BT.
- // This may be empty for a fixed device, or separated by "|" if more than one.
- optional string device_names = 2;
-
- // The amount of time spent in the device as measured by the active track in AudioFlinger.
- optional int64 device_time_nanos = 3;
-
- // The audio data format used for encoding.
- // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t
- optional string encoding = 4;
-
- // The framecount of the buffer delivered to (or from) the HAL.
- // The framecount is generally ~960 for PCM encoding.
- // The framecount represents raw buffer size in bytes for non-PCM encoding.
- optional int32 frame_count = 5;
-
- // The number of audio intervals (contiguous, continuous playbacks).
- optional int32 interval_count = 6;
-
- // The sample rate of the audio thread.
- // A number generally between 8000-96000 (frames per second).
- optional int32 sample_rate = 7;
-
- // The audio flags used to construct the thread
- // (for record threads):
- // A string OR from system/media/audio/include/system/audio-base.h audio_input_flags_t
- // (for playback threads):
- // A string OR from system/media/audio/include/system/audio-base.h audio_output_flags_t
- optional string flags = 8;
-
- // The number of underruns encountered for a playback thread or the
- // number of overruns encountered for a capture thread.
- optional int32 xruns = 9;
-
- // The type of thread
- // A thread type enumeration from
- // frameworks/av/mediametrics/services/Translate.h
- optional string type = 10;
-}
-
-/**
- * Logs when an AudioTrack finishes running on an audio device
- *
- * Logged from:
- * frameworks/av/services/mediametrics/AudioAnalytics.cpp
- */
-message MediametricsAudioTrackDeviceUsageReported {
- // The output devices connected to this AudioTrack.
- // A string OR of various output device categories, e.g. "DEVICE1|DEVICE2".
- // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
- // See audio_device_t in system/media/audio/include/system/audio-base.h
- optional string devices = 1;
-
- // The name of the remote device attached to the device, typically available for USB or BT.
- // This may be empty for a fixed device, or separated by "|" if more than one.
- optional string device_names = 2;
-
- // The amount of time spent in the device as measured by the active track in AudioFlinger.
- optional int64 device_time_nanos = 3;
-
- // The audio data format used for encoding.
- // An enumeration from system/media/audio/include/system/audio-base.h audio_format_t
- optional string encoding = 4;
-
- // The client-server buffer framecount.
- // The framecount is generally between 960 - 48000 for PCM encoding.
- // The framecount represents raw buffer size in bytes for non-PCM encoding.
- // A static track (see traits) may have a very large framecount.
- optional int32 frame_count = 5;
-
- // The number of audio intervals (contiguous, continuous playbacks).
- optional int32 interval_count = 6;
-
- // The sample rate of the AudioTrack.
- // A number generally between 8000-96000 (frames per second).
- optional int32 sample_rate = 7;
-
- // The audio flags used to construct the AudioTrack.
- // A string OR from system/media/audio/include/system/audio-base.h audio_output_flags_t
- optional string flags = 8;
-
- // The number of underruns encountered.
- optional int32 xruns = 9;
-
- // The santized package name of the audio client associated with the AudioTrack.
- // See getSanitizedPackageNameAndVersionCode() in
- // frameworks/av/services/mediametrics/MediaMetricsService.cpp
- optional string package_name = 10;
-
- // The latency of the last sample in the buffer in milliseconds.
- optional float device_latency_millis = 11;
-
- // The startup time in milliseconds from start() to sample played.
- optional float device_startup_millis = 12;
-
- // The average volume of the track on the device [ 0.f - 1.f ]
- optional float device_volume = 13;
-
- // The selected device id (nonzero if a non-default device is selected)
- optional int32 selected_device_id = 14;
-
- // The stream_type category for the AudioTrack.
- // An enumeration from system/media/audio/include/system/audio-base.h audio_stream_type_t
- optional string stream_type = 15;
-
- // The usage for the AudioTrack.
- // An enumeration from system/media/audio/include/system/audio-base.h audio_usage_t
- optional string usage = 16;
-
- // The content type of the AudioTrack.
- // An enumeration from system/media/audio/include/system/audio-base.h audio_content_type_t
- optional string content_type = 17;
-
- // The caller of the AudioTrack.
- // See lookup<CALLER_NAME>() in frameworks/av/services/mediametrics/AudioTypes.cpp
- optional string caller = 18;
-
- // The traits of the AudioTrack.
- // A string OR of different traits, may be empty string.
- // Only "static" is supported for R.
- // See lookup<TRACK_TRAITS>() in frameworks/av/services/mediametrics/AudioTypes.cpp
- optional string traits = 19;
-}
-
-/**
- * Logs the status of an audio device connection attempt.
- *
- * Logged from:
- * frameworks/av/services/mediametrics/AudioAnalytics.cpp
- */
-message MediametricsAudioDeviceConnectionReported {
- // The input devices represented by this report.
- // A string OR of various input device categories, e.g. "DEVICE1|DEVICE2".
- // See lookup<INPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
- // See audio_device_t in system/media/audio/include/system/audio-base.h
- optional string input_devices = 1;
-
- // The output devices represented by this report.
- // A string OR of various output device categories.
- // See lookup<OUTPUT_DEVICE>() in frameworks/av/services/mediametrics/AudioTypes.cpp
- // See audio_device_t in system/media/audio/include/system/audio-base.h
- optional string output_devices = 2;
-
- // The name of the remote device attached to the device, typically available for USB or BT.
- // This may be empty for a fixed device, or separated by "|" if more than one.
- optional string device_names = 3;
-
- // The result of the audio device connection.
- // 0 indicates success: connection verified.
- // 1 indicates unknown: connection not verified or not known if diverted properly.
- // Other values indicate specific status.
- // See DeviceConnectionResult in frameworks/av/services/mediametrics/AudioTypes.h
- optional int32 result = 4;
-
- // Average milliseconds of time to connect
- optional float time_to_connect_millis = 5;
-
- // Number of connections if aggregated statistics, otherwise 1.
- optional int32 connection_count = 6;
-}
-
-/**
- * Logs: i) creation of different types of cryptographic keys in the keystore,
- * ii) operations performed using the keys,
- * iii) attestation of the keys
- * Logged from: system/security/keystore/key_event_log_handler.cpp
- */
-message KeystoreKeyEventReported {
-
- enum Algorithm {
- /** Asymmetric algorithms. */
- RSA = 1;
- // 2 removed, do not reuse.
- EC = 3;
- /** Block cipher algorithms */
- AES = 32;
- TRIPLE_DES = 33;
- /** MAC algorithms */
- HMAC = 128;
- };
- /** Algorithm associated with the key */
- optional Algorithm algorithm = 1;
-
- /** Size of the key */
- optional int32 key_size = 2;
-
- enum KeyOrigin {
- /** Generated in keymaster. Should not exist outside the TEE. */
- GENERATED = 0;
- /** Derived inside keymaster. Likely exists off-device. */
- DERIVED = 1;
- /** Imported into keymaster. Existed as cleartext in Android. */
- IMPORTED = 2;
- /** Keymaster did not record origin. */
- UNKNOWN = 3;
- /** Securely imported into Keymaster. */
- SECURELY_IMPORTED = 4;
- };
- /* Logs whether the key was generated, imported, securely imported, or derived.*/
- optional KeyOrigin key_origin = 3;
-
- enum HardwareAuthenticatorType {
- NONE = 0;
- PASSWORD = 1;
- FINGERPRINT = 2;
- // Additional entries must be powers of 2.
- };
- /**
- * What auth types does this key require? If none,
- * then no auth required.
- */
- optional HardwareAuthenticatorType user_auth_type = 4;
-
- /**
- * If user authentication is required, is the requirement time based? If it
- * is not time based then this field will not be used and the key is per
- * operation. Per operation keys must be user authenticated on each usage.
- */
- optional int32 user_auth_key_timeout_secs = 5;
-
- /**
- * padding mode, digest, block_mode and purpose should ideally be repeated
- * fields. However, since statsd does not support repeated fields in
- * pushed atoms, they are represented using bitmaps.
- */
-
- /** Track which padding mode is being used.*/
- optional int32 padding_mode_bitmap = 6;
-
- /** Track which digest is being used. */
- optional int32 digest_bitmap = 7;
-
- /** Track what block mode is being used (for encryption). */
- optional int32 block_mode_bitmap = 8;
-
- /** Track what purpose is this key serving. */
- optional int32 purpose_bitmap = 9;
-
- enum EcCurve {
- P_224 = 0;
- P_256 = 1;
- P_384 = 2;
- P_521 = 3;
- };
- /** Which ec curve was selected if elliptic curve cryptography is in use **/
- optional EcCurve ec_curve = 10;
-
- enum KeyBlobUsageRequirements {
- STANDALONE = 0;
- REQUIRES_FILE_SYSTEM = 1;
- };
- /** Standalone or is a file system required */
- optional KeyBlobUsageRequirements key_blob_usage_reqs = 11;
-
- enum Type {
- key_operation = 0;
- key_creation = 1;
- key_attestation = 2;
- }
- /** Key creation event, operation event or attestation event? */
- optional Type type = 12;
-
- /** Was the key creation, operation, or attestation successful? */
- optional bool was_successful = 13;
-
- /** Response code or error code */
- optional int32 error_code = 14;
-}
-
-// Blob Committer stats
-// Keep in sync between:
-// frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
-// frameworks/base/cmds/statsd/src/atoms.proto
-message BlobCommitterProto {
- // Committer app's uid
- optional int32 uid = 1 [(is_uid) = true];
-
- // Unix epoch timestamp of the commit in milliseconds
- optional int64 commit_timestamp_millis = 2;
-
- // Flags of what access types the committer has set for the Blob
- optional int32 access_mode = 3;
-
- // Number of packages that have been whitelisted for ACCESS_TYPE_WHITELIST
- optional int32 num_whitelisted_package = 4;
-}
-
-// Blob Leasee stats
-// Keep in sync between:
-// frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
-// frameworks/base/cmds/statsd/src/atoms.proto
-message BlobLeaseeProto {
- // Leasee app's uid
- optional int32 uid = 1 [(is_uid) = true];
-
- // Unix epoch timestamp for lease expiration in milliseconds
- optional int64 lease_expiry_timestamp_millis = 2;
-}
-
-// List of Blob Committers
-// Keep in sync between:
-// frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
-// frameworks/base/cmds/statsd/src/atoms.proto
-message BlobCommitterListProto {
- repeated BlobCommitterProto committer = 1;
-}
-
-// List of Blob Leasees
-// Keep in sync between:
-// frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
-// frameworks/base/cmds/statsd/src/atoms.proto
-message BlobLeaseeListProto {
- repeated BlobLeaseeProto leasee = 1;
-}
-
-/**
- * Logs the current state of a Blob committed with BlobStoreManager
- *
- * Pulled from:
- * frameworks/base/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
- */
-message BlobInfo {
- // Id of the Blob
- optional int64 blob_id = 1;
-
- // Size of the Blob data
- optional int64 size = 2;
-
- // Unix epoch timestamp of the Blob's expiration in milliseconds
- optional int64 expiry_timestamp_millis = 3;
-
- // List of committers of this Blob
- optional BlobCommitterListProto committers = 4;
-
- // List of leasees of this Blob
- optional BlobLeaseeListProto leasees = 5;
-}
-
-/**
- * Pushes TLS handshake counters from Conscrypt.
- * Pulled from:
- * external/conscrypt/common/src/main/java/org/conscrypt/ConscryptEngineSocket.java
- * external/conscrypt/common/src/main/java/org/conscrypt/ConscryptFileDescriptorSocket.java
- */
- message TlsHandshakeReported {
- optional bool success = 1;
-
- optional android.stats.tls.Protocol protocol = 2;
-
- optional android.stats.tls.CipherSuite cipher_suite = 3;
-
- optional int32 handshake_duration_millis = 4;
-}
diff --git a/cmds/statsd/src/shell/shell_data.proto b/cmds/statsd/src/shell/shell_data.proto
index 236bdbd..ec41cbc 100644
--- a/cmds/statsd/src/shell/shell_data.proto
+++ b/cmds/statsd/src/shell/shell_data.proto
@@ -21,7 +21,7 @@
option java_package = "com.android.os.statsd";
option java_outer_classname = "ShellDataProto";
-import "frameworks/base/cmds/statsd/src/atoms.proto";
+import "frameworks/proto_logging/stats/atoms.proto";
// The output of shell subscription, including both pulled and pushed subscriptions.
message ShellData {
diff --git a/cmds/statsd/src/stats_log.proto b/cmds/statsd/src/stats_log.proto
index ddd2725..bb07963 100644
--- a/cmds/statsd/src/stats_log.proto
+++ b/cmds/statsd/src/stats_log.proto
@@ -21,7 +21,7 @@
option java_package = "com.android.os";
option java_outer_classname = "StatsLog";
-import "frameworks/base/cmds/statsd/src/atoms.proto";
+import "frameworks/proto_logging/stats/atoms.proto";
message DimensionsValue {
optional int32 field = 1;
diff --git a/cmds/statsd/tests/LogEvent_test.cpp b/cmds/statsd/tests/LogEvent_test.cpp
index 5c170c0..bde59f4 100644
--- a/cmds/statsd/tests/LogEvent_test.cpp
+++ b/cmds/statsd/tests/LogEvent_test.cpp
@@ -16,8 +16,8 @@
#include <gtest/gtest.h>
-#include "frameworks/base/cmds/statsd/src/atoms.pb.h"
-#include "frameworks/base/core/proto/android/stats/launcher/launcher.pb.h"
+#include "frameworks/proto_logging/stats/atoms.pb.h"
+#include "frameworks/proto_logging/stats/enums/stats/launcher/launcher.pb.h"
#include "log/log_event_list.h"
#include "stats_event.h"
diff --git a/cmds/statsd/tests/shell/ShellSubscriber_test.cpp b/cmds/statsd/tests/shell/ShellSubscriber_test.cpp
index e384b6a..1f0e2c8 100644
--- a/cmds/statsd/tests/shell/ShellSubscriber_test.cpp
+++ b/cmds/statsd/tests/shell/ShellSubscriber_test.cpp
@@ -20,9 +20,9 @@
#include <vector>
-#include "frameworks/base/cmds/statsd/src/atoms.pb.h"
#include "frameworks/base/cmds/statsd/src/shell/shell_config.pb.h"
#include "frameworks/base/cmds/statsd/src/shell/shell_data.pb.h"
+#include "frameworks/proto_logging/stats/atoms.pb.h"
#include "stats_event.h"
#include "tests/metrics/metrics_test_helper.h"
#include "tests/statsd_test_util.h"
diff --git a/core/api/current.txt b/core/api/current.txt
index 0bbe939..a20b58e 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -30273,6 +30273,7 @@
method public static long getMobileRxPackets();
method public static long getMobileTxBytes();
method public static long getMobileTxPackets();
+ method public static long getRxBytes(@NonNull String);
method public static long getRxPackets(@NonNull String);
method public static int getThreadStatsTag();
method public static int getThreadStatsUid();
@@ -30280,6 +30281,7 @@
method public static long getTotalRxPackets();
method public static long getTotalTxBytes();
method public static long getTotalTxPackets();
+ method public static long getTxBytes(@NonNull String);
method public static long getTxPackets(@NonNull String);
method public static long getUidRxBytes(int);
method public static long getUidRxPackets(int);
diff --git a/core/java/android/app/timedetector/ITimeDetectorService.aidl b/core/java/android/app/timedetector/ITimeDetectorService.aidl
index 5ead0c9..7bea5d7 100644
--- a/core/java/android/app/timedetector/ITimeDetectorService.aidl
+++ b/core/java/android/app/timedetector/ITimeDetectorService.aidl
@@ -34,7 +34,7 @@
* {@hide}
*/
interface ITimeDetectorService {
- void suggestManualTime(in ManualTimeSuggestion timeSuggestion);
+ boolean suggestManualTime(in ManualTimeSuggestion timeSuggestion);
void suggestNetworkTime(in NetworkTimeSuggestion timeSuggestion);
void suggestTelephonyTime(in TelephonyTimeSuggestion timeSuggestion);
}
diff --git a/core/java/android/app/timedetector/TimeDetector.java b/core/java/android/app/timedetector/TimeDetector.java
index 84ad495..162e182 100644
--- a/core/java/android/app/timedetector/TimeDetector.java
+++ b/core/java/android/app/timedetector/TimeDetector.java
@@ -53,12 +53,16 @@
void suggestTelephonyTime(@NonNull TelephonyTimeSuggestion timeSuggestion);
/**
- * Suggests the user's manually entered current time to the detector.
+ * Suggests the current time, determined from the user's manually entered information, to
+ * the detector. Returns {@code false} if the suggestion was invalid, or the device
+ * configuration prevented the suggestion being used, {@code true} if the suggestion was
+ * accepted. A suggestion that is valid but does not change the time because it matches the
+ * current device time is considered accepted.
*
* @hide
*/
@RequiresPermission(android.Manifest.permission.SUGGEST_MANUAL_TIME_AND_ZONE)
- void suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion);
+ boolean suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion);
/**
* Suggests the time according to a network time source like NTP.
diff --git a/core/java/android/app/timedetector/TimeDetectorImpl.java b/core/java/android/app/timedetector/TimeDetectorImpl.java
index c1d6667..ac02c89 100644
--- a/core/java/android/app/timedetector/TimeDetectorImpl.java
+++ b/core/java/android/app/timedetector/TimeDetectorImpl.java
@@ -52,12 +52,12 @@
}
@Override
- public void suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion) {
+ public boolean suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion) {
if (DEBUG) {
Log.d(TAG, "suggestManualTime called: " + timeSuggestion);
}
try {
- mITimeDetectorService.suggestManualTime(timeSuggestion);
+ return mITimeDetectorService.suggestManualTime(timeSuggestion);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
diff --git a/core/java/android/app/timezonedetector/ITimeZoneDetectorService.aidl b/core/java/android/app/timezonedetector/ITimeZoneDetectorService.aidl
index b06f4b8..6d7b26d 100644
--- a/core/java/android/app/timezonedetector/ITimeZoneDetectorService.aidl
+++ b/core/java/android/app/timezonedetector/ITimeZoneDetectorService.aidl
@@ -33,6 +33,6 @@
* {@hide}
*/
interface ITimeZoneDetectorService {
- void suggestManualTimeZone(in ManualTimeZoneSuggestion timeZoneSuggestion);
+ boolean suggestManualTimeZone(in ManualTimeZoneSuggestion timeZoneSuggestion);
void suggestTelephonyTimeZone(in TelephonyTimeZoneSuggestion timeZoneSuggestion);
}
diff --git a/core/java/android/app/timezonedetector/TimeZoneDetector.java b/core/java/android/app/timezonedetector/TimeZoneDetector.java
index 34a7586..b783684 100644
--- a/core/java/android/app/timezonedetector/TimeZoneDetector.java
+++ b/core/java/android/app/timezonedetector/TimeZoneDetector.java
@@ -41,13 +41,16 @@
}
/**
- * Suggests the current time zone, determined using the user's manually entered information, to
- * the detector. The detector may ignore the signal based on system settings.
+ * Suggests the current time zone, determined from the user's manually entered information, to
+ * the detector. Returns {@code false} if the suggestion was invalid, or the device
+ * configuration prevented the suggestion being used, {@code true} if the suggestion was
+ * accepted. A suggestion that is valid but does not change the time zone because it matches
+ * the current device time zone is considered accepted.
*
* @hide
*/
@RequiresPermission(android.Manifest.permission.SUGGEST_MANUAL_TIME_AND_ZONE)
- void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion);
+ boolean suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion);
/**
* Suggests the current time zone, determined using telephony signals, to the detector. The
diff --git a/core/java/android/app/timezonedetector/TimeZoneDetectorImpl.java b/core/java/android/app/timezonedetector/TimeZoneDetectorImpl.java
index 54cf1f3..3bd6b4b 100644
--- a/core/java/android/app/timezonedetector/TimeZoneDetectorImpl.java
+++ b/core/java/android/app/timezonedetector/TimeZoneDetectorImpl.java
@@ -40,12 +40,12 @@
}
@Override
- public void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion) {
+ public boolean suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion) {
if (DEBUG) {
Log.d(TAG, "suggestManualTimeZone called: " + timeZoneSuggestion);
}
try {
- mITimeZoneDetectorService.suggestManualTimeZone(timeZoneSuggestion);
+ return mITimeZoneDetectorService.suggestManualTimeZone(timeZoneSuggestion);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java
index 4e019cf..fa65061 100644
--- a/core/java/android/net/TrafficStats.java
+++ b/core/java/android/net/TrafficStats.java
@@ -597,10 +597,17 @@
}
/**
- * Return the number of packets transmitted on the specified interface since
- * device boot. Statistics are measured at the network layer, so both TCP and
+ * Return the number of packets transmitted on the specified interface since the interface
+ * was created. Statistics are measured at the network layer, so both TCP and
* UDP usage are included.
*
+ * Note that the returned values are partial statistics that do not count data from several
+ * sources and do not apply several adjustments that are necessary for correctness, such
+ * as adjusting for VPN apps, IPv6-in-IPv4 translation, etc. These values can be used to
+ * determine whether traffic is being transferred on the specific interface but are not a
+ * substitute for the more accurate statistics provided by the {@link NetworkStatsManager}
+ * APIs.
+ *
* @param iface The name of the interface.
* @return The number of transmitted packets.
*/
@@ -613,10 +620,17 @@
}
/**
- * Return the number of packets received on the specified interface since
- * device boot. Statistics are measured at the network layer, so both TCP
+ * Return the number of packets received on the specified interface since the interface was
+ * created. Statistics are measured at the network layer, so both TCP
* and UDP usage are included.
*
+ * Note that the returned values are partial statistics that do not count data from several
+ * sources and do not apply several adjustments that are necessary for correctness, such
+ * as adjusting for VPN apps, IPv6-in-IPv4 translation, etc. These values can be used to
+ * determine whether traffic is being transferred on the specific interface but are not a
+ * substitute for the more accurate statistics provided by the {@link NetworkStatsManager}
+ * APIs.
+ *
* @param iface The name of the interface.
* @return The number of received packets.
*/
@@ -628,9 +642,22 @@
}
}
- /** {@hide} */
- @UnsupportedAppUsage
- public static long getTxBytes(String iface) {
+ /**
+ * Return the number of bytes transmitted on the specified interface since the interface
+ * was created. Statistics are measured at the network layer, so both TCP and
+ * UDP usage are included.
+ *
+ * Note that the returned values are partial statistics that do not count data from several
+ * sources and do not apply several adjustments that are necessary for correctness, such
+ * as adjusting for VPN apps, IPv6-in-IPv4 translation, etc. These values can be used to
+ * determine whether traffic is being transferred on the specific interface but are not a
+ * substitute for the more accurate statistics provided by the {@link NetworkStatsManager}
+ * APIs.
+ *
+ * @param iface The name of the interface.
+ * @return The number of transmitted bytes.
+ */
+ public static long getTxBytes(@NonNull String iface) {
try {
return getStatsService().getIfaceStats(iface, TYPE_TX_BYTES);
} catch (RemoteException e) {
@@ -638,9 +665,22 @@
}
}
- /** {@hide} */
- @UnsupportedAppUsage
- public static long getRxBytes(String iface) {
+ /**
+ * Return the number of bytes received on the specified interface since the interface
+ * was created. Statistics are measured at the network layer, so both TCP
+ * and UDP usage are included.
+ *
+ * Note that the returned values are partial statistics that do not count data from several
+ * sources and do not apply several adjustments that are necessary for correctness, such
+ * as adjusting for VPN apps, IPv6-in-IPv4 translation, etc. These values can be used to
+ * determine whether traffic is being transferred on the specific interface but are not a
+ * substitute for the more accurate statistics provided by the {@link NetworkStatsManager}
+ * APIs.
+ *
+ * @param iface The name of the interface.
+ * @return The number of received bytes.
+ */
+ public static long getRxBytes(@NonNull String iface) {
try {
return getStatsService().getIfaceStats(iface, TYPE_RX_BYTES);
} catch (RemoteException e) {
diff --git a/core/java/android/os/ParcelableHolder.java b/core/java/android/os/ParcelableHolder.java
index 95c07b6..fb9fa10 100644
--- a/core/java/android/os/ParcelableHolder.java
+++ b/core/java/android/os/ParcelableHolder.java
@@ -170,16 +170,21 @@
mParcelable = null;
+ int dataSize = parcel.readInt();
+ if (dataSize < 0) {
+ throw new IllegalArgumentException("dataSize from parcel is negative");
+ } else if (dataSize == 0) {
+ if (mParcel != null) {
+ mParcel.recycle();
+ mParcel = null;
+ }
+ return;
+ }
if (mParcel == null) {
mParcel = Parcel.obtain();
}
mParcel.setDataPosition(0);
mParcel.setDataSize(0);
-
- int dataSize = parcel.readInt();
- if (dataSize < 0) {
- throw new IllegalArgumentException("dataSize from parcel is negative");
- }
int dataStartPos = parcel.dataPosition();
mParcel.appendFrom(parcel, dataStartPos, dataSize);
@@ -196,6 +201,11 @@
return;
}
+ if (mParcelable == null) {
+ parcel.writeInt(0);
+ return;
+ }
+
int sizePos = parcel.dataPosition();
parcel.writeInt(0);
int dataStartPos = parcel.dataPosition();
diff --git a/core/java/com/android/internal/compat/ChangeReporter.java b/core/java/com/android/internal/compat/ChangeReporter.java
index 5e886a6..60a30a0 100644
--- a/core/java/com/android/internal/compat/ChangeReporter.java
+++ b/core/java/com/android/internal/compat/ChangeReporter.java
@@ -221,7 +221,7 @@
FrameworkStatsLog.APP_COMPATIBILITY_CHANGE_REPORTED__SOURCE__SYSTEM_SERVER;
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, prefix = { "STATE_" }, value = {
+ @IntDef(prefix = { "STATE_" }, value = {
STATE_UNKNOWN_STATE,
STATE_ENABLED,
STATE_DISABLED,
@@ -231,7 +231,7 @@
}
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, prefix = { "SOURCE_" }, value = {
+ @IntDef(prefix = { "SOURCE_" }, value = {
SOURCE_UNKNOWN_SOURCE,
SOURCE_APP_PROCESS,
SOURCE_SYSTEM_SERVER
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 6a67670..6335baa 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -631,8 +631,11 @@
/**
* Creates a PathClassLoader for the given class path that is associated with a shared
- * namespace, i.e., this classloader can access platform-private native libraries. The
- * classloader will use java.library.path as the native library path.
+ * namespace, i.e., this classloader can access platform-private native libraries.
+ *
+ * The classloader will add java.library.path to the native library path for the classloader
+ * namespace. Since it includes platform locations like /system/lib, this is only appropriate
+ * for platform code that don't need linker namespace isolation (as opposed to APEXes and apps).
*/
static ClassLoader createPathClassLoader(String classPath, int targetSdkVersion) {
String libraryPath = System.getProperty("java.library.path");
diff --git a/core/proto/Android.bp b/core/proto/Android.bp
deleted file mode 100644
index 3b891d6..0000000
--- a/core/proto/Android.bp
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// C++ library for Bluetooth platform wide protobuf definitions
-cc_library_static {
- name: "libbt-platform-protos-lite",
- host_supported: true,
- proto: {
- export_proto_headers: true,
- type: "lite",
- },
- srcs: [
- "android/bluetooth/a2dp/enums.proto",
- "android/bluetooth/enums.proto",
- "android/bluetooth/hci/enums.proto",
- "android/bluetooth/hfp/enums.proto",
- "android/bluetooth/smp/enums.proto",
- ],
-}
diff --git a/core/proto/android/app/enums.proto b/core/proto/android/app/enums.proto
deleted file mode 100644
index e282acb..0000000
--- a/core/proto/android/app/enums.proto
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.app;
-
-option java_outer_classname = "AppProtoEnums";
-option java_multiple_files = true;
-
-// ActivityManagerInternal.java's APP_TRANSITION reasons.
-enum AppTransitionReasonEnum {
- APP_TRANSITION_REASON_UNKNOWN = 0;
- // The transition was started because we drew the splash screen.
- APP_TRANSITION_SPLASH_SCREEN = 1;
- // The transition was started because we all app windows were drawn.
- APP_TRANSITION_WINDOWS_DRAWN = 2;
- // The transition was started because of a timeout.
- APP_TRANSITION_TIMEOUT = 3;
- // The transition was started because of a we drew a task snapshot.
- APP_TRANSITION_SNAPSHOT = 4;
- // The transition was started because it was a recents animation and we only needed to wait on
- // the wallpaper.
- APP_TRANSITION_RECENTS_ANIM = 5;
-}
-
-// ActivityManager.java PROCESS_STATEs
-// Next tag: 1021
-enum ProcessStateEnum {
- // Unlike the ActivityManager PROCESS_STATE values, the ordering and numerical values
- // here are completely fixed and arbitrary. Order is irrelevant.
- // No attempt need be made to keep them in sync.
- // The values here must not be modified. Any new process states can be appended to the end.
-
- // Process state that is unknown to this proto file (i.e. is not mapped
- // by ActivityManager.processStateAmToProto()). Can only happen if there's a bug in the mapping.
- PROCESS_STATE_UNKNOWN_TO_PROTO = 998;
- // Not a real process state.
- PROCESS_STATE_UNKNOWN = 999;
- // Process is a persistent system process.
- PROCESS_STATE_PERSISTENT = 1000;
- // Process is a persistent system process and is doing UI.
- PROCESS_STATE_PERSISTENT_UI = 1001;
- // Process is hosting the current top activities. Note that this covers
- // all activities that are visible to the user.
- PROCESS_STATE_TOP = 1002;
- // Process is bound to a TOP app.
- PROCESS_STATE_BOUND_TOP = 1020;
- // Process is hosting a foreground service.
- PROCESS_STATE_FOREGROUND_SERVICE = 1003;
- // Process is hosting a service bound by the system or another foreground app.
- PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 1004;
- // Process is important to the user, and something they are aware of.
- PROCESS_STATE_IMPORTANT_FOREGROUND = 1005;
- // Process is important to the user, but not something they are aware of.
- PROCESS_STATE_IMPORTANT_BACKGROUND = 1006;
- // Process is in the background transient so we will try to keep running.
- PROCESS_STATE_TRANSIENT_BACKGROUND = 1007;
- // Process is in the background running a backup/restore operation.
- PROCESS_STATE_BACKUP = 1008;
- // Process is in the background running a service. Unlike oom_adj, this
- // level is used for both the normal running in background state and the
- // executing operations state.
- PROCESS_STATE_SERVICE = 1009;
- // Process is in the background running a receiver. Note that from the
- // perspective of oom_adj, receivers run at a higher foreground level, but
- // for our prioritization here that is not necessary and putting them
- // below services means many fewer changes in some process states as they
- // receive broadcasts.
- PROCESS_STATE_RECEIVER = 1010;
- // Same as PROCESS_STATE_TOP but while device is sleeping.
- PROCESS_STATE_TOP_SLEEPING = 1011;
- // Process is in the background, but it can't restore its state so we want
- // to try to avoid killing it.
- PROCESS_STATE_HEAVY_WEIGHT = 1012;
- // Process is in the background but hosts the home activity.
- PROCESS_STATE_HOME = 1013;
- // Process is in the background but hosts the last shown activity.
- PROCESS_STATE_LAST_ACTIVITY = 1014;
- // Process is being cached for later use and contains activities.
- PROCESS_STATE_CACHED_ACTIVITY = 1015;
- // Process is being cached for later use and is a client of another cached
- // process that contains activities.
- PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 1016;
- // Process is being cached for later use and has an activity that corresponds
- // to an existing recent task.
- PROCESS_STATE_CACHED_RECENT = 1017;
- // Process is being cached for later use and is empty.
- PROCESS_STATE_CACHED_EMPTY = 1018;
- // Process does not exist.
- PROCESS_STATE_NONEXISTENT = 1019;
-}
-
-// AppOpsManager.java - operation ids for logging
-enum AppOpEnum {
- APP_OP_NONE = -1;
- APP_OP_COARSE_LOCATION = 0;
- APP_OP_FINE_LOCATION = 1;
- APP_OP_GPS = 2;
- APP_OP_VIBRATE = 3;
- APP_OP_READ_CONTACTS = 4;
- APP_OP_WRITE_CONTACTS = 5;
- APP_OP_READ_CALL_LOG = 6;
- APP_OP_WRITE_CALL_LOG = 7;
- APP_OP_READ_CALENDAR = 8;
- APP_OP_WRITE_CALENDAR = 9;
- APP_OP_WIFI_SCAN = 10;
- APP_OP_POST_NOTIFICATION = 11;
- APP_OP_NEIGHBORING_CELLS = 12;
- APP_OP_CALL_PHONE = 13;
- APP_OP_READ_SMS = 14;
- APP_OP_WRITE_SMS = 15;
- APP_OP_RECEIVE_SMS = 16;
- APP_OP_RECEIVE_EMERGENCY_SMS = 17;
- APP_OP_RECEIVE_MMS = 18;
- APP_OP_RECEIVE_WAP_PUSH = 19;
- APP_OP_SEND_SMS = 20;
- APP_OP_READ_ICC_SMS = 21;
- APP_OP_WRITE_ICC_SMS = 22;
- APP_OP_WRITE_SETTINGS = 23;
- APP_OP_SYSTEM_ALERT_WINDOW = 24;
- APP_OP_ACCESS_NOTIFICATIONS = 25;
- APP_OP_CAMERA = 26;
- APP_OP_RECORD_AUDIO = 27;
- APP_OP_PLAY_AUDIO = 28;
- APP_OP_READ_CLIPBOARD = 29;
- APP_OP_WRITE_CLIPBOARD = 30;
- APP_OP_TAKE_MEDIA_BUTTONS = 31;
- APP_OP_TAKE_AUDIO_FOCUS = 32;
- APP_OP_AUDIO_MASTER_VOLUME = 33;
- APP_OP_AUDIO_VOICE_VOLUME = 34;
- APP_OP_AUDIO_RING_VOLUME = 35;
- APP_OP_AUDIO_MEDIA_VOLUME = 36;
- APP_OP_AUDIO_ALARM_VOLUME = 37;
- APP_OP_AUDIO_NOTIFICATION_VOLUME = 38;
- APP_OP_AUDIO_BLUETOOTH_VOLUME = 39;
- APP_OP_WAKE_LOCK = 40;
- APP_OP_MONITOR_LOCATION = 41;
- APP_OP_MONITOR_HIGH_POWER_LOCATION = 42;
- APP_OP_GET_USAGE_STATS = 43;
- APP_OP_MUTE_MICROPHONE = 44;
- APP_OP_TOAST_WINDOW = 45;
- APP_OP_PROJECT_MEDIA = 46;
- APP_OP_ACTIVATE_VPN = 47;
- APP_OP_WRITE_WALLPAPER = 48;
- APP_OP_ASSIST_STRUCTURE = 49;
- APP_OP_ASSIST_SCREENSHOT = 50;
- APP_OP_READ_PHONE_STATE = 51;
- APP_OP_ADD_VOICEMAIL = 52;
- APP_OP_USE_SIP = 53;
- APP_OP_PROCESS_OUTGOING_CALLS = 54;
- APP_OP_USE_FINGERPRINT = 55;
- APP_OP_BODY_SENSORS = 56;
- APP_OP_READ_CELL_BROADCASTS = 57;
- APP_OP_MOCK_LOCATION = 58;
- APP_OP_READ_EXTERNAL_STORAGE = 59;
- APP_OP_WRITE_EXTERNAL_STORAGE = 60;
- APP_OP_TURN_SCREEN_ON = 61;
- APP_OP_GET_ACCOUNTS = 62;
- APP_OP_RUN_IN_BACKGROUND = 63;
- APP_OP_AUDIO_ACCESSIBILITY_VOLUME = 64;
- APP_OP_READ_PHONE_NUMBERS = 65;
- APP_OP_REQUEST_INSTALL_PACKAGES = 66;
- APP_OP_PICTURE_IN_PICTURE = 67;
- APP_OP_INSTANT_APP_START_FOREGROUND = 68;
- APP_OP_ANSWER_PHONE_CALLS = 69;
- APP_OP_RUN_ANY_IN_BACKGROUND = 70;
- APP_OP_CHANGE_WIFI_STATE = 71;
- APP_OP_REQUEST_DELETE_PACKAGES = 72;
- APP_OP_BIND_ACCESSIBILITY_SERVICE = 73;
- APP_OP_ACCEPT_HANDOVER = 74;
- APP_OP_MANAGE_IPSEC_TUNNELS = 75;
- APP_OP_START_FOREGROUND = 76;
- APP_OP_BLUETOOTH_SCAN = 77;
- APP_OP_USE_BIOMETRIC = 78;
- APP_OP_ACTIVITY_RECOGNITION = 79;
- APP_OP_SMS_FINANCIAL_TRANSACTIONS = 80;
- APP_OP_READ_MEDIA_AUDIO = 81;
- APP_OP_WRITE_MEDIA_AUDIO = 82;
- APP_OP_READ_MEDIA_VIDEO = 83;
- APP_OP_WRITE_MEDIA_VIDEO = 84;
- APP_OP_READ_MEDIA_IMAGES = 85;
- APP_OP_WRITE_MEDIA_IMAGES = 86;
- APP_OP_LEGACY_STORAGE = 87;
- APP_OP_ACCESS_ACCESSIBILITY = 88;
- APP_OP_READ_DEVICE_IDENTIFIERS = 89;
- APP_OP_ACCESS_MEDIA_LOCATION = 90;
- APP_OP_QUERY_ALL_PACKAGES = 91;
- APP_OP_MANAGE_EXTERNAL_STORAGE = 92;
- APP_OP_INTERACT_ACROSS_PROFILES = 93;
- APP_OP_ACTIVATE_PLATFORM_VPN = 94;
- APP_OP_LOADER_USAGE_STATS = 95;
- APP_OP_DEPRECATED_1 = 96 [deprecated = true];
- APP_OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED = 97;
- APP_OP_AUTO_REVOKE_MANAGED_BY_INSTALLER = 98;
- APP_OP_NO_ISOLATED_STORAGE = 99;
- APP_OP_RESERVED_100 = 100;
- APP_OP_RESERVED_101 = 101;
- APP_OP_RESERVED_102 = 102;
- APP_OP_MANAGE_ONGOING_CALLS = 103;
-}
diff --git a/core/proto/android/app/job/enums.proto b/core/proto/android/app/job/enums.proto
deleted file mode 100644
index 41863bb..0000000
--- a/core/proto/android/app/job/enums.proto
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.app.job;
-
-// This file is for JobScheduler enums inside the app directory. If you're
-// adding enums for system-server-side code, use the file in
-// frameworks/base/core/proto/android/server/job.
-option java_outer_classname = "JobProtoEnums";
-option java_multiple_files = true;
-
-// Reasons a job is stopped.
-// Primarily used in android.app.job.JobParameters.java.
-enum StopReasonEnum {
- STOP_REASON_UNKNOWN = -1;
- STOP_REASON_CANCELLED = 0;
- STOP_REASON_CONSTRAINTS_NOT_SATISFIED = 1;
- STOP_REASON_PREEMPT = 2;
- STOP_REASON_TIMEOUT = 3;
- STOP_REASON_DEVICE_IDLE = 4;
- STOP_REASON_DEVICE_THERMAL = 5;
- STOP_REASON_RESTRICTED_BUCKET = 6;
-}
diff --git a/core/proto/android/app/media_output_enum.proto b/core/proto/android/app/media_output_enum.proto
deleted file mode 100644
index 0d42fb7..0000000
--- a/core/proto/android/app/media_output_enum.proto
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.app.settings.mediaoutput;
-option java_multiple_files = true;
-
-/**
- * The medium type specified in an output switching operation.
- */
-enum MediumType {
- UNKNOWN_TYPE = 0;
- BUILTIN_SPEAKER = 1;
- WIRED_3POINT5_MM_AUDIO = 100;
- WIRED_3POINT5_MM_HEADSET = 101;
- WIRED_3POINT5_MM_HEADPHONES = 102;
- USB_C_AUDIO = 200;
- USB_C_DEVICE = 201;
- USB_C_HEADSET = 202;
- USB_C_ACCESSORY = 203;
- USB_C_DOCK = 204;
- USB_C_HDMI = 205;
- BLUETOOTH = 300;
- BLUETOOTH_HEARING_AID = 301;
- BLUETOOTH_A2DP = 302;
- REMOTE_SINGLE = 400;
- REMOTE_TV = 401;
- REMOTE_SPEAKER = 402;
- REMOTE_GROUP = 500;
- REMOTE_DYNAMIC_GROUP = 501;
-};
-
-/**
- * The result of an output switching operation.
- */
-enum SwitchResult {
- ERROR = 0;
- OK = 1;
-};
-
-/**
- * The sub result of an output switching operation.
- */
-enum SubResult {
- UNKNOWN_ERROR = 0;
- NO_ERROR = 1;
- REJECTED = 2;
- NETWORK_ERROR = 3;
- ROUTE_NOT_AVAILABLE = 4;
- INVALID_COMMAND = 5;
-}
diff --git a/core/proto/android/app/settings_enums.proto b/core/proto/android/app/settings_enums.proto
deleted file mode 100644
index 69b32c2..0000000
--- a/core/proto/android/app/settings_enums.proto
+++ /dev/null
@@ -1,2686 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.app.settings;
-option java_multiple_files = true;
-
-/**
- * The action performed in this event
- */
-enum Action {
- ACTION_UNKNOWN = 0;
- PAGE_VISIBLE = 1;
- PAGE_HIDE = 2;
-
- // ACTION: Settings > Wi-Fi > [Long press network] > Connect to network
- // SUBTYPE: true if connecting to a saved network, false if not
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_WIFI_CONNECT = 135;
-
- // ACTION: Settings > Wi-Fi > [Long press network] > Forget network
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_WIFI_FORGET = 137;
-
- // ACTION: Settings > Wi-Fi > Toggle off
- // SUBTYPE: true if connected to network before toggle, false if not
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_WIFI_OFF = 138;
-
- // ACTION: Settings > Wi-Fi > Toggle on
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_WIFI_ON = 139;
-
- // ACTION: Settings > Bluetooth > Overflow > Rename this device
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_BLUETOOTH_RENAME = 161;
-
- // ACTION: Settings > Bluetooth > Overflow > Show received files
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_BLUETOOTH_FILES = 162;
-
- // ACTION: DND Settings > Priority only allows > Reminder toggle
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_ZEN_ALLOW_REMINDERS = 167;
-
- // ACTION: DND Settings > Priority only allows > Event toggle
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_ZEN_ALLOW_EVENTS = 168;
-
- // ACTION: DND Settings > Priority only allows > Messages
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_ZEN_ALLOW_MESSAGES = 169;
-
- // ACTION: DND Settings > Priority only allows > Calls
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_ZEN_ALLOW_CALLS = 170;
-
- // ACTION: DND Settings > Priority only allows > Repeat callers toggle
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_ZEN_ALLOW_REPEAT_CALLS = 171;
-
- // ACTION: DND Settings > Automatic rules > [Rule] > Delete rule > Delete
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_ZEN_DELETE_RULE_OK = 175;
-
- // ACTION: Settings > More > Airplane mode toggle
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_AIRPLANE_TOGGLE = 177;
-
- // ACTION: Settings > Data usage > Cellular data toggle
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_CELL_DATA_TOGGLE = 178;
-
- // ACTION: Settings > Display > When device is rotated
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_ROTATION_LOCK = 203;
-
- // OPEN: Settings > Search > Perform search
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_SEARCH_RESULTS = 226;
-
- // ACTION: Settings > Security > Nexus Imprint > [Fingerprint] > Delete
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_FINGERPRINT_DELETE = 253;
-
- // ACTION: Settings > Security > Nexus Imprint > [Fingerprint] > Rename
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_FINGERPRINT_RENAME = 254;
-
- // ACTION: Settings -> Developer Options -> Take bug report -> Interactive report
- // CATEGORY: SETTINGS
- // OS: N
- // Interactive bug report initiated from Settings.
- ACTION_BUGREPORT_FROM_SETTINGS_INTERACTIVE = 294;
-
- // ACTION: Settings -> Developer Options -> Take bug report -> Full report
- // CATEGORY: SETTINGS
- // OS: N
- // Interactive bug report initiated from Settings.
- ACTION_BUGREPORT_FROM_SETTINGS_FULL = 295;
-
- // click on collapsed conditional or clicks expand button
- ACTION_SETTINGS_CONDITION_EXPAND = 373;
-
- // click main area of expanded conditional
- ACTION_SETTINGS_CONDITION_CLICK = 375;
-
- // click a direct button on expanded conditional
- ACTION_SETTINGS_CONDITION_BUTTON = 376;
-
- // Action: user enable / disabled data saver using Settings
- // OPEN: Settings -> Data Usage -> Data saver -> On/off toggle
- // VALUE: 1 for enabled, 0 for disabled
- // CATEGORY: SETTINGS
- // OS: N
- ACTION_DATA_SAVER_MODE = 394;
-
- // User whitelisted an app for Data Saver mode; action pass package name of app
- // Action: user enable / disabled data saver using Settings
- // OPEN: Settings -> Data Usage -> Data saver -> Unrestricted data access > APP toggle turned on
- // or
- // Settings -> Apps -> APP -> Data usage -> Unrestricted data usage toggle turned on
- // VALUE: package name of APP
- // CATEGORY: SETTINGS
- // OS: N
- ACTION_DATA_SAVER_WHITELIST = 395;
-
- // User blacklisted an app for Data Saver mode; action pass package name of app
- // OPEN: Settings -> Apps -> APP -> Data usage -> Background data toggle turned off
- // VALUE: package name of APP
- // CATEGORY: SETTINGS
- // OS: N
- ACTION_DATA_SAVER_BLACKLIST = 396;
-
- // ACTION: Settings -> Storage -> Manage storage -> Click Storage Manager
- // SUBTYPE: false is off, true is on
- ACTION_TOGGLE_STORAGE_MANAGER = 489;
-
- // OPEN: Settings > Display -> Ambient Display
- // CATEGORY: SETTINGS
- ACTION_AMBIENT_DISPLAY = 495;
-
- // ACTION: Allow Battery optimization for an app
- APP_SPECIAL_PERMISSION_BATTERY_ALLOW = 764;
-
- // ACTION: Deny Battery optimization for an app
- APP_SPECIAL_PERMISSION_BATTERY_DENY = 765;
-
- // ACTION: Enable Device Admin app
- APP_SPECIAL_PERMISSION_ADMIN_ALLOW = 766;
-
- // ACTION: Disable Device Admin app
- APP_SPECIAL_PERMISSION_ADMIN_DENY = 767;
-
- // ACTION: Allow "Do Not Disturb access" for an app
- APP_SPECIAL_PERMISSION_DND_ALLOW = 768;
-
- // ACTION: Deny "Do Not Disturb access" for an app
- APP_SPECIAL_PERMISSION_DND_DENY = 769;
-
- // ACTION: Allow "Draw over other apps" for an app
- APP_SPECIAL_PERMISSION_APPDRAW_ALLOW = 770;
-
- // ACTION: Deny "Display over other apps" for an app
- APP_SPECIAL_PERMISSION_APPDRAW_DENY = 771;
-
- // ACTION: Allow "VR helper services" for an app
- APP_SPECIAL_PERMISSION_VRHELPER_ALLOW = 772;
-
- // ACTION: Deny "VR helper services" for an app
- APP_SPECIAL_PERMISSION_VRHELPER_DENY = 773;
-
- // ACTION: Allow "Modify system settings" for an app
- APP_SPECIAL_PERMISSION_SETTINGS_CHANGE_ALLOW = 774;
-
- // ACTION: Deny "Modify system settings" for an app
- APP_SPECIAL_PERMISSION_SETTINGS_CHANGE_DENY = 775;
-
- // ACTION: Allow "Notification access" for an app
- APP_SPECIAL_PERMISSION_NOTIVIEW_ALLOW = 776;
-
- // ACTION: Deny "Notification access" for an app
- APP_SPECIAL_PERMISSION_NOTIVIEW_DENY = 777;
-
- // ACTION: "Premium SMS access" for an app - "ask user" option
- APP_SPECIAL_PERMISSION_PREMIUM_SMS_ASK = 778;
-
- // ACTION: "Premium SMS access" for an app - "never allow" option
- APP_SPECIAL_PERMISSION_PREMIUM_SMS_DENY = 779;
-
- // ACTION: "Premium SMS access" for an app - "always allow" option
- APP_SPECIAL_PERMISSION_PREMIUM_SMS_ALWAYS_ALLOW = 780;
-
- // ACTION: Allow "Unrestricted data access" for an app
- APP_SPECIAL_PERMISSION_UNL_DATA_ALLOW = 781;
-
- // ACTION: Deny "Unrestricted data access" for an app
- APP_SPECIAL_PERMISSION_UNL_DATA_DENY = 782;
-
- // ACTION: Allow "Usage access" for an app
- APP_SPECIAL_PERMISSION_USAGE_VIEW_ALLOW = 783;
-
- // ACTION: Deny "Usage access" for an app
- APP_SPECIAL_PERMISSION_USAGE_VIEW_DENY = 784;
-
- // ACTION: "Force stop" action on an app
- ACTION_APP_FORCE_STOP = 807;
-
- // ACTION: Allow "Enable picture-in-picture" for an app
- APP_PICTURE_IN_PICTURE_ALLOW = 813;
-
- // ACTION: Create a Settings shortcut item.
- ACTION_SETTINGS_CREATE_SHORTCUT = 829;
-
- // ACTION: A tile in Settings information architecture is clicked
- ACTION_SETTINGS_TILE_CLICK = 830;
-
- // ACTION: Settings advanced button is expanded
- ACTION_SETTINGS_ADVANCED_BUTTON_EXPAND = 834;
-
- // ACTION: Deny "Enable picture-in-picture" for an app
- APP_PICTURE_IN_PICTURE_DENY = 814;
-
- // ACTION: Settings -> Display -> Theme
- ACTION_THEME = 816;
-
- // ACTION: Settings > About device > Build number
- ACTION_SETTINGS_BUILD_NUMBER_PREF = 847;
-
- // ACTION: Settings > Battery > Menu > Optimization
- ACTION_SETTINGS_MENU_BATTERY_OPTIMIZATION = 851;
-
- // ACTION: Settings > Battery > Menu > Apps Toggle
- ACTION_SETTINGS_MENU_BATTERY_APPS_TOGGLE = 852;
-
- // ACTION: Settings > Any preference is changed
- ACTION_SETTINGS_PREFERENCE_CHANGE = 853;
-
- // ACTION: Settings > Connected devices > Bluetooth -> Available devices
- ACTION_SETTINGS_BLUETOOTH_PAIR = 866;
-
- // ACTION: Settings > Connected devices > Bluetooth -> Paired devices
- ACTION_SETTINGS_BLUETOOTH_CONNECT = 867;
-
- // ACTION: Settings > Connected devices > Bluetooth -> Connected device
- ACTION_SETTINGS_BLUETOOTH_DISCONNECT = 868;
-
- // ACTION: Settings > Connected devices > Bluetooth -> Error dialog
- ACTION_SETTINGS_BLUETOOTH_CONNECT_ERROR = 869;
-
- // ACTION: Settings > Connected devices > Bluetooth master switch Toggle
- ACTION_SETTINGS_MASTER_SWITCH_BLUETOOTH_TOGGLE = 870;
-
- // ACTION: Settings > App detail > Uninstall
- ACTION_SETTINGS_UNINSTALL_APP = 872;
-
- // ACTION: Settings > App detail > Uninstall Device admin app
- ACTION_SETTINGS_UNINSTALL_DEVICE_ADMIN = 873;
-
- // ACTION: Settings > App detail > Disable app
- ACTION_SETTINGS_DISABLE_APP = 874;
-
- // ACTION: Settings > App detail > Enable app
- ACTION_SETTINGS_ENABLE_APP = 875;
-
- // ACTION: Settings > App detail > Clear data
- ACTION_SETTINGS_CLEAR_APP_DATA = 876;
-
- // ACTION: Settings > App detail > Clear cache
- ACTION_SETTINGS_CLEAR_APP_CACHE = 877;
-
- // ACTION: Logs pressing the "Clear app" button in the app info settings page for an instant
- // app.
- // VALUE: The package name of the app
- ACTION_SETTINGS_CLEAR_INSTANT_APP = 923;
-
- // OPEN: Assist Gesture training intro in Settings
- // CATEGORY: SETTINGS
- // OS: O DR
- SETTINGS_ASSIST_GESTURE_TRAINING_INTRO = 991;
-
- // OPEN: Assist Gesture training enrolling in Settings
- // CATEGORY: SETTINGS
- // OS: O DR
- SETTINGS_ASSIST_GESTURE_TRAINING_ENROLLING = 992;
-
- // OPEN: Assist Gesture training finished in Settings
- // CATEGORY: SETTINGS
- // OS: O DR
- SETTINGS_ASSIST_GESTURE_TRAINING_FINISHED = 993;
-
- // ACTION: Update default app from Settings
- ACTION_SETTINGS_UPDATE_DEFAULT_APP = 1000;
-
- // ACTION: Settings > Wi-Fi > [Long press network] > Sign in to network
- // CATEGORY: SETTINGS
- // OS: O DR
- ACTION_WIFI_SIGNIN = 1008;
-
- // ACTION: Settings > Notification Settings > Open application notification
- // CATEGORY: SETTINGS
- // OS: O DR
- ACTION_OPEN_APP_NOTIFICATION_SETTING = 1016;
-
- // ACTION: Settings > App Info > Open app settings
- // CATEGORY: SETTINGS
- // OS: O DR
- ACTION_OPEN_APP_SETTING = 1017;
-
- // ACTION: Collect PSD Signals
- // CATEGORY: SETTINGS
- // OS: O DR
- ACTION_PSD_LOADER = 1019;
-
- // OPEN: Settings > Trampoline Intent > Settings page
- // CATEGORY: SETTINGS
- // OS: O DR
- TRAMPOLINE_SETTINGS_EVENT = 1033;
-
- // ACTION: Logged when user tries to pair a Bluetooth device without name from Settings app
- // CATEGORY: SETTINGS
- // OS: O MR
- ACTION_SETTINGS_BLUETOOTH_PAIR_DEVICES_WITHOUT_NAMES = 1096;
-
- // ACTION: Settings > Network & Internet > Mobile network > Network
- // CATEGORY: SETTINGS
- ACTION_MOBILE_NETWORK_MANUAL_SELECT_NETWORK = 1210;
-
- // ACTION: DND Settings > Priority only allows > Alarms toggle
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_ZEN_ALLOW_ALARMS = 1226;
-
- // ACTION: DND Settings > Priority only allows > Media toggle
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_ZEN_ALLOW_MEDIA = 1227;
-
- // ACTION: A private dns mode been selected by user
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_PRIVATE_DNS_MODE = 1249;
-
- // OPEN: Settings > Sound > Do Not Disturb > Turn on automatically > Select rule ("Event") > Rule name > OK
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_ZEN_MODE_RULE_NAME_CHANGE_OK = 1267;
-
- // OPEN: Settings > Sound > Do Not Disturb > TURN ON NOW/TURN OFF NOW
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_ZEN_TOGGLE_DND_BUTTON = 1268;
-
- // ACTION: DND Settings > What to block > full screen intents
- // SUBTYPE: false is allowed, true is blocked
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACTION_ZEN_BLOCK_FULL_SCREEN_INTENTS = 1332;
-
- // ACTION: DND Settings > What to block
- // SUBTYPE: false is allowed, true is blocked
- // OS: P
- ACTION_ZEN_BLOCK_LIGHT = 1333;
-
- // ACTION: DND Settings > What to block
- // SUBTYPE: false is allowed, true is blocked
- // OS: P
- ACTION_ZEN_BLOCK_PEEK = 1334;
-
- // ACTION: DND Settings > What to block
- // SUBTYPE: false is allowed, true is blocked
- // OS: P
- ACTION_ZEN_BLOCK_STATUS = 1335;
-
- // ACTION: DND Settings > What to block
- // SUBTYPE: false is allowed, true is blocked
- // OS: P
- ACTION_ZEN_BLOCK_BADGE = 1336;
-
- // ACTION: DND Settings > What to block
- // SUBTYPE: false is allowed, true is blocked
- // OS: P
- ACTION_ZEN_BLOCK_AMBIENT = 1337;
-
- // ACTION: DND Settings > What to block
- // SUBTYPE: false is allowed, true is blocked
- // OS: P
- ACTION_ZEN_BLOCK_NOTIFICATION_LIST = 1338;
-
- // ACTION: DND Settings > Priority only allows > System toggle
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_ZEN_ALLOW_SYSTEM = 1340;
-
- // ACTION: Settings > Battery settings > Battery tip > App restriction tip
- // OS: P
- ACTION_APP_RESTRICTION_TIP = 1347;
-
- // ACTION: Settings > Battery settings > Battery tip > High usage tip
- // OS: P
- ACTION_HIGH_USAGE_TIP = 1348;
-
- // ACTION: Settings > Battery settings > Battery tip > Summary tip
- // OS: P
- ACTION_SUMMARY_TIP = 1349;
-
- // ACTION: Settings > Battery settings > Battery tip > Smart battery tip
- // OS: P
- ACTION_SMART_BATTERY_TIP = 1350;
-
- // ACTION: Settings > Battery settings > Battery tip > Early warning tip
- // OS: P
- ACTION_EARLY_WARNING_TIP = 1351;
-
- // ACTION: Settings > Battery settings > Battery tip > Low battery tip
- // OS: P
- ACTION_LOW_BATTERY_TIP = 1352;
-
- // ACTION: Settings > Battery settings > Battery tip > App restriction list shown
- // OS: P
- ACTION_APP_RESTRICTION_TIP_LIST = 1353;
-
- // ACTION: Settings > Battery settings > Battery tip > High usage list shown
- // OS: P
- ACTION_HIGH_USAGE_TIP_LIST = 1354;
-
- // ACTION: Settings > Battery settings > Battery tip > Open app restriction page
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_TIP_OPEN_APP_RESTRICTION_PAGE = 1361;
-
- // ACTION: Settings > Battery settings > Battery tip > Restrict app
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_TIP_RESTRICT_APP = 1362;
-
- // ACTION: Settings > Battery settings > Battery tip > Unrestrict app
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_TIP_UNRESTRICT_APP = 1363;
-
- // ACTION: Settings > Battery settings > Battery tip > Open smart battery page
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_TIP_OPEN_SMART_BATTERY = 1364;
-
- // ACTION: Settings > Battery settings > Battery tip > Turn on battery saver
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_TIP_TURN_ON_BATTERY_SAVER = 1365;
-
- // ACTION: Settings > Anomaly receiver > Anomaly received
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_ANOMALY_TRIGGERED = 1367;
-
- // ACTION: A Settings Slice is requested
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_SETTINGS_SLICE_REQUESTED = 1371;
-
- // ACTION: A Settings Slice is updated with new value
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_SETTINGS_SLICE_CHANGED = 1372;
-
- // OPEN: DND onboarding activity > Ok button
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_ZEN_ONBOARDING_OK = 1378;
-
- // OPEN: DND onboarding activity > Settings link
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_ZEN_ONBOARDING_SETTINGS = 1379;
-
- // ACTION: Settings > Anomaly receiver > Anomaly ignored, don't show up in battery settings
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_ANOMALY_IGNORED = 1387;
-
- // ACTION: Settings > Battery settings > Battery tip > Open battery saver page
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_TIP_OPEN_BATTERY_SAVER_PAGE = 1388;
-
- // ACTION: DND Settings > What to block
- // OS: P
- ACTION_ZEN_SOUND_ONLY = 1396;
-
- // ACTION: DND Settings > Notifications
- // OS: P
- ACTION_ZEN_SOUND_AND_VIS_EFFECTS = 1397;
-
- // ACTION: DND Settings > Notifications
- // OS: P
- ACTION_ZEN_SHOW_CUSTOM = 1398;
-
- // ACTION: DND Settings > Notifications
- // OS: P
- ACTION_ZEN_CUSTOM = 1399;
-
- // OPEN: DND onboarding activity > don't update button
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_ZEN_ONBOARDING_KEEP_CURRENT_SETTINGS = 1406;
-
- // ACTION: Storage initialization wizard initialization choice of external/portable
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_STORAGE_INIT_EXTERNAL = 1407;
-
- // ACTION: Storage initialization wizard initialization choice of internal/adoptable
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_STORAGE_INIT_INTERNAL = 1408;
-
- // ACTION: Storage initialization wizard benchmark fast choice of continue
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_STORAGE_BENCHMARK_FAST_CONTINUE = 1409;
-
- // ACTION: Storage initialization wizard benchmark slow choice of continue
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_STORAGE_BENCHMARK_SLOW_CONTINUE = 1410;
-
- // ACTION: Storage initialization wizard benchmark slow choice of abort
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_STORAGE_BENCHMARK_SLOW_ABORT = 1411;
-
- // ACTION: Storage initialization wizard migration choice of now
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_STORAGE_MIGRATE_NOW = 1412;
-
- // ACTION: Storage initialization wizard migration choice of later
- // CATEGORY: SETTINGS
- // OS: P
- ACTION_STORAGE_MIGRATE_LATER = 1413;
-
- // OPEN: Settings > Sound > Switch a2dp devices dialog
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_SWITCH_A2DP_DEVICES = 1415;
-
-
- // OPEN: Settings > Sound > Switch hfp devices dialog
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_SWITCH_HFP_DEVICES = 1416;
-
- // OPEN: QS Sensor Privacy Mode tile shown
- // ACTION: QS Sensor Privacy Mode tile tapped
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: QUICK_SETTINGS
- // OS: Q
- QS_SENSOR_PRIVACY = 1598;
-
- // ACTION: Tap & Pay -> Default Application Setting -> Use Forground
- ACTION_NFC_PAYMENT_FOREGROUND_SETTING = 1622;
-
- // ACTION: Tap & Pay -> Default Application Setting -> Use Default
- ACTION_NFC_PAYMENT_ALWAYS_SETTING = 1623;
-
- // ACTION: Settings > Search Bar > Avatar
- // CATEGORY: SETTINGS
- // OS: Q
- CLICK_ACCOUNT_AVATAR = 1643;
-
- // ACTION: Set new password (action intent android.app.action.SET_NEW_PASSWORD)
- // CATEGORY: SETTINGS
- // OS: Q
- ACTION_SET_NEW_PASSWORD = 1645;
-
- // ACTION: Set new password (action intent android.app.action.SET_NEW_PARENT_PROFILE_PASSWORD)
- // CATEGORY: SETTINGS
- // OS: Q
- ACTION_SET_NEW_PARENT_PROFILE_PASSWORD = 1646;
-
- // ACTION: An interaction with a Slice or other component in the Panel.
- // CATEGORY: SETTINGS
- // OS: Q
- ACTION_PANEL_INTERACTION = 1658;
-
- // ACTION: Show Contextual homepage. Log total loading latency.
- ACTION_CONTEXTUAL_HOME_SHOW = 1662;
-
- // ACTION: Contextual card displays
- ACTION_CONTEXTUAL_CARD_SHOW = 1663;
-
- // ACTION: Contextual cards are eligible to be shown, but don't rank high
- ACTION_CONTEXTUAL_CARD_NOT_SHOW = 1664;
-
- // ACTION: Settings > long press a card, and click dismiss
- // Contextual card is dismissed
- ACTION_CONTEXTUAL_CARD_DISMISS = 1665;
-
- // ACTION: Settings > click a card
- // Contextual card is clicked
- ACTION_CONTEXTUAL_CARD_CLICK = 1666;
-
- // Mapping: go/at-mapping
- ACTION_ATSG = 1674;
-
- ACTION_ATPG = 1675;
-
- ACTION_ATCLPB = 1676;
-
- ACTION_ATCGIB = 1677;
-
- ACTION_ATCPAB = 1678;
-
- ACTION_ATCSAUC = 1679;
-
- ACTION_ATCSCUC = 1680;
-
- ACTION_ATCHNUC = 1681;
-
- // ACTION: Individual contextual card loading time
- ACTION_CONTEXTUAL_CARD_LOAD = 1684;
-
- //ACTION: Contextual card loading timeout
- ACTION_CONTEXTUAL_CARD_LOAD_TIMEOUT = 1685;
-
- //ACTION: Log result for each card's eligibility check
- ACTION_CONTEXTUAL_CARD_ELIGIBILITY = 1686;
-
- // ACTION: Display white balance setting enabled or disabled.
- // CATEGORY: SETTINGS
- // OS: Q
- ACTION_DISPLAY_WHITE_BALANCE_SETTING_CHANGED = 1703;
-
- // ACTION: Share a Wi-Fi network by generating a QR code
- ACTION_SETTINGS_SHARE_WIFI_QR_CODE = 1710;
-
- // ACTION: Connect to a Wi-Fi network by scanning a QR code
- ACTION_SETTINGS_ENROLL_WIFI_QR_CODE = 1711;
-
- // ACTION: Share Wi-Fi hotspot by generating a QR code
- ACTION_SETTINGS_SHARE_WIFI_HOTSPOT_QR_CODE = 1712;
-
- // ACTION: Settings > Initialize Search bar > Verify Slice > Invalid data
- ACTION_VERIFY_SLICE_ERROR_INVALID_DATA = 1725;
-
- // ACTION: Settings > Initialize Search bar > Verify Slice > Parsing error
- ACTION_VERIFY_SLICE_PARSING_ERROR = 1726;
-
- // ACTION: Settings > Initialize Search bar > Verify Slice > Other exception
- ACTION_VERIFY_SLICE_OTHER_EXCEPTION = 1727;
-
- // Custom tag to evaluate the consuming time of the Controller.updateState.
- // CATEGORY: SETTINGS
- // OS: R
- ACTION_CONTROLLER_UPDATE_STATE = 1728;
-
- // Custom tag to evaluate the consuming time from onAttach to
- // DashboardFragment.updatePreferenceStates.
- // CATEGORY: SETTINGS
- // OS: R
- ACTION_DASHBOARD_VISIBLE_TIME = 1729;
-
- // ACTION: Allow "Access all files" for an app
- APP_SPECIAL_PERMISSION_MANAGE_EXT_STRG_ALLOW = 1730;
-
- // ACTION: Deny "Access all files" for an app
- APP_SPECIAL_PERMISSION_MANAGE_EXT_STRG_DENY = 1731;
-
- // ACTION: Battery feature usage
- ACTION_BATTERY_OPTION_FEATURE_USAGE = 1732;
-
- // ACTION: Battery feature runtime event
- ACTION_BATTERY_OPTION_RUNTIME_EVENT = 1733;
-
- // ACTION: Settings > Developer Options > Toggle on Wireless debugging
- // CATEGORY: SETTINGS
- // OS: R
- ACTION_ADB_WIRELESS_ON = 1734;
-
- // ACTION: Settings > Developer Options > Toggle off Wireless debugging
- // CATEGORY: SETTINGS
- // OS: R
- ACTION_ADB_WIRELESS_OFF = 1735;
-
- // ACTION: Change Wi-Fi hotspot name
- // CATEGORY: SETTINGS
- // OS: R
- ACTION_SETTINGS_CHANGE_WIFI_HOTSPOT_NAME = 1736;
-
- // ACTION: Change Wi-Fi hotspot password
- // CATEGORY: SETTINGS
- // OS: R
- ACTION_SETTINGS_CHANGE_WIFI_HOTSPOT_PASSWORD = 1737;
-
- // ACTION: Settings > Security > Toggle on Confirm Sim deletion
- // CATEGORY: SETTINGS
- // OS: R
- ACTION_CONFIRM_SIM_DELETION_ON = 1738;
-
- // ACTION: Settings > Security > Toggle off Confirm Sim deletion
- // CATEGORY: SETTINGS
- // OS: R
- ACTION_CONFIRM_SIM_DELETION_OFF = 1739;
-}
-
-/**
- * Id for Settings pages. Each page must have its own unique Id.
- */
-enum PageId {
- // Unknown page. Should not be used in production code.
- PAGE_UNKNOWN = 0;
-
- // OPEN: Settings > Accessibility
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACCESSIBILITY = 2;
-
- // OPEN: Settings > Accessibility > Captions preference
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACCESSIBILITY_CAPTION_PROPERTIES = 3;
-
- // OPEN: Settings > Accessibility > [Service]
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACCESSIBILITY_SERVICE = 4;
-
- // OPEN: Settings > Accessibility > Color correction
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACCESSIBILITY_TOGGLE_DALTONIZER = 5;
-
- // OPEN: Settings > Accessibility > Accessibility shortcut
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACCESSIBILITY_TOGGLE_GLOBAL_GESTURE = 6;
-
- // OPEN: Settings > Accessibility > Magnification gestures (Renamed in O)
- // OPEN: Settings > Accessibility > Magnification > Magnify with triple-tap
- // OPEN: Settings > Accessibility > Magnification > Magnify with button
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFICATION = 7;
-
- // OPEN: Settings > Accounts
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACCOUNT = 8;
-
- // OPEN: Settings > Accounts > [Single Account Sync Settings]
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACCOUNTS_ACCOUNT_SYNC = 9;
-
- // OPEN: Settings > Accounts > Add an account
- // CATEGORY: SETTINGS
- // OS: 6.0
- ACCOUNTS_CHOOSE_ACCOUNT_ACTIVITY = 10;
-
- // OPEN: Settings > Cellular network settings > APNs
- // CATEGORY: SETTINGS
- // OS: 6.0
- APN = 12;
-
- // OPEN: Settings > More > Cellular network settings > APNs > [Edit APN]
- // CATEGORY: SETTINGS
- // OS: 6.0
- APN_EDITOR = 13;
-
- // OPEN: Settings > Apps > Configure apps > App links > [App]
- // CATEGORY: SETTINGS
- // OS: 6.0
- APPLICATIONS_APP_LAUNCH = 17;
-
- // OPEN: Settings > Internal storage > Apps storage > [App]
- // CATEGORY: SETTINGS
- // OS: 6.0
- APPLICATIONS_APP_STORAGE = 19;
-
- // OPEN: Settings > Apps > [App info]
- // CATEGORY: SETTINGS
- // OS: 6.0
- APPLICATIONS_INSTALLED_APP_DETAILS = 20;
-
- // OPEN: Settings > Memory > App usage > [App Memory usage]
- // CATEGORY: SETTINGS
- // OS: 6.0
- APPLICATIONS_PROCESS_STATS_DETAIL = 21;
-
- // OPEN: Settings > Memory > App usage
- // CATEGORY: SETTINGS
- // OS: 6.0
- APPLICATIONS_PROCESS_STATS_UI = 23;
-
- // OPEN: Choose Bluetooth device (ex: when sharing)
- // CATEGORY: SETTINGS
- // OS: 6.0
- BLUETOOTH_DEVICE_PICKER = 25;
-
- // OPEN: Settings > Security > Choose screen lock
- // CATEGORY: SETTINGS
- // OS: 6.0
- CHOOSE_LOCK_GENERIC = 27;
-
- // OPEN: Settings > Security > Choose screen lock > Choose your password
- // CATEGORY: SETTINGS
- // OS: 6.0
- CHOOSE_LOCK_PASSWORD = 28;
-
- // OPEN: Settings > Security > Choose screen lock > Choose your pattern
- // CATEGORY: SETTINGS
- // OS: 6.0
- CHOOSE_LOCK_PATTERN = 29;
-
- // OPEN: Settings > Security > Choose screen lock > Confirm your password
- // CATEGORY: SETTINGS
- // OS: 6.0
- CONFIRM_LOCK_PASSWORD = 30;
-
- // OPEN: Settings > Security > Choose screen lock > Confirm your pattern
- // CATEGORY: SETTINGS
- // OS: 6.0
- CONFIRM_LOCK_PATTERN = 31;
-
- // OPEN: Settings > Security > Encrypt phone
- // CATEGORY: SETTINGS
- // OS: 6.0
- CRYPT_KEEPER = 32;
-
- // OPEN: Settings > Security > Encrypt phone > Confirm
- // CATEGORY: SETTINGS
- // OS: 6.0
- CRYPT_KEEPER_CONFIRM = 33;
-
- // OPEN: Settings (Root page)
- // CATEGORY: SETTINGS
- // OS: 6.0
- DASHBOARD_SUMMARY = 35;
-
- // OPEN: Settings > Data usage
- // CATEGORY: SETTINGS
- // OS: 6.0
- DATA_USAGE_SUMMARY = 37;
-
- // OPEN: Settings > Date & time
- // CATEGORY: SETTINGS
- // OS: 6.0
- DATE_TIME = 38;
-
- // OPEN: Settings > Developer options
- // CATEGORY: SETTINGS
- // OS: 6.0
- DEVELOPMENT = 39;
-
- // OPEN: Settings > About phone
- // CATEGORY: SETTINGS
- // OS: 6.0
- DEVICEINFO = 40;
-
- // OPEN: Settings > Internal storage
- // CATEGORY: SETTINGS
- // OS: 6.0
- DEVICEINFO_STORAGE = 42;
-
- // OPEN: Settings > Display
- // CATEGORY: SETTINGS
- // OS: 6.0
- DISPLAY = 46;
-
- // OPEN: Settings > Display > Daydream
- // CATEGORY: SETTINGS
- // OS: 6.0
- DREAM = 47;
-
- // OPEN: Settings > Security > Screen lock > Secure start-up
- // CATEGORY: SETTINGS
- // OS: 6.0
- ENCRYPTION = 48;
-
- // OPEN: Settings > Security > Nexus Imprint
- // CATEGORY: SETTINGS
- // OS: 6.0
- FINGERPRINT = 49;
-
- // OPEN: Settings > Battery > History details
- // CATEGORY: SETTINGS
- // OS: 6.0
- FUELGAUGE_BATTERY_HISTORY_DETAIL = 51;
-
- // OPEN: Settings > Battery > Battery saver
- // CATEGORY: SETTINGS
- // OS: 6.0
- FUELGAUGE_BATTERY_SAVER = 52;
-
- // OPEN: Settings > Battery > [App Use details]
- // CATEGORY: SETTINGS
- // OS: 6.0
- FUELGAUGE_POWER_USAGE_DETAIL = 53;
-
- // OPEN: Settings > Security > SIM card lock settings
- // CATEGORY: SETTINGS
- // OS: 6.0
- ICC_LOCK = 56;
-
- // OPEN: Settings > Language & input > Physical keyboard
- // CATEGORY: SETTINGS
- // OS: 6.0
- INPUTMETHOD_KEYBOARD = 58;
-
- // OPEN: Settings > Language & input > Spell checker
- // CATEGORY: SETTINGS
- // OS: 6.0
- INPUTMETHOD_SPELL_CHECKERS = 59;
-
- // OBSOLETE
- INPUTMETHOD_SUBTYPE_ENABLER = 60;
-
- // OPEN: Settings > Language & input > Personal dictionary
- // CATEGORY: SETTINGS
- // OS: 6.0
- INPUTMETHOD_USER_DICTIONARY = 61;
-
- // OPEN: Settings > Language & input > Add word
- // CATEGORY: SETTINGS
- // OS: 6.0
- INPUTMETHOD_USER_DICTIONARY_ADD_WORD = 62;
-
- // OPEN: Settings > Location
- // CATEGORY: SETTINGS
- // OS: 6.0
- LOCATION = 63;
-
- // OPEN: Settings > Apps
- // CATEGORY: SETTINGS
- // OS: 6.0
- MANAGE_APPLICATIONS = 65;
-
- // OPEN: Settings > Backup & reset > Factory data reset
- // CATEGORY: SETTINGS
- // OS: 6.0
- MASTER_CLEAR = 66;
-
- // OPEN: Settings > Backup & reset > Factory data reset > Confirm
- // CATEGORY: SETTINGS
- // OS: 6.0
- MASTER_CLEAR_CONFIRM = 67;
-
- // OPEN: Settings > More > Android Beam
- // CATEGORY: SETTINGS
- // OS: 6.0
- NFC_BEAM = 69;
-
- // OPEN: Settings > Tap & pay
- // CATEGORY: SETTINGS
- // OS: 6.0
- NFC_PAYMENT = 70;
-
- // OPEN: Settings > Sound & notification > App notifications > [App]
- // CATEGORY: SETTINGS
- // OS: 6.0
- NOTIFICATION_APP_NOTIFICATION = 72;
-
- // OBSOLETE
- NOTIFICATION_REDACTION = 74;
-
- // OPEN: Settings Widget > Notification log
- // CATEGORY: SETTINGS
- // OS: 6.0
- NOTIFICATION_STATION = 75;
-
- // OPEN: Settings > Sound & notification > Do not disturb
- // CATEGORY: SETTINGS
- // OS: 6.0
- NOTIFICATION_ZEN_MODE = 76;
-
-
- // OPEN: Print job notification > Print job settings
- // CATEGORY: SETTINGS
- // OS: 6.0
- PRINT_JOB_SETTINGS = 78;
-
- // OPEN: Settings > Printing > [Print Service]
- // CATEGORY: SETTINGS
- // OS: 6.0
- PRINT_SERVICE_SETTINGS = 79;
-
- // OPEN: Settings > Printing
- // CATEGORY: SETTINGS
- // OS: 6.0
- PRINT_SETTINGS = 80;
-
- // OPEN: Settings > Backup & reset
- // CATEGORY: SETTINGS
- // OS: 6.0
- PRIVACY = 81;
-
- //OBSOLETE
- PROXY_SELECTOR = 82;
-
- // OPEN: Settings > Backup & reset > Network settings reset
- // CATEGORY: SETTINGS
- // OS: 6.0
- RESET_NETWORK = 83;
-
- // OPEN: Settings > Backup & reset > Network settings reset > Confirm
- // CATEGORY: SETTINGS
- // OS: 6.0
- RESET_NETWORK_CONFIRM = 84;
-
- // OPEN: Settings > Developer Options > Running Services
- // CATEGORY: SETTINGS
- // OS: 6.0
- RUNNING_SERVICE_DETAILS = 85;
-
- // OPEN: Settings > Security > Screen pinning
- // CATEGORY: SETTINGS
- // OS: 6.0
- SCREEN_PINNING = 86;
-
- // OPEN: Settings > Security
- // CATEGORY: SETTINGS
- // OS: 6.0
- SECURITY = 87;
-
- // OPEN: Settings > SIM cards
- // CATEGORY: SETTINGS
- // OS: 6.0
- SIM = 88;
-
- // OBSOLETE
- TESTING = 89;
-
- // OPEN: Settings > More > Tethering & portable hotspot
- // CATEGORY: SETTINGS
- // OS: 6.0
- TETHER = 90;
-
- // OPEN: Settings > Security > Trust agents
- // CATEGORY: SETTINGS
- // OS: 6.0
- TRUST_AGENT = 91;
-
- // OPEN: Settings > Security > Trusted credentials
- // CATEGORY: SETTINGS
- // OS: 6.0
- TRUSTED_CREDENTIALS = 92;
-
- // OPEN: Settings > Language & input > TTS output > [Engine] > Settings
- // CATEGORY: SETTINGS
- // OS: 6.0
- TTS_ENGINE_SETTINGS = 93;
-
- // OPEN: Settings > Language & input > Text-to-speech output
- // CATEGORY: SETTINGS
- // OS: 6.0
- TTS_TEXT_TO_SPEECH = 94;
-
- // OPEN: Settings > Security > Apps with usage access
- // CATEGORY: SETTINGS
- // OS: 6.0
- USAGE_ACCESS = 95;
-
- // OPEN: Settings > Users
- // CATEGORY: SETTINGS
- // OS: 6.0
- USER = 96;
-
- // OPEN: Settings > Users > [Restricted profile app & content access]
- // CATEGORY: SETTINGS
- // OS: 6.0
- USERS_APP_RESTRICTIONS = 97;
-
- // OPEN: Settings > Users > [User settings]
- // CATEGORY: SETTINGS
- // OS: 6.0
- USER_DETAILS = 98;
-
- // OPEN: Settings > More > VPN
- // CATEGORY: SETTINGS
- // OS: 6.0
- VPN = 100;
-
- // OPEN: Settings > Display > Choose wallpaper from
- // CATEGORY: SETTINGS
- // OS: 6.0
- WALLPAPER_TYPE = 101;
-
- // OPEN: Settings > Display > Cast
- // CATEGORY: SETTINGS
- // OS: 6.0
- WFD_WIFI_DISPLAY = 102;
-
- // OPEN: Settings > Wi-Fi
- // CATEGORY: SETTINGS
- // OS: 6.0
- WIFI = 103;
-
- // OPEN: Settings > More > Wi-Fi Calling
- // CATEGORY: SETTINGS
- // OS: 6.0
- WIFI_CALLING = 105;
-
- // OPEN: Settings > Wi-Fi > Saved networks
- // CATEGORY: SETTINGS
- // OS: 6.0
- WIFI_SAVED_ACCESS_POINTS = 106;
-
- // OPEN: Settings > Wi-Fi > Advanced Wi-Fi > Wi-Fi Direct
- // CATEGORY: SETTINGS
- // OS: 6.0
- WIFI_P2P = 109;
-
- // OPEN: Settings > Apps > Configure apps > App permissions
- // CATEGORY: SETTINGS
- // OS: 6.0
- APPLICATIONS_ADVANCED = 130;
-
- // OPEN: Settings > Location > Scanning
- // CATEGORY: SETTINGS
- // OS: 6.0
- LOCATION_SCANNING = 131;
-
- // OPEN: Settings > Sound & notification > App notifications
- // CATEGORY: SETTINGS
- // OS: 6.0
- MANAGE_APPLICATIONS_NOTIFICATIONS = 133;
-
- // OPEN: Settings > Sound & notification > DND > Priority only allows
- // CATEGORY: SETTINGS
- // OS: 6.0
- NOTIFICATION_ZEN_MODE_PRIORITY = 141;
-
- // OPEN: Settings > Sound & notification > DND > Automatic rules
- // CATEGORY: SETTINGS
- // OS: 6.0
- NOTIFICATION_ZEN_MODE_AUTOMATION = 142;
-
- // OPEN: Settings > Sound & notification > DND > [Time based rule]
- // CATEGORY: SETTINGS
- // OS: 6.0
- NOTIFICATION_ZEN_MODE_SCHEDULE_RULE = 144;
-
- // OPEN: Settings > Apps > Configure apps > App links
- // CATEGORY: SETTINGS
- // OS: 6.0
- MANAGE_DOMAIN_URLS = 143;
-
- // OPEN: Settings > Sound & notification > DND > [Event rule]
- // CATEGORY: SETTINGS
- // OS: 6.0
- NOTIFICATION_ZEN_MODE_EVENT_RULE = 146;
-
- // OPEN: Settings > Sound & notification > Notification access
- // CATEGORY: SETTINGS
- // OS: 6.0
- NOTIFICATION_ACCESS = 179;
-
- // OPEN: Settings > Sound & notification > Do Not Disturb access
- // CATEGORY: SETTINGS
- // OS: 6.0
- NOTIFICATION_ZEN_MODE_ACCESS = 180;
-
- // OPEN: Settings > Internal storage > Apps storage
- // CATEGORY: SETTINGS
- // OS: 6.0
- APPLICATIONS_STORAGE_APPS = 182;
-
- // OPEN: Settings > Security > Usage access
- // CATEGORY: SETTINGS
- // OS: 6.0
- APPLICATIONS_USAGE_ACCESS_DETAIL = 183;
-
- // OPEN: Settings > Battery > Battery optimization
- // CATEGORY: SETTINGS
- // OS: 6.0
- APPLICATIONS_HIGH_POWER_APPS = 184;
-
- // OPEN: Settings > Apps > Configure > Default apps > Assist & voice input
- // CATEGORY: SETTINGS
- // OS: 6.0
- APPLICATIONS_MANAGE_ASSIST = 201;
-
- // OPEN: Settings > Memory
- // CATEGORY: SETTINGS
- // OS: 6.0
- PROCESS_STATS_SUMMARY = 202;
-
- // OPEN: Settings > Apps > Configure Apps > Display over other apps
- // CATEGORY: SETTINGS
- // OS: 6.0
- SYSTEM_ALERT_WINDOW_APPS = 221;
-
- // OPEN: Settings > About phone > Legal information
- // CATEGORY: SETTINGS
- // OS: 6.0
- ABOUT_LEGAL_SETTINGS = 225;
-
-
- // OPEN: Settings > Developer options > Inactive apps
- // CATEGORY: SETTINGS
- // OS: 6.0
- FUELGAUGE_INACTIVE_APPS = 238;
-
- // OPEN: Settings > Security > Nexus Imprint > Add Fingerprint
- // CATEGORY: SETTINGS
- // OS: 6.0
- FINGERPRINT_ENROLLING = 240;
- // OPEN: Fingerprint Enroll > Find Sensor
- // CATEGORY: SETTINGS
- // OS: 6.0
- FINGERPRINT_FIND_SENSOR = 241;
-
- // OPEN: Fingerprint Enroll > Fingerprint Enrolled!
- // CATEGORY: SETTINGS
- // OS: 6.0
- FINGERPRINT_ENROLL_FINISH = 242;
-
- // OPEN: Fingerprint Enroll introduction
- // CATEGORY: SETTINGS
- // OS: 6.0
- FINGERPRINT_ENROLL_INTRO = 243;
-
- // OPEN: Fingerprint Enroll > Let's Start!
- // CATEGORY: SETTINGS
- // OS: 6.0
- FINGERPRINT_ENROLL_SIDECAR = 245;
-
- // OPEN: Fingerprint Enroll SUW > Let's Start!
- // CATEGORY: SETTINGS
- // OS: 6.0
- FINGERPRINT_ENROLLING_SETUP = 246;
-
- // OPEN: Fingerprint Enroll SUW > Find Sensor
- // CATEGORY: SETTINGS
- // OS: 6.0
- FINGERPRINT_FIND_SENSOR_SETUP = 247;
-
- // OPEN: Fingerprint Enroll SUW > Fingerprint Enrolled!
- // CATEGORY: SETTINGS
- // OS: 6.0
- FINGERPRINT_ENROLL_FINISH_SETUP = 248;
-
- // OPEN: Fingerprint Enroll SUW introduction
- // CATEGORY: SETTINGS
- // OS: 6.0
- FINGERPRINT_ENROLL_INTRO_SETUP = 249;
-
- // OPEN: Settings > Developer Options > Background Check
- // CATEGORY: SETTINGS
- // OS: N
- BACKGROUND_CHECK_SUMMARY = 258;
-
- // OPEN: Settings > Notifications > [App] > Channel Notifications
- // CATEGORY: SETTINGS
- // OS: N
- NOTIFICATION_TOPIC_NOTIFICATION = 265;
-
- // OPEN: Settings > Security > User credentials
- // CATEGORY: Settings
- // OS: N
- USER_CREDENTIALS = 285;
-
- // Logs that the user has edited the enabled VR listeners.
- // CATEGORY: SETTINGS
- // OS: N
- VR_MANAGE_LISTENERS = 334;
-
- // Settings -> Accessibility -> Click after pointer stops moving
- // CATEGORY: SETTINGS
- // OS: N
- ACCESSIBILITY_TOGGLE_AUTOCLICK = 335;
-
- // Settings -> Sound
- // CATEGORY: SETTINGS
- // OS: N
- SOUND = 336;
-
- // Settings -> Notifications -> Gear
- // CATEGORY: SETTINGS
- // OS: N
- CONFIGURE_NOTIFICATION = 337;
-
- // Settings -> Wi-Fi -> Gear
- // CATEGORY: SETTINGS
- // OS: N
- CONFIGURE_WIFI = 338;
-
- // Settings -> Display -> Display size
- // OS: N
- DISPLAY_SCREEN_ZOOM = 339;
-
- // Settings -> Display -> Font size
- // CATEGORY: SETTINGS
- // OS: N
- ACCESSIBILITY_FONT_SIZE = 340;
-
- // Settings -> Data usage -> Cellular/Wi-Fi data usage
- // CATEGORY: SETTINGS
- // OS: N
- DATA_USAGE_LIST = 341;
-
- // Settings -> Data usage -> Billing cycle or DATA_USAGE_LIST -> Gear
- // CATEGORY: SETTINGS
- // OS: N
- BILLING_CYCLE = 342;
-
- // DATA_USAGE_LIST -> Any item or App info -> Data usage
- // CATEGORY: SETTINGS
- // OS: N
- APP_DATA_USAGE = 343;
-
- // Settings -> Language & input -> Language
- // CATEGORY: SETTINGS
- // OS: N
- USER_LOCALE_LIST = 344;
-
- // Settings -> Language & input -> Virtual keyboard
- // CATEGORY: SETTINGS
- // OS: N
- VIRTUAL_KEYBOARDS = 345;
-
- // Settings -> Language & input -> Physical keyboard
- // CATEGORY: SETTINGS
- // OS: N
- PHYSICAL_KEYBOARDS = 346;
-
- // Settings -> Language & input -> Virtual keyboard -> Add a virtual keyboard
- // CATEGORY: SETTINGS
- // OS: N
- ENABLE_VIRTUAL_KEYBOARDS = 347;
-
- // Settings -> Data usage -> Data Saver
- // CATEGORY: SETTINGS
- // OS: N
- DATA_SAVER_SUMMARY = 348;
-
- // Settings -> Data usage -> Data Saver -> Unrestricted data access
- // CATEGORY: SETTINGS
- // OS: N
- DATA_USAGE_UNRESTRICTED_ACCESS = 349;
-
- // Settings -> Apps -> Gear -> Special access
- SPECIAL_ACCESS = 351;
-
- // OPEN: SUW Welcome Screen -> Vision Settings
- // CATEGORY: SETTINGS
- // OS: N
- SUW_ACCESSIBILITY = 367;
-
- // OPEN: SUW Welcome Screen -> Vision Settings -> Magnification gestures (Renamed in O)
- // OPEN: SUW Welcome Screen -> Vision Settings -> Magnification -> Magnify with triple-tap
- // OPEN: SUW Welcome Screen -> Vision Settings -> Magnification -> Magnify with button
- // ACTION: New magnification gesture configuration is chosen
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: N
- SUW_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFICATION = 368;
-
- // OPEN: SUW Welcome Screen -> Vision Settings -> Font size
- // ACTION: New font size is chosen
- // SUBTYPE: 0 is small, 1 is default, 2 is large, 3 is largest
- // CATEGORY: SETTINGS
- // OS: N
- SUW_ACCESSIBILITY_FONT_SIZE = 369;
-
- // OPEN: SUW Welcome Screen -> Vision Settings -> Display size
- // ACTION: New display size is chosen
- // SUBTYPE: 0 is small, 1 is default, 2 is large, 3 is larger, 4 is largest
- // CATEGORY: SETTINGS
- // OS: N
- SUW_ACCESSIBILITY_DISPLAY_SIZE = 370;
-
- // OPEN: SUW Welcome Screen -> Vision Settings -> TalkBack
- // ACTION: New screen reader configuration is chosen
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: N
- SUW_ACCESSIBILITY_TOGGLE_SCREEN_READER = 371;
-
- // Airplane mode on
- SETTINGS_CONDITION_AIRPLANE_MODE = 377;
- // AKA Data saver on
- SETTINGS_CONDITION_BACKGROUND_DATA = 378;
- // Battery saver on
- SETTINGS_CONDITION_BATTERY_SAVER = 379;
- // Cellular data off
- SETTINGS_CONDITION_CELLULAR_DATA = 380;
- // Do not disturb on
- SETTINGS_CONDITION_DND = 381;
- // Hotspot on
- SETTINGS_CONDITION_HOTSPOT = 382;
- // Work profile off
- SETTINGS_CONDITION_WORK_MODE = 383;
-
- // Settings > Apps > Gear > Special Access > Premium SMS access
- PREMIUM_SMS_ACCESS = 388;
-
- // OPEN: Settings > Accounts > Work profile settings
- // CATEGORY: SETTINGS
- ACCOUNTS_WORK_PROFILE_SETTINGS = 401;
-
- // Settings -> Dev options -> Convert to file encryption
- CONVERT_FBE = 402;
-
- // Settings -> Dev options -> Convert to file encryption -> WIPE AND CONVERT...
- CONVERT_FBE_CONFIRM = 403;
-
- // Settings -> Dev options -> Running services
- RUNNING_SERVICES = 404;
-
- // The dialog shown by 3P intent to change current webview implementation.
- WEBVIEW_IMPLEMENTATION = 405;
-
- // OPEN: Settings > Internal storage > Storage manager
- // CATEGORY: SETTINGS
- STORAGE_MANAGER_SETTINGS = 458;
-
- // OPEN: Settings -> Gestures
- // CATEGORY: SETTINGS
- SETTINGS_GESTURES = 459;
-
- // OPEN: Settings > Display > Night Light
- // CATEGORY: SETTINGS
- NIGHT_DISPLAY_SETTINGS = 488;
-
- // Night Light on
- SETTINGS_CONDITION_NIGHT_DISPLAY = 492;
-
- // OPEN: Settings > Language & input > Personal dictionary (single locale)
- USER_DICTIONARY_SETTINGS = 514;
-
- // OPEN: Settings > Date & time > Select time zone
- ZONE_PICKER = 515;
-
- // OPEN: Settings > Security > Device administrators
- DEVICE_ADMIN_SETTINGS = 516;
-
- // OPEN: Settings > Security > Factory Reset Protection dialog
- DIALOG_FRP = 528;
-
- // OPEN: Settings > Custom list preference with confirmation message
- DIALOG_CUSTOM_LIST_CONFIRMATION = 529;
-
- // OPEN: Settings > APN Editor > Error dialog
- DIALOG_APN_EDITOR_ERROR = 530;
-
- // OPEN: Settings > Users > Edit owner info dialog
- DIALOG_OWNER_INFO_SETTINGS = 531;
-
- // OPEN: Settings > Security > Use one lock dialog
- DIALOG_UNIFICATION_CONFIRMATION = 532;
-
- // OPEN: Settings > Security > User Credential
- DIALOG_USER_CREDENTIAL = 533;
-
- // OPEN: Settings > Accounts > Remove account
- DIALOG_REMOVE_USER = 534;
-
- // OPEN: Settings > Accounts > Confirm auto sync dialog
- DIALOG_CONFIRM_AUTO_SYNC_CHANGE = 535;
-
- // OPEN: Settings > Apps > Dialog for running service details
- DIALOG_RUNNIGN_SERVICE = 536;
-
- // OPEN: Settings > Bluetooth > Rename this device
- DIALOG_BLUETOOTH_RENAME = 538;
-
- // OPEN: Settings > Battery optimization > details for app
- DIALOG_HIGH_POWER_DETAILS = 540;
-
- // OPEN: Settings > Keyboard > Show keyboard layout dialog
- DIALOG_KEYBOARD_LAYOUT = 541;
-
- // OPEN: Settings > WIFI Scan permission dialog
- DIALOG_WIFI_SCAN_MODE = 543;
-
- // OPEN: Settings > Wireless > VPN > Config dialog
- DIALOG_LEGACY_VPN_CONFIG = 545;
-
- // OPEN: Settings > Wireless > VPN > Config dialog for app
- DIALOG_VPN_APP_CONFIG = 546;
-
- // OPEN: Settings > Wireless > VPN > Cannot connect dialog
- DIALOG_VPN_CANNOT_CONNECT = 547;
-
- // OPEN: Settings > Wireless > VPN > Replace existing VPN dialog
- DIALOG_VPN_REPLACE_EXISTING = 548;
-
- // OPEN: Settings > Billing cycle > Edit billing cycle dates dialog
- DIALOG_BILLING_CYCLE = 549;
-
- // OPEN: Settings > Billing cycle > Edit data limit/warning dialog
- DIALOG_BILLING_BYTE_LIMIT = 550;
-
- // OPEN: Settings > Billing cycle > turn on data limit dialog
- DIALOG_BILLING_CONFIRM_LIMIT = 551;
-
- // OPEN: Settings > Service > Turn off notification access dialog
- DIALOG_DISABLE_NOTIFICATION_ACCESS = 552;
-
- // OPEN: Settings > Sound > Use personal sound for work profile dialog
- DIALOG_UNIFY_SOUND_SETTINGS = 553;
-
- // OPEN: Settings > Zen mode > Dialog warning about the zen access privileges being granted.
- DIALOG_ZEN_ACCESS_GRANT = 554;
-
- // OPEN: Settings > Zen mode > Dialog warning about the zen access privileges being revoked.
- DIALOG_ZEN_ACCESS_REVOKE = 555;
-
- // OPEN: Settings > Zen mode > Dialog that picks time for zen mode.
- DIALOG_ZEN_TIMEPICKER = 556;
-
- // OPEN: Settings > Apps > Dialog that informs user to allow service access for app.
- DIALOG_SERVICE_ACCESS_WARNING = 557;
-
- // OPEN: Settings > Apps > Dialog for app actions (such as force stop/clear data)
- DIALOG_APP_INFO_ACTION = 558;
-
- // OPEN: Settings > Storage > Dialog for forgetting a storage device
- DIALOG_VOLUME_FORGET = 559;
-
- // OPEN: Settings > Storage > Dialog for initializing a volume
- DIALOG_VOLUME_INIT = 561;
-
- // OPEN: Settings > Storage > Dialog for unmounting a volume
- DIALOG_VOLUME_UNMOUNT = 562;
-
- // OPEN: Settings > Storage > Dialog for renaming a volume
- DIALOG_VOLUME_RENAME = 563;
-
- // OPEN: Settings > Storage > Dialog for clear cache
- DIALOG_STORAGE_CLEAR_CACHE = 564;
-
- // OPEN: Settings > Storage > Dialog for system info
- DIALOG_STORAGE_SYSTEM_INFO = 565;
-
- // OPEN: Settings > Storage > Dialog for other info
- DIALOG_STORAGE_OTHER_INFO = 566;
-
- // OPEN: Settings > Storage > Dialog for user info
- DIALOG_STORAGE_USER_INFO = 567;
- // OPEN: Settings > Add fingerprint > Dialog when user touches fingerprint icon.
- DIALOG_FINGERPRINT_ICON_TOUCH = 568;
-
- // OPEN: Settings > Add fingerprint > Error dialog
- DIALOG_FINGERPINT_ERROR = 569;
-
- // OPEN: Settings > Fingerprint > Rename or delete dialog
- DIALOG_FINGERPINT_EDIT = 570;
-
- // OPEN: Settings > Fingerprint > Dialog for deleting last fingerprint
- DIALOG_FINGERPINT_DELETE_LAST = 571;
-
- // OPEN: SUW > Fingerprint > Dialog to confirm skip fingerprint setup entirely.
- DIALOG_FINGERPRINT_SKIP_SETUP = 573;
-
- // OPEN: Settings > Proxy Selector error dialog
- DIALOG_PROXY_SELECTOR_ERROR = 574;
-
- // OPEN: Settings > Wifi > P2P Settings > Disconnect dialog
- DIALOG_WIFI_P2P_DISCONNECT = 575;
-
- // OPEN: Settings > Wifi > P2P Settings > Cancel connection dialog
- DIALOG_WIFI_P2P_CANCEL_CONNECT = 576;
-
- // OPEN: Settings > Wifi > P2P Settings > Rename dialog
- DIALOG_WIFI_P2P_RENAME = 577;
-
- // OPEN: Settings > Wifi > P2P Settings > Forget group dialog
- DIALOG_WIFI_P2P_DELETE_GROUP = 578;
-
- // OPEN: Settings > APN > Restore default dialog
- DIALOG_APN_RESTORE_DEFAULT = 579;
-
- // OPEN: Settings > Encryption interstitial accessibility warning dialog
- DIALOG_ENCRYPTION_INTERSTITIAL_ACCESSIBILITY = 581;
-
- // OPEN: Settings > Acessibility > Enable accessiblity service dialog
- DIALOG_ACCESSIBILITY_SERVICE_ENABLE = 583;
-
- // OPEN: Settings > Acessibility > Disable accessiblity service dialog
- DIALOG_ACCESSIBILITY_SERVICE_DISABLE = 584;
-
- // OPEN: Settings > Account > Remove account dialog
- DIALOG_ACCOUNT_SYNC_REMOVE = 585;
-
- // OPEN: Settings > Account > Remove account failed dialog
- DIALOG_ACCOUNT_SYNC_FAILED_REMOVAL = 586;
-
- // OPEN: Settings > Account > Cannot do onetime sync dialog
- DIALOG_ACCOUNT_SYNC_CANNOT_ONETIME_SYNC = 587;
-
- // OPEN: Settings > Display > Night light > Set start time dialog
- DIALOG_NIGHT_DISPLAY_SET_START_TIME = 588;
-
- // OPEN: Settings > Display > Night light > Set end time dialog
- DIALOG_NIGHT_DISPLAY_SET_END_TIME = 589;
-
-
-
- // OPEN: Settings > User > Edit info dialog
- DIALOG_USER_EDIT = 590;
-
- // OPEN: Settings > User > Confirm remove dialog
- DIALOG_USER_REMOVE = 591;
-
- // OPEN: Settings > User > Enable calling dialog
- DIALOG_USER_ENABLE_CALLING = 592;
-
- // OPEN: Settings > User > Enable calling and sms dialog
- DIALOG_USER_ENABLE_CALLING_AND_SMS = 593;
-
- // OPEN: Settings > User > Cannot manage device message dialog
- DIALOG_USER_CANNOT_MANAGE = 594;
-
- // OPEN: Settings > User > Add user dialog
- DIALOG_USER_ADD = 595;
-
- // OPEN: Settings > User > Setup user dialog
- DIALOG_USER_SETUP = 596;
-
- // OPEN: Settings > User > Setup profile dialog
- DIALOG_USER_SETUP_PROFILE = 597;
-
- // OPEN: Settings > User > Choose user type dialog
- DIALOG_USER_CHOOSE_TYPE = 598;
-
- // OPEN: Settings > User > Need lockscreen dialog
- DIALOG_USER_NEED_LOCKSCREEN = 599;
-
- // OPEN: Settings > User > Confirm exit guest mode dialog
- DIALOG_USER_CONFIRM_EXIT_GUEST = 600;
-
- // OPEN: Settings > User > Edit user profile dialog
- DIALOG_USER_EDIT_PROFILE = 601;
-
-
- // OPEN: Settings > Wifi > Saved AP > Edit dialog
- DIALOG_WIFI_SAVED_AP_EDIT = 602;
-
- // OPEN: Settings > Wifi > Edit AP dialog
- DIALOG_WIFI_AP_EDIT = 603;
-
- // OPEN: Settings > Wifi > Write config to NFC dialog
- DIALOG_WIFI_WRITE_NFC = 606;
-
- // OPEN: Settings > Date > Date picker dialog
- DIALOG_DATE_PICKER = 607;
-
- // OPEN: Settings > Date > Time picker dialog
- DIALOG_TIME_PICKER = 608;
-
- // OPEN: Settings > Wireless > Manage wireless plan dialog
- DIALOG_MANAGE_MOBILE_PLAN = 609;
-
- // OPEN Settings > Bluetooth > Attempt to connect to device that shows dialog
- BLUETOOTH_DIALOG_FRAGMENT = 613;
-
- // OPEN: Settings > Security
- // CATEGORY: SETTINGS
- // OS: O
- ENTERPRISE_PRIVACY_SETTINGS = 628;
-
- // OPEN: Settings > System
- SETTINGS_SYSTEM_CATEGORY = 744;
-
- // OPEN: Settings > Storage
- SETTINGS_STORAGE_CATEGORY = 745;
-
- // OPEN: Settings > Network & Internet
- SETTINGS_NETWORK_CATEGORY = 746;
-
- // OPEN: Settings > Connected Device
- SETTINGS_CONNECTED_DEVICE_CATEGORY = 747;
-
- // OPEN: Settings > App & Notification
- SETTINGS_APP_NOTIF_CATEGORY = 748;
-
- // OPEN: Settings > System > Language & Region
- SETTINGS_LANGUAGE_CATEGORY = 750;
-
- // OPEN: Settings > System > Input & Gesture > Swipe to notification gesture
- SETTINGS_GESTURE_SWIPE_TO_NOTIFICATION = 751;
-
- // OPEN: Settings > System > Input & Gesture > Double tap power button gesture
- SETTINGS_GESTURE_DOUBLE_TAP_POWER = 752;
-
- // OPEN: Settings > System > Input & Gesture > Pick up gesture
- SETTINGS_GESTURE_PICKUP = 753;
-
- // OPEN: Settings > System > Input & Gesture > Double tap screen gesture
- SETTINGS_GESTURE_DOUBLE_TAP_SCREEN = 754;
-
- // OPEN: Settings > System > Input & Gesture > Double twist gesture
- SETTINGS_GESTURE_DOUBLE_TWIST = 755;
-
- // OPEN: Settings > Apps > Default Apps > Default browser
- DEFAULT_BROWSER_PICKER = 785;
- // OPEN: Settings > Apps > Default Apps > Default emergency app
- DEFAULT_EMERGENCY_APP_PICKER = 786;
-
- // OPEN: Settings > Apps > Default Apps > Default home
- DEFAULT_HOME_PICKER = 787;
-
- // OPEN: Settings > Apps > Default Apps > Default phone
- DEFAULT_PHONE_PICKER = 788;
-
- // OPEN: Settings > Apps > Default Apps > Default sms
- DEFAULT_SMS_PICKER = 789;
-
- // OPEN: Settings > Apps > Notification > Notification Assistant
- DEFAULT_NOTIFICATION_ASSISTANT = 790;
-
-
- // OPEN: Settings > Apps > Default Apps > Warning dialog to confirm selection
- DEFAULT_APP_PICKER_CONFIRMATION_DIALOG = 791;
-
- // OPEN: Settings > Apps > Default Apps > Default autofill app
- DEFAULT_AUTOFILL_PICKER = 792;
-
- // OPEN: Settings > Apps > Gear > Special Access > Install other apps
- // CATEGORY: SETTINGS
- // OS: 8.0
- MANAGE_EXTERNAL_SOURCES = 808;
-
- // Logs that the user has edited the picture-in-picture settings.
- // CATEGORY: SETTINGS
- SETTINGS_MANAGE_PICTURE_IN_PICTURE = 812;
-
- // OPEN: SUW Welcome Screen -> Vision Settings -> Select to Speak
- // ACTION: Select to Speak configuration is chosen
- // SUBTYPE: 0 is off, 1 is on
- // CATEGORY: SETTINGS
- // OS: N
- SUW_ACCESSIBILITY_TOGGLE_SELECT_TO_SPEAK = 817;
-
- // OPEN: Settings > System > Backup
- // CATEGORY: SETTINGS
- // OS: O
- BACKUP_SETTINGS = 818;
-
- // OPEN: Settings > Storage > Games
- // CATEGORY: SETTINGS
- // OS: O
- APPLICATIONS_STORAGE_GAMES = 838;
-
- // OPEN: Settings > Storage > Audio and Music
- // CATEGORY: SETTINGS
- // OS: O
- APPLICATIONS_STORAGE_MUSIC = 839;
-
- // ACTION: Settings > Storage > Free Up Space to launch Deletion Helper
- // CATEGORY: SETTINGS
- // OS: O
- STORAGE_FREE_UP_SPACE_NOW = 840;
-
- // ACTION: Settings > Storage > Files to open the File Manager
- // CATEGORY: SETTINGS
- // OS: O
- STORAGE_FILES = 841;
-
- // OPEN: Settings > Apps > Default Apps > Assist > Default assist
- DEFAULT_ASSIST_PICKER = 843;
-
- // OPEN: Settings > Apps > Default Apps > Assist > Default voice input
- DEFAULT_VOICE_INPUT_PICKER = 844;
-
- // OPEN: Settings > Storage > [Profile]
- SETTINGS_STORAGE_PROFILE = 845;
-
- // OPEN: Settings > Security & screen lock -> Encryption & crendentials
- // CATEGORY: SETTINGS
- // OS: O
- ENCRYPTION_AND_CREDENTIAL = 846;
-
- // OPEN: Settings > Wi-Fi > Network Details (click on Access Point)
- // CATEGORY: SETTINGS
- // OS: O
- WIFI_NETWORK_DETAILS = 849;
-
- // OPEN: Settings > Wi-Fi > Wifi Preferences -> Advanced -> Network Scorer
- // CATEGORY: SETTINGS
- // OS: O
- SETTINGS_NETWORK_SCORER = 861;
-
- // OPEN: Settings > About device > Model > Hardware info dialog
- DIALOG_SETTINGS_HARDWARE_INFO = 862;
-
- // OPEN: Settings > Security & screen lock -> Lock screen preferences
- // CATEGORY: SETTINGS
- SETTINGS_LOCK_SCREEN_PREFERENCES = 882;
-
-
- // OPEN: Settings -> Display -> When in VR Mode
- VR_DISPLAY_PREFERENCE = 921;
-
- // OPEN: Settings > Accessibility > Magnification
- // CATEGORY: SETTINGS
- // OS: O
- ACCESSIBILITY_SCREEN_MAGNIFICATION_SETTINGS = 922;
-
- // OPEN: Settings -> System -> Reset options
- RESET_DASHBOARD = 924;
-
- // OPEN: Settings > Security > Nexus Imprint > [Fingerprint] > Delete
- // CATEGORY: SETTINGS
- // OS: O
- FINGERPRINT_REMOVE_SIDECAR = 934;
-
- // OPEN: Settings > Storage > Movies & TV
- // CATEGORY: SETTINGS
- // OS: O
- APPLICATIONS_STORAGE_MOVIES = 935;
-
- // OPEN: Settings > Security > Managed Device Info > Apps installed
- // CATEGORY: SETTINGS
- // OS: O
- ENTERPRISE_PRIVACY_INSTALLED_APPS = 938;
-
- // OPEN: Settings > Security > Managed Device Info > nnn permissions
- // CATEGORY: SETTINGS
- // OS: O
- ENTERPRISE_PRIVACY_PERMISSIONS = 939;
-
-
- // OPEN: Settings > Security > Managed Device Info > Default apps
- // CATEGORY: SETTINGS
- // OS: O
- ENTERPRISE_PRIVACY_DEFAULT_APPS = 940;
-
- // OPEN: Choose screen lock dialog in Settings
- // CATEGORY: SETTINGS
- // OS: O DR
- SETTINGS_CHOOSE_LOCK_DIALOG = 990;
-
- // OPEN: Settings > System > Languages & input > Assist gesture
- // CATEGORY: SETTINGS
- // OS: O DR
- SETTINGS_ASSIST_GESTURE = 996;
-
- // OPEN: Settings > Connected Devices > Bluetooth > (click on details link for a paired device)
- BLUETOOTH_DEVICE_DETAILS = 1009;
-
- // OPEN: Settings > credential pages - prompt for key guard configuration confirmation
- CONFIGURE_KEYGUARD_DIALOG = 1010;
-
- // OPEN: Settings > Network > Tether > Wi-Fi hotspot
- WIFI_TETHER_SETTINGS = 1014;
-
- // OPEN: Settings->Connected Devices->Bluetooth->(click on details link for a paired device)
- // -> Edit name button.
- // CATEGORY: SETTINGS
- // OS: O DR
- DIALOG_BLUETOOTH_PAIRED_DEVICE_RENAME = 1015;
-
- // OPEN: Settings > Connected devices > Bluetooth > Pair new device
- // CATEGORY: SETTINGS
- // OS: O DR
- BLUETOOTH_PAIRING = 1018;
-
- // OPEN: Settings->Connected Devices->Bluetooth->(click on details link for a paired device)
- // -> Forget button.
- // CATEGORY: SETTINGS
- // OS: O DR
- DIALOG_BLUETOOTH_PAIRED_DEVICE_FORGET = 1031;
-
- // OPEN: Settings > Storage > Photos & Videos
- // CATEGORY: SETTINGS
- // OS: O MR
- APPLICATIONS_STORAGE_PHOTOS = 1092;
-
- // OPEN: Settings > Display > Colors
- // CATEGORY: SETTINGS
- // OS: O MR
- COLOR_MODE_SETTINGS = 1143;
-
- // OPEN: Settings > Developer Options > Experiment dashboard
- // CATEGORY: SETTINGS
- SETTINGS_FEATURE_FLAGS_DASHBOARD = 1217;
-
- // OPEN: Settings > Notifications > [App] > Topic Notifications
- // CATEGORY: SETTINGS
- // OS: P
- NOTIFICATION_CHANNEL_GROUP = 1218;
-
- // OPEN: Settings > Developer options > Enable > Info dialog
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_ENABLE_DEVELOPMENT_OPTIONS = 1219;
-
- // OPEN: Settings > Developer options > OEM unlocking > Info dialog
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_ENABLE_OEM_UNLOCKING = 1220;
-
- // OPEN: Settings > Developer options > USB debugging > Info dialog
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_ENABLE_ADB = 1222;
-
- // OPEN: Settings > Security > Nexus Imprint > [Fingerprint]
- // CATEGORY: SETTINGS
- // OS: P
- FINGERPRINT_AUTHENTICATE_SIDECAR = 1221;
-
- // OPEN: Settings > Developer options > Revoke USB debugging authorizations > Info dialog
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_CLEAR_ADB_KEYS = 1223;
-
- // Open: Settings > Developer options > Quick setting tile config
- // CATEGORY: SETTINGS
- // OS: P
- DEVELOPMENT_QS_TILE_CONFIG = 1224;
-
- // OPEN: Settings > Developer options > Store logger data persistently on device > Info dialog
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_LOG_PERSIST = 1225;
-
- // OPEN: Settings > Network & Internet > Mobile network > Wi-Fi calling
- // CATEGORY: SETTINGS
- // OS: P
- WIFI_CALLING_FOR_SUB = 1230;
-
- // Open: Settings > Dev options > Oem unlock > lock it > warning dialog.
- // OS: P
- DIALOG_OEM_LOCK_INFO = 1238;
-
- // Open: Settings > System > About phone > IMEI
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_IMEI_INFO = 1240;
-
- // OPEN: Settings > System > About Phone > Sim status
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_SIM_STATUS = 1246;
-
- // OPEN: Settings > System > About Phone > Android Version
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_FIRMWARE_VERSION = 1247;
-
- // OPEN: Settings > Battery(version 2)
- // CATEGORY: SETTINGS
- // OS: P
- FUELGAUGE_POWER_USAGE_SUMMARY_V2 = 1263;
-
- // OPEN: Settings > Connected devices > Connection preferences
- // CATEGORY: SETTINGS
- // OS: P
- CONNECTION_DEVICE_ADVANCED = 1264;
-
- // OPEN: Settings > Security > Screen lock gear icon
- // CATEGORY: SETTINGS
- // OS: P
- SCREEN_LOCK_SETTINGS = 1265;
-
- // OPEN: Settings > Sound > Do Not Disturb > Turn on automatically > Delete rule (trash can icon)
- // CATEGORY: SETTINGS
- // OS: P
- NOTIFICATION_ZEN_MODE_DELETE_RULE_DIALOG = 1266;
-
- // OPEN: Settings > Sound > Do Not Disturb > Turn on automatically > Add rule > Event/Time
- // OPEN: Settings > Sound > Do Not Disturb > Turn on automatically > Select rule ("Event") > Rule name
- // CATEGORY: SETTINGS
- // OS: P
- NOTIFICATION_ZEN_MODE_RULE_NAME_DIALOG = 1269;
-
- // OPEN: Settings > Sound > Do Not Disturb > Turn on automatically > Add rule
- // CATEGORY: SETTINGS
- // OS: P
- NOTIFICATION_ZEN_MODE_RULE_SELECTION_DIALOG = 1270;
-
- // OPEN: Settings > Battery > Smart Battery
- // CATEGORY: SETTINGS
- // OS: P
- FUELGAUGE_SMART_BATTERY = 1281;
-
- // OPEN: Settings > Battery > Smart Battery > Restricted apps
- // CATEGORY: SETTINGS
- // OS: P
- FUELGAUGE_RESTRICTED_APP_DETAILS = 1285;
-
- // OPEN: Settings > Sound & notification > Do Not Disturb > Turn on now
- // CATEGORY: SETTINGS
- // OS: P
- NOTIFICATION_ZEN_MODE_ENABLE_DIALOG = 1286;
-
- // OPEN: Settings->Connected Devices->USB->(click on details link)
- // CATEGORY: SETTINGS
- // OS: P
- USB_DEVICE_DETAILS = 1291;
-
- // OPEN: Settings > Accessibility > Vibration
- // CATEGORY: SETTINGS
- // OS: P
- ACCESSIBILITY_VIBRATION = 1292;
-
- // OPEN: Settings > Accessibility > Vibration > Notification vibration
- // CATEGORY: SETTINGS
- // OS: P
- ACCESSIBILITY_VIBRATION_NOTIFICATION = 1293;
-
- // OPEN: Settings > Accessibility > Vibration > Touch vibration
- // CATEGORY: SETTINGS
- // OS: P
- ACCESSIBILITY_VIBRATION_TOUCH = 1294;
-
- // OPEN: Settings->Developer Options->Default USB
- // CATEGORY: SETTINGS
- // OS: P
- USB_DEFAULT = 1312;
-
- // OPEN: Settings > Battery > Battery tip > Battery tip Dialog
- // CATEGORY: SETTINGS
- // OS: P
- FUELGAUGE_BATTERY_TIP_DIALOG = 1323;
-
- // OPEN: DND Settings > What to block
- // OS: P
- ZEN_WHAT_TO_BLOCK = 1339;
-
- // OPEN: Settings > Sounds > Do Not Disturb > Duration
- // CATEGORY: SETTINGS
- // OS: P
- NOTIFICATION_ZEN_MODE_DURATION_DIALOG = 1341;
-
- // OPEN: Settings > Date & time > Select time zone -> Region
- // CATEGORY: SETTINGS
- // OS: P
- SETTINGS_ZONE_PICKER_REGION = 1355;
-
- // OPEN: Settings > Date & time > Select time zone -> Time Zone
- // CATEGORY: SETTINGS
- // OS: P
- SETTINGS_ZONE_PICKER_TIME_ZONE = 1356;
- // OPEN: Settings > Date & time > Select time zone -> Select UTC Offset
- // CATEGORY: SETTINGS
- // OS: P
- SETTINGS_ZONE_PICKER_FIXED_OFFSET = 1357;
-
- // OPEN: Settings > Gestures > Prevent Ringing
- // OS: P
- SETTINGS_PREVENT_RINGING = 1360;
-
- // Settings > Condition > Device muted
- // CATEGORY: SETTINGS
- // OS: P
- SETTINGS_CONDITION_DEVICE_MUTED = 1368;
-
- // Settings > Condition > Device vibrate
- // CATEGORY: SETTINGS
- // OS: P
- SETTINGS_CONDITION_DEVICE_VIBRATE = 1369;
-
- // OPEN: Settings > Connected devices > previously connected devices
- // CATEGORY: SETTINGS
- // OS: P
- PREVIOUSLY_CONNECTED_DEVICES = 1370;
-
- // OPEN: Settings > Network & Internet > Wi-Fi > Wi-Fi Preferences > Turn on Wi-Fi automatically
- // note: Wifi Scanning must be off for this dialog to show
- // CATEGORY: SETTINGS
- // OS: P
- WIFI_SCANNING_NEEDED_DIALOG = 1373;
-
- // OPEN: Settings > System > Gestures > System navigation
- // CATEGORY: SETTINGS
- // OS: P
- SETTINGS_GESTURE_SWIPE_UP = 1374;
-
- // OPEN: Settings > Storage > Dialog to format a storage volume
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_VOLUME_FORMAT = 1375;
-
- // OPEN: DND onboarding activity
- // CATEGORY: SETTINGS
- // OS: P
- SETTINGS_ZEN_ONBOARDING = 1380;
-
- // OPEN: Settings > Display > Auto brightness
- // CATEGORY: SETTINGS
- // OS: P
- SETTINGS_AUTO_BRIGHTNESS = 1381;
-
- // OPEN: Settings > Connected Devices > Bluetooth
- // CATEGORY: SETTINGS
- // OS: P
- BLUETOOTH_FRAGMENT = 1390;
-
- // Screen: DND Settings > Notifications
- // OS: P
- SETTINGS_ZEN_NOTIFICATIONS = 1400;
-
- // An event category for slices.
- // OPEN: Slice became visible.
- // CLOSE: Slice became invisible.
- // ACTION: Slice was tapped.
- SLICE = 1401;
-
- // OPEN: Settings -> Developer Options -> Disable Bluetooth A2DP hardware
- // offload
- // CATEGORY: SETTINGS
- // OS: P
- DIALOG_BLUETOOTH_DISABLE_A2DP_HW_OFFLOAD = 1441;
-
- // OPEN: Settings homepage
- SETTINGS_HOMEPAGE = 1502;
-
- // OPEN: Settings > Create shortcut(widget)
- // CATEGORY: SETTINGS
- // OS: Q
- SETTINGS_CREATE_SHORTCUT = 1503;
-
- // OPEN: Face Enroll introduction
- // CATEGORY: SETTINGS
- // OS: Q
- FACE_ENROLL_INTRO = 1506;
-
- // OPEN: Face Enroll introduction
- // CATEGORY: SETTINGS
- // OS: Q
- FACE_ENROLL_ENROLLING = 1507;
-
- // OPEN: Face Enroll introduction
- // CATEGORY: SETTINGS
- // OS: Q
- FACE_ENROLL_FINISHED = 1508;
-
- // OPEN: Face Enroll sidecar
- // CATEGORY: SETTINGS
- // OS: Q
- FACE_ENROLL_SIDECAR = 1509;
-
- // OPEN: Settings > Add face > Error dialog
- // OS: Q
- DIALOG_FACE_ERROR = 1510;
-
- // OPEN: Settings > Security > Face
- // CATEGORY: SETTINGS
- // OS: Q
- FACE = 1511;
-
- // OPEN: Settings > Acessibility > HearingAid pairing instructions dialog
- // CATEGORY: SETTINGS
- // OS: Q
- DIALOG_ACCESSIBILITY_HEARINGAID = 1512;
-
- // OPEN: Settings > Add face
- // OS: Q
- FACE_ENROLL_PREVIEW = 1554;
-
- // OPEN: Settings > Network & Internet > Wi-Fi > Add network
- // CATEGORY: SETTINGS
- // OS: Q
- SETTINGS_WIFI_ADD_NETWORK = 1556;
-
- // OPEN: Settings > System > Input & Gesture > Reach up gesture
- // OS: Q
- SETTINGS_GESTURE_WAKE_LOCK_SCREEN = 1557;
-
- // OPEN: Settings > System > Input & Gesture > Wake screen
- SETTINGS_GESTURE_WAKE_SCREEN = 1570;
-
- // OPEN: Settings > Network & internet > Mobile network
- MOBILE_NETWORK = 1571;
-
- // OPEN: Settings > Network & internet > Mobile network > Choose network
- MOBILE_NETWORK_SELECT = 1581;
-
- // OPEN: Settings > Network & internet > Mobile network > Mobile Data > Dialog
- MOBILE_DATA_DIALOG = 1582;
-
- // OPEN: Settings > Network & internet > Mobile network > Data roaming > Dialog
- MOBILE_ROAMING_DIALOG = 1583;
-
- // Settings > Display > Lock screen display > On lock screen
- LOCK_SCREEN_NOTIFICATION_CONTENT = 1584;
-
- // ConfirmDeviceCredentials > BiometricPrompt
- BIOMETRIC_FRAGMENT = 1585;
-
- // OPEN: Biometric Enrollment (android.settings.BIOMETRIC_ENROLL action intent)
- BIOMETRIC_ENROLL_ACTIVITY = 1586;
-
- // OPEN: Settings > Privacy
- TOP_LEVEL_PRIVACY = 1587;
-
- // OPEN: Settings > Sound & notification > Do Not Disturb > See all exceptions >
- // Allow apps to override
- // CATEGORY: SETTINGS
- // OS: Q
- NOTIFICATION_ZEN_MODE_OVERRIDING_APPS = 1588;
-
-
- // OPEN: Settings > Sound & notification > Do Not Disturb > See all exceptions >
- // Allow apps to override > Choose app
- // CATEGORY: SETTINGS
- // OS: Q
- NOTIFICATION_ZEN_MODE_OVERRIDING_APP = 1589;
-
- // OPEN: Settings > Developer options > Disable > Info dialog
- DIALOG_DISABLE_DEVELOPMENT_OPTIONS = 1591;
-
- // OPEN: WifiDppConfiguratorActivity (android.settings.WIFI_DPP_CONFIGURATOR_XXX action intents)
- SETTINGS_WIFI_DPP_CONFIGURATOR = 1595;
-
- // OPEN: WifiDppEnrolleeActivity (android.settings.WIFI_DPP_ENROLLEE_XXX action intents)
- SETTINGS_WIFI_DPP_ENROLLEE = 1596;
-
- // OPEN: Settings > Apps & Notifications -> Special app access -> Financial Apps Sms Access
- SETTINGS_FINANCIAL_APPS_SMS_ACCESS = 1597;
-
-
-
- // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
- // > Do Not Disturb behavior
- // CATEGORY: SETTINGS
- // OS: Q
- ZEN_CUSTOM_RULE_SETTINGS = 1604;
-
- // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
- // > Do Not Disturb behavior > Custom
- // CATEGORY: SETTINGS
- // OS: Q
- ZEN_CUSTOM_RULE_SOUND_SETTINGS = 1605;
-
- // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
- // > Do Not Disturb behavior > Use default Do Not Disturb behavior
- // CATEGORY: SETTINGS
- // OS: Q
- ZEN_CUSTOM_RULE_DEFAULT_SETTINGS = 1606;
-
- // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
- // > Do Not Disturb behavior > Use default Do Not Disturb behavior
- // > Notification restriction
- // CATEGORY: SETTINGS
- // OS: Q
- ZEN_CUSTOM_RULE_NOTIFICATION_RESTRICTIONS = 1608;
-
- // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
- // > Do Not Disturb behavior > Use default Do Not Disturb behavior
- // > Notification restriction > Custom
- // CATEGORY: SETTINGS
- // OS: Q
- ZEN_CUSTOM_RULE_VIS_EFFECTS = 1609;
-
- // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
- // > Do Not Disturb behavior > Use default Do Not Disturb behavior
- // > Notification restriction > Custom > Allow messages
- // CATEGORY: SETTINGS
- // OS: Q
- ZEN_CUSTOM_RULE_MESSAGES = 1610;
-
- // OPEN: Settings > Sound > Do Not Disturb > Schedules > (Click on system rule)
- // > Do Not Disturb behavior > Use default Do Not Disturb behavior
- // > Notification restriction > Custom > Allow calls
- // CATEGORY: SETTINGS
- // OS: Q
- ZEN_CUSTOM_RULE_CALLS = 1611;
-
- // OPEN: Settings > Sound > Do Not Disturb > Click footer link if custom settings applied
- // CATEGORY: SETTINGS
- // OS: Q
- ZEN_CUSTOM_SETTINGS_DIALOG = 1612;
-
- // OPEN: Settings > Developer Options > Game Driver Preferences
- // CATEGORY: SETTINGS
- // OS: Q
- SETTINGS_GAME_DRIVER_DASHBOARD = 1613;
-
- // OPEN: Settings > Accessibility > Vibration > Ring vibration
- // CATEGORY: SETTINGS
- // OS: Q
- ACCESSIBILITY_VIBRATION_RING = 1620;
-
- // OPEN: Settings > System > Input & Gesture > Skip songs
- SETTINGS_GESTURE_SKIP = 1624;
-
- // OPEN: Settings > System > Input & Gesture > Silence alerts
- SETTINGS_GESTURE_SILENCE = 1625;
-
- // OPEN: Settings > System > Input & Gesture > Tap to check
- SETTINGS_GESTURE_TAP_SCREEN = 1626;
-
- // OPEN: Settings > Network & internet > Click Mobile network to land on a page with a list of
- // SIM/eSIM subscriptions.
- MOBILE_NETWORK_LIST = 1627;
-
- // OPEN: Settings > Display > Adaptive sleep
- // OS: Q
- SETTINGS_ADAPTIVE_SLEEP = 1628;
-
- // OPEN: Settings > System > Aware
- SETTINGS_AWARE = 1632;
-
- // OPEN: Settings > System > Aware > Disable > Dialog
- DIALOG_AWARE_DISABLE = 1633;
-
- // OPEN: Settings > Settings > Network & internet > Click Mobile network to land on page with
- // details for a SIM/eSIM mobile network > Click edit icon to bring up a rename dialog.
- // OS: Q
- MOBILE_NETWORK_RENAME_DIALOG = 1642;
-
- // OPEN: Set new password (android.app.action.SET_NEW_PASSWORD action intent)
- // CATEGORY: SETTINGS
- // OS: Q
- SET_NEW_PASSWORD_ACTIVITY = 1644;
-
- // Panel for Internet Connectivity
- PANEL_INTERNET_CONNECTIVITY = 1654;
-
- // Panel for Volume
- PANEL_VOLUME = 1655;
-
- // Panel for NFC
- PANEL_NFC = 1656;
-
- // Panel for Media Output
- PANEL_MEDIA_OUTPUT = 1657;
-
- // Mapping: go/at-mapping
- PAGE_ATSSI = 1667;
-
- PAGE_ATSII = 1668;
-
- PAGE_ATUS = 1669;
-
- PAGE_ATSSP = 1670;
-
- PAGE_ATSAP = 1671;
-
- PAGE_ATSCP = 1672;
-
- PAGE_ATHNP = 1673;
-
- // OPEN: Accessibility detail settings (android.settings.ACCESSIBILITY_DETAILS_SETTINGS intent)
- ACCESSIBILITY_DETAILS_SETTINGS = 1682;
-
- // Open: Settings will show the conditional when Grayscale mode is on
- SETTINGS_CONDITION_GRAYSCALE_MODE = 1683;
-
- // Panel for Wifi
- PANEL_WIFI = 1687;
-
- // Open: Settings > Special App Access > Do not disturb control for app
- ZEN_ACCESS_DETAIL = 1692;
-
- // OPEN: Settings > Face > Remove face
- // OS: Q
- DIALOG_FACE_REMOVE = 1693;
-
- // Settings > Display > Theme
- DARK_UI_SETTINGS = 1698;
-
- // Settings > global bubble settings
- BUBBLE_SETTINGS = 1699;
-
- // Settings > app > bubble settings
- APP_BUBBLE_SETTINGS = 1700;
-
- // OPEN: Settings > System > Aware > Info dialog
- DIALOG_AWARE_STATUS = 1701;
-
- // Open: Settings > app > bubble settings > confirmation dialog
- DIALOG_APP_BUBBLE_SETTINGS = 1702;
-
- // OPEN: Settings > Pick SIM dialog
- DIALOG_SIM_LIST = 1707;
-
- // OPEN: Settings > Pick SIM (that supports calling) dialog
- DIALOG_CALL_SIM_LIST = 1708;
-
- // OPEN: Settings > Pick preferred SIM dialog
- DIALOG_PREFERRED_SIM_PICKER = 1709;
-
- // OPEN: Settings > Network & internet > Mobile network > Delete sim
- DIALOG_DELETE_SIM_CONFIRMATION = 1713;
-
- // OPEN: Settings > Network & internet > Mobile network > Delete sim > (answer yes to
- // confirmation)
- DIALOG_DELETE_SIM_PROGRESS = 1714;
-
- // Settings > Apps and notifications > Notifications > Gentle notifications
- GENTLE_NOTIFICATIONS_SCREEN = 1715;
-
- // OPEN: Settings > System > Gestures > Global Actions Panel
- // CATEGORY: SETTINGS
- // OS: Q
- GLOBAL_ACTIONS_PANEL_SETTINGS = 1728;
-
- // OPEN: Settings > Display > Dark Theme
- // CATEGORY: SETTINGS
- // OS: Q
- // Note: Only shows up on first time toggle
- DIALOG_DARK_UI_INFO = 1740;
-
- // OPEN: Settings > About phone > Legal information > Google Play system update licenses
- // CATEGORY: SETTINGS
- // OS: Q
- MODULE_LICENSES_DASHBOARD = 1746;
-
- // OPEN: Settings > System > Gestures > System navigation > Info icon
- // CATEGORY: SETTINGS
- // OS: Q
- // Note: Info icon is visible only when gesture navigation is not available and disabled
- SETTINGS_GESTURE_NAV_NOT_AVAILABLE_DLG = 1747;
-
- // OPEN: Settings > System > Gestures > System navigation > Gear icon
- // CATEGORY: SETTINGS
- // OS: Q
- // Note: Gear icon is shown next to gesture navigation preference and opens sensitivity dialog
- SETTINGS_GESTURE_NAV_BACK_SENSITIVITY_DLG = 1748;
-
- // OPEN: Settings > System > Aware > Aware Display
- // CATEGORY: SETTINGS
- // OS: Q
- SETTINGS_AWARE_DISPLAY = 1750;
-
- // OPEN: Settings > System > Input & Gesture > tap gesture
- // CATEGORY: SETTINGS
- // OS: Q
- SETTINGS_GESTURE_TAP = 1751;
- // ---- End Q Constants, all Q constants go above this line ----
- // OPEN: Settings > Network & Internet > Wi-Fi > Click new network
- // CATEGORY: SETTINGS
- // OS: R
- SETTINGS_WIFI_CONFIGURE_NETWORK = 1800;
-
- // OPEN: Settings > Accessibility > Magnification
- // CATEGORY: SETTINGS
- // OS: R
- // Note: Shows up only when Magnify with shortcut is enabled
- // and under accessibility button mode.
- DIALOG_TOGGLE_SCREEN_MAGNIFICATION_ACCESSIBILITY_BUTTON = 1801;
-
- // OPEN: Settings > Accessibility > Magnification
- // CATEGORY: SETTINGS
- // OS: R
- // Note: Shows up only when Magnify with shortcut is enabled.
- // and under gesture navigation mode.
- DIALOG_TOGGLE_SCREEN_MAGNIFICATION_GESTURE_NAVIGATION = 1802;
-
- // OPEN: Settings > Security & screen lock -> Encryption & credentials > Install a certificate
- // CATEGORY: SETTINGS
- // OS: R
- INSTALL_CERTIFICATE_FROM_STORAGE = 1803;
-
- // OPEN: Settings > Apps and notifications > Special app access > notification access >
- // an app
- // CATEGORY: SETTINGS
- // OS: R
- NOTIFICATION_ACCESS_DETAIL = 1804;
-
- // OPEN: Settings > Developer Options > Platform Compat
- // CATEGORY: SETTINGS
- // OS: R
- SETTINGS_PLATFORM_COMPAT_DASHBOARD = 1805;
-
- // OPEN: Settings > Location -> Work profile tab
- // CATEGORY: SETTINGS
- // OS: R
- LOCATION_WORK = 1806;
-
- // OPEN: Settings > Account -> Work profile tab
- // CATEGORY: SETTINGS
- // OS: R
- ACCOUNT_WORK = 1807;
-
- // OPEN: Settings > Developer Options > Bug report handler
- // CATEGORY: SETTINGS
- // OS: R
- SETTINGS_BUGREPORT_HANDLER = 1808;
-
- // Panel for adding Wi-Fi networks
- // CATEGORY: SETTINGS
- // OS: R
- PANEL_ADD_WIFI_NETWORKS = 1809;
-
- // OPEN: Settings > Accessibility > Enable the feature or shortcut > Show tutorial dialog
- // CATEGORY: SETTINGS
- // OS: R
- DIALOG_ACCESSIBILITY_TUTORIAL = 1810;
-
- // OPEN: Settings > Accessibility > Edit shortcut dialog
- // CATEGORY: SETTINGS
- // OS: R
- DIALOG_ACCESSIBILITY_SERVICE_EDIT_SHORTCUT = 1812;
-
- // OPEN: Settings > Accessibility > Magnification > Edit shortcut dialog
- // CATEGORY: SETTINGS
- // OS: R
- DIALOG_MAGNIFICATION_EDIT_SHORTCUT = 1813;
-
- // OPEN: Settings > Accessibility > Color correction > Edit shortcut dialog
- // CATEGORY: SETTINGS
- // OS: R
- DIALOG_DALTONIZER_EDIT_SHORTCUT = 1814;
-
- // OPEN: Settings > Accessibility > Magnification > Settings
- // CATEGORY: SETTINGS
- // OS: R
- ACCESSIBILITY_MAGNIFICATION_SETTINGS = 1815;
-
- // OPEN: Settings > Accessibility > Magnification > Settings > Magnification area dialog
- // CATEGORY: SETTINGS
- // OS: R
- DIALOG_MAGNIFICATION_CAPABILITY = 1816;
-
- // OPEN: Settings > Accessibility > Color inversion
- // CATEGORY: SETTINGS
- // OS: R
- ACCESSIBILITY_COLOR_INVERSION_SETTINGS = 1817;
-
- // OPEN: Settings > Accessibility > Color inversion > Edit shortcut dialog
- // CATEGORY: SETTINGS
- // OS: R
- DIALOG_COLOR_INVERSION_EDIT_SHORTCUT = 1818;
-
- // OPEN: Settings > Accessibility > Captions preference > Captions appearance
- // CATEGORY: SETTINGS
- // OS: R
- ACCESSIBILITY_CAPTION_APPEARANCE = 1819;
-
- // OPEN: Settings > Accessibility > Captions preference > More options
- // CATEGORY: SETTINGS
- // OS: R
- ACCESSIBILITY_CAPTION_MORE_OPTIONS = 1820;
-
- // OPEN: Settings > Battery > Battery share
- // CATEGORY: SETTINGS
- // OS: R
- FUELGAUGE_BATTERY_SHARE = 1821;
-
- // OPEN: Settings -> Apps & Notifications -> Special App Access
- // CATEGORY: SETTINGS
- // OS: R
- MANAGE_EXTERNAL_STORAGE = 1822;
-
- // Open: Settings > DND > People
- // OS: R
- DND_PEOPLE = 1823;
-
- // OPEN: Settings > Apps and notifications > App info > one of any app > Open by default
- // > Open supported links
- // CATEGORY: SETTINGS
- // OS: R
- OPEN_SUPPORTED_LINKS = 1824;
-
- // OPEN: Settings > Display > Dark theme > Set start time dialog
- DIALOG_DARK_THEME_SET_START_TIME = 1825;
-
- // OPEN: Settings > Display > Dark theme > Set end time dialog
- DIALOG_DARK_THEME_SET_END_TIME = 1826;
-
- // OPEN: Settings -> Sound -> Vibrate for calls
- // CATEGORY: SETTINGS
- // OS: R
- VIBRATE_FOR_CALLS = 1827;
-
- // OPEN: Settings > Connected devices > Connection preferences > NFC
- // CATEGORY: SETTINGS
- // OS: R
- CONNECTION_DEVICE_ADVANCED_NFC = 1828;
-
- // OPEN: Settings -> Apps & Notifications -> Special App Access
- INTERACT_ACROSS_PROFILES = 1829;
-
- // OPEN: Settings > Notifications > (app or conversations) > conversation
- NOTIFICATION_CONVERSATION_SETTINGS = 1830;
-
- // OPEN: Settings > Developer Options > Wireless debugging
- // CATEGORY: SETTINGS
- // OS: R
- SETTINGS_ADB_WIRELESS = 1831;
-
- // OPEN: Settings > Developer Options > Wireless debugging
- // > Pair device with pairing code > Pairing code dialog
- // CATEGORY: SETTINGS
- // OS: R
- ADB_WIRELESS_DEVICE_PAIRING_DIALOG = 1832;
-
- // OPEN: Settings > Developer Options > Wireless debugging
- // > Pair device with QR code > Scan QR code > Pairing device dialog
- // CATEGORY: SETTINGS
- // OS: R
- ADB_WIRELESS_DEVICE_QR_PAIRING_DIALOG = 1833;
-
- // OPEN: Settings > apps & notifications > notifications > conversations
- // CATEGORY: SETTINGS
- // OS: R
- NOTIFICATION_CONVERSATION_LIST_SETTINGS = 1834;
-
- // Panel for Media Output Group operation
- // CATEGORY: SETTINGS
- // OS: R
- PANEL_MEDIA_OUTPUT_GROUP = 1835;
-
- // OPEN: Settings > Developer Options > Wireless debugging
- // > Click on paired device
- // CATEGORY: SETTINGS
- // OS: R
- ADB_WIRELESS_DEVICE_DETAILS = 1836;
-
- // Open: Settings > Sound > Do Not Disturb > People > Conversations
- // OS: R
- DND_CONVERSATIONS = 1837;
-
- // Open: Settings > Sound > Do Not Disturb > People > Calls
- // OS: R
- DND_CALLS = 1838;
-
- // Open: Settings > Sound > Do Not Disturb > People > Messages
- // OS: R
- DND_MESSAGES = 1839;
-
- // Open: Settings > Sound > Do Not Disturb > Apps > <Choose App>
- // OS: R
- DND_APPS_BYPASSING = 1840;
-
- // OPEN: Settings > Battery > Advanced battery option
- // CATEGORY: SETTINGS
- // OS: R
- FUELGAUGE_ADVANCED_BATTERY_OPTION = 1842;
-
- // OPEN: Settings > System > Gestures > Power menu
- // CATEGORY: SETTINGS
- // OS: R
- POWER_MENU_SETTINGS = 1843;
-
- // OPEN: Settings > System > Gestures > Power menu > Device controls
- // CATEGORY: SETTINGS
- // OS: R
- DEVICE_CONTROLS_SETTINGS = 1844;
-
- // OPEN: Settings > Sound > Media
- // CATEGORY: SETTINGS
- // OS: R
- MEDIA_CONTROLS_SETTINGS = 1845;
-}
diff --git a/core/proto/android/app/tvsettings_enums.proto b/core/proto/android/app/tvsettings_enums.proto
deleted file mode 100644
index 31c5dd6..0000000
--- a/core/proto/android/app/tvsettings_enums.proto
+++ /dev/null
@@ -1,941 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.app.tvsettings;
-option java_multiple_files = true;
-option java_outer_classname = "TvSettingsEnums";
-
-/** The performed action types */
-enum Action {
-
- /**
- * Denotes an unknown action. It is a filler that should generally be
- * avoided.
- */
- ACTION_UNKNOWN = 0;
-
- /**
- * Denotes that a TvSettings page is being focused. (Previewing a page in
- * two panel settings should NOT be considered as focusing on the page.)
- */
- PAGE_FOCUSED = 1;
-
- /**
- * Denotes that an entry (typically a leaf node of settings tree) is
- * selected by a user.
- */
- ENTRY_SELECTED = 2;
-
- /** Denotes that a toggle is clicked by a user. */
- TOGGLE_INTERACTED = 3;
-
- /**
- * Denotes that a TvSettings page is being focused in the forward direction
- * into the settings tree.
- */
- PAGE_FOCUSED_FORWARD = 4;
-
- /**
- * Denotes that a TvSettings page is being focused in the backward direction
- * up the settings tree.
- */
- PAGE_FOCUSED_BACKWARD = 5;
-
- /** Denotes that a toggle is turned on by a user. */
- TOGGLED_ON = 6;
-
- /** Denotes that a toggle is turned off by a user. */
- TOGGLED_OFF = 7;
-
-}
-
-/**
- * Ids for TvSettings focusable pages or actionable entries
- *
- * For details of the scheme, please refer to the "Definition of item_id" and
- * "Evolve of item_id" sections in go/atv-settings-ww-logging-design.
- */
-enum ItemId {
-
- option allow_alias = true;
-
- // Filler that should be avoided
- UNKNOWN = 0x00000000;
-
- // TvSettings
- TV_SETTINGS_ROOT = 0x00000001;
-
- // TvSettings unknown/default classic page
- PAGE_CLASSIC_DEFAULT = 0x00000002;
-
- // TvSettings unknown/default slice page
- PAGE_SLICE_DEFAULT = 0x00000003;
-
- // TvSettings unknown/default entry
- ENTRY_DEFAULT = 0x00000004;
-
- // TvSettings > Suggested settings entry
- SUGGESTED_SETTINGS = 0x00000010;
-
- // TvSettings > Quick Settings
- QUICK_SETTINGS = 0x00000011;
-
- // VERSION 1: Starting with Q
- // These are ordered in depth-first search manner.
-
- // TvSettings > Network & Internet
- NETWORK = 0x11000000;
-
- // TvSettings > Network & Internet > Wi-Fi (toggle)
- NETWORK_WIFI_ON_OFF = 0x11100000;
-
- // TvSettings > Network & Internet >
- // [A connected network entry in available networks list]
- NETWORK_AP_INFO = 0x11200000;
-
- // TvSettings > Network & Internet >
- // [A connected network entry in available networks list] > Proxy settings
- NETWORK_AP_INFO_PROXY_SETTINGS = 0x11210000;
-
- // TvSettings > Network & Internet >
- // [A connected network entry in available networks list] > IP settings
- NETWORK_AP_INFO_IP_SETTINGS = 0x11220000;
-
- // TvSettings > Network & Internet >
- // [A connected network entry in available networks list] > Forget network
- NETWORK_AP_INFO_FORGET_NETWORK = 0x11230000;
-
- // TvSettings > Network & Internet >
- // [A not connected network entry in available networks list]
- NETWORK_NOT_CONNECTED_AP = 0x11300000;
-
- // TvSettings > Network & Internet > See all
- NETWORK_SEE_ALL = 0x11400000;
-
- // TvSettings > Network & Internet > See fewer
- NETWORK_SEE_FEWER = 0x11500000;
-
- // TvSettings > Network & Internet > Add new network
- NETWORK_ADD_NEW_NETWORK = 0x11600000;
-
- // TvSettings > Network & Internet > Scanning always available (toggle)
- NETWORK_ALWAYS_SCANNING_NETWORKS = 0x11700000;
-
- // TvSettings > Network & Internet > Proxy settings (in Ethernet category)
- NETWORK_ETHERNET_PROXY_SETTINGS = 0x11800000;
-
- // TvSettings > Network & Internet > IP settings (in Ethernet category)
- NETWORK_ETHERNET_IP_SETTINGS = 0x11900000;
-
- // TvSettings > Account & Sign In (Slice)
- ACCOUNT_SLICE = 0x12000000;
-
- // TvSettings > Account & Sign In (Slice) > [A regular account]
- ACCOUNT_SLICE_REG_ACCOUNT = 0x12100000;
-
- // TvSettings > Account & Sign In (Slice) > [A regular account] >
- // Google Assistant
- ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT = 0x12130000;
-
- // TvSettings > Account & Sign In (Slice) > [A regular account] >
- // Google Assistant > SafeSearch filter (toggle)
- ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SAFE_SEARCH = 0x12131000;
-
- // TvSettings > Account & Sign In (Slice) > [A regular account] >
- // Google Assistant > Block offensive words (toggle)
- ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_BLOCK_OFFENSIVE = 0x12132000;
-
- // TvSettings > Account & Sign In (Slice) > [A regular account] >
- // Google Assistant > Searchable apps
- ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SEARCHABLE_APPS = 0x12133000;
-
- // TvSettings > Account & Sign In (Slice) > [A regular account] >
- // Google Assistant > Personal results (toggle)
- ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_PERSONAL_RESULTS = 0x12134000;
-
- // Reserving [0x12140000, 0x12190000] for possible future settings
-
- // TvSettings > Account & Sign In (Slice) > [A regular account] > Remove
- ACCOUNT_SLICE_REG_ACCOUNT_REMOVE = 0x121A0000;
-
- // Reserving [0x12200000, 0x12900000] for possible future settings
-
- // TvSettings > Account & Sign In (Slice) > Add account...
- ACCOUNT_SLICE_ADD_ACCOUNT = 0x12A00000;
-
- // TvSettings > Account & Sign In (Classic)
- ACCOUNT_CLASSIC = 0x13000000;
-
- // TvSettings > Account & Sign In (Classic) > [A regular account]
- ACCOUNT_CLASSIC_REG_ACCOUNT = 0x13100000;
-
- // TvSettings > Account & Sign In (Classic) > [A regular account] > Sync now
- ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_NOW = 0x13110000;
-
- // TvSettings > Account & Sign In (Classic) > [A regular account] >
- // Remove account
- ACCOUNT_CLASSIC_REG_ACCOUNT_REMOVE_ACCOUNT = 0x13120000;
-
- // TvSettings > Account & Sign In (Classic) > [A regular account] >
- // [Choose synced apps] Calendar (toggle)
- ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_CALENDAR = 0x13130000;
-
- // TvSettings > Account & Sign In (Classic) > [A regular account] >
- // [Choose synced apps] Contacts (toggle)
- ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_CONTACTS = 0x13140000;
-
- // TvSettings > Account & Sign In (Classic) > [A regular account] >
- // [Choose synced apps] Google Play Movies & TV (toggle)
- ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_GPMT = 0x13150000;
-
- // TvSettings > Account & Sign In (Classic) > [A regular account] >
- // [Choose synced apps] Google Play Music (toggle)
- ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_GPM = 0x13160000;
-
- // TvSettings > Account & Sign In (Classic) > [A regular account] >
- // [Choose synced apps] People details (toggle)
- ACCOUNT_CLASSIC_REG_ACCOUNT_SYNC_PEOPLE = 0x13170000;
-
- // Reserving [0x13200000, 0x13900000] for possible future settings
-
- // TvSettings > Account & Sign In (Classic) > Add account
- ACCOUNT_CLASSIC_ADD_ACCOUNT = 0x13A00000;
-
- // TvSettings > Display & Sound
- DISPLAY_SOUND = 0x15000000;
-
- // TvSettings > Display & Sound > Advanced display settings
- DISPLAY_SOUND_ADVANCED_DISPLAY = 0x15100000;
-
- // TvSettings > Display & Sound > Advanced display settings >
- // Allow game mode (toggle)
- DISPLAY_SOUND_ADVANCED_DISPLAY_GAME_MODE = 0x15110000;
-
- // TvSettings > Display & Sound > System sounds (toggle)
- DISPLAY_SOUND_SYSTEM_SOUNDS = 0x15200000;
-
- // TvSettings > Display & Sound > Advanced sound settings
- DISPLAY_SOUND_ADVANCED_SOUNDS = 0x15300000;
-
- // TvSettings > Display & Sound > Advanced sound settings > Select formats
- DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS = 0x15310000;
-
- // TvSettings > Display & Sound > Advanced sound settings > Select formats >
- // Auto...
- DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS_AUTO = 0x15311000;
-
- // TvSettings > Display & Sound > Advanced sound settings > Select formats >
- // None...
- DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS_NONE = 0x15312000;
-
- // TvSettings > Display & Sound > Advanced sound settings > Select formats >
- // Manual...
- DISPLAY_SOUND_ADVANCED_SOUNDS_SELECT_FORMATS_MANUAL = 0x15313000;
-
- // TvSettings > Display & Sound > Advanced sound settings >
- // Dolby AC-4 (toggle)
- DISPLAY_SOUND_ADVANCED_SOUNDS_DAC4 = 0x15320000;
-
- // TvSettings > Display & Sound > Advanced sound settings >
- // Dolby Atmos in Dolby Digital Plus (toggle)
- DISPLAY_SOUND_ADVANCED_SOUNDS_DADDP = 0x15330000;
-
- // TvSettings > Display & Sound > Advanced sound settings >
- // Dolby Digital (toggle)
- DISPLAY_SOUND_ADVANCED_SOUNDS_DD = 0x15340000;
-
- // TvSettings > Display & Sound > Advanced sound settings >
- // Dolby Digital Plus (toggle)
- DISPLAY_SOUND_ADVANCED_SOUNDS_DDP = 0x15350000;
-
- // TvSettings > Display & Sound > Advanced sound settings > DTS (toggle)
- DISPLAY_SOUND_ADVANCED_SOUNDS_DTS = 0x15360000;
-
- // TvSettings > Display & Sound > Advanced sound settings > DTS-HD (toggle)
- DISPLAY_SOUND_ADVANCED_SOUNDS_DTSHD = 0x15370000;
-
- // TvSettings > Display & Sound > Advanced sound settings > AAC (toggle)
- DISPLAY_SOUND_ADVANCED_SOUNDS_AAC = 0x15380000;
-
- // TvSettings > Display & Sound > Advanced sound settings >
- // Dolby TrueHD (toggle)
- DISPLAY_SOUND_ADVANCED_SOUNDS_DTHD = 0x15390000;
-
- // TvSettings > Apps
- APPS = 0x16000000;
-
- // TvSettings > Apps > See all apps
- APPS_ALL_APPS = 0x16100000;
-
- // TvSettings > Apps > See all apps > [An app entry]
- APPS_ALL_APPS_APP_ENTRY = 0x16110000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Open
- APPS_ALL_APPS_APP_ENTRY_OPEN = 0x16111000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Force stop
- APPS_ALL_APPS_APP_ENTRY_FORCE_STOP = 0x16112000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Uninstall
- APPS_ALL_APPS_APP_ENTRY_UNINSTALL = 0x16113000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Uninstall updates
- APPS_ALL_APPS_APP_ENTRY_UNINSTALL_UPDATES = 0x16114000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Disable
- APPS_ALL_APPS_APP_ENTRY_DISABLE = 0x16115000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Clear data
- APPS_ALL_APPS_APP_ENTRY_CLEAR_DATA = 0x16116000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Clear cache
- APPS_ALL_APPS_APP_ENTRY_CLEAR_CACHE = 0x16117000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Clear defaults
- APPS_ALL_APPS_APP_ENTRY_CLEAR_DEFAULTS = 0x16118000;
-
- // TvSettings > Apps > See all apps > [An app entry] >
- // Notifications (toggle)
- APPS_ALL_APPS_APP_ENTRY_NOTIFICATIONS = 0x16119000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Permissions
- APPS_ALL_APPS_APP_ENTRY_PERMISSIONS = 0x1611A000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Enable
- APPS_ALL_APPS_APP_ENTRY_ENABLE = 0x1611B000;
-
- // TvSettings > Apps > See all apps > [An app entry] > Open source licenses
- APPS_ALL_APPS_APP_ENTRY_LICENSES = 0x1611C000;
-
- // TvSettings > Apps > See all apps > Show system apps
- APPS_ALL_APPS_SHOW_SYSTEM_APPS = 0x16120000;
-
- // TvSettings > Apps > App permissions
- APPS_APP_PERMISSIONS = 0x16200000;
-
- // TvSettings > Apps > App permission > Body sensors
- APPS_APP_PERMISSIONS_BODY_SENSORS = 0x16210000;
-
- // TvSettings > Apps > App permission > Calendar
- APPS_APP_PERMISSIONS_CALENDAR = 0x16220000;
-
- // TvSettings > Apps > App permission > Call logs
- APPS_APP_PERMISSIONS_CALL_LOGS = 0x16230000;
-
- // TvSettings > Apps > App permission > Camera
- APPS_APP_PERMISSIONS_CAMERA = 0x16240000;
-
- // TvSettings > Apps > App permission > Contacts
- APPS_APP_PERMISSIONS_CONTACTS = 0x16250000;
-
- // TvSettings > Apps > App permission > Location
- APPS_APP_PERMISSIONS_LOCATION = 0x16260000;
-
- // TvSettings > Apps > App permission > Microphone
- APPS_APP_PERMISSIONS_MICROPHONE = 0x16270000;
-
- // TvSettings > Apps > App permission > Phone
- APPS_APP_PERMISSIONS_PHONE = 0x16280000;
-
- // TvSettings > Apps > App permission > Physical activity
- APPS_APP_PERMISSIONS_PHYSICAL_ACTIVITY = 0x16290000;
-
- // TvSettings > Apps > App permission > SMS
- APPS_APP_PERMISSIONS_SMS = 0x162A0000;
-
- // TvSettings > Apps > App permission > Storage
- APPS_APP_PERMISSIONS_STORAGE = 0x162B0000;
-
- // TvSettings > Apps > App permission > Additional permissions
- APPS_APP_PERMISSIONS_ADDITIONAL = 0x162C0000;
-
- // TvSettings > Apps > App permission > Additional permissions >
- // real all TV listings
- APPS_APP_PERMISSIONS_ADDITIONAL_READ_TV_LISTINGS = 0x162C1000;
-
- // TvSettings > Apps > App permission > Additional permissions >
- // real instant messages
- APPS_APP_PERMISSIONS_ADDITIONAL_READ_INSTANT_MESSAGES = 0x162C2000;
-
- // TvSettings > Apps > App permission > Additional permissions >
- // write instant messages
- APPS_APP_PERMISSIONS_ADDITIONAL_WRITE_INSTANT_MESSAGES = 0x162C3000;
-
- // TvSettings > Apps > Special app access
- APPS_SPECIAL_APP_ACCESS = 0x16300000;
-
- // TvSettings > Apps > Special app access > Energy optimization
- APPS_SPECIAL_APP_ACCESS_ENERGY_OPTIMIZATION = 0x16310000;
-
- // TvSettings > Apps > Special app access > Usage access
- APPS_SPECIAL_APP_ACCESS_USAGE_ACCESS = 0x16320000;
-
- // TvSettings > Apps > Special app access > Notification access
- APPS_SPECIAL_APP_ACCESS_NOTIFICATION_ACCESS = 0x16330000;
-
- // TvSettings > Apps > Special app access > Display over other apps
- APPS_SPECIAL_APP_ACCESS_DISPLAY_OVER_OTHERS = 0x16340000;
-
- // TvSettings > Apps > Special app access > Modify system settings
- APPS_SPECIAL_APP_ACCESS_MODIFY_SYSTEM_SETTINGS = 0x16350000;
-
- // TvSettings > Apps > Special app access > Picture-in-picture
- APPS_SPECIAL_APP_ACCESS_PICTURE_IN_PICTURE = 0x16360000;
-
- // TvSettings > Apps > Security & restrictions
- APPS_SECURITY_RESTRICTIONS = 0x16400000;
-
- // TvSettings > Apps > Security & restrictions > Unknown sources
- APPS_SECURITY_RESTRICTIONS_UNKNOWN_SOURCES = 0x16410000;
-
- // TvSettings > Apps > Security & restrictions > Verify apps (toggle)
- APPS_SECURITY_RESTRICTIONS_VERIFY_APPS = 0x16420000;
-
- // TvSettings > Apps > Security & restrictions > Create restricted profile
- APPS_SECURITY_RESTRICTIONS_CREATE_PROFILE = 0x16430000;
-
- // TvSettings > Apps > Security & restrictions > Enter restricted profile
- APPS_SECURITY_RESTRICTIONS_ENTER_PROFILE = 0x16440000;
-
- // TvSettings > Apps > Security & restrictions >
- // Allowed apps (Restricted Profile)
- APPS_SECURITY_RESTRICTIONS_PROFILE_ALLOWED_APPS = 0x16450000;
-
- // TvSettings > Apps > Security & restrictions >
- // Change pin (Restricted Profile)
- APPS_SECURITY_RESTRICTIONS_PROFILE_CHANGE_PIN = 0x16460000;
-
- // TvSettings > Apps > Security & restrictions >
- // Delete restricted profile
- APPS_SECURITY_RESTRICTIONS_DELETE_PROFILE = 0x16470000;
-
- // TvSettings > Apps > Security & restrictions >
- // Exit restricted profile
- APPS_SECURITY_RESTRICTIONS_EXIT_PROFILE = 0x16480000;
-
- // TvSettings > System (same as TvSettings > Device Preferences)
- SYSTEM = 0x17000000;
-
- // TvSettings > System > About
- SYSTEM_ABOUT = 0x17100000;
-
- // TvSettings > System > System update
- SYSTEM_ABOUT_SYSTEM_UPDATE = 0x17110000;
-
- // TvSettings > System > Device name
- SYSTEM_ABOUT_DEVICE_NAME = 0x17120000;
-
- // TvSettings > System > Factory reset
- SYSTEM_ABOUT_FACTORY_RESET = 0x17130000;
-
- // TvSettings > System > Status
- SYSTEM_ABOUT_STATUS = 0x17140000;
-
- // TvSettings > System > Legal information
- SYSTEM_ABOUT_LEGAL_INFO = 0x17150000;
-
- // TvSettings > System > Legal information > Open source licenses
- SYSTEM_ABOUT_LEGAL_INFO_OPEN_SOURCE = 0x17151000;
-
- // TvSettings > System > Legal information > Google legal
- SYSTEM_ABOUT_LEGAL_INFO_GOOGLE_LEGAL = 0x17152000;
-
- // TvSettings > System > Legal information > System WebView licenses
- SYSTEM_ABOUT_LEGAL_INFO_SYSTEM_WEBVIEW = 0x17153000;
-
- // TvSettings > System > Build
- SYSTEM_ABOUT_BUILD = 0x17160000;
-
- // TvSettings > System > Date & time
- SYSTEM_DATE_TIME = 0x17200000;
-
- // TvSettings > System > Date & time > Automatic data & time
- SYSTEM_DATE_TIME_AUTOMATIC = 0x17210000;
-
- // TvSettings > System > Date & time > Automatic data & time >
- // Use network-provided time
- SYSTEM_DATE_TIME_AUTOMATIC_USE_NETWORK_TIME = 0x17211000;
-
- // TvSettings > System > Date & time > Automatic data & time > Off
- SYSTEM_DATE_TIME_AUTOMATIC_OFF = 0x17212000;
-
- // TvSettings > System > Date & time > Set date
- SYSTEM_DATE_TIME_SET_DATE = 0x17220000;
-
- // TvSettings > System > Date & time > Set time
- SYSTEM_DATE_TIME_SET_TIME = 0x17230000;
-
- // TvSettings > System > Date & time > Set time zone
- SYSTEM_DATE_TIME_SET_TIME_ZONE = 0x17240000;
-
- // TvSettings > System > Date & time > Set time zone > [A time zone button]
- SYSTEM_DATE_TIME_SET_TIME_ZONE_BUTTON = 0x17241000;
-
- // TvSettings > System > Date & time > Use 24-hour format (toggle)
- SYSTEM_DATE_TIME_USE_24_HOUR_FORMAT = 0x17250000;
-
- // TvSettings > System > Language
- SYSTEM_LANGUAGE = 0x17300000;
-
- // TvSettings > System > Language > [A language button]
- SYSTEM_LANGUAGE_BUTTON = 0x17310000;
-
- // TvSettings > System > Keyboard
- SYSTEM_KEYBOARD = 0x17400000;
-
- // TvSettings > System > Keyboard > Current keyboard
- SYSTEM_KEYBOARD_CURRENT_KEYBOARD = 0x17410000;
-
- // TvSettings > System > Keyboard > Gboard Settings
- SYSTEM_KEYBOARD_GBOARD_SETTINGS = 0x17420000;
-
- // TvSettings > System > Keyboard > Gboard Settings > Languages
- SYSTEM_KEYBOARD_GBOARD_SETTINGS_LANGUAGES = 0x17421000;
-
- // TvSettings > System > Keyboard > Gboard Settings > Terms of services
- SYSTEM_KEYBOARD_GBOARD_SETTINGS_TOS = 0x17422000;
-
- // TvSettings > System > Keyboard > Gboard Settings > Privacy policy
- SYSTEM_KEYBOARD_GBOARD_SETTINGS_PRIVACY_POLICY = 0x17423000;
-
- // TvSettings > System > Keyboard > Gboard Settings > Open source licenses
- SYSTEM_KEYBOARD_GBOARD_SETTINGS_OPEN_SOURCE = 0x17424000;
-
- // TvSettings > System > Keyboard > Gboard Settings >
- // Share usage statistics (toggle)
- SYSTEM_KEYBOARD_GBOARD_SETTINGS_SHARE_USAGE_STATS = 0x17425000;
-
- // TvSettings > System > Keyboard > Manage keyboards
- SYSTEM_KEYBOARD_MANAGE_KEYBOARDS = 0x17430000;
-
- // TvSettings > System > Storage
- SYSTEM_STORAGE = 0x17500000;
-
- // TvSettings > System > Internal shared storage
- SYSTEM_STORAGE_INTERNAL_STORAGE = 0x17510000;
-
- // TvSettings > System > Internal shared storage > Apps
- SYSTEM_STORAGE_INTERNAL_STORAGE_APPS = 0x17511000;
-
- // TvSettings > System > Internal shared storage >
- // Cached data (brings up "Clear cached data?" dialog upon click)
- SYSTEM_STORAGE_INTERNAL_STORAGE_CACHED = 0x17512000;
-
- // TvSettings > System > Energy saver
- SYSTEM_ENERGYSAVER = 0x17700000;
-
- // TvSettings > System > Energy saver > Turn off display after
- SYSTEM_ENERGYSAVER_START_DELAY = 0x17710000;
-
- // TvSettings > System > Energy saver > Turn off display after > 15 minutes
- SYSTEM_ENERGYSAVER_START_DELAY_15M = 0x17711000;
-
- // TvSettings > System > Energy saver > Turn off display after > 30 minutes
- SYSTEM_ENERGYSAVER_START_DELAY_30M = 0x17712000;
-
- // TvSettings > System > Energy saver > Turn off display after > 1 hour
- SYSTEM_ENERGYSAVER_START_DELAY_1H = 0x17713000;
-
- // TvSettings > System > Energy saver > Turn off display after > 3 hours
- SYSTEM_ENERGYSAVER_START_DELAY_3H = 0x17714000;
-
- // TvSettings > System > Energy saver > Turn off display after > 6 hours
- SYSTEM_ENERGYSAVER_START_DELAY_6H = 0x17715000;
-
- // TvSettings > System > Energy saver > Turn off display after > 12 hours
- SYSTEM_ENERGYSAVER_START_DELAY_12H = 0x17716000;
-
- // TvSettings > System > Energy saver > Turn off display after > Never
- SYSTEM_ENERGYSAVER_START_DELAY_NEVER = 0x17717000;
-
- // TvSettings > System > Accessibility
- SYSTEM_A11Y = 0x17800000;
-
- // TvSettings > System > Accessibility > Captions
- SYSTEM_A11Y_CAPTIONS = 0x17810000;
-
- // TvSettings > System > Accessibility > Captions > Display (toggle)
- SYSTEM_A11Y_CAPTIONS_DISPLAY_ON_OFF = 0x17811000;
-
- // TvSettings > System > Accessibility > Captions > Language
- SYSTEM_A11Y_CAPTIONS_LANGUAGE = 0x17812000;
-
- // TvSettings > System > Accessibility > Captions > Language > [A language]
- SYSTEM_A11Y_CAPTIONS_LANGUAGE_BUTTON = 0x17812100;
-
- // TvSettings > System > Accessibility > Captions > Text size
- SYSTEM_A11Y_CAPTIONS_TEXT_SIZE = 0x17813000;
-
- // TvSettings > System > Accessibility > Captions > Text size > Very small
- SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_VERY_SMALL = 0x17813100;
-
- // TvSettings > System > Accessibility > Captions > Text size > Small
- SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_SMALL = 0x17813200;
-
- // TvSettings > System > Accessibility > Captions > Text size > Normal
- SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_NORMAL = 0x17813300;
-
- // TvSettings > System > Accessibility > Captions > Text size > Large
- SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_LARGE = 0x17813400;
-
- // TvSettings > System > Accessibility > Captions > Text size > Very large
- SYSTEM_A11Y_CAPTIONS_TEXT_SIZE_VERY_LARGE = 0x17813500;
-
- // TvSettings > System > Accessibility > Captions >
- // White on black (radio button)
- SYSTEM_A11Y_CAPTIONS_WHITE_ON_BLACK = 0x17814000;
-
- // TvSettings > System > Accessibility > Captions >
- // Black on white (radio button)
- SYSTEM_A11Y_CAPTIONS_BLACK_ON_WHITE = 0x17815000;
-
- // TvSettings > System > Accessibility > Captions >
- // Yellow on black (radio button)
- SYSTEM_A11Y_CAPTIONS_YELLOW_ON_BLACK = 0x17816000;
-
- // TvSettings > System > Accessibility > Captions >
- // Yellow on blue (radio button)
- SYSTEM_A11Y_CAPTIONS_YELLOW_ON_BLUE = 0x17817000;
-
- // TvSettings > System > Accessibility > Captions > Custom
- SYSTEM_A11Y_CAPTIONS_CUSTOM = 0x17818000;
-
- // TvSettings > System > Accessibility > Captions > Custom > Font family
- SYSTEM_A11Y_CAPTIONS_CUSTOM_FONT = 0x17818100;
-
- // TvSettings > System > Accessibility > Captions > Custom > Text color
- SYSTEM_A11Y_CAPTIONS_CUSTOM_TEXT_COLOR = 0x17818200;
-
- // TvSettings > System > Accessibility > Captions > Custom > Text opacity
- SYSTEM_A11Y_CAPTIONS_CUSTOM_TEXT_OPACITY = 0x17818300;
-
- // TvSettings > System > Accessibility > Captions > Custom > Edge type
- SYSTEM_A11Y_CAPTIONS_CUSTOM_EDGE_TYPE = 0x17818400;
-
- // TvSettings > System > Accessibility > Captions > Custom > Edge color
- SYSTEM_A11Y_CAPTIONS_CUSTOM_EDGE_COLOR = 0x17818500;
-
- // TvSettings > System > Accessibility > Captions > Custom >
- // Show background (toggle)
- SYSTEM_A11Y_CAPTIONS_SHOW_BACKGROUND = 0x17818600;
-
- // TvSettings > System > Accessibility > Captions > Custom >
- // Background color
- SYSTEM_A11Y_CAPTIONS_BACKGROUND_COLOR = 0x17818700;
-
- // TvSettings > System > Accessibility > Captions > Custom >
- // Background opacity
- SYSTEM_A11Y_CAPTIONS_BACKGROUND_OPACITY = 0x17818800;
-
- // TvSettings > System > Accessibility > Captions > Custom >
- // Show window (toggle)
- SYSTEM_A11Y_CAPTIONS_SHOW_WINDOW = 0x17818900;
-
- // TvSettings > System > Accessibility > Captions > Custom > Window color
- SYSTEM_A11Y_CAPTIONS_WINDOW_COLOR = 0x17818A00;
-
- // TvSettings > System > Accessibility > Captions > Custom > Window opacity
- SYSTEM_A11Y_CAPTIONS_WINDOW_OPACITY = 0x17818B00;
-
- // TvSettings > System > Accessibility > High contrast text (toggle)
- SYSTEM_A11Y_HIGH_CONTRAST_TEXT = 0x17820000;
-
- // TvSettings > System > Accessibility > Text to speech
- SYSTEM_A11Y_TTS = 0x17830000;
-
- // TvSettings > System > Accessibility > Text to speech > [Select an engine]
- SYSTEM_A11Y_TTS_ENGINE_SELECT = 0x17831000;
-
- // TvSettings > System > Accessibility > Text to speech >
- // Engine configuration
- SYSTEM_A11Y_TTS_ENGINE_CONFIG = 0x17832000;
-
- // TvSettings > System > Accessibility > Text to speech >
- // Engine configuration > Language
- SYSTEM_A11Y_TTS_ENGINE_CONFIG_LANGUAGE = 0x17832100;
-
- // TvSettings > System > Accessibility > Text to speech >
- // Engine configuration > Language > Button
- SYSTEM_A11Y_TTS_ENGINE_CONFIG_LANGUAGE_CHOOSE_LANGUAGE = 0x17832110;
-
- // TvSettings > System > Accessibility > Text to speech >
- // Engine configuration > Settings for Google Text-to-speech Engine
- SYSTEM_A11Y_TTS_ENGINE_CONFIG_SETTINGS_GTTS_ENGINE = 0x17832200;
-
- // TvSettings > System > Accessibility > Text to speech >
- // Engine configuration > Install voice data
- SYSTEM_A11Y_TTS_ENGINE_CONFIG_INSTALL_VOICE_DATA = 0x17832300;
-
- // TvSettings > System > Accessibility > Text to speech > Speech rate
- SYSTEM_A11Y_TTS_SPEECH_RATE = 0x17833000;
-
- // TvSettings > System > Accessibility > Text to speech >
- // Listen to an example
- SYSTEM_A11Y_TTS_LISTEN_EXAMPLE = 0x17834000;
-
- // TvSettings > System > Accessibility > Accessibility shortcut
- SYSTEM_A11Y_SHORTCUT = 0x17840000;
-
- // TvSettings > System > Accessibility > Accessibility shortcut >
- // Enable (toggle)
- SYSTEM_A11Y_SHORTCUT_ON_OFF = 0x17841000;
-
- // TvSettings > System > Accessibility > Accessibility shortcut >
- // Shortcut services
- SYSTEM_A11Y_SHORTCUT_SERVICE = 0x17842000;
-
- // TvSettings > System > Accessibility > TalkBack
- SYSTEM_A11Y_TALKBACK = 0x17850000;
-
- // TvSettings > System > Accessibility > TalkBack > Enable (toggle)
- SYSTEM_A11Y_TALKBACK_ON_OFF = 0x17851000;
-
- // TvSettings > System > Accessibility > TalkBack > Configuration
- SYSTEM_A11Y_TALKBACK_CONFIG = 0x17852000;
-
- // TvSettings > System > Accessibility > Accessibility Menu
- SYSTEM_A11Y_A11Y_MENU = 0x17860000;
-
- // TvSettings > System > Accessibility > Accessibility Menu >
- // Enable (toggle)
- SYSTEM_A11Y_A11Y_MENU_ON_OFF = 0x17861000;
-
- // TvSettings > System > Accessibility > Accessibility Menu > Configuration
- SYSTEM_A11Y_A11Y_MENU_CONFIG = 0x17862000;
-
- // TvSettings > System > Accessibility > Select to Speak
- SYSTEM_A11Y_STS = 0x17870000;
-
- // TvSettings > System > Accessibility > Select to Speak > Enable (toggle)
- SYSTEM_A11Y_STS_ON_OFF = 0x17871000;
-
- // TvSettings > System > Accessibility > Select to Speak > Configuration
- SYSTEM_A11Y_STS_CONFIG = 0x17872000;
-
- // TvSettings > System > Accessibility > Switch Access
- SYSTEM_A11Y_SWITCH_ACCESS = 0x17880000;
-
- // TvSettings > System > Accessibility > Switch Access > Enable (Toggle)
- SYSTEM_A11Y_SWITCH_ACCESS_ON_OFF = 0x17881000;
-
- // TvSettings > System > Accessibility > Switch Access > Configuration
- SYSTEM_A11Y_SWITCH_ACCESS_CONFIG = 0x17882000;
-
- // TvSettings > System > Reboot
- SYSTEM_REBOOT = 0x17900000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings)
- PREFERENCES_HOME_SCREEN = 0x17A00000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Customize channels
- PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS = 0x17A10000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Customize channels > Play Next
- PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN = 0x17A11000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Customize channels > Play Next > On (toggle)
- PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_ON_OFF = 0x17A11100;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Customize channels > Play Next > Google Play Movies & TV (toggle)
- PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_GPMT = 0x17A11200;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Customize channels > Play Next > Google Play Music (toggle)
- PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_GPM = 0x17A11300;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Customize channels > Play Next > Promotional channels (toggle)
- PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PN_PROMOTIONAL = 0x17A11400;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Customize channels > Home screen channels
- PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_HOME_SCREEN = 0x17A12000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Customize channels > Promotional channels
- PREFERENCES_HOME_SCREEN_CUSTOMIZE_CHANNELS_PROMOTIONAL = 0x17A13000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Enable video previews (toggle)
- PREFERENCES_HOME_SCREEN_VIDEO_PREVIEWS = 0x17A20000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Enable audio previews (toggle)
- PREFERENCES_HOME_SCREEN_AUDIO_PREVIEWS = 0x17A30000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Reorder apps
- PREFERENCES_HOME_SCREEN_REORDER_APPS = 0x17A40000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Reorder games
- PREFERENCES_HOME_SCREEN_REORDER_GAMES = 0x17A50000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Android TV Home open source licenses
- PREFERENCES_HOME_SCREEN_ATVH_OPEN_SOURCE = 0x17A60000;
-
- // TvSettings > Device Preferences > Home screen (in classic TvSettings) >
- // Android TV Core Services open source licenses
- PREFERENCES_HOME_SCREEN_ATVCS_OPEN_SOURCE = 0x17A70000;
-
- // TvSettings > Device Preferences > Google Assistant
- PREFERENCES_ASSISTANT = 0x17B00000;
-
- // TvSettings > Device Preferences > Google Assistant > Accounts
- PREFERENCES_ASSISTANT_ACCOUNTS = 0x17B10000;
-
- // TvSettings > Device Preferences > Google Assistant > Accept permissions
- PREFERENCES_ASSISTANT_ACCEPT_PERMISSIONS = 0x17B20000;
-
- // TvSettings > Device Preferences > Google Assistant > View permissions
- PREFERENCES_ASSISTANT_VIEW_PERMISSIONS = 0x17B30000;
-
- // TvSettings > Device Preferences > Google Assistant > Searchable apps
- // (aliasing ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SEARCHABLE_APPS)
- PREFERENCES_ASSISTANT_SEARCHABLE_APPS = 0x12133000;
-
- // TvSettings > Device Preferences > Google Assistant > SafeSearch filter
- // (aliasing ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_SAFE_SEARCH)
- PREFERENCES_ASSISTANT_SAFESEARCH_FILTER = 0x12131000;
-
- // TvSettings > Device Preferences > Google Assistant >
- // Block offensive words
- // (aliasing ACCOUNT_SLICE_REG_ACCOUNT_ASSISTANT_BLOCK_OFFENSIVE)
- PREFERENCES_ASSISTANT_BLOCK_OFFENSIVE = 0x12132000;
-
- // TvSettings > Device Preferences > Google Assistant > Open source licenses
- PREFERENCES_ASSISTANT_OPEN_SOURCE = 0x17B40000;
-
- // TvSettings > Device Preferences > Chromecast Android Shell
- PREFERENCES_CHROMECAST_SHELL = 0x17C00000;
-
- // TvSettings > Device Preferences > Chromecast Android Shell >
- // Open source licenses
- PREFERENCES_CHROMECAST_SHELL_OPEN_SOURCE = 0x17C10000;
-
- // TvSettings > Device Preferences > Screen saver
- PREFERENCES_SCREENSAVER = 0x17D00000;
-
- // TvSettings > Device Preferences > Screen saver > Screen saver (chooser)
- PREFERENCES_SCREENSAVER_CHOOSER = 0x17D10000;
-
- // TvSettings > Device Preferences > Screen saver > Screen saver (chooser) >
- // Turn screen off
- PREFERENCES_SCREENSAVER_CHOOSER_SCREEN_OFF = 0x17D11000;
-
- // TvSettings > Device Preferences > Screen saver > Screen saver (chooser) >
- // Backdrop
- PREFERENCES_SCREENSAVER_CHOOSER_BACKDROP = 0x17D12000;
-
- // TvSettings > Device Preferences > Screen saver > Screen saver (chooser) >
- // Colors
- PREFERENCES_SCREENSAVER_CHOOSER_COLORS = 0x17D13000;
-
- // TvSettings > Device Preferences > Screen saver > When to start
- PREFERENCES_SCREENSAVER_START_DELAY = 0x17D20000;
-
- // TvSettings > Device Preferences > Screen saver > When to start >
- // 5 minutes
- PREFERENCES_SCREENSAVER_START_DELAY_5M = 0x17D21000;
-
- // TvSettings > Device Preferences > Screen saver > When to start >
- // 15 minutes
- PREFERENCES_SCREENSAVER_START_DELAY_15M = 0x17D22000;
-
- // TvSettings > Device Preferences > Screen saver > When to start >
- // 30 minutes
- PREFERENCES_SCREENSAVER_START_DELAY_30M = 0x17D23000;
-
- // TvSettings > Device Preferences > Screen saver > When to start >
- // 1 hour
- PREFERENCES_SCREENSAVER_START_DELAY_1H = 0x17D24000;
-
- // TvSettings > Device Preferences > Screen saver > When to start >
- // 2 hours
- PREFERENCES_SCREENSAVER_START_DELAY_2H = 0x17D25000;
-
- // TvSettings > Device Preferences > Screen saver > Start now
- PREFERENCES_SCREENSAVER_START_NOW = 0x17D30000;
-
- // TvSettings > Connected Devices (Slice)
- CONNECTED_SLICE = 0x18000000;
-
- // TvSettings > Connected Devices (Slice) > Connect remote or headphones
- CONNECTED_SLICE_CONNECT_NEW_DEVICES = 0x18100000;
-
- // TvSettings > Connected Devices (Slice) > [A connected device]
- CONNECTED_SLICE_DEVICE_ENTRY = 0x18200000;
-
- // TvSettings > Connected Devices (Slice) > [A connected device] >
- // Remote update
- CONNECTED_SLICE_DEVICE_ENTRY_UPDATE = 0x18210000;
-
- // TvSettings > Connected Devices (Slice) > [A connected device] > Rename
- CONNECTED_SLICE_DEVICE_ENTRY_RENAME = 0x18220000;
-
- // TvSettings > Connected Devices (Slice) > [A connected device] > Forget
- CONNECTED_SLICE_DEVICE_ENTRY_FORGET = 0x18230000;
-
- // TvSettings > Connected Devices (Slice) > HDMI-CEC
- CONNECTED_SLICE_HDMICEC = 0x18300000;
-
- // TvSettings > Connected Devices (Slice) > HDMI-CEC > Enable (toggle)
- CONNECTED_SLICE_HDMICEC_ON_OFF = 0x18310000;
-
- // TvSettings > Connected Devices (aliasing CONNECTED_SLICE)
- CONNECTED_CLASSIC = 0x18000000;
-
- // TvSettings > Connected Devices > Connect remote
- // (aliasing CONNECTED_SLICE_CONNECT_NEW_DEVICES)
- CONNECTED_CLASSIC_CONNECT_REMOTE = 0x18100000;
-
- // TvSettings > Connected Devices > [A connected device]
- // (aliasing CONNECTED_SLICE_DEVICE_ENTRY)
- CONNECTED_CLASSIC_DEVICE_ENTRY = 0x18200000;
-
- // TvSettings > Connected Devices > [A connected device] > Update
- // (aliasing CONNECTED_SLICE_DEVICE_ENTRY_UPDATE)
- CONNECTED_CLASSIC_DEVICE_ENTRY_UPDATE = 0x18210000;
-
- // TvSettings > Connected Devices > [A connected device] > Rename
- // (aliasing CONNECTED_SLICE_DEVICE_ENTRY_RENAME)
- CONNECTED_CLASSIC_DEVICE_ENTRY_RENAME = 0x18220000;
-
- // TvSettings > Connected Devices > [A connected device] > Forget
- // (aliasing CONNECTED_SLICE_DEVICE_ENTRY_FORGET)
- CONNECTED_CLASSIC_DEVICE_ENTRY_FORGET = 0x18230000;
-
- // TvSettings > Connected Devices > HDMI-CEC
- // (aliasing CONNECTED_SLICE_HDMICEC)
- CONNECTED_CLASSIC_HDMICEC = 0x18300000;
-
- // TvSettings > Connected Devices > HDMI-CEC > Enable (toggle)
- // (aliasing CONNECTED_SLICE_HDMICEC_ON_OFF)
- CONNECTED_CLASSIC_HDMICEC_ON_OFF = 0x18310000;
-
- // TvSettings > Help & Feedback
- FEEDBACK = 0x19000000;
-
- // TvSettings > Help & Feedback > Send feedback
- FEEDBACK_SEND = 0x19100000;
-}
diff --git a/core/proto/android/bluetooth/a2dp/enums.proto b/core/proto/android/bluetooth/a2dp/enums.proto
deleted file mode 100644
index 5a025bd..0000000
--- a/core/proto/android/bluetooth/a2dp/enums.proto
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.bluetooth.a2dp;
-
-option java_outer_classname = "BluetoothA2dpProtoEnums";
-option java_multiple_files = true;
-
-// A2dp playback state enum, defined from:
-// frameworks/base/core/java/android/bluetooth/BluetoothA2dp.java
-enum PlaybackStateEnum {
- PLAYBACK_STATE_UNKNOWN = 0;
- PLAYBACK_STATE_PLAYING = 10;
- PLAYBACK_STATE_NOT_PLAYING = 11;
-}
-
-enum AudioCodingModeEnum {
- AUDIO_CODING_MODE_UNKNOWN = 0;
- AUDIO_CODING_MODE_HARDWARE = 1;
- AUDIO_CODING_MODE_SOFTWARE = 2;
-}
diff --git a/core/proto/android/bluetooth/enums.proto b/core/proto/android/bluetooth/enums.proto
deleted file mode 100644
index dc60ede..0000000
--- a/core/proto/android/bluetooth/enums.proto
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.bluetooth;
-
-option java_outer_classname = "BluetoothProtoEnums";
-option java_multiple_files = true;
-
-// Bluetooth connection states.
-enum ConnectionStateEnum {
- CONNECTION_STATE_DISCONNECTED = 0;
- CONNECTION_STATE_CONNECTING = 1;
- CONNECTION_STATE_CONNECTED = 2;
- CONNECTION_STATE_DISCONNECTING = 3;
-}
-
-// Bluetooth Adapter Enable and Disable Reasons
-enum EnableDisableReasonEnum {
- ENABLE_DISABLE_REASON_UNSPECIFIED = 0;
- ENABLE_DISABLE_REASON_APPLICATION_REQUEST = 1;
- ENABLE_DISABLE_REASON_AIRPLANE_MODE = 2;
- ENABLE_DISABLE_REASON_DISALLOWED = 3;
- ENABLE_DISABLE_REASON_RESTARTED = 4;
- ENABLE_DISABLE_REASON_START_ERROR = 5;
- ENABLE_DISABLE_REASON_SYSTEM_BOOT = 6;
- ENABLE_DISABLE_REASON_CRASH = 7;
- ENABLE_DISABLE_REASON_USER_SWITCH = 8;
- ENABLE_DISABLE_REASON_RESTORE_USER_SETTING = 9;
- ENABLE_DISABLE_REASON_FACTORY_RESET = 10;
- ENABLE_DISABLE_REASON_INIT_FLAGS_CHANGED = 11;
-}
-
-enum DirectionEnum {
- DIRECTION_UNKNOWN = 0;
- DIRECTION_OUTGOING = 1;
- DIRECTION_INCOMING = 2;
-}
-
-// First item is the default value, other values follow Bluetooth spec definition
-enum LinkTypeEnum {
- // Link type is at most 1 byte (0xFF), thus 0xFFF must not be a valid value
- LINK_TYPE_UNKNOWN = 0xFFF;
- LINK_TYPE_SCO = 0x00;
- LINK_TYPE_ACL = 0x01;
- LINK_TYPE_ESCO = 0x02;
-}
-
-enum DeviceInfoSrcEnum {
- DEVICE_INFO_SRC_UNKNOWN = 0;
- // Within Android Bluetooth stack
- DEVICE_INFO_INTERNAL = 1;
- // Outside Android Bluetooth stack
- DEVICE_INFO_EXTERNAL = 2;
-}
-
-enum DeviceTypeEnum {
- DEVICE_TYPE_UNKNOWN = 0;
- DEVICE_TYPE_CLASSIC = 1;
- DEVICE_TYPE_LE = 2;
- DEVICE_TYPE_DUAL = 3;
-}
-
-// Defined in frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
-enum TransportTypeEnum {
- TRANSPORT_TYPE_AUTO = 0;
- TRANSPORT_TYPE_BREDR = 1;
- TRANSPORT_TYPE_LE = 2;
-}
-
-// Bond state enum
-// Defined in frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
-enum BondStateEnum {
- BOND_STATE_UNKNOWN = 0;
- BOND_STATE_NONE = 10;
- BOND_STATE_BONDING = 11;
- BOND_STATE_BONDED = 12;
-}
-
-// Sub states within the bonding general state
-enum BondSubStateEnum {
- BOND_SUB_STATE_UNKNOWN = 0;
- BOND_SUB_STATE_LOCAL_OOB_DATA_PROVIDED = 1;
- BOND_SUB_STATE_LOCAL_PIN_REQUESTED = 2;
- BOND_SUB_STATE_LOCAL_PIN_REPLIED = 3;
- BOND_SUB_STATE_LOCAL_SSP_REQUESTED = 4;
- BOND_SUB_STATE_LOCAL_SSP_REPLIED = 5;
-}
-
-enum UnbondReasonEnum {
- UNBOND_REASON_UNKNOWN = 0;
- UNBOND_REASON_AUTH_FAILED = 1;
- UNBOND_REASON_AUTH_REJECTED = 2;
- UNBOND_REASON_AUTH_CANCELED = 3;
- UNBOND_REASON_REMOTE_DEVICE_DOWN = 4;
- UNBOND_REASON_DISCOVERY_IN_PROGRESS = 5;
- UNBOND_REASON_AUTH_TIMEOUT = 6;
- UNBOND_REASON_REPEATED_ATTEMPTS = 7;
- UNBOND_REASON_REMOTE_AUTH_CANCELED = 8;
- UNBOND_REASON_REMOVED = 9;
-}
-
-enum SocketTypeEnum {
- SOCKET_TYPE_UNKNOWN = 0;
- SOCKET_TYPE_RFCOMM = 1;
- SOCKET_TYPE_SCO = 2;
- SOCKET_TYPE_L2CAP_BREDR = 3;
- SOCKET_TYPE_L2CAP_LE = 4;
-}
-
-enum SocketConnectionstateEnum {
- SOCKET_CONNECTION_STATE_UNKNOWN = 0;
- // Socket acts as a server waiting for connection
- SOCKET_CONNECTION_STATE_LISTENING = 1;
- // Socket acts as a client trying to connect
- SOCKET_CONNECTION_STATE_CONNECTING = 2;
- // Socket is connected
- SOCKET_CONNECTION_STATE_CONNECTED = 3;
- // Socket tries to disconnect from remote
- SOCKET_CONNECTION_STATE_DISCONNECTING = 4;
- // This socket is closed
- SOCKET_CONNECTION_STATE_DISCONNECTED = 5;
-}
-
-enum SocketRoleEnum {
- SOCKET_ROLE_UNKNOWN = 0;
- SOCKET_ROLE_LISTEN = 1;
- SOCKET_ROLE_CONNECTION = 2;
-}
diff --git a/core/proto/android/bluetooth/hci/enums.proto b/core/proto/android/bluetooth/hci/enums.proto
deleted file mode 100644
index ef894e5..0000000
--- a/core/proto/android/bluetooth/hci/enums.proto
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.bluetooth.hci;
-
-option java_outer_classname = "BluetoothHciProtoEnums";
-option java_multiple_files = true;
-
-// HCI command opcodes (OCF+OGF) from Bluetooth 5.0 specification Vol 2, Part E, Section 7
-// Original definition: system/bt/stack/include/hcidefs.h
-enum CommandEnum {
- // Opcode is at most 2 bytes (0xFFFF), thus 0xFFFFF must not be a valid value
- CMD_UNKNOWN = 0xFFFFF;
- // Link control commands 0x0400
- CMD_INQUIRY = 0x0401;
- CMD_INQUIRY_CANCEL = 0x0402;
- CMD_PERIODIC_INQUIRY_MODE = 0x0403;
- CMD_EXIT_PERIODIC_INQUIRY_MODE = 0x0404;
- CMD_CREATE_CONNECTION = 0x0405;
- CMD_DISCONNECT = 0x0406;
- CMD_ADD_SCO_CONNECTION = 0x0407; // Deprecated since Bluetooth 1.2
- CMD_CREATE_CONNECTION_CANCEL = 0x0408;
- CMD_ACCEPT_CONNECTION_REQUEST = 0x0409;
- CMD_REJECT_CONNECTION_REQUEST = 0x040A;
- CMD_LINK_KEY_REQUEST_REPLY = 0x040B;
- CMD_LINK_KEY_REQUEST_NEG_REPLY = 0x040C;
- CMD_PIN_CODE_REQUEST_REPLY = 0x040D;
- CMD_PIN_CODE_REQUEST_NEG_REPLY = 0x040E;
- CMD_CHANGE_CONN_PACKET_TYPE = 0x040F;
- CMD_AUTHENTICATION_REQUESTED = 0x0411;
- CMD_SET_CONN_ENCRYPTION = 0x0413;
- CMD_CHANGE_CONN_LINK_KEY = 0x0415;
- CMD_MASTER_LINK_KEY = 0x0417;
- CMD_RMT_NAME_REQUEST = 0x0419;
- CMD_RMT_NAME_REQUEST_CANCEL = 0x041A;
- CMD_READ_RMT_FEATURES = 0x041B;
- CMD_READ_RMT_EXT_FEATURES = 0x041C;
- CMD_READ_RMT_VERSION_INFO = 0x041D;
- CMD_READ_RMT_CLOCK_OFFSET = 0x041F;
- CMD_READ_LMP_HANDLE = 0x0420;
- CMD_SETUP_ESCO_CONNECTION = 0x0428;
- CMD_ACCEPT_ESCO_CONNECTION = 0x0429;
- CMD_REJECT_ESCO_CONNECTION = 0x042A;
- CMD_IO_CAPABILITY_REQUEST_REPLY = 0x042B;
- CMD_USER_CONF_REQUEST_REPLY = 0x042C;
- CMD_USER_CONF_VALUE_NEG_REPLY = 0x042D;
- CMD_USER_PASSKEY_REQ_REPLY = 0x042E;
- CMD_USER_PASSKEY_REQ_NEG_REPLY = 0x042F;
- CMD_REM_OOB_DATA_REQ_REPLY = 0x0430;
- CMD_REM_OOB_DATA_REQ_NEG_REPLY = 0x0433;
- CMD_IO_CAP_REQ_NEG_REPLY = 0x0434;
- // BEGIN: AMP commands (not used in system/bt)
- CMD_CREATE_PHYSICAL_LINK = 0x0435;
- CMD_ACCEPT_PHYSICAL_LINK = 0x0436;
- CMD_DISCONNECT_PHYSICAL_LINK = 0x0437;
- CMD_CREATE_LOGICAL_LINK = 0x0438;
- CMD_ACCEPT_LOGICAL_LINK = 0x0439;
- CMD_DISCONNECT_LOGICAL_LINK = 0x043A;
- CMD_LOGICAL_LINK_CANCEL = 0x043B;
- CMD_FLOW_SPEC_MODIFY = 0x043C;
- // END: AMP commands
- CMD_ENH_SETUP_ESCO_CONNECTION = 0x043D;
- CMD_ENH_ACCEPT_ESCO_CONNECTION = 0x043E;
- CMD_TRUNCATED_PAGE = 0x043F;
- CMD_TRUNCATED_PAGE_CANCEL = 0x0440;
- CMD_SET_CLB = 0x0441;
- CMD_RECEIVE_CLB = 0x0442;
- CMD_START_SYNC_TRAIN = 0x0443;
- CMD_RECEIVE_SYNC_TRAIN = 0x0444;
- CMD_REM_OOB_EXTENDED_DATA_REQ_REPLY = 0x0445; // Not currently used in system/bt
- // Link policy commands 0x0800
- CMD_HOLD_MODE = 0x0801;
- CMD_SNIFF_MODE = 0x0803;
- CMD_EXIT_SNIFF_MODE = 0x0804;
- CMD_PARK_MODE = 0x0805;
- CMD_EXIT_PARK_MODE = 0x0806;
- CMD_QOS_SETUP = 0x0807;
- CMD_ROLE_DISCOVERY = 0x0809;
- CMD_SWITCH_ROLE = 0x080B;
- CMD_READ_POLICY_SETTINGS = 0x080C;
- CMD_WRITE_POLICY_SETTINGS = 0x080D;
- CMD_READ_DEF_POLICY_SETTINGS = 0x080E;
- CMD_WRITE_DEF_POLICY_SETTINGS = 0x080F;
- CMD_FLOW_SPECIFICATION = 0x0810;
- CMD_SNIFF_SUB_RATE = 0x0811;
- // Host controller baseband commands 0x0C00
- CMD_SET_EVENT_MASK = 0x0C01;
- CMD_RESET = 0x0C03;
- CMD_SET_EVENT_FILTER = 0x0C05;
- CMD_FLUSH = 0x0C08;
- CMD_READ_PIN_TYPE = 0x0C09;
- CMD_WRITE_PIN_TYPE = 0x0C0A;
- CMD_CREATE_NEW_UNIT_KEY = 0x0C0B;
- CMD_GET_MWS_TRANS_LAYER_CFG = 0x0C0C; // Deprecated (not used in spec)
- CMD_READ_STORED_LINK_KEY = 0x0C0D;
- CMD_WRITE_STORED_LINK_KEY = 0x0C11;
- CMD_DELETE_STORED_LINK_KEY = 0x0C12;
- CMD_CHANGE_LOCAL_NAME = 0x0C13;
- CMD_READ_LOCAL_NAME = 0x0C14;
- CMD_READ_CONN_ACCEPT_TOUT = 0x0C15;
- CMD_WRITE_CONN_ACCEPT_TOUT = 0x0C16;
- CMD_READ_PAGE_TOUT = 0x0C17;
- CMD_WRITE_PAGE_TOUT = 0x0C18;
- CMD_READ_SCAN_ENABLE = 0x0C19;
- CMD_WRITE_SCAN_ENABLE = 0x0C1A;
- CMD_READ_PAGESCAN_CFG = 0x0C1B;
- CMD_WRITE_PAGESCAN_CFG = 0x0C1C;
- CMD_READ_INQUIRYSCAN_CFG = 0x0C1D;
- CMD_WRITE_INQUIRYSCAN_CFG = 0x0C1E;
- CMD_READ_AUTHENTICATION_ENABLE = 0x0C1F;
- CMD_WRITE_AUTHENTICATION_ENABLE = 0x0C20;
- CMD_READ_ENCRYPTION_MODE = 0x0C21; // Deprecated
- CMD_WRITE_ENCRYPTION_MODE = 0x0C22; // Deprecated
- CMD_READ_CLASS_OF_DEVICE = 0x0C23;
- CMD_WRITE_CLASS_OF_DEVICE = 0x0C24;
- CMD_READ_VOICE_SETTINGS = 0x0C25;
- CMD_WRITE_VOICE_SETTINGS = 0x0C26;
- CMD_READ_AUTOMATIC_FLUSH_TIMEOUT = 0x0C27;
- CMD_WRITE_AUTOMATIC_FLUSH_TIMEOUT = 0x0C28;
- CMD_READ_NUM_BCAST_REXMITS = 0x0C29;
- CMD_WRITE_NUM_BCAST_REXMITS = 0x0C2A;
- CMD_READ_HOLD_MODE_ACTIVITY = 0x0C2B;
- CMD_WRITE_HOLD_MODE_ACTIVITY = 0x0C2C;
- CMD_READ_TRANSMIT_POWER_LEVEL = 0x0C2D;
- CMD_READ_SCO_FLOW_CTRL_ENABLE = 0x0C2E;
- CMD_WRITE_SCO_FLOW_CTRL_ENABLE = 0x0C2F;
- CMD_SET_HC_TO_HOST_FLOW_CTRL = 0x0C31;
- CMD_HOST_BUFFER_SIZE = 0x0C33;
- CMD_HOST_NUM_PACKETS_DONE = 0x0C35;
- CMD_READ_LINK_SUPER_TOUT = 0x0C36;
- CMD_WRITE_LINK_SUPER_TOUT = 0x0C37;
- CMD_READ_NUM_SUPPORTED_IAC = 0x0C38;
- CMD_READ_CURRENT_IAC_LAP = 0x0C39;
- CMD_WRITE_CURRENT_IAC_LAP = 0x0C3A;
- CMD_READ_PAGESCAN_PERIOD_MODE = 0x0C3B; // Deprecated
- CMD_WRITE_PAGESCAN_PERIOD_MODE = 0x0C3C; // Deprecated
- CMD_READ_PAGESCAN_MODE = 0x0C3D; // Deprecated
- CMD_WRITE_PAGESCAN_MODE = 0x0C3E; // Deprecated
- CMD_SET_AFH_CHANNELS = 0x0C3F;
- CMD_READ_INQSCAN_TYPE = 0x0C42;
- CMD_WRITE_INQSCAN_TYPE = 0x0C43;
- CMD_READ_INQUIRY_MODE = 0x0C44;
- CMD_WRITE_INQUIRY_MODE = 0x0C45;
- CMD_READ_PAGESCAN_TYPE = 0x0C46;
- CMD_WRITE_PAGESCAN_TYPE = 0x0C47;
- CMD_READ_AFH_ASSESSMENT_MODE = 0x0C48;
- CMD_WRITE_AFH_ASSESSMENT_MODE = 0x0C49;
- CMD_READ_EXT_INQ_RESPONSE = 0x0C51;
- CMD_WRITE_EXT_INQ_RESPONSE = 0x0C52;
- CMD_REFRESH_ENCRYPTION_KEY = 0x0C53;
- CMD_READ_SIMPLE_PAIRING_MODE = 0x0C55;
- CMD_WRITE_SIMPLE_PAIRING_MODE = 0x0C56;
- CMD_READ_LOCAL_OOB_DATA = 0x0C57;
- CMD_READ_INQ_TX_POWER_LEVEL = 0x0C58;
- CMD_WRITE_INQ_TX_POWER_LEVEL = 0x0C59;
- CMD_READ_ERRONEOUS_DATA_RPT = 0x0C5A;
- CMD_WRITE_ERRONEOUS_DATA_RPT = 0x0C5B;
- CMD_ENHANCED_FLUSH = 0x0C5F;
- CMD_SEND_KEYPRESS_NOTIF = 0x0C60;
- CMD_READ_LOGICAL_LINK_ACCEPT_TIMEOUT = 0x0C61;
- CMD_WRITE_LOGICAL_LINK_ACCEPT_TIMEOUT = 0x0C62;
- CMD_SET_EVENT_MASK_PAGE_2 = 0x0C63;
- CMD_READ_LOCATION_DATA = 0x0C64;
- CMD_WRITE_LOCATION_DATA = 0x0C65;
- CMD_READ_FLOW_CONTROL_MODE = 0x0C66;
- CMD_WRITE_FLOW_CONTROL_MODE = 0x0C67;
- CMD_READ_ENHANCED_TX_PWR_LEVEL = 0x0C68; // Not currently used in system/bt
- CMD_READ_BE_FLUSH_TOUT = 0x0C69;
- CMD_WRITE_BE_FLUSH_TOUT = 0x0C6A;
- CMD_SHORT_RANGE_MODE = 0x0C6B;
- CMD_READ_BLE_HOST_SUPPORT = 0x0C6C;
- CMD_WRITE_BLE_HOST_SUPPORT = 0x0C6D;
- CMD_SET_MWS_CHANNEL_PARAMETERS = 0x0C6E;
- CMD_SET_EXTERNAL_FRAME_CONFIGURATION = 0x0C6F;
- CMD_SET_MWS_SIGNALING = 0x0C70;
- CMD_SET_MWS_TRANSPORT_LAYER = 0x0C71;
- CMD_SET_MWS_SCAN_FREQUENCY_TABLE = 0x0C72;
- CMD_SET_MWS_PATTERN_CONFIGURATION = 0x0C73;
- CMD_SET_RESERVED_LT_ADDR = 0x0C74;
- CMD_DELETE_RESERVED_LT_ADDR = 0x0C75;
- CMD_WRITE_CLB_DATA = 0x0C76;
- CMD_READ_SYNC_TRAIN_PARAM = 0x0C77;
- CMD_WRITE_SYNC_TRAIN_PARAM = 0x0C78;
- CMD_READ_SECURE_CONNS_SUPPORT = 0x0C79;
- CMD_WRITE_SECURE_CONNS_SUPPORT = 0x0C7A;
- CMD_READ_AUTHED_PAYLOAD_TIMEOUT = 0x0C7B; // Not currently used in system/bt
- CMD_WRITE_AUTHED_PAYLOAD_TIMEOUT = 0x0C7C; // Not currently used in system/bt
- CMD_READ_LOCAL_OOB_EXTENDED_DATA = 0x0C7D; // Not currently used in system/bt
- CMD_READ_EXTENDED_PAGE_TIMEOUT = 0x0C7E; // Not currently used in system/bt
- CMD_WRITE_EXTENDED_PAGE_TIMEOUT = 0x0C7F; // Not currently used in system/bt
- CMD_READ_EXTENDED_INQUIRY_LENGTH = 0x0C80; // Not currently used in system/bt
- CMD_WRITE_EXTENDED_INQUIRY_LENGTH = 0x0C81; // Not currently used in system/bt
- // Informational parameter commands 0x1000
- CMD_READ_LOCAL_VERSION_INFO = 0x1001;
- CMD_READ_LOCAL_SUPPORTED_CMDS = 0x1002;
- CMD_READ_LOCAL_FEATURES = 0x1003;
- CMD_READ_LOCAL_EXT_FEATURES = 0x1004;
- CMD_READ_BUFFER_SIZE = 0x1005;
- CMD_READ_COUNTRY_CODE = 0x1007; // Deprecated
- CMD_READ_BD_ADDR = 0x1009;
- CMD_READ_DATA_BLOCK_SIZE = 0x100A;
- CMD_READ_LOCAL_SUPPORTED_CODECS = 0x100B;
- // Status parameter commands 0x1400
- CMD_READ_FAILED_CONTACT_COUNTER = 0x1401;
- CMD_RESET_FAILED_CONTACT_COUNTER = 0x1402;
- CMD_GET_LINK_QUALITY = 0x1403;
- CMD_READ_RSSI = 0x1405;
- CMD_READ_AFH_CH_MAP = 0x1406;
- CMD_READ_CLOCK = 0x1407;
- CMD_READ_ENCR_KEY_SIZE = 0x1408;
- CMD_READ_LOCAL_AMP_INFO = 0x1409;
- CMD_READ_LOCAL_AMP_ASSOC = 0x140A;
- CMD_WRITE_REMOTE_AMP_ASSOC = 0x140B;
- CMD_GET_MWS_TRANSPORT_CFG = 0x140C; // Not currently used in system/bt
- CMD_SET_TRIGGERED_CLK_CAPTURE = 0x140D; // Not currently used in system/bt
- // Testing commands 0x1800
- CMD_READ_LOOPBACK_MODE = 0x1801;
- CMD_WRITE_LOOPBACK_MODE = 0x1802;
- CMD_ENABLE_DEV_UNDER_TEST_MODE = 0x1803;
- CMD_WRITE_SIMP_PAIR_DEBUG_MODE = 0x1804;
- CMD_ENABLE_AMP_RCVR_REPORTS = 0x1807;
- CMD_AMP_TEST_END = 0x1808;
- CMD_AMP_TEST = 0x1809;
- CMD_WRITE_SECURE_CONN_TEST_MODE = 0x180A; // Not currently used in system/bt
- // BLE commands 0x2000
- CMD_BLE_SET_EVENT_MASK = 0x2001;
- CMD_BLE_READ_BUFFER_SIZE = 0x2002;
- CMD_BLE_READ_LOCAL_SPT_FEAT = 0x2003;
- CMD_BLE_WRITE_LOCAL_SPT_FEAT = 0x2004;
- CMD_BLE_WRITE_RANDOM_ADDR = 0x2005;
- CMD_BLE_WRITE_ADV_PARAMS = 0x2006;
- CMD_BLE_READ_ADV_CHNL_TX_POWER = 0x2007;
- CMD_BLE_WRITE_ADV_DATA = 0x2008;
- CMD_BLE_WRITE_SCAN_RSP_DATA = 0x2009;
- CMD_BLE_WRITE_ADV_ENABLE = 0x200A;
- CMD_BLE_WRITE_SCAN_PARAMS = 0x200B;
- CMD_BLE_WRITE_SCAN_ENABLE = 0x200C;
- CMD_BLE_CREATE_LL_CONN = 0x200D;
- CMD_BLE_CREATE_CONN_CANCEL = 0x200E;
- CMD_BLE_READ_WHITE_LIST_SIZE = 0x200F;
- CMD_BLE_CLEAR_WHITE_LIST = 0x2010;
- CMD_BLE_ADD_WHITE_LIST = 0x2011;
- CMD_BLE_REMOVE_WHITE_LIST = 0x2012;
- CMD_BLE_UPD_LL_CONN_PARAMS = 0x2013;
- CMD_BLE_SET_HOST_CHNL_CLASS = 0x2014;
- CMD_BLE_READ_CHNL_MAP = 0x2015;
- CMD_BLE_READ_REMOTE_FEAT = 0x2016;
- CMD_BLE_ENCRYPT = 0x2017;
- CMD_BLE_RAND = 0x2018;
- CMD_BLE_START_ENC = 0x2019;
- CMD_BLE_LTK_REQ_REPLY = 0x201A;
- CMD_BLE_LTK_REQ_NEG_REPLY = 0x201B;
- CMD_BLE_READ_SUPPORTED_STATES = 0x201C;
- CMD_BLE_RECEIVER_TEST = 0x201D;
- CMD_BLE_TRANSMITTER_TEST = 0x201E;
- CMD_BLE_TEST_END = 0x201F;
- CMD_BLE_RC_PARAM_REQ_REPLY = 0x2020;
- CMD_BLE_RC_PARAM_REQ_NEG_REPLY = 0x2021;
- CMD_BLE_SET_DATA_LENGTH = 0x2022;
- CMD_BLE_READ_DEFAULT_DATA_LENGTH = 0x2023;
- CMD_BLE_WRITE_DEFAULT_DATA_LENGTH = 0x2024;
- CMD_BLE_GENERATE_DHKEY = 0x2026; // Not currently used in system/bt
- CMD_BLE_ADD_DEV_RESOLVING_LIST = 0x2027;
- CMD_BLE_RM_DEV_RESOLVING_LIST = 0x2028;
- CMD_BLE_CLEAR_RESOLVING_LIST = 0x2029;
- CMD_BLE_READ_RESOLVING_LIST_SIZE = 0x202A;
- CMD_BLE_READ_RESOLVABLE_ADDR_PEER = 0x202B;
- CMD_BLE_READ_RESOLVABLE_ADDR_LOCAL = 0x202C;
- CMD_BLE_SET_ADDR_RESOLUTION_ENABLE = 0x202D;
- CMD_BLE_SET_RAND_PRIV_ADDR_TIMOUT = 0x202E;
- CMD_BLE_READ_MAXIMUM_DATA_LENGTH = 0x202F;
- CMD_BLE_READ_PHY = 0x2030;
- CMD_BLE_SET_DEFAULT_PHY = 0x2031;
- CMD_BLE_SET_PHY = 0x2032;
- CMD_BLE_ENH_RECEIVER_TEST = 0x2033;
- CMD_BLE_ENH_TRANSMITTER_TEST = 0x2034;
- CMD_BLE_SET_EXT_ADVERTISING_RANDOM_ADDRESS = 0x2035;
- CMD_BLE_SET_EXT_ADVERTISING_PARAM = 0x2036;
- CMD_BLE_SET_EXT_ADVERTISING_DATA = 0x2037;
- CMD_BLE_SET_EXT_ADVERTISING_SCAN_RESP = 0x2038;
- CMD_BLE_SET_EXT_ADVERTISING_ENABLE = 0x2039;
- CMD_BLE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH = 0x203A;
- CMD_BLE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS = 0x203B;
- CMD_BLE_REMOVE_ADVERTISING_SET = 0x203C;
- CMD_BLE_CLEAR_ADVERTISING_SETS = 0x203D;
- CMD_BLE_SET_PERIODIC_ADVERTISING_PARAM = 0x203E;
- CMD_BLE_SET_PERIODIC_ADVERTISING_DATA = 0x203F;
- CMD_BLE_SET_PERIODIC_ADVERTISING_ENABLE = 0x2040;
- CMD_BLE_SET_EXTENDED_SCAN_PARAMETERS = 0x2041;
- CMD_BLE_SET_EXTENDED_SCAN_ENABLE = 0x2042;
- CMD_BLE_EXTENDED_CREATE_CONNECTION = 0x2043;
- CMD_BLE_PERIODIC_ADVERTISING_CREATE_SYNC = 0x2044;
- CMD_BLE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL = 0x2045;
- CMD_BLE_PERIODIC_ADVERTISING_TERMINATE_SYNC = 0x2046;
- CMD_BLE_ADD_DEVICE_TO_PERIODIC_ADVERTISING_LIST = 0x2047;
- CMD_BLE_RM_DEVICE_FROM_PERIODIC_ADVERTISING_LIST = 0x2048;
- CMD_BLE_CLEAR_PERIODIC_ADVERTISING_LIST = 0x2049;
- CMD_BLE_READ_PERIODIC_ADVERTISING_LIST_SIZE = 0x204A;
- CMD_BLE_READ_TRANSMIT_POWER = 0x204B;
- CMD_BLE_READ_RF_COMPENS_POWER = 0x204C;
- CMD_BLE_WRITE_RF_COMPENS_POWER = 0x204D;
- CMD_BLE_SET_PRIVACY_MODE = 0x204E;
- // Vendor specific commands 0xFC00 and above
- // Android vendor specific commands defined in
- // https://source.android.com/devices/bluetooth/hci_requirements#vendor-specific-capabilities
- CMD_BLE_VENDOR_CAP = 0xFD53;
- CMD_BLE_MULTI_ADV = 0xFD54;
- CMD_BLE_BATCH_SCAN = 0xFD56;
- CMD_BLE_ADV_FILTER = 0xFD57;
- CMD_BLE_TRACK_ADV = 0xFD58;
- CMD_BLE_ENERGY_INFO = 0xFD59;
- CMD_BLE_EXTENDED_SCAN_PARAMS = 0xFD5A;
- CMD_CONTROLLER_DEBUG_INFO = 0xFD5B;
- CMD_CONTROLLER_A2DP_OPCODE = 0xFD5D;
- CMD_BRCM_SET_ACL_PRIORITY = 0xFC57;
- // Other vendor specific commands below here
-}
-
-// HCI event codes from the Bluetooth 5.0 specification Vol 2, Part 7, Section 7
-// Original definition: system/bt/stack/include/hcidefs.h
-enum EventEnum {
- // Event is at most 1 byte (0xFF), thus 0xFFF must not be a valid value
- EVT_UNKNOWN = 0xFFF;
- EVT_INQUIRY_COMP = 0x01;
- EVT_INQUIRY_RESULT = 0x02;
- EVT_CONNECTION_COMP = 0x03;
- EVT_CONNECTION_REQUEST = 0x04;
- EVT_DISCONNECTION_COMP = 0x05;
- EVT_AUTHENTICATION_COMP = 0x06;
- EVT_RMT_NAME_REQUEST_COMP = 0x07;
- EVT_ENCRYPTION_CHANGE = 0x08;
- EVT_CHANGE_CONN_LINK_KEY = 0x09;
- EVT_MASTER_LINK_KEY_COMP = 0x0A;
- EVT_READ_RMT_FEATURES_COMP = 0x0B;
- EVT_READ_RMT_VERSION_COMP = 0x0C;
- EVT_QOS_SETUP_COMP = 0x0D;
- EVT_COMMAND_COMPLETE = 0x0E;
- EVT_COMMAND_STATUS = 0x0F;
- EVT_HARDWARE_ERROR = 0x10;
- EVT_FLUSH_OCCURRED = 0x11;
- EVT_ROLE_CHANGE = 0x12;
- EVT_NUM_COMPL_DATA_PKTS = 0x13;
- EVT_MODE_CHANGE = 0x14;
- EVT_RETURN_LINK_KEYS = 0x15;
- EVT_PIN_CODE_REQUEST = 0x16;
- EVT_LINK_KEY_REQUEST = 0x17;
- EVT_LINK_KEY_NOTIFICATION = 0x18;
- EVT_LOOPBACK_COMMAND = 0x19;
- EVT_DATA_BUF_OVERFLOW = 0x1A;
- EVT_MAX_SLOTS_CHANGED = 0x1B;
- EVT_READ_CLOCK_OFF_COMP = 0x1C;
- EVT_CONN_PKT_TYPE_CHANGE = 0x1D;
- EVT_QOS_VIOLATION = 0x1E;
- EVT_PAGE_SCAN_MODE_CHANGE = 0x1F; // Deprecated
- EVT_PAGE_SCAN_REP_MODE_CHNG = 0x20;
- EVT_FLOW_SPECIFICATION_COMP = 0x21;
- EVT_INQUIRY_RSSI_RESULT = 0x22;
- EVT_READ_RMT_EXT_FEATURES_COMP = 0x23;
- EVT_ESCO_CONNECTION_COMP = 0x2C;
- EVT_ESCO_CONNECTION_CHANGED = 0x2D;
- EVT_SNIFF_SUB_RATE = 0x2E;
- EVT_EXTENDED_INQUIRY_RESULT = 0x2F;
- EVT_ENCRYPTION_KEY_REFRESH_COMP = 0x30;
- EVT_IO_CAPABILITY_REQUEST = 0x31;
- EVT_IO_CAPABILITY_RESPONSE = 0x32;
- EVT_USER_CONFIRMATION_REQUEST = 0x33;
- EVT_USER_PASSKEY_REQUEST = 0x34;
- EVT_REMOTE_OOB_DATA_REQUEST = 0x35;
- EVT_SIMPLE_PAIRING_COMPLETE = 0x36;
- EVT_LINK_SUPER_TOUT_CHANGED = 0x38;
- EVT_ENHANCED_FLUSH_COMPLETE = 0x39;
- EVT_USER_PASSKEY_NOTIFY = 0x3B;
- EVT_KEYPRESS_NOTIFY = 0x3C;
- EVT_RMT_HOST_SUP_FEAT_NOTIFY = 0x3D;
- EVT_BLE_META = 0x3E;
- EVT_PHYSICAL_LINK_COMP = 0x40;
- EVT_CHANNEL_SELECTED = 0x41;
- EVT_DISC_PHYSICAL_LINK_COMP = 0x42;
- EVT_PHY_LINK_LOSS_EARLY_WARNING = 0x43;
- EVT_PHY_LINK_RECOVERY = 0x44;
- EVT_LOGICAL_LINK_COMP = 0x45;
- EVT_DISC_LOGICAL_LINK_COMP = 0x46;
- EVT_FLOW_SPEC_MODIFY_COMP = 0x47;
- EVT_NUM_COMPL_DATA_BLOCKS = 0x48;
- EVT_AMP_TEST_START = 0x49; // Not currently used in system/bt
- EVT_AMP_TEST_END = 0x4A; // Not currently used in system/bt
- EVT_AMP_RECEIVER_RPT = 0x4B; // Not currently used in system/bt
- EVT_SHORT_RANGE_MODE_COMPLETE = 0x4C;
- EVT_AMP_STATUS_CHANGE = 0x4D;
- EVT_SET_TRIGGERED_CLOCK_CAPTURE = 0x4E;
- EVT_SYNC_TRAIN_CMPL = 0x4F; // Not currently used in system/bt
- EVT_SYNC_TRAIN_RCVD = 0x50; // Not currently used in system/bt
- EVT_CONNLESS_SLAVE_BROADCAST_RCVD = 0x51; // Not currently used in system/bt
- EVT_CONNLESS_SLAVE_BROADCAST_TIMEOUT = 0x52; // Not currently used in system/bt
- EVT_TRUNCATED_PAGE_CMPL = 0x53; // Not currently used in system/bt
- EVT_SLAVE_PAGE_RES_TIMEOUT = 0x54; // Not currently used in system/bt
- EVT_CONNLESS_SLAVE_BROADCAST_CHNL_MAP_CHANGE = 0x55; // Not currently used in system/bt
- EVT_INQUIRY_RES_NOTIFICATION = 0x56; // Not currently used in system/bt
- EVT_AUTHED_PAYLOAD_TIMEOUT = 0x57; // Not currently used in system/bt
- EVT_SAM_STATUS_CHANGE = 0x58; // Not currently used in system/bt
-}
-
-// Bluetooth low energy related meta event codes
-// from the Bluetooth 5.0 specification Vol 2, Part E, Section 7.7.65
-// Original definition: system/bt/stack/include/hcidefs.h
-enum BleMetaEventEnum {
- // BLE meta event code is at most 1 byte (0xFF), thus 0xFFF must not be a valid value
- BLE_EVT_UNKNOWN = 0xFFF;
- BLE_EVT_CONN_COMPLETE_EVT = 0x01;
- BLE_EVT_ADV_PKT_RPT_EVT = 0x02;
- BLE_EVT_LL_CONN_PARAM_UPD_EVT = 0x03;
- BLE_EVT_READ_REMOTE_FEAT_CMPL_EVT = 0x04;
- BLE_EVT_LTK_REQ_EVT = 0x05;
- BLE_EVT_RC_PARAM_REQ_EVT = 0x06;
- BLE_EVT_DATA_LENGTH_CHANGE_EVT = 0x07;
- BLE_EVT_READ_LOCAL_P256_PUB_KEY = 0x08; // Not currently used in system/bt
- BLE_EVT_GEN_DHKEY_CMPL = 0x09; // Not currently used in system/bt
- BLE_EVT_ENHANCED_CONN_COMPLETE_EVT = 0x0a;
- BLE_EVT_DIRECT_ADV_EVT = 0x0b;
- BLE_EVT_PHY_UPDATE_COMPLETE_EVT = 0x0c;
- BLE_EVT_EXTENDED_ADVERTISING_REPORT_EVT = 0x0D;
- BLE_EVT_PERIODIC_ADV_SYNC_EST_EVT = 0x0E;
- BLE_EVT_PERIODIC_ADV_REPORT_EVT = 0x0F;
- BLE_EVT_PERIODIC_ADV_SYNC_LOST_EVT = 0x10;
- BLE_EVT_SCAN_TIMEOUT_EVT = 0x11;
- BLE_EVT_ADVERTISING_SET_TERMINATED_EVT = 0x12;
- BLE_EVT_SCAN_REQ_RX_EVT = 0x13;
- BLE_EVT_CHNL_SELECTION_ALGORITHM = 0x14; // Not currently used in system/bt
-}
-
-// HCI status code from the Bluetooth 5.0 specification Vol 2, Part D.
-// Original definition: system/bt/stack/include/hcidefs.h
-enum StatusEnum {
- // Status is at most 1 byte (0xFF), thus 0xFFF must not be a valid value
- STATUS_UNKNOWN = 0xFFF;
- STATUS_SUCCESS = 0x00;
- STATUS_ILLEGAL_COMMAND = 0x01;
- STATUS_NO_CONNECTION = 0x02;
- STATUS_HW_FAILURE = 0x03;
- STATUS_PAGE_TIMEOUT = 0x04;
- STATUS_AUTH_FAILURE = 0x05;
- STATUS_KEY_MISSING = 0x06;
- STATUS_MEMORY_FULL = 0x07;
- STATUS_CONNECTION_TOUT = 0x08;
- STATUS_MAX_NUM_OF_CONNECTIONS = 0x09;
- STATUS_MAX_NUM_OF_SCOS = 0x0A;
- STATUS_CONNECTION_EXISTS = 0x0B;
- STATUS_COMMAND_DISALLOWED = 0x0C;
- STATUS_HOST_REJECT_RESOURCES = 0x0D;
- STATUS_HOST_REJECT_SECURITY = 0x0E;
- STATUS_HOST_REJECT_DEVICE = 0x0F;
- STATUS_HOST_TIMEOUT = 0x10;
- STATUS_UNSUPPORTED_VALUE = 0x11;
- STATUS_ILLEGAL_PARAMETER_FMT = 0x12;
- STATUS_PEER_USER = 0x13;
- STATUS_PEER_LOW_RESOURCES = 0x14;
- STATUS_PEER_POWER_OFF = 0x15;
- STATUS_CONN_CAUSE_LOCAL_HOST = 0x16;
- STATUS_REPEATED_ATTEMPTS = 0x17;
- STATUS_PAIRING_NOT_ALLOWED = 0x18;
- STATUS_UNKNOWN_LMP_PDU = 0x19;
- STATUS_UNSUPPORTED_REM_FEATURE = 0x1A;
- STATUS_SCO_OFFSET_REJECTED = 0x1B;
- STATUS_SCO_INTERVAL_REJECTED = 0x1C;
- STATUS_SCO_AIR_MODE = 0x1D;
- STATUS_INVALID_LMP_PARAM = 0x1E;
- STATUS_UNSPECIFIED = 0x1F;
- STATUS_UNSUPPORTED_LMP_FEATURE = 0x20;
- STATUS_ROLE_CHANGE_NOT_ALLOWED = 0x21;
- STATUS_LMP_RESPONSE_TIMEOUT = 0x22;
- STATUS_LMP_STATUS_TRANS_COLLISION = 0x23;
- STATUS_LMP_PDU_NOT_ALLOWED = 0x24;
- STATUS_ENCRY_MODE_NOT_ACCEPTABLE = 0x25;
- STATUS_UNIT_KEY_USED = 0x26;
- STATUS_QOS_NOT_SUPPORTED = 0x27;
- STATUS_INSTANT_PASSED = 0x28;
- STATUS_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED = 0x29;
- STATUS_DIFF_TRANSACTION_COLLISION = 0x2A;
- STATUS_UNDEFINED_0x2B = 0x2B; // Not used
- STATUS_QOS_UNACCEPTABLE_PARAM = 0x2C;
- STATUS_QOS_REJECTED = 0x2D;
- STATUS_CHAN_CLASSIF_NOT_SUPPORTED = 0x2E;
- STATUS_INSUFFCIENT_SECURITY = 0x2F;
- STATUS_PARAM_OUT_OF_RANGE = 0x30;
- STATUS_UNDEFINED_0x31 = 0x31; // Not used
- STATUS_ROLE_SWITCH_PENDING = 0x32;
- STATUS_UNDEFINED_0x33 = 0x33;
- STATUS_RESERVED_SLOT_VIOLATION = 0x34;
- STATUS_ROLE_SWITCH_FAILED = 0x35;
- STATUS_INQ_RSP_DATA_TOO_LARGE = 0x36;
- STATUS_SIMPLE_PAIRING_NOT_SUPPORTED = 0x37;
- STATUS_HOST_BUSY_PAIRING = 0x38;
- STATUS_REJ_NO_SUITABLE_CHANNEL = 0x39;
- STATUS_CONTROLLER_BUSY = 0x3A;
- STATUS_UNACCEPT_CONN_INTERVAL = 0x3B;
- STATUS_ADVERTISING_TIMEOUT = 0x3C;
- STATUS_CONN_TOUT_DUE_TO_MIC_FAILURE = 0x3D;
- STATUS_CONN_FAILED_ESTABLISHMENT = 0x3E;
- STATUS_MAC_CONNECTION_FAILED = 0x3F;
- STATUS_LT_ADDR_ALREADY_IN_USE = 0x40;
- STATUS_LT_ADDR_NOT_ALLOCATED = 0x41;
- STATUS_CLB_NOT_ENABLED = 0x42;
- STATUS_CLB_DATA_TOO_BIG = 0x43;
- STATUS_OPERATION_CANCELED_BY_HOST = 0x44; // Not currently used in system/bt
-}
-
-enum BqrIdEnum {
- BQR_ID_UNKNOWN = 0x00;
- BQR_ID_MONITOR_MODE = 0x01;
- BQR_ID_APPROACH_LSTO = 0x02;
- BQR_ID_A2DP_AUDIO_CHOPPY = 0x03;
- BQR_ID_SCO_VOICE_CHOPPY = 0x04;
-}
-
-enum BqrPacketTypeEnum {
- BQR_PACKET_TYPE_UNKNOWN = 0x00;
- BQR_PACKET_TYPE_ID = 0x01;
- BQR_PACKET_TYPE_NULL = 0x02;
- BQR_PACKET_TYPE_POLL = 0x03;
- BQR_PACKET_TYPE_FHS = 0x04;
- BQR_PACKET_TYPE_HV1 = 0x05;
- BQR_PACKET_TYPE_HV2 = 0x06;
- BQR_PACKET_TYPE_HV3 = 0x07;
- BQR_PACKET_TYPE_DV = 0x08;
- BQR_PACKET_TYPE_EV3 = 0x09;
- BQR_PACKET_TYPE_EV4 = 0x0A;
- BQR_PACKET_TYPE_EV5 = 0x0B;
- BQR_PACKET_TYPE_2EV3 = 0x0C;
- BQR_PACKET_TYPE_2EV5 = 0x0D;
- BQR_PACKET_TYPE_3EV3 = 0x0E;
- BQR_PACKET_TYPE_3EV5 = 0x0F;
- BQR_PACKET_TYPE_DM1 = 0x10;
- BQR_PACKET_TYPE_DH1 = 0x11;
- BQR_PACKET_TYPE_DM3 = 0x12;
- BQR_PACKET_TYPE_DH3 = 0x13;
- BQR_PACKET_TYPE_DM5 = 0x14;
- BQR_PACKET_TYPE_DH5 = 0x15;
- BQR_PACKET_TYPE_AUX1 = 0x16;
- BQR_PACKET_TYPE_2DH1 = 0x17;
- BQR_PACKET_TYPE_2DH3 = 0x18;
- BQR_PACKET_TYPE_2DH5 = 0x19;
- BQR_PACKET_TYPE_3DH1 = 0x1A;
- BQR_PACKET_TYPE_3DH3 = 0x1B;
- BQR_PACKET_TYPE_3DH5 = 0x1C;
-}
diff --git a/core/proto/android/bluetooth/hfp/enums.proto b/core/proto/android/bluetooth/hfp/enums.proto
deleted file mode 100644
index d286e4b..0000000
--- a/core/proto/android/bluetooth/hfp/enums.proto
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.bluetooth.hfp;
-
-option java_outer_classname = "BluetoothHfpProtoEnums";
-option java_multiple_files = true;
-
-enum ScoCodec {
- SCO_CODEC_UNKNOWN = 0;
- SCO_CODEC_CVSD = 1;
- // Default codec behind Wide Band Speech
- SCO_CODEC_MSBC = 2;
-}
\ No newline at end of file
diff --git a/core/proto/android/bluetooth/smp/enums.proto b/core/proto/android/bluetooth/smp/enums.proto
deleted file mode 100644
index c6747b7..0000000
--- a/core/proto/android/bluetooth/smp/enums.proto
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.bluetooth.smp;
-
-option java_outer_classname = "BluetoothSmpProtoEnums";
-option java_multiple_files = true;
-
-// SMP Pairing command codes
-enum CommandEnum {
- CMD_UNKNOWN = 0x00;
- CMD_PAIRING_REQUEST = 0x01;
- CMD_PAIRING_RESPONSE = 0x02;
- CMD_PAIRING_CONFIRM = 0x03;
- CMD_PAIRING_RANDOM = 0x04;
- CMD_PAIRING_FAILED = 0x05;
- CMD_ENCRYPTION_INFON = 0x06;
- CMD_MASTER_IDENTIFICATION = 0x07;
- CMD_IDENTITY_INFO = 0x08;
- CMD_IDENTITY_ADDR_INFO = 0x09;
- CMD_SIGNING_INFO = 0x0A;
- CMD_SECURITY_REQUEST = 0x0B;
- CMD_PAIRING_PUBLIC_KEY = 0x0C;
- CMD_PAIRING_DHKEY_CHECK = 0x0D;
- CMD_PAIRING_KEYPRESS_INFO = 0x0E;
-}
-
-enum PairingFailReasonEnum {
- PAIRING_FAIL_REASON_RESERVED = 0x00;
- PAIRING_FAIL_REASON_PASSKEY_ENTRY = 0x01;
- PAIRING_FAIL_REASON_OOB = 0x02;
- PAIRING_FAIL_REASON_AUTH_REQ = 0x03;
- PAIRING_FAIL_REASON_CONFIRM_VALUE = 0x04;
- PAIRING_FAIL_REASON_PAIR_NOT_SUPPORT = 0x05;
- PAIRING_FAIL_REASON_ENC_KEY_SIZE = 0x06;
- PAIRING_FAIL_REASON_INVALID_CMD = 0x07;
- PAIRING_FAIL_REASON_UNSPECIFIED = 0x08;
- PAIRING_FAIL_REASON_REPEATED_ATTEMPTS = 0x09;
- PAIRING_FAIL_REASON_INVALID_PARAMETERS = 0x0A;
- PAIRING_FAIL_REASON_DHKEY_CHK = 0x0B;
- PAIRING_FAIL_REASON_NUMERIC_COMPARISON = 0x0C;
- PAIRING_FAIL_REASON_CLASSIC_PAIRING_IN_PROGR = 0x0D;
- PAIRING_FAIL_REASON_XTRANS_DERIVE_NOT_ALLOW = 0x0E;
-}
\ No newline at end of file
diff --git a/core/proto/android/debug/enums.proto b/core/proto/android/debug/enums.proto
deleted file mode 100644
index 6747bb7..0000000
--- a/core/proto/android/debug/enums.proto
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.debug;
-
-option java_outer_classname = "AdbProtoEnums";
-option java_multiple_files = true;
-
-/**
- * adb connection state used to track adb connection changes in AdbDebuggingManager.java.
- */
-enum AdbConnectionStateEnum {
- UNKNOWN = 0;
-
- /**
- * The adb connection is waiting for approval from the user.
- */
- AWAITING_USER_APPROVAL = 1;
-
- /**
- * The user allowed the adb connection from the system.
- */
- USER_ALLOWED = 2;
-
- /**
- * The user denied the adb connection from the system.
- */
- USER_DENIED = 3;
-
- /**
- * The adb connection was automatically allowed without user interaction due to the system
- * being previously allowed by the user with the 'always allow' option selected, and the adb
- * grant has not yet expired.
- */
- AUTOMATICALLY_ALLOWED = 4;
-
- /**
- * An empty or invalid base64 encoded key was provided to the framework; the connection was
- * automatically denied.
- */
- DENIED_INVALID_KEY = 5;
-
- /**
- * vold decrypt has not yet occurred; the connection was automatically denied.
- */
- DENIED_VOLD_DECRYPT = 6;
-
- /**
- * The adb session has been disconnected.
- */
- DISCONNECTED = 7;
-}
-
diff --git a/core/proto/android/hardware/biometrics/enums.proto b/core/proto/android/hardware/biometrics/enums.proto
deleted file mode 100644
index f2e0638..0000000
--- a/core/proto/android/hardware/biometrics/enums.proto
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.hardware.biometrics;
-
-option java_outer_classname = "BiometricsProtoEnums";
-option java_multiple_files = true;
-
-// Logging constants for <Biometric>Service and BiometricService
-
-enum ModalityEnum {
- MODALITY_UNKNOWN = 0;
- MODALITY_FINGERPRINT = 1; // 1 << 0
- MODALITY_IRIS = 2; // 1 << 1
- MODALITY_FACE = 4; // 1 << 2
-}
-
-enum ClientEnum {
- CLIENT_UNKNOWN = 0;
- CLIENT_KEYGUARD = 1;
- CLIENT_BIOMETRIC_PROMPT = 2;
- CLIENT_FINGERPRINT_MANAGER = 3; // Deprecated API before BiometricPrompt was introduced
-}
-
-enum ActionEnum {
- ACTION_UNKNOWN = 0;
- ACTION_ENROLL = 1;
- ACTION_AUTHENTICATE = 2;
- ACTION_ENUMERATE = 3;
- ACTION_REMOVE = 4;
-}
-
-enum IssueEnum {
- ISSUE_UNKNOWN = 0;
- // When a biometric HAL has crashed.
- ISSUE_HAL_DEATH = 1;
- // When Android Framework has a template that doesn't exist in the HAL. The framework
- // is expected to remove its template to stay in sync with the HAL.
- ISSUE_UNKNOWN_TEMPLATE_ENROLLED_FRAMEWORK = 2;
- // When the HAL has a template that doesn't exist in Android Framework. The framework
- // is expected to notify the HAL to remove this template to stay in sync with the framework.
- ISSUE_UNKNOWN_TEMPLATE_ENROLLED_HAL = 3;
- // When the HAL has not sent ERROR_CANCELED within the specified timeout.
- ISSUE_CANCEL_TIMED_OUT = 4;
-}
\ No newline at end of file
diff --git a/core/proto/android/hardware/sensor/assist/enums.proto b/core/proto/android/hardware/sensor/assist/enums.proto
deleted file mode 100644
index 012dcb2..0000000
--- a/core/proto/android/hardware/sensor/assist/enums.proto
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.hardware.sensor.assist;
-
-option java_outer_classname = "AssistGestureProtoEnums";
-option java_multiple_files = true;
-
-enum AssistGestureStageEnum {
- ASSIST_GESTURE_STAGE_UNKNOWN = 0;
- ASSIST_GESTURE_STAGE_PROGRESS = 1;
- ASSIST_GESTURE_STAGE_PRIMED = 2;
- ASSIST_GESTURE_STAGE_DETECTED = 3;
-}
-
-enum AssistGestureFeedbackEnum {
- ASSIST_GESTURE_FEEDBACK_UNKNOWN = 0;
- ASSIST_GESTURE_FEEDBACK_NOT_USED = 1;
- ASSIST_GESTURE_FEEDBACK_USED = 2;
-}
\ No newline at end of file
diff --git a/core/proto/android/net/networkcapabilities.proto b/core/proto/android/net/networkcapabilities.proto
deleted file mode 100644
index be0cad1..0000000
--- a/core/proto/android/net/networkcapabilities.proto
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.net;
-
-option java_multiple_files = true;
-
-import "frameworks/base/core/proto/android/privacy.proto";
-
-/**
- * An android.net.NetworkCapabilities object.
- */
-message NetworkCapabilitiesProto {
- option (.android.msg_privacy).dest = DEST_AUTOMATIC;
-
- enum Transport {
- // Indicates this network uses a Cellular transport.
- TRANSPORT_CELLULAR = 0;
- // Indicates this network uses a Wi-Fi transport.
- TRANSPORT_WIFI = 1;
- // Indicates this network uses a Bluetooth transport.
- TRANSPORT_BLUETOOTH = 2;
- // Indicates this network uses an Ethernet transport.
- TRANSPORT_ETHERNET = 3;
- // Indicates this network uses a VPN transport.
- TRANSPORT_VPN = 4;
- // Indicates this network uses a Wi-Fi Aware transport.
- TRANSPORT_WIFI_AWARE = 5;
- // Indicates this network uses a LoWPAN transport.
- TRANSPORT_LOWPAN = 6;
- }
- repeated Transport transports = 1;
-
- enum NetCapability {
- // Indicates this is a network that has the ability to reach the
- // carrier's MMSC for sending and receiving MMS messages.
- NET_CAPABILITY_MMS = 0;
- // Indicates this is a network that has the ability to reach the
- // carrier's SUPL server, used to retrieve GPS information.
- NET_CAPABILITY_SUPL = 1;
- // Indicates this is a network that has the ability to reach the
- // carrier's DUN or tethering gateway.
- NET_CAPABILITY_DUN = 2;
- // Indicates this is a network that has the ability to reach the
- // carrier's FOTA portal, used for over the air updates.
- NET_CAPABILITY_FOTA = 3;
- // Indicates this is a network that has the ability to reach the
- // carrier's IMS servers, used for network registration and signaling.
- NET_CAPABILITY_IMS = 4;
- // Indicates this is a network that has the ability to reach the
- // carrier's CBS servers, used for carrier specific services.
- NET_CAPABILITY_CBS = 5;
- // Indicates this is a network that has the ability to reach a Wi-Fi
- // direct peer.
- NET_CAPABILITY_WIFI_P2P = 6;
- // Indicates this is a network that has the ability to reach a carrier's
- // Initial Attach servers.
- NET_CAPABILITY_IA = 7;
- // Indicates this is a network that has the ability to reach a carrier's
- // RCS servers, used for Rich Communication Services.
- NET_CAPABILITY_RCS = 8;
- // Indicates this is a network that has the ability to reach a carrier's
- // XCAP servers, used for configuration and control.
- NET_CAPABILITY_XCAP = 9;
- // Indicates this is a network that has the ability to reach a carrier's
- // Emergency IMS servers or other services, used for network signaling
- // during emergency calls.
- NET_CAPABILITY_EIMS = 10;
- // Indicates that this network is unmetered.
- NET_CAPABILITY_NOT_METERED = 11;
- // Indicates that this network should be able to reach the internet.
- NET_CAPABILITY_INTERNET = 12;
- // Indicates that this network is available for general use. If this is
- // not set applications should not attempt to communicate on this
- // network. Note that this is simply informative and not enforcement -
- // enforcement is handled via other means. Set by default.
- NET_CAPABILITY_NOT_RESTRICTED = 13;
- // Indicates that the user has indicated implicit trust of this network.
- // This generally means it's a sim-selected carrier, a plugged in
- // ethernet, a paired BT device or a wifi the user asked to connect to.
- // Untrusted networks are probably limited to unknown wifi AP. Set by
- // default.
- NET_CAPABILITY_TRUSTED = 14;
- // Indicates that this network is not a VPN. This capability is set by
- // default and should be explicitly cleared for VPN networks.
- NET_CAPABILITY_NOT_VPN = 15;
- // Indicates that connectivity on this network was successfully
- // validated. For example, for a network with NET_CAPABILITY_INTERNET,
- // it means that Internet connectivity was successfully detected.
- NET_CAPABILITY_VALIDATED = 16;
- // Indicates that this network was found to have a captive portal in
- // place last time it was probed.
- NET_CAPABILITY_CAPTIVE_PORTAL = 17;
- // Indicates that this network is not roaming.
- NET_CAPABILITY_NOT_ROAMING = 18;
- // Indicates that this network is available for use by apps, and not a
- // network that is being kept up in the background to facilitate fast
- // network switching.
- NET_CAPABILITY_FOREGROUND = 19;
- }
- repeated NetCapability capabilities = 2;
-
- // Passive link bandwidth. This is a rough guide of the expected peak
- // bandwidth for the first hop on the given transport. It is not measured,
- // but may take into account link parameters (Radio technology, allocated
- // channels, etc).
- optional int32 link_up_bandwidth_kbps = 3;
- optional int32 link_down_bandwidth_kbps = 4;
-
- optional string network_specifier = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];
-
- // True if this object specifies a signal strength.
- optional bool can_report_signal_strength = 6;
- // This is a signed integer, and higher values indicate better signal. The
- // exact units are bearer-dependent. For example, Wi-Fi uses RSSI.
- // Only valid if can_report_signal_strength is true.
- optional sint32 signal_strength = 7;
-}
diff --git a/core/proto/android/net/networkrequest.proto b/core/proto/android/net/networkrequest.proto
index b35a020..6794c8c 100644
--- a/core/proto/android/net/networkrequest.proto
+++ b/core/proto/android/net/networkrequest.proto
@@ -20,8 +20,8 @@
option java_multiple_files = true;
-import "frameworks/base/core/proto/android/net/networkcapabilities.proto";
import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/net/networkcapabilities.proto";
/**
* An android.net.NetworkRequest object.
diff --git a/core/proto/android/os/batterystats.proto b/core/proto/android/os/batterystats.proto
index 892ebf7..7d68a0d 100644
--- a/core/proto/android/os/batterystats.proto
+++ b/core/proto/android/os/batterystats.proto
@@ -19,10 +19,10 @@
package android.os;
-import "frameworks/base/core/proto/android/app/job/enums.proto";
import "frameworks/base/core/proto/android/os/powermanager.proto";
-import "frameworks/base/core/proto/android/telephony/enums.proto";
import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/app/job/enums.proto";
+import "frameworks/proto_logging/stats/enums/telephony/enums.proto";
message BatteryStatsProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
diff --git a/core/proto/android/os/enums.proto b/core/proto/android/os/enums.proto
deleted file mode 100644
index 566861b..0000000
--- a/core/proto/android/os/enums.proto
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.os;
-
-option java_outer_classname = "OsProtoEnums";
-option java_multiple_files = true;
-
-// These constants are defined in hardware/interfaces/health/1.0/types.hal
-// They are primarily used by android/os/BatteryManager.java.
-enum BatteryHealthEnum {
- BATTERY_HEALTH_INVALID = 0;
- BATTERY_HEALTH_UNKNOWN = 1;
- BATTERY_HEALTH_GOOD = 2;
- BATTERY_HEALTH_OVERHEAT = 3;
- BATTERY_HEALTH_DEAD = 4;
- BATTERY_HEALTH_OVER_VOLTAGE = 5;
- BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6;
- BATTERY_HEALTH_COLD = 7;
-}
-
-// Plug states, primarily used by android/os/BatteryManager.java.
-enum BatteryPluggedStateEnum {
- // Note that NONE is not in BatteryManager.java's constants.
- BATTERY_PLUGGED_NONE = 0;
- // Power source is an AC charger.
- BATTERY_PLUGGED_AC = 1;
- // Power source is a USB port.
- BATTERY_PLUGGED_USB = 2;
- // Power source is wireless.
- BATTERY_PLUGGED_WIRELESS = 4;
-}
-
-// These constants are defined in hardware/interfaces/health/1.0/types.hal
-// They are primarily used by android/os/BatteryManager.java.
-enum BatteryStatusEnum {
- BATTERY_STATUS_INVALID = 0;
- BATTERY_STATUS_UNKNOWN = 1;
- BATTERY_STATUS_CHARGING = 2;
- BATTERY_STATUS_DISCHARGING = 3;
- BATTERY_STATUS_NOT_CHARGING = 4;
- BATTERY_STATUS_FULL = 5;
-}
-
-// These constants are defined in hardware/interfaces/thermal/1.0/types.hal
-// and in hardware/interfaces/thermal/2.0/types.hal
-// They are primarily used by android/os/HardwarePropertiesManager.java.
-// Any change to the types in the thermal hal should be made here as well.
-enum TemperatureTypeEnum {
- TEMPERATURE_TYPE_UNKNOWN = -1;
- TEMPERATURE_TYPE_CPU = 0;
- TEMPERATURE_TYPE_GPU = 1;
- TEMPERATURE_TYPE_BATTERY = 2;
- TEMPERATURE_TYPE_SKIN = 3;
- TEMPERATURE_TYPE_USB_PORT = 4;
- TEMPERATURE_TYPE_POWER_AMPLIFIER = 5;
-
- // Battery Charge Limit - virtual thermal sensors.
- TEMPERATURE_TYPE_BCL_VOLTAGE = 6;
- TEMPERATURE_TYPE_BCL_CURRENT = 7;
- TEMPERATURE_TYPE_BCL_PERCENTAGE = 8;
-
- // Neural Processing Unit.
- TEMPERATURE_TYPE_NPU = 9;
-}
-
-// Device throttling severity
-// These constants are defined in hardware/interfaces/thermal/2.0/types.hal.
-// Any change to the types in the thermal hal should be made here as well.
-enum ThrottlingSeverityEnum {
- // Not under throttling.
- NONE = 0;
- // Light throttling where UX is not impacted.
- LIGHT = 1;
- // Moderate throttling where UX is not largely impacted.
- MODERATE = 2;
- // Severe throttling where UX is largely impacted.
- // Similar to 1.0 throttlingThreshold.
- SEVERE = 3;
- // Platform has done everything to reduce power.
- CRITICAL = 4;
- // Key components in platform are shutting down due to thermal condition.
- // Device functionalities will be limited.
- EMERGENCY = 5;
- // Need shutdown immediately.
- SHUTDOWN = 6;
-};
-
-// Device cooling device types.
-// These constants are defined in hardware/interfaces/thermal/2.0/types.hal.
-// Any change to the types in the thermal hal should be made here as well.
-enum CoolingTypeEnum {
- FAN = 0;
- BATTERY = 1;
- CPU = 2;
- GPU = 3;
- MODEM = 4;
- NPU = 5;
- COMPONENT = 6;
-};
-
-// Wakelock types, primarily used by android/os/PowerManager.java.
-enum WakeLockLevelEnum {
- // NOTE: Wake lock levels were previously defined as a bit field, except
- // that only a few combinations were actually supported so the bit field
- // was removed. This explains why the numbering scheme is so odd. If
- // adding a new wake lock level, any unused value can be used.
-
- // Ensures that the CPU is running; the screen and keyboard backlight
- // will be allowed to go off.
- PARTIAL_WAKE_LOCK = 1;
-
- // Ensures that the screen is on (but may be dimmed); the keyboard
- // backlight will be allowed to go off. If the user presses the power
- // button, then the SCREEN_DIM_WAKE_LOCK will be implicitly released by
- // the system, causing both the screen and the CPU to be turned off.
- SCREEN_DIM_WAKE_LOCK = 6 [deprecated = true];
-
- // Ensures that the screen is on at full brightness; the keyboard
- // backlight will be allowed to go off. If the user presses the power
- // button, then the SCREEN_BRIGHT_WAKE_LOCK will be implicitly released
- // by the system, causing both the screen and the CPU to be turned off.
- SCREEN_BRIGHT_WAKE_LOCK = 10 [deprecated = true];
-
- // Ensures that the screen and keyboard backlight are on at full
- // brightness. If the user presses the power button, then the
- // FULL_WAKE_LOCK will be implicitly released by the system, causing
- // both the screen and the CPU to be turned off.
- FULL_WAKE_LOCK = 26 [deprecated = true];
-
- // Turns the screen off when the proximity sensor activates. If the
- // proximity sensor detects that an object is nearby, the screen turns
- // off immediately. Shortly after the object moves away, the screen
- // turns on again.
- // A proximity wake lock does not prevent the device from falling asleep
- // unlike FULL_WAKE_LOCK, SCREEN_BRIGHT_WAKE_LOCK and
- // SCREEN_DIM_WAKE_LOCK. If there is no user activity and no other wake
- // locks are held, then the device will fall asleep (and lock) as usual.
- // However, the device will not fall asleep while the screen has been
- // turned off by the proximity sensor because it effectively counts as
- // ongoing user activity.
- PROXIMITY_SCREEN_OFF_WAKE_LOCK = 32;
-
- // Put the screen in a low power state and allow the CPU to suspend if
- // no other wake locks are held. This is used by the dream manager to
- // implement doze mode. It currently has no effect unless the power
- // manager is in the dozing state.
- DOZE_WAKE_LOCK = 64;
-
- // Keep the device awake enough to allow drawing to occur. This is used
- // by the window manager to allow applications to draw while the system
- // is dozing. It currently has no effect unless the power manager is in
- // the dozing state.
- DRAW_WAKE_LOCK = 128;
-}
diff --git a/core/proto/android/os/incident.proto b/core/proto/android/os/incident.proto
index 64cf75d..e97b1a8 100644
--- a/core/proto/android/os/incident.proto
+++ b/core/proto/android/os/incident.proto
@@ -55,13 +55,13 @@
import "frameworks/base/core/proto/android/service/procstats.proto";
import "frameworks/base/core/proto/android/service/restricted_image.proto";
import "frameworks/base/core/proto/android/service/sensor_service.proto";
-import "frameworks/base/core/proto/android/service/usb.proto";
import "frameworks/base/core/proto/android/util/event_log_tags.proto";
import "frameworks/base/core/proto/android/util/log.proto";
import "frameworks/base/core/proto/android/util/textdump.proto";
import "frameworks/base/core/proto/android/privacy.proto";
import "frameworks/base/core/proto/android/section.proto";
import "frameworks/base/proto/src/ipconnectivity.proto";
+import "frameworks/proto_logging/stats/enums/service/usb.proto";
package android.os;
diff --git a/core/proto/android/server/activitymanagerservice.proto b/core/proto/android/server/activitymanagerservice.proto
index 2d2ead4..fa046c6 100644
--- a/core/proto/android/server/activitymanagerservice.proto
+++ b/core/proto/android/server/activitymanagerservice.proto
@@ -20,7 +20,6 @@
import "frameworks/base/core/proto/android/app/activitymanager.proto";
import "frameworks/base/core/proto/android/app/appexitinfo.proto";
-import "frameworks/base/core/proto/android/app/enums.proto";
import "frameworks/base/core/proto/android/app/notification.proto";
import "frameworks/base/core/proto/android/app/profilerinfo.proto";
import "frameworks/base/core/proto/android/content/component_name.proto";
@@ -35,6 +34,7 @@
import "frameworks/base/core/proto/android/server/windowmanagerservice.proto";
import "frameworks/base/core/proto/android/util/common.proto";
import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/app/enums.proto";
option java_multiple_files = true;
diff --git a/core/proto/android/server/bluetooth_manager_service.proto b/core/proto/android/server/bluetooth_manager_service.proto
index 998413f..c33f66a 100644
--- a/core/proto/android/server/bluetooth_manager_service.proto
+++ b/core/proto/android/server/bluetooth_manager_service.proto
@@ -17,8 +17,8 @@
syntax = "proto2";
package com.android.server;
-import "frameworks/base/core/proto/android/bluetooth/enums.proto";
import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/bluetooth/enums.proto";
option java_multiple_files = true;
diff --git a/core/proto/android/server/connectivity/Android.bp b/core/proto/android/server/connectivity/Android.bp
deleted file mode 100644
index 50c238b..0000000
--- a/core/proto/android/server/connectivity/Android.bp
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (C) 2019 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-java_library_static {
- name: "datastallprotosnano",
- proto: {
- type: "nano",
- },
- srcs: [
- "data_stall_event.proto",
- ],
- sdk_version: "system_current",
- // this is part of updatable modules(NetworkStack) which targets 29(Q)
- min_sdk_version: "29",
-}
diff --git a/core/proto/android/server/connectivity/data_stall_event.proto b/core/proto/android/server/connectivity/data_stall_event.proto
deleted file mode 100644
index 787074b..0000000
--- a/core/proto/android/server/connectivity/data_stall_event.proto
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package com.android.server.connectivity;
-option java_multiple_files = true;
-option java_outer_classname = "DataStallEventProto";
-
-enum ProbeResult {
- UNKNOWN = 0;
- VALID = 1;
- INVALID = 2;
- PORTAL = 3;
- PARTIAL = 4;
-}
-
-enum ApBand {
- AP_BAND_UNKNOWN = 0;
- AP_BAND_2GHZ = 1;
- AP_BAND_5GHZ = 2;
- AP_BAND_6GHZ = 3;
-}
-
-// Refer to definition in TelephonyManager.java.
-enum RadioTech {
- RADIO_TECHNOLOGY_UNKNOWN = 0;
- RADIO_TECHNOLOGY_GPRS = 1;
- RADIO_TECHNOLOGY_EDGE = 2;
- RADIO_TECHNOLOGY_UMTS = 3;
- RADIO_TECHNOLOGY_IS95A = 4;
- RADIO_TECHNOLOGY_IS95B = 5;
- RADIO_TECHNOLOGY_1XRTT = 6;
- RADIO_TECHNOLOGY_EVDO_0 = 7;
- RADIO_TECHNOLOGY_EVDO_A = 8;
- RADIO_TECHNOLOGY_HSDPA = 9;
- RADIO_TECHNOLOGY_HSUPA = 10;
- RADIO_TECHNOLOGY_HSPA = 11;
- RADIO_TECHNOLOGY_EVDO_B = 12;
- RADIO_TECHNOLOGY_LTE = 13;
- RADIO_TECHNOLOGY_EHRPD = 14;
- RADIO_TECHNOLOGY_HSPAP = 15;
- RADIO_TECHNOLOGY_GSM = 16;
- RADIO_TECHNOLOGY_TD_SCDMA = 17;
- RADIO_TECHNOLOGY_IWLAN = 18;
- RADIO_TECHNOLOGY_LTE_CA = 19;
- RADIO_TECHNOLOGY_NR = 20;
-}
-
-// Cellular specific information.
-message CellularData {
- // Indicate the radio technology at the time of data stall suspected.
- optional RadioTech rat_type = 1;
- // True if device is in roaming network at the time of data stall suspected.
- optional bool is_roaming = 2;
- // Registered network MccMnc when data stall happen
- optional string network_mccmnc = 3;
- // Indicate the SIM card carrier.
- optional string sim_mccmnc = 4;
- // Signal strength level at the time of data stall suspected.
- optional int32 signal_strength = 5;
-}
-
-// Wifi specific information.
-message WifiData {
- // Signal strength at the time of data stall suspected.
- // RSSI range is between -55 to -110.
- optional int32 signal_strength = 1;
- // AP band.
- optional ApBand wifi_band = 2;
-}
-
-message DnsEvent {
- // The dns return code.
- repeated int32 dns_return_code = 1;
- // Indicate the timestamp of the dns event.
- repeated int64 dns_time = 2;
-}
diff --git a/core/proto/android/server/enums.proto b/core/proto/android/server/enums.proto
deleted file mode 100644
index 89f7010..0000000
--- a/core/proto/android/server/enums.proto
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.server;
-
-option java_outer_classname = "ServerProtoEnums";
-option java_multiple_files = true;
-
-enum DeviceIdleModeEnum {
- // Device idle mode - not active.
- DEVICE_IDLE_MODE_OFF = 0;
- // Device idle mode - active in lightweight mode.
- DEVICE_IDLE_MODE_LIGHT = 1;
- // Device idle mode - active in full mode.
- DEVICE_IDLE_MODE_DEEP = 2;
-}
-
-enum ErrorSource {
- ERROR_SOURCE_UNKNOWN = 0;
- // Data app
- DATA_APP = 1;
- // System app
- SYSTEM_APP = 2;
- // System server.
- SYSTEM_SERVER = 3;
-}
diff --git a/core/proto/android/server/job/enums.proto b/core/proto/android/server/job/enums.proto
deleted file mode 100644
index 50fc031..0000000
--- a/core/proto/android/server/job/enums.proto
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package com.android.server.job;
-
-// This file is for JobScheduler enums inside the server directory. If you're
-// adding enums for app-side code, use the file in
-// frameworks/base/core/proto/android/app/job.
-option java_outer_classname = "JobServerProtoEnums";
-option java_multiple_files = true;
-
-// Set of constraints that a job potentially needs satisfied before it can run.
-// Defined in
-// frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java
-enum ConstraintEnum {
- CONSTRAINT_UNKNOWN = 0;
- CONSTRAINT_CHARGING = 1;
- CONSTRAINT_BATTERY_NOT_LOW = 2;
- CONSTRAINT_STORAGE_NOT_LOW = 3;
- CONSTRAINT_TIMING_DELAY = 4;
- CONSTRAINT_DEADLINE = 5;
- CONSTRAINT_IDLE = 6;
- CONSTRAINT_CONNECTIVITY = 7;
- CONSTRAINT_CONTENT_TRIGGER = 8;
- CONSTRAINT_DEVICE_NOT_DOZING = 9;
- CONSTRAINT_WITHIN_QUOTA = 10;
- CONSTRAINT_BACKGROUND_NOT_RESTRICTED = 11;
-}
diff --git a/core/proto/android/server/jobscheduler.proto b/core/proto/android/server/jobscheduler.proto
index f2f20e3a..d16ba28 100644
--- a/core/proto/android/server/jobscheduler.proto
+++ b/core/proto/android/server/jobscheduler.proto
@@ -20,7 +20,6 @@
option java_multiple_files = true;
-import "frameworks/base/core/proto/android/app/job/enums.proto";
import "frameworks/base/core/proto/android/content/clipdata.proto";
import "frameworks/base/core/proto/android/content/component_name.proto";
import "frameworks/base/core/proto/android/content/intent.proto";
@@ -29,10 +28,11 @@
import "frameworks/base/core/proto/android/os/bundle.proto";
import "frameworks/base/core/proto/android/os/persistablebundle.proto";
import "frameworks/base/core/proto/android/server/appstatetracker.proto";
-import "frameworks/base/core/proto/android/server/job/enums.proto";
import "frameworks/base/core/proto/android/server/statlogger.proto";
import "frameworks/base/core/proto/android/privacy.proto";
import "frameworks/base/core/proto/android/util/quotatracker.proto";
+import "frameworks/proto_logging/stats/enums/app/job/enums.proto";
+import "frameworks/proto_logging/stats/enums/server/job/enums.proto";
message JobSchedulerServiceDumpProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
diff --git a/core/proto/android/server/location/enums.proto b/core/proto/android/server/location/enums.proto
deleted file mode 100644
index 943ff18..0000000
--- a/core/proto/android/server/location/enums.proto
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.server.location;
-
-option java_outer_classname = "ServerLocationProtoEnums";
-option java_multiple_files = true;
-
-// GPS Signal Quality levels,
-// primarily used by location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
-enum GpsSignalQualityEnum {
- GPS_SIGNAL_QUALITY_UNKNOWN = -1;
- GPS_SIGNAL_QUALITY_POOR = 0;
- GPS_SIGNAL_QUALITY_GOOD = 1;
-}
-
-// A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc.
-enum GnssNiType {
- VOICE = 1;
- UMTS_SUPL = 2;
- UMTS_CTRL_PLANE = 3;
- EMERGENCY_SUPL = 4;
-};
-
-// GNSS NI responses, used to define the response in NI structures.
-enum GnssUserResponseType {
- RESPONSE_ACCEPT = 1;
- RESPONSE_DENY = 2;
- RESPONSE_NORESP = 3;
-};
-
-// GNSS NI data encoding scheme.
-enum GnssNiEncodingType {
- ENC_NONE = 0;
- ENC_SUPL_GSM_DEFAULT = 1;
- ENC_SUPL_UTF8 = 2;
- ENC_SUPL_UCS2 = 3;
- ENC_UNKNOWN = -1;
-};
-
-// Protocol stack that initiated the non-framework location request.
-enum NfwProtocolStack {
- // Cellular control plane requests.
- CTRL_PLANE = 0;
- // All types of SUPL requests.
- SUPL = 1;
- // All types of requests from IMS.
- IMS = 10;
- // All types of requests from SIM.
- SIM = 11;
- // Requests from other protocol stacks.
- OTHER_PROTOCOL_STACK = 100;
-};
-
-// Source initiating/receiving the location information.
-enum NfwRequestor {
- // Wireless service provider.
- CARRIER = 0;
- // Device manufacturer.
- OEM = 10;
- // Modem chipset vendor.
- MODEM_CHIPSET_VENDOR = 11;
- // GNSS chipset vendor.
- GNSS_CHIPSET_VENDOR = 12;
- // Other chipset vendor.
- OTHER_CHIPSET_VENDOR = 13;
- // Automobile client.
- AUTOMOBILE_CLIENT = 20;
- // Other sources.
- OTHER_REQUESTOR = 100;
-};
-
-// Indicates whether location information was provided for this request.
-enum NfwResponseType {
- // Request rejected because framework has not given permission for this use case.
- REJECTED = 0;
- // Request accepted but could not provide location because of a failure.
- ACCEPTED_NO_LOCATION_PROVIDED = 1;
- // Request accepted and location provided.
- ACCEPTED_LOCATION_PROVIDED = 2;
-};
-
-// The SUPL mode.
-enum SuplMode {
- // Mobile Station Based.
- MSB = 0x01;
- // Mobile Station Assisted.
- MSA = 0x02;
-};
-
-// Enum that hold the bit masks for various LTE Positioning Profile settings (LPP_PROFILE
-// configuration parameter). If none of the bits in the enum are set, the default setting is
-// Radio Resource Location Protocol(RRLP).
-enum LppProfile {
- // Enable LTE Positioning Protocol user plane.
- USER_PLANE = 0x01;
- // Enable LTE Positioning Protocol Control plane.
- CONTROL_PLANE = 0x02;
-};
-
-// Positioning protocol on A-Glonass system.
-enum GlonassPosProtocol {
- // Radio Resource Control(RRC) control-plane.
- RRC_CPLANE = 0x01;
- // Radio Resource Location user-plane.
- RRLP_CPLANE = 0x02;
- // LTE Positioning Protocol User plane.
- LPP_UPLANE = 0x04;
-};
-
-// Configurations of how GPS functionalities should be locked when user turns off GPS On setting.
-enum GpsLock {
- // Lock Mobile Originated GPS functionalitues.
- MO = 0x01;
- // Lock Network Initiated GPS functionalities.
- NI = 0x02;
-};
diff --git a/core/proto/android/server/powermanagerservice.proto b/core/proto/android/server/powermanagerservice.proto
index 0455d58..c5c4d7c 100644
--- a/core/proto/android/server/powermanagerservice.proto
+++ b/core/proto/android/server/powermanagerservice.proto
@@ -19,16 +19,16 @@
option java_multiple_files = true;
-import "frameworks/base/core/proto/android/app/enums.proto";
import "frameworks/base/core/proto/android/content/intent.proto";
-import "frameworks/base/core/proto/android/os/enums.proto";
import "frameworks/base/core/proto/android/os/looper.proto";
import "frameworks/base/core/proto/android/os/powermanager.proto";
import "frameworks/base/core/proto/android/os/worksource.proto";
import "frameworks/base/core/proto/android/providers/settings.proto";
import "frameworks/base/core/proto/android/server/wirelesschargerdetector.proto";
-import "frameworks/base/core/proto/android/view/enums.proto";
import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/app/enums.proto";
+import "frameworks/proto_logging/stats/enums/os/enums.proto";
+import "frameworks/proto_logging/stats/enums/view/enums.proto";
message PowerManagerServiceDumpProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
diff --git a/core/proto/android/server/windowmanagerservice.proto b/core/proto/android/server/windowmanagerservice.proto
index 0f5616f..420fc7d 100644
--- a/core/proto/android/server/windowmanagerservice.proto
+++ b/core/proto/android/server/windowmanagerservice.proto
@@ -24,11 +24,12 @@
import "frameworks/base/core/proto/android/server/surfaceanimator.proto";
import "frameworks/base/core/proto/android/view/displaycutout.proto";
import "frameworks/base/core/proto/android/view/displayinfo.proto";
-import "frameworks/base/core/proto/android/view/enums.proto";
import "frameworks/base/core/proto/android/view/surface.proto";
import "frameworks/base/core/proto/android/view/windowlayoutparams.proto";
import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/view/enums.proto";
+
package com.android.server.wm;
option java_multiple_files = true;
diff --git a/core/proto/android/service/battery.proto b/core/proto/android/service/battery.proto
index 586411f..3a112e7 100644
--- a/core/proto/android/service/battery.proto
+++ b/core/proto/android/service/battery.proto
@@ -20,8 +20,8 @@
option java_multiple_files = true;
option java_outer_classname = "BatteryServiceProto";
-import "frameworks/base/core/proto/android/os/enums.proto";
import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/os/enums.proto";
message BatteryServiceDumpProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
diff --git a/core/proto/android/service/procstats.proto b/core/proto/android/service/procstats.proto
index 7a4c070..57051f0 100644
--- a/core/proto/android/service/procstats.proto
+++ b/core/proto/android/service/procstats.proto
@@ -21,8 +21,8 @@
option java_outer_classname = "ProcessStatsServiceProto";
import "frameworks/base/core/proto/android/util/common.proto";
-import "frameworks/base/core/proto/android/service/procstats_enum.proto";
import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/service/procstats_enum.proto";
/**
* Data from ProcStatsService Dumpsys
diff --git a/core/proto/android/service/procstats_enum.proto b/core/proto/android/service/procstats_enum.proto
deleted file mode 100644
index 2abf373..0000000
--- a/core/proto/android/service/procstats_enum.proto
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.service.procstats;
-
-option java_multiple_files = true;
-option java_outer_classname = "ProcessStatsEnums";
-
-enum ScreenState {
- SCREEN_STATE_UNKNOWN = 0;
- SCREEN_STATE_OFF = 1;
- SCREEN_STATE_ON = 2;
-}
-
-enum MemoryState {
- MEMORY_STATE_UNKNOWN = 0;
- MEMORY_STATE_NORMAL = 1; // normal.
- MEMORY_STATE_MODERATE = 2; // moderate memory pressure.
- MEMORY_STATE_LOW = 3; // low memory.
- MEMORY_STATE_CRITICAL = 4; // critical memory.
-}
-
-// this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
-// and not frameworks/base/core/java/android/app/ActivityManager.java
-enum ProcessState {
- PROCESS_STATE_UNKNOWN = 0;
- // Persistent system process.
- PROCESS_STATE_PERSISTENT = 1;
- // Top activity; actually any visible activity.
- PROCESS_STATE_TOP = 2;
- // Important foreground process (ime, wallpaper, etc).
- PROCESS_STATE_IMPORTANT_FOREGROUND = 3;
- // Important background process.
- PROCESS_STATE_IMPORTANT_BACKGROUND = 4;
- // Performing backup operation.
- PROCESS_STATE_BACKUP = 5;
- // Background process running a service.
- PROCESS_STATE_SERVICE = 6;
- // Process not running, but would be if there was enough RAM.
- PROCESS_STATE_SERVICE_RESTARTING = 7;
- // Process running a receiver.
- PROCESS_STATE_RECEIVER = 8;
- // Heavy-weight process (currently not used).
- PROCESS_STATE_HEAVY_WEIGHT = 9;
- // Process hosting home/launcher app when not on top.
- PROCESS_STATE_HOME = 10;
- // Process hosting the last app the user was in.
- PROCESS_STATE_LAST_ACTIVITY = 11;
- // Cached process hosting a previous activity.
- PROCESS_STATE_CACHED_ACTIVITY = 12;
- // Cached process hosting a client activity.
- PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 13;
- // Cached process that is empty.
- PROCESS_STATE_CACHED_EMPTY = 14;
-}
-
-enum ServiceOperationState {
- SERVICE_OPERATION_STATE_UNKNOWN = 0;
- SERVICE_OPERATION_STATE_RUNNING = 1;
- SERVICE_OPERATION_STATE_STARTED = 2;
- SERVICE_OPERATION_STATE_FOREGROUND = 3;
- SERVICE_OPERATION_STATE_BOUND = 4;
- SERVICE_OPERATION_STATE_EXECUTING = 5;
-}
-
-// this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
-// and not frameworks/base/core/java/android/app/ActivityManager.java
-enum AggregatedProcessState {
- AGGREGATED_PROCESS_STATE_UNKNOWN = 0;
- // Persistent system process; PERSISTENT or PERSISTENT_UI in ActivityManager
- AGGREGATED_PROCESS_STATE_PERSISTENT = 1;
- // Top activity; actually any visible activity; TOP or TOP_SLEEPING in ActivityManager
- AGGREGATED_PROCESS_STATE_TOP = 2;
- // Bound top foreground process; BOUND_TOP or BOUND_FOREGROUND_SERVICE in ActivityManager
- AGGREGATED_PROCESS_STATE_BOUND_TOP_OR_FGS = 3;
- // Important foreground process; FOREGROUND_SERVICE in ActivityManager
- AGGREGATED_PROCESS_STATE_FGS = 4;
- // Important foreground process ; IMPORTANT_FOREGROUND in ActivityManager
- AGGREGATED_PROCESS_STATE_IMPORTANT_FOREGROUND = 5;
- // Various background processes; IMPORTANT_BACKGROUND, TRANSIENT_BACKGROUND, BACKUP, SERVICE,
- // HEAVY_WEIGHT in ActivityManager
- AGGREGATED_PROCESS_STATE_BACKGROUND = 6;
- // Process running a receiver; RECEIVER in ActivityManager
- AGGREGATED_PROCESS_STATE_RECEIVER = 7;
- // Various cached processes; HOME, LAST_ACTIVITY, CACHED_ACTIVITY, CACHED_RECENT,
- // CACHED_ACTIVITY_CLIENT, CACHED_EMPTY in ActivityManager
- AGGREGATED_PROCESS_STATE_CACHED = 8;
-}
\ No newline at end of file
diff --git a/core/proto/android/service/usb.proto b/core/proto/android/service/usb.proto
deleted file mode 100644
index 40c5a85..0000000
--- a/core/proto/android/service/usb.proto
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.service.usb;
-
-option java_multiple_files = true;
-option java_outer_classname = "UsbServiceProto";
-
-import "frameworks/base/core/proto/android/content/component_name.proto";
-import "frameworks/base/core/proto/android/service/enums.proto";
-import "frameworks/base/core/proto/android/privacy.proto";
-
-message UsbServiceDumpProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional UsbDeviceManagerProto device_manager = 1;
- optional UsbHostManagerProto host_manager = 2;
- optional UsbPortManagerProto port_manager = 3;
- optional UsbAlsaManagerProto alsa_manager = 4;
- optional UsbSettingsManagerProto settings_manager = 5;
- optional UsbPermissionsManagerProto permissions_manager = 6;
-}
-
-message UsbDeviceManagerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional UsbHandlerProto handler = 1;
- optional UsbDebuggingManagerProto debugging_manager = 2;
-}
-
-message UsbHandlerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- /* Same as android.hardware.usb.gadget.V1_0.GadgetFunction.* */
- enum Function {
- FUNCTION_ADB = 1;
- FUNCTION_ACCESSORY = 2;
- FUNCTION_MTP = 4;
- FUNCTION_MIDI = 8;
- FUNCTION_PTP = 16;
- FUNCTION_RNDIS = 32;
- FUNCTION_AUDIO_SOURCE = 64;
- }
-
- repeated Function current_functions = 1;
- optional bool current_functions_applied = 2;
- repeated Function screen_unlocked_functions = 3;
- optional bool screen_locked = 4;
- optional bool connected = 5;
- optional bool configured = 6;
- optional UsbAccessoryProto current_accessory = 7;
- optional bool host_connected = 8;
- optional bool source_power = 9;
- optional bool sink_power = 10;
- optional bool usb_charging = 11;
- optional bool hide_usb_notification = 12;
- optional bool audio_accessory_connected = 13;
- optional bool adb_enabled = 14;
- optional string kernel_state = 15;
- optional string kernel_function_list = 16;
-}
-
-message UsbAccessoryProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional string manufacturer = 1;
- optional string model = 2;
- // For "classical" USB-accessories the manufacturer bakes this into the
- // firmware of the device. If an Android phone is configured as accessory, the
- // app that sets up the accessory side of the connection set this. Either way,
- // these are part of the detection protocol, and so they cannot be user set or
- // unique.
- optional string description = 3;
- optional string version = 4;
- optional string uri = 5 [ (android.privacy).dest = DEST_EXPLICIT ];
- // Non-resettable hardware ID.
- optional string serial = 6 [ (android.privacy).dest = DEST_LOCAL ];
-}
-
-message UsbDebuggingManagerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional bool connected_to_adb = 1;
- // A workstation that connects to the phone for debugging is identified by
- // this key.
- optional string last_key_received = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
- optional string user_keys = 3 [ (android.privacy).dest = DEST_LOCAL ];
- optional string system_keys = 4 [ (android.privacy).dest = DEST_LOCAL ];
-}
-
-message UsbHostManagerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional android.content.ComponentNameProto default_usb_host_connection_handler = 1;
- repeated UsbDeviceProto devices = 2;
- optional int32 num_connects = 3;
- repeated UsbConnectionRecordProto connections = 4;
-}
-
-message UsbDeviceProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- // Generic USB name, not user-provided.
- optional string name = 1;
- // ID specific to the vendor, not the device.
- optional int32 vendor_id = 2;
- // ID of this product type: Each vendor gives each product a unique ID. E.g.
- // all mice of the same model would have the same ID.
- optional int32 product_id = 3;
- optional int32 class = 4;
- optional int32 subclass = 5;
- optional int32 protocol = 6;
- optional string manufacturer_name = 7;
- optional string product_name = 8;
- optional string version = 9;
- // Non-resettable hardware ID.
- optional string serial_number = 10 [ (android.privacy).dest = DEST_LOCAL ];
- repeated UsbConfigurationProto configurations = 11;
-}
-
-message UsbConfigurationProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- // A single USB device can have several configurations and the app accessing
- // the USB device can switch between them. At any time only one can be active.
- // Each configuration can present completely different interfaces end
- // endpoints, i.e. a completely different behavior.
- optional int32 id = 1;
- // Hardware-defined name, not set by the user.
- optional string name = 2;
- optional uint32 attributes = 3;
- optional int32 max_power = 4;
- repeated UsbInterfaceProto interfaces = 5;
-}
-
-message UsbInterfaceProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- // Hardware defined. This is the id used by the app to identify the interface.
- optional int32 id = 1;
- optional int32 alternate_settings = 2;
- optional string name = 3;
- optional int32 class = 4;
- optional int32 subclass = 5;
- optional int32 protocol = 6;
- repeated UsbEndPointProto endpoints = 7;
-}
-
-message UsbEndPointProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional int32 endpoint_number = 1;
- optional android.service.UsbEndPointDirection direction = 2;
- // The address of the endpoint. Needed to read and write to the endpoint.
- optional int32 address = 3;
- optional android.service.UsbEndPointType type = 4;
- optional uint32 attributes = 5;
- optional int32 max_packet_size = 6;
- optional int32 interval = 7;
-}
-
-message UsbConnectionRecordProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- // usb device's address, e.g. 001/002, nothing about the phone
- optional string device_address = 1;
- optional android.service.UsbConnectionRecordMode mode = 2;
- optional int64 timestamp = 3;
- optional int32 manufacturer = 4;
- optional int32 product = 5;
- optional UsbIsHeadsetProto is_headset = 6;
-}
-
-message UsbIsHeadsetProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional bool in = 1;
- optional bool out = 2;
-}
-
-message UsbPortManagerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional bool is_simulation_active = 1;
- repeated UsbPortInfoProto usb_ports = 2;
-}
-
-message UsbPortInfoProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional UsbPortProto port = 1;
- optional UsbPortStatusProto status = 2;
- optional bool can_change_mode = 3;
- optional bool can_change_power_role = 4;
- optional bool can_change_data_role = 5;
- optional int64 connected_at_millis = 6;
- optional int64 last_connect_duration_millis = 7;
-}
-
-message UsbPortProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- /* Same as android.hardware.usb.V1_1.Constants.PortMode_1_1 */
- enum Mode {
- MODE_NONE = 0;
- MODE_UFP = 1;
- MODE_DFP = 2;
- MODE_DRP = 3;
- MODE_AUDIO_ACCESSORY = 4;
- MODE_DEBUG_ACCESSORY = 8;
- }
-
- // ID of the port. A device (eg: Chromebooks) might have multiple ports.
- optional string id = 1;
- repeated Mode supported_modes = 2;
-}
-
-/* Same as android.hardware.usb.V1_2.Constants.ContaminantPresenceStatus */
-enum ContaminantPresenceStatus {
- CONTAMINANT_STATUS_UNKNOWN = 0;
- CONTAMINANT_STATUS_NOT_SUPPORTED = 1;
- CONTAMINANT_STATUS_DISABLED = 2;
- CONTAMINANT_STATUS_NOT_DETECTED = 3;
- CONTAMINANT_STATUS_DETECTED = 4;
-}
-
-message UsbPortStatusProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- /* Same as android.hardware.usb.V1_0.Constants.PortPowerRole */
- enum PowerRole {
- POWER_ROLE_NONE = 0;
- POWER_ROLE_SOURCE = 1;
- POWER_ROLE_SINK = 2;
- }
-
- /* Same as android.hardware.usb.V1_0.Constants.PortDataRole */
- enum DataRole {
- DATA_ROLE_NONE = 0;
- DATA_ROLE_HOST = 1;
- DATA_ROLE_DEVICE = 2;
- }
-
- optional bool connected = 1;
- optional UsbPortProto.Mode current_mode = 2;
- optional PowerRole power_role = 3;
- optional DataRole data_role = 4;
- repeated UsbPortStatusRoleCombinationProto role_combinations = 5;
- optional ContaminantPresenceStatus contaminant_presence_status = 6;
-}
-
-message UsbPortStatusRoleCombinationProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional UsbPortStatusProto.PowerRole power_role = 1;
- optional UsbPortStatusProto.DataRole data_role = 2;
-}
-
-message UsbAlsaManagerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional int32 cards_parser = 1;
- repeated UsbAlsaDeviceProto alsa_devices = 2;
- repeated UsbMidiDeviceProto midi_devices = 3;
-}
-
-message UsbAlsaDeviceProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional int32 card = 1;
- optional int32 device = 2;
- optional string name = 3;
- optional bool has_playback = 4;
- optional bool has_capture = 5;
- // usb device's address, e.g. 001/002, nothing about the phone
- optional string address = 6;
-}
-
-message UsbMidiDeviceProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional int32 card = 1;
- optional int32 device = 2;
- // usb device's address, e.g. 001/002, nothing about the phone
- optional string device_address = 3;
-}
-
-message UsbSettingsManagerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- repeated UsbUserSettingsManagerProto user_settings = 1;
- repeated UsbProfileGroupSettingsManagerProto profile_group_settings = 2;
-}
-
-message UsbUserSettingsManagerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional int32 user_id = 1;
- reserved 2; // previously device_permissions, now unused
- reserved 3; // previously accessory_permissions, now unused
- repeated UsbDeviceAttachedActivities device_attached_activities = 4;
- repeated UsbAccessoryAttachedActivities accessory_attached_activities = 5;
-}
-
-message UsbProfileGroupSettingsManagerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- // The user id of the personal profile if the device has a work profile.
- optional int32 parent_user_id = 1;
- repeated UsbSettingsDevicePreferenceProto device_preferences = 2;
- repeated UsbSettingsAccessoryPreferenceProto accessory_preferences = 3;
-}
-
-message UsbSettingsDevicePreferenceProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional UsbDeviceFilterProto filter = 1;
- optional UserPackageProto user_package = 2;
-}
-
-message UsbPermissionsManagerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- repeated UsbUserPermissionsManagerProto user_permissions = 1;
-}
-
-message UsbUserPermissionsManagerProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional int32 user_id = 1;
-
- repeated UsbDevicePermissionProto device_permissions = 2;
- repeated UsbAccessoryPermissionProto accessory_permissions = 3;
-
- repeated UsbDevicePersistentPermissionProto device_persistent_permissions = 4;
- repeated UsbAccessoryPersistentPermissionProto accessory_persistent_permissions = 5;
-}
-
-message UsbDevicePermissionProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- // Name of device set by manufacturer
- // All devices of the same model have the same name
- optional string device_name = 1;
- repeated int32 uids = 2;
-}
-
-message UsbAccessoryPermissionProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- // Description of accessory set by manufacturer
- // All accessories of the same model have the same description
- optional string accessory_description = 1;
- repeated int32 uids = 2;
-}
-
-message UsbDevicePersistentPermissionProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional UsbDeviceFilterProto device_filter = 1;
- repeated UsbUidPermissionProto permission_values = 2;
-}
-
-message UsbAccessoryPersistentPermissionProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional UsbAccessoryFilterProto accessory_filter = 1;
- repeated UsbUidPermissionProto permission_values = 2;
-}
-
-message UsbUidPermissionProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional int32 uid = 1;
- optional bool is_granted = 2;
-}
-
-message UsbDeviceFilterProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- // Mirrors the vendor_id of UsbDeviceProto.
- optional int32 vendor_id = 1;
- optional int32 product_id = 2;
- optional int32 class = 3;
- optional int32 subclass = 4;
- optional int32 protocol = 5;
- optional string manufacturer_name = 6;
- optional string product_name = 7;
- optional string serial_number = 8 [ (android.privacy).dest = DEST_EXPLICIT ];
-}
-
-message UserPackageProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional int32 user_id = 1;
- optional string package_name =2;
-}
-
-message UsbSettingsAccessoryPreferenceProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional UsbAccessoryFilterProto filter = 1;
- optional UserPackageProto user_package = 2;
-}
-
-message UsbAccessoryFilterProto {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional string manufacturer = 1;
- optional string model = 2;
- optional string version = 3;
-}
-
-message UsbDeviceAttachedActivities {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional android.content.ComponentNameProto activity = 1;
- repeated UsbDeviceFilterProto filters = 2;
-}
-
-message UsbAccessoryAttachedActivities {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- optional android.content.ComponentNameProto activity = 1;
- repeated UsbAccessoryFilterProto filters = 2;
-}
diff --git a/core/proto/android/stats/accessibility/accessibility_enums.proto b/core/proto/android/stats/accessibility/accessibility_enums.proto
deleted file mode 100644
index 5118ad5..0000000
--- a/core/proto/android/stats/accessibility/accessibility_enums.proto
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.stats.accessibility;
-option java_multiple_files = true;
-
-// The entry point of the accessibility shortcut.
-enum ShortcutType {
- UNKNOWN_TYPE = 0;
- A11Y_BUTTON = 1;
- VOLUME_KEY = 2;
- TRIPLE_TAP = 3;
- A11Y_BUTTON_LONG_PRESS = 4;
-}
-
-// The service status code.
-enum ServiceStatus {
- UNKNOWN = 0;
- ENABLED = 1;
- DISABLED = 2;
-}
\ No newline at end of file
diff --git a/core/proto/android/stats/connectivity/Android.bp b/core/proto/android/stats/connectivity/Android.bp
deleted file mode 100644
index 5e6ac3c..0000000
--- a/core/proto/android/stats/connectivity/Android.bp
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (C) 2019 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-java_library_static {
- name: "networkstackprotos",
- proto: {
- type: "lite",
- },
- srcs: [
- "network_stack.proto",
- ],
- sdk_version: "system_29",
-}
-
-java_library_static {
- name: "tetheringprotos",
- proto: {
- type: "lite",
- },
- srcs: [
- "tethering.proto",
- ],
- apex_available: [
- "com.android.tethering",
- ],
- sdk_version: "system_current",
-}
diff --git a/core/proto/android/stats/connectivity/network_stack.proto b/core/proto/android/stats/connectivity/network_stack.proto
deleted file mode 100644
index e9726d7..0000000
--- a/core/proto/android/stats/connectivity/network_stack.proto
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.connectivity;
-option java_multiple_files = true;
-option java_outer_classname = "NetworkStackProto";
-
-enum DhcpRenewResult {
- RR_UNKNOWN = 0;
- RR_SUCCESS = 1;
- RR_ERROR_NAK = 2;
- RR_ERROR_IP_MISMATCH = 3;
- RR_ERROR_IP_EXPIRE = 4;
-}
-
-enum DisconnectCode {
- DC_NONE = 0;
- DC_NORMAL_TERMINATION = 1;
- DC_PROVISIONING_FAIL = 2;
- DC_ERROR_STARTING_IPV4 = 4;
- DC_ERROR_STARTING_IPV6 = 5;
- DC_ERROR_STARTING_IPREACHABILITYMONITOR = 6;
- DC_INVALID_PROVISIONING = 7;
- DC_INTERFACE_NOT_FOUND = 8;
- DC_PROVISIONING_TIMEOUT = 9;
-}
-
-enum TransportType {
- TT_UNKNOWN = 0;
- // Indicates this network uses a Cellular transport
- TT_CELLULAR = 1;
- // Indicates this network uses a Wi-Fi transport
- TT_WIFI = 2;
- // Indicates this network uses a Bluetooth transport
- TT_BLUETOOTH = 3;
- // Indicates this network uses an Ethernet transport
- TT_ETHERNET = 4;
- // Indicates this network uses a Wi-Fi Aware transport
- TT_WIFI_AWARE = 5;
- // Indicates this network uses a LoWPAN transport
- TT_LOWPAN = 6;
- // Indicates this network uses a Cellular+VPN transport
- TT_CELLULAR_VPN = 7;
- // Indicates this network uses a Wi-Fi+VPN transport
- TT_WIFI_VPN = 8;
- // Indicates this network uses a Bluetooth+VPN transport
- TT_BLUETOOTH_VPN = 9;
- // Indicates this network uses an Ethernet+VPN transport
- TT_ETHERNET_VPN = 10;
- // Indicates this network uses a Wi-Fi+Cellular+VPN transport
- TT_WIFI_CELLULAR_VPN = 11;
- // Indicates this network uses for test only
- TT_TEST = 12;
-}
-
-enum DhcpFeature {
- DF_UNKNOWN = 0;
- // DHCP INIT-REBOOT state
- DF_INITREBOOT = 1;
- // DHCP rapid commit option
- DF_RAPIDCOMMIT = 2;
- // Duplicate address detection
- DF_DAD = 3;
- // Fast initial Link setup
- DF_FILS = 4;
-}
-
-enum HostnameTransResult {
- HTR_UNKNOWN = 0;
- HTR_SUCCESS = 1;
- HTR_FAILURE = 2;
- HTR_DISABLE = 3;
-}
-
-enum ProbeResult {
- PR_UNKNOWN = 0;
- PR_SUCCESS = 1;
- PR_FAILURE = 2;
- PR_PORTAL = 3;
- // DNS query for the probe host returned a private IP address
- PR_PRIVATE_IP_DNS = 4;
-}
-
-enum ValidationResult {
- VR_UNKNOWN = 0;
- VR_SUCCESS = 1;
- VR_FAILURE = 2;
- VR_PORTAL = 3;
- VR_PARTIAL = 4;
-}
-
-enum ProbeType {
- PT_UNKNOWN = 0;
- PT_DNS = 1;
- PT_HTTP = 2;
- PT_HTTPS = 3;
- PT_PAC = 4;
- PT_FALLBACK = 5;
- PT_PRIVDNS = 6;
- PT_CAPPORT_API = 7;
-}
-
-// The Dhcp error code is defined in android.net.metrics.DhcpErrorEvent
-enum DhcpErrorCode {
- ET_UNKNOWN = 0;
- ET_L2_ERROR = 1;
- ET_L3_ERROR = 2;
- ET_L4_ERROR = 3;
- ET_DHCP_ERROR = 4;
- ET_MISC_ERROR = 5;
- /* Reserve for error type
- // ET_L2_ERROR_TYPE = ET_L2_ERROR << 8;
- ET_L2_ERROR_TYPE = 256;
- // ET_L3_ERROR_TYPE = ET_L3_ERROR << 8;
- ET_L3_ERROR_TYPE = 512;
- // ET_L4_ERROR_TYPE = ET_L4_ERROR << 8;
- ET_L4_ERROR_TYPE = 768;
- // ET_DHCP_ERROR_TYPE = ET_DHCP_ERROR << 8;
- ET_DHCP_ERROR_TYPE = 1024;
- // ET_MISC_ERROR_TYPE = ET_MISC_ERROR << 8;
- ET_MISC_ERROR_TYPE = 1280;
- */
- // ET_L2_TOO_SHORT = (ET_L2_ERROR_TYPE | 0x1) << 16;
- ET_L2_TOO_SHORT = 16842752;
- // ET_L2_WRONG_ETH_TYPE = (ET_L2_ERROR_TYPE | 0x2) << 16;
- ET_L2_WRONG_ETH_TYPE = 16908288;
- // ET_L3_TOO_SHORT = (ET_L3_ERROR_TYPE | 0x1) << 16;
- ET_L3_TOO_SHORT = 33619968;
- // ET_L3_NOT_IPV4 = (ET_L3_ERROR_TYPE | 0x2) << 16;
- ET_L3_NOT_IPV4 = 33685504;
- // ET_L3_INVALID_IP = (ET_L3_ERROR_TYPE | 0x3) << 16;
- ET_L3_INVALID_IP = 33751040;
- // ET_L4_NOT_UDP = (ET_L4_ERROR_TYPE | 0x1) << 16;
- ET_L4_NOT_UDP = 50397184;
- // ET_L4_WRONG_PORT = (ET_L4_ERROR_TYPE | 0x2) << 16;
- ET_L4_WRONG_PORT = 50462720;
- // ET_BOOTP_TOO_SHORT = (ET_DHCP_ERROR_TYPE | 0x1) << 16;
- ET_BOOTP_TOO_SHORT = 67174400;
- // ET_DHCP_BAD_MAGIC_COOKIE = (ET_DHCP_ERROR_TYPE | 0x2) << 16;
- ET_DHCP_BAD_MAGIC_COOKIE = 67239936;
- // ET_DHCP_INVALID_OPTION_LENGTH = (ET_DHCP_ERROR_TYPE | 0x3) << 16;
- ET_DHCP_INVALID_OPTION_LENGTH = 67305472;
- // ET_DHCP_NO_MSG_TYPE = (ET_DHCP_ERROR_TYPE | 0x4) << 16;
- ET_DHCP_NO_MSG_TYPE = 67371008;
- // ET_DHCP_UNKNOWN_MSG_TYPE = (ET_DHCP_ERROR_TYPE | 0x5) << 16;
- ET_DHCP_UNKNOWN_MSG_TYPE = 67436544;
- // ET_DHCP_NO_COOKIE = (ET_DHCP_ERROR_TYPE | 0x6) << 16;
- ET_DHCP_NO_COOKIE = 67502080;
- // ET_BUFFER_UNDERFLOW = (ET_MISC_ERROR_TYPE | 0x1) << 16;
- ET_BUFFER_UNDERFLOW = 83951616;
- // ET_RECEIVE_ERROR = (ET_MISC_ERROR_TYPE | 0x2) << 16;
- ET_RECEIVE_ERROR = 84017152;
- // ET_PARSING_ERROR = (ET_MISC_ERROR_TYPE | 0x3) << 16;
- ET_PARSING_ERROR = 84082688;
-}
-
-enum NetworkQuirkEvent {
- QE_UNKNOWN = 0;
- QE_IPV6_PROVISIONING_ROUTER_LOST = 1;
-}
-
-message NetworkStackEventData {
-
-}
-
diff --git a/core/proto/android/stats/connectivity/tethering.proto b/core/proto/android/stats/connectivity/tethering.proto
deleted file mode 100644
index 13f0b8c..0000000
--- a/core/proto/android/stats/connectivity/tethering.proto
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto2";
-package android.stats.connectivity;
-option java_multiple_files = true;
-option java_outer_classname = "TetheringProto";
-
-enum ErrorCode {
- EC_NO_ERROR = 0;
- EC_UNKNOWN_IFACE = 1;
- EC_SERVICE_UNAVAIL = 2;
- EC_UNSUPPORTED = 3;
- EC_UNAVAIL_IFACE = 4;
- EC_INTERNAL_ERROR = 5;
- EC_TETHER_IFACE_ERROR = 6;
- EC_UNTETHER_IFACE_ERROR = 7;
- EC_ENABLE_FORWARDING_ERROR = 8;
- EC_DISABLE_FORWARDING_ERROR = 9;
- EC_IFACE_CFG_ERROR = 10;
- EC_PROVISIONING_FAILED = 11;
- EC_DHCPSERVER_ERROR = 12;
- EC_ENTITLEMENT_UNKNOWN = 13;
- EC_NO_CHANGE_TETHERING_PERMISSION = 14;
- EC_NO_ACCESS_TETHERING_PERMISSION = 15;
- EC_UNKNOWN_TYPE = 16;
-}
-
-enum DownstreamType {
- // Unspecific tethering type.
- DS_UNSPECIFIED = 0;
- // Wifi tethering type.
- DS_TETHERING_WIFI = 1;
- // USB tethering type.
- DS_TETHERING_USB = 2;
- // Bluetooth tethering type.
- DS_TETHERING_BLUETOOTH = 3;
- // Wifi P2p tethering type.
- DS_TETHERING_WIFI_P2P = 4;
- // NCM (Network Control Model) local tethering type.
- DS_TETHERING_NCM = 5;
- // Ethernet tethering type.
- DS_TETHERING_ETHERNET = 6;
-}
-
-enum UpstreamType {
- UT_UNKNOWN = 0;
- // Indicates upstream using a Cellular transport.
- UT_CELLULAR = 1;
- // Indicates upstream using a Wi-Fi transport.
- UT_WIFI = 2;
- // Indicates upstream using a Bluetooth transport.
- UT_BLUETOOTH = 3;
- // Indicates upstream using an Ethernet transport.
- UT_ETHERNET = 4;
- // Indicates upstream using a Wi-Fi Aware transport.
- UT_WIFI_AWARE = 5;
- // Indicates upstream using a LoWPAN transport.
- UT_LOWPAN = 6;
- // Indicates upstream using a Cellular+VPN transport.
- UT_CELLULAR_VPN = 7;
- // Indicates upstream using a Wi-Fi+VPN transport.
- UT_WIFI_VPN = 8;
- // Indicates upstream using a Bluetooth+VPN transport.
- UT_BLUETOOTH_VPN = 9;
- // Indicates upstream using an Ethernet+VPN transport.
- UT_ETHERNET_VPN = 10;
- // Indicates upstream using a Wi-Fi+Cellular+VPN transport.
- UT_WIFI_CELLULAR_VPN = 11;
- // Indicates upstream using for test only.
- UT_TEST = 12;
- // Indicates upstream using DUN capability + Cellular transport.
- UT_DUN_CELLULAR = 13;
-}
-
-enum UserType {
- // Unknown.
- USER_UNKNOWN = 0;
- // Settings.
- USER_SETTINGS = 1;
- // System UI.
- USER_SYSTEMUI = 2;
- // Google mobile service.
- USER_GMS = 3;
-}
diff --git a/core/proto/android/stats/devicepolicy/Android.bp b/core/proto/android/stats/devicepolicy/Android.bp
deleted file mode 100644
index 5fb278a..0000000
--- a/core/proto/android/stats/devicepolicy/Android.bp
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-java_library_static {
- name: "devicepolicyprotosnano",
- proto: {
- type: "nano",
- },
- srcs: [
- "*.proto",
- ],
- java_version: "1.8",
- target: {
- android: {
- jarjar_rules: "jarjar-rules.txt",
- },
- host: {
- static_libs: ["libprotobuf-java-nano"],
- }
- },
- sdk_version: "core_platform",
-}
diff --git a/core/proto/android/stats/devicepolicy/device_policy.proto b/core/proto/android/stats/devicepolicy/device_policy.proto
deleted file mode 100644
index af30cf3..0000000
--- a/core/proto/android/stats/devicepolicy/device_policy.proto
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.devicepolicy;
-option java_multiple_files = true;
-
-message StringList {
- repeated string string_value = 1;
-}
diff --git a/core/proto/android/stats/devicepolicy/device_policy_enums.proto b/core/proto/android/stats/devicepolicy/device_policy_enums.proto
deleted file mode 100644
index 7c1a049..0000000
--- a/core/proto/android/stats/devicepolicy/device_policy_enums.proto
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.devicepolicy;
-option java_multiple_files = true;
-
-/**
- * Id for device policy features.
- */
-enum EventId {
- SET_PASSWORD_QUALITY = 1;
- SET_PASSWORD_MINIMUM_LENGTH = 2;
- SET_PASSWORD_MINIMUM_NUMERIC = 3;
- SET_PASSWORD_MINIMUM_NON_LETTER = 4;
- SET_PASSWORD_MINIMUM_LETTERS = 5;
- SET_PASSWORD_MINIMUM_LOWER_CASE = 6;
- SET_PASSWORD_MINIMUM_UPPER_CASE = 7;
- SET_PASSWORD_MINIMUM_SYMBOLS = 8;
- SET_KEYGUARD_DISABLED_FEATURES = 9;
- LOCK_NOW = 10;
- WIPE_DATA_WITH_REASON = 11;
- ADD_USER_RESTRICTION = 12;
- REMOVE_USER_RESTRICTION = 13;
- SET_SECURE_SETTING = 14;
- SET_SECURITY_LOGGING_ENABLED = 15;
- RETRIEVE_SECURITY_LOGS = 16;
- RETRIEVE_PRE_REBOOT_SECURITY_LOGS = 17;
- SET_PERMISSION_POLICY = 18;
- SET_PERMISSION_GRANT_STATE = 19;
- INSTALL_KEY_PAIR = 20;
- INSTALL_CA_CERT = 21;
- CHOOSE_PRIVATE_KEY_ALIAS = 22;
- REMOVE_KEY_PAIR = 23;
- UNINSTALL_CA_CERTS = 24;
- SET_CERT_INSTALLER_PACKAGE = 25;
- SET_ALWAYS_ON_VPN_PACKAGE = 26;
- SET_PERMITTED_INPUT_METHODS = 27;
- SET_PERMITTED_ACCESSIBILITY_SERVICES = 28;
- SET_SCREEN_CAPTURE_DISABLED = 29;
- SET_CAMERA_DISABLED = 30;
- QUERY_SUMMARY_FOR_USER = 31;
- QUERY_SUMMARY = 32;
- QUERY_DETAILS = 33;
- REBOOT = 34;
- SET_MASTER_VOLUME_MUTED = 35;
- SET_AUTO_TIME_REQUIRED = 36;
- SET_KEYGUARD_DISABLED = 37;
- SET_STATUS_BAR_DISABLED = 38;
- SET_ORGANIZATION_COLOR = 39;
- SET_PROFILE_NAME = 40;
- SET_USER_ICON = 41;
- SET_DEVICE_OWNER_LOCK_SCREEN_INFO = 42;
- SET_SHORT_SUPPORT_MESSAGE = 43;
- SET_LONG_SUPPORT_MESSAGE = 44;
- SET_CROSS_PROFILE_CONTACTS_SEARCH_DISABLED = 45;
- SET_CROSS_PROFILE_CALLER_ID_DISABLED = 46;
- SET_BLUETOOTH_CONTACT_SHARING_DISABLED = 47;
- ADD_CROSS_PROFILE_INTENT_FILTER = 48;
- ADD_CROSS_PROFILE_WIDGET_PROVIDER = 49;
- SET_SYSTEM_UPDATE_POLICY = 50;
- SET_LOCKTASK_MODE_ENABLED = 51;
- ADD_PERSISTENT_PREFERRED_ACTIVITY = 52;
- REQUEST_BUGREPORT = 53;
- GET_WIFI_MAC_ADDRESS = 54;
- REQUEST_QUIET_MODE_ENABLED = 55;
- WORK_PROFILE_LOCATION_CHANGED = 56;
- DO_USER_INFO_CLICKED = 57;
- TRANSFER_OWNERSHIP = 58;
- GENERATE_KEY_PAIR = 59;
- SET_KEY_PAIR_CERTIFICATE = 60;
- SET_KEEP_UNINSTALLED_PACKAGES = 61;
- SET_APPLICATION_RESTRICTIONS = 62;
- SET_APPLICATION_HIDDEN = 63;
- ENABLE_SYSTEM_APP = 64;
- ENABLE_SYSTEM_APP_WITH_INTENT = 65;
- INSTALL_EXISTING_PACKAGE = 66;
- SET_UNINSTALL_BLOCKED = 67;
- SET_PACKAGES_SUSPENDED = 68;
- ON_LOCK_TASK_MODE_ENTERING = 69;
- SET_CROSS_PROFILE_CALENDAR_PACKAGES = 70;
- GET_USER_PASSWORD_COMPLEXITY_LEVEL = 72;
- INSTALL_SYSTEM_UPDATE = 73;
- INSTALL_SYSTEM_UPDATE_ERROR = 74;
- IS_MANAGED_KIOSK = 75;
- IS_UNATTENDED_MANAGED_KIOSK = 76;
- PROVISIONING_MANAGED_PROFILE_ON_FULLY_MANAGED_DEVICE = 77;
- PROVISIONING_PERSISTENT_DEVICE_OWNER = 78;
-
- // existing Tron logs to be migrated to statsd
- PROVISIONING_ENTRY_POINT_NFC = 79;
- PROVISIONING_ENTRY_POINT_QR_CODE = 80;
- PROVISIONING_ENTRY_POINT_CLOUD_ENROLLMENT = 81;
- PROVISIONING_ENTRY_POINT_ADB = 82;
- PROVISIONING_ENTRY_POINT_TRUSTED_SOURCE = 83;
- PROVISIONING_DPC_PACKAGE_NAME = 84;
- PROVISIONING_DPC_INSTALLED_BY_PACKAGE = 85;
- PROVISIONING_PROVISIONING_ACTIVITY_TIME_MS = 86;
- PROVISIONING_PREPROVISIONING_ACTIVITY_TIME_MS = 87;
- PROVISIONING_ENCRYPT_DEVICE_ACTIVITY_TIME_MS = 88;
- PROVISIONING_WEB_ACTIVITY_TIME_MS = 89;
- PROVISIONING_TRAMPOLINE_ACTIVITY_TIME_MS = 90 [deprecated=true];
- PROVISIONING_POST_ENCRYPTION_ACTIVITY_TIME_MS = 91 [deprecated=true];
- PROVISIONING_FINALIZATION_ACTIVITY_TIME_MS = 92 [deprecated=true];
- PROVISIONING_NETWORK_TYPE = 93;
- PROVISIONING_ACTION = 94;
- PROVISIONING_EXTRAS = 95;
- PROVISIONING_COPY_ACCOUNT_TASK_MS = 96;
- PROVISIONING_CREATE_PROFILE_TASK_MS = 97;
- PROVISIONING_START_PROFILE_TASK_MS = 98;
- PROVISIONING_DOWNLOAD_PACKAGE_TASK_MS = 99;
- PROVISIONING_INSTALL_PACKAGE_TASK_MS = 100;
- PROVISIONING_CANCELLED = 101;
- PROVISIONING_ERROR = 102;
- PROVISIONING_COPY_ACCOUNT_STATUS = 103;
- PROVISIONING_TOTAL_TASK_TIME_MS = 104;
- PROVISIONING_SESSION_STARTED = 105;
- PROVISIONING_SESSION_COMPLETED = 106;
- PROVISIONING_TERMS_ACTIVITY_TIME_MS = 107;
- PROVISIONING_TERMS_COUNT = 108;
- PROVISIONING_TERMS_READ = 109;
-
- SEPARATE_PROFILE_CHALLENGE_CHANGED = 110;
- SET_GLOBAL_SETTING = 111;
- INSTALL_PACKAGE = 112;
- UNINSTALL_PACKAGE = 113;
- WIFI_SERVICE_ADD_NETWORK_SUGGESTIONS = 114;
- WIFI_SERVICE_ADD_OR_UPDATE_NETWORK = 115;
- QUERY_SUMMARY_FOR_DEVICE = 116;
- REMOVE_CROSS_PROFILE_WIDGET_PROVIDER = 117;
- ESTABLISH_VPN = 118;
- SET_NETWORK_LOGGING_ENABLED = 119;
- RETRIEVE_NETWORK_LOGS = 120;
- PROVISIONING_PREPARE_TOTAL_TIME_MS = 121;
- PROVISIONING_PREPARE_STARTED = 122;
- PROVISIONING_PREPARE_COMPLETED = 123;
- PROVISIONING_FLOW_TYPE = 124;
- CROSS_PROFILE_APPS_GET_TARGET_USER_PROFILES = 125;
- CROSS_PROFILE_APPS_START_ACTIVITY_AS_USER = 126;
- SET_AUTO_TIME = 127;
- SET_AUTO_TIME_ZONE = 128;
- SET_USER_CONTROL_DISABLED_PACKAGES = 129;
- SET_FACTORY_RESET_PROTECTION = 130;
- SET_COMMON_CRITERIA_MODE = 131;
- ALLOW_MODIFICATION_OF_ADMIN_CONFIGURED_NETWORKS = 132;
- SET_TIME = 133;
- SET_TIME_ZONE = 134;
- SET_PERSONAL_APPS_SUSPENDED = 135;
- SET_MANAGED_PROFILE_MAXIMUM_TIME_OFF = 136;
- COMP_TO_ORG_OWNED_PO_MIGRATED = 137;
- SET_CROSS_PROFILE_PACKAGES = 138;
- SET_INTERACT_ACROSS_PROFILES_APP_OP = 139;
- GET_CROSS_PROFILE_PACKAGES = 140;
- CAN_REQUEST_INTERACT_ACROSS_PROFILES_TRUE = 141;
- CAN_REQUEST_INTERACT_ACROSS_PROFILES_FALSE_NO_PROFILES = 142;
- CAN_REQUEST_INTERACT_ACROSS_PROFILES_FALSE_WHITELIST = 143;
- CAN_REQUEST_INTERACT_ACROSS_PROFILES_FALSE_PERMISSION = 144;
- CAN_INTERACT_ACROSS_PROFILES_TRUE = 145;
- CAN_INTERACT_ACROSS_PROFILES_FALSE_PERMISSION = 146;
- CAN_INTERACT_ACROSS_PROFILES_FALSE_NO_PROFILES = 147;
- CREATE_CROSS_PROFILE_INTENT = 148;
- IS_MANAGED_PROFILE = 149;
- START_ACTIVITY_BY_INTENT = 150;
- BIND_CROSS_PROFILE_SERVICE = 151;
- PROVISIONING_DPC_SETUP_STARTED = 152;
- PROVISIONING_DPC_SETUP_COMPLETED = 153;
- PROVISIONING_ORGANIZATION_OWNED_MANAGED_PROFILE = 154;
- RESOLVER_CROSS_PROFILE_TARGET_OPENED = 155;
- RESOLVER_SWITCH_TABS = 156;
- RESOLVER_EMPTY_STATE_WORK_APPS_DISABLED = 157;
- RESOLVER_EMPTY_STATE_NO_SHARING_TO_PERSONAL= 158;
- RESOLVER_EMPTY_STATE_NO_SHARING_TO_WORK= 159;
- RESOLVER_EMPTY_STATE_NO_APPS_RESOLVED= 160;
- RESOLVER_AUTOLAUNCH_CROSS_PROFILE_TARGET = 161;
- CROSS_PROFILE_SETTINGS_PAGE_LAUNCHED_FROM_APP = 162;
- CROSS_PROFILE_SETTINGS_PAGE_LAUNCHED_FROM_SETTINGS = 163;
- CROSS_PROFILE_SETTINGS_PAGE_ADMIN_RESTRICTED = 164;
- CROSS_PROFILE_SETTINGS_PAGE_MISSING_WORK_APP = 165;
- CROSS_PROFILE_SETTINGS_PAGE_MISSING_PERSONAL_APP = 166;
- CROSS_PROFILE_SETTINGS_PAGE_MISSING_INSTALL_BANNER_INTENT = 167;
- CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_CLICKED = 168;
- CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_NO_INTENT_CLICKED = 169;
- CROSS_PROFILE_SETTINGS_PAGE_USER_CONSENTED = 170;
- CROSS_PROFILE_SETTINGS_PAGE_USER_DECLINED_CONSENT = 171;
- CROSS_PROFILE_SETTINGS_PAGE_PERMISSION_REVOKED = 172;
- DOCSUI_EMPTY_STATE_NO_PERMISSION = 173;
- DOCSUI_EMPTY_STATE_QUIET_MODE = 174;
- DOCSUI_LAUNCH_OTHER_APP = 175;
- DOCSUI_PICK_RESULT = 176;
-}
diff --git a/core/proto/android/stats/devicepolicy/jarjar-rules.txt b/core/proto/android/stats/devicepolicy/jarjar-rules.txt
deleted file mode 100644
index 40043a86..0000000
--- a/core/proto/android/stats/devicepolicy/jarjar-rules.txt
+++ /dev/null
@@ -1 +0,0 @@
-rule com.google.protobuf.nano.** com.android.framework.protobuf.nano.@1
diff --git a/core/proto/android/stats/dnsresolver/Android.bp b/core/proto/android/stats/dnsresolver/Android.bp
deleted file mode 100644
index 1e8c763..0000000
--- a/core/proto/android/stats/dnsresolver/Android.bp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (C) 2019 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-java_library_static {
- name: "dnsresolverprotosnano",
- proto: {
- type: "nano",
- },
- srcs: [
- "dns_resolver.proto",
- ],
- sdk_version: "system_current",
-}
diff --git a/core/proto/android/stats/dnsresolver/dns_resolver.proto b/core/proto/android/stats/dnsresolver/dns_resolver.proto
deleted file mode 100644
index b17d12c..0000000
--- a/core/proto/android/stats/dnsresolver/dns_resolver.proto
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto2";
-package android.stats.dnsresolver;
-
-enum EventType {
- EVENT_UNKNOWN = 0;
- EVENT_GETADDRINFO = 1;
- EVENT_GETHOSTBYNAME = 2;
- EVENT_GETHOSTBYADDR = 3;
- EVENT_RES_NSEND = 4;
-}
-
-// The return value of the DNS resolver for each DNS lookups.
-// bionic/libc/include/netdb.h
-// system/netd/resolv/include/netd_resolv/resolv.h
-enum ReturnCode {
- RC_EAI_NO_ERROR = 0;
- RC_EAI_ADDRFAMILY = 1;
- RC_EAI_AGAIN = 2;
- RC_EAI_BADFLAGS = 3;
- RC_EAI_FAIL = 4;
- RC_EAI_FAMILY = 5;
- RC_EAI_MEMORY = 6;
- RC_EAI_NODATA = 7;
- RC_EAI_NONAME = 8;
- RC_EAI_SERVICE = 9;
- RC_EAI_SOCKTYPE = 10;
- RC_EAI_SYSTEM = 11;
- RC_EAI_BADHINTS = 12;
- RC_EAI_PROTOCOL = 13;
- RC_EAI_OVERFLOW = 14;
- RC_RESOLV_INTERNAL_ERROR = 254;
- RC_RESOLV_TIMEOUT = 255;
- RC_EAI_MAX = 256;
-}
-
-enum NsRcode {
- NS_R_NO_ERROR = 0; // No error occurred.
- NS_R_FORMERR = 1; // Format error.
- NS_R_SERVFAIL = 2; // Server failure.
- NS_R_NXDOMAIN = 3; // Name error.
- NS_R_NOTIMPL = 4; // Unimplemented.
- NS_R_REFUSED = 5; // Operation refused.
- // these are for BIND_UPDATE
- NS_R_YXDOMAIN = 6; // Name exists
- NS_R_YXRRSET = 7; // RRset exists
- NS_R_NXRRSET = 8; // RRset does not exist
- NS_R_NOTAUTH = 9; // Not authoritative for zone
- NS_R_NOTZONE = 10; // Zone of record different from zone section
- NS_R_MAX = 11;
- // Define rcode=12~15(UNASSIGNED) in rcode enum type.
- // Some DNS Servers might return undefined code to devices.
- // Without the enum definition, that would be noise for our dashboard.
- NS_R_UNASSIGNED12 = 12; // Unassigned
- NS_R_UNASSIGNED13 = 13; // Unassigned
- NS_R_UNASSIGNED14 = 14; // Unassigned
- NS_R_UNASSIGNED15 = 15; // Unassigned
- // The following are EDNS extended rcodes
- NS_R_BADVERS = 16;
- // The following are TSIG errors
- // NS_R_BADSIG = 16,
- NS_R_BADKEY = 17;
- NS_R_BADTIME = 18;
- NS_R_INTERNAL_ERROR = 254;
- NS_R_TIMEOUT = 255;
-}
-
-// Currently defined type values for resources and queries.
-enum NsType {
- NS_T_INVALID = 0; // Cookie.
- NS_T_A = 1; // Host address.
- NS_T_NS = 2; // Authoritative server.
- NS_T_MD = 3; // Mail destination.
- NS_T_MF = 4; // Mail forwarder.
- NS_T_CNAME = 5; // Canonical name.
- NS_T_SOA = 6; // Start of authority zone.
- NS_T_MB = 7; // Mailbox domain name.
- NS_T_MG = 8; // Mail group member.
- NS_T_MR = 9; // Mail rename name.
- NS_T_NULL = 10; // Null resource record.
- NS_T_WKS = 11; // Well known service.
- NS_T_PTR = 12; // Domain name pointer.
- NS_T_HINFO = 13; // Host information.
- NS_T_MINFO = 14; // Mailbox information.
- NS_T_MX = 15; // Mail routing information.
- NS_T_TXT = 16; // Text strings.
- NS_T_RP = 17; // Responsible person.
- NS_T_AFSDB = 18; // AFS cell database.
- NS_T_X25 = 19; // X_25 calling address.
- NS_T_ISDN = 20; // ISDN calling address.
- NS_T_RT = 21; // Router.
- NS_T_NSAP = 22; // NSAP address.
- NS_T_NSAP_PTR = 23; // Reverse NSAP lookup (deprecated).
- NS_T_SIG = 24; // Security signature.
- NS_T_KEY = 25; // Security key.
- NS_T_PX = 26; // X.400 mail mapping.
- NS_T_GPOS = 27; // Geographical position (withdrawn).
- NS_T_AAAA = 28; // IPv6 Address.
- NS_T_LOC = 29; // Location Information.
- NS_T_NXT = 30; // Next domain (security).
- NS_T_EID = 31; // Endpoint identifier.
- NS_T_NIMLOC = 32; // Nimrod Locator.
- NS_T_SRV = 33; // Server Selection.
- NS_T_ATMA = 34; // ATM Address
- NS_T_NAPTR = 35; // Naming Authority PoinTeR
- NS_T_KX = 36; // Key Exchange
- NS_T_CERT = 37; // Certification record
- NS_T_A6 = 38; // IPv6 address (experimental)
- NS_T_DNAME = 39; // Non-terminal DNAME
- NS_T_SINK = 40; // Kitchen sink (experimentatl)
- NS_T_OPT = 41; // EDNS0 option (meta-RR)
- NS_T_APL = 42; // Address prefix list (RFC 3123)
- NS_T_DS = 43; // Delegation Signer
- NS_T_SSHFP = 44; // SSH Fingerprint
- NS_T_IPSECKEY = 45; // IPSEC Key
- NS_T_RRSIG = 46; // RRset Signature
- NS_T_NSEC = 47; // Negative security
- NS_T_DNSKEY = 48; // DNS Key
- NS_T_DHCID = 49; // Dynamic host configuratin identifier
- NS_T_NSEC3 = 50; // Negative security type 3
- NS_T_NSEC3PARAM = 51; // Negative security type 3 parameters
- NS_T_HIP = 55; // Host Identity Protocol
- NS_T_SPF = 99; // Sender Policy Framework
- NS_T_TKEY = 249; // Transaction key
- NS_T_TSIG = 250; // Transaction signature.
- NS_T_IXFR = 251; // Incremental zone transfer.
- NS_T_AXFR = 252; // Transfer zone of authority.
- NS_T_MAILB = 253; // Transfer mailbox records.
- NS_T_MAILA = 254; // Transfer mail agent records.
- NS_T_ANY = 255; // Wildcard match.
- NS_T_ZXFR = 256; // BIND-specific, nonstandard.
- NS_T_DLV = 32769; // DNSSEC look-aside validatation.
- NS_T_MAX = 65536;
-}
-
-enum IpVersion {
- IV_UNKNOWN = 0;
- IV_IPV4 = 1;
- IV_IPV6 = 2;
-}
-
-enum Protocol {
- PROTO_UNKNOWN = 0;
- PROTO_UDP = 1;
- PROTO_TCP = 2;
- PROTO_DOT = 3;
-}
-
-enum PrivateDnsModes {
- PDM_UNKNOWN = 0;
- PDM_OFF = 1;
- PDM_OPPORTUNISTIC = 2;
- PDM_STRICT = 3;
-}
-
-enum NetworkType {
- NT_UNKNOWN = 0;
- // Indicates this network uses a Cellular transport.
- NT_CELLULAR = 1;
- // Indicates this network uses a Wi-Fi transport.
- NT_WIFI = 2;
- // Indicates this network uses a Bluetooth transport.
- NT_BLUETOOTH = 3;
- // Indicates this network uses an Ethernet transport.
- NT_ETHERNET = 4;
- // Indicates this network uses a VPN transport, now deprecated.
- NT_VPN = 5 [deprecated=true];
- // Indicates this network uses a Wi-Fi Aware transport.
- NT_WIFI_AWARE = 6;
- // Indicates this network uses a LoWPAN transport.
- NT_LOWPAN = 7;
- // Indicates this network uses a Cellular+VPN transport.
- NT_CELLULAR_VPN = 8;
- // Indicates this network uses a Wi-Fi+VPN transport.
- NT_WIFI_VPN = 9;
- // Indicates this network uses a Bluetooth+VPN transport.
- NT_BLUETOOTH_VPN = 10;
- // Indicates this network uses an Ethernet+VPN transport.
- NT_ETHERNET_VPN = 11;
- // Indicates this network uses a Wi-Fi+Cellular+VPN transport.
- NT_WIFI_CELLULAR_VPN = 12;
-}
-
-enum CacheStatus{
- // the cache can't handle that kind of queries.
- // or the answer buffer is too small.
- CS_UNSUPPORTED = 0;
- // the cache doesn't know about this query.
- CS_NOTFOUND = 1;
- // the cache found the answer.
- CS_FOUND = 2;
- // Don't do anything on cache.
- CS_SKIP = 3;
-}
-
-// The enum LinuxErrno is defined in the following 2 files.
-// 1. bionic/libc/kernel/uapi/asm-generic/errno-base.h
-// 2. bionic/libc/kernel/uapi/asm-generic/errno.h
-enum LinuxErrno {
- SYS_NO_ERROR = 0;
- SYS_EPERM = 1; // Not super-user
- SYS_ENOENT = 2; // No such file or directory
- SYS_ESRCH = 3; // No such process
- SYS_EINTR = 4; // Interrupted system call
- SYS_EIO = 5; // I/O error
- SYS_ENXIO = 6; // No such device or address
- SYS_E2BIG = 7; // Arg list too long
- SYS_ENOEXEC = 8; // Exec format error
- SYS_EBADF = 9; // Bad file number
- SYS_ECHILD = 10; // No children
- SYS_EAGAIN = 11; // No more processes
- SYS_ENOMEM = 12; // Not enough core
- SYS_EACCES = 13; // Permission denied
- SYS_EFAULT = 14; // Bad address
- SYS_ENOTBLK = 15; // Block device required
- SYS_EBUSY = 16; // Mount device busy
- SYS_EEXIST = 17; // File exists
- SYS_EXDEV = 18; // Cross-device link
- SYS_ENODEV = 19; // No such device
- SYS_ENOTDIR = 20; // Not a directory
- SYS_EISDIR = 21; // Is a directory
- SYS_EINVAL = 22; // Invalid argument
- SYS_ENFILE = 23; // Too many open files in system
- SYS_EMFILE = 24; // Too many open files
- SYS_ENOTTY = 25; // Not a typewriter
- SYS_ETXTBSY = 26; // Text file busy
- SYS_EFBIG = 27; // File too large
- SYS_ENOSPC = 28; // No space left on device
- SYS_ESPIPE = 29; // Illegal seek
- SYS_EROFS = 30; // Read only file system
- SYS_EMLINK = 31; // Too many links
- SYS_EPIPE = 32; // Broken pipe
- SYS_EDOM = 33; // Math arg out of domain of func
- SYS_ERANGE = 34; // Math result not representable
- SYS_EDEADLOCK = 35; // File locking deadlock error
- SYS_ENAMETOOLONG = 36; // File or path name too long
- SYS_ENOLCK = 37; // No record locks available
- SYS_ENOSYS = 38; // Function not implemented
- SYS_ENOTEMPTY = 39; // Directory not empty
- SYS_ELOOP = 40; // Too many symbolic links
- SYS_ENOMSG = 42; // No message of desired type
- SYS_EIDRM = 43; // Identifier removed
- SYS_ECHRNG = 44; // Channel number out of range
- SYS_EL2NSYNC = 45; // Level 2 not synchronized
- SYS_EL3HLT = 46; // Level 3 halted
- SYS_EL3RST = 47; // Level 3 reset
- SYS_ELNRNG = 48; // Link number out of range
- SYS_EUNATCH = 49; // rotocol driver not attached
- SYS_ENOCSI = 50; // No CSI structure available
- SYS_EL2HLT = 51; // Level 2 halted
- SYS_EBADE = 52; // Invalid exchange
- SYS_EBADR = 53; // Invalid request descriptor
- SYS_EXFULL = 54; // Exchange full
- SYS_ENOANO = 55; // No anode
- SYS_EBADRQC = 56; // Invalid request code
- SYS_EBADSLT = 57; // Invalid slot
- SYS_EBFONT = 59; // Bad font file fmt
- SYS_ENOSTR = 60; // Device not a stream
- SYS_ENODATA = 61; // No data (for no delay io)
- SYS_ETIME = 62; // Timer expired
- SYS_ENOSR = 63; // Out of streams resources
- SYS_ENONET = 64; // Machine is not on the network
- SYS_ENOPKG = 65; // Package not installed
- SYS_EREMOTE = 66; // The object is remote
- SYS_ENOLINK = 67; // The link has been severed
- SYS_EADV = 68; // Advertise error
- SYS_ESRMNT = 69; // Srmount error
- SYS_ECOMM = 70; // Communication error on send
- SYS_EPROTO = 71; // Protocol error
- SYS_EMULTIHOP = 72; // Multihop attempted
- SYS_EDOTDOT = 73; // Cross mount point (not really error)
- SYS_EBADMSG = 74; // Trying to read unreadable message
- SYS_EOVERFLOW = 75; // Value too large for defined data type
- SYS_ENOTUNIQ = 76; // Given log. name not unique
- SYS_EBADFD = 77; // f.d. invalid for this operation
- SYS_EREMCHG = 78; // Remote address changed
- SYS_ELIBACC = 79; // Can't access a needed shared lib
- SYS_ELIBBAD = 80; // Accessing a corrupted shared lib
- SYS_ELIBSCN = 81; // .lib section in a.out corrupted
- SYS_ELIBMAX = 82; // Attempting to link in too many libs
- SYS_ELIBEXEC = 83; // Attempting to exec a shared library
- SYS_EILSEQ = 84;
- SYS_ERESTART = 85;
- SYS_ESTRPIPE = 86;
- SYS_EUSERS = 87;
- SYS_ENOTSOCK = 88; // Socket operation on non-socket
- SYS_EDESTADDRREQ = 89; // Destination address required
- SYS_EMSGSIZE = 90; // Message too long
- SYS_EPROTOTYPE = 91; // Protocol wrong type for socket
- SYS_ENOPROTOOPT = 92; // Protocol not available
- SYS_EPROTONOSUPPORT = 93; // Unknown protocol
- SYS_ESOCKTNOSUPPORT = 94; // Socket type not supported
- SYS_EOPNOTSUPP = 95; // Operation not supported on transport endpoint
- SYS_EPFNOSUPPORT = 96; // Protocol family not supported
- SYS_EAFNOSUPPORT = 97; // Address family not supported by protocol family
- SYS_EADDRINUSE = 98; // Address already in use
- SYS_EADDRNOTAVAIL = 99; // Address not available
- SYS_ENETDOWN = 100; // Network interface is not configured
- SYS_ENETUNREACH = 101; // Network is unreachable
- SYS_ENETRESET = 102;
- SYS_ECONNABORTED = 103; // Connection aborted
- SYS_ECONNRESET = 104; // Connection reset by peer
- SYS_ENOBUFS = 105; // No buffer space available
- SYS_EISCONN = 106; // Socket is already connected
- SYS_ENOTCONN = 107; // Socket is not connected
- SYS_ESHUTDOWN = 108; // Can't send after socket shutdown
- SYS_ETOOMANYREFS = 109;
- SYS_ETIMEDOUT = 110; // Connection timed out
- SYS_ECONNREFUSED = 111; // Connection refused
- SYS_EHOSTDOWN = 112; // Host is down
- SYS_EHOSTUNREACH = 113; // Host is unreachable
- SYS_EALREADY = 114; // Socket already connected
- SYS_EINPROGRESS = 115; // Connection already in progress
- SYS_ESTALE = 116;
- SYS_EUCLEAN = 117;
- SYS_ENOTNAM = 118;
- SYS_ENAVAIL = 119;
- SYS_EISNAM = 120;
- SYS_EREMOTEIO = 121;
- SYS_EDQUOT = 122;
- SYS_ENOMEDIUM = 123; // No medium (in tape drive)
- SYS_EMEDIUMTYPE = 124;
- SYS_ECANCELED = 125;
- SYS_ENOKEY = 126;
- SYS_EKEYEXPIRED = 127;
- SYS_EKEYREVOKED = 128;
- SYS_EKEYREJECTED = 129;
- SYS_EOWNERDEAD = 130;
- SYS_ENOTRECOVERABLE = 131;
- SYS_ERFKILL = 132;
- SYS_EHWPOISON = 133;
-}
-
-message DnsQueryEvent {
- optional android.stats.dnsresolver.NsRcode rcode = 1;
-
- optional android.stats.dnsresolver.NsType type = 2;
-
- optional android.stats.dnsresolver.CacheStatus cache_hit = 3;
-
- optional android.stats.dnsresolver.IpVersion ip_version = 4;
-
- optional android.stats.dnsresolver.Protocol protocol = 5;
-
- // Number of DNS query retry times
- optional int32 retry_times = 6;
-
- // Ordinal number of name server.
- optional int32 dns_server_index = 7;
-
- // Used only by TCP and DOT. True for new connections.
- optional bool connected = 8;
-
- optional int32 latency_micros = 9;
-
- optional android.stats.dnsresolver.LinuxErrno linux_errno = 10;
-}
-
-message DnsQueryEvents {
- repeated DnsQueryEvent dns_query_event = 1;
-}
diff --git a/core/proto/android/stats/docsui/docsui_enums.proto b/core/proto/android/stats/docsui/docsui_enums.proto
deleted file mode 100644
index 5963f6a..0000000
--- a/core/proto/android/stats/docsui/docsui_enums.proto
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.stats.docsui;
-option java_multiple_files = true;
-
-enum LaunchAction {
- UNKNOWN = 0;
- OPEN = 1;
- CREATE = 2;
- GET_CONTENT = 3;
- OPEN_TREE = 4;
- PICK_COPY_DEST = 5;
- BROWSE = 6;
- OTHER = 7;
-}
-
-enum MimeType {
- MIME_UNKNOWN = 0;
- MIME_NONE = 1;
- MIME_ANY = 2;
- MIME_APPLICATION = 3;
- MIME_AUDIO = 4;
- MIME_IMAGE = 5;
- MIME_MESSAGE = 6;
- MIME_MULTIPART = 7;
- MIME_TEXT = 8;
- MIME_VIDEO = 9;
- MIME_OTHER = 10;
-}
-
-enum Root {
- ROOT_UNKNOWN = 0;
- ROOT_NONE = 1;
- ROOT_OTHER_DOCS_PROVIDER = 2;
- ROOT_AUDIO = 3;
- ROOT_DEVICE_STORAGE = 4;
- ROOT_DOWNLOADS = 5;
- ROOT_HOME = 6;
- ROOT_IMAGES = 7;
- ROOT_RECENTS = 8;
- ROOT_VIDEOS = 9;
- ROOT_MTP = 10;
- ROOT_THIRD_PARTY_APP = 11;
- ROOT_DOCUMENTS = 12;
-}
-
-enum ContextScope {
- SCOPE_UNKNOWN = 0;
- SCOPE_FILES = 1;
- SCOPE_PICKER = 2;
-}
-
-enum Provider {
- PROVIDER_UNKNOWN = 0;
- PROVIDER_SYSTEM = 1;
- PROVIDER_EXTERNAL = 2;
-}
-
-enum FileOperation {
- OP_UNKNOWN = 0;
- OP_OTHER = 1;
- OP_COPY = 2;
- OP_COPY_INTRA_PROVIDER = 3;
- OP_COPY_SYSTEM_PROVIDER = 4;
- OP_COPY_EXTERNAL_PROVIDER = 5;
- OP_MOVE = 6;
- OP_MOVE_INTRA_PROVIDER = 7;
- OP_MOVE_SYSTEM_PROVIDER = 8;
- OP_MOVE_EXTERNAL_PROVIDER = 9;
- OP_DELETE = 10;
- OP_RENAME = 11;
- OP_CREATE_DIR = 12;
- OP_OTHER_ERROR = 13;
- OP_DELETE_ERROR = 14;
- OP_MOVE_ERROR = 15;
- OP_COPY_ERROR = 16;
- OP_RENAME_ERROR = 17;
- OP_CREATE_DIR_ERROR = 18;
- OP_COMPRESS_INTRA_PROVIDER = 19;
- OP_COMPRESS_SYSTEM_PROVIDER = 20;
- OP_COMPRESS_EXTERNAL_PROVIDER = 21;
- OP_EXTRACT_INTRA_PROVIDER = 22;
- OP_EXTRACT_SYSTEM_PROVIDER = 23;
- OP_EXTRACT_EXTERNAL_PROVIDER = 24;
- OP_COMPRESS_ERROR = 25;
- OP_EXTRACT_ERROR = 26;
-}
-
-enum SubFileOperation {
- SUB_OP_UNKNOWN = 0;
- SUB_OP_QUERY_DOC = 1;
- SUB_OP_QUERY_CHILD = 2;
- SUB_OP_OPEN_FILE = 3;
- SUB_OP_READ_FILE = 4;
- SUB_OP_CREATE_DOC = 5;
- SUB_OP_WRITE_FILE = 6;
- SUB_OP_DELETE_DOC = 7;
- SUB_OP_OBTAIN_STREAM_TYPE = 8;
- SUB_OP_QUICK_MOVE = 9;
- SUB_OP_QUICK_COPY = 10;
-}
-
-enum CopyMoveOpMode {
- MODE_UNKNOWN = 0;
- MODE_PROVIDER = 1;
- MODE_CONVERTED = 2;
- MODE_CONVENTIONAL = 3;
-}
-
-enum Authority {
- AUTH_UNKNOWN = 0;
- AUTH_OTHER = 1;
- AUTH_MEDIA = 2;
- AUTH_STORAGE_INTERNAL = 3;
- AUTH_STORAGE_EXTERNAL = 4;
- AUTH_DOWNLOADS = 5;
- AUTH_MTP = 6;
-}
-
-enum UserAction {
- ACTION_UNKNOWN = 0;
- ACTION_OTHER = 1;
- ACTION_GRID = 2;
- ACTION_LIST = 3;
- ACTION_SORT_NAME = 4;
- ACTION_SORT_DATE = 5;
- ACTION_SORT_SIZE = 6;
- ACTION_SORT_TYPE = 7;
- ACTION_SEARCH = 8;
- ACTION_SHOW_SIZE = 9;
- ACTION_HIDE_SIZE = 10;
- ACTION_SETTINGS = 11;
- ACTION_COPY_TO = 12;
- ACTION_MOVE_TO = 13;
- ACTION_DELETE = 14;
- ACTION_RENAME = 15;
- ACTION_CREATE_DIR = 16;
- ACTION_SELECT_ALL = 17;
- ACTION_SHARE = 18;
- ACTION_OPEN = 19;
- ACTION_SHOW_ADVANCED = 20;
- ACTION_HIDE_ADVANCED = 21;
- ACTION_NEW_WINDOW = 22;
- ACTION_PASTE_CLIPBOARD = 23;
- ACTION_COPY_CLIPBOARD = 24;
- ACTION_DRAG_N_DROP = 25;
- ACTION_DRAG_N_DROP_MULTI_WINDOW = 26;
- ACTION_CUT_CLIPBOARD = 27;
- ACTION_COMPRESS = 28;
- ACTION_EXTRACT_TO = 29;
- ACTION_VIEW_IN_APPLICATION = 30;
- ACTION_INSPECTOR = 31;
- ACTION_SEARCH_CHIP = 32;
- ACTION_SEARCH_HISTORY = 33;
-}
-
-enum InvalidScopedAccess {
- SCOPED_DIR_ACCESS_UNKNOWN = 0;
- SCOPED_DIR_ACCESS_INVALID_ARGUMENTS = 1;
- SCOPED_DIR_ACCESS_INVALID_DIRECTORY = 2;
- SCOPED_DIR_ACCESS_ERROR = 3;
- SCOPED_DIR_ACCESS_DEPRECATED = 4;
-}
-
-enum SearchType {
- TYPE_UNKNOWN = 0;
- TYPE_CHIP_IMAGES = 1;
- TYPE_CHIP_AUDIOS = 2;
- TYPE_CHIP_VIDEOS = 3;
- TYPE_CHIP_DOCS = 4;
- TYPE_SEARCH_HISTORY = 5;
- TYPE_SEARCH_STRING = 6;
- TYPE_CHIP_LARGE_FILES = 7;
- TYPE_CHIP_FROM_THIS_WEEK = 8;
-}
-
-enum SearchMode {
- SEARCH_UNKNOWN = 0;
- SEARCH_KEYWORD = 1;
- SEARCH_CHIPS = 2;
- SEARCH_KEYWORD_N_CHIPS = 3;
-}
diff --git a/core/proto/android/stats/enums.proto b/core/proto/android/stats/enums.proto
deleted file mode 100644
index 8f8055e..0000000
--- a/core/proto/android/stats/enums.proto
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats;
-option java_outer_classname = "StatsEnums";
-
-enum EventType {
- // Unknown.
- TYPE_UNKNOWN = 0;
- CONTENT_SUGGESTIONS_CLASSIFY_CONTENT_CALL_SUCCEEDED = 1;
- CONTENT_SUGGESTIONS_CLASSIFY_CONTENT_CALL_FAILED = 2;
- CONTENT_SUGGESTIONS_SUGGEST_CONTENT_CALL_SUCCEEDED = 3;
- CONTENT_SUGGESTIONS_SUGGEST_CONTENT_CALL_FAILED = 4;
-}
diff --git a/core/proto/android/stats/intelligence/enums.proto b/core/proto/android/stats/intelligence/enums.proto
deleted file mode 100644
index 0c210e3..0000000
--- a/core/proto/android/stats/intelligence/enums.proto
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.intelligence;
-option java_outer_classname = "IntelligenceStatsEnums";
-
-enum Status {
- // The value wasn't set.
- // protoc requires enum values to be unique by package rather than enum type.
- // This forces us to prefix the enum values.
- STATUS_UNKNOWN = 0;
- // The event succeeded.
- STATUS_SUCCEEDED = 1;
- // The event had an error.
- STATUS_FAILED = 2;
-}
-
-enum EventType {
- // The value wasn't set.
- EVENT_UNKNOWN = 0;
- // ContentSuggestionsService classifyContentSelections call.
- EVENT_CONTENT_SUGGESTIONS_CLASSIFY_CONTENT_CALL = 1;
- // ContentSuggestionsService suggestContentSelections call.
- EVENT_CONTENT_SUGGESTIONS_SUGGEST_CONTENT_CALL = 2;
-}
diff --git a/core/proto/android/stats/launcher/Android.bp b/core/proto/android/stats/launcher/Android.bp
deleted file mode 100644
index 976a0b8..0000000
--- a/core/proto/android/stats/launcher/Android.bp
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-java_library {
- name: "launcherprotosnano",
- proto: {
- type: "nano",
- output_params: ["store_unknown_fields=true"],
- include_dirs: ["external/protobuf/src"],
- },
-
- sdk_version: "current",
- srcs: [
- "*.proto",
- ],
-}
-
-java_library {
- name: "launcherprotoslite",
- proto: {
- type: "lite",
- include_dirs: ["external/protobuf/src"],
- },
-
- sdk_version: "current",
- srcs: [
- "*.proto",
- ],
-}
diff --git a/core/proto/android/stats/launcher/launcher.proto b/core/proto/android/stats/launcher/launcher.proto
deleted file mode 100644
index fc177d5..0000000
--- a/core/proto/android/stats/launcher/launcher.proto
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.stats.launcher;
-option java_multiple_files = true;
-
-enum LauncherAction {
- DEFAULT_ACTION = 0;
- LAUNCH_APP = 1;
- LAUNCH_TASK = 2;
- DISMISS_TASK = 3;
- LONGPRESS = 4;
- DRAGDROP = 5;
- SWIPE_UP = 6;
- SWIPE_DOWN = 7;
- SWIPE_LEFT = 8;
- SWIPE_RIGHT = 9;
-}
-
-enum LauncherState {
- LAUNCHER_STATE_UNSPECIFIED = 0;
- BACKGROUND = 1;
- HOME = 2;
- OVERVIEW = 3;
- ALLAPPS = 4;
- UNCHANGED = 5;
-}
-
-message LauncherTarget {
- enum Type {
- NONE = 0;
- ITEM_TYPE = 1;
- CONTROL_TYPE = 2;
- CONTAINER_TYPE = 3;
- }
- enum Item {
- DEFAULT_ITEM = 0;
- APP_ICON = 1;
- SHORTCUT = 2;
- WIDGET = 3;
- FOLDER_ICON = 4;
- DEEPSHORTCUT = 5;
- SEARCHBOX = 6;
- EDITTEXT = 7;
- NOTIFICATION = 8;
- TASK = 9;
- }
- enum Container {
- DEFAULT_CONTAINER = 0;
- HOTSEAT = 1;
- FOLDER = 2;
- PREDICTION = 3;
- SEARCHRESULT = 4;
- }
- enum Control {
- DEFAULT_CONTROL = 0;
- MENU = 1;
- UNINSTALL = 2;
- REMOVE = 3;
- }
- optional Type type = 1;
- optional Item item = 2;
- optional Container container = 3;
- optional Control control = 4;
- optional string launch_component = 5;
- optional int32 page_id = 6;
- optional int32 grid_x = 7;
- optional int32 grid_y = 8;
-}
-
-message LauncherExtension {
- repeated LauncherTarget src_target = 1;
- repeated LauncherTarget dst_target = 2;
-}
diff --git a/core/proto/android/stats/location/location_enums.proto b/core/proto/android/stats/location/location_enums.proto
deleted file mode 100644
index 553c01c..0000000
--- a/core/proto/android/stats/location/location_enums.proto
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.location;
-option java_outer_classname = "LocationStatsEnums";
-
-
-// APIs from LocationManagerService
-enum LocationManagerServiceApi {
- API_UNKNOWN = 0;
- API_REQUEST_LOCATION_UPDATES = 1;
- API_ADD_GNSS_MEASUREMENTS_LISTENER = 2;
- API_REGISTER_GNSS_STATUS_CALLBACK = 3;
- API_REQUEST_GEOFENCE = 4;
- API_SEND_EXTRA_COMMAND = 5;
-}
-
-enum UsageState {
- USAGE_STARTED = 0;
- USAGE_ENDED = 1;
-}
-
-// Type of location providers
-enum ProviderType {
- PROVIDER_UNKNOWN = 0;
- PROVIDER_NETWORK = 1;
- PROVIDER_GPS = 2;
- PROVIDER_PASSIVE = 3;
- PROVIDER_FUSED = 4;
-}
-
-// Type of Callback passed in for this API
-enum CallbackType {
- CALLBACK_UNKNOWN = 0;
- // Current API does not need a callback, e.g. sendExtraCommand
- CALLBACK_NOT_APPLICABLE = 1;
- CALLBACK_LISTENER = 2;
- CALLBACK_PENDING_INTENT = 3;
-}
-
-// Possible values for mQuality field in
-// frameworks/base/location/java/android/location/LocationRequest.java
-enum LocationRequestQuality {
- QUALITY_UNKNOWN = 0;
- ACCURACY_FINE = 100;
- ACCURACY_BLOCK = 102;
- ACCURACY_CITY = 104;
- POWER_NONE = 200;
- POWER_LOW = 201;
- POWER_HIGH = 203;
-}
-
-// Bucketized values for interval field in
-// frameworks/base/location/java/android/location/LocationRequest.java
-enum LocationRequestIntervalBucket {
- INTERVAL_UNKNOWN = 0;
- INTERVAL_BETWEEN_0_SEC_AND_1_SEC = 1;
- INTERVAL_BETWEEN_1_SEC_AND_5_SEC = 2;
- INTERVAL_BETWEEN_5_SEC_AND_1_MIN = 3;
- INTERVAL_BETWEEN_1_MIN_AND_10_MIN = 4;
- INTERVAL_BETWEEN_10_MIN_AND_1_HOUR = 5;
- INTERVAL_LARGER_THAN_1_HOUR = 6;
-}
-
-// Bucketized values for small displacement field in
-// frameworks/base/location/java/android/location/LocationRequest.java
-// Value in meters.
-enum SmallestDisplacementBucket {
- DISTANCE_UNKNOWN = 0;
- DISTANCE_ZERO = 1;
- DISTANCE_BETWEEN_0_AND_100 = 2;
- DISTANCE_LARGER_THAN_100 = 3;
-}
-
-// Bucketized values for expire_in field in
-// frameworks/base/location/java/android/location/LocationRequest.java
-enum ExpirationBucket {
- EXPIRATION_UNKNOWN = 0;
- EXPIRATION_BETWEEN_0_AND_20_SEC = 1;
- EXPIRATION_BETWEEN_20_SEC_AND_1_MIN = 2;
- EXPIRATION_BETWEEN_1_MIN_AND_10_MIN = 3;
- EXPIRATION_BETWEEN_10_MIN_AND_1_HOUR = 4;
- EXPIRATION_LARGER_THAN_1_HOUR = 5;
- EXPIRATION_NO_EXPIRY = 6;
-}
-
-// Bucketized values for radius field in
-// frameworks/base/location/java/android/location/Geofence.java
-// Value in meters.
-enum GeofenceRadiusBucket {
- RADIUS_UNKNOWN = 0;
- RADIUS_BETWEEN_0_AND_100 = 1;
- RADIUS_BETWEEN_100_AND_200 = 2;
- RADIUS_BETWEEN_200_AND_300 = 3;
- RADIUS_BETWEEN_300_AND_1000 = 4;
- RADIUS_BETWEEN_1000_AND_10000 = 5;
- RADIUS_LARGER_THAN_100000 = 6;
- RADIUS_NEGATIVE = 7;
-}
-
-// Caller Activity Importance.
-enum ActivityImportance {
- IMPORTANCE_UNKNOWN = 0;
- IMPORTANCE_TOP = 1;
- IMPORTANCE_FORGROUND_SERVICE = 2;
- IMPORTANCE_BACKGROUND = 3;
-}
diff --git a/core/proto/android/stats/mediametrics/mediametrics.proto b/core/proto/android/stats/mediametrics/mediametrics.proto
deleted file mode 100644
index 9f0ff59..0000000
--- a/core/proto/android/stats/mediametrics/mediametrics.proto
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.mediametrics;
-
-/**
- * Track how we arbitrate between microphone/input requests.
- * Logged from
- * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
- * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp
- * Next Tag: 10
- */
-message AudioPolicyData {
- optional int32 status = 1;
- optional string request_source = 2;
- optional string request_package = 3;
- optional int32 request_session = 4;
- optional string request_device = 5;
- optional string active_source = 6;
- optional string active_package = 7;
- optional int32 active_session = 8;
- optional string active_device = 9;
-}
-
-/**
- * Track properties of audio recording
- * Logged from
- * frameworks/av/media/libaudioclient/AudioRecord.cpp
- * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp
- * Next Tag: 16
- */
-message AudioRecordData {
- optional string encoding = 1;
- optional string source = 2;
- optional int32 latency = 3;
- optional int32 samplerate = 4;
- optional int32 channels = 5;
- optional int64 created_millis = 6;
- optional int64 duration_millis = 7;
- optional int32 count = 8;
- optional int32 error_code = 9;
- optional string error_function = 10;
- optional int32 port_id = 11;
- optional int32 frame_count = 12;
- optional string attributes = 13;
- optional int64 channel_mask = 14;
- optional int64 start_count = 15;
-
-}
-
-/**
- * Track audio thread performance data
- * Logged from
- * frameworks/av/media/libnblog/ReportPerformance.cpp
- * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp
- * Next Tag: 28
- */
-message AudioThreadData {
- optional string type = 1;
- optional int32 framecount = 2;
- optional int32 samplerate = 3;
- optional string work_millis_hist = 4;
- optional string latency_millis_hist = 5;
- optional string warmup_millis_hist = 6;
- optional int64 underruns = 7;
- optional int64 overruns = 8;
- optional int64 active_millis = 9;
- optional int64 duration_millis = 10;
-
- optional int32 id = 11;
- optional int32 port_id = 12;
- optional int32 sample_rate = 13;
- optional int64 channel_mask = 14;
- optional string encoding = 15;
- optional int32 frame_count = 16;
- optional string output_device = 17;
- optional string input_device = 18;
- optional double io_jitter_mean_millis = 19;
- optional double io_jitter_stddev_millis = 20;
- optional double process_time_mean_millis = 21;
- optional double process_time_stddev_millis = 22;
- optional double timestamp_jitter_mean_millis = 23;
- optional double timestamp_jitter_stddev_millis = 24;
- optional double latency_mean_millis = 25;
- optional double latency_stddev_millis = 26;
-
-}
-
-/**
- * Track audio track playback data
- * Logged from
- * frameworks/av/media/libaudioclient/AudioTrack.cpp
- * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp
- * Next Tag: 12
- */
-message AudioTrackData {
- optional string stream_type = 1;
- optional string content_type = 2;
- optional string track_usage = 3;
- optional int32 sample_rate = 4;
- optional int64 channel_mask = 5;
-
- optional int32 underrun_frames = 6;
- optional int32 startup_glitch = 7;
-
- optional int32 port_id = 8;
- optional string encoding = 9;
- optional int32 frame_count = 10;
- optional string attributes = 11;
-
-
-}
-
-/**
- * Track Media Codec usage
- * Logged from:
- * frameworks/av/media/libstagefright/MediaCodec.cpp
- * frameworks/av/services/mediaanalytics/statsd_codec.cpp
- * Next Tag: 26
- */
-message CodecData {
- optional string codec = 1;
- optional string mime = 2;
- optional string mode = 3;
- optional int32 encoder = 4;
- optional int32 secure = 5;
- optional int32 width = 6;
- optional int32 height = 7;
- optional int32 rotation = 8;
- optional int32 crypto = 9;
- optional int32 profile = 10;
- optional int32 level = 11;
- optional int32 max_width = 12;
- optional int32 max_height = 13;
- optional int32 error_code = 14;
- optional string error_state = 15;
- optional int64 latency_max = 16;
- optional int64 latency_min = 17;
- optional int64 latency_avg = 18;
- optional int64 latency_count = 19;
- optional int64 latency_unknown = 20;
- optional int32 queue_input_buffer_error = 21;
- optional int32 queue_secure_input_buffer_error = 22;
- optional string bitrate_mode = 23;
- optional int32 bitrate = 24;
- optional int64 lifetime_millis = 25;
-}
-
-/**
- * Track Media Extractor (pulling video/audio streams out of containers) usage
- * Logged from:
- * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp
- * frameworks/av/services/mediaanalytics/statsd_extractor.cpp
- * Next Tag: 4
- */
-message ExtractorData {
- optional string format = 1;
- optional string mime = 2;
- optional int32 tracks = 3;
-}
-
-/**
- * Track Media Player usage
- * this handles both nuplayer and nuplayer2
- * Logged from:
- * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
- * frameworks/av/media/libmediaplayer2/nuplayer2/NuPlayer2Driver.cpp
- * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp
- * Next Tag: 21
- */
-message NuPlayerData {
- optional string whichPlayer = 1;
-
- optional string video_mime = 2;
- optional string video_codec = 3;
- optional int32 width = 4;
- optional int32 height = 5;
- optional int64 frames = 6;
- optional int64 frames_dropped = 7;
- optional double framerate = 8;
- optional string audio_mime = 9;
- optional string audio_codec = 10;
- optional int64 duration_millis = 11;
- optional int64 playing_millis = 12;
- optional int32 error = 13;
- optional int32 error_code = 14;
- optional string error_state = 15;
- optional string data_source_type = 16;
- optional int64 rebuffering_millis = 17;
- optional int32 rebuffers = 18;
- optional int32 rebuffer_at_exit = 19;
- optional int64 frames_dropped_startup = 20;
-}
-
-/**
- * Track information about recordings (e.g. camcorder)
- * Logged from
- * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp
- * frameworks/av/services/mediaanalytics/if_statsd.cpp
- * Next Tag: 22
- */
-message RecorderData {
- optional string audio_mime = 1;
- optional string video_mime = 2;
- optional int32 video_profile = 3;
- optional int32 video_level = 4;
- optional int32 width = 5;
- optional int32 height = 6;
- optional int32 rotation = 7;
- optional int32 framerate = 8;
- optional int32 capture_fps = 9;
- optional double capture_fps_enable = 10;
- optional int64 duration_millis = 11;
- optional int64 paused_millis = 12;
- optional int32 paused_count = 13;
- optional int32 audio_bitrate = 14;
- optional int32 audio_channels = 15;
- optional int32 audio_samplerate = 16;
- optional int32 movie_timescale = 17;
- optional int32 audio_timescale = 18;
- optional int32 video_timescale = 19;
- optional int32 video_bitrate = 20;
- optional int32 iframe_interval = 21;
-}
diff --git a/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto b/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto
deleted file mode 100644
index 138782b..0000000
--- a/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.stats.mediaprovider;
-option java_multiple_files = true;
-
-enum VolumeType {
- // Volume is unknown
- UNKNOWN = 0;
- // Volume is MediaStore.VOLUME_INTERNAL
- INTERNAL = 1;
- // Volume is MediaStore.VOLUME_EXTERNAL_PRIMARY
- EXTERNAL_PRIMARY = 2;
- // Volume is non-primary external storage
- EXTERNAL_OTHER = 3;
-}
diff --git a/core/proto/android/stats/otaupdate/updateengine_enums.proto b/core/proto/android/stats/otaupdate/updateengine_enums.proto
deleted file mode 100644
index a6e9919..0000000
--- a/core/proto/android/stats/otaupdate/updateengine_enums.proto
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.stats.otaupdate;
-
-// The payload type of an OTA update attempt on A/B devices.
-enum PayloadType {
- FULL = 10000;
- DELTA = 10001;
-}
-
-// The attempt result reported by the update engine for an OTA update.
-enum AttemptResult {
- UPDATE_SUCCEEDED = 10000;
- INTERNAL_ERROR = 10001;
- PAYLOAD_DOWNLOAD_ERROR = 10002;
- METADATA_MALFORMED = 10003;
- OPERATION_MALFORMED = 10004;
- OPERATION_EXECUTION_ERROR = 10005;
- METADATA_VERIFICATION_FAILED = 10006;
- PAYLOAD_VERIFICATION_FAILED = 10007;
- VERIFICATION_FAILED = 10008;
- POSTINSTALL_FAILED = 10009;
- ABNORMAL_TERMINATION = 10010;
- UPDATE_CANCELED = 10011;
- UPDATE_SUCCEEDED_NOT_ACTIVE = 10012;
-}
-
-// The error code reported by the update engine after an OTA update attempt
-// on A/B devices. More details in system/update_engine/common/error_code.h
-enum ErrorCode {
- SUCCESS = 10000;
- ERROR = 10001;
- FILESYSTEM_COPIER_ERROR = 10004;
- POST_INSTALL_RUNNER_ERROR = 10005;
- PAYLOAD_MISMATCHED_TYPE_ERROR = 10006;
- INSTALL_DEVICE_OPEN_ERROR = 10007;
- KERNEL_DEVICE_OPEN_ERROR = 10008;
- DOWNLOAD_TRANSFER_ERROR = 10009;
- PAYLOAD_HASH_MISMATCH_ERROR = 10010;
- PAYLOAD_SIZE_MISMATCH_ERROR = 10011;
- DOWNLOAD_PAYLOAD_VERIFICATION_ERROR = 10012;
- DOWNLOAD_NEW_PARTITION_INFO_ERROR = 10013;
- DOWNLOAD_WRITE_ERROR = 10014;
- NEW_ROOTFS_VERIFICATION_ERROR = 10015;
- SIGNED_DELTA_PAYLOAD_EXPECTED_ERROR = 10017;
- DOWNLOAD_PAYLOAD_PUB_KEY_VERIFICATION_ERROR = 10018;
- DOWNLOAD_STATE_INITIALIZATION_ERROR = 10020;
- DOWNLOAD_INVALID_METADATA_MAGIC_STRING = 10021;
- DOWNLOAD_SIGNATURE_MISSING_IN_MANIFEST = 10022;
- DOWNLOAD_MANIFEST_PARSE_ERROR = 10023;
- DOWNLOAD_METADATA_SIGNATURE_ERROR = 10024;
- DOWNLOAD_METADATA_SIGNATURE_VERIFICATION_ERROR = 10025;
- DOWNLOAD_METADATA_SIGNATURE_MISMATCH = 10026;
- DOWNLOAD_OPERATION_HASH_VERIFICATION_ERROR = 10027;
- DOWNLOAD_OPERATION_EXECUTION_ERROR = 10028;
- DOWNLOAD_OPERATION_HASH_MISMATCH = 10029;
- DOWNLOAD_INVALID_METADATA_SIZE = 10032;
- DOWNLOAD_INVALID_METADATA_SIGNATURE = 10033;
- DOWNLOAD_OPERATION_HASH_MISSING_ERROR = 10038;
- DOWNLOAD_METADATA_SIGNATURE_MISSING_ERROR = 10039;
- UNSUPPORTED_MAJOR_PAYLOAD_VERSION = 10044;
- UNSUPPORTED_MINOR_PAYLOAD_VERSION = 10045;
- FILESYSTEM_VERIFIER_ERROR = 10047;
- USER_CANCELED = 10048;
- PAYLOAD_TIMESTAMP_ERROR = 10051;
- UPDATED_BUT_NOT_ACTIVE = 10052;
-}
diff --git a/core/proto/android/stats/storage/storage_enums.proto b/core/proto/android/stats/storage/storage_enums.proto
deleted file mode 100644
index 6892e287..0000000
--- a/core/proto/android/stats/storage/storage_enums.proto
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.storage;
-
-enum ExternalStorageType {
- UNKNOWN = 0;
- SD_CARD = 1;
- USB = 2;
- OTHER = 3;
-}
diff --git a/core/proto/android/stats/style/Android.bp b/core/proto/android/stats/style/Android.bp
deleted file mode 100644
index f085a52..0000000
--- a/core/proto/android/stats/style/Android.bp
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (C) 2019 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-java_library {
- name: "styleprotosnano",
- proto: {
- type: "nano",
- output_params: ["store_unknown_fields=true"],
- include_dirs: ["external/protobuf/src"],
- },
-
- sdk_version: "current",
- srcs: [
- "*.proto",
- ],
-}
diff --git a/core/proto/android/stats/style/style_enums.proto b/core/proto/android/stats/style/style_enums.proto
deleted file mode 100644
index f3f491f..0000000
--- a/core/proto/android/stats/style/style_enums.proto
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.stats.style;
-option java_multiple_files = true;
-
-enum Action {
- DEFAULT_ACTION = 0;
- ONRESUME = 1;
- ONSTOP = 2;
- PICKER_SELECT = 3;
- PICKER_APPLIED = 4;
- WALLPAPER_OPEN_CATEGORY = 5;
- WALLPAPER_SELECT = 6;
- WALLPAPER_APPLIED = 7;
- WALLPAPER_EXPLORE = 8;
- WALLPAPER_DOWNLOAD = 9;
- WALLPAPER_REMOVE = 10;
- LIVE_WALLPAPER_DOWNLOAD_SUCCESS = 11;
- LIVE_WALLPAPER_DOWNLOAD_FAILED = 12;
- LIVE_WALLPAPER_DOWNLOAD_CANCELLED = 13;
- LIVE_WALLPAPER_DELETE_SUCCESS = 14;
- LIVE_WALLPAPER_DELETE_FAILED = 15;
- LIVE_WALLPAPER_APPLIED = 16;
- LIVE_WALLPAPER_INFO_SELECT = 17;
- LIVE_WALLPAPER_CUSTOMIZE_SELECT = 18;
-}
-
-enum LocationPreference {
- LOCATION_PREFERENCE_UNSPECIFIED = 0;
- LOCATION_UNAVAILABLE = 1;
- LOCATION_CURRENT = 2;
- LOCATION_MANUAL = 3;
-}
diff --git a/core/proto/android/stats/sysui/notification_enums.proto b/core/proto/android/stats/sysui/notification_enums.proto
deleted file mode 100644
index 30bdeca..0000000
--- a/core/proto/android/stats/sysui/notification_enums.proto
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-
-package android.stats.sysui;
-
-// Enum used in NotificationReported and NotificationChannelModified atoms
-enum NotificationImportance { // Constants from NotificationManager.java
- IMPORTANCE_UNSPECIFIED = -1000; // Should not occur for real notifications.
- IMPORTANCE_NONE = 0; // No importance: does not show in the shade.
- IMPORTANCE_MIN = 1; // Minimum to show in the shade.
- IMPORTANCE_LOW = 2; // Shows in shade, maybe status bar, no buzz/beep.
- IMPORTANCE_DEFAULT = 3; // Shows everywhere, makes noise, no heads-up.
- IMPORTANCE_HIGH = 4; // Shows everywhere, makes noise, heads-up, may full-screen.
- IMPORTANCE_IMPORTANT_CONVERSATION = 5; // High + isImportantConversation().
-}
diff --git a/core/proto/android/stats/textclassifier/Android.bp b/core/proto/android/stats/textclassifier/Android.bp
deleted file mode 100644
index bf90227..0000000
--- a/core/proto/android/stats/textclassifier/Android.bp
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (C) 2019 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-java_library_static {
- name: "textclassifierprotoslite",
- proto: {
- type: "lite",
- },
- srcs: [
- "*.proto",
- ],
-}
\ No newline at end of file
diff --git a/core/proto/android/stats/textclassifier/textclassifier_enums.proto b/core/proto/android/stats/textclassifier/textclassifier_enums.proto
deleted file mode 100644
index 4be7b7c..0000000
--- a/core/proto/android/stats/textclassifier/textclassifier_enums.proto
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.stats.textclassifier;
-option java_multiple_files = true;
-
-enum EventType {
- TYPE_UNKNOWN = 0;
- // User started a new selection.
- SELECTION_STARTED = 1;
- // User modified an existing selection.
- SELECTION_MODIFIED = 2;
- // Smart selection triggered for a single token (word).
- SMART_SELECTION_SINGLE = 3;
- // Smart selection triggered spanning multiple tokens (words).
- SMART_SELECTION_MULTI = 4;
- // Something else other than user or the default TextClassifier triggered a selection.
- AUTO_SELECTION = 5;
- // Smart actions shown to the user.
- ACTIONS_SHOWN = 6;
- // User clicked a link.
- LINK_CLICKED = 7;
- // User typed over the selection.
- OVERTYPE = 8;
- // User clicked on Copy action.
- COPY_ACTION = 9;
- // User clicked on Paste action.
- PASTE_ACTION = 10;
- // User clicked on Cut action.
- CUT_ACTION = 11;
- // User clicked on Share action.
- SHARE_ACTION = 12;
- // User clicked on a Smart action.
- SMART_ACTION = 13;
- // User dragged+dropped the selection.
- SELECTION_DRAG = 14;
- // Selection is destroyed.
- SELECTION_DESTROYED = 15;
- // User clicked on a custom action.
- OTHER_ACTION = 16;
- // User clicked on Select All action
- SELECT_ALL = 17;
- // User reset the smart selection.
- SELECTION_RESET = 18;
- // User composed a reply.
- MANUAL_REPLY = 19;
- // TextClassifier generated some actions
- ACTIONS_GENERATED = 20;
- // Some text links were generated
- LINKS_GENERATED = 21;
-}
-
-enum WidgetType {
- WIDGET_TYPE_UNKNOWN = 0;
- // Standard TextView
- WIDGET_TYPE_TEXTVIEW = 1;
- // EditText
- WIDGET_TYPE_EDITTEXT = 2;
- // Not selectable textview
- WIDGET_TYPE_UNSELECTABLE_TEXTVIEW = 3;
- // Standard Webview
- WIDGET_TYPE_WEBVIEW = 4;
- // Editable TextView
- WIDGET_TYPE_EDIT_WEBVIEW = 5;
- // Custom text widget
- WIDGET_TYPE_CUSTOM_TEXTVIEW = 6;
- // Custom editable text widget.
- WIDGET_TYPE_CUSTOM_EDITTEXT = 7;
- // Non-selectable text widget.
- WIDGET_TYPE_CUSTOM_UNSELECTABLE_TEXTVIEW = 8;
- // Notification
- WIDGET_TYPE_NOTIFICATION = 9;
-}
diff --git a/core/proto/android/stats/tls/enums.proto b/core/proto/android/stats/tls/enums.proto
deleted file mode 100644
index 1777d69..0000000
--- a/core/proto/android/stats/tls/enums.proto
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto2";
-package android.stats.tls;
-
-// Keep in sync with
-// external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java
-enum Protocol {
- UNKNOWN_PROTO = 0;
- SSL_V3 = 1;
- TLS_V1 = 2;
- TLS_V1_1 = 3;
- TLS_V1_2 = 4;
- TLS_V1_3 = 5;
-}
-
-// Cipher suites' ids are based on IANA's database:
-// https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4
-//
-// If you add new cipher suite, make sure id is the same as in IANA's database (see link above)
-//
-// Keep in sync with
-// external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java
-enum CipherSuite {
- UNKNOWN_CIPHER_SUITE = 0x0000;
-
- TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0xC00A;
- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0xC014;
- TLS_RSA_WITH_AES_256_CBC_SHA = 0x0035;
- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0xC009;
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0xC013;
- TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F;
- TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000A;
-
- // TLSv1.2 cipher suites
- TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x009C;
- TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x009D;
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F;
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030;
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B;
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C;
- TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9;
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8;
-
- // Pre-Shared Key (PSK) cipher suites
- TLS_PSK_WITH_AES_128_CBC_SHA = 0x008C;
- TLS_PSK_WITH_AES_256_CBC_SHA = 0x008D;
- TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = 0xC035;
- TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = 0xC036;
- TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAC;
-
- // TLS 1.3 cipher suites
- TLS_AES_128_GCM_SHA256 = 0x1301;
- TLS_AES_256_GCM_SHA384 = 0x1302;
- TLS_CHACHA20_POLY1305_SHA256 = 0x1303;
-}
\ No newline at end of file
diff --git a/core/proto/android/telecomm/enums.proto b/core/proto/android/telecomm/enums.proto
deleted file mode 100644
index 5ca4a85..0000000
--- a/core/proto/android/telecomm/enums.proto
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.telecom;
-
-option java_outer_classname = "TelecomProtoEnums";
-option java_multiple_files = true;
-
-/**
- * Call states, primarily used in CallState.java,
- * Call.java, and CallsManager.java in packages/services.
- */
-enum CallStateEnum {
- /**
- * Indicates that a call is new and not connected. This is used as the default state internally
- * within Telecom and should not be used between Telecom and call services. Call services are
- * not expected to ever interact with NEW calls, but {@link android.telecom.InCallService}s will
- * see calls in this state.
- */
- NEW = 0;
-
- /**
- * The initial state of an outgoing {@code Call}.
- * Common transitions are to {@link #DIALING} state for a successful call or
- * {@link #DISCONNECTED} if it failed.
- */
- CONNECTING = 1;
-
- /**
- * The state of an outgoing {@code Call} when waiting on user to select a
- * {@link android.telecom.PhoneAccount} through which to place the call.
- */
- SELECT_PHONE_ACCOUNT = 2;
-
- /**
- * Indicates that a call is outgoing and in the dialing state. A call transitions to this state
- * once an outgoing call has begun (e.g., user presses the dial button in Dialer). Calls in this
- * state usually transition to {@link #ACTIVE} if the call was answered or {@link #DISCONNECTED}
- * if the call was disconnected somehow (e.g., failure or cancellation of the call by the user).
- */
- DIALING = 3;
-
- /**
- * Indicates that a call is incoming and the user still has the option of answering, rejecting,
- * or doing nothing with the call. This state is usually associated with some type of audible
- * ringtone. Normal transitions are to {@link #ACTIVE} if answered or {@link #DISCONNECTED}
- * otherwise.
- */
- RINGING = 4;
-
- /**
- * Indicates that a call is currently connected to another party and a communication channel is
- * open between them. The normal transition to this state is by the user answering a
- * {@link #DIALING} call or a {@link #RINGING} call being answered by the other party.
- */
- ACTIVE = 5;
-
- /**
- * Indicates that the call is currently on hold. In this state, the call is not terminated
- * but no communication is allowed until the call is no longer on hold. The typical transition
- * to this state is by the user putting an {@link #ACTIVE} call on hold by explicitly performing
- * an action, such as clicking the hold button.
- */
- ON_HOLD = 6;
-
- /**
- * Indicates that a call is currently disconnected. All states can transition to this state
- * by the call service giving notice that the connection has been severed. When the user
- * explicitly ends a call, it will not transition to this state until the call service confirms
- * the disconnection or communication was lost to the call service currently responsible for
- * this call (e.g., call service crashes).
- */
- DISCONNECTED = 7;
-
- /**
- * Indicates that the call was attempted (mostly in the context of outgoing, at least at the
- * time of writing) but cancelled before it was successfully connected.
- */
- ABORTED = 8;
-
- /**
- * Indicates that the call is in the process of being disconnected and will transition next
- * to a {@link #DISCONNECTED} state.
- * <p>
- * This state is not expected to be communicated from the Telephony layer, but will be reported
- * to the InCall UI for calls where disconnection has been initiated by the user but the
- * ConnectionService has confirmed the call as disconnected.
- */
- DISCONNECTING = 9;
-
- /**
- * Indicates that the call is in the process of being pulled to the local device.
- * <p>
- * This state should only be set on a call with
- * {@link android.telecom.Connection#PROPERTY_IS_EXTERNAL_CALL} and
- * {@link android.telecom.Connection#CAPABILITY_CAN_PULL_CALL}.
- */
- PULLING = 10;
-
- /**
- * Indicates that an incoming call has been answered by the in-call UI, but Telephony hasn't yet
- * set the call to active.
- */
- ANSWERED = 11;
-
- /**
- * Indicates that the call is undergoing audio processing by a different app in the background.
- * @see android.telecom.Call#STATE_AUDIO_PROCESSING
- */
- AUDIO_PROCESSING = 12;
-
- /**
- * Indicates that the call is in a fake ringing state.
- * @see android.telecom.Call#STATE_SIMULATED_RINGING
- */
- SIMULATED_RINGING = 13;
-}
-
-// Disconnect causes for a call. Primarily used by android/telecom/DisconnectCause.java
-enum DisconnectCauseEnum {
- /**
- * Disconnected because of an unknown or unspecified reason.
- */
- UNKNOWN = 0;
-
- /**
- * Disconnected because there was an error, such as a problem with the network.
- */
- ERROR = 1;
-
- /**
- * Disconnected because of a local user-initiated action, such as hanging up.
- */
- LOCAL = 2;
-
- /**
- * Disconnected because of a remote user-initiated action, such as the other party hanging up
- * up.
- */
- REMOTE = 3;
-
- /**
- * Disconnected because it has been canceled.
- */
- CANCELED = 4;
-
- /**
- * Disconnected because there was no response to an incoming call.
- */
- MISSED = 5;
-
- /**
- * Disconnected because the user rejected an incoming call.
- */
- REJECTED = 6;
-
- /**
- * Disconnected because the other party was busy.
- */
- BUSY = 7;
-
- /**
- * Disconnected because of a restriction on placing the call, such as dialing in airplane
- * mode.
- */
- RESTRICTED = 8;
-
- /**
- * Disconnected for reason not described by other disconnect codes.
- */
- OTHER = 9;
-
- /**
- * Disconnected because the connection manager did not support the call. The call will be tried
- * again without a connection manager. See {@link PhoneAccount#CAPABILITY_CONNECTION_MANAGER}.
- */
- CONNECTION_MANAGER_NOT_SUPPORTED = 10;
-
- /**
- * Disconnected because the user did not locally answer the incoming call, but it was answered
- * on another device where the call was ringing.
- */
- ANSWERED_ELSEWHERE = 11;
-
- /**
- * Disconnected because the call was pulled from the current device to another device.
- */
- CALL_PULLED = 12;
-}
diff --git a/core/proto/android/telephony/enums.proto b/core/proto/android/telephony/enums.proto
deleted file mode 100644
index f14e3ed..0000000
--- a/core/proto/android/telephony/enums.proto
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.telephony;
-
-option java_outer_classname = "TelephonyProtoEnums";
-option java_multiple_files = true;
-
-enum CallBearerEnum {
- /** Call bearer is unknown or invalid */
- CALL_BEARER_UNKNOWN = 0;
-
- /** Call bearer is legacy CS */
- CALL_BEARER_CS = 1;
-
- /** Call bearer is IMS */
- CALL_BEARER_IMS = 2;
-}
-
-enum CallDirectionEnum {
- /** Call direction: unknown or invalid */
- CALL_DIRECTION_UNKNOWN = 0;
-
- /** Call direction: mobile originated (outgoing for this device) */
- CALL_DIRECTION_MO = 1;
-
- /** Call direction: mobile terminated (incoming for this device) */
- CALL_DIRECTION_MT = 2;
-}
-
-// Call setup duration buckets.
-// See com.android.internal.telephony.metrics.VoiceCallSessionStats for definition.
-enum CallSetupDurationEnum {
- CALL_SETUP_DURATION_UNKNOWN = 0;
- CALL_SETUP_DURATION_EXTREMELY_FAST = 1;
- CALL_SETUP_DURATION_ULTRA_FAST = 2;
- CALL_SETUP_DURATION_VERY_FAST = 3;
- CALL_SETUP_DURATION_FAST = 4;
- CALL_SETUP_DURATION_NORMAL = 5;
- CALL_SETUP_DURATION_SLOW = 6;
- CALL_SETUP_DURATION_VERY_SLOW = 7;
- CALL_SETUP_DURATION_ULTRA_SLOW = 8;
- CALL_SETUP_DURATION_EXTREMELY_SLOW = 9;
-}
-
-// Data conn. power states, primarily used by android/telephony/DataConnectionRealTimeInfo.java.
-enum DataConnectionPowerStateEnum {
- DATA_CONNECTION_POWER_STATE_LOW = 1;
- DATA_CONNECTION_POWER_STATE_MEDIUM = 2;
- DATA_CONNECTION_POWER_STATE_HIGH = 3;
- DATA_CONNECTION_POWER_STATE_UNKNOWN = 2147483647; // Java Integer.MAX_VALUE;
-}
-
-// Network type enums, primarily used by android/telephony/TelephonyManager.java.
-// Do not add negative types.
-enum NetworkTypeEnum {
- NETWORK_TYPE_UNKNOWN = 0;
- NETWORK_TYPE_GPRS = 1;
- NETWORK_TYPE_EDGE = 2;
- NETWORK_TYPE_UMTS = 3;
- NETWORK_TYPE_CDMA = 4;
- NETWORK_TYPE_EVDO_0 = 5;
- NETWORK_TYPE_EVDO_A = 6;
- NETWORK_TYPE_1XRTT = 7;
- NETWORK_TYPE_HSDPA = 8;
- NETWORK_TYPE_HSUPA = 9;
- NETWORK_TYPE_HSPA = 10;
- NETWORK_TYPE_IDEN = 11;
- NETWORK_TYPE_EVDO_B = 12;
- NETWORK_TYPE_LTE = 13;
- NETWORK_TYPE_EHRPD = 14;
- NETWORK_TYPE_HSPAP = 15;
- NETWORK_TYPE_GSM = 16;
- NETWORK_TYPE_TD_SCDMA = 17;
- NETWORK_TYPE_IWLAN = 18;
- NETWORK_TYPE_LTE_CA = 19;
- NETWORK_TYPE_NR = 20;
-}
-
-// Signal strength levels, primarily used by android/telephony/SignalStrength.java.
-enum SignalStrengthEnum {
- SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0;
- SIGNAL_STRENGTH_POOR = 1;
- SIGNAL_STRENGTH_MODERATE = 2;
- SIGNAL_STRENGTH_GOOD = 3;
- SIGNAL_STRENGTH_GREAT = 4;
-}
-
-enum ServiceStateEnum {
- /**
- * Normal operation condition, the phone is registered
- * with an operator either in home network or in roaming.
- */
- SERVICE_STATE_IN_SERVICE = 0;
-
- /**
- * Phone is not registered with any operator, the phone
- * can be currently searching a new operator to register to, or not
- * searching to registration at all, or registration is denied, or radio
- * signal is not available.
- */
- SERVICE_STATE_OUT_OF_SERVICE = 1;
-
- /**
- * The phone is registered and locked. Only emergency numbers are allowed. {@more}
- */
- SERVICE_STATE_EMERGENCY_ONLY = 2;
-
- /**
- * Radio of telephony is explicitly powered off.
- */
- SERVICE_STATE_POWER_OFF = 3;
-}
-
-enum SimStateEnum {
- SIM_STATE_UNKNOWN = 0;
- /** SIM card state: no SIM card is available in the device */
- SIM_STATE_ABSENT = 1;
- /** SIM card state: Locked: requires the user's SIM PIN to unlock */
- SIM_STATE_PIN_REQUIRED = 2;
- /** SIM card state: Locked: requires the user's SIM PUK to unlock */
- SIM_STATE_PUK_REQUIRED = 3;
- /** SIM card state: Locked: requires a network PIN to unlock */
- SIM_STATE_NETWORK_LOCKED = 4;
- /** SIM card state: Ready */
- SIM_STATE_READY = 5;
- /** SIM card state: SIM Card is NOT READY */
- SIM_STATE_NOT_READY = 6;
- /** SIM card state: SIM Card Error, permanently disabled */
- SIM_STATE_PERM_DISABLED = 7;
- /** SIM card state: SIM Card Error, present but faulty */
- SIM_STATE_CARD_IO_ERROR = 8;
- /** SIM card state: SIM Card restricted, present but not usable due to
- * carrier restrictions.
- */
- SIM_STATE_CARD_RESTRICTED = 9;
- /**
- * SIM card state: Loaded: SIM card applications have been loaded
- * @hide
- */
- SIM_STATE_LOADED = 10;
- /**
- * SIM card state: SIM Card is present
- * @hide
- */
- SIM_STATE_PRESENT = 11;
-}
diff --git a/core/proto/android/view/enums.proto b/core/proto/android/view/enums.proto
deleted file mode 100644
index 0172e78..0000000
--- a/core/proto/android/view/enums.proto
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.view;
-
-option java_outer_classname = "ViewProtoEnums";
-option java_multiple_files = true;
-
-// Screen states, primarily used by android/view/Display.java.
-enum DisplayStateEnum {
- // The display state is unknown.
- DISPLAY_STATE_UNKNOWN = 0;
- // The display state is off.
- DISPLAY_STATE_OFF = 1;
- // The display state is on.
- DISPLAY_STATE_ON = 2;
- // The display is dozing in a low power state; it is still on but is
- // optimized for showing system-provided content while the device is
- // non-interactive.
- DISPLAY_STATE_DOZE = 3;
- // The display is dozing in a suspended low power state; it is still on
- // but is optimized for showing static system-provided content while the
- // device is non-interactive.
- DISPLAY_STATE_DOZE_SUSPEND = 4;
- // The display is on and optimized for VR mode.
- DISPLAY_STATE_VR = 5;
- // The display is in a suspended full power state; it is still on but the
- // CPU is not updating it.
- DISPLAY_STATE_ON_SUSPEND = 6;
-}
-
-// Constants found in android.view.WindowManager.
-enum TransitionTypeEnum {
- TRANSIT_NONE = 0;
- TRANSIT_UNSET = -1;
- TRANSIT_ACTIVITY_OPEN = 6;
- TRANSIT_ACTIVITY_CLOSE = 7;
- TRANSIT_TASK_OPEN = 8;
- TRANSIT_TASK_CLOSE = 9;
- TRANSIT_TASK_TO_FRONT = 10;
- TRANSIT_TASK_TO_BACK = 11;
- TRANSIT_WALLPAPER_CLOSE = 12;
- TRANSIT_WALLPAPER_OPEN = 13;
- TRANSIT_WALLPAPER_INTRA_OPEN = 14;
- TRANSIT_WALLPAPER_INTRA_CLOSE = 15;
- TRANSIT_TASK_OPEN_BEHIND = 16;
- TRANSIT_TASK_IN_PLACE = 17;
- TRANSIT_ACTIVITY_RELAUNCH = 18;
- TRANSIT_DOCK_TASK_FROM_RECENTS = 19;
- TRANSIT_KEYGUARD_GOING_AWAY = 20;
- TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER = 21;
- TRANSIT_KEYGUARD_OCCLUDE = 22;
- TRANSIT_KEYGUARD_UNOCCLUDE = 23;
- TRANSIT_TRANSLUCENT_ACTIVITY_OPEN = 24;
- TRANSIT_TRANSLUCENT_ACTIVITY_CLOSE = 25;
- TRANSIT_CRASHING_ACTIVITY_CLOSE = 26;
-}
diff --git a/core/proto/android/wifi/enums.proto b/core/proto/android/wifi/enums.proto
deleted file mode 100644
index 315c579..0000000
--- a/core/proto/android/wifi/enums.proto
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.net.wifi;
-
-option java_outer_classname = "WifiProtoEnums";
-option java_multiple_files = true;
-
-/**
- * Wifi Lock modes, primarily used in
- * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLockManager.java.
- */
-enum WifiModeEnum {
- /**
- * Deprecated.
- * Wi-Fi will be kept active, and will behave normally.
- */
- WIFI_MODE_FULL = 1 [deprecated=true];
-
- /**
- * Deprecated.
- * Wi-Fi will be kept active, but the only operation that will be supported is initiation of
- * scans, and the subsequent reporting of scan results.
- */
- WIFI_MODE_SCAN_ONLY = 2 [deprecated=true];
-
- /**
- * Wi-Fi will not go to power save.
- */
- WIFI_MODE_FULL_HIGH_PERF = 3;
-
- /**
- * Wi-Fi will operate with a priority to achieve low latency.
- */
- WIFI_MODE_FULL_LOW_LATENCY = 4;
-}
diff --git a/media/native/midi/MidiDeviceInfo.cpp b/media/native/midi/MidiDeviceInfo.cpp
index ac68d26..8a573fb 100644
--- a/media/native/midi/MidiDeviceInfo.cpp
+++ b/media/native/midi/MidiDeviceInfo.cpp
@@ -90,13 +90,13 @@
status_t MidiDeviceInfo::readStringVector(
const Parcel* parcel, Vector<String16> *vectorPtr, size_t defaultLength) {
- std::unique_ptr<std::vector<std::unique_ptr<String16>>> v;
+ std::optional<std::vector<std::optional<String16>>> v;
status_t result = parcel->readString16Vector(&v);
if (result != OK) return result;
vectorPtr->clear();
- if (v.get() != nullptr) {
+ if (v) {
for (const auto& iter : *v) {
- if (iter.get() != nullptr) {
+ if (iter) {
vectorPtr->push_back(*iter);
} else {
vectorPtr->push_back(String16());
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/brightline/DistanceClassifier.java b/packages/SystemUI/src/com/android/systemui/classifier/brightline/DistanceClassifier.java
index 0329183..9fa2557 100644
--- a/packages/SystemUI/src/com/android/systemui/classifier/brightline/DistanceClassifier.java
+++ b/packages/SystemUI/src/com/android/systemui/classifier/brightline/DistanceClassifier.java
@@ -112,7 +112,6 @@
private DistanceVectors calculateDistances() {
// This code assumes that there will be no missed DOWN or UP events.
- VelocityTracker velocityTracker = VelocityTracker.obtain();
List<MotionEvent> motionEvents = getRecentMotionEvents();
if (motionEvents.size() < 3) {
@@ -120,6 +119,8 @@
return new DistanceVectors(0, 0, 0, 0);
}
+ VelocityTracker velocityTracker = VelocityTracker.obtain();
+
for (MotionEvent motionEvent : motionEvents) {
velocityTracker.addMovement(motionEvent);
}
diff --git a/services/core/java/com/android/server/OWNERS b/services/core/java/com/android/server/OWNERS
index 8099f8f..3d1e709a 100644
--- a/services/core/java/com/android/server/OWNERS
+++ b/services/core/java/com/android/server/OWNERS
@@ -7,3 +7,6 @@
# Zram writeback
per-file ZramWriteback.java = minchan@google.com, rajekumar@google.com, srnvs@google.com
+
+# Userspace reboot
+per-file UserspaceRebootLogger.java = ioffe@google.com, tomcherry@google.com
diff --git a/services/core/java/com/android/server/UserspaceRebootLogger.java b/services/core/java/com/android/server/UserspaceRebootLogger.java
index 2403b63..89327b5 100644
--- a/services/core/java/com/android/server/UserspaceRebootLogger.java
+++ b/services/core/java/com/android/server/UserspaceRebootLogger.java
@@ -59,7 +59,7 @@
*/
public static void noteUserspaceRebootWasRequested() {
if (!PowerManager.isRebootingUserspaceSupportedImpl()) {
- Slog.wtf(TAG, "Userspace reboot is not supported.");
+ Slog.wtf(TAG, "noteUserspaceRebootWasRequested: Userspace reboot is not supported.");
return;
}
@@ -77,7 +77,7 @@
*/
public static void noteUserspaceRebootSuccess() {
if (!PowerManager.isRebootingUserspaceSupportedImpl()) {
- Slog.wtf(TAG, "Userspace reboot is not supported.");
+ Slog.wtf(TAG, "noteUserspaceRebootSuccess: Userspace reboot is not supported.");
return;
}
@@ -88,11 +88,11 @@
/**
* Returns {@code true} if {@code UserspaceRebootReported} atom should be logged.
*
- * <p>This call should only be made on devices supporting userspace reboot.
+ * <p>On devices that do not support userspace reboot this method will always return {@code
+ * false}.
*/
public static boolean shouldLogUserspaceRebootEvent() {
if (!PowerManager.isRebootingUserspaceSupportedImpl()) {
- Slog.wtf(TAG, "Userspace reboot is not supported.");
return false;
}
@@ -110,7 +110,7 @@
*/
public static void logEventAsync(boolean userUnlocked, Executor executor) {
if (!PowerManager.isRebootingUserspaceSupportedImpl()) {
- Slog.wtf(TAG, "Userspace reboot is not supported.");
+ Slog.wtf(TAG, "logEventAsync: Userspace reboot is not supported.");
return;
}
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index b28edc9..ff1a9c0 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -974,7 +974,7 @@
/** Prepare the VPN for the given package. Does not perform permission checks. */
@GuardedBy("this")
private void prepareInternal(String newPackage) {
- long token = Binder.clearCallingIdentity();
+ final long token = Binder.clearCallingIdentity();
try {
// Reset the interface.
if (mInterface != null) {
@@ -1262,7 +1262,7 @@
mNetworkCapabilities.setAdministratorUids(new int[] {mOwnerUID});
mNetworkCapabilities.setUids(createUserAndRestrictedProfilesRanges(mUserId,
mConfig.allowedApplications, mConfig.disallowedApplications));
- long token = Binder.clearCallingIdentity();
+ final long token = Binder.clearCallingIdentity();
try {
mNetworkAgent = new NetworkAgent(mLooper, mContext, NETWORKTYPE /* logtag */,
mNetworkInfo, mNetworkCapabilities, lp,
@@ -1281,7 +1281,7 @@
}
private boolean canHaveRestrictedProfile(int userId) {
- long token = Binder.clearCallingIdentity();
+ final long token = Binder.clearCallingIdentity();
try {
return UserManager.get(mContext).canHaveRestrictedProfile(userId);
} finally {
@@ -1328,7 +1328,7 @@
// Check if the service is properly declared.
Intent intent = new Intent(VpnConfig.SERVICE_INTERFACE);
intent.setClassName(mPackage, config.user);
- long token = Binder.clearCallingIdentity();
+ final long token = Binder.clearCallingIdentity();
try {
// Restricted users are not allowed to create VPNs, they are tied to Owner
enforceNotRestrictedUser();
@@ -2063,7 +2063,7 @@
*/
public void startLegacyVpn(VpnProfile profile, KeyStore keyStore, LinkProperties egress) {
enforceControlPermission();
- long token = Binder.clearCallingIdentity();
+ final long token = Binder.clearCallingIdentity();
try {
startLegacyVpnPrivileged(profile, keyStore, egress);
} finally {
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorService.java b/services/core/java/com/android/server/timedetector/TimeDetectorService.java
index ed6424c..6dac6b1 100644
--- a/services/core/java/com/android/server/timedetector/TimeDetectorService.java
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorService.java
@@ -25,6 +25,7 @@
import android.content.ContentResolver;
import android.content.Context;
import android.database.ContentObserver;
+import android.os.Binder;
import android.os.Handler;
import android.provider.Settings;
@@ -64,9 +65,8 @@
@NonNull private final TimeDetectorStrategy mTimeDetectorStrategy;
private static TimeDetectorService create(@NonNull Context context) {
- TimeDetectorStrategy timeDetectorStrategy = new TimeDetectorStrategyImpl();
- TimeDetectorStrategyCallbackImpl callback = new TimeDetectorStrategyCallbackImpl(context);
- timeDetectorStrategy.initialize(callback);
+ TimeDetectorStrategyImpl.Callback callback = new TimeDetectorStrategyCallbackImpl(context);
+ TimeDetectorStrategy timeDetectorStrategy = new TimeDetectorStrategyImpl(callback);
Handler handler = FgThread.getHandler();
TimeDetectorService timeDetectorService =
@@ -102,11 +102,16 @@
}
@Override
- public void suggestManualTime(@NonNull ManualTimeSuggestion timeSignal) {
+ public boolean suggestManualTime(@NonNull ManualTimeSuggestion timeSignal) {
enforceSuggestManualTimePermission();
Objects.requireNonNull(timeSignal);
- mHandler.post(() -> mTimeDetectorStrategy.suggestManualTime(timeSignal));
+ long token = Binder.clearCallingIdentity();
+ try {
+ return mTimeDetectorStrategy.suggestManualTime(timeSignal);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
@Override
@@ -120,7 +125,7 @@
/** Internal method for handling the auto time setting being changed. */
@VisibleForTesting
public void handleAutoTimeDetectionChanged() {
- mHandler.post(mTimeDetectorStrategy::handleAutoTimeDetectionChanged);
+ mHandler.post(mTimeDetectorStrategy::handleAutoTimeConfigChanged);
}
@Override
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java b/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
index a5fba4e..abd4c8c 100644
--- a/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
@@ -16,6 +16,7 @@
package com.android.server.timedetector;
+import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.timedetector.ManualTimeSuggestion;
@@ -24,6 +25,8 @@
import android.os.TimestampedValue;
import java.io.PrintWriter;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
/**
* The interface for the class that implements the time detection algorithm used by the
@@ -37,57 +40,41 @@
*/
public interface TimeDetectorStrategy {
- /**
- * The interface used by the strategy to interact with the surrounding service.
- *
- * <p>Note: Because the system properties-derived value {@link #isAutoTimeDetectionEnabled()}
- * can be modified independently and from different threads (and processes!). its use is prone
- * to race conditions. That will be true until the responsibility for setting their values is
- * moved to {@link TimeDetectorStrategy}. There are similar issues with
- * {@link #systemClockMillis()} while any process can modify the system clock.
- */
- interface Callback {
+ @IntDef({ ORIGIN_TELEPHONY, ORIGIN_MANUAL, ORIGIN_NETWORK })
+ @Retention(RetentionPolicy.SOURCE)
+ @interface Origin {}
- /**
- * The absolute threshold below which the system clock need not be updated. i.e. if setting
- * the system clock would adjust it by less than this (either backwards or forwards) then it
- * need not be set.
- */
- int systemClockUpdateThresholdMillis();
+ /** Used when a time value originated from a telephony signal. */
+ @Origin
+ int ORIGIN_TELEPHONY = 1;
- /** Returns true if automatic time detection is enabled. */
- boolean isAutoTimeDetectionEnabled();
+ /** Used when a time value originated from a user / manual settings. */
+ @Origin
+ int ORIGIN_MANUAL = 2;
- /** Acquire a suitable wake lock. Must be followed by {@link #releaseWakeLock()} */
- void acquireWakeLock();
+ /** Used when a time value originated from a network signal. */
+ @Origin
+ int ORIGIN_NETWORK = 3;
- /** Returns the elapsedRealtimeMillis clock value. */
- long elapsedRealtimeMillis();
-
- /** Returns the system clock value. */
- long systemClockMillis();
-
- /** Sets the device system clock. The WakeLock must be held. */
- void setSystemClock(long newTimeMillis);
-
- /** Release the wake lock acquired by a call to {@link #acquireWakeLock()}. */
- void releaseWakeLock();
- }
-
- /** Initialize the strategy. */
- void initialize(@NonNull Callback callback);
-
- /** Process the suggested time from telephony sources. */
+ /** Processes the suggested time from telephony sources. */
void suggestTelephonyTime(@NonNull TelephonyTimeSuggestion timeSuggestion);
- /** Process the suggested manually entered time. */
- void suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion);
+ /**
+ * Processes the suggested manually entered time. Returns {@code false} if the suggestion was
+ * invalid, or the device configuration prevented the suggestion being used, {@code true} if the
+ * suggestion was accepted. A suggestion that is valid but does not change the time because it
+ * matches the current device time is considered accepted.
+ */
+ boolean suggestManualTime(@NonNull ManualTimeSuggestion timeSuggestion);
- /** Process the suggested time from network sources. */
+ /** Processes the suggested time from network sources. */
void suggestNetworkTime(@NonNull NetworkTimeSuggestion timeSuggestion);
- /** Handle the auto-time setting being toggled on or off. */
- void handleAutoTimeDetectionChanged();
+ /**
+ * Handles the auto-time configuration changing For example, when the auto-time setting is
+ * toggled on or off.
+ */
+ void handleAutoTimeConfigChanged();
/** Dump debug information. */
void dump(@NonNull PrintWriter pw, @Nullable String[] args);
@@ -102,4 +89,38 @@
return (referenceClockMillisNow - timeValue.getReferenceTimeMillis())
+ timeValue.getValue();
}
+
+ /**
+ * Converts one of the {@code ORIGIN_} constants to a human readable string suitable for config
+ * and debug usage. Throws an {@link IllegalArgumentException} if the value is unrecognized.
+ */
+ static String originToString(@Origin int origin) {
+ switch (origin) {
+ case ORIGIN_MANUAL:
+ return "manual";
+ case ORIGIN_NETWORK:
+ return "network";
+ case ORIGIN_TELEPHONY:
+ return "telephony";
+ default:
+ throw new IllegalArgumentException("origin=" + origin);
+ }
+ }
+
+ /**
+ * Converts a human readable config string to one of the {@code ORIGIN_} constants.
+ * Throws an {@link IllegalArgumentException} if the value is unrecognized.
+ */
+ static @Origin int stringToOrigin(String originString) {
+ switch (originString) {
+ case "manual":
+ return ORIGIN_MANUAL;
+ case "network":
+ return ORIGIN_NETWORK;
+ case "telephony":
+ return ORIGIN_TELEPHONY;
+ default:
+ throw new IllegalArgumentException("originString=" + originString);
+ }
+ }
}
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java
index 19484db..5b6de05 100644
--- a/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java
@@ -16,28 +16,40 @@
package com.android.server.timedetector;
+import static com.android.server.timedetector.TimeDetectorStrategy.stringToOrigin;
+
import android.annotation.NonNull;
import android.app.AlarmManager;
import android.content.ContentResolver;
import android.content.Context;
+import android.os.Build;
+import android.os.Environment;
import android.os.PowerManager;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.provider.Settings;
import android.util.Slog;
+import java.time.Instant;
import java.util.Objects;
/**
- * The real implementation of {@link TimeDetectorStrategy.Callback} used on device.
+ * The real implementation of {@link TimeDetectorStrategyImpl.Callback} used on device.
*/
-public final class TimeDetectorStrategyCallbackImpl implements TimeDetectorStrategy.Callback {
+public final class TimeDetectorStrategyCallbackImpl implements TimeDetectorStrategyImpl.Callback {
private final static String TAG = "timedetector.TimeDetectorStrategyCallbackImpl";
private static final int SYSTEM_CLOCK_UPDATE_THRESHOLD_MILLIS_DEFAULT = 2 * 1000;
/**
+ * Time in the past. If automatic time suggestion is before this point, it's
+ * incorrect for sure.
+ */
+ private static final Instant TIME_LOWER_BOUND = Instant.ofEpochMilli(
+ Long.max(Environment.getRootDirectory().lastModified(), Build.TIME));
+
+ /**
* If a newly calculated system clock time and the current system clock time differs by this or
* more the system clock will actually be updated. Used to prevent the system clock being set
* for only minor differences.
@@ -48,6 +60,7 @@
@NonNull private final ContentResolver mContentResolver;
@NonNull private final PowerManager.WakeLock mWakeLock;
@NonNull private final AlarmManager mAlarmManager;
+ @NonNull private final int[] mOriginPriorities;
public TimeDetectorStrategyCallbackImpl(@NonNull Context context) {
mContext = Objects.requireNonNull(context);
@@ -62,6 +75,15 @@
mSystemClockUpdateThresholdMillis =
SystemProperties.getInt("ro.sys.time_detector_update_diff",
SYSTEM_CLOCK_UPDATE_THRESHOLD_MILLIS_DEFAULT);
+
+ // TODO(b/172230856): Obtain these values from configuration.
+ String[] originStrings = { "telephony", "network" };
+ int[] origins = new int[originStrings.length];
+ for (int i = 0; i < originStrings.length; i++) {
+ int origin = stringToOrigin(originStrings[i]);
+ origins[i] = origin;
+ }
+ mOriginPriorities = origins;
}
@Override
@@ -79,6 +101,16 @@
}
@Override
+ public Instant autoTimeLowerBound() {
+ return TIME_LOWER_BOUND;
+ }
+
+ @Override
+ public int[] getAutoOriginPriorities() {
+ return mOriginPriorities;
+ }
+
+ @Override
public void acquireWakeLock() {
if (mWakeLock.isHeld()) {
Slog.wtf(TAG, "WakeLock " + mWakeLock + " already held");
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java
index 88de340..36a3ddd 100644
--- a/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java
@@ -16,7 +16,8 @@
package com.android.server.timedetector;
-import android.annotation.IntDef;
+import static com.android.server.timedetector.TimeDetectorStrategy.originToString;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.AlarmManager;
@@ -34,8 +35,8 @@
import com.android.server.timezonedetector.ReferenceWithHistory;
import java.io.PrintWriter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
+import java.time.Instant;
+import java.util.Arrays;
/**
* An implementation of {@link TimeDetectorStrategy} that passes telephony and manual suggestions to
@@ -63,22 +64,6 @@
static final long MAX_UTC_TIME_AGE_MILLIS =
TELEPHONY_BUCKET_COUNT * TELEPHONY_BUCKET_SIZE_MILLIS;
- @IntDef({ ORIGIN_TELEPHONY, ORIGIN_MANUAL, ORIGIN_NETWORK })
- @Retention(RetentionPolicy.SOURCE)
- public @interface Origin {}
-
- /** Used when a time value originated from a telephony signal. */
- @Origin
- private static final int ORIGIN_TELEPHONY = 1;
-
- /** Used when a time value originated from a user / manual settings. */
- @Origin
- private static final int ORIGIN_MANUAL = 2;
-
- /** Used when a time value originated from a network signal. */
- @Origin
- private static final int ORIGIN_NETWORK = 3;
-
/**
* CLOCK_PARANOIA: The maximum difference allowed between the expected system clock time and the
* actual system clock time before a warning is logged. Used to help identify situations where
@@ -99,8 +84,8 @@
@NonNull
private final LocalLog mTimeChangesLog = new LocalLog(30, false /* useLocalTimestamps */);
- // @NonNull after initialize()
- private Callback mCallback;
+ @NonNull
+ private final Callback mCallback;
// Used to store the last time the system clock state was set automatically. It is used to
// detect (and log) issues with the realtime clock or whether the clock is being set without
@@ -122,26 +107,77 @@
private final ReferenceWithHistory<NetworkTimeSuggestion> mLastNetworkSuggestion =
new ReferenceWithHistory<>(KEEP_SUGGESTION_HISTORY_SIZE);
- @Override
- public void initialize(@NonNull Callback callback) {
+ /**
+ * The interface used by the strategy to interact with the surrounding service.
+ *
+ * <p>Note: Because the system properties-derived value {@link #isAutoTimeDetectionEnabled()}
+ * can be modified independently and from different threads (and processes!), its use is prone
+ * to race conditions. That will be true until the responsibility for setting their values is
+ * moved to {@link TimeDetectorStrategy}. There are similar issues with
+ * {@link #systemClockMillis()} while any process can modify the system clock.
+ */
+ public interface Callback {
+
+ /**
+ * The absolute threshold below which the system clock need not be updated. i.e. if setting
+ * the system clock would adjust it by less than this (either backwards or forwards) then it
+ * need not be set.
+ */
+ int systemClockUpdateThresholdMillis();
+
+ /** Returns true if automatic time detection is enabled. */
+ boolean isAutoTimeDetectionEnabled();
+
+ /**
+ * Returns a lower bound for valid automatic times. It is guaranteed to be in the past,
+ * i.e. it is unrelated to the current system clock time.
+ * It holds no other meaning; it could be related to when the device system image was built,
+ * or could be updated by a mainline module.
+ */
+ @NonNull
+ Instant autoTimeLowerBound();
+
+ /**
+ * Returns the order to look at time suggestions when automatically detecting time.
+ * See {@code #ORIGIN_} constants
+ */
+ @Origin int[] getAutoOriginPriorities();
+
+ /** Acquire a suitable wake lock. Must be followed by {@link #releaseWakeLock()} */
+ void acquireWakeLock();
+
+ /** Returns the elapsedRealtimeMillis clock value. */
+ long elapsedRealtimeMillis();
+
+ /** Returns the system clock value. */
+ long systemClockMillis();
+
+ /** Sets the device system clock. The WakeLock must be held. */
+ void setSystemClock(long newTimeMillis);
+
+ /** Release the wake lock acquired by a call to {@link #acquireWakeLock()}. */
+ void releaseWakeLock();
+ }
+
+ TimeDetectorStrategyImpl(@NonNull Callback callback) {
mCallback = callback;
}
@Override
- public synchronized void suggestManualTime(@NonNull ManualTimeSuggestion suggestion) {
+ public synchronized boolean suggestManualTime(@NonNull ManualTimeSuggestion suggestion) {
final TimestampedValue<Long> newUtcTime = suggestion.getUtcTime();
if (!validateSuggestionTime(newUtcTime, suggestion)) {
- return;
+ return false;
}
String cause = "Manual time suggestion received: suggestion=" + suggestion;
- setSystemClockIfRequired(ORIGIN_MANUAL, newUtcTime, cause);
+ return setSystemClockIfRequired(ORIGIN_MANUAL, newUtcTime, cause);
}
@Override
public synchronized void suggestNetworkTime(@NonNull NetworkTimeSuggestion timeSuggestion) {
- if (!validateSuggestionTime(timeSuggestion.getUtcTime(), timeSuggestion)) {
+ if (!validateAutoSuggestionTime(timeSuggestion.getUtcTime(), timeSuggestion)) {
return;
}
@@ -175,9 +211,12 @@
return;
}
- // Perform validation / input filtering and record the validated suggestion against the
- // slotIndex.
- if (!validateAndStoreTelephonySuggestion(timeSuggestion)) {
+ if (!validateAutoSuggestionTime(timeSuggestion.getUtcTime(), timeSuggestion)) {
+ return;
+ }
+
+ // Perform input filtering and record the validated suggestion against the slotIndex.
+ if (!storeTelephonySuggestion(timeSuggestion)) {
return;
}
@@ -188,12 +227,12 @@
}
@Override
- public synchronized void handleAutoTimeDetectionChanged() {
+ public synchronized void handleAutoTimeConfigChanged() {
boolean enabled = mCallback.isAutoTimeDetectionEnabled();
// When automatic time detection is enabled we update the system clock instantly if we can.
// Conversely, when automatic time detection is disabled we leave the clock as it is.
if (enabled) {
- String reason = "Auto time zone detection setting enabled.";
+ String reason = "Auto time zone detection config changed.";
doAutoTimeDetection(reason);
} else {
// CLOCK_PARANOIA: We are losing "control" of the system clock so we cannot predict what
@@ -236,14 +275,9 @@
}
@GuardedBy("this")
- private boolean validateAndStoreTelephonySuggestion(
+ private boolean storeTelephonySuggestion(
@NonNull TelephonyTimeSuggestion suggestion) {
TimestampedValue<Long> newUtcTime = suggestion.getUtcTime();
- if (!validateSuggestionTime(newUtcTime, suggestion)) {
- // There's probably nothing useful we can do: elsewhere we assume that reference
- // times are in the past so just stop here.
- return false;
- }
int slotIndex = suggestion.getSlotIndex();
TelephonyTimeSuggestion previousSuggestion = mSuggestionBySlotIndex.get(slotIndex);
@@ -294,6 +328,26 @@
return true;
}
+ private boolean validateAutoSuggestionTime(
+ @NonNull TimestampedValue<Long> newUtcTime, @NonNull Object suggestion) {
+ return validateSuggestionTime(newUtcTime, suggestion)
+ && validateSuggestionAgainstLowerBound(newUtcTime, suggestion);
+ }
+
+ private boolean validateSuggestionAgainstLowerBound(
+ @NonNull TimestampedValue<Long> newUtcTime, @NonNull Object suggestion) {
+ Instant lowerBound = mCallback.autoTimeLowerBound();
+
+ // Suggestion is definitely wrong if it comes before lower time bound.
+ if (lowerBound.isAfter(Instant.ofEpochMilli(newUtcTime.getValue()))) {
+ Slog.w(LOG_TAG, "Suggestion points to time before lower bound, skipping it. "
+ + "suggestion=" + suggestion + ", lower bound=" + lowerBound);
+ return false;
+ }
+
+ return true;
+ }
+
@GuardedBy("this")
private void doAutoTimeDetection(@NonNull String detectionReason) {
if (!mCallback.isAutoTimeDetectionEnabled()) {
@@ -301,33 +355,44 @@
return;
}
- // Android devices currently prioritize any telephony over network signals. There are
- // carrier compliance tests that would need to be changed before we could ignore NITZ or
- // prefer NTP generally. This check is cheap on devices without telephony hardware.
- TelephonyTimeSuggestion bestTelephonySuggestion = findBestTelephonySuggestion();
- if (bestTelephonySuggestion != null) {
- final TimestampedValue<Long> newUtcTime = bestTelephonySuggestion.getUtcTime();
- String cause = "Found good telephony suggestion."
- + ", bestTelephonySuggestion=" + bestTelephonySuggestion
- + ", detectionReason=" + detectionReason;
- setSystemClockIfRequired(ORIGIN_TELEPHONY, newUtcTime, cause);
- return;
- }
+ // Try the different origins one at a time.
+ int[] originPriorities = mCallback.getAutoOriginPriorities();
+ for (int origin : originPriorities) {
+ TimestampedValue<Long> newUtcTime = null;
+ String cause = null;
+ if (origin == ORIGIN_TELEPHONY) {
+ TelephonyTimeSuggestion bestTelephonySuggestion = findBestTelephonySuggestion();
+ if (bestTelephonySuggestion != null) {
+ newUtcTime = bestTelephonySuggestion.getUtcTime();
+ cause = "Found good telephony suggestion."
+ + ", bestTelephonySuggestion=" + bestTelephonySuggestion
+ + ", detectionReason=" + detectionReason;
+ }
+ } else if (origin == ORIGIN_NETWORK) {
+ NetworkTimeSuggestion networkSuggestion = findLatestValidNetworkSuggestion();
+ if (networkSuggestion != null) {
+ newUtcTime = networkSuggestion.getUtcTime();
+ cause = "Found good network suggestion."
+ + ", networkSuggestion=" + networkSuggestion
+ + ", detectionReason=" + detectionReason;
+ }
+ } else {
+ Slog.w(LOG_TAG, "Unknown or unsupported origin=" + origin
+ + " in " + Arrays.toString(originPriorities)
+ + ": Skipping");
+ }
- // There is no good telephony suggestion, try network.
- NetworkTimeSuggestion networkSuggestion = findLatestValidNetworkSuggestion();
- if (networkSuggestion != null) {
- final TimestampedValue<Long> newUtcTime = networkSuggestion.getUtcTime();
- String cause = "Found good network suggestion."
- + ", networkSuggestion=" + networkSuggestion
- + ", detectionReason=" + detectionReason;
- setSystemClockIfRequired(ORIGIN_NETWORK, newUtcTime, cause);
- return;
+ // Update the system clock if a good suggestion has been found.
+ if (newUtcTime != null) {
+ setSystemClockIfRequired(origin, newUtcTime, cause);
+ return;
+ }
}
if (DBG) {
- Slog.d(LOG_TAG, "Could not determine time: No best telephony or network suggestion."
- + " detectionReason=" + detectionReason);
+ Slog.d(LOG_TAG, "Could not determine time: No suggestion found in"
+ + " originPriorities=" + Arrays.toString(originPriorities)
+ + ", detectionReason=" + detectionReason);
}
}
@@ -412,7 +477,7 @@
// Validate first.
TimestampedValue<Long> utcTime = timeSuggestion.getUtcTime();
if (!validateSuggestionUtcTime(elapsedRealtimeMillis, utcTime)) {
- Slog.w(LOG_TAG, "Existing suggestion found to be invalid "
+ Slog.w(LOG_TAG, "Existing suggestion found to be invalid"
+ " elapsedRealtimeMillis=" + elapsedRealtimeMillis
+ ", timeSuggestion=" + timeSuggestion);
return TELEPHONY_INVALID_SCORE;
@@ -453,7 +518,7 @@
}
@GuardedBy("this")
- private void setSystemClockIfRequired(
+ private boolean setSystemClockIfRequired(
@Origin int origin, @NonNull TimestampedValue<Long> time, @NonNull String cause) {
boolean isOriginAutomatic = isOriginAutomatic(origin);
@@ -461,27 +526,27 @@
if (!mCallback.isAutoTimeDetectionEnabled()) {
if (DBG) {
Slog.d(LOG_TAG, "Auto time detection is not enabled."
- + " origin=" + origin
+ + " origin=" + originToString(origin)
+ ", time=" + time
+ ", cause=" + cause);
}
- return;
+ return false;
}
} else {
if (mCallback.isAutoTimeDetectionEnabled()) {
if (DBG) {
Slog.d(LOG_TAG, "Auto time detection is enabled."
- + " origin=" + origin
+ + " origin=" + originToString(origin)
+ ", time=" + time
+ ", cause=" + cause);
}
- return;
+ return false;
}
}
mCallback.acquireWakeLock();
try {
- setSystemClockUnderWakeLock(origin, time, cause);
+ return setSystemClockUnderWakeLock(origin, time, cause);
} finally {
mCallback.releaseWakeLock();
}
@@ -492,8 +557,8 @@
}
@GuardedBy("this")
- private void setSystemClockUnderWakeLock(
- int origin, @NonNull TimestampedValue<Long> newTime, @NonNull Object cause) {
+ private boolean setSystemClockUnderWakeLock(
+ @Origin int origin, @NonNull TimestampedValue<Long> newTime, @NonNull String cause) {
long elapsedRealtimeMillis = mCallback.elapsedRealtimeMillis();
boolean isOriginAutomatic = isOriginAutomatic(origin);
@@ -536,7 +601,7 @@
+ " systemClockUpdateThreshold=" + systemClockUpdateThreshold
+ " absTimeDifference=" + absTimeDifference);
}
- return;
+ return true;
}
mCallback.setSystemClock(newSystemClockMillis);
@@ -556,6 +621,7 @@
} else {
mLastAutoSystemClockTimeSet = null;
}
+ return true;
}
/**
diff --git a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorService.java b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorService.java
index fc52584..0b85052e1 100644
--- a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorService.java
+++ b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorService.java
@@ -24,6 +24,7 @@
import android.content.ContentResolver;
import android.content.Context;
import android.database.ContentObserver;
+import android.os.Binder;
import android.os.Handler;
import android.os.ResultReceiver;
import android.os.ShellCallback;
@@ -95,11 +96,16 @@
}
@Override
- public void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion) {
+ public boolean suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion) {
enforceSuggestManualTimeZonePermission();
Objects.requireNonNull(timeZoneSuggestion);
- mHandler.post(() -> mTimeZoneDetectorStrategy.suggestManualTimeZone(timeZoneSuggestion));
+ long token = Binder.clearCallingIdentity();
+ try {
+ return mTimeZoneDetectorStrategy.suggestManualTimeZone(timeZoneSuggestion);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
@Override
diff --git a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategy.java b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategy.java
index e0b3ad5..7f22e6c 100644
--- a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategy.java
+++ b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategy.java
@@ -37,9 +37,13 @@
public interface TimeZoneDetectorStrategy {
/**
- * Suggests a time zone for the device using manually-entered (i.e. user sourced) information.
+ * Suggests a time zone for the device, determined from the user's manually entered information.
+ * Returns {@code false} if the suggestion was invalid, or the device configuration prevented
+ * the suggestion being used, {@code true} if the suggestion was accepted. A suggestion that is
+ * valid but does not change the time zone because it matches the current device time zone is
+ * considered accepted.
*/
- void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion suggestion);
+ boolean suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion suggestion);
/**
* Suggests a time zone for the device, or withdraws a previous suggestion if
diff --git a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategyImpl.java b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategyImpl.java
index d318b1a..69a2b54 100644
--- a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategyImpl.java
+++ b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorStrategyImpl.java
@@ -199,12 +199,13 @@
}
@Override
- public synchronized void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion suggestion) {
+ public synchronized boolean suggestManualTimeZone(
+ @NonNull ManualTimeZoneSuggestion suggestion) {
Objects.requireNonNull(suggestion);
String timeZoneId = suggestion.getZoneId();
String cause = "Manual time suggestion received: suggestion=" + suggestion;
- setDeviceTimeZoneIfRequired(ORIGIN_MANUAL, timeZoneId, cause);
+ return setDeviceTimeZoneIfRequired(ORIGIN_MANUAL, timeZoneId, cause);
}
@Override
@@ -305,7 +306,7 @@
}
@GuardedBy("this")
- private void setDeviceTimeZoneIfRequired(
+ private boolean setDeviceTimeZoneIfRequired(
@Origin int origin, @NonNull String newZoneId, @NonNull String cause) {
Objects.requireNonNull(newZoneId);
Objects.requireNonNull(cause);
@@ -319,7 +320,7 @@
+ ", newZoneId=" + newZoneId
+ ", cause=" + cause);
}
- return;
+ return false;
}
} else {
if (mCallback.isAutoTimeZoneDetectionEnabled()) {
@@ -329,7 +330,7 @@
+ ", newZoneId=" + newZoneId
+ ", cause=" + cause);
}
- return;
+ return false;
}
}
@@ -346,7 +347,7 @@
+ ", newZoneId=" + newZoneId
+ ", cause=" + cause);
}
- return;
+ return true;
}
mCallback.setDeviceTimeZone(newZoneId);
@@ -359,6 +360,7 @@
Slog.d(LOG_TAG, msg);
}
mTimeZoneChangesLog.log(msg);
+ return true;
}
private static boolean isOriginAutomatic(@Origin int origin) {
diff --git a/services/core/jni/com_android_server_am_BatteryStatsService.cpp b/services/core/jni/com_android_server_am_BatteryStatsService.cpp
index 0e68f5b..0034286 100644
--- a/services/core/jni/com_android_server_am_BatteryStatsService.cpp
+++ b/services/core/jni/com_android_server_am_BatteryStatsService.cpp
@@ -124,7 +124,7 @@
{
std::unique_lock<std::mutex> reasonsLock(mReasonsMutex, std::defer_lock);
if (reasonsLock.try_lock() && mWakeupReasons.empty()) {
- mWakeupReasons = std::move(wakeupReasons);
+ mWakeupReasons = wakeupReasons;
reasonsCaptured = true;
}
}
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
index 2eeeb3e..22addf9 100644
--- a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
@@ -132,15 +132,14 @@
doNothing().when(mMockContext).enforceCallingOrSelfPermission(anyString(), any());
ManualTimeSuggestion manualTimeSuggestion = createManualTimeSuggestion();
- mTimeDetectorService.suggestManualTime(manualTimeSuggestion);
- mTestHandler.assertTotalMessagesEnqueued(1);
+
+ assertTrue(mTimeDetectorService.suggestManualTime(manualTimeSuggestion));
+ mStubbedTimeDetectorStrategy.verifySuggestManualTimeCalled(manualTimeSuggestion);
verify(mMockContext).enforceCallingOrSelfPermission(
eq(android.Manifest.permission.SUGGEST_MANUAL_TIME_AND_ZONE),
anyString());
- mTestHandler.waitForMessagesToBeProcessed();
- mStubbedTimeDetectorStrategy.verifySuggestManualTimeCalled(manualTimeSuggestion);
}
@Test(expected = SecurityException.class)
@@ -227,17 +226,14 @@
private boolean mDumpCalled;
@Override
- public void initialize(Callback ignored) {
- }
-
- @Override
public void suggestTelephonyTime(TelephonyTimeSuggestion timeSuggestion) {
mLastTelephonySuggestion = timeSuggestion;
}
@Override
- public void suggestManualTime(ManualTimeSuggestion timeSuggestion) {
+ public boolean suggestManualTime(ManualTimeSuggestion timeSuggestion) {
mLastManualSuggestion = timeSuggestion;
+ return true;
}
@Override
@@ -246,7 +242,7 @@
}
@Override
- public void handleAutoTimeDetectionChanged() {
+ public void handleAutoTimeConfigChanged() {
mHandleAutoTimeDetectionChangedCalled = true;
}
@@ -267,11 +263,11 @@
assertEquals(expectedSuggestion, mLastTelephonySuggestion);
}
- public void verifySuggestManualTimeCalled(ManualTimeSuggestion expectedSuggestion) {
+ void verifySuggestManualTimeCalled(ManualTimeSuggestion expectedSuggestion) {
assertEquals(expectedSuggestion, mLastManualSuggestion);
}
- public void verifySuggestNetworkTimeCalled(NetworkTimeSuggestion expectedSuggestion) {
+ void verifySuggestNetworkTimeCalled(NetworkTimeSuggestion expectedSuggestion) {
assertEquals(expectedSuggestion, mLastNetworkSuggestion);
}
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
index 803b245..c23fb80 100644
--- a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
+++ b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
@@ -16,6 +16,9 @@
package com.android.server.timedetector;
+import static com.android.server.timedetector.TimeDetectorStrategy.ORIGIN_NETWORK;
+import static com.android.server.timedetector.TimeDetectorStrategy.ORIGIN_TELEPHONY;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
@@ -25,32 +28,39 @@
import android.app.timedetector.ManualTimeSuggestion;
import android.app.timedetector.NetworkTimeSuggestion;
import android.app.timedetector.TelephonyTimeSuggestion;
-import android.icu.util.Calendar;
-import android.icu.util.GregorianCalendar;
-import android.icu.util.TimeZone;
import android.os.TimestampedValue;
import androidx.test.runner.AndroidJUnit4;
+import com.android.server.timedetector.TimeDetectorStrategy.Origin;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneOffset;
@RunWith(AndroidJUnit4.class)
public class TimeDetectorStrategyImplTest {
- private static final TimestampedValue<Long> ARBITRARY_CLOCK_INITIALIZATION_INFO =
+ private static final Instant TIME_LOWER_BOUND = createUtcTime(2009, 1, 1, 12, 0, 0);
+
+ private static final TimestampedValue<Instant> ARBITRARY_CLOCK_INITIALIZATION_INFO =
new TimestampedValue<>(
123456789L /* realtimeClockMillis */,
- createUtcTime(2008, 5, 23, 12, 0, 0));
+ createUtcTime(2010, 5, 23, 12, 0, 0));
+
+ // This is the traditional ordering for time detection on Android.
+ private static final @Origin int [] PROVIDERS_PRIORITY = { ORIGIN_TELEPHONY, ORIGIN_NETWORK };
/**
* An arbitrary time, very different from the {@link #ARBITRARY_CLOCK_INITIALIZATION_INFO}
* time. Can be used as the basis for time suggestions.
*/
- private static final long ARBITRARY_TEST_TIME_MILLIS = createUtcTime(2018, 1, 1, 12, 0, 0);
+ private static final Instant ARBITRARY_TEST_TIME = createUtcTime(2018, 1, 1, 12, 0, 0);
private static final int ARBITRARY_SLOT_INDEX = 123456;
@@ -67,10 +77,10 @@
.pokeAutoTimeDetectionEnabled(true);
int slotIndex = ARBITRARY_SLOT_INDEX;
- long testTimeMillis = ARBITRARY_TEST_TIME_MILLIS;
+ Instant testTime = ARBITRARY_TEST_TIME;
TelephonyTimeSuggestion timeSuggestion =
- mScript.generateTelephonyTimeSuggestion(slotIndex, testTimeMillis);
+ mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
mScript.simulateTimePassing()
.simulateTelephonyTimeSuggestion(timeSuggestion);
@@ -106,9 +116,9 @@
// Send the first time signal. It should be used.
{
TelephonyTimeSuggestion timeSuggestion1 =
- mScript.generateTelephonyTimeSuggestion(slotIndex, ARBITRARY_TEST_TIME_MILLIS);
+ mScript.generateTelephonyTimeSuggestion(slotIndex, ARBITRARY_TEST_TIME);
- // Increment the the device clocks to simulate the passage of time.
+ // Increment the device clocks to simulate the passage of time.
mScript.simulateTimePassing(clockIncrementMillis);
long expectedSystemClockMillis1 =
@@ -157,13 +167,13 @@
// uses the lowest slotIndex when multiple telephony suggestions are available.
int slotIndex1 = ARBITRARY_SLOT_INDEX;
int slotIndex2 = ARBITRARY_SLOT_INDEX + 1;
- long slotIndex1TimeMillis = ARBITRARY_TEST_TIME_MILLIS;
- long slotIndex2TimeMillis = ARBITRARY_TEST_TIME_MILLIS + Duration.ofDays(1).toMillis();
+ Instant slotIndex1Time = ARBITRARY_TEST_TIME;
+ Instant slotIndex2Time = ARBITRARY_TEST_TIME.plus(Duration.ofDays(1));
// Make a suggestion with slotIndex2.
{
TelephonyTimeSuggestion slotIndex2TimeSuggestion =
- mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2TimeMillis);
+ mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2Time);
mScript.simulateTimePassing();
long expectedSystemClockMillis =
@@ -180,7 +190,7 @@
// Now make a different suggestion with slotIndex1.
{
TelephonyTimeSuggestion slotIndex1TimeSuggestion =
- mScript.generateTelephonyTimeSuggestion(slotIndex1, slotIndex1TimeMillis);
+ mScript.generateTelephonyTimeSuggestion(slotIndex1, slotIndex1Time);
mScript.simulateTimePassing();
long expectedSystemClockMillis =
@@ -198,7 +208,7 @@
// slotIndex1 suggestion will still "win".
{
TelephonyTimeSuggestion slotIndex2TimeSuggestion =
- mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2TimeMillis);
+ mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2Time);
mScript.simulateTimePassing();
mScript.simulateTelephonyTimeSuggestion(slotIndex2TimeSuggestion)
@@ -213,7 +223,7 @@
// is in an older "bucket".
{
TelephonyTimeSuggestion slotIndex2TimeSuggestion =
- mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2TimeMillis);
+ mScript.generateTelephonyTimeSuggestion(slotIndex2, slotIndex2Time);
mScript.simulateTimePassing();
long expectedSystemClockMillis =
@@ -232,7 +242,7 @@
int slotIndex = ARBITRARY_SLOT_INDEX;
TelephonyTimeSuggestion timeSuggestion =
- mScript.generateTelephonyTimeSuggestion(slotIndex, ARBITRARY_TEST_TIME_MILLIS);
+ mScript.generateTelephonyTimeSuggestion(slotIndex, ARBITRARY_TEST_TIME);
mScript.simulateTimePassing()
.simulateTelephonyTimeSuggestion(timeSuggestion)
.verifySystemClockWasNotSetAndResetCallTracking()
@@ -246,11 +256,11 @@
.pokeThresholds(systemClockUpdateThreshold)
.pokeAutoTimeDetectionEnabled(true);
- long testTimeMillis = ARBITRARY_TEST_TIME_MILLIS;
+ Instant testTime = ARBITRARY_TEST_TIME;
int slotIndex = ARBITRARY_SLOT_INDEX;
TelephonyTimeSuggestion timeSuggestion1 =
- mScript.generateTelephonyTimeSuggestion(slotIndex, testTimeMillis);
+ mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
TimestampedValue<Long> utcTime1 = timeSuggestion1.getUtcTime();
// Initialize the strategy / device with a time set from a telephony suggestion.
@@ -300,6 +310,23 @@
}
@Test
+ public void telephonyTimeSuggestion_ignoredWhenReferencedTimeIsInThePast() {
+ mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+ .pokeAutoTimeDetectionEnabled(true);
+
+ int slotIndex = ARBITRARY_SLOT_INDEX;
+ Instant suggestedTime = TIME_LOWER_BOUND.minus(Duration.ofDays(1));
+
+ TelephonyTimeSuggestion timeSuggestion =
+ mScript.generateTelephonyTimeSuggestion(
+ slotIndex, suggestedTime);
+
+ mScript.simulateTelephonyTimeSuggestion(timeSuggestion)
+ .verifySystemClockWasNotSetAndResetCallTracking()
+ .assertLatestTelephonySuggestion(slotIndex, null);
+ }
+
+ @Test
public void testSuggestTelephonyTime_timeDetectionToggled() {
final int clockIncrementMillis = 100;
final int systemClockUpdateThreshold = 2000;
@@ -308,9 +335,9 @@
.pokeAutoTimeDetectionEnabled(false);
int slotIndex = ARBITRARY_SLOT_INDEX;
- long testTimeMillis = ARBITRARY_TEST_TIME_MILLIS;
+ Instant testTime = ARBITRARY_TEST_TIME;
TelephonyTimeSuggestion timeSuggestion1 =
- mScript.generateTelephonyTimeSuggestion(slotIndex, testTimeMillis);
+ mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
TimestampedValue<Long> utcTime1 = timeSuggestion1.getUtcTime();
// Simulate time passing.
@@ -366,9 +393,9 @@
.pokeAutoTimeDetectionEnabled(true);
int slotIndex = ARBITRARY_SLOT_INDEX;
- long testTimeMillis = ARBITRARY_TEST_TIME_MILLIS;
+ Instant testTime = ARBITRARY_TEST_TIME;
TelephonyTimeSuggestion telephonySuggestion =
- mScript.generateTelephonyTimeSuggestion(slotIndex, testTimeMillis);
+ mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
mScript.simulateTimePassing();
@@ -397,13 +424,13 @@
.pokeAutoTimeDetectionEnabled(false);
ManualTimeSuggestion timeSuggestion =
- mScript.generateManualTimeSuggestion(ARBITRARY_TEST_TIME_MILLIS);
+ mScript.generateManualTimeSuggestion(ARBITRARY_TEST_TIME);
mScript.simulateTimePassing();
long expectedSystemClockMillis =
mScript.calculateTimeInMillisForNow(timeSuggestion.getUtcTime());
- mScript.simulateManualTimeSuggestion(timeSuggestion)
+ mScript.simulateManualTimeSuggestion(timeSuggestion, true /* expectedResult */)
.verifySystemClockWasSetAndResetCallTracking(expectedSystemClockMillis);
}
@@ -416,9 +443,9 @@
int slotIndex = ARBITRARY_SLOT_INDEX;
// Simulate a telephony suggestion.
- long testTimeMillis = ARBITRARY_TEST_TIME_MILLIS;
+ Instant testTime = ARBITRARY_TEST_TIME;
TelephonyTimeSuggestion telephonyTimeSuggestion =
- mScript.generateTelephonyTimeSuggestion(slotIndex, testTimeMillis);
+ mScript.generateTelephonyTimeSuggestion(slotIndex, testTime);
// Simulate the passage of time.
mScript.simulateTimePassing();
@@ -441,14 +468,14 @@
mScript.simulateTimePassing();
// Simulate a manual suggestion 1 day different from the auto suggestion.
- long manualTimeMillis = testTimeMillis + Duration.ofDays(1).toMillis();
+ Instant manualTime = testTime.plus(Duration.ofDays(1));
ManualTimeSuggestion manualTimeSuggestion =
- mScript.generateManualTimeSuggestion(manualTimeMillis);
+ mScript.generateManualTimeSuggestion(manualTime);
mScript.simulateTimePassing();
long expectedManualClockMillis =
mScript.calculateTimeInMillisForNow(manualTimeSuggestion.getUtcTime());
- mScript.simulateManualTimeSuggestion(manualTimeSuggestion)
+ mScript.simulateManualTimeSuggestion(manualTimeSuggestion, true /* expectedResult */)
.verifySystemClockWasSetAndResetCallTracking(expectedManualClockMillis)
.assertLatestTelephonySuggestion(slotIndex, telephonyTimeSuggestion);
@@ -469,29 +496,39 @@
.assertLatestTelephonySuggestion(slotIndex, telephonyTimeSuggestion);
}
- /**
- * Manual suggestions should be ignored if auto time is enabled.
- */
@Test
- public void testSuggestManualTime_autoTimeEnabled() {
+ public void manualTimeSuggestion_isIgnored_whenAutoTimeEnabled() {
mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
.pokeAutoTimeDetectionEnabled(true);
ManualTimeSuggestion timeSuggestion =
- mScript.generateManualTimeSuggestion(ARBITRARY_TEST_TIME_MILLIS);
+ mScript.generateManualTimeSuggestion(ARBITRARY_TEST_TIME);
mScript.simulateTimePassing()
- .simulateManualTimeSuggestion(timeSuggestion)
+ .simulateManualTimeSuggestion(timeSuggestion, false /* expectedResult */)
.verifySystemClockWasNotSetAndResetCallTracking();
}
@Test
+ public void manualTimeSuggestion_ignoresTimeLowerBound() {
+ mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+ .pokeAutoTimeDetectionEnabled(false);
+ Instant suggestedTime = TIME_LOWER_BOUND.minus(Duration.ofDays(1));
+
+ ManualTimeSuggestion timeSuggestion =
+ mScript.generateManualTimeSuggestion(suggestedTime);
+
+ mScript.simulateManualTimeSuggestion(timeSuggestion, true /* expectedResult */)
+ .verifySystemClockWasSetAndResetCallTracking(suggestedTime.toEpochMilli());
+ }
+
+ @Test
public void testSuggestNetworkTime_autoTimeEnabled() {
mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
.pokeAutoTimeDetectionEnabled(true);
NetworkTimeSuggestion timeSuggestion =
- mScript.generateNetworkTimeSuggestion(ARBITRARY_TEST_TIME_MILLIS);
+ mScript.generateNetworkTimeSuggestion(ARBITRARY_TEST_TIME);
mScript.simulateTimePassing();
@@ -507,7 +544,7 @@
.pokeAutoTimeDetectionEnabled(false);
NetworkTimeSuggestion timeSuggestion =
- mScript.generateNetworkTimeSuggestion(ARBITRARY_TEST_TIME_MILLIS);
+ mScript.generateNetworkTimeSuggestion(ARBITRARY_TEST_TIME);
mScript.simulateTimePassing()
.simulateNetworkTimeSuggestion(timeSuggestion)
@@ -520,16 +557,16 @@
.pokeAutoTimeDetectionEnabled(true);
// Three obviously different times that could not be mistaken for each other.
- long networkTimeMillis1 = ARBITRARY_TEST_TIME_MILLIS;
- long networkTimeMillis2 = ARBITRARY_TEST_TIME_MILLIS + Duration.ofDays(30).toMillis();
- long telephonyTimeMillis = ARBITRARY_TEST_TIME_MILLIS + Duration.ofDays(60).toMillis();
+ Instant networkTime1 = ARBITRARY_TEST_TIME;
+ Instant networkTime2 = ARBITRARY_TEST_TIME.plus(Duration.ofDays(30));
+ Instant telephonyTime = ARBITRARY_TEST_TIME.plus(Duration.ofDays(60));
// A small increment used to simulate the passage of time, but not enough to interfere with
// macro-level time changes associated with suggestion age.
final long smallTimeIncrementMillis = 101;
// A network suggestion is made. It should be used because there is no telephony suggestion.
NetworkTimeSuggestion networkTimeSuggestion1 =
- mScript.generateNetworkTimeSuggestion(networkTimeMillis1);
+ mScript.generateNetworkTimeSuggestion(networkTime1);
mScript.simulateTimePassing(smallTimeIncrementMillis)
.simulateNetworkTimeSuggestion(networkTimeSuggestion1)
.verifySystemClockWasSetAndResetCallTracking(
@@ -548,7 +585,7 @@
// Now a telephony suggestion is made. Telephony suggestions are prioritized over network
// suggestions so it should "win".
TelephonyTimeSuggestion telephonyTimeSuggestion =
- mScript.generateTelephonyTimeSuggestion(ARBITRARY_SLOT_INDEX, telephonyTimeMillis);
+ mScript.generateTelephonyTimeSuggestion(ARBITRARY_SLOT_INDEX, telephonyTime);
mScript.simulateTimePassing(smallTimeIncrementMillis)
.simulateTelephonyTimeSuggestion(telephonyTimeSuggestion)
.verifySystemClockWasSetAndResetCallTracking(
@@ -568,7 +605,7 @@
// Now another network suggestion is made. Telephony suggestions are prioritized over
// network suggestions so the latest telephony suggestion should still "win".
NetworkTimeSuggestion networkTimeSuggestion2 =
- mScript.generateNetworkTimeSuggestion(networkTimeMillis2);
+ mScript.generateNetworkTimeSuggestion(networkTime2);
mScript.simulateTimePassing(smallTimeIncrementMillis)
.simulateNetworkTimeSuggestion(networkTimeSuggestion2)
.verifySystemClockWasNotSetAndResetCallTracking();
@@ -612,16 +649,98 @@
assertNull(mScript.peekBestTelephonySuggestion());
}
+ @Test
+ public void networkTimeSuggestion_ignoredWhenReferencedTimeIsInThePast() {
+ mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+ .pokeAutoTimeDetectionEnabled(true);
+
+ Instant suggestedTime = TIME_LOWER_BOUND.minus(Duration.ofDays(1));
+ NetworkTimeSuggestion timeSuggestion = mScript
+ .generateNetworkTimeSuggestion(suggestedTime);
+
+ mScript.simulateNetworkTimeSuggestion(timeSuggestion)
+ .verifySystemClockWasNotSetAndResetCallTracking()
+ .assertLatestNetworkSuggestion(null);
+ }
+
+ @Test
+ public void whenAllTimeSuggestionsAreAvailable_higherPriorityWins_lowerPriorityComesFirst() {
+ mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+ .pokeAutoTimeDetectionEnabled(true);
+
+ Instant networkTime = ARBITRARY_TEST_TIME;
+ Instant telephonyTime = ARBITRARY_TEST_TIME.plus(Duration.ofDays(30));
+
+ NetworkTimeSuggestion networkTimeSuggestion =
+ mScript.generateNetworkTimeSuggestion(networkTime);
+ TelephonyTimeSuggestion telephonyTimeSuggestion =
+ mScript.generateTelephonyTimeSuggestion(ARBITRARY_SLOT_INDEX, telephonyTime);
+
+ mScript.simulateNetworkTimeSuggestion(networkTimeSuggestion)
+ .simulateTelephonyTimeSuggestion(telephonyTimeSuggestion)
+ .assertLatestNetworkSuggestion(networkTimeSuggestion)
+ .assertLatestTelephonySuggestion(ARBITRARY_SLOT_INDEX, telephonyTimeSuggestion)
+ .verifySystemClockWasSetAndResetCallTracking(telephonyTime.toEpochMilli());
+ }
+
+ @Test
+ public void whenAllTimeSuggestionsAreAvailable_higherPriorityWins_higherPriorityComesFirst() {
+ mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+ .pokeAutoTimeDetectionEnabled(true);
+
+ Instant networkTime = ARBITRARY_TEST_TIME;
+ Instant telephonyTime = ARBITRARY_TEST_TIME.plus(Duration.ofDays(30));
+
+ NetworkTimeSuggestion networkTimeSuggestion =
+ mScript.generateNetworkTimeSuggestion(networkTime);
+ TelephonyTimeSuggestion telephonyTimeSuggestion =
+ mScript.generateTelephonyTimeSuggestion(ARBITRARY_SLOT_INDEX, telephonyTime);
+
+ mScript.simulateTelephonyTimeSuggestion(telephonyTimeSuggestion)
+ .simulateNetworkTimeSuggestion(networkTimeSuggestion)
+ .assertLatestNetworkSuggestion(networkTimeSuggestion)
+ .assertLatestTelephonySuggestion(ARBITRARY_SLOT_INDEX, telephonyTimeSuggestion)
+ .verifySystemClockWasSetAndResetCallTracking(telephonyTime.toEpochMilli());
+ }
+
+ @Test
+ public void whenHighestPrioritySuggestionIsNotAvailable_fallbacksToNext() {
+ mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+ .pokeAutoTimeDetectionEnabled(true);
+
+ NetworkTimeSuggestion timeSuggestion =
+ mScript.generateNetworkTimeSuggestion(ARBITRARY_TEST_TIME);
+
+ mScript.simulateNetworkTimeSuggestion(timeSuggestion)
+ .assertLatestNetworkSuggestion(timeSuggestion)
+ .verifySystemClockWasSetAndResetCallTracking(ARBITRARY_TEST_TIME.toEpochMilli());
+ }
+
+ @Test
+ public void suggestionsFromSourceNotListedInPrioritiesList_areIgnored() {
+ mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
+ .pokeAutoTimeDetectionEnabled(true)
+ .pokeAutoOriginPriorities(new int[]{ORIGIN_TELEPHONY});
+
+ NetworkTimeSuggestion timeSuggestion = mScript.generateNetworkTimeSuggestion(
+ ARBITRARY_TEST_TIME);
+
+ mScript.simulateNetworkTimeSuggestion(timeSuggestion)
+ .assertLatestNetworkSuggestion(timeSuggestion)
+ .verifySystemClockWasNotSetAndResetCallTracking();
+ }
+
/**
* A fake implementation of TimeDetectorStrategy.Callback. Besides tracking changes and behaving
* like the real thing should, it also asserts preconditions.
*/
- private static class FakeCallback implements TimeDetectorStrategy.Callback {
+ private static class FakeCallback implements TimeDetectorStrategyImpl.Callback {
private boolean mAutoTimeDetectionEnabled;
private boolean mWakeLockAcquired;
private long mElapsedRealtimeMillis;
private long mSystemClockMillis;
private int mSystemClockUpdateThresholdMillis = 2000;
+ private int[] mAutoOriginPriorities = PROVIDERS_PRIORITY;
// Tracking operations.
private boolean mSystemClockWasSet;
@@ -637,6 +756,16 @@
}
@Override
+ public Instant autoTimeLowerBound() {
+ return TIME_LOWER_BOUND;
+ }
+
+ @Override
+ public int[] getAutoOriginPriorities() {
+ return mAutoOriginPriorities;
+ }
+
+ @Override
public void acquireWakeLock() {
if (mWakeLockAcquired) {
fail("Wake lock already acquired");
@@ -685,6 +814,10 @@
mAutoTimeDetectionEnabled = enabled;
}
+ void pokeAutoOriginPriorities(@Origin int[] autoOriginPriorities) {
+ mAutoOriginPriorities = autoOriginPriorities;
+ }
+
long peekElapsedRealtimeMillis() {
return mElapsedRealtimeMillis;
}
@@ -703,7 +836,10 @@
}
void verifySystemClockNotSet() {
- assertFalse(mSystemClockWasSet);
+ assertFalse(
+ String.format("System clock was manipulated and set to %s(=%s)",
+ Instant.ofEpochMilli(mSystemClockMillis), mSystemClockMillis),
+ mSystemClockWasSet);
}
void verifySystemClockWasSet(long expectedSystemClockMillis) {
@@ -731,9 +867,7 @@
Script() {
mFakeCallback = new FakeCallback();
- mTimeDetectorStrategy = new TimeDetectorStrategyImpl();
- mTimeDetectorStrategy.initialize(mFakeCallback);
-
+ mTimeDetectorStrategy = new TimeDetectorStrategyImpl(mFakeCallback);
}
Script pokeAutoTimeDetectionEnabled(boolean enabled) {
@@ -741,9 +875,9 @@
return this;
}
- Script pokeFakeClocks(TimestampedValue<Long> timeInfo) {
+ Script pokeFakeClocks(TimestampedValue<Instant> timeInfo) {
mFakeCallback.pokeElapsedRealtimeMillis(timeInfo.getReferenceTimeMillis());
- mFakeCallback.pokeSystemClockMillis(timeInfo.getValue());
+ mFakeCallback.pokeSystemClockMillis(timeInfo.getValue().toEpochMilli());
return this;
}
@@ -752,6 +886,11 @@
return this;
}
+ Script pokeAutoOriginPriorities(@Origin int[] autoOriginPriorites) {
+ mFakeCallback.pokeAutoOriginPriorities(autoOriginPriorites);
+ return this;
+ }
+
long peekElapsedRealtimeMillis() {
return mFakeCallback.peekElapsedRealtimeMillis();
}
@@ -765,8 +904,15 @@
return this;
}
- Script simulateManualTimeSuggestion(ManualTimeSuggestion timeSuggestion) {
- mTimeDetectorStrategy.suggestManualTime(timeSuggestion);
+ Script simulateManualTimeSuggestion(
+ ManualTimeSuggestion timeSuggestion, boolean expectedResult) {
+ String errorMessage = expectedResult
+ ? "Manual time suggestion was ignored, but expected to be accepted."
+ : "Manual time suggestion was accepted, but expected to be ignored.";
+ assertEquals(
+ errorMessage,
+ expectedResult,
+ mTimeDetectorStrategy.suggestManualTime(timeSuggestion));
return this;
}
@@ -777,7 +923,7 @@
Script simulateAutoTimeDetectionToggle() {
mFakeCallback.simulateAutoTimeZoneDetectionToggle();
- mTimeDetectorStrategy.handleAutoTimeDetectionChanged();
+ mTimeDetectorStrategy.handleAutoTimeConfigChanged();
return this;
}
@@ -809,7 +955,10 @@
* White box test info: Asserts the latest suggestion for the slotIndex is as expected.
*/
Script assertLatestTelephonySuggestion(int slotIndex, TelephonyTimeSuggestion expected) {
- assertEquals(expected, mTimeDetectorStrategy.getLatestTelephonySuggestion(slotIndex));
+ assertEquals(
+ "Expected to see " + expected + " at slotIndex=" + slotIndex + ", but got "
+ + mTimeDetectorStrategy.getLatestTelephonySuggestion(slotIndex),
+ expected, mTimeDetectorStrategy.getLatestTelephonySuggestion(slotIndex));
return this;
}
@@ -841,9 +990,11 @@
* Generates a ManualTimeSuggestion using the current elapsed realtime clock for the
* reference time.
*/
- ManualTimeSuggestion generateManualTimeSuggestion(long timeMillis) {
+ ManualTimeSuggestion generateManualTimeSuggestion(Instant suggestedTime) {
TimestampedValue<Long> utcTime =
- new TimestampedValue<>(mFakeCallback.peekElapsedRealtimeMillis(), timeMillis);
+ new TimestampedValue<>(
+ mFakeCallback.peekElapsedRealtimeMillis(),
+ suggestedTime.toEpochMilli());
return new ManualTimeSuggestion(utcTime);
}
@@ -851,21 +1002,33 @@
* Generates a {@link TelephonyTimeSuggestion} using the current elapsed realtime clock for
* the reference time.
*/
- TelephonyTimeSuggestion generateTelephonyTimeSuggestion(int slotIndex, Long timeMillis) {
- TimestampedValue<Long> time = null;
- if (timeMillis != null) {
- time = new TimestampedValue<>(peekElapsedRealtimeMillis(), timeMillis);
- }
+ TelephonyTimeSuggestion generateTelephonyTimeSuggestion(int slotIndex, long timeMillis) {
+ TimestampedValue<Long> time =
+ new TimestampedValue<>(peekElapsedRealtimeMillis(), timeMillis);
return createTelephonyTimeSuggestion(slotIndex, time);
}
/**
+ * Generates a {@link TelephonyTimeSuggestion} using the current elapsed realtime clock for
+ * the reference time.
+ */
+ TelephonyTimeSuggestion generateTelephonyTimeSuggestion(
+ int slotIndex, Instant suggestedTime) {
+ if (suggestedTime == null) {
+ return createTelephonyTimeSuggestion(slotIndex, null);
+ }
+ return generateTelephonyTimeSuggestion(slotIndex, suggestedTime.toEpochMilli());
+ }
+
+ /**
* Generates a NetworkTimeSuggestion using the current elapsed realtime clock for the
* reference time.
*/
- NetworkTimeSuggestion generateNetworkTimeSuggestion(long timeMillis) {
+ NetworkTimeSuggestion generateNetworkTimeSuggestion(Instant suggestedTime) {
TimestampedValue<Long> utcTime =
- new TimestampedValue<>(mFakeCallback.peekElapsedRealtimeMillis(), timeMillis);
+ new TimestampedValue<>(
+ mFakeCallback.peekElapsedRealtimeMillis(),
+ suggestedTime.toEpochMilli());
return new NetworkTimeSuggestion(utcTime);
}
@@ -885,11 +1048,9 @@
.build();
}
- private static long createUtcTime(int year, int monthInYear, int day, int hourOfDay, int minute,
- int second) {
- Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("Etc/UTC"));
- cal.clear();
- cal.set(year, monthInYear - 1, day, hourOfDay, minute, second);
- return cal.getTimeInMillis();
+ private static Instant createUtcTime(int year, int monthInYear, int day, int hourOfDay,
+ int minute, int second) {
+ return LocalDateTime.of(year, monthInYear, day, hourOfDay, minute, second)
+ .toInstant(ZoneOffset.UTC);
}
}
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
index da34e1b..baec558 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
@@ -96,15 +96,16 @@
doNothing().when(mMockContext).enforceCallingOrSelfPermission(anyString(), any());
ManualTimeZoneSuggestion timeZoneSuggestion = createManualTimeZoneSuggestion();
- mTimeZoneDetectorService.suggestManualTimeZone(timeZoneSuggestion);
- mTestHandler.assertTotalMessagesEnqueued(1);
+
+ boolean expectedResult = true; // The test strategy always returns true.
+ assertEquals(expectedResult,
+ mTimeZoneDetectorService.suggestManualTimeZone(timeZoneSuggestion));
+
+ mStubbedTimeZoneDetectorStrategy.verifySuggestManualTimeZoneCalled(timeZoneSuggestion);
verify(mMockContext).enforceCallingOrSelfPermission(
eq(android.Manifest.permission.SUGGEST_MANUAL_TIME_AND_ZONE),
anyString());
-
- mTestHandler.waitForMessagesToBeProcessed();
- mStubbedTimeZoneDetectorStrategy.verifySuggestManualTimeZoneCalled(timeZoneSuggestion);
}
@Test(expected = SecurityException.class)
@@ -187,8 +188,9 @@
private boolean mDumpCalled;
@Override
- public void suggestManualTimeZone(ManualTimeZoneSuggestion timeZoneSuggestion) {
+ public boolean suggestManualTimeZone(ManualTimeZoneSuggestion timeZoneSuggestion) {
mLastManualSuggestion = timeZoneSuggestion;
+ return true;
}
@Override
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
index 30bb12e..1fbe781 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
+++ b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
@@ -98,7 +98,7 @@
.initializeAutoTimeZoneDetection(true)
.initializeTimeZoneSetting(ARBITRARY_TIME_ZONE_ID);
- script.suggestTelephonyTimeZone(slotIndex1TimeZoneSuggestion)
+ script.simulateTelephonyTimeZoneSuggestion(slotIndex1TimeZoneSuggestion)
.verifyTimeZoneNotSet();
// Assert internal service state.
@@ -111,7 +111,7 @@
assertEquals(expectedSlotIndex1ScoredSuggestion,
mTimeZoneDetectorStrategy.findBestTelephonySuggestionForTests());
- script.suggestTelephonyTimeZone(slotIndex2TimeZoneSuggestion)
+ script.simulateTelephonyTimeZoneSuggestion(slotIndex2TimeZoneSuggestion)
.verifyTimeZoneNotSet();
// Assert internal service state.
@@ -144,8 +144,7 @@
{
TelephonyTimeZoneSuggestion lowQualitySuggestion =
testCase.createSuggestion(SLOT_INDEX1, "America/New_York");
-
- script.suggestTelephonyTimeZone(lowQualitySuggestion)
+ script.simulateTelephonyTimeZoneSuggestion(lowQualitySuggestion)
.verifyTimeZoneNotSet();
// Assert internal service state.
@@ -162,7 +161,7 @@
{
TelephonyTimeZoneSuggestion goodQualitySuggestion =
testCase2.createSuggestion(SLOT_INDEX1, "Europe/London");
- script.suggestTelephonyTimeZone(goodQualitySuggestion)
+ script.simulateTelephonyTimeZoneSuggestion(goodQualitySuggestion)
.verifyTimeZoneSetAndReset(goodQualitySuggestion);
// Assert internal service state.
@@ -179,7 +178,7 @@
{
TelephonyTimeZoneSuggestion lowQualitySuggestion2 =
testCase.createSuggestion(SLOT_INDEX1, "America/Los_Angeles");
- script.suggestTelephonyTimeZone(lowQualitySuggestion2)
+ script.simulateTelephonyTimeZoneSuggestion(lowQualitySuggestion2)
.verifyTimeZoneNotSet();
// Assert internal service state.
@@ -208,7 +207,7 @@
TelephonyTimeZoneSuggestion suggestion =
testCase.createSuggestion(SLOT_INDEX1, "Europe/London");
- script.suggestTelephonyTimeZone(suggestion);
+ script.simulateTelephonyTimeZoneSuggestion(suggestion);
// When time zone detection is not enabled, the time zone suggestion will not be set
// regardless of the score.
@@ -288,7 +287,7 @@
new QualifiedTelephonyTimeZoneSuggestion(
zoneSlotIndex1Suggestion, testCase.expectedScore);
- script.suggestTelephonyTimeZone(zoneSlotIndex1Suggestion);
+ script.simulateTelephonyTimeZoneSuggestion(zoneSlotIndex1Suggestion);
if (testCase.expectedScore >= TELEPHONY_SCORE_USAGE_THRESHOLD) {
script.verifyTimeZoneSetAndReset(zoneSlotIndex1Suggestion);
} else {
@@ -324,8 +323,8 @@
.initializeTimeZoneSetting(ARBITRARY_TIME_ZONE_ID)
// Initialize the latest suggestions as empty so we don't need to worry about nulls
// below for the first loop.
- .suggestTelephonyTimeZone(emptySlotIndex1Suggestion)
- .suggestTelephonyTimeZone(emptySlotIndex2Suggestion)
+ .simulateTelephonyTimeZoneSuggestion(emptySlotIndex1Suggestion)
+ .simulateTelephonyTimeZoneSuggestion(emptySlotIndex2Suggestion)
.resetState();
for (SuggestionTestCase testCase : TEST_CASES) {
@@ -341,7 +340,7 @@
testCase.expectedScore);
// Start the test by making a suggestion for slotIndex1.
- script.suggestTelephonyTimeZone(zoneSlotIndex1Suggestion);
+ script.simulateTelephonyTimeZoneSuggestion(zoneSlotIndex1Suggestion);
if (testCase.expectedScore >= TELEPHONY_SCORE_USAGE_THRESHOLD) {
script.verifyTimeZoneSetAndReset(zoneSlotIndex1Suggestion);
} else {
@@ -358,7 +357,7 @@
// SlotIndex2 then makes an alternative suggestion with an identical score. SlotIndex1's
// suggestion should still "win" if it is above the required threshold.
- script.suggestTelephonyTimeZone(zoneSlotIndex2Suggestion);
+ script.simulateTelephonyTimeZoneSuggestion(zoneSlotIndex2Suggestion);
script.verifyTimeZoneNotSet();
// Assert internal service state.
@@ -373,7 +372,7 @@
// Withdrawing slotIndex1's suggestion should leave slotIndex2 as the new winner. Since
// the zoneId is different, the time zone setting should be updated if the score is high
// enough.
- script.suggestTelephonyTimeZone(emptySlotIndex1Suggestion);
+ script.simulateTelephonyTimeZoneSuggestion(emptySlotIndex1Suggestion);
if (testCase.expectedScore >= TELEPHONY_SCORE_USAGE_THRESHOLD) {
script.verifyTimeZoneSetAndReset(zoneSlotIndex2Suggestion);
} else {
@@ -389,7 +388,7 @@
mTimeZoneDetectorStrategy.findBestTelephonySuggestionForTests());
// Reset the state for the next loop.
- script.suggestTelephonyTimeZone(emptySlotIndex2Suggestion)
+ script.simulateTelephonyTimeZoneSuggestion(emptySlotIndex2Suggestion)
.verifyTimeZoneNotSet();
assertEquals(expectedEmptySlotIndex1ScoredSuggestion,
mTimeZoneDetectorStrategy.getLatestTelephonySuggestion(SLOT_INDEX1));
@@ -417,10 +416,10 @@
testCase.createSuggestion(SLOT_INDEX1, "America/New_York");
// Initialization.
- script.suggestTelephonyTimeZone(losAngelesSuggestion)
+ script.simulateTelephonyTimeZoneSuggestion(losAngelesSuggestion)
.verifyTimeZoneSetAndReset(losAngelesSuggestion);
// Suggest it again - it should not be set because it is already set.
- script.suggestTelephonyTimeZone(losAngelesSuggestion)
+ script.simulateTelephonyTimeZoneSuggestion(losAngelesSuggestion)
.verifyTimeZoneNotSet();
// Toggling time zone detection should set the device time zone only if the current setting
@@ -433,7 +432,7 @@
// Simulate a user turning auto detection off, a new suggestion being made while auto
// detection is off, and the user turning it on again.
script.autoTimeZoneDetectionEnabled(false)
- .suggestTelephonyTimeZone(newYorkSuggestion)
+ .simulateTelephonyTimeZoneSuggestion(newYorkSuggestion)
.verifyTimeZoneNotSet();
// Latest suggestion should be used.
script.autoTimeZoneDetectionEnabled(true)
@@ -447,7 +446,8 @@
.initializeAutoTimeZoneDetection(true);
// Auto time zone detection is enabled so the manual suggestion should be ignored.
- script.suggestManualTimeZone(createManualSuggestion("Europe/Paris"))
+ script.simulateManualTimeZoneSuggestion(
+ createManualSuggestion("Europe/Paris"), false /* expectedResult */)
.verifyTimeZoneNotSet();
}
@@ -460,7 +460,7 @@
// Auto time zone detection is disabled so the manual suggestion should be used.
ManualTimeZoneSuggestion manualSuggestion = createManualSuggestion("Europe/Paris");
- script.suggestManualTimeZone(manualSuggestion)
+ script.simulateManualTimeZoneSuggestion(manualSuggestion, true /* expectedResult */)
.verifyTimeZoneSetAndReset(manualSuggestion);
}
@@ -603,14 +603,16 @@
/**
* Simulates the time zone detection strategy receiving a telephony-originated suggestion.
*/
- Script suggestTelephonyTimeZone(TelephonyTimeZoneSuggestion timeZoneSuggestion) {
+ Script simulateTelephonyTimeZoneSuggestion(TelephonyTimeZoneSuggestion timeZoneSuggestion) {
mTimeZoneDetectorStrategy.suggestTelephonyTimeZone(timeZoneSuggestion);
return this;
}
/** Simulates the time zone detection strategy receiving a user-originated suggestion. */
- Script suggestManualTimeZone(ManualTimeZoneSuggestion manualTimeZoneSuggestion) {
- mTimeZoneDetectorStrategy.suggestManualTimeZone(manualTimeZoneSuggestion);
+ Script simulateManualTimeZoneSuggestion(
+ ManualTimeZoneSuggestion manualTimeZoneSuggestion, boolean expectedResult) {
+ assertEquals(expectedResult,
+ mTimeZoneDetectorStrategy.suggestManualTimeZone(manualTimeZoneSuggestion));
return this;
}
diff --git a/telephony/java/android/telephony/ims/RcsUceAdapter.java b/telephony/java/android/telephony/ims/RcsUceAdapter.java
index ada0696..8d7742b7 100644
--- a/telephony/java/android/telephony/ims/RcsUceAdapter.java
+++ b/telephony/java/android/telephony/ims/RcsUceAdapter.java
@@ -76,39 +76,46 @@
* @hide
*/
public static final int ERROR_GENERIC_FAILURE = 1;
+
/**
* The carrier network does not have UCE support enabled for this subscriber.
* @hide
*/
public static final int ERROR_NOT_ENABLED = 2;
+
/**
* The data network that the device is connected to does not support UCE currently (e.g. it is
* 1x only currently).
* @hide
*/
public static final int ERROR_NOT_AVAILABLE = 3;
+
/**
* The network has responded with SIP 403 error and a reason "User not registered."
* @hide
*/
public static final int ERROR_NOT_REGISTERED = 4;
+
/**
* The network has responded to this request with a SIP 403 error and reason "not authorized for
* presence" for this subscriber.
* @hide
*/
public static final int ERROR_NOT_AUTHORIZED = 5;
+
/**
* The network has responded to this request with a SIP 403 error and no reason.
* @hide
*/
public static final int ERROR_FORBIDDEN = 6;
+
/**
* The contact URI requested is not provisioned for VoLTE or it is not known as an IMS
* subscriber to the carrier network.
* @hide
*/
public static final int ERROR_NOT_FOUND = 7;
+
/**
* The capabilities request contained too many URIs for the carrier network to handle. Retry
* with a lower number of contact numbers. The number varies per carrier.
@@ -116,22 +123,32 @@
*/
// TODO: Try to integrate this into the API so that the service will split based on carrier.
public static final int ERROR_REQUEST_TOO_LARGE = 8;
+
/**
* The network did not respond to the capabilities request before the request timed out.
* @hide
*/
public static final int ERROR_REQUEST_TIMEOUT = 10;
+
/**
* The request failed due to the service having insufficient memory.
* @hide
*/
public static final int ERROR_INSUFFICIENT_MEMORY = 11;
+
/**
* The network was lost while trying to complete the request.
* @hide
*/
public static final int ERROR_LOST_NETWORK = 12;
+ /**
+ * The network is temporarily unavailable or busy. Retries should only be done after the retry
+ * time returned in {@link CapabilitiesCallback#onError} has elapsed.
+ * @hide
+ */
+ public static final int ERROR_SERVER_UNAVAILABLE = 13;
+
/**@hide*/
@Retention(RetentionPolicy.SOURCE)
@IntDef(prefix = "ERROR_", value = {
@@ -145,7 +162,8 @@
ERROR_REQUEST_TOO_LARGE,
ERROR_REQUEST_TIMEOUT,
ERROR_INSUFFICIENT_MEMORY,
- ERROR_LOST_NETWORK
+ ERROR_LOST_NETWORK,
+ ERROR_SERVER_UNAVAILABLE
})
public @interface ErrorCode {}
@@ -369,8 +387,10 @@
* The pending request has resulted in an error and may need to be retried, depending on the
* error code.
* @param errorCode The reason for the framework being unable to process the request.
+ * @param retryAfterMilliseconds The time in milliseconds the requesting application should
+ * wait before retrying, if non-zero.
*/
- void onError(@ErrorCode int errorCode);
+ void onError(@ErrorCode int errorCode, long retryAfterMilliseconds);
}
private final Context mContext;
@@ -451,10 +471,10 @@
}
}
@Override
- public void onError(int errorCode) {
+ public void onError(int errorCode, long retryAfterMilliseconds) {
final long callingIdentity = Binder.clearCallingIdentity();
try {
- executor.execute(() -> c.onError(errorCode));
+ executor.execute(() -> c.onError(errorCode, retryAfterMilliseconds));
} finally {
restoreCallingIdentity(callingIdentity);
}
@@ -535,10 +555,10 @@
}
}
@Override
- public void onError(int errorCode) {
+ public void onError(int errorCode, long retryAfterMilliseconds) {
final long callingIdentity = Binder.clearCallingIdentity();
try {
- executor.execute(() -> c.onError(errorCode));
+ executor.execute(() -> c.onError(errorCode, retryAfterMilliseconds));
} finally {
restoreCallingIdentity(callingIdentity);
}
diff --git a/telephony/java/android/telephony/ims/aidl/IRcsUceControllerCallback.aidl b/telephony/java/android/telephony/ims/aidl/IRcsUceControllerCallback.aidl
index 0bd3e5e..0f627b9 100644
--- a/telephony/java/android/telephony/ims/aidl/IRcsUceControllerCallback.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IRcsUceControllerCallback.aidl
@@ -26,5 +26,5 @@
oneway interface IRcsUceControllerCallback {
void onCapabilitiesReceived(in List<RcsContactUceCapability> contactCapabilities);
void onComplete();
- void onError(int errorCode);
+ void onError(int errorCode, long retryAfterMilliseconds);
}
diff --git a/tests/BootImageProfileTest/TEST_MAPPING b/tests/BootImageProfileTest/TEST_MAPPING
deleted file mode 100644
index 1b569f9..0000000
--- a/tests/BootImageProfileTest/TEST_MAPPING
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "presubmit": [
- {
- "name": "BootImageProfileTest"
- }
- ]
-}
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java
index 408dd0a..99f1985 100644
--- a/tests/net/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java
@@ -18,6 +18,8 @@
import static android.Manifest.permission.CHANGE_NETWORK_STATE;
import static android.Manifest.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS;
+import static android.content.Intent.ACTION_USER_ADDED;
+import static android.content.Intent.ACTION_USER_REMOVED;
import static android.content.pm.PackageInfo.REQUESTED_PERMISSION_GRANTED;
import static android.content.pm.PackageManager.GET_PERMISSIONS;
import static android.content.pm.PackageManager.MATCH_ANY_USER;
@@ -4944,8 +4946,6 @@
final Network[] cellAndVpn = new Network[] {
mCellNetworkAgent.getNetwork(), mMockVpn.getNetwork()};
- Network[] cellAndWifi = new Network[] {
- mCellNetworkAgent.getNetwork(), mWiFiNetworkAgent.getNetwork()};
// A VPN with default (null) underlying networks sets the underlying network's interfaces...
expectForceUpdateIfaces(cellAndVpn, MOBILE_IFNAME, Process.myUid(), VPN_IFNAME,
@@ -4955,10 +4955,13 @@
mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
mWiFiNetworkAgent.connect(false);
mWiFiNetworkAgent.sendLinkProperties(wifiLp);
+ final Network[] onlyNull = new Network[]{null};
final Network[] wifiAndVpn = new Network[] {
mWiFiNetworkAgent.getNetwork(), mMockVpn.getNetwork()};
- cellAndWifi = new Network[] {
+ final Network[] cellAndWifi = new Network[] {
mCellNetworkAgent.getNetwork(), mWiFiNetworkAgent.getNetwork()};
+ final Network[] cellNullAndWifi = new Network[] {
+ mCellNetworkAgent.getNetwork(), null, mWiFiNetworkAgent.getNetwork()};
waitForIdle();
assertEquals(wifiLp, mService.getActiveLinkProperties());
@@ -4984,6 +4987,13 @@
new String[]{MOBILE_IFNAME, WIFI_IFNAME});
reset(mStatsService);
+ // Null underlying networks are ignored.
+ mService.setUnderlyingNetworksForVpn(cellNullAndWifi);
+ waitForIdle();
+ expectForceUpdateIfaces(wifiAndVpn, MOBILE_IFNAME, Process.myUid(), VPN_IFNAME,
+ new String[]{MOBILE_IFNAME, WIFI_IFNAME});
+ reset(mStatsService);
+
// If an underlying network disconnects, that interface should no longer be underlying.
// This doesn't actually work because disconnectAndDestroyNetwork only notifies
// NetworkStatsService before the underlying network is actually removed. So the underlying
@@ -5018,6 +5028,7 @@
argThat(vpnInfos -> vpnInfos[0].underlyingIfaces.length == 1
&& WIFI_IFNAME.equals(vpnInfos[0].underlyingIfaces[0])));
mEthernetNetworkAgent.disconnect();
+ waitForIdle();
reset(mStatsService);
// When a VPN declares no underlying networks (i.e., no connectivity), getAllVpnInfo
@@ -5030,6 +5041,18 @@
waitForIdle();
expectForceUpdateIfaces(wifiAndVpn, null);
reset(mStatsService);
+
+ // Specifying only a null underlying network is the same as no networks.
+ mService.setUnderlyingNetworksForVpn(onlyNull);
+ waitForIdle();
+ expectForceUpdateIfaces(wifiAndVpn, null);
+ reset(mStatsService);
+
+ // Specifying networks that are all disconnected is the same as specifying no networks.
+ mService.setUnderlyingNetworksForVpn(onlyCell);
+ waitForIdle();
+ expectForceUpdateIfaces(wifiAndVpn, null);
+ reset(mStatsService);
}
@Test
@@ -5471,6 +5494,7 @@
final Set<UidRange> ranges = uidRangesForUid(uid);
mMockVpn.registerAgent(ranges);
+ mService.setUnderlyingNetworksForVpn(new Network[0]);
// VPN networks do not satisfy the default request and are automatically validated
// by NetworkMonitor
@@ -5479,19 +5503,12 @@
mMockVpn.getAgent().setNetworkValid(false /* isStrictMode */);
mMockVpn.connect(false);
- mService.setUnderlyingNetworksForVpn(new Network[0]);
- genericNetworkCallback.expectAvailableCallbacksUnvalidated(mMockVpn);
+ genericNetworkCallback.expectAvailableThenValidatedCallbacks(mMockVpn);
genericNotVpnNetworkCallback.assertNoCallback();
wifiNetworkCallback.assertNoCallback();
- vpnNetworkCallback.expectAvailableCallbacksUnvalidated(mMockVpn);
- defaultCallback.expectAvailableCallbacksUnvalidated(mMockVpn);
- assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
-
- genericNetworkCallback.expectCallback(CallbackEntry.NETWORK_CAPS_UPDATED, mMockVpn);
- genericNotVpnNetworkCallback.assertNoCallback();
- vpnNetworkCallback.expectCapabilitiesThat(mMockVpn, nc -> null == nc.getUids());
- defaultCallback.expectCallback(CallbackEntry.NETWORK_CAPS_UPDATED, mMockVpn);
+ vpnNetworkCallback.expectAvailableThenValidatedCallbacks(mMockVpn);
+ defaultCallback.expectAvailableThenValidatedCallbacks(mMockVpn);
assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
ranges.clear();
@@ -5884,6 +5901,75 @@
}
@Test
+ public void testVpnRestrictedUsers() throws Exception {
+ // NETWORK_SETTINGS is necessary to see the UID ranges in NetworkCapabilities.
+ mServiceContext.setPermission(Manifest.permission.NETWORK_SETTINGS,
+ PERMISSION_GRANTED);
+
+ final NetworkRequest request = new NetworkRequest.Builder()
+ .removeCapability(NET_CAPABILITY_NOT_VPN)
+ .build();
+ final TestNetworkCallback callback = new TestNetworkCallback();
+ mCm.registerNetworkCallback(request, callback);
+
+ // Bring up a VPN
+ mMockVpn.establishForMyUid();
+ callback.expectAvailableThenValidatedCallbacks(mMockVpn);
+ callback.assertNoCallback();
+
+ final int uid = Process.myUid();
+ NetworkCapabilities nc = mCm.getNetworkCapabilities(mMockVpn.getNetwork());
+ assertNotNull("nc=" + nc, nc.getUids());
+ assertEquals(nc.getUids(), uidRangesForUid(uid));
+
+ // Set an underlying network and expect to see the VPN transports change.
+ mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
+ mWiFiNetworkAgent.connect(true);
+ callback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
+ callback.expectCapabilitiesThat(mMockVpn, (caps)
+ -> caps.hasTransport(TRANSPORT_VPN)
+ && caps.hasTransport(TRANSPORT_WIFI));
+ callback.expectCapabilitiesThat(mWiFiNetworkAgent, (caps)
+ -> caps.hasCapability(NET_CAPABILITY_VALIDATED));
+
+ // Create a fake restricted profile whose parent is our user ID.
+ final int userId = UserHandle.getUserId(uid);
+ final int restrictedUserId = userId + 1;
+ final UserInfo info = new UserInfo(restrictedUserId, "user", UserInfo.FLAG_RESTRICTED);
+ info.restrictedProfileParentId = userId;
+ assertTrue(info.isRestricted());
+ when(mUserManager.getUserInfo(restrictedUserId)).thenReturn(info);
+ final Intent addedIntent = new Intent(ACTION_USER_ADDED);
+ addedIntent.putExtra(Intent.EXTRA_USER_HANDLE, restrictedUserId);
+
+ // Send a USER_ADDED broadcast for it.
+ // The BroadcastReceiver for this broadcast checks that is being run on the handler thread.
+ final Handler handler = new Handler(mCsHandlerThread.getLooper());
+ handler.post(() -> mServiceContext.sendBroadcast(addedIntent));
+
+ // Expect that the VPN UID ranges contain both |uid| and the UID range for the newly-added
+ // restricted user.
+ callback.expectCapabilitiesThat(mMockVpn, (caps)
+ -> caps.getUids().size() == 2
+ && caps.getUids().contains(new UidRange(uid, uid))
+ && caps.getUids().contains(UidRange.createForUser(restrictedUserId))
+ && caps.hasTransport(TRANSPORT_VPN)
+ && caps.hasTransport(TRANSPORT_WIFI));
+
+ // Send a USER_REMOVED broadcast and expect to lose the UID range for the restricted user.
+ final Intent removedIntent = new Intent(ACTION_USER_REMOVED);
+ removedIntent.putExtra(Intent.EXTRA_USER_HANDLE, restrictedUserId);
+ handler.post(() -> mServiceContext.sendBroadcast(removedIntent));
+
+ // Expect that the VPN gains the UID range for the restricted user.
+ callback.expectCapabilitiesThat(mMockVpn, (caps)
+ -> caps.getUids().size() == 1
+ && caps.getUids().contains(new UidRange(uid, uid))
+ && caps.hasTransport(TRANSPORT_VPN)
+ && caps.hasTransport(TRANSPORT_WIFI));
+ }
+
+ @Test
public void testIsActiveNetworkMeteredOverWifi() throws Exception {
// Returns true by default when no network is available.
assertTrue(mCm.isActiveNetworkMetered());
diff --git a/tools/stats_log_api_gen/Collation.cpp b/tools/stats_log_api_gen/Collation.cpp
index a230de4..2608097 100644
--- a/tools/stats_log_api_gen/Collation.cpp
+++ b/tools/stats_log_api_gen/Collation.cpp
@@ -20,7 +20,7 @@
#include <map>
-#include "frameworks/base/cmds/statsd/src/atoms.pb.h"
+#include "frameworks/proto_logging/stats/atoms.pb.h"
namespace android {
namespace stats_log_api_gen {
diff --git a/tools/stats_log_api_gen/Collation.h b/tools/stats_log_api_gen/Collation.h
index 10b34ec..3deb3ae 100644
--- a/tools/stats_log_api_gen/Collation.h
+++ b/tools/stats_log_api_gen/Collation.h
@@ -24,7 +24,7 @@
#include <set>
#include <vector>
-#include "frameworks/base/cmds/statsd/src/atom_field_options.pb.h"
+#include "frameworks/proto_logging/stats/atom_field_options.pb.h"
namespace android {
namespace stats_log_api_gen {
diff --git a/tools/stats_log_api_gen/main.cpp b/tools/stats_log_api_gen/main.cpp
index b888ce9..416dfdd 100644
--- a/tools/stats_log_api_gen/main.cpp
+++ b/tools/stats_log_api_gen/main.cpp
@@ -9,7 +9,7 @@
#include <vector>
#include "Collation.h"
-#include "frameworks/base/cmds/statsd/src/atoms.pb.h"
+#include "frameworks/proto_logging/stats/atoms.pb.h"
#include "java_writer.h"
#include "java_writer_q.h"
#include "native_writer.h"
diff --git a/tools/stats_log_api_gen/test.proto b/tools/stats_log_api_gen/test.proto
index aaa488e..a3ea785 100644
--- a/tools/stats_log_api_gen/test.proto
+++ b/tools/stats_log_api_gen/test.proto
@@ -16,8 +16,8 @@
syntax = "proto2";
-import "frameworks/base/cmds/statsd/src/atoms.proto";
-import "frameworks/base/cmds/statsd/src/atom_field_options.proto";
+import "frameworks/proto_logging/stats/atoms.proto";
+import "frameworks/proto_logging/stats/atom_field_options.proto";
package android.stats_log_api_gen;