Merge "Fix for testLifecycleOnMoveToFromSplitScreenRelaunch"
This commit is contained in:
@@ -137,6 +137,7 @@ public class DividerSnapAlgorithm {
|
|||||||
mDismissStartTarget = mTargets.get(0);
|
mDismissStartTarget = mTargets.get(0);
|
||||||
mDismissEndTarget = mTargets.get(mTargets.size() - 1);
|
mDismissEndTarget = mTargets.get(mTargets.size() - 1);
|
||||||
mMiddleTarget = mTargets.get(mTargets.size() / 2);
|
mMiddleTarget = mTargets.get(mTargets.size() / 2);
|
||||||
|
mMiddleTarget.isMiddleTarget = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -438,6 +439,8 @@ public class DividerSnapAlgorithm {
|
|||||||
|
|
||||||
public final int flag;
|
public final int flag;
|
||||||
|
|
||||||
|
public boolean isMiddleTarget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Multiplier used to calculate distance to snap position. The lower this value, the harder
|
* Multiplier used to calculate distance to snap position. The lower this value, the harder
|
||||||
* it's to snap on this target
|
* it's to snap on this target
|
||||||
|
|||||||
@@ -464,6 +464,9 @@ public class DividerView extends FrameLayout implements OnTouchListener,
|
|||||||
if (mSnapAlgorithm == null) {
|
if (mSnapAlgorithm == null) {
|
||||||
mSnapAlgorithm = new DividerSnapAlgorithm(getContext().getResources(), mDisplayWidth,
|
mSnapAlgorithm = new DividerSnapAlgorithm(getContext().getResources(), mDisplayWidth,
|
||||||
mDisplayHeight, mDividerSize, isHorizontalDivision(), mStableInsets, mDockSide);
|
mDisplayHeight, mDividerSize, isHorizontalDivision(), mStableInsets, mDockSide);
|
||||||
|
if (mSnapTargetBeforeMinimized != null && mSnapTargetBeforeMinimized.isMiddleTarget) {
|
||||||
|
mSnapTargetBeforeMinimized = mSnapAlgorithm.getMiddleTarget();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (mMinimizedSnapAlgorithm == null) {
|
if (mMinimizedSnapAlgorithm == null) {
|
||||||
mMinimizedSnapAlgorithm = new DividerSnapAlgorithm(getContext().getResources(),
|
mMinimizedSnapAlgorithm = new DividerSnapAlgorithm(getContext().getResources(),
|
||||||
|
|||||||
Reference in New Issue
Block a user