summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothHapClient.java
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@codecoup.pl>2022-03-08 12:14:41 +0000
committerJakub Tyszkowski <jakub.tyszkowski@codecoup.pl>2022-03-10 09:40:23 +0000
commitc3e40892c3335c60a174d9873c51b8e98b7fa87d (patch)
tree5087a34a50f39fd9259a6e8d9b017d88b6523048 /framework/java/android/bluetooth/BluetoothHapClient.java
parentdd353a0d645e1fe9613e1e98510f7a77fb48ed29 (diff)
hap: Align callback names to match API calls
This change was requested in b/218616250 Bug: 150670922 Bug: 218616250 Tag: #feature Test: atest CtsBluetoothTestCases:android.bluetooth.cts.BluetoothHapClientTest Sponsor: jpawlowski@ Change-Id: I4ef0b8b5d345e717a6c6cfc9bb3663bb11c170ac
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHapClient.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothHapClient.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHapClient.java b/framework/java/android/bluetooth/BluetoothHapClient.java
index 3887cf6e34..a306601496 100644
--- a/framework/java/android/bluetooth/BluetoothHapClient.java
+++ b/framework/java/android/bluetooth/BluetoothHapClient.java
@@ -98,7 +98,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- void onActivePresetChanged(@NonNull BluetoothDevice device, int presetIndex);
+ void onPresetSelected(@NonNull BluetoothDevice device, int presetIndex);
/**
* Invoked inform about the result of a failed preset change attempt.
@@ -109,7 +109,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- void onSelectActivePresetFailed(@NonNull BluetoothDevice device, @Status int statusCode);
+ void onPresetSelectionFailed(@NonNull BluetoothDevice device, @Status int statusCode);
/**
* Invoked to inform about the result of a failed preset change attempt.
@@ -122,7 +122,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- void onSelectActivePresetForGroupFailed(int hapGroupId, @Status int statusCode);
+ void onPresetSelectionForGroupFailed(int hapGroupId, @Status int statusCode);
/**
* Invoked to inform about the preset list changes.
@@ -175,35 +175,35 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
@SuppressLint("AndroidFrameworkBluetoothPermission")
private final IBluetoothHapClientCallback mCallback = new IBluetoothHapClientCallback.Stub() {
@Override
- public void onActivePresetChanged(@NonNull BluetoothDevice device, int presetIndex) {
+ public void onPresetSelected(@NonNull BluetoothDevice device, int presetIndex) {
Attributable.setAttributionSource(device, mAttributionSource);
for (Map.Entry<BluetoothHapClient.Callback, Executor> callbackExecutorEntry:
mCallbackExecutorMap.entrySet()) {
BluetoothHapClient.Callback callback = callbackExecutorEntry.getKey();
Executor executor = callbackExecutorEntry.getValue();
- executor.execute(() -> callback.onActivePresetChanged(device, presetIndex));
+ executor.execute(() -> callback.onPresetSelected(device, presetIndex));
}
}
@Override
- public void onSelectActivePresetFailed(@NonNull BluetoothDevice device, int status) {
+ public void onPresetSelectionFailed(@NonNull BluetoothDevice device, int status) {
Attributable.setAttributionSource(device, mAttributionSource);
for (Map.Entry<BluetoothHapClient.Callback, Executor> callbackExecutorEntry:
mCallbackExecutorMap.entrySet()) {
BluetoothHapClient.Callback callback = callbackExecutorEntry.getKey();
Executor executor = callbackExecutorEntry.getValue();
- executor.execute(() -> callback.onSelectActivePresetFailed(device, status));
+ executor.execute(() -> callback.onPresetSelectionFailed(device, status));
}
}
@Override
- public void onSelectActivePresetForGroupFailed(int hapGroupId, int statusCode) {
+ public void onPresetSelectionForGroupFailed(int hapGroupId, int statusCode) {
for (Map.Entry<BluetoothHapClient.Callback, Executor> callbackExecutorEntry:
mCallbackExecutorMap.entrySet()) {
BluetoothHapClient.Callback callback = callbackExecutorEntry.getKey();
Executor executor = callbackExecutorEntry.getValue();
executor.execute(
- () -> callback.onSelectActivePresetForGroupFailed(hapGroupId, statusCode));
+ () -> callback.onPresetSelectionForGroupFailed(hapGroupId, statusCode));
}
}
@@ -866,9 +866,9 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
/**
* Selects the currently active preset for a HA device
*
- * On success, {@link Callback#onActivePresetChanged(BluetoothDevice, int)} will be called with
+ * On success, {@link Callback#onPresetSelected(BluetoothDevice, int)} will be called with
* reason code {@link BluetoothStatusCodes#REASON_LOCAL_APP_REQUEST}
- * On failure, {@link Callback#onSelectActivePresetFailed(BluetoothDevice, int)} will be called.
+ * On failure, {@link Callback#onPresetSelectionFailed(BluetoothDevice, int)} will be called.
*
* @param device is the device for which we want to set the active preset
* @param presetIndex is an index of one of the available presets
@@ -900,10 +900,10 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* <p> This group call may replace multiple device calls if those are part of the
* valid HAS group. Note that binaural HA devices may or may not support group.
*
- * On success, {@link Callback#onActivePresetChanged(BluetoothDevice, int)} will be called
+ * On success, {@link Callback#onPresetSelected(BluetoothDevice, int)} will be called
* for each device within the group with reason code
* {@link BluetoothStatusCodes#REASON_LOCAL_APP_REQUEST}
- * On failure, {@link Callback#onSelectActivePresetFailed(BluetoothDevice, int)} will be called
+ * On failure, {@link Callback#onPresetSelectionFailed(BluetoothDevice, int)} will be called
* for each device within the group.
*
* @param groupId is the device group identifier for which want to set the active preset