Merge "Make sure divider show after DA info changed" into sc-v2-dev
This commit is contained in:
@@ -620,22 +620,9 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
}
|
}
|
||||||
|
|
||||||
mSyncQueue.runInSync(t -> {
|
mSyncQueue.runInSync(t -> {
|
||||||
final SurfaceControl dividerLeash = mSplitLayout.getDividerLeash();
|
|
||||||
final SurfaceControl sideStageLeash = mSideStage.mRootLeash;
|
final SurfaceControl sideStageLeash = mSideStage.mRootLeash;
|
||||||
final SurfaceControl mainStageLeash = mMainStage.mRootLeash;
|
final SurfaceControl mainStageLeash = mMainStage.mRootLeash;
|
||||||
|
|
||||||
if (dividerLeash != null) {
|
|
||||||
if (mDividerVisible) {
|
|
||||||
t.show(dividerLeash)
|
|
||||||
.setLayer(dividerLeash, Integer.MAX_VALUE)
|
|
||||||
.setPosition(dividerLeash,
|
|
||||||
mSplitLayout.getDividerBounds().left,
|
|
||||||
mSplitLayout.getDividerBounds().top);
|
|
||||||
} else {
|
|
||||||
t.hide(dividerLeash);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sideStageVisible) {
|
if (sideStageVisible) {
|
||||||
final Rect sideStageBounds = getSideStageBounds();
|
final Rect sideStageBounds = getSideStageBounds();
|
||||||
t.show(sideStageLeash)
|
t.show(sideStageLeash)
|
||||||
@@ -662,9 +649,30 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
} else {
|
} else {
|
||||||
t.hide(mainStageLeash);
|
t.hide(mainStageLeash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
applyDividerVisibility(t);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void applyDividerVisibility(SurfaceControl.Transaction t) {
|
||||||
|
final SurfaceControl dividerLeash = mSplitLayout.getDividerLeash();
|
||||||
|
if (dividerLeash == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mDividerVisible) {
|
||||||
|
t.show(dividerLeash)
|
||||||
|
.setLayer(dividerLeash, Integer.MAX_VALUE)
|
||||||
|
.setPosition(dividerLeash,
|
||||||
|
mSplitLayout.getDividerBounds().left,
|
||||||
|
mSplitLayout.getDividerBounds().top);
|
||||||
|
} else {
|
||||||
|
t.hide(dividerLeash);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void onStageHasChildrenChanged(StageListenerImpl stageListener) {
|
private void onStageHasChildrenChanged(StageListenerImpl stageListener) {
|
||||||
final boolean hasChildren = stageListener.mHasChildren;
|
final boolean hasChildren = stageListener.mHasChildren;
|
||||||
final boolean isSideStage = stageListener == mSideStageListener;
|
final boolean isSideStage = stageListener == mSideStageListener;
|
||||||
@@ -782,6 +790,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
&& mSplitLayout.updateConfiguration(mDisplayAreaInfo.configuration)
|
&& mSplitLayout.updateConfiguration(mDisplayAreaInfo.configuration)
|
||||||
&& mMainStage.isActive()) {
|
&& mMainStage.isActive()) {
|
||||||
onBoundsChanged(mSplitLayout);
|
onBoundsChanged(mSplitLayout);
|
||||||
|
mSyncQueue.runInSync(t -> applyDividerVisibility(t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user