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>
Sun, 10 Dec 2017 15:10:37 +0000 (23:10 +0800)
commit4e325e5d6e53c018b39adade443c56894aef1f40
treec978a6e9e8bb21ff1898fa5db67b9021170e486e
parentf2b791587c15ec5028d0b266d415c631a4078916
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/inputflinger/EventHub.cpp
services/inputflinger/EventHub.h