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