diff options
author | Dima Zavin <dima@android.com> | 2011-09-26 23:31:27 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2011-09-29 11:28:17 -0700 |
commit | e8b7f4a20c43d8f55d0cf85a94363b764ba598b8 (patch) | |
tree | 09800860eb177aeec4db251548ffb9ddc74fefec /services/input | |
parent | 9547d03ef1228406ad4eb6db31dbcf58be1e4655 (diff) | |
download | frameworks_base-e8b7f4a20c43d8f55d0cf85a94363b764ba598b8.zip frameworks_base-e8b7f4a20c43d8f55d0cf85a94363b764ba598b8.tar.gz frameworks_base-e8b7f4a20c43d8f55d0cf85a94363b764ba598b8.tar.bz2 |
eventhub: print debugginf info when removing device
Change-Id: I40bbbd3867e8c7ac7d6fb38e1c72432bb4963316
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'services/input')
-rw-r--r-- | services/input/EventHub.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp index 80ee28e..790b395 100644 --- a/services/input/EventHub.cpp +++ b/services/input/EventHub.cpp @@ -639,6 +639,8 @@ size_t EventHub::getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSiz sizeof(struct input_event) * capacity); if (readSize == 0 || (readSize < 0 && errno == ENODEV)) { // Device was removed before INotify noticed. + LOGW("could not get event, removed? (fd: %d size: %d bufferSize: %d capacity: %d errno: %d)\n", + device->fd, readSize, bufferSize, capacity, errno); deviceChanged = true; closeDeviceLocked(device); } else if (readSize < 0) { @@ -1254,6 +1256,7 @@ status_t EventHub::readNotifyLocked() { if(event->mask & IN_CREATE) { openDeviceLocked(devname); } else { + LOGI("Removing device '%s' due to inotify event\n", devname); closeDeviceByPathLocked(devname); } } |