Simplify vertical bar hotseat bottom calculation for spring loaded state.
Fix: 236941743
Test: manual.
Change-Id: I7f110fea48eb88e7f941a64c17a65feec14531f3
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 8c1f505..60af347 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -930,15 +930,12 @@
* Gets the space in px from the bottom of last item in the vertical-bar hotseat to the
* bottom of the screen.
*/
- public int getVerticalHotseatLastItemBottomOffset() {
+ private int getVerticalHotseatLastItemBottomOffset() {
int cellHeight = calculateCellHeight(
heightPx - mHotseatPadding.top - mHotseatPadding.bottom, hotseatBorderSpace,
numShownHotseatIcons);
- int hotseatSize = (cellHeight * numShownHotseatIcons)
- + (hotseatBorderSpace * (numShownHotseatIcons - 1));
- int extraHotseatEndSpacing = (heightPx - hotseatSize) / 2;
int extraIconEndSpacing = (cellHeight - iconSizePx) / 2;
- return extraHotseatEndSpacing + extraIconEndSpacing + mHotseatPadding.bottom;
+ return extraIconEndSpacing + mHotseatPadding.bottom;
}
/**
@@ -953,7 +950,7 @@
/**
* Gets the scaled bottom of the workspace in px for the spring-loaded edit state.
*/
- private float getCellLayoutSpringLoadShrunkBottom() {
+ public float getCellLayoutSpringLoadShrunkBottom() {
int topOfHotseat = hotseatBarSizePx + springLoadedHotseatBarTopMarginPx;
workspaceSpringLoadShrunkBottom =
heightPx - (isVerticalBarLayout() ? getVerticalHotseatLastItemBottomOffset()