Commit Graph

12 Commits

Author SHA1 Message Date
Hyunyoung Song
6b670d62df Good riddance UserEventDispatcher [1/n]
Bug: 165675920
Change-Id: I237ed4243e1724b3c370c5660673bb3966bf4811
2020-08-24 21:19:09 -07:00
Hyunyoung Song
fc00747909 Add StatsLog*Manager for logging.
Bug: 113043444

Verification: (19) is our event classifier number
11-05 11:24:28.188   932   994 I statsd  : { 1541445868000000000 766293363001 (19)0x10000->1[I] 0x20000->0[I] 0x30000->0[I] 0x40000->[S] 0x50000->1[I]  }

Change-Id: I75403837f9fa8e51efa012fb708bce7efc9c4488
2018-11-05 11:41:38 -08:00
Sunny Goyal
1797af41d1 Cleaning up drag state management.
When the drag is started, the UI automatically goes into spring loaded mode. On a successful
drop, it is the responsibility of the {@link DropTarget} to exit out of the spring loaded
mode. If the drop was cancelled for some reason, the UI will automatically exit out of this mode.

Bug: 34692289
Change-Id: Ic611739a43bb8d9279b587aaee3039326c143e8b
2017-10-16 13:06:52 -07:00
Sunny Goyal
1ce9c476f7 Removing some methods from the DragSource
This makes is easier to create new DragSource and sets up
proper default values in DragOptions

Change-Id: I6cb0b1df41b9730cf29f785fe85fe7f0b573ee3a
2017-10-03 16:18:46 -07:00
Sunny Goyal
0f76b56865 Refactoring FlingToDelete
> Moving all fling related logic to FlingToDeleteHelper from DragController
> Removing fling related methods from DragSource and DropTarget
> Moving fling animation logic from DeleteDropTarget to FlingAnimation
> Simplifying DropTargetBar to directly look for all valid drop targets.
  This makes it easier to add new DropTarget in xml.

Change-Id: I7214d2d30c907ab93c80d92d9f9be6dda2d63354
2016-12-13 23:39:16 -08:00
Hyunyoung Song
df7ef68bbf Refactors in UserEventDispatcher
- LaunchSource -> LogContainer

Change-Id: I71bfee992fb1ba7ae80e824d419f7bf8d3020999
2016-10-06 17:52:22 -07:00
Hyunyoung Song
59a238095e 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
2016-09-01 12:47:12 -07:00
Tony Wickham
9aae47f8a6 Added 'Cancel' drop target from all apps and widget picker.
- Reuse DeleteDropTarget since it's the same effect, but with "Cancel"
  instead of "Remove" if supportsDeleteDropTarget() returns false.
- Rename related strings (but not their values)

Bug: 24104015
Bug: 24099531
Change-Id: Ia9fbcaa17bb17f7aa31df1f830298da01544c178
2015-10-05 10:58:15 -07:00
Hyunyoung Song
3f471440a8 WidgetTray revamp work
- RecyclerView is rendering
- Animation is connected
- Drag and drop is now handled
- UI tweaking: background, margins, more to come.
- Flicker and preview not loading issue:
  fixed height for the horizontal scroll view.
- Shortcuts are added
- Widget Preview loading should support shortPress for drop
- UI tweaks left: overlay of arrow when there are more items to scroll
- icons are added in the section header
- Sorting of widget sections and widget horizontal list
- Adding all the padding constants to dimen.xml file
- RecyclerView should only support one view type

For items to be addressed in follow up patches OR CLs,
TODO is added to the comment.

b/19897708

Change-Id: Ibfc4da1696a23d20bada93db46e126706eb13cdc
2015-04-08 19:01:34 -07:00
Mathew Inwood
1eeb3fc9d8 Generalize support for 'App Info', 'Uninstall' and 'Delete'
This allows other DragSource's to allow this behaviour, instead of it being
tied to specific source types.

Change-Id: I06b7c39b1b34a0ae141245bcc13b6a0873a4c0fd
2013-11-28 10:17:07 +00:00
Winson Chung
eeb5bbc940 Use the icon bounds for all calculations.
- Fixes a drag and drop issue when the dynamic
grid scales icons down, due to the drawable bounds
not being equal to their bitmap sizes.

Change-Id: If7c68b51131de7bac3195a2619e22340f7789432
2013-11-14 11:18:18 -08:00
Daniel Sandler
325dc23624 Launcher2 is now Launcher3.
Changes include
  - moving from com.android.launcher{,2} to
    com.android.launcher3
  - removing wallpapers
  - new temporary icon

Change-Id: I1eabd06059e94a8f3bdf6b620777bd1d2b7c212b
2013-06-05 23:30:20 -04:00