Manually revert ag/30692743 because of a performance
regression tracking at b/385612978 .
Flag: EXEMPT as reverting
Bug: 385612978
Test: Manual
Change-Id: Iadcdc07588755ee47b6d6d37db08291aa707ecfe
- Fixes a deadlock created when initializing RecentsDisplayModel
- Also fixes an IllegalStateException when initializing RecentsDisplayModel before the default display has initialized
Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 377678992
Test: pre/post submit
Change-Id: I5d3e000d722c311e0d5431034b68635c402c8109
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
- 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
- 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
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
RotationTouchHelper is a singleton and can manage its lifecycle statically
Bug: 386288280
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: I3e3105ac982ec716d5e2ee10f459d3e1cf55cd0d
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
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
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
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
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
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
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
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
- 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
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