Do not use docked stack bounds unless all conditions are met.

TaskStack currently refers to the DockedStackDividerControler to
calculate the docked stack. However, only a partial set of the
conditions when this is valid were mirrored. The code now checks the
base condition (that we are dealing with the docked stack) and then
checks a null value before applying. Null is passed back from the
controller in the case all conditions are not met.

Change-Id: I388c2eb0b8b9312cd9ee6380ace1837e2eca8450
Fixes: 35233502
Test: manual from bug repro steps.
This commit is contained in:
Bryce Lee
2017-02-14 09:16:45 -08:00
parent 02761acc67
commit fa378d84a2

View File

@@ -423,8 +423,12 @@ public class TaskStack extends WindowContainer<Task> implements DimLayer.DimLaye
mBoundsAfterRotation.setEmpty();
final DockedStackDividerController controller = getDisplayContent()
.mDividerControllerLocked;
if (controller.isMinimizedDock() && mStackId == DOCKED_STACK_ID) {
outTempBounds.set(controller.getMiddlePositionDockedStackRect());
if (mStackId == DOCKED_STACK_ID) {
final Rect dockedStackRect = controller.getMiddlePositionDockedStackRect();
if (dockedStackRect != null) {
outTempBounds.set(dockedStackRect);
}
}
}