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

Commit ecde72fe authored by Derek Sollenberger's avatar Derek Sollenberger
Browse files

Ensure the IME is rendered above the surface when we z-order the surface to be on top.

parent a406fb90
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -319,8 +319,14 @@ public class SurfaceView extends View {
     * <p>Calling this overrides any previous call to {@link #setZOrderMediaOverlay}.
     */
    public void setZOrderOnTop(boolean onTop) {
        mWindowType = onTop ? WindowManager.LayoutParams.TYPE_APPLICATION_PANEL
                : WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
        if (onTop) {
            mWindowType = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
            // ensures the surface is placed below the IME
            mLayout.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
        } else {
            mWindowType = WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
            mLayout.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
        }
    }
    
    /**