Some missing state handling was causing the taskbar to show in the all set page of the SUW.
Fixes: 218507703
Test: build change, flashed and factory reset device
Change-Id: If3a280ef6416f0821cf6a9b1ab0a65d58c5c8221
- Added TAPL objects to support TAPL tests for taskbar features
- Added tests for major taskbar features: hiding/showing the taskbar, opening all apps, lauching apps and app deep shortcuts from the taskbar/all apps page, launching apps and app deep shortcuts in splitscreen
- These tests should only run for large devices
Design: go/taskbar-tapl-tests
Test: ran tests locally with invalid configurations and remotely
Bug: 215218813
Change-Id: I3c28c339707467414aa47fa633f87fa0c1fdee57
Technically mControllers.stashedHandleViewController.isStashedHandleVisible() is false on the home screen (since we unstash), so now we also check isInApp(). This ensures that we always return the same insets when on the home screen - and the insets we report are the same as when you launch an app, to ensure seamless transitions. The value itself shouldn't matter to launcher as long as it is static, since launcher overrides the insets due to taskbar anyway, but we need to keep the value static to avoid configuration change.
Test: Open a website in Chrome, stash taskbar, then launch Chrome from home screen and ensure content doesn't jump during the transition
Fixes: 221238308
Change-Id: I81e320b3a8d32ffe78441be5dd8f15a586d3b842
- We keep the app setup flag set, but adjust the insets to
inset SUW itself in portrait
Bug: 219879035
Test: With both 3button and gesture nav, verify that portrait
mode SUW is always inset
Change-Id: Iad0b6c41feaa3fb169af75c071b7f9544b42bab7
- Don't report insets change to underlying app when stashing taskbar during all apps transition
- Internally override all apps insets to take stashing into account
- Don't offset all apps window by display cutouts, as we handle them internally via padding internally
- Also Fix bug where "stashing" taskbar in 3 button mode (which just fades out taskbar icons but keeps nav buttons) was reporting smaller insets to apps
Test: 1) open all apps in Calculator, ensure Calculator doesn't adjust insets and all apps has bottom content padding but no nav scrim
2) in 3 button mode, scroll to bottom of all apps and can read last row icon labels
3) enable display cutout in developer options, ensure no change to tests 1 and 2, and all apps scrim fills the screen (including behind cutout)
Fixes: 219980805
Change-Id: Ic3c6a744bc675e4ea277d22c4c0b3b353eddd905
This is a no-op since they are the same value (by design), but using the constant directly will prevent potential divergences in the future.
Test: none
Bug: 191269755
Change-Id: I81b98045466398b7a49de872694004e526adf048
All apps should display below system UI components such as the
notification tray and power menu, so an overlay window is more
appropriate. As a result, all apps has a separate window activity
context, but some properties are delegated to the taskbar activity
context. Taskbar should also be stashed while all apps is open.
Change-Id: I593457708779d84a0ab8b949a966d247d0a2e1b7
Test: Manual
Bug: 216843189
Fix: 217383817
(cherry picked from commit 473b980bf9)
Test: Long press to unstash while in an app still works and shows feedforward; long pressing handle while in overview, all apps, or when IME is showing doesn't show anything.
Fixes: 218902248
Change-Id: I2c96570cab018c0e63c446793b84b210964bdb94
- With flexible inset changes in T, taskbar is no longer inseted in getCurrentSizeRange, i.e. DeviceProfile.availableHeight no longer inset nav bar size
- In order for home screen sizes to be calcualted correctly, avoid inseting nav bar in LauncherRootView
- Only apply a bottom padding with stashed taskbar size to necessarily surfaces (Overview)
- Home screen icon overlap will be fixed in separate CL
Bug: 215528237
Test: maual in tablet gesture nav and 3 buttons
Change-Id: I9bc796ba059159e819f8cd121ddabab96c8113d2
This reverts commit 361f82b237.
Reason for revert: Latest SUW update ensures AOSP layout is same as Pixel
Bug: 204384193
Change-Id: I4eaa8e6045232c2897d97e49d532939c838dbce0
- 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
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
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
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
- 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
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
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
> 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
- 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
- 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
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
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
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
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
- 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
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
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
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
- 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