diff --git a/frameworks/ets/ets/@ohos.ability.errorCode.ets b/frameworks/ets/ets/@ohos.ability.errorCode.ets new file mode 100644 index 0000000000000000000000000000000000000000..aaee5b0a9b582f09f8632245ce490e0d41a8cbd5 --- /dev/null +++ b/frameworks/ets/ets/@ohos.ability.errorCode.ets @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 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. + */ + +export enum ErrorCode { + PERMISSION_DENY = -3, + ABILITY_NOT_FOUND = -2, + INVALID_PARAMETER = -1, + NO_ERROR = 0 +} \ No newline at end of file diff --git a/frameworks/ets/ets/BUILD.gn b/frameworks/ets/ets/BUILD.gn index 822ac5228c753a67577f1a1a1458149dc09b50c2..f6a599db23965c3fd34a26dac6786d19c92f2022 100644 --- a/frameworks/ets/ets/BUILD.gn +++ b/frameworks/ets/ets/BUILD.gn @@ -915,6 +915,22 @@ ohos_prebuilt_etc("ability_runtime_extension_running_info_abc_etc") { deps = [ ":ability_runtime_extension_running_info_abc" ] } +generate_static_abc("ability_runtime_error_code_abc") { + base_url = "./" + files = [ "./@ohos.ability.errorCode.ets" ] + + is_boot_abc = "True" + device_dst_file = "/system/framework/ability_runtime_error_code_abc.abc" +} + +ohos_prebuilt_etc("ability_runtime_error_code_abc_etc") { + source = "$target_out_dir/ability_runtime_error_code_abc.abc" + module_install_dir = "framework" + subsystem_name = "ability" + part_name = "ability_runtime" + deps = [ ":ability_runtime_error_code_abc" ] +} + group("ets_packages") { deps = [ ":ability_ability_application_abc_etc", @@ -945,6 +961,7 @@ group("ets_packages") { ":ability_runtime_context_abc_etc", ":ability_runtime_custom_data_abc_etc", ":ability_runtime_environment_callback_abc_etc", + ":ability_runtime_error_code_abc_etc", ":ability_runtime_event_hub_abc_etc", ":ability_runtime_extension_context_abc_etc", ":ability_runtime_extension_running_info_abc_etc",