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

Commit 787a8c7d authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Revert "Make sure launcher side can animate divider"

This reverts commit 2fa2671b.

Reason for revert: This breaks SF when running flicker tests for quick switch

Change-Id: If0cfe67801b3ea55e480b42f0ceb75221563b0c7
parent 2fa2671b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -374,7 +374,7 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
    }

    RemoteAnimationTarget[] onGoingToRecentsLegacy(boolean cancel, RemoteAnimationTarget[] apps) {
        if (apps.length < 2) return null;
        if (!isSplitScreenVisible()) return null;
        final SurfaceControl.Builder builder = new SurfaceControl.Builder(new SurfaceSession())
                .setContainerLayer()
                .setName("RecentsAnimationSplitTasks")
+6 −20
Original line number Diff line number Diff line
@@ -369,8 +369,6 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
    void startTasksWithLegacyTransition(int mainTaskId, @Nullable Bundle mainOptions,
            int sideTaskId, @Nullable Bundle sideOptions, @SplitPosition int sidePosition,
            float splitRatio, RemoteAnimationAdapter adapter) {
        // Init divider first to make divider leash for remote animation target.
        mSplitLayout.init();
        final WindowContainerTransaction wct = new WindowContainerTransaction();
        // Need to add another wrapper here in shell so that we can inject the divider bar
        // and also manage the process elevation via setRunningRemote
@@ -387,15 +385,6 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                    augmentedNonApps[i] = nonApps[i];
                }
                augmentedNonApps[augmentedNonApps.length - 1] = getDividerBarLegacyTarget();

                IRemoteAnimationFinishedCallback wrapCallback =
                        new IRemoteAnimationFinishedCallback.Stub() {
                            @Override
                            public void onAnimationFinished() throws RemoteException {
                                mSyncQueue.runInSync(t -> setDividerVisibility(true, t));
                                finishedCallback.onAnimationFinished();
                            }
                        };
                try {
                    try {
                        ActivityTaskManager.getService().setRunningRemoteTransitionDelegate(
@@ -404,8 +393,8 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                        Slog.e(TAG, "Unable to boost animation thread. This should only happen"
                                + " during unit tests");
                    }
                    adapter.getRunner().onAnimationStart(transit, apps, wallpapers,
                            augmentedNonApps, wrapCallback);
                    adapter.getRunner().onAnimationStart(transit, apps, wallpapers, nonApps,
                            finishedCallback);
                } catch (RemoteException e) {
                    Slog.e(TAG, "Error starting remote animation", e);
                }
@@ -413,7 +402,6 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,

            @Override
            public void onAnimationCancelled() {
                mSyncQueue.runInSync(t -> setDividerVisibility(true, t));
                try {
                    adapter.getRunner().onAnimationCancelled();
                } catch (RemoteException e) {
@@ -880,7 +868,9 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,

    private void applyDividerVisibility(SurfaceControl.Transaction t) {
        final SurfaceControl dividerLeash = mSplitLayout.getDividerLeash();
        if (dividerLeash == null) return;
        if (dividerLeash == null) {
            return;
        }

        if (mDividerVisible) {
            t.show(dividerLeash);
@@ -905,15 +895,11 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
            }
        } else if (isSideStage) {
            final WindowContainerTransaction wct = new WindowContainerTransaction();
            mSplitLayout.init();
            // Make sure the main stage is active.
            mMainStage.activate(getMainStageBounds(), wct, true /* reparent */);
            mSideStage.moveToTop(getSideStageBounds(), wct);
            mSyncQueue.queue(wct);
            mSyncQueue.runInSync(t -> {
                updateSurfaceBounds(mSplitLayout, t);
                setDividerVisibility(true, t);
            });
            mSyncQueue.runInSync(t -> updateSurfaceBounds(mSplitLayout, t));
        }
        if (mMainStageListener.mHasChildren && mSideStageListener.mHasChildren) {
            mShouldUpdateRecents = true;