diff --git a/frameworks/ability_lite/BUILD.gn b/frameworks/ability_lite/BUILD.gn index 85b1a617e756df42968502878d1055023c9ef145..c57d37864fc1216b076af26420261bd48b5ddcee 100755 --- a/frameworks/ability_lite/BUILD.gn +++ b/frameworks/ability_lite/BUILD.gn @@ -79,8 +79,6 @@ lite_library("ability") { "//foundation/distributedschedule/samgr_lite/interfaces/kits/registry", "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr", "//foundation/communication/ipc_lite/frameworks/liteipc/include", - "//kernel/liteos_a/kernel/include", - "//kernel/liteos_a/kernel/common", "//third_party/bounds_checking_function/include", "//third_party/freetype/include", "//utils/native/lite/kv_store/innerkits", diff --git a/frameworks/ability_lite/example/BUILD.gn b/frameworks/ability_lite/example/BUILD.gn index 5005a7e0c3638b3943cbb3063cc11b341dcda938..d568217046ff6a45c544ae72102a5f6b19403bbb 100644 --- a/frameworks/ability_lite/example/BUILD.gn +++ b/frameworks/ability_lite/example/BUILD.gn @@ -47,8 +47,6 @@ lite_library("hiability") { "//foundation/graphic/utils/interfaces/innerkits", "//foundation/graphic/ui/interfaces/kits", "//foundation/graphic/utils/interfaces/kits/gfx_utils", - "//kernel/liteos_a/kernel/common", - "//kernel/liteos_a/kernel/include", ] deps = [ diff --git a/frameworks/abilitymgr_lite/BUILD.gn b/frameworks/abilitymgr_lite/BUILD.gn index e6f6180cad8f269714821fb4af3f9755e325d042..e66514c614ff796613f47a3d30642b1a8045afd7 100755 --- a/frameworks/abilitymgr_lite/BUILD.gn +++ b/frameworks/abilitymgr_lite/BUILD.gn @@ -41,8 +41,6 @@ lite_library("abilitymanager") { "${appexecfwk_lite_path}/frameworks/bundle_lite/include", "//foundation/distributedschedule/samgr_lite/interfaces/kits/registry", "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr", - "//kernel/liteos_a/kernel/include", - "//kernel/liteos_a/kernel/common", "//third_party/bounds_checking_function/include", "//utils/native/lite/kv_store/innerkits", "//utils/native/lite/include", diff --git a/frameworks/abilitymgr_lite/include/abilityms_slite_client.h b/frameworks/abilitymgr_lite/include/abilityms_slite_client.h index 21e71ed83926c68790ad24e6768770fdd2708316..a87d3d3ab74d2f3f3f42d2e841fe5903ef142778 100755 --- a/frameworks/abilitymgr_lite/include/abilityms_slite_client.h +++ b/frameworks/abilitymgr_lite/include/abilityms_slite_client.h @@ -42,6 +42,8 @@ public: int ForceStopBundle(uint64_t token) const; + int ForceStop(char *bundlename) const; + ElementName *GetTopAbility() const; private: diff --git a/frameworks/abilitymgr_lite/src/slite/ability_manager_inner.cpp b/frameworks/abilitymgr_lite/src/slite/ability_manager_inner.cpp index 3c1103cf55d043f6216b31d4804cebfb11f78068..e79972f41406f9b804d90c45c318342934374b8b 100755 --- a/frameworks/abilitymgr_lite/src/slite/ability_manager_inner.cpp +++ b/frameworks/abilitymgr_lite/src/slite/ability_manager_inner.cpp @@ -17,7 +17,7 @@ #include "abilityms_slite_client.h" -StartCheckFunc CALLBACKFUNC; +StartCheckFunc CALLBACKFUNC = nullptr; extern "C" { int RegAbilityCallback(StartCheckFunc startChecktCallback) @@ -43,6 +43,6 @@ int ForceStop(char *bundlename) StartCheckFunc getAbilityCallback() { - return CALLBACKFUNC + return CALLBACKFUNC; } } diff --git a/frameworks/want_lite/BUILD.gn b/frameworks/want_lite/BUILD.gn index 2d74e5a341a180756b46e176dc56d47a07b54393..016cad7726ffbd0a10aab9905b89c8ea8773c606 100755 --- a/frameworks/want_lite/BUILD.gn +++ b/frameworks/want_lite/BUILD.gn @@ -34,8 +34,6 @@ source_set("want") { "${appexecfwk_lite_path}/frameworks/bundle_lite/include", "${appexecfwk_lite_path}/utils/bundle_lite", "//foundation/communication/ipc_lite/interfaces/kits", - "//kernel/liteos_a/kernel/include", - "//kernel/liteos_a/kernel/common", ] defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ] diff --git a/services/abilitymgr_lite/BUILD.gn b/services/abilitymgr_lite/BUILD.gn index ba3479bb09a6f1d987cc7febb099685feca453fc..072dbd057cdf6ae7836d230e6d94250fa56d76fc 100644 --- a/services/abilitymgr_lite/BUILD.gn +++ b/services/abilitymgr_lite/BUILD.gn @@ -83,8 +83,6 @@ lite_library("abilityms") { "//base/startup/appspawn_lite/services/include", "//base/security/permission/interfaces/kits/permission_lite", "//base/security/permission/services/permission_lite/pms/include", - "//kernel/liteos_a/kernel/include", - "//kernel/liteos_a/kernel/common", "//third_party/bounds_checking_function/include", "//utils/native/lite/include", "include", diff --git a/services/abilitymgr_lite/src/ability_mgr_service.cpp b/services/abilitymgr_lite/src/ability_mgr_service.cpp index 07af4200c2363c1d82740f60d854f2b7aefaad71..ccac550ea6debf750f25324c6db8016c9290afaa 100755 --- a/services/abilitymgr_lite/src/ability_mgr_service.cpp +++ b/services/abilitymgr_lite/src/ability_mgr_service.cpp @@ -91,7 +91,7 @@ BOOL AbilityMgrService::ServiceMessageHandle(Service *service, Request *request) } else if (request->msgId == TERMINATE_APP) { ret = AbilityService::GetInstance().ForceStopBundle(request->msgValue); } else if (request->msgId == TERMINATE_APP_BY_BUNDLENAME) { - char* bundleName = reinterpret_cast(request->data) + char* bundleName = reinterpret_cast(request->data); ret = AbilityService::GetInstance().ForceStop(bundleName); } return ret == ERR_OK; diff --git a/services/abilitymgr_lite/src/ability_service.cpp b/services/abilitymgr_lite/src/ability_service.cpp index 7755ebfc06be61845846ffadd3d7cbdaf3ecf01e..b5e5cd663298ec5e96f9f4cd17fdd4c6cd02b41f 100755 --- a/services/abilitymgr_lite/src/ability_service.cpp +++ b/services/abilitymgr_lite/src/ability_service.cpp @@ -178,7 +178,7 @@ int32_t AbilityService::StartAbility(AbilitySvcInfo *info) // js to js HILOG_INFO(HILOG_MODULE_AAFWK, "Terminate pre js app when js to js") TerminateAbility(topRecord->GetToken()); - pendingToken_ = GenerateToken() + pendingToken_ = GenerateToken(); } } @@ -248,7 +248,7 @@ int32_t AbilityService::ForceStop(char* bundlename) } //stop js app - if (strcmp(GetTopAbility()->bundlename, bundlename) == 0) { + if (strcmp(abilityStack_.GetTopAbility()->GetAppName(), bundlename) == 0) { HILOG_INFO(HILOG_MODULE_AAFWK, "ForceStop [%s]", bundlename); AbilityRecord *topRecord = const_cast(abilityStack_.GetTopAbility()); return TerminateAbility(topRecord->GetToken()); diff --git a/services/abilitymgr_lite/tools/BUILD.gn b/services/abilitymgr_lite/tools/BUILD.gn index 6280e90e5d4418af5beb100eeaa3bb45b5e9e163..7f5b6cda1ad16d3c4c33ab60cd0c8e3612dd4cb2 100755 --- a/services/abilitymgr_lite/tools/BUILD.gn +++ b/services/abilitymgr_lite/tools/BUILD.gn @@ -69,8 +69,6 @@ executable("aa") { "//foundation/communication/ipc_lite/interfaces/kits", "//foundation/distributedschedule/samgr_lite/interfaces/kits/registry", "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr", - "//kernel/liteos_a/kernel/include", - "//kernel/liteos_a/kernel/common", "//third_party/bounds_checking_function/include", "//third_party/cJSON", "//utils/native/lite/include", diff --git a/services/abilitymgr_lite/unittest/test_lv0/page_ability_test/BUILD.gn b/services/abilitymgr_lite/unittest/test_lv0/page_ability_test/BUILD.gn index b259a0a7f15869bdfed735d30b559f448cbd1f89..db1a2a5427dffff143ad700eff88aa1d7f348bbf 100644 --- a/services/abilitymgr_lite/unittest/test_lv0/page_ability_test/BUILD.gn +++ b/services/abilitymgr_lite/unittest/test_lv0/page_ability_test/BUILD.gn @@ -39,8 +39,6 @@ unittest("ability_test_pageAbilityTest_lv0") { "${appexecfwk_lite_path}/kits/appkit_lite/appkit_utils/include", "//foundation/distributedschedule/samgr_lite/interfaces/innerkits/samgr", "//foundation/distributedschedule/samgr_lite/interfaces/innerkits/registry", - "//kernel/liteos_a/kernel/include", - "//kernel/liteos_a/kernel/common", "//third_party/cJSON", "//utils/native/lite/include", ]