Send corrent SUW insets for taskbar portrait vs landscape

* There were two separate blocks of code for sending insets
for Taskbar during SUW, consolidate those
* We also weren't changing Taskbar window height corresponding
to the added insets/change of height for different
orientations in SUW

Fixes: 253538830
Test: Went through SUW and switched orientations,
no back button overlap

Change-Id: Ifb3bc1c20a793ef062bf338a3bdf933b8ae98c28
This commit is contained in:
Vinit Nayak
2022-11-22 15:49:42 -08:00
parent 9de3256583
commit 209dd03b69
3 changed files with 15 additions and 11 deletions

View File

@@ -210,7 +210,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
DeviceProfile deviceProfile = mContext.getDeviceProfile();
Resources resources = mContext.getResources();
Point p = !mContext.isUserSetupComplete()
? new Point(0, resources.getDimensionPixelSize(R.dimen.taskbar_suw_frame))
? new Point(0, controllers.taskbarActivityContext.getSetupWindowHeight())
: DimensionUtils.getTaskbarPhoneDimensions(deviceProfile, resources,
TaskbarManager.isPhoneMode(deviceProfile));
mNavButtonsView.getLayoutParams().height = p.y;
@@ -691,8 +691,9 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
(resources.getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size) / 2);
navButtonsLayoutParams.setMarginEnd(0);
navButtonsLayoutParams.gravity = Gravity.START;
mNavButtonsView.getLayoutParams().height =
mControllers.taskbarActivityContext.getSetupWindowHeight();
mNavButtonContainer.setLayoutParams(navButtonsLayoutParams);
mNavButtonContainer.requestLayout();
}
/**