Revert "No NavigationBar layer in tablets"

This reverts commit fb999dc720.

Reason for revert: breaking TaplTestsLauncher3.testDevicePressMenu and testPressHomeOnAllAppsContextMenu for all foldable targetse

Bug: 191660313
Change-Id: I04c9e28c92ed0cf9e822ecf4409edfc8f37c36c4
This commit is contained in:
Alex Chau
2021-08-11 08:32:29 +00:00
parent fb999dc720
commit a7a5ad7b78

View File

@@ -251,7 +251,8 @@ public class NavigationBarController implements Callbacks,
/** @return {@code true} if taskbar is enabled, false otherwise */
private boolean initializeTaskbarIfNecessary() {
if (mIsTablet) {
boolean isShowingTaskbar = mIsTablet && mNavMode == NAV_BAR_MODE_3BUTTON;
if (isShowingTaskbar) {
// Remove navigation bar when taskbar is showing, currently only for 3 button mode
removeNavigationBar(mContext.getDisplayId());
mCommandQueue.addCallback(mTaskbarDelegate);
@@ -260,7 +261,7 @@ public class NavigationBarController implements Callbacks,
mCommandQueue.removeCallback(mTaskbarDelegate);
mTaskbarDelegate.destroy();
}
return mIsTablet;
return isShowingTaskbar;
}
@Override
@@ -331,7 +332,7 @@ public class NavigationBarController implements Callbacks,
return;
}
if (mIsTablet) {
if (mIsTablet && mNavMode == NAV_BAR_MODE_3BUTTON) {
return;
}