mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user