Commit Graph

81 Commits

Author SHA1 Message Date
Schneider Victor-tulias
f908729fa8 Add the KeyboardQuickSwitchView (1/2)
Preparatory change for adding the KeyboardQuickSwitchView and associated flows.

Test: Manually tested alt-tab and alt-shift-tab in and out of overview on a tablet and phone
Bug: 258854035
Change-Id: I468481a023e82d3ef7c7d4d44c5b9435173b49ae
2023-02-13 15:34:39 -08:00
Brian Isganitis
b21ad2da8c Implement initial transient Taskbar EDU tooltips.
Since this tooltip looks and behaves differently than the existing EDU
sheet, it has its own view and controller implementations (I also may
have wanted to write some Kotlin).

To keep transient taskbar open while on the second EDU step, another
autohide suspend flag is defined. Additionally, special casing is added
to avoid hiding transient taskbar if autohiding is currently suspended.

Tooltips use the same assets as the bottom sheet for now, and are scaled
down to fit the tooltip dimensions.

Reset `Taskbar Education` in Developer Options to try EDU again.

[Demos]
- First: https://screenshot.googleplex.com/ASBeGvrb2EA5wEF.png
- Second: https://screenshot.googleplex.com/7fnfcTh9bMYezDc.png

Test: Manual
Test: Open app, see swipe-up tooltip.
Test: Swipe up to show transient taskbar, see features tooltip.
Bug: 263157739
Fix: 258460203
Change-Id: I473f5fccbae279db0614763b640da0a120b6b7f7
2023-01-20 15:16:12 -08:00
Sunny Goyal
00e3c1ace4 Using AnimatedFloat for maintaing TaskbarInAppDisplayProgress instead of a float array
Bug: 265352919
Test: Verified on device
Change-Id: I603a817c18720d5f18fe0c2be7bdfd8cf2d6defc
2023-01-12 16:02:42 -08:00
Alex Chau
a5c6aad231 LauncherTaskbarUIController should only translate nav buttons on inAppProgresst if icon is aligned with hotseat
Fix: 261364559
Test: Pull notification shade in overview, 3-buttons stay in place
Test: Pull notification shade in home, 3-buttons translated down
Test: Go to -1, 3-buttosn translated down
Test: Go to AllApps, 3-buttons translated down
Test: Go to widget picker, 3-buttons translated down
Change-Id: I53da354266c60e86599011ba3ddd8b44cde70beb
2023-01-03 18:41:21 +00:00
Federico Baron
47d81686e6 Move AnimatedFloat from quickstep to launcher
We are moving AnimatedFloat to launcher to be able to use this in class in launcher. Having it in launcher will allow us to do restore icon treatment animations to do with scaling the icon size

Bug: 254858049
Test: verified that the device still works
Change-Id: I1c4c47ab436c389a94abf7c910c1a44724efc955
2022-12-08 13:58:07 -08:00
Alex Chau
cd76ac24b6 Fade in/out taskbar when launching apps from or back to AllApps/-1
- Added isHotseatIconTopWhenAligned to control both iconAlignment and stash animation to just fade in if hotseat icon isn't on top of the screen in the aligned state

Fix: 257355864
Fix: 213455090
Test: Launch apps from/back to home, taskbar animate from/to hotseat
Test: Launch apps from/back to AllApps/-1, taskbar fade in/out
Test: Repeat aboth with transient or persistent taskbar
Change-Id: I6bdae615ff9e199d23cbfe2d26c8d46a08fbc436
2022-12-01 18:56:30 +00:00
Brian Isganitis
92400681a9 Remove Taskbar EDU icon wave animation.
As per the latest mocks, the taskbar will be stashed during EDU to
prevent taskbar interactions that inadvertently close the EDU sheet.
Thus, this animation is no longer needed.

Test: Manual
Bug: 217261955
Change-Id: I8c5999121b7bb927b748d6163575dc4555ece84c
2022-11-28 15:46:17 +00:00
Jon Miranda
5eba9000df Update transient taskbar transition duration to match spec (417ms).
Bug: 246632728
Bug: 246641848
Test: manual
Change-Id: If3f73774444c6074a81101d91d291ef33edcaf9c
2022-11-14 12:28:20 -08:00
Jeremy Sim
d5525c3bda Merge "Allow user to select second split app from Taskbar" into tm-qpr-dev 2022-11-10 18:56:22 +00:00
Jeremy Sim
93fc0f3a7c Allow user to select second split app from Taskbar
This patch makes it so that (when we enable Taskbar in Overview) users will be able to select their second app for splitscreen by tapping the Taskbar icon, or the icon in AllApps.

This was done by performing a check to SplitSelectStateController when a taskbar icon is hit. If we are currently in split select mode, Taskbar/AllApps icons will no longer launch their respective fullscreen apps, but instead confirm the split attempt. The confirmed app will either be an already-running instance of the app, or a fresh instance of the app (if none is currently running). The split confirmation function is located in TaskbarUIController, where it is accessible to both LauncherTaskbarUIController (for 1P Launcher) and FallbackTaskbarUIController (for 3P launchers).

Also cleans up ~2 lines of unused code from the old splitscreen instructions toast.

Outstanding issues:
- When selecting a second app from within AllApps, the AllApps shade does not animate away in a satisfying way
- When selecting a second app and launching a fresh instance of that app, the animation appears to come from the wrong location
- Intent + Intent splitting does not currently work
- If the selected app is already running with multiple instances, it picks the oldest instance. Ideally, the newest instance is preferred.

Bug: 251747761
Test: Manual testing with Taskbar in Overview flag enabled
Change-Id: I302dc092740bb880f9134ba8e2e587c4f2c29d01
2022-11-08 14:38:05 -08:00
Jon Miranda
caa398ed35 Merge "Have responsive taskbar UI during swipe up gesture." into tm-qpr-dev 2022-11-08 17:53:05 +00:00
Jon Miranda
29f7474056 Have responsive taskbar UI during swipe up gesture.
- Makes taskbar threshold an absolute Y threshold
  instead of a distance threshold.
- Moves handle, taskbar view, and taskbar background
  during the swipe up gesture

Next CL will address transforming the nav handle <-> taskbar
and ensuring that there's a clean handoff

Bug: 246631059
Test: swipe up on taskbar, release. see bounce
      swipe up on taskbar to go home, proper icon alignment
      swipe up on taskbar, pause for overview, see bounce
      -> further movement should not move taskbar
      test launcher3

Change-Id: I141236fd72428cda7edd0ff116de1d478d18c722
2022-11-08 14:50:02 +00:00
Jon Miranda
b0523697c6 Stash taskbar if user touch down above the gesture height.
Bug: 252905206
Test: open taskbar, tap in gesture area, confirm no stash
      open taskbar, tap on taskbar item, confirm no stash
      open taskbar, tap to the side above gesture area, confirm stash

Change-Id: Ide030840440b5f0541d0ccfb055b8a8a7e851657
2022-11-07 10:37:28 -08:00
Sunny Goyal
774dcd06ae Relying on the controller state instead of animator state for
icon alignment

Bug: 246644619
Test: Presubmit
Change-Id: Iaa4ddd94a6d85acb9f8501263665ea78394815de
2022-11-03 13:42:09 -07:00
Jon Miranda
184a04266d Add transient taskbar UI
This change is only for the visual appearance of the
transient taskbar.

Bug: 252905206
Test: manual
Change-Id: I4990b20b39089a0c27ec2a72dd3010cf64ddba1d
2022-10-25 13:46:19 -07:00
TreeHugger Robot
913b5afb43 Merge "Decouple taskbar background from overveiw scrim if taskbar is in overview" into tm-qpr-dev 2022-10-19 17:18:25 +00:00
TreeHugger Robot
c9928a1ddf Merge "Implement overlay window for Taskbar EDU and All Apps." into tm-qpr-dev 2022-10-19 14:01:56 +00:00
Brian Isganitis
2d6371aa34 Implement overlay window for Taskbar EDU and All Apps.
Having EDU in the same window as Taskbar causes it to be above All Apps
and other system views such as the notification tray. This change
refactors the existing All Apps window to accomodate more AFVs so that
EDU can also exist in it.

Demo: http://shortn/_Qcki3gwvf7

Test: Manual
Fix: 232177330
Change-Id: I1bef31d798041a90a0c3e033e71be63898fa5fbc
2022-10-14 22:36:14 +00:00
Alex Chau
47a07bc704 Decouple taskbar background from overveiw scrim if taskbar is in overview
- Removed all forceHideBackground calls if taskbar would be in overview
- Make overview scrim transparent regardless of stash state if taskbar would be in overview

Fix: 234139692
Test: Go to overview from app with ENABLE_TASKBAR_IN_OVERVIEW on/off and taskbar stashed/unstashed
Change-Id: I29e811cb93894e6c9e7a75c0ea493719f15eeccb
2022-10-14 17:45:41 +01:00
Evan Rosky
14145d131a Update taskbar state when launcher pauses
With shell-transit, we need to defer updating state when resumed
(until we commit a transient launch state); however, for pause
this isn't necessary. In fact, now that taskbar exists in overview,
we must update state on-pause since the taskbar is no-longer
already-closed.

Bug: 253473765
Test: atest NexusLauncherTests:com.android.quickstep.TaplTestsQuickstep#testOverview
Change-Id: I347da03a211f5b2685f7b18666b2ebb93a1731ef
2022-10-14 00:11:25 +00:00
Alex Chau
d67ddc4920 Taskbar in overview
- Behind ENABLE_TASKBAR_IN_OVERVIEW which is disabled by defualt
- Make taskbar unstashed in overview with background visible
- Ensure taskbar is touchable in overview

Bug: 245320601
Test: Home<->Overview, Home<->App, App<->Overview, Home->Overview->App->Home, Home->App->Overview->Home, Overview->Home->App->Overview, Overview->App->Home->Overview, App->Overview->Home->App, App->Home->Overview->App
Test: Go to AllApps, call KEYCODE_HOME, go to app and taskbar should be there
Test: App->Overview->Select->Home->App
Test: QuickSwitch -> App
Test: Repeat above with ENABLE_TASKBAR_IN_OVERVIEW x taskbarStashed on/off
Test: Repeat above with gesture and 3-button
Change-Id: Ib25d68f68e89564851b226536e456d0b2f6306f8
2022-10-03 20:15:12 +01:00
Winson Chung
3f649ef892 Update Launcher for removed shared wrappers
- Launcher can reference system code directly now

Bug: 219861883
Test: Builds/Presubmit
Change-Id: I3f656b6c7fce93243ccb7591e52441e99137dec6
Merged-In: I3f656b6c7fce93243ccb7591e52441e99137dec6
2022-09-14 17:14:32 +00:00
Evan Rosky
eaaf065b73 Merge "Only animate to hotseat when launcher is on home screen" into tm-qpr-dev 2022-09-01 21:11:01 +00:00
Evan Rosky
10c1c017c9 Only animate to hotseat when launcher is on home screen
Was assuming that resume == home-screen; however, in shell
transitions, launcher is resumed while overview is active,
so make sure it is both resumed AND "isTaskbarAligned"
before making the to-hotseat animation

Bug: 241800590
Test: Open an app, long-press taskbar to stash, long-press again
      to unstash
Change-Id: I117afcb006c363e50205f27f014ffc30d6f2896a
2022-08-31 22:53:02 +00:00
Tony Wickham
b6f593042d Don't rely on QuickstepLauncher instance for tests
Instead, bind to TouchInteractionService and use that binder to call into taskbar.

Test: TaplTestsTaskbar
Bug: 235986838
Change-Id: I222522bc53c9d1698542fbae52c37889f14abf41
2022-08-29 17:27:27 -07:00
Sunny Goyal
d6801af69a Inlining BaseQuickstepLauncher to QuickstepLauncher
Bug: 243022799
Test: Presubmit
Change-Id: I3706fc1f10d88ea73bd873c7e94c3e78795791eb
2022-08-24 12:51:21 -07:00
Tony Wickham
f3636d09e7 Set FLAG_RESUMED = false when expanding PiP
This allows us to play the icon alignment animation immediately, rather
than waiting for the expand to finish and launcher to be paused.

Test: Open Maps in PiP on home screen, expand it and watch taskbar
Fixes: 239506421
Change-Id: I5c04f778c4c39c2895db0a1ea1fca4d48d1f3093
2022-07-27 08:52:09 -07:00
Alex Chau
c1d26448c5 Animate inline QSB between home and apps
- Added a QSB to taskbar to be animated between inline QSB and taskbar
- Passed endValue of taskbar animator to TaskbarController to have aniamtion variation between home -> app and app -> home
- Tuned duartion of taskbar animation and also stagger animation when taskbar is present
- Disabled scaling down of taskbar and inline QSB for home -> app
- Disabled stagger animation of taskbar and inline QSB for app -> home

Bug: 220733187
Test: manual
Change-Id: I4aac0bbc343b992a0472298595770e2bf2a55990
2022-06-15 22:12:29 +01:00
Schneider Victor-tulias
766f2fc346 Coordinate the SUW All Set page first reveal with the taskbar unstash to hotseat animation.
Bug: 220096988
Test: manual
Change-Id: I1f517b322e5c18f825be8b51ebb560a4a195b666
2022-05-13 11:17:10 -07:00
Schneider Victor-tulias
9b6babf839 Translate the 3 navigation buttons to/from their in-app position when animating to/from the -1 screen, all apps and widgets.
Bug: 221455508
Test: opened all apps, widgets, -1 screen, notifications shade and keyboard in various combinations and orders; locked screen, launched app, returned home with the back/home buttons, opened overview
Change-Id: Ia0b406aacf72b34bd6b7ff1c01278ab6895a7da4
Merged-In: Ia0b406aacf72b34bd6b7ff1c01278ab6895a7da4
(cherry picked from commit 9c1a452a1d)
2022-05-02 18:45:01 +00:00
Schneider Victor-tulias
c0b30dc266 Fix taskbar 3-button truncation on rotate
- Fixed truncation issue in overview and home on rotation
- Fixed 3 buttons translating incorrectly when switching to/from overview

Fixes: 205057824
Fixes: 215482458
Test: Manual
Change-Id: I0b89010a2b6ed03a34c3443fc6e1edc81f8d9f20
Merged-In: I0b89010a2b6ed03a34c3443fc6e1edc81f8d9f20
(cherry picked from commit 8aa99c72b1)
2022-05-02 18:12:00 +00:00
Schneider Victor-tulias
fb252e7ce1 Add taskbar TAPL tests
- 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
2022-03-10 13:02:35 -08:00
Brian Isganitis
56b179350b Immediately close taskbar all apps on swipe up gesture.
Test: Manual
Fix: 219981339
Change-Id: I306a8aa1c55464718a1318f87007d68c383e461e
2022-03-04 19:56:06 -08:00
Vinit Nayak
58c27cce73 Remove Taskbar and Taskbar EDU flags.
Bug: 219035565
Change-Id: I643b5d006b5759723418901ffeb463fa04a82cbc
(cherry picked from commit ec4adc1d5a)
2022-02-23 18:14:28 +00:00
tomnatan
9f12373bdd [11/n] Letterbox Education: set LAUNCHER_TASKBAR_EDUCATION_SHOWING.
The setting is set to 1 if the taskbar education should be shown as soon as the animation for opening an app starts and is set back to 0 when the taskbar education window is detached from the window.

Bug: 214590804
Test: N/A
Change-Id: Id26e3051a6e0ef1f9c2dcbeef98710efbb4df54f
2022-02-11 10:28:51 +00:00
Brian Isganitis
4edf1da6e2 Introduce initial A-Z app drawer to taskbar.
Invoking the drawer is currently hooked up to tapping empty space on the
taskbar. Apps can be launched, and drag-n-drop split screen works. The
drawer can only be dismissed by acting on an app icon or tapping the
taskbar again.

Test: Manual
Bug: 204696617
Change-Id: I7c5fdbc7d54d8209f6f15ef80bfeb5e9b80cf647
2022-01-28 15:20:00 -05:00
Tracy Zhou
bec00acf28 Delay showing task bar until the user releases their finger dragging from all apps to normal
Fixes: 208802276
Test: drag from all apps to normal, and the task bar doesn't stash until the user releases their finger
Change-Id: I53133cc80749bdc62e77d858b5714ae32facbd1d
2021-12-15 06:35:41 +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
f6c28a4381 Fix potential memory leak by setting mControllers = null
Test: N/A
Bug: 202511986
Change-Id: Iad7cc89e0e68ce09ebe4ca3ab89392b50b6a82c7
2021-11-30 14:37:36 -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
Tracy Zhou
e89a83b65d Track LauncherState, RecentsAnimation, resumed state for task bar in one place
TODO:
- Consider delaying animating task bar to stashed towards all apps state until user releasing their finger (tho in this change heuristic is applied for stashing and unstashing respectively)
- Further consolidate some animation logic

Bug: 204220602
Test: manual

Change-Id: I58b4d035fcf65a9f5c68e69c129eae95b89b1c4a
2021-11-09 23:46:03 -08:00
Jerry Chang
331f46fab3 Accept snapshot list when cancelling recents animation
Bug: 200813008
Test: enter overview after activated split screen, observed task
      thumbnails showing with correct bounds after roation.
Change-Id: Ifea17d2c685d16db111c4fab88e131595254b9a5
2021-11-08 09:55:43 +08: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
Pablo Gamito
77d3cab287 Set custom task transition spec when taskbar is visible
This is to ensure that the task to task animations look good when the
taskbar is visible (the transition background is the same as the taskbar
color, the taskbar overlay rounded corners are hidden, and the task
animates above the taskbar so it's rounded corners are visible during
the animation and not hidden behind the taskbar).

Test: Open tasks from other tasks to trigger task to task animations and
see if they look good
Bug: 200675009
Bug: 196387647

Change-Id: I8e46718829c0e6541a5c1b1a3a156285aeecd30a
2021-10-26 14:56:27 +02: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
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
e202a64e56 Merge "Fix taskbar layout issues in setup wizard" into sc-v2-dev 2021-10-18 16:01:38 +00: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
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