Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b326859f authored by Federico Baron's avatar Federico Baron Committed by Android (Google) Code Review
Browse files

Merge "Prevent two pane widget picker code from reaching foldables" into udc-dev

parents f8e0e727 a3dbce41
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -198,7 +198,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);
            }
+3 −2
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ public class WidgetsFullSheet extends BaseWidgetSheet
        super(context, attrs, defStyleAttr);
        mDeviceProfile = Launcher.getLauncher(context).getDeviceProfile();
        mHasWorkProfile = context.getSystemService(LauncherApps.class).getProfiles().size() > 1;
        mOrientation = Launcher.getLauncher(context).getOrientation();
        mOrientation = context.getResources().getConfiguration().orientation;
        mAdapters.put(AdapterHolder.PRIMARY, new AdapterHolder(AdapterHolder.PRIMARY));
        mAdapters.put(AdapterHolder.WORK, new AdapterHolder(AdapterHolder.WORK));
        mAdapters.put(AdapterHolder.SEARCH, new AdapterHolder(AdapterHolder.SEARCH));
@@ -799,7 +799,8 @@ public class WidgetsFullSheet extends BaseWidgetSheet
        // Checks the orientation of the screen
        if (LARGE_SCREEN_WIDGET_PICKER.get()
                && mOrientation != newConfig.orientation
                && mDeviceProfile.isTablet) {
                && mDeviceProfile.isTablet
                && !mDeviceProfile.isTwoPanels) {
            mOrientation = newConfig.orientation;
            handleClose(false);
            show(Launcher.getLauncher(getContext()), false);