Update divider controller's dim layer when the layer is changed

The divider's layer assignment could change after the initial adjust
animation has finished.

bug: 28255739
Change-Id: I5899fe22e4fec680c49c881437c7f85d8ee9ca74
This commit is contained in:
Chong Zhang
2016-04-21 15:17:47 -07:00
parent dc7ce84095
commit 1402c2efe8
2 changed files with 4 additions and 4 deletions

View File

@@ -353,7 +353,7 @@ public class DockedStackDividerController implements DimLayerUser {
stack.getDimBounds(mTmpRect);
if (mTmpRect.height() > 0 && mTmpRect.width() > 0) {
mDimLayer.setBounds(mTmpRect);
mDimLayer.show(mDisplayContent.mService.mLayersController.getResizeDimLayer(),
mDimLayer.show(mService.mLayersController.getResizeDimLayer(),
alpha, 0 /* duration */);
} else {
visibleAndValid = false;
@@ -543,6 +543,9 @@ public class DockedStackDividerController implements DimLayerUser {
} else if (mAnimatingForIme) {
return animateForIme(now);
} else {
if (mDimLayer != null) {
mDimLayer.setLayer(mService.mLayersController.getResizeDimLayer());
}
return false;
}
}

View File

@@ -119,7 +119,6 @@ public class TaskStack implements DimLayer.DimLayerUser,
// Whether the stack and all its tasks is currently being drag-resized
private boolean mDragResizing;
private final Rect mLastContentBounds = new Rect();
private final Rect mTmpAdjustedBounds = new Rect();
private boolean mAdjustedForIme;
private boolean mImeGoingAway;
@@ -975,7 +974,6 @@ public class TaskStack implements DimLayer.DimLayerUser,
contentBounds.bottom = imeTop;
}
mLastContentBounds.set(contentBounds);
final int yOffset = displayContentRect.bottom - contentBounds.bottom;
final int dividerWidth =
@@ -1085,7 +1083,6 @@ public class TaskStack implements DimLayer.DimLayerUser,
}
if (!adjust) {
mTmpAdjustedBounds.setEmpty();
mLastContentBounds.setEmpty();
}
setAdjustedBounds(mTmpAdjustedBounds);