Commit Graph

69 Commits

Author SHA1 Message Date
Tony Wickham
1a2d581cf0 Only inset IME by 48dp instead of 60dp when taskbar is present
- Update providedInternalImeInsets whenever taskbar height changes, since the insets are subtracted from the taskbar window height. This ensures the IME always has the same bottom inset (48dp) regardless of taskbar's window size
- Also translate nav buttons down to center in the new size when IME is showing

Test: Open IME from home and in apps, both in gesture nav and 3 button mode. Ensure IME bottom inset is always 48dp and nav buttons center within that space
Fixes: 201115344
Change-Id: I5ed25b0ffc08145b2221cc5c960e669cc21b2aa7
2021-12-09 22:17:21 +00:00
Vinit Nayak
570653346f Add task unpinning support for 3 button taskbar
Bug: 199544447
Test: Tested on small and large screen
Change-Id: Ib7785992ef11825cd07a929e2cb623d02ef246f1
2021-11-30 17:18:09 -08:00
TreeHugger Robot
ed05712f04 Merge "Handle configuration changes in floating rotation button" into sc-v2-dev 2021-11-29 19:41:26 +00:00
Nick Chameyev
71eed5ca35 Handle configuration changes in floating rotation button
Update resources in floating rotation button
when configurations such as screen density, screen size,
current locale have changed.

Bug: 200103245
Test: change display size, locale, fold/unfold
 -> check that floating rotation button resources
    are updated
Change-Id: Ia69f4f8b393a686012e286a1e39822650c562d52
2021-11-26 11:38:28 +00:00
Winson Chung
c1afaa4042 Merge "Removing logs" into sc-v2-dev 2021-11-23 21:58:14 +00:00
Tony Wickham
9ceae57095 Add support for dark tint on taskbar nav buttons
Tint the buttons when taskbar isn't drawing a background (either due to alpha or offset).

Test: Dark icons on a light wallpaper on home screen, dark icons when light IME is showing
Bug: 204256643
Change-Id: Iae634a1b604f50edc102905abd0d812a43c5346e
2021-11-17 16:28:21 -08:00
Winson Chung
21d129de28 Removing logs
Bug: 201305599
Test: Builds
Change-Id: Ic480136ee6b158dc614d43beaed1dfce91b9ca8a
2021-11-12 17:18:11 +00:00
ryanlwlin
1ee6bd7bb6 Fix the cutout of magnification border
If the window is unmagnifiable, it might cause the cutout of
magnification region.
To fix it, we set the flag when the touchable region is not the
entier window frame.

To fix NexusLauncherTests, we add a flag to avoid updateViewLayout
too frequently that would impact memory test and have the performance
issue.

Bug: 196510717
Test: manual test on gestural and 3-button navigation
      presumbit test pass
      run atest NexusLauncherTests with foldables
Change-Id: Ifef81640fe6c08ee1b0dcd3915227fba3002ea43
Merged-In: Ifef81640fe6c08ee1b0dcd3915227fba3002ea43
(cherry picked from commit c8d588cff6)
2021-11-10 09:51:54 +00:00
Schneider Victor-tulias
2bfbf3bffa Add popup menu and click handling to taskbar.
- Added popup menu support to taskbar icons
- Added item click handling for taskbar icon popup menu items

Bug: 198438631
Test: long pressed taskbar icons, pressed popup menu items, dragged taskbar icons to start multi-window mode
Change-Id: Ibc59c1eada50a877a863c075fbfd3e4accaae008
2021-11-05 13:07:09 -07:00
Winson Chung
cc4a1925a6 Remove debug tracing checks to get logs beteween tests
Bug: 201305599
Test: Presubmit
Change-Id: Iab4430f88a2cac97a056486edd97895bc30a03b1
2021-11-05 09:45:13 -07:00
Winson Chung
067faf3bbe Add some logging for taskbar recreation
Bug: 201305599
Test: Manual
Change-Id: I437fe3226657ebe7b5507146fbe5e7f32e2e2fce
2021-11-03 11:17:44 -07:00
Nick Chameyev
0288d2e8bb Move floating rotation button handling to Launcher
Moves handling of floating rotation button when navigation
bar is not created to the launcher. This button was not
showing when taskbar is visible as it was initialized in
navigation bar (which is not created for large screens).

Bug: 200103245
Test: rotate phone when autorotate disabled on inner screen
Test: showing rotate suggestion when gesture nav enabled/disabled
Change-Id: I13dd555bcd811f1524be7ab9ad51b2b012b3b749
2021-11-01 10:36:34 +00:00
Tony Wickham
5a5a926945 Recreate taskbar when dark mode changes
Also dispatch sysui flags to all controllers upon recreate, not just NavbarButtonsViewController. Additionally, tell the controllers to skip the animation due to the flag changes if it's fromInit.

Test: Enable themed icons, switch dark theme in quick settings, ensure taskbar updates
Fixes: 204403933
Change-Id: Ic43a50cf0456175f9beba5c29360440f051cbd2d
2021-10-28 17:49:03 -07:00
TreeHugger Robot
da86c0e64d Merge "Update taskbar drag and drop treatment" into sc-v2-dev 2021-10-28 20:54:09 +00:00
Tony Wickham
89ef745d1c Update taskbar drag and drop treatment
- Disable the FastBitmapDrawable icon instead of setting it to invisible
- Suspend auto hide during drag and drop (moved to new TaskbarAutoHideSuspendController)

Test: Drag and drop from taskbar and ensure the original icon stays in place but desaturated
Test: Open immersive app, drag and drop from taskbar and ensure taskbar doesn't hide before drop
Fixes: 200816442
Change-Id: I4b895efd043be75e7e7034bd75e751ffdd2cfdd7
2021-10-28 11:43:49 -07:00
Tony Wickham
232e9a4631 Hide taskbar background when notification shade is expanded
- In 3 button mode, don't hide the background but do ensure nav buttons are translated down when swiping to notificaitons from the home screen

Test: swipe down notifications, background hides in 0 button mode but not in 3 button mode
Fixes: 199163951
Change-Id: Ic70adc7d67b2ab7c92a2d5d846b9b259d1bd7bfc
2021-10-25 13:44:09 -07:00
Nick Chameyev
8523412470 Merge "Do not animate statusbar unfold when in portrait orientation" into sc-v2-dev 2021-10-21 10:02:00 +00:00
Sunny Goyal
2a528a43c1 Delaying taskbar loading until user setup completed
> Also keeping it stashed while all-set activity is visible
> Creating a shared state (simiar to saved instance state) for taskbar
> Keeping taskbar stashed while all-set activity is visible

Bug: 194786060
Bug: 201782272
Test: Manual
Change-Id: Iab5e082243a206772266aece62d3028f5acb6400
2021-10-19 12:38:02 -07:00
Mady Mellor
20c05fbd4c Merge "Add a scrim to taskbar for bubbles expanded state" into sc-v2-dev 2021-10-18 19:35:05 +00:00
Nick Chameyev
ae818dfe42 Do not animate statusbar unfold when in portrait orientation
Disables unfold animation for statusbar when it is
perpendicular to the screen fold.
Moves ScopedUnfoldTransitionProgressProvider from launcher
to shared SysUI/Launcher code

Bug: 201518277
Test: manual
Test: atest com.android.systemui.unfold.util.NaturalRotationUnfoldProgressProviderTest
Change-Id: I1417ee89b132b541d5a3ed0e5ddcbc56d827da96
2021-10-15 14:06:42 +01:00
Tony Wickham
bb6e278f14 Fix taskbar layout issues in setup wizard
- Align nav buttons (only back is enabled) to start instead of end
- Don't animate from init()
- Provide 0 contentInsets.bottom
  - Auto-stash the taskbar during setup
  - Hide the stashed handle by adding an alpha channel for home disabled
  - Report 0 contentInsets when stashed if the handle isn't visible
- Tint nav buttons according to theme

Test: adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity
Bug: 194786060
Change-Id: I4a40501e8aad2a38ec00398efe9ea3dbfa7428cd
2021-10-14 21:50:03 -07:00
Vinit Nayak
22762d91cd Merge "Suspend auto-hiding taskbar when folder is open" into sc-v2-dev 2021-10-14 19:11:53 +00:00
Mady Mellor
5fdf2d08fc Add a scrim to taskbar for bubbles expanded state
When bubbles are expanded a scrim is shown on top of
everything. Taskbar is layered above bubbles but we still
need the scrim to show on top of it. This CL adds the
ability to show a scrim on taskbar.

The scrim is a view in the taskbar drag layer and is
placed between the taskbar and the nav buttons so that
it can block touches / scrim the taskbar but still allow
the nav buttons to be visible and touchable.

Add interpolators for alpha matching what bubbles is using.

Test: manual 1 - expand bubbles while taskbar is visible
                 => observe scrim
               - open manage menu
                 => observe darker scrim
             2 - check that taps on scrim collapse manage
                 menu or stack
             3 - check there isn't a scrim while taskbar is
                 stashed and bubbles / manage menu are open
             4 - check that three button nav works while
                 bubbles are expanded
Bug: 197139718
Change-Id: I94c4ecd07f81b2bad55c38525d60f493d3c1f9d8
2021-10-08 14:55:43 -07:00
Tony Wickham
db0c2f1b79 Add flags to stash taskbar for app pinning and empty hotseat
Test: pin an app from overview, watch taskbar stash automatically until unpinning
Test: turn off suggestions for hotseat, remove all items and watch taskbar stash automatically when opening an app
Fixes: 190192993
Fixes: 193937948
Change-Id: Ia7260c60a820af1a48c9e4a400a52753baf34d41
2021-10-07 23:29:41 -07:00
Vinit Nayak
2a77ff74bd Suspend auto-hiding taskbar when folder is open
* Notify SystemUi to suspend autoHide behavior
until launcher notifies otherwise
* There's no exclusive lock for AutoHideController
behavior, so down the road another component can
choose to resume auto-hide behavior even if launcher
has requested otherwise (and vice versa),
something to keep in mind.

Fixes: 193938507
Test: Opened folder while in immersive video,
taskbar stayed open.

Change-Id: I12f4055911822893551683466cfd532c8108a3a0
2021-10-07 13:46:26 -07:00
Tracy Zhou
3d458313de Hide task bar icons when notification shade is expanded
Fixes: 199163951
Test: manual
Change-Id: Id2556aa5f08db55059c95d8c13cdc4d46b7d8c55
2021-09-17 12:11:25 -07:00
Tony Wickham
2908eb70fc Merge changes from topics "TaskbarLogging", "taskbar-log" into sc-v2-dev
* changes:
  Add logs for taskbar and overview split action
  Add TaskBarContainer to launcher_atom.proto
2021-09-15 16:28:45 +00:00
Tony Wickham
ed16fb4739 Don't move taskbar window when it resizes
Test: enter split screen, open folder or drag an app icon and ensure the
taskbar doesn't jump briefly to the top of the screen
Fixes: 199386357

Change-Id: I9a4787931a764db0bc036725a58984823a8d5467
2021-09-14 15:31:26 -07:00
Tony Wickham
2a10e62e92 Add logs for taskbar and overview split action
Log:
- Taskbar app launch (also from foldeR)
- Taskbar app drag (also from folder)
- Taskbar folder open
- Long press to hide taskbar
- Long press to show taskbar
- Overview Split screen action

Also add support for ActivityContext to overwrite/add to LauncherAtom.ItemInfo, which TaskbarActivityContext does to change HotseatContainer and PredictedHotseatContainer to TaskBarContainer

Test: enable logcat locally
Bug: 193009817
Change-Id: Ia82c846a727fecb8cbfd0a069c8af1276083bf83
2021-09-13 17:25:15 -07:00
Winson Chung
507e976690 Merge "Provide internal IME insets" into sc-v2-dev 2021-09-03 23:46:16 +00:00
TreeHugger Robot
eb5f5f7807 Merge "Disable FolderNameEditText on Taskbar" into sc-v2-dev 2021-09-03 23:00:33 +00:00
Tony Wickham
d345751849 Disable FolderNameEditText on Taskbar
Test: Can rename folder on home screen, but tapping folder name in taskbar does nothing
Bug: 180051157
Change-Id: Ief19805683f754995baf24d7f41f3979841d5bd3
2021-09-03 12:50:15 -07:00
Winson Chung
543c226ffa Provide internal IME insets
Bug: 197727397
Test: Collapse taskbar, open IME
Change-Id: Ia251be1d5892a58b062f241bdafc5dbfc223e4c3
2021-09-03 10:22:56 -07:00
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
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
Vinit Nayak
f8d55e0e2a Merge "Respect StatusBarManager back/home disable flags" into sc-v2-dev 2021-08-18 20:54:09 +00:00
Bryce Lee
6e2d149ac7 Merge "Revert "Draw rounded corners above the taskbar"" into sc-v2-dev 2021-08-18 20:51:05 +00: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
Tracy Zhou
d571905aa6 Merge "Tint task bar based on sampling of colors in the area" into sc-v2-dev 2021-08-18 18:32:35 +00:00
Vinit Nayak
54dccc2465 Respect StatusBarManager back/home disable flags
* Also use the same signals provided by SysUi flags
instead of directly from the disable API just for
consistency. (Disable2 flags still need to be migrated
over, so we're keeping the API for now).

Bug: 194870114
Test: Locking screen w/ 3 button nav
w/ various keyguards

Change-Id: I858ea36876061cddf0debbd43e8fcfe1d5712839
2021-08-18 07:44:50 -07:00
Tracy Zhou
334cae420e Tint task bar based on sampling of colors in the area
TODO: Add transition animation

Bug: 193938970
Test: manual
Change-Id: I0ffb94e0f11d47685a268ee8d057b6997f3a2ff6
2021-08-17 23:26:28 -07: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
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
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
Vinit Nayak
ef360b72b8 Show back and IME switcher for gesture nav (1/2)
This shows back and IME switcher when in app taskbar
and IME is visible.
This doesn't remove the system bar just yet (will
show overlap). Next CL will remove the system IME buttons
so only launcher IME buttons show.

Bug: 191612881
Test: Used IME in gesture + 3 button with taskbar.
Change-Id: If39382c4d01f26a9350f7460d9e769ca9b57828c
2021-06-24 21:12:21 -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
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