| Index: ui/android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java
|
| diff --git a/ui/android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java b/ui/android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java
|
| index 463ca9f678b8f91b1b474fefb0ac28a5635108e3..d728bdbd9b6f7478f1cd2720488a66d34137ca18 100644
|
| --- a/ui/android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java
|
| +++ b/ui/android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java
|
| @@ -25,8 +25,7 @@ public class ViewConfigurationHelper {
|
|
|
| // Fallback constants when resource lookup fails, see
|
| // ui/android/java/res/values/dimens.xml.
|
| - private static final float MIN_SCALING_SPAN_MM = 27.0f;
|
| - private static final float MIN_SCALING_TOUCH_MAJOR_DIP = 48.0f;
|
| + private static final float MIN_SCALING_SPAN_MM = 12.0f;
|
|
|
| private final Context mAppContext;
|
| private ViewConfiguration mViewConfiguration;
|
| @@ -65,7 +64,7 @@ public class ViewConfigurationHelper {
|
| mDensity = mAppContext.getResources().getDisplayMetrics().density;
|
| assert mDensity > 0;
|
| nativeUpdateSharedViewConfiguration(getMaximumFlingVelocity(), getMinimumFlingVelocity(),
|
| - getTouchSlop(), getDoubleTapSlop(), getMinScalingSpan(), getMinScalingTouchMajor());
|
| + getTouchSlop(), getDoubleTapSlop(), getMinScalingSpan());
|
| }
|
|
|
| @CalledByNative
|
| @@ -113,16 +112,12 @@ public class ViewConfigurationHelper {
|
| return toDips(getScaledMinScalingSpan());
|
| }
|
|
|
| - @CalledByNative
|
| - private float getMinScalingTouchMajor() {
|
| - return toDips(getScaledMinScalingTouchMajor());
|
| - }
|
| -
|
| private int getScaledMinScalingSpan() {
|
| final Resources res = mAppContext.getResources();
|
| - int id = res.getIdentifier("config_minScalingSpan", "dimen", "android");
|
| - // Fall back to a sensible default if the internal identifier does not exist.
|
| - if (id == 0) id = R.dimen.config_min_scaling_span;
|
| + // The correct minimum scaling span depends on how we recognize scale
|
| + // gestures. Since we've deviated from Android, don't use the Android
|
| + // system value here.
|
| + int id = R.dimen.config_min_scaling_span;
|
| try {
|
| return res.getDimensionPixelSize(id);
|
| } catch (Resources.NotFoundException e) {
|
| @@ -132,20 +127,6 @@ public class ViewConfigurationHelper {
|
| }
|
| }
|
|
|
| - private int getScaledMinScalingTouchMajor() {
|
| - final Resources res = mAppContext.getResources();
|
| - int id = res.getIdentifier("config_minScalingTouchMajor", "dimen", "android");
|
| - // Fall back to a sensible default if the internal identifier does not exist.
|
| - if (id == 0) id = R.dimen.config_min_scaling_touch_major;
|
| - try {
|
| - return res.getDimensionPixelSize(id);
|
| - } catch (Resources.NotFoundException e) {
|
| - assert false : "MinScalingTouchMajor resource lookup failed.";
|
| - return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
|
| - MIN_SCALING_TOUCH_MAJOR_DIP, res.getDisplayMetrics());
|
| - }
|
| - }
|
| -
|
| /**
|
| * @return the unscaled pixel quantity in DIPs.
|
| */
|
| @@ -161,6 +142,5 @@ public class ViewConfigurationHelper {
|
| }
|
|
|
| private native void nativeUpdateSharedViewConfiguration(float maximumFlingVelocity,
|
| - float minimumFlingVelocity, float touchSlop, float doubleTapSlop, float minScalingSpan,
|
| - float minScalingTouchMajor);
|
| + float minimumFlingVelocity, float touchSlop, float doubleTapSlop, float minScalingSpan);
|
| }
|
|
|