History log of /packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b40cec2e9a4a848b7ba724c6ed02c49604f0c669 25-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Rename bt_bdaddr_t into RawAddress (2/3)

Test: compilation test
Change-Id: I8b334c77a96ea29d58b1e4cf176e0a941b74d2b9
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
2116dbf94fbc00da999ac629c78627983f599a26 17-Mar-2017 Andre Eisenbach <eisenbach@google.com> Revert "jni: introduce ScopedBtAddr"

Causes crash on Fugu. Reverting for now until further investigation.

This reverts commit 2b233628767c0bf6ff21ae2acdeada8bea94e583.

Change-Id: I21daf6b75312695d7ccb83ae603aaeffc3c9e770
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
2b233628767c0bf6ff21ae2acdeada8bea94e583 15-Feb-2017 Marie Janssen <jamuraa@google.com> 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
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
8a9f762c80d436719375de5d5f83c1c11e9f5723 02-Feb-2017 Pavlin Radoslavov <pavlin@google.com> Add a mechanism to configure the default A2DP codec priorities

Previously, the relative codec priorities were hard-codec internally.
The new mechanism uses the following configurable resources in
packages/apps/Bluetooth/res/values/config.xml to re-assign the
default codec priorities per device, or to explicitly disable a codec.

- a2dp_source_codec_priority_sbc
- a2dp_source_codec_priority_aac
- a2dp_source_codec_priority_aptx
- a2dp_source_codec_priority_aptx_hd
- a2dp_source_codec_priority_ldac

Those values are assigned on startup.
Also, they can be changed per device by using an overlay:
device/<VENDOR>/<DEVICE>/overlay/packages/apps/Bluetooth/res/values/config.xml

Test: Manually streaming to a headset
Change-Id: Ic3cf8549b46547dbeba93632c3178c6b7f2b810d
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
08d3925d3d72837e6f86c9e0beaed5f7b813ea37 26-Jan-2017 Pavlin Radoslavov <pavlin@google.com> Update the A2DP Codec Config API

Previously, the JNI upcall would contain only the current codec config.
In the new API, the upcall contains:
1. The current codec config
2. The list of codecs containing the local codecs capabilities
3. The list of codecs containing the selectable codecs capabilities.
This list is the intersection of the local codecs capabilities
and the capabilities of the paired device.

Also, refactored the Java internals to accomodate the extra information:
* Added new class BluetoothCodecStatus that contains the extra info:
current codec config, local codecs capabilities and selectable
codecs capabilities
* Renamed method getCodecConfig() to getCodecStatus() and return the
corresponding BluetoothCodecStatus object.
* Updates to class BluetoothCodecConfig:
new methods isValid(), getCodecName(), and updated toString()
so it is more user friendly
* Removed BluetoothCodecConfig.EXTRA_CODEC_CONFIG and
EXTRA_PREVIOUS_CODEC_CONFIG.
The former is superseded by BluetoothCodecStatus.EXTRA_CODEC_STATUS;
the latter is not really used.

Test: A2DP streaming with headsets and switching the codecs
Change-Id: I18536cffc5c73abc31c3d6afa54f9d3c3b1d577e
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
479b34835a560d032e211c3c27e10384af69c3b9 11-Oct-2016 Marie Janssen <jamuraa@google.com> jni: use ScopedLocalRef where possible

RAII simplifies code paths and eliminates errors.

Test: mma -j40, sanity testing on devices

Change-Id: I278f91445217c898a868b8328549c080d7123dbb
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
33b6b7d2b08dcd7ced1809e2ac653c5e8c2514af 21-Dec-2016 Pavlin Radoslavov <pavlin@google.com> Add a mechanism for configuring the A2DP Source codecs

* Extended the Bluetooth A2DP AIDL interface to get/set the current
codec configuration

* If the current codec config is changed such that the audio feeding
parameters have changed, then inform the Audio Manager so it can
reset accordingly the audio feeding parameters in the Audio HAL to
the Bluetooth stack.

Also, fix the BT_BOND_STATE_* values (unused) in the
AbstractionLayer.java class so they match the corresponding
BT_BOND_STATE_* values in
hardware/libhardware/include/hardware/bluetooth.h

Test: A2DP streaming to headsets, TestPlans/71390
Bug: 30958229
Change-Id: Ic3e35154d9dbc32b66522322cd5d2a96bc5a977c
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
dbd48b5fbeb449c31c92cbe8565db5e8f74c41e6 06-Dec-2016 Marie Janssen <jamuraa@google.com> JNI: clang-format code

Add clang-format file.
Add PREUPLOAD to check newly uploaded code.

clang-format --style=file jni/*.cpp

Test: mma -j37
Change-Id: I76bc67f7e69ac374f82d6c5d9745657f31dccdae
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
ae15d3d42fcb3349c11d394423493020e78c5f43 30-Nov-2016 Marie Janssen <jamuraa@google.com> JNI: style cleanup

Beginning of style cleanup:
- no assigns in conditionals
- move declarations closer to first use
- replace __FUNCTION__ with __func__
- remove unnecessary gotos

Test: mma && manual sanity tests

Change-Id: I7f8fca01dd57f57538b71fe7d7753fffe1de4d00
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
fe37710d689b7573ddeb901141db42c28b6cab39 12-Oct-2016 Marie Janssen <jamuraa@google.com> jni: Use RAII to manage callback environment

CallbackEnv is a new RAII object which:
- Retrieves the callback environment when instantiated
- Clears exceptions when it goes out of scope
- Centralizes checks that we are in the correct environment

It can be used the same as a pointer to JNIEnv with the -> operator and
the JNIEnv pointer can be retrieved with get();

Test: basic functionality tests
Change-Id: I004f2655e2e02847782fec794faa62da85c85d49
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
01df3e140ac7966264e5c236dc9f19539973f275 24-Aug-2016 Andre Eisenbach <eisenbach@google.com> Merge "Allocate CallbacksObj Before Initializing A2DP JNI Interface"
am: b1b9ae5d4b

Change-Id: I2f4cb3851fd7941bb4192aa6eded60403d67201d
2b55bec0c1d6b5c7a69a58ea1a7f8fd0dc91cf3a 24-Aug-2016 Nathan Harold <nharold@google.com> Allocate CallbacksObj Before Initializing A2DP JNI Interface

Bug: 31016704
Change-Id: If3dd4fdbc92e1420bc60910c39771aa549ac5dab
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
94a38610a17e019818719cfecde1b3e80601a2bd 12-Feb-2016 Sanket Agarwal <sanketa@google.com> Audio Focus for A2DP.

When AVRCP is available we provide the following focus management on
SINK role:
a) Both AVRCP CT and AVRCP TG can notify the A2DP SNK about play status
change. A2DP SNK will only play when either CT or TG says play.
b) If AVRCP does not exist or neither of CT or TG have explicitly said
play (pass through or notification) then we simply throw away the data.

TODO:
Implement additional policy where we take the data from the A2DP SRC
irrespective of whether AVRCP exists or not. This should be implemented
as a separate streaming state machine and we should be able to flip the
state machine at run time (via settings app).

Bug: b/26928143

Change-Id: Ie5fab15ba4cdd5738c59fa646ca0824770489ec5
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
21f921a43af4c93f23f8d3fd52033c9720200e89 01-Mar-2016 Ajay Panicker <apanicke@google.com> Fix warnings in packages/apps/Bluetooth

Bug: 27301103
Change-Id: I2f2698a2fb3f7ca7031a803e43a398f59bd32cdb
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
c38bcfa40ee1c749a884a8283d30861b6f776c1f 01-Mar-2016 Ajay Panicker <apanicke@google.com> Fix warnings in packages/apps/Bluetooth

Bug: 27301103
Change-Id: I2f2698a2fb3f7ca7031a803e43a398f59bd32cdb
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
d4a64dd76ad2847a08db3258f0a81ad631f5db26 23-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix warnings in packages/apps/Bluetooth

Cherry-pick of https://android-review.googlesource.com/#/c/204513/

Bug: 27301103
Change-Id: I46e0094d8e58c4d3a3ed0401600e7176fb1417c6
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
7b0fee2bccb630e4b9f93ee29f474c7aa89a28f9 23-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix warnings in packages/apps/Bluetooth

Bug: 27301103
Change-Id: I5eec4610f64af4191f64e946122623b6fe222b92
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
ede67c26e7b2564ea35db6d9b3027a269c150e13 24-Oct-2012 Zhihai Xu <zhihaixu@google.com> License of files Bluetooth package is not updated to ASL2

bug 7385618

Change-Id: I338fd87083387706f3b5f410c9592219bb8a1acb
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
c55a9837c004044051b71bb47182ace156691283 07-Apr-2012 Matthew Xie <mattx@google.com> replace logx with alogx

Change-Id: Iec82cb4545bb26a8aa55dc7d473247396b9fd6e1

Conflicts:

jni/com_android_bluetooth_hid.cpp
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
e469f16e5a7d99471d7db1b216d422e8d12cc4cf 06-Jun-2012 Matthew Xie <mattx@google.com> matt: my fix to get it compile, change logx to alogx, and etc

Change-Id: I0b361ad6ba9a5f6ac4db9203a389ee309b04019a
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
ac234ef0ddd67471d82f77c41535a5ea1b68b443 19-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> Added support to handle A2DP audio state changed events and broadcast
A2dp API intents

Change-Id: I1938e5e0acbbaf602239e14e1dfd3c890712930a
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
6654f5c903de510a70f9e72cd5ad7837b615d93f 12-Apr-2012 fredc <fredc@broadcom.com> Non persistent adapter service

Change-Id: I65e1c18e2899cea0a1e5c0102c4d24d39dce0249

Conflicts:

jni/com_android_bluetooth_hdp.cpp
jni/com_android_bluetooth_hid.cpp

Conflicts:

jni/com_android_bluetooth_hid.cpp
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
93f548ff8560bdecdc4bdd2f91f7dacda1e6bbc3 21-Mar-2012 Kausik Sinnaswamy <kausik@broadcom.com> Caching callbackEnv in HFP/A2DP JNI results in the ENV going out-of-syn after an disassociate_evt/associate_evt sequence. Removed the caching.

Change-Id: Iebe3d2b3fa632c3332be82291bf32ace62c30ad5
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp
6c91bc0a163cc7600c40d7fb979777fd911d1ef1 17-Feb-2012 Matthew Xie <mattx@google.com> Initial implementation of HFP and A2DP profile/service/statemachine.

Change-Id: Ic6e6d358b94313f237b7be61b70dcc6f4f7902e7
/packages/apps/Bluetooth/jni/com_android_bluetooth_a2dp.cpp