• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

Révision232fef0291c6c85c4b7a8d5493081cf8da4d03da (tree)
l'heure2011-12-15 17:49:38
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Message de Log

EventHub: load a default .idc if no other .idc found for touchscreen

The patch moves loadConfigurationLocked to later stage that may cause issues
if upstream changes. Needs to review it on rebasing.

Change Summary

Modification

--- a/services/input/EventHub.cpp
+++ b/services/input/EventHub.cpp
@@ -852,9 +852,6 @@ int EventHub::openDevice(const char *devicePath) {
852852 driverVersion >> 16, (driverVersion >> 8) & 0xff, driverVersion & 0xff);
853853 #endif
854854
855- // Load the configuration file for the device.
856- loadConfiguration(device);
857-
858855 // Figure out the kinds of events the device reports.
859856 uint8_t key_bitmask[sizeof_bit_array(KEY_MAX + 1)];
860857 memset(key_bitmask, 0, sizeof(key_bitmask));
@@ -952,6 +949,9 @@ int EventHub::openDevice(const char *devicePath) {
952949 device->classes |= INPUT_DEVICE_CLASS_SWITCH;
953950 }
954951
952+ // Load the configuration file for the device.
953+ loadConfiguration(device);
954+
955955 if ((device->classes & INPUT_DEVICE_CLASS_TOUCH)) {
956956 // Load the virtual keys for the touch screen, if any.
957957 // We do this now so that we can make sure to load the keymap if necessary.
@@ -1043,6 +1043,10 @@ int EventHub::openDevice(const char *devicePath) {
10431043 void EventHub::loadConfiguration(Device* device) {
10441044 device->configurationFile = getInputDeviceConfigurationFilePathByDeviceIdentifier(
10451045 device->identifier, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION);
1046+ if ((device->classes & INPUT_DEVICE_CLASS_TOUCH) && device->configurationFile.isEmpty()) {
1047+ device->configurationFile = getInputDeviceConfigurationFilePathByName(String8("GenericTouch"),
1048+ INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION);
1049+ }
10461050 if (device->configurationFile.isEmpty()) {
10471051 LOGD("No input device configuration file found for device '%s'.",
10481052 device->identifier.name.string());