am d3e5180f: am d07fa6e0: Merge "Prevent out of range magnification scale to be persisted." into jb-mr1-dev

* commit 'd3e5180f7cec9df97e983f228aa753efcd193013':
  Prevent out of range magnification scale to be persisted.
This commit is contained in:
Svetoslav Ganov
2012-10-11 17:11:37 -07:00
committed by Android Git Automerger

View File

@@ -376,7 +376,8 @@ public final class ScreenMagnifier implements EventStreamTransformation {
}
if (event.getActionMasked() == MotionEvent.ACTION_UP) {
clear();
final float scale = mMagnificationController.getScale();
final float scale = Math.min(Math.max(mMagnificationController.getScale(),
MIN_SCALE), MAX_SCALE);
if (scale != getPersistedScale()) {
persistScale(scale);
}