summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Utilities.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r--src/com/android/launcher3/Utilities.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 7bdbb95f7..65aa3a775 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -128,6 +128,16 @@ public final class Utilities {
public static final int EDGE_NAV_BAR = 1 << 8;
/**
+ * Set on a motion event do disallow any gestures and only handle touch.
+ * See {@link MotionEvent#setEdgeFlags(int)}.
+ */
+ public static final int FLAG_NO_GESTURES = 1 << 9;
+
+ public static boolean shouldDisableGestures(MotionEvent ev) {
+ return (ev.getEdgeFlags() & FLAG_NO_GESTURES) == FLAG_NO_GESTURES;
+ }
+
+ /**
* Indicates if the device has a debug build. Should only be used to store additional info or
* add extra logging and not for changing the app behavior.
*/