summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothLeBroadcast.java
diff options
context:
space:
mode:
authorJack He <siyuanh@google.com>2022-03-09 22:16:10 -0800
committerJack He <siyuanh@google.com>2022-03-10 11:30:45 -0800
commit0c6507d57d6141e35a7e4236e266b2dfdde0224c (patch)
tree55354bbe19952aa31fb8d2fb4cce422294235a5e /framework/java/android/bluetooth/BluetoothLeBroadcast.java
parent7328d681709eb22ba708218dd010d70e4b40556f (diff)
Broadcast API adjustment
* Enforce raw bytes vs. structured value consistency in metadata classes * Enforce required parameters in builder * Rename getMaximumNumberOfBroadcast to getMaximumNumberOfBroadcasts * Added utility method to parse and serialize LTV array Fixes: 218683032 Bug: 218683032 Test: atest BluetoothInstrumentationTests, cts tests Tag: #feature Change-Id: Ia10f414bdc958b75e94276d3f645687f8b9635f9
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothLeBroadcast.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothLeBroadcast.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothLeBroadcast.java b/framework/java/android/bluetooth/BluetoothLeBroadcast.java
index 5bf6e00fea..fa7f96737d 100644
--- a/framework/java/android/bluetooth/BluetoothLeBroadcast.java
+++ b/framework/java/android/bluetooth/BluetoothLeBroadcast.java
@@ -708,7 +708,7 @@ public final class BluetoothLeBroadcast implements AutoCloseable, BluetoothProfi
*/
@SystemApi
@RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED)
- public int getMaximumNumberOfBroadcast() {
+ public int getMaximumNumberOfBroadcasts() {
final IBluetoothLeAudio service = getService();
final int defaultValue = 1;
if (service == null) {
@@ -717,7 +717,7 @@ public final class BluetoothLeBroadcast implements AutoCloseable, BluetoothProfi
} else if (isEnabled()) {
try {
final SynchronousResultReceiver<Integer> recv = new SynchronousResultReceiver();
- service.getMaximumNumberOfBroadcast(mAttributionSource, recv);
+ service.getMaximumNumberOfBroadcasts(mAttributionSource, recv);
return recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue);
} catch (TimeoutException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));