Loading protos/launcher_log.proto +14 −1 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -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. Loading @@ -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; Loading @@ -125,6 +137,7 @@ message Action { FLING = 4; PINCH = 5; } enum Direction { NONE = 0; UP = 1; Loading quickstep/libs/sysui_shared.jar −154 B (125 KiB) File changed.No diff preview for this file type. View original file View changed file quickstep/src/com/android/quickstep/OverviewCommandHelper.java +13 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } Loading quickstep/src/com/android/quickstep/TouchInteractionService.java +5 −0 Original line number Diff line number Diff line Loading @@ -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) -> {}; Loading quickstep/src/com/android/quickstep/logging/UserEventDispatcherExtension.java +51 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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); } } Loading
protos/launcher_log.proto +14 −1 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -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. Loading @@ -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; Loading @@ -125,6 +137,7 @@ message Action { FLING = 4; PINCH = 5; } enum Direction { NONE = 0; UP = 1; Loading
quickstep/libs/sysui_shared.jar −154 B (125 KiB) File changed.No diff preview for this file type. View original file View changed file
quickstep/src/com/android/quickstep/OverviewCommandHelper.java +13 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } Loading
quickstep/src/com/android/quickstep/TouchInteractionService.java +5 −0 Original line number Diff line number Diff line Loading @@ -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) -> {}; Loading
quickstep/src/com/android/quickstep/logging/UserEventDispatcherExtension.java +51 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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); } }