# Copyright (c) 2022-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") config("upms_config") { visibility = [ ":*" ] visibility += [ "${ability_runtime_test_path}/unittest/*" ] include_dirs = [ "include", "${ability_runtime_utils_path}/global/constant", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } } libupms_sources = [ "src/batch_uri.cpp", "src/file_permission_manager.cpp", "src/media_permission_manager.cpp", "src/tokenid_permission.cpp", "src/uri_permission_manager_service.cpp", "src/uri_permission_manager_stub_impl.cpp", "src/uri_permission_utils.cpp", ] #build so ohos_shared_library("libupms") { sanitize = { cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" shlib_type = "sa" configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", "${ability_runtime_services_path}/common:common_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", ] public_configs = [ ":upms_config" ] include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper" ] sources = libupms_sources deps = [ "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", "${ability_runtime_native_path}/appkit:appkit_manager_helper", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", ] external_deps = [ "ability_base:configuration", "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "app_file_service:fileuri_native", "background_task_mgr:bgtaskmgr_innerkits", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "data_share:datashare_consumer", "eventhandler:libeventhandler", "graphic_2d:color_manager", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "image_framework:image_native", "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_core", "media_library:media_library_manager", "relational_store:native_dataability", "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", "storage_service:storage_manager_sa_proxy", ] if (ability_runtime_feature_sandboxmanager) { external_deps += [ "sandbox_manager:libsandbox_manager_sdk" ] defines = [ "ABILITY_RUNTIME_FEATURE_SANDBOXMANAGER" ] } subsystem_name = "ability" part_name = "ability_runtime" } # Note: Just for test ohos_static_library("libupms_static") { sanitize = { cfi = true cfi_cross_dso = true debug = false blocklist = "../../test/cfi_blocklist.txt" } branch_protector_ret = "pac_ret" configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", "${ability_runtime_services_path}/common:common_config", ] public_configs = [ ":upms_config" ] include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper" ] sources = libupms_sources deps = [ "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", ] external_deps = [ "ability_base:configuration", "ability_base:want", "ability_base:zuri", "ability_runtime:ability_deps_wrapper", "access_token:libaccesstoken_sdk", "app_file_service:fileuri_native", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "data_share:datashare_consumer", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_core", "media_library:media_library_manager", "safwk:system_ability_fwk", "samgr:samgr_proxy", "storage_service:storage_manager_sa_proxy", ] if (ability_runtime_feature_sandboxmanager) { external_deps += [ "sandbox_manager:libsandbox_manager_sdk" ] defines = [ "ABILITY_RUNTIME_FEATURE_SANDBOXMANAGER" ] } subsystem_name = "ability" part_name = "ability_runtime" }