Commit Graph

22 Commits

Author SHA1 Message Date
Vinit Nayak
ae7c8cacd5 Merge "Enable 3 button nav for taskbar" into sc-v2-dev 2021-06-18 05:43:41 +00:00
Sunny Goyal
5cf86b263e Updating taskbar icon alignment state
Icon alignment is only tied to Launcher paused/resumed state
Creating two separate states for this:
  1) Launcher paused/resumed
  2) Active gesture interaction (live-titles can affect paused state)

Removing state handler dependency on taskbar visibility

Bug: 190170303
Bug: 187353581
Bug: 187919439

Test: Manual
Change-Id: Ia97cdf43cec1d9213f5dc2af8d66258b34c57514
2021-06-16 13:30:36 -07:00
Vinit Nayak
58ffbef8f0 Enable 3 button nav for taskbar
Bug: 180046394
Test: Switched between gesture and button nav on
phone and tablet.

Change-Id: Iac2357a3256f8b6b36ca49d3680594a91e824a5f
2021-06-16 13:26:21 -07:00
Vinit Nayak
5219c563be Merge "Initial commit of TaskBar on keyguard" into sc-v2-dev 2021-06-15 23:05:17 +00:00
Vinit Nayak
560d28e3a1 Initial commit of TaskBar on keyguard
Bug: 180046394
Test: Tested with pin + keyboard +
pattern

Change-Id: I951d9508b1325c157a9c0d92fa8e77fe8df9c460
2021-06-15 11:33:26 -07:00
Sunny Goyal
ea8ac5a223 Only inflating taskbar views for valid items
Also enabling view cache for folders

Bug: 187353581
Test: Manual
Change-Id: I5bc695fd86475f30611bc6b362b4ae93c48c26bb
2021-06-15 10:37:23 -07:00
Tony Wickham
36696d62b0 Reorganize taskbar controllers
Organize existing properties as follows:
- TaskbarViewController contains properties affecting TaskbarView (though child icons are still supplied by TaskbarHotseatController)
- TaskbarDragLayerController contains properties related to TaskbarDragLayer itself
- Renamed NavbarButtonUiController to NavbarButtonsViewController, following the pattern of TaskbarViewController and TaskbarDragLayerController
- TaskbarControllers contains the different controllers to make it easier to construct, initialize, destroy, and pass them around
- Removed TaskbarIconController as its responsibilities were moved to more specific controllers

Test: compiles and runs, manually tested
Bug: 187353581
Change-Id: Idccd95d47117101bf9617e5532a5b87635d2b8f6
2021-06-09 13:27:02 -07:00
Vinit Nayak
e568781206 Support A11y contextual button
Also migrate to only using sysui state flags
for ime/switcher visibility instead of 2 separate
methods.

Bug: 180046394
Test: Tested w/ 1 a11y service, then 2 services for
long click. Tested with IME switcher enabled and then
also suggested rotation button.
A11y takes precedence over IME switcher, but rotation button
takes precedence over a11y as is in phone mode today.

Change-Id: I9289165c8ca98d7ee432bd7145122d6a519600f6
2021-06-08 11:25:44 -07:00
Sunny Goyal
57b2279dcb Taskbar layout update
> Calculating the hotseat padding statically
> Animating taskbar views individually when animating to home
  instead of a layout animation
> Moving all navbar buttons to a separate layout/controller and independent
  of Launcher
> Fixing RTL layout for taskbar and nav bar

Bug: 187353581
Test: Manual
Change-Id: If21696f38beee328f553e467394776a8e8ed4c3e
2021-06-03 16:10:02 -07:00
Vinit Nayak
91dca0f282 Initial commit of rotation contextual button.
UI fixing todo: b/187754252

Bug: 180046394
Test: Works in basic cases with on home and
in app taskbar.

Change-Id: I69985b57e38a9fdb7935fcafb097b1e6da73a6b9
2021-06-01 13:16:48 -07:00
TreeHugger Robot
3bc3f99052 Merge "Enable unpausing apps from the workspace." into sc-dev am: a07c2efdf6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14704506

Change-Id: I81fa5c0d7b9ab73d267e2e1083882854492fbaf1
2021-05-26 22:30:09 +00:00
Tony Wickham
8ac277ebd8 Taskbar drag starts internal pre-drag before system drag
- TaskbarDragController now extends DragController.
- Currently there is no pre-drag condition, so we immediately get onDragStart(), which starts the system global drag (which cancels the original internal drag).
- Make the original view invisible during the drag and drop operation, across both internal and system drag events.
- No longer handle onDragEvent() in TaskbarView, as TaskbarDragController handles all of it now.

Test: Drag and drop from taskbar still works (bonus: starts from the correct registration point that you touched down on). Locally added a PreDragCondition and verified a seamless handoff to system drag and drop when the pre drag end condition was met.
Bug: 182981908
Change-Id: I6bf48141a5eedfc6db6f461258e880ef8146e733
2021-05-25 15:35:58 -07:00
Schneider Victor-tulias
b199e20acc Enable unpausing apps from the workspace.
Fixes: 188675002
Test: manual
Change-Id: I02715450016e9b91fff774525b5e32c337c74547
2021-05-24 21:44:29 +00:00
Sunny Goyal
5584513500 Renamin TaskbarContainerView to TaskbarDragLayer
Bug: 187353581
Test: Presubmit
Change-Id: I9164a956aaa896111f287ab4e97b091a7d4d30ee
2021-05-21 14:42:18 -07:00
Sunny Goyal
d5500548dc Revert^2 "Moving taskbar lifecycle to TouchInteractionService"
430465a3d5
Bug: 187353581
Change-Id: I7b2280d16adfafd3e85ffc1d22e32d0c00d12b67
2021-05-21 07:05:02 +00:00
Kholoud Mohamed
430465a3d5 Revert "Moving taskbar lifecycle to TouchInteractionService"
This reverts commit e215fb730b.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I13700009003387451&testResultId=TR89423459137251402, bug https://buganizer.corp.google.com/issues/188755902

Bug: 188755902
Change-Id: I4650136975b60f311499ee6ff5b27ab9a32d23d6
2021-05-20 13:32:05 +01:00
Sunny Goyal
e215fb730b Moving taskbar lifecycle to TouchInteractionService
> Inflating taskbar views with a non-launcher window context
> Removing separate taskbar view in Launcher
> Handling taskbar icon clicks directly instead of going via launcher
> Fixing some relayouts during show/hide animation

Bug: 187353581
Test: Manual
Change-Id: Ia7d44acbb770bf0345922234b3daa5cc040a5843
2021-05-17 21:47:08 -07:00
Sunny Goyal
5996937798 Removing Launcher dependency from Folders
This allows opening/closing folders without a Launcher context

Bug: 187353581
Test: Manual
Change-Id: Id73a40445a23004eb554f0422d286aa0ff6b3c41
2021-05-10 14:01:43 -07:00
Tony Wickham
e63bd38a55 Remove dead taskbar code
Test: Works as before
Bug: 182512211
Change-Id: Id4c979f2924f9ae6881a9bed18bcc52fbd80c05b
2021-03-23 11:42:50 -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
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