diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-09-01 17:01:00 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2010-09-08 11:50:55 -0700 |
commit | af30ff6020990427e0e0e73e4ac4a85a6f26a8ff (patch) | |
tree | cd1ecd559519bdfb59d347bf969fef364be0ae28 /libs/ui/InputTransport.cpp | |
parent | d71a3160ae23c4a7af59360c0c68b6e2f8020ac9 (diff) | |
download | frameworks_native-af30ff6020990427e0e0e73e4ac4a85a6f26a8ff.zip frameworks_native-af30ff6020990427e0e0e73e4ac4a85a6f26a8ff.tar.gz frameworks_native-af30ff6020990427e0e0e73e4ac4a85a6f26a8ff.tar.bz2 |
Add support for secure views.
Added the MotionEvent.FLAG_WINDOW_IS_OBSCURED flag which is set by the
input manager whenever another visible window is partly or wholly obscured
the target of a touch event so that applications can filter touches
accordingly.
Added a "filterTouchesWhenObscured" attribute to View which can be used to
enable filtering of touches when the view's window is obscured.
Change-Id: I936d9c85013fd2d77fb296a600528d30a29027d2
Diffstat (limited to 'libs/ui/InputTransport.cpp')
-rw-r--r-- | libs/ui/InputTransport.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libs/ui/InputTransport.cpp b/libs/ui/InputTransport.cpp index cf0f63e..4c402dc 100644 --- a/libs/ui/InputTransport.cpp +++ b/libs/ui/InputTransport.cpp @@ -318,8 +318,8 @@ status_t InputPublisher::publishKeyEvent( nsecs_t downTime, nsecs_t eventTime) { #if DEBUG_TRANSPORT_ACTIONS - LOGD("channel '%s' publisher ~ publishKeyEvent: deviceId=%d, source=%d, " - "action=%d, flags=%d, keyCode=%d, scanCode=%d, metaState=%d, repeatCount=%d," + LOGD("channel '%s' publisher ~ publishKeyEvent: deviceId=%d, source=0x%x, " + "action=0x%x, flags=0x%x, keyCode=%d, scanCode=%d, metaState=0x%x, repeatCount=%d," "downTime=%lld, eventTime=%lld", mChannel->getName().string(), deviceId, source, action, flags, keyCode, scanCode, metaState, repeatCount, @@ -346,6 +346,7 @@ status_t InputPublisher::publishMotionEvent( int32_t deviceId, int32_t source, int32_t action, + int32_t flags, int32_t edgeFlags, int32_t metaState, float xOffset, @@ -358,12 +359,12 @@ status_t InputPublisher::publishMotionEvent( const int32_t* pointerIds, const PointerCoords* pointerCoords) { #if DEBUG_TRANSPORT_ACTIONS - LOGD("channel '%s' publisher ~ publishMotionEvent: deviceId=%d, source=%d, " - "action=%d, edgeFlags=%d, metaState=%d, xOffset=%f, yOffset=%f, " + LOGD("channel '%s' publisher ~ publishMotionEvent: deviceId=%d, source=0x%x, " + "action=0x%x, flags=0x%x, edgeFlags=0x%x, metaState=0x%x, xOffset=%f, yOffset=%f, " "xPrecision=%f, yPrecision=%f, downTime=%lld, eventTime=%lld, " "pointerCount=%d", mChannel->getName().string(), - deviceId, source, action, edgeFlags, metaState, xOffset, yOffset, + deviceId, source, action, flags, edgeFlags, metaState, xOffset, yOffset, xPrecision, yPrecision, downTime, eventTime, pointerCount); #endif @@ -379,6 +380,7 @@ status_t InputPublisher::publishMotionEvent( } mSharedMessage->motion.action = action; + mSharedMessage->motion.flags = flags; mSharedMessage->motion.edgeFlags = edgeFlags; mSharedMessage->motion.metaState = metaState; mSharedMessage->motion.xOffset = xOffset; @@ -664,6 +666,7 @@ void InputConsumer::populateMotionEvent(MotionEvent* motionEvent) const { mSharedMessage->deviceId, mSharedMessage->source, mSharedMessage->motion.action, + mSharedMessage->motion.flags, mSharedMessage->motion.edgeFlags, mSharedMessage->motion.metaState, mSharedMessage->motion.xOffset, |