Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddf64806 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix bug where icon is no present during app close animation." into ub-launcher3-qt-r1-dev

parents c837b3a9 826cdcd3
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -505,7 +505,8 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
                initAnimFactory.run();
                initAnimFactory.run();
            }
            }
        }
        }
        AbstractFloatingView.closeAllOpenViews(activity, mWasLauncherAlreadyVisible);
        AbstractFloatingView.closeAllOpenViewsExcept(activity, mWasLauncherAlreadyVisible,
                AbstractFloatingView.TYPE_LISTENER);


        if (mWasLauncherAlreadyVisible) {
        if (mWasLauncherAlreadyVisible) {
            mStateCallback.setState(STATE_LAUNCHER_DRAWN);
            mStateCallback.setState(STATE_LAUNCHER_DRAWN);
+4 −6
Original line number Original line Diff line number Diff line
@@ -224,12 +224,10 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
        if (child instanceof AbstractFloatingView) {
        if (child instanceof AbstractFloatingView) {
            // Handles the case where the view is removed without being properly closed.
            // Handles the case where the view is removed without being properly closed.
            // This can happen if something goes wrong during a state change/transition.
            // This can happen if something goes wrong during a state change/transition.
            postDelayed(() -> {
            AbstractFloatingView floatingView = (AbstractFloatingView) child;
            AbstractFloatingView floatingView = (AbstractFloatingView) child;
            if (floatingView.isOpen()) {
            if (floatingView.isOpen()) {
                    floatingView.close(false);
                postDelayed(() -> floatingView.close(false), SINGLE_FRAME_MS);
            }
            }
            }, SINGLE_FRAME_MS);
        }
        }
    }
    }


+5 −5
Original line number Original line Diff line number Diff line
@@ -574,17 +574,17 @@ public class FloatingIconView extends View implements
                    if (cancellationSignal.isCanceled()) {
                    if (cancellationSignal.isCanceled()) {
                        return;
                        return;
                    }
                    }
                    if (mIconLoadResult.isIconLoaded) {

                    setIcon(originalView, mIconLoadResult.drawable, mIconLoadResult.badge,
                    setIcon(originalView, mIconLoadResult.drawable, mIconLoadResult.badge,
                            mIconLoadResult.iconOffset);
                            mIconLoadResult.iconOffset);
                    }

                    // Delay swapping views until the icon is loaded to prevent a flash.
                    // Delay swapping views until the icon is loaded to prevent a flash.
                    setVisibility(VISIBLE);
                    setVisibility(VISIBLE);
                    originalView.setVisibility(INVISIBLE);
                    originalView.setVisibility(INVISIBLE);
                };
                };
                mLoadIconSignal = cancellationSignal;
            }
            }
        }
        }
        mLoadIconSignal = cancellationSignal;
    }
    }


    private void setBackgroundDrawableBounds(float scale) {
    private void setBackgroundDrawableBounds(float scale) {