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

Commit b22cee27 authored by Etienne Ruffieux's avatar Etienne Ruffieux
Browse files

Upgrade RequireAPI annotation to prevent wrong lint error.

BluetoothA2dp#GetCodecStatus is made public (was SystemApi)
and linter will wrongly flag it as [NewApi] so we have to
either update the RequireApi or add a SuppressLint.

Bug: 170678351
Tag: #feature
Test: atest FrameworkBluetoothTests
Change-Id: I5325e66e245e91bf2ffba00b87fafc4ec3c714d2
parent c2ed96db
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ public class A2dpProfile implements LocalBluetoothProfile {
    /**
     * @return whether high quality audio is enabled or not
     */
    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
    public boolean isHighQualityAudioEnabled(BluetoothDevice device) {
        BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice();
        if (bluetoothDevice == null) {
@@ -286,7 +286,7 @@ public class A2dpProfile implements LocalBluetoothProfile {
     * @param device to get codec label from
     * @return the label associated with the device codec
     */
    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
    public String getHighQualityAudioOptionLabel(BluetoothDevice device) {
        BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice();
        int unknownCodecId = R.string.bluetooth_profile_a2dp_high_quality_unknown_codec;