From 5bbd4b4f5fc19302fa017ad6afee6eb2d489d91a Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Fri, 20 Apr 2012 19:28:00 -0700 Subject: 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 --- core/jni/android_view_InputDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/jni') 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 nameObj(env, env->NewStringUTF(deviceInfo.getName().string())); + ScopedLocalRef nameObj(env, env->NewStringUTF(deviceInfo.getDisplayName().string())); if (!nameObj.get()) { return NULL; } ScopedLocalRef descriptorObj(env, - env->NewStringUTF(deviceInfo.getDescriptor().string())); + env->NewStringUTF(deviceInfo.getIdentifier().descriptor.string())); if (!descriptorObj.get()) { return NULL; } -- cgit v1.1