Merge "Only inset widgets if workspaceTopPadding is greater than the widget padding." into sc-dev am: 3ed65ede16

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14823934

Change-Id: I76ecb9bb0cf1bd6e768dca2c8c7ee4f1e835c4ab
This commit is contained in:
Jonathan Miranda
2021-06-03 20:41:22 +00:00
committed by Automerger Merge Worker
+4 -2
View File
@@ -399,8 +399,10 @@ public class DeviceProfile {
public boolean shouldInsetWidgets() {
Rect widgetPadding = inv.defaultWidgetPadding;
// Check all sides to ensure that the widget won't overlap into another cell.
return cellLayoutBorderSpacingPx > widgetPadding.left
// Check all sides to ensure that the widget won't overlap into another cell, or into
// status bar.
return workspaceTopPadding > widgetPadding.top
&& cellLayoutBorderSpacingPx > widgetPadding.left
&& cellLayoutBorderSpacingPx > widgetPadding.top
&& cellLayoutBorderSpacingPx > widgetPadding.right
&& cellLayoutBorderSpacingPx > widgetPadding.bottom;