Fix off by one errors in touch motion ranges. (DO NOT MERGE)

Report inclusive minimum and maximum ranges for all
axes including X and Y.

Set mouse pointer bounds to 0..width-1, 0..height-1.

Rotate touch and mouse positions more carefully, paying attention
to the maximum bounds when calculating the complement of an axis.

Simplified the InputReader somewhat and removed support for a
couple of poorly defined input device configuration parameters.
We now assume that the touch device provides useful absolute axis
ranges for the X and Y axes since the alternative does not actually
make sense.

Bug: 3413541
Change-Id: I121d28a125c4f9618cb283dc460d33ff1a907023
This commit is contained in:
Jeff Brown
2011-03-03 02:09:54 -08:00
parent 924c4d4777
commit 9626b14a28
6 changed files with 193 additions and 192 deletions

View File

@@ -2157,6 +2157,8 @@ public final class MotionEvent extends InputEvent implements Parcelable {
* MotionEvent. For touch events, clients can use this to determine if the
* user's finger was touching the edge of the display.
*
* This property is only set for {@link #ACTION_DOWN} events.
*
* @see #EDGE_LEFT
* @see #EDGE_TOP
* @see #EDGE_RIGHT