From 5a190c5efe970089a842f1fe4d33e7a6ca903f39 Mon Sep 17 00:00:00 2001 From: fbaron Date: Wed, 30 Aug 2023 11:26:26 -0700 Subject: [PATCH] Fix bug where suggested widget overlaps widget list We scroll to top when rotating device, which is a behavior that aligns with other AbstractSlideInView's like allApps Fix: 293203839 Test: verify that when rotating in widget sheet that the suggested widget no longer overlaps with widget list Flag: no-flag Change-Id: Icf021a46ae2c2b85b4c55e40cbd2f7e70f83c248 --- .../launcher3/widget/picker/WidgetsFullSheet.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java index abca1f87d5..a4b605cccd 100644 --- a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java +++ b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java @@ -794,13 +794,15 @@ public class WidgetsFullSheet extends BaseWidgetSheet } // Checks the orientation of the screen - if (LARGE_SCREEN_WIDGET_PICKER.get() - && mOrientation != newConfig.orientation - && mDeviceProfile.isTablet - && !mDeviceProfile.isTwoPanels) { + if (mOrientation != newConfig.orientation) { mOrientation = newConfig.orientation; - handleClose(false); - show(Launcher.getLauncher(getContext()), false); + if (LARGE_SCREEN_WIDGET_PICKER.get() + && mDeviceProfile.isTablet && !mDeviceProfile.isTwoPanels) { + handleClose(false); + show(Launcher.getLauncher(getContext()), false); + } else { + reset(); + } } }