Simplify RecordTrack::stop()
Change-Id: Ib959c1e9dc9544d12277ce11bea445118b2e0521
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index d424e16..1df333f 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -1656,12 +1656,7 @@
sp<ThreadBase> thread = mThread.promote();
if (thread != 0) {
RecordThread *recordThread = (RecordThread *)thread.get();
- recordThread->mLock.lock();
- bool doStop = recordThread->stop_l(this);
- if (doStop) {
- }
- recordThread->mLock.unlock();
- if (doStop) {
+ if (recordThread->stop(this)) {
AudioSystem::stopInput(recordThread->id());
}
}