From 018eec68997342ca87e4ea607ab292adb12d7a34 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Wed, 9 May 2018 16:18:58 -0700 Subject: [PATCH] Add logging for Onboarding Bug: 73784423 * Discovery bounce, homescreen, hotseat UserEvent: action:TIP UserEvent: Source child:HOTSEAT id=0 BOUNCE * Discovery bounce, overview, prediction UserEvent: action:TIP UserEvent: Source child:PREDICTION BOUNCE * Swipe up from navbar text (visibility, cancel target) UserEvent: action:TIP UserEvent: Source child:TIP SWIPE_UP_TEXT UserEvent: action:TAP UserEvent: Source child:CANCEL_TARGET SWIPE_UP_TEXT * Quickscrub text (visibility, cancel target) UserEvent: action:TIP UserEvent: Source child:TIP QUICK_SCRUB_TEXT UserEvent: action:TAP UserEvent: Source child:CANCEL_TARGET QUICK_SCRUB_TEXT * Prediction apps text (visibility, cancel target) UserEvent: action:TAP UserEvent: Source child:TIP PREDICTION_TEXT UserEvent: action:TAP UserEvent: Source child:CANCEL_TARGET PREDICTION_TEXT Change-Id: I94710b5ed3d00e3599985b154eb660af4a958288 --- protos/launcher_log.proto | 15 ++++- quickstep/libs/sysui_shared.jar | Bin 128394 -> 128240 bytes .../quickstep/OverviewCommandHelper.java | 13 +++++ .../quickstep/TouchInteractionService.java | 5 ++ .../logging/UserEventDispatcherExtension.java | 52 +++++++++++++++++- .../launcher3/allapps/DiscoveryBounce.java | 4 ++ .../launcher3/logging/LoggerUtils.java | 28 ++++++++-- .../logging/UserEventDispatcher.java | 22 +++++++- 8 files changed, 130 insertions(+), 9 deletions(-) diff --git a/protos/launcher_log.proto b/protos/launcher_log.proto index 179f21d804..cd404d6d5f 100644 --- a/protos/launcher_log.proto +++ b/protos/launcher_log.proto @@ -55,6 +55,7 @@ message Target { optional int32 span_y = 14 [default = 1];// Used for ItemType.WIDGET optional int32 predictedRank = 15; optional TargetExtension extension = 16; + optional TipType tip_type = 17; } // Used to define what type of item a Target would represent. @@ -88,6 +89,7 @@ enum ContainerType { NAVBAR = 11; TASKSWITCHER = 12; // Recents UI Container (QuickStep) APP = 13; // Foreground activity is another app (QuickStep) + TIP = 14; // Onboarding texts (QuickStep) } // Used to define what type of control a Target would represent. @@ -109,14 +111,24 @@ enum ControlType { CANCEL_TARGET = 14; } +enum TipType { + DEFAULT_NONE = 0; + BOUNCE = 1; + SWIPE_UP_TEXT = 2; + QUICK_SCRUB_TEXT = 3; + PREDICTION_TEXT = 4; +} + // Used to define the action component of the LauncherEvent. message Action { enum Type { TOUCH = 0; AUTOMATED = 1; COMMAND = 2; + TIP = 3; // SOFT_KEYBOARD, HARD_KEYBOARD, ASSIST } + enum Touch { TAP = 0; LONGPRESS = 1; @@ -125,7 +137,8 @@ message Action { FLING = 4; PINCH = 5; } - enum Direction { + + enum Direction { NONE = 0; UP = 1; DOWN = 2; diff --git a/quickstep/libs/sysui_shared.jar b/quickstep/libs/sysui_shared.jar index b343cc2058e876e79f468a5d285e154acfe726f0..95bb8bbed8d884f40a5bea787624a40537ff96d4 100644 GIT binary patch delta 9844 zcmZ{J2|QKZ_x?R*nWvC>mRv)IjG-j+kTI!9NJPfGMOP}KjF%1)(r8Gyaw8cMG7lj# zPbIUYl*(_PbJg2@zyE)q`Z%ritY@#i*4pc=eZ6I=(P88qpCmGA zP$EB!!zi(iPl}txAmk^08M4JWcvK-HibX*wu@K4ri`?b-ZOD{Gsk;Qqgs&ULt{kW^aPB&cS z;uz(cTBcR+Daw0D2-v?XVz8fXQ~9S{u<=~6ut&#Sh+gA$jVh_^Cr+yN{2iQz?L5Kt zK?TOOxm+bF7c9-S6aMeW{p6sxOk~RjfUDqER*}Wb1{Fvd_ z-0;b^?&;JE-=0c|{05hiBS$!KhMZ>x0~_I3$F_S<-P(hWmG4qewGOu17W?z`Ij_v} z5_hiCCXrrt+X@e>o{2YdsytIc#ID9UstAiQKgw+#T=T2H;izqYDYIwni|~cK2ll1f zZ^8zoZ*jOko_Ea8tm85&eC9c%x~(PhD7N)Np_{$i*~Xh*)aLgE<+}b^8;il&c9LP3k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r@>?5#+ED%5qe*1B=TA4%8=O+K+Eh&C}<4-S>m2gfbw@B zQAmRbhkb(hP^(OYns)q$Dmw#uH`>pe(c%6Kcvt5?JjpA%1c6BZ)1e?b$sh~2zQkTv zk{+~{yzm&}3Mne)5mzrfVdGh77usgRpv~k!Uj&*IRmHgRF%XJ$5R$D~%INdQXg4Z- z*?zSv1-$uJAb)hXM9oIpBI{ILS3=dj-&7 z$0BIu6$BOi)AX{T!NlEPr%naIJOqNdwXUp+{G%5_z1YkHFE6f>LJaz1A<|+HH2MY! zC12P~vwxe3t%VCu94e*zr)`Fzxy`dsVgWc4Paru1Jq9OyWnuG9x{Xj%Nq;CIcpVhC z=oIJ{0kxF*hvJ5v7dQ9c4TRczheUziL>yhoI)XYCkWkQ>>_$=7C4fdhB%w%O0)xJU z9d26MOvwR+*Dn6U^P^U3%K)8tOhQ3-vI7mP_tABgLm;fqAgr2O62-q9u2}}h5wg$s zPpC?(gR?glROVYVS-cWaslcvZHkW_#3mB%W8bSBKVb$O>?Z6j^nQB)fNLtMQ0Bbyl AJpcdz diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java index c1462460b2..81a73fc653 100644 --- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java +++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java @@ -48,8 +48,10 @@ import android.view.ViewConfiguration; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.BaseDraggingActivity; +import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.MainThreadExecutor; import com.android.launcher3.anim.AnimationSuccessListener; +import com.android.launcher3.logging.UserEventDispatcher; import com.android.quickstep.ActivityControlHelper.ActivityInitListener; import com.android.quickstep.ActivityControlHelper.AnimationFactory; import com.android.quickstep.ActivityControlHelper.FallbackActivityControllerHelper; @@ -189,6 +191,17 @@ public class OverviewCommandHelper { mMainThreadExecutor.execute(new ShowRecentsCommand()); } + public void onTip(int actionType, int viewType) { + mMainThreadExecutor.execute(new Runnable() { + @Override + public void run() { + UserEventDispatcher.newInstance(mContext, + new InvariantDeviceProfile(mContext).getDeviceProfile(mContext)) + .logActionTip(actionType, viewType); + } + }); + } + public ActivityControlHelper getActivityControlHelper() { return mActivityControlHelper; } diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 7496b47827..bd05b6d7bf 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -147,6 +147,11 @@ public class TouchInteractionService extends Service { TraceHelper.endSection("SysUiBinder", "onQuickStep"); } + + @Override + public void onTip(int actionType, int viewType) { + mOverviewCommandHelper.onTip(actionType, viewType); + } }; private final TouchConsumer mNoOpTouchConsumer = (ev) -> {}; diff --git a/quickstep/src/com/android/quickstep/logging/UserEventDispatcherExtension.java b/quickstep/src/com/android/quickstep/logging/UserEventDispatcherExtension.java index d4cdd3556b..04153cc99e 100644 --- a/quickstep/src/com/android/quickstep/logging/UserEventDispatcherExtension.java +++ b/quickstep/src/com/android/quickstep/logging/UserEventDispatcherExtension.java @@ -15,15 +15,32 @@ */ package com.android.quickstep.logging; +import android.util.Log; + +import static com.android.launcher3.logging.LoggerUtils.newAction; +import static com.android.launcher3.logging.LoggerUtils.newContainerTarget; +import static com.android.launcher3.logging.LoggerUtils.newLauncherEvent; +import static com.android.launcher3.userevent.nano.LauncherLogProto.ControlType.CANCEL_TARGET; +import static com.android.systemui.shared.system.LauncherEventUtil.VISIBLE; +import static com.android.systemui.shared.system.LauncherEventUtil.DISMISS; +import static com.android.systemui.shared.system.LauncherEventUtil.RECENTS_QUICK_SCRUB_ONBOARDING_TIP; +import static com.android.systemui.shared.system.LauncherEventUtil.RECENTS_SWIPE_UP_ONBOARDING_TIP; + import com.android.launcher3.logging.UserEventDispatcher; +import com.android.launcher3.model.nano.LauncherDumpProto; +import com.android.launcher3.userevent.nano.LauncherLogExtensions; import com.android.launcher3.userevent.nano.LauncherLogProto; +import com.android.systemui.shared.system.LauncherEventUtil; import com.android.systemui.shared.system.MetricsLoggerCompat; /** - * This class handles AOSP MetricsLogger function calls. + * This class handles AOSP MetricsLogger function calls and logging around + * quickstep interactions. */ public class UserEventDispatcherExtension extends UserEventDispatcher { + private static final String TAG = "UserEventDispatcher"; + public void logStateChangeAction(int action, int dir, int srcChildTargetType, int srcParentContainerType, int dstContainerType, int pageIndex) { @@ -32,4 +49,37 @@ public class UserEventDispatcherExtension extends UserEventDispatcher { super.logStateChangeAction(action, dir, srcChildTargetType, srcParentContainerType, dstContainerType, pageIndex); } + + public void logActionTip(int actionType, int viewType) { + LauncherLogProto.Action action = new LauncherLogProto.Action(); + LauncherLogProto.Target target = new LauncherLogProto.Target(); + switch(actionType) { + case VISIBLE: + action.type = LauncherLogProto.Action.Type.TIP; + target.type = LauncherLogProto.Target.Type.CONTAINER; + target.containerType = LauncherLogProto.ContainerType.TIP; + break; + case DISMISS: + action.type = LauncherLogProto.Action.Type.TOUCH; + action.touch = LauncherLogProto.Action.Touch.TAP; + target.type = LauncherLogProto.Target.Type.CONTROL; + target.controlType = CANCEL_TARGET; + break; + default: + Log.e(TAG, "Unexpected action type = " + actionType); + } + + switch(viewType) { + case RECENTS_QUICK_SCRUB_ONBOARDING_TIP: + target.tipType = LauncherLogProto.TipType.QUICK_SCRUB_TEXT; + break; + case RECENTS_SWIPE_UP_ONBOARDING_TIP: + target.tipType = LauncherLogProto.TipType.SWIPE_UP_TEXT; + break; + default: + Log.e(TAG, "Unexpected viewType = " + viewType); + } + LauncherLogProto.LauncherEvent event = newLauncherEvent(action, target); + dispatchUserEvent(event, null); + } } diff --git a/src/com/android/launcher3/allapps/DiscoveryBounce.java b/src/com/android/launcher3/allapps/DiscoveryBounce.java index e8c5f15df9..deaf8d3c1d 100644 --- a/src/com/android/launcher3/allapps/DiscoveryBounce.java +++ b/src/com/android/launcher3/allapps/DiscoveryBounce.java @@ -18,6 +18,8 @@ package com.android.launcher3.allapps; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; +import static com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType.HOTSEAT; +import static com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType.PREDICTION; import android.animation.Animator; import android.animation.AnimatorInflater; @@ -127,6 +129,7 @@ public class DiscoveryBounce extends AbstractFloatingView { AnimatorInflater.loadAnimator(launcher, R.animator.discovery_bounce)); view.mIsOpen = true; launcher.getDragLayer().addView(view); + launcher.getUserEventDispatcher().logActionBounceTip(HOTSEAT); } public static void showForOverviewIfNeeded(Launcher launcher) { @@ -173,5 +176,6 @@ public class DiscoveryBounce extends AbstractFloatingView { DiscoveryBounce view = new DiscoveryBounce(launcher, animator); view.mIsOpen = true; launcher.getDragLayer().addView(view); + launcher.getUserEventDispatcher().logActionBounceTip(PREDICTION); } } diff --git a/src/com/android/launcher3/logging/LoggerUtils.java b/src/com/android/launcher3/logging/LoggerUtils.java index 9d97cb9c0f..442691f0dd 100644 --- a/src/com/android/launcher3/logging/LoggerUtils.java +++ b/src/com/android/launcher3/logging/LoggerUtils.java @@ -31,6 +31,7 @@ import com.android.launcher3.userevent.nano.LauncherLogProto.ControlType; import com.android.launcher3.userevent.nano.LauncherLogProto.ItemType; import com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent; import com.android.launcher3.userevent.nano.LauncherLogProto.Target; +import com.android.launcher3.userevent.nano.LauncherLogProto.TipType; import com.android.launcher3.util.InstantAppResolver; import java.lang.reflect.Field; @@ -76,7 +77,7 @@ public class LoggerUtils { } return str; case Action.Type.COMMAND: return getFieldName(action.command, Action.Command.class); - default: return UNKNOWN; + default: return getFieldName(action.type, Action.Type.class); } } @@ -84,23 +85,32 @@ public class LoggerUtils { if (t == null){ return ""; } + String str = ""; switch (t.type) { case Target.Type.ITEM: - return getItemStr(t); + str = getItemStr(t); + break; case Target.Type.CONTROL: - return getFieldName(t.controlType, ControlType.class); + str = getFieldName(t.controlType, ControlType.class); + break; case Target.Type.CONTAINER: - String str = getFieldName(t.containerType, ContainerType.class); + str = getFieldName(t.containerType, ContainerType.class); if (t.containerType == ContainerType.WORKSPACE || t.containerType == ContainerType.HOTSEAT) { str += " id=" + t.pageIndex; } else if (t.containerType == ContainerType.FOLDER) { str += " grid(" + t.gridX + "," + t.gridY+ ")"; } - return str; + break; default: - return "UNKNOWN TARGET TYPE"; + str += "UNKNOWN TARGET TYPE"; } + + if (t.tipType != TipType.DEFAULT_NONE) { + str += " " + getFieldName(t.tipType, TipType.class); + } + + return str; } private static String getItemStr(Target t) { @@ -186,6 +196,12 @@ public class LoggerUtils { return t; } + public static Target newControlTarget(int controlType) { + Target t = newTarget(Target.Type.CONTROL); + t.controlType = controlType; + return t; + } + public static Target newContainerTarget(int containerType) { Target t = newTarget(Target.Type.CONTAINER); t.containerType = containerType; diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java index 2c1eb32872..07e1315aa4 100644 --- a/src/com/android/launcher3/logging/UserEventDispatcher.java +++ b/src/com/android/launcher3/logging/UserEventDispatcher.java @@ -16,8 +16,10 @@ package com.android.launcher3.logging; +import static com.android.launcher3.logging.LoggerUtils.newAction; import static com.android.launcher3.logging.LoggerUtils.newCommandAction; import static com.android.launcher3.logging.LoggerUtils.newContainerTarget; +import static com.android.launcher3.logging.LoggerUtils.newControlTarget; import static com.android.launcher3.logging.LoggerUtils.newDropTarget; import static com.android.launcher3.logging.LoggerUtils.newItemTarget; import static com.android.launcher3.logging.LoggerUtils.newLauncherEvent; @@ -163,6 +165,8 @@ public class UserEventDispatcher { dispatchUserEvent(event, intent); } + public void logActionTip(int actionType, int viewType) { } + public void logTaskLaunchOrDismiss(int action, int direction, ComponentKey componentKey) { LauncherEvent event = newLauncherEvent(newTouchAction(action), // TAP or SWIPE or FLING newTarget(Target.Type.ITEM)); @@ -243,6 +247,15 @@ public class UserEventDispatcher { logActionOnControl(action, controlType, controlInContainer, -1); } + public void logActionOnControl(int action, int controlType, int parentContainer, + int grandParentContainer){ + LauncherEvent event = newLauncherEvent(newTouchAction(action), + newControlTarget(controlType), + newContainerTarget(parentContainer), + newContainerTarget(grandParentContainer)); + dispatchUserEvent(event, null); + } + public void logActionOnControl(int action, int controlType, @Nullable View controlInContainer, int parentContainerType) { final LauncherEvent event = (controlInContainer == null && parentContainerType < 0) @@ -269,6 +282,13 @@ public class UserEventDispatcher { dispatchUserEvent(event, null); } + public void logActionBounceTip(int containerType) { + LauncherEvent event = newLauncherEvent(newAction(Action.Type.TIP), + newContainerTarget(containerType)); + event.srcTarget[0].tipType = LauncherLogProto.TipType.BOUNCE; + dispatchUserEvent(event, null); + } + public void logActionOnContainer(int action, int dir, int containerType) { logActionOnContainer(action, dir, containerType, 0); } @@ -393,7 +413,7 @@ public class UserEventDispatcher { if (!IS_VERBOSE) { return; } - String log = "action:" + LoggerUtils.getActionStr(ev.action); + String log = "\n\naction:" + LoggerUtils.getActionStr(ev.action); if (ev.srcTarget != null && ev.srcTarget.length > 0) { log += "\n Source " + getTargetsStr(ev.srcTarget); }