Commit Graph

12080 Commits

Author SHA1 Message Date
Mady Mellor de28dc32eb Merge "Add a bubble option to launcher long press menus" into main 2024-08-09 17:25:02 +00:00
Mady Mellor 1cc100844c Add a bubble option to launcher long press menus
- Add a launcher "system shortcut" to bubble deep shortcuts or apps
- For shortcuts, save the shortcut info to use to produce the bubble
- Add an interface so that the system shortcut can call through to
  sysui proxy

Flag: com.android.wm.shell.enable_bubble_anything
Test: manual - enable the flag and try to bubble a shortcut via the
               longpress menu on launcher
             - try bubbling an app on launcher
             - try bubbling an app from the taskbar
Bug: 342245211
Change-Id: I1ef49e1628ba0be9cea05073ecd9cd66bf67f88f
2024-08-08 21:23:13 +00:00
Jon Miranda 540af8a55a Fix jumping taskbar when tapping on nav handle.
We can skip updating taskbar when home visibility changes due to
recents transition animation. For this specific case it was a
superfluous call anyways since taskbar unstashing would be
handled by TaskbarUnstashInputConsumer.

Fixes: 292108880
Bug: 345768019
Test: launch app, quickly tap on nav handle
Flag: com.android.launcher3.enable_scaling_reveal_home_animation
Change-Id: I822071d31d066503c27f527ade46e28a154df249
2024-08-08 19:14:58 +00:00
Liran Binyamin 5eeff8d1e3 Merge "Support expanding the bar while animating" into main 2024-08-08 12:44:42 +00:00
Treehugger Robot 3307f87b82 Merge "Implement e2e test for desktop windowing" into main 2024-08-08 11:32:10 +00:00
Alex Chau 1ceac5ddfe Implement e2e test for desktop windowing
Code changes:
- TaskView, GroupedTaskView and DesktopTaskView now uses different resId, so it can be differentiated by TAPL
- Extracted result handling of icon loading, so we can override in DesktopTaskView
- DesktopTaskView now load icons, so titleDescription can be loaded. When icons are loaded, contentDescription are applied to respective snapshotViews; icon unloading is ignored
- Track launchDesktopFromRecents and composeRecentsLaunchAnimator in TAPL events so we can test if the TaskView launch path is correct

Test changes:
- Added TaplTestsOverviewDesktop that move 2 TestActivities into Desktop, and launch the DesktopTaskView as static and live tile
- TaplTestsOverviewDesktop is limited to Tangor/cf_tablet only, and added LimitDeviceRule to AbstractLauncherUiTest to enable @AllowedDevices and @IgnoreLimit

TAPL changes (2 APIs added/modified):
- Changed TaskView matcher to use id/task_view_* to match all TaskView types
- When Overview is launcehd from Background, mark the currentTask after the launch as liveTile. When an OverviewTask has the same accessibility node as the liveTile, it'll expect different event when launching.
- [API change] BaseOverview.getTestActivityTask can now matches mutiple test activiites, useful for matching GroupedTaskView and DesktopTaskView; Fix a bug that getTestActivityTask wrongly use `getParent()` which is RecentsView to match activityName.
- In OverviewTask.open, we'll expect different events based on TaskView types and whether it's a live tile. Launching DesktopTaskView will in additional verify Desktop header is present on screen.
- [API change] In OverviewTaskMenu, support tapping Desktop menu and verify Desktop header is present on screen.
- Removed unused OverviewTaskMenuItem

Fix: 320313527
Test: TaplTestsOverviewDesktop
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: I89261c787364901320f3acb18f01ddad5f62d17c
2024-08-08 10:37:40 +01:00
Liran Binyamin 46111b109e Support expanding the bar while animating
Update the BubbleBarAnimator to handle auto expanding bubbles as
well as expand signals that are received while animating the bubble
bar.

The expansion starts after the bar reaches its peak height. If the
hide animation starts before the expansion signal is received, we
ignore it.

Next step is to delay showing the expanded view until the bubble bar
starts expanding.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 353644484
Fixes: 356415377
Bug: 339683389
Test: atest BubbleBarViewAnimatorTest
Change-Id: I79a63f0b8728abc1ab3345f0116cbfcba2918643
2024-08-08 03:46:07 -04:00
Tracy Zhou eeb98c8e75 Merge "Set navbuttons_view width instead of height in landscape mode" into main 2024-08-07 21:04:51 +00:00
Tracy Zhou 26a3dc8d5c Set navbuttons_view width instead of height in landscape mode
Launcher tests fail in the first run in landscape mode. Somehow this is not reproducible locally or can be seen in production. After digging into hierarchy traces, found that the height of the nav buttons view (in landscape mode) is set to the task bar size (48). Then found where we had this logic historically and adjusted to width in phone landscape mode.

Fixes: 356156690
Test: https://android-build.corp.google.com/builds/abtd/run/L40800030005694733
Flag: com.android.wm.shell.enable_taskbar_on_phones
Change-Id: I170fe45375a63a2e1d2e63b1d680efb45ae0752e
2024-08-07 12:19:59 -07:00
Ats Jenk a5fa9bc911 Merge "Update bubble a11y nav order in bubble bar" into main 2024-08-07 16:39:33 +00:00
Sam Cackett acf4cd1163 Merge "Add hover states to IconView and TaskThumbnailView in Overview" into main 2024-08-07 11:18:51 +00:00
Sam Cackett 5c2d50d901 Add hover states to IconView and TaskThumbnailView in Overview
- Hover over IconView passes to FastBitmapDrawable
- Hover over TaskThumbnailView bounds highlights the border
- Hover over TaskView outside of IconView or Thumbnail does nothing
(previously highlighted a border incorrectly)

Bug: 342594235
Test: OverviewTaskViewHoverImageTest, OverviewDesktopTaskImageTest
Flag: com.android.launcher3.enable_hover_of_child_elements_in_taskview
Change-Id: I5b0753bdec609a4a6658a35422e2823c4ed109fc
2024-08-07 08:22:44 +00:00
Ats Jenk cfb4e22996 Update bubble a11y nav order in bubble bar
When swiping left, a11y focus should move to the bubble shown on left.
Same for swiping right. This should happen regardless of the side bubble
bar is placed on.

Bubble views get added to the container based on recency. The most
recent bubble is placed as child at index 0.
For example if we have bubbles (1)(2)(3)(+) and (1) is the most recent,
then the child index for (1) is 0. This is always the same, regardless
of bubble bar location.

Bubble bar location does affect how bubbles appear on screen. If the bar
is on the left, most recent bubble is shown on the right.
The on screen order for the above bubbles would be: (+)(3)(2)(1).
If the same bubble bar is on the right, bubble order would be:
(1)(2)(3)(+).

For a11y navigation we want to follow the order that bubbles are shown
on the screen. Default navigation order follows how the child views are
added to the parent container. For bubbles the child view order may not
match what is shown on screen. Due to this, we override the default
navigation order. And set up the previous and next elements to navigate
to based on bubble bar location and bubble order.

Bug: 344674605
Flag: com.android.wm.shell.enable_bubble_bar
Test: have bubble bar expanded on the right, swipe left and check that
  bubble on the left is selected, swipe right and check that bubble on
  the right is selected
Test: have bubble bar expanded on the left, swipe left and check that
  bubble on the left is selected, swipe right and check that bubble on
  the right is selected
Change-Id: Iae63ac13d5477883952b836f6872e4c7c7fb88c1
2024-08-06 14:07:13 -07:00
Tracy Zhou 7a247fb2ac Merge "[Taskbar Performance] Avoid calling notifyUpdateLayoutParams in code logic specifically for unfolded taskbar when folded" into main 2024-08-06 19:14:26 +00:00
Riddle Hsu 9164534fb9 Merge "Use rotation hint to update layout" into main 2024-08-06 11:39:03 +00:00
Mady Mellor 8c629fd8b5 Support optional bubble overflow in bubble bar
This is similar to the animations that add / remove a bubble at the
same time -- the overflow is generally added when a bubble is removed.
The overflow is generally removed when a bubble is added (i.e. user
promotes a bubble out of the overflow).

There are a couple of additional cases:
- when bubbles are first added to the bar -- if there were saved
  bubbles in the overflow, the view should be added
- an app could cancel its bubbles / remove its shortcuts and not have
  any in the stack but could have some in the overflow & it could
  become empty without an addition.

Flag: com.android.wm.shell.enable_optional_bubble_overflow
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - add bubbles to the bubble bar for first time
             => observe there is no overflow
             - dismiss a bubble
             => observe the overflow is added, tap on it, tap on the
                bubble in it
             => observe that bubble is added & the overflow disappears
             - dismiss all the bubbles
             - add a bubble
             => observe the overflow is there & has the previously
                dismissed bubbles
             - cancel all the bubbles that are in the overflow via
               adb
             => observe the overflow is remvoed
Bug: 334175587
Change-Id: I2b6e855e65520b4b2b1fde7757d46f00a468b4a6
2024-08-05 12:25:33 -07:00
Mady Mellor d9873c1039 Merge "Move bubble icon / content loading into its own controller class" into main 2024-08-05 17:23:28 +00:00
Treehugger Robot a879d68b59 Merge "Use onTaskThumbnailChanged as sourced of truth for thumnbail override" into main 2024-08-05 17:09:28 +00:00
Alex Chau 67a1006f56 Use onTaskThumbnailChanged as sourced of truth for thumnbail override
- Both RecentsView.screenshotTask and RecentsView.updateThumbnail uses thumbnail that comes from recentsAnimationController.screenshotTask. recentsAnimationController.screenshotTask always results in TaskVisualsChangeListener.onTaskThumbnailChanged, which is a better source of truth to rely on rather than having 3 entry points for thumbnail override
- As a thumbnail objects from onTaskThumbnailChanged has the same snapshotId but are different instances, updated RecentsViewModel.waitForThumbnailsToUpdate to reflect that

Bug: 342560598
Test: RecentsViewModelTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I79b6e32224df4192e8df6930d87b222ed93bf8d8
2024-08-05 12:55:16 +01:00
Tracy Zhou 2cfc2e1b1c [Taskbar Performance] Avoid calling notifyUpdateLayoutParams in code logic specifically for unfolded taskbar when folded
Bug: 355968858
Test: https://android-build.corp.google.com/abtd/run/L59700030005634589/?referrer=email
Flag: com.android.wm.shell.enable_taskbar_on_phones
Change-Id: I27ee8aefa7dbb42028de4c2de617c0deac4452e8
2024-08-04 09:47:59 -07:00
Mykola Podolian f34c84e99a Merge "Refactored TaskbarInsetsController" into main 2024-08-03 03:52:31 +00:00
Vinit Nayak 3d5c302f04 Merge "Remove non-shell transitions split code from SystemUiProxy" into main 2024-08-02 23:56:22 +00:00
Mady Mellor 5e8c0d60cc Move bubble icon / content loading into its own controller class
I think this simplifies the BubbleBarController class and makes it
a bit easier to deal with the optional overflow (done in other CLs).

Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - add some bubble to bubble bar, check that the overflow
               is there & can be opened
Bug: 334175587
Change-Id: Ie17fa0279a981a019d5d50b9f71dc87f49d98dee
2024-08-02 10:30:00 -07:00
Riddle Hsu a3c17fc075 Use rotation hint to update layout
The info from DisplayController is the rotation of display.
While the rotation hint is from the current configuration of
the activity. Because system supports to display activities
with individual rotation at the same time, it is more accurate
to use the hint for layout.

Because there are 4 DeviceProfile instances for 4 rotations.
The instance will be used for corresponding rotation. So the seascape
attributes is a final state which no longer needs to be updated.

Bug: 356164050
Flag: EXEMPT bugfix
Test: Enable auto rotation. Enable home rotation.
      Launch a fixed portrait activity.
      Rotate device to 270 degree (seascape).
      Swipe navigation to return to home.
      Home should use 270 layout directly instead of 90
      and then change to 270 after animation is finished.

Change-Id: Iad0f6ada0ec1cb7f0b5281b508d58276332076fb
2024-08-02 16:40:24 +08:00
mpodolian 8f08dff1f2 Refactored TaskbarInsetsController
Refactored
onTaskbarOrBubblebarWindowHeightOrInsetsChanged(). Made code more kotlin
idiomatic and easier to read.

Flag: com.android.wm.shell.enable_bubble_bar
Test: N/A. Refactoring
Bug: 356903636
Change-Id: If839856c449a9799c4c039d5e9b7fd30595c11aa
2024-08-01 17:59:48 -07:00
Mykola Podolian a75794384c Merge "Updated how taskbar touch area is being set." into main 2024-08-02 00:18:20 +00:00
Vinit Nayak eb6405115b Remove non-shell transitions split code from SystemUiProxy
Bug: 266482558
Flag: EXEMPT cleanup
Test: Compiles
Change-Id: Ia9d2a7661a0f1833aed08194f23822765769bb14
2024-08-01 16:51:52 -07:00
mpodolian 2ed3a37c70 Updated how taskbar touch area is being set.
Included bubble bar bounds to the taskbar touch area instead of
replacing taskbar touch area.

Fixes: 356903636
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Switch to the persistent task bar mode, have bubble. Go to
any application or overview. Task bar icons are touchable.

Change-Id: I3775c2e69a7bf89f1d5223707d7c4c94175fcfa8
2024-08-01 15:18:03 -07:00
Vinit Nayak 557868618c Merge "Remove non-shell transitions code from SplitSelectStatController" into main 2024-08-01 19:23:48 +00:00
Treehugger Robot a6e8616980 Merge "Revert "Add debug logs to TopTaskTracker"" into main 2024-08-01 16:07:57 +00:00
Treehugger Robot dae3f1d6ca Merge "Increase number of triggers for taskData reloading in TasksRepository" into main 2024-08-01 13:41:26 +00:00
Treehugger Robot ca4cc641ce Merge "Fix filtering of DesktopTaskViews" into main 2024-08-01 12:29:09 +00:00
Alex Chau 4c7dcc4b02 Increase number of triggers for taskData reloading in TasksRepository
- Simplified AbsSwipeUpHandler.switchToScreenshot to remove the unused refreshView=false parameter, so we RecentsView.updateThumbnail don't need to return a TaskView
- Changed TasksRepository.setThumbnailOverride to addThumbnailOverride, that'll accumulate overrides being sent to it
- Handled RecentsView.updateThumbnail to add an override to TasksRepository
- visibleTaskIds being sent to TasksRepository now take acccount of fileering out mTmpRunningTasks
- Updated a few TODOs around thumbnail/icon reloading

Bug: 342560598
Test: TasksRepositoryTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ia892819c45f20e82fbda275fd0e39081d6362cb6
2024-08-01 12:42:00 +01:00
Orhan Uysal 9c0392e08d Fix filtering of DesktopTaskViews
When finding last active tasks we didn't account for the fact that there
could be more than 2 tasks in a GroupTask. This cl fixes that so it
finds the correct last active tasks in desktop cases.

Also make sure that if a  DesktopTaskView is found, we don't launch it
through TaskView#LaunchTasks to create a transition that we can handle
in WM Shell.

Fix: 327447672
Fix: 354171747
Flag: EXEMPT Bugfix
Test: atest SplitSelectStateControllerTest
Change-Id: I71cc630a79f23e5eaad10b3c2284496422ce6994
2024-08-01 10:12:03 +00:00
Vinit Nayak 3c33587809 Remove non-shell transitions code from SplitSelectStatController
Bug: 266482558
Test: Compiles
Flag: EXEMPT cleanup
Change-Id: I12674a0b72be7340afb27ee5d5906970c3da74cb
2024-07-31 17:07:11 -07:00
Jagrut Desai 1a9ad91ec9 Merge "Taskbar Divider Container" into main 2024-07-31 22:59:49 +00:00
Jagrut Desai c51eaf2a5c Taskbar Divider Container
This cl includes
	- Taskbar Divider container implementation without click listenrs.

Test: Presubmit
Bug: 350571890
Flag: com.android.launcher3.enable_taskbar_customization
Change-Id: I07edd35c685b20e335d358aff2d15b09f6b73f14
2024-07-31 13:39:07 -07:00
Treehugger Robot c6290acda3 Merge "[dev_option][More flags 4/n] Update all usages of Taskbar-show running apps flag to use DesktopModeFlags." into main 2024-07-31 19:48:54 +00:00
Mykola Podolian fcde085beb Merge "Integrated new BubbleStashControllers into the existing code." into main 2024-07-31 16:43:17 +00:00
Alina Zaidi a9a5ecf3dc [dev_option][More flags 4/n] Update all usages of Taskbar-show running
apps flag to use DesktopModeFlags.

Test: Current tests pass
Bug: 348193756
Flag: com.android.window.flags.show_desktop_windowing_dev_option
Change-Id: Id63de7c9630fcc5ab2185829b42883e51774cfcf
2024-07-31 15:34:46 +00:00
Alina Zaidi 00614eae0e Use DesktopModeStatus#canEnterDesktopMode instead of just Flag check.
Test: Existing tests pass
Bug: 349544589
Flag: EXEMPT minor refactoring
Change-Id: Idf572d48d35b8eeedd7fd1b8c608834d27a818e7
2024-07-31 10:47:16 +00:00
mpodolian 484ff0fe9c Integrated new BubbleStashControllers into the existing code.
Integrated the PersistentTaskbarStashController and the
TransientTaskbarStashController into the launcher code. Made changes to
the TaskbarInsetsController to set appropriate touchable zones. Updated
the TaskbarUIController to not start the overview transition on clicks
for the collapsed bubble bar.

Bug: 346391377
Fixes: 350065038
Fixes: 355664783
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Test: com.android.launcher3.taskbar package tests

persistent taskbar and transient taskbar manual testing:
- on launcher home screen expand bubble bar, switch between bubbles,
remove bubble via bubble menu, add bubble, remove bubble with the drug
gesture, add bubble, collapse bubble bar
- repeat previous test on launcher overview screen and inside any
application
- after last test drag expanded bubble view to the opposite side of the
screen

Change-Id: I50f2c510854c4895fdfc9bd453a261c2103286fd
2024-07-30 18:36:05 -07:00
Jagrut Desai f35cb42732 Merge "Initialize TaskbarFeatureEvaluator and SpecsEvaluator onlyu if customization is on" into main 2024-07-30 22:19:10 +00:00
Vinit Nayak 0e5e564557 Merge "Call FallbackRecentsView#init() before setContentView()" into main 2024-07-30 20:05:11 +00:00
Mykola Podolian bd8b839e0d Merge "Added scrim visibility check." into main 2024-07-30 18:19:01 +00:00
Vinit Nayak aeecb1e8a5 Call FallbackRecentsView#init() before setContentView()
* Init sets mSplitSelectStateController which RecentsView
then uses in onAttachedToWindow(). That needs to be set
before it gets attached to the window, which happens in
RecentsActivity#setContentView()

Fixes: 332643607
Test: Only presubmit, issue not reproducible
Flag: EXEMPT bugfix
Change-Id: Icc555cad17b734e2a9c035991c19bbdc6b02de5d
2024-07-30 10:48:40 -07:00
Mykola Podolian 0211d2e168 Merge "Change shadow drawing for bubble bar icons." into main 2024-07-30 17:16:51 +00:00
Jon Miranda e8b47c540f Merge "Add support for taskbar background to wrap around hotseat" into main 2024-07-30 15:59:48 +00:00
Liran Binyamin 6c2e466edd Merge "Animate the bubble badge" into main 2024-07-30 12:35:32 +00:00
Alex Chau e7a87f3fa8 Merge "Don't show splash when thumbnail is null in SplashAlphaUseCaseTest" into main 2024-07-30 10:44:50 +00:00