Prevent two pane widget picker code from reaching foldables

Currently, there's a few sections of the code that are intended to only be reached by tablets in landscape mode that can be reached by unfolded foldables. Here, we fix this so it no longer occurs.

Bug: 277102339
Test: Verify widget picker works correctly on tablet
Change-Id: I1f2bc99072aff6d852f9ce658ab00fa33b9e02b5
This commit is contained in:
fbaron
2023-04-05 12:50:07 -07:00
parent 296f8776f7
commit a3dbce41e3
2 changed files with 6 additions and 3 deletions

View File

@@ -186,7 +186,9 @@ public abstract class BaseWidgetSheet extends AbstractSlideInView<Launcher>
int widthUsed;
if (deviceProfile.isTablet) {
int margin = deviceProfile.allAppsLeftRightMargin;
if (deviceProfile.isLandscape && LARGE_SCREEN_WIDGET_PICKER.get()) {
if (deviceProfile.isLandscape
&& LARGE_SCREEN_WIDGET_PICKER.get()
&& !deviceProfile.isTwoPanels) {
margin = getResources().getDimensionPixelSize(
R.dimen.widget_picker_landscape_tablet_left_right_margin);
}