Commit Graph

14 Commits

Author SHA1 Message Date
Nick Chameyev
4dd4159fdc Add taskbar icons unfold animation
Adds 'move from center' animation for taskbar icons when
unfolding foldable devices.

Moves unfold transition progress provider from quickstep
launcher activity to TouchInteractionService to widen
the scope when this provider is available to cover
both launcher activity and taskbar.

Launcher activity and taskbar get their own instances
of unfold transition progress provider using
ScopedUnfoldTransitionProgressProvider wrapper.
This wrapper allows to get transition progress provider
that emits events only when clients are ready to handle them.

Bug: 193794563
Test: manual
Change-Id: I27581bd4e145a74f526bf60f2a545e56ded322f9
2021-09-03 10:25:52 +01:00
Tony Wickham
42b0395fee Fix some taskbar stashing issues
- Don't allow long press to stash between taskbar icons
- Ensure taskbar_icon_touch_size is respected; previously it wasn't, because BubbleTextView@shouldIgnoreTouchDown() was returning true in the padding region. For taskbar, we want the whole icon size to be touchable.
- Cancel long press when passing touch slop to avoid swipe down being detected as long press

Test: long press on taskbar background, both between icons and not; swipe down on taskbar
Fixes: 198305464
Change-Id: I36f1d792e91da9a3bf57a2bef1e974b299c4e25c
2021-08-31 14:06:09 -07:00
Android Build Prod User
2d5a8dc847 Merge changes Ib2bc8419,Ia41cb0e3,I43bfbc41 into sc-v2-dev
* changes:
  Animate PredictedAppIcon when its icon changes
  Add "wave" animation when entering taskbar edu
  Add slot machine animation for PredictedAppIcon
2021-08-26 21:48:07 +00:00
Tony Wickham
31f787d352 Add "wave" animation when entering taskbar edu
Each icon scales and translates up, then back down. If the icon is predicted, it also plays a "slot machine" animation through random icons from AllAppsList.

Test: Visual
Bug: 180605356
Change-Id: Ia41cb0e340347eea6b580d23c8a2386837e9c399
2021-08-26 13:00:43 -07:00
Tony Wickham
bc30e25cec Hide taskbar icons when recents button is disabled
The idea is that both taskbar icons and recents navigate you to new apps, which we'd want to disable in similar contexts. Hence reusing FLAG_DISABLE_RECENTS.

Test: locally set FLAG_DISABLE_RECENTS=true, ensure taskbar icons don't show up (both in 3 button mode and gesture nav)
Bug: 193183428
Bug: 194990283
Change-Id: I9537f57dc25663151b1414c5260dadb58506fdb0
2021-08-26 10:18:04 -07:00
Tony Wickham
dd7a418335 Draw rounded corners above the taskbar
- Increase height of taskbar window, but not contentInsets
- Draw the inverted corners as part of TaskbarDragLayer#dispatchDraw() (which handles the background already)

Test: visual

Bug: 196257194
Fixes: 197129604
Change-Id: I517949a4c2b97c92e3bb43408776db6deb1379b4
2021-08-23 15:33:43 -07:00
Bryce Lee
a997ca437a Revert "Draw rounded corners above the taskbar"
This reverts commit 157d3b950d.

Reason for revert: b/197129604
Bug: 197129604
Change-Id: Idf2267528fade23291aedea9787d98601495537c
2021-08-18 20:50:58 +00:00
Tony Wickham
157d3b950d Draw rounded corners above the taskbar
- Increase height of taskbar window, but not contentInsets
- Draw the inverted corners as part of TaskbarDragLayer#dispatchDraw() (which handles the background already)

Test: visual

Bug: 196257194
Change-Id: I51d992078579e877c85a1d71ee4c00d85fd9db2e
2021-08-17 15:06:18 -07:00
Tony Wickham
8a2c1cbc5a Add taskbar stashing feedforward, i.e. hint at upcoming stash/unstash
Also fix unstashing not working in 3P launchers by moving the unstash call from LauncherTaskbarUIController to TaskbarActivityContext

Test: long press taskbar background and stashed handle, watch it hint towards the new stashed/unstashed state respectively and then complete the animation when the long press is triggered
Fixes: 193926311
Fixes: 192926350
Change-Id: I0e538be9129bf5c600d07f360b8106d7077862ad
2021-07-19 14:09:33 -10:00
Sunny Goyal
711c596c86 Binding Taskbar directly from Launcher model
This allows taskbar to be loaded even in case of 3P Launchers
and removes dependency on LauncherActivity lifecycle

Bug: 187353581
Bug: 188788621
Test: Manual
Change-Id: I5a0988e0697b41677d4c58f0213aef14ec0c0972
2021-07-15 12:43:11 -07:00
Tony Wickham
3fd22847ac Initial commit of taskbar stashing
- Added StashedHandleViewController to provide properties such as ViewOutlineProvider to animate the handle that's shown in place of taskbar while it's stashed
- Added TaskbarStashController to coordinate the stashed state, including orchestrating the animation across taskbar controllers
- Added TaskbarStashInput consumer to detect long press in the nav region when taskbar is stashed

Behavior:
- Long pressing taskbar background animates to the stashed state by morphing the TaskbarView into the stashed handle view and offsetting the background offscreen
- We persist the stashed state across app launches and reboot; to unstash, long press the stashed handle
- We also visually unstash when going back home

Test: long press tasbkar background when in an app to stash it, long press the resulting stashed handle to unstash; while stashed, swipe up to home to also unstash until launching another app
Bug: 189503603
Change-Id: I698eff785388dff1ef717c76879719d6af236c2d
2021-06-18 17:51:39 -07: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
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
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