From 9e0d0ed0de7b230eed21872eed45e9bc6ae6a7b1 Mon Sep 17 00:00:00 2001 From: Nick Chameyev Date: Wed, 8 Sep 2021 16:39:15 +0100 Subject: [PATCH] [Taskbar icons unfold animation issue] Do not take into account initial translation Removes taking into account initial translation in move from center animation. Initially it was done because in StatusBar items are aligned using translations but we decided to use different approach there so it is not necessary anymore. Now move from center animator can only set translations from positive/negative value when progress is 0 and sets it to 0 when progress is 1 (previously it was 'capturing' the initial translation and animated the translation to its original value). Taskbar icons are pre-aligned using translations when user is on launcher. After several folds/unfolds these translations were accumulating that led to incorrect positioning of the icons. Found one more issue that we didn't clear the animated views list after finishing the animation in taskbar unfold animation controller but it didn't affect the animation itself. Test: atest com.android.systemui.shared.animation.UnfoldMoveFromCenterAnimatorTest Test: unfold on launcher and use gesture nav to swipe to an app Fixes: 199126683 Change-Id: Icfb29d79fdd8f04eb5a9a369a3d01c15fd321c75 --- .../launcher3/taskbar/TaskbarUnfoldAnimationController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarUnfoldAnimationController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarUnfoldAnimationController.java index 43f015cd2d..978bd470ff 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarUnfoldAnimationController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarUnfoldAnimationController.java @@ -77,6 +77,7 @@ public class TaskbarUnfoldAnimationController { @Override public void onTransitionFinished() { mMoveFromCenterAnimator.onTransitionFinished(); + mMoveFromCenterAnimator.clearRegisteredViews(); } @Override