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

Commit 60dea36d authored by Satoshi Kataoka's avatar Satoshi Kataoka
Browse files

Assuming that NO_EXTRACT_UI mode is NO_FULSCREEN

Bug: 7393485
Bug: 7272829
Change-Id: I873e8d99486c734e76484526631a90fc55e91c86
parent 306e0a80
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -1063,7 +1063,16 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
        // Reread resource value here, because this method is called by framework anytime as needed.
        final boolean isFullscreenModeAllowed =
                mCurrentSettings.isFullscreenModeAllowed(getResources());
        return super.onEvaluateFullscreenMode() && isFullscreenModeAllowed;
        if (super.onEvaluateFullscreenMode() && isFullscreenModeAllowed) {
            // TODO: Remove this hack. Actually we should not really assume NO_EXTRACT_UI
            // implies NO_FULLSCREEN. However, the framework mistakenly does.  i.e. NO_EXTRACT_UI
            // without NO_FULLSCREEN doesn't work as expected. Because of this we need this
            // hack for now.  Let's get rid of this once the framework gets fixed.
            final EditorInfo ei = getCurrentInputEditorInfo();
            return !(ei != null && ((ei.imeOptions & EditorInfo.IME_FLAG_NO_EXTRACT_UI) != 0));
        } else {
            return false;
        }
    }

    @Override