diff options
| author | 2019-01-24 14:43:51 -0800 | |
|---|---|---|
| committer | 2019-02-07 22:17:32 +0000 | |
| commit | 7b6ae663d696e215d3a6d8af35dfa8bf6e391fa9 (patch) | |
| tree | 6e0a9aa16054b30ecb4b8e54628e0d893881b3e1 | |
| parent | 3ad89238428de48e8bdcb6932d23575ef1b59493 (diff) | |
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>
| -rw-r--r-- | core/java/com/android/internal/policy/DividerSnapAlgorithm.java | 3 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/core/java/com/android/internal/policy/DividerSnapAlgorithm.java b/core/java/com/android/internal/policy/DividerSnapAlgorithm.java index a8ad8102c610..c46f86792764 100644 --- a/core/java/com/android/internal/policy/DividerSnapAlgorithm.java +++ b/core/java/com/android/internal/policy/DividerSnapAlgorithm.java @@ -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 diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java index 98925b9ba9e5..1feef8763dfe 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java +++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java @@ -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(), |