summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2016-03-30 17:31:48 -0700
committerThe Android Automerger <android-build@google.com>2016-04-21 19:11:12 -0700
commit613f63b938145bb86cd64fe0752eaf5e99b5f628 (patch)
treea06555193bab27f789ae3193212163d98df50fe6 /core/java
parent12332e05f632794e18ea8c4ac52c98e82532e5db (diff)
downloadframeworks_base-613f63b938145bb86cd64fe0752eaf5e99b5f628.zip
frameworks_base-613f63b938145bb86cd64fe0752eaf5e99b5f628.tar.gz
frameworks_base-613f63b938145bb86cd64fe0752eaf5e99b5f628.tar.bz2
Add new, hidden MotionEvent flag for partially obscured windows.
Bug: 26677796 Change-Id: Ic4219b883bb760495e6172ef61e84e9725876ef6
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/MotionEvent.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index 6026d04..a8d0b90 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -417,6 +417,21 @@ public final class MotionEvent extends InputEvent implements Parcelable {
public static final int FLAG_WINDOW_IS_OBSCURED = 0x1;
/**
+ * This flag indicates that the window that received this motion event is partly
+ * or wholly obscured by another visible window above it. This flag is set to true
+ * even if the event did not directly pass through the obscured area.
+ * A security sensitive application can check this flag to identify situations in which
+ * a malicious application may have covered up part of its content for the purpose
+ * of misleading the user or hijacking touches. An appropriate response might be
+ * to drop the suspect touches or to take additional precautions to confirm the user's
+ * actual intent.
+ *
+ * Unlike FLAG_WINDOW_IS_OBSCURED, this is actually true.
+ * @hide
+ */
+ public static final int FLAG_WINDOW_IS_PARTIALLY_OBSCURED = 0x2;
+
+ /**
* Private flag that indicates when the system has detected that this motion event
* may be inconsistent with respect to the sequence of previously delivered motion events,
* such as when a pointer move event is sent but the pointer is not down.