summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2020-03-18 12:22:50 -0700
committerJonathan Miranda <jonmiranda@google.com>2020-03-25 15:27:52 +0000
commit7899902b12dd7c4aece48585d4921bdf33d27194 (patch)
treee78cfe2d698be9b63c810284df3d1aa7db943a67
parent66dc70c91b22026800b6f7cfb85fe233a72fd462 (diff)
downloadpackages_apps_Trebuchet-7899902b12dd7c4aece48585d4921bdf33d27194.tar.gz
packages_apps_Trebuchet-7899902b12dd7c4aece48585d4921bdf33d27194.tar.bz2
packages_apps_Trebuchet-7899902b12dd7c4aece48585d4921bdf33d27194.zip
Ensure current animation is cancelled before building new folder animation.
Fixes bug where folder clip padding gets stuck as false. Bug: 146884730 Change-Id: I3a24e561d15fbc46837bb21cd8f97283e69f9ce1 (cherry picked from commit 9794d4d52a8083514186774fb9a57764dff35ec4)
-rw-r--r--src/com/android/launcher3/folder/Folder.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index f483d78f4..8df5e7d03 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -445,9 +445,6 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
}
private void startAnimation(final AnimatorSet a) {
- if (mCurrentAnimator != null && mCurrentAnimator.isRunning()) {
- mCurrentAnimator.cancel();
- }
final Workspace workspace = mLauncher.getWorkspace();
final CellLayout currentCellLayout =
(CellLayout) workspace.getChildAt(workspace.getCurrentPage());
@@ -553,6 +550,9 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
// dropping. One resulting issue is that replaceFolderWithFinalItem() can be called twice.
mDeleteFolderOnDropCompleted = false;
+ if (mCurrentAnimator != null && mCurrentAnimator.isRunning()) {
+ mCurrentAnimator.cancel();
+ }
AnimatorSet anim = new FolderAnimationManager(this, true /* isOpening */).getAnimator();
anim.addListener(new AnimatorListenerAdapter() {
@Override
@@ -653,6 +653,9 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
}
private void animateClosed() {
+ if (mCurrentAnimator != null && mCurrentAnimator.isRunning()) {
+ mCurrentAnimator.cancel();
+ }
AnimatorSet a = new FolderAnimationManager(this, false /* isOpening */).getAnimator();
a.addListener(new AnimatorListenerAdapter() {
@Override