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

Commit bacbe7fd authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 4807086 - Options menu panel too narrow in landscape"

parents 181735a8 a3e3c533
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1000,8 +1000,7 @@ public final class ViewAncestor extends Handler implements ViewParent,
                    + "x" + desiredWindowHeight + "...");

            boolean goodMeasure = false;
            if (lp.width == ViewGroup.LayoutParams.WRAP_CONTENT
                    || lp.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
            if (lp.width == ViewGroup.LayoutParams.WRAP_CONTENT) {
                // On large screens, we don't want to allow dialogs to just
                // stretch to fill the entire width of the screen to display
                // one line of text.  First try doing the layout at a smaller
+3 −1
Original line number Diff line number Diff line
@@ -498,6 +498,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            return;
        }

        int width = WRAP_CONTENT;
        if (st.decorView == null || st.refreshDecorView) {
            if (st.decorView == null) {
                // Initialize the panel decor, this will populate st.decorView
@@ -523,6 +524,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                // If the contents is fill parent for the width, set the
                // corresponding background
                backgroundResId = st.fullBackground;
                width = MATCH_PARENT;
            } else {
                // Otherwise, set the normal panel background
                backgroundResId = st.background;
@@ -546,7 +548,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        st.isHandled = false;

        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
                WRAP_CONTENT, WRAP_CONTENT,
                width, WRAP_CONTENT,
                st.x, st.y, WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG,
                WindowManager.LayoutParams.FLAG_DITHER
                | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM