Merge "Only monitor recognized uevent devices." into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
aac6a74817
@@ -581,7 +581,6 @@ int EventHub::open_device(const char *deviceName)
|
|||||||
if (strcmp(name, test) == 0) {
|
if (strcmp(name, test) == 0) {
|
||||||
LOGI("ignoring event id %s driver %s\n", deviceName, test);
|
LOGI("ignoring event id %s driver %s\n", deviceName, test);
|
||||||
close(fd);
|
close(fd);
|
||||||
fd = -1;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -813,6 +812,14 @@ int EventHub::open_device(const char *deviceName)
|
|||||||
device->id, name, propName, keylayoutFilename);
|
device->id, name, propName, keylayoutFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the device isn't recognized as something we handle, don't monitor it.
|
||||||
|
if (device->classes == 0) {
|
||||||
|
LOGV("Dropping device %s %p, id = %d\n", deviceName, device, devid);
|
||||||
|
close(fd);
|
||||||
|
delete device;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
LOGI("New device: path=%s name=%s id=0x%x (of 0x%x) index=%d fd=%d classes=0x%x\n",
|
LOGI("New device: path=%s name=%s id=0x%x (of 0x%x) index=%d fd=%d classes=0x%x\n",
|
||||||
deviceName, name, device->id, mNumDevicesById, mFDCount, fd, device->classes);
|
deviceName, name, device->id, mNumDevicesById, mFDCount, fd, device->classes);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user