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);
}
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);
}
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;
}
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);
}
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;
}
Aggregations