diff options
author | Eric Laurent <elaurent@google.com> | 2015-09-24 00:22:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-09-24 00:22:57 +0000 |
commit | 45fd99a31d09f247c72f456a9d569d7326a95894 (patch) | |
tree | b06f4ce59dc97d24a1ed5f40614653f5ab95926d /services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp | |
parent | 047d97b2d046374e2a25c81a984d9cde23f5d781 (diff) | |
parent | 64265b2fb8f5be63b6c2ad4fcbec9acf74705bc4 (diff) | |
download | frameworks_av-45fd99a31d09f247c72f456a9d569d7326a95894.zip frameworks_av-45fd99a31d09f247c72f456a9d569d7326a95894.tar.gz frameworks_av-45fd99a31d09f247c72f456a9d569d7326a95894.tar.bz2 |
Merge "audio policy: fix preemtible capture race" into mnc-dr-dev
Diffstat (limited to 'services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp')
-rw-r--r-- | services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp b/services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp index 937160b..626fdae 100644 --- a/services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp +++ b/services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp @@ -93,6 +93,26 @@ void AudioInputDescriptor::toAudioPort(struct audio_port *port) const port->ext.mix.latency_class = AUDIO_LATENCY_NORMAL; } +void AudioInputDescriptor::setPreemptedSessions(const SortedVector<audio_session_t>& sessions) +{ + mPreemptedSessions = sessions; +} + +SortedVector<audio_session_t> AudioInputDescriptor::getPreemptedSessions() const +{ + return mPreemptedSessions; +} + +bool AudioInputDescriptor::hasPreemptedSession(audio_session_t session) const +{ + return (mPreemptedSessions.indexOf(session) >= 0); +} + +void AudioInputDescriptor::clearPreemptedSessions() +{ + mPreemptedSessions.clear(); +} + status_t AudioInputDescriptor::dump(int fd) { const size_t SIZE = 256; |