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
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
Without this the scope that gets cancelled can be the new one after re-attaching. This results in no flows working - hence blank thumbnails.
Fix: 369590189
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Manual - visually verified
Change-Id: Ie930d890095c30c4be8e87c795a06383ac06ea9e
while the slot animation is running
Slot animation is only trigerred through prediction update and it sets
final ring color at that point as part of the animation. If the icon
and the color change due to some other reason (like high-res icon or
a package-update), that color is overriden by the ongoing slot animation.
Bug: 381897614
Test: Verified manually by slowing down animation
Flag: EXEMPT bugfix
Change-Id: Ia3b86330afdb91ba6ff3366e3c8057bd7ec34e5d
This would eventually lead to breaking apart TIS into smaller classes,
which can be injected using dagger.
This is needed to migrate DisplayController to dagger
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger refactor
Change-Id: Ic15386136bf1705e76c08536cc0790f51e19ab73
This would make it easier to customize flags used on desktop icons
Bug: 366237794
Flag: EXEMPT refactor
Test: atest CacheLookupFlagTest
Change-Id: I0f3f04ddbe73abea207a5b58a65714ff172b2726
Use TaskViewsIterable to iterate all the current TaskViews
inside `RecentsView.updateGridProperties`. Remove all the indices
usage inside this function as well.
Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Verified that the TaskViews layout is correct in below scenarios:
1. Swipe up from an fullscreen app or from home
2. Dismiss the large tile, a TaskView in the middle either in the
top row or the bottom row, dismiss the last TaskView.
3. Clear all TaskViews
4. Swipe up to the right side of the edge to have a normal
TaskView as the snapped TaskView
5. Alt+Tab with more than 6 apps to enter Overview, with a
hidden TaskView from the alt+tab list as the snapped TaskView.
Change-Id: Ic01534ed03bcc654d5799f43f0cf659d2c86ca31
Added logic to do not adjust hotseat and QSB if the bubble bar is not
visible.
Test: Manual. Unfold foldable device, open bubbles test application,
trigger bubble via adb, wait until bubble bar is stashed, unfold the
device, go back to the home screen. Observe hotseat and QSB are not
squished.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 384903202
Change-Id: Ib03e02d977de6357069470171952afb20c681f20
The problem had two parts:
1 When BubbleBarViewController removed all views, including the overflow
bubble, it did not update the value of the mOverflowAdded field
2 BubbleBarController removed all views upon receiving an initial update
This CL addresses both issues.
Test: Manual. Ensure the overflow bubble is present in the bubble bar.
Rotate the device and verify that the overflow bubble remains visible.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 380281090
Change-Id: I1810671e6bfc5b8b402433697b07f3de2e612ed7
This is because onLayout can be called before onAttachedToWindow so this property needs to be initialised as it is used in onLayout.
Fix: 383733481
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Manual checking of split select and incorrect orientation for now but will be tested by view screenshot tests.
Change-Id: I40937b8b1b98209e77cb5ee64f5c4342b90faf97
- Implement TaskViewsIterable in TaksViewUtils using ViewGroup.children Sequence with a filter, this removes the need to write a custom Iterator
Bug: 379942019
Test: manual smoke test and presubmit
Flag: EXEMPT refactor
Change-Id: I2250a4dfbee49dfdb3319514eb0f3e4408606437
When user navigate back to Overview, getAllTaskData will be called and refresh the list of tasks in the repository which cleans the pre-loaded thumbnails and icons from the previous iteration.
In some cases, this causes the thumbnails to be blank in the recents. When getAllTaskData is called after the taskRequest is completed, the tasks will end up in an invalid state without the thumbnail and icon until the user scrolls through the recent apps list or re-open Overview.
Fix: 380067701
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TasksRepositoryTest
Change-Id: Ia15d905a2f5ceb71b87c0b91028ce88894524806