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

This commit is contained in:
TreeHugger Robot
2017-05-23 17:44:04 +00:00
committed by Android (Google) Code Review

View File

@@ -725,7 +725,8 @@ public class DividerView extends FrameLayout implements OnTouchListener,
mMinimizedSnapAlgorithm = null; mMinimizedSnapAlgorithm = null;
mDockedStackMinimized = minimized; mDockedStackMinimized = minimized;
initializeSnapAlgorithm(); initializeSnapAlgorithm();
if (!mIsInMinimizeInteraction && minimized) { if (mIsInMinimizeInteraction != minimized) {
if (minimized) {
mIsInMinimizeInteraction = true; mIsInMinimizeInteraction = true;
mDividerPositionBeforeMinimized = DockedDividerUtils.calculateMiddlePosition( mDividerPositionBeforeMinimized = DockedDividerUtils.calculateMiddlePosition(
isHorizontalDivision(), mStableInsets, mDisplayWidth, mDisplayHeight, isHorizontalDivision(), mStableInsets, mDisplayWidth, mDisplayHeight,
@@ -733,6 +734,12 @@ public class DividerView extends FrameLayout implements OnTouchListener,
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;
}
} }
} }
} }