Commit Graph

7 Commits

Author SHA1 Message Date
Tony Wickham
e13a4a4475 Cleanup taskbar touchableInsets
- Remove obsolete visibleInsets hack and isDraggingItem() check
- Have TaskbarController determine whether taskbar is touchable,
  rather than TaskbarContainerView.
- Disallow touches during transition to home (can potentially
  improve this later)

Test: Swupe home, tap taskbar folder during transition, ensure
don't end up in broken state with the uninteractable folder open
Bug: 182512211

Change-Id: Id625ce8b9b876a8a1b450b7d6fb771540e23bc08
2021-04-05 17:33:44 -07:00
Tony Wickham
9ce3b25ef6 Add TaskbarView as a child of Hotseat
Instead of keeping the Taskbar window showing above the home screen,
we now integrate a copy of TaskbarView directly into Launcher's view
hierarchy. Most TaskbarController calls apply to both TaskbarViews
(mTaskbarViewInApp and mTaskbarViewOnHome), except for calls related
to Hotseat, which only apply to mTasbkarViewInApp given the real
Hotseat will be showing with mTaskbarViewOnHome.

More cleanup will follow this change.

Test: All taskbar interactions (e.g. drag and drop) continue to work
Bug: 182512211
Bug: 171917176
Change-Id: I0f0b124f652daa85f866e1df8f9e2981540331a0
2021-03-22 15:26:01 -07:00
Tony Wickham
30d6971812 Allow touches through Taskbar when dragging to home screen
Setting visibleInsets to (almost) empty ensures the drag
events get sent to launcher.

Test: Drag a taskbar item on home, ensure it moves when
events are within the taskbar insets

Bug: 182079330
Bug: 171917176
Change-Id: Ida6a4a94a3fd2927d18245f45ed3e8d1701b9833
2021-03-09 14:01:59 -08:00
Tony Wickham
a29a046d83 Align real hotseat with taskbar hotseat during drag and drop
Remove hotseat space from workspace in DeviceProfile if
taskbar is present, and instantly swap between taskbar and
hotseat when entering SpringLoadedMode. To allow for an exact
handoff, we also scale up the TaskbarView such that its icons
match the hotseat icon size when on the home screen.

Note that this CL only supports dragging to the taskbar, not
out of it (which still triggers system drag and drop instead).

Test: In RTL and LTR, drag a workspace item and ensure hotseat
seamlessly swaps with the taskbar hotseat and allows drops.

Bug: 179886115
Bug: 171917176

Change-Id: Id6462075b9b0b66b06d51a78c9c0b3e11e83e84d
2021-03-03 11:16:42 -08:00
Tony Wickham
7ba547cd2d Folder support in Taskbar
- Add TaskbarActivityContext which allows shared Launcher elements to
  "just work" using existing generic ActivityContext.
- TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>.
- Inflate FolderIcon and Folder using TaskbarActivityContext to be
  shown in TaskbarContainerView.
- Use TaskbarActivityContext's DeviceProfile to determine icon size
  instead of overriding in styles. This also ensures that normal
  BubbleTextView icons have the same size as FolderIcons.

Test: Place a folder in home screen hotseat, ensure it shows up in
taskbar and can be opened, and that apps inside it can be launched
or dragged.
Bug: 171917176

Change-Id: Ic25d2f84bcd7e3399c88989305ea565497c030d9
2021-02-16 15:07:01 -08:00
Tony Wickham
734be0b5ae Add OnComputeInsetsListener to TaskbarContainerView
Instead of updating visibility of TaskbarContainerView, keep it
VISIBLE but with alpha 0, and update touchableInsets to allow
touches to pass through. This avoids sending insets changed
when Taskbar is hidden.

Test: Swipe to Overview, no jumping/jank due to insets change;
also tap where Taskbar would be and ensure it doesn't launch

Bug: 171917176
Change-Id: I9ccb4335e0301f34eec459657f3bbaf88b0d8a52
2021-02-05 08:51:42 -08:00
Tony Wickham
f26e90aa35 Add empty Taskbar views and initial TaskbarController
Guarded by a FeatureFlag.

Bug: 171917176
Change-Id: I7145c7ae68282bf53552502798fe758c8c0e285d
2021-01-22 15:39:46 -08:00