16 Commits

Author SHA1 Message Date
Dianne Hackborn
b125dc5599 Fix MotionEvent pointer API.
Ooops.  The API said that the pointer down and up actions contained
the pointer id, but it is actually the index.  Actually it makes
much more sense for it to be the index, and those ACTION_POINTER_1_DOWN
etc. constants were stupid.
2010-02-12 17:52:22 -08:00
Dianne Hackborn
709d6db48d Fix issue #2300232: Bugs in resolving conflicting pointers
Change-Id: I7b9328c7a1c4f6b731e64cdca2ed9de71b84587f
2009-12-02 18:42:39 -08:00
Dianne Hackborn
05799981d8 Fix issue #2281046: Size and pressure don't change
Change-Id: Iadc1d438a494bb1495ee6d93d0dd3b4a491a378f
2009-11-23 15:49:15 -08:00
Dianne Hackborn
dc95372cb5 Fix issue #2191572: Difficulties drawing window shade
The touch location filtering hacks had a little problem.

Change-Id: Ib57366169c87f83af1adcc8b6a00dadc01582339
2009-10-19 15:52:22 -07:00
Dianne Hackborn
53cd579459 Fix issue #2186709: Can't unlock the device for a while
Change-Id: Iac5342254036cc286ad502dba943520f55ea2405
2009-10-13 19:50:51 -07:00
Dianne Hackborn
1411d1c822 Work on issue #2144454: Inconsistent swipes...
This introduces some hacks in the framework to try to clean up the
data we are getting from the touch screen.  There are two main things
being done here:

1. Look for changes in position that are unreasonably large, and
ignore them.  This is intended to eliminate the spurious jumps that
often happen when releasing.

2. Add some simple adaptive averaging of the touch data.  If the
difference between the last and next point is large enough, we
disable the averaging; otherwise we average up to the last 5 points.
The goal is to get rid of the noise of small movements so that things
like taps don't look like short flings, while still responding quickly
to rapid movement.

For averaging pressure, we also weight each averaged coordinate by
the reported pressure at that point.  This is intended to keep the
coordinates closer together during a release, when the pressure is
going down and the accuracy decreasing.  It may also result in some
other interesting artifacts, but hopefully nothing problematic.

Change-Id: I1369e9ab015c406946a45c2d72547da9c604178f
2009-10-13 11:44:29 -07:00
Dianne Hackborn
2a2b34434a Fix issue #2045895: Finger IDs are not tracked properly.
This was a problem with not dealing well with how the driver was
reporting data in the old touch protocol.

Also fixed issue with not correctly rotating non-primary touches.
2009-08-12 17:13:55 -07:00
Dianne Hackborn
0dd7cb4b4e Finish implementation of multiple pointer support for MotionEvent.
The major things going on here:

- The MotionEvent API is now extended to included "pointer ID" information, for
  applications to keep track of individual fingers as they move up and down.
  PointerLocation has been updated to take advantage of this.

- The input system now has logic to generate MotionEvents with the new ID
  information, synthesizing an identifier as new points are down and trying to
  keep pointer ids consistent across events by looking at the distance between
  the last and next set of pointers.

- We now support the new multitouch driver protocol, and will use that instead
  of the old one if it is available.  We do NOT use any finger id information
  coming from the driver, but always synthesize pointer ids in user space.
  (This is simply because we don't yet have a driver reporting this information
  from which to base an implementation on.)

- Increase maximum number of fingers to 10.  This code has only been used
  with a driver that reports up to 2, so no idea how more will actually work.

- Oh and the input system can now detect and report physical DPAD devices.
2009-08-04 20:53:52 -07:00
Dianne Hackborn
ddca3ee3e8 Add support for power keys, improve behavior of virtual keys.
The platform now knows how to deal with a platform key, which at this
point is "just like end call, but don't end a call."

Also improve the handling of virtual keys, to allow for canceling when
sliding off into the display and providing haptic feedback.

Finally fixes a bug where the raw x and y in motion event were not
always set which caused the status bar to not work.
2009-07-24 17:30:15 -07:00
Dianne Hackborn
9822d2b273 First stab at poly-finger support.
The MotionEvent API should be fairly solid, but there is still a lot of
work to do in the input device code.  In particular, right now we are
really stupid about watching how fingers change -- we just take whatever
the driver reports as down and dump that directly into the motion event.

The big remaning work is to assign pointer IDs so that applications have
help in determine which fingers go up and down, and adding support for
the official multi-touch driver protocol.
2009-07-21 19:02:12 -07:00
Dianne Hackborn
e3dd884815 Implement virtual button support.
The kernel can now publish a property describing the layout of virtual
hardware buttons on the touchscreen.  These outside of the display
area (outside of the absolute x and y controller range the driver
reports), and when the user presses on them a key event will be
generated rather than a touch event.

This also includes a number of tweaks to the absolute controller
processing to make things work better on the new screens.  For
example, we now reject down events outside of the display area.

Still left to be done is the ability to cancel a key down event,
so the user can slide up from the virtual keys to the touch screen
without causing a virtual key to execute.
2009-07-14 18:51:53 -07:00
Michael Chan
53071d6d15 Added LatencyTimer to ease latency measurements
new file:   core/java/android/os/LatencyTimer.java
	modified:   core/java/android/view/MotionEvent.java
	modified:   core/java/android/view/ViewRoot.java
	modified:   services/java/com/android/server/InputDevice.java
	modified:   services/java/com/android/server/KeyInputQueue.java
	modified:   services/java/com/android/server/WindowManagerService.java
2009-05-15 18:18:28 -07:00
The Android Open Source Project
9066cfe988 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
The Android Open Source Project
d83a98f4ce auto import from //depot/cupcake/@135843 2009-03-03 18:28:45 -08:00
The Android Open Source Project
f013e1afd1 Code drop from //branches/cupcake/...@124589 2008-12-17 18:05:43 -08:00
The Android Open Source Project
54b6cfa9a9 Initial Contribution 2008-10-21 07:00:00 -07:00