Commit Graph

34 Commits

Author SHA1 Message Date
Winson Chung
41e2824bfa Revert "Temporarily disable SUW specific insets logic"
This reverts commit 361f82b237.

Reason for revert: Latest SUW update ensures AOSP layout is same as Pixel

Bug: 204384193
Change-Id: I4eaa8e6045232c2897d97e49d532939c838dbce0
2022-01-27 17:21:48 +00:00
Schneider Victor-tulias
fa0bfee97a Add log dumps for taskbar state
Test: created bugreport and checked logs
Bug: -
Change-Id: Ic0c2330b18c8daf181ae5b236e0c4b212d630fa3
2022-01-20 14:41:25 -08:00
Winson Chung
33f1d348ab Temporarily disable SUW specific insets logic am: 361f82b237 am: 3b22691fe2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16492581

Change-Id: I797fca3adbe2fdd95b0a59607f97b4d5273f1c37
2021-12-16 22:57:14 +00:00
Winson Chung
361f82b237 Temporarily disable SUW specific insets logic
Bug: 204384193
Test: Check that SUW is inset

Change-Id: Id00f10f51b52ef8ec375f650fd44bb2c6eb31e09
2021-12-16 18:45:25 +00:00
TreeHugger Robot
3611e9d656 Merge "Ensure some taskbar states are initialized correctly" into sc-v2-dev am: 9b3b2b9c7e am: 4ab25b564e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16463952

Change-Id: I7bcf495a8774df2ac99dd6b9cf3c65f6d5f46461
2021-12-14 23:26:08 +00:00
Winson Chung
7f5e4ca06c Ensure some taskbar states are initialized correctly
- Update FLAG_IN_APP to account for setup state to ensure that the
  stashed state is correct. This needs to be done in the stash
  controller since SUW is the home activity on startup and the
  launcher state controller will not be initialized until after
  SUW finishes
- Initialize the launcher state and resumed flags in case Launcher
  restarts while another app is resumed

Bug: 204384193
Test: Run through SUW, ensure the background is not visible
Change-Id: I5ce061ad16e79226c8428339ccd0b5ac55c07205
2021-12-14 19:08:55 +00:00
Shawn Lin
39ada8ad58 Merge "Notify system to report the rounded corners that task bar draws" 2021-12-13 08:26:01 +00:00
shawnlin
beae64cd95 Notify system to report the rounded corners that task bar draws
Task bar draws fake rouned corner above itself and it should notify
system to report that fake ones to apps.

Bug: 196387239
Test: make

Change-Id: I1d9732de71fbe653ed56e468e211b1bfb4dd2b37
2021-12-13 13:33:59 +08:00
Tony Wickham
c7b8957bbb Report contentInsets only based on what they will be inside apps
This avoids changing them when going from an app to launcher (most obvious when going to overview).

This also allows us to not change insets on apps when opening/closing IME, which reduces potential jumpiness.

Finally, also use this logic for 3P launchers by calling directly from TaskbarDragLayerController instead of TaskbarUIController (which was only overridden by LauncherTaskbarUIController). This fixes some bad issues like sending fullscreen insets when opening a folder from taskbar.

Test: Open Calculator, unstash taskbar, go to overview and ensure no jump as taskbar stashes.
Fixes: 200805319
Change-Id: I4f1cc187398d0051863ff44ea90b7ab9c6aaa8f9
2021-12-10 23:47:18 +00:00
Tony Wickham
f1951ce1f7 Fix taskbar stash misalignment when going from app to overview
Keep taskbar unaligned with hotseat if we're stashing anyway

Test: Swipe up from app with taskbar present to overview, check frame by frame to ensure icons morph directly into the handle instead of above it
Fixes: 208697792
Change-Id: If3238286b3383e75eb71fbd3b97d34bb3b44340b
2021-12-06 15:15:34 -08:00
Tony Wickham
821e37b447 Stash taskbar when IME is present, including during gestures
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well.
- Delay the unstash when IME is closing, to align with the end of the IME exit transition
- Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons
- Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two).

Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed
Bug: 202511986
Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
2021-11-23 16:37:06 -08:00
Winson Chung
c2a84d887f Clear ref after animation if visual stashing not supported
Bug: 206814323
Test: Presubmit
Change-Id: Ia38bd2707edbddf1b1f2ad98b3cdac4c8c62a6d3
2021-11-19 23:52:18 +00: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
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
Tracy Zhou
fc0b21596f Merge "Track LauncherState for task bar stashing better" into sc-v2-dev 2021-10-19 07:06:14 +00: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
Tracy Zhou
ae88197e5f Track LauncherState for task bar stashing better
- Animate in onStateTransitionStart
- Commit in onStateTransitionComplete

Fixes: 193938970
Fixes: 200765631
Fixes: 201644899
Test: Go home from overview; Go to all apps from home; Go to overview from home
Change-Id: I393022c86f09806fea29fb5bc7191304b473f231
2021-10-18 10:51:51 -07: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
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
1bd4bf7ff1 When taskbar would be stashed in 3 button mode, hide icons instead
In 0 button mode, stashing morphs the icons into the home handle. In 3 button mode, that doesn't make sense, but we should still hide the icons (and just keep the 3 nav buttons). You still can't manually stash via long press in 3 button mode, but this will address other states where we automatically stash the taskbar when we want to hide the icons from users (e.g. when pinning an app).

Test: Pin an app from overview in 3 button mode, ensure the taskbar icons disappear until unpinning
Bug: 190192993
Change-Id: I499c59bd9d7871ff64696b67065cf9d4863222a5
2021-10-07 23:29:41 -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
Tony Wickham
772732de9e Migrate mStashedInApp to FLAGS_STASHED_IN_APP
This is to prepare for different flags that could cause taskbar to be stashed in an app without the user explicitly long pressing to stash.

Test: run wwdebug and wwlogcat, ensure still get logs for long press stash events; other interactions like clipping tasks to above unstashed taskbar still work as before
Bug: 190192993
Bug: 193937948
Change-Id: I90846e650a438e03bdcfdf9c4bf919e19cc5abb3
2021-10-07 23:29:34 -07:00
Tony Wickham
25b6d9783f Allow visual stashing when going to overview in tests
- Seprate out supportsStashing() into supportsVisualStashing() and supportsManualStashing().
- Manual stashing is when user explicitly long presses to stash, which we disable for tests.

Test: testStressSwipeToOverview
Fixes: 200273854
Change-Id: Ib07efa31a1b073de45fdcfac26215129b1b1985b
2021-09-22 13:58:10 -07:00
Tracy Zhou
308851d866 Stash the bar after settling in Overview
Test: https://recall.googleplex.com/projects/81822932-8526-4ee7-b5f7-4ef6d6603f1d/sessions/f0f7a3db-76b6-4f60-87e8-8918bd6cf180
Bug: 193938970
Change-Id: Ic08d3156f5c78a34f353783b760d5cf098e442e8
2021-09-16 00:06:47 -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
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
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
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
Tony Wickham
5eb1045cee Merge "Add taskbar stashing feedforward, i.e. hint at upcoming stash/unstash" into sc-v2-dev 2021-07-20 02:44:28 +00: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
Tony Wickham
9c84d7f3c3 Don't allow stashing in tests for now
Test: TaplTestsQuickstep#testOverviewActions (arbirarily)
Bug: 193521974
Change-Id: Ic2c5c5f9f37ed3f035ec932b4c96fb51598cf899
2021-07-16 12:27:40 -10: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
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