From cfbf3ff6951d086cc6666193747f82c9c10f306e Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Thu, 5 Oct 2023 22:49:40 -0700 Subject: [PATCH] Set correct stashed task(nav) bar height with taskbar/navbar unification Again caused by DeviceProfile not initiating task bar stashed and unstashed height in folded state with unification code Test: Make sure that task(nav) bar has the correct height in both folded and unfolded state Bug: 274517647 Change-Id: I0d86cfccc6f096bc983f87c57fdfac9800fd4d41 --- .../launcher3/taskbar/StashedHandleViewController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/StashedHandleViewController.java b/quickstep/src/com/android/launcher3/taskbar/StashedHandleViewController.java index c4255bf70f..afefe42fad 100644 --- a/quickstep/src/com/android/launcher3/taskbar/StashedHandleViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/StashedHandleViewController.java @@ -107,14 +107,17 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT mControllers = controllers; DeviceProfile deviceProfile = mActivity.getDeviceProfile(); Resources resources = mActivity.getResources(); + final int stashedTaskbarHeight; if (isPhoneGestureNavMode(mActivity.getDeviceProfile())) { mTaskbarSize = resources.getDimensionPixelSize(R.dimen.taskbar_size); mStashedHandleWidth = resources.getDimensionPixelSize(R.dimen.taskbar_stashed_small_screen); + stashedTaskbarHeight = resources.getDimensionPixelSize(R.dimen.taskbar_stashed_size); } else { mTaskbarSize = deviceProfile.taskbarHeight; mStashedHandleWidth = resources .getDimensionPixelSize(R.dimen.taskbar_stashed_handle_width); + stashedTaskbarHeight = mControllers.taskbarStashController.getStashedHeight(); } int taskbarBottomMargin = deviceProfile.taskbarBottomMargin; mStashedHandleView.getLayoutParams().height = mTaskbarSize + taskbarBottomMargin; @@ -123,7 +126,6 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT isPhoneGestureNavMode(deviceProfile) ? 1 : 0); mTaskbarStashedHandleHintScale.updateValue(1f); - final int stashedTaskbarHeight = mControllers.taskbarStashController.getStashedHeight(); mStashedHandleView.setOutlineProvider(new ViewOutlineProvider() { @Override public void getOutline(View view, Outline outline) {