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

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

Merge "Fix AlertDialog positioning for dialogs spawned from DialogWhenLarge activities" into jb-dev

parents c793d626 8877cc3e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -174,6 +174,13 @@ please see themes_device_defaults.xml.
        <item name="windowActionModeOverlay">false</item>
        <item name="windowCloseOnTouchOutside">false</item>

        <!-- Define these here; ContextThemeWrappers around themes that define them should
             always clear these values. -->
        <item name="windowFixedWidthMajor">0dp</item>
        <item name="windowFixedWidthMinor">0dp</item>
        <item name="windowFixedHeightMajor">0dp</item>
        <item name="windowFixedHeightMinor">0dp</item>

        <!-- Dialog attributes -->
        <item name="alertDialogStyle">@android:style/AlertDialog</item>
        <item name="dialogTheme">@android:style/Theme.Dialog</item>
+10 −5
Original line number Diff line number Diff line
@@ -2108,8 +2108,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                        w = 0;
                    }

                    if (w > 0) {
                        final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
                    widthMeasureSpec = MeasureSpec.makeMeasureSpec(Math.min(w, widthSize), EXACTLY);
                        widthMeasureSpec = MeasureSpec.makeMeasureSpec(
                                Math.min(w, widthSize), EXACTLY);
                    }
                }
            }

@@ -2125,9 +2128,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                        h = 0;
                    }

                    if (h > 0) {
                        final int heightSize = MeasureSpec.getSize(heightMeasureSpec);
                    heightMeasureSpec =
                            MeasureSpec.makeMeasureSpec(Math.min(h, heightSize), EXACTLY);
                        heightMeasureSpec = MeasureSpec.makeMeasureSpec(
                                Math.min(h, heightSize), EXACTLY);
                    }
                }
            }