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

Commit ef03eef3 authored by Eric Laurent's avatar Eric Laurent
Browse files

audio flinger: fix use of local variable after std:move

Fix potential problem introduced by commit 74c38dc7

Bug: 139894721
Test: atest AudioTrackTest
Test: atest RoutingTest
Test: atest AudioPolicyManagerTestMsd
Change-Id: I2bb2cb29e872115d6448dfbeb7d957c52f56289a
parent 1ab91b43
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -435,10 +435,10 @@ exit:
        *handle = (audio_patch_handle_t) mAudioFlinger.nextUniqueId(AUDIO_UNIQUE_ID_USE_PATCH);
        *handle = (audio_patch_handle_t) mAudioFlinger.nextUniqueId(AUDIO_UNIQUE_ID_USE_PATCH);
        newPatch.mHalHandle = halHandle;
        newPatch.mHalHandle = halHandle;
        mAudioFlinger.mDeviceEffectManager.createAudioPatch(*handle, newPatch);
        mAudioFlinger.mDeviceEffectManager.createAudioPatch(*handle, newPatch);
        mPatches.insert(std::make_pair(*handle, std::move(newPatch)));
        if (insertedModule != AUDIO_MODULE_HANDLE_NONE) {
        if (insertedModule != AUDIO_MODULE_HANDLE_NONE) {
            addSoftwarePatchToInsertedModules(insertedModule, *handle, &newPatch.mAudioPatch);
            addSoftwarePatchToInsertedModules(insertedModule, *handle, &newPatch.mAudioPatch);
        }
        }
        mPatches.insert(std::make_pair(*handle, std::move(newPatch)));
    } else {
    } else {
        newPatch.clearConnections(this);
        newPatch.clearConnections(this);
    }
    }