Commit Graph

25 Commits

Author SHA1 Message Date
Tony Wickham
f8a064f347 isable taskbar edu for tests
Test: clear TASKBAR_EDU_SEEN pref, ensure edu shows during normal usage
Bug: 199100151
Change-Id: I8e59cfa22ccba77c588a0902d46021dd72c6e77d
2021-09-08 08:10:16 -07:00
Tracy Zhou
527b39cd28 Stash/unstash the task bar based on states
Bug: 193938970
Test: go to any app, stash/unstash, and make sure the states are preserved
Change-Id: I3adf826407e90275687ecea8302abf7a004f1df7
2021-09-03 12:43:04 -07: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
3974edc46a Don't draw taskbar background during gestures
In this case, the ScrimView for BackgroundAppState will handle drawing behind the whole screen, and prevents taskbar from drawing the rounded corners on top of TaskViews.

Added a hack to defer resuming last task by a frame to ensure taskbar is drawing first.

Test: Quick switch to an app, ensure it isn't covered by the taskbar's rounded corner
Bug: 196257194
Change-Id: Ibc81d80bc3bf1d908e6912b179cbcafbdcc56c0f
2021-08-17 15:07:50 -07:00
Andy Wickham
b8eac86b63 Only show Taskbar Edu once (first time an app is opened).
Bug: 180605356
Test: Manual
Change-Id: I2cc102d7ce36e0b1c2c75482e2bbb97218618e61
2021-08-17 09:57:55 -07:00
Andy Wickham
13f3ffed95 Adds initial Taskbar Edu implementation.
Currently it just pops up with one placeholder image for splitscreen.
The Next button doesn't do anything.

Screenshots:
Light: https://screenshot.googleplex.com/B27CwBcwobHTghN.png
Dark: https://screenshot.googleplex.com/48EuJZv8evd5RGW.png

Known issues:
 - Back gesture is picked up behind by the app behind the taskbar.
 - When the flag is enabled, the Edu shows up each time you open
   an app, rather than only the first time.

Bug: 180605356
Test: Manual
Change-Id: Ifba9aa59abf1501b5f8ddebb3fcc13df85f6efaa
2021-08-17 09:57:47 -07:00
Tony Wickham
635e180e56 Extend taskbar color to entire screen in overview
Only when taskbar is unstashed in apps:
- Scrim workspace with the taskbar color when opening apps and in BackgroundAppState
- Crop opening apps to above the taskbar
- Crop TaskViews to above the taskbar during gestures

If taskbar is stashed in apps, behavior is the same as before, i.e. no scrim over the wallpaper and no cropping of tasks.

Added a field DeviceProfile#taskbkarPresentInApps to distinguish these cases. LauncherTaskbarUIController and TaskbarStashController ensure this value is set appropriately.

Test: Ensure tasks don't appear behind taskbar when it's unstashed; set ENABLE_SCRIM_FOR_APP_LAUNCH = true to test the whole screen scrimming when opening an app

Bug: 196257194
Fixes: 190681228
Change-Id: I481501457a5a6d49c380feea3db3b4058e4cf3f8
2021-08-16 16:50:52 -07:00
Tracy Zhou
ae0c16dd0c Taskbar should animate immediately when tapping a live tile
Fixes: 194728948
Test: manual
Change-Id: Ia2bf9e4d050367ac08e3308a308f19f04577c49e
2021-08-10 16:30:29 -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
Alex Chau
60cacdf373 Notify System UI about taskbar state
We want to move the rotation suggestion button to the middle
of the taskbar when it is visible and not stashed.
To do this we need to update System UI about the current
state of the taskbar.

Test: manual
Fixes: 187410455
Change-Id: Id918e10a44631362f7c3a8a8bb624ee80bdd3c8b
2021-07-02 10:48:04 +01:00
Tony Wickham
0ac023196d Merge "Initial commit of taskbar stashing" into sc-v2-dev 2021-06-21 15:56:12 +00: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
6e1ce8ccb8 Fixing out of order taskbar callbacks
OnCreate can come before onDestroy for a previous activity which can
cause the callbacks for taskbar to get cleared

Bug: 190170303
Test: Presubmit
Change-Id: I48334605384d4604043a50ffc3d137f84575148a
2021-06-18 12:44:38 -07:00
Sunny Goyal
deec62378c Fixing Taskbar not initialized properly on recreate
Bug: 187353581
Test: Manual
Change-Id: I6e675937a033a4edcb4fa4e8151c210e14e8f896
2021-06-17 15:19:12 -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
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
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
Sunny Goyal
5584513500 Renamin TaskbarContainerView to TaskbarDragLayer
Bug: 187353581
Test: Presubmit
Change-Id: I9164a956aaa896111f287ab4e97b091a7d4d30ee
2021-05-21 14:42:18 -07:00
Sunny Goyal
f8b1c3b38e Revert "Revert "Renaming TaskbarController to LauncherTaskbarUIC..."
Revert submission 14664190

Reason for revert: Errorprone fixed in ag/14667108
Reverted Changes:
Icd1ddd43e:Revert "Renaming TaskbarController to LauncherTask...
I465013697:Revert "Moving taskbar lifecycle to TouchInteracti...

Change-Id: I1dcccb43d8206830e2b7c1974e775c94ac8c542f
Bug: 187353581
2021-05-21 07:05:31 +00:00
Kholoud Mohamed
bb6f6e5dae Revert "Renaming TaskbarController to LauncherTaskbarUIController"
This reverts commit 40a7421619.

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: Icd1ddd43e62d392f6b68b0150a1075f73106391a
2021-05-20 13:31:34 +01:00
Sunny Goyal
40a7421619 Renaming TaskbarController to LauncherTaskbarUIController
Bug: 187353581
Test: N/A
Change-Id: I44aac42c4df134fd7e6fc0c3609fdb3007cf52e3
2021-05-18 11:43:28 -07:00