diff --git a/bundle.json b/bundle.json index 34f4b18492..d5d379eb6a 100644 --- a/bundle.json +++ b/bundle.json @@ -12,7 +12,12 @@ "component": { "name": "ability_runtime", "subsystem": "ability", - "syscap": [], + "syscap": [ + "SystemCapability.Ability.AbilityRuntime.Core", + "SystemCapability.Ability.AbilityRuntime.FAModel", + "SystemCapability.Ability.AbilityRuntime.AbilityCore", + "SystemCapability.Ability.AbilityRuntime.Mission" + ], "features": [ "ability_runtime_graphics", "ability_runtime_power" diff --git a/frameworks/js/napi/app/app_manager/js_app_manager.cpp b/frameworks/js/napi/app/app_manager/js_app_manager.cpp index 2e8e4a21aa..97af3a4be1 100644 --- a/frameworks/js/napi/app/app_manager/js_app_manager.cpp +++ b/frameworks/js/napi/app/app_manager/js_app_manager.cpp @@ -122,7 +122,6 @@ public: private: sptr appManager_ = nullptr; sptr abilityManager_ = nullptr; - sptr observer = nullptr; NativeValue* OnRegisterApplicationStateObserver(NativeEngine& engine, NativeCallbackInfo& info) { @@ -139,9 +138,7 @@ private: static int64_t serialNumber = 0; std::vector bundleNameList; // unwarp observer - if (observer == nullptr) { - observer = new JSApplicationStateObserver(engine); - } + sptr observer = new JSApplicationStateObserver(engine); observer->SetJsObserverObject(info.argv[INDEX_ZERO]); if (info.argc == ARGC_TWO) { AppExecFwk::UnwrapArrayStringFromJS(reinterpret_cast(&engine), diff --git a/tools/bundle.json b/tools/bundle.json index 549d0ae5e1..128e2b03a6 100644 --- a/tools/bundle.json +++ b/tools/bundle.json @@ -12,7 +12,9 @@ "component": { "name": "ability_tools", "subsystem": "ability", - "syscap": [], + "syscap": [ + "SystemCapability.Ability.AbilityTools.AbilityAssistant" + ], "features": [], "adapted_system_type": [ "standard"