From 3f5a11f3a517975e108e8ccb749cddef8670fb54 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Thu, 29 Jun 2017 16:42:04 -0700 Subject: Add user event logging for page rearrangement and LEFT/RIGHT swipes 1. Call logOverviewRearrange logging call ONLY when the order actually changed 2. Call logActionOnContainer when containers are swiped. Bug: 32457561 Bug: 32457561 06-30 11:23:04.082 6585 6585 D UserEvent: action:SWIPE direction=LEFT 06-30 11:23:04.082 6585 6585 D UserEvent: Source child:WORKSPACE id=2 06-30 11:23:04.082 6585 6585 D UserEvent: Elapsed container 50436 ms session 50436 ms action 0 ms 06-30 11:23:04.082 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:04.082 6585 6585 D UserEvent: isInMultiWindowMode false 06-30 11:23:08.266 6585 6585 D UserEvent: action:SWIPE direction=LEFT 06-30 11:23:08.266 6585 6585 D UserEvent: Source child:WORKSPACE id=1 06-30 11:23:08.266 6585 6585 D UserEvent: Elapsed container 54620 ms session 54620 ms action 0 ms 06-30 11:23:08.266 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:08.266 6585 6585 D UserEvent: isInMultiWindowMode false 06-30 11:23:10.742 6585 6585 D UserEvent: action:SWIPE direction=LEFT 06-30 11:23:10.742 6585 6585 D UserEvent: Source child:WORKSPACE id=0 06-30 11:23:10.742 6585 6585 D UserEvent: Elapsed container 57096 ms session 57096 ms action 0 ms 06-30 11:23:10.742 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:10.742 6585 6585 D UserEvent: isInMultiWindowMode false 06-30 11:23:17.286 6585 6585 D UserEvent: action:SWIPE direction=RIGHT 06-30 11:23:17.286 6585 6585 D UserEvent: Source child:WORKSPACE id=-1 06-30 11:23:17.286 6585 6585 D UserEvent: Elapsed container 63639 ms session 63639 ms action 0 ms 06-30 11:23:17.286 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:17.286 6585 6585 D UserEvent: isInMultiWindowMode false 06-30 11:23:19.879 6585 6585 D UserEvent: action:SWIPE direction=RIGHT 06-30 11:23:19.879 6585 6585 D UserEvent: Source child:WORKSPACE id=0 06-30 11:23:19.879 6585 6585 D UserEvent: Elapsed container 66233 ms session 66233 ms action 0 ms 06-30 11:23:19.879 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:19.879 6585 6585 D UserEvent: isInMultiWindowMode false 06-30 11:23:23.811 6585 6585 D UserEvent: action:SWIPE direction=RIGHT 06-30 11:23:23.811 6585 6585 D UserEvent: Source child:WORKSPACE id=1 06-30 11:23:23.811 6585 6585 D UserEvent: Elapsed container 70165 ms session 70165 ms action 0 ms 06-30 11:23:23.811 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:23.811 6585 6585 D UserEvent: isInMultiWindowMode false Change-Id: I11a48ee44aaa87863e76ccf2b46f499c28e96748 --- src/com/android/launcher3/logging/LoggerUtils.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/com/android/launcher3/logging') diff --git a/src/com/android/launcher3/logging/LoggerUtils.java b/src/com/android/launcher3/logging/LoggerUtils.java index 329b7d561..72a083b9e 100644 --- a/src/com/android/launcher3/logging/LoggerUtils.java +++ b/src/com/android/launcher3/logging/LoggerUtils.java @@ -66,8 +66,14 @@ public class LoggerUtils { } public static String getActionStr(Action action) { + String str = ""; switch (action.type) { - case Action.Type.TOUCH: return getFieldName(action.touch, Action.Touch.class); + case Action.Type.TOUCH: + str += getFieldName(action.touch, Action.Touch.class); + if (action.touch == Action.Touch.SWIPE) { + str += " direction=" + getFieldName(action.dir, Action.Direction.class); + } + return str; case Action.Type.COMMAND: return getFieldName(action.command, Action.Command.class); default: return UNKNOWN; } -- cgit v1.2.3