Support non-orientation aware keyboards and other devices.

Fixed a bug with dpad keys on external keyboards being rotated
according to the display orientation by adding a new input device
configuration property called "keyboard.orientationAware".

Added a mechanism for overriding the key layout and key character
map in the input device configuration file using the new
"keyboard.layout" and "keyboard.characterMap" properties.

Also added "trackball.orientationAware", "touch.orientationAware" and
"touch.deviceType" configuration properties.

Rewrote the configuration property reading code in native code
so that it can be used by EventHub and other components.

Added basic support for installable idc, kl, and kcm files
in /data/system/devices.  However, there is no provision for
copying files there yet.

Disabled long-press character pickers on full keyboards so that
key repeating works as expected.

Change-Id: I1bd9f0c3d344421db444e7d271eb09bc8bab4791
diff --git a/include/ui/Keyboard.h b/include/ui/Keyboard.h
index 3b477c7..689607d 100644
--- a/include/ui/Keyboard.h
+++ b/include/ui/Keyboard.h
@@ -20,6 +20,7 @@
 #include <ui/Input.h>
 #include <utils/Errors.h>
 #include <utils/String8.h>
+#include <utils/PropertyMap.h>
 
 namespace android {
 
@@ -33,19 +34,23 @@
 };
 
 struct KeyMapInfo {
-    String8 keyMapName;
     String8 keyLayoutFile;
     String8 keyCharacterMapFile;
     bool isDefaultKeyMap;
 
     KeyMapInfo() : isDefaultKeyMap(false) {
     }
+
+    bool isComplete() {
+        return !keyLayoutFile.isEmpty() && !keyCharacterMapFile.isEmpty();
+    }
 };
 
 /**
  * Resolves the key map to use for a particular keyboard device.
  */
-extern status_t resolveKeyMap(const String8& deviceName, KeyMapInfo& outKeyMapInfo);
+extern status_t resolveKeyMap(const String8& deviceName,
+        const PropertyMap* deviceConfiguration, KeyMapInfo& outKeyMapInfo);
 
 /**
  * Sets keyboard system properties.