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

Commit 7214fd7e authored by Tony Huang's avatar Tony Huang
Browse files

DO NOT MERGE Fix divider animation from overview screen

Divider leash is create too quickly to make it show before the
animtation. Fix it by only create leash but don't show it before
animation start and set it to visible after animation end.

Fix: 215322621
Test: manual
Test: pass existing tests
Change-Id: Iaa068d5a6186cac1e1aad4b30d6f5e76943ebd08
parent bca4bd6b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -365,8 +365,10 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
    void startTasksWithLegacyTransition(int mainTaskId, @Nullable Bundle mainOptions,
            int sideTaskId, @Nullable Bundle sideOptions, @SplitPosition int sidePosition,
            float splitRatio, RemoteAnimationAdapter adapter) {
        // Ensure divider is invisible before transition.
        setDividerVisibility(false /* visible */);
        // Init divider first to make divider leash for remote animation target.
        setDividerVisibility(true /* visible */);
        mSplitLayout.init();
        // Set false to avoid record new bounds with old task still on top;
        mShouldUpdateRecents = false;
        final WindowContainerTransaction wct = new WindowContainerTransaction();
@@ -396,6 +398,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                            public void onAnimationFinished() throws RemoteException {
                                mIsDividerRemoteAnimating = false;
                                mShouldUpdateRecents = true;
                                setDividerVisibility(true /* visible */);
                                mSyncQueue.queue(evictWct);
                                mSyncQueue.runInSync(t -> applyDividerVisibility(t));
                                finishedCallback.onAnimationFinished();
@@ -420,6 +423,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
            public void onAnimationCancelled() {
                mIsDividerRemoteAnimating = false;
                mShouldUpdateRecents = true;
                setDividerVisibility(true /* visible */);
                mSyncQueue.queue(evictWct);
                mSyncQueue.runInSync(t -> applyDividerVisibility(t));
                try {