diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java index 7338485d5c..f61840a55d 100644 --- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java @@ -267,7 +267,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT int setupSize = mControllers.taskbarActivityContext.getSetupWindowSize(); Point p = DimensionUtils.getTaskbarPhoneDimensions(deviceProfile, resources, - mContext.isPhoneMode()); + mContext.isPhoneMode(), mContext.isGestureNav()); ViewGroup.LayoutParams navButtonsViewLayoutParams = mNavButtonsView.getLayoutParams(); navButtonsViewLayoutParams.width = p.x; if (!mContext.isUserSetupComplete()) { diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragLayerController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragLayerController.java index ff890fb18e..acf976fe9a 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragLayerController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragLayerController.java @@ -291,7 +291,7 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa if (mActivity.isPhoneMode()) { Resources resources = mActivity.getResources(); Point taskbarDimensions = DimensionUtils.getTaskbarPhoneDimensions(deviceProfile, - resources, true /* isPhoneMode */); + resources, true /* isPhoneMode */, mActivity.isGestureNav()); return taskbarDimensions.y == -1 ? deviceProfile.getDisplayInfo().currentSize.y : taskbarDimensions.y; diff --git a/src/com/android/launcher3/util/DimensionUtils.kt b/src/com/android/launcher3/util/DimensionUtils.kt index 63e919ad3e..821dda789f 100644 --- a/src/com/android/launcher3/util/DimensionUtils.kt +++ b/src/com/android/launcher3/util/DimensionUtils.kt @@ -31,7 +31,8 @@ object DimensionUtils { fun getTaskbarPhoneDimensions( deviceProfile: DeviceProfile, res: Resources, - isPhoneMode: Boolean + isPhoneMode: Boolean, + isGestureNav: Boolean, ): Point { val p = Point() // Taskbar for large screen @@ -42,7 +43,7 @@ object DimensionUtils { } // Taskbar on phone using gesture nav, it will always be stashed - if (deviceProfile.isGestureMode) { + if (isGestureNav) { p.x = ViewGroup.LayoutParams.MATCH_PARENT p.y = res.getDimensionPixelSize(R.dimen.taskbar_stashed_size) return p