Commit Graph

59 Commits

Author SHA1 Message Date
Liran Binyamin
fad57132d3 Dump some bubble data to dumpsys
Flag: NONE added dump logs
Bug: 350753857
Test: manual
       - adb shell dumpsys activity service com.android.quickstep
Change-Id: I19d328f99e5ba887aa508ea9ab16e9778f13698b
2024-07-09 10:34:19 -04:00
Tony Wickham
a2b510dc23 Move Desktop running apps support into TaskbarRecentAppsController
- Merged DesktopTaskbarRunningAppsController up into
  TaskbarRecentAppsController, which is now initialized directly
- The old TaskbarRecentAppsController was effectively a no-op
  that was always overridden, so merging the one subclass up makes
  things simpler (especially for the follow up CLs which will add
  support for switching between Running and Recent tasks using
  the same underlying data).

Flag: com.android.launcher3.enable_recents_in_taskbar
Test: TaskbarRecentAppsControllerTest
Bug: 315354060
Change-Id: I8411fb832e5dd3d76201d2694dec0b11bd70bbf9
2024-06-11 00:18:23 +00:00
Jagrut Desai
631b284836 Taskbar pinning animation with no recreate
Test: Manual, Visual
Bug: 265436799
Flag: LEGACY ENABLE_TASKBAR_PINNING DISABLED

Change-Id: I84a4d1efdb0bd4a0f856fa1f46b6489ef54a3841
2023-10-26 10:36:48 -07:00
Winson Chung
51c94c622e Merge "Fix an issue with nav bar translations not being updated" into udc-dev am: a53261b9cd am: 273703131a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23923806

Change-Id: Id2e78875d607f8deb1511a235d761f662eafbdd5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-07 20:01:47 +00:00
Winson Chung
ccd359d76c Fix an issue with nav bar translations not being updated
- There are flows where the shared taskbar state is updated prior
  to being destroyed, and not updated to the latest values when
  the taskbar is recreated.

  ie.
    unfolded -> lock screen -> LauncherTaskbarUiController's
      mTaskbarInAppDisplayProgress[SYSUI_SURFACE_PROGRESS_INDEX]
      is set to 1 due to the notif shade (lockscreen) showing.
      This is written into TaskbarSharedState's sysuiStateFlags
      and inAppDisplayProgressMultiPropValues.
    fold -> TaskbarActivityContext is destroyed
    unlock -> TaskbarManager and TaskbarSharedState's
      sysuiStateFlags are updated while the device is folded
    unfold -> TaskbarActivityContext is recreated and initialized
      which restores from the shared state's
      inAppDisplayProgressMultiPropValues. It also tries to reapply
      the shared state's sysuiStateFlags, but this doesn't update
      inAppDisplayProgressMultiPropValues because the state's
      "enabled" state is not updated (default is no flag set, and
      lockscreen sysui state is not set anymore).
    -> The restored inAppDisplayProgressMultiPropValues value
       results in the wrong translation.

- Note that after the above, the NavbarButtonsViewController state
  is actually correct and reflects the SysUI state, but the
  LauncherTaskbarUiController state is wrong.  This CL tries to
  manually update the ui controller to the correct state when it
  is recreated.
- CL also fixes a separate issue where LauncherTaskbarUIController
  could potentially overwrite the saved state progresses while
  restoring them due to the state callback being called

Bug: 283346744
Test: Unfold -> Lockscreen -> Fold -> Unlock -> Unfold and ensure
      the buttons are translated correctly



Change-Id: I43e473faf4fa2a493b9705506e3755df8f6264e7
Signed-off-by: Winson Chung <winsonc@google.com>
2023-07-06 22:01:49 +00:00
Brian Isganitis
7a5809e47b Add initial support for search session in Taskbar All Apps.
A search session is represented as a stub ResourceBasedOverride that can
be extended for controlling a search session.

Test: Manual (including aosp Quickstep)
Bug: 216683257
Flag: ENABLE_ALL_APPS_SEARCH_IN_TASKBAR
Change-Id: I9cf4b5f84feec5215840d456b601c6a9f7c4c211
2023-06-02 15:55:46 +00:00
Mady Mellor
c37bf46381 Adds BubbleControllers to TaskbarControllers
* BubbleControllers is optionally available (gated behind a flag).
* The bubble bar controllers follow init & onDestroy after the taskbar
  controllers.
* Adds the relevant views used by the bubble controllers to the
  transient taskbar layout.

Bug: 253318833
Test: manual, with other CLs, see go/bubble-bar-tests
Flag: WM_BUBBLE_BAR
Change-Id: I685163cdcc912768b1a720952762f4cbc602b14b
2023-05-05 17:02:38 -07:00
Jagrut Desai
c6d625b8db Exposing functionality to pin Taskbar from TaskbarDividerPopupView.
This CL allows user to long press on Taskbar divider view to bring up divider popup view. It also included functionality of allowing user to turn on always show taskbar from the divider popup view.

Test: Manual
Bug: 265436055
Bug: 265434718
Bug: 265434902
Bug: 265434705
Flag: ENABLE_TASKBAR_PINNING

Change-Id: Ied54d718483a9b06b053d68988e5c294a786002a
2023-04-20 22:04:21 -07:00
Brian Isganitis
3ef917a4e3 Cleanup ENABLE_TASKBAR_EDU_TOOLTIP: remove EDU sheet.
Test: Manual
Fix: 270396268
Change-Id: I3cebdb6646060cf6793e5ffc638213dde41338c0
2023-04-10 12:55:18 -04:00
Jagrut Desai
d2140ba498 Taskbar System Action with Broadcast Receiver.
Test: Manual
Bug: 265618836
Change-Id: I734402ef277a09cf5e41aa63f8be09375706c17a
2023-03-29 10:37:45 -07:00
Mike Schneider
42a8fe91db Merge "Do not perform invisible transitions while the screen is off." into tm-qpr-dev 2023-03-22 08:04:09 +00:00
Mike Schneider
308b7849db Do not perform invisible transitions while the screen is off.
This change caches whether launcher was active at the time of the screen
off, and assumes this last state when the screen is actually off.

While trying to understand the code, I renamed a couple class-internal
methods and flags, plus added comments. If they are not accurate, its
due to a misunderstanding on my part, and I will gladly revisit and
check whether all the assumptions I made still hold.

Bug: 261418621
Test: manually

Change-Id: I2ad25caf478100781a063c356c5fd2d20d3e1917
Merged-In: I2ad25caf478100781a063c356c5fd2d20d3e1917
2023-03-21 21:02:55 +00:00
Jon Miranda
3344ec7004 Add spring animation when stashing transient taskbar.
Bug: 273961611
Change-Id: I35a658a5e30a155094a48effdefc3895f45e0483
Flag: ENABLE_TRANSIENT_TASKBAR
Test: stash transient taskbar
2023-03-21 10:25:48 -07:00
Schneider Victor-tulias
de7ceba80b Add the KeyboardQuickSwitchView (2/2)
Adding 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: Ifb48b005067b3a9c66acfd5ecdbae144b359d3be
2023-02-14 13:34:37 -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
Vinit Nayak
b1c47227b1 Add unit tests for TaskbarKeyguardController
* Remove setting back button tint for SUW as that
is now done in ag/20953768

Bug: 230027385
Change-Id: I2c157ed67487cab9ba721fa659973351780509bb
2023-01-18 10:42:45 -08: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
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
92564539d2 Merge "Stash taskbar if user touch down above the gesture height." into tm-qpr-dev 2022-11-08 01:00:46 +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
Alex Chau
68e7fe6b7d Change taskbar corner roundness when entering overview
- Roundness will be 0 in Launcher, and 1 in an app

Bug: 250645563
Test: With and without taskbar in overview, switch between home/overview/app and observe the round corners above taskbar
Test: Ensure corner above taskbar is correct in overview and in app when chat bubble is active
Change-Id: I1f4911626c8e79fce8d81a76a9bd0d0670d111da
2022-11-07 12:58:47 +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
72c08d9255 Set controllersInitialized to false when destroying taskbar controllers
Bug: 250912179
Test: presubmit
Change-Id: I16532e99b8f74542def4283b6cc753673eb5ee2d
2022-10-05 15:46:31 +01:00
Merissa Tan
5dbd289f18 Add running apps icons to taskbar for desktop environment.
This CL adds app icons for launched/running apps to the Launcher
taskbar hotseat. When the activity is closed, the app icon is
removed. The apps that are added to the taskbar on boot are never
removed.

Recall: http://recall/clips/ad6d3cfc-7358-4b37-846e-de843ad3000d

Bug: 183906774
Test: Launch an app and verify the app icon is added on the taskbar.
Close the app and verify the icon is removed from the taskbar.
Test: Switch navigation modes on the emulator and ensure that running
app icons are added to the taskbar after it is reinitialized.
Test: atest NexusLauncherTests:com.android.quickstep.RecentTasksListTest RecentTasksControllerTest

Change-Id: Ieaaf001530b5778871fb7a8d18cdcaa1ccbf0e31
Merged-In: Ieaaf001530b5778871fb7a8d18cdcaa1ccbf0e31
2022-07-28 17:50:12 +00:00
Tony Wickham
9a54d2aa43 Hide taskbar while VoiceInteractionWindow is visible
- Fade out icons (or stashed handle if stashed)
- Move background to APPLICATION_OVERLAY layer (behind VIW)
  - Only for gesture nav
- On home screen in 3 button mode, translate buttons down when assistant
  is invoked

Test: Invoke assistant, ensure it draws above taskbar background and
taskbar stops drawing icons or stashed handle
Bug: 225200928

Change-Id: I7807d30df8f358295b8231d89217c7413f32c6f9
Merged-In: I7807d30df8f358295b8231d89217c7413f32c6f9
2022-06-09 05:21:42 +00: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
Tony Wickham
f286f9cb98 Address a couple small followups for TaskbarInsetsController
- Added no-op onDestroy()
- Reformated some if conditions, also adding
  AbstractFloatingView.hasOpenView()

Test: TaplTestsTaskbar
Bug: 215411414
Change-Id: I89b39ca5fabd03f5ac0f25d6ef69170683cf060d
2022-04-21 16:16:02 +00:00
Tony Wickham
36c9d888d8 Move taskbar insets logic to TaskbarInsetsController
Test: TaplTestsTaskbar; manually stash/unstash taskbar, open IME
Bug: 215411414
Change-Id: I73622dc020c4f8c8b3d317fcb1dd072bcfc3d274
Merged-In: I73622dc020c4f8c8b3d317fcb1dd072bcfc3d274
2022-04-20 19:27:48 +00:00
Vinit Nayak
26b6b577b9 Add metrics for taskbar 3 button nav
Fixes: 221075063
Test: wwlogcat shows right events,
new events show up on aster dashboard

Change-Id: I3864ac02ea00f281d33ccb26b95a4916bd8b6be9
Merged-In: I3864ac02ea00f281d33ccb26b95a4916bd8b6be9
2022-03-31 19:36:47 +00:00
Brian Isganitis
464209c535 Recreate All Apps when Taskbar is recreated.
Test: Manual
Fix: 222039500
Fix: 222037737
Fix: 222034811
Change-Id: I53aa3ae77d03ae2a1d500d906ad2ed90efda6f4a
2022-03-07 18:30:29 -08: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
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
Pat Manning
900ef936ad Animate icon dimming in taskbar when force showing in immersive mode.
Test: manual
Bug: 203748818
Change-Id: Iab3c65db502e7dbde3141429e9ae70eec1fabde1
2022-01-27 17:59:35 +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
TreeHugger Robot
3057559690 Merge "Handle configuration changes in floating rotation button" into sc-v2-dev am: ed05712f04 am: 6b45ff77e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16343605

Change-Id: I412679a314a4eab71a035c62884df44ca55e62f9
2021-11-29 20:19:02 +00: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
Tony Wickham
a143500a69 Add TaskbarControllers#runAfterInit()
And use it in TaskbarModelCallbacks#commitItemsToUI(), which in rare cases can run during init() before other controllers (namely TaskbarStashController) have been initialized.

Test: call commitItemsToUI() in TaskbarModelCallbacks#init(), ensure no crash
Fixes: 204847702
Change-Id: Ib9df3ea91d41c76ad1d3392e43b444b8b4a91374
Merged-In: Ib9df3ea91d41c76ad1d3392e43b444b8b4a91374
2021-11-24 23:14:06 +00:00
Tony Wickham
0baf062698 Add TaskbarControllers#runAfterInit()
And use it in TaskbarModelCallbacks#commitItemsToUI(), which in rare cases can run during init() before other controllers (namely TaskbarStashController) have been initialized.

Test: call commitItemsToUI() in TaskbarModelCallbacks#init(), ensure no crash
Fixes: 204847702
Change-Id: Ib9df3ea91d41c76ad1d3392e43b444b8b4a91374
2021-11-24 19:18:12 +00: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
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
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
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
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
Vinit Nayak
a08e806e25 Move back to end of screen on keyguard
* Animate it back into position after user unlocks
* Re-create taskbar on layout direction change so
PropertyHolders are recreated to take into account
new values

Fixes: 199852418
Test: Tested w/ password + pin for gesture + 3 button
Change-Id: Ie7f16f737a8fc12328c05d7628d0e3ae09fc08ca
2021-10-06 18:09:15 -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