use of com.android.launcher3.logging.StatsLogUtils.LogContainerProvider in project android_packages_apps_Trebuchet by LineageOS.
the class UserEventDispatcher method logDragNDrop.
public void logDragNDrop(DropTarget.DragObject dragObj, View dropTargetAsView) {
Target srcChild = newItemTarget(dragObj.originalDragInfo, mInstantAppResolver);
ArrayList<Target> srcTargets = makeTargetsList(srcChild);
Target destChild = newItemTarget(dragObj.originalDragInfo, mInstantAppResolver);
ArrayList<Target> destTargets = makeTargetsList(destChild);
dragObj.dragSource.fillInLogContainerData(dragObj.originalDragInfo, srcChild, srcTargets);
if (dropTargetAsView instanceof LogContainerProvider) {
((LogContainerProvider) dropTargetAsView).fillInLogContainerData(dragObj.dragInfo, destChild, destTargets);
} else {
destTargets.add(newDropTarget(dropTargetAsView));
}
LauncherEvent event = newLauncherEvent(newTouchAction(Action.Touch.DRAGDROP), srcTargets);
Target[] destTargetsArray = new Target[destTargets.size()];
destTargets.toArray(destTargetsArray);
event.destTarget = destTargetsArray;
event.actionDurationMillis = SystemClock.uptimeMillis() - mActionDurationMillis;
dispatchUserEvent(event, null);
}
Aggregations