commit | 7a2587c5a24bbd560f7d406c4a20c25200d95b14 | [log] [tgz] |
---|---|---|
author | Jonathan Miranda <jonmiranda@google.com> | Thu Jun 03 20:41:41 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Jun 03 20:41:41 2021 +0000 |
tree | 6356db789f5a2d945fc825eb309250835b63c069 | |
parent | 15eb8fef8e0f2e37b64e3109e56ecf1e7774d880 [diff] | |
parent | 3ed65ede1679021c320576c50cfe49b6651303bc [diff] |
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: I5f7a5bd4775e9350d63e69085574400a0b5ae43e
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index cdc09f1..e9245b0 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java
@@ -399,8 +399,10 @@ 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;