Update the cache of a2dp config before writing config.

The created config based on mBluetoothA2dpConfigStore is invalid, so we need to update the cache before writing config.

Bug: 3177357791
Test: manual
Change-Id: I47774f035509f0cb533209e4e31e7477d5b8e516
This commit is contained in:
alisa.li
2024-11-15 15:20:33 +08:00
committed by 李剪
parent e354820db7
commit 2eb14f53bb

View File

@@ -86,6 +86,8 @@ public abstract class AbstractBluetoothDialogPreferenceController extends
if (bluetoothA2dp == null) {
return;
}
// update the cache of a2dp config(mBluetoothA2dpConfigStore) before writing config.
initConfigStore();
writeConfigurationValues(index);
final BluetoothCodecConfig codecConfig = mBluetoothA2dpConfigStore.createCodecConfig();
BluetoothDevice activeDevice = getA2dpActiveDevice();