2016-03-08 02:07:35 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 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";
|
|
|
|
|
2017-07-19 16:24:07 +08:00
|
|
|
import "launcher_log_extension.proto";
|
|
|
|
|
2016-11-01 02:07:11 +08:00
|
|
|
option java_package = "com.android.launcher3.userevent";
|
2016-03-08 02:07:35 +08:00
|
|
|
option java_outer_classname = "LauncherLogProto";
|
|
|
|
|
|
|
|
package userevent;
|
|
|
|
|
|
|
|
message Target {
|
|
|
|
enum Type {
|
|
|
|
NONE = 0;
|
|
|
|
ITEM = 1;
|
|
|
|
CONTROL = 2;
|
|
|
|
CONTAINER = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
optional Type type = 1;
|
|
|
|
|
|
|
|
// For container type and item type
|
|
|
|
// Used mainly for ContainerType.FOLDER, ItemType.*
|
2016-04-13 09:32:04 +08:00
|
|
|
optional int32 page_index = 2;
|
|
|
|
optional int32 rank = 3;
|
|
|
|
optional int32 grid_x = 4;
|
|
|
|
optional int32 grid_y = 5;
|
2016-03-08 02:07:35 +08:00
|
|
|
|
|
|
|
// For container types only
|
2016-04-13 09:32:04 +08:00
|
|
|
optional ContainerType container_type = 6;
|
|
|
|
optional int32 cardinality = 7;
|
2016-03-08 02:07:35 +08:00
|
|
|
|
|
|
|
// For control types only
|
2016-04-13 09:32:04 +08:00
|
|
|
optional ControlType control_type = 8;
|
2016-03-08 02:07:35 +08:00
|
|
|
|
|
|
|
// For item types only
|
2016-04-13 09:32:04 +08:00
|
|
|
optional ItemType item_type = 9;
|
|
|
|
optional int32 package_name_hash = 10;
|
|
|
|
optional int32 component_hash = 11; // Used for ItemType.WIDGET
|
|
|
|
optional int32 intent_hash = 12; // Used for ItemType.SHORTCUT
|
|
|
|
optional int32 span_x = 13 [default = 1];// Used for ItemType.WIDGET
|
|
|
|
optional int32 span_y = 14 [default = 1];// Used for ItemType.WIDGET
|
|
|
|
optional int32 predictedRank = 15;
|
2017-07-19 16:24:07 +08:00
|
|
|
optional TargetExtension extension = 16;
|
2018-05-10 07:18:58 +08:00
|
|
|
optional TipType tip_type = 17;
|
2016-03-08 02:07:35 +08:00
|
|
|
}
|
|
|
|
|
2016-04-13 09:32:04 +08:00
|
|
|
// Used to define what type of item a Target would represent.
|
2016-03-08 02:07:35 +08:00
|
|
|
enum ItemType {
|
2016-04-13 09:32:04 +08:00
|
|
|
DEFAULT_ITEMTYPE = 0;
|
|
|
|
APP_ICON = 1;
|
|
|
|
SHORTCUT = 2;
|
|
|
|
WIDGET = 3;
|
|
|
|
FOLDER_ICON = 4;
|
2016-07-22 02:48:37 +08:00
|
|
|
DEEPSHORTCUT = 5;
|
2016-09-28 09:07:00 +08:00
|
|
|
SEARCHBOX = 6;
|
2016-10-07 01:53:29 +08:00
|
|
|
EDITTEXT = 7;
|
2017-02-02 01:13:24 +08:00
|
|
|
NOTIFICATION = 8;
|
Quick step/scrub/switch logging
- state transition happening due to Home and back is handled by
specifying src target as 'from' container and dst target as the 'to'
container
- Source and Destination container shows FROM and TO state for SWIPE/FLING
- event.isStateChange = true indicates that an action resulted in
state transition
- Elapsed container millis is the screen time on the source container
Bug: 70181187
- logcat printout with setprop log.tag.UserEvent VERBOSE
1) State: WORKSPACE -> ALLAPPS
action:FLING direction=UP
Source child:HOTSEAT id=0 parent:WORKSPACE id=0
Destination child:ALLAPPS
Elapsed container 1225 ms, session 1225 ms, action 0 ms
2) ALLAPPS -> HOMESCREEN
action:FLING direction=DOWN
Source child:ALLAPPS parent:ALLAPPS
Destination child:WORKSPACE id=0
Elapsed container 971 ms, session 2197 ms, action 0 ms
3) HOMESCREEN -> OVERVIEW
action:FLING direction=UP
Source child:NAVBAR parent:WORKSPACE id=0
Destination child:TASKSWITCHER
Elapsed container 4834 ms, session 4834 ms, action 0 ms
4) OVERVIEW-> ALLAPPS
action:FLING direction=UP
Source child:TASK parent:TASKSWITCHER
Destination child:ALLAPPS
Elapsed container 2176 ms, session 7010 ms, action 0 ms
5) ALLAPPS->OVERVIEW
action:FLING direction=DOWN
Source child:ALLAPPS parent:ALLAPPS
Destination child:TASKSWITCHER
Elapsed container 3683 ms, session 10693 ms, action 0 ms
6) OVERVIEW-> HOMESCREEN
action:FLING direction=DOWN
Source child:TASK parent:TASKSWITCHER
Destination child:WORKSPACE id=0
Elapsed container 2108 ms, session 12801 ms, action 0 ms
7) APPS-> OVERVIEW
action:FLING direction=UP
Source child:NAVBAR parent:APP
Destination child:TASKSWITCHER
Elapsed container 104 ms, session 104 ms, action 0 ms
8) Quickscrub: action:DRAGANDDROP Source child: QUICK
9) Quickswitch: action:FLING Source child: QUICK
Change-Id: I5898230859ff600f48a2a873a40b670fe4d39a0d
2018-02-15 05:40:25 +08:00
|
|
|
TASK = 9; // Each page of Recents UI (QuickStep)
|
2018-03-30 03:12:12 +08:00
|
|
|
WEB_APP = 10;
|
2016-03-08 02:07:35 +08:00
|
|
|
}
|
|
|
|
|
2016-04-13 09:32:04 +08:00
|
|
|
// Used to define what type of container a Target would represent.
|
2016-03-08 02:07:35 +08:00
|
|
|
enum ContainerType {
|
2016-04-13 09:32:04 +08:00
|
|
|
DEFAULT_CONTAINERTYPE = 0;
|
|
|
|
WORKSPACE = 1;
|
|
|
|
HOTSEAT = 2;
|
|
|
|
FOLDER = 3;
|
|
|
|
ALLAPPS = 4;
|
|
|
|
WIDGETS = 5;
|
Quick step/scrub/switch logging
- state transition happening due to Home and back is handled by
specifying src target as 'from' container and dst target as the 'to'
container
- Source and Destination container shows FROM and TO state for SWIPE/FLING
- event.isStateChange = true indicates that an action resulted in
state transition
- Elapsed container millis is the screen time on the source container
Bug: 70181187
- logcat printout with setprop log.tag.UserEvent VERBOSE
1) State: WORKSPACE -> ALLAPPS
action:FLING direction=UP
Source child:HOTSEAT id=0 parent:WORKSPACE id=0
Destination child:ALLAPPS
Elapsed container 1225 ms, session 1225 ms, action 0 ms
2) ALLAPPS -> HOMESCREEN
action:FLING direction=DOWN
Source child:ALLAPPS parent:ALLAPPS
Destination child:WORKSPACE id=0
Elapsed container 971 ms, session 2197 ms, action 0 ms
3) HOMESCREEN -> OVERVIEW
action:FLING direction=UP
Source child:NAVBAR parent:WORKSPACE id=0
Destination child:TASKSWITCHER
Elapsed container 4834 ms, session 4834 ms, action 0 ms
4) OVERVIEW-> ALLAPPS
action:FLING direction=UP
Source child:TASK parent:TASKSWITCHER
Destination child:ALLAPPS
Elapsed container 2176 ms, session 7010 ms, action 0 ms
5) ALLAPPS->OVERVIEW
action:FLING direction=DOWN
Source child:ALLAPPS parent:ALLAPPS
Destination child:TASKSWITCHER
Elapsed container 3683 ms, session 10693 ms, action 0 ms
6) OVERVIEW-> HOMESCREEN
action:FLING direction=DOWN
Source child:TASK parent:TASKSWITCHER
Destination child:WORKSPACE id=0
Elapsed container 2108 ms, session 12801 ms, action 0 ms
7) APPS-> OVERVIEW
action:FLING direction=UP
Source child:NAVBAR parent:APP
Destination child:TASKSWITCHER
Elapsed container 104 ms, session 104 ms, action 0 ms
8) Quickscrub: action:DRAGANDDROP Source child: QUICK
9) Quickswitch: action:FLING Source child: QUICK
Change-Id: I5898230859ff600f48a2a873a40b670fe4d39a0d
2018-02-15 05:40:25 +08:00
|
|
|
OVERVIEW = 6; // Zoomed out workspace (without QuickStep)
|
2016-04-13 09:32:04 +08:00
|
|
|
PREDICTION = 7;
|
|
|
|
SEARCHRESULT = 8;
|
2016-07-22 02:48:37 +08:00
|
|
|
DEEPSHORTCUTS = 9;
|
2017-03-22 02:59:04 +08:00
|
|
|
PINITEM = 10; // confirmation screen
|
Quick step/scrub/switch logging
- state transition happening due to Home and back is handled by
specifying src target as 'from' container and dst target as the 'to'
container
- Source and Destination container shows FROM and TO state for SWIPE/FLING
- event.isStateChange = true indicates that an action resulted in
state transition
- Elapsed container millis is the screen time on the source container
Bug: 70181187
- logcat printout with setprop log.tag.UserEvent VERBOSE
1) State: WORKSPACE -> ALLAPPS
action:FLING direction=UP
Source child:HOTSEAT id=0 parent:WORKSPACE id=0
Destination child:ALLAPPS
Elapsed container 1225 ms, session 1225 ms, action 0 ms
2) ALLAPPS -> HOMESCREEN
action:FLING direction=DOWN
Source child:ALLAPPS parent:ALLAPPS
Destination child:WORKSPACE id=0
Elapsed container 971 ms, session 2197 ms, action 0 ms
3) HOMESCREEN -> OVERVIEW
action:FLING direction=UP
Source child:NAVBAR parent:WORKSPACE id=0
Destination child:TASKSWITCHER
Elapsed container 4834 ms, session 4834 ms, action 0 ms
4) OVERVIEW-> ALLAPPS
action:FLING direction=UP
Source child:TASK parent:TASKSWITCHER
Destination child:ALLAPPS
Elapsed container 2176 ms, session 7010 ms, action 0 ms
5) ALLAPPS->OVERVIEW
action:FLING direction=DOWN
Source child:ALLAPPS parent:ALLAPPS
Destination child:TASKSWITCHER
Elapsed container 3683 ms, session 10693 ms, action 0 ms
6) OVERVIEW-> HOMESCREEN
action:FLING direction=DOWN
Source child:TASK parent:TASKSWITCHER
Destination child:WORKSPACE id=0
Elapsed container 2108 ms, session 12801 ms, action 0 ms
7) APPS-> OVERVIEW
action:FLING direction=UP
Source child:NAVBAR parent:APP
Destination child:TASKSWITCHER
Elapsed container 104 ms, session 104 ms, action 0 ms
8) Quickscrub: action:DRAGANDDROP Source child: QUICK
9) Quickswitch: action:FLING Source child: QUICK
Change-Id: I5898230859ff600f48a2a873a40b670fe4d39a0d
2018-02-15 05:40:25 +08:00
|
|
|
NAVBAR = 11;
|
|
|
|
TASKSWITCHER = 12; // Recents UI Container (QuickStep)
|
|
|
|
APP = 13; // Foreground activity is another app (QuickStep)
|
2018-05-10 07:18:58 +08:00
|
|
|
TIP = 14; // Onboarding texts (QuickStep)
|
2018-05-16 05:05:47 +08:00
|
|
|
SIDELOADED_LAUNCHER = 15;
|
2016-03-08 02:07:35 +08:00
|
|
|
}
|
|
|
|
|
2016-04-13 09:32:04 +08:00
|
|
|
// Used to define what type of control a Target would represent.
|
2016-03-08 02:07:35 +08:00
|
|
|
enum ControlType {
|
2016-04-13 09:32:04 +08:00
|
|
|
DEFAULT_CONTROLTYPE = 0;
|
|
|
|
ALL_APPS_BUTTON = 1;
|
|
|
|
WIDGETS_BUTTON = 2;
|
|
|
|
WALLPAPER_BUTTON = 3;
|
|
|
|
SETTINGS_BUTTON = 4;
|
|
|
|
REMOVE_TARGET = 5;
|
|
|
|
UNINSTALL_TARGET = 6;
|
|
|
|
APPINFO_TARGET = 7;
|
|
|
|
RESIZE_HANDLE = 8;
|
|
|
|
VERTICAL_SCROLL = 9;
|
2016-10-07 01:53:29 +08:00
|
|
|
HOME_INTENT = 10; // Deprecated, use enum Command instead
|
|
|
|
BACK_BUTTON = 11; // Deprecated, use enum Command instead
|
Quick step/scrub/switch logging
- state transition happening due to Home and back is handled by
specifying src target as 'from' container and dst target as the 'to'
container
- Source and Destination container shows FROM and TO state for SWIPE/FLING
- event.isStateChange = true indicates that an action resulted in
state transition
- Elapsed container millis is the screen time on the source container
Bug: 70181187
- logcat printout with setprop log.tag.UserEvent VERBOSE
1) State: WORKSPACE -> ALLAPPS
action:FLING direction=UP
Source child:HOTSEAT id=0 parent:WORKSPACE id=0
Destination child:ALLAPPS
Elapsed container 1225 ms, session 1225 ms, action 0 ms
2) ALLAPPS -> HOMESCREEN
action:FLING direction=DOWN
Source child:ALLAPPS parent:ALLAPPS
Destination child:WORKSPACE id=0
Elapsed container 971 ms, session 2197 ms, action 0 ms
3) HOMESCREEN -> OVERVIEW
action:FLING direction=UP
Source child:NAVBAR parent:WORKSPACE id=0
Destination child:TASKSWITCHER
Elapsed container 4834 ms, session 4834 ms, action 0 ms
4) OVERVIEW-> ALLAPPS
action:FLING direction=UP
Source child:TASK parent:TASKSWITCHER
Destination child:ALLAPPS
Elapsed container 2176 ms, session 7010 ms, action 0 ms
5) ALLAPPS->OVERVIEW
action:FLING direction=DOWN
Source child:ALLAPPS parent:ALLAPPS
Destination child:TASKSWITCHER
Elapsed container 3683 ms, session 10693 ms, action 0 ms
6) OVERVIEW-> HOMESCREEN
action:FLING direction=DOWN
Source child:TASK parent:TASKSWITCHER
Destination child:WORKSPACE id=0
Elapsed container 2108 ms, session 12801 ms, action 0 ms
7) APPS-> OVERVIEW
action:FLING direction=UP
Source child:NAVBAR parent:APP
Destination child:TASKSWITCHER
Elapsed container 104 ms, session 104 ms, action 0 ms
8) Quickscrub: action:DRAGANDDROP Source child: QUICK
9) Quickswitch: action:FLING Source child: QUICK
Change-Id: I5898230859ff600f48a2a873a40b670fe4d39a0d
2018-02-15 05:40:25 +08:00
|
|
|
QUICK_SCRUB_BUTTON = 12;
|
2018-04-28 06:50:44 +08:00
|
|
|
CLEAR_ALL_BUTTON = 13;
|
2018-05-02 10:26:05 +08:00
|
|
|
CANCEL_TARGET = 14;
|
2018-05-25 04:05:50 +08:00
|
|
|
TASK_PREVIEW = 15;
|
|
|
|
SPLIT_SCREEN_TARGET = 16;
|
2016-03-08 02:07:35 +08:00
|
|
|
}
|
|
|
|
|
2018-05-10 07:18:58 +08:00
|
|
|
enum TipType {
|
|
|
|
DEFAULT_NONE = 0;
|
|
|
|
BOUNCE = 1;
|
|
|
|
SWIPE_UP_TEXT = 2;
|
|
|
|
QUICK_SCRUB_TEXT = 3;
|
|
|
|
PREDICTION_TEXT = 4;
|
|
|
|
}
|
|
|
|
|
2016-04-13 09:32:04 +08:00
|
|
|
// Used to define the action component of the LauncherEvent.
|
2016-03-08 02:07:35 +08:00
|
|
|
message Action {
|
|
|
|
enum Type {
|
|
|
|
TOUCH = 0;
|
|
|
|
AUTOMATED = 1;
|
2016-10-07 01:53:29 +08:00
|
|
|
COMMAND = 2;
|
2018-05-10 07:18:58 +08:00
|
|
|
TIP = 3;
|
2016-03-08 02:07:35 +08:00
|
|
|
// SOFT_KEYBOARD, HARD_KEYBOARD, ASSIST
|
|
|
|
}
|
2018-05-10 07:18:58 +08:00
|
|
|
|
2016-03-08 02:07:35 +08:00
|
|
|
enum Touch {
|
|
|
|
TAP = 0;
|
|
|
|
LONGPRESS = 1;
|
|
|
|
DRAGDROP = 2;
|
|
|
|
SWIPE = 3;
|
|
|
|
FLING = 4;
|
|
|
|
PINCH = 5;
|
|
|
|
}
|
2018-05-10 07:18:58 +08:00
|
|
|
|
|
|
|
enum Direction {
|
2016-07-22 02:48:37 +08:00
|
|
|
NONE = 0;
|
|
|
|
UP = 1;
|
|
|
|
DOWN = 2;
|
|
|
|
LEFT = 3;
|
|
|
|
RIGHT = 4;
|
|
|
|
}
|
2016-10-07 01:53:29 +08:00
|
|
|
enum Command {
|
|
|
|
HOME_INTENT = 0;
|
|
|
|
BACK = 1;
|
2018-05-16 05:05:47 +08:00
|
|
|
ENTRY = 2; // Indicates entry to one of Launcher container type target
|
|
|
|
// not using the HOME_INTENT
|
|
|
|
CANCEL = 3; // Indicates that a confirmation screen was cancelled
|
|
|
|
CONFIRM = 4; // Indicates thata confirmation screen was accepted
|
|
|
|
STOP = 5; // Indicates onStop() was called (screen time out, power off)
|
|
|
|
RECENTS_BUTTON = 6; // Indicates that Recents button was pressed
|
2018-05-17 06:54:31 +08:00
|
|
|
RESUME = 7; // Indicates onResume() was called
|
2016-10-07 01:53:29 +08:00
|
|
|
}
|
2017-10-18 06:39:46 +08:00
|
|
|
|
2016-03-08 02:07:35 +08:00
|
|
|
optional Type type = 1;
|
|
|
|
optional Touch touch = 2;
|
2016-07-22 02:48:37 +08:00
|
|
|
optional Direction dir = 3;
|
2016-10-07 01:53:29 +08:00
|
|
|
optional Command command = 4;
|
|
|
|
// Log if the action was performed on outside of the container
|
|
|
|
optional bool is_outside = 5;
|
Quick step/scrub/switch logging
- state transition happening due to Home and back is handled by
specifying src target as 'from' container and dst target as the 'to'
container
- Source and Destination container shows FROM and TO state for SWIPE/FLING
- event.isStateChange = true indicates that an action resulted in
state transition
- Elapsed container millis is the screen time on the source container
Bug: 70181187
- logcat printout with setprop log.tag.UserEvent VERBOSE
1) State: WORKSPACE -> ALLAPPS
action:FLING direction=UP
Source child:HOTSEAT id=0 parent:WORKSPACE id=0
Destination child:ALLAPPS
Elapsed container 1225 ms, session 1225 ms, action 0 ms
2) ALLAPPS -> HOMESCREEN
action:FLING direction=DOWN
Source child:ALLAPPS parent:ALLAPPS
Destination child:WORKSPACE id=0
Elapsed container 971 ms, session 2197 ms, action 0 ms
3) HOMESCREEN -> OVERVIEW
action:FLING direction=UP
Source child:NAVBAR parent:WORKSPACE id=0
Destination child:TASKSWITCHER
Elapsed container 4834 ms, session 4834 ms, action 0 ms
4) OVERVIEW-> ALLAPPS
action:FLING direction=UP
Source child:TASK parent:TASKSWITCHER
Destination child:ALLAPPS
Elapsed container 2176 ms, session 7010 ms, action 0 ms
5) ALLAPPS->OVERVIEW
action:FLING direction=DOWN
Source child:ALLAPPS parent:ALLAPPS
Destination child:TASKSWITCHER
Elapsed container 3683 ms, session 10693 ms, action 0 ms
6) OVERVIEW-> HOMESCREEN
action:FLING direction=DOWN
Source child:TASK parent:TASKSWITCHER
Destination child:WORKSPACE id=0
Elapsed container 2108 ms, session 12801 ms, action 0 ms
7) APPS-> OVERVIEW
action:FLING direction=UP
Source child:NAVBAR parent:APP
Destination child:TASKSWITCHER
Elapsed container 104 ms, session 104 ms, action 0 ms
8) Quickscrub: action:DRAGANDDROP Source child: QUICK
9) Quickswitch: action:FLING Source child: QUICK
Change-Id: I5898230859ff600f48a2a873a40b670fe4d39a0d
2018-02-15 05:40:25 +08:00
|
|
|
optional bool is_state_change = 6;
|
2016-03-08 02:07:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Context free grammar of typical user interaction:
|
|
|
|
// Action (Touch) + Target
|
|
|
|
// Action (Touch) + Target + Target
|
|
|
|
//
|
|
|
|
message LauncherEvent {
|
|
|
|
required Action action = 1;
|
|
|
|
// List of targets that touch actions can be operated on.
|
2016-04-13 09:32:04 +08:00
|
|
|
repeated Target src_target = 2;
|
|
|
|
repeated Target dest_target = 3;
|
2016-03-08 02:07:35 +08:00
|
|
|
|
|
|
|
optional int64 action_duration_millis = 4;
|
|
|
|
optional int64 elapsed_container_millis = 5;
|
|
|
|
optional int64 elapsed_session_millis = 6;
|
2017-03-23 01:25:17 +08:00
|
|
|
|
2018-07-03 04:17:32 +08:00
|
|
|
optional bool is_in_multi_window_mode = 7 [deprecated = true];
|
|
|
|
optional bool is_in_landscape_mode = 8 [deprecated = true];
|
2017-07-19 16:24:07 +08:00
|
|
|
|
|
|
|
optional LauncherEventExtension extension = 9;
|
2016-07-22 02:48:37 +08:00
|
|
|
}
|