OSDN Git Service

b/12068020 Add a way to add uniqueness to device descriptors. Do not merge
authorRoboErik <epastern@google.com>
Thu, 12 Dec 2013 01:02:46 +0000 (17:02 -0800)
committerRoboErik <epastern@google.com>
Wed, 12 Mar 2014 20:20:57 +0000 (13:20 -0700)
commitc1e0015ec3dfacc137cb500066020b25f18ecbb7
tree49ddcf95b7dfd66fe0bf04ffe570f40cc5e80b8b
parent0575b185c618a79ede771389ed9a78436b5636bd
b/12068020 Add a way to add uniqueness to device descriptors. Do not merge

Cherry pick from https://googleplex-android-review.git.corp.google.com/#/c/398226/

This adds an integer to the descriptor of devices without uniqely
identifying information. It will reuse values that are no longer
in use, so if you remove a single device and attach a different
identical device it will appear to be the same device.

TODO: Derive uniqueness from USB port when possible. This version
will generate different descriptors for each half of a USB keyboard
that shows up twice.

Change-Id: Ie628f19c01469f6ec2d354cd00000898ac6432fa
libs/input/EventHub.cpp
libs/input/EventHub.h