OSDN Git Service

Prevent EventHub from adding input device twice
authorDaniel Leung <daniel.leung@intel.com>
Thu, 13 Sep 2012 20:43:41 +0000 (13:43 -0700)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 25 Sep 2013 02:48:22 +0000 (10:48 +0800)
commite988869f5191409cbba156aca8f6a8ef641c5d61
tree20bb09c3e8d8f76c8fa32a36393ad72923eaa941
parent35bbf0c06bfe3feccd62a742f4aca7bb26c45850
Prevent EventHub from adding input device twice

When Android first starts up, it scans /dev/input for input devices.
In some rare instances, the EventHub gets another notification that
some device nodes are created. It then proceeds to add the same
input device again. This causes the system to get two events per
touch or key stroke.

This adds a check to prevent adding the same device if the operation
is triggerd by inotify.

Issue: AXIA-858
Change-Id: I68b02594f1c7f14067611735db0b3763378ec7ea
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
services/input/EventHub.cpp
services/input/EventHub.h