Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: ui/android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java

Issue 340343013: Provide max gesture bounds and option to ignore touch size during pinch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/events/gesture_detection/gesture_config_helper_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e8fc5b996d8de8121e26e84733b1d0dbc7f53e1d..8f47717cd34c6310a20935d3c4ac57a531ed38ca 100644
--- a/ui/android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java
+++ b/ui/android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java
@@ -8,6 +8,7 @@ import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
+import android.os.Build;
import android.util.TypedValue;
import android.view.ViewConfiguration;
@@ -136,6 +137,14 @@ public class ViewConfigurationHelper {
}
@CalledByNative
+ private static boolean shouldUseTouchMajorInScalingSpan() {
+ // Android's ScaleGestureDetector started using touch major values in
+ // JBMR1. Many devices from versions prior report wildly inconsistent
+ // touch sizes, so disable touch major use in such scenarios.
+ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1;
+ }
+
+ @CalledByNative
private static ViewConfigurationHelper createWithListener(Context context) {
ViewConfigurationHelper viewConfigurationHelper = new ViewConfigurationHelper(context);
viewConfigurationHelper.registerListener();
« no previous file with comments | « no previous file | ui/events/gesture_detection/gesture_config_helper_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698