Skip to content
Snippets Groups Projects
Commit 97b4e56a authored by Shunkai Yao's avatar Shunkai Yao Committed by Gerrit Code Review
Browse files

Merge "Remove audio_hal_version_class flag" into main

parents e9454b4d 08a756fd
No related branches found
No related tags found
No related merge requests found
package: "com.android.bluetooth.flags"
container: "com.android.btservices"
flag {
name: "audio_hal_version_class"
namespace: "bluetooth"
description: "Change bluetooth audio hal version from enum to class"
bug: "315983648"
is_fixed_read_only: true
}
......@@ -25,7 +25,6 @@ cc_library_static {
"libutils",
],
static_libs: [
"bluetooth_flags_c_lib",
"libbluetooth_log",
"libbt-common",
"libbt_shim_bridge",
......
......@@ -18,7 +18,6 @@
#include <android/hardware/bluetooth/audio/2.1/IBluetoothAudioProvidersFactory.h>
#include <android/hardware/bluetooth/audio/2.1/types.h>
#include <com_android_bluetooth_flags.h>
namespace bluetooth {
namespace audio {
......
......@@ -265,7 +265,8 @@ bool LeAudioTransport::IsRequestCompletedAfterUpdate(
auto ret = std::get<1>(result);
LOG_VERBOSE("new state: %d, return: %s",
static_cast<int>(start_request_state_.load()), ret);
static_cast<int>(start_request_state_.load()),
ret ? "true" : "false");
return ret;
}
......
......@@ -628,9 +628,7 @@ cc_test {
"android.hardware.bluetooth.audio@2.1",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
"bluetooth_flags_c_lib",
"libbt-audio-hal-interface",
"libflagtest",
],
test_suites: ["general-tests"],
cflags: [
......
......@@ -16,12 +16,8 @@
#include "audio_hal_interface/hal_version_manager.h"
#include <flag_macros.h>
#include <gtest/gtest.h>
#include <cstdint>
#include <string>
using bluetooth::audio::BluetoothAudioHalTransport;
using bluetooth::audio::BluetoothAudioHalVersion;
using bluetooth::audio::HalVersionManager;
......@@ -147,10 +143,7 @@ TEST_F(BluetoothAudioHalVersionTest, versionOperatorGreaterOrEqual) {
BluetoothAudioHalVersion::VERSION_AIDL_V4);
}
TEST_F_WITH_FLAGS(
BluetoothAudioHalVersionTest, HIDL_VERSION_2_0,
REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(com::android::bluetooth::flags,
audio_hal_version_class))) {
TEST_F(BluetoothAudioHalVersionTest, HIDL_VERSION_2_0) {
EXPECT_EQ(BluetoothAudioHalVersion::VERSION_2_0,
BluetoothAudioHalVersion(BluetoothAudioHalTransport::HIDL, 2, 0));
......@@ -167,10 +160,7 @@ TEST_F_WITH_FLAGS(
"minor: 0") != std::string::npos);
}
TEST_F_WITH_FLAGS(
BluetoothAudioHalVersionTest, HIDL_VERSION_2_1,
REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(com::android::bluetooth::flags,
audio_hal_version_class))) {
TEST_F(BluetoothAudioHalVersionTest, HIDL_VERSION_2_1) {
EXPECT_EQ(BluetoothAudioHalVersion::VERSION_2_1,
BluetoothAudioHalVersion(BluetoothAudioHalTransport::HIDL, 2, 1));
......@@ -187,10 +177,7 @@ TEST_F_WITH_FLAGS(
"minor: 1") != std::string::npos);
}
TEST_F_WITH_FLAGS(
BluetoothAudioHalVersionTest, AIDL_VERSIONS_V1,
REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(com::android::bluetooth::flags,
audio_hal_version_class))) {
TEST_F(BluetoothAudioHalVersionTest, AIDL_VERSIONS_V1) {
EXPECT_EQ(BluetoothAudioHalVersion::VERSION_AIDL_V1,
BluetoothAudioHalVersion(BluetoothAudioHalTransport::AIDL, 1, 0));
......@@ -207,7 +194,7 @@ TEST_F_WITH_FLAGS(
"minor: 0") != std::string::npos);
}
TEST_F_WITH_FLAGS(BluetoothAudioHalVersionTest, AIDL_VERSIONS_V2) {
TEST_F(BluetoothAudioHalVersionTest, AIDL_VERSIONS_V2) {
EXPECT_EQ(BluetoothAudioHalVersion::VERSION_AIDL_V2,
BluetoothAudioHalVersion(BluetoothAudioHalTransport::AIDL, 2, 0));
......@@ -224,10 +211,7 @@ TEST_F_WITH_FLAGS(BluetoothAudioHalVersionTest, AIDL_VERSIONS_V2) {
"minor: 0") != std::string::npos);
}
TEST_F_WITH_FLAGS(
BluetoothAudioHalVersionTest, AIDL_VERSIONS_V3,
REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(com::android::bluetooth::flags,
audio_hal_version_class))) {
TEST_F(BluetoothAudioHalVersionTest, AIDL_VERSIONS_V3) {
EXPECT_EQ(BluetoothAudioHalVersion::VERSION_AIDL_V3,
BluetoothAudioHalVersion(BluetoothAudioHalTransport::AIDL, 3, 0));
......@@ -244,10 +228,7 @@ TEST_F_WITH_FLAGS(
"minor: 0") != std::string::npos);
}
TEST_F_WITH_FLAGS(
BluetoothAudioHalVersionTest, AIDL_VERSIONS_V4,
REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(com::android::bluetooth::flags,
audio_hal_version_class))) {
TEST_F(BluetoothAudioHalVersionTest, AIDL_VERSIONS_V4) {
EXPECT_EQ(BluetoothAudioHalVersion::VERSION_AIDL_V4,
BluetoothAudioHalVersion(BluetoothAudioHalTransport::AIDL, 4, 0));
......@@ -268,10 +249,7 @@ TEST_F_WITH_FLAGS(
* An example of future AIDL version (next one will be V5), we check that next
* AIDL version will be larger than existing AIDL versions
*/
TEST_F_WITH_FLAGS(
BluetoothAudioHalVersionTest, AIDL_VERSIONS_Vx,
REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(com::android::bluetooth::flags,
audio_hal_version_class))) {
TEST_F(BluetoothAudioHalVersionTest, AIDL_VERSIONS_Vx) {
EXPECT_TRUE(BluetoothAudioHalVersion(BluetoothAudioHalTransport::AIDL, 5, 0) >
BluetoothAudioHalVersion::VERSION_AIDL_V4);
EXPECT_FALSE(BluetoothAudioHalVersion(BluetoothAudioHalTransport::AIDL, 5, 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment