Merge "Fixed unminimizing during battery saving mode" into oc-dev

am: 5b49464dc6

Change-Id: Id5efa71298cd71bb91aa3f08fb4bfe4eff43a183
This commit is contained in:
Matthew Ng
2017-05-23 17:57:26 +00:00
committed by android-build-merger

View File

@@ -725,14 +725,21 @@ public class DividerView extends FrameLayout implements OnTouchListener,
mMinimizedSnapAlgorithm = null; mMinimizedSnapAlgorithm = null;
mDockedStackMinimized = minimized; mDockedStackMinimized = minimized;
initializeSnapAlgorithm(); initializeSnapAlgorithm();
if (!mIsInMinimizeInteraction && minimized) { if (mIsInMinimizeInteraction != minimized) {
mIsInMinimizeInteraction = true; if (minimized) {
mDividerPositionBeforeMinimized = DockedDividerUtils.calculateMiddlePosition( mIsInMinimizeInteraction = true;
isHorizontalDivision(), mStableInsets, mDisplayWidth, mDisplayHeight, mDividerPositionBeforeMinimized = DockedDividerUtils.calculateMiddlePosition(
mDividerSize); isHorizontalDivision(), mStableInsets, mDisplayWidth, mDisplayHeight,
mDividerSize);
int position = mMinimizedSnapAlgorithm.getMiddleTarget().position; int position = mMinimizedSnapAlgorithm.getMiddleTarget().position;
resizeStack(position, position, mMinimizedSnapAlgorithm.getMiddleTarget()); resizeStack(position, position, mMinimizedSnapAlgorithm.getMiddleTarget());
} else {
resizeStack(mDividerPositionBeforeMinimized, mDividerPositionBeforeMinimized,
mSnapAlgorithm.calculateNonDismissingSnapTarget(
mDividerPositionBeforeMinimized));
mIsInMinimizeInteraction = false;
}
} }
} }
} }