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

Commit 87b70a69 authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Set sync applier on the transform params for the glued targets" into...

Merge "Set sync applier on the transform params for the glued targets" into sc-v2-dev am: 5e49df2b am: 616f1818

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16307006

Change-Id: I0be97fe98b93085d7a1cc5bc145d17045a8c0989
parents 2a1dc006 616f1818
Loading
Loading
Loading
Loading
+16 −15
Original line number Diff line number Diff line
@@ -4357,16 +4357,23 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
        RemoteTargetGluer gluer = new RemoteTargetGluer(getContext(), getSizeStrategy());
        mRemoteTargetHandles = gluer.assignTargetsForSplitScreen(recentsAnimationTargets);
        mSplitBoundsConfig = gluer.getStagedSplitBounds();
        if (mSyncTransactionApplier != null) {
        // Add release check to the targets from the RemoteTargetGluer and not the targets
        // passed in because in the event we're in split screen, we use the passed in targets
        // to create new RemoteAnimationTargets in assignTargetsForSplitScreen(), and the
        // mSyncTransactionApplier doesn't get transferred over
            runActionOnRemoteHandles(remoteTargetHandle -> remoteTargetHandle
                    .getTransformParams().getTargetSet()
                    .addReleaseCheck(mSyncTransactionApplier));
        runActionOnRemoteHandles(remoteTargetHandle -> {
            final TransformParams params = remoteTargetHandle.getTransformParams();
            if (mSyncTransactionApplier != null) {
                params.setSyncTransactionApplier(mSyncTransactionApplier);
                params.getTargetSet().addReleaseCheck(mSyncTransactionApplier);
            }

            TaskViewSimulator tvs = remoteTargetHandle.getTaskViewSimulator();
            tvs.setOrientationState(mOrientationState);
            tvs.setDp(mActivity.getDeviceProfile());
            tvs.recentsViewScale.value = 1;
        });

        TaskView runningTaskView = getRunningTaskView();
        if (runningTaskView instanceof GroupedTaskView) {
            // We initially create a GroupedTaskView in showCurrentTask() before launcher even
@@ -4375,12 +4382,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
            // notified.
            ((GroupedTaskView) runningTaskView).updateSplitBoundsConfig(mSplitBoundsConfig);
        }
        for (RemoteTargetHandle remoteTargetHandle : mRemoteTargetHandles) {
            TaskViewSimulator tvs = remoteTargetHandle.getTaskViewSimulator();
            tvs.setOrientationState(mOrientationState);
            tvs.setDp(mActivity.getDeviceProfile());
            tvs.recentsViewScale.value = 1;
        }
    }

    /** Helper to avoid writing some for-loops to iterate over {@link #mRemoteTargetHandles} */