From cb956ff4f5adf0c4abb586940d9e89582a70bfd3 Mon Sep 17 00:00:00 2001 From: Becky Qiu Date: Mon, 10 Aug 2020 12:44:48 -0700 Subject: [PATCH] [Overview Actions] Set launcher state to Overview when rotate in recents. Test: local Bug: 160718310 Change-Id: I73f498151d7cc6a9db9d352549124c9d550ae6f2 --- .../src/com/android/quickstep/views/RecentsView.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 4d58a0dc79..aa36780278 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 @@ -24,6 +24,7 @@ import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAG import static com.android.launcher3.InvariantDeviceProfile.CHANGE_FLAG_ICON_PARAMS; import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA; import static com.android.launcher3.LauncherState.BACKGROUND_APP; +import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK; import static com.android.launcher3.Utilities.EDGE_NAV_BAR; import static com.android.launcher3.Utilities.mapToRange; import static com.android.launcher3.Utilities.squaredHypot; @@ -93,6 +94,7 @@ import com.android.launcher3.BaseActivity; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Insettable; import com.android.launcher3.InvariantDeviceProfile; +import com.android.launcher3.LauncherState; import com.android.launcher3.PagedView; import com.android.launcher3.R; import com.android.launcher3.Utilities; @@ -1748,6 +1750,11 @@ public abstract class RecentsView extends PagedView updateOrientationHandler(); } mLiveTileTaskViewSimulator.setRecentsRotation(rotation); + // If overview is in modal state when rotate, reset it to overview state without running + // animation. + if (mActivity.isInState(OVERVIEW_MODAL_TASK)) { + mActivity.getStateManager().goToState(LauncherState.OVERVIEW, false); + } } public void setLayoutRotation(int touchRotation, int displayRotation) {