Removing default widget padding logic. Also widget padding it applied
at ShortcutAndWidgetContainer so that the widgetView always has the
correct size.
Bug: 274826296
Bug: 257589413
Test: Verified using screenshots
Flags: N/A
Change-Id: Id4b5e94db6ec7b2aa3dca87b1e9ccc831b608cac
The grid doesn't have a constant space between cells anymore, so we need
new attributes for the different spaces in different situations.
Bug: 191879424
Test: checking cell size and extra space in dumpsys
Change-Id: I4b6aae5b3fea281490c00cd13d0cd3a25372f21b
The size returned by getWidgetItemSizePx is used by the widget picker
for the NavigableAppWidgetHostView. We should NOT deduct the padding
applied to NavigableAppWidgetHostView to this size.
If a launcher grid insets NavigableAppWidgetHostView, then we must
add the inset to the NavigableAppWidgetHostView width / height.
Test: Compare the size of widgets in preview and home screen using
layout inspector. See screenshots in the bug
Fix: 200983939
Change-Id: I35022861b65f2624f69940cf3856d9c47f8dbbd9
Shortcut size should be the size of all apps icon + padding
Test: Check shortcuts and widgets are shown without crash in the
following surfaces with display & font set to largest and
display cutout enabled. Repeat the same test with normal
display setting and no cutout.
1. Full widgets picker
2. Bottom widgets picker
3. Pin widget dialog
Fix: 193422438
Change-Id: Ibfebf94e92eed5e9cd1dd4196d98823b0e4dda6b
Found all the uses of getWidgetSizePx and replaced them with the
computation of padded sizes (checked it all made sense).
Test: Try the various widget pickers.
Bug: 191612352
Change-Id: Id2a8d12ee7ce6baabef186dbb78d817975ea2212
We cannot call it anymore, because the system padding is not always
used.
Bug: 191612352
Test: Manually, using CtsVerifier and dedicated widgets
Change-Id: I06353ba49a8e62127e593cdbcb86fadcf89ecb24
This reverts commit 71cefb593f.
Reason for revert: The default padding is added by the framework not the launcher. We really need to subtract padding from the size.
Bug: 190498032
Change-Id: If7f164da34aec3d8e022ef2c752b72292cca0489
Test: Set the grid to 4x5 (without padding) and verify the min / max
size sent to Conversation widget is expected.
Bug: 190498032
Change-Id: I8ef6e5d897ebd0e2ea9af4497b00059c8dfad70a