From 9cd3740fe7f78cf0430b1c8dd64cf6767f9ef108 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 17 Sep 2020 13:23:39 -0700 Subject: [PATCH] Only check activity rotation allowed when considering menu layout - The canRecentsActivityRotate() also checks whether system rotation is enabled which prevents us from using the right layout orientation when home rotation is enabled while system rotation is disabled. Bug: 168278832 Test: Tested menu visibility in combination of Auto rotate setting x Home rotation setting X Device orientation Change-Id: If74a38b1ec51abd2ea7f3ba3de23f0b2c4cab0ab Merged-In: If74a38b1ec51abd2ea7f3ba3de23f0b2c4cab0ab --- .../src/com/android/quickstep/views/TaskMenuView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskMenuView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskMenuView.java index 8b49f2c212..fb799a800c 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskMenuView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskMenuView.java @@ -251,7 +251,7 @@ public class TaskMenuView extends AbstractFloatingView { setScaleX(taskView.getScaleX()); setScaleY(taskView.getScaleY()); boolean canActivityRotate = taskView.getRecentsView() - .mOrientationState.canRecentsActivityRotate(); + .mOrientationState.isRecentsActivityRotationAllowed(); mOptionLayout.setOrientation(orientationHandler .getTaskMenuLayoutOrientation(canActivityRotate, mOptionLayout)); setPosition(sTempRect.left - insets.left, sTempRect.top - insets.top,