OSDN Git Service

jni: introduce ScopedBtAddr
authorMarie Janssen <jamuraa@google.com>
Wed, 15 Feb 2017 20:49:52 +0000 (12:49 -0800)
committerMarie Janssen <jamuraa@google.com>
Fri, 17 Mar 2017 00:33:57 +0000 (17:33 -0700)
commit2b233628767c0bf6ff21ae2acdeada8bea94e583
tree093b5ab3666c478f63dfbcce846f9aebf1572819
parent5cc1112d65b9898db46b6ff9be760cbeaf362d23
jni: introduce ScopedBtAddr

ScopedBtAddr handles marshalling bt_bdaddr_t into jbyteArrays so we
don't have to.  It also complains when it can't allocate things and
deletes the local reference when it goes out of scope.

Test: compiles, sanity tests with various profiles

Change-Id: I78a6364cc5cac0e8664d2d04388a6e2ac4c7a58f
16 files changed:
jni/Android.mk
jni/com_android_bluetooth.h
jni/com_android_bluetooth_a2dp.cpp
jni/com_android_bluetooth_a2dp_sink.cpp
jni/com_android_bluetooth_avrcp.cpp
jni/com_android_bluetooth_avrcp_controller.cpp
jni/com_android_bluetooth_btservice_AdapterService.cpp
jni/com_android_bluetooth_hdp.cpp
jni/com_android_bluetooth_hfp.cpp
jni/com_android_bluetooth_hfpclient.cpp
jni/com_android_bluetooth_hid.cpp
jni/com_android_bluetooth_hidd.cpp
jni/com_android_bluetooth_pan.cpp
jni/com_android_bluetooth_sdp.cpp
jni/scoped_bt_addr.cpp [new file with mode: 0644]
jni/scoped_bt_addr.h [new file with mode: 0644]