From 39def7300e90654c6ccb5bc98b13a8c8d048ec2f Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 26 Jan 2023 07:54:06 +0000 Subject: [PATCH] Fix issue with floating rotation button being in the wrong corner (launcher) - Add option for the rotation button to be positioned to the right when in ROTATION_0 Bug: 265197526 Test: atest FloatingRotationButtonPositionCalculatorTest Test: foldable-folded (floating rot button in sysui, natural rot=rot_0) foldable-unfolded (floating rot button in launcher, natural rot=rot_0) tablet (floating rot in launcher, natural rot=rot_270) Change-Id: I856a0be2e10fceb34254cd58ceb58dfa8a1819bd --- .../android/launcher3/taskbar/NavbarButtonsViewController.java | 3 ++- res/values/config.xml | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java index 2b976df802..77bb3bfaae 100644 --- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java @@ -299,7 +299,8 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT R.dimen.floating_rotation_button_taskbar_left_margin, R.dimen.floating_rotation_button_taskbar_bottom_margin, R.dimen.floating_rotation_button_diameter, - R.dimen.key_button_ripple_max_width); + R.dimen.key_button_ripple_max_width, + R.bool.floating_rotation_button_position_left); mControllers.rotationButtonController.setRotationButton(mFloatingRotationButton, mRotationButtonListener); diff --git a/res/values/config.xml b/res/values/config.xml index 016420bf79..1206dd8b4b 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -203,4 +203,7 @@ 0 + + true