diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-06-28 20:34:40 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2011-06-28 20:34:40 -0700 |
commit | aba321aa6f1be57beac70bd540812eea1c8262c5 (patch) | |
tree | 3e879b4cde45b6acc44d46de367db84060216368 /services/input | |
parent | 8134681b25dfff814ffeaad8ff70e84316c1869f (diff) | |
download | frameworks_base-aba321aa6f1be57beac70bd540812eea1c8262c5.zip frameworks_base-aba321aa6f1be57beac70bd540812eea1c8262c5.tar.gz frameworks_base-aba321aa6f1be57beac70bd540812eea1c8262c5.tar.bz2 |
Add some logging code to track down touch issues.
Change-Id: I9bd7af6b93f82a83c6863986d21e7a222d97e4ae
Diffstat (limited to 'services/input')
-rw-r--r-- | services/input/InputReader.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp index a16e7d7..014f962 100644 --- a/services/input/InputReader.cpp +++ b/services/input/InputReader.cpp @@ -53,6 +53,7 @@ #define INDENT2 " " #define INDENT3 " " #define INDENT4 " " +#define INDENT5 " " namespace android { @@ -1921,8 +1922,17 @@ void TouchInputMapper::dump(String8& dump) { dump.appendFormat(INDENT4 "DistanceScale: %0.3f\n", mLocked.distanceScale); dump.appendFormat(INDENT3 "Last Touch:\n"); - dump.appendFormat(INDENT4 "Pointer Count: %d\n", mLastTouch.pointerCount); dump.appendFormat(INDENT4 "Button State: 0x%08x\n", mLastTouch.buttonState); + dump.appendFormat(INDENT4 "Pointer Count: %d\n", mLastTouch.pointerCount); + for (uint32_t i = 0; i < mLastTouch.pointerCount; i++) { + const PointerData& pointer = mLastTouch.pointers[i]; + dump.appendFormat(INDENT5 "[%d]: id=%d, x=%d, y=%d, pressure=%d, " + "touchMajor=%d, touchMinor=%d, toolMajor=%d, toolMinor=%d, " + "orientation=%d, distance=%d, isStylus=%s\n", i, + pointer.id, pointer.x, pointer.y, pointer.pressure, + pointer.touchMajor, pointer.touchMinor, pointer.toolMajor, pointer.toolMinor, + pointer.orientation, pointer.distance, toString(pointer.isStylus)); + } if (mParameters.deviceType == Parameters::DEVICE_TYPE_POINTER) { dump.appendFormat(INDENT3 "Pointer Gesture Detector:\n"); |