summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-04-19 15:37:32 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-04-19 15:37:32 -0700
commit3f14891fc9e764d97de07b109f066aedfff90c2e (patch)
tree7d026487ee719489cea2c1237901ef6cf325efe2 /include
parent05d30b14843bf7cf252873f4d0d39706878b28c2 (diff)
parent2352b978a3c94cd88f41d0d908f961333fdac1e9 (diff)
downloadframeworks_base-3f14891fc9e764d97de07b109f066aedfff90c2e.zip
frameworks_base-3f14891fc9e764d97de07b109f066aedfff90c2e.tar.gz
frameworks_base-3f14891fc9e764d97de07b109f066aedfff90c2e.tar.bz2
Merge "Initial checkin of spot presentation for touchpad gestures."
Diffstat (limited to 'include')
-rw-r--r--include/ui/Input.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/ui/Input.h b/include/ui/Input.h
index 0dc29c8..9b92c73 100644
--- a/include/ui/Input.h
+++ b/include/ui/Input.h
@@ -620,6 +620,11 @@ private:
// Oldest sample to consider when calculating the velocity.
static const nsecs_t MAX_AGE = 200 * 1000000; // 200 ms
+ // When the total duration of the window of samples being averaged is less
+ // than the window size, the resulting velocity is scaled to reduce the impact
+ // of overestimation in short traces.
+ static const nsecs_t MIN_WINDOW = 100 * 1000000; // 100 ms
+
// The minimum duration between samples when estimating velocity.
static const nsecs_t MIN_DURATION = 10 * 1000000; // 10 ms