Search in sources :

Example 66 with Target

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

the class UserEventDispatcher method logActionCommand.

public void logActionCommand(int command, int srcContainerType, int dstContainerType, int pageIndex) {
    Target srcTarget = newContainerTarget(srcContainerType);
    srcTarget.pageIndex = pageIndex;
    logActionCommand(command, srcTarget, dstContainerType >= 0 ? newContainerTarget(dstContainerType) : null);
}
Also used : 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)

Example 67 with Target

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

the class UserEventDispatcher method logActionTapOutside.

public void logActionTapOutside(Target target) {
    LauncherEvent event = newLauncherEvent(newTouchAction(Action.Type.TOUCH), target);
    event.action.isOutside = true;
    dispatchUserEvent(event, null);
}
Also used : LauncherEvent(com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent) LoggerUtils.newLauncherEvent(com.android.launcher3.logging.LoggerUtils.newLauncherEvent)

Example 68 with Target

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

the class LoggerUtils method newContainerTarget.

public static Target newContainerTarget(int containerType) {
    Target t = newTarget(Target.Type.CONTAINER);
    t.containerType = containerType;
    return t;
}
Also used : Target(com.android.launcher3.userevent.nano.LauncherLogProto.Target) ButtonDropTarget(com.android.launcher3.ButtonDropTarget)

Example 69 with Target

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

the class LoggerUtils method newLauncherEvent.

public static LauncherEvent newLauncherEvent(Action action, Target... srcTargets) {
    LauncherEvent event = new LauncherEvent();
    event.srcTarget = srcTargets;
    event.action = action;
    return event;
}
Also used : LauncherEvent(com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent)

Example 70 with Target

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

the class LoggerUtils method newItemTarget.

public static Target newItemTarget(ItemInfo info, InstantAppResolver instantAppResolver) {
    Target t = newTarget(Target.Type.ITEM);
    switch(info.itemType) {
        case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
            t.itemType = (instantAppResolver != null && info instanceof AppInfo && instantAppResolver.isInstantApp(((AppInfo) info))) ? ItemType.WEB_APP : ItemType.APP_ICON;
            t.predictedRank = DEFAULT_PREDICTED_RANK;
            break;
        case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
            t.itemType = ItemType.SHORTCUT;
            t.predictedRank = DEFAULT_PREDICTED_RANK;
            break;
        case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
            t.itemType = ItemType.FOLDER_ICON;
            break;
        case LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET:
            t.itemType = ItemType.WIDGET;
            break;
        case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT:
            t.itemType = ItemType.DEEPSHORTCUT;
            t.predictedRank = DEFAULT_PREDICTED_RANK;
            break;
    }
    return t;
}
Also used : Target(com.android.launcher3.userevent.nano.LauncherLogProto.Target) ButtonDropTarget(com.android.launcher3.ButtonDropTarget) AppInfo(com.android.launcher3.AppInfo)

Aggregations

View (android.view.View)85 WorkspaceItemInfo (com.android.launcher3.model.data.WorkspaceItemInfo)59 Point (android.graphics.Point)42 Rect (android.graphics.Rect)41 AppWidgetHostView (android.appwidget.AppWidgetHostView)40 AbstractFloatingView (com.android.launcher3.AbstractFloatingView)38 ItemInfo (com.android.launcher3.model.data.ItemInfo)37 Animator (android.animation.Animator)35 ValueAnimator (android.animation.ValueAnimator)35 Target (com.android.launcher3.userevent.nano.LauncherLogProto.Target)35 BubbleTextView (com.android.launcher3.BubbleTextView)34 DropTarget (com.android.launcher3.DropTarget)32 DragView (com.android.launcher3.dragndrop.DragView)30 LauncherAppWidgetHostView (com.android.launcher3.widget.LauncherAppWidgetHostView)30 AnimatorSet (android.animation.AnimatorSet)29 RemoteAnimationTargetCompat (com.android.systemui.shared.system.RemoteAnimationTargetCompat)29 ComponentName (android.content.ComponentName)28 ObjectAnimator (android.animation.ObjectAnimator)27 DraggableView (com.android.launcher3.dragndrop.DraggableView)26 AppInfo (com.android.launcher3.model.data.AppInfo)26