Commit Graph

12884 Commits

Author SHA1 Message Date
Marcelo Arteiro
bc02103a6a Migrate materialColor* attributes into colors
TLDR:
* This change should not break anything or change any color.
* Simplifies theming and styling while improving developer experience.
* With this  developers can often skip styling for color entirely, while ensuring consistency and preventing accidental overrides.

Bug: 374273611
Test: presubmit
Flag: EXEMPT bugfix
Change-Id: Id19038078e83c73847b1a7c686c3a3df1ecccac2
2024-11-21 13:08:11 +00:00
Ikram Gabiyev
a13ef72cb5 Merge "[PiP2] Do not setFinishTaskTransaction in PiP2" into main 2024-11-21 03:38:51 +00:00
Ikram Gabiyev
d4788e6365 [PiP2] Do not setFinishTaskTransaction in PiP2
PiP2's enter flow is different in that we resolve
TRANSIT_PIP's startWCT in Shell, and PipTransition
will always make sure to set the right alphas
at the start and finish.

Bug: 380030547
Flag: com.android.wm.shell.enable_pip2
Test: atest NexusLauncherOutOfProcTests:TaplTestsSplitscreen
Change-Id: I7d28ed5dcccecfab71ff324098d5c31653ce1c9f
2024-11-20 16:30:35 -08:00
Treehugger Robot
0fb50e85d5 Merge "Handle edge case where overflow icon is overflowing" into main 2024-11-21 00:18:57 +00:00
Ats Jenk
16c14327ea Merge "Fix bubble bar stash delay" into main 2024-11-20 21:51:37 +00:00
Treehugger Robot
3868d9b73b Merge "Revert "Check if all apps are translucent when finishing recents animation."" into main 2024-11-20 21:06:07 +00:00
Johannes Gallmann
3fa3085242 Merge "Polish back-to-home animation for 3-button-nav" into main 2024-11-20 20:44:34 +00:00
Artsiom Mitrokhin
8ed2ef9029 Merge "Fix the overflow button getting stuck in the dot position" into main 2024-11-20 20:38:12 +00:00
Ats Jenk
3d0f0eb213 Fix bubble bar stash delay
Bubble bar was stashing with a delay compared to taskbar.
This is because taskbar stashing looks at isInLauncher value in addition
to launcher state.
Add this check to the bubble bar in overview condition. And only
consider bubble bar showing in overview if we isInLauncher returns true
and launcher state is overview.

Bug: 371229068
Test: manual, start from home with bubble bar shown, swipe up to
  overview, tap on an app, observe that bubble bar stashes at the same
  time as taskbar
Test: swipe up to home, open all apps, check that bubble bar remains
  visible
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Icedfd29300f739e37d636122bad0fb6e14fa2ced
2024-11-20 11:04:21 -08:00
Liran Binyamin
d091b42778 Merge "Interrupt bubble animation when IME is visible" into main 2024-11-20 18:45:24 +00:00
Liran Binyamin
c4020486b5 Merge "Fix wrong bar state after swiping home" into main 2024-11-20 18:45:06 +00:00
Jon Miranda
4fd400994a Revert "Check if all apps are translucent when finishing recents animation."
This reverts commit ec111e24e5.

Reason for revert: pip regressions — I'll do a quick revert for now

Change-Id: Ie91bae447acd9813188a5ba0caebeca30db348ea
Fixes: 379800273
Fixes: 379602904
Bug: 354627538
2024-11-20 18:36:21 +00:00
Ats Jenk
2e66e32aba Merge "Apply drag elevation to bubble bar container" into main 2024-11-20 16:53:40 +00:00
Alex Chau
6ce105c269 Merge "Update corner radius calculation in TaskView" into main 2024-11-20 16:18:51 +00:00
Liran Binyamin
05eaeb29aa Interrupt bubble animation when IME is visible
When the IME becomes visible, interrupt the bubble animation if it's
running. This ensures that the flyout doesn't show over the IME and
is more consistent with the behavior of bubble notification when the
IME is visible.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 378404363
Test: atest BubbleBarViewAnimatorTest
Test: manual
       - launch app
       - send bubble
       - while bubble is animating launch IME
       - observe flyout not visible over IME
Change-Id: I28390982bb41d8cc9b494395418728ff5fb373b6
2024-11-20 10:36:22 -05:00
Liran Binyamin
c3b4263218 Fix wrong bar state after swiping home
Interrupt the animation when the user swipes home.

When there are no bubbles the stashed state now keeps getting
updated so that when a bubble is created we can correctly
detect stash change events.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 378967270
Test: manual
       - dismiss bubble bar
       - launch app
       - send bubble
       - swipe home during the animation
       - observe the bar does not stash at the end
Change-Id: I2f054b7110af68f9637a4011a378ba35776b3771
2024-11-20 10:35:05 -05:00
Luca Zuccarini
9639fcc387 Merge "Hand off gesture nav animations to registered remotes." into main 2024-11-20 15:00:15 +00:00
Luca Zuccarini
afd0d288e0 Merge "Animation takeovers in Predictive Back." into main 2024-11-20 14:16:25 +00:00
Alex Chau
a2c1dbc611 Update corner radius calculation in TaskView
TaskThumbnailView
- Set cornerRadius directly from TaskView instead of calulating and listening from ViewModel
- Use onSizeChagned/width/height for OutlineProvider bounds, to be consistent with DesktopTaskContentView

DesktopTaskView
- Moved backgroundView inside DesktopTaskContentView, so its outline can be determiend by OutlineProvider in DesktopTaskContentView
- Update DesktopTaskContentView's cornerRadius when it changes in TaskView

Model/Data chagnes
- Removed TaskViewModel/TaskViewData and scale from RecentsViewData

TaskView
- Add a onBind method to be called after bind, for common post bind handling (e.g. update cornerRadius)

TaskViewSimualtor
- Use DesktopFullscreenDrawParams for desktop task, and moved setIsDesktopTask to CTOR so related fields can be final

Bug: 372237039
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Flag: com.android.window.flags.enable_desktop_windowing_mode
Test: TaskThumbnailViewScreenshotTest, OverviewDesktopTaskImageTest
Test: DesktopFullscreenDrawParamsTest, FullscreenDrawParamsTest, TaskThumbnailViewModelImplTest
Change-Id: If3d195ef6596aa28fce4d4875cf45423cb71811c
2024-11-20 13:55:32 +00:00
Luca Zuccarini
33dfe5e7b3 Hand off gesture nav animations to registered remotes.
This is in support of long-lived return animations in the Animation
library. Sometimes we want the home gesture to minimize the
foreground app into a custom view other than the default Launcher
behavior.

For example, ongoing call will minimize to the status bar chip, even if
the app icon is on Home. This is guaranteed to be handled is the
takeover handler is not null, and only happens in this case (which means
a custom animation has been registered and is ready to run).

Bug: 323863002
Bug: 202516970
Flag: com.android.systemui.shared.return_animation_framework_library
Flag: com.android.systemui.shared.return_animation_framework_long_lived
Test: manual and unit test included
Change-Id: Id7cd1f6e92ad3cbe3c259b3f80c753c91472b455
2024-11-20 10:31:28 +00:00
Johannes Gallmann
8f8d29888a Merge "Disable 3-button-nav buttons during back button hold" into main 2024-11-20 08:39:42 +00:00
Treehugger Robot
3186a14fb4 Merge "Add unit tests for taskbar overflow" into main 2024-11-20 06:30:48 +00:00
Toni Barzic
dfed7c8338 Handle edge case where overflow icon is overflowing
In certain situations, space in taskbar may be restricted so even the
overflow icon for running apps is technically overflowing available
space (i.e. not fully within intended margins). In such cases the
overflow icon was not rendered, as the size of the overflown icons was
larger than the number of running app icons, so the list of icons for
overflow icon was never fully initialized.
Handle this case by capping the number of items to add to overflow icon
to the number of available running apps.

Bug: 379774843
Test: Enable three button navigation, increase the display scaling (to
effectively reduce available space), and enter desktop session in
portrait orientation. Verify the taskbar overflow icon shows up.
Flag: com.android.launcher3.taskbar_overflow

Change-Id: I06371637d1b01e99eaf30aec98ae0920aa248652
2024-11-20 01:53:31 +00:00
Toni Barzic
7a0191e753 Add unit tests for taskbar overflow
The tests verify that number of icons in the task bar does not go beyond
the intended max number, that the taskbar remains centered as it hits
max number of icons, and maintains a minimal margin to the display
edges.
Also, has a test that the max naumber of icons and the taskbar margins
adapt as bubble bar visibility chages.

Adds a TestRule to mock the recents model in the taskbar window sandbox.
The mocked recents model is used to add fake running app icons to the
taskbar.

Bug: 368119679
Test: atest TaskbarOverflowTest
Flag: EXEMPT test only

Change-Id: I8d033c3e95d7c0a4b139502cd7d70882482117c0
2024-11-20 01:48:54 +00:00
Liran Binyamin
eb28585e54 Merge "Show the dot after the flyout is interrupted" into main 2024-11-20 00:17:39 +00:00
Ats Jenk
9830496276 Apply drag elevation to bubble bar container
While dragged, bubble bar needs elevation to show up above dismiss view
and dismiss view scrim.
Previously, bubble bar and dismiss view were under the same parent, drag
layer. This allowed us to position bubble bar above dismiss view by
adding elevation to it.
After introducing the bubble bar container, bubble bar is not shown on
top of dismiss view when its elevation changes. Because they are no
longer under the same parent.
Move drag elevation from bubble bar to bubble bar container. The
container and dismiss view are under the same parent.

Bug: 376140375
Test: manual, drag bubble bar or bubble, check they are above dismiss
  view and the scrim
Test: receive a new message, check that flyout is shown
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Ie0fb677929bb2413c10b934fc8b362cde7b8cecd
2024-11-19 16:00:00 -08:00
Artsiom Mitrokhin
c5e77d9717 Fix the overflow button getting stuck in the dot position
The root cause was that there were other unaccounted code paths inside
`KeyboardQuickSwitchViewController` that were causing the KQS view
to be closed.

The fix introduces a new `onCloseStarted` callback that is called before
closing the KQS view. This allows to toggle the overflow button together
with the KQS closing animation (in case it closes with animation).

Bug: 379614917
Flag: com.android.launcher3.taskbar_overflow
Test: manual, following steps in the bug
Change-Id: I1868142c1cdba8111cb86c4c54e5b12b643732c5
2024-11-19 22:54:15 +00:00
Johannes Gallmann
a4b56465ee Disable 3-button-nav buttons during back button hold
Bug: 373544911
Test: TaskbarNavButtonControllerTest
Test: Manual, i.e. verify that pressing buttons in 3-button-nav while the back button is pressed does not have any effect
Flag: com.android.window.flags.predictive_back_three_button_nav
Change-Id: I5abad5f2f74d09c790380a2eeb27aff3b780b925
2024-11-19 22:11:59 +00:00
Maryam Dehaini
9163f54158 Merge "Set task corner radius to match spec" into main 2024-11-19 19:00:45 +00:00
Liran Binyamin
5a45c34514 Show the dot after the flyout is interrupted
When the bubble notification animation is interrupted, we now
animate the dot back in so that it is visible.

Before this change we unsuppressed the dot which should normally
make the dot visible. The problem was that when the animation is
interrupted we immediately clear the animating bubble field but
showing the dot happens at the end of the flyout fade animation.

This change also animates the dot back in instead of setting the
scale immediately to 1.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 379733568
Test: manual
       - launch app
       - send a bubble
       - when the flyout shows, swipe to go home
       - observe animation is cleared and dot is visible
Change-Id: Ie7a10ddf237480ac6555d5f2b40da343394ce77f
2024-11-19 13:45:39 -05:00
Marzia Favaro
6db5c5a772 Merge "Enable split screen from app handle also for non-desktop devices" into main 2024-11-19 18:18:32 +00:00
Brian Isganitis
79809b448c Merge "Add annotation to simulate RTL in tests." into main 2024-11-19 16:30:34 +00:00
Marzia Favaro
fadf3a891c Enable split screen from app handle also for non-desktop devices
Test: manual, open menu and go to split screen
Flag: com.android.window.flags.show_app_handle_large_screens
Bug: 377689543
Change-Id: Iaf8794abc1111c4ebce9254f6f5d1bada7f57dd5
2024-11-19 15:19:34 +00:00
Johannes Gallmann
40f6f9b28a Polish back-to-home animation for 3-button-nav
Move window to the screen center when the animation is driven by a long press on the back button in 3-button-nav.

Bug: 373544911
Test: Manual, i.e. verify that app is center scaled
Flag: com.android.window.flags.predictive_back_three_button_nav
Change-Id: I8bacb923e3c81d99ddc1a8900bcc7423c8276c55
2024-11-19 14:59:14 +00:00
Liran Binyamin
275e62e946 Merge "Fix bubble animation when swiping home" into main 2024-11-19 14:34:16 +00:00
Luca Zuccarini
4a05c8b739 Animation takeovers in Predictive Back.
Bug: 323863002
Flag: EXEMPTY empty implementation
Test: NA empty implementation
Change-Id: I8a9ec1a4fb7fc400ce3c4e79ef3a234fbaf12dd0
2024-11-19 11:05:37 +00:00
Winson Chung
1ab7bd8357 Merge "Keep nav button container and back button stable during SUW" into main 2024-11-19 00:11:25 +00:00
Artsiom Mitrokhin
ddb0546277 Merge "Use dynamic/relative sizes for taskbar overflow button" into main 2024-11-18 23:47:38 +00:00
Liran Binyamin
232db796aa Fix bubble animation when swiping home
When swiping home during the bubble animation, and if the show edu
view state field is on, we try to show the bubble bar as part of
preparing to show the edu view. This updates the stash state and
prevents the animation from getting interrupted.

The expected behavior around showing the edu view is to store the
request when it is received and show the view later after the user
taps on the bubble bar or the flyout to expand it. We shouldn't
attempt to show the bubble bar at that point.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 378967270
Bug: 374842575
Test: manual
    - force show the edu: adb shell settings put secure force_show_bubbles_user_education 1
    - launch an app and send a bubble
    - while the bubble animates, swipe to go home
    - observe the flyout is removed correctly, and we don't end up in stashed state
Change-Id: I478b06ac5f6f9d398cd143bcc0b3f796d9ad8a49
2024-11-18 17:05:12 -05:00
Artsiom Mitrokhin
ef05519982 Use dynamic/relative sizes for taskbar overflow button
Bug: 376281549
Flag: com.android.launcher3.taskbar_overflow
Test: manual, press the overflow button, dismiss KQS
Change-Id: I7cf023cd0df34d898ee1949c5c6de930268e37cb
2024-11-18 15:45:50 -05:00
Schneider Victor-tulias
b7714d0937 Merge "Refactor InputConsumer selection logic into a util class" into main 2024-11-18 20:28:21 +00:00
Tony Wickham
4ad57959d6 Merge "End icon alignment early when touching down during 3 button anim to home" into main 2024-11-18 18:53:55 +00:00
Jeremy Sim
ec788cb24d Merge "Migrate away from listening for main/side specific stage types" into main 2024-11-18 18:41:38 +00:00
Vinay Joglekar
c656c3807c Merge "Fix Blank task thumbnails during animation in following scenarios" into main 2024-11-18 18:01:17 +00:00
Schneider Victor-Tulias
cfce474121 Refactor InputConsumer selection logic into a util class
This will allow us to test the logic in isolation

Flag: EXEMPT refactor
Bug: 371020209
Test: NONE refactor
Change-Id: I5e1e9cc79e69db261ea28a2f7d43a983339f178b
2024-11-18 12:33:40 -05:00
vinayjoglekar
f01ead4eb1 Fix Blank task thumbnails during animation in following scenarios
1. During split
2. During dismiss

We need to expand window of visible task data, we use dismissTranslation property to increase window.

Fix: 376409147
Flag: EXEMPT bugfix
Test: Manual: Dismiss desktop when have focus task as well as small tiles, split from far away with multiple desktops
Change-Id: I0102f8927e70a37ffe4db18adefd33eb7a823981
2024-11-18 13:56:26 +00:00
Johannes Gallmann
2760536a3b Merge "Fix window clipped in three-button-nav on phone factors" into main 2024-11-18 08:19:17 +00:00
Jagrut Desai
15d689df48 Merge "DesktopMode Entry/Exit Signals" into main 2024-11-16 19:44:36 +00:00
Vinit Nayak
49282f8ecc Migrate away from listening for main/side specific stage types
Bug: 349828130
Flag: com.android.wm.shell.enable_flexible_split
Test: Manual, incremental change, not stable yet.
Works fine with flag off

Change-Id: Ief1a41fb9f32cd99266f0ac73b17d5676ead042a
2024-11-15 23:57:46 +00:00
Jon Miranda
ec111e24e5 Check if all apps are translucent when finishing recents animation.
If true, then launcher will be finished at the end of the animation.
This fixes the issue where taskbar will stash in overview because
we assumed the app was fully opaque.

Bug: 354627538
Test: open app, go to overview, tap icon, pause app, note no issue
Flag: EXEMPT bugfix
Change-Id: Id51e0d9f63c9615127e27455f7edf171381c2011
2024-11-15 23:47:48 +00:00