Remove setCurrentPlayTime call as it causes a crash.
In the previous change [1], we remove the duration
from the AnimatorSet so that the preview item
animations can finish faster than the other animations.
This causes the call to setCurrentPlayTime to crash,
because we never set a duration on the AnimatorSet.
This can be solved by creating a ValueAnimatorSet (future CL).
1: If63d4d032078ff4e28b72a09e35da3a71f1d0e27
Bug: 35064148
Change-Id: Ieed21e1ba8e669132188ce15fc20195ac841d14c
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index 20c2612..8bbc99d 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -516,12 +516,7 @@
}
private void startAnimation(final AnimatorSet a) {
- long startTime = 0;
if (mCurrentAnimator != null && mCurrentAnimator.isRunning()) {
- // This allows a nice transition when closing a Folder while it is still animating open.
- if (BuildCompat.isAtLeastO()) {
- startTime = mCurrentAnimator.getDuration() - mCurrentAnimator.getCurrentPlayTime();
- }
mCurrentAnimator.cancel();
}
a.addListener(new AnimatorListenerAdapter() {
@@ -536,9 +531,6 @@
mCurrentAnimator = null;
}
});
- if (BuildCompat.isAtLeastO()) {
- a.setCurrentPlayTime(startTime);
- }
a.start();
}