summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-09-08 11:55:24 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-08 11:55:24 -0700
commita05088c18d22f822e78e7b91d60f518dc3dc06fc (patch)
tree2aedf7f9109bf4d1f7bc014476e0823182686be4 /native
parent6ffee9bbba53700d33456261b986ac8a3f333b9e (diff)
parent85a3176704b5bfbeece9bd928369fbb76eec7dc6 (diff)
downloadframeworks_base-a05088c18d22f822e78e7b91d60f518dc3dc06fc.zip
frameworks_base-a05088c18d22f822e78e7b91d60f518dc3dc06fc.tar.gz
frameworks_base-a05088c18d22f822e78e7b91d60f518dc3dc06fc.tar.bz2
am 85a31767: Add support for secure views.
Merge commit '85a3176704b5bfbeece9bd928369fbb76eec7dc6' into gingerbread-plus-aosp * commit '85a3176704b5bfbeece9bd928369fbb76eec7dc6': Add support for secure views.
Diffstat (limited to 'native')
-rw-r--r--native/android/input.cpp4
-rw-r--r--native/include/android/input.h19
2 files changed, 23 insertions, 0 deletions
diff --git a/native/android/input.cpp b/native/android/input.cpp
index c79f913..57f0072 100644
--- a/native/android/input.cpp
+++ b/native/android/input.cpp
@@ -84,6 +84,10 @@ int32_t AMotionEvent_getAction(const AInputEvent* motion_event) {
return static_cast<const MotionEvent*>(motion_event)->getAction();
}
+int32_t AMotionEvent_getFlags(const AInputEvent* motion_event) {
+ return static_cast<const MotionEvent*>(motion_event)->getFlags();
+}
+
int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event) {
return static_cast<const MotionEvent*>(motion_event)->getMetaState();
}
diff --git a/native/include/android/input.h b/native/include/android/input.h
index 5b62da4..9da122b 100644
--- a/native/include/android/input.h
+++ b/native/include/android/input.h
@@ -247,6 +247,22 @@ enum {
};
/*
+ * Motion event flags.
+ */
+enum {
+ /* 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.
+ */
+ AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED = 0x1,
+};
+
+/*
* Motion event edge touch flags.
*/
enum {
@@ -395,6 +411,9 @@ int64_t AKeyEvent_getEventTime(const AInputEvent* key_event);
/* Get the combined motion event action code and pointer index. */
int32_t AMotionEvent_getAction(const AInputEvent* motion_event);
+/* Get the motion event flags. */
+int32_t AMotionEvent_getFlags(const AInputEvent* motion_event);
+
/* Get the state of any meta / modifier keys that were in effect when the
* event was generated. */
int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event);