summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Angela Wang <angelala@google.com> 2025-01-03 11:27:27 +0000
committer Angela Wang <angelala@google.com> 2025-01-03 11:27:27 +0000
commit6703b1f33e67a6cf1acffb09aa904a1455344da7 (patch)
tree9b20aa03665831223e5edb05fa13f27520cccc9f
parenta69c2fea130b5bf25320bed1443f311e651a2ea3 (diff)
Remove flag settings_can_control_hap_preset
Test: m Bluetooth Bug: 306236481 Bug: 300015207 Change-Id: I3cdfbe4bbc5e2b38647e6ba36eadc5f3fe0f24af
-rw-r--r--framework/api/system-current.txt16
-rw-r--r--framework/java/android/bluetooth/BluetoothHapClient.java11
2 files changed, 8 insertions, 19 deletions
diff --git a/framework/api/system-current.txt b/framework/api/system-current.txt
index 8368f676b8..a6bcc53007 100644
--- a/framework/api/system-current.txt
+++ b/framework/api/system-current.txt
@@ -383,16 +383,16 @@ package android.bluetooth {
public final class BluetoothHapClient implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile {
method public void close();
method protected void finalize();
- method @FlaggedApi("com.android.bluetooth.flags.settings_can_control_hap_preset") @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getActivePresetIndex(@NonNull android.bluetooth.BluetoothDevice);
+ method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getActivePresetIndex(@NonNull android.bluetooth.BluetoothDevice);
method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BluetoothHapPresetInfo getActivePresetInfo(@NonNull android.bluetooth.BluetoothDevice);
method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothHapPresetInfo> getAllPresetInfo(@NonNull android.bluetooth.BluetoothDevice);
method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@Nullable android.bluetooth.BluetoothDevice);
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice);
method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]);
- method @FlaggedApi("com.android.bluetooth.flags.settings_can_control_hap_preset") @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getHapGroup(@NonNull android.bluetooth.BluetoothDevice);
+ method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getHapGroup(@NonNull android.bluetooth.BluetoothDevice);
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getHearingAidType(@NonNull android.bluetooth.BluetoothDevice);
- method @FlaggedApi("com.android.bluetooth.flags.settings_can_control_hap_preset") @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BluetoothHapPresetInfo getPresetInfo(@NonNull android.bluetooth.BluetoothDevice, int);
+ method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BluetoothHapPresetInfo getPresetInfo(@NonNull android.bluetooth.BluetoothDevice, int);
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void registerCallback(@NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothHapClient.Callback);
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void selectPreset(@NonNull android.bluetooth.BluetoothDevice, int);
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void selectPresetForGroup(int, int);
@@ -403,13 +403,13 @@ package android.bluetooth {
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean supportsIndependentPresets(@NonNull android.bluetooth.BluetoothDevice);
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean supportsSynchronizedPresets(@NonNull android.bluetooth.BluetoothDevice);
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean supportsWritablePresets(@NonNull android.bluetooth.BluetoothDevice);
- method @FlaggedApi("com.android.bluetooth.flags.settings_can_control_hap_preset") @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void switchToNextPreset(@NonNull android.bluetooth.BluetoothDevice);
- method @FlaggedApi("com.android.bluetooth.flags.settings_can_control_hap_preset") @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void switchToNextPresetForGroup(int);
- method @FlaggedApi("com.android.bluetooth.flags.settings_can_control_hap_preset") @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void switchToPreviousPreset(@NonNull android.bluetooth.BluetoothDevice);
- method @FlaggedApi("com.android.bluetooth.flags.settings_can_control_hap_preset") @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void switchToPreviousPresetForGroup(int);
+ method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void switchToNextPreset(@NonNull android.bluetooth.BluetoothDevice);
+ method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void switchToNextPresetForGroup(int);
+ method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void switchToPreviousPreset(@NonNull android.bluetooth.BluetoothDevice);
+ method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void switchToPreviousPresetForGroup(int);
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void unregisterCallback(@NonNull android.bluetooth.BluetoothHapClient.Callback);
field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_HAP_CONNECTION_STATE_CHANGED = "android.bluetooth.action.HAP_CONNECTION_STATE_CHANGED";
- field @FlaggedApi("com.android.bluetooth.flags.settings_can_control_hap_preset") public static final int PRESET_INDEX_UNAVAILABLE = 0; // 0x0
+ field public static final int PRESET_INDEX_UNAVAILABLE = 0; // 0x0
field public static final int TYPE_BANDED = 2; // 0x2
field public static final int TYPE_BINAURAL = 0; // 0x0
field public static final int TYPE_MONAURAL = 1; // 0x1
diff --git a/framework/java/android/bluetooth/BluetoothHapClient.java b/framework/java/android/bluetooth/BluetoothHapClient.java
index 910faa7faa..c11249bc9e 100644
--- a/framework/java/android/bluetooth/BluetoothHapClient.java
+++ b/framework/java/android/bluetooth/BluetoothHapClient.java
@@ -24,7 +24,6 @@ import static android.bluetooth.BluetoothUtils.callServiceIfEnabled;
import static java.util.Objects.requireNonNull;
import android.annotation.CallbackExecutor;
-import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -41,8 +40,6 @@ import android.os.RemoteException;
import android.util.CloseGuard;
import android.util.Log;
-import com.android.bluetooth.flags.Flags;
-
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Collections;
@@ -336,7 +333,6 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_SETTINGS_CAN_CONTROL_HAP_PRESET)
public static final int PRESET_INDEX_UNAVAILABLE = IBluetoothHapClient.PRESET_INDEX_UNAVAILABLE;
/**
@@ -691,7 +687,6 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_SETTINGS_CAN_CONTROL_HAP_PRESET)
@RequiresBluetoothConnectPermission
@RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED})
public int getHapGroup(@NonNull BluetoothDevice device) {
@@ -715,7 +710,6 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_SETTINGS_CAN_CONTROL_HAP_PRESET)
@RequiresBluetoothConnectPermission
@RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED})
public int getActivePresetIndex(@NonNull BluetoothDevice device) {
@@ -815,7 +809,6 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_SETTINGS_CAN_CONTROL_HAP_PRESET)
@RequiresBluetoothConnectPermission
@RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED})
public void switchToNextPreset(@NonNull BluetoothDevice device) {
@@ -840,7 +833,6 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_SETTINGS_CAN_CONTROL_HAP_PRESET)
@RequiresBluetoothConnectPermission
@RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED})
public void switchToNextPresetForGroup(int groupId) {
@@ -860,7 +852,6 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_SETTINGS_CAN_CONTROL_HAP_PRESET)
@RequiresBluetoothConnectPermission
@RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED})
public void switchToPreviousPreset(@NonNull BluetoothDevice device) {
@@ -887,7 +878,6 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_SETTINGS_CAN_CONTROL_HAP_PRESET)
@RequiresBluetoothConnectPermission
@RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED})
public void switchToPreviousPresetForGroup(int groupId) {
@@ -906,7 +896,6 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_SETTINGS_CAN_CONTROL_HAP_PRESET)
@RequiresBluetoothConnectPermission
@RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED})
@Nullable