Loading core/jni/android_view_InputDevice.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -42,6 +42,13 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi return NULL; } // b/274058082: Pass a copy of the key character map to avoid concurrent // access std::shared_ptr<KeyCharacterMap> map = deviceInfo.getKeyCharacterMap(); if (map != nullptr) { map = std::make_shared<KeyCharacterMap>(*map); } ScopedLocalRef<jstring> descriptorObj(env, env->NewStringUTF(deviceInfo.getIdentifier().descriptor.c_str())); if (!descriptorObj.get()) { Loading @@ -50,7 +57,7 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi ScopedLocalRef<jobject> kcmObj(env, android_view_KeyCharacterMap_create(env, deviceInfo.getId(), deviceInfo.getKeyCharacterMap())); map)); if (!kcmObj.get()) { return NULL; } Loading Loading
core/jni/android_view_InputDevice.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -42,6 +42,13 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi return NULL; } // b/274058082: Pass a copy of the key character map to avoid concurrent // access std::shared_ptr<KeyCharacterMap> map = deviceInfo.getKeyCharacterMap(); if (map != nullptr) { map = std::make_shared<KeyCharacterMap>(*map); } ScopedLocalRef<jstring> descriptorObj(env, env->NewStringUTF(deviceInfo.getIdentifier().descriptor.c_str())); if (!descriptorObj.get()) { Loading @@ -50,7 +57,7 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi ScopedLocalRef<jobject> kcmObj(env, android_view_KeyCharacterMap_create(env, deviceInfo.getId(), deviceInfo.getKeyCharacterMap())); map)); if (!kcmObj.get()) { return NULL; } Loading