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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 2308103002: Disable WebView/Chrome's drag and drop feature on M and below. (Closed)
Patch Set: Created 4 years, 3 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: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 12abff599f8dfa9dd76f52e5b06bc1444838b6bc..d0c951da7c477f2ad72424b826e488c551975a40 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -3142,8 +3142,12 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
/**
* @see View#onDragEvent(DragEvent)
*/
+ // TODO(hush): uncomment below when we build with API 24.
+ // @TargetApi(Build.VERSION_CODES.N)
public boolean onDragEvent(DragEvent event) {
- if (mNativeContentViewCore == 0) return false;
+ if (mNativeContentViewCore == 0 || Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
+ return false;
+ }
ClipDescription clipDescription = event.getClipDescription();

Powered by Google App Engine
This is Rietveld 408576698