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;
mDockedStackMinimized = minimized;
initializeSnapAlgorithm();
if (!mIsInMinimizeInteraction && minimized) {
mIsInMinimizeInteraction = true;
mDividerPositionBeforeMinimized = DockedDividerUtils.calculateMiddlePosition(
isHorizontalDivision(), mStableInsets, mDisplayWidth, mDisplayHeight,
mDividerSize);
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());
int position = mMinimizedSnapAlgorithm.getMiddleTarget().position;
resizeStack(position, position, mMinimizedSnapAlgorithm.getMiddleTarget());
} else {
resizeStack(mDividerPositionBeforeMinimized, mDividerPositionBeforeMinimized,
mSnapAlgorithm.calculateNonDismissingSnapTarget(
mDividerPositionBeforeMinimized));
mIsInMinimizeInteraction = false;
}
}
}
}