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

Commit db919928 authored by Vlad Popa's avatar Vlad Popa
Browse files

Remove unnecessary spatial audio initialization

The initSADevice alters the spatial audio enabled property which should
only be called when a new device is connected. Having this in the
addCompatibleAudioDevice method will override the property selected by
the user

Test: manual & atest SpatializerHelperTest
Bug: 297341688
Merged-In: I6d2fdb5508cea8219055b07d18896ca76d0bf637
Change-Id: I6d2fdb5508cea8219055b07d18896ca76d0bf637
parent 8a55862a
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -541,7 +541,6 @@ public class SpatializerHelper {
        }
        }
        loglogi("addCompatibleAudioDevice: dev=" + ada);
        loglogi("addCompatibleAudioDevice: dev=" + ada);
        final AdiDeviceState deviceState = findDeviceStateForAudioDeviceAttributes(ada);
        final AdiDeviceState deviceState = findDeviceStateForAudioDeviceAttributes(ada);
        initSAState(deviceState);
        AdiDeviceState updatedDevice = null; // non-null on update.
        AdiDeviceState updatedDevice = null; // non-null on update.
        if (deviceState != null) {
        if (deviceState != null) {
            if (forceEnable && !deviceState.isSAEnabled()) {
            if (forceEnable && !deviceState.isSAEnabled()) {