Fix for testLifecycleOnMoveToFromSplitScreenRelaunch

The configuration change occurs twice and the CallbackTrackingActivity is
relaunched twice, this causes the test to fail on some devices with certain
densities.

BUG:123342948

Change-Id: Idbf79a48a55477445cd70a6f76c104d7669bf2fa
Signed-off-by: Raj Mamadgi <r.mamadgi@samsung.com>
This commit is contained in:
Raj Mamadgi
2019-01-24 14:43:51 -08:00
committed by Amith Dsouza
parent 3ad8923842
commit 7b6ae663d6
2 changed files with 6 additions and 0 deletions

View File

@@ -137,6 +137,7 @@ public class DividerSnapAlgorithm {
mDismissStartTarget = mTargets.get(0);
mDismissEndTarget = mTargets.get(mTargets.size() - 1);
mMiddleTarget = mTargets.get(mTargets.size() / 2);
mMiddleTarget.isMiddleTarget = true;
}
/**
@@ -438,6 +439,8 @@ public class DividerSnapAlgorithm {
public final int flag;
public boolean isMiddleTarget;
/**
* Multiplier used to calculate distance to snap position. The lower this value, the harder
* it's to snap on this target

View File

@@ -464,6 +464,9 @@ public class DividerView extends FrameLayout implements OnTouchListener,
if (mSnapAlgorithm == null) {
mSnapAlgorithm = new DividerSnapAlgorithm(getContext().getResources(), mDisplayWidth,
mDisplayHeight, mDividerSize, isHorizontalDivision(), mStableInsets, mDockSide);
if (mSnapTargetBeforeMinimized != null && mSnapTargetBeforeMinimized.isMiddleTarget) {
mSnapTargetBeforeMinimized = mSnapAlgorithm.getMiddleTarget();
}
}
if (mMinimizedSnapAlgorithm == null) {
mMinimizedSnapAlgorithm = new DividerSnapAlgorithm(getContext().getResources(),