Subtract taskbar size from DeviceProfile#availableHeight

Normally availableHeight excludes system insets, but taskbar is added
after availableHeight is calculated. This discrepency causes some bad
calculations such as TaskView size.

Test: touch nav bar when in an app with taskbar present, ensure the
task doesn't jump due to incorrect calculation

Fixes: 179478728
Bug: 171917176
Change-Id: I16d39d3e1d9708e2a64c81b1ac24466f9567d1b9
This commit is contained in:
Tony Wickham
2021-02-12 11:24:40 -08:00
parent e1a8440d78
commit 15883891ea
5 changed files with 35 additions and 5 deletions

View File

@@ -89,8 +89,7 @@ public class TaskbarController {
mTaskbarView = mTaskbarContainerView.findViewById(R.id.taskbar_view);
mTaskbarView.construct(createTaskbarViewCallbacks());
mWindowManager = mLauncher.getWindowManager();
mTaskbarSize = new Point(MATCH_PARENT,
mLauncher.getResources().getDimensionPixelSize(R.dimen.taskbar_size));
mTaskbarSize = new Point(MATCH_PARENT, mLauncher.getDeviceProfile().taskbarSize);
mTaskbarStateHandler = mLauncher.getTaskbarStateHandler();
mTaskbarVisibilityController = new TaskbarVisibilityController(mLauncher,
createTaskbarVisibilityControllerCallbacks());