diff --git a/services/session/adapter/audio_adapter.cpp b/services/session/adapter/audio_adapter.cpp index 851121b0d3d30987df8fe3062dcd0f105ac2c79f..2b5b2d95c42e1ebc50d0af1cbc33532a071ba0d2 100644 --- a/services/session/adapter/audio_adapter.cpp +++ b/services/session/adapter/audio_adapter.cpp @@ -44,12 +44,12 @@ void AudioAdapter::Init() SLOGI("register audio renderer event listener"); auto ret = AudioStandard::AudioStreamManager::GetInstance()->RegisterAudioRendererEventListener( getpid(), shared_from_this()); - CHECK_AND_PRINT_LOG(ret == 0, "register audio renderer event listener failed"); + CHECK_AND_PRINT_LOG(ret == 0, "register audio renderer event listener failed!"); AudioStandard::AudioRendererInfo rendererInfo = {}; rendererInfo.streamUsage = AudioStandard::STREAM_USAGE_MUSIC; ret = AudioStandard::AudioRoutingManager::GetInstance()->SetPreferredOutputDeviceChangeCallback( rendererInfo, shared_from_this()); - CHECK_AND_PRINT_LOG(ret == 0, "register audio device changed event listener failed"); + CHECK_AND_PRINT_LOG(ret == 0, "register audio device changed event listener failed!"); } void AudioAdapter::AddStreamRendererStateListener(const StateListener& listener) @@ -67,7 +67,7 @@ int32_t AudioAdapter::MuteAudioStream(int32_t uid, int32_t pid) std::vector> audioRendererChangeInfo; auto ret = AudioStandard::AudioStreamManager::GetInstance()->GetCurrentRendererChangeInfos(audioRendererChangeInfo); - CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "get renderer state failed"); + CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "get renderer state failed!"); auto muteRet = AVSESSION_ERROR; for (const auto& info : audioRendererChangeInfo) { if ((info->clientUID == uid && info->clientPid == pid) && @@ -78,7 +78,7 @@ int32_t AudioAdapter::MuteAudioStream(int32_t uid, int32_t pid) uid, pid, info->rendererInfo.streamUsage, info->rendererState); auto ret = AudioStandard::AudioSystemManager::GetInstance()->UpdateStreamState( uid, AudioStandard::StreamSetState::STREAM_MUTE, info->rendererInfo.streamUsage); - CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "mute uid=%{public}d failed", uid); + CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "mute uid=%{public}d failed!", uid); muteRet = AVSESSION_SUCCESS; } } @@ -90,14 +90,14 @@ int32_t AudioAdapter::UnMuteAudioStream(int32_t uid) std::vector> audioRendererChangeInfo; auto ret = AudioStandard::AudioStreamManager::GetInstance()->GetCurrentRendererChangeInfos(audioRendererChangeInfo); - CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "get renderer state failed"); + CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "get renderer state failed!"); for (const auto& info : audioRendererChangeInfo) { if (info->clientUID == uid && info->rendererState == AudioStandard::RENDERER_RUNNING && info->backMute) { SLOGI("unmute uid=%{public}d stream usage %{public}d renderer state is %{public}d", uid, info->rendererInfo.streamUsage, info->rendererState); auto ret = AudioStandard::AudioSystemManager::GetInstance()->UpdateStreamState( uid, AudioStandard::StreamSetState::STREAM_UNMUTE, info->rendererInfo.streamUsage); - CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "unmute uid=%{public}d failed", uid); + CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "unmute uid=%{public}d failed!", uid); } } return AVSESSION_SUCCESS; @@ -108,7 +108,7 @@ int32_t AudioAdapter::UnMuteAudioStream(int32_t uid, AudioStandard::StreamUsage SLOGI("unmute uid=%{public}d stream usage %{public}d", uid, usage); auto ret = AudioStandard::AudioSystemManager::GetInstance()->UpdateStreamState( uid, AudioStandard::StreamSetState::STREAM_UNMUTE, usage); - CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "unmute uid=%{public}d failed", uid); + CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "unmute uid=%{public}d failed!", uid); return AVSESSION_SUCCESS; } @@ -120,7 +120,7 @@ int32_t AudioAdapter::MuteAudioStream(int32_t uid, AudioStandard::StreamUsage us } auto ret = AudioStandard::AudioSystemManager::GetInstance()->UpdateStreamState( uid, AudioStandard::StreamSetState::STREAM_MUTE, usage); - CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "mute uid=%{public}d failed", uid); + CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "mute uid=%{public}d failed!", uid); return AVSESSION_SUCCESS; } @@ -128,7 +128,7 @@ int32_t AudioAdapter::PauseAudioStream(int32_t uid, AudioStandard::StreamUsage u { auto ret = AudioStandard::AudioSystemManager::GetInstance()->UpdateStreamState( uid, AudioStandard::StreamSetState::STREAM_PAUSE, usage); - CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "pause uid=%{public}d failed", uid); + CHECK_AND_RETURN_RET_LOG(ret == 0, AVSESSION_ERROR, "pause uid=%{public}d failed!", uid); return AVSESSION_SUCCESS; } @@ -159,12 +159,10 @@ bool AudioAdapter::GetRendererRunning(int32_t uid) std::vector> audioRendererChangeInfo; auto ret = AudioStandard::AudioStreamManager::GetInstance()->GetCurrentRendererChangeInfos(audioRendererChangeInfo); - CHECK_AND_RETURN_RET_LOG(ret == 0, false, "get renderer state failed"); + CHECK_AND_RETURN_RET_LOG(ret == 0, false, "get renderer state failed!"); for (const auto& info : audioRendererChangeInfo) { - if (info->clientUID == uid && info->rendererState == AudioStandard::RENDERER_RUNNING) { - SLOGI("find uid=%{public}d renderer state is %{public}d", uid, info->rendererState); - return true; - } + CHECK_AND_RETURN_RET_LOG(!(info->clientUID == uid && info->rendererState == AudioStandard::RENDERER_RUNNING), + true, "find uid=%{public}d renderer state is %{public}d", uid, info->rendererState); } return false; } diff --git a/services/session/adapter/plugin_lib.cpp b/services/session/adapter/plugin_lib.cpp index c3b0b198f3b674cf60413432856d78ae5a32c9fe..fe70441d5209dc4d999647d4a7fc150698f448df 100644 --- a/services/session/adapter/plugin_lib.cpp +++ b/services/session/adapter/plugin_lib.cpp @@ -27,10 +27,7 @@ namespace OHOS::AVSession { PluginLib::PluginLib(const std::string &libName) : libName_(GetRealPath(libName)), handle_(nullptr) { - if (!CheckPathExist(libName_)) { - SLOGE("%{public}s path invalid", libName_.c_str()); - return; - } + CHECK_AND_RETURN_LOG(CheckPathExist(libName_), "%{public}s path invalid", libName_.c_str()); handle_ = dlopen(libName_.c_str(), RTLD_NOW); if (handle_ == nullptr) { LogDlfcnErr("open lib failed"); @@ -54,10 +51,7 @@ PluginLib::~PluginLib() void *PluginLib::LoadSymbol(const std::string &symbolName) { - if (handle_ == nullptr) { - SLOGE("%{public}s lib is null", libName_.c_str()); - return nullptr; - } + CHECK_AND_RETURN_RET_LOG(handle_ != nullptr, nullptr, "%{public}s lib is null", libName_.c_str()); void *sym = dlsym(handle_, symbolName.c_str()); if (sym == nullptr) { LogDlfcnErr("load symbol [" + symbolName + "] failed"); diff --git a/services/session/server/avsession_service.cpp b/services/session/server/avsession_service.cpp index 91f83e2a9aba87d5c887322b82bf2aff17749c87..86164d084b1fe052e76810e40839bcfe69d36683 100644 --- a/services/session/server/avsession_service.cpp +++ b/services/session/server/avsession_service.cpp @@ -142,9 +142,14 @@ AVSessionService::~AVSessionService() void AVSessionService::OnStart() { - SLOGI("OnStart SA"); + SLOGI("OnStart SA with process check"); GetUsersManager().ClearCache(); CHECK_AND_RETURN_LOG(Publish(this), "publish avsession service failed"); + OnStartProcess(); +} + +void AVSessionService::OnStartProcess() +{ dumpHelper_ = std::make_unique(); CommandSendLimit::GetInstance().StartTimer(); diff --git a/services/session/server/avsession_service.h b/services/session/server/avsession_service.h index 9f5b608d64dc768015d5bc6b0400efbb803d3eca..f9a6b3d220b99f1cac8baa0458ceb3ca32091583 100644 --- a/services/session/server/avsession_service.h +++ b/services/session/server/avsession_service.h @@ -171,6 +171,8 @@ public: void OnStart() override; + void OnStartProcess(); + void OnStop() override; int32_t OnIdle(const SystemAbilityOnDemandReason& idleReason) override; diff --git a/services/session/server/remote/remote_session_source_impl.cpp b/services/session/server/remote/remote_session_source_impl.cpp index c69bf41090e28aad7d30b1fc65a74ee0b3e8eb96..37a68847dda1a9e6e80384378d4869a07eba63e7 100644 --- a/services/session/server/remote/remote_session_source_impl.cpp +++ b/services/session/server/remote/remote_session_source_impl.cpp @@ -33,6 +33,7 @@ extern "C" void DestroyRemoteSessionSourceImpl(RemoteSessionSourceImpl* impl) delete(impl); } +// LCOV_EXCL_START int32_t RemoteSessionSourceImpl::CastSessionToRemote(const sptr & session, const std::string& sourceDevice, const std::string& sinkDevice, @@ -81,7 +82,9 @@ int32_t RemoteSessionSourceImpl::CastSessionToRemote(const sptr & } return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSourceImpl::HandleSourceSessionDataCategory(const SessionDataCategory category, const std::string& deviceId) { @@ -106,7 +109,9 @@ int32_t RemoteSessionSourceImpl::HandleSourceSessionDataCategory(const SessionDa return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSourceImpl::CancelCastAudio(const std::string& sinkDevice) { SLOGI("start"); @@ -124,7 +129,9 @@ int32_t RemoteSessionSourceImpl::CancelCastAudio(const std::string& sinkDevice) SLOGI("success"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSourceImpl::SetAVMetaData(const AVMetaData& metaData) { SLOGI("start"); @@ -149,7 +156,9 @@ int32_t RemoteSessionSourceImpl::SetAVMetaData(const AVMetaData& metaData) SLOGI("success"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSourceImpl::SetAVPlaybackState(const AVPlaybackState& state) { SLOGI("start"); @@ -174,7 +183,9 @@ int32_t RemoteSessionSourceImpl::SetAVPlaybackState(const AVPlaybackState& state SLOGI("success"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSourceImpl::SetSessionEventRemote(const std::string& event, const AAFwk::WantParams& args) { SLOGI("start"); @@ -197,7 +208,9 @@ int32_t RemoteSessionSourceImpl::SetSessionEventRemote(const std::string& event, SLOGI("success"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSourceImpl::SetAVQueueItems(const std::vector& items) { SLOGI("start"); @@ -219,7 +232,9 @@ int32_t RemoteSessionSourceImpl::SetAVQueueItems(const std::vector& SLOGI("success"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSourceImpl::SetAVQueueTitle(const std::string& title) { SLOGI("start"); @@ -241,7 +256,9 @@ int32_t RemoteSessionSourceImpl::SetAVQueueTitle(const std::string& title) SLOGI("success"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSourceImpl::SetExtrasRemote(const AAFwk::WantParams& extras) { SLOGI("start"); @@ -263,7 +280,9 @@ int32_t RemoteSessionSourceImpl::SetExtrasRemote(const AAFwk::WantParams& extras SLOGI("success"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START AVMetaData::MetaMaskType RemoteSessionSourceImpl::GetSinkMetaMaskType(const std::string& sinkDevice) { std::vector capability = AVMetaData::localCapability; @@ -278,7 +297,9 @@ AVMetaData::MetaMaskType RemoteSessionSourceImpl::GetSinkMetaMaskType(const std: } return mask; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START AVPlaybackState::PlaybackStateMaskType RemoteSessionSourceImpl::GetSinkPlaybackStateMaskType( const std::string& sinkDevice) { @@ -294,4 +315,5 @@ AVPlaybackState::PlaybackStateMaskType RemoteSessionSourceImpl::GetSinkPlaybackS } return mask; } +// LCOV_EXCL_STOP } // namespace OHOS::AVSession \ No newline at end of file diff --git a/services/session/server/remote/remote_session_syncer_impl.cpp b/services/session/server/remote/remote_session_syncer_impl.cpp index 61ec8a4d9d4893ac98cbb60ccd0f70029e24ba94..f6f21062770b2c6b4c5c63fcc736e7e58edaac6b 100644 --- a/services/session/server/remote/remote_session_syncer_impl.cpp +++ b/services/session/server/remote/remote_session_syncer_impl.cpp @@ -101,6 +101,7 @@ int32_t RemoteSessionSyncerImpl::PutAVMetaData(const AVMetaData& metaData) return AVSESSION_SUCCESS; } +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::GetAVMetaData(AVMetaData& metaData) { std::vector dataVector; @@ -120,7 +121,9 @@ int32_t RemoteSessionSyncerImpl::GetAVMetaData(AVMetaData& metaData) data = nullptr; return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::PutAVPlaybackState(const AVPlaybackState& state) { AVSESSION_TRACE_SYNC_START("RemoteSessionSyncerImpl::PutAVPlaybackState"); @@ -134,7 +137,9 @@ int32_t RemoteSessionSyncerImpl::PutAVPlaybackState(const AVPlaybackState& state "put data error"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::GetAVPlaybackState(AVPlaybackState& state) { std::vector dataVector; @@ -155,7 +160,9 @@ int32_t RemoteSessionSyncerImpl::GetAVPlaybackState(AVPlaybackState& state) data = nullptr; return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::PutControlCommand(const AVControlCommand& command) { AVSESSION_TRACE_SYNC_START("RemoteSessionSyncerImpl::PutControlCommand"); @@ -169,7 +176,9 @@ int32_t RemoteSessionSyncerImpl::PutControlCommand(const AVControlCommand& comma "put data error"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::GetControlCommand(AVControlCommand& command) { std::vector dataVector; @@ -190,7 +199,9 @@ int32_t RemoteSessionSyncerImpl::GetControlCommand(AVControlCommand& command) data = nullptr; return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::PutCommonCommand(const std::string& commonCommand, const AAFwk::WantParams& commandArgs) { @@ -207,7 +218,9 @@ int32_t RemoteSessionSyncerImpl::PutCommonCommand(const std::string& commonComma "Put data error"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::GetCommonCommand(std::string& commonCommand, AAFwk::WantParams& commandArgs) { std::vector dataVector; @@ -237,7 +250,9 @@ int32_t RemoteSessionSyncerImpl::GetCommonCommand(std::string& commonCommand, AA argsData = nullptr; return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::PutSessionEvent(const std::string& event, const AAFwk::WantParams& args) { AVSESSION_TRACE_SYNC_START("RemoteSessionSyncerImpl::PutSessionEvent"); @@ -253,7 +268,9 @@ int32_t RemoteSessionSyncerImpl::PutSessionEvent(const std::string& event, const AVSESSION_ERROR, "put data error"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::GetSessionEvent(std::string& event, AAFwk::WantParams& args) { std::vector dataVector; @@ -284,7 +301,9 @@ int32_t RemoteSessionSyncerImpl::GetSessionEvent(std::string& event, AAFwk::Want argsData = nullptr; return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::PutAVQueueItems(const std::vector& items) { AVSESSION_TRACE_SYNC_START("RemoteSessionSyncerImpl::PutAVQueueItems"); @@ -303,7 +322,9 @@ int32_t RemoteSessionSyncerImpl::PutAVQueueItems(const std::vector& AVSESSION_ERROR, "put data error"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::GetAVQueueItems(std::vector& items) { std::vector dataVector; @@ -338,7 +359,9 @@ int32_t RemoteSessionSyncerImpl::GetAVQueueItems(std::vector& items items = items_; return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::PutAVQueueTitle(const std::string& title) { AVSESSION_TRACE_SYNC_START("RemoteSessionSyncerImpl::PutAVQueueTitle"); @@ -353,7 +376,9 @@ int32_t RemoteSessionSyncerImpl::PutAVQueueTitle(const std::string& title) AVSESSION_ERROR, "put data error"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::GetAVQueueTitle(std::string& title) { std::vector dataVector; @@ -373,7 +398,9 @@ int32_t RemoteSessionSyncerImpl::GetAVQueueTitle(std::string& title) title = std::string(titleDate); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::PutExtras(const AAFwk::WantParams& extras) { AVSESSION_TRACE_SYNC_START("RemoteSessionSyncerImpl::PutExtras"); @@ -388,7 +415,9 @@ int32_t RemoteSessionSyncerImpl::PutExtras(const AAFwk::WantParams& extras) AVSESSION_ERROR, "put data error"); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::GetExtras(AAFwk::WantParams& extras) { std::vector dataVector; @@ -416,7 +445,9 @@ int32_t RemoteSessionSyncerImpl::GetExtras(AAFwk::WantParams& extras) extrasData = nullptr; return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::RegisterDataNotifier(const ObjectDataNotifier& notifier) { CHECK_AND_RETURN_RET_LOG(objectStore_ != nullptr && object_ != nullptr, AVSESSION_ERROR, @@ -425,7 +456,9 @@ int32_t RemoteSessionSyncerImpl::RegisterDataNotifier(const ObjectDataNotifier& objectStore_->Watch(object_, shared_from_this()); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START int32_t RemoteSessionSyncerImpl::RegisterDisconnectNotifier(const ObjectDisconnectNotifier& notifier) { CHECK_AND_RETURN_RET_LOG(objectStore_ != nullptr, AVSESSION_ERROR, "objectStore_ is nullptr"); @@ -433,7 +466,9 @@ int32_t RemoteSessionSyncerImpl::RegisterDisconnectNotifier(const ObjectDisconne objectStore_->SetStatusNotifier(shared_from_this()); return AVSESSION_SUCCESS; } +// LCOV_EXCL_STOP +// LCOV_EXCL_START void RemoteSessionSyncerImpl::Destroy() { auto ret = objectStore_->UnWatch(object_); @@ -442,9 +477,12 @@ void RemoteSessionSyncerImpl::Destroy() CHECK_AND_RETURN_LOG(ret == ObjectStore::SUCCESS, "DeleteObject error"); SLOGI("Destroy"); } +// LCOV_EXCL_STOP +// LCOV_EXCL_START RemoteSessionSyncerImpl::~RemoteSessionSyncerImpl() { SLOGI("RemoteSessionSyncerImpl"); } +// LCOV_EXCL_STOP } // namespace OHOS::AVSession \ No newline at end of file diff --git a/services/session/server/test/avsession_service_supplement_test.cpp b/services/session/server/test/avsession_service_supplement_test.cpp index 2360e3a91b20df5ac32dad709e91f1866ed589e1..88636860c926788b2721957c37c80420c6ee947a 100644 --- a/services/session/server/test/avsession_service_supplement_test.cpp +++ b/services/session/server/test/avsession_service_supplement_test.cpp @@ -39,7 +39,7 @@ public: void AVSessionServiceSupplementTest::SetUpTestCase() { - SLOGI("set up AVSessionServiceTest"); + SLOGI("set up AVSessionServiceTest with OnStart"); system("killall -9 com.example.hiMusicDemo"); g_AVSessionService = new AVSessionService(OHOS::AVSESSION_SERVICE_ID, true); g_AVSessionService->OnStart(); @@ -340,9 +340,9 @@ static HWTEST_F(AVSessionServiceSupplementTest, IsHistoricalSession002, TestSize */ static HWTEST_F(AVSessionServiceSupplementTest, Dump001, TestSize.Level1) { - SLOGI("Dump001 begin!"); + SLOGI("Dump001 with OnStartProcess begin!"); std::vector argsList; - g_AVSessionService->OnStart(); + g_AVSessionService->OnStartProcess(); int32_t ret = g_AVSessionService->Dump(1, argsList); EXPECT_EQ(ret, ERR_INVALID_PARAM); SLOGI("Dump001 end!"); @@ -355,11 +355,11 @@ static HWTEST_F(AVSessionServiceSupplementTest, Dump001, TestSize.Level1) */ static HWTEST_F(AVSessionServiceSupplementTest, Dump002, TestSize.Level1) { - SLOGI("Dump002 begin!"); + SLOGI("Dump002 with OnStartProcess begin!"); std::vector argsList; std::u16string str(5, 'a'); argsList.emplace_back(str); - g_AVSessionService->OnStart(); + g_AVSessionService->OnStartProcess(); int32_t ret = g_AVSessionService->Dump(1, argsList); EXPECT_EQ(ret, ERR_INVALID_PARAM); SLOGI("Dump002 end!");