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
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index 5b0dfdb..23777bd 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -771,10 +771,14 @@
         }
         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 d14bb40..9ce1c57 100644
--- a/src/com/android/launcher3/folder/FolderAnimationManager.java
+++ b/src/com/android/launcher3/folder/FolderAnimationManager.java
@@ -135,12 +135,6 @@
     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;
     }