• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    optional bool is_work_profile = 19;
193
194    // Used to store the predicted rank of the target
195    optional int32 rank = 20 [default = -1];
196
197    // e.g., folderLabelState can be captured in the following two fields
198    optional int32 from_state = 21;
199    optional int32 to_state = 22;
200
201    // e.g., autofilled or suggested texts that are not user entered
202    optional string edittext = 23;
203
204    // e.g., number of contents inside a container (e.g., icons inside a folder)
205    optional int32 cardinality = 24;
206
207    // Used to store features of the target (e.g. widget is reconfigurable, etc)
208    optional int32 features = 25;
209
210    // Used to store on-device search related features of the target
211    // (e.g. spell-corrected query etc)
212    optional int32 search_attributes = 26;
213
214    // List of attributes attached to the event.
215    optional LauncherAttributes attributes = 27 [(log_mode) = MODE_BYTES];
216
217    // Specifies the input type of the event.
218    enum InputType {
219        UNKNOWN = 0;
220        TOUCH = 1;
221        TRACKPAD = 2;
222    }
223    optional InputType input_type = 28;
224}
225
226message LauncherAttributes {
227  // Integer value of item attribute enum
228  // (e.g. SUGGESTED_LABEL, ALL_APPS_SEARCH_RESULT_SETTING etc)
229  repeated int32 item_attributes = 1;
230}
231
232message SmartSpaceCardReported {
233    // Different SmartSpace cards.
234    // DEPRECATED CardType enum. Use SmartspaceTarget.mFeatureType, which matches the list from:
235    // google3/java/com/google/android/apps/miphone/aiai/echo/smartspace/Constants.kt
236    enum CardType {
237        option deprecated = true;
238        UNKNOWN_CARD = 0;
239        COMMUTE = 1;
240        CALENDAR = 2;
241        FLIGHT = 3;
242        WEATHER = 4;
243        WEATHER_ALERT = 5;
244        AT_A_STORE_SHOPPING_LIST = 6;
245        AT_A_STORE_LOYALTY_CARD = 7;
246        HEADPHONE_RESUME_MEDIA = 8;
247        HEADPHONE_MEDIA_RECOMMENDATIONS = 9;
248        TIMER = 10;
249        STOPWATCH = 11;
250        FITNESS_ACTIVITY = 12;
251        UPCOMING_REMINDER = 13;
252        UPCOMING_BEDTIME = 14;
253        TIME_TO_LEAVE = 15;
254        PACKAGE_DELIVERED = 16;
255        TIPS = 17;
256        DOORBELL = 18;
257        CROSS_DEVICE_TIMER = 19;
258    }
259
260    // The surface that SmartSpace card is shown.
261    enum DisplaySurface {
262        DEFAULT_SURFACE = 0;
263        HOMESCREEN = 1;
264        LOCKSCREEN = 2;
265        AOD = 3;
266        SHADE = 4;
267        DREAM_OVERLAY = 5;
268    }
269
270    // The event id (e.g., impression, click, longpress, dismiss)
271    optional int32 event_id = 1;
272    // Uniquely identifies a card. Should persist through updates.
273    optional int32 instance_id = 2;
274    // Uniquely identifies one of the possible types of the SmartSpace cards.
275    // Deprecated. Please read card_type_id instead.
276    optional CardType card_type = 3 [deprecated = true];
277    // Location of the card when the event occurred.
278    optional DisplaySurface display_surface = 4;
279    // The position of the card in the carousel when the event occurred.
280    optional int32 rank = 5;
281    // The number of cards shown to the user.
282    optional int32 cardinality = 6;
283    // Uniquely identifies one of the possible types of the SmartSpace cards.
284    // To replace card_type. See go/smartspace-aster-metrics#card-type-id.
285    optional int32 card_type_id = 7;
286    // The app that the Smartspace card is tied to.
287    optional int32 uid = 8 [(is_uid) = true];
288    // This represents the interacted subaction for the given card.
289    optional int32 interacted_subcard_rank = 9;
290    // This represents the number of displayed subactions on the given card when a subaction click
291    // occurred.
292    optional int32 interacted_subcard_cardinality = 10;
293    // The time it takes in ms from smartspace target is created to sysui receives
294    // the target.
295    optional int32 received_latency_millis = 11;
296    // The sub cards.
297    optional SmartSpaceSubcards subcards_info = 12 [(log_mode) = MODE_BYTES];
298    // Holds all the dimensions for this event. See go/ss-dimensional-logging for details.
299    optional SmartspaceCardDimensionalInfo dimensional_info = 13 [(log_mode) = MODE_BYTES];
300}
301
302// Holds all the dimensions tied to a Smartspace event.
303message SmartspaceCardDimensionalInfo {
304    repeated SmartspaceFeatureDimension feature_dimensions = 1;
305}
306
307message SmartspaceFeatureDimension {
308    // This maps to an enum value in Android System Intelligence.
309    optional int32 feature_dimension_id = 1;
310
311    // The value for this dimension.
312    optional int32 feature_dimension_value = 2;
313}
314
315/**
316 * This message represents information about any SmartSpace subcards.
317 * Logged from
318 *   vendor/unbundled_google/packages/SystemUIGoogle/bcsmartspace/src/com/google/android/systemui/smartspace/BcSmartspaceLogger.java
319 *   vendor/unbundled_google/packages/NexusLauncher/src/com/google/android/apps/nexuslauncher/qsb/SmartspaceViewContainer.java
320 * Next Tag: 3
321 */
322message SmartSpaceSubcards {
323    // List of subcards.
324    repeated SmartSpaceCardMetadata subcards = 1;
325    // The index of the clicked subcard, if applicable.
326    // This index is 1 indexed as opposed to 0 indexed due to sint32 encoding
327    // limitation when using -1 as a default.
328    // Default will be 0 to denote that no subcard was clicked.
329    // Please note this has no information about whether the primary card was
330    // clicked or not. Basically if this has the value 0, just ignore this field.
331    optional int32 clicked_subcard_index = 2;
332}
333
334/**
335 * This message represents metadata for a SmartSpace card.
336 * Logged from
337 *   vendor/unbundled_google/packages/SystemUIGoogle/bcsmartspace/src/com/google/android/systemui/smartspace/BcSmartspaceLogger.java
338 *   vendor/unbundled_google/packages/NexusLauncher/src/com/google/android/apps/nexuslauncher/qsb/SmartspaceViewContainer.java
339 * Next Tag: 3
340 */
341message SmartSpaceCardMetadata {
342    // Uniquely identifies a card. Should persist through updates.
343    optional int32 instance_id = 1;
344    // The type of the card.
345    optional int32 card_type_id = 2;
346}
347
348/**
349 * Used for snapshot of the HomeScreen UI elements
350 *
351 * Logged from:
352 *   packages/apps/Launcher3
353 */
354message LauncherStaticLayout {
355    // The event id (e.g., snapshot, drag and drop)
356    optional int32 event_id = 1;
357    // The event's source or target id (e.g., icon, shortcut, widget)
358    optional int32 target_id = 2;
359    // If the target needs to be tracked, use this id field
360    optional int32 instance_id = 3;
361    optional int32 uid = 4 [(is_uid) = true];
362    optional string package_name = 5;
363    optional string component_name = 6;
364
365    // (x, y) coordinate and the index information of the target on the container
366    optional int32 grid_x = 7 [default = -1];
367    optional int32 grid_y = 8 [default = -1];
368    optional int32 page_id = 9 [default = -2];
369
370    // e.g., folder icon's (x, y) location and index information on the workspace
371    // e.g., when used with widgets target, use these values for (span_x, span_y)
372    optional int32 grid_x_parent = 10 [default = -1];
373    optional int32 grid_y_parent = 11 [default = -1];
374    optional int32 page_id_parent = 12 [default = -2];
375
376    // UNKNOWN = 0
377    // HOTSEAT = 1
378    // WORKSPACE = 2
379    // FOLDER_HOTSEAT = 3
380    // FOLDER_WORKSPACE = 4
381    optional int32 hierarchy = 13;
382
383    optional bool is_work_profile = 14;
384
385    // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION
386    optional int32 origin = 15;
387
388    // e.g., number of icons inside a folder
389    optional int32 cardinality = 16;
390
391    // e.g., (x, y) span of the widget inside homescreen grid system
392    optional int32 span_x = 17 [default = 1];
393    optional int32 span_y = 18 [default = 1];
394
395    // Used to store features of the target (e.g. widget is reconfigurable, etc)
396    optional int32 features = 19;
397
398    // List of attributes attached to the event.
399    optional LauncherAttributes attributes = 20 [(log_mode) = MODE_BYTES];
400}
401
402/**
403 * Used for logging launcher static elements using pulled atom.
404 *
405 * Logged from:
406 *   packages/apps/Launcher3
407 */
408message LauncherLayoutSnapshot {
409  // The event id (e.g., snapshot, drag and drop)
410  optional int32 event_id = 1;
411  // The event's source or target id (e.g., icon, shortcut, widget)
412  optional int32 item_id = 2;
413  // If the target needs to be tracked, use this id field
414  optional int32 instance_id = 3;
415  optional int32 uid = 4 [(is_uid) = true];
416  optional string package_name = 5;
417  optional string component_name = 6;
418
419  // (x, y) coordinate and the index information of the target on the container
420  optional int32 grid_x = 7 [default = -1];
421  optional int32 grid_y = 8 [default = -1];
422  optional int32 page_id = 9 [default = -2];
423
424  // e.g., folder icon's (x, y) location and index information on the workspace
425  // e.g., when used with widgets target, use these values for (span_x, span_y)
426  optional int32 grid_x_parent = 10 [default = -1];
427  optional int32 grid_y_parent = 11 [default = -1];
428  optional int32 page_id_parent = 12 [default = -2];
429
430  // UNKNOWN = 0
431  // HOTSEAT = 1
432  // WORKSPACE = 2
433  // FOLDER_HOTSEAT = 3
434  // FOLDER_WORKSPACE = 4
435  optional int32 container_id = 13;
436
437  optional bool is_work_profile = 14;
438
439  // e.g., PIN, WIDGET TRAY, APPS TRAY, PREDICTION
440  optional int32 attribute_id = 15;
441
442  // e.g., number of icons inside a folder
443  optional int32 cardinality = 16;
444
445  // e.g., (x, y) span of the widget inside homescreen grid system
446  optional int32 span_x = 17 [default = 1];
447  optional int32 span_y = 18 [default = 1];
448
449  // List of attributes attached to the event.
450  optional LauncherAttributes attributes = 19 [(log_mode) = MODE_BYTES];
451
452  optional bool is_kids_mode = 20;
453}
454
455/**
456 * Reports a notification panel was displayed, e.g. from the lockscreen or status bar.
457 *
458 * Logged from:
459 *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
460 */
461message NotificationPanelReported {
462    // The event_id (as for UiEventReported).
463    optional int32 event_id = 1;
464    optional int32 num_notifications = 2;
465    // The notifications in the panel, in the order that they appear there.
466    optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES];
467}
468
469message Notification {
470    // The notifying app's uid and package.
471    optional int32 uid = 1 [(is_uid) = true];
472    optional string package_name = 2;
473    // A small system-assigned identifier for the notification.
474    optional int32 instance_id = 3;
475
476    // Grouping information.
477    optional int32 group_instance_id = 4;
478    optional bool is_group_summary = 5;
479
480    // The section of the shade that the notification is in.
481    // See SystemUI Notifications.proto.
482    enum NotificationSection {
483        SECTION_UNKNOWN = 0;
484        SECTION_HEADS_UP = 1;
485        SECTION_MEDIA_CONTROLS = 2;
486        SECTION_PEOPLE = 3;
487        SECTION_ALERTING = 4;
488        SECTION_SILENT = 5;
489        SECTION_FOREGROUND_SERVICE = 6;
490    }
491    optional NotificationSection section = 6;
492}
493
494message NotificationList {
495    repeated Notification notifications = 1;  // An ordered sequence of notifications.
496}
497
498/**
499 * Snapshot of notification memory use aggregated per-package and per-style.
500 * One message for each notification style of each package showing notifications.
501 * Logged from
502 *    frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging
503 */
504message NotificationMemoryUse {
505    // UID if the application (can be mapped to package and version)
506    optional int32 uid = 1;
507    // Integer enum value showing aggregated notification style.
508    optional int32 style = 2;
509    // Number of notifications that were aggregated into this metric.
510    optional int32 count = 3;
511    // Number of notifications with actually inflated views in this metric.
512    optional int32 countWithInflatedViews = 4;
513    // Memory use of small icon Bitmaps in KB.
514    optional int32 smallIconObject = 5;
515    // Count of notifications with small icons as bitmaps.
516    optional int32 smallIconBitmapCount = 6;
517    // Memory use of large icon Bitmaps in KB.
518    optional int32 largeIconObject = 7;
519    // Count of notifications with large icons as bitmaps.
520    optional int32 largeIconBitmapCount = 8;
521    // Memory use of big picture style Bitmaps in KB.
522    optional int32 bigPictureObject = 9;
523    // Count of notifications with big picture images as bitmaps.
524    optional int32 bigPictureBitmapCount = 10;
525    // Complete memory use of extras in Notification object, in KB.
526    optional int32 extras = 11;
527    // Memory use of extenders in KB.
528    optional int32 extenders = 12;
529    // Combined memory use of small icon drawables in views, in KB.
530    optional int32 smallIconViews = 13;
531    // Combined memory use of large icon drawables in views, in KB.
532    optional int32 largeIconViews = 14;
533    // Combined memory use of system icon drawables in views, in KB.
534    optional int32 systemIconViews = 15;
535    // Combined memory use of style drawables (e.g. BigPicture) in views, in KB.
536    optional int32 styleViews = 16;
537    // Combined memory use of custom view drawables in views, in KB.
538    optional int32 customViews = 17;
539    // Extra memory used due to usage of software bitmaps, in KB.
540    optional int32 softwareBitmaps = 18;
541    // How many notifications were actually ever shown to the user.
542    optional int32 seenCount = 19;
543}
544
545/**
546 * Logs when accessibility floating menu changed its position by user.
547 *
548 * Logged from:
549 *   frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu
550 */
551message AccessibilityFloatingMenuUIChanged {
552    // Normalized screen position of the accessibility floating menu. The range is between 0 and 1.
553    optional float normalized_x_position = 1;
554    optional float normalized_y_position = 2;
555
556    enum Orientation {
557        UNKNOWN = 0;
558        PORTRAIT = 1;
559        LANDSCAPE = 2;
560    }
561    // Orientation of the device when accessibility floating menu changed.
562    optional Orientation orientation = 3;
563}
564
565/*
566 * Logs when the Media Output Switcher finishes a media switch operation.
567 *
568 * Logged from:
569 *  packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java
570 */
571message MediaOutputOpSwitchReported {
572    // Source medium type before switching.
573    optional android.app.settings.mediaoutput.MediumType source = 1;
574
575    // Target medium type after switching.
576    optional android.app.settings.mediaoutput.MediumType target = 2;
577
578    // The result of switching.
579    optional android.app.settings.mediaoutput.SwitchResult result = 3;
580
581    // The detail code of a switching result.
582    optional android.app.settings.mediaoutput.SubResult subresult = 4;
583
584    /*
585     * The package name of a pre-installed app, whose media session is being switched.
586     */
587    optional string media_session_package_name = 5;
588
589    // The amount of available wired devices when a switching is being performed.
590    optional int32 available_wired_device_count = 6;
591
592    // The amount of available Bluetooth devices a switching is being performed.
593    optional int32 available_bt_device_count = 7;
594
595    // The amount of available remote devices when a switching is being performed.
596    optional int32 available_remote_device_count = 8;
597
598    // The amount of applied devices within a remote dynamic group after a switching is done.
599    optional int32 applied_device_count_within_remote_group = 9;
600
601    // Indicate target device is suggested route
602    optional bool target_is_suggested = 10;
603
604    // Indicate target device has ongoing session or not
605    optional bool target_has_ongoing_session = 11;
606}
607
608/*
609 * Logs when the user interact with Media Output Switcher.
610 *
611 * Logged from:
612 *  packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java
613 */
614message MediaOutputOpInteractionReported {
615    /** * The type of interaction with the output switch dialog. */
616    enum InteractionType {
617        EXPANSION = 0;
618        ADJUST_VOLUME = 1;
619        STOP_CASTING = 2;
620        MUTE = 3;
621        UNMUTE = 4;
622    }
623
624    // Type of interaction.
625    optional InteractionType interaction_type = 1;
626
627    // Type of device that interaction with.
628    optional android.app.settings.mediaoutput.MediumType target = 2;
629
630    // The package name of an application whose media session is being switched.
631    optional string media_session_package_name= 3;
632
633    // Indicate target device is suggested route
634    optional bool target_is_suggested = 4;
635}
636
637/**
638 * Logs the gesture stage changed event.
639 *
640 * Logged from:
641 *   frameworks/base/packages/SystemUI/
642 */
643message AssistGestureStageReported {
644    optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1;
645}
646
647/**
648 * Logs the feedback type.
649 *
650 * Logged from:
651 *   frameworks/base/packages/SystemUI/
652 */
653message AssistGestureFeedbackReported {
654    // Whether or not the gesture was used.
655    optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1;
656}
657
658/**
659 * Logs the progress.
660 *
661 * Logged from:
662 *   frameworks/base/packages/SystemUI/
663 */
664message AssistGestureProgressReported {
665    // [0,100] progress for the assist gesture.
666    optional int32 progress = 1;
667}
668
669/*
670 * Reports a device controls user interaction
671 *
672 * Logged from:
673 *   frameworks/base/packages/SystemUI/src/com/android/systemui/controls/ControlsMetricsLoggerImpl.kt
674 */
675message DeviceControlChanged {
676    // The event_id
677    optional int32 event_id = 1;
678    // An identifier to tie together multiple logs relating to the same controls session
679    optional int32 instance_id = 2;
680    // The type of device the user has interacted with (android.service.controls.DeviceTypes)
681    optional int32 device_type = 3;
682    // The service app uid.
683    optional int32 uid = 4 [(is_uid) = true];
684    // Is the device locked while the action started
685    optional bool is_locked = 5;
686}
687
688/**
689 * Logs for Launcher latency. Uses KLL to reduce the data pression
690 *
691 * Logged from:
692 *      vendor/unbundled_google/packages/NexusLauncher
693 */
694message LauncherLatency {
695    // The event id generated from go/uievents
696    optional int32 event_id = 1;
697    // The instance id to track multiple partial durations or parellel running durations
698    optional int32 instance_id = 2;
699    optional int32 package_id = 3;
700    optional int64 latency_in_millis = 4;
701    optional int32 type = 5;
702    optional int32 query_length = 6 [default = -1];
703    optional int32 sub_event_type = 7;
704    // Size of work to complete within the latency duration. E.g. number of workspace items to initialize during launcher startup.
705    optional int32 cardinality = 8 [default = -1];
706}
707
708/**
709 * Logs for Launcher Impression logging.
710 *
711 * Logged from:
712 *      vendor/unbundled_google/packages/NexusLauncher
713 */
714message LauncherImpressionEvent {
715    // The event id generated from go/uievents
716    optional int32 event_id = 1;
717    // The instance id to track multiple partial impression event.
718    optional int32 instance_id = 2;
719
720    // The state defines the surface where the impression is being logged.
721    optional int32 state = 3;
722    optional int32 query_length = 4 [default = -1];
723
724    // ResultType of the search result as defined in frameworks/libs/systemui/searchuilib/src/com/android/app/search/ResultType.java
725    repeated int32 result_type = 5;
726
727    // Number of results of corresponding result_type.
728    repeated int32 result_count = 6;
729
730    // If the corresponding result_type is above or below keyboard.
731    // If 50% of result is visible, then is_above_keyboard = true
732    repeated bool is_above_keyboard = 7;
733
734    // UID of the application (can be mapped to package name) corresponding to the result_type.
735    // The default value of uid entry will be -1 to indicate package name is not
736    // found.
737    repeated int32 uid = 8 [(is_uid) = true];
738}
739
740/**
741 * Logs for task manager events
742 *
743 * Logged from SystemUI
744 */
745message TaskManagerEventReported {
746
747    enum Event {
748        VIEWED = 1;
749        STOPPED = 2;
750    }
751
752    optional int32 uid = 1 [(is_uid) = true];
753
754    optional Event event = 2;
755
756    optional int64 time_running_ms = 3;
757}
758