Search in sources :

Example 21 with LauncherEvent

use of com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent in project Neo-Launcher by NeoApplications.

the class UserEventDispatcher method logActionBounceTip.

public void logActionBounceTip(int containerType) {
    LauncherEvent event = newLauncherEvent(newAction(Action.Type.TIP), newContainerTarget(containerType));
    event.srcTarget[0].tipType = LauncherLogProto.TipType.BOUNCE;
    dispatchUserEvent(event, null);
}
Also used : LauncherEvent(com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent) LoggerUtils.newLauncherEvent(com.android.launcher3.logging.LoggerUtils.newLauncherEvent)

Example 22 with LauncherEvent

use of com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent in project Neo-Launcher by NeoApplications.

the class UserEventDispatcher method logAppLaunch.

@Deprecated
public void logAppLaunch(View v, Intent intent) {
    LauncherEvent event = newLauncherEvent(newTouchAction(Action.Touch.TAP), newItemTarget(v, mInstantAppResolver), newTarget(Target.Type.CONTAINER));
    if (fillInLogContainerData(event, v)) {
        if (mDelegate != null) {
            mDelegate.modifyUserEvent(event);
        }
        fillIntentInfo(event.srcTarget[0], intent);
    }
    dispatchUserEvent(event, intent);
    mAppOrTaskLaunch = true;
}
Also used : LauncherEvent(com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent) LoggerUtils.newLauncherEvent(com.android.launcher3.logging.LoggerUtils.newLauncherEvent)

Example 23 with LauncherEvent

use of com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent in project Neo-Launcher by NeoApplications.

the class UserEventDispatcher method logActionBack.

public void logActionBack(boolean completed, int downX, int downY, boolean isButton, boolean gestureSwipeLeft, int containerType) {
    int actionTouch = isButton ? Action.Touch.TAP : Action.Touch.SWIPE;
    Action action = newCommandAction(actionTouch);
    action.command = Action.Command.BACK;
    action.dir = isButton ? Action.Direction.NONE : gestureSwipeLeft ? Action.Direction.LEFT : Action.Direction.RIGHT;
    Target target = newControlTarget(isButton ? LauncherLogProto.ControlType.BACK_BUTTON : LauncherLogProto.ControlType.BACK_GESTURE);
    target.spanX = downX;
    target.spanY = downY;
    target.cardinality = completed ? 1 : 0;
    LauncherEvent event = newLauncherEvent(action, target, newContainerTarget(containerType));
    dispatchUserEvent(event, null);
}
Also used : LoggerUtils.newCommandAction(com.android.launcher3.logging.LoggerUtils.newCommandAction) LoggerUtils.newTouchAction(com.android.launcher3.logging.LoggerUtils.newTouchAction) Action(com.android.launcher3.userevent.nano.LauncherLogProto.Action) LoggerUtils.newAction(com.android.launcher3.logging.LoggerUtils.newAction) LoggerUtils.newTarget(com.android.launcher3.logging.LoggerUtils.newTarget) Target(com.android.launcher3.userevent.nano.LauncherLogProto.Target) LoggerUtils.newControlTarget(com.android.launcher3.logging.LoggerUtils.newControlTarget) LoggerUtils.newItemTarget(com.android.launcher3.logging.LoggerUtils.newItemTarget) DropTarget(com.android.launcher3.DropTarget) LoggerUtils.newContainerTarget(com.android.launcher3.logging.LoggerUtils.newContainerTarget) LoggerUtils.newDropTarget(com.android.launcher3.logging.LoggerUtils.newDropTarget) LauncherEvent(com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent) LoggerUtils.newLauncherEvent(com.android.launcher3.logging.LoggerUtils.newLauncherEvent)

Example 24 with LauncherEvent

use of com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent in project Neo-Launcher by NeoApplications.

the class UserEventDispatcher method logActionOnControl.

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);
}
Also used : LauncherEvent(com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent) LoggerUtils.newLauncherEvent(com.android.launcher3.logging.LoggerUtils.newLauncherEvent)

Example 25 with LauncherEvent

use of com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent in project Neo-Launcher by NeoApplications.

the class UserEventDispatcher method logTaskLaunchOrDismiss.

@Deprecated
public void logTaskLaunchOrDismiss(int action, int direction, int taskIndex, ComponentKey componentKey) {
    LauncherEvent event = newLauncherEvent(// TAP or SWIPE or FLING
    newTouchAction(action), newTarget(Target.Type.ITEM));
    if (action == Action.Touch.SWIPE || action == Action.Touch.FLING) {
        // Direction DOWN means the task was launched, UP means it was dismissed.
        event.action.dir = direction;
    }
    event.srcTarget[0].itemType = LauncherLogProto.ItemType.TASK;
    event.srcTarget[0].pageIndex = taskIndex;
    fillComponentInfo(event.srcTarget[0], componentKey.componentName);
    dispatchUserEvent(event, null);
    mAppOrTaskLaunch = true;
}
Also used : LauncherEvent(com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent) LoggerUtils.newLauncherEvent(com.android.launcher3.logging.LoggerUtils.newLauncherEvent)

Aggregations

LauncherEvent (com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent)32 LoggerUtils.newLauncherEvent (com.android.launcher3.logging.LoggerUtils.newLauncherEvent)29 DropTarget (com.android.launcher3.DropTarget)9 LoggerUtils.newContainerTarget (com.android.launcher3.logging.LoggerUtils.newContainerTarget)9 LoggerUtils.newControlTarget (com.android.launcher3.logging.LoggerUtils.newControlTarget)9 LoggerUtils.newDropTarget (com.android.launcher3.logging.LoggerUtils.newDropTarget)9 LoggerUtils.newItemTarget (com.android.launcher3.logging.LoggerUtils.newItemTarget)9 LoggerUtils.newTarget (com.android.launcher3.logging.LoggerUtils.newTarget)9 Target (com.android.launcher3.userevent.nano.LauncherLogProto.Target)9 LoggerUtils.newAction (com.android.launcher3.logging.LoggerUtils.newAction)4 LoggerUtils.newCommandAction (com.android.launcher3.logging.LoggerUtils.newCommandAction)4 LoggerUtils.newTouchAction (com.android.launcher3.logging.LoggerUtils.newTouchAction)4 Action (com.android.launcher3.userevent.nano.LauncherLogProto.Action)4 LogContainerProvider (com.android.launcher3.logging.StatsLogUtils.LogContainerProvider)3 ItemInfo (com.android.launcher3.ItemInfo)1 LauncherLogProto (com.android.launcher3.userevent.LauncherLogProto)1 InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)1