diff --git a/services/samgr/native/source/system_ability_manager.cpp b/services/samgr/native/source/system_ability_manager.cpp index 1c21399bc79ec155d700af687094287a1aca24f5..3b1a5087dfd83de3136df3b2ad0b47d7af3023d2 100644 --- a/services/samgr/native/source/system_ability_manager.cpp +++ b/services/samgr/native/source/system_ability_manager.cpp @@ -1309,8 +1309,8 @@ int32_t SystemAbilityManager::StartDynamicSystemProcess(const std::u16string& na { std::string eventStr = std::to_string(systemAbilityId) + "#" + std::to_string(event.eventId) + "#" + event.name + "#" + event.value + "#" + std::to_string(event.extraDataId) + "#"; - auto extraArgv = eventStr.c_str(); - auto result = ServiceControlWithExtra(Str16ToStr8(name).c_str(), ServiceAction::START, &extraArgv, 1); + const char * extraArgv = {(const char *)"-o", eventStr.c_str()}; + auto result = ServiceControlWithExtra(Str16ToStr8(name).c_str(), ServiceAction::START, &extraArgv, 2); HILOGI("StartDynamicSystemProcess call ServiceControlWithExtra result:%{public}d!", result); return (result == 0) ? ERR_OK : ERR_INVALID_VALUE; }