summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-11-15 19:17:09 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-11-15 19:17:09 -0800
commit3e7497b4eccd3db1d6ff0ce1f1f2db11f9a8eeef (patch)
tree14b19d7f750f12c4168bb582c1cd99e93afd454a /libs
parentcdec187a27b2acc34cd4df26b836b83362527d6a (diff)
parent1e08fe90df18930691b0c2ec22e5db25d7fcb4cf (diff)
downloadframeworks_base-3e7497b4eccd3db1d6ff0ce1f1f2db11f9a8eeef.zip
frameworks_base-3e7497b4eccd3db1d6ff0ce1f1f2db11f9a8eeef.tar.gz
frameworks_base-3e7497b4eccd3db1d6ff0ce1f1f2db11f9a8eeef.tar.bz2
Merge "Eliminate hw.keyboards system properties." into ics-mr1
Diffstat (limited to 'libs')
-rw-r--r--libs/ui/KeyCharacterMap.cpp11
-rw-r--r--libs/ui/Keyboard.cpp44
2 files changed, 0 insertions, 55 deletions
diff --git a/libs/ui/KeyCharacterMap.cpp b/libs/ui/KeyCharacterMap.cpp
index 2decfe9..77f18de 100644
--- a/libs/ui/KeyCharacterMap.cpp
+++ b/libs/ui/KeyCharacterMap.cpp
@@ -124,17 +124,6 @@ status_t KeyCharacterMap::load(const String8& filename, KeyCharacterMap** outMap
return status;
}
-status_t KeyCharacterMap::loadByDeviceId(int32_t deviceId, KeyCharacterMap** outMap) {
- *outMap = NULL;
-
- String8 filename;
- status_t result = getKeyCharacterMapFile(deviceId, filename);
- if (!result) {
- result = load(filename, outMap);
- }
- return result;
-}
-
int32_t KeyCharacterMap::getKeyboardType() const {
return mType;
}
diff --git a/libs/ui/Keyboard.cpp b/libs/ui/Keyboard.cpp
index 600a951..10bb39c 100644
--- a/libs/ui/Keyboard.cpp
+++ b/libs/ui/Keyboard.cpp
@@ -173,50 +173,6 @@ bool isEligibleBuiltInKeyboard(const InputDeviceIdentifier& deviceIdentifier,
return strstr(deviceIdentifier.name.string(), "-keypad");
}
-void setKeyboardProperties(int32_t deviceId,
- const InputDeviceIdentifier& deviceIdentifier,
- const String8& keyLayoutFile, const String8& keyCharacterMapFile) {
- char propName[PROPERTY_KEY_MAX];
- snprintf(propName, sizeof(propName), "hw.keyboards.%u.devname", deviceId);
- property_set(propName, deviceIdentifier.name.string());
- snprintf(propName, sizeof(propName), "hw.keyboards.%u.klfile", deviceId);
- property_set(propName, keyLayoutFile.string());
- snprintf(propName, sizeof(propName), "hw.keyboards.%u.kcmfile", deviceId);
- property_set(propName, keyCharacterMapFile.string());
-}
-
-void clearKeyboardProperties(int32_t deviceId) {
- char propName[PROPERTY_KEY_MAX];
- snprintf(propName, sizeof(propName), "hw.keyboards.%u.devname", deviceId);
- property_set(propName, "");
- snprintf(propName, sizeof(propName), "hw.keyboards.%u.klfile", deviceId);
- property_set(propName, "");
- snprintf(propName, sizeof(propName), "hw.keyboards.%u.kcmfile", deviceId);
- property_set(propName, "");
-}
-
-status_t getKeyCharacterMapFile(int32_t deviceId, String8& outKeyCharacterMapFile) {
- if (deviceId != DEVICE_ID_VIRTUAL_KEYBOARD) {
- char propName[PROPERTY_KEY_MAX];
- char fn[PROPERTY_VALUE_MAX];
- snprintf(propName, sizeof(propName), "hw.keyboards.%u.kcmfile", deviceId);
- if (property_get(propName, fn, "") > 0) {
- outKeyCharacterMapFile.setTo(fn);
- return OK;
- }
- }
-
- // Default to Virtual since the keyboard does not appear to be installed.
- outKeyCharacterMapFile.setTo(getInputDeviceConfigurationFilePathByName(String8("Virtual"),
- INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_CHARACTER_MAP));
- if (!outKeyCharacterMapFile.isEmpty()) {
- return OK;
- }
-
- LOGE("Can't find any key character map files including the Virtual key map!");
- return NAME_NOT_FOUND;
-}
-
static int lookupValueByLabel(const char* literal, const KeycodeLabel *list) {
while (list->literal) {
if (strcmp(literal, list->literal) == 0) {