Merge "Revert "Revert "No NavigationBar layer in tablets""" into sc-v2-dev am: 3d9545ef4e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15555948

Change-Id: Ieaa4ee6141a6f34986a0b6846211d2462b84b574
This commit is contained in:
Tracy Zhou
2021-08-17 01:15:56 +00:00
committed by Automerger Merge Worker

View File

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