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

Commit 558e9116 authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Merge "Don't use a copy of window params when showing a dialog." into pi-dev

am: 3f6b7714

Change-Id: Iaacd371fb0c63eedaab73f32314c14997e578462
parents 1a274302 3f6b7714
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -321,16 +321,20 @@ public class Dialog implements DialogInterface, Window.Callback,
        }

        WindowManager.LayoutParams l = mWindow.getAttributes();
        boolean restoreSoftInputMode = false;
        if ((l.softInputMode
                & WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION) == 0) {
            WindowManager.LayoutParams nl = new WindowManager.LayoutParams();
            nl.copyFrom(l);
            nl.softInputMode |=
            l.softInputMode |=
                    WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION;
            l = nl;
            restoreSoftInputMode = true;
        }

        mWindowManager.addView(mDecor, l);
        if (restoreSoftInputMode) {
            l.softInputMode &=
                    ~WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION;
        }

        mShowing = true;

        sendShowMessage();