Enable 3 button nav for taskbar

Bug: 180046394
Test: Switched between gesture and button nav on
phone and tablet.

Change-Id: Iac2357a3256f8b6b36ca49d3680594a91e824a5f
This commit is contained in:
Vinit Nayak
2021-06-15 13:14:41 -07:00
parent 47f8a1c3ef
commit 58ffbef8f0
5 changed files with 7 additions and 7 deletions

View File

@@ -105,7 +105,7 @@ public class NavbarButtonsViewController {
return true;
};
if (mContext.canShowNavButtons()) {
if (mContext.isThreeButtonNav()) {
initButtons(mStartContainer, mEndContainer, mControllers.navButtonController);
// Animate taskbar background when IME shows

View File

@@ -161,8 +161,8 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
mWindowManager.addView(mDragLayer, mWindowLayoutParams);
}
public boolean canShowNavButtons() {
return ENABLE_THREE_BUTTON_TASKBAR && mNavMode == Mode.THREE_BUTTONS;
public boolean isThreeButtonNav() {
return mNavMode == Mode.THREE_BUTTONS;
}
@Override
@@ -214,7 +214,7 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
}
public void updateSysuiStateFlags(int systemUiStateFlags, boolean forceUpdate) {
if (!canShowNavButtons()) {
if (!isThreeButtonNav()) {
return;
}
mControllers.navbarButtonsViewController.updateStateForSysuiFlags(

View File

@@ -61,7 +61,7 @@ public class TaskbarControllers {
*/
public void init() {
navbarButtonsViewController.init(this);
if (taskbarActivityContext.canShowNavButtons()) {
if (taskbarActivityContext.isThreeButtonNav()) {
rotationButtonController.init();
}
taskbarDragLayerController.init(this);

View File

@@ -93,7 +93,7 @@ public class TaskbarDragLayerController {
*/
public void updateInsetsTouchability(InsetsInfo insetsInfo) {
insetsInfo.touchableRegion.setEmpty();
if (mActivity.canShowNavButtons()) {
if (mActivity.isThreeButtonNav()) {
// Always have nav buttons be touchable
mControllers.navbarButtonsViewController.addVisibleButtonsRegion(
mTaskbarDragLayer, insetsInfo.touchableRegion);

View File

@@ -57,7 +57,7 @@ public class TaskbarKeyguardController {
mKeyguardSysuiFlags = interestingKeyguardFlags;
mBouncerShowing = bouncerShowing;
if (!mContext.canShowNavButtons()) {
if (!mContext.isThreeButtonNav()) {
// For gesture nav we don't need to deal with bouncer or showing taskbar when locked
return;
}