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
This commit is contained in:
Winson Chung 2020-09-17 13:23:39 -07:00
parent 312cf43863
commit 9cd3740fe7
1 changed files with 1 additions and 1 deletions

View File

@ -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,