Allowing Launcher to draw behind cutouts

> Launcher uses realSize, availableSize and insets to calculate
various layout values. Without drawing behind cutouts, these values
are not consistent (insets + availableSize != realSize) leading to
jumps in layouts.
> Removing fake black bars in low-ram devices to avoid inconsistent
insets.
> Fixing various layouts not taking lert/right insets into account.

Bug: 156268804
Change-Id: I8441db8a468b08a65b57b932050b5b4b37313966
This commit is contained in:
Sunny Goyal
2020-06-05 00:25:58 -07:00
parent 1b8f1cd220
commit 786940ae93
8 changed files with 53 additions and 98 deletions
+4 -3
View File
@@ -538,7 +538,6 @@ public class DeviceProfile {
mInsets.right + hotseatBarSidePaddingStartPx, mInsets.bottom);
}
} else {
// We want the edges of the hotseat to line up with the edges of the workspace, but the
// icons in the hotseat are a different size, and so don't line up perfectly. To account
// for this, we pad the left and right of the hotseat with half of the difference of a
@@ -547,9 +546,11 @@ public class DeviceProfile {
float hotseatCellWidth = (float) widthPx / inv.numHotseatIcons;
int hotseatAdjustment = Math.round((workspaceCellWidth - hotseatCellWidth) / 2);
mHotseatPadding.set(
hotseatAdjustment + workspacePadding.left + cellLayoutPaddingLeftRightPx,
hotseatAdjustment + workspacePadding.left + cellLayoutPaddingLeftRightPx
+ mInsets.left,
hotseatBarTopPaddingPx,
hotseatAdjustment + workspacePadding.right + cellLayoutPaddingLeftRightPx,
hotseatAdjustment + workspacePadding.right + cellLayoutPaddingLeftRightPx
+ mInsets.right,
hotseatBarBottomPaddingPx + mInsets.bottom + cellLayoutBottomPaddingPx);
}
return mHotseatPadding;