summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-01-18 14:31:31 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-18 14:31:31 -0800
commit41395459e676cf9ab4059e08446656f145662c2d (patch)
tree6f31fb66122790fa6378d2478c6b5c82194eb49f /include
parent07e6f616d122496342a5bae51323bb218d88f7f2 (diff)
parent6f71d0fedbb04c048a7294976103e42f0f046641 (diff)
downloadframeworks_base-41395459e676cf9ab4059e08446656f145662c2d.zip
frameworks_base-41395459e676cf9ab4059e08446656f145662c2d.tar.gz
frameworks_base-41395459e676cf9ab4059e08446656f145662c2d.tar.bz2
Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread
Diffstat (limited to 'include')
-rw-r--r--include/ui/InputReader.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/ui/InputReader.h b/include/ui/InputReader.h
index 49351b0..7568ba7 100644
--- a/include/ui/InputReader.h
+++ b/include/ui/InputReader.h
@@ -103,6 +103,12 @@ public:
*/
virtual bool filterJumpyTouchEvents() = 0;
+ /* Gets the amount of time to disable virtual keys after the screen is touched
+ * in order to filter out accidental virtual key presses due to swiping gestures
+ * or taps near the edge of the display. May be 0 to disable the feature.
+ */
+ virtual nsecs_t getVirtualKeyQuietTime() = 0;
+
/* Gets the configured virtual key definitions for an input device. */
virtual void getVirtualKeyDefinitions(const String8& deviceName,
Vector<VirtualKeyDefinition>& outVirtualKeyDefinitions) = 0;
@@ -177,6 +183,10 @@ public:
virtual void updateGlobalMetaState() = 0;
virtual int32_t getGlobalMetaState() = 0;
+ virtual void disableVirtualKeysUntil(nsecs_t time) = 0;
+ virtual bool shouldDropVirtualKey(nsecs_t now,
+ InputDevice* device, int32_t keyCode, int32_t scanCode) = 0;
+
virtual InputReaderPolicyInterface* getPolicy() = 0;
virtual InputDispatcherInterface* getDispatcher() = 0;
virtual EventHubInterface* getEventHub() = 0;
@@ -264,6 +274,11 @@ private:
InputConfiguration mInputConfiguration;
void updateInputConfiguration();
+ nsecs_t mDisableVirtualKeysTimeout;
+ virtual void disableVirtualKeysUntil(nsecs_t time);
+ virtual bool shouldDropVirtualKey(nsecs_t now,
+ InputDevice* device, int32_t keyCode, int32_t scanCode);
+
// state queries
typedef int32_t (InputDevice::*GetStateFunc)(uint32_t sourceMask, int32_t code);
int32_t getState(int32_t deviceId, uint32_t sourceMask, int32_t code,
@@ -585,6 +600,7 @@ protected:
bool useBadTouchFilter;
bool useJumpyTouchFilter;
bool useAveragingTouchFilter;
+ nsecs_t virtualKeyQuietTime;
} mParameters;
// Immutable calibration parameters in parsed form.
@@ -810,6 +826,7 @@ private:
void dispatchTouch(nsecs_t when, uint32_t policyFlags, TouchData* touch,
BitSet32 idBits, uint32_t changedId, uint32_t pointerCount,
int32_t motionEventAction);
+ void detectGestures(nsecs_t when);
bool isPointInsideSurfaceLocked(int32_t x, int32_t y);
const VirtualKey* findVirtualKeyHitLocked(int32_t x, int32_t y);