Add support for new input sources.
Added several new coordinate values to MotionEvents to capture
touch major/minor area, tool major/minor area and orientation.
Renamed NDK input constants per convention.
Added InputDevice class in Java which will eventually provide
useful information about available input devices.
Added APIs for manufacturing new MotionEvent objects with multiple
pointers and all necessary coordinate data.
Fixed a bug in the input dispatcher where it could get stuck with
a pointer down forever.
Fixed a bug in the WindowManager where the input window list could
end up containing stale removed windows.
Fixed a bug in the WindowManager where the input channel was being
removed only after the final animation transition had taken place
which caused spurious WINDOW DIED log messages to be printed.
Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
diff --git a/include/ui/InputDevice.h b/include/ui/InputDevice.h
index 4420600..3b9c70e 100644
--- a/include/ui/InputDevice.h
+++ b/include/ui/InputDevice.h
@@ -42,6 +42,7 @@
extern int32_t updateMetaState(int32_t keyCode, bool down, int32_t oldMetaState);
extern int32_t rotateKeyCode(int32_t keyCode, int32_t orientation);
+
/*
* An input device structure tracks the state of a single input device.
*
@@ -168,8 +169,11 @@
FIELD_ABS_MT_POSITION_X = 1,
FIELD_ABS_MT_POSITION_Y = 2,
FIELD_ABS_MT_TOUCH_MAJOR = 4,
- FIELD_ABS_MT_WIDTH_MAJOR = 8,
- FIELD_ABS_MT_TRACKING_ID = 16
+ FIELD_ABS_MT_TOUCH_MINOR = 8,
+ FIELD_ABS_MT_WIDTH_MAJOR = 16,
+ FIELD_ABS_MT_WIDTH_MINOR = 32,
+ FIELD_ABS_MT_ORIENTATION = 64,
+ FIELD_ABS_MT_TRACKING_ID = 128
};
uint32_t pointerCount;
@@ -179,7 +183,10 @@
int32_t absMTPositionX;
int32_t absMTPositionY;
int32_t absMTTouchMajor;
+ int32_t absMTTouchMinor;
int32_t absMTWidthMajor;
+ int32_t absMTWidthMinor;
+ int32_t absMTOrientation;
int32_t absMTTrackingId;
inline void clear() {
@@ -206,6 +213,11 @@
int32_t y;
int32_t pressure;
int32_t size;
+ int32_t touchMajor;
+ int32_t touchMinor;
+ int32_t toolMajor;
+ int32_t toolMinor;
+ int32_t orientation;
};
struct TouchData {
@@ -236,6 +248,7 @@
AbsoluteAxisInfo yAxis;
AbsoluteAxisInfo pressureAxis;
AbsoluteAxisInfo sizeAxis;
+ AbsoluteAxisInfo orientationAxis;
} parameters;
// The touch data of the current sample being processed.
@@ -290,6 +303,8 @@
int32_t sizeOrigin;
float sizeScale;
+
+ float orientationScale;
} precalculated;
void reset();