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

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: Fix DCHECK 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
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..a545e144159f82153792d6a051e6827ef12a7048 100644
--- a/ui/android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java
+++ b/ui/android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java
@@ -136,6 +136,14 @@ public class ViewConfigurationHelper {
}
@CalledByNative
+ private static boolean getTouchMajorUsedInScalingSpan() {
tdresser 2014/07/02 13:43:10 This method name makes it sound like you're return
jdduke (slow) 2014/07/02 16:24:18 Good point, renamed to |ShouldUseTouchMajorInScali
+ // 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();

Powered by Google App Engine
This is Rietveld 408576698