From 2352b978a3c94cd88f41d0d908f961333fdac1e9 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Tue, 12 Apr 2011 22:39:53 -0700 Subject: Initial checkin of spot presentation for touchpad gestures. 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: I5126b1e69d95252fda7f2a684c9287e239a57163 --- include/ui/Input.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') 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 -- cgit v1.1