summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2016-09-01 12:47:12 -0700
committerHyunyoung Song <hyunyoungs@google.com>2016-09-01 12:47:12 -0700
commit59a238095e82fd02355f4cb53abe01655a50b051 (patch)
tree59aed70bde91588fff3a51c2940c42fb814d6d07 /src/com/android/launcher3/Workspace.java
parent4a4b49ff3482cbe7f8192807cdc99437810fe518 (diff)
downloadandroid_packages_apps_Trebuchet-59a238095e82fd02355f4cb53abe01655a50b051.tar.gz
android_packages_apps_Trebuchet-59a238095e82fd02355f4cb53abe01655a50b051.tar.bz2
android_packages_apps_Trebuchet-59a238095e82fd02355f4cb53abe01655a50b051.zip
Support user event logging for drag and drop
b/30039490 Supported in this CL: - DnD: drag from container [WORKSPACE|HOTSEAT|FOLDER|ALLAPPS|WIDGETS|DEEPSHORTCUTS] drag to container [HOTSEAT,WORKSPACE,FOLDER,DROPTARGETS] - Source and target can be [FOLDER_ICON, ICON, DEEPSHORTCUT, WIDGET] - $ adb shell setprop log.tag.UserEvent DEBUG will turn on debugging Change-Id: I0b8b879b80e6dce85bbde6e7794f9e0677832603
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r--src/com/android/launcher3/Workspace.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 4c2d4bb92..06d73c292 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -100,7 +100,7 @@ import java.util.HashSet;
public class Workspace extends PagedView
implements DropTarget, DragSource, DragScroller, View.OnTouchListener,
DragController.DragListener, LauncherTransitionable, ViewGroup.OnHierarchyChangeListener,
- Insettable, DropTargetSource, AccessibilityDragSource, UserEventDispatcher.LaunchSourceProvider {
+ Insettable, DropTargetSource, AccessibilityDragSource {
private static final String TAG = "Launcher.Workspace";
private static boolean ENFORCE_DRAG_EVENT_ORDER = false;
@@ -3426,6 +3426,7 @@ public class Workspace extends PagedView
if (info.container == NO_ID && info instanceof AppInfo) {
// Came from all apps -- make a copy
info = ((AppInfo) info).makeShortcut();
+ d.dragInfo = info;
}
view = mLauncher.createShortcut(cellLayout, (ShortcutInfo) info);
break;
@@ -4295,6 +4296,12 @@ public class Workspace extends PagedView
target.gridY = info.cellY;
target.pageIndex = getCurrentPage();
targetParent.containerType = LauncherLogProto.WORKSPACE;
+ if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
+ target.rank = info.rank;
+ targetParent.containerType = LauncherLogProto.HOTSEAT;
+ } else if (info.container >= 0) {
+ targetParent.containerType = LauncherLogProto.FOLDER;
+ }
}
/**