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

Commit 19f7d988 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Use fixed-rotation by default for shell transitions"

parents 69928557 dce4693b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import static android.view.MotionEvent.ACTION_POINTER_DOWN;
import static android.view.MotionEvent.ACTION_UP;

import static com.android.launcher3.states.RotationHelper.deltaRotation;

import android.content.res.Resources;
import android.graphics.Point;
import android.graphics.RectF;
@@ -359,7 +360,7 @@ class OrientationTouchTransformer {
                if (mLastRectTouched == null) {
                    return;
                }
                if (TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) {
                if (TaskAnimationManager.SHELL_TRANSITIONS_ROTATION) {
                    if (event.getSurfaceRotation() != mActiveTouchRotation) {
                        // With Shell transitions, we should rotated to the orientation at the start
                        // of the gesture not the current display rotation which will happen early
@@ -378,7 +379,7 @@ class OrientationTouchTransformer {
                if (mLastRectTouched == null) {
                    return;
                }
                if (TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) {
                if (TaskAnimationManager.SHELL_TRANSITIONS_ROTATION) {
                    if (event.getSurfaceRotation() != mActiveTouchRotation) {
                        // With Shell transitions, we should rotated to the orientation at the start
                        // of the gesture not the current display rotation which will happen early
+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ import java.util.HashMap;
public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAnimationListener {
    public static final boolean ENABLE_SHELL_TRANSITIONS =
            SystemProperties.getBoolean("persist.debug.shell_transit", false);
    public static final boolean SHELL_TRANSITIONS_ROTATION = ENABLE_SHELL_TRANSITIONS
            && SystemProperties.getBoolean("persist.debug.shell_transit_rotate", false);

    private RecentsAnimationController mController;
    private RecentsAnimationCallbacks mCallbacks;
+1 −1
Original line number Diff line number Diff line
@@ -341,7 +341,7 @@ public class RecentsOrientedState implements

    @SurfaceRotation
    public int getDisplayRotation() {
        if (TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) {
        if (TaskAnimationManager.SHELL_TRANSITIONS_ROTATION) {
            // When shell transitions are enabled, both the display and activity rotations should
            // be the same once the gesture starts
            return mRecentsActivityRotation;
+1 −1
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
            mOrientationStateId = mOrientationState.getStateId();

            getFullScreenScale();
            if (TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) {
            if (TaskAnimationManager.SHELL_TRANSITIONS_ROTATION) {
                // With shell transitions, the display is rotated early so we need to actually use
                // the rotation when the gesture starts
                mThumbnailData.rotation = mOrientationState.getTouchRotation();