summaryrefslogtreecommitdiffstats
path: root/core/jni/android_view_InputDevice.cpp
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-04-20 19:28:00 -0700
committerJeff Brown <jeffbrown@google.com>2012-04-20 20:11:12 -0700
commit5bbd4b4f5fc19302fa017ad6afee6eb2d489d91a (patch)
tree2bc118a5ef332003cc7f6791968076c48b3cf84b /core/jni/android_view_InputDevice.cpp
parent9e6d4b035d4f012d23264d3d2bc946b1ca02dba1 (diff)
downloadframeworks_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 'core/jni/android_view_InputDevice.cpp')
-rw-r--r--core/jni/android_view_InputDevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/jni/android_view_InputDevice.cpp b/core/jni/android_view_InputDevice.cpp
index 5cb172b..d1f0a6a 100644
--- a/core/jni/android_view_InputDevice.cpp
+++ b/core/jni/android_view_InputDevice.cpp
@@ -35,13 +35,13 @@ static struct {
} gInputDeviceClassInfo;
jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& deviceInfo) {
- ScopedLocalRef<jstring> nameObj(env, env->NewStringUTF(deviceInfo.getName().string()));
+ ScopedLocalRef<jstring> nameObj(env, env->NewStringUTF(deviceInfo.getDisplayName().string()));
if (!nameObj.get()) {
return NULL;
}
ScopedLocalRef<jstring> descriptorObj(env,
- env->NewStringUTF(deviceInfo.getDescriptor().string()));
+ env->NewStringUTF(deviceInfo.getIdentifier().descriptor.string()));
if (!descriptorObj.get()) {
return NULL;
}