Allow app to force orientation if dock minimized

am: 409635b

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

Change-Id: I80637d9b65c6efee4669ef038a7d6258fe887ac7
This commit is contained in:
Jorim Jaggi
2016-04-01 22:56:02 +00:00
committed by android-build-merger
2 changed files with 6 additions and 1 deletions

View File

@@ -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;

View File

@@ -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.