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

Commit abf9b4bb authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Revert canShowRotationButton() check related to mTaskBarVisible" into udc-qpr-dev

parents d73d60f4 ec9cecd0
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -497,8 +497,7 @@ public class RotationButtonController {
    boolean canShowRotationButton() {
        return mIsNavigationBarShowing
            || mBehavior == WindowInsetsController.BEHAVIOR_DEFAULT
            || isGesturalMode(mNavBarMode)
            || mTaskBarVisible;
            || isGesturalMode(mNavBarMode);
    }

    @DrawableRes
+0 −14
Original line number Diff line number Diff line
@@ -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()
  }
}