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

Commit 2a102dc6 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Allow app to force orientation if dock minimized

am: 409635b2

* commit '409635b2':
  Allow app to force orientation if dock minimized

Change-Id: I80637d9b65c6efee4669ef038a7d6258fe887ac7
parents ec500bfb 409635b2
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.