Commit Graph

23356 Commits

Author SHA1 Message Date
Treehugger Robot 8173c2b5a8 Merge "Revert "Dismiss recents when device goes to sleep"" into main 2025-01-07 10:54:56 -08:00
Treehugger Robot 5b52f8ea8e Merge "Refactor getHighestVisibleTaskIndex to return TaksView and remove requiredTaskViewAt" into main 2025-01-07 10:20:51 -08:00
Will Osborn 7fecb97dfb Move recents dependency destruction to onDestroy from onDetachedWindow
With Overview running in a window, this clearing up needs to move later in the  lifecycle.

Bug: 388232647
Test: ran locally on device
Flag: EXEMPT bugfix
Change-Id: Id35c7fce390c2874b453c8b14c4eb0e7220ccd94
2025-01-07 17:51:30 +00:00
Alex Chau 0a7fc448e6 Correctly use areDesktopTasksVisibleAndNotInOverview() in DesktopVisibilityController
- The refactoring ag/30993068 mis-use areDesktopTasksVisible() instead of areDesktopTasksVisibleAndNotInOverview()
- This causes Taskbar mode to change at wrong timing

Bug: 388266322
Test: Swipe up from fullscreen app, launch desktop task
Flag: EXEMPT bugfix
Change-Id: I75a4c7497fe7e4d03a4029d678086f859c8c55b8
2025-01-07 17:45:37 +00:00
samcackett 9e1b1cd5fa Ensure split screen cancel label doesn't wrap
Fix: 379811238
Bug: 328577545
Bug: 345128488
Test: Visual inspection of instructions view in different languages/form
factors and display densities
Flag: EXEMPT bugfix

Change-Id: Iabdb76b7a02957e1918475b8a00f395f64e96301
2025-01-07 17:27:40 +00:00
Ats Jenk c2012f23d3 Merge "Add debug logging to root cause tap issues" into main 2025-01-07 09:09:48 -08:00
Schneider Victor-Tulias 7fe128f148 Add debug logs to SpringAnimationRunner.onUpdate
Flag: com.android.launcher3.enable_additional_home_animations
Bug: 387942297
Test: checked logs
Change-Id: I3627269a7132623fd315226813fbefc856a541d6
2025-01-07 11:36:07 -05:00
Alex Chau 3aca1797ee Refactor getHighestVisibleTaskIndex to return TaksView and remove requiredTaskViewAt
- Removed last usage of requiredTaskViewAt, which is a dangerous method assuming there must be a TaskView at certain index

Bug: 379942019
Test: manually on Task rebalancing after dismiss
Flag: EXEMPT refactor
Change-Id: Ib53e0f47435d6fb9f8fd42f89b045160e75b5e54
2025-01-07 16:09:11 +00:00
Schneider Victor-tulias a4c8c7fafb Merge changes Iceb7c9cf,I1e802e67 into main
* changes:
  Fix NPE in LauncherSwipeHandlerV2Test.setup
  Update recents states sent to tests by RecentsWindowManager
2025-01-07 07:46:03 -08:00
Schneider Victor-Tulias 4cf5febd2d Fix NPE in LauncherSwipeHandlerV2Test.setup
RecentsDisplayModel doesn't need to be a mock. If it is mocked, then RecentsDisplayModel.getFallbackWindowInterface also needs to be mocked.

Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 377678992
Test: pre/post submit
Change-Id: Iceb7c9cf6e9c3b0f3d08f85097ee3fde7e71f157
2025-01-07 10:41:25 -05:00
Schneider Victor-Tulias 878b2af8ea Update recents states sent to tests by RecentsWindowManager
Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 382527932
Test: Tapl tests
Change-Id: I1e802e6787570e781d59e61cf03ce62c8a1edb47
2025-01-07 10:41:17 -05:00
Artsiom Mitrokhin 4d3a1a4370 Use conditional stroke color for taskbak overflow entrypoint
Bug: 383556682
Flag: com.android.launcher3.taskbar_overflow
Test: manual
Change-Id: I3f2d0812e3a0004c76a5597fa9b359f7a0918195
2025-01-07 10:37:57 -05:00
Treehugger Robot 1165fb5a71 Merge "Adding ThemeManager as a centralized place for controlling icon theming" into main 2025-01-07 07:02:43 -08:00
Gustav Sennton 3bec45cdee Override desktop tasks corner radius during recents transition
Set the corner radius of desktop task surfaces to 0 during recents
transitions so that corner radius doesn't interfere with the surface
bounds and corner radius applied to the RemoteAnimationTarget leashes.

Bug: 378657004
Test: manual
Flag: com.android.window.flags.enable_desktop_recents_transitions_corners_bugfix

Change-Id: Ia653ace883cabfcd573ac138cb22affd96f7f229
2025-01-07 14:36:15 +00:00
Jordan Silva 612b124b75 Revert "Dismiss recents when device goes to sleep"
This reverts commit aed3b14abc.

Reason for revert: This fix introduced other issues, see b/386304079, b/384731940

Bug: 319365581
Bug: 386304079
Bug: 384731940
Change-Id: Ib49975208888fe54dd8bfb8dc3815f8825c8b5e8
2025-01-07 05:00:56 -08:00
Wei Sheng Shih a6ee3810c8 Merge "Reduce extra binder call for take task snapshot.(2/2)" into main 2025-01-07 03:04:35 -08:00
Vinay Joglekar 09be152da2 Merge "Add instrumentation for adding overview task to desktop window using overivew task's menu." into main 2025-01-07 00:08:15 -08:00
Sunny Goyal c369d1e4af Adding ThemeManager as a centralized place for controlling icon theming
Bug: 381897614
Flag: EXEMPT refactor
Test: atest ThemeManagerTest

Change-Id: Ib1dafdcc303f05f78cf586741c3d35243ab06e69
2025-01-06 21:53:22 -08:00
Sunny Goyal 0e3948a5fd Removing RotationTouchHelper state management from RecentsAnimationDeviceState
RotationTouchHelper is a singleton and can manage its lifecycle statically

Bug: 386288280
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: I3e3105ac982ec716d5e2ee10f459d3e1cf55cd0d
2025-01-06 16:33:35 -08:00
Ats Jenk 81c278f526 Add debug logging to root cause tap issues
Adding logs to the bubble bar tap handling.

Bug: 385928447
Test: n/a, adding logs
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I192d9b348c3d705197faae654df71133b6f10ec2
2025-01-06 16:12:58 -08:00
Treehugger Robot eb453571d9 Merge "Converting DesktopVisibilityController to a singleton" into main 2025-01-06 12:05:48 -08:00
vinayjoglekar 9d31790a7b Add instrumentation for adding overview task to desktop window using overivew task's menu.
Test needed to be updated since there is null check for the view and the context here.

https://source.corp.google.com/h/googleplex-android/platform/superproject/main-al-dev/+/main-al-dev:frameworks/base/core/java/com/android/internal/jank/InteractionJankMonitor.java;l=846

Bug: 339585622
Test: DesktopSystemShortcutTest
Flag: NONE new perfetto instrumentation
Change-Id: I33b7e83f548e8364ac09ffa7ba2cac7a52bbbf77
2025-01-06 11:20:24 -08:00
Treehugger Robot 9594716850 Merge "Use Dispatchers.Main.immediate to run code quickly that runs on main." into main 2025-01-06 09:57:58 -08:00
Hyunyoung Song d783b429c0 Merge "Prevent CtS invocation in fake landscape mode" into main 2025-01-06 09:33:58 -08:00
Uwais Ashraf b1f28aa75e Use Dispatchers.Main.immediate to run code quickly that runs on main.
immediate dispatcher schedules code on main (post{...}) if the current coroutine context is not main. However, if the coroutine context is main it will run synchronously without scheduling the work.

This removes all the continuations that come from initialisation of flow collectors.

Bug: 387511656
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Checking perfetto traces shows that this reduces the number of continuations on main by ~120 for 30 apps
Change-Id: I6c5ffba893e470c25d81f044f83cf43cb80588b8
2025-01-06 16:06:26 +00:00
Treehugger Robot 06a0f61573 Merge "Recycle tasks that are split when split select anim complete for reuse" into main 2025-01-06 07:34:10 -08:00
Jordan Silva 28b3bd608b Recycle tasks that are split when split select anim complete for reuse
Re-land this CL after memory leak and performance regression for time were fixed.

Change-Id: I726a5d7e970869e54e9ece736f97802b8d01b02e
Fix: 376428479
Fix: 383033231
Bug: 381352866
Flag: EXEMPT bugfix
Test: Manual verification of heap dumps
2025-01-06 05:36:58 -08:00
Johannes Gallmann 389d70bff6 Merge "Fix flicker in predictive back to home animation" into main 2025-01-06 02:33:47 -08:00
wilsonshih f6995393fb Reduce extra binder call for take task snapshot.(2/2)
It is not necessary to take the task snapshot from the Shell because
it is usually executed in the SystemUI process. The Launcher can perform
the same operation through ActivityManagerWrapper. Which can also help
release the memory since it won't referened by 3 processes.

Flag: EXEMPT bugfix
Bug: 238206323
Test: close task from recents, verify SystemUI won't hold the
snapshot memory

Change-Id: Ia3ac4487af348f926327bcfe3cbe869b8a96cbcd
2025-01-06 04:55:40 +00:00
Mykola Podolian 8b3f1e1c3f Merge "Fix bubble added from the overflow background arrow animation." into main 2025-01-04 10:24:15 -08:00
Hyunyoung Song 299576a777 Prevent CtS invocation in fake landscape mode
Bug: 383421642
Test: manual, atest ContextualSearchInvokerTest
Flag: EXEMPT bugfix

Change-Id: I71ff453c54ade4583494ae9a6b44560d59b010d8
2025-01-04 06:41:06 +00:00
mpodolian 7f88d9fc83 Fix bubble added from the overflow background arrow animation.
The new bubble animation now uses a "selected location" argument to
position the pointing arrow.

Test: BubbleAnimatorTest
Test: Manual. Create a bubble bar with overflow. Open the overflow menu
and click an overflow bubble icon. Observe that a new bubble is added
and immediately expands. Observe that the arrow animates to the new
bubble's position.
Test: Manual. Create a bubble bar with overflow. Open any bubble.
Trigger a new bubble notification. Observe that a new bubble is added
but does not expand, so the arrow remains at the currently open bubble.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 359952121

Change-Id: I47f5b6c2aad775f2dd3e70f8c544a3711f192342
2025-01-03 16:22:27 -08:00
Uwais Ashraf bdc352f645 Remove TaskViews and Clear All button from RecentsView.
This means that when Overview is being opened it doesn't have to do this work. Also many cancelled pieces of work are received on main because tasks and images are loaded before the TaskViews are removed. Removing TaskViews in onReset avoids this as CoroutineScopes for Views are already cancelled.

Bug: 387511656
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Checking perfetto traces shows that this reduces the number of continuations on main significantly
Test: Manual - opening Overview (from home, app)
Test: Manual - splitting an app
Test: Manual - overlay presence
Test: Manual - splash icon
Test: Presubmit (TAPL/image tests etc)
Change-Id: I871f3c3931bba733d579583d69bc197ccbcad132
2025-01-03 23:55:51 +00:00
Sunny Goyal 6d6529cff9 Merge "Converting LauncherPrefs to dagger" into main 2025-01-03 14:18:19 -08:00
Sunny Goyal e79d453bc8 Converting LauncherPrefs to dagger
Fixing ENABLE_TWOLINE_ALLAPPS_TOGGLE not properly tied to IDP:
http://recall/-/ep7WJ8pKwCEklUN5J1mAkM

Bug: 361850561
Flag: EXEMPT dagger-migration
Test: atest LauncherPrefsTest FakeLauncherPrefsTest
Change-Id: Iba63d060f4a8c2e31033fca2a4638c559c161338
2025-01-03 13:49:53 -08:00
Treehugger Robot 3ba7d458d4 Merge "Make fetch thumbnails call on bg thread to reduce thread switching" into main 2025-01-03 13:48:01 -08:00
Uwais Ashraf 53c627afa9 Make fetch thumbnails call on bg thread to reduce thread switching
Fix: 369590189
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Side-by-side checking videos for improvement (b/369590189#comment6)
Test: TasksRepositoryTest
Change-Id: I26dde455b4e864077ec6ee6ce145e7fadc0840a7
2025-01-03 19:56:43 +00:00
Uwais Ashraf 201ae49e99 Make overlay run in background instead of unconfined (main)
This means that when TaskOverlayViewModel.overlayState is combining flows it does it on background. If this combination results in an emission then there is still a message to main but if it does not emit (e.g. no change filtered by distinctUntilChanged()) then it will not result in a continuation on main.

Bug: 387511656
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Checking perfetto traces shows that this reduces the number of continuations on main significantly
Test: Manual - overlay presence + select functionality
Test: Presubmit (TAPL/image tests etc)
Change-Id: I840cb86e91db5a0626191b5eab145978ef4192e9
2025-01-03 19:38:27 +00:00
Treehugger Robot 8b0ba112cc Merge "Fix flake in BubbleBarViewAnimatorTest" into main 2025-01-03 09:33:40 -08:00
Ats Jenk e86c88d29d Merge "Increase bubble bar tap timeout" into main 2025-01-03 09:31:02 -08:00
Johannes Gallmann 0d9caa737f Fix flicker in predictive back to home animation
The predictive back to home animation has a small flicker sometimes with the predictive_back_to_home_polish flag enabled. It is caused by the setLauncherScale call in LauncherBackAnimationController#finishAnimation.

To fix this, we no longer make that call in the case when back is committed, but only when back is cancelled. It's not necessary to make the call in the commit case anyways because the ScalingWorkspaceRevealAnim takes care of the Launcher scale in that case.

The reason for the flicker is that finishAnimation is called BEFORE the ScalingWorkspaceRevealAnim has finished, causing them to interfere. This is expected. We don't want to wait for the ScalingWorkspaceRevealAnim (which has a very soft and slow landing). Instead, we only want to wait for the spring animation that animates the app window into the Launcher icon, which ends earlier.

Bug: 382453424
Test: Manual, i.e. verified that flicker is not reproducible
Flag: com.android.launcher3.predictive_back_to_home_polish
Change-Id: I6bb04cd5b168442f39debb66872c668c5ad58fcd
2025-01-03 08:00:32 -08:00
Liran Binyamin 65a045ca77 Fix flake in BubbleBarViewAnimatorTest
Flag: EXEMPT test only
Bug: 384807919
Test: atest BubbleBarViewAnimatorTest
Change-Id: I44b9d77f0b2803ef363f7931d07749961e416e27
2025-01-03 09:45:47 -05:00
Treehugger Robot 5aac5dbde1 Merge "Convert TaskIconCache and TaskThumbnailCache to kotlin" into main 2025-01-03 06:19:35 -08:00
Treehugger Robot 5c3a0d7827 Merge "Combine RecentsViewStateController with base class" into main 2025-01-03 04:52:44 -08:00
Uwais Ashraf b6a733843c Convert TaskIconCache and TaskThumbnailCache to kotlin
Bug: 369590189
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Presubmits
Change-Id: I1becdcdf2fffd2c1fe548e7f182a7fd851be3c08
2025-01-03 03:43:35 -08:00
Alex Chau e70eda424b Combine RecentsViewStateController with base class
- BaseRecentsViewStateController is only inherited by RecentsViewStateController, remove the base class to simplify code
- Also converted RecentsViewStateController to Kotlin and remove a bunch of warnings

Fix: 387267938
Test: presubmit and manual
Flag: EXEMPT refactor
Change-Id: I18e9c2b186a64a0af39230cb41e3b3f4949107d5
2025-01-03 10:37:57 +00:00
Ats Jenk 048d2e5605 Increase bubble bar tap timeout
We were using only 100ms for bubble bar tap timeout. That made it
difficult to tap to expand the bubble bar.
The constant we were using, per javadoc, is for distinguishing scroll vs
tap.
Updating the timeout constant to long-press timeout value. If the tap is
shorter than the long-press timeout (400ms by default), it is considered
a tap.
This should make it easier to tap the bar.
Also fixing the long-press to drag timeout on the bubble bar. We were
using only half of the long-press timeout constant.

Bug: 385928447
Test: tap on bubble bar to expand it, long-press on bubble bar to move
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I2df51a3caaa19ceb5b013d9377ebedd611ef84f3
2025-01-02 18:04:06 -08:00
Treehugger Robot 36dd91d125 Merge "Revert "Adding screen record for for the case when quick switch gesture doesn't do anything"" into main 2025-01-02 09:13:38 -08:00
Treehugger Robot 7482e5cbe2 Merge "Fixing prediction ring color not getting updated if the icon changes while the slot animation is running" into main 2024-12-30 14:27:50 -08:00
Sunny Goyal ad61173ca2 Converting DesktopVisibilityController to a singleton
This avoids a persistant connection to TouchInteractionService from WMProxy,
which keeps the service alive all the time

Bug: 384896306
Test: Presubmit
Flag: EXEMPT bugfix
Change-Id: Id6fe59471c8c3f9874514f71126631f217ab610c
2024-12-30 12:54:19 -08:00