Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 41ee39a1 authored by Jakub Tyszkowski's avatar Jakub Tyszkowski
Browse files

hap: Improvements around the BluetoothHapPresetInfo builder

Since the BluetoothHapClient API pass BluetoothHapPresetInfo objects
only in one direction (when receiving BluetoothHapPresetInfo instances
from the service), the App shouldn't ever need to build them by itself.

From the Service point of view, preset index and name are both equally
important and are both mandatory thus should be both in Builder class
constructor, however in valid cases, preset info comes from the JNI
native code, wich does not use the builder class. In other rare cases
for invalid requests we should return null as API return params are
nullable. The builder can still be used in other parts like the unit
tests.

Bug: 150670922
Bug: 218682004
Bug: 220029662
Fixes: 218682004
Fixes: 220029662
Tag: #feature
Test: atest CtsBluetoothTestCases:android.bluetooth.cts.BluetoothHapClientTest BluetoothInstrumentationTests
Sponsor: jpawlowski@

Change-Id: I95c68406f531acc2056d3b16b3fcc8af4ca659cb
parent 83c130f9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment