Merge "SoundPool: Update queue only if streamID matches" am: f0f20c17e0 am: 27383c906c am: e9b9317232 am: 713e259dd5

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1905390

Change-Id: Ib4eb5416d231200c783ff2f2b09d856b4355d7fc
This commit is contained in:
Andy Hung
2021-12-10 19:35:51 +00:00
committed by Automerger Merge Worker

View File

@@ -185,7 +185,7 @@ void SoundPool::stop(int32_t streamID)
auto apiLock = kUseApiLock ? std::make_unique<std::lock_guard<std::mutex>>(mApiLock) : nullptr;
soundpool::Stream* stream = mStreamManager.findStream(streamID);
if (stream != nullptr && stream->requestStop(streamID)) {
mStreamManager.moveToRestartQueue(stream);
mStreamManager.moveToRestartQueue(stream, streamID);
}
}