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

Commit 67ae1ea9 authored by Hiroki Sato's avatar Hiroki Sato Committed by Android (Google) Code Review
Browse files

Merge "Provide only caption and IME insets to freeform windows"

parents 75c305bd 654386dd
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -398,16 +398,18 @@ class InsetsPolicy {

        if (WindowConfiguration.isFloating(windowingMode)
                || (windowingMode == WINDOWING_MODE_MULTI_WINDOW && isAlwaysOnTop)) {
            if (!stateCopied) {
                state = new InsetsState(state);
                stateCopied = true;
            InsetsState newState = new InsetsState();

            // Only caption and IME are needed.
            if (state.peekSource(ITYPE_CAPTION_BAR) != null) {
                newState.addSource(state.peekSource(ITYPE_CAPTION_BAR));
            }
            state.removeSource(ITYPE_STATUS_BAR);
            state.removeSource(ITYPE_NAVIGATION_BAR);
            state.removeSource(ITYPE_EXTRA_NAVIGATION_BAR);
            if (windowingMode == WINDOWING_MODE_PINNED) {
                state.removeSource(ITYPE_IME);
            if (windowingMode != WINDOWING_MODE_PINNED && state.peekSource(ITYPE_IME) != null) {
                newState.addSource(state.peekSource(ITYPE_IME));
            }

            state = newState;
            stateCopied = true;
        }

        return state;