summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tracy Zhou <tracyzhou@google.com> 2023-08-20 20:31:02 -0700
committer Tracy Zhou <tracyzhou@google.com> 2023-08-20 21:36:59 -0700
commitec9cecd06a124bb611af2a3dffaa0e71141298fe (patch)
tree54764acc7797cc08a04b86cadcaf54984fdaf8da
parent68d69d636e896fcd13385d44f549f16641bb9b3f (diff)
Revert canShowRotationButton() check related to mTaskBarVisible
mTaskBarVisible isn't related to immersive mode. Rather it's tied to whether we show task bar or hotseat (e.g. on the home screen). Fixes: 272164624 Test: Open townhall. Fold and then unfold. Tilt the device and make sure the floating rotation button shows. Change-Id: Ie8a7c617ece45509c5d069741cdee7e3037130f8
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shared/rotation/RotationButtonControllerTest.kt14
2 files changed, 1 insertions, 16 deletions
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java b/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java
index cab54d08b3ec..a444022a32d1 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java
@@ -497,8 +497,7 @@ public class RotationButtonController {
boolean canShowRotationButton() {
return mIsNavigationBarShowing
|| mBehavior == WindowInsetsController.BEHAVIOR_DEFAULT
- || isGesturalMode(mNavBarMode)
- || mTaskBarVisible;
+ || isGesturalMode(mNavBarMode);
}
@DrawableRes
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shared/rotation/RotationButtonControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shared/rotation/RotationButtonControllerTest.kt
index 9393a4f4eead..ee3d87089b6d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shared/rotation/RotationButtonControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shared/rotation/RotationButtonControllerTest.kt
@@ -60,18 +60,4 @@ class RotationButtonControllerTest : SysuiTestCase() {
assertThat(mController.canShowRotationButton()).isTrue()
}
-
- @Test
- fun ifTaskbarVisible_showRotationSuggestion() {
- mController.onNavigationBarWindowVisibilityChange( /* showing = */ false)
- mController.onBehaviorChanged(Display.DEFAULT_DISPLAY,
- WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE)
- mController.onNavigationModeChanged(WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON)
- mController.onTaskbarStateChange( /* visible = */ false, /* stashed = */ false)
- assertThat(mController.canShowRotationButton()).isFalse()
-
- mController.onTaskbarStateChange( /* visible = */ true, /* stashed = */ false)
-
- assertThat(mController.canShowRotationButton()).isTrue()
- }
}