24Q4: Removal of a2dp_offload_codec_extensibility_settings

Bug: 323319530
Fix: 323319530
Flag: EXEMPT removing com.android.settings.development.a2dp_offload_codec_extensibility_settings
Test: atest SettingsRoboTests
Change-Id: If9c710c0aaed7326b32dd2e7d5f3109de4047b97
This commit is contained in:
Jakub Rotkiewicz
2025-01-10 08:06:55 +00:00
parent 6b7a5073f0
commit 2c869d337c
13 changed files with 23 additions and 758 deletions

View File

@@ -16,11 +16,9 @@
package com.android.settings.development;
import android.annotation.FlaggedApi;
import android.bluetooth.BluetoothCodecConfig;
import android.bluetooth.BluetoothCodecType;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
/** Utility class for storing current Bluetooth A2DP profile values */
@@ -38,10 +36,6 @@ public class BluetoothA2dpConfigStore {
private long mCodecSpecific3Value;
private long mCodecSpecific4Value;
public void setCodecType(int codecType) {
mCodecTypeNative = codecType;
}
public void setCodecType(@Nullable BluetoothCodecType codecType) {
mCodecType = codecType;
}
@@ -82,6 +76,7 @@ public class BluetoothA2dpConfigStore {
public BluetoothCodecConfig createCodecConfig() {
BluetoothCodecConfig.Builder builder = new BluetoothCodecConfig.Builder()
.setCodecPriority(mCodecPriority)
.setExtendedCodecType(mCodecType)
.setSampleRate(mSampleRate)
.setBitsPerSample(mBitsPerSample)
.setChannelMode(mChannelMode)
@@ -89,27 +84,6 @@ public class BluetoothA2dpConfigStore {
.setCodecSpecific2(mCodecSpecific2Value)
.setCodecSpecific3(mCodecSpecific3Value)
.setCodecSpecific4(mCodecSpecific4Value);
if (Flags.a2dpOffloadCodecExtensibilitySettings()) {
builder.setExtendedCodecType(mCodecType);
} else {
builder.setCodecType(mCodecTypeNative);
}
return builder.build();
}
/** Create codec config utilizing {@link BluetoothCodecType} */
@FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY_SETTINGS)
public @NonNull BluetoothCodecConfig createCodecConfigFromCodecType() {
return new BluetoothCodecConfig.Builder()
.setExtendedCodecType(mCodecType)
.setCodecPriority(mCodecPriority)
.setSampleRate(mSampleRate)
.setBitsPerSample(mBitsPerSample)
.setChannelMode(mChannelMode)
.setCodecSpecific1(mCodecSpecific1Value)
.setCodecSpecific2(mCodecSpecific2Value)
.setCodecSpecific3(mCodecSpecific3Value)
.setCodecSpecific4(mCodecSpecific4Value)
.build();
}
}