summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-04-12 22:39:53 -0700
committerJeff Brown <jeffbrown@android.com>2011-05-25 14:37:17 -0700
commit86ea1f5f521981d075aef56f11693e4f3bc32fdb (patch)
tree72e1e44513d3e9e204a4fbd2855a079822e949eb /include
parenta6dbfdd3a858aac52cc87f80f91e8eef7d613605 (diff)
downloadframeworks_base-86ea1f5f521981d075aef56f11693e4f3bc32fdb.zip
frameworks_base-86ea1f5f521981d075aef56f11693e4f3bc32fdb.tar.gz
frameworks_base-86ea1f5f521981d075aef56f11693e4f3bc32fdb.tar.bz2
Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)
Added a new PointerIcon API (hidden for now) for loading pointer icons. Fixed a starvation problem in the native Looper's sendMessage implementation which caused new messages to be posted ahead of old messages sent with sendMessageDelayed. Redesigned the touch pad gestures to be defined in terms of more fluid finger / spot movements. The objective is to reinforce the natural mapping between fingers and spots which means there must not be any discontinuities in spot motion relative to the fingers. Removed the SpotController stub and folded its responsibilities into PointerController. Change-Id: Ib647dbd7a57a7f30dd9c6e2c260df51d7bbdd18e
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 1ef36d0..fb6152e 100644
--- a/include/ui/Input.h
+++ b/include/ui/Input.h
@@ -608,6 +608,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