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

Commit 1e29e49c authored by Satoshi Kataoka's avatar Satoshi Kataoka Committed by Android (Google) Code Review
Browse files

Merge "Reduce jankiness of the transition between a text field with...

Merge "Reduce jankiness of the transition between a text field with FLAG_NO_FULLSCREEN and a text field with FLAG_NO_EXTRACT_UI" into jb-mr1.1-dev
parents 14c89330 8b117c85
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -930,11 +930,13 @@ public class InputMethodService extends AbstractInputMethodService {
     */
    public void onConfigureWindow(Window win, boolean isFullscreen,
            boolean isCandidatesOnly) {
        if (isFullscreen) {
            mWindow.getWindow().setLayout(MATCH_PARENT, MATCH_PARENT);
        } else {
            mWindow.getWindow().setLayout(MATCH_PARENT, WRAP_CONTENT);
        final int currentHeight = mWindow.getWindow().getAttributes().height;
        final int newHeight = isFullscreen ? MATCH_PARENT : WRAP_CONTENT;
        if (mIsInputViewShown && currentHeight != newHeight) {
            Log.w(TAG, "Window size has been changed. This may cause jankiness of resizing window: "
                    + currentHeight + " -> " + newHeight);
        }
        mWindow.getWindow().setLayout(MATCH_PARENT, newHeight);
    }
    
    /**
@@ -997,10 +999,11 @@ public class InputMethodService extends AbstractInputMethodService {
    }
    
    void updateExtractFrameVisibility() {
        int vis;
        final int vis;
        if (isFullscreenMode()) {
            vis = mExtractViewHidden ? View.INVISIBLE : View.VISIBLE;
            mExtractFrame.setVisibility(View.VISIBLE);
            // "vis" should be applied for the extract frame as well in the fullscreen mode.
            mExtractFrame.setVisibility(vis);
        } else {
            vis = View.VISIBLE;
            mExtractFrame.setVisibility(View.GONE);