From ac3a64dbf4a6bcde4966d4bf581b8a35d7cddf9d Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Tue, 7 Mar 2017 09:28:14 -0800 Subject: [PATCH] Fix bug where FolderIcon is invisible when closing Folder with no animation. When we open the Folder, we set the FolderIcon to View.INVISIBLE. It is possible to close the Folder without animating it (ie. when apps are being auto added / auto closed to Work Profile Folder), and so the FolderIcon is never set to View.VISIBLE. Bug: 35064148 Change-Id: I2fc5b7ecaceffde0a3f3875870897c18e6e8dadf --- src/com/android/launcher3/folder/Folder.java | 8 ++++++-- .../android/launcher3/folder/FolderAnimationManager.java | 6 ------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java index 5b0dfdb9fe..23777bdc86 100644 --- a/src/com/android/launcher3/folder/Folder.java +++ b/src/com/android/launcher3/folder/Folder.java @@ -771,10 +771,14 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC } mDragController.removeDropTarget(this); clearFocus(); - if (wasAnimated) { - mFolderIcon.requestFocus(); + if (mFolderIcon != null) { + mFolderIcon.setVisibility(View.VISIBLE); + if (wasAnimated) { + mFolderIcon.requestFocus(); + } } + if (mRearrangeOnClose) { rearrangeChildren(); mRearrangeOnClose = false; diff --git a/src/com/android/launcher3/folder/FolderAnimationManager.java b/src/com/android/launcher3/folder/FolderAnimationManager.java index d14bb40eca..9ce1c57c7a 100644 --- a/src/com/android/launcher3/folder/FolderAnimationManager.java +++ b/src/com/android/launcher3/folder/FolderAnimationManager.java @@ -135,12 +135,6 @@ public class FolderAnimationManager { public AnimatorSet getClosingAnimator() { AnimatorSet a = getAnimatorSet(false /* isOpening */); a.setInterpolator(mClosingInterpolator); - a.addListener(new AnimatorListenerAdapter() { - @Override - public void onAnimationEnd(Animator animation) { - mFolderIcon.setVisibility(View.VISIBLE); - } - }); return a; }