Merge "Fix dismissing wrong stage when droping divider to the edge" into sc-dev

This commit is contained in:
Jerry Chang
2021-03-02 00:24:43 +00:00
committed by Android (Google) Code Review

View File

@@ -362,8 +362,9 @@ class StageCoordinator implements SplitLayout.LayoutChangeListener,
@Override
public void onSnappedToDismiss(boolean bottomOrRight) {
final boolean mainStageToTop = bottomOrRight
&& mSideStagePosition == STAGE_POSITION_BOTTOM_OR_RIGHT;
final boolean mainStageToTop =
bottomOrRight ? mSideStagePosition == STAGE_POSITION_BOTTOM_OR_RIGHT
: mSideStagePosition == STAGE_POSITION_TOP_OR_LEFT;
exitSplitScreen(mainStageToTop ? mMainStage : mSideStage);
}