OSDN Git Service

Improve support for external keyboards.
authorJeff Brown <jeffbrown@google.com>
Thu, 2 Dec 2010 21:50:46 +0000 (13:50 -0800)
committerJeff Brown <jeffbrown@google.com>
Fri, 3 Dec 2010 00:01:32 +0000 (16:01 -0800)
commitdb360642ed7a48eb3b3607a791bbe449cc6529bb
tree0b58f551214399aeabda9e029818d4c4e9d1049d
parent1945ef5b26a82109de5e4bf9951e73ee95197455
Improve support for external keyboards.

Use Vendor ID, Product ID and optionally the Version to
locate keymaps and configuration files for external devices.

Moved virtual key definition parsing to native code so that
EventHub can identify touch screens with virtual keys and load
the appropriate key layout file.

Cleaned up a lot of old code in EventHub.

Fixed a regression in ViewRoot's fallback event handling.

Fixed a minor bug in FileMap that caused it to try to munmap
or close invalid handled when released if the attempt to map
the file failed.

Added a couple of new String8 conveniences for formatting strings.

Modified Tokenizer to fall back to open+read when mmap fails since
we can't mmap sysfs files as needed to open the virtual key
definition files in /sys/board_properties/.

Change-Id: I6ca5e5f9547619fd082ddac47e87ce185da69ee6
18 files changed:
include/ui/EventHub.h
include/ui/Input.h
include/ui/InputReader.h
include/ui/Keyboard.h
include/ui/VirtualKeyMap.h [new file with mode: 0644]
include/utils/String8.h
include/utils/Tokenizer.h
libs/ui/Android.mk
libs/ui/EventHub.cpp
libs/ui/Input.cpp
libs/ui/InputDispatcher.cpp
libs/ui/InputReader.cpp
libs/ui/Keyboard.cpp
libs/ui/VirtualKeyMap.cpp [new file with mode: 0644]
libs/ui/tests/InputReader_test.cpp
libs/utils/FileMap.cpp
libs/utils/String8.cpp
libs/utils/Tokenizer.cpp