summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-04-22 18:26:43 -0700
committerSteve Kondik <steve@cyngn.com>2016-04-22 21:46:57 -0700
commit244deea89aaf3c5dfa8bd369a845276ae501cb5a (patch)
tree956a42c556f316d0ae3fe6678fec847700b97d4f /services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
parentc27a16c33c78a36482336a16199b1b8be794cea4 (diff)
downloadframeworks_av-244deea89aaf3c5dfa8bd369a845276ae501cb5a.zip
frameworks_av-244deea89aaf3c5dfa8bd369a845276ae501cb5a.tar.gz
frameworks_av-244deea89aaf3c5dfa8bd369a845276ae501cb5a.tar.bz2
audiopolicy: Revert all session callback patches.
* This has been rearchitected in a better way, as this feature turns out to be more difficult than it seems. * Reverting all of this stuff and rolling it into a single commit. This reverts commit c27a16c33c78a36482336a16199b1b8be794cea4. This reverts commit 32ef0556ae58ff6b7c6fe6fb0a17d3ff7f01de31. This reverts commit 489c9fb62f02e1d23d6d6c89b22f7d19c596e65e. This reverts commit a4123803d0a0e9e0c69faa4207d357cc74a65d58. This reverts commit e13b58b988ab642d4ae5ca6d0a89013510714956. This reverts commit 47f8c7303c9e2054f1492b02b6c7472385c52dc9. This reverts commit 0479d7c79a7fd6f112e8dc7e45c009cf6602dbaa. Change-Id: Iaed9f198d806aa414c95960713e8187c98db248b
Diffstat (limited to 'services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp')
-rw-r--r--services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp32
1 files changed, 9 insertions, 23 deletions
diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
index 54b1982..c0d3866 100644
--- a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
+++ b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
@@ -18,7 +18,6 @@
//#define LOG_NDEBUG 0
#include <utils/Log.h>
-#include <media/AudioPolicyHelper.h>
#include "AudioPolicyService.h"
#include "ServiceUtilities.h"
@@ -163,29 +162,18 @@ status_t AudioPolicyService::getOutputForAttr(const audio_attributes_t *attr,
return NO_INIT;
}
ALOGV("getOutput()");
- status_t status;
- sp<AudioPolicyEffects> audioPolicyEffects;
- {
- Mutex::Autolock _l(mLock);
+ Mutex::Autolock _l(mLock);
- // if the caller is us, trust the specified uid
- if (IPCThreadState::self()->getCallingPid() != getpid_cached || uid == (uid_t)-1) {
- uid_t newclientUid = IPCThreadState::self()->getCallingUid();
- if (uid != (uid_t)-1 && uid != newclientUid) {
- ALOGW("%s uid %d tried to pass itself off as %d", __FUNCTION__, newclientUid, uid);
- }
- uid = newclientUid;
+ // if the caller is us, trust the specified uid
+ if (IPCThreadState::self()->getCallingPid() != getpid_cached || uid == (uid_t)-1) {
+ uid_t newclientUid = IPCThreadState::self()->getCallingUid();
+ if (uid != (uid_t)-1 && uid != newclientUid) {
+ ALOGW("%s uid %d tried to pass itself off as %d", __FUNCTION__, newclientUid, uid);
}
- status = mAudioPolicyManager->getOutputForAttr(attr, output, session, stream, uid, samplingRate,
- format, channelMask, flags, selectedDeviceId, offloadInfo);
- audioPolicyEffects = mAudioPolicyEffects;
- }
-
- if (audioPolicyEffects != 0) {
- audioPolicyEffects->doAddOutputSessionEffects(*output, *stream, session, flags, channelMask, uid);
+ uid = newclientUid;
}
-
- return status;
+ return mAudioPolicyManager->getOutputForAttr(attr, output, session, stream, uid, samplingRate,
+ format, channelMask, flags, selectedDeviceId, offloadInfo);
}
status_t AudioPolicyService::startOutput(audio_io_handle_t output,
@@ -282,8 +270,6 @@ void AudioPolicyService::doReleaseOutput(audio_io_handle_t output,
{
ALOGV("doReleaseOutput from tid %d", gettid());
Mutex::Autolock _l(mLock);
- onOutputSessionEffectsUpdate(stream, session,
- AUDIO_OUTPUT_FLAG_NONE, 0, -1, false);
mAudioPolicyManager->releaseOutput(output, stream, session);
}