Fix recents animation flicker

The recents animation can sometimes start before launcher has started when started with 3-button mode. This causes the animation to start before the recents UI has been initialized by Launcher. Added a callback to properly synchronize launcher start and the recents animation.

Fixes: 229360539
Test: started the recents animation and checked logs (order of operations), when the recents animation or launcher started first
Change-Id: I5938bbba778a2886b4a1e4ee4844eaf28c6fac0e
This commit is contained in:
Schneider Victor-tulias
2022-04-27 16:39:29 -07:00
parent bb44c03b1c
commit 9f922d3598
5 changed files with 28 additions and 6 deletions

View File

@@ -217,7 +217,8 @@ public class OverviewCommandHelper {
@Override
public void onRecentsAnimationStart(RecentsAnimationController controller,
RecentsAnimationTargets targets) {
interactionHandler.onGestureEnded(0, new PointF(), new PointF());
activityInterface.runOnInitBackgroundStateUI(() ->
interactionHandler.onGestureEnded(0, new PointF(), new PointF()));
cmd.removeListener(this);
}