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

Commit 3ade8e35 authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Automerger Merge Worker
Browse files

Merge "audio: optimize variable assignment method to reduce resource...

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

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2988129



Change-Id: Idc6fad412ce154cdbfc9064d6af29c029e55da16
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b9d5485c 69ea3edb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7193,7 +7193,6 @@ DeviceVector AudioPolicyManager::getNewOutputDevices(const sp<SwAudioOutputDescr
    DeviceVector devices;
    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);
        };
@@ -7218,6 +7217,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;
        }