diff options
| author | 2017-05-23 17:44:04 +0000 | |
|---|---|---|
| committer | 2017-05-23 17:44:13 +0000 | |
| commit | 5b49464dc6cae55c240edf794d5b0da988774151 (patch) | |
| tree | eea58ef27032ecaaa1fdd29cc1516da043f49df9 | |
| parent | 1bc0286ef84c68b32c2e5f820c7498cc5df3a20b (diff) | |
| parent | 04f34304fb174a6285ea4d4a212d05c7753d377f (diff) | |
Merge "Fixed unminimizing during battery saving mode" into oc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java index 0c7703663810..012accda7b84 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java +++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java @@ -725,14 +725,21 @@ public class DividerView extends FrameLayout implements OnTouchListener, mMinimizedSnapAlgorithm = null; mDockedStackMinimized = minimized; initializeSnapAlgorithm(); - if (!mIsInMinimizeInteraction && minimized) { - mIsInMinimizeInteraction = true; - mDividerPositionBeforeMinimized = DockedDividerUtils.calculateMiddlePosition( - isHorizontalDivision(), mStableInsets, mDisplayWidth, mDisplayHeight, - mDividerSize); - - int position = mMinimizedSnapAlgorithm.getMiddleTarget().position; - resizeStack(position, position, mMinimizedSnapAlgorithm.getMiddleTarget()); + if (mIsInMinimizeInteraction != minimized) { + if (minimized) { + mIsInMinimizeInteraction = true; + mDividerPositionBeforeMinimized = DockedDividerUtils.calculateMiddlePosition( + isHorizontalDivision(), mStableInsets, mDisplayWidth, mDisplayHeight, + mDividerSize); + + int position = mMinimizedSnapAlgorithm.getMiddleTarget().position; + resizeStack(position, position, mMinimizedSnapAlgorithm.getMiddleTarget()); + } else { + resizeStack(mDividerPositionBeforeMinimized, mDividerPositionBeforeMinimized, + mSnapAlgorithm.calculateNonDismissingSnapTarget( + mDividerPositionBeforeMinimized)); + mIsInMinimizeInteraction = false; + } } } } |