Commit Graph

41 Commits

Author SHA1 Message Date
Sam Dubey
5c8ba15b1c Merge "Revert "Sync hotseat/taskbar handoff"" into tm-dev 2022-03-09 10:58:03 +00:00
Nick Chameyev
41b7f53805 Merge "Do not run unfold taskbar animation when in portrait" into tm-dev 2022-03-09 10:26:21 +00:00
Sam Dubey
8d55819f6e Revert "Sync hotseat/taskbar handoff"
This reverts commit 4937d79c03.

Reason for revert: Breaking launcher tests on cf foldable and tablet targets
Bug: 223485229

Change-Id: I7a54982967426c4da9eb62ba100226102be6549e
2022-03-09 07:53:39 +00:00
Jon Miranda
4937d79c03 Sync hotseat/taskbar handoff
Bug: 202507555
Test: open/close apps in hotseat/taskbar
Change-Id: Ia5ecff8438f0cf237b39a54b7a78c423c53f9023
2022-03-08 08:22:31 -08:00
Nick Chameyev
fe9ec740cc Do not run unfold taskbar animation when in portrait
Limits taskbar icons translation animation
only when the display is in natural orientation.

Bug: 219958588
Test: fold/unfold in portrait and landscape
Change-Id: I33e26829ae37f1df39e8c7234f98d20eb7993b93
2022-03-08 12:03:32 +00:00
Tony Wickham
a56a197e14 Properly animate canceled deep shortcut drag back to original icon
- Added getFirstMatch() instead of using mapOverItems() (was a bit cleaner using ItemInfoMatcher)
- Match based on package name / UserHandle for deep shortcuts case

Test: drag deep shortcut from taskbar icon, inside folder, inside all apps; drag regular icons as well
Fixes: 222574524
Change-Id: Id5fdee29110f143c1125edc6945af09ab0a8d8ce
2022-03-04 00:39:38 +00:00
Brian Isganitis
a1370bfc5f Put taskbar all apps in separate overlay window and stash taskbar.
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)
2022-02-23 15:06:56 +00:00
TreeHugger Robot
bf96683e46 Merge "Fix taskbar hotseat alignment" 2022-02-14 13:03:46 +00:00
Tony Wickham
9b2b607a09 Fix taskbar hotseat alignment
- Use hotseatBorderSpace instead of cellLayoutBorderSpace
- Also divide by 2f instead of 2 because AS was complaining. May or may not potentially address off by 1 pixel issues.

Test: locally set alignment = 1, ensure perfectly aligned
Fixes: 218880076
Change-Id: Ifec30e6727f62985427b65b6c0b0810e7f7cd695
2022-02-12 19:23:23 +00:00
Winson Chung
6992855742 Merge "Add basic return animation when drag is canceled" 2022-02-09 19:32:22 +00:00
Winson Chung
d937831791 Add basic return animation when drag is canceled
Bug: 179390870
Test: Drag, but don't drop to split an app from the taskbar and
      check that Launcher animates the surface back into place
Change-Id: I726855ff5bdffd1fc58d2839b3cc44b3fdb131e9
2022-02-09 06:44:21 +00:00
Jon Miranda
daa3150b9c Move All Apps button to the left in RTL.
Bug: 205803230
Test: verify LTR
      force RTL using developer option
      verify All Apps button is in the left
      verify All Apps button moves left before fading out

Change-Id: I2a5be9b37f471bfaa1a92f6819e04274e4dfb7a1
2022-02-07 14:08:47 -08:00
Jon Miranda
fd48b0c988 Add All Apps entry button to Taskbar.
- Opens All Apps when clicked
- Fades button in/out when transitioning b/w Hotseat & Taskbar

Bug: 205803230
Test: manual
      ensures alpha gets reset properly
      clicking button opens all apps
Change-Id: I1b96bae734aa9fd9308931d6312e3d65559d4284
2022-01-31 17:22:58 -08: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
Brian Isganitis
19ab3a5582 Include border spacing to align tasbar icons with hotseat.
The original calculation was including spacing in the the
hotseatCellSize, but that causes us to incorrectly compute the
hotseatIconCenter. If we take advantage of
DeviceProfile.calculateCellWidth, we get the width without the spacing.
Then we can add spacing for every icon to the left of the current one
when figuring out the center.

Test: Manual on tablet using device types tablet and multi display.
Fix: 210123477
Change-Id: Ie182718ad3a229ffa8bae031f3ac7f73f8539f49
2021-12-15 01:15:30 +00:00
Tony Wickham
a930bca528 Merge "Stash taskbar when IME is present, including during gestures" into sc-v2-dev am: b4aefc1277 am: cc6b8488bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16325264

Change-Id: I7c71ae9aa8c949907286c31a2e6c75871e599ec7
2021-11-24 18:27:32 +00: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
Schneider Victor-tulias
5173fd8090 Add notification dots and popup menu notification support to the taskbar.
- Added support for notification dots
- Added support for notifications in popup menu
- Added support for dismissing notifications from the popup menu

Bug: 198438631
Test: long pressed launcher and taskbar icons, clicked notifications, clicked shortcuts
Change-Id: I7c981e60a82b4d6ce28332d804bbbfb5eb89c6a8
2021-11-15 14:47:36 -08: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
Tony Wickham
add188f339 Merge "Hide taskbar background when notification shade is expanded" into sc-v2-dev 2021-10-26 02:56:47 +00: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
Tony Wickham
8791e7de11 Add FallbackTaskbarUIController
- Refactor TaskbarManager to accept StatefulActivity instead of BaseQuickstepLauncher
- Update the new StatefulActivity in onOverviewTargetChange()
- Cleanup LauncherTaskbarUIController a bit to avoid initializing TaskbarActivityContext, TaskbarDragLayer, and TaskbarViewController in the constructor, and instead get these from mControllers after init()

Test: No change in behavior
Bug: 188790554
Change-Id: Ic4d69d73deb6dada416876eb265db57803c3adfd
2021-10-21 10:53:46 -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
Vinit Nayak
74b25ca266 Align 3 button nav with hotseat
* Animate translationY alongside icons
* When device rotates on home, update
translationY
* Add padding to contextual buttons to center
it

Bug: 189807374
Change-Id: I149ef25df570fb1fd385f1da960c827105ff975d
2021-10-14 18:32:35 -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
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
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