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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user