xref: /aosp_15_r20/frameworks/proto_logging/stats/atoms/sysui/sysui_atoms.proto (revision 64c55175f22a2714b5ba1250098ad9bbc12ec7cd)
1/*
2 * Copyright (C) 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package android.os.statsd.sysui;
20
21import "frameworks/proto_logging/stats/atom_field_options.proto";
22import "frameworks/proto_logging/stats/enums/app/media_output_enum.proto";
23import "frameworks/proto_logging/stats/enums/hardware/sensor/assist/enums.proto";
24import "frameworks/proto_logging/stats/enums/stats/launcher/launcher.proto";
25
26option java_package = "com.android.os.sysui";
27option java_multiple_files = true;
28
29/**
30 * Logs keyguard state. The keyguard is the lock screen.
31 *
32 * Logged from:
33 *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
34 */
35message KeyguardStateChanged {
36    enum State {
37        UNKNOWN = 0;
38        // The keyguard is hidden when the phone is unlocked.
39        HIDDEN = 1;
40        // The keyguard is shown when the phone is locked (screen turns off).
41        SHOWN= 2;
42        // The keyguard is occluded when something is overlaying the keyguard.
43        // Eg. Opening the camera while on the lock screen.
44        OCCLUDED = 3;
45    }
46    optional State state = 1;
47}
48
49/**
50 * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and
51 * prompts the user to enter a password (pattern, pin, etc).
52 *
53 * Logged from:
54 *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
55 */
56message KeyguardBouncerStateChanged {
57    enum State {
58        UNKNOWN = 0;
59        // Bouncer is hidden, either as a result of successfully entering the
60        // password, screen timing out, or user going back to lock screen.
61        HIDDEN = 1;
62        // The user is being prompted to enter the password and the keyguard is NOT in one
63        // handed mode.
64        SHOWN = 2;
65        // The user is being prompted to enter the password and the keyguard shows in one
66        // handed mode and left aligned.
67        SHOWN_LEFT = 3;
68        // The user is being prompted to enter the password and the keyguard shows in one
69        // handed mode and right aligned.
70        SHOWN_RIGHT = 4;
71        // The keyguard switches to the left side while it is in one handed mode.
72        SWITCH_LEFT = 5;
73        // The keyguard switches to the right side while it is in one handed mode.
74        SWITCH_RIGHT = 6;
75    }
76    optional State state = 1;
77}
78
79/**
80 * Logs the result of entering a password into the keyguard bouncer.
81 *
82 * Logged from:
83 *   frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
84 */
85message KeyguardBouncerPasswordEntered {
86    enum BouncerResult {
87        UNKNOWN = 0;
88        // The password entered was incorrect.
89        FAILURE = 1;
90        // The password entered was correct.
91        SUCCESS = 2;
92    }
93    optional BouncerResult result = 1;
94
95    enum BouncerSide {
96        DEFAULT = 0;
97        LEFT = 1;
98        RIGHT = 2;
99    }
100    optional BouncerSide side = 2;
101}
102
103message BackGesture {
104    enum BackType {
105        DEFAULT_BACK_TYPE = 0;
106        COMPLETED = 1;
107        COMPLETED_REJECTED = 2; // successful because coming from rejected area
108        INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area
109        INCOMPLETE = 4;  // Unsuccessful, for reasons other than below.
110        INCOMPLETE_FAR_FROM_EDGE = 5;  // Unsuccessful, far from the edge.
111        INCOMPLETE_MULTI_TOUCH = 6;  // Unsuccessful, multi touch.
112        INCOMPLETE_LONG_PRESS = 7;  // Unsuccessful, long press.
113        INCOMPLETE_VERTICAL_MOVE = 8;  // Unsuccessful, move vertically.
114    }
115    optional BackType type = 1;
116
117    optional int32 y_coordinate = 2 [deprecated = true]; // y coordinate for ACTION_DOWN event
118    optional int32 start_x = 4;  // X coordinate for ACTION_DOWN event.
119    optional int32 start_y = 5;  // Y coordinate for ACTION_DOWN event.
120    optional int32 end_x = 6;   // X coordinate for ACTION_MOVE event.
121    optional int32 end_y = 7;  // Y coordinate for ACTION_MOVE event.
122    optional int32 left_boundary = 8;  // left edge width + left inset
123    optional int32 right_boundary = 9;  // screen width - (right edge width + right inset)
124    // The score between 0 and 1 which is the prediction output for the Back Gesture model.
125    optional float ml_model_score = 10;
126    optional string package_name = 11;  // The name of the top 100 most used package by all users.
127
128    // Specifies the input type of the event.
129    enum InputType {
130        UNKNOWN = 0;
131        TOUCH = 1;
132        TRACKPAD = 2;
133    }
134    optional InputType input_type = 12;
135
136    enum WindowHorizontalLocation {
137        DEFAULT_LOCATION = 0;
138        LEFT = 1;
139        RIGHT = 2;
140    }
141    optional WindowHorizontalLocation x_location = 3 [deprecated = true];
142}
143
144/**
145 * Logs when IME is on.
146 *
147 * Logged from: /packages/SystemUI/src/com/android/systemui/
148                statusbar/phone/NavigationBarView.java
149 *
150 */
151message ImeTouchReported {
152    optional int32 x_coordinate = 1;  // X coordinate for ACTION_DOWN event.
153    optional int32 y_coordinate = 2;  // Y coordinate for ACTION_DOWN event.
154}
155
156/**
157 * Logs when Launcher (HomeScreen) UI has changed or was interacted.
158 *
159 * Logged from:
160 *   packages/apps/Launcher3
161 */
162message LauncherUIChanged {
163    optional android.stats.launcher.LauncherAction action = 1 [deprecated = true];
164    optional android.stats.launcher.LauncherState src_state = 2;
165    optional android.stats.launcher.LauncherState dst_state = 3;
166    optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES, deprecated = true];
167    optional bool is_swipe_up_enabled = 5 [deprecated = true];
168
169    // The event id (e.g., app launch, drag and drop, long press)
170    optional int32 event_id = 6;
171    // The event's source or target id (e.g., icon, task, button)
172    optional int32 target_id = 7;
173    // If the target needs to be tracked, use this id field
174    optional int32 instance_id = 8;
175    optional int32 uid = 9 [(is_uid) = true];
176    optional string package_name = 10;
177    optional string component_name = 11;
178
179    // (x, y) coordinate and the index information of the target on the container
180    optional int32 grid_x = 12 [default = -1];
181    optional int32 grid_y = 13 [default = -1];
182    optional int32 page_id = 14 [default = -2];
183
184    // e.g., folder icon's (x, y) location and index information on the workspace
185    optional int32 grid_x_parent = 15 [default = -1];
186    optional int32 grid_y_parent = 16 [default = -1];
187    optional int32 page_id_parent = 17 [default = -2];
188
189    // e.g., SEARCHBOX_ALLAPPS, FOLDER_WORKSPACE
190    optional int32 hierarchy = 18;
191
192    // deprecated, use user_type field instead
193    optional bool is_work_profile = 19 [deprecated = true];
194
195    // Used to store the predicted rank of the target
196    optional int32 rank = 20 [default = -1];
197
198    // e.g., folderLabelState can be captured in the following two fields
199    optional int32 from_state = 21;
200    optional int32 to_state = 22;
201
202    // e.g., autofilled or suggested texts that are not user entered
203    optional string edittext = 23;
204
205    // e.g., number of contents inside a container (e.g., icons inside a folder)
206    optional int32 cardinality = 24;
207
208    // Used to store features of the target (e.g. widget is reconfigurable, etc)
209    optional int32 features = 25;
210
211    // Used to store on-device search related features of the target
212    // (e.g. spell-corrected query etc)
213    optional int32 search_attributes = 26;
214
215    // List of attributes attached to the event.
216    optional LauncherAttributes attributes = 27 [(log_mode) = MODE_BYTES];
217
218    // Specifies the input type of the event.
219    enum InputType {
220        UNKNOWN = 0;
221        TOUCH = 1;
222        TRACKPAD = 2;
223    }
224    optional InputType input_type = 28;
225
226    // Specifies the type of the user the event connected with
227    enum UserType {
228         TYPE_UNKNOWN = 0;
229         TYPE_MAIN = 1;
230         TYPE_WORK = 2;
231         TYPE_CLONED = 3;
232         TYPE_PRIVATE = 4;
233    }
234    optional UserType user_type = 29;
235
236    // Indicates the current rotation of the display. Uses android.view.Surface values.
237    enum DisplayRotation {
238         ROTATION_0 = 0;
239         ROTATION_90 = 1;
240         ROTATION_180 = 2;
241         ROTATION_270 = 3;
242    }
243    optional DisplayRotation display_rotation = 30;
244
245    enum RecentsOrientationHandler {
246        PORTRAIT = 0;
247        LANDSCAPE = 1;
248        SEASCAPE = 2;
249    }
250    optional RecentsOrientationHandler recents_orientation_handler = 31;
251}
252
253message LauncherAttributes {
254  // Integer value of item attribute enum
255  // (e.g. SUGGESTED_LABEL, ALL_APPS_SEARCH_RESULT_SETTING etc)
256  repeated int32 item_attributes = 1;
257}
258
259message SmartSpaceCardReported {
260    // Different SmartSpace cards.
261    // DEPRECATED CardType enum. Use SmartspaceTarget.mFeatureType, which matches the list from:
262    // google3/java/com/google/android/apps/miphone/aiai/echo/smartspace/Constants.kt
263    enum CardType {
264        option deprecated = true;
265        UNKNOWN_CARD = 0;
266        COMMUTE = 1;
267        CALENDAR = 2;
268        FLIGHT = 3;
269        WEATHER = 4;
270        WEATHER_ALERT = 5;
271        AT_A_STORE_SHOPPING_LIST = 6;
272        AT_A_STORE_LOYALTY_CARD = 7;
273        HEADPHONE_RESUME_MEDIA = 8;
274        HEADPHONE_MEDIA_RECOMMENDATIONS = 9;
275        TIMER = 10;
276        STOPWATCH = 11;
277        FITNESS_ACTIVITY = 12;
278        UPCOMING_REMINDER = 13;
279        UPCOMING_BEDTIME = 14;
280        TIME_TO_LEAVE = 15;
281        PACKAGE_DELIVERED = 16;
282        TIPS = 17;
283        DOORBELL = 18;
284        CROSS_DEVICE_TIMER = 19;
285    }
286
287    // The surface that SmartSpace card is shown.
288    enum DisplaySurface {
289        DEFAULT_SURFACE = 0;
290        HOMESCREEN = 1;
291        LOCKSCREEN = 2;
292        AOD = 3;
293        SHADE = 4;
294        DREAM_OVERLAY = 5;
295    }
296
297    // The event id (e.g., impression, click, longpress, dismiss)
298    optional int32 event_id = 1;
299    // Uniquely identifies a card. Should persist through updates.
300    optional int32 instance_id = 2;
301    // Uniquely identifies one of the possible types of the SmartSpace cards.
302    // Deprecated. Please read card_type_id instead.
303    optional CardType card_type = 3 [deprecated = true];
304    // Location of the card when the event occurred.
305    optional DisplaySurface display_surface = 4;
306    // The position of the card in the carousel when the event occurred.
307    optional int32 rank = 5;
308    // The number of cards shown to the user.
309    optional int32 cardinality = 6;
310    // Uniquely identifies one of the possible types of the SmartSpace cards.
311    // To replace card_type. See go/smartspace-aster-metrics#card-type-id.
312    optional int32 card_type_id = 7;
313    // The app that the Smartspace card is tied to.
314    optional int32 uid = 8 [(is_uid) = true];
315    // This represents the interacted subaction for the given card.
316    optional int32 interacted_subcard_rank = 9;
317    // This represents the number of displayed subactions on the given card when a subaction click
318    // occurred.
319    optional int32 interacted_subcard_cardinality = 10;
320    // The time it takes in ms from smartspace target is created to sysui receives
321    // the target.
322    optional int32 received_latency_millis = 11;
323    // The sub cards.
324    optional SmartSpaceSubcards subcards_info = 12 [(log_mode) = MODE_BYTES];
325    // Holds all the dimensions for this event. See go/ss-dimensional-logging for details.
326    optional SmartspaceCardDimensionalInfo dimensional_info = 13 [(log_mode) = MODE_BYTES];
327}
328
329// Holds all the dimensions tied to a Smartspace event.
330message SmartspaceCardDimensionalInfo {
331    repeated SmartspaceFeatureDimension feature_dimensions = 1;
332}
333
334message SmartspaceFeatureDimension {
335    // This maps to an enum value in Android System Intelligence.
336    optional int32 feature_dimension_id = 1;
337
338    // The value for this dimension.
339    optional int32 feature_dimension_value = 2;
340}
341
342/**
343 * This message represents information about any SmartSpace subcards.
344 * Logged from
345 *   vendor/unbundled_google/packages/SystemUIGoogle/bcsmartspace/src/com/google/android/systemui/smartspace/BcSmartspaceLogger.java
346 *   vendor/unbundled_google/packages/NexusLauncher/src/com/google/android/apps/nexuslauncher/qsb/SmartspaceViewContainer.java
347 * Next Tag: 3
348 */
349message SmartSpaceSubcards {
350    // List of subcards.
351    repeated SmartSpaceCardMetadata subcards = 1;
352    // The index of the clicked subcard, if applicable.
353    // This index is 1 indexed as opposed to 0 indexed due to sint32 encoding
354    // limitation when using -1 as a default.
355    // Default will be 0 to denote that no subcard was clicked.
356    // Please note this has no information about whether the primary card was
357    // clicked or not. Basically if this has the value 0, just ignore this field.
358    optional int32 clicked_subcard_index = 2;
359}
360
361/**
362 * This message represents metadata for a SmartSpace card.
363 * Logged from
364 *   vendor/unbundled_google/packages/SystemUIGoogle/bcsmartspace/src/com/google/android/systemui/smartspace/BcSmartspaceLogger.java
365 *   vendor/unbundled_google/packages/NexusLauncher/src/com/google/android/apps/nexuslauncher/qsb/SmartspaceViewContainer.java
366 * Next Tag: 3
367 */
368message SmartSpaceCardMetadata {
369    // Uniquely identifies a card. Should persist through updates.
370    optional int32 instance_id = 1;
371    // The type of the card.
372    optional int32 card_type_id = 2;
373}
374
375/**
376 * Used for snapshot of the HomeScreen UI elements
377 *
378 * Logged from:
379 *   packages/apps/Launcher3
380 */
381message LauncherStaticLayout {
382    // The event id (e.g., snapshot, drag and drop)
383    optional int32 event_id = 1;
384    // The event's source or target id (e.g., icon, shortcut, widget)
385    optional int32 target_id = 2;
386    // If the target needs to be tracked, use this id field
387    optional int32 instance_id = 3;
388    optional int32 uid = 4 [(is_uid) = true];
389    optional string package_name = 5;
390    optional string component_name = 6;
391
392    // (x, y) coordinate and the index information of the target on the container
393    optional int32 grid_x = 7 [default = -1];
394    optional int32 grid_y = 8 [default = -1];
395    optional int32 page_id = 9 [default = -2];
396
397    // e.g., folder icon's (x, y) location and index information on the workspace
398    // e.g., when used with widgets target, use these values for (span_x, span_y)
399    optional int32 grid_x_parent = 10 [default = -1];
400    optional int32 grid_y_parent = 11 [default = -1];
401    optional int32 page_id_parent = 12 [default = -2];
402
403    // UNKNOWN = 0
404    // HOTSEAT = 1
405    // WORKSPACE = 2
406    // FOLDER_HOTSEAT = 3
407    // FOLDER_WORKSPACE = 4
408    optional int32 hierarchy = 13;
409
410    optional bool is_work_profile = 14;
411
412    // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION
413    optional int32 origin = 15;
414
415    // e.g., number of icons inside a folder
416    optional int32 cardinality = 16;
417
418    // e.g., (x, y) span of the widget inside homescreen grid system
419    optional int32 span_x = 17 [default = 1];
420    optional int32 span_y = 18 [default = 1];
421
422    // Used to store features of the target (e.g. widget is reconfigurable, etc)
423    optional int32 features = 19;
424
425    // List of attributes attached to the event.
426    optional LauncherAttributes attributes = 20 [(log_mode) = MODE_BYTES];
427}
428
429/**
430 * Used for logging launcher static elements using pulled atom.
431 *
432 * Logged from:
433 *   packages/apps/Launcher3
434 */
435message LauncherLayoutSnapshot {
436  // The event id (e.g., snapshot, drag and drop)
437  optional int32 event_id = 1;
438  // The event's source or target id (e.g., icon, shortcut, widget)
439  optional int32 item_id = 2;
440  // If the target needs to be tracked, use this id field
441  optional int32 instance_id = 3;
442  optional int32 uid = 4 [(is_uid) = true];
443  optional string package_name = 5;
444  optional string component_name = 6;
445
446  // (x, y) coordinate and the index information of the target on the container
447  optional int32 grid_x = 7 [default = -1];
448  optional int32 grid_y = 8 [default = -1];
449  optional int32 page_id = 9 [default = -2];
450
451  // e.g., folder icon's (x, y) location and index information on the workspace
452  // e.g., when used with widgets target, use these values for (span_x, span_y)
453  optional int32 grid_x_parent = 10 [default = -1];
454  optional int32 grid_y_parent = 11 [default = -1];
455  optional int32 page_id_parent = 12 [default = -2];
456
457  // UNKNOWN = 0
458  // HOTSEAT = 1
459  // WORKSPACE = 2
460  // FOLDER_HOTSEAT = 3
461  // FOLDER_WORKSPACE = 4
462  optional int32 container_id = 13;
463
464  optional bool is_work_profile = 14;
465
466  // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION
467  optional int32 attribute_id = 15;
468
469  // e.g., number of icons inside a folder
470  optional int32 cardinality = 16;
471
472  // e.g., (x, y) span of the widget inside homescreen grid system
473  optional int32 span_x = 17 [default = 1];
474  optional int32 span_y = 18 [default = 1];
475
476  // List of attributes attached to the event.
477  optional LauncherAttributes attributes = 19 [(log_mode) = MODE_BYTES];
478
479  optional bool is_kids_mode = 20;
480}
481
482/**
483 * Reports a notification panel was displayed, e.g. from the lockscreen or status bar.
484 *
485 * Logged from:
486 *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
487 */
488message NotificationPanelReported {
489    // The event_id (as for UiEventReported).
490    optional int32 event_id = 1;
491    optional int32 num_notifications = 2;
492    // The notifications in the panel, in the order that they appear there.
493    optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES];
494}
495
496message Notification {
497    // The notifying app's uid and package.
498    optional int32 uid = 1 [(is_uid) = true];
499    optional string package_name = 2;
500    // A small system-assigned identifier for the notification.
501    optional int32 instance_id = 3;
502
503    // Grouping information.
504    optional int32 group_instance_id = 4;
505    optional bool is_group_summary = 5;
506
507    // The section of the shade that the notification is in.
508    // See SystemUI Notifications.proto.
509    enum NotificationSection {
510        SECTION_UNKNOWN = 0;
511        SECTION_HEADS_UP = 1;
512        SECTION_MEDIA_CONTROLS = 2;
513        SECTION_PEOPLE = 3;
514        SECTION_ALERTING = 4;
515        SECTION_SILENT = 5;
516        SECTION_FOREGROUND_SERVICE = 6;
517        SECTION_PRIORITY_PEOPLE = 7;
518        SECTION_TOP_ONGOING = 8;
519        SECTION_TOP_UNSEEN = 9;
520        SECTION_NEWS = 10;
521        SECTION_SOCIAL = 11;
522        SECTION_RECS = 12;
523        SECTION_PROMO = 13;
524    }
525    optional NotificationSection section = 6;
526}
527
528message NotificationList {
529    repeated Notification notifications = 1;  // An ordered sequence of notifications.
530}
531
532/**
533 * Snapshot of notification memory use aggregated per-package and per-style.
534 * One message for each notification style of each package showing notifications.
535 * Logged from
536 *    frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging
537 */
538message NotificationMemoryUse {
539    // UID if the application (can be mapped to package and version)
540    optional int32 uid = 1 [(is_uid) = true];
541    // Integer enum value showing aggregated notification style.
542    optional int32 style = 2;
543    // Number of notifications that were aggregated into this metric.
544    optional int32 count = 3;
545    // Number of notifications with actually inflated views in this metric.
546    optional int32 countWithInflatedViews = 4;
547    // Memory use of small icon Bitmaps in KB.
548    optional int32 smallIconObject = 5;
549    // Count of notifications with small icons as bitmaps.
550    optional int32 smallIconBitmapCount = 6;
551    // Memory use of large icon Bitmaps in KB.
552    optional int32 largeIconObject = 7;
553    // Count of notifications with large icons as bitmaps.
554    optional int32 largeIconBitmapCount = 8;
555    // Memory use of big picture style Bitmaps in KB.
556    optional int32 bigPictureObject = 9;
557    // Count of notifications with big picture images as bitmaps.
558    optional int32 bigPictureBitmapCount = 10;
559    // Complete memory use of extras in Notification object, in KB.
560    optional int32 extras = 11;
561    // Memory use of extenders in KB.
562    optional int32 extenders = 12;
563    // Combined memory use of small icon drawables in views, in KB.
564    optional int32 smallIconViews = 13;
565    // Combined memory use of large icon drawables in views, in KB.
566    optional int32 largeIconViews = 14;
567    // Combined memory use of system icon drawables in views, in KB.
568    optional int32 systemIconViews = 15;
569    // Combined memory use of style drawables (e.g. BigPicture) in views, in KB.
570    optional int32 styleViews = 16;
571    // Combined memory use of custom view drawables in views, in KB.
572    optional int32 customViews = 17;
573    // Extra memory used due to usage of software bitmaps, in KB.
574    optional int32 softwareBitmaps = 18;
575    // How many notifications were actually ever shown to the user.
576    optional int32 seenCount = 19;
577}
578
579/**
580 * Logs when accessibility floating menu changed its position by user.
581 *
582 * Logged from:
583 *   frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu
584 */
585message AccessibilityFloatingMenuUIChanged {
586    // Normalized screen position of the accessibility floating menu. The range is between 0 and 1.
587    optional float normalized_x_position = 1;
588    optional float normalized_y_position = 2;
589
590    enum Orientation {
591        UNKNOWN = 0;
592        PORTRAIT = 1;
593        LANDSCAPE = 2;
594    }
595    // Orientation of the device when accessibility floating menu changed.
596    optional Orientation orientation = 3;
597}
598
599/*
600 * Logs when the Media Output Switcher finishes a media switch operation.
601 *
602 * Logged from:
603 *  packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java
604 */
605message MediaOutputOpSwitchReported {
606    // Source medium type before switching.
607    optional android.app.settings.mediaoutput.MediumType source = 1;
608
609    // Target medium type after switching.
610    optional android.app.settings.mediaoutput.MediumType target = 2;
611
612    // The result of switching.
613    optional android.app.settings.mediaoutput.SwitchResult result = 3;
614
615    // The detail code of a switching result.
616    optional android.app.settings.mediaoutput.SubResult subresult = 4;
617
618    /*
619     * The package name of a pre-installed app, whose media session is being switched.
620     */
621    optional string media_session_package_name = 5;
622
623    // The amount of available wired devices when a switching is being performed.
624    optional int32 available_wired_device_count = 6;
625
626    // The amount of available Bluetooth devices a switching is being performed.
627    optional int32 available_bt_device_count = 7;
628
629    // The amount of available remote devices when a switching is being performed.
630    optional int32 available_remote_device_count = 8;
631
632    // The amount of applied devices within a remote dynamic group after a switching is done.
633    optional int32 applied_device_count_within_remote_group = 9;
634
635    // Indicate target device is suggested route
636    optional bool target_is_suggested = 10;
637
638    // Indicate target device has ongoing session or not
639    optional bool target_has_ongoing_session = 11;
640}
641
642/*
643 * Logs when the user interact with Media Output Switcher.
644 *
645 * Logged from:
646 *  packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java
647 */
648message MediaOutputOpInteractionReported {
649    /** * The type of interaction with the output switch dialog. */
650    enum InteractionType {
651        EXPANSION = 0;
652        ADJUST_VOLUME = 1;
653        STOP_CASTING = 2;
654        MUTE = 3;
655        UNMUTE = 4;
656    }
657
658    // Type of interaction.
659    optional InteractionType interaction_type = 1;
660
661    // Type of device that interaction with.
662    optional android.app.settings.mediaoutput.MediumType target = 2;
663
664    // The package name of an application whose media session is being switched.
665    optional string media_session_package_name= 3;
666
667    // Indicate target device is suggested route
668    optional bool target_is_suggested = 4;
669}
670
671/**
672 * Logs the gesture stage changed event.
673 *
674 * Logged from:
675 *   frameworks/base/packages/SystemUI/
676 */
677message AssistGestureStageReported {
678    optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1;
679}
680
681/**
682 * Logs the feedback type.
683 *
684 * Logged from:
685 *   frameworks/base/packages/SystemUI/
686 */
687message AssistGestureFeedbackReported {
688    // Whether or not the gesture was used.
689    optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1;
690}
691
692/**
693 * Logs the progress.
694 *
695 * Logged from:
696 *   frameworks/base/packages/SystemUI/
697 */
698message AssistGestureProgressReported {
699    // [0,100] progress for the assist gesture.
700    optional int32 progress = 1;
701}
702
703/*
704 * Reports a device controls user interaction
705 *
706 * Logged from:
707 *   frameworks/base/packages/SystemUI/src/com/android/systemui/controls/ControlsMetricsLoggerImpl.kt
708 */
709message DeviceControlChanged {
710    // The event_id
711    optional int32 event_id = 1;
712    // An identifier to tie together multiple logs relating to the same controls session
713    optional int32 instance_id = 2;
714    // The type of device the user has interacted with (android.service.controls.DeviceTypes)
715    optional int32 device_type = 3;
716    // The service app uid.
717    optional int32 uid = 4 [(is_uid) = true];
718    // Is the device locked while the action started
719    optional bool is_locked = 5;
720}
721
722/**
723 * Logs for Launcher latency. Uses KLL to reduce the data pression
724 *
725 * Logged from:
726 *      vendor/unbundled_google/packages/NexusLauncher
727 */
728message LauncherLatency {
729    // The event id generated from go/uievents
730    optional int32 event_id = 1;
731    // The instance id to track multiple partial durations or parellel running durations
732    optional int32 instance_id = 2;
733    optional int32 package_id = 3;
734    optional int64 latency_in_millis = 4;
735    optional int32 type = 5;
736    optional int32 query_length = 6 [default = -1];
737    optional int32 sub_event_type = 7;
738    // Size of work to complete within the latency duration. E.g. number of workspace items to initialize during launcher startup.
739    optional int32 cardinality = 8 [default = -1];
740}
741
742/**
743 * Logs for Launcher Impression logging.
744 *
745 * Logged from:
746 *      vendor/unbundled_google/packages/NexusLauncher
747 */
748message LauncherImpressionEvent {
749    // The event id generated from go/uievents
750    optional int32 event_id = 1;
751    // The instance id to track multiple partial impression event.
752    optional int32 instance_id = 2;
753
754    // The state defines the surface where the impression is being logged.
755    optional int32 state = 3;
756    optional int32 query_length = 4 [default = -1];
757
758    // ResultType of the search result as defined in frameworks/libs/systemui/searchuilib/src/com/android/app/search/ResultType.java
759    repeated int32 result_type = 5;
760
761    // Number of results of corresponding result_type.
762    repeated int32 result_count = 6;
763
764    // If the corresponding result_type is above or below keyboard.
765    // If 50% of result is visible, then is_above_keyboard = true
766    repeated bool is_above_keyboard = 7;
767
768    // UID of the application (can be mapped to package name) corresponding to the result_type.
769    // The default value of uid entry will be -1 to indicate package name is not
770    // found.
771    repeated int32 uid = 8 [(is_uid) = true];
772}
773
774/**
775 * Logs for task manager events
776 *
777 * Logged from SystemUI
778 */
779message TaskManagerEventReported {
780
781    enum Event {
782        VIEWED = 1;
783        STOPPED = 2;
784    }
785
786    optional int32 uid = 1 [(is_uid) = true];
787
788    optional Event event = 2;
789
790    optional int64 time_running_ms = 3;
791}
792