summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Etienne Ruffieux <eruffieux@google.com> 2022-10-04 11:15:10 -0700
committer Etienne Ruffieux <eruffieux@google.com> 2022-10-04 11:15:10 -0700
commitb22cee276f72b120882d835b14efcd012bde3139 (patch)
tree0eb601eaf1ea4f998c7b4f999bb501de01705211
parentc2ed96db7fbc68acac9f345d6c9e0fd2db265052 (diff)
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
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
index df19c67f00e5..42c3d1b8ce5c 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
@@ -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;