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

Commit c1763b24 authored by Tony Wickham's avatar Tony Wickham
Browse files

resolve merge conflicts of 52040c2d to ub-launcher3-master.

Change-Id: Ie3cf72ef11b43e2c681d6d614c668062c7e7b74c
parents 92adb669 52040c2d
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -104,7 +104,6 @@ public class DeviceProfile {
    private int searchBarSpaceWidthPx;
    private int searchBarSpaceHeightNormalPx, searchBarSpaceHeightTallPx;
    private int searchBarSpaceHeightPx; // One of the above.
    private int searchBarHeight = LauncherCallbacks.SEARCH_BAR_HEIGHT_NORMAL;

    public DeviceProfile(Context context, InvariantDeviceProfile inv,
            Point minSize, Point maxSize,
@@ -408,13 +407,8 @@ public class DeviceProfile {
        return visibleChildren;
    }

    public void layout(Launcher launcher) {
        FrameLayout.LayoutParams lp;
        boolean hasVerticalBarLayout = isVerticalBarLayout();
        final boolean isLayoutRtl = Utilities.isRtl(launcher.getResources());

        // Layout the search bar space
        searchBarHeight = launcher.getSearchBarHeight();
    // TODO(twickham): b/25154513
    public void setSearchBarHeight(int searchBarHeight) {
        if (searchBarHeight == LauncherCallbacks.SEARCH_BAR_HEIGHT_TALL) {
            hotseatBarHeightPx = hotseatBarHeightShortPx;
            searchBarSpaceHeightPx = searchBarSpaceHeightTallPx;
@@ -422,6 +416,14 @@ public class DeviceProfile {
            hotseatBarHeightPx = hotseatBarHeightNormalPx;
            searchBarSpaceHeightPx = searchBarSpaceHeightNormalPx;
        }
    }

    public void layout(Launcher launcher) {
        FrameLayout.LayoutParams lp;
        boolean hasVerticalBarLayout = isVerticalBarLayout();
        final boolean isLayoutRtl = Utilities.isRtl(launcher.getResources());

        // Layout the search bar space
        View searchBar = launcher.getSearchDropTargetBar();
        lp = getDropTargetBarLayoutParams(hasVerticalBarLayout, searchBar, Gravity.TOP);
        searchBar.setLayoutParams(lp);
@@ -542,7 +544,7 @@ public class DeviceProfile {
            // Vertical drop target bar space -- The drop target bar is fixed in the layout to be on
            //                                   the left of the screen regardless of RTL
            lp.gravity = Gravity.LEFT;
            lp.width = searchBarSpaceHeightPx;
            lp.width = searchBarSpaceHeightNormalPx;

            LinearLayout targets = (LinearLayout) dropTargetBar.findViewById(R.id.drag_target_bar);
            targets.setOrientation(LinearLayout.VERTICAL);
+6 −0
Original line number Diff line number Diff line
@@ -441,6 +441,8 @@ public class Launcher extends Activity

        setContentView(R.layout.launcher);

        app.getInvariantDeviceProfile().landscapeProfile.setSearchBarHeight(getSearchBarHeight());
        app.getInvariantDeviceProfile().portraitProfile.setSearchBarHeight(getSearchBarHeight());
        setupViews();
        mDeviceProfile.layout(this);

@@ -3601,6 +3603,10 @@ public class Launcher extends Activity
            opts.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT, minHeight);
            opts.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH, maxWidth);
            opts.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, minWidth);
            if (LOGD) {
                Log.d(TAG, "QSB widget options: maxHeight=" + maxHeight + " minHeight=" + minHeight
                        + " maxWidth=" + maxWidth + " minWidth=" + minWidth);
            }

            if (mLauncherCallbacks != null) {
                opts.putAll(mLauncherCallbacks.getAdditionalSearchWidgetOptions());