mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Fix bug where icon is no present during app close animation.
* WindowTransformSwipeHandler closes all AbstractFloatingViews, including ListenerView, which results in FloatingIconView getting removed. * In IconLoadResult.onIconLoaded, we remove the check for isIconLoaded since its not needed. This was also causing a race condition since isIconLoaded is not set to true until after we tell onIconLoaded to run. * In BaseDragLayer, we have a delay before checking if the view is open and then closing the floating view if true. This caused issues since we reycle the view. Now we check if the view is open before running the delay to call close. Bug: 136044361 Change-Id: I7442a589a62c3cdf90b70d146e0ecf3e4300ddf7
This commit is contained in:
@@ -224,12 +224,10 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
|
||||
if (child instanceof AbstractFloatingView) {
|
||||
// Handles the case where the view is removed without being properly closed.
|
||||
// This can happen if something goes wrong during a state change/transition.
|
||||
postDelayed(() -> {
|
||||
AbstractFloatingView floatingView = (AbstractFloatingView) child;
|
||||
if (floatingView.isOpen()) {
|
||||
floatingView.close(false);
|
||||
}
|
||||
}, SINGLE_FRAME_MS);
|
||||
AbstractFloatingView floatingView = (AbstractFloatingView) child;
|
||||
if (floatingView.isOpen()) {
|
||||
postDelayed(() -> floatingView.close(false), SINGLE_FRAME_MS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user