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

Commit 409635b2 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Allow app to force orientation if dock minimized

Change-Id: I4bf1346de83922f866095465470e1a1c305b71a1
Fixes: 27437129
parent d19342a8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -884,6 +884,10 @@ public class TaskStack implements DimLayer.DimLayerUser,
        }
    }

    boolean isAdjustedForMinimizedDock() {
        return mMinimizeAmount != 0f;
    }

    private boolean adjustForIME(final WindowState imeWin) {
        final int dockedSide = getDockSide();
        final boolean dockedTopOrBottom = dockedSide == DOCKED_TOP || dockedSide == DOCKED_BOTTOM;
+2 −1
Original line number Diff line number Diff line
@@ -3401,7 +3401,8 @@ public class WindowManagerService extends IWindowManager.Stub
            }
        }

        if (isStackVisibleLocked(DOCKED_STACK_ID)
        if ((isStackVisibleLocked(DOCKED_STACK_ID)
                && !mStackIdToStack.get(DOCKED_STACK_ID).isAdjustedForMinimizedDock())
                || isStackVisibleLocked(FREEFORM_WORKSPACE_STACK_ID)) {
            // We don't let app affect the system orientation when in freeform or docked mode since
            // they don't occupy the entire display and their request can conflict with other apps.