Snap for 8730993 from 3310e9981c890b5e279625ad6e1c28d8d7c488af to mainline-tzdata3-release
Change-Id: I9e925d3b67c2a6272149a40a3af3966d15cb93c8
diff --git a/OWNERS b/OWNERS
index e02753e..f640ae0 100644
--- a/OWNERS
+++ b/OWNERS
@@ -6,6 +6,4 @@
singhtejinder@google.com
tsaichristine@google.com
yaochen@google.com
-
-# Settings UI
-per-file settings_enums.proto=tmfang@google.com
+yro@google.com
diff --git a/stats/atoms.proto b/stats/atoms.proto
index dba698b..20036f2 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -23,30 +23,20 @@
import "frameworks/proto_logging/stats/atom_field_options.proto";
import "frameworks/proto_logging/stats/enums/app/enums.proto";
import "frameworks/proto_logging/stats/enums/app/job/enums.proto";
-import "frameworks/proto_logging/stats/enums/app/remoteprovisioner_enums.proto";
import "frameworks/proto_logging/stats/enums/app/settings_enums.proto";
import "frameworks/proto_logging/stats/enums/app/media_output_enum.proto";
import "frameworks/proto_logging/stats/enums/app/tvsettings_enums.proto";
-import "frameworks/proto_logging/stats/enums/app/wearsettings_enums.proto";
import "frameworks/proto_logging/stats/enums/bluetooth/a2dp/enums.proto";
import "frameworks/proto_logging/stats/enums/bluetooth/enums.proto";
import "frameworks/proto_logging/stats/enums/bluetooth/hci/enums.proto";
import "frameworks/proto_logging/stats/enums/bluetooth/hfp/enums.proto";
-import "frameworks/proto_logging/stats/enums/bluetooth/leaudio/enums.proto";
import "frameworks/proto_logging/stats/enums/bluetooth/smp/enums.proto";
-import "frameworks/proto_logging/stats/enums/contexthub/enums.proto";
import "frameworks/proto_logging/stats/enums/debug/enums.proto";
import "frameworks/proto_logging/stats/enums/hardware/biometrics/enums.proto";
import "frameworks/proto_logging/stats/enums/hardware/sensor/assist/enums.proto";
-import "frameworks/proto_logging/stats/enums/hotword/enums.proto";
-import "frameworks/proto_logging/stats/enums/media/audio/enums.proto";
-import "frameworks/proto_logging/stats/enums/media/enums.proto";
-import "frameworks/proto_logging/stats/enums/nearby/enums.proto";
import "frameworks/proto_logging/stats/enums/net/enums.proto";
-import "frameworks/proto_logging/stats/enums/neuralnetworks/enums.proto";
import "frameworks/proto_logging/stats/enums/os/enums.proto";
import "frameworks/proto_logging/stats/enums/server/connectivity/data_stall_event.proto";
-import "frameworks/proto_logging/stats/enums/server/display/enums.proto";
import "frameworks/proto_logging/stats/enums/server/enums.proto";
import "frameworks/proto_logging/stats/enums/server/job/enums.proto";
import "frameworks/proto_logging/stats/enums/server/location/enums.proto";
@@ -66,7 +56,6 @@
import "frameworks/proto_logging/stats/enums/stats/location/location_enums.proto";
import "frameworks/proto_logging/stats/enums/stats/mediametrics/mediametrics.proto";
import "frameworks/proto_logging/stats/enums/stats/mediaprovider/mediaprovider_enums.proto";
-import "frameworks/proto_logging/stats/enums/stats/safetycenter/enums.proto";
import "frameworks/proto_logging/stats/enums/stats/storage/storage_enums.proto";
import "frameworks/proto_logging/stats/enums/stats/style/style_enums.proto";
import "frameworks/proto_logging/stats/enums/stats/sysui/notification_enums.proto";
@@ -76,7 +65,6 @@
import "frameworks/proto_logging/stats/enums/system/security/keystore2/enums.proto";
import "frameworks/proto_logging/stats/enums/telecomm/enums.proto";
import "frameworks/proto_logging/stats/enums/telephony/enums.proto";
-import "frameworks/proto_logging/stats/enums/uwb/enums.proto";
import "frameworks/proto_logging/stats/enums/view/enums.proto";
import "frameworks/proto_logging/stats/enums/wifi/enums.proto";
import "frameworks/proto_logging/stats/enums/stats/textclassifier/textclassifier_enums.proto";
@@ -203,6 +191,7 @@
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];
@@ -328,8 +317,7 @@
ProcessStartTime process_start_time = 169 [(module) = "framework"];
PermissionGrantRequestResultReported permission_grant_request_result_reported =
170 [(module) = "permissioncontroller"];
- BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed =
- 171 [(module) = "bluetooth"];
+ BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
DeviceIdentifierAccessDenied device_identifier_access_denied =
172 [(module) = "telephony_common"];
BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"];
@@ -369,8 +357,7 @@
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", (module) = "statsdtest"];
+ TestAtomReported test_atom_reported = 205 [(module) = "cts"];
ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported =
206 [(module) = "framework"];
ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"];
@@ -528,7 +515,7 @@
MediametricsMediaParserReported mediametrics_mediaparser_reported = 316;
TlsHandshakeReported tls_handshake_reported = 317 [(module) = "conscrypt"];
TextClassifierApiUsageReported text_classifier_api_usage_reported = 318 [(module) = "textclassifier"];
- CarWatchdogKillStatsReported car_watchdog_kill_stats_reported = 319 [(module) = "car"];
+ KilledAppStatsReported killed_app_stats_reported = 319 [(module) = "carwatchdogd"];
MediametricsPlaybackReported mediametrics_playback_reported = 320 [(module) = "media_metrics"];
MediaNetworkInfoChanged media_network_info_changed = 321 [(module) = "media_metrics"];
MediaPlaybackStateChanged media_playback_state_changed = 322 [(module) = "media_metrics"];
@@ -584,7 +571,7 @@
OdrefreshReported odrefresh_reported = 366 [(module) = "art"];
AlarmBatchDelivered alarm_batch_delivered = 367 [(module) = "framework"];
AlarmScheduled alarm_scheduled = 368 [(module) = "framework"];
- CarWatchdogIoOveruseStatsReported car_watchdog_io_overuse_stats_reported = 369 [(module) = "car"];
+ IoOveruseStatsReported io_overuse_stats_reported = 369 [(module) = "carwatchdogd"];
UserLevelHibernationStateChanged user_level_hibernation_state_changed = 370 [(module) = "framework"];
AppSearchInitializeStatsReported app_search_initialize_stats_reported = 371 [(module) = "appsearch"];
AppSearchQueryStatsReported app_search_query_stats_reported = 372 [(module) = "appsearch"];
@@ -600,122 +587,15 @@
PrivacySensorToggleInteraction privacy_sensor_toggle_interaction = 381 [(module) = "framework"];
PrivacyToggleDialogInteraction privacy_toggle_dialog_interaction = 382 [(module) = "framework"];
AppSearchOptimizeStatsReported app_search_optimize_stats_reported = 383 [(module) = "appsearch"];
- NonA11yToolServiceWarningReported non_a11y_tool_service_warning_report = 384 [(module) = "framework"];
- AppSearchSetSchemaStatsReported app_search_set_schema_stats_reported = 385 [(module) = "appsearch"];
- AppCompatStateChanged app_compat_state_changed = 386 [(module) = "framework"];
- SizeCompatRestartButtonEventReported size_compat_restart_button_event_reported = 387 [(module) = "framework"];
- SplitscreenUIChanged splitscreen_ui_changed = 388 [(module) = "framework"];
- NetworkDnsHandshakeReported network_dns_handshake_reported = 389 [(module) = "resolv"];
- BluetoothCodePathCounter bluetooth_code_path_counter =
- 390 [(module) = "bluetooth"];
- BluetoothLeBatchScanReportDelay bluetooth_le_batch_scan_report_delay =
- 392 [(module) = "bluetooth"];
- AccessibilityFloatingMenuUIChanged accessibility_floating_menu_ui_changed = 393 [(module) = "sysui"];
- NeuralNetworksCompilationCompleted neuralnetworks_compilation_completed = 394
- [(module) = "neuralnetworks"];
- NeuralNetworksExecutionCompleted neuralnetworks_execution_completed = 395
- [(module) = "neuralnetworks"];
- NeuralNetworksCompilationFailed neuralnetworks_compilation_failed = 396
- [(module) = "neuralnetworks"];
- NeuralNetworksExecutionFailed neuralnetworks_execution_failed = 397
- [(module) = "neuralnetworks"];
- ContextHubBooted context_hub_booted = 398 [(module) = "contexthub"];
- ContextHubRestarted context_hub_restarted = 399 [(module) = "contexthub"];
- ContextHubLoadedNanoappSnapshotReported context_hub_loaded_nanoapp_snapshot_reported = 400
- [(module) = "contexthub"];
- ChreCodeDownloadTransacted chre_code_download_transacted = 401 [(module) = "contexthub"];
- UwbSessionInitiated uwb_session_inited = 402 [(module) = "uwb"];
- UwbSessionClosed uwb_session_closed = 403 [(module) = "uwb"];
- UwbFirstRangingReceived uwb_first_ranging_received = 404 [(module) = "uwb"];
- UwbRangingMeasurementReceived uwb_ranging_measurement_received = 405 [(module) = "uwb"];
TextClassifierDownloadWorkScheduled text_classifier_download_work_scheduled = 406 [(module) = "textclassifier"];
TextClassifierDownloadWorkCompleted text_classifier_download_work_completed = 407 [(module) = "textclassifier"];
- ClipboardCleared clipboard_cleared = 408 [(module) = "framework"];
- VmCreationRequested vm_creation_requested = 409 [(module) = "virtualizationservice"];
- NearbyDeviceScanStateChanged nearby_device_scan_state_changed = 410 [(module) = "nearby"];
- CameraCompatControlEventReported camera_compat_control_event_reported = 411 [(module) = "framework"];
- ApplicationLocalesChanged application_locales_changed = 412 [(module) = "framework"];
- MediametricsAudioTrackStatusReported mediametrics_audiotrackstatus_reported = 413;
- FoldStateDurationReported fold_state_duration_reported = 414 [(module) = "framework"];
- LocationTimeZoneProviderControllerStateChanged location_time_zone_provider_controller_state_changed =
- 415 [(module) = "framework"];
- DisplayHbmStateChanged display_hbm_state_changed = 416 [(module) = "framework"];
- DisplayHbmBrightnessChanged display_hbm_brightness_changed = 417 [(module) = "framework"];
- PersistentUriPermissionsFlushed persistent_uri_permissions_flushed =
- 418 [(module) = "framework"];
- EarlyBootCompOsArtifactsCheckReported early_boot_comp_os_artifacts_check_reported = 419 [(module) = "art"];
- VBMetaDigestReported vbmeta_digest_reported = 420 [(module) = "framework"];
- ApexInfoGathered apex_info_gathered = 421 [(module) = "framework"];
- PvmInfoGathered pvm_info_gathered = 422 [(module) = "framework"];
- WearSettingsUIInteracted wear_settings_ui_interacted = 423 [(module) = "wear_settings"];
- TracingServiceReportEvent tracing_service_report_event = 424 [(module) = "framework"];
- MediametricsAudioRecordStatusReported mediametrics_audiorecordstatus_reported = 425;
- LauncherLatency launcher_latency = 426 [(module) = "sysui"];
- DropboxEntryDropped dropbox_entry_dropped = 427 [(module) = "framework"];
- WifiP2pConnectionReported wifi_p2p_connection_reported = 428 [(module) = "wifi"];
- GameStateChanged game_state_changed = 429 [(module) = "framework"];
- HotwordDetectorCreateRequested hotword_detector_create_requested = 430
- [(module) = "framework"];
- HotwordDetectionServiceInitResultReported hotword_detection_service_init_result_reported = 431
- [(module) = "framework"];
- HotwordDetectionServiceRestarted hotword_detection_service_restarted = 432
- [(module) = "framework"];
- HotwordDetectorKeyphraseTriggered hotword_detector_keyphrase_triggered = 433
- [(module) = "framework"];
- HotwordDetectorEvents hotword_detector_events = 434
- [(module) = "framework"];
- AdServicesApiCalled ad_services_api_called =
- 435 [(module) = "adservices", (truncate_timestamp) = true];
- AdServicesMeasurementReportsUploaded ad_services_mesurement_reports_uploaded =
- 436 [(module) = "adservices", (truncate_timestamp) = true];
- BootCompletedBroadcastCompletionLatencyReported boot_completed_broadcast_completion_latency_reported =
- 437 [(module) = "framework"];
- ContactsIndexerUpdateStatsReported contacts_indexer_update_stats_reported = 440
- [(module) = "appsearch"];
- AppBackgroundRestrictionsInfo app_background_restrictions_info = 441
- [(module) = "framework"];
- PermissionReminderNotificationInteracted permission_reminder_notification_interacted =
- 444 [(module) = "permissioncontroller"];
- RecentPermissionDecisionsInteracted recent_permission_decisions_interacted =
- 445 [(module) = "permissioncontroller"];
- GnssPsdsDownloadReported gnss_psds_download_reported = 446 [(module) = "framework"];
- LeAudioConnectionSessionReported le_audio_connection_session_reported = 447 [(module) = "bluetooth"];
- LeAudioBroadcastSessionReported le_audio_broadcast_session_reported = 448 [(module) = "bluetooth"];
- DreamUiEventReported dream_ui_event_reported = 449 [(module) = "framework"];
- TaskManagerEventReported task_manager_event_reported = 450 [(module) = "sysui"];
- CdmAssociationAction cdm_association_action = 451 [(module) = "framework"];
- MagnificationTripleTapAndHoldActivatedSessionReported magnification_triple_tap_and_hold_activated_session_reported =
- 452 [(module) = "framework"];
- MagnificationFollowTypingFocusActivatedSessionReported magnification_follow_typing_focus_activated_session_reported =
- 453 [(module) = "framework"];
- AccessibilityTextReadingOptionsChanged accessibility_text_reading_options_changed = 454 [(module) = "settings"];
- WifiSetupFailureCrashReported wifi_setup_failure_crash_reported = 455 [(module) = "wifi"];
- UwbDeviceErrorReported uwb_device_error_reported = 456 [(module) = "uwb"];
- IsolatedCompilationScheduled isolated_compilation_scheduled = 457 [(module) = "art"];
- IsolatedCompilationEnded isolated_compilation_ended = 458 [(module) = "art"];
- OnsOpportunisticEsimProvisioningComplete ons_opportunistic_esim_provisioning_complete = 459 [(module) = "ons"];
- TelephonyAnomalyDetected telephony_anomaly_detected = 461 [(module) = "telephony"];
- RemoteKeyProvisioningAttempt remote_key_provisioning_attempt = 463 [(module) = "remoteprovisioner"];
- RemoteKeyProvisioningNetworkInfo remote_key_provisioning_network_info = 464 [(module) = "remoteprovisioner"];
- RemoteKeyProvisioningTiming remote_key_provisioning_timing = 465 [(module) = "remoteprovisioner"];
- MediaOutputOpInteractionReported mediaoutput_op_interaction_report = 466 [(module) = "sysui"];
- BackgroundDexoptJobEnded background_dexopt_job_ended = 467 [(module) = "art"];
- SyncExemptionOccurred sync_exemption_occurred = 468 [(module) = "framework"];
- AutofillPresentationEventReported autofill_presentation_event_reported = 469 [(module) = "framework"];
- SafetySourceStateCollected safety_source_state_collected = 471 [(module) = "permissioncontroller"];
- SafetyCenterSystemEventReported safety_center_system_event_reported = 472 [(module) = "permissioncontroller"];
- SafetyCenterInteractionReported safety_center_interaction_reported = 473 [(module) = "permissioncontroller"];
- BroadcastDeliveryEventReported broadcast_delivery_event_reported =
- 475 [(module) = "framework"];
- ServiceRequestEventReported service_request_event_reported = 476 [(module) = "framework"];
- ProviderAcquisitionEventReported provider_acquisition_event_reported =
- 477 [(module) = "framework"];
- // StatsdStats tracks platform atoms with ids upto 750.
+
+ // 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: 10153
+ // Next: 10118
oneof pulled {
WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"];
WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"];
@@ -758,6 +638,10 @@
CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"];
OnDevicePowerMeasurement on_device_power_measurement = 10038 [(module) = "framework"];
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"];
@@ -831,8 +715,6 @@
ProcessDmabufMemory process_dmabuf_memory = 10105 [(module) = "framework"];
PendingAlarmInfo pending_alarm_info = 10106 [(module) = "framework"];
UserLevelHibernatedApps user_level_hibernated_apps = 10107 [(module) = "framework"];
- LauncherLayoutSnapshot launcher_layout_snapshot = 10108
- [(module) = "sysui"];
GlobalHibernatedApps global_hibernated_apps = 10109 [(module) = "framework"];
InputEventLatencySketch input_event_latency_sketch = 10110 [(module) = "input"];
BatteryUsageStatsBeforeReset battery_usage_stats_before_reset =
@@ -843,8 +725,7 @@
battery_usage_stats_since_reset_using_power_profile_model =
10113 [(module) = "framework"];
InstalledIncrementalPackage installed_incremental_package = 10114 [(module) = "framework"];
- TelephonyNetworkRequests telephony_network_requests =
- 10115 [(module) = "telephony", deprecated = true];
+ TelephonyNetworkRequests telephony_network_requests = 10115 [(module) = "telephony"];
AppSearchStorageInfo app_search_storage_info = 10116 [(module) = "appsearch"];
VmStat vmstat = 10117 [(module) = "framework"];
Keystore2KeyCreationWithGeneralInfo keystore2_key_creation_with_general_info =
@@ -861,56 +742,13 @@
10123 [(module) = "framework"];
RkpErrorStats rkp_error_stats = 10124 [(module) = "framework"];
Keystore2CrashStats keystore2_crash_stats = 10125 [(module) = "framework"];
- VendorApexInfo vendor_apex_info = 10126 [(module) = "framework"];
- AccessibilityShortcutStats accessibility_shortcut_stats = 10127 [(module) = "framework"];
- AccessibilityFloatingMenuStats accessibility_floating_menu_stats =
- 10128 [(module) = "framework"];
- DataUsageBytesTransferV2 data_usage_bytes_transfer_v2 = 10129 [(module) = "framework",
- (truncate_timestamp) = true];
- MediaCapabilities media_capabilities = 10130 [(module) = "framework"];
- CarWatchdogSystemIoUsageSummary car_watchdog_system_io_usage_summary =
- 10131 [(module) = "car"];
- CarWatchdogUidIoUsageSummary car_watchdog_uid_io_usage_summary = 10132 [(module) = "car"];
- ImsRegistrationFeatureTagStats ims_registration_feature_tag_stats =
- 10133 [(module) = "telephony"];
- RcsClientProvisioningStats rcs_client_provisioning_stats =
- 10134 [(module) = "telephony"];
- RcsAcsProvisioningStats rcs_acs_provisioning_stats =
- 10135 [(module) = "telephony"];
- SipDelegateStats sip_delegate_stats = 10136 [(module) = "telephony"];
- SipTransportFeatureTagStats sip_transport_feature_tag_stats =
- 10137 [(module) = "telephony"];
- SipMessageResponse sip_message_response = 10138 [(module) = "telephony"];
- SipTransportSession sip_transport_session = 10139 [(module) = "telephony"];
- ImsDedicatedBearerListenerEvent ims_dedicated_bearer_listener_event =
- 10140 [(module) = "telephony"];
- ImsDedicatedBearerEvent ims_dedicated_bearer_event = 10141 [(module) = "telephony"];
- ImsRegistrationServiceDescStats ims_registration_service_desc_stats =
- 10142 [(module) = "telephony"];
- UceEventStats uce_event_stats = 10143 [(module) = "telephony"];
- PresenceNotifyEvent presence_notify_event = 10144 [(module) = "telephony"];
- GbaEvent gba_event = 10145 [(module) = "telephony"];
- PerSimStatus per_sim_status = 10146 [(module) = "telephony"];
- GpuWorkPerUid gpu_work_per_uid = 10147;
- PersistentUriPermissionsAmountPerPackage persistent_uri_permissions_amount_per_package =
- 10148 [(module) = "framework"];
- SignedPartitionInfo signed_partition_info = 10149 [(module) = "framework"];
- PinnedFileSizesPerPackage pinned_file_sizes_per_package = 10150
- [(module) = "framework"];
- PendingIntentsPerPackage pending_intents_per_package = 10151
- [(module) = "framework"];
- UserInfo user_info = 10152 [(module) = "framework"];
- TelephonyNetworkRequestsV2 telephony_network_requests_v2 = 10153 [(module) = "telephony"];
- DeviceTelephonyProperties device_telephony_properties = 10154 [(module) = "telephony"];
- RemoteKeyProvisioningErrorCounts remote_key_provisioning_error_counts = 10155 [(module) = "remoteprovisioner"];
- SafetyState safety_state = 10156 [(module) = "permissioncontroller"];
}
// 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 83, 10008, 10036, 10040, 10041;
+ reserved 10008, 10036;
}
/**
@@ -928,6 +766,20 @@
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;
+}
/*
* *****************************************************************************
@@ -1377,88 +1229,6 @@
}
/**
- * Logged when wifi peer to peer connection happens
- */
-message WifiP2pConnectionReported {
- enum Type {
- UNSPECIFIED = 0;
- // fresh new connection.
- FRESH = 1;
- // reinvoke a group.
- REINVOKE = 2;
- // create a group with the current device as the group owner locally.
- LOCAL = 3;
- // create a group or join a group with config.
- FAST = 4;
- }
- enum FailureCode {
- // Failure is unknown.
- UNKNOWN = 0;
- // No failure.
- NONE = 1;
- // Timeout for current connecting request.
- TIMEOUT = 2;
- // The connecting request is canceled by the user.
- CANCEL = 3;
- // Provision discovery failure, e.g. no pin code, timeout, rejected by the peer.
- PROV_DISC_FAIL = 4;
- // Invitation failure, e.g. rejected by the peer.
- INVITATION_FAIL = 5;
- // Incoming request is rejected by the user.
- USER_REJECT = 6;
- // New connection request is issued before ending previous connecting request.
- NEW_CONNECTION_ATTEMPT = 7;
- }
- enum GroupRole {
- GROUP_UNKNOWN = 0;
- GROUP_OWNER = 1;
- GROUP_CLIENT = 2;
- }
- // Type of the connection.
- optional Type type = 1;
- // Duration to connect in millis.
- optional int32 latency_ms= 2;
- // Duration to connect in step size of 200 millis.
- optional int32 latency_200ms= 3;
- // Failure code
- optional FailureCode failure_code = 4;
- // Group role. This could be unknown with connect() call when the WifiConfig doesn't have the
- // credential.
- optional GroupRole group_role = 5;
-}
-
-/**
- * Logged when wifi setup failure or crash reported
- */
-message WifiSetupFailureCrashReported {
- enum Type {
- UNKNOWN = 0;
- // Wifi HAL crash
- HAL_CRASH = 1;
- // Wificond crash
- WIFICOND_CRASH = 2;
- // Supplicant crash
- SUPPLICANT_CRASH = 3;
- // hostapd crash
- HOSTAPD_CRASH = 4;
- // HAL error on WifiNative.setupInterfaceForClientMode
- CLIENT_FAILURE_HAL = 5;
- // Wificond error on WifiNative.setupInterfaceForClientMode
- CLIENT_FAILURE_WIFICOND = 6;
- // Supplicant error on WifiNative.setupInterfaceForClientMode
- CLIENT_FAILURE_SUPPLICANT = 7;
- // HAL error on WifiNative.setupInterfaceForSoftApMode
- SOFT_AP_FAILURE_HAL = 8;
- // Wificond error on WifiNative.setupInterfaceForSoftApMode
- SOFT_AP_FAILURE_WIFICOND = 9;
- // Hostapd error on WifiNative.setupInterfaceForSoftApMode
- SOFT_AP_FAILURE_HOSTAPD = 10;
- }
- // Type of failure
- optional Type type= 1;
-}
-
-/**
* Logs when memory stats of a process is reported.
*
* Logged from:
@@ -1482,32 +1252,6 @@
}
optional Type type = 7;
optional int64 duration_millis = 8;
-
- // Keep in sync with
- // frameworks/base/services/core/java/com/android/server/am/ProcessProfileRecord.java
- enum HostingComponentType {
- HOSTING_COMPONENT_TYPE_EMPTY = 0x0;
- HOSTING_COMPONENT_TYPE_SYSTEM = 0x0001;
- HOSTING_COMPONENT_TYPE_PERSISTENT = 0x0002;
- HOSTING_COMPONENT_TYPE_BACKUP = 0x0004;
- HOSTING_COMPONENT_TYPE_INSTRUMENTATION = 0x0008;
- HOSTING_COMPONENT_TYPE_ACTIVITY = 0x0010;
- HOSTING_COMPONENT_TYPE_BROADCAST_RECEIVER = 0x0020;
- HOSTING_COMPONENT_TYPE_PROVIDER = 0x0040;
- HOSTING_COMPONENT_TYPE_STARTED_SERVICE = 0x0080;
- HOSTING_COMPONENT_TYPE_FOREGROUND_SERVICE = 0x0100;
- HOSTING_COMPONENT_TYPE_BOUND_SERVICE = 0x0200;
- }
-
- // The types of the components this process is hosting at the moment this
- // snapshot is taken.
- // See the available types in HostingComponentType above.
- optional int32 current_hosting_component_types = 10;
-
- // The historical types of the components this process is or was hosting
- // since it's born.
- // See the available types in HostingComponentType above.
- optional int32 historical_hosting_component_types = 11;
}
/**
@@ -1662,10 +1406,9 @@
* Logs when a job scheduler job state changes.
*
* Logged from:
- * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java
- * frameworks/base/services/core/java/com/android/server/job/JobServiceContext.java
+ * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
*
- * Next tag: 22
+ * Next tag: 18
*/
message ScheduledJobStateChanged {
repeated AttributionNode attribution_node = 1;
@@ -1708,7 +1451,7 @@
// 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 implicit
+ // 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;
@@ -1718,22 +1461,11 @@
optional bool has_idle_constraint = 12;
optional bool has_connectivity_constraint = 13;
optional bool has_content_trigger_constraint = 14;
- optional bool is_prefetch = 18;
// True if the app has requested this run as an expedited job.
optional bool is_requested_expedited_job = 15;
// True if the job is running as an expedited job. Only valid for STARTED and FINISHED states.
optional bool is_running_as_expedited_job = 16;
-
- // The priority set by the app (via JobInfo.Builder.setPriority()).
- optional int32 requested_priority = 19;
- // The priority JobScheduler ran the job at. Only valid for STARTED and FINISHED states.
- optional int32 effective_priority = 20;
-
- // Number of times JobScheduler has tried to run this particular job. This value is incremented
- // when a job is stopped and rescheduled for various reasons (lost network, constraints no
- // longer satisfied, etc). For periodic jobs, this value is reset after a successful run.
- optional int32 num_previous_attempts = 21;
}
/**
@@ -2229,19 +1961,8 @@
// Bouncer is hidden, either as a result of successfully entering the
// password, screen timing out, or user going back to lock screen.
HIDDEN = 1;
- // The user is being prompted to enter the password and the keyguard is NOT in one
- // handed mode.
+ // This is when the user is being prompted to enter the password.
SHOWN = 2;
- // The user is being prompted to enter the password and the keyguard shows in one
- // handed mode and left aligned.
- SHOWN_LEFT = 3;
- // The user is being prompted to enter the password and the keyguard shows in one
- // handed mode and right aligned.
- SHOWN_RIGHT = 4;
- // The keyguard switches to the left side while it is in one handed mode.
- SWITCH_LEFT = 5;
- // The keyguard switches to the right side while it is in one handed mode.
- SWITCH_RIGHT = 6;
}
optional State state = 1;
}
@@ -2261,13 +1982,6 @@
SUCCESS = 2;
}
optional BouncerResult result = 1;
-
- enum BouncerSide {
- DEFAULT = 0;
- LEFT = 1;
- RIGHT = 2;
- }
- optional BouncerSide side = 2;
}
/*
@@ -2492,9 +2206,6 @@
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 5;
- // An index to group connection events by session. It's a counter generated by
- // each profile. e.g. Gatt server generate such id to identify Gatt apps
- optional int32 session_index = 6;
}
/**
@@ -2525,8 +2236,6 @@
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 3;
- // Used transport of this event.
- optional android.bluetooth.TransportTypeEnum transport = 4;
}
/**
@@ -3169,16 +2878,6 @@
// session for the same remote device.
// Default: 0 if the device's metric id is unknown.
optional int32 metric_id = 8;
- // A flag indicating if the MAC address of the remote device is public or
- // random.
- optional android.bluetooth.AddressTypeEnum address_type = 9;
- // The first byte of MAC address
- optional int32 byte1 = 10;
- // The second byte of MAC address
- optional int32 byte2 = 11;
- // The third byte of MAC address
- optional int32 byte3 = 12;
-
}
/**
@@ -3475,68 +3174,6 @@
optional int32 vendor_error_code = 4;
}
-/**
- * Logs when an LE Audio connection session ended
- *
- * Logged from:
- * packages/modules/Bluetooth
- *
- */
-message LeAudioConnectionSessionReported {
- // Size of this CSIS group
- optional int32 group_size = 1;
- // An identifier that can be used to match events for this CSIS group.
- // The incremental identifier is locally generated and guaranteed not derived
- // from any globally unique hardware id.
- // For paired groups, it stays consistent between Bluetooth toggling for the
- // same remote group.
- // For unpaired groups, it stays consistent within the same Bluetooth adapter
- // session for the same remote group.
- // Default: 0 if the group's metric id is unknown.
- optional int32 group_metric_id = 2;
- // Total duration of this LeAudioConnectionSession
- optional int64 duration_nanos = 3;
-
- // Connecting timestamp offset to the beginning of this session of each device session
- repeated int64 device_connecting_offset_nanos = 4;
- // Connected timestamp offset to the beginning of this session of each device session
- repeated int64 device_connected_offset_nanos = 5;
- // Duration of each device session
- repeated int64 device_connection_duration_nanos = 6;
- // Connection status of each device session
- repeated android.bluetooth.leaudio.ConnectionStatus device_connection_status = 7;
- // Disconnection status of each device session
- repeated android.bluetooth.leaudio.ConnectionStatus device_disconnection_status = 8;
- // 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.
- repeated int32 device_metric_id = 9;
-
- // Streaming beginning timestamp offset to the beginning of this session
- repeated int64 streaming_session_offset_nanos = 10;
- // Streaming ending timestamp offset to the beginning of this session
- repeated int64 streaming_session_duration_nanos = 11;
- // Streaming context type of each steaming session
- repeated android.bluetooth.leaudio.ContextType streaming_context_type = 12;
-}
-
-/**
- * Logs when an LE Audio broadcast session ended
- *
- * Logged from:
- * packages/modules/Bluetooth
- *
- */
-message LeAudioBroadcastSessionReported {
- // Broadcast duration
- optional int64 duration_nanos = 1;
-}
-
/* Logs input device information when input device is registered with Android device.
* Reported at when a new input device is found by EventHub.
*
@@ -3562,35 +3199,6 @@
}
/**
- * Logs when the counter is incremented
- *
- * Logged from:
- * system/bt
- * packages/apps/Bluetooth
- *
- */
-message BluetoothCodePathCounter {
- // Keys of events with enum ranges to be defined
- optional android.bluetooth.CodePathCounterKeyEnum key = 1;
- // Number of frequency of events
- optional int64 number = 2;
-}
-
-/**
- * Logs when an application attempts to start a Bluetooth Low Energy scan.
- * It only happens when the scan is initiated and does not repeatedly call
- * while the scan is running.
- *
- * Logged from:
- * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/GattService.java
- *
- */
-message BluetoothLeBatchScanReportDelay {
- optional int32 application_uid = 1;
- optional int64 application_report_delay_millis = 2;
-}
-
-/**
* Logs when something is plugged into or removed from the USB-C connector.
*
* Logged from:
@@ -3877,7 +3485,7 @@
}
optional WindowHorizontalLocation x_location = 4;
optional bool landscape = 5;
- optional bool splitscreen = 6 [deprecated = true];
+ optional bool splitscreen = 6;
optional int32 duration_millis = 7;
}
@@ -3946,28 +3554,11 @@
// Used to store features of the target (e.g. widget is reconfigurable, etc)
optional int32 features = 25;
-
- // Used to store on-device search related features of the target
- // (e.g. spell-corrected query etc)
- optional int32 search_attributes = 26;
-
- // List of attributes attached to the event.
- optional LauncherAttributes attributes = 27 [(log_mode) = MODE_BYTES];
-}
-
-message LauncherAttributes{
-
- // Integer value of item attribute enum
- // (e.g. SUGGESTED_LABEL, ALL_APPS_SEARCH_RESULT_SETTING etc)
- repeated int32 item_attributes = 1;
}
message SmartSpaceCardReported {
// Different SmartSpace cards.
- // DEPRECATED CardType enum. Use SmartspaceTarget.mFeatureType, which matches the list from:
- // google3/java/com/google/android/apps/miphone/aiai/echo/smartspace/Constants.kt
enum CardType {
- option deprecated = true;
UNKNOWN_CARD = 0;
COMMUTE = 1;
CALENDAR = 2;
@@ -3986,8 +3577,6 @@
TIME_TO_LEAVE = 15;
PACKAGE_DELIVERED = 16;
TIPS = 17;
- DOORBELL = 18;
- CROSS_DEVICE_TIMER = 19;
}
// The surface that SmartSpace card is shown.
@@ -3997,7 +3586,6 @@
LOCKSCREEN = 2;
AOD = 3;
SHADE = 4;
- DREAM_OVERLAY = 5;
}
// The event id (e.g., impression, click, longpress, dismiss)
@@ -4005,62 +3593,13 @@
// Uniquely identifies a card. Should persist through updates.
optional int32 instance_id = 2;
// Uniquely identifies one of the possible types of the SmartSpace cards.
- // Deprecated. Please read card_type_id instead.
- optional CardType card_type = 3 [deprecated = true];
+ optional CardType card_type = 3;
// Location of the card when the event occurred.
optional DisplaySurface display_surface = 4;
// The position of the card in the carousel when the event occurred.
optional int32 rank = 5;
// The number of cards shown to the user.
optional int32 cardinality = 6;
- // Uniquely identifies one of the possible types of the SmartSpace cards.
- // To replace card_type. See go/smartspace-aster-metrics#card-type-id.
- optional int32 card_type_id = 7;
- // The app that the Smartspace card is tied to.
- optional int32 uid = 8 [(is_uid) = true];
- // This represents the interacted subaction for the given card.
- optional int32 interacted_subcard_rank = 9;
- // This represents the number of displayed subactions on the given card when a subaction click
- // occurred.
- optional int32 interacted_subcard_cardinality = 10;
- // The time it takes in ms from smartspace target is created to sysui receives
- // the target.
- optional int32 received_latency_millis = 11;
- // The sub cards.
- optional SmartSpaceSubcards subcards_info = 12 [(log_mode) = MODE_BYTES];
-}
-
-/**
- * This message represents information about any SmartSpace subcards.
- * Logged from
- * vendor/unbundled_google/packages/SystemUIGoogle/bcsmartspace/src/com/google/android/systemui/smartspace/BcSmartspaceLogger.java
- * vendor/unbundled_google/packages/NexusLauncher/src/com/google/android/apps/nexuslauncher/qsb/SmartspaceViewContainer.java
- * Next Tag: 3
- */
-message SmartSpaceSubcards {
- // List of subcards.
- repeated SmartSpaceCardMetadata subcards = 1;
- // The index of the clicked subcard, if applicable.
- // This index is 1 indexed as opposed to 0 indexed due to sint32 encoding
- // limitation when using -1 as a default.
- // Default will be 0 to denote that no subcard was clicked.
- // Please note this has no information about whether the primary card was
- // clicked or not. Basically if this has the value 0, just ignore this field.
- optional int32 clicked_subcard_index = 2;
-}
-
-/**
- * This message represents metadata for a SmartSpace card.
- * Logged from
- * vendor/unbundled_google/packages/SystemUIGoogle/bcsmartspace/src/com/google/android/systemui/smartspace/BcSmartspaceLogger.java
- * vendor/unbundled_google/packages/NexusLauncher/src/com/google/android/apps/nexuslauncher/qsb/SmartspaceViewContainer.java
- * Next Tag: 3
- */
-message SmartSpaceCardMetadata {
- // Uniquely identifies a card. Should persist through updates.
- optional int32 instance_id = 1;
- // The type of the card.
- optional int32 card_type_id = 2;
}
/**
@@ -4112,60 +3651,6 @@
// Used to store features of the target (e.g. widget is reconfigurable, etc)
optional int32 features = 19;
-
- // List of attributes attached to the event.
- optional LauncherAttributes attributes = 20 [(log_mode) = MODE_BYTES];
-}
-
-/**
- * Used for logging launcher static elements using pulled atom.
- *
- * Logged from:
- * packages/apps/Launcher3
- */
-message LauncherLayoutSnapshot {
- // 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 item_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 container_id = 13;
-
- optional bool is_work_profile = 14;
-
- // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION
- optional int32 attribute_id = 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];
-
- // List of attributes attached to the event.
- optional LauncherAttributes attributes = 19 [(log_mode) = MODE_BYTES];
}
/**
@@ -4188,14 +3673,6 @@
optional android.stats.style.LocationPreference location_preference = 10;
optional android.stats.style.DatePreference date_preference = 11;
optional android.stats.style.LaunchedPreference launched_preference = 12;
- optional android.stats.style.EffectPreference effect_preference = 13;
- optional int32 effect_id_hash = 14;
- optional int32 lock_wallpaper_category_hash = 15;
- optional int32 lock_wallpaper_id_hash = 16;
- optional int32 first_launch_date_since_setup = 17;
- optional int32 first_wallpaper_apply_date_since_setup = 18;
- optional int32 app_launch_count = 19;
- optional int32 color_variant = 20;
}
/**
@@ -4877,86 +4354,6 @@
}
/**
- * Logs when an app enters a different App Compat state.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
- */
-message AppCompatStateChanged {
- // UID of the package whose state changed.
- optional int32 uid = 1 [(state_field_option).primary_field = true, (is_uid) = true];
-
- enum State {
- UNKNOWN = 0;
- // The app is not visible or has been closed.
- NOT_VISIBLE = 1;
- // The app’s bounds aren’t letterboxed.
- NOT_LETTERBOXED = 2;
- // The app’s bounds are letterboxed because of size-compat-mode.
- LETTERBOXED_FOR_SIZE_COMPAT_MODE = 3;
- // The app’s bounds are letterboxed because of fixed orientation.
- LETTERBOXED_FOR_FIXED_ORIENTATION = 4;
- // The app’s bounds are letterboxed because of aspect ratio restrictions.
- LETTERBOXED_FOR_ASPECT_RATIO = 5;
- }
-
- // The state that was entered.
- optional State state = 2 [
- (state_field_option).exclusive_state = true,
- (state_field_option).nested = false];
-}
-
-/**
- * Logs events reported for the Size Compat restart button of an app.
- *
- * Logged from:
- * frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java
- */
-message SizeCompatRestartButtonEventReported {
- // UID of the package that has the button.
- optional int32 uid = 1 [(is_uid) = true];
-
- enum Event {
- UNKNOWN = 0;
- APPEARED = 1;
- CLICKED = 2;
- }
-
- // The event that was reported.
- optional Event event = 2;
-}
-
-/**
- * Logs events reported for the Camera App Compat control, which is used to
- * correct stretched viewfinder in apps that don't handle all possible
- * configurations, and changes between them, correctly.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
- */
-message CameraCompatControlEventReported {
- // UID of the package that has the control.
- optional int32 uid = 1 [(is_uid) = true];
-
- enum Event {
- UNKNOWN = 0;
- // Button to apply the treatment appeared.
- APPEARED_APPLY_TREATMENT = 1;
- // Button to revert the treatment appeared.
- APPEARED_REVERT_TREATMENT = 2;
- // Users clicked on the button to apply the treatment.
- CLICKED_APPLY_TREATMENT = 3;
- // Users clicked on the button to revert the treatment.
- CLICKED_REVERT_TREATMENT = 4;
- // Users clicked on the button to dismiss the control.
- CLICKED_DISMISS = 5;
- }
-
- // The event that was reported.
- optional Event event = 2;
-}
-
-/**
* Logs a picture-in-picture action
* Logged from:
* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -5042,25 +4439,6 @@
optional int32 fgs_start_count = 13;
// SHA-1 hashed short_name combined with ANDROID_ID.
optional int32 short_name_hash = 14;
- // Whether this FGS package had permission to notify the user.
- optional bool fgs_has_notification_permission = 15;
-
- // Keep in sync with frameworks/base/core/java/android/content/pm/ServiceInfo.java
- enum ForegroundServiceType {
- FOREGROUND_SERVICE_TYPE_NONE = 0;
- FOREGROUND_SERVICE_TYPE_DATA_SYNC = 0x0001; // 1 << 0
- FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK = 0x0002; // 1 << 1
- FOREGROUND_SERVICE_TYPE_PHONE_CALL = 0x0004; //1 << 2
- FOREGROUND_SERVICE_TYPE_LOCATION = 0x0008; // 1 << 3
- FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE = 0x0010; // 1 << 4
- FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION = 0x0020; // 1 << 5
- FOREGROUND_SERVICE_TYPE_CAMERA = 0x0040; // 1 << 6
- FOREGROUND_SERVICE_TYPE_MICROPHONE = 0x0080; // 1 << 7
- }
-
- // The foreground service types, must be one or a combination of the types
- // in the ForegroundServiceType above.
- optional int32 fgs_types = 16;
}
/**
@@ -5306,25 +4684,6 @@
}
/**
- * Atom for logging Dream user interaction and impression events.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/
- */
-message DreamUiEventReported {
- // The event's source or target uid, if applicable.
- optional int32 uid = 1 [(is_uid) = true];
- // The event_id (as for UiEventReported).
- optional int32 event_id = 2;
- // 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 = 3;
-
- // The name of the dream component, which identifies the type of the dream.
- optional string dream_component_name = 4;
-}
-
-/**
* Reports a notification was created or updated.
*
* Logged from:
@@ -5375,12 +4734,6 @@
optional android.stats.sysui.NotificationImportance importance_asst = 19;
optional int32 assistant_hash = 20;
optional float assistant_ranking_score = 21;
-
- // Fields for tracking ongoing and foreground service notifications
- optional bool is_ongoing = 22;
- optional bool is_foreground_service = 23;
- // Fields to know about the timeout for notifications.
- optional int64 timeout_millis = 24;
}
message Notification {
@@ -5480,12 +4833,6 @@
optional bool debug = 8;
// The ID of the biometric sensor associated with this action.
optional int32 sensor_id = 9;
- // The ID of the session this event occurred in (if any)
- optional int32 session_id = 10;
- // The type of session (i.e. CUJ)
- optional android.hardware.biometrics.SessionTypeEnum session_type = 11;
- // If the AoD was on when this event occurred.
- optional bool is_aod = 12;
}
/**
@@ -5528,12 +4875,6 @@
optional int32 sensor_id = 9;
// The ambient light lux when authenticated.
optional float ambient_light_lux = 10;
- // The ID of the session this event occurred in (if any)
- optional int32 session_id = 11;
- // The type of session (i.e. CUJ)
- optional android.hardware.biometrics.SessionTypeEnum session_type = 12;
- // If the AoD was on when this event occurred.
- optional bool is_aod = 13;
}
/**
@@ -5565,12 +4906,6 @@
optional int64 latency_millis = 9;
// The ID of the biometric sensor associated with this action.
optional int32 sensor_id = 10;
- // The ID of the session this event occurred in (if any)
- optional int32 session_id = 11;
- // The type of session (i.e. CUJ)
- optional android.hardware.biometrics.SessionTypeEnum session_type = 12;
- // If the AoD was on when this event occurred.
- optional bool is_aod = 13;
}
/**
@@ -5774,83 +5109,14 @@
// (e.g. soft restart, notification restart).
NO_REBOOT_PROMOTION_STRATEGY_ELIGIBLE = 30;
REBOOT_TRIGGER_FAILURE = 31;
- // Logged after INSTALL_REQUESTED for devices installing a train which
- // requires reboot and eligible for unattended reboot.
- UNATTENDED_REBOOT_ELIGIBLE = 32;
- // Logged when Phonesky trys to prepare LSKF.
- LSKF_PREPARATION_INITITATED = 33;
- // Logged when LSKF preparation succeeded.
- LSKF_PREPARATION_SUCCESS = 34;
- // Logged when LSKF preparation failed.
- LSKF_PREPARATION_FAILURE = 35;
- // Logged when Phonesky cannot schedule reboot job on a unattended reboot
- // eligible device.
- UNATTENDED_REBOOT_NOT_TRIGGERED = 36;
- // Logged when SIM PIN recovery preparation succeeded.
- SIM_PIN_PREPARATION_SUCCESS = 37;
- // Logged when SIM PIN recovery preparation failed.
- SIM_PIN_PREPARATION_FAILURE = 38 [deprecated = true];
- // Logged when unattended reboot is aborted and falls back to organic
- // reboot.
- UNATTENDED_REBOOT_ABORT = 39;
- // Logged when Phonesky re-prepares LSKF.
- LSKF_PREPARATION_RETRY = 40;
- // Logged when the device doesn’t support checkpoint and cannot stage
- // multiple sessions.
- CHECKPOINT_NOT_SUPPORTED = 41;
- // Logged when Phonesky instructs Android platform to monitor reboot
- // readiness signal.
- PENDING_REBOOT_MARKED = 42;
- // Logged when Phonesky instructs Android platform to stop monitoring reboot
- // readiness signal.
- PENDING_REBOOT_CANCELLED = 43 [deprecated = true];
- // Logged when Phonesky receives reboot readiness broadcast and the device
- // is ready to reboot.
- SIGNAL_READY_TO_REBOOT_RECEIVED = 44;
- // Logged when Phonesky receives reboot readiness broadcast and the device
- // is not ready to reboot.
- SIGNAL_NOT_READY_TO_REBOOT_RECEIVED = 45;
- // Logged when Phonesky cancels an untracked train.
- UNTRACKED_TRAIN_CANCELLED = 46;
}
optional State state = 6;
// Possible experiment ids for monitoring this push.
optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES];
- // Index of the Android User. E.g. 0 for primary profile, 10, 11, 12
- // for guest and secondary profiles. Not PII.
+ // user id
optional int32 user_id = 8;
- // Log additional info for a state when needed.
- // When state = REBOOT_TRIGGERED, this field logs the reboot type:
- // USERSPACE_REBOOT = 1.
- // FORCED_REBOOT = 2.
- // NOTIFICATION_RESTART_REBOOT = 3.
- // UNATTENDED_REBOOT_SECURED_AND_SIM_PIN = 4.
- // UNATTENDED_REBOOT_SECURED_NO_SIM_PIN = 5.
- // UNATTENDED_REBOOT_UNSECURED_AND_SIM_PIN = 6.
- // UNATTENDED_REBOOT_UNSECURED_NO_SIM_PIN = 7.
- // When state = INSTALL_FAILURE, this field logs the Install errors related
- // statusCode
- // When state = UNATTENDED_REBOOT_ABORT, this field logs the cancellation
- // reason:
- // LSKF_RETRY_EXCEED_MAXIMUM = 1.
- // SIM_PIN_NOT_PREPARED = 2.
- // When state = UNATTENDED_REBOOT_ELIGIBLE, this field logs the cancellation
- // reason:
- // UNATTENDED_REBOOT_SECURED_AND_SIM_PIN = 1.
- // UNATTENDED_REBOOT_SECURED_NO_SIM_PIN = 2.
- // UNATTENDED_REBOOT_UNSECURED_AND_SIM_PIN = 3.
- // UNATTENDED_REBOOT_UNSECURED_NO_SIM_PIN = 4.
- // When state = UNATTENDED_REBOOT_NOT_TRIGGERED, this field logs the
- // cancellation reason:
- // LSKF_NOT_PREPARED = 1.
- // REBOOT_NOT_READY = 2.
- // When state = PENDING_REBOOT_CANCELLED, this field logs the cancellation
- // reason:
- // LSKF_NOT_PREPARED = 1.
- // NO_STAGED_TRAIN = 2.
- // HAS_SIM_PIN_AND_SIM_PIN_STORAGE_DISABLED = 3.
optional int32 reason = 9;
- // Whether or not this is a rollback event.
+ // Whether or not this is a rollback event
optional bool is_rollback = 10;
}
@@ -5869,12 +5135,6 @@
}
optional State state = 7;
optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES];
- repeated int32 repeated_int_field = 9;
- repeated int64 repeated_long_field = 10;
- repeated float repeated_float_field = 11;
- repeated string repeated_string_field = 12;
- repeated bool repeated_boolean_field = 13;
- repeated State repeated_enum_field = 14;
}
/** Represents USB port overheat event. */
@@ -5985,102 +5245,6 @@
}
/**
- * The type of process start. It's the same as ProcessStartTime.StartType but we
- * can't re-type that for background compatibility.
- */
-enum ProcessStartType {
- PROCESS_START_TYPE_UNKNOWN = 0;
- PROCESS_START_TYPE_WARM = 1;
- PROCESS_START_TYPE_HOT = 2;
- PROCESS_START_TYPE_COLD = 3;
-}
-
-/**
- * Logs when a service request is made.
- * Logged from:
- * services/core/java/com/android/server/am/ActiveServices.java
- */
-message ServiceRequestEventReported {
- /** The package uid of the service host. */
- optional int32 uid = 1 [(is_uid) = true];
-
- /** The package uid of the service launch request. */
- optional int32 requester_uid = 2 [(is_uid) = true];
-
- /** The action name of the service request. */
- optional string action_name = 3;
-
- /**
- * The types of the requests to the service.
- */
- enum RequestType {
- UNKNOWN = 0;
- START = 1;
- BIND = 2;
- }
-
- /** The type of the current request to the service.*/
- optional RequestType request_type = 4;
-
- /** Whether or not it's requested to start as a foreground service. */
- optional bool fg_required = 5;
-
- /** The start type of the host process. */
- optional ProcessStartType proc_start_type = 6;
-}
-
-/**
- * Logs indicating a broadcast is being delivered to a receiver.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
- */
-message BroadcastDeliveryEventReported {
- /** The package uid of the broadcast receiver. */
- optional int32 uid = 1 [(is_uid) = true];
-
- /** The package uid of the broadcast sender. */
- optional int32 sender_uid = 2 [(is_uid) = true];
-
- /** The action name of the broadcast. */
- optional string action_name = 3;
-
- /**
- * The types of the broadcast receivers.
- */
- enum ReceiverType {
- UNKNOWN = 0;
- RUNTIME = 1;
- MANIFEST = 2;
- }
-
- /** The type of the current broadcast receiver. */
- optional ReceiverType receiver_type = 4;
-
- /** The start type of the host process. */
- optional ProcessStartType proc_start_type = 5;
-}
-
-/**
- * Logs indicating a client is requesting to acquire a provider,
- * this doesn't include the case where the provider has been installed in the
- * client's process space and it's just increasing a ref count.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/ContentProviderHelper.java
- */
-message ProviderAcquisitionEventReported {
- /** The package uid of the content provider host. */
- optional int32 uid = 1 [(is_uid) = true];
-
- /** The package uid of the content provider client who makes the request. */
- optional int32 client_uid = 2 [(is_uid) = true];
-
- /** The start type of the host process. */
- optional ProcessStartType proc_start_type = 3;
-}
-
-/**
* Logs when a hidden API is used.
*
* Logged from:
@@ -6647,13 +5811,6 @@
EXPECTED_MERGE_TARGET = 11;
UNMERGED_SECTORS_AFTER_COMPLETION = 12;
UNEXPECTED_MERGE_STATE = 13;
- GET_COW_PATH_CONSISTENCY_CHECK = 14;
- OPEN_COW_CONSISTENCY_CHECK = 15;
- PARSE_COW_CONSISTENCY_CHECK = 16;
- OPEN_COW_DIRECT_CONSISTENCY_CHECK = 17;
- MEM_ALIGN_CONSISTENCY_CHECK = 18;
- DIRECT_READ_CONSISTENCY_CHECK = 19;
- WRONG_MERGE_COUNT_CONSISTENCY_CHECK = 20;
};
// Status of the update after the merge attempts.
@@ -6802,7 +5959,7 @@
* Logged from:
* frameworks/base/core/java/com/android/internal/jank/FrameTracker.java
*
- * Next Tag: 59
+ * Next Tag: 31
*/
message UIInteractionFrameInfoReported {
enum InteractionType {
@@ -6842,29 +5999,6 @@
SHADE_APP_LAUNCH_FROM_QS_TILE = 33;
SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON = 34;
STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP = 35;
- PIP_TRANSITION = 36;
- WALLPAPER_TRANSITION = 37;
- USER_SWITCH = 38;
- SPLASHSCREEN_AVD = 39;
- SPLASHSCREEN_EXIT_ANIM = 40;
- SCREEN_OFF = 41;
- SCREEN_OFF_SHOW_AOD = 42;
- ONE_HANDED_ENTER_TRANSITION = 43;
- ONE_HANDED_EXIT_TRANSITION = 44;
- UNFOLD_ANIM = 45;
- SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS = 46;
- SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS = 47;
- SUW_LOADING_TO_NEXT_FLOW = 48;
- SUW_LOADING_SCREEN_FOR_STATUS = 49;
- SPLIT_SCREEN_ENTER = 50;
- SPLIT_SCREEN_EXIT = 51;
- LOCKSCREEN_LAUNCH_CAMERA = 52;
- SPLIT_SCREEN_RESIZE = 53;
- SETTINGS_SLIDER = 54;
- TAKE_SCREENSHOT = 55;
- VOLUME_CONTROL = 56;
- BIOMETRIC_PROMPT_TRANSITION = 57;
- SETTINGS_TOGGLE = 58;
}
optional InteractionType interaction_type = 1;
@@ -6883,9 +6017,6 @@
// Maximum time it took to render a single frame during the interaction.
optional int64 max_frame_time_nanos = 4;
-
- // Maximum number of successive frames missed.
- optional int64 max_successive_missed_frames = 7;
}
/**
@@ -6909,11 +6040,6 @@
ACTION_ROTATE_SCREEN_CAMERA_CHECK = 10;
ACTION_ROTATE_SCREEN_SENSOR = 11;
ACTION_LOCKSCREEN_UNLOCK = 12;
- ACTION_USER_SWITCH = 13;
- ACTION_SWITCH_DISPLAY_UNFOLD = 14;
- ACTION_UDFPS_ILLUMINATE = 15;
- ACTION_SHOW_BACK_ARROW = 16;
- ACTION_LOAD_SHARE_SHEET = 17;
}
optional ActionType action = 1;
@@ -7065,80 +6191,6 @@
}
/**
- * Note: This is a copy from DataUsageBytesTransfer and add a metered field.
- * TODO: DataUsageBytesTransfer should be eventually replaced with DataUsageBytesTransferV2.
- *
- * 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 DataUsageBytesTransferV2 {
- // 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 DSS_ALL state indicates the record is
- // combined regardless of the boolean value in its field.
- enum DataSubscriptionState {
- DSS_UNKNOWN = 0; // For server side backward compatibility.
- DSS_ALL = 1;
- DSS_OPPORTUNISTIC = 2;
- DSS_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;
-
- // Enumeration of metered states.
- enum MeteredState {
- METERED_UNKNOWN = 0;
- METERED_ALL = 1;
- METERED_NO = 2;
- METERED_YES = 3;
- }
- // Mark the reported data is metered or non-metered, and METERED_ALL indicates the record is
- // combined across metered data.
- optional MeteredState metered = 12;
-}
-
-/**
* Pulls bytes transferred via OEM managed networks. Data is split up by which
* type of OEM managed network it is, what transport it went over, and if it was
* in the foreground or background.
@@ -7504,13 +6556,6 @@
// The sum of rss_in_kilobytes and swap_in_kilobytes.
optional int32 anon_rss_and_swap_in_kilobytes = 8;
-
- // GPU memory usage as measured by the kernel tracepoints
- // Equivalent to dumpsys gpu --gpumem
- optional int32 gpu_memory_kb = 9;
-
- // Whether or not this process is hosting one or more foregound services.
- optional bool has_foreground_services = 10;
}
/*
@@ -7808,7 +6853,7 @@
/**
- * Free and total bytes of the Data, Cache, System, and Metadata partitions.
+ * Free and total bytes of the Data, Cache, and System partition.
*/
message DirectoryUsage {
enum Directory {
@@ -7816,7 +6861,6 @@
DATA = 1;
CACHE = 2;
SYSTEM = 3;
- METADATA = 4;
}
optional Directory directory = 1;
optional int64 free_bytes = 2;
@@ -8244,8 +7288,6 @@
// Bitfield mask indicating what fields were locked by the user (see LockableAppfields in
// PreferencesHelper.java)
optional int32 user_locked_fields = 4;
- // Indicates if the package importance was set by the user (rather than system default).
- optional bool user_set_importance = 5;
}
/**
@@ -8608,7 +7650,6 @@
DATA_SHARE_ERROR_SERVICE_PIPE_FAIL = 13;
DATA_SHARE_ERROR_CONCURRENT_REQUEST = 14;
DATA_SHARE_ERROR_TIMEOUT_INTERRUPTED = 15;
- ON_REMOTE_SERVICE_DIED = 16;
}
optional Event event = 1;
// component/package of content capture service.
@@ -8616,12 +7657,7 @@
// component/package of target.
// it's a concatenated list of component/package for SET_WHITELIST event
// separated by " ".
- // Deprecated: should not log app package
- optional string target_info = 3 [deprecated = true];
- // The number of packages in the allow list
- optional int32 set_allowlist_package_count = 4;
- // The number of activities in the allow list
- optional int32 set_allowlist_activity_count = 5;
+ optional string target_info = 3;
}
/**
@@ -8646,8 +7682,7 @@
optional string service_info = 4;
// component/package of app.
// (n/a on session finished)
- // Deprecated: should not log app package
- optional string app_info = 5 [deprecated = true];
+ optional string app_info = 5;
optional bool is_child_session = 6;
}
@@ -8662,8 +7697,7 @@
// component/package of content capture service.
optional string service_info = 2;
// component/package of app.
- // Deprecated: should not log app package
- optional string app_info = 3 [deprecated = true];
+ optional string app_info = 3;
// session start/finish events
optional int32 child_session_started = 4;
optional int32 child_session_finished = 5;
@@ -8689,6 +7723,56 @@
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;
+}
+
// Keep in sync with frameworks/base/core/proto/android/os/batteryusagestats.proto
/**
* Represents a device's BatteryUsageStats, with power usage information about the device
@@ -8729,26 +7813,6 @@
optional int64 duration_millis = 3;
}
repeated PowerComponentUsage power_components = 2;
-
- // Represents a slice of power attribution, e.g. "cpu while in the background"
- // or "wifi when running a background service". Queries that care about
- // PowerComponentUsage slices need to be aware of all supported dimensions.
- // There are no roll-ups included in the slices - it is up to the clients
- // of this data to aggregate values as needed.
- message PowerComponentUsageSlice {
- optional PowerComponentUsage power_component = 1;
-
- enum ProcessState {
- UNSPECIFIED = 0;
- FOREGROUND = 1;
- BACKGROUND = 2;
- FOREGROUND_SERVICE = 3;
- }
-
- optional ProcessState process_state = 2;
- }
-
- repeated PowerComponentUsageSlice slices = 3;
}
// Total power usage for the device during this session.
@@ -8765,9 +7829,6 @@
// Sum of all discharge percentage point drops during the reported session.
optional int32 session_discharge_percentage = 6;
-
- // Total amount of time battery was discharging during the reported session
- optional int64 discharge_duration_millis = 7;
}
/**
@@ -9113,52 +8174,6 @@
}
/**
- * The NetworkDnsHandshakeReported message describes a DoT or DoH handshake operation along with
- * its result, cause, network latency, TLS version, etc.
- *
- */
-message NetworkDnsHandshakeReported {
- optional android.stats.dnsresolver.Protocol protocol = 1;
-
- optional android.stats.dnsresolver.HandshakeResult result = 2;
-
- optional android.stats.dnsresolver.HandshakeCause cause = 3;
-
- optional android.stats.dnsresolver.NetworkType network_type = 4;
-
- optional android.stats.dnsresolver.PrivateDnsModes private_dns_mode = 5;
-
- // The latency in microseconds of the entire handshake operation.
- optional int32 latency_micros = 6;
-
- // Sent packets in bytes.
- optional int32 bytes_sent = 7;
-
- // Received packets in bytes.
- optional int32 bytes_received = 8;
-
- // Number of round-trips.
- optional int32 round_trips = 9;
-
- // True if TLS session cache hit.
- optional bool tls_session_cache_hit = 10;
-
- // 2 = TLS 1.2, 3 = TLS 1.3
- optional int32 tls_version = 11;
-
- // True if the handshake requires verifying the private DNS provider hostname.
- optional bool hostname_verification = 12;
-
- // Only present when protocol = PROTO_DOH.
- optional int32 quic_version = 13;
-
- optional int32 server_index = 14;
-
- // The sampling-rate of this event is 1/sampling_rate_denom.
- optional int32 sampling_rate_denom = 15;
-}
-
-/**
* logs the CapportApiData info
* Logged from:
* packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
@@ -9570,17 +8585,6 @@
}
/**
- * Logs GNSS PSDS downloads as defined in IGnssPsds.aidl.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/location/gnss/GnssPsdsDownloader.java
- */
-message GnssPsdsDownloadReported {
- // PSDS type as defined in PsdsType.aidl
- optional int32 psds_type = 1;
-}
-
-/**
* Logs when a NFC device's error occurred.
* Logged from:
* system/nfc/src/nfc/nfc/nfc_ncif.cc
@@ -9890,75 +8894,7 @@
/** Logs System UI bubbles event changed.
*
* Logged from:
- * frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen
- */
-message SplitscreenUIChanged {
- // User interactions with splitscreen
- enum Action {
- UNKNOWN_ACTION = 0;
- ENTER = 1;
- EXIT = 2;
- APP_CHANGE = 3;
- RESIZE = 4;
- SWAP = 5;
- }
-
- // The physical side on the device of the split
- enum Position {
- UNKNOWN_POSITION = 0;
- LEFT = 1;
- RIGHT = 2;
- TOP = 3;
- BOTTOM = 4;
- }
-
- // The reason for entering splitscreen
- enum EnterReason {
- UNKNOWN_ENTER = 0;
- OVERVIEW = 1;
- DRAG_LEFT = 2;
- DRAG_TOP = 3;
- DRAG_RIGHT = 4;
- DRAG_BOTTOM = 5;
- }
-
- // The reason for exiting splitscreen
- enum ExitReason {
- UNKNOWN_EXIT = 0;
- DRAG_DIVIDER = 1;
- RETURN_HOME = 2;
- SCREEN_LOCKED = 3;
- SCREEN_LOCKED_SHOW_ON_TOP = 4;
- DEVICE_FOLDED = 5;
- ROOT_TASK_VANISHED = 6;
- APP_FINISHED = 7;
- APP_DOES_NOT_SUPPORT_MULTIWINDOW = 8;
- }
-
- // The event action
- optional Action action = 1;
- // What triggered splitscreen (if the action is ENTER)
- optional EnterReason enter_reason = 2;
- // What triggered leaving splitscreen (if the action is EXIT)
- optional ExitReason exit_reason = 3;
- // The ratio of split between the main/side stages
- optional float split_ratio = 4;
- // Data about the main stage in split
- optional Position main_stage_position = 5;
- optional int32 main_stage_uid = 6 [(is_uid) = true];
- // Data about the side stage in split
- optional Position side_stage_position = 7;
- optional int32 side_stage_uid = 8 [(is_uid) = true];
- // The drag session id (if the enter_trigger was DRAG)
- optional int32 drag_instance_id = 9;
- // An identifier used to identify a splitscreen session
- optional int32 instance_id = 10;
-}
-
-/** Logs System UI bubbles event changed.
- *
- * Logged from:
- * frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles
+ * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles
*/
message BubbleUIChanged {
@@ -10094,8 +9030,6 @@
// The process name.
// Usually package name, "system" for system server.
// Provided by ActivityManagerService.
- // Do not fetch this field from device to save storage space, use uid field induced
- // package name as process name.
optional string process_name = 3;
enum StartType {
@@ -10119,38 +9053,11 @@
// hostingType field in ProcessRecord, the component type such as "activity",
// "service", "content provider", "broadcast" or other strings.
- // deprecatd by enum type field hosting_type_id to reduce storage space usage by
- // string type.
- // Do not fetch this field from device to save storage space.
- optional string hosting_type = 8 [deprecated = true];
+ optional string hosting_type = 8;
// hostingNameStr field in ProcessRecord. The component class name that runs
// in this process.
- // Do not fetch this field from device to save storage space.
optional string hosting_name = 9;
-
- // Broadcast action name.
- optional string broadcast_action_name = 10;
-
- enum HostingTypeId {
- HOSTING_TYPE_UNKNOWN = 0;
- HOSTING_TYPE_ACTIVITY = 1;
- HOSTING_TYPE_ADDED_APPLICATION = 2;
- HOSTING_TYPE_BACKUP = 3;
- HOSTING_TYPE_BROADCAST = 4;
- HOSTING_TYPE_CONTENT_PROVIDER = 5;
- HOSTING_TYPE_LINK_FAIL = 6;
- HOSTING_TYPE_ON_HOLD = 7;
- HOSTING_TYPE_NEXT_ACTIVITY = 8;
- HOSTING_TYPE_NEXT_TOP_ACTIVITY = 9;
- HOSTING_TYPE_RESTART = 10;
- HOSTING_TYPE_SERVICE = 11;
- HOSTING_TYPE_SYSTEM = 12;
- HOSTING_TYPE_TOP_ACTIVITY = 13;
- HOSTING_TYPE_EMPTY = 14;
- }
-
- optional HostingTypeId hosting_type_id = 11;
}
/**
@@ -10189,74 +9096,30 @@
optional string package_name = 2;
optional int64 package_version_code = 3;
optional int64 media_apex_version = 4;
- // The name of the codec.
- // eg. `OMX.google.aac.decoder`
optional string codec = 5;
- // The mime type. e.g. "audio/vorbis"
optional string mime = 6;
- // The codec mode. i.e. video or audio.
optional string mode = 7;
- // 1 if this is an encoder, 0 if this is a decoder.
optional int32 encoder = 8;
- // 0, 1
optional int32 secure = 9;
- // The video width in pixels.
optional int32 width = 10;
- // The video height in pixels.
optional int32 height = 11;
- // The rotation of the video in degrees
- // 0, 90, 180, 270
optional int32 rotation = 12;
- // 1 if the codec uses crypto/drm, 0 otherwise.
optional int32 crypto = 13;
- // The codec profile. The values are dependent on the codec type.
- // 0..n
optional int32 profile = 14;
- // The coding level. The values are dependent on the codec type.
- // 0..n
optional int32 level = 15;
- // The maximum allowed width during a particular codec session.
- // 0..n
optional int32 max_width = 16;
- // The maximum allowed height during a particular codec session.
- // 0..n
optional int32 max_height = 17;
- // Indicating which error condition caused the codec to reset to an
- // uninitialized state.
optional int32 error_code = 18;
- // The error state.
- // The emitted values are descriptive: UNINITIALIZED, INITIALIZING,
- // INITIALIZED, CONFIGURING, CONFIGURED, STARTING, STARTED, FLUSHING, FLUSHED,
- // STOPPING, and RELEASING.
- // In the event of an internal codec error setting the state outside of these
- // values, the invalid value will be encoded as a string (e.g., “17”).
optional string error_state = 19;
- // The max latency in us.
- // The latency is from the time when the MediaCodec sends the ‘raw’ frame to
- // the media codec service to when the decoded frame arrives back in
- // MediaCodec’s possession.
optional int64 latency_max = 20;
- // The min latency in us.
optional int64 latency_min = 21;
- // The average latency in us.
optional int64 latency_avg = 22;
- // The number of buffers included in the avg/min/max calculation above.
optional int64 latency_count = 23;
- // The number of packets received back from the code where a latency could not
- // be determined, and therefore they aren't included in the avg/min/max
- // calculations above.
optional int64 latency_unknown = 24;
- // Error returned by queueInputBuffer.
optional int32 queue_input_buffer_error = 25;
- // Error returned by queueSecureInputBuffer.
optional int32 queue_secure_input_buffer_error = 26;
- // These modes are primarily for videos.
- // CQ = constant quality
- // CBR = constant bit rate
- // VBR = variable bitrate
optional string bitrate_mode = 27;
optional int32 bitrate = 28;
- // 0..n
optional int64 lifetime_millis = 29;
optional int64 playback_duration_seconds = 30;
optional string log_session_id = 31;
@@ -10286,15 +9149,6 @@
optional int32 original_video_qp_p_max = 55;
optional int32 original_video_qp_b_min = 56;
optional int32 original_video_qp_b_max = 57;
- optional int32 config_color_standard = 58;
- optional int32 config_color_range = 59;
- optional int32 config_color_transfer = 60;
- optional int32 parsed_color_standard = 61;
- optional int32 parsed_color_range = 62;
- optional int32 parsed_color_transfer = 63;
- optional int32 hdr_static_info = 64;
- optional int32 hdr_10_plus_info = 65;
- optional int32 hdr_format = 66;
// !!! WARNING
// Keep synchronized with MediametricsCodecReported.CodecData in
// mediametrics_message.proto.
@@ -10795,9 +9649,6 @@
// App creates GLESv1 context.
optional bool gles_1_in_use = 8;
-
- // ANGLE in use for the app.
- optional bool angle_in_use = 9;
}
/*
@@ -10891,9 +9742,6 @@
// Total DMABUF memory allocations
// Reported from os.Debug.getDmabufTotalExportedKb (S+)
optional int32 dmabuf_total_exported_kb = 9;
-
- // Total shmem allocations
- optional int32 shmem_kb = 10;
}
/*
@@ -10922,21 +9770,10 @@
optional int32 retained_dmabuf_count = 5;
// Size of dmabufs mapped to the process address space.
- optional int32 mapped_dmabuf_kb = 6 [deprecated = true];
+ optional int32 mapped_dmabuf_kb = 6;
// Number of dmabufs mapped to the process address space.
- optional int32 mapped_dmabuf_count = 7 [deprecated = true];
-
- // Size of dmabufs mapped to the process address space that are also
- // mapped to the SurfaceFlinger address space. This indicates memory
- // being used by graphics compositing layers. If this data row pertains
- // to SurfaceFlinger itself, then the below field holds the size of all
- // dmabuifs that are shared with any other process. The delta between
- // this field and retained_dmabuf_kb, above, is private dmabufs that
- // SurfaceFlinger is holding but are not shared with other processes.
- optional int32 surfaceflinger_shared_dmabuf_kb = 8;
- // As above, but total number of all dmabufs shared with SurfaceFlinger.
- optional int32 surfaceflinger_shared_dmabuf_count = 9;
+ optional int32 mapped_dmabuf_count = 7;
}
/**
@@ -12111,9 +10948,6 @@
// Number of operations failed for batch operations.
optional int32 num_operations_failed = 10;
-
- // Number of actual API calls reported in this atom.
- optional int32 num_reported_calls = 11;
}
/**
@@ -12433,79 +11267,6 @@
optional int64 native_time_since_last_optimize_millis = 13;
}
-/**
- * Logs detailed stats for setting schema in AppSearch.
- *
- * stats pushed from:
- * frameworks/base/apex/appsearch/service/java/com/android/server/appsearch/AppSearchManagerService.java
- *
- * Next tag: 20
- */
-message AppSearchSetSchemaStatsReported {
- // The sampling interval for this specific type of stats
- // For example, sampling_interval=10 means that one out of every 10 stats was logged.
- optional int32 sampling_interval = 1;
-
- // # of previous skipped sample for this specific type of stats
- // We can't push atoms too closely, so some samples might be skipped
- // In order to extrapolate the counts, we need to save the number of skipped stats and add it back
- // For example, the true count of an event could be estimated as:
- // SUM(sampling_interval * (num_skipped_sample + 1)) as est_count
- optional int32 num_skipped_sample = 2;
-
- // Package UID of the application.
- optional int32 uid = 3 [(is_uid) = true];
-
- // Hash of the database name within AppSearch
- optional int32 database = 4;
-
- // Needs to be sync with AppSearchResult#ResultCode in
- // frameworks/base/apex/appsearch/framework/java/android/app/appsearch/AppSearchResult.java
- optional int32 status_code = 5;
-
- // Overall time used for setting schema including the binder latency
- optional int32 total_latency_millis = 6;
-
- // Number of newly added schema types
- optional int32 new_type_count = 7;
-
- // Number of deleted schema types
- optional int32 deleted_type_count = 8;
-
- // Number of compatible schema type changes
- optional int32 compatible_type_change_count = 9;
-
- // Number of index-incompatible schema type changes
- optional int32 index_incompatible_type_change_count = 10;
-
- // Number of backwards-incompatible schema type changes
- optional int32 backwards_incompatible_type_change_count = 11;
-
- // Whether schema migration is executed during setting schema
- optional bool has_schema_migration = 12;
-
- // Overall time used for getting schema during schema migration
- optional int32 schema_migration_get_schema_latency_millis = 13;
-
- // Overall time used for querying and transforming documents during schema migration
- optional int32 schema_migration_query_and_transform_latency_millis = 14;
-
- // Overall time used for first setSchema during schema migration
- optional int32 schema_migration_first_set_schema_latency_millis = 15;
-
- // Overall time used for second setSchema during schema migration
- optional int32 schema_migration_second_set_schema_latency_millis = 16;
-
- // Overall time used for saving documents during schema migration
- optional int32 schema_migration_save_document_latency_millis = 17;
-
- // Number of migrated documents during schema migration
- optional int32 schema_migration_migrated_document_count = 18;
-
- // Number of saved documents during schema migration
- optional int32 schema_migration_saved_document_count = 19;
-}
-
// Reports information in external/icing/proto/icing/proto/storage.proto#DocumentStorageInfoProto
// Next tag: 15
message AppSearchDocumentStorageInfo {
@@ -12645,59 +11406,6 @@
[(android.os.statsd.log_mode) = MODE_BYTES];
}
-
-/**
- * Reported when AppSearch Contacts Indexer syncs the contacts data from CP2 to AppSearch
- *
- * Reported from:
- * packages/modules/AppSearch/service/java/com/android/server/appsearch/contactsindexer/ContactsIndexerManagerService.java
- *
- * Next tag: 11
- */
-message ContactsIndexerUpdateStatsReported {
- enum UpdateType {
- UNKNOWN = 0;
- DELTA = 1;
- FULL = 2;
- }
-
- // Type of the update
- optional UpdateType update_type = 1;
-
- // Latency for the update in millis
- optional int32 total_latency_millis = 2;
-
- // Status code to indicate whether the insert new contacts, or update
- // existing contacts succeeds, or fails and why
- // In case of success, it only contains OK.
- // In case of failures, it contains all the possible errors we get.
- repeated int32 update_status_codes = 3;
-
- // Status code to indicate whether the delete succeeds, or fails and why
- // In case of success, it only contains OK.
- // In case of failures, it contains all the possible errors we get.
- repeated int32 delete_status_codes = 4;
-
- // Number of new contacts to be updated.
- optional int32 number_of_new_contacts_to_be_updated = 5;
-
- // Number of old and new contacts has been successfully updated.
- optional int32 number_of_contacts_update_succeeded = 6;
-
- // Number of old contacts has been successfully deleted.
- optional int32 number_of_contacts_delete_succeeded = 7;
-
- // Number of old contacts skipped during this update due to no
- // significant change.
- optional int32 number_of_contacts_update_skipped = 8;
-
- // Number of old and new contacts failed to be updated
- optional int32 number_of_contacts_update_failed = 9;
-
- // Number of old contacts failed to be deleted
- optional int32 number_of_contacts_delete_failed = 10;
-}
-
/**
* Reported when the RebootEscrow HAL has attempted to recover the escrowed
* key to indicate whether it was successful or not.
@@ -13083,10 +11791,6 @@
// The frame counts for each histogram bins
// Expected number of fields: 10
repeated int64 histogram_counts = 13;
- // The dynamic range profile of the stream
- optional int64 dynamic_range_profile = 14;
- // The stream use case
- optional int64 stream_use_case = 15;
}
/**
@@ -13159,13 +11863,6 @@
optional CameraStreamProto stream_3 = 17 [(log_mode) = MODE_BYTES];
optional CameraStreamProto stream_4 = 18 [(log_mode) = MODE_BYTES];
optional CameraStreamProto stream_5 = 19 [(log_mode) = MODE_BYTES];
-
- // User tag string for this session
- optional string user_tag = 20;
-
- // Video stabilization mode
- // Original type: uint8_t
- optional int32 video_stabilization_mode = 21 [default = -1];
}
/**
@@ -13212,9 +11909,8 @@
message PerfettoUploaded {
// TODO(lalitm): many of the atoms below should be renamed to have a
// "PERFETTO_CMD" prefix to make clear they are specific to perfetto_cmd.
- // This state exists because of legacy reasons (i.e. these values existed
- // before go/perfetto-monitoring was a thing).
- // Next id: 52.
+ // This will be done after the server side is ready for this change.
+ // Next id: 48.
enum Event {
PERFETTO_UNDEFINED = 0;
@@ -13263,37 +11959,31 @@
PERFETTO_TRACED_ENABLE_TRACING_UNKNOWN_ERROR = 35;
PERFETTO_TRACED_START_TRACING_INVALID_SESSION_STATE = 36;
PERFETTO_TRACED_ENABLE_TRACING_INVALID_FILTER = 47;
- PERFETTO_TRACED_ENABLE_TRACING_OOB_TARGET_BUFFER = 48;
// Checkpoints inside perfetto_cmd after tracing has finished.
PERFETTO_ON_TRACING_DISABLED = 4;
- PERFETTO_FINALIZE_TRACE_AND_EXIT = 11;
- PERFETTO_CMD_FW_REPORT_BEGIN = 49;
- // Will be removed once incidentd is no longer used.
PERFETTO_UPLOAD_INCIDENT_BEGIN = 8;
-
- // Guardrails inside perfetto_cmd after tracing has finished.
- PERFETTO_CMD_FW_REPORT_EMPTY_TRACE = 50;
- // Will be removed once incidentd is no longer used.
- PERFETTO_UPLOAD_INCIDENT_FAILURE = 10;
+ PERFETTO_FINALIZE_TRACE_AND_EXIT = 11;
PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17;
- // "Successful" terminal states inside perfetto_cmd.
- PERFETTO_CMD_FW_REPORT_HANDOFF = 51;
+ // Guardrails inside perfetto_cmd after tracing has finished.
+ PERFETTO_UPLOAD_INCIDENT_FAILURE = 10;
// Deprecated as "success" is misleading; it simply means we were
// able to communicate with incidentd. Will be removed once
- // incidentd is no longer used.
+ // incidentd is properly instrumented.
PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9 [deprecated = true];
- // Contained trigger begin/success/failure. Replaced by
- // |PerfettoTriggerAtom| to allow aggregation using a count metric
- // and reduce spam.
- reserved 12, 13, 14;
+ // Deprecated as has the potential to be too spammy. Will be
+ // replaced with a whole new atom proto which uses a count metric
+ // instead of the event metric used for this proto.
+ PERFETTO_TRIGGER_BEGIN = 12 [deprecated = true];
+ PERFETTO_TRIGGER_SUCCESS = 13 [deprecated = true];
+ PERFETTO_TRIGGER_FAILURE = 14 [deprecated = true];
- // Contained that a guardrail in perfetto_cmd was hit. Replaced with
- // kCmd* guardrails.
- reserved 15;
+ // Deprecated as too coarse grained to be useful. Will be replaced
+ // with better broken down atoms as we do with traced.
+ PERFETTO_HIT_GUARDRAILS = 15 [deprecated = true];
// Contained status of Dropbox uploads. Removed as Perfetto no
// longer supports uploading traces using Dropbox.
@@ -13976,9 +12666,6 @@
// Whether the call was a conference call (applicable only for calls over IMS).
optional bool is_multiparty = 32;
-
- // Duration after the call was connected.
- optional android.telephony.CallDuration call_duration = 33;
}
/**
@@ -14017,12 +12704,12 @@
*/
message CellularServiceState {
// Radio access technology (RAT) for voice.
- // NETWORK_TYPE_UNKNOWN when the device is not in-service.
+ // NETWORK_TYPE_UNKNOWN when the device is out of service.
// NETWORK_TYPE_IWLAN when the device is using VoWiFi.
optional android.telephony.NetworkTypeEnum voice_rat = 1;
// Radio access technology (RAT) for data.
- // NETWORK_TYPE_UNKNOWN when the device is not in-service.
+ // NETWORK_TYPE_UNKNOWN when the device is out of service.
// Only cellular RATs are valid and show where the device is camped.
optional android.telephony.NetworkTypeEnum data_rat = 2;
@@ -14048,11 +12735,6 @@
// Total time spent in this service state, rounded to 5 minutes.
optional int32 total_time_seconds = 9;
-
- // Whether the device is in limited service (only emergency voice
- // call available). Voice and data RAT will be recorded as
- // NETWORK_TYPE_UNKNOWN in this case.
- optional bool is_emergency_only = 10;
}
/**
@@ -14097,8 +12779,7 @@
optional int32 active_slot_count = 1;
// Number of SIM cards (both physical and active eSIM profiles).
- // This number may be greater than the number of active SIM slots, if multiple profiles are
- // enabled on the same eUICC.
+ // 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.
@@ -14121,19 +12802,6 @@
}
/**
- * Pulls the status of device-level telephony properties.
- *
- * Pulled from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message DeviceTelephonyProperties {
- // True if the device adopts the data stack came out in T
- optional bool using_t_data_stack = 1;
-}
-
-/**
- * This atom is deprecated starting in T, use TelephonyNetworkRequestsV2 instead.
- *
* Pulls information about network requests.
*
* Pulled from:
@@ -14150,34 +12818,6 @@
}
/**
- * Pulls information about network requests.
- *
- * Pulled from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message TelephonyNetworkRequestsV2 {
- enum NetworkCapability {
- // Unknown capability was requested.
- UNKNOWN = 0;
- // Low latency capability (URLLC) was requested.
- PRIORITIZE_LATENCY = 1;
- // High bandwidth capability (EMBB) was requested.
- PRIORITIZE_BANDWIDTH = 2;
- // CBS (Carrier Branded Services) capability was requested.
- CBS = 3;
- // Enterprise capability was requested.
- ENTERPRISE = 4;
- }
- // Carrier ID of the SIM card.
- // See https://source.android.com/devices/tech/config/carrierid.
- optional int32 carrier_id = 1;
- // The capability that was requested.
- optional NetworkCapability capability = 2;
- // Number of times the capability was requested.
- optional int32 request_count = 3;
-}
-
-/**
* Pulls information for a single incoming SMS.
*
* Each pull creates multiple atoms, one for each SMS. The sequence is randomized when pulled.
@@ -14283,9 +12923,6 @@
// Retry count: 0 for the first attempt and then increasing for each attempt.
optional int32 retry_id = 13;
-
- // Time in milliseconds to complete the SMS send to the network.
- optional int64 interval_millis = 14;
}
/**
@@ -14449,17 +13086,13 @@
// See GeranBands, UtranBands and EutranBands in IRadio interface, depending
// on the RAT at the end of the data call.
optional int32 band_at_end = 19;
-
- // Reason why the data call handover failed, as in RIL_DataCallFailCause from ril.h
- repeated int32 handover_failure_causes = 20;
}
/**
* Logs data stall recovery event
*
* Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/data/
- * DataStallRecoveryManager.java
+ * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
*/
message DataStallRecoveryReported {
// Carrier ID of the SIM
@@ -14492,9 +13125,6 @@
// The elapsed time between start of the data stall and result of current action.
optional int32 duration_millis = 9;
-
- // The data stall recovered reason. Available from Android T.
- optional android.telephony.DataStallRecoveredReason reason = 10;
}
/**
@@ -14607,9 +13237,6 @@
// Number of PINs stored or discarded.
optional int32 number_of_pins = 2;
-
- // The caller package name
- optional string package_name = 3;
}
/**
@@ -14890,8 +13517,6 @@
optional int32 instance_id = 3;
// Which of the ranked targets got picked, default starting position 0.
optional int32 position_picked = 4;
- // Whether the selected target is pinned.
- optional bool is_pinned = 5;
}
/**
@@ -14986,8 +13611,6 @@
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
- USER_STOP = 5; // A user stop journey
- USER_REMOVE = 6; // A user removal journey
}
optional Journey journey = 2;
// Which user the journey is originating from - could be -1 for certain phases (eg USER_CREATE)
@@ -15039,8 +13662,6 @@
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
- STOP_USER = 7; // Indicates that this is a user stop event
- REMOVE_USER = 8; // Indicates that this is a user removal event
}
optional Event event = 3;
@@ -15053,36 +13674,6 @@
}
/**
- * The UserInfo information about an Android user (as used in UserManager multiuser).
- *
- * This will be pulled from
- * frameworks/base/services/core/java/com/android/server/pm/UserManagerService.java
- */
-message UserInfo {
- // The @UserIdInt userId of the user
- optional int32 user_id = 1;
-
- // The type of user, if AOSP-defined, such as {@link UserManager#USER_TYPE_PROFILE_MANAGED}
- optional UserLifecycleJourneyReported.UserType user_type = 2;
-
- // The type of user if not AOSP-defined. Will be empty if user_type is not TYPE_UNKNOWN.
- optional string user_type_custom = 3;
-
- // The @UserInfoFlag UserInfo flags of user.
- optional int32 user_flags = 4;
-
- // Wall-clock time in milliseconds when user was created, according to System.currentTimeMillis
- optional int64 creation_time_millis = 5;
-
- // Wall-clock time in milliseconds when user last entered the state of STATE_RUNNING_UNLOCKED,
- // according to System.currentTimeMillis
- optional int64 last_logged_in_time_millis = 6;
-
- // True if user is currently running and unlocked
- optional bool is_user_running_unlocked = 7;
-}
-
-/**
* Logs when accessibility shortcut clicked.
*
* Logged from:
@@ -15118,69 +13709,6 @@
}
/**
- * Logs when accessibility floating menu changed its position by user.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu
- */
-message AccessibilityFloatingMenuUIChanged {
- // Normalized screen position of the accessibility floating menu. The range is between 0 and 1.
- optional float normalized_x_position = 1;
- optional float normalized_y_position = 2;
-
- enum Orientation {
- UNKNOWN = 0;
- PORTRAIT = 1;
- LANDSCAPE = 2;
- }
- // Orientation of the device when accessibility floating menu changed.
- optional Orientation orientation = 3;
-}
-
-/**
- * Pulls accessibility shortcuts status.
- *
- * Pulled from:
- * StatsPullAtomService
- */
-message AccessibilityShortcutStats {
- // The definition of the accessibility software shortcut.
- // From frameworks/proto_logging/stats/enums/stats/accessibility/accessibility_enums.proto.
- optional android.stats.accessibility.ShortcutType software_shortcut_type = 1;
- // Number of accessibility services in accessibility software shortcut.
- optional int32 software_shortcut_service_num = 2;
-
- // The definition of the accessibility hardware shortcut.
- // From frameworks/proto_logging/stats/enums/stats/accessibility/accessibility_enums.proto.
- optional android.stats.accessibility.ShortcutType hardware_shortcut_type = 3;
- // Number of accessibility services in accessibility hardware shortcut.
- optional int32 hardware_shortcut_service_num = 4;
-
- // The definition of the accessibility gesture shortcut.
- // From frameworks/proto_logging/stats/enums/stats/accessibility/accessibility_enums.proto.
- optional android.stats.accessibility.ShortcutType gesture_shortcut_type = 5;
- // Number of accessibility services in accessibility gesture shortcut.
- optional int32 gesture_shortcut_service_num = 6;
-}
-
-/**
- * Pulls accessibility floating menu status.
- *
- * Pulled from:
- * StatsPullAtomService
- */
-message AccessibilityFloatingMenuStats {
- // Size of the accessibility floating menu.
- optional int32 size = 1;
- // Icon shape of the accessibility floating menu.
- optional int32 icon_type = 2;
- // Whether the accessibility floating menu is enable auto fade ability.
- optional bool fade_enabled = 3;
- // Opacity of the accessibility floating menu. The range is between 0 and 1.
- optional float opacity = 4;
-}
-
-/**
* Logs when display wake up.
*
* Logged from:
@@ -15307,18 +13835,6 @@
RECORD_TYPE = 7; // other recording
}
optional AudioType type = 4;
-
- // Minimum volume duration of the audio in seconds
- optional int32 minimum_volume_duration_secs = 5;
-
- // Minimum volume (0 ... 1.0)
- optional float minimum_volume = 6;
-
- // Maximum volume duration of the audio in seconds
- optional int32 maximum_volume_duration_secs = 7;
-
- // Maximum volume (0 ... 1.0)
- optional float maximum_volume = 8;
}
/**
@@ -15380,27 +13896,6 @@
optional int32 applied_device_count_within_remote_group = 9;
}
-/*
- * Logs when the user interact with Media Output Switcher.
- *
- * Logged from:
- * packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java
- */
-message MediaOutputOpInteractionReported {
- /** * The type of interaction with the output switch dialog. */
- enum InteractionType {
- EXPANSION = 0;
- ADJUST_VOLUME = 1;
- STOP_CASTING = 2;
- }
-
- // Type of interaction.
- optional InteractionType interaction_type = 1;
-
- // Type of device that interaction with.
- optional android.app.settings.mediaoutput.MediumType target = 2;
-}
-
/**
* Logs when the Assistant is invoked.
*
@@ -15685,115 +14180,6 @@
}
/**
- * Logs the status of an AudioRecord operation.
- *
- * Logged from:
- * frameworks/av/services/mediametrics/AudioAnalytics.cpp
- */
-message MediametricsAudioRecordStatusReported {
- // General status code for categorization of status.
- optional android.media.Status status = 1;
-
- // Status or error message, e.g. logcat.
- optional string debug_message = 2;
-
- // Supplemental status subcode for AudioRecord.
- optional int32 status_subcode = 3;
-
- // Uid associated with the AudioRecord.
- optional int32 uid = 4 [(is_uid) = true];
-
- // The AudioRecord event.
- optional android.media.audio.AudioRecordEvent event = 5;
-
- // Requested AudioRecord flags, with each flag bitwise ORed.
- // One or more bits from system/media/audio/include/system/audio-hal-enums.h
- // audio_input_flags_t
- optional int32 input_flags = 6;
-
- // An enumeration from system/media/audio/include/system/audio-hal-enums.h
- // audio_source_t, representing the input source for the AudioRecord.
- optional android.media.audio.Source source = 7;
-
- // An enumeration from system/media/audio/include/system/audio-hal-enums.h
- // audio_format_t, representing the encoding of the AudioRecord data.
- optional android.media.audio.Encoding encoding = 8;
-
- // Channel mask, with each channel position bitwise ORed.
- // One or more bits from system/media/audio/include/system/audio-hal-enums.h
- // audio_channel_mask_t, representing the input channel configuration
- // of AudioRecord data.
- optional int64 channel_mask = 9;
-
- // The size of the AudioRecord buffer in frames.
- // If an error occurs during creation, this may be a small integer requested size
- // as AudioFlinger is entitled to increase this as required.
- optional int32 buffer_frame_count = 10;
-
- // Sample rate in Hz.
- optional int32 sample_rate = 11;
-}
-
-/**
- * Logs the status of an AudioTrack operation.
- *
- * Logged from:
- * frameworks/av/services/mediametrics/AudioAnalytics.cpp
- */
-message MediametricsAudioTrackStatusReported {
- // General status code for categorization of status.
- optional android.media.Status status = 1;
-
- // Status or error message, e.g. logcat.
- optional string debug_message = 2;
-
- // Supplemental status subcode for AudioTrack.
- optional int32 status_subcode = 3;
-
- // Uid associated with track
- optional int32 uid = 4 [(is_uid) = true];
-
- // The AudioTrack event.
- optional android.media.audio.AudioTrackEvent event = 5;
-
- // Requested AudioTrack flags, with each flag bitwise ORed.
- // One or more bits from system/media/audio/include/system/audio-hal-enums.h
- // audio_output_flags_t
- optional int32 output_flags = 6;
-
- // An enumeration from system/media/audio/include/system/audio-hal-enums.h
- // audio_content_type_t, representing the content type of the AudioTrack.
- optional android.media.audio.ContentType content_type = 7;
-
- // An enumeration from system/media/audio/include/system/audio-hal-enums.h
- // audio_usage_t, representing the use case for the AudioTrack.
- optional android.media.audio.Usage usage = 8;
-
- // An enumeration from system/media/audio/include/system/audio-hal-enums.h
- // audio_format_t, representing the encoding of the AudioTrack data.
- optional android.media.audio.Encoding encoding = 9;
-
- // Channel mask, with each channel position bitwise ORed.
- // One or more bits from system/media/audio/include/system/audio-hal-enums.h
- // audio_channel_mask_t, representing the channel configuration of AudioTrack data.
- optional int64 channel_mask = 10;
-
- // The size of the AudioTrack buffer in frames.
- // If an error occurs during creation, this may be a small integer requested size
- // as AudioFlinger is entitled to increase this as required.
- optional int32 buffer_frame_count = 11;
-
- // Sample rate in Hz.
- optional int32 sample_rate = 12;
-
- // Playback speed, nominal 1.f representing 1x.
- optional float speed = 13;
-
- // Playback pitch, nominal 1.f representing 1x.
- optional float pitch = 14;
-}
-
-/**
* Logs: i) creation of different types of cryptographic keys in the keystore,
* ii) operations performed using the keys,
* iii) attestation of the keys
@@ -15920,7 +14306,6 @@
P_256 = 2;
P_384 = 3;
P_521 = 4;
- CURVE_25519 = 5;
};
// Which ec curve was selected if elliptic curve cryptography is in use
optional EcCurve ec_curve = 3;
@@ -16190,14 +14575,8 @@
// Count of a particular error occurred.
optional int32 count = 2;
-
- /**
- * Security level of the IRemotelyProvisionedComponent.
- */
- optional android.system.security.keystore2.SecurityLevelEnum security_level = 3;
}
-
/**
* Logs: Status of the attestation key pool related to
* Remote Key Provisioning (RKP).
@@ -16621,190 +15000,105 @@
}
/**
- * Logs telemetry for Android Virtualization framework
- *
- * On CreateVM requests, an atom is pushed that records what hypervisor is being used.
- * the protected status of the new VM, and if the VM creation succeeded
- * Logged from: packages/modules/Virtualization/
- */
-message VmCreationRequested {
- enum Hypervisor {
- UNKNOWN = 0;
- PKVM = 1;
- OTHER = 2;
- }
- optional Hypervisor hypervisor = 1;
- // Is the VM started in protected mode?
- optional bool is_protected = 2;
- // Did the VM creation succeed
- optional bool creation_succeeded = 3;
- // Binder exception Code thrown by createVm request
- optional int32 binder_exception_code = 4;
-}
-
-/**
- * Logs telemetry for Early boot CompOsArtifacts checks (done by odsign)
- *
- * odsign is a binary that runs during early boot. One of its responsibility is
- * to check if the device can use compOS and check if so, validate the compos
- * generated artifacts. An atom is pushed on each such check. Note: We only
- * push an atom from devices/configurations that can use compOs.
- */
-message EarlyBootCompOsArtifactsCheckReported {
- // Are the current Artifacts okay (This check is done by odrefresh).
- // (current_artifacts_ok == true) => compilationRequired is false
- optional bool current_artifacts_ok = 1;
- // Has CompOs generated any Artifacts
- optional bool comp_os_pending_artifacts_exists = 2;
- // The device will be using CompOs generated artifacts. Note: the value of
- // this is meaningless if current_artifacts_ok = true
- optional bool use_comp_os_generated_artifacts = 3;
-}
-
-/**
- * Logs telemetry when Isolation compilation job is scheduled.
- *
- * The atoms are sent by IsolatedCompilationService (fragment of system_server)
- * when apex are staged and need compilation.
- */
-message IsolatedCompilationScheduled {
- enum Result {
- SCHEDULING_RESULT_UNKNOWN = 0;
- SCHEDULING_FAILURE = 1;
- SCHEDULING_SUCCESS = 2;
- }
- optional Result scheduling_result = 1;
-}
-
-/**
- * Logs telemetry Isolation compilation completion.
- *
- * The atoms is sent by IsolatedCompilationService by compilation ends
- * and contain results/timings of compilation
- */
-message IsolatedCompilationEnded {
- enum Result {
- RESULT_UNKNOWN = 0;
- RESULT_SUCCESS = 1;
- RESULT_UNKNOWN_FAILURE = 2;
- RESULT_FAILED_TO_START = 3;
- RESULT_JOB_CANCELED = 4;
- RESULT_COMPILATION_FAILED = 5;
- RESULT_UNEXPECTED_COMPILATION_RESULT = 6;
- RESULT_COMPOSD_DIED = 7;
- }
- // Time between compilation job starts to when it ends.
- // Note: this does not include the time between compilation job being scheduled (or when apex is staged)
- // and it actually starting
- optional int64 compilation_time_millis = 1;
- // Result of compilation
- optional Result compilation_result = 2;
-}
-
-/**
- * Logs the current state of an application/process before it is killed.
- *
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
+ * Logs the current state of an application before it is killed.
*
* Pushed from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
+ * packages/services/Car/cpp/watchdog/server/src/StatsReporter.cpp
*/
-message CarWatchdogKillStatsReported {
+message KilledAppStatsReported {
// Linux process uid for the package.
optional int32 uid = 1 [(is_uid) = true];
- // State of the uid when it was killed.
- enum UidState {
- UNKNOWN_UID_STATE = 0;
- BACKGROUND_MODE = 1;
- FOREGROUND_MODE = 2;
+ // Name of the package that was killed.
+ optional string package_name = 2;
+
+ // State of the application when it was killed.
+ enum AppState {
+ UNKNOWN_APP_STATE = 0;
+ BACKGROUND = 1;
+ FOREGROUND = 2;
}
- optional UidState uid_state = 2;
+ optional AppState app_state = 3;
// System state indicating whether the system was in normal mode or garage mode.
enum SystemState {
UNKNOWN_SYSTEM_STATE = 0;
USER_INTERACTION_MODE = 1;
- USER_NO_INTERACTION_MODE = 2;
- GARAGE_MODE = 3;
+ NO_USER_INTERACTION_MODE = 2;
}
- optional SystemState system_state = 3;
+ optional SystemState system_state = 4;
// Reason for killing the application.
- // Keep in sync with proto file at packages/services/Car/cpp/watchdog/proto
+ // Keep in sync between:
+ // packages/services/Car/watchdog/server/src/ApplicationTerminator.h
+ // frameworks/base/cmds/statsd/src/atoms.proto
enum KillReason {
UNKNOWN_KILL_REASON = 0;
KILLED_ON_ANR = 1;
KILLED_ON_IO_OVERUSE = 2;
KILLED_ON_MEMORY_OVERUSE = 3;
}
- optional KillReason kill_reason = 4;
+ optional KillReason kill_reason = 5;
// Stats of the processes owned by the application when the application was killed.
// The process stack traces are not collected when the application was killed due to IO_OVERUSE.
- optional CarWatchdogProcessStats process_stats = 5 [(log_mode) = MODE_BYTES];
+ optional ProcessStats process_stat = 6 [(log_mode) = MODE_BYTES];
// The application's I/O overuse stats logged only when the kill reason is KILLED_ON_IO_OVERUSE.
- optional CarWatchdogIoOveruseStats io_overuse_stats = 6 [(log_mode) = MODE_BYTES];
+ optional IoOveruseStats io_overuse_stats = 7 [(log_mode) = MODE_BYTES];
}
/**
* Logs the I/O overuse stats for an application on detecting I/O overuse.
*
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
- *
* Pushed from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
+ * packages/services/Car/cpp/watchdog/server/src/StatsReporter.cpp
*/
-message CarWatchdogIoOveruseStatsReported {
+message IoOveruseStatsReported {
// Linux process uid for the package.
optional int32 uid = 1 [(is_uid) = true];
// The application's I/O overuse stats.
- optional CarWatchdogIoOveruseStats io_overuse_stats = 2 [(log_mode) = MODE_BYTES];
+ optional IoOveruseStats io_overuse_stats = 2 [(log_mode) = MODE_BYTES];
}
/**
* Logs I/O overuse stats for a package.
*
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
+ * Keep in sync between:
+ * packages/services/Car/cpp/watchdog/server/src/proto/statsd.proto
+ * frameworks/base/cmds/statsd/src/atoms.proto
*
* Logged from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
+ * packages/services/Car/cpp/watchdog/server/src/StatsReporter.cpp
*/
-message CarWatchdogIoOveruseStats {
+message IoOveruseStats {
enum Period {
- UNKNOWN_PERIOD = 0;
- DAILY = 1;
- WEEKLY = 2;
+ DAILY = 0;
+ WEEKLY = 1;
}
// Threshold and usage stats period.
optional Period period = 1;
// Threshold in-terms of write bytes defined for the package.
- optional CarWatchdogPerStateBytes threshold = 2;
+ optional PerStateBytes threshold = 2;
// Number of write bytes in each state for the specified period.
- optional CarWatchdogPerStateBytes written_bytes = 3;
-
- // Application or service uptime during the aforementioned period.
- optional uint64 uptime_millis = 4;
+ optional PerStateBytes written_bytes = 3;
};
/**
* Logs bytes attributed to each application and system states.
*
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
+ * Keep in sync between:
+ * packages/services/Car/watchdog/server/src/proto/statsd.proto
+ * frameworks/base/cmds/statsd/src/atoms.proto
*
* Logged from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
+ * packages/services/Car/cpp/watchdog/server/src/StatsReporter.cpp
*/
-message CarWatchdogPerStateBytes {
+message PerStateBytes {
// Number of bytes attributed to the application foreground.
optional int64 foreground_bytes = 1;
@@ -16816,34 +15110,36 @@
}
/**
- * Logs each CarWatchdogProcessStat in CarWatchdogProcessStats.
+ * Logs each ProcessStat in ProcessStats.
*
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
+ * Keep in sync between:
+ * packages/services/Car/watchdog/server/src/proto/statsd.proto
+ * frameworks/base/cmds/statsd/src/atoms.proto
*
* Logged from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
+ * packages/services/Car/cpp/watchdog/server/src/StatsReporter.cpp
*/
-message CarWatchdogProcessStats {
+message ProcessStats {
// Records the stats of the processes owned by an application.
- repeated CarWatchdogProcessStat process_stat = 1;
+ repeated ProcessStat process_stat = 1;
}
/**
* Logs a process's stats.
*
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
+ * Keep in sync between:
+ * packages/services/Car/watchdog/server/src/proto/statsd.proto
+ * frameworks/base/cmds/statsd/src/atoms.proto
*
* Logged from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
+ * packages/services/Car/cpp/watchdog/server/src/StatsReporter.cpp
*/
-message CarWatchdogProcessStat {
+message ProcessStat {
// Command name of the process.
optional string process_name = 1;
// Process uptime.
- optional uint64 uptime_millis = 2;
+ optional uint64 uptime_milliseconds = 2;
// Number of major page faults caused by the process and its children.
optional uint64 major_page_faults = 3;
@@ -16861,107 +15157,6 @@
optional uint64 vm_rss_kb = 7;
}
-/**
- * Logs total I/O usage summary for all applications and services running in the system.
- *
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
- *
- * Pulled from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
- */
-message CarWatchdogSystemIoUsageSummary {
- // I/O usage summary for the system.
- optional CarWatchdogIoUsageSummary io_usage_summary = 1 [(log_mode) = MODE_BYTES];
-
- // Start time of the event in milliseconds since epoch.
- // Note: This field must be a top-level field as it is used to slice the metrics.
- optional int64 start_time_millis = 2;
-}
-
-/**
- * Logs I/O usage summary for an UID.
- *
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
- *
- * Pulled from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
- */
-message CarWatchdogUidIoUsageSummary {
- // UID of the application/service whose usage summary are recorded.
- optional int32 uid = 1 [(is_uid) = true];
-
- // I/O usage summary for the UID.
- optional CarWatchdogIoUsageSummary io_usage_summary = 2 [(log_mode) = MODE_BYTES];
-
- // Start time of the event in milliseconds since epoch.
- // Note: This field must be a top-level field as it is used to slice the metrics.
- optional int64 start_time_millis = 3;
-}
-
-/**
- * Logs I/O usage summary for a time period.
- *
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
- *
- * Pulled from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
- */
-message CarWatchdogIoUsageSummary {
- // Summary event time period.
- optional CarWatchdogEventTimePeriod event_time_period = 1;
-
- // Daily I/O usage summary for the period. Logs summary entries only for days with I/O usage.
- // The entries are ordered beginning from the event_time_period.start_time_millis.
- repeated CarWatchdogDailyIoUsageSummary daily_io_usage_summary = 2;
-}
-
-/**
- * Logs a car watchdog event's time period.
- *
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
- *
- * Pulled from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
- */
-message CarWatchdogEventTimePeriod {
- enum Period {
- UNKNOWN_PERIOD = 0;
- WEEKLY = 1;
- BIWEEKLY = 2;
- MONTHLY = 3;
- }
-
- // Deprecated field - Start time of the event in milliseconds since epoch.
- optional uint64 start_time_millis = 1 [deprecated = true];
-
- // Period for the event.
- optional Period period = 2;
-}
-
-/**
- * Logs daily I/O usage summary.
- *
- * Keep in sync with proto file at
- * packages/services/Car/service/src/com/android/car/watchdog/proto/atoms.proto
- *
- * Pulled from:
- * packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java
- */
-message CarWatchdogDailyIoUsageSummary {
- // Total bytes written to disk during a day.
- optional CarWatchdogPerStateBytes written_bytes = 1;
-
- // Total uptime for the system or service or application during a day.
- optional uint64 uptime_millis = 2;
-
- // Total disk I/O overuses during a day.
- optional int32 overuse_count = 3;
-}
-
/*
* pushes Media playback information.
* Logged from
@@ -17015,9 +15210,8 @@
optional string log_session_id = 1;
// New network type
optional android.stats.mediametrics.NetworkType type = 2;
- // When the network info change occurred relative to playback creation
- // time in milliseconds.
- // It is in absolute time (e.g. always ticks even if the playback is paused).
+ // Network Start time, relative to playback creation time in millisecond.
+ // It's in absolute time (e.g. always ticks even if the playback is paused).
optional int64 time_since_playback_created_millis = 3;
}
@@ -17027,9 +15221,8 @@
optional string log_session_id = 1;
// New playback state
optional android.stats.mediametrics.PlaybackState playback_state = 2;
- // When the state change occurred relative to playback creation time in
- // milliseconds.
- // It is in absolute time (e.g. always ticks even if the playback is paused).
+ // State change time, relative to playback creation time in millisecond.
+ // It's in absolute time (e.g. always ticks even if the playback is paused).
optional int64 time_since_playback_created_millis = 3;
}
@@ -17043,8 +15236,8 @@
optional android.stats.mediametrics.PlaybackErrorCode error_code = 3;
// Sub-code of error type specified by the error code.
optional int32 sub_error_code = 4;
- // When the error occurred relative to playback creation time in millisecond.
- // It is in absolute time (e.g. always ticks even if the playback is paused).
+ // Error time, relative to playback creation time in millisecond.
+ // It's in absolute time (e.g. always ticks even if the playback is paused).
optional int64 time_since_playback_created_millis = 5;
}
@@ -17066,10 +15259,9 @@
// Bits per second. 0 means unknown.
optional int32 bitrate = 7;
- // When the track change occurred, relative to playback creation time in
- // millisecond.
- // It is in absolute time (e.g. always ticks even if the playback is paused).
- optional int64 time_since_playback_created_millis = 8;
+ // Track change time, relative to playback creation time in millisecond.
+ // It's in absolute time (e.g. always ticks even if the playback is paused).
+ optional int64 time_since_playback_created_millis = 8;
// Track type. Audio, Video, Text
optional android.stats.mediametrics.TrackType type = 9;
@@ -17273,7 +15465,6 @@
// Indicates which compile filter was used for the package being loaded in an ART session.
enum ArtCompileFilter {
- ART_COMPILATION_FILTER_UNSPECIFIED = 0;
ART_COMPILATION_FILTER_ERROR = 1;
ART_COMPILATION_FILTER_UNKNOWN = 2;
ART_COMPILATION_FILTER_ASSUMED_VERIFIED = 3;
@@ -17292,7 +15483,6 @@
}
enum ArtCompilationReason {
- ART_COMPILATION_REASON_UNSPECIFIED = 0;
ART_COMPILATION_REASON_ERROR = 1;
ART_COMPILATION_REASON_UNKNOWN = 2;
ART_COMPILATION_REASON_FIRST_BOOT = 3;
@@ -17312,7 +15502,6 @@
ART_COMPILATION_REASON_BOOT_AFTER_OTA = 17;
ART_COMPILATION_REASON_PREBUILT = 18;
ART_COMPILATION_REASON_CMDLINE = 19;
- ART_COMPILATION_REASON_VDEX = 20;
}
// Indicates which kind of measurement ART is reporting.
@@ -17357,7 +15546,6 @@
// Indicates what class of thread the reported values apply to.
enum ArtThreadType {
- ART_THREAD_UNKNOWN = 0;
ART_THREAD_MAIN = 1;
ART_THREAD_BACKGROUND = 2;
}
@@ -17457,7 +15645,6 @@
SYSTEM_SERVER = 1;
TELEPHONY = 2;
BLUETOOTH = 3;
- WIFI = 4;
}
enum ServiceClassName {
UNKNOWN_CLASS = 0;
@@ -17804,29 +15991,6 @@
optional android.stats.accessibility.MagnificationMode activated_mode = 1;
}
-/**
- * Logs the duration for the magnification session which is activated by the triple tap and
- * hold gesture.
- *
- * Logged from:
- * frameworks/base/services/accessibility/java/com/android/server/accessibility
- */
-message MagnificationTripleTapAndHoldActivatedSessionReported {
- // The duration of the triple tap and hold activated session in milliseconds
- optional int64 duration_millis = 1;
-}
-
-/**
- * Logs the duration for the following typing focus activated session.
- *
- * Logged from:
- * frameworks/base/services/accessibility/java/com/android/server/accessibility
- */
-message MagnificationFollowTypingFocusActivatedSessionReported {
- // The duration of the following typing focus activated session in milliseconds
- optional int64 duration_millis = 1;
-}
-
/*
* Reports a device controls user interaction
*
@@ -17846,37 +16010,6 @@
optional bool is_locked = 5;
}
-/*
- * Logged when hardware based user-configurable device state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/devicestate/DeviceStateManagerService.java
- */
-message DeviceStateChanged {
- optional int32 new_device_state = 1
- [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
- optional bool boot_state = 2;
-}
-
-/*
- * Logged when device folded state changes.
- *
- * Logged from:
- * frameworks/base/packages/SystemUI/src/com/android/systemui/unfold/FoldStateLogger.kt
- */
-message FoldStateDurationReported {
- enum State {
- UNKNOWN = 0;
- OPEN = 1;
- CLOSED = 2;
- HALF_OPEN = 3;
- }
-
- optional State start_state = 1;
- optional State end_state = 2;
- optional int64 duration_millis = 3;
-}
-
/**
* This metric is collected at the end of playback
* as a pulled atom.
@@ -18008,7 +16141,28 @@
}
/*
- * A canonical form time zone suggestion for metrics use.
+ * Logged when hardware based user-configurable device state changes.
+ *
+ * Logged from:
+ * frameworks/base/services/core/java/com/android/server/devicestate/DeviceStateManagerService.java
+ */
+message DeviceStateChanged {
+ optional int32 new_device_state = 1
+ [(state_field_option).exclusive_state = true, (state_field_option).nested = false];
+ optional bool boot_state = 2;
+}
+
+/*
+ * An obfuscated, canonical form time zone suggestion for metrics use.
+ *
+ * The suggestion's time zone IDs (which relate to location) are obfuscated by
+ * mapping them to an ordinal. When the ordinal is assigned consistently across
+ * several objects (i.e. so the same time zone ID is always mapped to the same
+ * ordinal), this allows comparisons between those objects. For example, we can
+ * answer "did these two suggestions agree?", "does the suggestion match the
+ * device's current time zone?", without leaking knowledge of location. Ordinals
+ * are also significantly more compact than full IANA TZDB IDs, albeit highly
+ * unstable and of limited use.
*/
message MetricsTimeZoneSuggestion {
enum Type {
@@ -18021,26 +16175,7 @@
// The ordinals for time zone(s) in the suggestion. Always empty for
// UNCERTAIN, and can be empty for CERTAIN, for example when the device is in
// a disputed area / on an ocean.
- //
- // The suggestion's time zone IDs (which relate to location) are obfuscated by
- // mapping them to an ordinal. When the ordinal is assigned consistently across
- // several objects (i.e. so the same time zone ID is always mapped to the same
- // ordinal), this allows comparisons between those objects. For example, we can
- // answer "did these two suggestions agree?", "does the suggestion match the
- // device's current time zone?", without leaking knowledge of location. Ordinals
- // are also significantly more compact than full IANA TZDB IDs, albeit unstable
- // and of limited use.
repeated int32 time_zone_ordinals = 2;
-
- // The actual time zone ID(s) in the suggestion. Similar to time_zone_ordinals
- // but contains the actual string IDs.
- //
- // This information is only captured / reported for some devices based on the
- // value of a server side flag, i.e. it could be enabled for internal testers.
- // Therefore the list can be empty even when time_zone_ordinals is populated.
- //
- // When enabled, see time_zone_ordinals for the expected number of values.
- repeated string time_zone_ids = 3;
}
/*
@@ -18091,33 +16226,17 @@
// The latest geo-derived suggestion (non-persistent).
optional MetricsTimeZoneSuggestion latest_geo_suggestion = 10
[(log_mode) = MODE_BYTES];
-
- // True if fallback to telephony time zone detection is supported on the device.
- optional bool telephony_time_zone_fallback_supported = 11;
-
- // The device's current time zone ID (see MetricsTimeZoneSuggestion).
- optional string device_time_zone_id = 12;
-
- // True if enhanced metrics collection is enabled.
- optional bool enhanced_metrics_collection_enabled = 13;
-
- // True if the device may run geolocation time zone detection in the
- // background. This is the raw server flag value, not the value after
- // considering other state like the user's "use location" setting that also
- // affects runtime behavior. See LocationTimeZoneProviderController for
- // details.
- optional bool geo_detection_run_in_background_enabled = 14;
}
/*
* Logs information about an individual location time zone provider's state.
*
* Logged from:
- * frameworks/base/services/core/java/com/android/server/timezonedetector/location/RealProviderMetricsLogger.java
+ * frameworks/base/services/core/java/com/android/server/location/timezone/ControllerImpl.java
*/
message LocationTimeZoneProviderStateChanged {
// The index of the provider (primary = 0, secondary = 1)
- optional int32 provider_index = 1 [(state_field_option).primary_field = true];
+ optional int32 provider_index = 1;
enum State {
// A placeholder for unknown values.
@@ -18143,45 +16262,7 @@
}
// The state of the provider.
- optional State state = 2 [(state_field_option).exclusive_state = true];
-}
-
-/*
- * Logs information about the location time zone provider controller's state.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/timezonedetector/location/RealControllerMetricsLogger.java
- */
-message LocationTimeZoneProviderControllerStateChanged {
-
- enum State {
- // A placeholder for unknown values.
- UNKNOWN = 0;
-
- // The providers are initializing.
- PROVIDERS_INITIALIZING = 1;
-
- // The controller is / has been stopped.
- STOPPED = 2;
-
- // The controller is started and is initializing.
- INITIALIZING = 3;
-
- // The controller is started and is certain of the time zone.
- CERTAIN = 4;
-
- // The controller is started and is uncertain of the time zone.
- UNCERTAIN = 5;
-
- // The controller has been destroyed.
- DESTROYED = 6;
-
- // The controller has failed.
- FAILED = 7;
- }
-
- // The state of the provider.
- optional State state = 1;
+ optional State state = 2;
}
/*
@@ -18234,7 +16315,6 @@
PERMISSION = 1;
ALLOW_LIST = 2;
CHANGE_DISABLED = 3;
- POLICY_PERMISSION = 4;
}
optional ReasonCode exact_alarm_allowed_reason = 7;
optional bool is_rtc = 8;
@@ -18428,9 +16508,6 @@
// The last known RSS (in kB) of the process before it dies, could be 0.
optional int32 rss = 7;
-
- // Whether or not this process is hosting one or more foregound services.
- optional bool has_foreground_services = 8;
}
/**
@@ -18578,6 +16655,7 @@
SENSOR_UNKNOWN = 0;
MICROPHONE = 1;
CAMERA = 2;
+
}
// Sensor for which sensor privacy was toggled.
@@ -18620,2547 +16698,3 @@
// Name of the package for which the dialog was shown.
optional string package_name = 2;
}
-
-message VendorApexInfo {
- optional string package_name = 1;
- optional string version_code = 2;
- optional string version_name = 3;
- optional string source_dir = 4;
- optional string signing_certs_hash = 5;
- optional string file_hash = 6;
-}
-
-/**
- * Logs the non-a11yTool service warning status and its duration of the usage.
- *
- * Logged from:
- * frameworks/base/services/accessibility/java/com/android/server/accessibility
- * packages/apps/Settings
- */
-message NonA11yToolServiceWarningReported {
- // Package name of the non-a11yTool service.
- optional string package_name = 1;
-
- // Warning status of the non-a11yTool service.
- optional android.stats.accessibility.WarningStatus status = 2;
-
- // Duration between status in milliseconds.
- optional int64 duration_millis = 3;
-}
-
-message MediaCapabilities {
- message AudioEncodings {
- repeated android.stats.mediametrics.AudioEncoding audio_encodings = 1;
- }
-
- message HdrFormats {
- repeated android.stats.mediametrics.HdrFormat hdr_formats = 1;
- }
-
-
- message DisplayMode {
- optional int32 height = 1;
- optional int32 width = 2;
- optional float refresh_rate = 3;
- optional int32 seamless_refresh_rates_group_id = 4;
- }
-
- message DisplayModes {
- repeated DisplayMode display_modes = 1;
- }
-
- // Surround sound capabilities
-
- // List of surround sound encodings supported by this device
- optional AudioEncodings surround_encodings = 1 [(log_mode) = MODE_BYTES];
- // List of surround sound encodings supported by the sink device
- optional AudioEncodings sink_surround_encodings = 2 [(log_mode) = MODE_BYTES];
- // List of supported surround sound encodings disabled by user
- optional AudioEncodings user_disabled_surround_encodings = 3 [(log_mode) = MODE_BYTES];
- // List of unsupported surround sound encodings enabled by user
- optional AudioEncodings user_enabled_surround_encodings = 4 [(log_mode) = MODE_BYTES];
- // The surround sound output mode chosen by user
- optional android.stats.mediametrics.EncodedSurroundOutputMode surround_output_mode = 5;
-
-
- // Display capabilities
-
- // List of HDR display formats supported by the sink device
- optional HdrFormats sink_hdr_formats = 6 [(log_mode) = MODE_BYTES];
- // List of modes supported by the sink device. Each mode has height, width, refresh rate and a list
- // of refresh-rates between which a seamless switch is possible.
- optional DisplayModes sink_display_modes = 7 [(log_mode) = MODE_BYTES];
- // The HDCP level with which the display is connected
- optional int32 hdcp_level = 8;
-
- // Display settings
-
- // The Match content refresh rate user preference
- optional android.stats.mediametrics.MatchContentFrameRatePreference
- match_content_refresh_rate_preference = 9;
- // List of HDR formats disabled by the user
- optional HdrFormats user_disabled_hdr_formats = 10 [(log_mode) = MODE_BYTES];
- // The resolution height selected by the user
- optional int32 user_preferred_resolution_height = 11;
- // The resolution width selected by the user
- optional int32 user_preferred_resolution_width = 12;
- // The refresh rate selected by the user
- optional float user_preferred_refresh_rate = 13;
- // Whether the user has disabled auto low latency mode
- optional bool has_user_disabled_allm = 14;
-}
-
-/**
- * Logs when NNAPI model is compiled successfully
- * Logged from
- * modules/NeuralNetworks/runtime/TelemetryStatsd.cpp
- */
-message NeuralNetworksCompilationCompleted {
- // Linux process uid for the package.
- optional int32 uid = 1 [(is_uid) = true];
-
- // id which identifies single session of client interacting with NNAPI runtime
- optional int32 session_id = 2;
-
- // NNAPI mainline module version.
- optional int64 version_nnapi_module = 3;
-
- // An identifier that can be used to match events for ML model architecture.
- // Hash is generated from model operations and operands definition, but not weights.
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- optional bytes model_arch_hash = 4 [(log_mode) = MODE_BYTES];
-
- // Device driver identifier used by this compilation.
- // NeuralNetworks models are compiled/prepared for one or more device drivers (e.g., DSP, GPU,
- // TPU, CPU). The device driver identifier is a concatenation of [device driver name, =, and
- // device driver version]. If multiple device drivers are used, all device driver identifiers
- // are sorted and concatenated with comma as a separator.
- optional string device_id = 5;
-
- // Type of tensors used for inputs
- optional android.neuralnetworks.DataClass input_data_class = 6;
-
- // Type of tensors used for outputs
- optional android.neuralnetworks.DataClass output_data_class = 7;
-
- // Did the compilation had to fallback to cpu due to an error?
- optional bool fallback_to_cpu_from_error = 8;
-
- // Did client name target devices explicitly?
- optional bool introspection_enabled = 9;
-
- // Was cache enabled?
- optional bool cache_enabled = 10;
-
- // Was control flow used in the model?
- optional bool has_control_flow = 11;
-
- // Whether there exists a partition boundary in the compilation that has dynamic size
- optional bool has_dynamic_temporaries = 12;
-
- // Time taken to compile a model
- optional int64 compilation_time_sum_millis = 13;
- optional int64 compilation_time_min_millis = 14;
- optional int64 compilation_time_max_millis = 15;
- optional int64 compilation_time_sum_squared_millis = 16;
- optional int32 compilation_time_count = 17;
-
- // How many times this atom occurred locally before being pushed.
- optional int32 count = 18;
-
- // model_arch_hash compressed to 64 bits by bitwise-xor each 64 chunk of model_arch_hash.
- optional int64 model_arch_hash_64 = 19;
-}
-
-/**
- * Logs when NNAPI model fails compilation
- * Logged from
- * modules/NeuralNetworks/runtime/TelemetryStatsd.cpp
- */
-message NeuralNetworksCompilationFailed {
- // Linux process uid for the package.
- optional int32 uid = 1 [(is_uid) = true];
-
- // id which identifies single session of client interacting with NNAPI runtime
- optional int32 session_id = 2;
-
- // NNAPI mainline module version.
- optional int64 version_nnapi_module = 3;
-
- // An identifier that can be used to match events for ML model architecture.
- // Hash is generated from model operations and operands definition, but not weights.
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- optional bytes model_arch_hash = 4 [(log_mode) = MODE_BYTES];
-
- // Device driver identifier used by this compilation.
- // NeuralNetworks models are compiled/prepared for one or more device drivers (e.g., DSP, GPU,
- // TPU, CPU). The device driver identifier is a concatenation of [device driver name, =, and
- // device driver version]. If multiple device drivers are used, all device driver identifiers
- // are sorted and concatenated with comma as a separator.
- optional string device_id = 5;
-
- // Type of tensors used for inputs
- optional android.neuralnetworks.DataClass input_data_class = 6;
-
- // Type of tensors used for outputs
- optional android.neuralnetworks.DataClass output_data_class = 7;
-
- // Error code returned by compilation call
- optional android.neuralnetworks.ResultCode error_code = 8;
-
- // Did client name target devices explicitly?
- optional bool introspection_enabled = 9;
-
- // Was cache enabled?
- optional bool cache_enabled = 10;
-
- // Was control flow used in the model?
- optional bool has_control_flow = 11;
-
- // Whether there exists a partition boundary in the compilation that has dynamic size
- optional bool has_dynamic_temporaries = 12;
-
- // How many times this atom occurred locally before being pushed.
- optional int32 count = 13;
-
- // model_arch_hash compressed to 64 bits by bitwise-xor each 64 chunk of model_arch_hash.
- optional int64 model_arch_hash_64 = 14;
-}
-
-/**
- * Logs when NNAPI model is executed successfully
- *
- * Logged from
- * modules/NeuralNetworks/runtime/TelemetryStatsd.cpp
- */
-message NeuralNetworksExecutionCompleted {
- // Linux process uid for the package.
- optional int32 uid = 1 [(is_uid) = true];
-
- // id which identifies single session of client interacting with NNAPI runtime
- optional int32 session_id = 2;
-
- // NNAPI mainline module version.
- optional int64 version_nnapi_module = 3;
-
- // An identifier that can be used to match events for ML model architecture.
- // Hash is generated from model operations and operands definition, but not weights.
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- optional bytes model_arch_hash = 4 [(log_mode) = MODE_BYTES];
-
- // Device driver identifier used by this execution.
- // NeuralNetworks models are executed on one or more device drivers (e.g., DSP, GPU, TPU, CPU).
- // The device driver identifier is a concatenation of [device driver name, =, and device driver
- // version]. If multiple device drivers are used, all device driver identifiers are sorted and
- // concatenated with comma as a separator.
- optional string device_id = 5;
-
- // Execution mode
- optional android.neuralnetworks.Mode mode = 6;
-
- // Type of tensors used for inputs
- optional android.neuralnetworks.DataClass input_data_class = 7;
-
- // Type of tensors used for outputs
- optional android.neuralnetworks.DataClass output_data_class = 8;
-
- // Did client name target devices explicitly?
- optional bool introspection_enabled = 9;
-
- // Was cache enabled?
- optional bool cache_enabled = 10;
-
- // Was control flow used in the model?
- optional bool has_control_flow = 11;
-
- // Whether there exists a partition boundary in the compilation that has dynamic size
- optional bool has_dynamic_temporaries = 12;
-
- // Time taken to execute from runtime, including runtime/ipc overhead
- optional int64 duration_runtime_sum_micros = 13;
- optional int64 duration_runtime_min_micros = 14;
- optional int64 duration_runtime_max_micros = 15;
- optional int64 duration_runtime_sum_squared_micros = 16;
- optional int32 duration_runtime_count = 17;
-
- // Time taken to execute in the driver, excluding runtime/ipc overhead
- optional int64 duration_driver_sum_micros = 18;
- optional int64 duration_driver_min_micros = 19;
- optional int64 duration_driver_max_micros = 20;
- optional int64 duration_driver_sum_squared_micros = 21;
- optional int32 duration_driver_count = 22;
-
- // Time taken to execute on the hardware, excluding driver overhead
- optional int64 duration_hardware_sum_micros = 23;
- optional int64 duration_hardware_min_micros = 24;
- optional int64 duration_hardware_max_micros = 25;
- optional int64 duration_hardware_sum_squared_micros = 26;
- optional int32 duration_hardware_count = 27;
-
- // How many times this atom occurred locally before being pushed.
- optional int32 count = 28;
-
- // model_arch_hash compressed to 64 bits by bitwise-xor each 64 chunk of model_arch_hash.
- optional int64 model_arch_hash_64 = 29;
-}
-
-/**
- * Logs when NNAPI model fails execution
- * Logged from
- * modules/NeuralNetworks/runtime/TelemetryStatsd.cpp
- */
-message NeuralNetworksExecutionFailed {
- // Linux process uid for the package.
- optional int32 uid = 1 [(is_uid) = true];
-
- // id which identifies single session of client interacting with NNAPI runtime
- optional int32 session_id = 2;
-
- // NNAPI mainline module version.
- optional int64 version_nnapi_module = 3;
-
- // An identifier that can be used to match events for ML model architecture.
- // Hash is generated from model operations and operands definition, but not weights.
- // Hash algorithm: HMAC-SHA256
- // Size: 32 byte
- optional bytes model_arch_hash = 4 [(log_mode) = MODE_BYTES];
-
- // Device driver identifier used by this execution.
- // NeuralNetworks models are executed on one or more device drivers (e.g., DSP, GPU, TPU, CPU).
- // The device driver identifier is a concatenation of [device driver name, =, and device driver
- // version]. If multiple device drivers are used, all device driver identifiers are sorted and
- // concatenated with comma as a separator.
- optional string device_id = 5;
-
- // Execution mode
- optional android.neuralnetworks.Mode mode = 6;
-
- // Type of tensors used for inputs
- optional android.neuralnetworks.DataClass input_data_class = 7;
-
- // Type of tensors used for outputs
- optional android.neuralnetworks.DataClass output_data_class = 8;
-
- // Error code returned by execution call
- optional android.neuralnetworks.ResultCode error_code = 9;
-
- // Did client name target devices explicitly?
- optional bool introspection_enabled = 10;
-
- // Was cache enabled?
- optional bool cache_enabled = 11;
-
- // Was control flow used in the model?
- optional bool has_control_flow = 12;
-
- // Whether there exists a partition boundary in the compilation that has dynamic size
- optional bool has_dynamic_temporaries = 13;
-
- // How many times this atom occurred locally before being pushed.
- optional int32 count = 14;
-
- // model_arch_hash compressed to 64 bits by bitwise-xor each 64 chunk of model_arch_hash.
- optional int64 model_arch_hash_64 = 15;
-}
-
-/**
- * Logs boot-time info for a Context Hub.
- */
-message ContextHubBooted {
- // The amount of time it took the framework to connect to CHRE/Context Hub HAL
- // since the framework has booted.
- optional int64 boot_time_nanos = 1;
-
- // The number of Context Hub instances found on this system.
- optional int32 num_context_hubs = 2;
-}
-
-/**
- * Logs Context Hub restart events (e.g. crashes).
- */
-message ContextHubRestarted {
- // The duration of time between the last time Context Hub restart and this event.
- // This should use the SystemClock.elapsedRealTime() API.
- optional int64 elapsed_time_millis_since_boot = 1;
-
- // The ID of the Context Hub that has restarted (zero-indexed).
- optional int32 context_hub_id = 2;
-}
-
-/**
- * Logs a snapshot of all the nanoapps loaded on this Context Hub.
- */
-message ContextHubLoadedNanoappSnapshotReported {
- // The ID of the Context Hub the snapshot is for (zero-indexed).
- optional int32 context_hub_id = 1;
-
- // The nanoapp this snapshot is for. The nanoapp ID is the 64-bit unique identifier
- // for the application, and the version is the semantic versioning (https://semver.org)
- // used to determine the software version.
- optional int64 nanoapp_id = 2;
- optional int32 nanoapp_version = 3;
-}
-
-/**
- * Logs details of a dynamic CHRE nanoapp code download transaction.
- */
-message ChreCodeDownloadTransacted {
- enum Type {
- TYPE_UNKNOWN = 0;
- TYPE_LOAD = 1;
- TYPE_UNLOAD = 2;
- }
- // The ID/version of the nanoapp this code download was for.
- optional int64 nanoapp_id = 1;
- optional int32 nanoapp_version = 2;
-
- // The type of code download transaction.
- optional Type transaction_type = 3;
-
- // The result of this transaction.
- optional android.contexthub.ContextHubTransactionResult transaction_result = 4;
-}
-
-/**
- * Stats about each feature tag that was included in the registration.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message ImsRegistrationFeatureTagStats {
- // the carrier id associated with this SIP delegate
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // The slot id associated with this SIP delegate
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // The name of the feature tag
- // used as a dimension
- optional android.telephony.ImsFeatureTag feature_tag_name = 3;
-
- // The underlying radio technology type associated with the feature tag
- // used as a dimension
- // See the ImsRegistrationImplBase#REGISTRATION_TECH*
- optional int32 registration_tech = 4;
-
- // The time this feature tag was registered, rounded to 5 minutes
- optional int32 registered_seconds = 5;
-}
-
-/**
- * Stats about the messaging client interacting with telephony
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message RcsClientProvisioningStats {
- enum EventType {
- EVENT_TYPE_UNSPECIFIED = 0;
- // The client sent its client params to the ACS service.
- CLIENT_PARAMS_SENT = 1;
- // The client has manually triggered reconfiguration
- TRIGGER_RCS_RECONFIGURATION = 2;
- // Default messaging application changed.
- DMA_CHANGED = 3;
- }
- // Carrier ID of the SIM used for IMS registration.
- // See https://source.android.com/devices/tech/config/carrierid.
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // Index of the SIM used, 0 for single-SIM devices.
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // Used as a dimension
- optional EventType event = 3;
-
- // The number of times this event has occurred.
- optional int32 count = 4;
-}
-
-/**
- * Stats about the RCS provisioning via ACS
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message RcsAcsProvisioningStats {
- enum ResponseType {
- RESPONSE_TYPE_UNSPECIFIED = 0;
- // a provisioning request resulted in an error.
- ERROR = 1;
- // a provisioning request succeeded and provided an xml
- PROVISIONING_XML = 2;
- // a provisioning request has resulted in a "pre-provisioning" xml, which
- // means RCS is not provisioned and requires the user to intervene.
- PRE_PROVISIONING_XML = 3;
- }
-
- // Carrier ID of the SIM used for IMS registration.
- // See https://source.android.com/devices/tech/config/carrierid.
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // Index of the SIM used, 0 for single-SIM devices.
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // The response code of provisioning if the provisioning resulted in
- // ResponseType.ERROR
- // Used as a dimension
- optional int32 response_code = 3;
-
- // used as a dimension.
- optional ResponseType response_type = 4;
-
- // Does the provisioning XML have single registration provisioned.
- // Populated if response_type is ResponseType.PROVISIONING_XML
- // used as a dimension
- optional bool is_single_registration_enabled = 5;
-
- // The number of times this event has occurred.
- optional int32 count = 6;
-
- // The amount of time in seconds that the device was in this state in total, rounded 5 minutes
- optional int32 state_timer_sec = 7;
-}
-
-/**
- * Metrics surrounding the lifetime of a SIP delegate created by applications.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message SipDelegateStats {
- // The random number identifier with this SIP delegate
- optional int32 dimension = 1;
-
- // The carrier id associated with this SIP delegate
- optional int32 carrier_id = 2;
-
- // The slot id associated with this SIP delegate
- optional int32 slot_id = 3;
-
- // The total uptime of this delegate, rounded 5 minutes
- optional int32 uptime_seconds = 4;
-
- // The reason why this SIP delegate was destroyed.
- // See the SipDelegateManager#SIP_DELEGATE_DESTROY_REASON*
- optional int32 destroy_reason = 5;
-}
-
-/**
- * Tracks each feature tag associated with the SipDelegates that are currently active.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message SipTransportFeatureTagStats {
- // the carrier id associated with this SIP delegate
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // The slot id associated with this SIP delegate
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // The name of the feature tag
- // used as a dimension
- optional android.telephony.ImsFeatureTag feature_tag_name = 3;
-
- // The reason why this feature tag was denied on the SIP Transport
- // used as a dimension
- // Use SIP transport denied reason.
- // See the SipDelegateManager#DENIED_REASON*
- optional int32 sip_transport_denied_reason = 4;
-
- // The reason why this feature tag was associated with the SIP Transport but not
- // marked as deregistered.
- // used as a dimension
- // Use SIP transport deregistered reason.
- // See the DelegateRegistrationState#DEREGISTERING_REASON*
- optional int32 sip_transport_deregistered_reason = 5;
-
- // the time this feature tag was in this state, rounded 5 minutes
- optional int32 associated_seconds = 6;
-}
-
-/**
- * Tracks each SIP message and the response from either the app or network.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message SipMessageResponse {
- enum Direction {
- UNKNOWN = 0;
- INCOMING = 1;
- OUTGOING = 2;
- }
- // the carrier id associated with this SIP delegate
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // The slot id associated with this SIP delegate
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // The SIP message method type (INVITE, MESSAGE, etc...)
- // used as a dimension
- optional android.telephony.SipRequestMethodType sip_message_method = 3;
-
- // The SIP message response code, used if this is a response to a request.
- // used as a dimension.
- optional int32 sip_message_response = 4;
-
- // The SIP message direction
- // used as a dimension
- optional Direction sip_message_direction = 5;
-
- // The response from the SIP stack to sending/receiving the message
- // used as a dimension
- // See the SipDelegateManager#MESSAGE_FAILURE_REASON*
- optional int32 message_error = 6;
-
- // The number of messages that fit this criteria.
- optional int32 count = 7;
-}
-
-/**
- * Tracks SIP sessions managed by the SIP transport.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message SipTransportSession {
- enum Direction {
- UNKNOWN = 0;
- INCOMING = 1;
- OUTGOING = 2;
- }
- // the carrier id associated with this SIP delegate
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // The slot id associated with this SIP delegate
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // The SIP message method that started the session (INVITE, SUBSCRIBE, etc...)
- // used as a dimension
- optional android.telephony.SipRequestMethodType session_method = 3;
-
- // The SIP message direction
- // used as a dimension
- optional Direction sip_message_direction = 4;
-
- // The response from the SIP stack or network.
- // used as a dimension.
- optional int32 sip_response = 5;
-
- // The number of these sessions counted
- optional int32 session_count = 6;
-
- // The number of sessions that were started properly and did not require
- // the SIP transport to forcefully close them.
- optional int32 ended_gracefully_count = 7;
-}
-
-/**
- * Used to determine if there were dedicated bearers set up for a specific listener.
- * If not, this indicates that there may have been a network issue in the dedicated bearer setup.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message ImsDedicatedBearerListenerEvent {
- // Carrier ID of the SIM used for IMS registration.
- // See https://source.android.com/devices/tech/config/carrierid.
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // Index of the SIM used, 0 for single-SIM devices.
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // Radio access technology (RAT) used by the registration when it terminated.
- // The value is either 4G or 5G.
- // Used as a dimension
- optional android.telephony.NetworkTypeEnum rat_at_end = 3;
-
- // QoS class identifier.
- // dimension
- optional int32 qci = 4;
-
- // True if there was a dedicated bearer established for this listener.
- // dimension
- optional bool dedicated_bearer_established = 5;
-
- // The count of listeners with this result.
- optional int32 event_count = 6;
-}
-
-/**
- * Logs information related to ims dedicated bearer which fulfills required qos and provides guaranteed service.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message ImsDedicatedBearerEvent {
- enum State {
- STATE_UNSPECIFIED = 0;
- STATE_ADDED = 1;
- STATE_MODIFIED = 2;
- STATE_DELETED = 3;
- }
- // Carrier ID of the SIM used for IMS registration.
- // See https://source.android.com/devices/tech/config/carrierid.
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // Index of the SIM used, 0 for single-SIM devices.
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // Radio access technology (RAT) used by the registration when it terminated.
- // The value is either 4G or 5G.
- // Used as a dimension
- optional android.telephony.NetworkTypeEnum rat_at_end = 3;
-
- // Qos class identifier.
- // Used as a dimension
- optional int32 qci = 4;
-
- // Dedicated bearer state from the network.
- // Used as a dimension
- optional State bearer_state = 5;
-
- // Whether location connection information is received.
- // Used as a dimension
- optional bool local_connection_info_received = 6;
-
- // Whether remote connection information is received.
- // Used as a dimension
- optional bool remote_connection_info_received = 7;
-
- // Whether or not the QoS indication had listeners.
- // Used as a dimension
- optional bool has_listeners = 8;
-
- // The count that matches the above conditions.
- optional int32 count = 9;
-}
-
-/**
- * Stats about each ServiceDescription that was included in the PIDF XML sent to the network during publish.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message ImsRegistrationServiceDescStats {
- // Describe Service IDs will be included PUBLISH
- // See RcsContactPresenceTuple.java
- enum ServiceId {
- SERVICE_ID_UNSPECIFIED = 0;
- SERVICE_ID_CUSTOM = 1;
- SERVICE_ID_MMTEL = 2;
- SERVICE_ID_CHAT_V1 = 3;
- SERVICE_ID_CHAT_V2 = 4;
- SERVICE_ID_FT = 5;
- SERVICE_ID_FT_OVER_SMS = 6;
- SERVICE_ID_GEO_PUSH = 7;
- SERVICE_ID_GEO_PUSH_VIA_SMS = 8;
- SERVICE_ID_CALL_COMPOSER = 9;
- SERVICE_ID_POST_CALL = 10;
- SERVICE_ID_SHARED_MAP = 11;
- SERVICE_ID_SHARED_SKETCH = 12;
- SERVICE_ID_CHATBOT = 13;
- SERVICE_ID_CHATBOT_STANDALONE = 14;
- SERVICE_ID_CHATBOT_ROLE = 15;
- }
-
- // the carrier id associated with this SIP delegate
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // The slot id associated with this SIP delegate
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // The service id portion of the ServiceDescription
- // used as a dimension
- optional ServiceId service_id_name = 3;
-
- // The version portion of the ServiceDescription
- // used as a dimension
- optional float service_id_version = 4;
-
- // The underlying radio technology type associated with the feature tag
- // used as a dimension
- // See the ImsRegistrationImplBase#REGISTRATION_TECH*
- optional int32 registration_tech = 5;
-
- // the time this feature tag was registered, rounded 5 minutes
- optional int32 published_seconds = 6;
-}
-
-/**
- * Stats related to UCE queries to the network
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message UceEventStats {
- enum MessageType {
- MESSAGE_TYPE_UNSPECIFIED = 0;
- PUBLISH = 1;
- SUBSCRIBE = 2;
- INCOMING_OPTION = 3;
- OUTGOING_OPTION = 4;
- }
- enum CommandCode {
- SERVICE_UNKNOWN = 0;
- GENERIC_FAILURE = 1;
- INVALID_PARAM = 2;
- FETCH_ERROR = 3;
- REQUEST_TIMEOUT = 4;
- INSUFFICIENT_MEMORY = 5;
- LOST_NETWORK_CONNECTION = 6;
- NOT_SUPPORTED = 7;
- NOT_FOUND = 8;
- SERVICE_UNAVAILABLE = 9;
- NO_CHANGE = 10;
- }
- // Carrier ID of the SIM used for IMS registration.
- // See https://source.android.com/devices/tech/config/carrierid.
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // Index of the SIM used, 0 for single-SIM devices.
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // Used to identify the message type.
- // Used as a dimension
- optional MessageType type = 3;
-
- // Whether the UCE event is successfully finished. If false, the request to the
- // modem timed out and we sent a timeout error back to the requesting app.
- // Used as a dimension
- optional bool successful = 4;
-
- // The command error code for the Uce event. Not populated if the modem
- // accepted the request and delivered a network_response.
- // Used as a dimension
- optional CommandCode command_code = 5;
-
- // The network response code for the Uce event. Will not be populated if
- // command_code is present.
- // Used as a dimension
- optional int32 network_response = 6;
-
- // The count that matches the above conditions;
- optional int32 count = 7;
-}
-
-/**
- * Information related to a SIP NOTIFY event from modem.
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message PresenceNotifyEvent {
- // See RFC3265 Section 3.2.4 for more information about these subscription states.
- enum TerminatedReason {
- REASON_UNSPECIFIED = 0;
- // Not spec defined, the network returned a custom code that is not spec defined.
- REASON_CUSTOM = 1;
- REASON_DEACTIVATED = 2;
- REASON_PROBATION = 3;
- REASON_REJECTED = 4;
- REASON_TIMEOUT = 5;
- REASON_GIVEUP = 6;
- REASON_NORESOURCE = 7;
- }
-
- // Carrier ID of the SIM used for IMS registration.
- // See https://source.android.com/devices/tech/config/carrierid.
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // Index of the SIM used, 0 for single-SIM devices.
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // The terminated reason associated with the subscription state.
- // Used as a dimension
- optional TerminatedReason reason = 3;
-
- // Whether or not the NOTIFY received contained at least one body with PIDF
- // content before moving to the terminated state.
- // Used as a dimension
- optional bool content_body_received = 4;
-
- // The count of PIDF info received that contained RCS caps.
- optional int32 rcs_caps_count = 5;
-
- // The count of PIDF info received that contained MMTEL caps.
- optional int32 mmtel_caps_count = 6;
-
- // The count of PIDF info received that contained no mmtel or RCS caps.
- optional int32 no_caps_count = 7;
-
- // The count that matches the above conditions;
- optional int32 count = 8;
-}
-
-/**
- * Tracks GBA requests from applications
- *
- * Logged from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/RcsStats.java
- */
-message GbaEvent {
- enum FailedReason {
- UNKNOWN = 0;
- FEATURE_NOT_SUPPORTED = 1;
- FEATURE_NOT_READY = 2;
- NETWORK_FAILURE = 3;
- INCORRECT_NAF_ID = 4;
- SECURITY_PROTOCOL_NOT_SUPPORTED = 5;
- }
- // Carrier ID of the SIM used for IMS registration.
- // See https://source.android.com/devices/tech/config/carrierid.
- // Used as a dimension
- optional int32 carrier_id = 1;
-
- // Index of the SIM used, 0 for single-SIM devices.
- // Used as a dimension
- optional int32 slot_id = 2;
-
- // Whether the GBA event is successful.
- // Used as a dimension
- optional bool successful = 3;
-
- // Gba authentication failed reason.
- // Used as a dimension
- optional FailedReason failed_reason = 4;
-
- // The count that matches the above conditions.
- optional int32 count = 5;
-}
-
-/*
- * Logs details of initiated UWB ranging session
- * Logged from packages/modules/Uwb/service/java/com/android/server/uwb/UwbMetrics.java
- */
-message UwbSessionInitiated {
- // UWB profiles
- optional android.uwb.Profile profile = 1;
- // Scrambled timestamp sequence (STS) Type
- optional android.uwb.Sts sts = 2;
- // Was it an initiator as opposed to responder?
- optional bool is_initiator = 3;
- // Was it a controller as opposed to controlee?
- optional bool is_controller = 4;
- // Was the discovery done by the framework?
- optional bool is_discovered_by_framework = 5;
- // Was it out-of-band connection as opposed to in-band connection?
- // Note that this field is ignored if is_discovered_by_framework is false.
- optional bool is_out_of_band = 6;
- // UWB channel 5, 6, 9, etc.
- optional int32 channel = 7;
- // The status code of session initialization.
- optional android.uwb.Status status = 8;
- // Initialization latency in ms if is_discovered_by_framework is true.
- optional int32 latency_ms = 9;
- // Initialization latency in step size of 200 ms if is_discovered_by_framework is true.
- optional int32 latency_200ms = 10;
-}
-
-/*
- * Logs details of closed UWB ranging session
- * Logged from packages/modules/Uwb/service/java/com/android/server/uwb/UwbMetrics.java
- */
-message UwbSessionClosed {
- // UWB profiles
- optional android.uwb.Profile profile = 1;
- // Scrambled timestamp sequence (STS) Type
- optional android.uwb.Sts sts = 2;
- // Was it an initiator as opposed to responder?
- optional bool is_initiator = 3;
- // Was it a controller as opposed to controlee?
- optional bool is_controller = 4;
- // Was the connection done by the app as opposed to by the framework?
- optional bool is_framework_initiated = 5;
- // Was it out-of-band connection as opposed to in-band connection?
- // Note that this field is ignored if is_framework_initiated is false.
- optional bool is_out_of_band = 6;
- // Session active duration in seconds
- optional int32 duration_sec = 7;
- // Session active duration bucket
- optional android.uwb.DurationBucket duration_bucket = 8;
- // Total ranging measurement count
- optional int32 ranging_count = 9;
- // Valid ranging measurement count
- optional int32 valid_ranging_count = 10;
- // Ranging measurement count bucket.
- optional android.uwb.CountBucket ranging_count_bucket = 11;
- // Valid ranging measurement count bucket.
- optional android.uwb.CountBucket valid_ranging_count_bucket = 12;
- // Ranging start count
- optional int32 start_count = 13;
- // Ranging start failure count
- optional int32 start_failure_count = 14;
- // Ranging start without valid ranging result count
- optional int32 start_no_valid_report_count = 15;
-}
-
-/*
- * Log that the ranging measurement is received
- * Logged from packages/modules/Uwb/service/java/com/android/server/uwb/UwbMetrics.java
- */
-message UwbRangingMeasurementReceived {
- // UWB profiles
- optional android.uwb.Profile profile = 1;
- // None-Line-of-sight (LOS) indication
- optional android.uwb.Nlos nlos = 2;
- // Was the distance valid?
- optional bool is_distance_valid = 3;
- // The distance measurement in centimeters.
- optional int32 distance_cm = 4;
- // The distance measurement in step size of 50 cm
- optional int32 distance_50cm = 5;
- // RSSI of ranging report, in dBm
- optional int32 rssi = 6;
- // Was azimuth angle valid?
- optional bool is_azimuth_valid = 7;
- // The azimuth angle measurement in degrees.
- optional int32 azimuth_degree = 8;
- // The azimuth angle measurement in step size of 10 degree.
- optional int32 azimuth_10degree = 9;
- // The figure of merit of azimuth angle measurement.
- optional int32 azimuth_fom = 10;
- // Was elevation angle valid?
- optional bool is_elevation_valid = 11;
- // The elevation angle measurement in degrees.
- optional int32 elevation_degree = 12;
- // The elevation angle measurement in step size of 10 degree.
- optional int32 elevation_10degree = 13;
- // The figure of merit of elevation angle measurement.
- optional int32 elevation_fom = 14;
-}
-
-/*
- * Log that the first ranging measurement is received
- * Logged from packages/modules/Uwb/service/java/com/android/server/uwb/UwbMetrics.java
- */
-message UwbFirstRangingReceived {
- // UWB profiles
- optional android.uwb.Profile profile = 1;
- // The latency between the ranging start/resume and 1st ranging measurement, in ms.
- optional int32 latency_ms = 2;
- // The ranging latency in 200ms.
- optional int32 latency_200ms = 3;
-}
-
-/*
- * Log that UWB device error is detected
- * Logged from packages/modules/Uwb/service/java/com/android/server/uwb/UwbMetrics.java
- */
-message UwbDeviceErrorReported {
- enum Type {
- UNKNOWN = 0;
- // Initialization error
- INIT_ERROR = 1;
- // Device status error
- DEVICE_STATUS_ERROR = 2;
- // UCI generic error
- UCI_GENERIC_ERROR = 3;
- }
- // Error type
- optional Type type= 1;
-}
-
-/**
- * Log that the clipboard has been cleared
- * Logged from frameworks/base/services/core/java/android/content/ClipboardAutoWipeService.java
- */
-message ClipboardCleared {
- enum Source {
- SOURCE_UNKNOWN = 0;
- AUTO_CLEAR = 1;
- }
-
- // Source of the wipe
- optional Source source = 1;
-}
-
-/**
- * Pulls status for a SIM.
- *
- * Each pull creates multiple atoms, one for each SIM. The atom holds the status for a SIM that's
- * sensitive per carrier. The atom would be aggregated per carrier for analysis.
- *
- * Pulled from:
- * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
- */
-message PerSimStatus {
- enum WfcMode {
- UNKNOWN = 0;
- WIFI_ONLY = 1;
- CELLULAR_PREFERRED = 2;
- WIFI_PREFERRED = 3;
- }
- enum SimVoltageClass {
- VOLTAGE_CLASS_UNKNOWN = 0;
- VOLTAGE_CLASS_A = 1;
- VOLTAGE_CLASS_B = 2;
- VOLTAGE_CLASS_C = 3;
- }
-
- // Index of the SIM, 0 for single-SIM devices.
- optional int32 sim_slot_index = 1;
-
- // Carrier ID of the SIM.
- // See https://source.android.com/devices/tech/config/carrierid.
- optional int32 carrier_id = 2;
-
- // Indicates whether phone number source UICC provides a phone number
- // and whether it agrees with other sources:
- // - 0: no number provided
- // - a positive integer (> 0): sources providing the same phone number
- // shall use the same integer. The integer shall start from 1, and
- // for each new unique source the next integer (2, 3, …) is used.
- // This way, the raw phone number cannot be derived from the value of
- // this field.
- // This also allows a quick check of conflicts: any field > 1 means conflict,
- // and the max means the count of unique phone numbers.
- optional int32 phone_number_source_uicc = 3;
-
- // Indicates whether phone number source CARRIER provides a phone number
- // and whether it agrees with other sources.
- // See field phone_number_source_uicc.
- optional int32 phone_number_source_carrier = 4;
-
- // Indicates whether phone number source IMS provides a phone number
- // and whether it agrees with other sources.
- // See field phone_number_source_uicc.
- optional int32 phone_number_source_ims = 5;
-
- // Indicates whether VoLTE is enabled
- optional bool volte_enabled = 6;
-
- // Indicates whether WFC is enabled
- optional bool wfc_enabled = 7;
-
- // Indicates the user's WFC mode
- optional WfcMode wfc_mode = 8;
-
- // Indicates the user's WFC mode when roaming
- optional WfcMode wfc_roaming_mode = 9;
-
- // Indicates the user's setting for video calling.
- optional bool video_calling_enabled = 10;
-
- // Indicates if data roaming is enabled
- optional bool data_roaming_enabled = 11;
-
- // Indicates the list of networks allowed by the user. Bitmask is encoded as
- // TelephonyManager#NetworkTypeBitMask.
- optional int64 allowed_networks_by_user = 12;
-
- // Indicates if 2G is disabled by the user using the "Allow 2G" toggle
- optional bool is_2g_disabled = 13;
-
- // Indicates if PIN1 of the SIM card is enabled
- optional bool is_pin1_enabled = 14;
-
- // Indicates the lowest voltage class supported by the SIM
- optional SimVoltageClass sim_voltage_class = 15;
-
- // APN type bitmask of the APNs added or modified by user:
- // @ApnType in frameworks/base/telephony/java/android/telephony/Annotation.java.
- optional int32 user_modified_apn_type_bitmask = 16;
-}
-
-/*
- * Logs Device Scan State events generated by Nearby Scan API.
- */
-message NearbyDeviceScanStateChanged {
- // Uid of the client that triggers the Nearby scan.
- optional int32 uid = 1 [(is_uid) = true];
-
- // Scan start timestamp as session id.
- optional int64 scan_session_id = 2;
-
- // Scan state.
- optional android.nearby.NearbyScanState scan_state = 3;
-
- // Scan type.
- optional android.nearby.NearbyScanType scan_type = 4;
-
- // Medium that this device was discovered/lost.
- optional android.nearby.NearbyNetworkMedium network_medium = 5;
-
- // Received Signal Strength Indication (RSSI) value of the device discovered/lost.
- optional int32 rssi = 6;
-
- // Model of the device discovered/lost.
- optional string scanned_device_model = 7;
-
- // Manufacturer of the device discovered/lost.
- optional string scanned_device_manufacturer = 8;
-}
-
-/**
- * Logs when locales of an application are changed.
- * Logged from
- * frameworks/base/services/core/java/com/android/server/locales/LocaleManagerService.java
- */
-message ApplicationLocalesChanged {
- // The uid which invoked this update. The locales for an application
- // could be changed from the in-app picker OR from the settings UI.
- optional int32 calling_uid = 1 [(is_uid) = true];
-
- // The uid for which the locale change is being done.
- optional int32 target_uid = 2 [(is_uid) = true];
-
- // The new locales for the target package. A comma separated list of BCP 47
- // locale identifiers, compatible with LocaleList#forLanguageTags.
- optional string new_locales = 3;
-
- // The previous locales for the target package. A comma separated list of
- // BCP 47 locale identifiers, compatible with LocaleList#forLanguageTags.
- optional string prev_locales = 4;
-
- // Application locales changed status.
- enum Status {
- // A placeholder for unspecified values.
- STATUS_UNSPECIFIED = 0;
-
- // New locales were committed.
- CONFIG_COMMITTED = 1;
-
- // Likely because no change is required.
- CONFIG_UNCOMMITTED = 2;
-
- // Failed because the target package is invalid.
- FAILURE_INVALID_TARGET_PACKAGE = 3;
-
- // Failed because the calling package does not have the required permission.
- FAILURE_PERMISSION_ABSENT = 4;
- }
-
- optional Status status = 5;
-}
-
-/* Logs when the display HBM state changes.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/display/HighBrightnessModeController.java
- */
-message DisplayHbmStateChanged {
- optional int32 display_id = 1;
-
- // New HBM state
- optional android.server.display.HbmState state = 2;
-
- // The reason the state changes.
- optional android.server.display.HbmStateTransitionReason reason = 3;
-}
-
-/*
- * Logs when the display HBM brightness changes.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/display/AutomaticBrightnessControllerjava
- */
-message DisplayHbmBrightnessChanged {
- optional int32 display_id = 1;
-
- // display brightness
- optional float brightness = 2;
-}
-
-/**
- * Per-UID time spent running work on the GPU.
- *
- * Each pull creates multiple atoms, one per (GPU ID, UID) pair, for at most 10
- * randomly selected UIDs.
- *
- * Pulled from:
- * frameworks/native/services/gpuservice/gpuwork/GpuWork.cpp
- */
-message GpuWorkPerUid {
- // The UID (i.e. app id) that scheduled work on the GPU.
- optional int32 uid = 1 [(is_uid) = true];
-
- // The GPU ID for which we have work information.
- optional int32 gpu_id = 2;
-
- // The time duration (in seconds) over which this data was collected (most
- // likely 24 hours).
- optional int32 time_duration_seconds = 3;
-
- // The total amount of time (in milliseconds) the GPU spent running work for
- // |uid|.
- optional int32 total_active_duration_millis = 4;
-
- // The total amount of time (in milliseconds) the GPU was inactive while
- // running "continuous" work for |uid|. This is estimated by adding up the
- // duration of the small gaps between GPU work for |uid|.
- optional int32 total_inactive_duration_millis = 5;
-}
-
-/**
- * Logs when entries are dropped in DropBox and the reason for the drop.
- *
- * Logged from: frameworks/base/services/
- */
-message DropboxEntryDropped {
- // Explains at which stage of the DropBox workflow the entry was dropped.
- enum DropReason {
- UNKNOWN = 0;
- CLEARING_DATA = 3;
- AGED = 4;
- WRITE_FAILURE = 5;
-
- reserved 1, 2;
- }
-
- optional DropReason drop_reason = 1;
-
- // Tag describing the type of dropbox entry.
- optional string tag = 2;
-
- // The age (millis) of the dropped dropbox entry.
- optional int64 age_millis = 3;
-}
-
-message PersistentUriPermissionsFlushed {
- // Current amount of persistent uri permissions overall
- optional int32 permissions_flushed_amount = 1;
-}
-
-message PersistentUriPermissionsAmountPerPackage {
- // The uid persistent uri permissions amount reported for
- optional int32 uid = 1 [(is_uid) = true];
- // Current amount of persistent uri permissions for this package
- optional int32 amount = 2;
-}
-
-/**
- * VBMeta Digest cryptographically encapsulates the composition of signed images or partitions of
- * a particular build.
- *
- * Logs when boot is complete.
- * Pushed from:
- * frameworks/base/services/core/java/com/android/server/BinaryTransparencyService.java
- */
-message VBMetaDigestReported {
- // the hex encoded string of VBMeta Digest value
- optional string vbmeta_digest = 1;
-}
-
-/**
- * APEXs can either be signed by Google or OEMs. This atom captures basic metadata of APEXs
- * pre-installed on a build or a device.
- *
- * Logs when boot is complete.
- * Pushed from:
- * frameworks/base/services/core/java/com/android/server/BinaryTransparencyService.java
- */
-message ApexInfoGathered {
- // APEX package names are determined by OEMs
- optional string package_name = 1;
- // the version code of the APEX
- optional int64 version_code = 2;
- // the hex encoded SHA256 digest of the APEX file
- optional string sha256_digest = 3;
-}
-
-/**
- * PVM is protected virtual machine. This atom captures the notion of a container
- * that describes a virtual machine.
- *
- * Will be pushed from:
- * frameworks/base/services/core/java/com/android/server/BinaryTransparencyService.java
- */
-message PvmInfoGathered {
- // PVM names are determined by OEMs
- optional string name = 1;
- // an int describing the version of the VM
- optional int64 version = 2;
- // the hex encoded SHA256 digest of the pvm descriptor file
- optional string sha256_digest = 3;
-}
-
-/**
- * This will be pulled from
- * frameworks/base/services/core/java/com/android/server/BinaryTransparencyService.java
- */
-message SignedPartitionInfo {
- // partition name (e.g. vendor, product) is determined by OEM
- optional string partition_name = 1;
- // the hex encoded SHA256 digest of the partition image file
- optional string sha256_digest = 2;
-}
-
-/**
- * Logs when Wear Settings UI is interacted with
- */
-message WearSettingsUIInteracted {
- /** The UI action category */
- optional android.app.wearsettings.Action action = 1;
-
- /** The ID of the entry that the users actioned on. */
- optional android.app.wearsettings.ItemId item_id = 2;
-}
-
-message TracingServiceReportEvent {
- enum Event {
- TRACING_SERVICE_REPORT_UNDEFINED = 0;
-
- // Checkpoints inside TracingServiceProxy.
- TRACING_SERVICE_REPORT_BEGIN = 1;
- TRACING_SERVICE_REPORT_SVC_HANDOFF = 2;
-
- // Guardrails inside TracingServiceProxy.
- TRACING_SERVICE_REPORT_BIND_PERM_INCORRECT = 3;
- TRACING_SERVICE_REPORT_SVC_PERM_MISSING = 4;
- TRACING_SERVICE_REPORT_SVC_COMM_ERROR = 5;
- }
-
- // Which stage of the pipeline we are reporting from.
- optional Event event = 1;
-
- // UUID of the trace.
- optional int64 trace_uuid_lsb = 2;
- optional int64 trace_uuid_msb = 3;
-}
-
-/** Pulled from PinnerService. */
-message PinnedFileSizesPerPackage {
- // If the file is pinned but not as part of a specific pinned app,
- // this will be set to 1000 - the value of system_server.
- optional int32 uid = 1 [(is_uid) = true];
-
- // Consists of only the pinned file's filename, not its full path; for example
- // Given a pinned file at ‘/vendor/lib64/libCB.so’, then this field will be
- // Determined to have have the value ‘libCB.so’.
- optional string filename = 2;
-
- // The size of the pinned file, in kilobytes.
- optional int32 size_kb = 3;
-}
-
-/** Pulled from PendingIntentController. */
-message PendingIntentsPerPackage {
- // The UID of the app that sent the PendingIntent.
- optional int32 uid = 1 [(is_uid) = true];
- // The total number of currently active PendingIntents belonging to this uid.
- optional int32 pending_intent_count = 2;
- // The total size of all currently active PendingIntents belonging to this uid, in kilobytes.
- optional int32 pending_intent_total_bundle_size_kb = 3;
-}
-
-/**
- * Logs for Launcher latency. Uses KLL to reduce the data pression
- *
- * Logged from:
- * vendor/unbundled_google/packages/NexusLauncher
- */
-message LauncherLatency {
- // The event id generated from go/uievents
- optional int32 event_id = 1;
- // The instance id to track multiple partial durations or parellel running durations
- optional int32 instance_id = 2;
- optional int32 package_id = 3;
- optional int64 latency_in_millis = 4;
- optional int32 type = 5;
- optional int32 query_length = 6 [default = -1];
-}
-
-/*
- * Logs changes to game state set by game applications via GameService.
- */
-message GameStateChanged {
- enum State {
- // Game mode is unknown.
- MODE_UNKNOWN = 0;
-
- // The game is not in active play, e.g.e the user is using a game menu.
- MODE_NONE = 1;
-
- // The game is in active, but interruptible, game play.
- MODE_GAMEPLAY_INTERRUPTIBLE = 2;
-
- // The game is in active user play mode, which cannot be interrupted.
- MODE_GAMEPLAY_UNINTERRUPTIBLE = 3;
-
- // The current content shown is not gameplay related (e.g. an ad).
- MODE_CONTENT = 4;
- }
-
- // Provided to ensure package is available even with UID sharing.
- optional string package_name = 1;
-
- // The UID (i.e. app id).
- optional int32 uid = 2 [(is_uid) = true];
-
- // Whether the device enabled performance boost when the state was changed.
- optional bool boost_enabled = 3;
-
- // This includes a top-level state for the game.
- optional State state = 4;
-
- // Indicates if the game is loading assets/resources/compiling/etc.
- optional bool is_loading = 5;
-
- // A developer-selected enum, for example to indicate level or scene.
- optional int32 label = 6;
-
- // A developer-supplied enum, e.g. to indicate the current quality level.
- optional int32 quality = 7;
-}
-
-/**
- * Logs information related to creating hotword detector.
- */
-message HotwordDetectorCreateRequested {
- // The type of detector.
- optional android.hotword.HotwordDetectorType detector_type = 1;
-
- // True if the detector is created successfully.
- optional bool is_created_done = 2;
-
- // The UID for which assistant application is active.
- optional int32 uid = 3 [(is_uid) = true];
-}
-
-/**
- * Logs information related to hotword detection service init result.
- */
-message HotwordDetectionServiceInitResultReported {
- // The type of detector.
- optional android.hotword.HotwordDetectorType detector_type = 1;
-
- // The result of initialization.
- enum Result {
- // Indicates that the service was initialized successfully.
- CALLBACK_INIT_STATE_SUCCESS = 0;
-
- // Indicates that the service was not initialized successfully.
- CALLBACK_INIT_STATE_ERROR = 1;
-
- // Indicates that the callback was invoked without init state.
- CALLBACK_INIT_STATE_UNKNOWN_NO_VALUE = 2;
-
- // Indicates that the callback was invoked, but the init state value exceeded
- // the defined maximum.
- CALLBACK_INIT_STATE_UNKNOWN_OVER_MAX_CUSTOM_VALUE = 3;
-
- // Indicates that the callback was not invoked within timeout.
- CALLBACK_INIT_STATE_UNKNOWN_TIMEOUT = 4;
- }
- optional Result result = 2;
-}
-
-/**
- * Logs information related to restarting hotword detection service.
- */
-message HotwordDetectionServiceRestarted {
- // The type of detector.
- optional android.hotword.HotwordDetectorType detector_type = 1;
-
- // The reason for restarting service.
- enum Reason {
- // UNKNOWN value.
- UNKNOWN = 0;
-
- // Indicates that the service was restarted due to audio service died.
- AUDIO_SERVICE_DIED = 1;
-
- // Indicates that the service was restarted regularly.
- SCHEDULE = 2;
-
- // Indicates that the service was restarted due to service crashed.
- CRASH = 3;
- }
- optional Reason reason = 2;
-}
-
-/**
- * Logs information related to keyphrase trigger.
- */
-message HotwordDetectorKeyphraseTriggered {
- // The type of detector.
- optional android.hotword.HotwordDetectorType detector_type = 1;
-
- // The result of detection.
- enum Result {
- // Indicates that the system got the keyphrase from DSP.
- KEYPHRASE_TRIGGER = 0;
-
- // Indicates that the system can not inform the service to verify the keyphrase.
- FAILED_TO_INFORM_SERVICE = 1;
-
- // Indicates that the callback was not invoked within timeout after informing
- // the service.
- DETECT_TIMEOUT = 2;
-
- // Indicates that the system got the exception after informing the service.
- DETECT_EXCEPTION = 3;
-
- // Indicates that the service crashed.
- SERVICE_CRASH = 4;
-
- // Indicates that the keyphrase was detected.
- DETECTED = 5;
-
- // Indicates that the keyphrase was not detected.
- REJECTED = 6;
-
- // Indicates that the system got the unexpected detected callback.
- DETECT_UNEXPECTED_CALLBACK = 7;
-
- // Indicates that the system got the security exception when handling detected callback.
- DETECT_SECURITY_EXCEPTION = 8;
-
- // Indicates that the system got the unexpected rejected callback.
- REJECT_UNEXPECTED_CALLBACK = 9;
-
- // Indicates that the system called rejected callback when the trusted process was
- // restarted.
- REJECTED_FROM_RESTART = 10;
- }
- // What result after detecting.
- optional Result result = 2;
-}
-
-/**
- * Logs information related to hotword detector events.
- */
-message HotwordDetectorEvents {
- // The type of detector.
- optional android.hotword.HotwordDetectorType detector_type = 1;
-
- // The type of event.
- enum Event {
- // UNKNOWN value.
- UNKNOWN = 0;
-
- // Indicates that the system requested to bind the service.
- REQUEST_BIND_SERVICE = 1;
-
- // Indicates that the system connected the service successfully.
- ON_CONNECTED = 2;
-
- // Indicates that the system failed to bind the service.
- REQUEST_BIND_SERVICE_FAIL = 3;
-
- // Indicates that the system called the updateState function of service.
- REQUEST_UPDATE_STATE = 4;
-
- // Indicates that the callback was not invoked within timeout after calling
- // the updateState function of service.
- CALLBACK_UPDATE_STATE_AFTER_TIMEOUT = 5;
-
- // Indicates that no starting recognition after creating the detector.
- DID_NOT_CALL_START_RECOGNITION = 6;
- }
- optional Event event = 2;
-
- // The UID for which assistant application is active.
- optional int32 uid = 3 [(is_uid) = true];
-}
-
-/**
- * Logs when an AdServices api is called.
- */
-message AdServicesApiCalled {
- // The name of the api that was called.
- // Can be classified as one of the three:
- //
- // Targeting
- // * GetTopics()
- //
- // FLEDGE
- // * joinCustomAudience()
- // * leaveCustomAudience()
- // * overrideCustomAudienceRemoteInfo()
- // * removeCustomAudienceRemoteInfoOverride()
- // * resetAllCustomAudienceOverrides()
- // * runAdSelection()
- // * reportImpression()
- // * overrideAdSelectionConfigRemoteInfo()
- // * removeAdSelectionConfigRemoteInfoOverride()
- // * resetAllAdSelectionConfigRemoteOverrides()
- //
- // Measurement - client side
- // * register()
- // * deleteRegistrations()
-
-
- enum AdServicesApiClassType {
- UNKNOWN = 0;
- TARGETING = 1;
- FLEDGE = 2;
- MEASUREMENT = 3;
- }
-
- enum AdServicesApiName {
- API_NAME_UNKNOWN = 0;
- GET_TOPICS = 1;
- JOIN_CUSTOM_AUDIENCE = 2;
- LEAVE_CUSTOM_AUDIENCE = 3;
- RUN_AD_SELECTION = 4;
- REGISTER = 5;
- DELETE_REGISTRATIONS = 6;
- REPORT_IMPRESSION = 7;
- OVERRIDE_CUSTOM_AUDIENCE_REMOTE_INFO = 8;
- REMOVE_CUSTOM_AUDIENCE_REMOTE_INFO_OVERRIDE = 9;
- RESET_ALL_CUSTOM_AUDIENCE_OVERRIDES = 10;
- OVERRIDE_AD_SELECTION_CONFIG_REMOTE_INFO = 11;
- REMOVE_AD_SELECTION_CONFIG_REMOTE_INFO_OVERRIDE = 12;
- RESET_ALL_AD_SELECTION_CONFIG_REMOTE_OVERRIDES = 13;
- }
-
- optional AdServicesApiClassType api_class = 1;
-
- // The actual name of the api within the 3 classes described above.
- optional AdServicesApiName api_name = 2;
-
- optional string app_package_name = 3;
- optional string sdk_package_name = 4;
-
- optional int32 latency_millis = 5;
-
- // response_code is the error/failure code for the given api.
- optional int32 response_code = 6;
-}
-
-/**
- * Logs when an AdServices measurement reports are being uploaded.
- */
-message AdServicesMeasurementReportsUploaded {
- enum ReportType {
- UNKNOWN_REPORT = 0;
- EVENT = 1;
- AGGREGATE = 2;
- }
-
- optional ReportType type = 1;
-
- enum ReportUploadStatus {
- UNKNOWN_STATUS = 0;
- SUCCESS = 1;
- FAILURE = 2;
- }
-
- optional ReportUploadStatus response_code = 2;
-}
-
-/**
- * Log the duration of executing all receivers of LOCKED_BOOT_COMPLETED or BOOT_COMPLETED broadcast.
- * The dispatch latency is the dispatchTime - enqueueTime.
- * The completion latency is the completeTime - enqueueTime.
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
- */
-message BootCompletedBroadcastCompletionLatencyReported {
- enum Event {
- UNKNOWN = 0;
- LOCKED_BOOT_COMPLETED = 1;
- BOOT_COMPLETED = 2;
- }
-
- optional Event event = 1;
- // from enqueueTime to dispatchTime.
- optional int32 dispatch_latency_uptime_millis = 2;
- // from enqueueTime to completeTime.
- optional int32 complete_latency_uptime_millis = 3;
- // from enqueueRealTime to dispatchRealTime.
- optional int32 dispatch_latency_realtime_millis = 4;
- // from enqueueRealTime to completeRealTime.
- optional int32 complete_latency_realtime_millis = 5;
-
- optional int32 user_id = 6;
- optional UserLifecycleJourneyReported.UserType user_type = 7;
-}
-
-/**
- * Logs information about app background restrictions.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/am/AppRestrictionController.java
- */
-message AppBackgroundRestrictionsInfo {
- // the uid of the app.
- optional int32 uid = 1 [(is_uid) = true];
-
- enum RestrictionLevel {
- LEVEL_UNKNOWN = 0;
- LEVEL_UNRESTRICTED = 1;
- LEVEL_EXEMPTED = 2;
- LEVEL_ADAPTIVE_BUCKET = 3;
- LEVEL_RESTRICTED_BUCKET = 4;
- LEVEL_BACKGROUND_RESTRICTED = 5;
- LEVEL_HIBERNATION = 6;
- }
- // indicates the app background restriction level.
- optional RestrictionLevel restriction_level = 2;
-
- enum Threshold {
- THRESHOLD_UNKNOWN = 0;
- THRESHOLD_RESTRICTED = 1; // app was background restricted by the system.
- THRESHOLD_USER = 2; // app was background restricted by user action.
- }
- // indicates which threshold caused the app to be put into bg restriction.
- optional Threshold threshold = 3;
-
- enum StateTracker {
- UNKNOWN_TRACKER = 0;
- BATTERY_TRACKER = 1;
- BATTERY_EXEMPTION_TRACKER = 2;
- FGS_TRACKER = 3;
- MEDIA_SESSION_TRACKER = 4;
- PERMISSION_TRACKER = 5;
- BROADCAST_EVENTS_TRACKER = 6;
- BIND_SERVICE_EVENTS_TRACKER = 7;
- }
- // indicates the reason/tracker which caused the app to hit the threshold.
- optional StateTracker tracker = 4;
-
- message FgsTrackerInfo {
- // indicates whether an fgs notification was visible for this app or not.
- optional bool fgs_notification_visible = 1;
- // total FGS duration for this app.
- optional int64 fgs_duration = 2;
- }
- optional FgsTrackerInfo fgs_tracker_info = 5 [(log_mode) = MODE_BYTES];
-
- message BatteryTrackerInfo {
- // total battery usage within last 24h (1/10000th)
- optional int32 battery_24h = 1;
- // background battery usage (1/10000th)
- optional int32 battery_usage_background = 2;
- // FGS battery usage (1/10000th)
- optional int32 battery_usage_fgs = 3;
- // Foreground battery usage (1/10000th)
- optional int32 battery_usage_foreground = 4;
- // Cached battery usage (1/10000th)
- optional int32 battery_usage_cached = 5;
- }
- optional BatteryTrackerInfo battery_tracker_info = 6 [(log_mode) = MODE_BYTES];
-
- message BroadcastEventsTrackerInfo {
- // the number of broadcasts sent by this app.
- optional int32 broadcasts_sent = 1;
- }
- optional BroadcastEventsTrackerInfo broadcast_events_tracker_info = 7 [(log_mode) = MODE_BYTES];
-
- message BindServiceEventsTrackerInfo {
- // the number of bind service requests by this app.
- optional int32 bind_service_requests = 1;
- }
- optional BindServiceEventsTrackerInfo bind_service_events_tracker_info =
- 8 [(log_mode) = MODE_BYTES];
-
- // The reasons listed below are defined in PowerExemptionManager.java
- enum ExemptionReason {
- // range 0-9 is reserved for default reasons
- REASON_UNKNOWN = 0;
- REASON_DENIED = 1;
- REASON_OTHER = 2;
- // range 10-49 is reserved for BG-FGS-launch allowed proc states
- REASON_PROC_STATE_PERSISTENT = 10;
- REASON_PROC_STATE_PERSISTENT_UI = 11;
- REASON_PROC_STATE_TOP = 12;
- REASON_PROC_STATE_BTOP = 13;
- REASON_PROC_STATE_FGS = 14;
- REASON_PROC_STATE_BFGS = 15;
- // range 50-99 is reserved for BG-FGS-launch allowed reasons
- REASON_UID_VISIBLE = 50;
- REASON_SYSTEM_UID = 51;
- REASON_ACTIVITY_STARTER = 52;
- REASON_START_ACTIVITY_FLAG = 53;
- REASON_FGS_BINDING = 54;
- REASON_DEVICE_OWNER = 55;
- REASON_PROFILE_OWNER = 56;
- REASON_COMPANION_DEVICE_MANAGER = 57;
- REASON_BACKGROUND_ACTIVITY_PERMISSION = 58;
- REASON_BACKGROUND_FGS_PERMISSION = 59;
- REASON_INSTR_BACKGROUND_ACTIVITY_PERMISSION = 60;
- REASON_INSTR_BACKGROUND_FGS_PERMISSION = 61;
- REASON_SYSTEM_ALERT_WINDOW_PERMISSION = 62;
- REASON_DEVICE_DEMO_MODE = 63;
- REASON_ALLOWLISTED_PACKAGE = 65;
- REASON_APPOP = 66;
- REASON_ACTIVITY_VISIBILITY_GRACE_PERIOD = 67;
- REASON_OP_ACTIVATE_VPN = 68;
- REASON_OP_ACTIVATE_PLATFORM_VPN = 69;
- REASON_TEMP_ALLOWED_WHILE_IN_USE = 70;
- REASON_CURRENT_INPUT_METHOD = 71;
- // range 100-199 is reserved for public reasons
- REASON_GEOFENCING = 100;
- REASON_PUSH_MESSAGING = 101;
- REASON_PUSH_MESSAGING_OVER_QUOTA = 102;
- REASON_ACTIVITY_RECOGNITION = 103;
- REASON_ACCOUNT_TRANSFER = 104;
- // range 200-299 is reserved for broadcast actions
- REASON_BOOT_COMPLETED = 200;
- REASON_PRE_BOOT_COMPLETED = 201;
- REASON_LOCKED_BOOT_COMPLETED = 202;
- REASON_BLUETOOTH_BROADCAST = 203;
- REASON_TIMEZONE_CHANGED = 204;
- REASON_TIME_CHANGED = 205;
- REASON_LOCALE_CHANGED = 206;
- REASON_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED = 207;
- REASON_REFRESH_SAFETY_SOURCES = 208;
- // range 300-399 is reserved for other internal reasons
- REASON_SYSTEM_ALLOW_LISTED = 300;
- REASON_ALARM_MANAGER_ALARM_CLOCK = 301;
- REASON_ALARM_MANAGER_WHILE_IDLE = 302;
- REASON_SERVICE_LAUNCH = 303;
- REASON_KEY_CHAIN = 304;
- REASON_PACKAGE_VERIFIER = 305;
- REASON_SYNC_MANAGER = 306;
- REASON_DOMAIN_VERIFICATION_V1 = 307;
- REASON_DOMAIN_VERIFICATION_V2 = 308;
- REASON_VPN = 309;
- REASON_NOTIFICATION_SERVICE = 310;
- REASON_PACKAGE_REPLACED = 311;
- REASON_LOCATION_PROVIDER = 312;
- REASON_MEDIA_BUTTON = 313;
- REASON_EVENT_SMS = 314;
- REASON_EVENT_MMS = 315;
- REASON_SHELL = 316;
- REASON_MEDIA_SESSION_CALLBACK = 317;
- REASON_ROLE_DIALER = 318;
- REASON_ROLE_EMERGENCY = 319;
- REASON_SYSTEM_MODULE = 320;
- REASON_CARRIER_PRIVILEGED_APP = 321;
- REASON_DPO_PROTECTED_APP = 322;
- REASON_DISALLOW_APPS_CONTROL = 323;
- REASON_ACTIVE_DEVICE_ADMIN = 324;
- // app requested to be exempt
- REASON_OPT_OUT_REQUESTED = 1000;
- }
- // indicates if the app is exempt from background restrictions and the reason if applicable.
- optional ExemptionReason exemption_reason = 9;
-
- enum OptimizationLevel {
- UNKNOWN = 0;
- OPTIMIZED = 1;
- BACKGROUND_RESTRICTED = 2;
- NOT_OPTIMIZED = 3;
- }
- // the user choice for the optimization level of the app.
- optional OptimizationLevel opt_level = 10;
-
- enum TargetSdk {
- SDK_UNKNOWN = 0;
- SDK_PRE_S = 1;
- SDK_S = 2;
- SDK_T = 3;
- }
- // indicates the target sdk level for this app.
- optional TargetSdk target_sdk = 11;
-
- // indicates if the current device is a low ram device.
- optional bool low_mem_device = 12;
-
- // indicates previous background restriction level.
- optional RestrictionLevel previous_restriction_level = 13;
-}
-
-/**
- * Log that the permission reminder notification has been displayed or clicked.
- */
-message PermissionReminderNotificationInteracted {
- // id which identifies single session of user interacting with permission
- // controller
- optional int64 session_id = 1;
-
- enum Result {
- UNDEFINED = 0;
- // notification was presented to the user
- NOTIFICATION_PRESENTED = 1;
- // notification was clicked by the user
- NOTIFICATION_CLICKED = 2;
- }
-
- // View / interaction recorded
- optional Result result = 2;
-}
-
-/**
- * Log that the user has interacted with the permission decision screen.
- */
-message RecentPermissionDecisionsInteracted {
- // id which identifies single session of user interacting with permission
- // controller
- optional int64 session_id = 1;
-
- enum Action {
- ACTION_UNKNOWN = 0;
- SCREEN_VIEWED = 1;
- REVIEW_DECISION = 2;
- VIEW_ALL_CLICKED = 3;
- }
-
- // Action taken on the recent permission decisions page.
- optional Action action = 2;
-
- // Uid of the package for the permission decision being reviewed
- optional int32 uid = 3 [(is_uid) = true];
-
- // Name of the permission for the permission decision being reviewed.
- optional string permission_group_name = 4;
-}
-
-/**
- * Logs for task manager events
- *
- * Logged from SystemUI
- */
-message TaskManagerEventReported {
-
- enum Event {
- VIEWED = 1;
- STOPPED = 2;
- }
-
- optional int32 uid = 1 [(is_uid) = true];
-
- optional Event event = 2;
-
- optional int64 time_running_ms = 3;
-}
-
-/** Log for autofill events. This captures events till the view goes out of
- * focus. For each auttofilled view going out of focus, and coming back, a
- * separate event would be generated.
- *
- * Logged from:
- * frameworks/base/services/autofill/java/com/android/server/autofill/
- */
-message AutofillPresentationEventReported {
- enum PresentationEventResult {
- NONE_SHOWN_UNKNOWN_REASON =
- 0; // Includes reasons where losses can be partial: eg: IME not showing
- // certain datasets, while others are filtered out because user
- // started typing. So, it can either refer to a set of mixed of
- // known or unknown reasons.
- ANY_SHOWN =
- 1; // This is counter to the event name, but we need it in order to get
- // overall success rate.
- // Below ones corresponds to no presentation getting shown
- NONE_SHOWN_VIEW_FOCUS_CHANGED =
- 2; // User action leads to focus getting shifted to another field
- NONE_SHOWN_VIEW_CHANGED =
- 3; // This would also include if view becomes invisible.
- NONE_SHOWN_ACTIVITY_FINISHED = 4; // Eg: User pressed back
- NONE_SHOWN_REQUEST_TIMEOUT =
- 5; // Autofill provider didn't respond in the given time.
- NONE_SHOWN_SESSION_COMMITTED_PREMATURELY =
- 6; // Session was prematurely committed. This can happen due to various
- // reasons, eg: app developers calling commit() earlier than when
- // they should.
- }
-
- // Id number which increases for each subsequent request.
- optional int32 request_id = 1;
-
- // SessionId to aggregate requests within a session, and see overall
- // performance.
- optional int32 session_id = 2;
-
- // Result of autofill event.
- optional PresentationEventResult presentation_event_result = 3;
-
- // Count of datasets that should've been available for display. If the request
- // times out, this won't be populated.
- optional int32 available_count = 4;
-
- // Count of datasets that are shown to the user.
- optional int32 count_shown = 5;
-
- // Count of datasets that are eligible to be shown to the user, but aren't
- // shown because user started typing already, and the results were filtered.
- // If the user starts typing, dataset isn't shown at the moment, but then the
- // user deletes text, and the dataset becomes visible, it would count as
- // shown, and not as filtered out.
- optional int32 count_filtered_user_typing = 6;
-
- // Count of datasets that aren't shown because IME didn't use datasets at all.
- optional int32 count_not_shown_unused_by_ime = 7;
-
- // Count of datasets that are eligible to be shown to the user, but aren't
- // shown because display didn't show them (probably user didn't scroll to see
- // the view). The dataset was requested by display, but not shown.
- optional int32 count_not_shown_never_visible = 8;
-
- // How the dataset is supposed to be shown to the user
- optional AutofillDisplayPresentationType display_presentation_type = 9;
-}
-
-// Tells how Autofill dataset was/will-be displayed.
-enum AutofillDisplayPresentationType {
- UNKNOWN_AUTOFILL_DISPLAY_PRESENTATION_TYPE = 0;
- MENU = 1; // aka drop-down
- INLINE = 2; // shown via IME
- DIALOG = 3; // aka Bottom-sheet dialog
-}
-
-/**
- * Logs when text and reading options changed.
- *
- * Logged from:
- * packages/apps/Settings/src/com/android/settings/accessibility
- */
-message AccessibilityTextReadingOptionsChanged {
- // The item name of the accessibility feature "Text and Reading Options".
- optional android.stats.accessibility.TextReadingOption name = 1;
-
- // The status value of the item of the accessibility feature "Text and Reading Options".
- optional int32 value = 2;
-
- // The entry point from which page.
- optional android.stats.accessibility.TextReadingEntry entry_point = 3;
-}
-
-/** Log the CompanionDeviceManager associations are created by various device
- * profiles
- *
- * Logged from:
- * frameworks/base/services/companion/java/com/android/server/companion/
- * CompanionDeviceManagerService.java
- */
-message CdmAssociationAction {
- enum Action {
- UNKNOWN = 0;
- CREATED = 1;
- REMOVED = 2;
- }
-
- enum DeviceProfile{
- DEVICE_PROFILE_NULL = 0;
- DEVICE_PROFILE_WATCH = 1;
- DEVICE_PROFILE_APP_STREAMING = 2;
- DEVICE_PROFILE_AUTO_PROJECTION = 3;
- DEVICE_PROFILE_COMPUTER = 4;
- }
-
- // Action taken on the CDM association been created by companion apps.
- optional Action action = 1;
-
- // Name of the CDM Association Request profiles.
- optional DeviceProfile device_profile = 2;
-}
-
-/**
- * Logs when a telephony anomaly is reported.
- *
- * Logged from:
- * frameworks/base/telephony/java/android/telephony/AnomalyReporter.java
- */
-message TelephonyAnomalyDetected {
- // Carrier ID of the SIM card.
- // See https://source.android.com/devices/tech/config/carrierid.
- optional int32 carrier_id = 1;
- // UUID of the anomaly, as generated by android.telephony.AnomalyReporter
- optional int64 event_id_lsb = 2;
- optional int64 event_id_msb = 3;
-}
-/*
- * Pushed atom logged by ONS service.
- */
-message OnsOpportunisticEsimProvisioningComplete {
- enum ResultCode {
- // Unknown
- RESULT_UNKNOWN = 0;
-
- // Operation was successful.
- RESULT_SUCCESS = 1;
-
- // Device capabilities not met such as eSIM and MultiSIM not supported.
- RESULT_DEVICE_NOT_CAPABLE = 2;
-
- // Internet connection is not available while trying to download opportunistic eSIM.
- RESULT_INTERNET_NOT_AVAILABLE = 3;
-
- // Error occurred while switching device from Single to MultiSIM mode.
- RESULT_SWITCH_TO_MULTISIM_FAILED = 4;
-
- // Connection error occurred while downloading opportunistic eSIM from SMDP server.
- RESULT_CONNECTION_ERROR = 5;
-
- // Download failed because there is no sufficient storage available in eUICC memory.
- RESULT_MEMORY_FULL = 6;
-
- // Installation of downloaded eSIM failed.
- RESULT_INSTALL_ESIM_PROFILE_FAILED = 7;
-
- // Unresolvable errors such as Invalid SMDP address or activation code.
- RESULT_UNRESOLVABLE_ERROR = 8;
-
- //Auto provisioning disabled
- RESULT_AUTO_PROVISIONING_DISABLED = 9;
- }
-
- // CBRS carrier id. Filled only while reporting failure cases.
- optional int32 carrier_id = 1;
-
- // carrier id of the opportunistic eSIM downloaded from the SMDP server.
- // Filled only while reporting failure cases.
- optional int32 opportunistic_esim_carrier_id = 2;
-
- // Flag to indicate that the data connection was used for downloading.
- optional bool is_mobile_data_used = 3;
-
- // Error code occurred during the above operation.
- optional ResultCode error_code = 4;
-
- // Retry count of the above operation.
- optional int32 retry_count = 5;
-
- // Detailed error code.
- optional int32 detailed_error_code = 6;
-}
-
-/**
- * Logs when a background dexopt job is ended.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
- */
-message BackgroundDexoptJobEnded {
- // Corresponds to `BackgroundDexOptService.Status`, except for
- // `STATUS_JOB_FINISHED`.
- enum Status {
- STATUS_UNKNOWN = 0;
-
- // The job has finished. This value is used even if some packages have
- // failed compilation during the job. (Corresponds to either
- // `BackgroundDexOptService.Status.STATUS_OK` or
- // `BackgroundDexOptService.Status.STATUS_DEX_OPT_FAILED`.)
- STATUS_JOB_FINISHED = 1;
-
- STATUS_ABORT_BY_CANCELLATION = 2;
- STATUS_ABORT_NO_SPACE_LEFT = 3;
- STATUS_ABORT_THERMAL = 4;
- STATUS_ABORT_BATTERY = 5;
- }
-
- optional Status status = 1;
-
- // If `status` is `STATUS_ABORT_BY_CANCELLATION`, the reason of the
- // cancellation.
- optional android.app.job.StopReasonEnum cancellation_reason = 2;
-
- // The duration of the job run, in milliseconds, not counting time spent in
- // sleep.
- optional int64 duration_ms = 3;
-
- // The duration of the job run, in milliseconds, including time spent in
- // sleep.
- optional int64 duration_including_sleep_ms = 4;
-}
-
-/**
- * Logs information about sync exemptions when they occur.
- *
- * Logged from:
- * frameworks/base/services/core/java/com/android/server/content/ContentService.java
- */
-message SyncExemptionOccurred {
- optional int32 uid = 1 [(is_uid) = true]; // the uid of the app.
-
- enum ProcState {
- UNKNOWN = 0;
- PERSISTENT = 1;
- PERSISTENT_UI = 2;
- TOP = 3;
- BOUND_TOP = 4;
- FOREGROUND_SERVICE = 5;
- BOUND_FOREGROUND_SERVICE = 6;
- IMPORTANT_FOREGROUND = 7;
- IMPORTANT_BACKGROUND = 8;
- TRANSIENT_BACKGROUND = 9;
- BACKUP = 10;
- SERVICE = 11;
- RECEIVER = 12;
- TOP_SLEEPING = 13;
- HEAVY_WEIGHT = 14;
- HOME = 15;
- LAST_ACTIVITY = 16;
- CACHED_ACTIVITY = 17;
- CACHED_ACTIVITY_CLIENT = 18;
- CACHED_RECENT = 19;
- CACHED_EMPTY = 20;
- }
- optional ProcState proc_state = 2; // the proc state of the app when the exemption occurred.
-
- optional bool is_uid_active = 3; // was the uid active when the exemption occurred.
-
- optional AppBackgroundRestrictionsInfo.RestrictionLevel restriction_level = 4;
-}
-
-// Logs when the remote key provisioner application is invoked, either
-// due to a periodically scheduled job, due to an attestation key being
-// consumed from the pool, or when the system has detected that it's
-// completely out of attestation keys.
-//
-// Logged from:
-// packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/
-message RemoteKeyProvisioningAttempt {
- // The reason for the provisioning attempt.
- enum Cause {
- CAUSE_UNKNOWN = 0;
- SCHEDULED = 1; // A scheduled job issued the request
- KEY_CONSUMED = 2; // A provisioned key was consumed from the pool
- OUT_OF_KEYS = 3; // The system is out of keys
- }
- optional Cause cause = 1;
-
- // The name of the remotely provisioned component for whom keys are being
- // generated and certified. The string value is determined by the vendor,
- // and is fixed for the lifetime of the device. The number of unique string
- // values on a given device is determined by how many remotely provisioned
- // component HALs are on a given device. Typically, this is 2-3 HALs.
- optional string remotely_provisioned_component = 2;
-
- // The uptime of the device, organized into time ranges of interest.
- enum UpTime {
- UPTIME_UNKNOWN = 0;
- LESS_THAN_5_MINUTES = 1;
- BETWEEN_5_AND_60_MINUTES = 2;
- MORE_THAN_60_MINUTES = 3;
- }
- optional UpTime uptime = 3;
-
- // The state of remote provisioning enablement
- enum Enablement {
- ENABLEMENT_UNKNOWN = 0;
- ENABLED_WITH_FALLBACK = 1;
- ENABLED_RKP_ONLY = 2;
- DISABLED = 3;
- }
- optional Enablement enablement = 4;
-
- // If the key pool is completely exhausted, this is set to true. Typically,
- // we do not expect to see a pool with no spare keys available.
- optional bool is_key_pool_empty = 5;
-
- // Indicates success or failure of the provisioning attempt.
- optional com.android.remoteprovisioner.RemoteKeyProvisioningStatus status = 6;
-}
-
-// Logs that correlate remote key provisioning status with the active
-// network for the given provisioning attempt.
-//
-// Logged from:
-// packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/
-message RemoteKeyProvisioningNetworkInfo {
- // The network transport, according ConnectivityManager::getActiveNetwork().
- optional android.stats.connectivity.TransportType transport_type = 1;
-
- // Indicates success or failure of the provisioning attempt.
- optional com.android.remoteprovisioner.RemoteKeyProvisioningStatus status = 2;
-
- // If an HTTP error was received, this contains the code. Else, contains 200.
- optional int32 http_status_error = 3;
-}
-
-// Logs indicating timing data to understand how long the remote provisioner is
-// taking to perform various sub-tasks. This is intended to be used with KLL metrics.
-//
-// Logged from:
-// packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/
-message RemoteKeyProvisioningTiming {
- // Time spent waiting on the RKP service to reply.
- optional int32 server_wait_millis = 1;
-
- // Time spent waiting on internal binder calls to the provisioning service.
- optional int32 binder_wait_millis = 2;
-
- // Time spent waiting on the serialization lock.
- optional int32 lock_wait_millis = 3;
-
- // Total time spent processing the attempt.
- optional int32 total_processing_time = 4;
-
- // The network transport, according ConnectivityManager::getActiveNetwork().
- optional android.stats.connectivity.TransportType transport_type = 5;
-
- // The name of the remotely provisioned component for whom keys are being
- // generated and certified. The string value is determined by the vendor,
- // and is fixed for the lifetime of the device. The number of unique string
- // values on a given device is determined by how many remotely provisioned
- // component HALs are on a given device. Typically, this is 2-3 HALs.
- optional string remotely_provisioned_component = 6;
-}
-
-// Counters that track how many errors we're seeing on the device for the
-// given boot.
-//
-// Logged from:
-// packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/
-message RemoteKeyProvisioningErrorCounts {
- // The total number of RKP attempts there have been this boot.
- optional int32 total_count = 1;
-
- // How many errors this device has encountered this boot.
- optional int32 error_count = 2;
-
- // How many bytes of data have been sent that resulted in errors. These
- // bytes count against an error budget, so it's important to track.
- optional int32 error_bytes = 3;
-}
-
-// Logs the overall Safety State of the device (as cached by the Safety Center)
-message SafetyState {
- // The overall severity level of the Safety Center.
- optional android.stats.safetycenter.SafetySeverityLevel overall_severity_level = 1;
-
- // The number of open issues in the Safety Center.
- optional int64 open_issues_count = 2;
-
- // The number of dismissed issues in the Safety Center.
- optional int64 dismissed_issues_count = 3;
-}
-
-// Logs the state of an individual Safety Source when overall SafetyState is
-// collected.
-message SafetySourceStateCollected {
- optional int64 encoded_safety_source_id = 1;
-
- optional android.stats.safetycenter.SafetySourceProfileType safety_source_profile_type = 2;
-
- // The severity level of this source.
- optional android.stats.safetycenter.SafetySeverityLevel severity_level = 3;
-
- // The number of open issues belonging to this Safety Source.
- optional int64 open_issues_count = 4;
-
- // The number of dismissed issues belonging to this Safety Source.
- optional int64 dismissed_issues_count = 5;
-}
-
-// Logs system-health and performance related events from the Safety Center
-message SafetyCenterSystemEventReported {
- enum EventType {
- EVENT_TYPE_UNKNOWN = 0;
- SINGLE_SOURCE_GET_NEW_DATA = 1;
- SINGLE_SOURCE_RESCAN = 2;
- COMPLETE_GET_NEW_DATA = 3;
- COMPLETE_RESCAN = 4;
- INLINE_ACTION = 5;
- }
- optional EventType event_type = 1;
-
- // Unset if this event isn't source-specific.
- optional int64 encoded_safety_source_id = 2;
-
- // Unset if this event isn't source-specific.
- optional android.stats.safetycenter.SafetySourceProfileType safety_source_profile_type = 3;
-
- // Unset if this event isn't specific to an issue.
- optional int64 encoded_issue_type_id = 4;
-
- optional int64 duration_millis = 5;
-
- enum Result {
- RESULT_UNKNOWN = 0;
- SUCCESS = 1;
- TIMEOUT = 2;
- ERROR = 3;
- }
- optional Result result = 6;
-}
-
-// Logs a user interaction with the Safety Center. Various fields may or may not be
-// set depending on the Action reported.
-message SafetyCenterInteractionReported {
- // ID which identifies single session of user interacting with Safety Center.
- optional int64 session_id = 1;
-
- enum Action {
- ACTION_UNKNOWN = 0;
-
- SAFETY_CENTER_VIEWED = 1;
- SAFETY_ISSUE_VIEWED = 2;
-
- SCAN_INITIATED = 3;
-
- ISSUE_PRIMARY_ACTION_CLICKED = 4;
- ISSUE_SECONDARY_ACTION_CLICKED = 5;
- ISSUE_DISMISS_CLICKED = 6;
-
- MORE_ISSUES_CLICKED = 7;
- ENTRY_CLICKED = 8;
- ENTRY_ICON_ACTION_CLICKED = 9;
- STATIC_ENTRY_CLICKED = 10;
-
- PRIVACY_CONTROL_TOGGLE_CLICKED = 11;
- SENSOR_PERMISSION_REVOKE_CLICKED = 12;
- SENSOR_PERMISSION_SEE_USAGES_CLICKED = 13;
- REVIEW_SETTINGS_CLICKED = 14;
- }
-
- // Action taken in the Safety Center.
- optional Action action = 2;
-
- enum ViewType {
- VIEW_TYPE_UNKNOWN = 0;
- FULL = 1;
- QUICK_SETTINGS = 2;
- }
-
- // Which view of the Safety Center this interaction occurred in.
- optional ViewType view_type = 3;
-
- enum NavigationSource {
- SOURCE_UNKNOWN = 0;
- NOTIFICATION = 1;
- QUICK_SETTINGS_TILE = 2;
- SETTINGS = 3;
- SENSOR_INDICATOR = 4;
- }
-
- // Where the session was initiated from.
- optional NavigationSource navigation_source = 4;
-
- // Severity level of the particular issue or entry, or the overall Safety
- // Center this interaction is associated with.
- optional android.stats.safetycenter.SafetySeverityLevel severity_level = 5;
-
- // The hashed ID of the Safety Source that this interaction was with performed with,
- // or nothing if this event isn't source-specific.
- optional int64 encoded_safety_source_id = 6;
-
- // The kind of profile that this safety source originated from (sources from
- // personal and work profiles may have the same source ID)
- optional android.stats.safetycenter.SafetySourceProfileType safety_source_profile_type = 7;
-
- // A hash of the loggable issue type ID that this interaction was performed with.
- optional int64 encoded_issue_type_id = 8;
-
- enum Sensor {
- SENSOR_UNKNOWN = 0;
- MICROPHONE = 1;
- CAMERA = 2;
- LOCATION = 3;
- }
-
- // Which sensor was associated with this interaction (if any).
- optional Sensor sensor = 9;
-}
diff --git a/stats/enums/app/enums.proto b/stats/enums/app/enums.proto
index 9f13dfa..17a9ede 100644
--- a/stats/enums/app/enums.proto
+++ b/stats/enums/app/enums.proto
@@ -26,11 +26,11 @@
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 all app windows were drawn.
+ // 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 we drew a task snapshot.
+ // 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.
@@ -223,11 +223,6 @@
APP_OP_ACTIVITY_RECOGNITION_SOURCE = 113;
APP_OP_BLUETOOTH_ADVERTISE = 114;
APP_OP_RECORD_INCOMING_PHONE_AUDIO = 115;
- APP_OP_NEARBY_WIFI_DEVICES = 116;
- APP_OP_ESTABLISH_VPN_SERVICE = 117;
- APP_OP_ESTABLISH_VPN_MANAGER = 118;
- APP_OP_ACCESS_RESTRICTED_SETTINGS = 119;
- APP_OP_RECEIVE_AMBIENT_TRIGGER_AUDIO = 120;
}
/**
@@ -318,12 +313,6 @@
* {@link #description} will specify the cause given by the system.
*/
REASON_OTHER = 13;
-
- /**
- * Application process was killed by App Freezer, for example, because it receives
- * sync binder transactions while being frozen.
- */
- REASON_FREEZER = 14;
}
/**
@@ -448,38 +437,6 @@
* while being frozen.
*/
SUBREASON_FREEZER_BINDER_TRANSACTION = 20;
-
- /**
- * The process was killed because of force-stop, it could be due to that
- * the user clicked the "Force stop" button of the application in the Settings;
- * this would be set only when the reason is {@link #REASON_USER_REQUESTED}.
- */
- SUBREASON_FORCE_STOP = 21;
-
- /**
- * The process was killed because the user removed the application away from Recents;
- * this would be set only when the reason is {@link #REASON_USER_REQUESTED}.
- */
- SUBREASON_REMOVE_TASK = 22;
-
- /**
- * The process was killed because the user stopped the application from the task manager;
- * this would be set only when the reason is {@link #REASON_USER_REQUESTED}.
- */
- SUBREASON_STOP_APP = 23;
-
- /**
- * The process was killed because the user stopped the application from developer options,
- * or via the adb shell commmand interface; this would be set only when the reason is
- * {@link #REASON_USER_REQUESTED}.
- */
- SUBREASON_KILL_BACKGROUND = 24;
-
- /**
- * The process was killed because of package update; this would be set only when the reason is
- * {@link #REASON_USER_REQUESTED}.
- */
- SUBREASON_PACKAGE_UPDATE = 25;
}
/**
diff --git a/stats/enums/app/remoteprovisioner_enums.proto b/stats/enums/app/remoteprovisioner_enums.proto
deleted file mode 100644
index 1cd747c..0000000
--- a/stats/enums/app/remoteprovisioner_enums.proto
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2022 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.remoteprovisioner;
-
-// The status of an attempt to remotely provision keys and certs.
-enum RemoteKeyProvisioningStatus {
- REMOTE_KEY_PROVISIONING_STATUS_UNKNOWN = 0;
- KEYS_SUCCESSFULLY_PROVISIONED = 1; // Success: got keys and certs
- NO_PROVISIONING_NEEDED = 2; // Success: Noop
- PROVISIONING_DISABLED = 3; // Success: provisioning turned off
- INTERNAL_ERROR = 4; // Indicates a code bug
- NO_NETWORK_CONNECTIVITY = 5; // Not connected to the internet
- OUT_OF_ERROR_BUDGET = 6; // Too much data has been used on
- // previous errors, operation aborted
- INTERRUPTED = 7; // Local processing received an
- // interrupted exception
-
- // Various local binder failures
- GENERATE_KEYPAIR_FAILED = 10;
- GENERATE_CSR_FAILED = 11;
- GET_POOL_STATUS_FAILED = 12;
- INSERT_CHAIN_INTO_POOL_FAILED = 13; // The local provisioning of the cert
- // chain into the key pool failed
-
- // Failures to get the GEEK from the RKP service
- FETCH_GEEK_TIMED_OUT = 20;
- FETCH_GEEK_IO_EXCEPTION = 21;
- FETCH_GEEK_HTTP_ERROR = 22;
-
- // Failures to get certs from the RKP service
- SIGN_CERTS_TIMED_OUT = 30;
- SIGN_CERTS_IO_EXCEPTION = 31;
- SIGN_CERTS_HTTP_ERROR = 32;
- SIGN_CERTS_DEVICE_NOT_REGISTERED = 33;
-}
diff --git a/stats/enums/app/settings_enums.proto b/stats/enums/app/settings_enums.proto
index ed241b6..c24608b 100644
--- a/stats/enums/app/settings_enums.proto
+++ b/stats/enums/app/settings_enums.proto
@@ -981,38 +981,6 @@
// CATEGORY: SETTINGS
// OS: S
FIELD_BATTERY_SAVER_PERCENTAGE_VALUE = 1785;
-
- // ACTION: Settings > System > Multiple users > Add supervised user
- // CATEGORY: SETTINGS
- // OS: T
- ACTION_USER_SUPERVISED_ADD = 1786;
-
- // ACTION: Settings > System > Gestures > Quick tap for actions > Toggle flashlight
- // CATEGORY: SETTINGS
- // OS: T
- ACTION_COLUMBUS_ACTION_FLASHLIGHT = 1787;
-
- // ACTION: Settings > Display > Daydream ("Screen Saver")
- // CATEGORY: SETTINGS
- // OS: T
- ACTION_DREAM_SELECT_TYPE = 1788;
-
- // ACTION: Settings > Display > Screen timeout > Docked timeout
- // CATEGORY: SETTINGS
- // OS: T
- ACTION_SCREEN_TIMEOUT_DOCKED_CHANGED = 1789;
-
- // ACTION: Settings > Display > Auto-rotate screen > Auto-rotate when <device_state>
- // SUBTYPE: Integer with device state id. Device dependant.
- // CATEGORY: SETTINGS
- // OS: T
- ACTION_ENABLE_AUTO_ROTATION_DEVICE_STATE = 1790;
-
- // ACTION: Settings > Display > Auto-rotate screen > Auto-rotate when <device_state>
- // SUBTYPE: Integer with device state id. Device dependant.
- // CATEGORY: SETTINGS
- // OS: T
- ACTION_DISABLE_AUTO_ROTATION_DEVICE_STATE = 1791;
}
/**
@@ -3206,166 +3174,6 @@
// CATEGORY: SETTINGS
// OS: S
CREDENTIAL_MANAGEMENT_APP_REMOVE_APP = 1895;
-
- // OPEN: Settings > Display > Lock screen > Hub mode
- // CATEGORY: SETTINGS
- // OS: S
- COMMUNAL_MODE_SETTINGS = 1896;
-
- // OPEN: Settings > Users > Install app in other user
- // CATEGORY: SETTINGS
- // OS: T
- USERS_APP_COPYING = 1897;
-
- // OPEN: Settings -> Accessibility -> Timing controls -> Time to take action (Accessibility timeout)
- // CATEGORY: SETTINGS
- // OS: S
- ACCESSIBILITY_TIMEOUT = 1898;
-
- // OPEN: Settings -> Accessibility -> Talkback
- // CATEGORY: SETTINGS
- // OS: S
- TALKBACK = 1899;
-
- // OPEN: Settings -> Accessibility -> Accessibility Menu
- // CATEGORY: SETTINGS
- // OS: S
- ACCESSIBILITY_MENU = 1900;
-
- // OPEN: Settings -> Accessibility -> Select to Speak
- // CATEGORY: SETTINGS
- // OS: S
- SELECT_TO_SPEAK = 1901;
-
- // OPEN: Settings -> Accessibility -> Switch Access
- // CATEGORY: SETTINGS
- // OS: S
- SWITCH_ACCESS = 1902;
-
- // OPEN: Settings -> Accessibility -> Voice Access
- // CATEGORY: SETTINGS
- // OS: S
- VOICE_ACCESS = 1903;
-
- // OPEN: Settings -> Accessibility -> Sound Amplifier
- // CATEGORY: SETTINGS
- // OS: S
- SOUND_AMPLIFIER = 1904;
-
- // OPEN: Settings -> Accessibility -> Live Transcribe
- // CATEGORY: SETTINGS
- // OS: S
- LIVE_TRANSCRIBE = 1905;
-
- // OPEN: Settings -> Accessibility -> Sound Notifications
- // CATEGORY: SETTINGS
- // OS: S
- SOUND_NOTIFICATIONS = 1906;
-
- // OPEN: Settings > Display > Lock screen > Hub mode > Shared Apps
- // CATEGORY: SETTINGS
- // OS: T
- COMMUNAL_MODE_SHARED_APP_SETTINGS = 1907;
-
- // OPEN: Settings > System > Gestures > System navigation > 2-/3-button
- // navigation gear icon
- // CATEGORY: SETTINGS
- // OS: S
- SETTINGS_BUTTON_NAV_DLG = 1908;
-
- // OPEN: Settings > Display > Lock screen > Hub mode > Trusted networks
- // CATEGORY: SETTINGS
- // OS: T
- COMMUNAL_MODE_TRUSTED_NETWORKS_SETTINGS = 1909;
-
- // OPEN: Settings > Connected devices > Connection preferences > Fast Pair
- // CATEGORY: SETTINGS
- // OS: T
- CONNECTION_DEVICE_ADVANCED_FAST_PAIR = 1910;
-
- // OPEN: Settings > Languages & input > App Languages
- // CATEGORY: SETTINGS
- // OS: T
- APPS_LOCALE_LIST = 1911;
-
- // OPEN: Settings > Accessibility > Text and reading options
- // CATEGORY: SETTINGS
- // OS: T
- ACCESSIBILITY_TEXT_READING_OPTIONS = 1912;
-
- // OPEN: Settings > Developer options > Reboot with MTE > Info dialog
- // CATEGORY: SETTINGS
- // OS: T
- REBOOT_WITH_MTE = 1913;
-
- // OPEN: Settings > System > Developer options > Enable freeform windows > Reboot dialog
- // OPEN: Settings > System > Developer options > Force desktop mode > Reboot dialog
- // CATEGORY: SETTINGS
- // OS: T
- REBOOT_CONFIRMATION_DIALOG = 1914;
-
- // OPEN: SUW Welcome Screen -> Vision Settings -> Text and reading options
- // OPEN: SUW Welcome Screen -> Anything else? -> Text and reading options
- // CATEGORY: SETTINGS
- // OS: T
- SUW_ACCESSIBILITY_TEXT_READING_OPTIONS = 1915;
-
- // OPEN: Settings > System > Multiple users > Switch to admin user when
- // docked
- // CATEGORY: SETTINGS
- // OS: T
- TIMEOUT_TO_USER_ZERO = 1916;
-
- // OPEN: Settings > Security & Privacy (if safety center is enabled)
- // CATEGORY: SETTINGS
- // OS: T
- SAFETY_CENTER = 1917;
-
- // OPEN: Settings > Accessibility -> Color and motion
- // CATEGORY: SETTINGS
- // OS: T
- ACCESSIBILITY_COLOR_AND_MOTION = 1918;
-
- // OPEN: Settings > Display > Screen timeout > Docked timeout
- // CATEGORY: SETTINGS
- // OS: T
- SCREEN_TIMEOUT_DOCKED = 1919;
-
- // OPEN: Settings > Display -> Screen resolution
- // CATEGORY: SETTINGS
- // OS: T
- SCREEN_RESOLUTION = 1920;
-
- // OPEN: Settings > Sound > Spatial audio
- // CATEGORY: SETTINGS
- // OS: T
- SETTINGS_SPATIAL_AUDIO = 1921;
-
- // Logs that the user has edited the turn screen on settings.
- // CATEGORY: SETTINGS
- // OS: T
- SETTINGS_MANAGE_TURN_SCREEN_ON = 1922;
-
- // OPEN: Settings > Accessibility > Magnification > Settings > Magnification area > Magnification triple tap warning dialog
- // CATEGORY: SETTINGS
- // OS: T
- DIALOG_MAGNIFICATION_TRIPLE_TAP_WARNING = 1923;
-
- // OPEN: Settings > Accessibility > Display size and text > Click
- // "Reset settings" > Reset settings dialog
- // CATEGORY: SETTINGS
- // OS: T
- DIALOG_RESET_SETTINGS = 1924;
-
- // OPEN: Settings > Developer Options > Predictive gesture animations > Click
- // CATEGORY: SETTINGS
- // OS: T
- DIALOG_BACK_ANIMATIONS = 1925;
-
- // OPEN: Le audio broadcast dialog > Find a broadcast > Scan QR code
- // CATEGORY: SETTINGS
- // OS: T
- LE_AUDIO_BROADCAST_SCAN_QR_CODE = 1926;
}
// Battery Saver schedule types.
diff --git a/stats/enums/app/tvsettings_enums.proto b/stats/enums/app/tvsettings_enums.proto
index 53c36b3..f2b0023 100644
--- a/stats/enums/app/tvsettings_enums.proto
+++ b/stats/enums/app/tvsettings_enums.proto
@@ -399,21 +399,6 @@
// Never (toggle)
DISPLAY_SOUND_MATCH_CONTENT_FRAMERATE_NEVER = 0x15530000;
- // TvSettings > Display & Sound > Text scaling
- DISPLAY_SOUND_TEXT_SCALING = 0x15600000;
-
- // TvSettings > Display & Sound > Text scaling > Small (entry)
- DISPLAY_SOUND_TEXT_SCALING_SMALL = 0x15610000;
-
- // TvSettings > Display & Sound > Text scaling > Default (entry)
- DISPLAY_SOUND_TEXT_SCALING_DEFAULT = 0x15620000;
-
- // TvSettings > Display & Sound > Text scaling > Large (entry)
- DISPLAY_SOUND_TEXT_SCALING_LARGE = 0x15630000;
-
- // TvSettings > Display & Sound > Text scaling > Largest (entry)
- DISPLAY_SOUND_TEXT_SCALING_LARGEST = 0x15640000;
-
// TvSettings > Apps
APPS = 0x16000000;
@@ -460,9 +445,6 @@
// TvSettings > Apps > See all apps > [An app entry] > Open source licenses
APPS_ALL_APPS_APP_ENTRY_LICENSES = 0x1611C000;
- // TvSettings > Apps > See all apps > [An app entry] > Remove permissions Toggle
- APPS_ALL_APPS_APP_ENTRY_HIBERNATION = 0x1611D000;
-
// TvSettings > Apps > See all apps > Show system apps
APPS_ALL_APPS_SHOW_SYSTEM_APPS = 0x16120000;
@@ -541,12 +523,6 @@
// TvSettings > Apps > Special app access > Alarms & Reminders
APPS_SPECIAL_APP_ACCESS_ALARMS_AND_REMINDERS = 0x16370000;
- // TvSettings > Apps > Special app access > All files access
- APPS_SPECIAL_APP_ACCESS_ALL_FILES_ACCESS = 0x16380000;
-
- // TvSettings > Apps > Special app access > Turn screen on
- APPS_SPECIAL_APP_ACCESS_TURN_SCREEN_ON = 0x16390000;
-
// TvSettings > Apps > Security & restrictions
APPS_SECURITY_RESTRICTIONS = 0x16400000;
@@ -578,9 +554,6 @@
// Exit restricted profile
APPS_SECURITY_RESTRICTIONS_EXIT_PROFILE = 0x16480000;
- // TvSettings > Unused apps
- APPS_UNUSED_APPS = 0x16500000;
-
// TvSettings > System (same as TvSettings > Device Preferences)
SYSTEM = 0x17000000;
@@ -689,16 +662,6 @@
// Cached data (brings up "Clear cached data?" dialog upon click)
SYSTEM_STORAGE_INTERNAL_STORAGE_CACHED = 0x17512000;
- // TvSettings > System > Free up storage
- SYSTEM_STORAGE_FREE_UP_STORAGE = 0x17520000;
-
- // TvSettings > System > Free up storage >
- // Clear cached data (brings up "Clear cached data?" dialog upon click)
- SYSTEM_STORAGE_FREE_UP_STORAGE_CLEAR_CACHED_DATA = 0x17521000;
-
- // TvSettings > System > Free up storage > Uninstall apps
- SYSTEM_STORAGE_FREE_UP_STORAGE_UNINSTALL_APPS = 0x17522000;
-
// TvSettings > System > Ambient mode
SYSTEM_AMBIENT = 0x17600000;
@@ -843,12 +806,6 @@
// TvSettings > System > Energy saver > Turn off display after > Never
SYSTEM_ENERGYSAVER_START_DELAY_NEVER = 0x17717000;
- // TvSettings > System > Power & Energy
- SYSTEM_POWER_AND_ENERGY = 0x17E00000;
-
- // TvSettings > System > Power & Energy > Eco settings
- SYSTEM_POWER_AND_ENERGY_ECO_SETTINGS = 0x17E10000;
-
// TvSettings > System > Accessibility
SYSTEM_A11Y = 0x17800000;
@@ -1022,9 +979,6 @@
// TvSettings > System > Accessibility > Switch Access > Configuration
SYSTEM_A11Y_SWITCH_ACCESS_CONFIG = 0x17882000;
- // TvSettings > System > Accessibility > Audio Description (Toggle)
- SYSTEM_A11Y_AUDIO_DESCRIPTION = 0x17890000;
-
// TvSettings > System > Reboot
SYSTEM_REBOOT = 0x17900000;
diff --git a/stats/enums/app/wearsettings_enums.proto b/stats/enums/app/wearsettings_enums.proto
deleted file mode 100644
index b85114c..0000000
--- a/stats/enums/app/wearsettings_enums.proto
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Copyright (C) 2022 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.wearsettings;
-
-option java_outer_classname = "WearSettingsEnums";
-
-// The action performed for a settings event.
-// Next ID: 4
-enum Action {
- ACTION_UNKNOWN = 0;
-
- // Indicates that an item was click on.
- ACTION_CLICKED = 1;
-
- // Indicates a toggle was toggled on
- ACTION_TOGGLED_ON = 2;
-
- // Indicates a toggle was toggled off
- ACTION_TOGGLED_OFF = 3;
-}
-
-// IDs for settings UI elements.
-// Next ID: 392
-enum ItemId {
- // An unknown settings item. This may be set if no preference key is mapped to an enum value or as
- // a catch-all for values not yet added to this proto file.
- UNKNOWN = 0;
-
- ACCESSIBILITY_COLOR_INVERSION = 103;
- ACCESSIBILITY_FONT_SIZE = 369;
- ACCESSIBILITY_LARGE_TEXT = 102;
- ACCESSIBILITY_MAGNIFICATION = 104;
- ACCESSIBILITY_SERVICE = 314;
- ACCESSIBILITY_SIDE_BUTTON = 105;
- ACCESSIBILITY_SOUND = 370;
- ACCESSIBILITY_TALKBACK = 390;
- ACCESSIBILITY_TRIPLE_PRESS_GESTURE = 376;
- ACCESSIBILITY_TTS = 106;
- ACCESSIBILITY_TTS_ENGINE = 313;
- ACCESSIBILITY_TTS_ENGINE_DEFAULT = 107;
- ACCESSIBILITY_TTS_ENGINE_LANGUAGE = 108;
- ACCESSIBILITY_TTS_ENGINE_LISTENTOSAMPLE = 109;
- ACCESSIBILITY_TTS_RATES = 110;
- ACCESSIBILITY_VIBRATION = 371;
- ACCOUNTS_ADD_ACCOUNT = 115;
- ACCOUNT_REMOVE_ACCOUNT = 230;
- ACTIVE_DEVICE_ADMINS = 113;
- APPS_APP_NOTIFICATIONS = 342;
- APPS_APP_STORAGE = 367;
- APPS_ASSISTANT = 366;
- APPS_ASSISTANT_ACCESS = 356;
- APPS_BUTTONS = 141;
- APPS_DND_OPTIONS = 178;
- APPS_VIP_CONTACTS = 343;
- APP_DETAILS_ADVANCED = 116;
- APP_DETAILS_ADVANCED_PERMISSIONS_DRAW_OVERLAY = 117;
- APP_DETAILS_ADVANCED_PERMISSIONS_WRITE_SETTINGS = 118;
- APP_DETAILS_CACHE = 142;
- APP_DETAILS_CLEAR_CACHE = 155;
- APP_DETAILS_CLEAR_DATA = 156;
- APP_DETAILS_CLEAR_DATA_MANAGED = 391;
- APP_DETAILS_DATA = 160;
- APP_DETAILS_FORCE_STOP = 195;
- APP_DETAILS_PERMISSIONS = 24;
- APP_DETAILS_STORAGE = 256;
- APP_DETAILS_UNINSTALL = 264;
- ASSISTANT_HOTWORD_DETECTION = 197;
- ASSISTANT_LONG_PRESS_TO_ASSISTANT = 336;
- ASSISTANT_VOICE_ASSISTANT = 309;
- BATTERY_SAVER_AUTO_BATTERY_SAVER_ENABLED = 324;
- BATTERY_SAVER_BATTERY_SAVER = 315;
- BLUETOOTH_ENABLED = 135;
- BLUETOOTH_HFP = 136;
- BLUETOOTH_SCAN = 137;
- BRIGHTNESS_AUTOMATIC_BRIGHTNESS = 357;
- BRIGHTNESS_AUTOMATIC_BRIGHTNESS_SLIDER = 379;
- CELLULAR_ACCESS_POINT_NAMES = 111;
- CELLULAR_ACCOUNTS = 112;
- CELLULAR_ADVANCED_ENHANCED_4G_LTE = 335;
- CELLULAR_ADVANCED_NETWORK_OPERATORS = 218;
- CELLULAR_ADVANCED_PREFERRED_NETWORK = 228;
- CELLULAR_ADVANCED_SETTINGS = 119;
- CELLULAR_CALL_FORWARDING = 144;
- CELLULAR_CALL_FORWARDING_HELP = 196;
- CELLULAR_CALL_FORWARDING_IOS = 145;
- CELLULAR_CALL_FORWARDING_TURN_OFF = 261;
- CELLULAR_CALL_FORWARDING_TURN_ON = 262;
- CELLULAR_CHANGE_SIM_PIN = 319;
- CELLULAR_DATA_CONNECTIVITY = 161;
- CELLULAR_DATA_ROAMING = 162;
- CELLULAR_DATA_USAGE = 163;
- CELLULAR_DATA_USAGE_APP_USAGE = 164;
- CELLULAR_DATA_USAGE_CYCLE_DAY = 165;
- CELLULAR_DATA_USAGE_LIMIT_ENABLE = 166;
- CELLULAR_DATA_USAGE_LIMIT_VALUE = 167;
- CELLULAR_DATA_USAGE_WARNING_LEVEL = 168;
- CELLULAR_DEFAULT_SMS = 175;
- CELLULAR_EMERGENCY_NOTIFICATIONS = 185;
- CELLULAR_ENABLE_WIFI_WHEN_CHARGING = 186;
- CELLULAR_LOCK_SIM_TOGGLE = 290;
- CELLULAR_PHONE_NUMBER = 224;
- CELLULAR_RESUME_DATA = 232;
- CELLULAR_SIM_STATUS = 241;
- CELLULAR_SIM_STATUS_ICCID = 242;
- CELLULAR_SIM_STATUS_IMEI = 243;
- CELLULAR_SIM_STATUS_IMEISV = 244;
- CELLULAR_SIM_STATUS_NETWORK = 245;
- CELLULAR_SIM_STATUS_NETWORK_STATE = 246;
- CELLULAR_SIM_STATUS_NETWORK_TYPE = 247;
- CELLULAR_SIM_STATUS_PHONE_NUMBER = 248;
- CELLULAR_SIM_STATUS_ROAMING_STATE = 249;
- CELLULAR_SIM_STATUS_SERVICE_STATE = 250;
- CELLULAR_SIM_STATUS_SIGNAL_STRENGTH = 251;
- CELLULAR_TOGGLE = 152;
- CELLULAR_TOGGLE_V2 = 153;
- CELLULAR_TWINNING = 263;
- CELLULAR_TWINNING_CALLS = 143;
- CELLULAR_TWINNING_TEXT = 259;
- CELLULAR_UNLOCK_SIM = 265;
- CELLULAR_VOICEMAIL_NUMBER = 269;
- CONNECTIVITY_AIRPLANE_MODE = 120;
- CONNECTIVITY_BLUETOOTH = 133;
- CONNECTIVITY_CELLULAR = 20;
- CONNECTIVITY_NFC = 219;
- CONNECTIVITY_WIFI = 8;
- DATE_TIME_AUTO_DATE_TIME = 129;
- DATE_TIME_AUTO_TIME_ZONE = 130;
- DATE_TIME_HOUR_FORMAT = 198;
- DATE_TIME_MANUAL_DATE = 211;
- DATE_TIME_MANUAL_TIME = 212;
- DATE_TIME_MANUAL_TIMEZONE = 213;
- DEVELOPER_ADB_DEBUGGING = 114;
- DEVELOPER_ANIMATOR_DURATION_SCALE = 286;
- DEVELOPER_BT_SNOOP_LOG = 138;
- DEVELOPER_BUGREPORT = 139;
- DEVELOPER_CELLULAR_BATTERY_SAVER = 151;
- DEVELOPER_CLEAR_ADB_KEYS = 154;
- DEVELOPER_CONNECTIVITY_VIBRATE = 159;
- DEVELOPER_DEBUG_LAYOUT = 170;
- DEVELOPER_DEBUG_OVERDRAW = 172;
- DEVELOPER_DEBUG_OVER_BLUETOOTH = 171;
- DEVELOPER_DEBUG_OVER_WIFI = 173;
- DEVELOPER_DEBUG_TIMING = 174;
- DEVELOPER_DPI_SETTINGS = 183;
- DEVELOPER_FORCE_RTL_LAYOUT = 358;
- DEVELOPER_LOGPERSIST = 311;
- DEVELOPER_LOG_BUFFER_SIZE = 310;
- DEVELOPER_MOCK_LOCATION_APP = 377;
- DEVELOPER_POINTER_LOCATION = 226;
- DEVELOPER_POWER_OPTIMIZATIONS = 227;
- DEVELOPER_SHOW_TOUCHES = 240;
- DEVELOPER_SMART_ILLUMINATE = 252;
- DEVELOPER_STAY_ON_WHILE_PLUGGED_IN = 255;
- DEVELOPER_TRANSITION_ANIMATION_SCALE = 303;
- DEVELOPER_WEAR_DEVELOPER_OPTIONS = 272;
- DEVELOPER_WIFI_LOGGING = 277;
- DEVELOPER_WINDOW_ANIMATION_SCALE = 304;
- DEVICE_INFO_BATTERY_INFO = 132;
- DEVICE_INFO_CONNECTION_STATUS = 158;
- DEVICE_INFO_DEVICE_NAME = 177;
- DEVICE_INFO_IMEI = 199;
- DEVICE_INFO_LEGAL_NOTICES = 203;
- DEVICE_INFO_MODEL = 215;
- DEVICE_INFO_MSN = 217;
- DEVICE_INFO_SERIAL = 238;
- DEVICE_INFO_VERSION = 266;
- DEVICE_VERSION_BUILD = 140;
- DISPLAY_ALWAYS_ON_SCREEN = 126;
- DISPLAY_BRIGHTNESS = 287;
- DISPLAY_FONT_SIZE = 289;
- DISPLAY_MANUAL_BRIGHTNESS_SLIDER = 380;
- // Item for high brightness-mode/sunlight boost
- DISPLAY_PRAISE_THE_SUN = 355;
- DISPLAY_SCREEN_ORIENTATION = 305;
- DISPLAY_SCREEN_TIMEOUT = 339;
- DISPLAY_WRIST_ORIENTATION = 368;
- DND_OPTIONS_ALARMS = 179;
- DND_OPTIONS_CALLS = 180;
- DND_OPTIONS_EVENTS = 181;
- DND_OPTIONS_REMINDERS = 182;
- EMERGENCY_ALERTS_ALERT_REMINDER = 122;
- EMERGENCY_ALERTS_ALERT_SOUND_DURATION = 123;
- EMERGENCY_ALERTS_ALERT_VIBRATE = 124;
- EMERGENCY_ALERTS_AMBER_ALERTS = 127;
- EMERGENCY_ALERTS_CMAS_TEST_ALERTS = 157;
- EMERGENCY_ALERTS_ETWS_TEST_ALERTS = 187;
- EMERGENCY_ALERTS_EXTREME_THREATS = 192;
- EMERGENCY_ALERTS_SEVERE_THREATS = 239;
- ESIM_ERASE_ESIM = 354;
- ESIM_PHONE_NUMBER = 352;
- ESIM_PROFILE = 345;
- ESIM_PROFILE_DELETE = 351;
- ESIM_PROFILE_DISABLE = 350;
- ESIM_PROFILE_ENABLE = 349;
- ESIM_SIM_STATUS_EID = 353;
- ESIM_STATUS = 348;
- ESIM_TEST_ACTIVATION_STATE = 360;
- ESIM_TEST_PROFILES = 363;
- ESIM_TEST_TEXT_TWINNING_STATE = 361;
- ESIM_TEST_UTIL = 359;
- ESIM_TEST_VOICE_TWINNING_STATE = 362;
- FACTORY_RESET = 193;
- GESTURES_TILT_TO_BRIGHT = 344;
- GESTURES_TILT_TO_WAKE = 260;
- GESTURES_TOUCH_TO_WAKE = 320;
- GO_TO_WATCH_FACE = 381;
- HEALTH_GENDER = 384;
- HEALTH_HEIGHT = 386;
- HEALTH_WEIGHT = 385;
- INPUT_ADD_VIRTUAL_KEYBOARD_SCREEN = 317;
- INPUT_SMART_REPLY = 253;
- LOCATION_LOCATION_FROM_PHONE_TOGGLE = 337;
- LOCATION_LOCATION_FROM_WATCH_TOGGLE = 338;
- LOCATION_LOCATION_TOGGLE = 210;
- LOCATION_PERMISSION_APPS = 372;
- MAIN_ACCESSIBILITY = 291;
- MAIN_ACCOUNTS_AND_SECURITY = 347;
- MAIN_APPS = 292;
- MAIN_ASSISTANT = 378;
- MAIN_BATTERY_SAVER = 387;
- MAIN_BATTERY_SAVER_SUGGESTED_SETTINGS = 316;
- MAIN_CONNECTIVITY = 294;
- MAIN_DEVELOPER_OPTIONS = 288;
- MAIN_DISPLAY = 295;
- MAIN_GENERAL = 340;
- MAIN_GESTURES = 296;
- MAIN_GOOGLE = 382;
- MAIN_HEALTH = 383;
- MAIN_LOCATION = 346;
- MAIN_SAFETY = 388;
- MAIN_SOUND_NOTIFICATION = 254;
- MAIN_SYSTEM = 298;
- MAIN_VIBRATION = 364;
- NFC_TAP_AND_PAY = 258;
- POWER_OFF = 299;
- PREPAIR_ACCESSIBILITY = 300;
- PREPAIR_EMERGENCY_DIALER = 184;
- REGULATORY_INFO = 229;
- RESTART = 231;
- SCREEN_ORIENTATION_LEFT_WRIST = 306;
- SCREEN_ORIENTATION_RIGHT_WRIST = 307;
- SECURE_ADB_CANCEL = 234;
- SECURE_ADB_FINGERPRINT = 235;
- SECURE_ADB_OK = 236;
- SECURE_ADB_ALLOWLIST = 237;
- SECURITY_DEVICE_ADMINISTRATION = 176;
- SECURITY_LOCKSCREEN = 301;
- SECURITY_LOCKSCREEN_NONE = 220;
- SECURITY_LOCKSCREEN_PATTERN = 222;
- SECURITY_LOCKSCREEN_PIN = 225;
- SECURITY_LOCK_SCREEN_NOW = 312;
- SOUND_ACCESSIBILITY_VOLUME = 322;
- SOUND_ALARM_VOLUME = 121;
- SOUND_CALL_VOLUME = 365;
- SOUND_MEDIA_VOLUME = 214;
- SOUND_RING_VOLUME = 233;
- SOUND_WATCH_RINGTONE = 271;
- SYSTEM_ABOUT = 18;
- SYSTEM_DATE_TIME = 169;
- SYSTEM_INPUT_METHODS = 201;
- SYSTEM_SYSTEM_UPDATE = 257;
- VIBRATION_LEVEL = 268;
- VIBRATION_MUTE_WHEN_OFF_BODY = 318;
- VIBRATION_VIBRATE_FOR_CALLS = 267;
- VIBRATION_VIBRATE_FOR_RSB = 389;
- WIFI_ABOUT = 274;
- WIFI_ADD_NETWORK = 275;
- WIFI_AVAILABLE_NETWORKS_GROUP = 131;
- WIFI_CURRENT_NETWORK = 276;
- WIFI_FORGET_NETWORK = 328;
- WIFI_OLD = 278;
- WIFI_OPEN_ON_PHONE = 327;
- WIFI_OPEN_ON_WATCH = 326;
- WIFI_RETRY = 325;
- WIFI_SAVED_NETWORKS = 279;
- WIFI_TOGGLE = 280;
- WIFI_VIEW_IP_ADDRESS = 281;
- WIFI_VIEW_MAC_ADDRESS = 282;
-}
diff --git a/stats/enums/bluetooth/Android.bp b/stats/enums/bluetooth/Android.bp
index 2bf64eb..c4edb73 100644
--- a/stats/enums/bluetooth/Android.bp
+++ b/stats/enums/bluetooth/Android.bp
@@ -32,17 +32,5 @@
"hfp/enums.proto",
"smp/enums.proto",
],
- min_sdk_version: "30",
-}
-
-filegroup {
- name: "srcs_bluetooth_protos",
- srcs: [
- "a2dp/enums.proto",
- "enums.proto",
- "hci/enums.proto",
- "hfp/enums.proto",
- "smp/enums.proto",
- ],
}
diff --git a/stats/enums/bluetooth/enums.proto b/stats/enums/bluetooth/enums.proto
index 66b4371..dc60ede 100644
--- a/stats/enums/bluetooth/enums.proto
+++ b/stats/enums/bluetooth/enums.proto
@@ -98,7 +98,6 @@
BOND_SUB_STATE_LOCAL_PIN_REPLIED = 3;
BOND_SUB_STATE_LOCAL_SSP_REQUESTED = 4;
BOND_SUB_STATE_LOCAL_SSP_REPLIED = 5;
- BOND_SUB_STATE_LOCAL_BOND_STATE_INTENT_SENT = 6;
}
enum UnbondReasonEnum {
@@ -141,65 +140,3 @@
SOCKET_ROLE_LISTEN = 1;
SOCKET_ROLE_CONNECTION = 2;
}
-
-enum CodePathCounterKeyEnum {
- KEY_UNKNOWN = 0;
- // Reserver smaller counters for very important bt features
-
- // [100,000 - 120,000) profile connection related
-
- // [100,000 - 100,100) L2CAP
- L2CAP_SUCCESS = 100000;
- L2CAP_CONNECT_CONFIRM_NEG= 100001;
- L2CAP_NO_COMPATIBLE_CHANNEL_AT_CSM_CLOSED = 100002;
- L2CAP_SECURITY_NEG_AT_CSM_CLOSED= 100003;
- L2CAP_TIMEOUT_AT_CSM_CLOSED = 100004;
- L2CAP_CREDIT_BASED_CONNECT_RSP_NEG = 100005;
- L2CAP_CONNECT_RSP_NEG = 100006;
- L2CAP_INFO_NO_COMPATIBLE_CHANNEL_AT_RSP = 100007;
- L2CAP_CONFIG_REQ_FAILURE = 100008;
- L2CAP_CONFIG_RSP_NEG = 100009;
- L2CAP_NO_COMPATIBLE_CHANNEL_AT_W4_SEC = 100010;
- L2CAP_SECURITY_NEG_AT_W4_SEC= 100011;
- L2CAP_TIMEOUT_AT_CONNECT_RSP = 100012;
- L2CAP_CONN_OTHER_ERROR_AT_CONNECT_RSP = 100013;
-
- // [100,100 - 100,200) SDP
- SDP_SUCCESS = 100100;
- SDP_FAILURE = 100101;
-
- // [101,000 - 102,000) HFP
-
- // [101,000 - 101,100) RFCOMM
- RFCOMM_CONNECTION_SUCCESS_IND = 101000;
- RFCOMM_CONNECTION_SUCCESS_CNF = 101001;
- RFCOMM_PORT_START_CNF_FAILED = 101002;
- RFCOMM_PORT_START_CLOSE = 101003;
- RFCOMM_PORT_START_FAILED = 101004;
- RFCOMM_PORT_NEG_FAILED = 101005;
- RFCOMM_PORT_CLOSED = 101006;
- RFCOMM_PORT_PEER_CONNECTION_FAILED = 101007;
- RFCOMM_PORT_PEER_TIMEOUT = 101008;
-
- // [101,100 - 101,200) HFP (btif)
-
- // [102,000 - 103,000) A2DP
- A2DP_CONNECTION_SUCCESS = 102000;
- A2DP_CONNECTION_ACL_DISCONNECTED = 102001;
- A2DP_CONNECTION_REJECT_EVT = 102002;
- A2DP_CONNECTION_FAILURE = 102003;
- A2DP_CONNECTION_UNKNOWN_EVENT = 102004;
- A2DP_ALREADY_CONNECTING = 102005;
- A2DP_OFFLOAD_START_REQ_FAILURE = 102006;
- A2DP_CONNECTION_CLOSE = 102007;
- A2DP_CONNECTION_DISCONNECTED = 102008;
- A2DP_CONNECTION_TIMEOUT = 102009;
-
-}
-
-enum AddressTypeEnum {
- ADDRESS_TYPE_PUBLIC = 0;
- ADDRESS_TYPE_RANDOM = 1;
- ADDRESS_TYPE_UNKNOWN = 0xFFFF;
-}
-
diff --git a/stats/enums/bluetooth/leaudio/enums.proto b/stats/enums/bluetooth/leaudio/enums.proto
deleted file mode 100644
index b680b19..0000000
--- a/stats/enums/bluetooth/leaudio/enums.proto
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2022 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.leaudio;
-
-option java_outer_classname = "BluetoothLeAudioProtoEnums";
-option java_multiple_files = true;
-
-
-enum ContextType {
- CONTEXT_TYPE_INVALID = 0;
- CONTEXT_TYPE_UNSPECIFIED = 1;
- CONTEXT_TYPE_COMMUNICATION = 2;
- CONTEXT_TYPE_MEDIA = 3;
- CONTEXT_TYPE_INSTRUCTIONAL = 4;
- CONTEXT_TYPE_ATTENTION_SEEKING = 5;
- CONTEXT_TYPE_IMMEDIATE_ALERT = 6;
- CONTEXT_TYPE_MAN_MACHINE = 7;
- CONTEXT_TYPE_EMERGENCY_ALERT = 8;
- CONTEXT_TYPE_RINGTONE = 9;
- CONTEXT_TYPE_TV = 10;
- CONTEXT_TYPE_LIVE = 11;
- CONTEXT_TYPE_GAME = 12;
-}
-
-enum ConnectionStatus {
- CONNECTION_STATUS_UNKNOWN = 0;
- CONNECTION_STATUS_SUCCESS = 1;
- CONNECTION_STATUS_FAILED = 2;
-}
diff --git a/stats/enums/contexthub/enums.proto b/stats/enums/contexthub/enums.proto
deleted file mode 100644
index 22bf6f8..0000000
--- a/stats/enums/contexthub/enums.proto
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2021 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.contexthub;
-
-option java_outer_classname = "ContextHubProtoEnums";
-option java_multiple_files = true;
-
-/**
- * Corresponds to error codes defined in ContextHubTransaction.java.
- */
-enum ContextHubTransactionResult {
- TRANSACTION_RESULT_SUCCESS = 0;
- TRANSACTION_RESULT_FAILED_UNKNOWN = 1;
- TRANSACTION_RESULT_FAILED_BAD_PARAMS = 2;
- TRANSACTION_RESULT_FAILED_UNINITIALIZED = 3;
- TRANSACTION_RESULT_FAILED_BUSY = 4;
- TRANSACTION_RESULT_FAILED_AT_HUB = 5;
- TRANSACTION_RESULT_FAILED_TIMEOUT = 6;
- TRANSACTION_RESULT_FAILED_SERVICE_INTERNAL_FAILURE = 7;
- TRANSACTION_RESULT_FAILED_HAL_UNAVAILABLE = 8;
-}
diff --git a/stats/enums/hardware/biometrics/enums.proto b/stats/enums/hardware/biometrics/enums.proto
index e59a7b4..f2e0638 100644
--- a/stats/enums/hardware/biometrics/enums.proto
+++ b/stats/enums/hardware/biometrics/enums.proto
@@ -57,10 +57,4 @@
ISSUE_UNKNOWN_TEMPLATE_ENROLLED_HAL = 3;
// When the HAL has not sent ERROR_CANCELED within the specified timeout.
ISSUE_CANCEL_TIMED_OUT = 4;
-}
-
-enum SessionTypeEnum {
- SESSION_TYPE_UNKNOWN = 0;
- SESSION_TYPE_KEYGUARD_ENTRY = 1;
- SESSION_TYPE_BIOMETRIC_PROMPT = 2;
}
\ No newline at end of file
diff --git a/stats/enums/hotword/enums.proto b/stats/enums/hotword/enums.proto
deleted file mode 100644
index 8409a61..0000000
--- a/stats/enums/hotword/enums.proto
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2022 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.hotword;
-
-/**
- * The type of hotword detector
- */
-enum HotwordDetectorType {
- // Indicates that it is a non-trusted hotword detector.
- NORMAL_DETECTOR = 0;
- // Indicates that it is a DSP trusted hotword detector.
- TRUSTED_DETECTOR_DSP = 1;
- // Indicates that it is a software trusted hotword detector.
- TRUSTED_DETECTOR_SOFTWARE = 2;
-}
-
diff --git a/stats/enums/media/audio/enums.proto b/stats/enums/media/audio/enums.proto
deleted file mode 100644
index 3b41828..0000000
--- a/stats/enums/media/audio/enums.proto
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (C) 2021 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.media.audio;
-
-// The event (method) associated with the AudioRecord (e.g. create, start,
-// stop, etc.)
-enum AudioRecordEvent {
- AUDIO_RECORD_EVENT_UNKNOWN = 0;
- AUDIO_RECORD_EVENT_CREATE = 1;
-}
-
-// The event (method) associated with the AudioTrack (e.g. create, start,
-// pause, etc.)
-enum AudioTrackEvent {
- AUDIO_TRACK_EVENT_UNKNOWN = 0;
- AUDIO_TRACK_EVENT_CREATE = 1;
-}
-
-// An enumeration from system/media/audio/include/system/audio-hal-enums.h
-// audio_content_type_t, representing the content type of the AudioTrack.
-enum ContentType {
- // Note: The first value in an enum must map to zero.
- // Mapping the first value to zero ensures the default behavior
- // is consistent between proto2 and proto3.
- CONTENT_TYPE_UNKNOWN = 0;
- CONTENT_TYPE_INVALID = -1;
- CONTENT_TYPE_SPEECH = 1;
- CONTENT_TYPE_MUSIC = 2;
- CONTENT_TYPE_MOVIE = 3;
- CONTENT_TYPE_SONIFICATION = 4;
-}
-
-// An enumeration from system/media/audio/include/system/audio-hal-enums.h
-// audio_format_t, representing the encoding of the AudioTrack data.
-enum Encoding {
- // AUDIO_FORMAT_DEFAULT may alias as UNKNOWN if enum value not listed below.
- AUDIO_FORMAT_DEFAULT = 0;
- AUDIO_FORMAT_PCM_16_BIT = 0x1;
- AUDIO_FORMAT_PCM_8_BIT = 0x2;
- AUDIO_FORMAT_PCM_32_BIT = 0x3;
- AUDIO_FORMAT_PCM_8_24_BIT = 0x4;
- AUDIO_FORMAT_PCM_FLOAT = 0x5;
- AUDIO_FORMAT_PCM_24_BIT_PACKED = 0x6;
- AUDIO_FORMAT_MP3 = 0x1000000;
- AUDIO_FORMAT_AMR_NB = 0x2000000;
- AUDIO_FORMAT_AMR_WB = 0x3000000;
- AUDIO_FORMAT_AAC = 0x4000000;
- AUDIO_FORMAT_AAC_MAIN = 0x4000001;
- AUDIO_FORMAT_AAC_LC = 0x4000002;
- AUDIO_FORMAT_AAC_SSR = 0x4000004;
- AUDIO_FORMAT_AAC_LTP = 0x4000008;
- AUDIO_FORMAT_AAC_HE_V1 = 0x4000010;
- AUDIO_FORMAT_AAC_SCALABLE = 0x4000020;
- AUDIO_FORMAT_AAC_ERLC = 0x4000040;
- AUDIO_FORMAT_AAC_LD = 0x4000080;
- AUDIO_FORMAT_AAC_HE_V2 = 0x4000100;
- AUDIO_FORMAT_AAC_ELD = 0x4000200;
- AUDIO_FORMAT_AAC_XHE = 0x4000300;
- AUDIO_FORMAT_HE_AAC_V1 = 0x5000000;
- AUDIO_FORMAT_HE_AAC_V2 = 0x6000000;
- AUDIO_FORMAT_VORBIS = 0x7000000;
- AUDIO_FORMAT_OPUS = 0x8000000;
- AUDIO_FORMAT_AC3 = 0x9000000;
- AUDIO_FORMAT_E_AC3 = 0xa000000;
- AUDIO_FORMAT_E_AC3_JOC = 0xa000001;
- AUDIO_FORMAT_DTS = 0xb000000;
- AUDIO_FORMAT_DTS_HD = 0xc000000;
- AUDIO_FORMAT_IEC61937 = 0xd000000;
- AUDIO_FORMAT_DOLBY_TRUEHD = 0xe000000;
- AUDIO_FORMAT_EVRC = 0x10000000;
- AUDIO_FORMAT_EVRCB = 0x11000000;
- AUDIO_FORMAT_EVRCWB = 0x12000000;
- AUDIO_FORMAT_EVRCNW = 0x13000000;
- AUDIO_FORMAT_AAC_ADIF = 0x14000000;
- AUDIO_FORMAT_WMA = 0x15000000;
- AUDIO_FORMAT_WMA_PRO = 0x16000000;
- AUDIO_FORMAT_AMR_WB_PLUS = 0x17000000;
- AUDIO_FORMAT_MP2 = 0x18000000;
- AUDIO_FORMAT_QCELP = 0x19000000;
- AUDIO_FORMAT_DSD = 0x1a000000;
- AUDIO_FORMAT_FLAC = 0x1b000000;
- AUDIO_FORMAT_ALAC = 0x1c000000;
- AUDIO_FORMAT_APE = 0x1d000000;
- AUDIO_FORMAT_AAC_ADTS = 0x1e000000;
- AUDIO_FORMAT_AAC_ADTS_MAIN = 0x1e000001;
- AUDIO_FORMAT_AAC_ADTS_LC = 0x1e000002;
- AUDIO_FORMAT_AAC_ADTS_SSR = 0x1e000004;
- AUDIO_FORMAT_AAC_ADTS_LTP = 0x1e000008;
- AUDIO_FORMAT_AAC_ADTS_HE_V1 = 0x1e000010;
- AUDIO_FORMAT_AAC_ADTS_SCALABLE = 0x1e000020;
- AUDIO_FORMAT_AAC_ADTS_ERLC = 0x1e000040;
- AUDIO_FORMAT_AAC_ADTS_LD = 0x1e000080;
- AUDIO_FORMAT_AAC_ADTS_HE_V2 = 0x1e000100;
- AUDIO_FORMAT_AAC_ADTS_ELD = 0x1e000200;
- AUDIO_FORMAT_AAC_ADTS_XHE = 0x1e000300;
- AUDIO_FORMAT_SBC = 0x1f000000;
- AUDIO_FORMAT_APTX = 0x20000000;
- AUDIO_FORMAT_APTX_HD = 0x21000000;
- AUDIO_FORMAT_AC4 = 0x22000000;
- AUDIO_FORMAT_LDAC = 0x23000000;
- AUDIO_FORMAT_MAT = 0x24000000;
- AUDIO_FORMAT_MAT_1_0 = 0x24000001;
- AUDIO_FORMAT_MAT_2_0 = 0x24000002;
- AUDIO_FORMAT_MAT_2_1 = 0x24000003;
- AUDIO_FORMAT_AAC_LATM = 0x25000000;
- AUDIO_FORMAT_AAC_LATM_LC = 0x25000002;
- AUDIO_FORMAT_AAC_LATM_HE_V1 = 0x25000010;
- AUDIO_FORMAT_AAC_LATM_HE_V2 = 0x25000100;
- AUDIO_FORMAT_CELT = 0x26000000;
- AUDIO_FORMAT_APTX_ADAPTIVE = 0x27000000;
- AUDIO_FORMAT_LHDC = 0x28000000;
- AUDIO_FORMAT_LHDC_LL = 0x29000000;
- AUDIO_FORMAT_APTX_TWSP = 0x2a000000;
- AUDIO_FORMAT_LC3 = 0x2b000000;
- AUDIO_FORMAT_MPEGH = 0x2c000000;
- AUDIO_FORMAT_MPEGH_BL_L3 = 0x2c000013;
- AUDIO_FORMAT_MPEGH_BL_L4 = 0x2c000014;
- AUDIO_FORMAT_MPEGH_LC_L3 = 0x2c000023;
- AUDIO_FORMAT_MPEGH_LC_L4 = 0x2c000024;
- AUDIO_FORMAT_IEC60958 = 0x2d000000;
- AUDIO_FORMAT_DTS_UHD = 0x2e000000;
- AUDIO_FORMAT_DRA = 0x2f000000;
-}
-
-// An enumeration from system/media/audio/include/system/audio-hal-enums.h
-// audio_source_t, representing the input source for the AudioRecord.
-// Keep in sync with audio-hal-enums.h.
-enum Source {
- // Note: The first value in an enum must map to zero.
- // Mapping the first value to zero ensures the default behavior
- // is consistent between proto2 and proto3.
- AUDIO_SOURCE_DEFAULT = 0; // may alias as UNKNOWN
- AUDIO_SOURCE_INVALID = -1;
- AUDIO_SOURCE_MIC = 1;
- AUDIO_SOURCE_VOICE_UPLINK = 2;
- AUDIO_SOURCE_VOICE_DOWNLINK = 3;
- AUDIO_SOURCE_VOICE_CALL = 4;
- AUDIO_SOURCE_CAMCORDER = 5;
- AUDIO_SOURCE_VOICE_RECOGNITION = 6;
- AUDIO_SOURCE_VOICE_COMMUNICATION = 7;
- AUDIO_SOURCE_REMOTE_SUBMIX = 8;
- AUDIO_SOURCE_UNPROCESSED = 9;
- AUDIO_SOURCE_VOICE_PERFORMANCE = 10;
- AUDIO_SOURCE_ECHO_REFERENCE = 1997;
- AUDIO_SOURCE_FM_TUNER = 1998;
- AUDIO_SOURCE_HOTWORD = 1999;
-}
-
-// An enumeration from system/media/audio/include/system/audio-hal-enums.h
-// audio_usage_t, representing the use case for the AudioTrack.
-enum Usage {
- AUDIO_USAGE_UNKNOWN = 0;
- AUDIO_USAGE_MEDIA = 1;
- AUDIO_USAGE_VOICE_COMMUNICATION = 2;
- AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING = 3;
- AUDIO_USAGE_ALARM = 4;
- AUDIO_USAGE_NOTIFICATION = 5;
- AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE = 6;
- AUDIO_USAGE_NOTIFICATION_EVENT = 10;
- AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY = 11;
- AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE = 12;
- AUDIO_USAGE_ASSISTANCE_SONIFICATION = 13;
- AUDIO_USAGE_GAME = 14;
- AUDIO_USAGE_VIRTUAL_SOURCE = 15;
- AUDIO_USAGE_ASSISTANT = 16;
- AUDIO_USAGE_CALL_ASSISTANT = 17;
- AUDIO_USAGE_EMERGENCY = 1000;
- AUDIO_USAGE_SAFETY = 1001;
- AUDIO_USAGE_VEHICLE_STATUS = 1002;
- AUDIO_USAGE_ANNOUNCEMENT = 1003;
-}
diff --git a/stats/enums/media/enums.proto b/stats/enums/media/enums.proto
deleted file mode 100644
index 7a20b67..0000000
--- a/stats/enums/media/enums.proto
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2021 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.media;
-
-/*
- * Status for media errors are numbered by google3/google/rpc/code.proto
- *
- * Notes:
- * 1) The default for Status is "OK" not "UNKNOWN".
- * 2) android.media.Status is based on Android status codes, not http.
- * 3) We choose code.proto rather than negative numbers (signed status)
- * for numeric categorization.
- *
- * [Google3 proto] [android.media.Status]
- * OK = 0; 1 (NO_ERROR)
- * UNKNOWN = 2; 0 (ERROR_UNKNOWN)
- * INVALID_ARGUMENT = 3; 2 (ERROR_ARGUMENT)
- * DEADLINE_EXCEEDED = 4; 3 (ERROR_TIMEOUT)
- * PERMISSION_DENIED = 7; 4 (ERROR_SECURITY)
- * RESOURCE_EXHAUSTED = 8; 5 (ERROR_MEMORY)
- * FAILED_PRECONDITION = 9; 6 (ERROR_STATE)
- * UNAVAILABLE = 14; 7 (ERROR_IO)
- */
-enum Status {
- // See above for the numbering scheme.
- // We use ERROR_UNKNOWN = 0 as the default value should new error values
- // be sent to code not yet updated.
- ERROR_UNKNOWN = 0;
- // We use NO_ERROR to be visually distinct from an ERROR enumeration,
- // though it may flag a best practices warning.
- NO_ERROR = 1;
- ERROR_ARGUMENT = 2;
- ERROR_TIMEOUT = 3;
- ERROR_SECURITY = 4;
- ERROR_MEMORY = 5;
- ERROR_STATE = 6;
- ERROR_IO = 7;
-}
diff --git a/stats/enums/nearby/enums.proto b/stats/enums/nearby/enums.proto
deleted file mode 100644
index ae4b3e0..0000000
--- a/stats/enums/nearby/enums.proto
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2021 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.nearby;
-
-/**
- * State of Scan API
- */
-enum NearbyScanState {
- NEARBY_SCAN_STATE_UNSPECIFIED = 0;
-
- // Start scan
- NEARBY_SCAN_STATE_STARTED = 1;
-
- // Discover device
- NEARBY_SCAN_STATE_DISCOVERED = 2;
-
- // Stop scan
- NEARBY_SCAN_STATE_STOPPED = 3;
-
- // Lost device
- NEARBY_SCAN_STATE_LOST = 4;
-}
-
-/**
- * Type of Scan API
- */
-enum NearbyScanType {
- NEARBY_SCAN_TYPE_UNSPECIFIED = 0;
-
- // Scan for Nearby FastPair
- NEARBY_SCAN_TYPE_FAST_PAIR = 1;
-
- // Scan for Nearby Share
- NEARBY_SCAN_TYPE_NEARBY_SHARE = 2;
-
- // Scan for Nearby Presence
- NEARBY_SCAN_TYPE_NEARBY_PRESENCE = 3;
-
- // Scan for Exposure Notification
- NEARBY_SCAN_TYPE_EXPOSURE_NOTIFICATION = 4;
-}
-
-/**
- * Network medium of Scan API
- */
-enum NearbyNetworkMedium {
- NEARBY_NETWORK_MEDIUM_UNSPECIFIED = 0;
-
- // Scan over BLE
- NEARBY_NETWORK_MEDIUM_BLE = 1;
-
- // Scan over Bluetooth
- NEARBY_NETWORK_MEDIUM_BLUETOOTH = 2;
-
- // Scan over Wifi Aware
- NEARBY_NETWORK_MEDIUM_WIFI_AWARE = 3;
-
- // Scan over Wifi LAN
- NEARBY_NETWORK_MEDIUM_WIFI_LAN = 4;
-
- // Scan over NFC
- NEARBY_NETWORK_MEDIUM_NFC = 5;
-}
diff --git a/stats/enums/neuralnetworks/enums.proto b/stats/enums/neuralnetworks/enums.proto
deleted file mode 100644
index 90f8203..0000000
--- a/stats/enums/neuralnetworks/enums.proto
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2021 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.neuralnetworks;
-
-enum DataClass {
- DATA_CLASS_UNKNOWN = 0;
- DATA_CLASS_OTHER = 1;
- DATA_CLASS_FLOAT32 = 2;
- DATA_CLASS_FLOAT16 = 3;
- DATA_CLASS_QUANT = 4;
- DATA_CLASS_MIXED = 5;
-}
-
-enum Mode {
- MODE_UNKNOWN = 0;
-
- // Async execution.
- MODE_ASYNC = 1;
-
- // Sync execution.
- MODE_SYNC = 2;
-
- // Burst execution.
- MODE_BURST = 3;
-
- // Async with dependencies.
- MODE_ASYNC_WITH_DEPS = 4;
-}
-
-// Mirrors the types in packages/modules/NeuralNetworks/runtime/include/NeuralNetworksTypes.h.
-enum ResultCode {
- RESULT_CODE_NO_ERROR = 0;
- RESULT_CODE_OUT_OF_MEMORY = 1;
- RESULT_CODE_INCOMPLETE = 2;
- RESULT_CODE_UNEXPECTED_NULL = 3;
- RESULT_CODE_BAD_DATA = 4;
- RESULT_CODE_OP_FAILED = 5;
- RESULT_CODE_BAD_STATE = 6;
- RESULT_CODE_UNMAPPABLE = 7;
- RESULT_CODE_OUTPUT_INSUFFICIENT_SIZE = 8;
- RESULT_CODE_UNAVAILABLE_DEVICE = 9;
- RESULT_CODE_MISSED_DEADLINE_TRANSIENT = 10;
- RESULT_CODE_MISSED_DEADLINE_PERSISTENT = 11;
- RESULT_CODE_RESOURCE_EXHAUSTED_TRANSIENT = 12;
- RESULT_CODE_RESOURCE_EXHAUSTED_PERSISTENT = 13;
- RESULT_CODE_DEAD_OBJECT = 14;
- }
diff --git a/stats/enums/os/enums.proto b/stats/enums/os/enums.proto
index 04c8788..1b3ccd0 100644
--- a/stats/enums/os/enums.proto
+++ b/stats/enums/os/enums.proto
@@ -43,8 +43,6 @@
BATTERY_PLUGGED_USB = 2;
// Power source is wireless.
BATTERY_PLUGGED_WIRELESS = 4;
- // Power source is dock.
- BATTERY_PLUGGED_DOCK = 8;
}
// These constants are defined in hardware/interfaces/health/1.0/types.hal
diff --git a/stats/enums/server/display/enums.proto b/stats/enums/server/display/enums.proto
deleted file mode 100644
index cc83b1f..0000000
--- a/stats/enums/server/display/enums.proto
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2022 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.display;
-
-option java_outer_classname = "DisplayProtoEnums";
-option java_multiple_files = true;
-
-// Logging constants for DisplayService
-
-enum HbmState {
- // Unknown state
- HBM_UNKNOWN = 0;
- // HBM is off.
- HBM_OFF = 1;
- // HBM is on for HDR playback.
- HBM_ON_HDR = 2;
- // HBM is on for sunlight visibility.
- HBM_ON_SUNLIGHT = 3;
-}
-
-enum HbmStateTransitionReason {
- HBM_TRANSITION_REASON_UNKNOWN = 0;
- // Hbm sunlight visibility is off due to ambient light drop below threshold.
- HBM_SV_OFF_LUX_DROP = 1;
- // Hbm sunlight visibility is off due to out of time budget.
- HBM_SV_OFF_TIME_LIMIT = 2;
- // Hbm sunlight visibility is off due to thermal status exceeding threshold.
- HBM_SV_OFF_THERMAL_LIMIT = 3;
- // Hbm sunlight visibility is off due to HDR playing.
- HBM_SV_OFF_HDR_PLAYING = 4;
- // Hbm sunlight visibility is off due to battery saving is on.
- HBM_SV_OFF_BATTERY_SAVE_ON = 5;
- // Hbm sunlight visibility is off due to display off.
- HBM_SV_OFF_DISPLAY_OFF = 6;
- // Hbm sunlight visibility is off due to auto brightness off.
- HBM_SV_OFF_AUTOBRIGHTNESS_OFF = 7;
- // Hbm HDR is off due to thermal status exceeding threshold.
- HBM_HDR_OFF_THERMAL_LIMIT = 8;
- // Hbm sunlight visibility is off due to requested brightness is lower than
- // HBM transition point. Note if brightness is low due to thermal cap, the
- // reason will be HBM_SV_OFF_THERMAL_LIMIT.
- HBM_SV_OFF_LOW_REQUESTED_BRIGHTNESS = 9;
-}
diff --git a/stats/enums/stats/accessibility/accessibility_enums.proto b/stats/enums/stats/accessibility/accessibility_enums.proto
index 677c1bc..6b113d0 100644
--- a/stats/enums/stats/accessibility/accessibility_enums.proto
+++ b/stats/enums/stats/accessibility/accessibility_enums.proto
@@ -26,7 +26,6 @@
TRIPLE_TAP = 3;
A11Y_BUTTON_LONG_PRESS = 4;
A11Y_FLOATING_MENU = 5;
- A11Y_GESTURE = 6;
}
// The service status code.
@@ -43,31 +42,3 @@
MAGNIFICATION_WINDOW = 2;
MAGNIFICATION_ALL = 3;
}
-
-// The wraning status on UI.
-enum WarningStatus {
- WARNING_UNKNOWN = 0;
- WARNING_SHOWN = 1;
- WARNING_CLICKED = 2;
- WARNING_SERVICE_DISABLED = 3;
-}
-
-// The settings item of the "Text and reading options".
-enum TextReadingOption {
- TEXT_READING_UNKNOWN_ITEM = 0;
- TEXT_READING_FONT_SIZE = 1;
- TEXT_READING_DISPLAY_SIZE = 2;
- TEXT_READING_BOLD_TEXT = 3;
- TEXT_READING_HIGH_CONTRAST_TEXT = 4;
- TEXT_READING_RESET = 5;
-}
-
-// The entry point of the "Text and reading options".
-enum TextReadingEntry {
- TEXT_READING_UNKNOWN_ENTRY = 0;
- TEXT_READING_SUW_VISION_SETTINGS = 1;
- TEXT_READING_SUW_ANYTHING_ELSE = 2;
- TEXT_READING_DISPLAY_SETTINGS = 3;
- TEXT_READING_ACCESSIBILITY_SETTINGS = 4;
-}
-
diff --git a/stats/enums/stats/devicepolicy/device_policy_enums.proto b/stats/enums/stats/devicepolicy/device_policy_enums.proto
index 6ddb1e0..ad74b7b 100644
--- a/stats/enums/stats/devicepolicy/device_policy_enums.proto
+++ b/stats/enums/stats/devicepolicy/device_policy_enums.proto
@@ -231,13 +231,4 @@
GET_ACCOUNT_AUTH_TOKEN = 204;
RESET_PASSWORD = 205;
RESET_PASSWORD_WITH_TOKEN = 206;
- ROLE_HOLDER_PROVISIONING_START = 207;
- ROLE_HOLDER_PROVISIONING_FINISH = 208;
- ROLE_HOLDER_UPDATER_UPDATE_START = 209;
- ROLE_HOLDER_UPDATER_UPDATE_FINISH = 210;
- ROLE_HOLDER_UPDATER_UPDATE_RETRY = 211;
- ROLE_HOLDER_UPDATER_UPDATE_FAILED = 212;
- PLATFORM_ROLE_HOLDER_UPDATE_START = 213;
- PLATFORM_ROLE_HOLDER_UPDATE_FINISHED = 214;
- PLATFORM_ROLE_HOLDER_UPDATE_FAILED = 215;
}
diff --git a/stats/enums/stats/dnsresolver/dns_resolver.proto b/stats/enums/stats/dnsresolver/dns_resolver.proto
index 1eef2cd..ed9df9c 100644
--- a/stats/enums/stats/dnsresolver/dns_resolver.proto
+++ b/stats/enums/stats/dnsresolver/dns_resolver.proto
@@ -159,7 +159,6 @@
PROTO_TCP = 2;
PROTO_DOT = 3;
PROTO_DOH = 4;
- PROTO_MDNS = 5;
}
enum PrivateDnsModes {
@@ -375,18 +374,3 @@
message DnsQueryEvents {
repeated DnsQueryEvent dns_query_event = 1;
}
-
-enum HandshakeResult {
- HR_UNKNOWN = 0;
- HR_SUCCESS = 1;
- HR_TIMEOUT = 2;
- HR_TLS_FAIL = 3;
- HR_SERVER_UNREACHABLE = 4;
-}
-
-enum HandshakeCause {
- HC_UNKNOWN = 0;
- HC_SERVER_PROBE = 1;
- HC_RECONNECT_AFTER_IDLE = 2;
- HC_RETRY_AFTER_ERROR = 3;
-}
diff --git a/stats/enums/stats/hdmi/enums.proto b/stats/enums/stats/hdmi/enums.proto
index 7621663..acb8899 100644
--- a/stats/enums/stats/hdmi/enums.proto
+++ b/stats/enums/stats/hdmi/enums.proto
@@ -106,9 +106,6 @@
POWER_TOGGLE = 0x16B;
POWER_OFF = 0x16C;
POWER_ON = 0x16D;
-
- // TV Functions
- INPUT_SELECT = 0x134;
}
// Reason parameter of the <Feature Abort> message.
diff --git a/stats/enums/stats/mediametrics/mediametrics.proto b/stats/enums/stats/mediametrics/mediametrics.proto
index a5b2a31..4b843d7 100644
--- a/stats/enums/stats/mediametrics/mediametrics.proto
+++ b/stats/enums/stats/mediametrics/mediametrics.proto
@@ -85,23 +85,21 @@
BUFFERING = 6;
// Playback is buffering while paused
PAUSED_BUFFERING = 7;
- // the value 8 is not used
- reserved 8;
// Playback is suppressed (e.g. due to audio focus loss)
- SUPPRESSED = 9;
+ SUPPRESSED = 8;
// Playback is suppressed (e.g. due to audio focus loss) while buffering to resume a
// playback
- SUPPRESSED_BUFFERING = 10;
+ SUPPRESSED_BUFFERING = 9;
// Playback has reached the end of the media
- ENDED = 11;
+ ENDED = 10;
// Playback is stopped and can be restarted
- STOPPED = 12;
+ STOPPED = 11;
// Playback is stopped due a fatal error and can be retried
- FAILED = 13;
+ FAILED = 12;
// Playback is interrupted by an ad
- INTERRUPTED_BY_AD = 14;
+ INTERRUPTED_BY_AD = 13;
// Playback is abandoned before reaching the end of the media
- ABANDONED = 15;
+ ABANDONED = 14;
}
enum PlaybackErrorCode {
@@ -154,82 +152,3 @@
REASON_MANUAL = 3;
REASON_ADAPTIVE = 4;
}
-// The values of the enum are in sync with the values in AudioFormat.java
-enum AudioEncoding {
- // Invalid audio data format
- ENCODING_INVALID = 0;
- // Default audio data format
- ENCODING_DEFAULT = 1;
- // Audio data format PCM
- ENCODING_PCM_16BIT = 2;
- ENCODING_PCM_8BIT = 3;
- // Audio data format: single-precision floating-point per sample
- ENCODING_PCM_FLOAT = 4;
- // Audio data format: AC-3 compressed, also known as Dolby Digital
- ENCODING_AC3 = 5;
- // Audio data format: E-AC-3 compressed, also known as Dolby Digital Plus or DD+
- ENCODING_E_AC3 = 6;
- // Audio data format: DTS compressed
- ENCODING_DTS = 7;
- // Audio data format: DTS HD compressed
- ENCODING_DTS_HD = 8;
- // Audio data format: MP3 compressed
- ENCODING_MP3 = 9;
- // Audio data format: AAC LC compressed
- ENCODING_AAC_LC = 10;
- // Audio data format: AAC HE V1 compressed
- ENCODING_AAC_HE_V1 = 11;
- // Audio data format: AAC HE V2 compressed
- ENCODING_AAC_HE_V2 = 12;
- // Audio data format: compressed audio wrapped in PCM for HDMI or S/PDIF passthrough.
- ENCODING_IEC61937 = 13;
- // Audio data format: DOLBY TRUEHD compressed
- ENCODING_DOLBY_TRUEHD = 14;
- // Audio data format: AAC ELD compressed
- ENCODING_AAC_ELD = 15;
- // Audio data format: AAC xHE compressed
- ENCODING_AAC_XHE = 16;
- // Audio data format: AC-4 sync frame transport format
- ENCODING_AC4 = 17;
- // Audio data format: E-AC-3-JOC compressed
- ENCODING_E_AC3_JOC = 18;
- // Audio data format: Dolby MAT (Metadata-enhanced Audio Transmission)
- ENCODING_DOLBY_MAT = 19;
- // Audio data format: OPUS compressed
- ENCODING_OPUS = 20;
- // Audio data format: PCM 24 bit per sample packed as 3 bytes.
- ENCODING_PCM_24BIT_PACKED = 21;
- // Audio data format: PCM 32 bit per sample.
- ENCODING_PCM_32BIT = 22;
- // Audio data format: MPEG-H baseline profile, level 3
- ENCODING_MPEGH_BL_L3 = 23;
- // Audio data format: MPEG-H baseline profile, level 4
- ENCODING_MPEGH_BL_L4 = 24;
- // Audio data format: MPEG-H low complexity profile, level 3
- ENCODING_MPEGH_LC_L3 = 25;
- // Audio data format: MPEG-H low complexity profile, level 4
- ENCODING_MPEGH_LC_L4 = 26;
- // Audio data format: DTS UHD compressed
- ENCODING_DTS_UHD = 27;
- // Audio data format: DRA compressed
- ENCODING_DRA = 28;
-}
-enum EncodedSurroundOutputMode {
- ENCODED_SURROUND_OUTPUT_UNKNOWN = 0;
- ENCODED_SURROUND_OUTPUT_AUTO = 1;
- ENCODED_SURROUND_OUTPUT_NEVER = 2;
- ENCODED_SURROUND_OUTPUT_ALWAYS = 3;
- ENCODED_SURROUND_OUTPUT_MANUAL = 4;
-}
-enum HdrFormat {
- HDR_TYPE_DOLBY_VISION = 1;
- HDR_TYPE_HDR10 = 2;
- HDR_TYPE_HLG = 3;
- HDR_TYPE_HDR10_PLUS = 4;
-}
-enum MatchContentFrameRatePreference {
- MATCH_CONTENT_FRAMERATE_UNKNOWN = 0;
- MATCH_CONTENT_FRAMERATE_NEVER = 1;
- MATCH_CONTENT_FRAMERATE_SEAMLESSS_ONLY = 2;
- MATCH_CONTENT_FRAMERATE_ALWAYS = 3;
-};
diff --git a/stats/enums/stats/safetycenter/enums.proto b/stats/enums/stats/safetycenter/enums.proto
deleted file mode 100644
index 4cf1a60..0000000
--- a/stats/enums/stats/safetycenter/enums.proto
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2022 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.safetycenter;
-
-enum SafetySeverityLevel {
- SAFETY_SEVERITY_LEVEL_UNKNOWN = 0;
- SAFETY_SEVERITY_UNSPECIFIED = 1;
- SAFETY_SEVERITY_OK = 2;
- SAFETY_SEVERITY_RECOMMENDATION = 3;
- SAFETY_SEVERITY_CRITICAL_WARNING = 4;
-}
-
-enum SafetySourceProfileType {
- PROFILE_TYPE_UNKNOWN = 0;
- PROFILE_TYPE_PERSONAL = 1;
- PROFILE_TYPE_MANAGED = 2;
-}
-
diff --git a/stats/enums/stats/style/style_enums.proto b/stats/enums/stats/style/style_enums.proto
index 4fa8e53..2938839 100644
--- a/stats/enums/stats/style/style_enums.proto
+++ b/stats/enums/stats/style/style_enums.proto
@@ -46,8 +46,6 @@
COLOR_WALLPAPER_LOCK_APPLIED = 24;
COLOR_WALLPAPER_HOME_LOCK_APPLIED = 25;
COLOR_PRESET_APPLIED = 26;
- WALLPAPER_EFFECT_APPLIED = 27;
- SNAPSHOT = 28;
}
enum LocationPreference {
@@ -74,10 +72,3 @@
LAUNCHED_DEEP_LINK = 7;
LAUNCHED_SETTINGS_SEARCH = 8;
}
-
-enum EffectPreference {
- EFFECT_PREFERENCE_UNSPECIFIED = 0;
- EFFECT_APPLIED_ON_SUCCESS = 1;
- EFFECT_APPLIED_ON_FAILED = 2;
- EFFECT_APPLIED_OFF = 3;
-}
diff --git a/stats/enums/telephony/enums.proto b/stats/enums/telephony/enums.proto
index be65133..73c4658 100644
--- a/stats/enums/telephony/enums.proto
+++ b/stats/enums/telephony/enums.proto
@@ -260,50 +260,13 @@
}
// Action taken to recover a data call that is stalled. From
-// frameworks/opt/telephony/src/java/com/android/internal/telephony/data/
-// DataStallRecoveryManager.java#RecoveryAction
+// frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
+// #RecoveryAction
enum DataStallRecoveryActionEnum {
- /**
- * DataStallRecoveryManager queries RIL for link properties (IP addresses, DNS server addresses
- * etc). This will help in cases where the data stall occurred because of a link property
- * changed but not notified to connectivity service.
- */
RECOVERY_ACTION_GET_DATA_CALL_LIST = 0;
- /**
- * DataStallRecoveryManager will request DataNetworkController to reestablish internet and sets
- * up the data call back using SETUP_DATA_CALL. It will help to reestablish the channel between
- * RIL and modem.
- */
RECOVERY_ACTION_CLEANUP = 1;
- /**
- * DcTracker triggers RIL to detach for GPRS and re-attach(re-register the network).
- * RECOVERY_ACTION_REREGISTER is no longer used in Android T and later.
- */
RECOVERY_ACTION_REREGISTER = 2;
- /**
- * DataStallRecoveryManager will request ServiceStateTracker to power off and on, equivalent
- * to airplane mode toggle on and off.
- */
RECOVERY_ACTION_RADIO_RESTART = 3;
- /**
- * DataStallRecoveryManager will request to reboot modem. It will recover if there is a problem
- * in modem side. RECOVERY_ACTION_RESET_MODEM is introduced in Android T.
- */
- RECOVERY_ACTION_RESET_MODEM = 4;
- }
-
-// The data stall recovered reason.
-// frameworks/opt/telephony/src/java/com/android/internal/telephony/data/
-// DataStallRecoveryManager.java#RecoveredReason
-enum DataStallRecoveredReason {
- /* The data stall symptom not recover yet. */
- RECOVERED_REASON_NONE = 0;
- /* The data stall symptom recovered by DataStallRecoveryManager. */
- RECOVERED_REASON_DSRM = 1;
- /* The data stall symptom recovered by modem. */
- RECOVERED_REASON_MODEM = 2;
- /* The data stall symptom recovered by user. */
- RECOVERED_REASON_USER = 3;
}
// Codec quality
@@ -357,62 +320,4 @@
SIM_RESTORE_MATCHING_CRITERIA_CARRIER_ID_AND_PHONE_NUMBER = 3;
// Restore was done by matching carrierId only.
SIM_RESTORE_MATCHING_CRITERIA_CARRIER_ID_ONLY = 4;
-}
-
-// Describe IMS feature tags
-// See frameworks/opt/net/ims/src/java/com/android/ims/rcs/uce/util/FeatureTags.java
-enum ImsFeatureTag {
- IMS_FEATURE_TAG_UNSPECIFIED = 0;
- IMS_FEATURE_TAG_CUSTOM = 1;
- IMS_FEATURE_TAG_STANDALONE_MSG = 2;
- IMS_FEATURE_TAG_CHAT_IM = 3;
- IMS_FEATURE_TAG_CHAT_SESSION = 4;
- IMS_FEATURE_TAG_FILE_TRANSFER = 5;
- IMS_FEATURE_TAG_FILE_TRANSFER_VIA_SMS = 6;
- IMS_FEATURE_TAG_CALL_COMPOSER_ENRICHED_CALLING = 7;
- IMS_FEATURE_TAG_CALL_COMPOSER_VIA_TELEPHONY = 8;
- IMS_FEATURE_TAG_POST_CALL = 9;
- IMS_FEATURE_TAG_SHARED_MAP = 10;
- IMS_FEATURE_TAG_SHARED_SKETCH = 11;
- IMS_FEATURE_TAG_GEO_PUSH = 12;
- IMS_FEATURE_TAG_GEO_PUSH_VIA_SMS = 13;
- IMS_FEATURE_TAG_CHATBOT_COMMUNICATION_USING_SESSION = 14;
- IMS_FEATURE_TAG_CHATBOT_COMMUNICATION_USING_STANDALONE_MSG = 15;
- IMS_FEATURE_TAG_CHATBOT_VERSION_SUPPORTED = 16;
- IMS_FEATURE_TAG_CHATBOT_ROLE = 17;
- IMS_FEATURE_TAG_MMTEL = 18;
- IMS_FEATURE_TAG_VIDEO = 19;
- IMS_FEATURE_TAG_PRESENCE = 20;
-}
-
-// Define the SIP request method types used in IMS.
-enum SipRequestMethodType {
- SIP_REQUEST_UNSPECIFIED = 0;
- // A SIP request that is not defined in the specification has been sent.
- SIP_REQUEST_CUSTOM = 1;
- SIP_REQUEST_INVITE = 2;
- SIP_REQUEST_ACK = 3;
- SIP_REQUEST_OPTIONS = 4;
- SIP_REQUEST_BYE = 5;
- SIP_REQUEST_CANCEL = 6;
- SIP_REQUEST_REGISTER = 7;
- SIP_REQUEST_PRACK = 8;
- SIP_REQUEST_SUBSCRIBE = 9;
- SIP_REQUEST_NOTIFY = 10;
- SIP_REQUEST_PUBLISH = 11;
- SIP_REQUEST_INFO = 12;
- SIP_REQUEST_REFER = 13;
- SIP_REQUEST_MESSAGE = 14;
- SIP_REQUEST_UPDATE = 15;
-}
-
-// Buckets of call duration in a voice call.
-enum CallDuration {
- CALL_DURATION_UNKNOWN = 0; // Unknown duration
- CALL_DURATION_LESS_THAN_ONE_MINUTE = 1; // Call lasted less than 1 minute
- CALL_DURATION_LESS_THAN_FIVE_MINUTES = 2; // Call lasted between 1 and 5 minutes
- CALL_DURATION_LESS_THAN_TEN_MINUTES = 3; // Call lasted between 5 and 10 minutes
- CALL_DURATION_LESS_THAN_THIRTY_MINUTES = 4; // Call lasted between 10 and 30 minutes
- CALL_DURATION_LESS_THAN_ONE_HOUR = 5; // Call lasted between 30 minutes and 1 hour
- CALL_DURATION_MORE_THAN_ONE_HOUR = 6; // Call lasted more than 1 hour
}
\ No newline at end of file
diff --git a/stats/enums/uwb/enums.proto b/stats/enums/uwb/enums.proto
deleted file mode 100644
index 9802a5b..0000000
--- a/stats/enums/uwb/enums.proto
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2021 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.uwb;
-
-option java_outer_classname = "UwbProtoEnums";
-option java_multiple_files = true;
-
-// UWB profiles
-enum Profile {
- UNKNOWN = 0;
- FIRA = 1;
- CCC = 2;
- CUSTOMIZED = 3;
-}
-// UWB scrambled timestamp sequence (STS) type
-enum Sts {
- UNKNOWN_STS = 0;
- STATIC = 1;
- DYNAMIC = 2;
- PROVISIONED = 3;
-}
-
-// UWB session status codes
-enum Status {
- STATUS_UNKNOWN = 0;
- SUCCESS = 1;
- GENERAL_FAILURE = 2;
- BAD_PARAMS = 3;
- REJECTED = 4;
- SESSION_DUPLICATE = 5;
- SESSION_EXCEEDED = 6;
- SERVICE_NOT_FOUND = 7;
- PROVISION_FAILED = 8;
-}
-
-// UWB session duration buckets
-enum DurationBucket {
- DURATION_UNKNOWN = 0;
- WITHIN_ONE_SEC = 1;
- ONE_TO_TEN_SEC = 2;
- TEN_SEC_TO_ONE_MIN = 3;
- ONE_TO_TEN_MIN = 4;
- TEN_MIN_TO_ONE_HOUR = 5;
- MORE_THAN_ONE_HOUR = 6;
-}
-
-// UWB count buckets
-enum CountBucket {
- COUNT_UNKNOWN = 0;
- ZERO = 1;
- ONE_TO_FIVE = 2;
- FIVE_TO_TWENTY = 3;
- TWENTY_TO_ONE_HUNDRED = 4;
- ONE_HUNDRED_TO_FIVE_HUNDRED = 5;
- MORE_THAN_FIVE_HUNDRED = 6;
-}
-
-// Non-Line-of-Sight indication
-enum Nlos {
- NLOS_UNKNOWN = 0;
- NLOS = 1;
- LOS = 2;
-}
\ No newline at end of file
diff --git a/stats/message/mediametrics_message.proto b/stats/message/mediametrics_message.proto
index 297867a..d88c42f 100644
--- a/stats/message/mediametrics_message.proto
+++ b/stats/message/mediametrics_message.proto
@@ -131,7 +131,7 @@
* Logged from:
* frameworks/av/media/libstagefright/MediaCodec.cpp
* frameworks/av/services/mediaanalytics/statsd_codec.cpp
- * Next Tag: 62
+ * Next Tag: 53
*/
message CodecData {
optional string codec = 1;
@@ -186,15 +186,6 @@
optional int32 original_video_qp_p_max = 50;
optional int32 original_video_qp_b_min = 51;
optional int32 original_video_qp_b_max = 52;
- optional int32 config_color_standard = 53;
- optional int32 config_color_range = 54;
- optional int32 config_color_transfer = 55;
- optional int32 parsed_color_standard = 56;
- optional int32 parsed_color_range = 57;
- optional int32 parsed_color_transfer = 58;
- optional int32 hdr_static_info = 59;
- optional int32 hdr10_plus_info = 60;
- optional int32 hdr_format = 61;
// !!!WARNING!!!
// Keep synchronized with MediaCodecReported in atoms.proto
// Also keep AStatsEvent serialization synchronized in statsd_codec.cpp
diff --git a/stats/stats_log_api_gen/Android.bp b/stats/stats_log_api_gen/Android.bp
index 4d63a5b..1e59094 100644
--- a/stats/stats_log_api_gen/Android.bp
+++ b/stats/stats_log_api_gen/Android.bp
@@ -64,7 +64,6 @@
"Collation.cpp",
"test_collation.cpp",
"test.proto",
- "utils.cpp",
],
static_libs: [
@@ -140,7 +139,7 @@
static_libs: [
"libstatssocket",
"libstatspull",
- "statsd-aidl-ndk",
+ "statsd-aidl-ndk_platform",
],
shared_libs: ["libbinder_ndk"],
export_static_lib_headers: [
@@ -161,7 +160,7 @@
genrule {
name: "statslog_header.rs",
tools: ["stats-log-api-gen"],
- cmd: "$(location stats-log-api-gen) --rustHeader $(genDir)/statslog_header.rs --rustHeaderCrate statslog_rust_header",
+ cmd: "$(location stats-log-api-gen) --rustHeader $(genDir)/statslog_header.rs",
out: [
"statslog_header.rs",
],
@@ -178,15 +177,12 @@
"libstatspull_bindgen",
"libthiserror",
],
- apex_available: [
- "com.android.virt",
- ],
}
genrule {
name: "statslog.rs",
tools: ["stats-log-api-gen"],
- cmd: "$(location stats-log-api-gen) --rust $(genDir)/statslog.rs --rustHeaderCrate statslog_rust_header",
+ cmd: "$(location stats-log-api-gen) --rust $(genDir)/statslog.rs",
out: [
"statslog.rs",
],
@@ -203,7 +199,4 @@
"libstatslog_rust_header",
"libstatspull_bindgen",
],
- apex_available: [
- "com.android.virt",
- ],
}
diff --git a/stats/stats_log_api_gen/Collation.cpp b/stats/stats_log_api_gen/Collation.cpp
index 3d1dce1..0b5e206 100644
--- a/stats/stats_log_api_gen/Collation.cpp
+++ b/stats/stats_log_api_gen/Collation.cpp
@@ -21,7 +21,6 @@
#include <map>
#include "frameworks/proto_logging/stats/atoms.pb.h"
-#include "utils.h"
namespace android {
namespace stats_log_api_gen {
@@ -54,7 +53,8 @@
exclusiveField(that.exclusiveField),
defaultState(that.defaultState),
triggerStateReset(that.triggerStateReset),
- nested(that.nested) {
+ nested(that.nested),
+ uidField(that.uidField) {
}
AtomDecl::AtomDecl(int c, const string& n, const string& m, const string &o)
@@ -91,41 +91,54 @@
*/
static java_type_t java_type(const FieldDescriptor* field) {
int protoType = field->type();
- bool isRepeatedField = field->is_repeated();
-
switch (protoType) {
+ case FieldDescriptor::TYPE_DOUBLE:
+ return JAVA_TYPE_DOUBLE;
case FieldDescriptor::TYPE_FLOAT:
- return isRepeatedField ? JAVA_TYPE_FLOAT_ARRAY : JAVA_TYPE_FLOAT;
+ return JAVA_TYPE_FLOAT;
case FieldDescriptor::TYPE_INT64:
- return isRepeatedField ? JAVA_TYPE_LONG_ARRAY : JAVA_TYPE_LONG;
+ return JAVA_TYPE_LONG;
+ case FieldDescriptor::TYPE_UINT64:
+ return JAVA_TYPE_LONG;
case FieldDescriptor::TYPE_INT32:
- return isRepeatedField ? JAVA_TYPE_INT_ARRAY : JAVA_TYPE_INT;
+ return JAVA_TYPE_INT;
+ case FieldDescriptor::TYPE_FIXED64:
+ return JAVA_TYPE_LONG;
+ case FieldDescriptor::TYPE_FIXED32:
+ return JAVA_TYPE_INT;
case FieldDescriptor::TYPE_BOOL:
- return isRepeatedField ? JAVA_TYPE_BOOLEAN_ARRAY : JAVA_TYPE_BOOLEAN;
+ return JAVA_TYPE_BOOLEAN;
case FieldDescriptor::TYPE_STRING:
- return isRepeatedField ? JAVA_TYPE_STRING_ARRAY : JAVA_TYPE_STRING;
- case FieldDescriptor::TYPE_ENUM:
- return isRepeatedField ? JAVA_TYPE_ENUM_ARRAY : JAVA_TYPE_ENUM;
+ return JAVA_TYPE_STRING;
case FieldDescriptor::TYPE_GROUP:
- return JAVA_TYPE_UNKNOWN_OR_INVALID;
+ return JAVA_TYPE_UNKNOWN;
case FieldDescriptor::TYPE_MESSAGE:
if (field->message_type()->full_name() == "android.os.statsd.AttributionNode") {
return JAVA_TYPE_ATTRIBUTION_CHAIN;
- } else if ((field->options().GetExtension(os::statsd::log_mode) ==
- os::statsd::LogMode::MODE_BYTES) &&
- !isRepeatedField) {
+ } else if (field->message_type()->full_name() == "android.os.statsd.KeyValuePair") {
+ return JAVA_TYPE_KEY_VALUE_PAIR;
+ } else if (field->options().GetExtension(os::statsd::log_mode) ==
+ os::statsd::LogMode::MODE_BYTES) {
return JAVA_TYPE_BYTE_ARRAY;
} else {
- return isRepeatedField ? JAVA_TYPE_UNKNOWN_OR_INVALID : JAVA_TYPE_OBJECT;
+ return JAVA_TYPE_OBJECT;
}
case FieldDescriptor::TYPE_BYTES:
- return isRepeatedField ? JAVA_TYPE_UNKNOWN_OR_INVALID : JAVA_TYPE_BYTE_ARRAY;
- case FieldDescriptor::TYPE_UINT64:
- return isRepeatedField ? JAVA_TYPE_UNKNOWN_OR_INVALID : JAVA_TYPE_LONG;
+ return JAVA_TYPE_BYTE_ARRAY;
case FieldDescriptor::TYPE_UINT32:
- return isRepeatedField ? JAVA_TYPE_UNKNOWN_OR_INVALID : JAVA_TYPE_INT;
+ return JAVA_TYPE_INT;
+ case FieldDescriptor::TYPE_ENUM:
+ return JAVA_TYPE_ENUM;
+ case FieldDescriptor::TYPE_SFIXED32:
+ return JAVA_TYPE_INT;
+ case FieldDescriptor::TYPE_SFIXED64:
+ return JAVA_TYPE_LONG;
+ case FieldDescriptor::TYPE_SINT32:
+ return JAVA_TYPE_INT;
+ case FieldDescriptor::TYPE_SINT64:
+ return JAVA_TYPE_LONG;
default:
- return JAVA_TYPE_UNKNOWN_OR_INVALID;
+ return JAVA_TYPE_UNKNOWN;
}
}
@@ -156,15 +169,6 @@
int errorCount = 0;
if (field->options().HasExtension(os::statsd::state_field_option)) {
- if (is_repeated_field(javaType)) {
- print_error(
- field,
- "State field annotations are not allowed for repeated fields: '%s'\n",
- atomDecl->message.c_str());
- errorCount++;
- return errorCount;
- }
-
const os::statsd::StateAtomFieldOption& stateFieldOption =
field->options().GetExtension(os::statsd::state_field_option);
const bool primaryField = stateFieldOption.primary_field();
@@ -181,8 +185,8 @@
}
if (primaryField) {
- if (javaType == JAVA_TYPE_ATTRIBUTION_CHAIN || javaType == JAVA_TYPE_OBJECT ||
- javaType == JAVA_TYPE_BYTE_ARRAY) {
+ if (javaType == JAVA_TYPE_UNKNOWN || javaType == JAVA_TYPE_ATTRIBUTION_CHAIN ||
+ javaType == JAVA_TYPE_OBJECT || javaType == JAVA_TYPE_BYTE_ARRAY) {
print_error(field, "Invalid primary state field: '%s'\n",
atomDecl->message.c_str());
errorCount++;
@@ -209,8 +213,8 @@
}
if (exclusiveState) {
- if (javaType == JAVA_TYPE_ATTRIBUTION_CHAIN || javaType == JAVA_TYPE_OBJECT ||
- javaType == JAVA_TYPE_BYTE_ARRAY) {
+ if (javaType == JAVA_TYPE_UNKNOWN || javaType == JAVA_TYPE_ATTRIBUTION_CHAIN ||
+ javaType == JAVA_TYPE_OBJECT || javaType == JAVA_TYPE_BYTE_ARRAY) {
print_error(field, "Invalid exclusive state field: '%s'\n",
atomDecl->message.c_str());
errorCount++;
@@ -255,16 +259,24 @@
}
if (field->options().GetExtension(os::statsd::is_uid) == true) {
- if (javaType != JAVA_TYPE_INT && javaType != JAVA_TYPE_INT_ARRAY) {
- print_error(field,
- "is_uid annotation can only be applied to int32 fields and repeated int32 "
- "fields: '%s'\n",
+ if (javaType != JAVA_TYPE_INT) {
+ print_error(field, "is_uid annotation can only be applied to int32 fields: '%s'\n",
atomDecl->message.c_str());
errorCount++;
}
- addAnnotationToAtomDecl(atomDecl, fieldNumber, ANNOTATION_ID_IS_UID, ANNOTATION_TYPE_BOOL,
- AnnotationValue(true));
+ if (atomDecl->uidField == 0) {
+ atomDecl->uidField = fieldNumber;
+
+ addAnnotationToAtomDecl(atomDecl, fieldNumber, ANNOTATION_ID_IS_UID,
+ ANNOTATION_TYPE_BOOL, AnnotationValue(true));
+ } else {
+ print_error(field,
+ "Cannot have more than one field in an atom with is_uid "
+ "annotation: '%s'\n",
+ atomDecl->message.c_str());
+ errorCount++;
+ }
}
return errorCount;
@@ -311,19 +323,13 @@
java_type_t javaType = java_type(field);
- if (javaType == JAVA_TYPE_UNKNOWN_OR_INVALID) {
- if (field->is_repeated()) {
- print_error(field, "Repeated field type %d is not allowed for field: %s\n",
- field->type(), field->name().c_str());
- } else {
- print_error(field, "Field type %d is not allowed for field: %s\n", field->type(),
- field->name().c_str());
- }
+ if (javaType == JAVA_TYPE_UNKNOWN) {
+ print_error(field, "Unknown type for field: %s\n", field->name().c_str());
errorCount++;
continue;
- } else if (javaType == JAVA_TYPE_OBJECT) {
+ } else if (javaType == JAVA_TYPE_OBJECT && atomDecl->code < PULL_ATOM_START_ID) {
// Allow attribution chain, but only at position 1.
- print_error(field, "Message type not allowed for field without mode_bytes: %s\n",
+ print_error(field, "Message type not allowed for field in pushed atoms: %s\n",
field->name().c_str());
errorCount++;
continue;
@@ -338,6 +344,27 @@
errorCount++;
continue;
}
+
+ // Doubles are not supported yet.
+ if (javaType == JAVA_TYPE_DOUBLE) {
+ print_error(field,
+ "Doubles are not supported in atoms. Please change field %s "
+ "to float\n",
+ field->name().c_str());
+ errorCount++;
+ continue;
+ }
+
+ if (field->is_repeated() &&
+ !(javaType == JAVA_TYPE_ATTRIBUTION_CHAIN || javaType == JAVA_TYPE_KEY_VALUE_PAIR)) {
+ print_error(field,
+ "Repeated fields are not supported in atoms. Please make "
+ "field %s not "
+ "repeated.\n",
+ field->name().c_str());
+ errorCount++;
+ continue;
+ }
}
// Check that if there's an attribution chain, it's at position 1.
@@ -366,7 +393,7 @@
AtomField atField(field->name(), javaType);
- if (javaType == JAVA_TYPE_ENUM || javaType == JAVA_TYPE_ENUM_ARRAY) {
+ if (javaType == JAVA_TYPE_ENUM) {
// All enums are treated as ints when it comes to function signatures.
collate_enums(*field->enum_type(), &atField);
}
@@ -375,8 +402,6 @@
if (javaType == JAVA_TYPE_ENUM) {
// All enums are treated as ints when it comes to function signatures.
signature->push_back(JAVA_TYPE_INT);
- } else if (javaType == JAVA_TYPE_ENUM_ARRAY) {
- signature->push_back(JAVA_TYPE_INT_ARRAY);
} else if (javaType == JAVA_TYPE_OBJECT && isBinaryField) {
signature->push_back(JAVA_TYPE_BYTE_ARRAY);
} else {
diff --git a/stats/stats_log_api_gen/Collation.h b/stats/stats_log_api_gen/Collation.h
index 88ec38d..b78b556 100644
--- a/stats/stats_log_api_gen/Collation.h
+++ b/stats/stats_log_api_gen/Collation.h
@@ -69,7 +69,7 @@
* The types for atom parameters.
*/
typedef enum {
- JAVA_TYPE_UNKNOWN_OR_INVALID = 0,
+ JAVA_TYPE_UNKNOWN = 0,
JAVA_TYPE_ATTRIBUTION_CHAIN = 1,
JAVA_TYPE_BOOLEAN = 2,
@@ -79,13 +79,7 @@
JAVA_TYPE_DOUBLE = 6,
JAVA_TYPE_STRING = 7,
JAVA_TYPE_ENUM = 8,
- JAVA_TYPE_BOOLEAN_ARRAY = 10,
- JAVA_TYPE_INT_ARRAY = 11,
- JAVA_TYPE_LONG_ARRAY = 12,
- JAVA_TYPE_FLOAT_ARRAY = 13,
- JAVA_TYPE_DOUBLE_ARRAY = 14,
- JAVA_TYPE_STRING_ARRAY = 15,
- JAVA_TYPE_ENUM_ARRAY = 16,
+ JAVA_TYPE_KEY_VALUE_PAIR = 9,
JAVA_TYPE_OBJECT = -1,
JAVA_TYPE_BYTE_ARRAY = -2,
@@ -147,7 +141,7 @@
// values.
map<int /* numeric value */, string /* value name */> enumValues;
- inline AtomField() : name(), javaType(JAVA_TYPE_UNKNOWN_OR_INVALID) {
+ inline AtomField() : name(), javaType(JAVA_TYPE_UNKNOWN) {
}
inline AtomField(const AtomField& that)
: name(that.name), javaType(that.javaType), enumValues(that.enumValues) {
@@ -179,6 +173,8 @@
int triggerStateReset = INT_MAX;
bool nested = true;
+ int uidField = 0;
+
AtomDecl();
AtomDecl(const AtomDecl& that);
AtomDecl(int code, const string& name, const string& message, const string& oneOfName);
diff --git a/stats/stats_log_api_gen/OWNERS b/stats/stats_log_api_gen/OWNERS
index 986aea3..41a0c95 100644
--- a/stats/stats_log_api_gen/OWNERS
+++ b/stats/stats_log_api_gen/OWNERS
@@ -1,6 +1 @@
-jeffreyhuang@google.com
-muhammadq@google.com
-sharaienko@google.com
-singhtejinder@google.com
-tsaichristine@google.com
-yaochen@google.com
+yro@google.com
diff --git a/stats/stats_log_api_gen/java_writer.cpp b/stats/stats_log_api_gen/java_writer.cpp
index d2a6a99..a7bd662 100644
--- a/stats/stats_log_api_gen/java_writer.cpp
+++ b/stats/stats_log_api_gen/java_writer.cpp
@@ -123,6 +123,8 @@
fprintf(out, ", %s[] %s", java_type_name(chainField.javaType),
chainField.name.c_str());
}
+ } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
+ fprintf(out, ", android.util.SparseArray<Object> valueMap");
} else {
fprintf(out, ", %s arg%d", java_type_name(*arg), argIndex);
}
@@ -132,8 +134,7 @@
static int write_method_body(FILE* out, const vector<java_type_t>& signature,
const FieldNumberToAtomDeclSet& fieldNumberToAtomDeclSet,
- const AtomDecl& attributionDecl, const string& indent,
- const int minApiLevel) {
+ const AtomDecl& attributionDecl, const string& indent) {
// Start StatsEvent.Builder.
fprintf(out,
"%s final StatsEvent.Builder builder = "
@@ -148,10 +149,6 @@
int argIndex = 1;
for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
arg++) {
- if (minApiLevel < API_T && is_repeated_field(*arg)) {
- fprintf(stderr, "Found repeated field type with min api level < T.");
- return 1;
- }
switch (*arg) {
case JAVA_TYPE_BOOLEAN:
fprintf(out, "%s builder.writeBoolean(arg%d);\n", indent.c_str(),
@@ -178,34 +175,6 @@
"arg%d);\n",
indent.c_str(), argIndex, argIndex);
break;
- case JAVA_TYPE_BOOLEAN_ARRAY:
- fprintf(out,
- "%s builder.writeBooleanArray(null == arg%d ? new boolean[0] : "
- "arg%d);\n",
- indent.c_str(), argIndex, argIndex);
- break;
- case JAVA_TYPE_INT_ARRAY:
- fprintf(out,
- "%s builder.writeIntArray(null == arg%d ? new int[0] : arg%d);\n",
- indent.c_str(), argIndex, argIndex);
- break;
- case JAVA_TYPE_FLOAT_ARRAY:
- fprintf(out,
- "%s builder.writeFloatArray(null == arg%d ? new float[0] : "
- "arg%d);\n",
- indent.c_str(), argIndex, argIndex);
- break;
- case JAVA_TYPE_LONG_ARRAY:
- fprintf(out,
- "%s builder.writeLongArray(null == arg%d ? new long[0] : arg%d);\n",
- indent.c_str(), argIndex, argIndex);
- break;
- case JAVA_TYPE_STRING_ARRAY:
- fprintf(out,
- "%s builder.writeStringArray(null == arg%d ? new String[0] : "
- "arg%d);\n",
- indent.c_str(), argIndex, argIndex);
- break;
case JAVA_TYPE_ATTRIBUTION_CHAIN: {
const char* uidName = attributionDecl.fields.front().name.c_str();
const char* tagName = attributionDecl.fields.back().name.c_str();
@@ -217,6 +186,69 @@
indent.c_str(), tagName, tagName);
break;
}
+ case JAVA_TYPE_KEY_VALUE_PAIR:
+ fprintf(out, "\n");
+ fprintf(out, "%s // Write KeyValuePairs.\n", indent.c_str());
+ fprintf(out, "%s final int count = valueMap.size();\n", indent.c_str());
+ fprintf(out, "%s android.util.SparseIntArray intMap = null;\n",
+ indent.c_str());
+ fprintf(out, "%s android.util.SparseLongArray longMap = null;\n",
+ indent.c_str());
+ fprintf(out, "%s android.util.SparseArray<String> stringMap = null;\n",
+ indent.c_str());
+ fprintf(out, "%s android.util.SparseArray<Float> floatMap = null;\n",
+ indent.c_str());
+ fprintf(out, "%s for (int i = 0; i < count; i++) {\n", indent.c_str());
+ fprintf(out, "%s final int key = valueMap.keyAt(i);\n",
+ indent.c_str());
+ fprintf(out, "%s final Object value = valueMap.valueAt(i);\n",
+ indent.c_str());
+ fprintf(out, "%s if (value instanceof Integer) {\n", indent.c_str());
+ fprintf(out, "%s if (null == intMap) {\n", indent.c_str());
+ fprintf(out,
+ "%s intMap = new "
+ "android.util.SparseIntArray();\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s intMap.put(key, (Integer) value);\n",
+ indent.c_str());
+ fprintf(out, "%s } else if (value instanceof Long) {\n",
+ indent.c_str());
+ fprintf(out, "%s if (null == longMap) {\n", indent.c_str());
+ fprintf(out,
+ "%s longMap = new "
+ "android.util.SparseLongArray();\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s longMap.put(key, (Long) value);\n",
+ indent.c_str());
+ fprintf(out, "%s } else if (value instanceof String) {\n",
+ indent.c_str());
+ fprintf(out, "%s if (null == stringMap) {\n", indent.c_str());
+ fprintf(out,
+ "%s stringMap = new "
+ "android.util.SparseArray<>();\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s stringMap.put(key, (String) value);\n",
+ indent.c_str());
+ fprintf(out, "%s } else if (value instanceof Float) {\n",
+ indent.c_str());
+ fprintf(out, "%s if (null == floatMap) {\n", indent.c_str());
+ fprintf(out,
+ "%s floatMap = new "
+ "android.util.SparseArray<>();\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s floatMap.put(key, (Float) value);\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out,
+ "%s builder.writeKeyValuePairs("
+ "intMap, longMap, stringMap, floatMap);\n",
+ indent.c_str());
+ break;
default:
// Unsupported types: OBJECT, DOUBLE.
fprintf(stderr, "Encountered unsupported type.");
@@ -246,8 +278,8 @@
indent = " ";
}
- int ret = write_method_body(out, signature, fieldNumberToAtomDeclSet, attributionDecl,
- indent, minApiLevel);
+ int ret = write_method_body(out, signature, fieldNumberToAtomDeclSet,
+ attributionDecl, indent);
if (ret != 0) {
return ret;
}
@@ -267,9 +299,9 @@
const char* uidName = attributionDecl.fields.front().name.c_str();
const char* tagName = attributionDecl.fields.back().name.c_str();
fprintf(out, ", %s, %s", uidName, tagName);
- } else if (is_repeated_field(*arg)) {
- // Module logging does not support repeated fields.
- fprintf(stderr, "Module logging does not support repeated fields.\n");
+ } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
+ // Module logging does not yet support key value pair.
+ fprintf(stderr, "Module logging does not yet support key value pair.\n");
return 1;
} else {
fprintf(out, ", arg%d", argIndex);
@@ -287,7 +319,7 @@
}
static int write_java_pulled_methods(FILE* out, const SignatureInfoMap& signatureInfoMap,
- const AtomDecl& attributionDecl, const int minApiLevel) {
+ const AtomDecl& attributionDecl) {
for (auto signatureInfoMapIt = signatureInfoMap.begin();
signatureInfoMapIt != signatureInfoMap.end(); signatureInfoMapIt++) {
// Print method signature.
@@ -299,8 +331,8 @@
// Print method body.
string indent("");
- int ret = write_method_body(out, signature, fieldNumberToAtomDeclSet, attributionDecl,
- indent, minApiLevel);
+ int ret = write_method_body(out, signature, fieldNumberToAtomDeclSet,
+ attributionDecl, indent);
if (ret != 0) {
return ret;
}
@@ -350,8 +382,8 @@
fprintf(out, " // Write methods\n");
errors += write_java_pushed_methods(out, atoms.signatureInfoMap, attributionDecl, minApiLevel);
errors += write_java_non_chained_methods(out, atoms.nonChainedSignatureInfoMap);
- errors += write_java_pulled_methods(out, atoms.pulledAtomsSignatureInfoMap, attributionDecl,
- minApiLevel);
+ errors += write_java_pulled_methods(out, atoms.pulledAtomsSignatureInfoMap,
+ attributionDecl);
if (supportWorkSource) {
errors += write_java_work_source_methods(out, atoms.signatureInfoMap);
}
diff --git a/stats/stats_log_api_gen/java_writer_q.cpp b/stats/stats_log_api_gen/java_writer_q.cpp
index b9e7e21..5b526ce 100644
--- a/stats/stats_log_api_gen/java_writer_q.cpp
+++ b/stats/stats_log_api_gen/java_writer_q.cpp
@@ -69,6 +69,8 @@
fprintf(out, ", %s[] %s", java_type_name(chainField.javaType),
chainField.name.c_str());
}
+ } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
+ fprintf(out, ", android.util.SparseArray<Object> valueMap");
} else {
fprintf(out, ", %s arg%d", java_type_name(*arg), argIndex);
}
@@ -155,6 +157,89 @@
fprintf(out, "%s needed += attrSize;\n", indent.c_str());
break;
}
+ case JAVA_TYPE_KEY_VALUE_PAIR: {
+ fprintf(out, "%s // Calculate bytes needed by Key Value Pairs.\n",
+ indent.c_str());
+ fprintf(out, "%s final int count = valueMap.size();\n", indent.c_str());
+ fprintf(out, "%s android.util.SparseIntArray intMap = null;\n",
+ indent.c_str());
+ fprintf(out, "%s android.util.SparseLongArray longMap = null;\n",
+ indent.c_str());
+ fprintf(out, "%s android.util.SparseArray<String> stringMap = null;\n",
+ indent.c_str());
+ fprintf(out, "%s android.util.SparseArray<Float> floatMap = null;\n",
+ indent.c_str());
+ fprintf(out, "%s int keyValuePairSize = LIST_TYPE_OVERHEAD;\n",
+ indent.c_str());
+ fprintf(out, "%s for (int i = 0; i < count; i++) {\n", indent.c_str());
+ fprintf(out, "%s final int key = valueMap.keyAt(i);\n", indent.c_str());
+ fprintf(out, "%s final Object value = valueMap.valueAt(i);\n",
+ indent.c_str());
+ fprintf(out, "%s if (value instanceof Integer) {\n", indent.c_str());
+ fprintf(out, "%s keyValuePairSize += LIST_TYPE_OVERHEAD\n",
+ indent.c_str());
+ fprintf(out, "%s + INT_TYPE_SIZE + INT_TYPE_SIZE;\n",
+ indent.c_str());
+ fprintf(out, "%s if (null == intMap) {\n", indent.c_str());
+ fprintf(out, "%s intMap = new android.util.SparseIntArray();\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s intMap.put(key, (Integer) value);\n",
+ indent.c_str());
+ fprintf(out, "%s } else if (value instanceof Long) {\n", indent.c_str());
+ fprintf(out, "%s keyValuePairSize += LIST_TYPE_OVERHEAD\n",
+ indent.c_str());
+ fprintf(out, "%s + INT_TYPE_SIZE + LONG_TYPE_SIZE;\n",
+ indent.c_str());
+ fprintf(out, "%s if (null == longMap) {\n", indent.c_str());
+ fprintf(out,
+ "%s longMap = new "
+ "android.util.SparseLongArray();\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s longMap.put(key, (Long) value);\n", indent.c_str());
+ fprintf(out, "%s } else if (value instanceof String) {\n",
+ indent.c_str());
+ fprintf(out,
+ "%s final String str = (value == null) ? \"\" : "
+ "(String) value;\n",
+ indent.c_str());
+ fprintf(out,
+ "%s final int len = "
+ "str.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;\n",
+ indent.c_str());
+ fprintf(out,
+ "%s keyValuePairSize += LIST_TYPE_OVERHEAD + "
+ "INT_TYPE_SIZE\n",
+ indent.c_str());
+ fprintf(out, "%s + STRING_TYPE_OVERHEAD + len;\n",
+ indent.c_str());
+ fprintf(out, "%s if (null == stringMap) {\n", indent.c_str());
+ fprintf(out,
+ "%s stringMap = new "
+ "android.util.SparseArray<>();\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s stringMap.put(key, str);\n", indent.c_str());
+ fprintf(out, "%s } else if (value instanceof Float) {\n",
+ indent.c_str());
+ fprintf(out, "%s keyValuePairSize += LIST_TYPE_OVERHEAD\n",
+ indent.c_str());
+ fprintf(out, "%s + INT_TYPE_SIZE + FLOAT_TYPE_SIZE;\n",
+ indent.c_str());
+ fprintf(out, "%s if (null == floatMap) {\n", indent.c_str());
+ fprintf(out,
+ "%s floatMap = new "
+ "android.util.SparseArray<>();\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s floatMap.put(key, (Float) value);\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s needed += keyValuePairSize;\n", indent.c_str());
+ break;
+ }
default:
// Unsupported types: OBJECT, DOUBLE.
fprintf(stderr, "Module logging does not yet support Object and Double.\n");
@@ -254,6 +339,16 @@
fprintf(out, "%s pos += attrSize;\n", indent.c_str());
break;
}
+ case JAVA_TYPE_KEY_VALUE_PAIR:
+ requiredHelpers |= JAVA_MODULE_REQUIRES_FLOAT;
+ requiredHelpers |= JAVA_MODULE_REQUIRES_KEY_VALUE_PAIRS;
+ fprintf(out,
+ "%s writeKeyValuePairs(buff, pos, (byte) count, intMap, "
+ "longMap, "
+ "stringMap, floatMap);\n",
+ indent.c_str());
+ fprintf(out, "%s pos += keyValuePairSize;\n", indent.c_str());
+ break;
default:
// Unsupported types: OBJECT, DOUBLE.
fprintf(stderr, "Object and Double are not supported in module logging");
@@ -357,6 +452,108 @@
fprintf(out, "%s}\n", indent.c_str());
fprintf(out, "\n");
}
+
+ if (requiredHelpers & JAVA_MODULE_REQUIRES_KEY_VALUE_PAIRS) {
+ fprintf(out,
+ "%sprivate static void writeKeyValuePairs(byte[] buff, int pos, "
+ "byte numPairs,\n",
+ indent.c_str());
+ fprintf(out, "%s final android.util.SparseIntArray intMap,\n", indent.c_str());
+ fprintf(out, "%s final android.util.SparseLongArray longMap,\n", indent.c_str());
+ fprintf(out, "%s final android.util.SparseArray<String> stringMap,\n",
+ indent.c_str());
+ fprintf(out, "%s final android.util.SparseArray<Float> floatMap) {\n",
+ indent.c_str());
+
+ // Start list of lists.
+ fprintf(out, "%s buff[pos] = LIST_TYPE;\n", indent.c_str());
+ fprintf(out, "%s buff[pos + 1] = (byte) numPairs;\n", indent.c_str());
+ fprintf(out, "%s pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
+
+ // Write integers.
+ fprintf(out, "%s final int intMapSize = null == intMap ? 0 : intMap.size();\n",
+ indent.c_str());
+ fprintf(out, "%s for (int i = 0; i < intMapSize; i++) {\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = LIST_TYPE;\n", indent.c_str());
+ fprintf(out, "%s buff[pos + 1] = (byte) 2;\n", indent.c_str());
+ fprintf(out, "%s pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
+ fprintf(out, "%s final int key = intMap.keyAt(i);\n", indent.c_str());
+ fprintf(out, "%s final int value = intMap.valueAt(i);\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = INT_TYPE;\n", indent.c_str());
+ fprintf(out, "%s copyInt(buff, pos + 1, key);\n", indent.c_str());
+ fprintf(out, "%s pos += INT_TYPE_SIZE;\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = INT_TYPE;\n", indent.c_str());
+ fprintf(out, "%s copyInt(buff, pos + 1, value);\n", indent.c_str());
+ fprintf(out, "%s pos += INT_TYPE_SIZE;\n", indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+
+ // Write longs.
+ fprintf(out, "%s final int longMapSize = null == longMap ? 0 : longMap.size();\n",
+ indent.c_str());
+ fprintf(out, "%s for (int i = 0; i < longMapSize; i++) {\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = LIST_TYPE;\n", indent.c_str());
+ fprintf(out, "%s buff[pos + 1] = (byte) 2;\n", indent.c_str());
+ fprintf(out, "%s pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
+ fprintf(out, "%s final int key = longMap.keyAt(i);\n", indent.c_str());
+ fprintf(out, "%s final long value = longMap.valueAt(i);\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = INT_TYPE;\n", indent.c_str());
+ fprintf(out, "%s copyInt(buff, pos + 1, key);\n", indent.c_str());
+ fprintf(out, "%s pos += INT_TYPE_SIZE;\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = LONG_TYPE;\n", indent.c_str());
+ fprintf(out, "%s copyLong(buff, pos + 1, value);\n", indent.c_str());
+ fprintf(out, "%s pos += LONG_TYPE_SIZE;\n", indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+
+ // Write Strings.
+ fprintf(out,
+ "%s final int stringMapSize = null == stringMap ? 0 : "
+ "stringMap.size();\n",
+ indent.c_str());
+ fprintf(out, "%s for (int i = 0; i < stringMapSize; i++) {\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = LIST_TYPE;\n", indent.c_str());
+ fprintf(out, "%s buff[pos + 1] = (byte) 2;\n", indent.c_str());
+ fprintf(out, "%s pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
+ fprintf(out, "%s final int key = stringMap.keyAt(i);\n", indent.c_str());
+ fprintf(out, "%s final String value = stringMap.valueAt(i);\n", indent.c_str());
+ fprintf(out,
+ "%s final byte[] valueBytes = "
+ "value.getBytes(java.nio.charset.StandardCharsets.UTF_8);\n",
+ indent.c_str());
+ fprintf(out, "%s buff[pos] = INT_TYPE;\n", indent.c_str());
+ fprintf(out, "%s copyInt(buff, pos + 1, key);\n", indent.c_str());
+ fprintf(out, "%s pos += INT_TYPE_SIZE;\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = STRING_TYPE;\n", indent.c_str());
+ fprintf(out, "%s copyInt(buff, pos + 1, valueBytes.length);\n", indent.c_str());
+ fprintf(out,
+ "%s System.arraycopy("
+ "valueBytes, 0, buff, pos + STRING_TYPE_OVERHEAD, "
+ "valueBytes.length);\n",
+ indent.c_str());
+ fprintf(out, "%s pos += STRING_TYPE_OVERHEAD + valueBytes.length;\n",
+ indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+
+ // Write floats.
+ fprintf(out,
+ "%s final int floatMapSize = null == floatMap ? 0 : "
+ "floatMap.size();\n",
+ indent.c_str());
+ fprintf(out, "%s for (int i = 0; i < floatMapSize; i++) {\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = LIST_TYPE;\n", indent.c_str());
+ fprintf(out, "%s buff[pos + 1] = (byte) 2;\n", indent.c_str());
+ fprintf(out, "%s pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
+ fprintf(out, "%s final int key = floatMap.keyAt(i);\n", indent.c_str());
+ fprintf(out, "%s final float value = floatMap.valueAt(i);\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = INT_TYPE;\n", indent.c_str());
+ fprintf(out, "%s copyInt(buff, pos + 1, key);\n", indent.c_str());
+ fprintf(out, "%s pos += INT_TYPE_SIZE;\n", indent.c_str());
+ fprintf(out, "%s buff[pos] = FLOAT_TYPE;\n", indent.c_str());
+ fprintf(out, "%s copyFloat(buff, pos + 1, value);\n", indent.c_str());
+ fprintf(out, "%s pos += FLOAT_TYPE_SIZE;\n", indent.c_str());
+ fprintf(out, "%s }\n", indent.c_str());
+ fprintf(out, "%s}\n", indent.c_str());
+ fprintf(out, "\n");
+ }
}
} // namespace stats_log_api_gen
diff --git a/stats/stats_log_api_gen/main.cpp b/stats/stats_log_api_gen/main.cpp
index 14f933e..5258e33 100644
--- a/stats/stats_log_api_gen/main.cpp
+++ b/stats/stats_log_api_gen/main.cpp
@@ -31,9 +31,6 @@
fprintf(stderr, " --java FILENAME the java file to output\n");
fprintf(stderr, " --rust FILENAME the rust file to output\n");
fprintf(stderr, " --rustHeader FILENAME the rust file to output for write helpers\n");
- fprintf(stderr, " --rustHeaderCrate NAME header crate to be used while "
- "generating the code. Note: this should be the same as the crate_name "
- "created by rust_library for the header \n");
fprintf(stderr, " --module NAME optional, module name to generate outputs for\n");
fprintf(stderr,
" --namespace COMMA,SEP,NAMESPACE required for cpp/header with "
@@ -58,9 +55,6 @@
"compiled against. (Java only).\n");
fprintf(stderr,
" Default is \"current\".\n");
- fprintf(stderr,
- " --bootstrap If this logging is from a bootstrap process. "
- "Only supported for cpp. Do not use unless necessary.\n");
}
/**
@@ -74,14 +68,13 @@
string javaClass;
string rustFilename;
string rustHeaderFilename;
- string rustHeaderCrate;
+
string moduleName = DEFAULT_MODULE_NAME;
string cppNamespace = DEFAULT_CPP_NAMESPACE;
string cppHeaderImport = DEFAULT_CPP_HEADER_IMPORT;
bool supportWorkSource = false;
int minApiLevel = API_LEVEL_CURRENT;
int compileApiLevel = API_LEVEL_CURRENT;
- bool bootstrap = false;
int index = 1;
while (index < argc) {
@@ -123,13 +116,6 @@
return 1;
}
rustHeaderFilename = argv[index];
- } else if (0 == strcmp("--rustHeaderCrate", argv[index])) {
- index++;
- if (index >= argc) {
- print_usage();
- return 1;
- }
- rustHeaderCrate = argv[index];
} else if (0 == strcmp("--module", argv[index])) {
index++;
if (index >= argc) {
@@ -187,8 +173,6 @@
if (0 != strcmp("current", argv[index])) {
compileApiLevel = atoi(argv[index]);
}
- } else if (0 == strcmp("--bootstrap", argv[index])) {
- bootstrap = true;
}
index++;
@@ -233,20 +217,6 @@
return 1;
}
}
- if (bootstrap) {
- if (cppFilename.empty() && headerFilename.empty()) {
- fprintf(stderr, "Bootstrap flag can only be used for cpp/header files.\n");
- return 1;
- }
- if (supportWorkSource) {
- fprintf(stderr, "Bootstrap flag does not support worksources");
- return 1;
- }
- if ((minApiLevel != API_LEVEL_CURRENT) || (compileApiLevel != API_LEVEL_CURRENT)) {
- fprintf(stderr, "Bootstrap flag does not support older API levels");
- return 1;
- }
- }
// Collate the parameters
Atoms atoms;
@@ -279,7 +249,7 @@
return 1;
}
errorCount = android::stats_log_api_gen::write_stats_log_cpp(
- out, atoms, attributionDecl, cppNamespace, cppHeaderImport, minApiLevel, bootstrap);
+ out, atoms, attributionDecl, cppNamespace, cppHeaderImport, minApiLevel);
fclose(out);
}
@@ -294,8 +264,8 @@
if (moduleName != DEFAULT_MODULE_NAME && cppNamespace == DEFAULT_CPP_NAMESPACE) {
fprintf(stderr, "Must supply --namespace if supplying a specific module\n");
}
- errorCount = android::stats_log_api_gen::write_stats_log_header(
- out, atoms, attributionDecl, cppNamespace, minApiLevel, bootstrap);
+ errorCount = android::stats_log_api_gen::write_stats_log_header(out, atoms, attributionDecl,
+ cppNamespace, minApiLevel);
fclose(out);
}
@@ -337,13 +307,8 @@
return 1;
}
- if(rustHeaderCrate.empty()){
- fprintf(stderr, "rustHeaderCrate flag is either not passed or is empty");
- return 1;
- }
-
errorCount += android::stats_log_api_gen::write_stats_log_rust(
- out, atoms, attributionDecl, minApiLevel, rustHeaderCrate.c_str());
+ out, atoms, attributionDecl, minApiLevel);
fclose(out);
}
@@ -356,13 +321,8 @@
return 1;
}
- if(rustHeaderCrate.empty()){
- fprintf(stderr, "rustHeaderCrate flag is either not passed or is empty");
- return 1;
- }
-
android::stats_log_api_gen::write_stats_log_rust_header(
- out, atoms, attributionDecl, rustHeaderCrate.c_str());
+ out, atoms, attributionDecl);
fclose(out);
}
diff --git a/stats/stats_log_api_gen/native_writer.cpp b/stats/stats_log_api_gen/native_writer.cpp
index 79a78fc..96dcfec 100644
--- a/stats/stats_log_api_gen/native_writer.cpp
+++ b/stats/stats_log_api_gen/native_writer.cpp
@@ -87,36 +87,6 @@
}
}
-static void write_native_method_signature(FILE* out, const string& signaturePrefix,
- const vector<java_type_t>& signature,
- const AtomDecl& attributionDecl, const string& closer) {
- fprintf(out, "%sint32_t code", signaturePrefix.c_str());
- int argIndex = 1;
- for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
- arg++) {
- if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
- for (const auto& chainField : attributionDecl.fields) {
- if (chainField.javaType == JAVA_TYPE_STRING) {
- fprintf(out, ", const std::vector<%s>& %s", cpp_type_name(chainField.javaType),
- chainField.name.c_str());
- } else {
- fprintf(out, ", const %s* %s, size_t %s_length",
- cpp_type_name(chainField.javaType), chainField.name.c_str(),
- chainField.name.c_str());
- }
- }
- } else {
- fprintf(out, ", %s arg%d", cpp_type_name(*arg), argIndex);
-
- if (*arg == JAVA_TYPE_BOOLEAN_ARRAY) {
- fprintf(out, ", size_t arg%d_length", argIndex);
- }
- }
- argIndex++;
- }
- fprintf(out, ")%s\n", closer.c_str());
-}
-
static int write_native_method_body(FILE* out, vector<java_type_t>& signature,
const FieldNumberToAtomDeclSet& fieldNumberToAtomDeclSet,
const AtomDecl& attributionDecl, const int minApiLevel) {
@@ -126,10 +96,6 @@
"event, ", minApiLevel);
for (vector<java_type_t>::const_iterator arg = signature.begin();
arg != signature.end(); arg++) {
- if (minApiLevel < API_T && is_repeated_field(*arg)) {
- fprintf(stderr, "Found repeated field type with min api level < T.");
- return 1;
- }
switch (*arg) {
case JAVA_TYPE_ATTRIBUTION_CHAIN: {
const char* uidName = attributionDecl.fields.front().name.c_str();
@@ -151,8 +117,7 @@
case JAVA_TYPE_BOOLEAN:
fprintf(out, " AStatsEvent_writeBool(event, arg%d);\n", argIndex);
break;
- case JAVA_TYPE_INT:
- [[fallthrough]];
+ case JAVA_TYPE_INT: // Fall through.
case JAVA_TYPE_ENUM:
fprintf(out, " AStatsEvent_writeInt32(event, arg%d);\n", argIndex);
break;
@@ -165,36 +130,9 @@
case JAVA_TYPE_STRING:
fprintf(out, " AStatsEvent_writeString(event, arg%d);\n", argIndex);
break;
- case JAVA_TYPE_BOOLEAN_ARRAY:
- fprintf(out, " AStatsEvent_writeBoolArray(event, arg%d, arg%d_length);\n",
- argIndex, argIndex);
- break;
- case JAVA_TYPE_INT_ARRAY:
- [[fallthrough]];
- case JAVA_TYPE_ENUM_ARRAY:
- fprintf(out,
- " AStatsEvent_writeInt32Array(event, arg%d.data(), arg%d.size());\n",
- argIndex, argIndex);
- break;
- case JAVA_TYPE_FLOAT_ARRAY:
- fprintf(out,
- " AStatsEvent_writeFloatArray(event, arg%d.data(), arg%d.size());\n",
- argIndex, argIndex);
- break;
- case JAVA_TYPE_LONG_ARRAY:
- fprintf(out,
- " AStatsEvent_writeInt64Array(event, arg%d.data(), arg%d.size());\n",
- argIndex, argIndex);
- break;
- case JAVA_TYPE_STRING_ARRAY:
- fprintf(out,
- " AStatsEvent_writeStringArray(event, arg%d.data(), arg%d.size());\n",
- argIndex, argIndex);
- break;
-
default:
- // Unsupported types: OBJECT, DOUBLE
- fprintf(stderr, "Encountered unsupported type.\n");
+ // Unsupported types: OBJECT, DOUBLE, KEY_VALUE_PAIRS
+ fprintf(stderr, "Encountered unsupported type.");
return 1;
}
write_annotations(out, argIndex, fieldNumberToAtomDeclSet, "AStatsEvent_",
@@ -204,112 +142,23 @@
return 0;
}
-static void write_native_method_call(FILE* out, const string& methodName,
- const vector<java_type_t>& signature,
- const AtomDecl& attributionDecl, int argIndex) {
- fprintf(out, "%s(code", methodName.c_str());
- for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
- arg++) {
- if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
- for (const auto& chainField : attributionDecl.fields) {
- if (chainField.javaType == JAVA_TYPE_STRING) {
- fprintf(out, ", %s", chainField.name.c_str());
- } else {
- fprintf(out, ", %s, %s_length", chainField.name.c_str(),
- chainField.name.c_str());
- }
- }
- } else {
- fprintf(out, ", arg%d", argIndex);
-
- if (*arg == JAVA_TYPE_BOOLEAN_ARRAY) {
- fprintf(out, ", arg%d_length", argIndex);
- }
- }
- argIndex++;
- }
- fprintf(out, ");\n");
-}
-
static int write_native_stats_write_methods(FILE* out, const SignatureInfoMap& signatureInfoMap,
- const AtomDecl& attributionDecl, const int minApiLevel,
- bool bootstrap) {
+ const AtomDecl& attributionDecl,
+ const int minApiLevel) {
fprintf(out, "\n");
for (auto signatureInfoMapIt = signatureInfoMap.begin();
signatureInfoMapIt != signatureInfoMap.end(); signatureInfoMapIt++) {
vector<java_type_t> signature = signatureInfoMapIt->first;
const FieldNumberToAtomDeclSet& fieldNumberToAtomDeclSet = signatureInfoMapIt->second;
+ // Key value pairs not supported in native.
+ if (std::find(signature.begin(), signature.end(), JAVA_TYPE_KEY_VALUE_PAIR) !=
+ signature.end()) {
+ continue;
+ }
write_native_method_signature(out, "int stats_write(", signature, attributionDecl, " {");
// Write method body.
- if (bootstrap) {
- fprintf(out, " ::android::os::StatsBootstrapAtom atom;\n");
- fprintf(out, " atom.atomId = code;\n");
- FieldNumberToAtomDeclSet::const_iterator fieldNumberToAtomDeclSetIt =
- fieldNumberToAtomDeclSet.find(ATOM_ID_FIELD_NUMBER);
- if (fieldNumberToAtomDeclSet.end() != fieldNumberToAtomDeclSetIt) {
- fprintf(stderr, "Bootstrap atoms do not support annotations\n");
- return 1;
- }
- int argIndex = 1;
- const char* atomVal = "::android::os::StatsBootstrapAtomValue::";
- for (vector<java_type_t>::const_iterator arg = signature.begin();
- arg != signature.end(); arg++) {
- switch (*arg) {
- case JAVA_TYPE_BYTE_ARRAY:
- fprintf(out,
- " const uint8_t* arg%dbyte = reinterpret_cast<const "
- "uint8_t*>(arg%d.arg);\n",
- argIndex, argIndex);
- fprintf(out,
- " "
- "atom.values.push_back(%smake<%sbytesValue>(std::vector(arg%dbyte, "
- "arg%dbyte + arg%d.arg_length)));\n",
- atomVal, atomVal, argIndex, argIndex, argIndex);
- break;
- case JAVA_TYPE_BOOLEAN:
- fprintf(out, " atom.values.push_back(%smake<%sboolValue>(arg%d));\n",
- atomVal, atomVal, argIndex);
- break;
- case JAVA_TYPE_INT: // Fall through.
- case JAVA_TYPE_ENUM:
- fprintf(out, " atom.values.push_back(%smake<%sintValue>(arg%d));\n",
- atomVal, atomVal, argIndex);
- break;
- case JAVA_TYPE_FLOAT:
- fprintf(out, " atom.values.push_back(%smake<%sfloatValue>(arg%d));\n",
- atomVal, atomVal, argIndex);
- break;
- case JAVA_TYPE_LONG:
- fprintf(out, " atom.values.push_back(%smake<%slongValue>(arg%d));\n",
- atomVal, atomVal, argIndex);
- break;
- case JAVA_TYPE_STRING:
- fprintf(out,
- " atom.values.push_back(%smake<%sstringValue>("
- "::android::String16(arg%d)));\n",
- atomVal, atomVal, argIndex);
- break;
- default:
- // Unsupported types: OBJECT, DOUBLE, ATTRIBUTION_CHAIN,
- // and all repeated fields
- fprintf(stderr, "Encountered unsupported type.\n");
- return 1;
- }
- FieldNumberToAtomDeclSet::const_iterator fieldNumberToAtomDeclSetIt =
- fieldNumberToAtomDeclSet.find(argIndex);
- if (fieldNumberToAtomDeclSet.end() != fieldNumberToAtomDeclSetIt) {
- fprintf(stderr, "Bootstrap atoms do not support annotations\n");
- return 1;
- }
- argIndex++;
- }
- fprintf(out,
- " bool success = "
- "::android::os::stats::StatsBootstrapAtomClient::reportBootstrapAtom(atom);\n");
- fprintf(out, " return success? 0 : -1;\n");
-
- } else if (minApiLevel == API_Q) {
+ if (minApiLevel == API_Q) {
int argIndex = 1;
fprintf(out, " StatsEventCompat event;\n");
fprintf(out, " event.setAtomId(code);\n");
@@ -346,9 +195,8 @@
fprintf(out, " event.writeString(arg%d);\n", argIndex);
break;
default:
- // Unsupported types: OBJECT, DOUBLE, and all repeated
- // fields.
- fprintf(stderr, "Encountered unsupported type.\n");
+ // Unsupported types: OBJECT, DOUBLE, KEY_VALUE_PAIRS.
+ fprintf(stderr, "Encountered unsupported type.");
return 1;
}
write_annotations(out, argIndex, fieldNumberToAtomDeclSet, "event.", "",
@@ -379,6 +227,11 @@
for (auto signature_it = signatureInfoMap.begin();
signature_it != signatureInfoMap.end(); signature_it++) {
vector<java_type_t> signature = signature_it->first;
+ // Key value pairs not supported in native.
+ if (std::find(signature.begin(), signature.end(), JAVA_TYPE_KEY_VALUE_PAIR) !=
+ signature.end()) {
+ continue;
+ }
write_native_method_signature(out, "int stats_write_non_chained(", signature,
attributionDecl, " {");
@@ -415,6 +268,11 @@
signatureInfoMapIt != signatureInfoMap.end(); signatureInfoMapIt++) {
vector<java_type_t> signature = signatureInfoMapIt->first;
const FieldNumberToAtomDeclSet& fieldNumberToAtomDeclSet = signatureInfoMapIt->second;
+ // Key value pairs not supported in native.
+ if (std::find(signature.begin(), signature.end(), JAVA_TYPE_KEY_VALUE_PAIR) !=
+ signature.end()) {
+ continue;
+ }
write_native_method_signature(out, "void addAStatsEvent(AStatsEventList* pulled_data, ",
signature, attributionDecl, " {");
@@ -438,55 +296,47 @@
signatureInfoMapIt != signatureInfoMap.end(); signatureInfoMapIt++) {
vector<java_type_t> signature = signatureInfoMapIt->first;
+ // Key value pairs not supported in native.
+ if (std::find(signature.begin(), signature.end(), JAVA_TYPE_KEY_VALUE_PAIR) !=
+ signature.end()) {
+ continue;
+ }
write_native_method_signature(out, methodName, signature, attributionDecl, ";");
}
}
int write_stats_log_cpp(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
const string& cppNamespace, const string& importHeader,
- const int minApiLevel, bool bootstrap) {
+ const int minApiLevel) {
// Print prelude
fprintf(out, "// This file is autogenerated\n");
fprintf(out, "\n");
fprintf(out, "#include <%s>\n", importHeader.c_str());
- if (!bootstrap) {
- if (minApiLevel == API_Q) {
- fprintf(out, "#include <StatsEventCompat.h>\n");
- } else {
- fprintf(out, "#include <stats_event.h>\n");
- }
-
- if (minApiLevel > API_R) {
- fprintf(out, "#include <stats_annotations.h>\n");
- }
-
- if (minApiLevel > API_Q && !atoms.pulledAtomsSignatureInfoMap.empty()) {
- fprintf(out, "#include <stats_pull_atom_callback.h>\n");
- }
+ if (minApiLevel == API_Q) {
+ fprintf(out, "#include <StatsEventCompat.h>\n");
} else {
- fprintf(out, "#include <StatsBootstrapAtomClient.h>\n");
- fprintf(out, "#include <android/os/StatsBootstrapAtom.h>\n");
- fprintf(out, "#include <utils/String16.h>\n");
+ fprintf(out, "#include <stats_event.h>\n");
}
+ if (minApiLevel > API_R) {
+ fprintf(out, "#include <stats_annotations.h>\n");
+ }
+
+ if (minApiLevel > API_Q && !atoms.pulledAtomsSignatureInfoMap.empty()) {
+ fprintf(out, "#include <stats_pull_atom_callback.h>\n");
+ }
+
+
+
fprintf(out, "\n");
write_namespace(out, cppNamespace);
- int ret = write_native_stats_write_methods(out, atoms.signatureInfoMap, attributionDecl,
- minApiLevel, bootstrap);
- if (ret != 0) {
- return ret;
- }
- if (!bootstrap) {
- write_native_stats_write_non_chained_methods(out, atoms.nonChainedSignatureInfoMap,
- attributionDecl);
- ret = write_native_build_stats_event_methods(out, atoms.pulledAtomsSignatureInfoMap,
- attributionDecl, minApiLevel);
- if (ret != 0) {
- return ret;
- }
- }
+ write_native_stats_write_methods(out, atoms.signatureInfoMap, attributionDecl, minApiLevel);
+ write_native_stats_write_non_chained_methods(out, atoms.nonChainedSignatureInfoMap,
+ attributionDecl);
+ write_native_build_stats_event_methods(out, atoms.pulledAtomsSignatureInfoMap,
+ attributionDecl, minApiLevel);
// Print footer
fprintf(out, "\n");
@@ -496,7 +346,7 @@
}
int write_stats_log_header(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
- const string& cppNamespace, const int minApiLevel, bool bootstrap) {
+ const string& cppNamespace, const int minApiLevel) {
// Print prelude
fprintf(out, "// This file is autogenerated\n");
fprintf(out, "\n");
@@ -506,7 +356,7 @@
fprintf(out, "#include <vector>\n");
fprintf(out, "#include <map>\n");
fprintf(out, "#include <set>\n");
- if (!atoms.pulledAtomsSignatureInfoMap.empty() && !bootstrap) {
+ if (!atoms.pulledAtomsSignatureInfoMap.empty()) {
fprintf(out, "#include <stats_pull_atom_callback.h>\n");
}
fprintf(out, "\n");
@@ -563,24 +413,22 @@
write_native_method_header(out, "int stats_write(", atoms.signatureInfoMap, attributionDecl);
fprintf(out, "\n");
- // Attribution chains and pulled atoms are not supported for bootstrap processes.
- if (!bootstrap) {
- fprintf(out, "//\n");
- fprintf(out, "// Write flattened methods\n");
- fprintf(out, "//\n");
- write_native_method_header(out, "int stats_write_non_chained(",
- atoms.nonChainedSignatureInfoMap, attributionDecl);
- fprintf(out, "\n");
+ fprintf(out, "//\n");
+ fprintf(out, "// Write flattened methods\n");
+ fprintf(out, "//\n");
+ write_native_method_header(out, "int stats_write_non_chained(", atoms.nonChainedSignatureInfoMap,
+ attributionDecl);
+ fprintf(out, "\n");
- // Print pulled atoms methods.
- fprintf(out, "//\n");
- fprintf(out, "// Add AStatsEvent methods\n");
- fprintf(out, "//\n");
- write_native_method_header(out, "void addAStatsEvent(AStatsEventList* pulled_data, ",
- atoms.pulledAtomsSignatureInfoMap, attributionDecl);
- fprintf(out, "\n");
- }
+ // Print pulled atoms methods.
+ fprintf(out, "//\n");
+ fprintf(out, "// Add AStatsEvent methods\n");
+ fprintf(out, "//\n");
+ write_native_method_header(out, "void addAStatsEvent(AStatsEventList* pulled_data, ",
+ atoms.pulledAtomsSignatureInfoMap,
+ attributionDecl);
+ fprintf(out, "\n");
write_closing_namespace(out, cppNamespace);
return 0;
diff --git a/stats/stats_log_api_gen/native_writer.h b/stats/stats_log_api_gen/native_writer.h
index e46c86f..271fda1 100644
--- a/stats/stats_log_api_gen/native_writer.h
+++ b/stats/stats_log_api_gen/native_writer.h
@@ -27,10 +27,10 @@
int write_stats_log_cpp(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
const string& cppNamespace, const string& importHeader,
- const int minApiLevel, bool bootstrap);
+ const int minApiLevel);
int write_stats_log_header(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
- const string& cppNamespace, const int minApiLevel, bool bootstrap);
+ const string& cppNamespace, const int minApiLevel);
} // namespace stats_log_api_gen
} // namespace android
diff --git a/stats/stats_log_api_gen/rust_writer.cpp b/stats/stats_log_api_gen/rust_writer.cpp
index 69edc9d..fdb54d6 100644
--- a/stats/stats_log_api_gen/rust_writer.cpp
+++ b/stats/stats_log_api_gen/rust_writer.cpp
@@ -103,8 +103,7 @@
const AtomDecl& atomDecl,
const AtomDecl& attributionDecl,
bool isCode,
- bool isNonChained,
- const char* headerCrate) {
+ bool isNonChained) {
// To make the generated code pretty, add newlines between arguments.
const char* separator = (isCode ? "\n" : " ");
if (isCode) {
@@ -152,25 +151,33 @@
}
}
}
- fprintf(out, " ) -> %s::StatsResult", headerCrate);
+ fprintf(out, " ) -> statslog_rust_header::StatsResult");
if (isCode) {
fprintf(out, " {");
}
fprintf(out, "\n");
}
-static bool write_rust_usage(FILE* out, const string& method_name, const shared_ptr<AtomDecl> atom,
- const AtomDecl& attributionDecl, bool isNonChained,
- const char* headerCrate) {
+static bool write_rust_usage(FILE* out, const string& method_name,
+ const shared_ptr<AtomDecl> atom,
+ const AtomDecl& attributionDecl,
+ bool isNonChained) {
+ // Key value pairs not supported in Rust because they're not supported in native.
+ if (std::find_if(atom->fields.begin(), atom->fields.end(),
+ [](const AtomField &atomField) {
+ return atomField.javaType == JAVA_TYPE_KEY_VALUE_PAIR;
+ }) != atom->fields.end()) {
+ fprintf(out, " // Key value pairs are unsupported in Rust.\n");
+ return false;
+ }
fprintf(out, " // Definition: ");
write_rust_method_signature(out, method_name.c_str(), *atom, attributionDecl,
- false, isNonChained, headerCrate);
+ false, isNonChained);
return true;
}
static void write_rust_atom_constants(FILE* out, const Atoms& atoms,
- const AtomDecl& attributionDecl,
- const char* headerCrate) {
+ const AtomDecl& attributionDecl) {
fprintf(out, "// Constants for atom codes.\n");
fprintf(out, "#[derive(Clone, Copy)]\n");
fprintf(out, "pub enum Atoms {\n");
@@ -182,8 +189,7 @@
string constant = make_camel_case_name(atomDecl->name);
fprintf(out, "\n");
fprintf(out, " // %s %s\n", atomDecl->message.c_str(), atomDecl->name.c_str());
- bool isSupported = write_rust_usage(out, "// stats_write", atomDecl,
- attributionDecl, false, headerCrate);
+ bool isSupported = write_rust_usage(out, "// stats_write", atomDecl, attributionDecl, false);
if (!isSupported) {
continue;
}
@@ -191,7 +197,7 @@
auto non_chained_decl = atom_code_to_non_chained_decl_map.find(atomDecl->code);
if (non_chained_decl != atom_code_to_non_chained_decl_map.end()) {
write_rust_usage(out, "stats_write_non_chained", *non_chained_decl->second,
- attributionDecl, true, headerCrate);
+ attributionDecl, true);
}
fprintf(out, " %s = %d,\n", constant.c_str(), atomDecl->code);
}
@@ -206,7 +212,7 @@
for (const AtomField& field : atomDecl->fields) {
if (field.javaType == JAVA_TYPE_ENUM) {
fprintf(out, " #[repr(i32)]\n");
- fprintf(out, " #[derive(Clone, Copy, Eq, PartialEq)]\n");
+ fprintf(out, " #[derive(Clone, Copy)]\n");
fprintf(out, " pub enum %s {\n", make_camel_case_name(field.name).c_str());
for (map<int, string>::const_iterator value = field.enumValues.begin();
value != field.enumValues.end(); value++) {
@@ -295,8 +301,7 @@
static int write_rust_method_body(FILE* out, const AtomDecl& atomDecl,
const AtomDecl& attributionDecl,
- const int minApiLevel,
- const char* headerCrate) {
+ const int minApiLevel) {
fprintf(out, " unsafe {\n");
if (minApiLevel == API_Q) {
fprintf(stderr, "TODO: Do we need to handle this case?");
@@ -308,8 +313,7 @@
} else {
fprintf(out, " let __event = AStatsEventList_addStatsEvent(pulled_data_);\n");
}
- fprintf(out, " AStatsEvent_setAtomId(__event, %s::Atoms::%s as u32);\n",
- headerCrate,
+ fprintf(out, " AStatsEvent_setAtomId(__event, statslog_rust_header::Atoms::%s as u32);\n",
make_camel_case_name(atomDecl.name).c_str());
write_annotations(out, ATOM_ID_FIELD_NUMBER, atomDecl, "AStatsEvent_", "__event, ");
for (int i = 0; i < atomDecl.fields.size(); i++) {
@@ -356,23 +360,22 @@
case JAVA_TYPE_STRING:
fprintf(out, " let str = std::ffi::CString::new(%s)?;\n", name.c_str());
fprintf(out, " AStatsEvent_writeString(__event, str.as_ptr());\n");
- break;
+ break;
default:
- // Unsupported types: OBJECT, DOUBLE
- fprintf(stderr, "Encountered unsupported type: %d.", type);
- return 1;
+ // Unsupported types: OBJECT, DOUBLE, KEY_VALUE_PAIRS
+ fprintf(stderr, "Encountered unsupported type: %d.", type);
+ return 1;
}
// write_annotations expects the first argument to have an index of 1.
write_annotations(out, i + 1, atomDecl, "AStatsEvent_", "__event, ");
}
if (atomDecl.oneOfName == ONEOF_PUSHED_ATOM_NAME) {
fprintf(out, " let __ret = AStatsEvent_write(__event);\n");
- fprintf(out, " if __ret >= 0 { %s::StatsResult::Ok(()) }"
- " else { Err(%s::StatsError::Return(__ret)) }\n", headerCrate,
- headerCrate);
+ fprintf(out, " if __ret >= 0 { statslog_rust_header::StatsResult::Ok(()) }"
+ " else { Err(statslog_rust_header::StatsError::Return(__ret)) }\n");
} else {
fprintf(out, " AStatsEvent_build(__event);\n");
- fprintf(out, " %s::StatsResult::Ok(())\n", headerCrate);
+ fprintf(out, " statslog_rust_header::StatsResult::Ok(())\n");
}
fprintf(out, " }\n");
return 0;
@@ -380,16 +383,15 @@
static int write_rust_stats_write_method(FILE* out, const shared_ptr<AtomDecl>& atomDecl,
const AtomDecl& attributionDecl,
- const int minApiLevel,
- const char* headerCrate) {
+ const int minApiLevel) {
if (atomDecl->oneOfName == ONEOF_PUSHED_ATOM_NAME) {
write_rust_method_signature(out, "stats_write", *atomDecl, attributionDecl,
- true, false, headerCrate);
+ true, false);
} else {
write_rust_method_signature(out, "add_astats_event", *atomDecl, attributionDecl,
- true, false, headerCrate);
+ true, false);
}
- int ret = write_rust_method_body(out, *atomDecl, attributionDecl, minApiLevel, headerCrate);
+ int ret = write_rust_method_body(out, *atomDecl, attributionDecl, minApiLevel);
if (ret != 0) {
return ret;
}
@@ -399,10 +401,9 @@
static void write_rust_stats_write_non_chained_method(FILE* out,
const shared_ptr<AtomDecl>& atomDecl,
- const AtomDecl& attributionDecl,
- const char* headerCrate) {
+ const AtomDecl& attributionDecl) {
write_rust_method_signature(out, "stats_write_non_chained", *atomDecl, attributionDecl,
- true, true, headerCrate);
+ true, true);
fprintf(out, " stats_write(");
for (int i = 0; i < atomDecl->fields.size(); i++) {
if (i != 0) {
@@ -441,7 +442,7 @@
}
static void write_rust_struct(FILE* out, const shared_ptr<AtomDecl>& atomDecl,
- const AtomDecl& attributionDecl, const char* headerCrate) {
+ const AtomDecl& attributionDecl) {
// Write the struct.
bool lifetime = needs_lifetime(atomDecl);
if (lifetime) {
@@ -477,21 +478,21 @@
}
} else {
if (lifetime) {
- fprintf(out, " impl<'a> %s::Stat for %s<'a> {\n", headerCrate,
+ fprintf(out, " impl<'a> statslog_rust_header::Stat for %s<'a> {\n",
make_camel_case_name(atomDecl->name).c_str());
} else {
- fprintf(out, " impl %s::Stat for %s {\n", headerCrate,
+ fprintf(out, " impl statslog_rust_header::Stat for %s {\n",
make_camel_case_name(atomDecl->name).c_str());
}
}
fprintf(out, " #[inline(always)]\n");
if (isPush) {
fprintf(out, " pub fn stats_write(&self)"
- " -> %s::StatsResult {\n", headerCrate);
+ " -> statslog_rust_header::StatsResult {\n");
fprintf(out, " stats_write(");
} else {
fprintf(out, " fn add_astats_event(&self, pulled_data: &mut AStatsEventList)"
- " -> %s::StatsResult {\n", headerCrate);
+ " -> statslog_rust_header::StatsResult {\n");
fprintf(out, " add_astats_event(pulled_data, ");
}
for (const AtomField& atomField : atomDecl->fields) {
@@ -512,13 +513,12 @@
static int write_rust_stats_write_atoms(FILE* out, const AtomDeclSet& atomDeclSet,
const AtomDecl& attributionDecl,
const AtomDeclSet& nonChainedAtomDeclSet,
- const int minApiLevel,
- const char* headerCrate) {
- for (const auto& atomDecl : atomDeclSet) {
- // TODO(b/216543320): support repeated fields in Rust
+ const int minApiLevel) {
+ for (const auto &atomDecl : atomDeclSet) {
+ // Key value pairs not supported in Rust because they're not supported in native.
if (std::find_if(atomDecl->fields.begin(), atomDecl->fields.end(),
- [](const AtomField& atomField) {
- return is_repeated_field(atomField.javaType);
+ [](const AtomField &atomField) {
+ return atomField.javaType == JAVA_TYPE_KEY_VALUE_PAIR;
}) != atomDecl->fields.end()) {
continue;
}
@@ -528,24 +528,21 @@
fprintf(out, " use std::convert::TryInto;\n");
fprintf(out, "\n");
write_rust_atom_constant_values(out, atomDecl);
- write_rust_struct(out, atomDecl, attributionDecl, headerCrate);
- int ret = write_rust_stats_write_method(out, atomDecl, attributionDecl,
- minApiLevel, headerCrate);
+ write_rust_struct(out, atomDecl, attributionDecl);
+ int ret = write_rust_stats_write_method(out, atomDecl, attributionDecl, minApiLevel);
if (ret != 0) {
return ret;
}
auto nonChained = nonChainedAtomDeclSet.find(atomDecl);
if (nonChained != nonChainedAtomDeclSet.end()) {
- write_rust_stats_write_non_chained_method(out, *nonChained,
- attributionDecl, headerCrate);
+ write_rust_stats_write_non_chained_method(out, *nonChained, attributionDecl);
}
fprintf(out, "}\n");
}
return 0;
}
-void write_stats_log_rust_header(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
- const char* headerCrate) {
+void write_stats_log_rust_header(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl) {
// Print prelude
fprintf(out, "// This file is autogenerated.\n");
fprintf(out, "\n");
@@ -568,11 +565,11 @@
fprintf(out, "}\n");
fprintf(out, "\n");
- write_rust_atom_constants(out, atoms, attributionDecl, headerCrate);
+ write_rust_atom_constants(out, atoms, attributionDecl);
}
int write_stats_log_rust(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
- const int minApiLevel, const char* headerCrate) {
+ const int minApiLevel) {
//Print prelude
fprintf(out, "// This file is autogenerated.\n");
fprintf(out, "\n");
@@ -588,8 +585,7 @@
write_rust_annotation_constants(out);
int errorCount = write_rust_stats_write_atoms(out, atoms.decls, attributionDecl,
- atoms.non_chained_decls,
- minApiLevel, headerCrate);
+ atoms.non_chained_decls, minApiLevel);
return errorCount;
}
diff --git a/stats/stats_log_api_gen/rust_writer.h b/stats/stats_log_api_gen/rust_writer.h
index 192b61d..daaa241 100644
--- a/stats/stats_log_api_gen/rust_writer.h
+++ b/stats/stats_log_api_gen/rust_writer.h
@@ -24,10 +24,9 @@
namespace stats_log_api_gen {
int write_stats_log_rust(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
- const int minApiLevel, const char* rustHeaderCrate);
+ const int minApiLevel);
-void write_stats_log_rust_header(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
- const char* rustHeaderCrate);
+void write_stats_log_rust_header(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl);
} // namespace stats_log_api_gen
} // namespace android
diff --git a/stats/stats_log_api_gen/test.proto b/stats/stats_log_api_gen/test.proto
index e93d0f4..18c52bf 100644
--- a/stats/stats_log_api_gen/test.proto
+++ b/stats/stats_log_api_gen/test.proto
@@ -45,21 +45,16 @@
optional int64 int64_field = 3;
optional uint64 uint64_field = 4;
optional int32 int32_field = 5;
- optional bool bool_field = 6;
- optional string string_field = 7;
- optional uint32 uint32_field = 8;
- optional AnEnum enum_field = 9;
- repeated float repeated_float_field = 10;
- repeated int64 repeated_int64_field = 11;
- repeated int32 repeated_int32_field = 12;
- repeated bool repeated_bool_field = 13;
- repeated string repeated_string_field = 14;
-}
-
-// Separated from AllTypesAtom because tests can't properly check atoms with multiple enum type
-// fields
-message RepeatedEnumAtom {
- repeated AnEnum repeated_enum_field = 1;
+ optional fixed64 fixed64_field = 6;
+ optional fixed32 fixed32_field = 7;
+ optional bool bool_field = 8;
+ optional string string_field = 9;
+ optional uint32 uint32_field = 10;
+ optional AnEnum enum_field = 11;
+ optional sfixed32 sfixed32_field = 12;
+ optional sfixed64 sfixed64_field = 13;
+ optional sint32 sint32_field = 14;
+ optional sint64 sint64_field = 15;
}
message Event {
@@ -68,31 +63,14 @@
IntAtom int_atom = 1;
AnotherIntAtom another_int_atom = 3;
AllTypesAtom all_types_atom = 4;
- RepeatedEnumAtom repeated_enum_atom = 5;
}
}
message BadTypesAtom {
optional IntAtom bad_int_atom = 1;
optional bytes bad_bytes = 2;
- optional double double_field = 3;
- optional fixed64 fixed64_field = 4;
- optional fixed32 fixed32_field = 5;
- optional sfixed64 sfixed64_field = 6;
- optional sfixed32 sfixed32_field = 7;
- optional sint64 sint64_field = 8;
- optional sint32 sint32_field = 9;
- repeated double double_repeated_field = 10;
- repeated fixed64 fixed64_repeated_field = 11;
- repeated fixed32 fixed32_repeated_field = 12;
- repeated sfixed64 sfixed64_repeated_field = 13;
- repeated sfixed32 sfixed32_repeated_field = 14;
- repeated sint64 sint64_repeated_field = 15;
- repeated sint32 sint32_repeated_field = 16;
- repeated uint64 uint64_repeated_field = 17;
- repeated uint32 uint32_repeated_field = 18;
- repeated IntAtom bad_int_atom_repeated_field = 19;
- repeated bytes bad_bytes_repeated_field = 20;
+ repeated int32 repeated_field = 3;
+ optional double double_field = 4;
}
message BadTypesEvent {
@@ -159,7 +137,6 @@
BadStateAtom1 bad1 = 1;
BadStateAtom2 bad2 = 2;
BadStateAtom3 bad3 = 3;
- BadStateAtom4 bad4 = 4;
}
}
@@ -190,11 +167,6 @@
optional int32 state2 = 3 [(android.os.statsd.state_field_option).exclusive_state = true];
}
-// Repeated fields can't have state annotations.
-message BadStateAtom4 {
- repeated int32 state = 1 [(android.os.statsd.state_field_option).exclusive_state = true];
-}
-
message GoodStateAtom1 {
optional int32 uid = 1 [(android.os.statsd.state_field_option).primary_field = true];
optional int32 state = 2 [(android.os.statsd.state_field_option).exclusive_state = true];
@@ -215,37 +187,6 @@
optional int32 state = 3 [(android.os.statsd.state_field_option).exclusive_state = true];
}
-message BadUidAtoms {
- oneof pushed {
- BadUidAtom1 bad1 = 1;
- BadUidAtom2 bad2 = 2;
- }
-}
-
-message GoodUidAtoms {
- oneof pushed {
- GoodUidAtom1 good1 = 1;
- GoodUidAtom2 good2 = 2;
- }
-}
-
-// The only repeated field type that can have is_uid annotation is int32.
-message BadUidAtom1 {
- repeated int64 uid = 1 [(android.os.statsd.is_uid) = true];
-}
-
-message BadUidAtom2 {
- optional string uid = 1 [(android.os.statsd.is_uid) = true];
-}
-
-message GoodUidAtom1 {
- optional int32 uid = 1 [(android.os.statsd.is_uid) = true];
-}
-
-message GoodUidAtom2 {
- repeated int32 uid = 1 [(android.os.statsd.is_uid) = true];
-}
-
message ModuleOneAtom {
optional int32 field = 1 [(android.os.statsd.is_uid) = true];
}
diff --git a/stats/stats_log_api_gen/test_collation.cpp b/stats/stats_log_api_gen/test_collation.cpp
index 743a283..3b536a4 100644
--- a/stats/stats_log_api_gen/test_collation.cpp
+++ b/stats/stats_log_api_gen/test_collation.cpp
@@ -81,7 +81,7 @@
int errorCount = collate_atoms(Event::descriptor(), DEFAULT_MODULE_NAME, &atoms);
EXPECT_EQ(0, errorCount);
- EXPECT_EQ(4ul, atoms.signatureInfoMap.size());
+ EXPECT_EQ(3ul, atoms.signatureInfoMap.size());
// IntAtom, AnotherIntAtom
EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_INT);
@@ -96,21 +96,19 @@
JAVA_TYPE_LONG, // int64
JAVA_TYPE_LONG, // uint64
JAVA_TYPE_INT, // int32
+ JAVA_TYPE_LONG, // fixed64
+ JAVA_TYPE_INT, // fixed32
JAVA_TYPE_BOOLEAN, // bool
JAVA_TYPE_STRING, // string
JAVA_TYPE_INT, // uint32
JAVA_TYPE_INT, // AnEnum
- JAVA_TYPE_FLOAT_ARRAY, // repeated float
- JAVA_TYPE_LONG_ARRAY, // repeated int64
- JAVA_TYPE_INT_ARRAY, // repeated int32
- JAVA_TYPE_BOOLEAN_ARRAY, // repeated bool
- JAVA_TYPE_STRING_ARRAY // repeated string
+ JAVA_TYPE_INT, // sfixed32
+ JAVA_TYPE_LONG, // sfixed64
+ JAVA_TYPE_INT, // sint32
+ JAVA_TYPE_LONG // sint64
);
- // RepeatedEnumAtom
- EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_INT_ARRAY);
-
- EXPECT_EQ(5ul, atoms.decls.size());
+ EXPECT_EQ(4ul, atoms.decls.size());
AtomDeclSet::const_iterator atomIt = atoms.decls.begin();
EXPECT_EQ(1, (*atomIt)->code);
@@ -140,14 +138,6 @@
EXPECT_HAS_ENUM_FIELD((*atomIt), "enum_field", enumValues);
atomIt++;
- EXPECT_EQ(5, (*atomIt)->code);
- EXPECT_EQ("repeated_enum_atom", (*atomIt)->name);
- EXPECT_EQ("RepeatedEnumAtom", (*atomIt)->message);
- enumValues[0] = "VALUE0";
- enumValues[1] = "VALUE1";
- EXPECT_HAS_ENUM_FIELD((*atomIt), "repeated_enum_field", enumValues);
- atomIt++;
-
EXPECT_EQ(atoms.decls.end(), atomIt);
}
@@ -162,13 +152,14 @@
}
/**
- * Test that atoms that have unsupported field types are rejected.
+ * Test that atoms that have non-primitive types or repeated fields are
+ * rejected.
*/
TEST(CollationTest, FailOnBadTypes) {
Atoms atoms;
int errorCount = collate_atoms(BadTypesEvent::descriptor(), DEFAULT_MODULE_NAME, &atoms);
- EXPECT_EQ(20, errorCount);
+ EXPECT_EQ(4, errorCount);
}
/**
@@ -210,7 +201,7 @@
Atoms atoms;
int errorCount = collate_atoms(BadStateAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
- EXPECT_EQ(4, errorCount);
+ EXPECT_EQ(3, errorCount);
}
TEST(CollationTest, PassOnGoodStateAtomOptions) {
@@ -219,19 +210,6 @@
EXPECT_EQ(0, errorCount);
}
-TEST(CollationTest, FailOnBadUidAtomOptions) {
- Atoms atoms;
- int errorCount = collate_atoms(BadUidAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-
- EXPECT_EQ(2, errorCount);
-}
-
-TEST(CollationTest, PassOnGoodUidAtomOptions) {
- Atoms atoms;
- int errorCount = collate_atoms(GoodUidAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
- EXPECT_EQ(0, errorCount);
-}
-
TEST(CollationTest, PassOnGoodBinaryFieldAtom) {
Atoms atoms;
int errorCount =
diff --git a/stats/stats_log_api_gen/utils.cpp b/stats/stats_log_api_gen/utils.cpp
index 74461ff..d3ea80c 100644
--- a/stats/stats_log_api_gen/utils.cpp
+++ b/stats/stats_log_api_gen/utils.cpp
@@ -91,7 +91,7 @@
switch (type) {
case JAVA_TYPE_BOOLEAN:
return "bool";
- case JAVA_TYPE_INT: // Fallthrough.
+ case JAVA_TYPE_INT:
case JAVA_TYPE_ENUM:
return "int32_t";
case JAVA_TYPE_LONG:
@@ -104,19 +104,6 @@
return "char const*";
case JAVA_TYPE_BYTE_ARRAY:
return "const BytesField&";
- case JAVA_TYPE_BOOLEAN_ARRAY:
- return "const bool*";
- case JAVA_TYPE_INT_ARRAY: // Fallthrough.
- case JAVA_TYPE_ENUM_ARRAY:
- return "const std::vector<int32_t>&";
- case JAVA_TYPE_LONG_ARRAY:
- return "const std::vector<int64_t>&";
- case JAVA_TYPE_FLOAT_ARRAY:
- return "const std::vector<float>&";
- case JAVA_TYPE_STRING_ARRAY:
- return "const std::vector<char const*>&";
- case JAVA_TYPE_DOUBLE_ARRAY:
- return "const std::vector<double>&";
default:
return "UNKNOWN";
}
@@ -126,7 +113,7 @@
switch (type) {
case JAVA_TYPE_BOOLEAN:
return "boolean";
- case JAVA_TYPE_INT: // Fallthrough.
+ case JAVA_TYPE_INT:
case JAVA_TYPE_ENUM:
return "int";
case JAVA_TYPE_LONG:
@@ -139,39 +126,11 @@
return "java.lang.String";
case JAVA_TYPE_BYTE_ARRAY:
return "byte[]";
- case JAVA_TYPE_BOOLEAN_ARRAY:
- return "boolean[]";
- case JAVA_TYPE_INT_ARRAY: // Fallthrough.
- case JAVA_TYPE_ENUM_ARRAY:
- return "int[]";
- case JAVA_TYPE_LONG_ARRAY:
- return "long[]";
- case JAVA_TYPE_FLOAT_ARRAY:
- return "float[]";
- case JAVA_TYPE_STRING_ARRAY:
- return "java.lang.String[]";
- case JAVA_TYPE_DOUBLE_ARRAY:
- return "double[]";
default:
return "UNKNOWN";
}
}
-// Does not include AttributionChain type.
-bool is_repeated_field(java_type_t type) {
- switch (type) {
- case JAVA_TYPE_BOOLEAN_ARRAY:
- case JAVA_TYPE_INT_ARRAY:
- case JAVA_TYPE_FLOAT_ARRAY:
- case JAVA_TYPE_LONG_ARRAY:
- case JAVA_TYPE_STRING_ARRAY:
- case JAVA_TYPE_ENUM_ARRAY:
- return true;
- default:
- return false;
- }
-}
-
// Native
// Writes namespaces for the cpp and header files, returning the number of
// namespaces written.
@@ -207,6 +166,14 @@
chainField.name.c_str());
}
}
+ } else if (field->javaType == JAVA_TYPE_KEY_VALUE_PAIR) {
+ fprintf(out,
+ ", const std::map<int, int32_t>& %s_int"
+ ", const std::map<int, int64_t>& %s_long"
+ ", const std::map<int, char const*>& %s_str"
+ ", const std::map<int, float>& %s_float",
+ field->name.c_str(), field->name.c_str(), field->name.c_str(),
+ field->name.c_str());
} else {
fprintf(out, ", %s %s", cpp_type_name(field->javaType), field->name.c_str());
}
@@ -248,6 +215,65 @@
fprintf(out, "\n");
}
+void write_native_method_signature(FILE* out, const string& signaturePrefix,
+ const vector<java_type_t>& signature,
+ const AtomDecl& attributionDecl, const string& closer) {
+ fprintf(out, "%sint32_t code", signaturePrefix.c_str());
+ int argIndex = 1;
+ for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
+ arg++) {
+ if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
+ for (const auto& chainField : attributionDecl.fields) {
+ if (chainField.javaType == JAVA_TYPE_STRING) {
+ fprintf(out, ", const std::vector<%s>& %s", cpp_type_name(chainField.javaType),
+ chainField.name.c_str());
+ } else {
+ fprintf(out, ", const %s* %s, size_t %s_length",
+ cpp_type_name(chainField.javaType), chainField.name.c_str(),
+ chainField.name.c_str());
+ }
+ }
+ } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
+ fprintf(out,
+ ", const std::map<int, int32_t>& arg%d_1, "
+ "const std::map<int, int64_t>& arg%d_2, "
+ "const std::map<int, char const*>& arg%d_3, "
+ "const std::map<int, float>& arg%d_4",
+ argIndex, argIndex, argIndex, argIndex);
+ } else {
+ fprintf(out, ", %s arg%d", cpp_type_name(*arg), argIndex);
+ }
+ argIndex++;
+ }
+ fprintf(out, ")%s\n", closer.c_str());
+}
+
+void write_native_method_call(FILE* out, const string& methodName,
+ const vector<java_type_t>& signature, const AtomDecl& attributionDecl,
+ int argIndex) {
+ fprintf(out, "%s(code", methodName.c_str());
+ for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
+ arg++) {
+ if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
+ for (const auto& chainField : attributionDecl.fields) {
+ if (chainField.javaType == JAVA_TYPE_STRING) {
+ fprintf(out, ", %s", chainField.name.c_str());
+ } else {
+ fprintf(out, ", %s, %s_length", chainField.name.c_str(),
+ chainField.name.c_str());
+ }
+ }
+ } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
+ fprintf(out, ", arg%d_1, arg%d_2, arg%d_3, arg%d_4", argIndex, argIndex, argIndex,
+ argIndex);
+ } else {
+ fprintf(out, ", arg%d", argIndex);
+ }
+ argIndex++;
+ }
+ fprintf(out, ");\n");
+}
+
// Java
void write_java_atom_codes(FILE* out, const Atoms& atoms) {
fprintf(out, " // Constants for atom codes.\n");
@@ -303,6 +329,8 @@
field++) {
if (field->javaType == JAVA_TYPE_ATTRIBUTION_CHAIN) {
fprintf(out, ", android.os.WorkSource workSource");
+ } else if (field->javaType == JAVA_TYPE_KEY_VALUE_PAIR) {
+ fprintf(out, ", android.util.SparseArray<Object> value_map");
} else if (field->javaType == JAVA_TYPE_BYTE_ARRAY) {
fprintf(out, ", byte[] %s", field->name.c_str());
} else {
@@ -324,6 +352,9 @@
if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
fprintf(stderr, "Non chained signatures should not have attribution chains.\n");
return 1;
+ } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
+ fprintf(stderr, "Module logging does not yet support key value pair.\n");
+ return 1;
} else {
fprintf(out, ", %s arg%d", java_type_name(*arg), argIndex);
}
diff --git a/stats/stats_log_api_gen/utils.h b/stats/stats_log_api_gen/utils.h
index 3465524..947e9fe 100644
--- a/stats/stats_log_api_gen/utils.h
+++ b/stats/stats_log_api_gen/utils.h
@@ -35,10 +35,10 @@
const int API_LEVEL_CURRENT = 10000;
const int API_Q = 29;
const int API_R = 30;
-const int API_T = 33;
const int JAVA_MODULE_REQUIRES_FLOAT = 0x01;
const int JAVA_MODULE_REQUIRES_ATTRIBUTION = 0x02;
+const int JAVA_MODULE_REQUIRES_KEY_VALUE_PAIRS = 0x04;
void build_non_chained_decl_map(const Atoms& atoms,
std::map<int, AtomDeclSet::const_iterator>* decl_map);
@@ -51,8 +51,6 @@
const char* java_type_name(java_type_t type);
-bool is_repeated_field(java_type_t type);
-
// Common Native helpers
void write_namespace(FILE* out, const string& cppNamespaces);
@@ -60,6 +58,14 @@
void write_native_atom_constants(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl);
+void write_native_method_signature(FILE* out, const string& signaturePrefix,
+ const vector<java_type_t>& signature,
+ const AtomDecl& attributionDecl, const string& closer);
+
+void write_native_method_call(FILE* out, const string& methodName,
+ const vector<java_type_t>& signature, const AtomDecl& attributionDecl,
+ int argIndex = 1);
+
// Common Java helpers.
void write_java_atom_codes(FILE* out, const Atoms& atoms);