diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java index 34d8adfb45..b5e6af475d 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java @@ -169,7 +169,6 @@ public abstract class RecentsView extends PagedView impl } }; - private final OrientationEventListener mOrientationListener; private int mPreviousRotation; protected RecentsAnimationController mRecentsAnimationController; protected RecentsAnimationTargets mRecentsAnimationTargets; @@ -377,22 +376,6 @@ public abstract class RecentsView extends PagedView impl // Initialize quickstep specific cache params here, as this is constructed only once mActivity.getViewCache().setCacheSize(R.layout.digital_wellbeing_toast, 5); - mOrientationListener = new OrientationEventListener(getContext()) { - @Override - public void onOrientationChanged(int i) { - int rotation = RotationHelper.getRotationFromDegrees(i); - if (mPreviousRotation != rotation) { - animateRecentsRotationInPlace(rotation); - if (rotation == 0) { - showActionsView(); - } else { - hideActionsView(); - } - mPreviousRotation = rotation; - } - } - }; - } public OverScroller getScroller() { @@ -521,13 +504,6 @@ public abstract class RecentsView extends PagedView impl } public void setOverviewStateEnabled(boolean enabled) { - if (supportsVerticalLandscape() && mOrientationListener.canDetectOrientation()) { - if (enabled) { - mOrientationListener.enable(); - } else { - mOrientationListener.disable(); - } - } mOverviewStateEnabled = enabled; updateTaskStackListenerState(); if (!enabled) { @@ -968,35 +944,6 @@ public abstract class RecentsView extends PagedView impl setSwipeDownShouldLaunchApp(true); } - private void animateRecentsRotationInPlace(int newRotation) { - if (!supportsVerticalLandscape()) { - return; - } - - AnimatorSet pa = setRecentsChangedOrientation(true); - pa.addListener(AnimationSuccessListener.forRunnable(() -> { - updateLayoutRotation(newRotation); - ((DragLayer) mActivity.getDragLayer()).recreateControllers(); - rotateAllChildTasks(); - setRecentsChangedOrientation(false).start(); - })); - pa.start(); - } - - public AnimatorSet setRecentsChangedOrientation(boolean fadeInChildren) { - getRunningTaskIndex(); - int runningIndex = getCurrentPage(); - AnimatorSet as = new AnimatorSet(); - for (int i = 0; i < getTaskViewCount(); i++) { - if (runningIndex == i) { - continue; - } - View taskView = getTaskViewAt(i); - as.play(ObjectAnimator.ofFloat(taskView, View.ALPHA, fadeInChildren ? 0 : 1)); - } - return as; - } - abstract protected boolean supportsVerticalLandscape(); private void rotateAllChildTasks() {