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

Commit 69ea3edb authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Gerrit Code Review
Browse files

Merge "audio: optimize variable assignment method to reduce resource consumption" into main

parents bb5fe023 9478094d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7146,7 +7146,6 @@ DeviceVector AudioPolicyManager::getNewOutputDevices(const sp<SwAudioOutputDescr

    for (const auto &productStrategy : mEngine->getOrderedProductStrategies()) {
        StreamTypeVector streams = mEngine->getStreamTypesForProductStrategy(productStrategy);
        auto attr = mEngine->getAllAttributesForProductStrategy(productStrategy).front();
        auto hasStreamActive = [&](auto stream) {
            return hasStream(streams, stream) && isStreamActive(stream, 0);
        };
@@ -7171,6 +7170,7 @@ DeviceVector AudioPolicyManager::getNewOutputDevices(const sp<SwAudioOutputDescr
                mOutputs.isStrategyActiveOnSameModule(productStrategy, outputDesc))) {
            // Retrieval of devices for voice DL is done on primary output profile, cannot
            // check the route (would force modifying configuration file for this profile)
            auto attr = mEngine->getAllAttributesForProductStrategy(productStrategy).front();
            devices = mEngine->getOutputDevicesForAttributes(attr, nullptr, fromCache);
            break;
        }