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

Commit 515078d2 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

AudioService: BLE events clears routing+volume cache

In AudioDeviceInventory, BLE device connection/disconnection
was calling directly into AudioSystem, instead of the adapter
that handles volume and routing caching.

Bug: 350038911
Flag: EXEMPT bugfix
Test: adb shell dumpsys audio, check routing cache dump after BLE connection
Change-Id: I2a2d5c5232dcf1a7076b17b0ee08c715f43a7888
parent 0ea38e6b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2528,7 +2528,7 @@ public class AudioDeviceInventory {
            mDeviceBroker.setBluetoothA2dpOnInt(true, false /*fromA2dp*/, eventSource);

            AudioDeviceAttributes ada = new AudioDeviceAttributes(device, address, name);
            final int res = AudioSystem.setDeviceConnectionState(ada,
            final int res = mAudioSystem.setDeviceConnectionState(ada,
                    AudioSystem.DEVICE_STATE_AVAILABLE, codec);
            if (res != AudioSystem.AUDIO_STATUS_OK) {
                AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent(
@@ -2575,7 +2575,7 @@ public class AudioDeviceInventory {
        AudioDeviceAttributes ada = null;
        if (device != AudioSystem.DEVICE_NONE) {
            ada = new AudioDeviceAttributes(device, address);
            final int res = AudioSystem.setDeviceConnectionState(ada,
            final int res = mAudioSystem.setDeviceConnectionState(ada,
                    AudioSystem.DEVICE_STATE_UNAVAILABLE,
                    codec);