summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flags/a2dp.aconfig8
-rw-r--r--framework/api/current.txt20
-rw-r--r--framework/api/system-current.txt4
-rw-r--r--framework/java/android/bluetooth/BluetoothA2dp.java4
-rw-r--r--framework/java/android/bluetooth/BluetoothCodecConfig.java5
-rw-r--r--framework/java/android/bluetooth/BluetoothCodecType.java9
-rw-r--r--system/audio_hal_interface/aidl/a2dp_provider_info.cc7
-rw-r--r--system/audio_hal_interface/aidl/a2dp_provider_info_unittest.cc94
-rw-r--r--system/audio_hal_interface/aidl/client_interface_aidl.cc4
-rw-r--r--system/btif/src/btif_a2dp_source.cc4
-rw-r--r--system/gd/hci/controller.cc34
-rw-r--r--system/gd/hci/controller_test.cc6
12 files changed, 53 insertions, 146 deletions
diff --git a/flags/a2dp.aconfig b/flags/a2dp.aconfig
index b517801a3d..195573beea 100644
--- a/flags/a2dp.aconfig
+++ b/flags/a2dp.aconfig
@@ -2,14 +2,6 @@ package: "com.android.bluetooth.flags"
container: "com.android.btservices"
flag {
- name: "a2dp_offload_codec_extensibility"
- is_exported: true
- namespace: "bluetooth"
- description: "Enable a2dp offload codec extensibility"
- bug: "308686081"
-}
-
-flag {
name: "a2dp_service_looper"
namespace: "bluetooth"
description: "Inject looper into A2dpService"
diff --git a/framework/api/current.txt b/framework/api/current.txt
index b2f3b84073..a35e8cd47a 100644
--- a/framework/api/current.txt
+++ b/framework/api/current.txt
@@ -6,7 +6,7 @@ package android.bluetooth {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
- method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public java.util.Collection<android.bluetooth.BluetoothCodecType> getSupportedCodecTypes();
+ method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public java.util.Collection<android.bluetooth.BluetoothCodecType> getSupportedCodecTypes();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isA2dpPlaying(android.bluetooth.BluetoothDevice);
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_PLAYING_STATE_CHANGED = "android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED";
@@ -431,7 +431,7 @@ package android.bluetooth {
method public long getCodecSpecific3();
method public long getCodecSpecific4();
method @Deprecated public int getCodecType();
- method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @Nullable public android.bluetooth.BluetoothCodecType getExtendedCodecType();
+ method @Nullable public android.bluetooth.BluetoothCodecType getExtendedCodecType();
method public int getSampleRate();
method public boolean isMandatoryCodec();
method public void writeToParcel(android.os.Parcel, int);
@@ -474,7 +474,7 @@ package android.bluetooth {
method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setCodecSpecific3(long);
method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setCodecSpecific4(long);
method @Deprecated @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setCodecType(int);
- method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setExtendedCodecType(@Nullable android.bluetooth.BluetoothCodecType);
+ method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setExtendedCodecType(@Nullable android.bluetooth.BluetoothCodecType);
method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setSampleRate(int);
}
@@ -497,19 +497,19 @@ package android.bluetooth {
method @NonNull public android.bluetooth.BluetoothCodecStatus.Builder setCodecsSelectableCapabilities(@NonNull java.util.List<android.bluetooth.BluetoothCodecConfig>);
}
- @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public final class BluetoothCodecType implements android.os.Parcelable {
- method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public int describeContents();
- method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public long getCodecId();
- method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @NonNull public String getCodecName();
- method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public boolean isMandatoryCodec();
- method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public void writeToParcel(@NonNull android.os.Parcel, int);
+ public final class BluetoothCodecType implements android.os.Parcelable {
+ method public int describeContents();
+ method public long getCodecId();
+ method @NonNull public String getCodecName();
+ method public boolean isMandatoryCodec();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
field public static final long CODEC_ID_AAC = 2L; // 0x2L
field public static final long CODEC_ID_APTX = 16797695L; // 0x1004fffL
field public static final long CODEC_ID_APTX_HD = 604035071L; // 0x2400d7ffL
field public static final long CODEC_ID_LDAC = -1442763265L; // 0xffffffffaa012dffL
field public static final long CODEC_ID_OPUS = 16834815L; // 0x100e0ffL
field public static final long CODEC_ID_SBC = 0L; // 0x0L
- field @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothCodecType> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothCodecType> CREATOR;
}
public final class BluetoothCsipSetCoordinator implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile {
diff --git a/framework/api/system-current.txt b/framework/api/system-current.txt
index e9b58e4f2e..d6249e49a8 100644
--- a/framework/api/system-current.txt
+++ b/framework/api/system-current.txt
@@ -161,9 +161,9 @@ package android.bluetooth {
field public static final int PROFILE_PANU = 4; // 0x4
}
- @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public final class BluetoothCodecType implements android.os.Parcelable {
+ public final class BluetoothCodecType implements android.os.Parcelable {
ctor public BluetoothCodecType(int, long, @NonNull String);
- method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @Nullable public static android.bluetooth.BluetoothCodecType createFromType(int);
+ method @Nullable public static android.bluetooth.BluetoothCodecType createFromType(int);
}
public final class BluetoothCsipSetCoordinator implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile {
diff --git a/framework/java/android/bluetooth/BluetoothA2dp.java b/framework/java/android/bluetooth/BluetoothA2dp.java
index e97a11e1f6..ea93c31432 100644
--- a/framework/java/android/bluetooth/BluetoothA2dp.java
+++ b/framework/java/android/bluetooth/BluetoothA2dp.java
@@ -19,7 +19,6 @@ package android.bluetooth;
import static android.Manifest.permission.BLUETOOTH_CONNECT;
import static android.Manifest.permission.BLUETOOTH_PRIVILEGED;
-import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -41,8 +40,6 @@ import android.os.ParcelUuid;
import android.os.RemoteException;
import android.util.Log;
-import com.android.bluetooth.flags.Flags;
-
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Collection;
@@ -708,7 +705,6 @@ public final class BluetoothA2dp implements BluetoothProfile {
@NonNull
@RequiresLegacyBluetoothPermission
@RequiresPermission(BLUETOOTH_PRIVILEGED)
- @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public Collection<BluetoothCodecType> getSupportedCodecTypes() {
Log.d(TAG, "getSupportedSourceCodecTypes()");
final IBluetoothA2dp service = getService();
diff --git a/framework/java/android/bluetooth/BluetoothCodecConfig.java b/framework/java/android/bluetooth/BluetoothCodecConfig.java
index a90b2ca81f..8e9ed78ef1 100644
--- a/framework/java/android/bluetooth/BluetoothCodecConfig.java
+++ b/framework/java/android/bluetooth/BluetoothCodecConfig.java
@@ -18,7 +18,6 @@ package android.bluetooth;
import static android.bluetooth.BluetoothUtils.formatSimple;
-import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -27,8 +26,6 @@ import android.compat.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
-import com.android.bluetooth.flags.Flags;
-
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Objects;
@@ -551,7 +548,6 @@ public final class BluetoothCodecConfig implements Parcelable {
}
/** Returns the source codec type of this config. */
- @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public @Nullable BluetoothCodecType getExtendedCodecType() {
return mCodecType;
}
@@ -861,7 +857,6 @@ public final class BluetoothCodecConfig implements Parcelable {
* @param codecType of this codec
* @return the same Builder instance
*/
- @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public @NonNull Builder setExtendedCodecType(@Nullable BluetoothCodecType codecType) {
mCodecType = codecType;
return this;
diff --git a/framework/java/android/bluetooth/BluetoothCodecType.java b/framework/java/android/bluetooth/BluetoothCodecType.java
index e1383f8c39..bcac9c5c41 100644
--- a/framework/java/android/bluetooth/BluetoothCodecType.java
+++ b/framework/java/android/bluetooth/BluetoothCodecType.java
@@ -16,7 +16,6 @@
package android.bluetooth;
-import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
@@ -30,7 +29,6 @@ import com.android.bluetooth.flags.Flags;
* BluetoothA2dp#getSupportedCodecTypes}. The codec type is uniquely identified by its name and
* codec identifier.
*/
-@FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public final class BluetoothCodecType implements Parcelable {
private final int mNativeCodecType;
private final long mCodecId;
@@ -100,7 +98,6 @@ public final class BluetoothCodecType implements Parcelable {
}
/** Returns if the codec type is mandatory in the Bluetooth specification. */
- @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public boolean isMandatoryCodec() {
return mNativeCodecType == BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC;
}
@@ -121,13 +118,11 @@ public final class BluetoothCodecType implements Parcelable {
* <li>Bits 24-39: Vendor-defined codec ID, set to 0, if octet 0 is not 0xFF.
* </ul>
*/
- @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public long getCodecId() {
return mCodecId;
}
/** Returns the codec name. */
- @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public @NonNull String getCodecName() {
return mCodecName;
}
@@ -168,7 +163,6 @@ public final class BluetoothCodecType implements Parcelable {
/** @hide */
@Override
- @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public void writeToParcel(@NonNull Parcel dest, int flags) {
dest.writeInt(mNativeCodecType);
dest.writeLong(mCodecId);
@@ -183,7 +177,6 @@ public final class BluetoothCodecType implements Parcelable {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public static @Nullable BluetoothCodecType createFromType(
@BluetoothCodecConfig.SourceCodecType int codecType) {
long codecId =
@@ -210,12 +203,10 @@ public final class BluetoothCodecType implements Parcelable {
* @hide
*/
@Override
- @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public int describeContents() {
return 0;
}
- @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
public static final @NonNull Creator<BluetoothCodecType> CREATOR =
new Creator<>() {
public BluetoothCodecType createFromParcel(Parcel in) {
diff --git a/system/audio_hal_interface/aidl/a2dp_provider_info.cc b/system/audio_hal_interface/aidl/a2dp_provider_info.cc
index 62dd675747..9f4c86b2cf 100644
--- a/system/audio_hal_interface/aidl/a2dp_provider_info.cc
+++ b/system/audio_hal_interface/aidl/a2dp_provider_info.cc
@@ -50,13 +50,6 @@ using ::aidl::android::hardware::bluetooth::audio::SessionType;
* extensibility is disabled.
***/
std::unique_ptr<ProviderInfo> ProviderInfo::GetProviderInfo(bool supports_a2dp_hw_offload_v2) {
- if (!com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) {
- log::info(
- "a2dp offload codec extensibility is disabled,"
- " not going to load the ProviderInfo");
- return nullptr;
- }
-
if (!supports_a2dp_hw_offload_v2) {
log::info(
"a2dp hw offload v2 is not supported by the controller,"
diff --git a/system/audio_hal_interface/aidl/a2dp_provider_info_unittest.cc b/system/audio_hal_interface/aidl/a2dp_provider_info_unittest.cc
index f91637af98..8b1e04b235 100644
--- a/system/audio_hal_interface/aidl/a2dp_provider_info_unittest.cc
+++ b/system/audio_hal_interface/aidl/a2dp_provider_info_unittest.cc
@@ -215,32 +215,13 @@ protected:
};
} // namespace
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetProviderInfoFlagDisabled,
- REQUIRES_FLAGS_DISABLED(ACONFIG_FLAG(TEST_BT,
- a2dp_offload_codec_extensibility))) {
- EXPECT_CALL(client_itf_mock,
- GetProviderInfo(SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH, _))
- .Times(0);
- EXPECT_CALL(client_itf_mock,
- GetProviderInfo(SessionType::A2DP_HARDWARE_OFFLOAD_DECODING_DATAPATH, _))
- .Times(0);
-
- provider_info = ProviderInfo::GetProviderInfo(true);
- ASSERT_EQ(provider_info, nullptr);
-}
-
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetProviderInfoEmptyProviderInfo,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestGetProviderInfoEmptyProviderInfo) {
GetProviderInfoForTesting(false, false);
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetProviderInfo,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
- GetProviderInfoForTesting(true, false);
-}
+TEST_F(ProviderInfoTest, TestGetProviderInfo) { GetProviderInfoForTesting(true, false); }
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetCodecSbc,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestGetCodecSbc) {
GetProviderInfoForTesting(true, false);
auto received_codec_info_sbc = provider_info->GetCodec(BTAV_A2DP_CODEC_INDEX_SOURCE_SBC);
@@ -251,8 +232,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetCodecSbc,
ASSERT_EQ(*codec_info, test_source_provider_info.codecInfos[0]);
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetCodecAac,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestGetCodecAac) {
GetProviderInfoForTesting(true, false);
auto received_codec_info_aac = provider_info->GetCodec(BTAV_A2DP_CODEC_INDEX_SOURCE_AAC);
@@ -263,8 +243,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetCodecAac,
ASSERT_EQ(*codec_info, test_source_provider_info.codecInfos[1]);
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetCodecOpus,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestGetCodecOpus) {
GetProviderInfoForTesting(true, false);
auto received_codec_info_opus = provider_info->GetCodec(BTAV_A2DP_CODEC_INDEX_SOURCE_OPUS);
@@ -275,8 +254,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetCodecOpus,
ASSERT_EQ(*codec_info, test_source_provider_info.codecInfos[2]);
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetCodecFoobar,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestGetCodecFoobar) {
GetProviderInfoForTesting(true, false);
auto received_codec_info_foobar = provider_info->GetCodec(BTAV_A2DP_CODEC_INDEX_SOURCE_EXT_MIN);
@@ -287,8 +265,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetCodecFoobar,
ASSERT_EQ(*codec_info, test_source_provider_info.codecInfos[3]);
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetCodecNotSupported,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestGetCodecNotSupported) {
GetProviderInfoForTesting(true, false);
auto received_codec_info_not_supported_codec =
@@ -296,8 +273,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestGetCodecNotSupported,
ASSERT_FALSE(received_codec_info_not_supported_codec.has_value());
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestSourceCodecIndexByCodecId,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestSourceCodecIndexByCodecId) {
GetProviderInfoForTesting(true, false);
std::optional<btav_a2dp_codec_index_t> a2dp_codec_index_opt;
@@ -323,8 +299,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestSourceCodecIndexByCodecId,
ASSERT_FALSE(a2dp_codec_index_opt.has_value());
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestSourceCodecIndexByVendorAndCodecId,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestSourceCodecIndexByVendorAndCodecId) {
GetProviderInfoForTesting(true, false);
std::optional<btav_a2dp_codec_index_t> a2dp_codec_index_opt;
@@ -342,8 +317,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestSourceCodecIndexByVendorAndCodecId,
ASSERT_FALSE(a2dp_codec_index_opt.has_value());
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestSourceCodecIndexByCapabilities,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestSourceCodecIndexByCapabilities) {
GetProviderInfoForTesting(true, false);
std::optional<btav_a2dp_codec_index_t> a2dp_codec_index_opt;
@@ -369,8 +343,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestSourceCodecIndexByCapabilities,
ASSERT_FALSE(a2dp_codec_index_opt.has_value());
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestSourceCodecIndexByCodecIdAssertNoSources,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestSourceCodecIndexByCodecIdAssertNoSources) {
GetProviderInfoForTesting(false, true);
std::optional<btav_a2dp_codec_index_t> a2dp_codec_index_opt;
@@ -392,8 +365,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestSourceCodecIndexByCodecIdAssertNoSources
ASSERT_FALSE(a2dp_codec_index_opt.has_value());
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestSourceCodecIndexByVendorAndCodecIdAssertNoSources,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestSourceCodecIndexByVendorAndCodecIdAssertNoSources) {
GetProviderInfoForTesting(false, true);
std::optional<btav_a2dp_codec_index_t> a2dp_codec_index_opt;
@@ -419,8 +391,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestSourceCodecIndexByVendorAndCodecIdAssert
ASSERT_FALSE(a2dp_codec_index_opt.has_value());
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestSinkCodecIndexByCodecId,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestSinkCodecIndexByCodecId) {
GetProviderInfoForTesting(false, true);
std::optional<btav_a2dp_codec_index_t> a2dp_codec_index_opt;
@@ -446,8 +417,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestSinkCodecIndexByCodecId,
ASSERT_FALSE(a2dp_codec_index_opt.has_value());
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestSinkCodecIndexByVendorAndCodecId,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestSinkCodecIndexByVendorAndCodecId) {
GetProviderInfoForTesting(false, true);
std::optional<btav_a2dp_codec_index_t> a2dp_codec_index_opt;
@@ -467,8 +437,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestSinkCodecIndexByVendorAndCodecId,
ASSERT_FALSE(a2dp_codec_index_opt.has_value());
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestSinkCodecIndexByVendorAndCodecIdAssertNoSinks,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestSinkCodecIndexByVendorAndCodecIdAssertNoSinks) {
GetProviderInfoForTesting(true, false);
std::optional<btav_a2dp_codec_index_t> a2dp_codec_index_opt;
@@ -495,8 +464,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestSinkCodecIndexByVendorAndCodecIdAssertNo
ASSERT_FALSE(a2dp_codec_index_opt.has_value());
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestCodecIndexStr,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestCodecIndexStr) {
GetProviderInfoForTesting(true, false);
auto codecInfoArray = test_source_provider_info.codecInfos;
@@ -512,8 +480,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestCodecIndexStr,
codecInfoArray[3].name);
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestSupportsCodec,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestSupportsCodec) {
GetProviderInfoForTesting(true, true);
for (int i = static_cast<int>(BTAV_A2DP_CODEC_INDEX_SOURCE_MIN);
@@ -536,8 +503,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestSupportsCodec,
}
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestBuildCodecCapabilitiesSbc,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestBuildCodecCapabilitiesSbc) {
GetProviderInfoForTesting(true, false);
std::vector<uint8_t> sbc_caps = {0x3f, 0xff, 0x02, 0x25};
@@ -550,8 +516,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestBuildCodecCapabilitiesSbc,
0);
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestBuildCodecCapabilitiesAac,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestBuildCodecCapabilitiesAac) {
GetProviderInfoForTesting(true, false);
std::vector<uint8_t> aac_caps = {0x80, 0x01, 0x8c, 0x83, 0xe8, 0x00};
uint8_t result_aac_codec_info[9];
@@ -563,8 +528,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestBuildCodecCapabilitiesAac,
0);
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestBuildCodecCapabilitiesOpus,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestBuildCodecCapabilitiesOpus) {
std::vector<uint8_t> opus_caps = {0x3c};
uint8_t result_opus_codec_info[10];
@@ -575,8 +539,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestBuildCodecCapabilitiesOpus,
0);
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestBuildCodecCapabilitiesFoobar,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestBuildCodecCapabilitiesFoobar) {
std::vector<uint8_t> foobar_caps = {0x3c};
uint8_t result_foobar_codec_info[10];
@@ -587,8 +550,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestBuildCodecCapabilitiesFoobar,
0);
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestBuildCodecCapabilitiesNotSupported,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestBuildCodecCapabilitiesNotSupported) {
std::vector<uint8_t> foobar_caps = {0x3c};
uint8_t result_foobar_codec_info[10];
@@ -596,8 +558,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestBuildCodecCapabilitiesNotSupported,
result_foobar_codec_info));
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestCodecCapabilitiesSbc,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestCodecCapabilitiesSbc) {
GetProviderInfoForTesting(true, false);
uint8_t result_codec_info[20];
@@ -618,8 +579,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestCodecCapabilitiesSbc,
BTAV_A2DP_CODEC_BITS_PER_SAMPLE_32));
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestCodecCapabilitiesAac,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestCodecCapabilitiesAac) {
GetProviderInfoForTesting(true, false);
uint8_t result_codec_info[20];
@@ -640,8 +600,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestCodecCapabilitiesAac,
BTAV_A2DP_CODEC_BITS_PER_SAMPLE_32));
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestCodecCapabilitiesOpus,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestCodecCapabilitiesOpus) {
GetProviderInfoForTesting(true, false);
uint8_t result_codec_info[20];
@@ -663,8 +622,7 @@ TEST_F_WITH_FLAGS(ProviderInfoTest, TestCodecCapabilitiesOpus,
BTAV_A2DP_CODEC_BITS_PER_SAMPLE_32));
}
-TEST_F_WITH_FLAGS(ProviderInfoTest, TestCodecCapabilitiesFoobar,
- REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(TEST_BT, a2dp_offload_codec_extensibility))) {
+TEST_F(ProviderInfoTest, TestCodecCapabilitiesFoobar) {
GetProviderInfoForTesting(true, false);
uint8_t result_codec_info[20];
diff --git a/system/audio_hal_interface/aidl/client_interface_aidl.cc b/system/audio_hal_interface/aidl/client_interface_aidl.cc
index 8221057066..15a20be5b9 100644
--- a/system/audio_hal_interface/aidl/client_interface_aidl.cc
+++ b/system/audio_hal_interface/aidl/client_interface_aidl.cc
@@ -102,7 +102,7 @@ std::optional<IBluetoothAudioProviderFactory::ProviderInfo>
BluetoothAudioClientInterface::GetProviderInfo(
SessionType session_type,
std::shared_ptr<IBluetoothAudioProviderFactory> provider_factory) {
- if (!is_aidl_available() || !com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) {
+ if (!is_aidl_available()) {
return std::nullopt;
}
@@ -130,7 +130,7 @@ BluetoothAudioClientInterface::GetProviderInfo(
std::optional<A2dpConfiguration> BluetoothAudioClientInterface::GetA2dpConfiguration(
std::vector<A2dpRemoteCapabilities> const& remote_capabilities,
A2dpConfigurationHint const& hint) const {
- if (!is_aidl_available() || !com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) {
+ if (!is_aidl_available()) {
return std::nullopt;
}
diff --git a/system/btif/src/btif_a2dp_source.cc b/system/btif/src/btif_a2dp_source.cc
index 34184f61f4..38f553472d 100644
--- a/system/btif/src/btif_a2dp_source.cc
+++ b/system/btif/src/btif_a2dp_source.cc
@@ -324,9 +324,7 @@ static void btif_a2dp_source_init_delayed(void) {
// the provider needs to be initialized earlier in order to ensure
// get_a2dp_configuration and parse_a2dp_configuration can be
// invoked before the stream is started.
- if (com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) {
- bluetooth::audio::a2dp::init(&btif_a2dp_source_thread);
- }
+ bluetooth::audio::a2dp::init(&btif_a2dp_source_thread);
}
bool btif_a2dp_source_startup(void) {
diff --git a/system/gd/hci/controller.cc b/system/gd/hci/controller.cc
index 523a20bbca..4f079eeff8 100644
--- a/system/gd/hci/controller.cc
+++ b/system/gd/hci/controller.cc
@@ -679,36 +679,24 @@ struct Controller::impl {
}
vendor_capabilities_.dynamic_audio_buffer_support_ = v103.GetDynamicAudioBufferSupport();
- if (com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) {
- // v1.04
- auto v104 = LeGetVendorCapabilitiesComplete104View::Create(v103);
- if (!v104.IsValid()) {
- log::info("invalid data for hci requirements v1.04");
- } else {
- vendor_capabilities_.a2dp_offload_v2_support_ = v104.GetA2dpOffloadV2Support();
- }
-
- if (vendor_capabilities_.dynamic_audio_buffer_support_) {
- hci_->EnqueueCommand(
- DabGetAudioBufferTimeCapabilityBuilder::Create(),
- module_.GetHandler()->BindOnceOn(
- this, &Controller::impl::le_get_dynamic_audio_buffer_support_handler,
- std::move(vendor_promise)));
- return;
- }
-
- vendor_promise.set_value();
+ // v1.04
+ auto v104 = LeGetVendorCapabilitiesComplete104View::Create(v103);
+ if (!v104.IsValid()) {
+ log::info("invalid data for hci requirements v1.04");
} else {
- if (vendor_capabilities_.dynamic_audio_buffer_support_ == 0) {
- vendor_promise.set_value();
- return;
- }
+ vendor_capabilities_.a2dp_offload_v2_support_ = v104.GetA2dpOffloadV2Support();
+ }
+
+ if (vendor_capabilities_.dynamic_audio_buffer_support_) {
hci_->EnqueueCommand(
DabGetAudioBufferTimeCapabilityBuilder::Create(),
module_.GetHandler()->BindOnceOn(
this, &Controller::impl::le_get_dynamic_audio_buffer_support_handler,
std::move(vendor_promise)));
+ return;
}
+
+ vendor_promise.set_value();
}
void le_get_dynamic_audio_buffer_support_handler(std::promise<void> vendor_promise,
diff --git a/system/gd/hci/controller_test.cc b/system/gd/hci/controller_test.cc
index 6fd3f6becf..305c1e361f 100644
--- a/system/gd/hci/controller_test.cc
+++ b/system/gd/hci/controller_test.cc
@@ -552,11 +552,7 @@ TEST_F(Controller103Test, set_dynamic_audio_buffer_time) {
TEST_F(Controller104Test, feature_spec_version_104_test) {
ASSERT_EQ(controller_->GetVendorCapabilities().version_supported_, 0x100 + 4);
- if (com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) {
- ASSERT_TRUE(controller_->GetVendorCapabilities().a2dp_offload_v2_support_);
- } else {
- ASSERT_FALSE(controller_->GetVendorCapabilities().a2dp_offload_v2_support_);
- }
+ ASSERT_TRUE(controller_->GetVendorCapabilities().a2dp_offload_v2_support_);
ASSERT_TRUE(controller_->IsSupported(OpCode::LE_MULTI_ADVT));
ASSERT_TRUE(controller_->IsSupported(OpCode::CONTROLLER_DEBUG_INFO));
ASSERT_TRUE(controller_->IsSupported(OpCode::CONTROLLER_A2DP_OPCODE));