Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24f0f34d authored by Winson Chung's avatar Winson Chung
Browse files

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
parent 445e4b4b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -246,7 +246,7 @@ public class TaskMenuView extends AbstractFloatingView {
        setScaleX(taskView.getScaleX());
        setScaleX(taskView.getScaleX());
        setScaleY(taskView.getScaleY());
        setScaleY(taskView.getScaleY());
        boolean canActivityRotate = taskView.getRecentsView()
        boolean canActivityRotate = taskView.getRecentsView()
            .mOrientationState.canRecentsActivityRotate();
            .mOrientationState.isRecentsActivityRotationAllowed();
        mOptionLayout.setOrientation(orientationHandler
        mOptionLayout.setOrientation(orientationHandler
                .getTaskMenuLayoutOrientation(canActivityRotate, mOptionLayout));
                .getTaskMenuLayoutOrientation(canActivityRotate, mOptionLayout));
        setPosition(sTempRect.left - insets.left, sTempRect.top - insets.top,
        setPosition(sTempRect.left - insets.left, sTempRect.top - insets.top,