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

Commit f66f8271 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Use FakeTransformParams instead of real ones for gesture tutorial

* SwipeUpAnimationLogic was ignoring the TransformParams arg
that was being passed in, because for staged split we are
creating/pairing TaskViewSimulators and TransformParams in
SwipeUpAnimationLogic itself.
* Override the remote handle that gets created during the gesture
tutorial (which shouldn't be done in other cases, but because
tutorial is a one-off it should be fine)

Fixes: 199482330
Test: Launched gesture tutorial from launcher home settings
No crash

Change-Id: I346211a422e46981a994bd40e34e46b44f9f5d0e
parent 2d9741b8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -270,7 +270,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
            TaskAnimationManager taskAnimationManager, GestureState gestureState,
            long touchTimeMs, boolean continuingLastGesture,
            InputConsumerController inputConsumer) {
        super(context, deviceState, gestureState, new TransformParams());
        super(context, deviceState, gestureState);
        mActivityInterface = gestureState.getActivityInterface();
        mActivityInitListener = mActivityInterface.createActivityInitListener(this::onActivityInit);
        mInputConsumerProxy =
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public abstract class SwipeUpAnimationLogic implements
    protected boolean mIsSwipeForStagedSplit;

    public SwipeUpAnimationLogic(Context context, RecentsAnimationDeviceState deviceState,
            GestureState gestureState, TransformParams transformParams) {
            GestureState gestureState) {
        mContext = context;
        mDeviceState = deviceState;
        mGestureState = gestureState;
+4 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ import com.android.quickstep.AnimatedFloat;
import com.android.quickstep.GestureState;
import com.android.quickstep.OverviewComponentObserver;
import com.android.quickstep.RecentsAnimationDeviceState;
import com.android.quickstep.RemoteTargetGluer;
import com.android.quickstep.SwipeUpAnimationLogic;
import com.android.quickstep.SwipeUpAnimationLogic.RunningWindowAnim;
import com.android.quickstep.util.AppCloseConfig;
@@ -254,7 +255,9 @@ abstract class SwipeUpGestureTutorialController extends TutorialController {

        ViewSwipeUpAnimation(Context context, RecentsAnimationDeviceState deviceState,
                             GestureState gestureState) {
            super(context, deviceState, gestureState, new FakeTransformParams());
            super(context, deviceState, gestureState);
            mRemoteTargetHandles[0] = new RemoteTargetGluer.RemoteTargetHandle(
                    mRemoteTargetHandles[0].getTaskViewSimulator(), new FakeTransformParams());
        }

        void initDp(DeviceProfile dp) {