Loading services/audioflinger/AudioPolicyService.cpp +19 −1 Original line number Diff line number Diff line Loading @@ -228,6 +228,9 @@ audio_io_handle_t AudioPolicyService::getOutput(audio_stream_type_t stream, audio_output_flags_t flags, const audio_offload_info_t *offloadInfo) { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return 0; } if (mpAudioPolicy == NULL) { return 0; } Loading @@ -241,6 +244,9 @@ status_t AudioPolicyService::startOutput(audio_io_handle_t output, audio_stream_type_t stream, int session) { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return BAD_VALUE; } if (mpAudioPolicy == NULL) { return NO_INIT; } Loading @@ -253,6 +259,9 @@ status_t AudioPolicyService::stopOutput(audio_io_handle_t output, audio_stream_type_t stream, int session) { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return BAD_VALUE; } if (mpAudioPolicy == NULL) { return NO_INIT; } Loading Loading @@ -451,6 +460,9 @@ status_t AudioPolicyService::getStreamVolumeIndex(audio_stream_type_t stream, uint32_t AudioPolicyService::getStrategyForStream(audio_stream_type_t stream) { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return 0; } if (mpAudioPolicy == NULL) { return 0; } Loading @@ -461,6 +473,9 @@ uint32_t AudioPolicyService::getStrategyForStream(audio_stream_type_t stream) audio_devices_t AudioPolicyService::getDevicesForStream(audio_stream_type_t stream) { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return (audio_devices_t)0; } if (mpAudioPolicy == NULL) { return (audio_devices_t)0; } Loading Loading @@ -506,8 +521,11 @@ status_t AudioPolicyService::setEffectEnabled(int id, bool enabled) bool AudioPolicyService::isStreamActive(audio_stream_type_t stream, uint32_t inPastMs) const { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return false; } if (mpAudioPolicy == NULL) { return 0; return false; } Mutex::Autolock _l(mLock); return mpAudioPolicy->is_stream_active(mpAudioPolicy, stream, inPastMs); Loading Loading
services/audioflinger/AudioPolicyService.cpp +19 −1 Original line number Diff line number Diff line Loading @@ -228,6 +228,9 @@ audio_io_handle_t AudioPolicyService::getOutput(audio_stream_type_t stream, audio_output_flags_t flags, const audio_offload_info_t *offloadInfo) { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return 0; } if (mpAudioPolicy == NULL) { return 0; } Loading @@ -241,6 +244,9 @@ status_t AudioPolicyService::startOutput(audio_io_handle_t output, audio_stream_type_t stream, int session) { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return BAD_VALUE; } if (mpAudioPolicy == NULL) { return NO_INIT; } Loading @@ -253,6 +259,9 @@ status_t AudioPolicyService::stopOutput(audio_io_handle_t output, audio_stream_type_t stream, int session) { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return BAD_VALUE; } if (mpAudioPolicy == NULL) { return NO_INIT; } Loading Loading @@ -451,6 +460,9 @@ status_t AudioPolicyService::getStreamVolumeIndex(audio_stream_type_t stream, uint32_t AudioPolicyService::getStrategyForStream(audio_stream_type_t stream) { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return 0; } if (mpAudioPolicy == NULL) { return 0; } Loading @@ -461,6 +473,9 @@ uint32_t AudioPolicyService::getStrategyForStream(audio_stream_type_t stream) audio_devices_t AudioPolicyService::getDevicesForStream(audio_stream_type_t stream) { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return (audio_devices_t)0; } if (mpAudioPolicy == NULL) { return (audio_devices_t)0; } Loading Loading @@ -506,8 +521,11 @@ status_t AudioPolicyService::setEffectEnabled(int id, bool enabled) bool AudioPolicyService::isStreamActive(audio_stream_type_t stream, uint32_t inPastMs) const { if (uint32_t(stream) >= AUDIO_STREAM_CNT) { return false; } if (mpAudioPolicy == NULL) { return 0; return false; } Mutex::Autolock _l(mLock); return mpAudioPolicy->is_stream_active(mpAudioPolicy, stream, inPastMs); Loading