Commit Graph

149 Commits

Author SHA1 Message Date
Gustav Sennton
52a8b7e24b [Desktop Mode] Show indicators under Taskbar app icons for running apps
In Desktop Mode we show running Desktop apps in the Taskbar. With this
change we also show an indicator under the app icon for each such
running app.

Bug: 332504528
Test: manual
Test: DesktopTaskbarRunningAppsControllerTest
Flag: ACONFIG com.android.window.flags.Flags.enableDesktopWindowingTaskbarRunningApps DEVELOPMENT
Change-Id: If0906dab8ad0bd8a78d93a4e99db47550e763bed
2024-04-26 15:29:00 +00:00
Jagrut Desai
e6f349b3dd Adjusting Taskbar Icons for larger display size
Bug: 323948193
Test: Manual
Flag: NONE

Change-Id: I0bdfcaebf3de050ac850fe42c061c82ffebdb7c2
2024-04-04 14:01:57 -07:00
Jeremy Sim
742630c2f8 Reparent folders and app pairs
Previously, app pairs and folders shared a common data model, FolderInfo. Now we need to separate them, so a new type, CollectionInfo, will serve as the parent of both types.

Bug: 315731527
Fixes: 326664798
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, unit tests to follow
Change-Id: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
2024-03-29 15:39:28 -07:00
Saumya Prakash
ba04c0c1dc Remove the tint from taskbar themed icons for dark mode.
We remove the added tint to taskbar themed icons to match how they look
in the hotseat on launcher home screen specifically for dark mode.

Fix: 323952706
Test: Turn on themed icons and dark mode. Compare app icons in taskbar
and in hotseat
Flag: N/A

Change-Id: I4dfe352ca17ef5537e48fcc3cff66ba4fd4f603a
2024-02-28 23:07:07 +00:00
Andy Wickham
0ae51bcdb9 Extract TaskbarViewCallbacks to a separate class + factory.
Also log long presses on the taskbar all apps button.

Test: Manual
Flag: NA
Change-Id: Id2bf194f09007bfccff9f83162e4bcfb6562580f
2024-02-13 18:51:48 -08:00
Tracy Zhou
a009a5e82e Update task bar height update logic to consider screen rotation cases
When home screen rotation is enabled, instead of updating taskbar height (assuming that folded task bar is always on the bottom of screen display), we should update taskbar width instead.

Bug: 313371759
Test: try out both folded and unfolded 3-button and gesture nav modes, enable home rotation, make sure all the nav buttons are functional and visible when they should be.
Change-Id: I16f53d9e9c3cd0229fc50b73613b032a96322b97
2024-01-19 16:58:03 -08:00
Saumya Prakash
b617daa6c6 Merge "Add standalone taskbar edu tooltip for the pinnable taskbar feature" into main 2024-01-18 01:41:14 +00:00
Saumya Prakash
dddebdff0c Add standalone taskbar edu tooltip for the pinnable taskbar feature
This change adds in a standalone edu window for the pinnable taskbar
feature. The reason for the change is to educate users about pinnable
taskbar to those who have already seen taskbar edu before.

Fixes: 302589411, 300161174
Test: Went through taskbar education taskbar with the flag on and off.
Check that the standalone pinning taskbar only shows up if previous
taskbar education was already completed.
Flag:  ACONFIG com.android.launcher3.enable_taskbar_pinning DISABLED

Change-Id: I03a5fb05ae5f15892421a57355f6d503de56d9fd
2024-01-17 21:23:30 +00:00
Jagrut Desai
a3d3c06967 Taskbar Pinning Animation Improvements
Test: Manual
Bug: 312178646
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning DISABLED

Change-Id: I708127be8301a61994168f780474c75be726815d
2024-01-05 12:12:12 -08:00
Tracy Zhou
95c4c8d268 Fix crash from folding/unfolding
This is fundamentally caused by the phone device profile not having task bar related attributes, which crashes in icon alignment animation. We had resolved it by skipping this animation based on isPhoneMode check. However, we passed in launcherDp instead of taskbarDp (from TaskbarActivityContext) which doesn't always have the most up to date information in race conditions (e.g. repetitively fold/unfold)

Fixes: 311431054
Test: repetively fold/unfold, make sure it doesn't crash
Change-Id: I65f600112da4123d337b3f59a2fe6dd13ac7af74
2023-12-14 18:39:42 -08:00
Tracy Zhou
9ccd5d4257 Introduce taskbar_phone_size
In small screen, we use 48dp for nav bar height, while it's 60dp for task bar.

Bug: 230395757
Test: manual
Change-Id: Ia7083a1b2246981466e1163404c63b645a6bf5b1
2023-12-13 00:38:15 -08:00
Tony Wickham
18551f29fe Remove ENABLE_TRANSIENT_TASKBAR and long-press stash support
Flag: NA
Test: manual, TaplTestsTaskbar, TaplTestsPersistent, TaplTestsTransient
Fixes: 270395798
Change-Id: I4ecf5ddcd1206e846538175c684043c5e065fd5d
2023-12-06 22:13:10 +00:00
Pat Manning
4c5ea5fd02 Show taskbar pinning dialog on right-click.
Fix: 308768942
Test: Manual.
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning DISABLED
Change-Id: I37e49452fada944186c8300562061bf9650a0d0a
2023-11-21 14:51:15 +00:00
Jagrut Desai
2c7556d4c7 Merge "Fix RTL issue with all apps meta icon" into main 2023-11-13 20:13:34 +00:00
Jagrut Desai
1ab8da20f5 Fix RTL issue with all apps meta icon
Test: Presubmit, Manual
Bug: 309453796
Flag: NONE
Change-Id: I5d8bda2c48a0815d7005a0727f67f871f75d4f0f
2023-11-10 09:44:51 -08:00
Jagrut Desai
90dd098c85 Migrate ENABLE_TASKBAR_PINNING to aconfig flag
Test: Manual, Presubmit
Bug: 265437087
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning DISABLED

Change-Id: I4800230c04feceefa2398e189c493c8c4a7b2fe5
2023-11-09 23:20:03 +00:00
Tracy Zhou
f2d7be1cec Make enableTaskbarNoRecreate() depend on ENABLE_TASKBAR_PINNING and ENABLE_TASKBAR_NAVBAR_UNIFICATION
We want to turn on the flag when either of the dependent features is on

Bug: 299193589
Test: N/A
Change-Id: I7b48ff2be0cf9da3b6bc00d75370fa585ce4140d
2023-11-08 14:52:58 -08:00
Tracy Zhou
6fe69f5a2a Migrate HIDE_NAVBAR_WINDOW to aconfig and rename is to enable_taskbar_navbar_unification
Bug: 309671494
Test: N/A
Change-Id: If35d807c17351146029498a876a055384eff3c2f
2023-11-07 13:51:38 -08:00
Jagrut Desai
2d9f2c1cec Merge "Animate aways Notification Dots for Taskbar Pinning Annimation" into main 2023-11-03 02:02:49 +00:00
Jagrut Desai
47bf322e21 Animate aways Notification Dots for Taskbar Pinning Annimation
Test: Manual
Bug: 308460959
Flag: LEGACY ENABLE_TASKBAR_PINNING DISABLED
Change-Id: Ic16881c05c70ed717dc63131d94ece805c39f6fc
2023-11-02 17:39:37 -07:00
Tracy Zhou
109b442a83 Merge "Do not animate icon alignment in phone mode" into main 2023-11-02 16:23:39 +00:00
Jagrut Desai
b7f4236776 Fix Taskabr Divider Line traveling too far
Currently, all apps button and divider line overlaps each other when launching app from home. so here we are arbituraly making tasakbar divider line position in hotseat to be little off centered so icons don't over lap and divider line travels less to its position on taskbar.

Test: Manual
Bug: 308488785
Flag: LEGACY ENABLE_TASKBAR_PINNING DISABLED
Change-Id: I6cf9f3db50f34deb0c393ec1cfd0268e1b147758
2023-10-30 15:46:45 -07: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
Tracy Zhou
d313ee0c35 Do not animate icon alignment in phone mode
With the existing code, there is a rare case that mIconAlignControllerLazy is
set from unfolded state, and then go to small screen, and we will reuse mIconAlignControllerLazy to animate, only to find out that scaleX for the icon view is infinity. Instead, we should unset mIconAlignControllerLazy in phone mode.

Fixes: 274517647
Test: manual
Change-Id: I3200761e5f4c6df0d89744f22e38bfe7fc7846cc
2023-10-24 21:50:22 -07:00
Jon Miranda
330b7754c6 Fix bug where All Apps button loads in late in taskbar.
We need to re-create the icon alignment controller if the
stash status changes, otherwise it will use an old value.

Bug: 296414290
Test: home to app then quickly unstash
Change-Id: I35f23842f289fce95d102a9a93dc94cd033fa8cc
2023-10-12 17:14:49 +00:00
Tracy Zhou
0812a9495c Fix task bar crashing in small screen with task bar / nav bar unification on
A few params are not set in device profile when task bar (in large screen) is not present, and hence the calculation below causes a crash

Test: Make sure that it doesn't crash in small screen gesture nav mode
Bug: 274517647
Change-Id: I3a61a64ac931fac4aee1a3c40ed54ab9ded298a7
2023-10-05 16:40:48 -07:00
Mady Mellor
b898a3c8d3 Fix bubbles taskbar scrim showing when notification panel is shown
TaskbarScrimViewController was previously unaware of visibility
changes that happened to taskbar outside of when the sysui state
flags changed. Additionally, isTaskbarVisibileAndNotStashing is not
a reliable signal as the visibility might be GONE even though taskbar
is about to animate to be visible (i.e. shade is showing and then
you swipe it back up -- taskbar scrim wouldn't appear because when
the sysuiStateFlags changed, taskbar visibility would still be 'gone'
at that point so the taskbar scrim wouldn't animate back when
the shade is swiped up).

To resolve this, I've added a callback to notify the scrim
controller of visibility changes and it'll update if needed.

Bug: 270634233
Test: manual - enable 3 button nav
             - have a bubble
             - go to overview
             - expand bubbles
             => observe that scrim appears over taskbar
             - swipe down shade
             => observe that scrim fades out
             - swipe shade up
             => observe that scrim fades in

Change-Id: Ibaae8efb90b4558d30795298570208a52b31efb4
2023-09-18 11:49:52 -07:00
Liran Binyamin
a833af316b Adjust the hotseat when the bubble bar becomes visible
When the bubble bar becomes visible the space between icons in the
hotseat is now adjusted. This change only does it when the QSB is
above the icons, but this will be changed in the future to be based
on the amount of space between the hotseat and the edge of the screen.

When the hotseat is adjusted, the new width is smaller by the size of
2 icons. The icons are then translated to be evenly spaced within the
boundaries of the new width.

Since the adjustment is only applied when the QSB is above the icons,
it is resized accordingly to the new width.

All visual updates currently snap to the new position, but will be animated
in a follow up.

Demo: https://recall.googleplex.com/projects/3391fc5c-599d-4827-b6f8-d2deb160aa99/sessions/fad1a5c5-e9cf-4586-92e4-1e92df3b002e

Bug: 280494203
Test: Manual (on tangor)
      - Set device to landscape
      - Make the bubble bar visible by adding a bubble
      - Rotate to portrait mode
      - Observe that the hotseat is adjusted
      - Rotate to landscape
      - Observe that the hotseat adjustment is removed
      - Rotate back to portrait
      - Observe that the hotseat is adjusted again
      - Dismiss the bubble to hide he bubble bar
      - Observe the hotseat adjustment is removed

Change-Id: I5b02a60b6cb301ffa2507a6d825c748a782cca18
2023-09-13 17:08:42 -04:00
Pat Manning
da69661add Show tooltips on cursor hover of taskbar icons.
Fix: 250092437
Test: TaskbarHoverToolTipControllerTest
Flag: ENABLE_CURSOR_HOVER_STATES
Change-Id: Ia0463518d13b313b354328078685930215fb7636
2023-07-14 13:42:30 +01:00
Vinit Nayak
15a9feb67f Add support for taskbar phone 3 button seascape
* Ignore orientation check from ag/22709055 for now,
that will be reverted. This causes recreateTaskbar() to
not run when folding the device

Bug: 274517647
Test: Tested 3 button nav in portrait/landscape/seascape
Flag: persist.wm.debug.hide_navbar_window
Change-Id: Ied02ead677d496b465c748257e32b7db5eb9580c
2023-07-06 13:58:30 -07:00
Brian Isganitis
d478b1464e Support zero-state suggestions in Taskbar All Apps.
Test: manual
Bug: 216683257
Flag: ENABLE_ALL_APPS_SEARCH_IN_TASKBAR
Change-Id: I016d4e4e6a096ca4f5bd65fcda1bf24a444459f4
2023-06-12 17:19:16 +00:00
Kateryna Ivanova
7120373bbc Migrate Interpolators from Launcher3 to the public animation library
Test: atest
Bug: 271850966
Change-Id: Iba999f2e753764a37d35e508e707df02388432e9
2023-05-30 07:20:38 +00:00
Jon Miranda
0aef6981ac Fix SUW unstash animation.
- Defer any UI updates to taskbar after the SUW unstash animation is created.
- Predicted app icons take longer to load, so it's possible that they are
  added after the animation is created.
- This avoids the case where icons are seemingly in the taskbar but
  do not get animated like the rest of the icons.

- We also need to call onAnimationStart for the reveal animation immediately,
  otherwise the clipToOutline params never get set.

Bug: 277712185
Test: flash device, very quickly go through SUW
Change-Id: I4c3089da0d20bf91672e2305655c4c37b1f367aa
2023-05-19 17:24:50 -07:00
Brian Isganitis
0b53332c31 Merge changes I35fe528b,Ia612c1b5 into udc-dev
* changes:
  Don't close AFVs when opening Taskbar folder.
  Keep persistent Taskbar visible over Taskbar All Apps.
2023-05-06 14:42:54 +00:00
Brian Isganitis
9c311b2917 Keep persistent Taskbar visible over Taskbar All Apps.
Additionally, this CL fixes some touchable insets issues with the
overlay window. Dragging and dropping is now reliable from taskbar while
All Apps or EDU is also open.

Change-Id: Ia612c1b5266a8fb2b7005a773fbd2b00ec4824db
Bug: 279465803
Bug: 275890048
Bug: 264463659
Flag: PERSISTENT_TASKBAR_OVER_TASKBAR_ALL_APPS (Teamfood)
Test: Taskbar is functional over All Apps and EDU.
2023-05-04 23:54:27 -04:00
Jagrut Desai
1c9c6d0ea9 Design review updates for Taskbar Pinning
Changes:

- icon allignment animation for taskbar diviver view
- taskbar divider background color according to spec.

Test: Manual
Bug: 265170176
Flag: ENABLE_TASKBAR_PINNING
Change-Id: Ief45e48f4fc9f9b4cc30124c4c93cd3c5a880a33
2023-05-01 14:57:54 -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
Jon Miranda
b0195376d4 Fix badged icons / icons with notification dot being cropped.
For icons, we use radius = 0 during the reveal animation so
that the entire view will be visible.

Fixes: 276625136
Test: - have work profile icon or badged shortcut in taskbar/hotseat
      - swipe up to close
      - also check swipe back to close
      - ensure entire icon is visible at the end of the animation so
        that there is a clean handoff
      - run same test with icons that have notification dot
Flag: ENABLE_TRANSIENT_TASKBAR true

Change-Id: I3fef1eede5cac189dab1bf1be4ebd048720727c7
2023-04-03 10:06:16 -07:00
Jon Miranda
9c478b6c29 Add taskbarIconSize to GridOption/DisplayOptions
- Renamed variables to make it more clear what they represent
- DeviceProfile will be source of truth for taskbar
  sizes

Bug: 265144213
Test: phone, multi-display, tablet
Change-Id: Id9c19d15a65894fd7645e0f876a4b6527b713c34
Flag: ENABLE_TRANSIENT_TASKBAR=true
2023-03-24 12:29:11 -07:00
Tony Wickham
2b8b47952f Merge "Handle swipe down on taskbar to stash" into tm-qpr-dev 2023-03-23 18:54:09 +00:00
Tony Wickham
c73db73a79 Handle swipe down on taskbar to stash
- Moved all touch-to-stash logic to new TaskbarStashViaTouchController
  (handles both tap outside to stash instantly as well as swipe down
  inside to stash after letting go)
- This is a TouchController on TaskbarDragLayer, so it intercepts
  touches from TaskbarView before icons can be dragged during swipe down

Test: swipe up to invoke transient taskbar in an app, swipe down or
touch outside to stash
Flag: ENABLE_TRANSIENT_TASKBAR=true
Fixes: 246631710

Change-Id: I5cf64848bba34ad32fcc80a93fb4f79ebd2c10a7
2023-03-23 15:13:52 +00:00
Jon Miranda
0a6356a5ea Merge "Update start radius for reveal animation to match spec." into tm-qpr-dev 2023-03-22 16:51:27 +00:00
Jon Miranda
cb3fc6b07c Update start radius for reveal animation to match spec.
Bug: 273961611
Change-Id: I3330b8b2ec47d7e9608b900a859d2a865f92a994
Flag: ENABLE_TRANSIENT_TASKBAR
Test: stash/unstash
2023-03-21 14:52:58 -07: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
Jon Miranda
f0e14ac7da Taskbar motion polish to keep icons within taskbar bg bounds.
Instead of making the icons themselves move faster, we change
the startDelay/duration of the taskbar bg alpha animation
so that the taskbar is only visible when the icons are within
the taskbar bounds.

This is still an approximation. For U+, we should support taskbar
width change to fit the icons when they are in the 'hotseat'
alignment.

Bug: 273961611
Test: home <-> overview
      home <-> app
      stash <-> unstash
      foldable/tablet
      RTL
Change-Id: I39bedafac4afd641d250f7c97abf1e2de070d646
2023-03-20 07:12:53 -07:00
Tony Wickham
08ea122c79 Fix launcher <-> taskbar dark themed icons background color
- Moved colors to final in TaskbarViewController (since controllers are
  recreated on theme change)
- Clarified some variable names
- Animate from progress 1 to 0 instead of vice versa, since 0
  corresponds to launcher's theme icon color which is what the alignment
  animation is going towards

Test: in gesture nav with dark themed icons in hotseat, go to overview
and ensure smooth transition to ligher themed background; return home
and ensure reverse transition
Flag: none
Fixes: 271651337

Change-Id: I4451f995a3e79e512c59a834051f601ead70ff87
2023-03-16 16:04:50 +00:00
Jon Miranda
4c368373cb Merge "Polish taskbar un/stash animation." into tm-qpr-dev 2023-03-09 03:33:39 +00:00
Jon Miranda
67d4b0ed6b Polish taskbar un/stash animation.
- When QSB is inline, we add it to the reveal animation
  so that it moves in coordination with the rest of the
  taskbar icons
- Hide All Apps button when transitioning from Home -> App
  to match spec
- Shorten duration icons move in x duration so that they
  stay within the taskbar background bounds.

Bug: 267806083
Bug: 246635237
Bug: 246660243
Test: transient taskbar
      with isQsbInline = true and false

Change-Id: Ie6b866311cc2ceba88cdf01652b30fee457d0359
Merged-In: Ie6b866311cc2ceba88cdf01652b30fee457d0359
2023-03-08 23:47:29 +00:00
Jagrut Desai
1dc99f3848 Announce for accessiblity when taskbar is invoked/closed
Test: Manual
Bug: 265620540
Change-Id: I6660be7716ec59c765f3d54f8fe9889eaaf56e10
2023-03-08 09:54:10 -08:00
Pat Manning
d3cffe8156 Align taskbar children to Y value instead of X.
Fix: 271858023
Test: manual on tablet.
Change-Id: I60882a062d5f2bb8f24525e2cec9c4a091b31545
2023-03-06 17:57:58 +00:00