summaryrefslogtreecommitdiffstats
path: root/libs/ui/EventHub.cpp
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-08-30 18:29:12 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-30 18:29:12 -0700
commit22f5ee93746f37823265b8cb9b1e94e572607514 (patch)
tree269e105935875e8453c0bd33792fdeedd4c928ee /libs/ui/EventHub.cpp
parent02f4f0eb4919453e8dbf40549d4ae9c05f05b8dd (diff)
parent36f0cb26cbb4ef62995ff2e5a540cf8814e7f030 (diff)
downloadframeworks_base-22f5ee93746f37823265b8cb9b1e94e572607514.zip
frameworks_base-22f5ee93746f37823265b8cb9b1e94e572607514.tar.gz
frameworks_base-22f5ee93746f37823265b8cb9b1e94e572607514.tar.bz2
am 36f0cb26: am 8d60866e: Input device calibration and capabilities.
Merge commit '36f0cb26cbb4ef62995ff2e5a540cf8814e7f030' * commit '36f0cb26cbb4ef62995ff2e5a540cf8814e7f030': Input device calibration and capabilities.
Diffstat (limited to 'libs/ui/EventHub.cpp')
-rw-r--r--libs/ui/EventHub.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp
index 891661d..1d38b4b 100644
--- a/libs/ui/EventHub.cpp
+++ b/libs/ui/EventHub.cpp
@@ -139,11 +139,7 @@ uint32_t EventHub::getDeviceClasses(int32_t deviceId) const
status_t EventHub::getAbsoluteAxisInfo(int32_t deviceId, int axis,
RawAbsoluteAxisInfo* outAxisInfo) const {
- outAxisInfo->valid = false;
- outAxisInfo->minValue = 0;
- outAxisInfo->maxValue = 0;
- outAxisInfo->flat = 0;
- outAxisInfo->fuzz = 0;
+ outAxisInfo->clear();
AutoMutex _l(mLock);
device_t* device = getDevice(deviceId);
@@ -709,8 +705,7 @@ int EventHub::open_device(const char *deviceName)
LOGV("Getting absolute controllers...");
if (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(abs_bitmask)), abs_bitmask) >= 0) {
// Is this a new modern multi-touch driver?
- if (test_bit(ABS_MT_TOUCH_MAJOR, abs_bitmask)
- && test_bit(ABS_MT_POSITION_X, abs_bitmask)
+ if (test_bit(ABS_MT_POSITION_X, abs_bitmask)
&& test_bit(ABS_MT_POSITION_Y, abs_bitmask)) {
device->classes |= INPUT_DEVICE_CLASS_TOUCHSCREEN | INPUT_DEVICE_CLASS_TOUCHSCREEN_MT;