diff options
author | 2025-01-13 14:24:36 -0800 | |
---|---|---|
committer | 2025-01-13 14:24:36 -0800 | |
commit | 581f0a22baf91b22ccf48fee425da0440257d1b3 (patch) | |
tree | 9e90707cfc8924a2b8613a14fb45f09ac2c1e402 | |
parent | dfd302417b84ed8fd5322da835350fddb2cc0941 (diff) | |
parent | 6703b1f33e67a6cf1acffb09aa904a1455344da7 (diff) |
Merge "Remove flag settings_can_control_hap_preset" into main
-rw-r--r-- | framework/api/system-current.txt | 16 | ||||
-rw-r--r-- | framework/java/android/bluetooth/BluetoothHapClient.java | 11 |
2 files changed, 8 insertions, 19 deletions
diff --git a/framework/api/system-current.txt b/framework/api/system-current.txt index 62b4aa6062..cfa9c8dad4 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 |