Merge "Fixed unminimizing during battery saving mode" into oc-dev am: 5b49464dc6

am: 37b03b9e72

Change-Id: I12e1586a3c1a7a9e506db822c3a779f7c633c50d
This commit is contained in:
Matthew Ng
2017-05-23 18:04:38 +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;
}
}
}
}