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

Commit 579a19bf authored by William Escande's avatar William Escande
Browse files

Prevent checking flag in CTS for device before V

Calling a flag check on device prior to V will check for
READ_DEVICE_CONFIG permission.

Test does not have this permission

Bug: 323199303
Fix: 323199303
Test: atest CtsBluetoothTestCases on T devices
Flag: Exempt, Cts test only
Change-Id: I0b60d340dc756b748f526de37c32a7395ce1719e
parent 6141fe50
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
package android.bluetooth.cts;

import static com.android.bluetooth.flags.Flags.leaudioBroadcastFeatureSupport;
import static com.android.modules.utils.build.SdkLevel.isAtLeastV;

import static com.google.common.truth.Truth.assertThat;

import android.bluetooth.BluetoothAdapter;
@@ -96,11 +98,13 @@ public class TestUtils extends android.bluetooth.test_utils.TestUtils {
                return BluetoothProperties.isProfileBapUnicastClientEnabled().orElse(false);
            }
            case BluetoothProfile.LE_AUDIO_BROADCAST -> {
                return leaudioBroadcastFeatureSupport()
                return isAtLeastV()
                        && leaudioBroadcastFeatureSupport()
                        && BluetoothProperties.isProfileBapBroadcastSourceEnabled().orElse(false);
            }
            case BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT -> {
                return leaudioBroadcastFeatureSupport()
                return isAtLeastV()
                        && leaudioBroadcastFeatureSupport()
                        && BluetoothProperties.isProfileBapBroadcastAssistEnabled().orElse(false);
            }
                // Hidden profile