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

Commit b13b745a authored by Jerry Chang's avatar Jerry Chang Committed by Android (Google) Code Review
Browse files

Merge "Fix back to split pair from overview with shell-transition hang."

parents 2c216337 8959d0b1
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -1207,6 +1207,27 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        return out;
    }

    @Override
    public void onTransitionMerged(@NonNull IBinder transition) {
        // Once the pending enter transition got merged, make sure to bring divider bar visible and
        // clear the pending transition from cache to prevent mess-up the following state.
        if (transition == mSplitTransitions.mPendingEnter) {
            mSplitLayout.init();
            setDividerVisibility(true, null /* transaction */);
            setSplitsVisible(true);
            mShouldUpdateRecents = true;
            updateRecentTasksSplitPair();

            if (!mLogger.hasStartedSession()) {
                mLogger.logEnter(mSplitLayout.getDividerPositionAsFraction(),
                        getMainStagePosition(), mMainStage.getTopChildTaskUid(),
                        getSideStagePosition(), mSideStage.getTopChildTaskUid(),
                        mSplitLayout.isLandscape());
            }
            mSplitTransitions.mPendingEnter = null;
        }
    }

    @Override
    public boolean startAnimation(@NonNull IBinder transition,
            @NonNull TransitionInfo info,
+1 −5
Original line number Diff line number Diff line
@@ -246,10 +246,6 @@ public class RemoteTransitionCompat implements Parcelable {
                if (mPausingTasks.contains(openingTasks.get(i).getContainer())) {
                    ++pauseMatches;
                }
                if (openingTasks.get(i).getContainer().equals(mPausingTasks.get(i))) {
                    // In this case, we are "returning" to an already running app, so just consume
                    // the merge and do nothing.
                }
            }
            if (pauseMatches > 0) {
                if (pauseMatches != mPausingTasks.size()) {
@@ -275,9 +271,9 @@ public class RemoteTransitionCompat implements Parcelable {
                t.reparent(target.leash.mSurfaceControl, mInfo.getRootLeash());
                t.setLayer(target.leash.mSurfaceControl, layer);
                t.hide(target.leash.mSurfaceControl);
                t.apply();
                targets[i] = target;
            }
            t.apply();
            recents.onTasksAppeared(targets);
            return true;
        }