mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
Merge remote-tracking branch 'ohos/master' into ability_context
Signed-off-by: jiangzhijun8 <jiangzhijun7@huawei.com>
This commit is contained in:
@@ -36,8 +36,6 @@ config("ability_config") {
|
||||
"${ability_runtime_innerkits_path}/uri/include",
|
||||
"${ability_runtime_services_path}/abilitymgr/include",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/app",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/app",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/app",
|
||||
"${ability_runtime_innerkits_path}/ability_manager/include/continuation",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/app/task",
|
||||
"${ability_runtime_napi_path}/inner/napi_common",
|
||||
@@ -356,6 +354,7 @@ config("extensionkit_public_config") {
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/native/continuation/distributed",
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/native/continuation/kits",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context",
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/app",
|
||||
"${ability_runtime_innerkits_path}/app_manager/include/appmgr",
|
||||
@@ -1126,6 +1125,7 @@ ohos_shared_library("ui_extension_module") {
|
||||
deps = [
|
||||
":ui_extension",
|
||||
"${ability_runtime_innerkits_path}/runtime:runtime",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
@@ -1567,6 +1567,7 @@ ohos_shared_library("auto_fill_extension_module") {
|
||||
deps = [
|
||||
":auto_fill_extension",
|
||||
"${ability_runtime_innerkits_path}/runtime:runtime",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
|
||||
@@ -713,19 +713,6 @@ bool BundleMgrHelper::QueryDataGroupInfos(
|
||||
return bundleMgr->QueryDataGroupInfos(bundleName, userId, infos);
|
||||
}
|
||||
|
||||
bool BundleMgrHelper::GetBundleGidsByUid(const std::string &bundleName, const int32_t &uid, std::vector<int32_t> &gids)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::BUNDLEMGRHELPER, "Called.");
|
||||
auto bundleMgr = Connect();
|
||||
if (bundleMgr == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::BUNDLEMGRHELPER, "Failed to connect.");
|
||||
return false;
|
||||
}
|
||||
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
return bundleMgr->GetBundleGidsByUid(bundleName, uid, gids);
|
||||
}
|
||||
|
||||
bool BundleMgrHelper::RegisterBundleEventCallback(const sptr<IBundleEventCallback> &bundleEventCallback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::BUNDLEMGRHELPER, "Called.");
|
||||
|
||||
@@ -22,9 +22,11 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include "bundle_info.h"
|
||||
#include "bundle_mgr_helper.h"
|
||||
#include "bundle_mgr_proxy.h"
|
||||
#include "connect_server_manager.h"
|
||||
#include "commonlibrary/c_utils/base/include/refbase.h"
|
||||
#include "console.h"
|
||||
#ifdef SUPPORT_SCREEN
|
||||
#include "core/common/container_scope.h"
|
||||
#include "declarative_module_preloader.h"
|
||||
@@ -32,18 +34,16 @@
|
||||
|
||||
#include "extractor.h"
|
||||
#include "file_mapper.h"
|
||||
#include "foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/include/bundle_info.h"
|
||||
#include "foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_proxy.h"
|
||||
#include "foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include/iservice_registry.h"
|
||||
#include "foundation/communication/ipc/interfaces/innerkits/ipc_core/include/iremote_object.h"
|
||||
#include "singleton.h"
|
||||
#include "system_ability_definition.h"
|
||||
#include "hilog_tag_wrapper.h"
|
||||
#include "hilog_wrapper.h"
|
||||
#include "iremote_object.h"
|
||||
#include "iservice_registry.h"
|
||||
#include "js_runtime_utils.h"
|
||||
#include "native_engine/impl/ark/ark_native_engine.h"
|
||||
#include "commonlibrary/ets_utils/js_sys_module/console/console.h"
|
||||
#include "refbase.h"
|
||||
#include "singleton.h"
|
||||
#include "syscap_ts.h"
|
||||
#include "system_ability_definition.h"
|
||||
#ifdef SUPPORT_SCREEN
|
||||
using OHOS::Ace::ContainerScope;
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,7 @@ config("ability_manager_public_config") {
|
||||
"include/status_bar_delegate",
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/native",
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context",
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/native/continuation/kits",
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/native/continuation/distributed",
|
||||
"${bundlefwk_inner_api_path}/appexecfwk_base/include",
|
||||
@@ -286,6 +287,7 @@ ohos_shared_library("ability_start_setting") {
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"bundle_framework:appexecfwk_core",
|
||||
"jsoncpp:jsoncpp",
|
||||
"napi:ace_napi",
|
||||
]
|
||||
if (ability_runtime_graphics) {
|
||||
public_external_deps += [ "graphic_2d:color_manager" ]
|
||||
|
||||
@@ -140,6 +140,7 @@ ohos_shared_library("app_manager") {
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"image_framework:image_native",
|
||||
"relational_store:native_rdb",
|
||||
"skia:skia_canvaskit",
|
||||
]
|
||||
|
||||
if (background_task_mgr_continuous_task_enable) {
|
||||
|
||||
@@ -38,6 +38,7 @@ config("wantagent_innerkits_public_config") {
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/app",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -16,13 +16,12 @@
|
||||
#ifndef OHOS_ABILITY_RUNTIME_ABILITY_CONTEXT_H
|
||||
#define OHOS_ABILITY_RUNTIME_ABILITY_CONTEXT_H
|
||||
|
||||
#include "foundation/ability/ability_runtime/interfaces/kits/native/appkit/ability_runtime/context/context.h"
|
||||
|
||||
#include "ability_connect_callback.h"
|
||||
#include "ability_info.h"
|
||||
#include "ability_lifecycle_observer_interface.h"
|
||||
#include "caller_callback.h"
|
||||
#include "configuration.h"
|
||||
#include "context.h"
|
||||
#include "iability_callback.h"
|
||||
#include "js_ui_extension_callback.h"
|
||||
#include "mission_info.h"
|
||||
|
||||
+2
-2
@@ -27,9 +27,9 @@ public:
|
||||
|
||||
virtual bool OnStartContinuation() = 0;
|
||||
|
||||
virtual bool OnSaveData(WantParams &saveData) = 0;
|
||||
virtual bool OnSaveData(AAFwk::WantParams &saveData) = 0;
|
||||
|
||||
virtual bool OnRestoreData(WantParams &restoreData) = 0;
|
||||
virtual bool OnRestoreData(AAFwk::WantParams &restoreData) = 0;
|
||||
|
||||
virtual void OnCompleteContinuation(int result) = 0;
|
||||
|
||||
|
||||
+6
-6
@@ -22,15 +22,15 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
#include "iremote_broker.h"
|
||||
#include "element_name.h"
|
||||
#include "refbase.h"
|
||||
#include "context.h"
|
||||
#include "extra_params.h"
|
||||
#include "continuation_request.h"
|
||||
#include "ability_connect_callback_stub.h"
|
||||
#include "continuation_request.h"
|
||||
#include "continuation/kits/continuation_device_callback_interface.h"
|
||||
#include "continuation/remote_register_service_interface.h"
|
||||
#include "fa_context.h"
|
||||
#include "element_name.h"
|
||||
#include "extra_params.h"
|
||||
#include "iremote_broker.h"
|
||||
#include "refbase.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "foundation/ability/ability_runtime/interfaces/kits/native/appkit/app/context.h"
|
||||
#include "foundation/ability/ability_runtime/interfaces/kits/native/appkit/ability_runtime/context/context.h"
|
||||
#include "context.h"
|
||||
#include "fa_context.h"
|
||||
#include "uri.h"
|
||||
|
||||
using Uri = OHOS::Uri;
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "foundation/ability/ability_runtime/interfaces/kits/native/appkit/ability_runtime/context/context.h"
|
||||
#include "foundation/ability/ability_runtime/interfaces/kits/native/appkit/ability_runtime/context/application_context.h"
|
||||
#include "application_context.h"
|
||||
#include "context.h"
|
||||
#include "hilog_tag_wrapper.h"
|
||||
#include "hilog_wrapper.h"
|
||||
|
||||
|
||||
@@ -83,7 +83,6 @@ public:
|
||||
bool &findDefaultApp);
|
||||
bool CleanBundleDataFiles(const std::string &bundleName, int32_t userId, int32_t appCloneIndex);
|
||||
bool QueryDataGroupInfos(const std::string &bundleName, int32_t userId, std::vector<DataGroupInfo> &infos);
|
||||
bool GetBundleGidsByUid(const std::string &bundleName, const int32_t &uid, std::vector<int32_t> &gids);
|
||||
bool RegisterBundleEventCallback(const sptr<IBundleEventCallback> &bundleEventCallback);
|
||||
bool GetBundleInfos(
|
||||
const BundleFlag flag, std::vector<BundleInfo> &bundleInfos, int32_t userId = Constants::UNSPECIFIED_USERID);
|
||||
|
||||
@@ -29,14 +29,13 @@
|
||||
#endif
|
||||
|
||||
#include "ability_delegator_infos.h"
|
||||
#include "ability_lifecycle_executor.h"
|
||||
#include "context.h"
|
||||
#include "delegator_thread.h"
|
||||
#include "iability_monitor.h"
|
||||
#include "iability_stage_monitor.h"
|
||||
#include "delegator_thread.h"
|
||||
#include "shell_cmd_result.h"
|
||||
#include "test_runner.h"
|
||||
|
||||
#include "ability_lifecycle_executor.h"
|
||||
#include "foundation/ability/ability_runtime/interfaces/kits/native/appkit/ability_runtime/context/context.h"
|
||||
#include "want.h"
|
||||
|
||||
namespace OHOS {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef OHOS_ABILITY_RUNTIME_CONTEXT_DEAL_H
|
||||
#define OHOS_ABILITY_RUNTIME_CONTEXT_DEAL_H
|
||||
|
||||
#include "context.h"
|
||||
#include "fa_context.h"
|
||||
#include "lifecycle_state_info.h"
|
||||
|
||||
namespace OHOS {
|
||||
|
||||
+4
-4
@@ -18,13 +18,13 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "bundle_mgr_interface.h"
|
||||
#include "ability_manager_interface.h"
|
||||
#include "ability_info.h"
|
||||
#include "process_info.h"
|
||||
#include "resource_manager.h"
|
||||
#include "ability_manager_interface.h"
|
||||
#include "bundle_mgr_interface.h"
|
||||
#include "dummy_hap_module_info.h"
|
||||
#include "hap_module_info.h"
|
||||
#include "process_info.h"
|
||||
#include "resource_manager.h"
|
||||
#include "task/task_priority.h"
|
||||
|
||||
namespace OHOS {
|
||||
@@ -22,9 +22,9 @@
|
||||
#include <memory>
|
||||
|
||||
#include "ability_lifecycle_callbacks.h"
|
||||
#include "foundation/ability/ability_runtime/interfaces/kits/native/appkit/ability_runtime/context/context.h"
|
||||
#include "ability_stage.h"
|
||||
#include "app_context.h"
|
||||
#include "context.h"
|
||||
#include "element_callback.h"
|
||||
|
||||
namespace OHOS {
|
||||
|
||||
@@ -2738,10 +2738,6 @@ int32_t AppMgrServiceInner::CreateStartMsg(const std::string &processName, uint3
|
||||
TAG_LOGI(AAFwkTag::APPMGR, "apl is %{public}s, bundleName is %{public}s, startFlags is %{public}d",
|
||||
startMsg.apl.c_str(), bundleInfo.name.c_str(), startFlags);
|
||||
|
||||
if (!IN_PROCESS_CALL(bundleMgrHelper->GetBundleGidsByUid(bundleInfo.name, uid, startMsg.gids))) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "GetBundleGids is fail.");
|
||||
return ERR_INVALID_OPERATION;
|
||||
}
|
||||
autoSync.Sync();
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
@@ -47,11 +47,6 @@ public:
|
||||
return overlayModuleProxy;
|
||||
}
|
||||
|
||||
bool GetBundleGidsByUid(const std::string &bundleName, const int &uid, std::vector<int> &gids)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GetBundleInfo(const std::string &bundleName, const AppExecFwk::BundleFlag flag,
|
||||
AppExecFwk::BundleInfo &bundleInfo, int32_t userId) override
|
||||
{
|
||||
|
||||
@@ -100,8 +100,6 @@ public:
|
||||
const std::string& bundleName, const BundleFlag flag, BundleInfo& bundleInfo, int32_t userId) override;
|
||||
virtual bool GetBundleInfos(
|
||||
const BundleFlag flag, std::vector<BundleInfo>& bundleInfos, int32_t userId) override;
|
||||
bool GetBundleGidsByUid(
|
||||
const std::string& bundleName, const int& uid, std::vector<int>& gids) override;
|
||||
virtual bool GetBundleGids(const std::string& bundleName, std::vector<int>& gids) override;
|
||||
virtual bool GetHapModuleInfo(const AbilityInfo& abilityInfo, HapModuleInfo& hapModuleInfo);
|
||||
virtual bool GetHapModuleInfo(
|
||||
|
||||
@@ -275,12 +275,6 @@ bool BundleMgrService::GetBundleInfos(
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BundleMgrService::GetBundleGidsByUid(
|
||||
const std::string& bundleName, const int& uid, std::vector<int>& gids)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void BundleMgrService::PushTestHelloIndexAbility(int index)
|
||||
{
|
||||
AbilityInfo info;
|
||||
|
||||
@@ -329,10 +329,6 @@ public:
|
||||
|
||||
bool GetApplicationInfo(
|
||||
const std::string& appName, const ApplicationFlag flag, const int userId, ApplicationInfo& appInfo) override;
|
||||
virtual bool GetBundleGidsByUid(const std::string& bundleName, const int& uid, std::vector<int>& gids) override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ImplicitQueryInfos(const Want& want, int32_t flags, int32_t userId, bool withDefault,
|
||||
std::vector<AbilityInfo>& abilityInfos, std::vector<ExtensionAbilityInfo>& extensionInfos) override;
|
||||
|
||||
@@ -265,20 +265,6 @@ HWTEST_F(BundleMgrHelperTest, BundleMgrHelperTest_QueryDataGroupInfos_001, TestS
|
||||
EXPECT_EQ(ret, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: BundleMgrHelperTest_GetBundleGidsByUid_001
|
||||
* @tc.desc: GetBundleGidsByUid
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(BundleMgrHelperTest, BundleMgrHelperTest_GetBundleGidsByUid_001, TestSize.Level1)
|
||||
{
|
||||
std::string bundleName;
|
||||
int32_t uid = DEFAULT_USERID;
|
||||
std::vector<int> gids;
|
||||
auto ret = bundleMgrHelper->GetBundleGidsByUid(bundleName, uid, gids);
|
||||
EXPECT_EQ(ret, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: BundleMgrHelperTest_RegisterBundleEventCallback_001
|
||||
* @tc.desc: RegisterBundleEventCallback
|
||||
|
||||
@@ -2777,6 +2777,7 @@ ohos_unittest("dialog_request_callback_test") {
|
||||
defines = []
|
||||
include_dirs = [
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context",
|
||||
"${ability_runtime_path}/frameworks/simulator/common/include",
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/native/dialog_request_callback",
|
||||
]
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#define private public
|
||||
#define protected public
|
||||
#include "foundation/ability/ability_runtime/interfaces/kits/native/appkit/ability_runtime/context/context.h"
|
||||
#include "context.h"
|
||||
#undef private
|
||||
#undef protected
|
||||
|
||||
|
||||
Reference in New Issue
Block a user