diff --git a/frameworks/abilitymgr_lite/src/slite/abilityms_slite_client.cpp b/frameworks/abilitymgr_lite/src/slite/abilityms_slite_client.cpp index 6c5006c7f3d07a8cd5827fe4ec22a1e25169db86..5b07467523bf20fd97cc8118be8169f46714f25d 100755 --- a/frameworks/abilitymgr_lite/src/slite/abilityms_slite_client.cpp +++ b/frameworks/abilitymgr_lite/src/slite/abilityms_slite_client.cpp @@ -25,6 +25,7 @@ #include "securec.h" #include "unistd.h" #include "want_utils.h" +#include "utils.h" namespace OHOS { bool AbilityMsClient::Initialize() const @@ -147,7 +148,7 @@ int AbilityMsClient::ForceStop(char *bundlename) const .msgId = TERMINATE_APP_BY_BUNDLENAME, .data = reinterpret_cast(name), .len = strlen(name), - } + }; return SAMGR_SendRequest(service->GetIdentity(), &request, nullptr); } diff --git a/services/abilitymgr_lite/src/ability_service.cpp b/services/abilitymgr_lite/src/ability_service.cpp index b5e5cd663298ec5e96f9f4cd17fdd4c6cd02b41f..1e14230a1f8d99c8bbd9d351e63e1ff4a1cb7fe4 100755 --- a/services/abilitymgr_lite/src/ability_service.cpp +++ b/services/abilitymgr_lite/src/ability_service.cpp @@ -176,7 +176,7 @@ int32_t AbilityService::StartAbility(AbilitySvcInfo *info) HILOG_INFO(HILOG_MODULE_AAFWK, "Js app already started or starting."); } else { // js to js - HILOG_INFO(HILOG_MODULE_AAFWK, "Terminate pre js app when js to js") + HILOG_INFO(HILOG_MODULE_AAFWK, "Terminate pre js app when js to js"); TerminateAbility(topRecord->GetToken()); pendingToken_ = GenerateToken(); } @@ -249,8 +249,8 @@ int32_t AbilityService::ForceStop(char* bundlename) //stop js app if (strcmp(abilityStack_.GetTopAbility()->GetAppName(), bundlename) == 0) { - HILOG_INFO(HILOG_MODULE_AAFWK, "ForceStop [%s]", bundlename); AbilityRecord *topRecord = const_cast(abilityStack_.GetTopAbility()); + HILOG_INFO(HILOG_MODULE_AAFWK, "ForceStop [%u]", topRecord->GetToken()); return TerminateAbility(topRecord->GetToken()); } @@ -315,7 +315,7 @@ bool AbilityService::CheckResponse(const char *bundleName) if (callBackFunc != nullptr) { int ret = (*callBackFunc)(bundleName); if (ret != ERR_OK) { - HILOG_ERROR(HILOG_MODULE_AAFWK, "calling ability callback failed bundlename is: [%s]", bundleName); + HILOG_ERROR(HILOG_MODULE_AAFWK, "calling ability callback failed"); return false; } }