diff --git a/services/media_monitor/server/src/media_monitor_service.cpp b/services/media_monitor/server/src/media_monitor_service.cpp index 28b4c5ff369d16f059a7e7103e330e5b9b36aaa5..f74ae284efd5efe6cedf459dde12adc4f185e4b4 100644 --- a/services/media_monitor/server/src/media_monitor_service.cpp +++ b/services/media_monitor/server/src/media_monitor_service.cpp @@ -162,6 +162,7 @@ void MediaMonitorService::AddMessageToQueue(std::shared_ptr &message) int32_t MediaMonitorService::GetAudioRouteMsg(std::map> &perferredDevices) { + FALSE_RETURN_V_MSG_E(VerifyIsAudio(), ERROR, "client permission denied"); MEDIA_LOG_D("MediaMonitorService GetAudioRouteMsg"); return audioMemo_.GetAudioRouteMsg(perferredDevices); } @@ -494,6 +495,7 @@ bool MediaMonitorService::DeleteHistoryFile(const std::string &filePath) int32_t MediaMonitorService::ErasePreferredDeviceByType(const PerferredType preferredType) { + FALSE_RETURN_V_MSG_E(VerifyIsAudio(), ERROR, "client permission denied"); MEDIA_LOG_D("ErasePreferredDeviceByType enter"); return audioMemo_.ErasePreferredDeviceByType(preferredType); }