summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth
AgeCommit message (Collapse)Author
2022-07-29Merge "Broadcast: fix typo issue for BluetoothBroadcast class name" into ↵Treehugger Robot
t-keystone-qcom-dev
2022-07-27Broadcast: fix typo issue for BluetoothBroadcast class namezhenchao
One typo issue for BluetoothBroadcast class name in BluetoothAdapter closeBroadcastProfile(). So that BroadcastProfile proxy is unable to close by other apps. CRs-Fixed: 3239107 Change-Id: I8f47a1e58892774c3137ef424784f1e5a2ac8cc1
2022-07-26Merge TP1A.220624.020Deyao Ren
Change-Id: I357db3da652d8ce93bb26a00d0f123fae1b7c64c
2022-07-14Revert "Fixes a bug in the BluetoothDevice#getIdentityAddress API where it"Bart Sears
This reverts commit 448c2830336794d350b1c7c4f62c3e406b172e32. Reason for revert: b/238847789 Test: Clean revert of CL Change-Id: I30941e8b9344e9dbaacaec5ca2c2046d149ed839 (cherry picked from commit bf9246b080ee80380d3fc5f20258294a69f81391) Merged-In: I30941e8b9344e9dbaacaec5ca2c2046d149ed839
2022-07-13Fixes a bug in the BluetoothDevice#getIdentityAddress API where itRahul Sabnis
returns the mAddress field of the device instead of null when the identity address is not known. Tag: #feature Bug: 238353063 Test: atest AdapterServiceTest#testAddressConsolidate Ignore-AOSP-First: Change needs to land in TM release Change-Id: I577843c9e2cc279915d0632ff25bde66aa949e94 (cherry picked from commit 448c2830336794d350b1c7c4f62c3e406b172e32) Merged-In: I577843c9e2cc279915d0632ff25bde66aa949e94
2022-07-11Bluetooth: Added New Profile IdPhaneendra Reddy
Coordinated audio unicast profile is added in the bluetooth profile. CRs-Fixed: 3234293 Change-Id: I7cf17c3a1b50480ca0f55684b33bc8477eb16aea
2022-07-01Merge "Revert "Change Bluetooth matching package name"" into t-keystone-qcom-devTreehugger Robot
2022-07-01Revert "Change Bluetooth matching package name"Sravan Voleti
This reverts commit 6b1513a43145aa63f9775fb79aa64e2e645d4339. Reason for revert: Rename Bluetooth APK CRs-Fixed: 3233822 Change-Id: I04f5faf86a85f1a80d26e99cb0547609be696a66
2022-06-30Revert "Revert "Reuse SynchronousResultReceivers instead of creating new.""Neha Jain
This reverts commit dd85e91cea26c7f706af36c852e79d5b4ca1f173. Bug: 217366135 Reason for revert: Need this to fix a crash bug in tm-dev Change-Id: I2a94c278edc0681c5b8af6ea0a0171b71d72c650 (cherry picked from commit dbaf406ccb0ed887d4e93057c9ec0d3457f14457) Merged-In: I2a94c278edc0681c5b8af6ea0a0171b71d72c650
2022-06-29Revert "Reuse SynchronousResultReceivers instead of creating new."Neha Jain
This reverts commit 02dcbe72b3564559eaa9c2e2714824e4aac6f18c. Reason for revert: Causing builds to fail b/237471430 Change-Id: I6165d838abf312085050359377f67a68a5f8b51a (cherry picked from commit f5dd42bbd05e68f7763ccaa9fae5642acc4ceba1) Merged-In: I6165d838abf312085050359377f67a68a5f8b51a
2022-06-29Reuse SynchronousResultReceivers instead of creating new.Etienne Ruffieux
Bug: 217366135 Tag: #feature Test: manual Ignore-AOSP-First: to be chery-picked Change-Id: If8ae530a284151888a3f89a51d2c58f2a5cd3644 (cherry picked from commit 02dcbe72b3564559eaa9c2e2714824e4aac6f18c) Merged-In: If8ae530a284151888a3f89a51d2c58f2a5cd3644
2022-06-16Merge TP1A.220611.001Jose Galmes
Change-Id: I5bff987f996d599e6bdb0f22d1eec680b5d7d6c1
2022-06-13Merge TP1A.220609.001Scott Lobdell
Change-Id: I6c3c168fb196a53feb1d2688b74bea4fdbc5b3e8
2022-06-10Merge "BluetoothDevice#getUuids() returns null again when no Uuids" into tm-devEtienne Ruffieux
2022-06-09BluetoothDevice#getUuids() returns null again when no UuidsEtienne Ruffieux
getUuids was wrongly returning an empty array of Uuids when fetchUuidsWithSdp had not been called. It now returns null again. Test: atest CtsBluetoothTestCases Bug: 235456437 Tag: #feature Ignore-AOSP-First: will be cherry-picked Change-Id: If8aafc1b0ab4e253fdacc827726d76825b3bd1e4
2022-06-07Merge "Modify incorrect API documentation" into tm-devEtienne Ruffieux
2022-06-06Modify incorrect API documentationEtienne Ruffieux
BluetoothAdapter#listenUsingInsecureRfcommWithServiceRecord description was stating user should call BluetoothDevice#createRfcommSocketToServiceRecord to connect, but user should use BluetoothDevice#createInsecureRfcommSocketToServiceRecord instead. Tag: #feature Test: build Bug: 235047894 Ignore-AOSP-First: cherry-pick Change-Id: I6469862134d398bba8e9c738eaba081dc3ee6d65 Merged-In: I770a00dd99abab967590d100607a8b1292dc0492
2022-06-06Update API docs to state that the IRK must be supplied in little endianRahul Sabnis
byte order Tag: #feature Bug: 233217148 Test: Manual (docs change) Ignore-AOSP-First: Android T docs change Change-Id: I5cab17003c22329744341235bb053cb55b4f7989
2022-05-30Update profile constantsSravan voleti
Update value added Bluetooth profile constants. Bug: 203821845 CRs-Fixed: 3208393 Change-Id: I0da6b52e61ed7b4f408b1f5faf44165a4f868a44
2022-05-26Update API docs to indicate that BT addresses are to be provided in bigRahul Sabnis
endian. Tag: #feature Bug: 233217148 Test: Manual (docs change) Ignore-AOSP-First: Android T docs change Change-Id: Iee36345088c886d5b43120bb10d8ddf52133de07
2022-05-20Merge TP1A.220520.001Daniel Norman
Change-Id: I69faab277dab1517370f96ceefd715ab663c559b
2022-05-15Merge TP1A.220507.001Brian Orr
Change-Id: I0474d4c5321a9bca5e519669c5e7f8eb3aee821d
2022-05-13Copy BluetoothHearingAid API into private for short-term onlyjasonwshsu
* SettingsLib will use APIs getDeviceSideInternal() and getDeviceModeInternal() to improve hearing aids experience and change to formal call in next bluetooth release. Bug: 224323976 Ignore-AOSP-First: AOSP will be updated later Test: add private APIs only Tag: #feature Change-Id: I7ccb399cfe9b4e1fbf37d752dacbdceeb09f5b8d
2022-05-11Merge "Change Bluetooth matching package name" into t-keystone-qcom-devTreehugger Robot
2022-05-10BT: Adding CS params and new entires in BT framework.Satheesh Kumar Pallemoni
- Adding CS params and new entires in BT framework - Enabled framework logs for Le Audio. CRs-Fixed: 3187056 Change-Id: I3cbd67961f331cd47969e0b281af81cf6cd8de2e
2022-05-10Change Bluetooth matching package namexiaowang
Matching package name is changed to "com.android.bluetooth.services" CRs-Fixed: 3191467 Change-Id: I3ecafb1558ff753830f412eb73ce690d1655d89b
2022-05-08Merge TP1A.220425.001Deyao Ren
Change-Id: I0a4e31148795cea28496cf934df2340aee57fd68
2022-05-03Merge TP1A.220422.001Deyao Ren
Change-Id: I413ca31daa6902265a5a4fd83b646b3f049e5fd5
2022-04-30Merge "Add caching for {Map,Sap}.getConnectionState" into tm-devTreeHugger Robot
2022-04-29Add caching for {Map,Sap}.getConnectionStateWilliam Escande
BluetoothMap and BluetoothSap are heavily using their getConnectionState method. By caching the value I intend to reduce drastically the number of binder calls generated. While performing a discovery, the caching is working on 80% of binder calls. This value should be bigger when we kepp asking the value for the same device. (currently everytime you ask the connection state of a new device, you refresh the cache, there is no caching for multiples devices). I don't have any Map/Sap setup to test it, asking to test team if they hit some issues Fixing cache on BluetoothDevice by passing the device as parameter Doing a refactoring of all cached method in bluetooth to keep code consistency: AKA we try to do the most of check outside of the cache query Bug: 217366135 Test: Put some log to see the value being cached sometimes - need more testing Ignore-AOSP-First: No caching api on AOSP Change-Id: Iababf9f9068a181e277b400e786a4a67d4447dc8
2022-04-28Fix hash function in BluetoothLeAudioContentMetadataJack He
Arrays.hashCode should be used when hasing arrays Bug: 229790402 Test: atest CtsBluetoothTestCases Change-Id: I940fa47195d12be6b8377e1025f4236cd10c05c4 Merged-In: I940fa47195d12be6b8377e1025f4236cd10c05c4 (cherry picked from commit 0267a3341e200b2758441f5868824b907effc946)
2022-04-28LeAudio: Respond to TMAP read requestsŁukasz Rymanowski
* Supported roles are Call Gateway and Unicast Media Server * Broadcast roles depend on runtime flag * Also implemented a simple unit test * Use objects factory in LeAudioService Bug: 150670922 Bug: 229045392 Sponsor: @jpawlowski Test: atest BluetoothInstrumantationTests Change-Id: I91d6febda6ae080a5f6027312ec34e2e598d2a68 Merged-In: I91d6febda6ae080a5f6027312ec34e2e598d2a68 (cherry picked from commit 97d8ebdca766f4d5ee542ba55956059689e58c4c)
2022-04-28Merge changes from topic "fix-cts-2" into tm-devJack He
* changes: BASS: PA_SYNC_STATE_FAILED_TO_SYNCHRONIZE in allowed for paSyncState BASS: Fix BASS client service to pass CTS tests Copy to std::string when parsing LE audio config
2022-04-28BASS: PA_SYNC_STATE_FAILED_TO_SYNCHRONIZE in allowed for paSyncStateJack He
* Missed this value in earlier code iteration Test: atest android.bluetooth.cts.BluetoothLeBroadcastReceiveStateTest Bug: 230013261 Fixes: 230013261 Change-Id: I10c1fc206b7bdf7bf97e80bf1bc579e936021f37 Merged-In: I10c1fc206b7bdf7bf97e80bf1bc579e936021f37 (cherry picked from commit 81ed5b53a0e1ea5bc03ae412cca3425eedc28095)
2022-04-28BASS: Fix BASS client service to pass CTS testsJack He
* Through NullPointerException when asserting on non-null arguments * Invoke error callback when sink device is not connected * Assert on parameter value at binder client side * Clear binder identity when checking DeviceConfig values Test: atest CtsBluetoothTestCases Bug: 229790402 Fixes: 229790402 Ignore-AOSP-First: Fixing CTS tests on T Change-Id: Ie19cf24d2fe20948494643f3ce179d1a2c3a290f Merged-In: Ie19cf24d2fe20948494643f3ce179d1a2c3a290f (cherry picked from commit 9d0518ee6515bf0aeccdbd428485e7bd38f68f0b)
2022-04-27BluetoothLeAudio: Improve handling lead device disconnectionŁukasz Rymanowski
To improve scenario when lead Le Audio device is disconnected for the streaming group, while there are still other devices streaming, LeAudioService will not notify audio framework or other users about Le Audio lead device disconnection. Instead we try to reconnect under the hood and keep using lead device as a audio device indetifier in the audio framework in order to not stop the stream. Bug: 150670922 Bug: 228809876 Test: atest BluetoothInstrumentationTests Sponsor: @jpawlowski Change-Id: I02b960c6a5a966b6650dc3485c5d3f6735e4566b Merged-In: I02b960c6a5a966b6650dc3485c5d3f6735e4566b (cherry picked from commit eaf4f412d8fa8000df3e7229eed0cd4f96f22249)
2022-04-22Merge TP1A.220414.003Scott Lobdell
Change-Id: I7225f3a31204834ab12679885cd136bdff31f554
2022-04-22Implement Equals and Hash for BluetoothLeAudioCodecConfigMetadataWilliam Escande
Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothLeAudioCodecConfigMetadataTest#testCreateCodecConfigMetadataFromCopy' Fix: 230012767 Ignore-AOSP-First: Tm-dev is cut-off, cherry-picking from aosp Merged-In: I569ab7afca938b4e4f5d38bc134b14d4760f094c Change-Id: I569ab7afca938b4e4f5d38bc134b14d4760f094c
2022-04-15Restore devices volume after bluetooth restartWilliam Escande
At AvrcpVolumeManager startup, we tried to read the sharedPref and to save it in the memory. A clean is performed on this list to remove non-bonded devices. The issue here is that the getBondState was returning BOND_NONE for all devices due to check perform on the adapter State. We don't know why the adapter is not reported as STATE_ON at this point but this check was added on all method to sanitize the shutdown process. Because this is a cached value there is no risk from a crash at shutdown Fix: 228415780 Ignore-AOSP-First: No caching done on AOSP Test: Manual testing Change-Id: I52362c3b511054abcb88e0cb83df95ba74c62ef4
2022-04-15Merge "broadcaster: Add missing null checks at client side" am: 3147fafa46 ↵Treehugger Robot
am: 131edeeae6 am: 7d8a537440 Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2054085 Change-Id: I39bce832d21d52d0cc6b2c8c07f5ca062f7b94c4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14Merge "broadcaster: Add missing null checks at client side"Treehugger Robot
2022-04-14Add Enhanced connection update SDK APIsSubramanian Srinivasan
Add support for following ECU support. 1. Enhanced connection update SDK APIs support. 2. Enhanced connection update support in Bluetooth apk and stack. CRs-Fixed: 3127801 Change-Id: I29a8d10aad4c797f7b082297dabaa3049bad5462
2022-04-14Merge "Add Bluetooth state check as service null isn't sufficient."Treehugger Robot
2022-04-14broadcaster: Add missing null checks at client sideJakub Tyszkowski
These can be already checked at the frameworks side. Bug: 150670922 Tag: #feature Test: atest CtsBluetoothTestCases:android.bluetooth.cts.BluetoothHapClientTest Sponsor: jpawlowski@ Change-Id: I1b3d68594f5c96343080d4cf693bd41cce8be581
2022-04-14Merge "Fix write lock locking mechanisme" am: c7ceab19a8 am: aa1288c9d2 am: ↵William Escande
f836ba2d0c Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2063178 Change-Id: Ib39bdd60a716eb373f2f2c59861b2cdc50682728 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14Merge "Fix write lock locking mechanisme"William Escande
2022-04-14Fix write lock locking mechanismeWilliam Escande
Using synchronized on a instance of a writeLock is not something that can work with read/write lock Fix: 227963093 Test: build - Don't know how to reproduce such async behavior Change-Id: I9f2be339a97e83f4f3a6034e71a40f632062fb09
2022-04-14Add Bluetooth state check as service null isn't sufficient.Etienne Ruffieux
When verifying if Bluetooth is up in some APIs, BluetoothDevice was only checking if the service is null. When the adapter turns off, getState can return STATE_OFF before the callback to inform the Adapter of the new state is received, so the service isn't null but the state is off for a brief period of time. Adding the state checks along with the service checks prevents being able to call an API when Bluetooth is off. Bug: 214056525 Tag: #feature Test: atest BluetoothDeviceTest Merged-In: Ic387a19402ec6cd3e06677f554da8a8de695b4fc Change-Id: Ic387a19402ec6cd3e06677f554da8a8de695b4fc
2022-04-13Merge changes If47a6350,Ib795d8d8 am: 2d58918e0a am: eb38a57122 am: ada957e41dJack He
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2058230 Change-Id: Idb2b411d66f8f50f907f156e61a11619969c7d97 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13Merge changes If47a6350,Ib795d8d8Jack He
* changes: broadcaster: Add passing broadcast metadata from native broadcaster: Fix parceling subgroup