diff options
author | Glenn Kasten <gkasten@google.com> | 2014-01-08 09:10:43 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-01-09 15:27:09 -0800 |
commit | efa6ea97022780b68e595e5326e30dbe2a799202 (patch) | |
tree | 72c95e364d998d95a26aa5b3812e0cb57d48b07f /media/libmedia/AudioSystem.cpp | |
parent | 4d973f3894a50413f21e7db284e96afc87f57698 (diff) | |
download | frameworks_av-efa6ea97022780b68e595e5326e30dbe2a799202.zip frameworks_av-efa6ea97022780b68e595e5326e30dbe2a799202.tar.gz frameworks_av-efa6ea97022780b68e595e5326e30dbe2a799202.tar.bz2 |
Fix error handling in AudioSystem::getOutputForEffect
and AudioPolicyService::getOutputForEffect.
The conventional error value for audio_io_handle_t is 0,
not a status_t cast to audio_io_handle_t.
Change-Id: I34b3fd1a50f3fa1cbf39f32eea1911112a4e094a
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 9a76111..cf7dfef 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -719,7 +719,8 @@ audio_devices_t AudioSystem::getDevicesForStream(audio_stream_type_t stream) audio_io_handle_t AudioSystem::getOutputForEffect(const effect_descriptor_t *desc) { const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); - if (aps == 0) return PERMISSION_DENIED; + // FIXME change return type to status_t, and return PERMISSION_DENIED here + if (aps == 0) return 0; return aps->getOutputForEffect(desc); } |