diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-04-20 19:28:00 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-04-20 20:11:12 -0700 |
commit | 5bbd4b4f5fc19302fa017ad6afee6eb2d489d91a (patch) | |
tree | 2bc118a5ef332003cc7f6791968076c48b3cf84b /services/input/InputReader.h | |
parent | 9e6d4b035d4f012d23264d3d2bc946b1ca02dba1 (diff) | |
download | frameworks_base-5bbd4b4f5fc19302fa017ad6afee6eb2d489d91a.zip frameworks_base-5bbd4b4f5fc19302fa017ad6afee6eb2d489d91a.tar.gz frameworks_base-5bbd4b4f5fc19302fa017ad6afee6eb2d489d91a.tar.bz2 |
Get alias for Bluetooth devices.
Bluetooth devices can be renamed by the user. Make the
input system aware of the user-specified name and transparently
pass it down to applications. This enables the keyboard
layout picker Settings UI to use device names that are
consistent with what the user set in the Bluetooth UI.
Bug: 6363157
Change-Id: I8eea26ce2c69c2a3f09c8de02e9e847610e0419c
Diffstat (limited to 'services/input/InputReader.h')
-rw-r--r-- | services/input/InputReader.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/input/InputReader.h b/services/input/InputReader.h index acdec85..8257dbc 100644 --- a/services/input/InputReader.h +++ b/services/input/InputReader.h @@ -70,6 +70,9 @@ struct InputReaderConfiguration { // The keyboard layouts must be reloaded. CHANGE_KEYBOARD_LAYOUTS = 1 << 4, + // The device name alias supplied by the may have changed for some devices. + CHANGE_DEVICE_ALIAS = 1 << 5, + // All devices must be reopened. CHANGE_MUST_REOPEN = 1 << 31, }; @@ -228,6 +231,9 @@ public: /* Gets the keyboard layout for a particular input device. */ virtual sp<KeyCharacterMap> getKeyboardLayoutOverlay(const String8& inputDeviceDescriptor) = 0; + + /* Gets a user-supplied alias for a particular input device, or an empty string if none. */ + virtual String8 getDeviceAlias(const InputDeviceIdentifier& identifier) = 0; }; @@ -528,6 +534,7 @@ private: int32_t mId; int32_t mGeneration; InputDeviceIdentifier mIdentifier; + String8 mAlias; uint32_t mClasses; Vector<InputMapper*> mMappers; |