Fix folder view sticking during close anim when transitioning launcher page and/or state

Bug: 470662985
Test: manual
Flag: EXEMPT BUGFIX
Change-Id: I7a4841ad49cbc0339f6905869a1bb092e7f0c094
This commit is contained in:
Charlie Anderson authored and Pun Butrach committed 2026-10-26 00:12:20 +07:00
1 parent d66ece9a9c
commit c754a217b9
2 files changed
+8 -3

No files matched your search

+5 -1
View File
@@ -18,6 +18,7 @@
package com.android.launcher3;
import static com.android.launcher3.AbstractFloatingView.TYPE_FOLDER;
import static com.android.launcher3.AbstractFloatingView.TYPE_WIDGET_RESIZE_FRAME;
import static com.android.launcher3.BubbleTextView.DISPLAY_FOLDER;
import static com.android.launcher3.LauncherAnimUtils.SPRING_LOADED_EXIT_DELAY;
@@ -1427,7 +1428,10 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
protected void onPageBeginTransition() {
// Widget resize frame doesn't receive events to close when talkback is enabled. For that
// case, close it here.
AbstractFloatingView.closeOpenViews(mLauncher, false, TYPE_WIDGET_RESIZE_FRAME);
// Open folders are already animated closed on first touch outside. If page is swiped after,
// then make sure folder is closed immediately.
AbstractFloatingView.closeOpenViews(mLauncher, false, TYPE_WIDGET_RESIZE_FRAME
| TYPE_FOLDER);
super.onPageBeginTransition();
updateChildrenLayersEnabled();
+3 -2
View File
@@ -1004,9 +1004,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
@Override
protected void handleClose(boolean animate) {
mIsOpen = false;
mContent.setCanAnnouncePageDescriptionForFolder(false);
if (!animate && mCurrentAnimator != null && mCurrentAnimator.isRunning()) {
mCurrentAnimator.cancel();
}
@@ -1040,6 +1038,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
private void animateClosed() {
if (mIsAnimatingClosed) {
cancelRunningAnimations();
return;
}
@@ -1096,6 +1095,8 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
}
private void closeComplete(boolean wasAnimated) {
mIsOpen = false;
// TODO: Clear all active animations.
BaseDragLayer parent = (BaseDragLayer) getParent();
if (parent != null) {