Merge "Use fixed-rotation by default for shell transitions"
diff --git a/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java b/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java
index d2d3ba3..4d13253 100644
--- a/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java
+++ b/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java
@@ -23,6 +23,7 @@
 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 @@
                 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 @@
                 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
diff --git a/quickstep/src/com/android/quickstep/TaskAnimationManager.java b/quickstep/src/com/android/quickstep/TaskAnimationManager.java
index 914c939..b8a885b 100644
--- a/quickstep/src/com/android/quickstep/TaskAnimationManager.java
+++ b/quickstep/src/com/android/quickstep/TaskAnimationManager.java
@@ -50,6 +50,8 @@
 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;
diff --git a/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java b/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java
index ae8e45a..4f5c368 100644
--- a/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java
+++ b/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java
@@ -341,7 +341,7 @@
 
     @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;
diff --git a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
index f66a6de..5212755 100644
--- a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
+++ b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
@@ -305,7 +305,7 @@
             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();