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

Commit 342446d1 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Update orientation state while gesture animation start." into tm-dev

parents edb576fb 64cfa05d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
        } else {
            runningTasks = new ActivityManager.RunningTaskInfo[]{mGestureState.getRunningTask()};
        }
        mRecentsView.onGestureAnimationStart(runningTasks);
        mRecentsView.onGestureAnimationStart(runningTasks, mDeviceState.getRotationTouchHelper());
    }

    private void launcherFrameDrawn() {
+2 −1
Original line number Diff line number Diff line
@@ -212,7 +212,8 @@ public class FallbackSwipeHandler extends
        if (mRunningOverHome) {
            if (DisplayController.getNavigationMode(mContext).hasGestures) {
                mRecentsView.onGestureAnimationStartOnHome(
                        new ActivityManager.RunningTaskInfo[]{mGestureState.getRunningTask()});
                        new ActivityManager.RunningTaskInfo[]{mGestureState.getRunningTask()},
                        mDeviceState.getRotationTouchHelper());
            }
        } else {
            super.notifyGestureAnimationStartToRecents();
+4 −2
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import com.android.launcher3.util.SplitConfigurationOptions;
import com.android.quickstep.FallbackActivityInterface;
import com.android.quickstep.GestureState;
import com.android.quickstep.RecentsActivity;
import com.android.quickstep.RotationTouchHelper;
import com.android.quickstep.util.GroupTask;
import com.android.quickstep.util.SplitSelectStateController;
import com.android.quickstep.util.TaskViewSimulator;
@@ -86,11 +87,12 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
     * to the home task. This allows us to handle quick-switch similarly to a quick-switching
     * from a foreground task.
     */
    public void onGestureAnimationStartOnHome(RunningTaskInfo[] homeTaskInfo) {
    public void onGestureAnimationStartOnHome(RunningTaskInfo[] homeTaskInfo,
            RotationTouchHelper rotationTouchHelper) {
        // TODO(b/195607777) General fallback love, but this might be correct
        //  Home task should be defined as the front-most task info I think?
        mHomeTaskInfo = homeTaskInfo[0];
        onGestureAnimationStart(homeTaskInfo);
        onGestureAnimationStart(homeTaskInfo, rotationTouchHelper);
    }

    /**
+5 −2
Original line number Diff line number Diff line
@@ -154,6 +154,7 @@ import com.android.quickstep.RecentsModel.TaskVisualsChangeListener;
import com.android.quickstep.RemoteAnimationTargets;
import com.android.quickstep.RemoteTargetGluer;
import com.android.quickstep.RemoteTargetGluer.RemoteTargetHandle;
import com.android.quickstep.RotationTouchHelper;
import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.TaskOverlayFactory;
import com.android.quickstep.TaskThumbnailCache;
@@ -2084,11 +2085,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
    /**
     * Called when a gesture from an app is starting.
     */
    public void onGestureAnimationStart(RunningTaskInfo[] runningTaskInfo) {
    public void onGestureAnimationStart(RunningTaskInfo[] runningTaskInfo,
            RotationTouchHelper rotationTouchHelper) {
        mGestureActive = true;
        // This needs to be called before the other states are set since it can create the task view
        if (mOrientationState.setGestureActive(true)) {
            updateOrientationHandler();
            setLayoutRotation(rotationTouchHelper.getCurrentActiveRotation(),
                    rotationTouchHelper.getDisplayRotation());
        }

        showCurrentTask(runningTaskInfo);