commit | 6c76501e0e615bf52b4a384f57512925a7bba1ae | [log] [tgz] |
---|---|---|
author | Xiaowen Lei <xilei@google.com> | Tue Jun 04 10:30:02 2024 -0700 |
committer | Xiaowen Lei <xilei@google.com> | Tue Jun 04 14:19:30 2024 -0700 |
tree | f1ce82fb9fb59307d5b0bc45074b6b7d9b82a521 | |
parent | 348ac13cfec0f2f17248141a15140ec64d2b33f0 [diff] |
Don't add padding for Smartspace (actual and preview). As demonstrated in ag/27287153, the actual Smartspace doesn't have any top padding, but the qsb_preview does. - Turns out, ShortcutAndWidgetContainer sets padding on its children. - The actual Smartspace has padding removed by overriding the `setPadding` method in SmartspaceViewContainer. (See ag/13562740.) This CL updates ShortcutAndWidgetContainer.java to not add padding for either the actual or the preview Smartspace. It makes use of `R.id.search_container_workspace` to identify the applicable cases, rather than checking class types or names. This way, there is no Pixel-specific logic added. Before: https://hsv.googleplex.com/6335187293044736?node=18 After: https://hsv.googleplex.com/5450651931770880?node=18 Actual Smartspace, for reference: - https://hsv.googleplex.com/6083634648842240?node=14 Note the `isChildQsb` also returns true for the QsbContainerView. Since that class already has the same `setPadding` override: - https://cs.android.com/android/platform/superproject/main/+/main:packages/apps/Launcher3/src/com/android/launcher3/qsb/QsbContainerView.java;l=147-150;drc=e58aaf1802e43f73bbd417658c1c4c42e2fe28fd This CL does't affect its padding. Flag: EXEMPT bugfix Bug: 338601960 Test: Go to Wallpaper & style preview for Home screen. Change-Id: I5b6f7752cfee556b815c83e9df85f9e74f23ab4b