Set start time for open folder animation before starting the animation
The start time of the animation was being set after the animation started
causing the animation to jump to an start time after it already
started wich was very obvious when setting the animation speed to 0.
To test set the aimation speed to zero like so:
adb shell settings put global animator_duration_scale 0
adb shell settings put global transition_animation_scale 0
adb shell settings put global window_animation_scale 0
Fix: 279662507
Test: explained above
Test: FolderScreenShootTest will test it in the future
Change-Id: Id6e10720ffdf64e062e533cd3187f386f57ae906
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index c9fe745..3c31b7a 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -733,10 +733,11 @@
}
mPageIndicator.stopAllAnimations();
- startAnimation(anim);
+
// Because t=0 has the folder match the folder icon, we can skip the
// first frame and have the same movement one frame earlier.
anim.setCurrentPlayTime(Math.min(getSingleFrameMs(getContext()), anim.getTotalDuration()));
+ startAnimation(anim);
// Make sure the folder picks up the last drag move even if the finger doesn't move.
if (mDragController.isDragging()) {