Merge "Always using middle position to resize layout" into sc-dev am: 1591096aed am: 54381056eb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15127130

Change-Id: I7998177a55fc5e6ed12364f409eb119be4e2878f
This commit is contained in:
Tony Huang
2021-06-29 06:23:23 +00:00
committed by Automerger Merge Worker

View File

@@ -146,10 +146,8 @@ public class LegacySplitScreenController implements DisplayController.OnDisplays
new LegacySplitDisplayLayout(mContext, displayLayout, mSplits);
sdl.rotateTo(toRotation);
mRotateSplitLayout = sdl;
final int position = isDividerVisible()
? (mMinimized ? mView.mSnapTargetBeforeMinimized.position
: mView.getCurrentPosition())
// snap resets to middle target when not in split-mode
// snap resets to middle target when not minimized and rotation changed.
final int position = mMinimized ? mView.mSnapTargetBeforeMinimized.position
: sdl.getSnapAlgorithm().getMiddleTarget().position;
DividerSnapAlgorithm snap = sdl.getSnapAlgorithm();
final DividerSnapAlgorithm.SnapTarget target =