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

Commit 5c261a21 authored by Haynes Mathew George's avatar Haynes Mathew George Committed by android-build-merger
Browse files

audiopolicy: Avoid spurious routing in APM::stopSource

am: 11c499a5

Change-Id: I042716ea38ed1da72a822a0da852836deca25835
parents e08a5b5d 11c499a5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1321,9 +1321,11 @@ status_t AudioPolicyManager::stopSource(sp<AudioOutputDescriptor> outputDesc,
                        desc->isActive() &&
                        outputDesc->sharesHwModuleWith(desc) &&
                        (newDevice != desc->device())) {
                    audio_devices_t newDevice2 = getNewOutputDevice(desc, false /*fromCache*/);
                    bool force = desc->device() != newDevice2;
                    setOutputDevice(desc,
                                    getNewOutputDevice(desc, false /*fromCache*/),
                                    true,
                                    newDevice2,
                                    force,
                                    outputDesc->latency()*2);
                }
            }