From 0dbb356050d0db9e0043dd43045c1864a933332b Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Thu, 2 Aug 2012 16:36:50 -0700 Subject: Simplify AudioFlinger::PlaybackThread::isValidSyncEvent() Change-Id: I3e4af69b929d4ca04afaac26c7e41c89fce25b9c --- services/audioflinger/AudioFlinger.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'services') diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 8bbfa7a..a312e48 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -2189,13 +2189,7 @@ status_t AudioFlinger::PlaybackThread::setSyncEvent(const sp& event) bool AudioFlinger::PlaybackThread::isValidSyncEvent(const sp& event) { - switch (event->type()) { - case AudioSystem::SYNC_EVENT_PRESENTATION_COMPLETE: - return true; - default: - break; - } - return false; + return event->type() == AudioSystem::SYNC_EVENT_PRESENTATION_COMPLETE; } void AudioFlinger::PlaybackThread::threadLoop_removeTracks(const Vector< sp >& tracksToRemove) -- cgit v1.1