Search in sources :

Example 11 with LauncherEvent

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

the class UserEventDispatcher method logActionCommand.

/**
 * TODO: Make this function work when a container view is passed as the 2nd param.
 */
public void logActionCommand(int command, View itemView, int srcContainerType) {
    LauncherEvent event = newLauncherEvent(newCommandAction(command), newItemTarget(itemView, mInstantAppResolver), newTarget(Target.Type.CONTAINER));
    if (fillInLogContainerData(event, itemView)) {
        // TODO: Remove the following two lines once fillInLogContainerData can take in a
        // container view.
        event.srcTarget[0].type = Target.Type.CONTAINER;
        event.srcTarget[0].containerType = srcContainerType;
    }
    dispatchUserEvent(event, null);
}
Also used : LauncherEvent(com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent) LoggerUtils.newLauncherEvent(com.android.launcher3.logging.LoggerUtils.newLauncherEvent)

Example 12 with LauncherEvent

use of com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent 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 13 with LauncherEvent

use of com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent 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 14 with LauncherEvent

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

the class UserEventDispatcher method logNotificationLaunch.

public void logNotificationLaunch(View v, PendingIntent intent) {
    LauncherEvent event = newLauncherEvent(newTouchAction(Action.Touch.TAP), newItemTarget(v, mInstantAppResolver), newTarget(Target.Type.CONTAINER));
    if (fillInLogContainerData(event, v)) {
        event.srcTarget[0].packageNameHash = (mUuidStr + intent.getCreatorPackage()).hashCode();
    }
    dispatchUserEvent(event, null);
}
Also used : LauncherEvent(com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent) LoggerUtils.newLauncherEvent(com.android.launcher3.logging.LoggerUtils.newLauncherEvent)

Example 15 with LauncherEvent

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

the class UserEventDispatcher method logAppLaunch.

public void logAppLaunch(View v, Intent intent, UserHandle user) {
    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)

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