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

Commit 31967c23 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "audio policy: fix dynamic policy remote submix device removal"

parents c9eb07f8 3afa9b1b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -398,6 +398,13 @@ void HwModuleCollection::cleanUpForDevice(const sp<DeviceDescriptor> &device)
        if (!moduleDevices.contains(device)) {
            continue;
        }

        // removal of remote submix devices associated with a dynamic policy is
        // handled by removeOutputProfile() and removeInputProfile()
        if (audio_is_remote_submix_device(device->type()) && device->address() != "0") {
            continue;
        }

        device->detach();
        // Only remove from dynamic list, not from declared list!!!
        if (!hwModule->getDynamicDevices().contains(device)) {