diff --git a/AbilityKit/MetaCompetences/.gitignore b/AbilityKit/MetaCompetences/.gitignore deleted file mode 100644 index d2ff20141ceed86d87c0ea5d99481973005bab2b..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/node_modules -/oh_modules -/local.properties -/.idea -**/build -/.hvigor -.cxx -/.clangd -/.clang-format -/.clang-tidy -**/.test -/.appanalyzer \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/AppScope/app.json5 b/AbilityKit/MetaCompetences/AppScope/app.json5 deleted file mode 100644 index 56d879ec40e0e441a8406aafe867c69186cdc4e8..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/AppScope/app.json5 +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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. - */ -{ - "app": { - "bundleName": "com.samples.MetaCompetences", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:layered_image", - "label": "$string:app_name" - } -} diff --git a/AbilityKit/MetaCompetences/AppScope/resources/base/element/string.json b/AbilityKit/MetaCompetences/AppScope/resources/base/element/string.json deleted file mode 100644 index c1ad6d8b0f9f8fd12f926f4a44569b63f6d360f9..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "MetaCompetences" - } - ] -} diff --git a/AbilityKit/MetaCompetences/AppScope/resources/base/media/background.png b/AbilityKit/MetaCompetences/AppScope/resources/base/media/background.png deleted file mode 100644 index 923f2b3f27e915d6871871deea0420eb45ce102f..0000000000000000000000000000000000000000 Binary files a/AbilityKit/MetaCompetences/AppScope/resources/base/media/background.png and /dev/null differ diff --git a/AbilityKit/MetaCompetences/AppScope/resources/base/media/foreground.png b/AbilityKit/MetaCompetences/AppScope/resources/base/media/foreground.png deleted file mode 100644 index eb9427585b36d14b12477435b6419d1f07b3e0bb..0000000000000000000000000000000000000000 Binary files a/AbilityKit/MetaCompetences/AppScope/resources/base/media/foreground.png and /dev/null differ diff --git a/AbilityKit/MetaCompetences/AppScope/resources/base/media/layered_image.json b/AbilityKit/MetaCompetences/AppScope/resources/base/media/layered_image.json deleted file mode 100644 index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/AppScope/resources/base/media/layered_image.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "layered-image": - { - "background" : "$media:background", - "foreground" : "$media:foreground" - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/README_zh.md b/AbilityKit/MetaCompetences/README_zh.md deleted file mode 100644 index 426a4d3861725e00b702db4d9e7d756247d79947..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/README_zh.md +++ /dev/null @@ -1,91 +0,0 @@ -# 应用启动框架AppStartup - -### 介绍 - -应用启动时通常需要执行一系列初始化启动任务,如果将启动任务都放在HAP的UIAbility组件的onCreate生命周期中,那么只能在主线程中依次执行,不但影响应用的启动速度,而且当启动任务过多时,任务之间复杂的依赖关系还会使得代码难以维护。 - -AppStartup提供了一种应用启动方式,可以支持任务的异步启动。同时,通过在一个配置文件中统一设置多个启动任务的执行顺序以及依赖关系,使启动任务的代码更简洁、清晰、易维护。 - -### 运行机制 -启动框架支持以自动模式或手动模式执行启动任务,默认采用自动模式。在构造AbilityStage过程中开始加载开发者配置的启动任务,并执行自动模式的启动任务。开发者也可以在AbilityStage创建完后调用startupManager.run方法,执行手动模式的启动任务。 - -### 工程目录 -``` -entry/src/main/ -│ module.json5 # 模块核心配置(设备类型、系统能力、权限等) -│ -├─ cpp/ # Native层so源码目录 -│ │ CMakeLists.txt # C++编译配置脚本(控制so生成) -│ │ -│ └─ types/ # so类型定义(供ArkTS调用的接口声明) -│ -├─ ets/ # ArkTS业务代码目录(应用功能核心) -│ ├─ entryability/ # 应用启动入口(Ability组件) -│ │ └─ EntryAbility.ets # 主Ability,控制应用生命周期 -│ │ -│ ├─ entrybackupability/ # 备份能力(非必需,按需保留) -│ │ └─ EntryBackupAbility.ets -│ │ -│ ├─ pages/ # 页面组件目录(用户交互界面) -│ │ └─ Index.ets # 首页界面代码 -│ │ -│ └─ startup/ # AppStartup启动任务目录(启动流程控制) -│ -└─ resources/ # 模块资源目录(界面与业务依赖的资源) - └─ base/ - └─ profile/ # 配置文件(路由、启动任务等) - └─ startup_config.json # 启动任务配置(任务顺序、依赖等) - -``` - -### 关系图 -**图1** 启动任务依赖关系图 -![img_1.png](img_1.png) - -**图2** so预加载任务依赖关系图 -![img.png](img.png) - -注意:so和任务需自己进行相关配置,代码只做展示 - -### 使用说明 -1. 当前工程应用启动框架共包含6个启动任务,启动工程化会自动并发执行启动任务 -2. 001—004为自动任务,005.006为手动任务 - -### 具体实现 - -1. 在HAP的“resources/base/profile”路径下,新建启动框架配置文件。文件名可以自定义,本文以"startup_config.json"为例。 -2. 在module.json5配置文件的appStartup标签中,添加启动框架配置文件的索引。 -3. 在“ets/startup”路径下,创建启动参数配置文件。本例中的文件名为StartupConfig.ets。 -4. 在启动框架配置文件startup_config.json中,添加启动参数配置文件的相关信息。 -5. 在“ets/startup”路径下,依次创建启动任务文件。 -6. 在启动框架配置文件startup_config.json中,添加启动任务配置 -7. 创建so文件。 -8. 在启动框架配置文件startup_config.json中,添加预加载so任务配置。 - -### 相关权限 - -不涉及。 - -### 依赖 - -不涉及。 - -### 约束与限制 - -1.本示例仅支持标准系统上运行,支持设备:RK3568。 - -2.本示例已适配API version 10版本SDK,版本号:4.0.10.13。 - -3.本示例需要使用DevEco Studio 4.0 (Build Version: 4.0.0.600 构建 2023年10月17日)及以上版本才可编译运行。 - -### 下载 - -如需单独下载本工程,执行如下命令: - -``` -git init -git config core.sparsecheckout true -echo code/DocsSample/Ability/Performance/MetaCompetence/ > .git/info/sparse-checkout -git remote add origin https://gitcode.com/openharmony/applications_app_samples.git -git pull origin master -``` \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/build-profile.json5 b/AbilityKit/MetaCompetences/build-profile.json5 deleted file mode 100644 index 1e8b118f7c00b90783f8cdc47d0b2235cc0dc3eb..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/build-profile.json5 +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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. - */ -{ - "app": { - "signingConfigs": [ - ], - "products": [ - { - "name": "default", - "signingConfig": "default", - "targetSdkVersion": "6.0.0(20)", - "compatibleSdkVersion": "6.0.0(20)", - "runtimeOS": "HarmonyOS", - "buildOption": { - "nativeCompiler": "BiSheng", - "strictMode": { - "caseSensitiveCheck": true, - "useNormalizedOHMUrl": true - } - } - } - ], - "buildModeSet": [ - { - "name": "debug", - }, - { - "name": "release" - } - ] - }, - "modules": [ - { - "name": "entry", - "srcPath": "./entry", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default" - ] - } - ] - }, - { - "name": "hsp1", - "srcPath": "./hsp1", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default" - ] - } - ] - }, - { - "name": "hsp2", - "srcPath": "./hsp2", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default" - ] - } - ] - }, - { - "name": "har1", - "srcPath": "./har1", - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/code-linter.json5 b/AbilityKit/MetaCompetences/code-linter.json5 deleted file mode 100644 index 5c4682f8164874ec7e9cb8f99ff8b3228ffbc126..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/code-linter.json5 +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ -{ - "files": [ - "**/*.ets" - ], - "ignore": [ - "**/src/ohosTest/**/*", - "**/src/test/**/*", - "**/src/mock/**/*", - "**/node_modules/**/*", - "**/oh_modules/**/*", - "**/build/**/*", - "**/.preview/**/*" - ], - "ruleSet": [ - "plugin:@performance/recommended", - "plugin:@typescript-eslint/recommended" - ], - "rules": { - "@security/no-unsafe-aes": "error", - "@security/no-unsafe-hash": "error", - "@security/no-unsafe-mac": "warn", - "@security/no-unsafe-dh": "error", - "@security/no-unsafe-dsa": "error", - "@security/no-unsafe-ecdsa": "error", - "@security/no-unsafe-rsa-encrypt": "error", - "@security/no-unsafe-rsa-sign": "error", - "@security/no-unsafe-rsa-key": "error", - "@security/no-unsafe-dsa-key": "error", - "@security/no-unsafe-dh-key": "error", - "@security/no-unsafe-3des": "error" - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/build-profile.json5 b/AbilityKit/MetaCompetences/entry/build-profile.json5 deleted file mode 100644 index 528494d151fe49cd020925a880db21599485a7c1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/build-profile.json5 +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -{ - "apiType": "stageMode", - "buildOption": { - "resOptions": { - "copyCodeResource": { - "enable": false - } - }, - "externalNativeOptions": { - "path": "./src/main/cpp/CMakeLists.txt", - "arguments": "", - "cppFlags": "", - "abiFilters": ["arm64-v8a", "x86_64"] - } - }, - "buildOptionSet": [ - { - "name": "release", - "arkOptions": { - "obfuscation": { - "ruleOptions": { - "enable": false, - "files": [ - "./obfuscation-rules.txt" - ] - } - } - }, - "nativeLib": { - "debugSymbol": { - "strip": true, - "exclude": [] - } - } - }, - ], - "targets": [ - { - "name": "default" - }, - { - "name": "ohosTest", - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/hvigorfile.ts b/AbilityKit/MetaCompetences/entry/hvigorfile.ts deleted file mode 100644 index f8b117a17af3b2d7cb87a7680e29e2bb8ccd5b46..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/hvigorfile.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -import { hapTasks } from '@ohos/hvigor-ohos-plugin'; - -export default { - system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/obfuscation-rules.txt b/AbilityKit/MetaCompetences/entry/obfuscation-rules.txt deleted file mode 100644 index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/obfuscation-rules.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Define project specific obfuscation rules here. -# You can include the obfuscation configuration files in the current module's build-profile.json5. -# -# For more details, see -# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 - -# Obfuscation options: -# -disable-obfuscation: disable all obfuscations -# -enable-property-obfuscation: obfuscate the property names -# -enable-toplevel-obfuscation: obfuscate the names in the global scope -# -compact: remove unnecessary blank spaces and all line feeds -# -remove-log: remove all console.* statements -# -print-namecache: print the name cache that contains the mapping from the old names to new names -# -apply-namecache: reuse the given cache file - -# Keep options: -# -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope - --enable-property-obfuscation --enable-toplevel-obfuscation --enable-filename-obfuscation --enable-export-obfuscation \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/oh-package.json5 b/AbilityKit/MetaCompetences/entry/oh-package.json5 deleted file mode 100644 index f792f2d8d3f18173b8e21a4ecd343dadfdc176a8..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/oh-package.json5 +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ -{ - "name": "entry", - "version": "1.0.0", - "description": "Please describe the basic information.", - "main": "", - "author": "", - "license": "", - "dependencies": { - "libentry_001.so": "file:./src/main/cpp/types/libentry1", - "libentry_002.so": "file:./src/main/cpp/types/libentry2", - "libentry_003.so": "file:./src/main/cpp/types/libentry3", - "libentry_004.so": "file:./src/main/cpp/types/libentry4", - "libentry_005.so": "file:./src/main/cpp/types/libentry5", - "libentry_006.so": "file:./src/main/cpp/types/libentry6" - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/CMakeLists.txt b/AbilityKit/MetaCompetences/entry/src/main/cpp/CMakeLists.txt deleted file mode 100644 index 64866a9f5fa99a84ac1e426f25ae51a205b393c8..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# the minimum version of CMake. -cmake_minimum_required(VERSION 3.5.0) -project(MetaCompetences) - -set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) - -if(DEFINED PACKAGE_FIND_FILE) - include(${PACKAGE_FIND_FILE}) -endif() - -include_directories(${NATIVERENDER_ROOT_PATH} - ${NATIVERENDER_ROOT_PATH}/include) - -add_library(entry_001 SHARED napi_init1.cpp) -add_library(entry_002 SHARED napi_init2.cpp) -add_library(entry_003 SHARED napi_init3.cpp) -add_library(entry_004 SHARED napi_init4.cpp) -add_library(entry_005 SHARED napi_init5.cpp) -add_library(entry_006 SHARED napi_init6.cpp) - - -target_link_libraries(entry_001 PUBLIC libace_napi.z.so entry_002 entry_003) - -target_link_libraries(entry_002 PUBLIC libace_napi.z.so entry_003 entry_004) - -target_link_libraries(entry_003 PUBLIC libace_napi.z.so entry_004) - -target_link_libraries(entry_004 PUBLIC libace_napi.z.so) - -target_link_libraries(entry_005 PUBLIC libace_napi.z.so entry_006) - -target_link_libraries(entry_006 PUBLIC libace_napi.z.so) \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init1.cpp b/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init1.cpp deleted file mode 100644 index 4a6e38e6722dad22dba1ebda2d737c7e87c8d7d1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init1.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -#include "napi/native_api.h" - -static napi_value Add(napi_env env, napi_callback_info info) -{ - size_t argc = 2; - napi_value args[2] = {nullptr}; - - napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); - - napi_valuetype valuetype0; - napi_typeof(env, args[0], &valuetype0); - - napi_valuetype valuetype1; - napi_typeof(env, args[1], &valuetype1); - - double value0; - napi_get_value_double(env, args[0], &value0); - - double value1; - napi_get_value_double(env, args[1], &value1); - - napi_value sum; - napi_create_double(env, value0 + value1, &sum); - - return sum; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - { "add", nullptr, Add, nullptr, nullptr, nullptr, napi_default, nullptr } - }; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "entry_001", - .nm_priv = ((void*)0), - .reserved = { 0 }, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule(void) -{ - napi_module_register(&demoModule); -} diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init2.cpp b/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init2.cpp deleted file mode 100644 index af55e2fb547ac98a741273ae02c038c20a38fd3e..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init2.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -#include "napi/native_api.h" - -static napi_value Add(napi_env env, napi_callback_info info) -{ - size_t argc = 2; - napi_value args[2] = {nullptr}; - - napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); - - napi_valuetype valuetype0; - napi_typeof(env, args[0], &valuetype0); - - napi_valuetype valuetype1; - napi_typeof(env, args[1], &valuetype1); - - double value0; - napi_get_value_double(env, args[0], &value0); - - double value1; - napi_get_value_double(env, args[1], &value1); - - napi_value sum; - napi_create_double(env, value0 + value1, &sum); - - return sum; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - { "add", nullptr, Add, nullptr, nullptr, nullptr, napi_default, nullptr } - }; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "entry_002", - .nm_priv = ((void*)0), - .reserved = { 0 }, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule(void) -{ - napi_module_register(&demoModule); -} diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init3.cpp b/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init3.cpp deleted file mode 100644 index 2e2ebe1a75b9739e5daae0843df657a65ebe9fe5..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init3.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -#include "napi/native_api.h" - -static napi_value Add(napi_env env, napi_callback_info info) -{ - size_t argc = 2; - napi_value args[2] = {nullptr}; - - napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); - - napi_valuetype valuetype0; - napi_typeof(env, args[0], &valuetype0); - - napi_valuetype valuetype1; - napi_typeof(env, args[1], &valuetype1); - - double value0; - napi_get_value_double(env, args[0], &value0); - - double value1; - napi_get_value_double(env, args[1], &value1); - - napi_value sum; - napi_create_double(env, value0 + value1, &sum); - - return sum; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - { "add", nullptr, Add, nullptr, nullptr, nullptr, napi_default, nullptr } - }; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "entry_003", - .nm_priv = ((void*)0), - .reserved = { 0 }, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule(void) -{ - napi_module_register(&demoModule); -} diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init4.cpp b/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init4.cpp deleted file mode 100644 index febd99bfcef9b306a9bc3ddfed07342504bc0581..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init4.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -#include "napi/native_api.h" - -static napi_value Add(napi_env env, napi_callback_info info) -{ - size_t argc = 2; - napi_value args[2] = {nullptr}; - - napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); - - napi_valuetype valuetype0; - napi_typeof(env, args[0], &valuetype0); - - napi_valuetype valuetype1; - napi_typeof(env, args[1], &valuetype1); - - double value0; - napi_get_value_double(env, args[0], &value0); - - double value1; - napi_get_value_double(env, args[1], &value1); - - napi_value sum; - napi_create_double(env, value0 + value1, &sum); - - return sum; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - { "add", nullptr, Add, nullptr, nullptr, nullptr, napi_default, nullptr } - }; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "entry_004", - .nm_priv = ((void*)0), - .reserved = { 0 }, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule(void) -{ - napi_module_register(&demoModule); -} diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init5.cpp b/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init5.cpp deleted file mode 100644 index e6f35e0e2279728bacfcf34ac943cba5d24b2346..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init5.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -#include "napi/native_api.h" - -static napi_value Add(napi_env env, napi_callback_info info) -{ - size_t argc = 2; - napi_value args[2] = {nullptr}; - - napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); - - napi_valuetype valuetype0; - napi_typeof(env, args[0], &valuetype0); - - napi_valuetype valuetype1; - napi_typeof(env, args[1], &valuetype1); - - double value0; - napi_get_value_double(env, args[0], &value0); - - double value1; - napi_get_value_double(env, args[1], &value1); - - napi_value sum; - napi_create_double(env, value0 + value1, &sum); - - return sum; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - { "add", nullptr, Add, nullptr, nullptr, nullptr, napi_default, nullptr } - }; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "entry_005", - .nm_priv = ((void*)0), - .reserved = { 0 }, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule(void) -{ - napi_module_register(&demoModule); -} diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init6.cpp b/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init6.cpp deleted file mode 100644 index b0fbfcb3be27320402d9b035754dfea9ac57a084..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/napi_init6.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -#include "napi/native_api.h" - -static napi_value Add(napi_env env, napi_callback_info info) -{ - size_t argc = 2; - napi_value args[2] = {nullptr}; - - napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); - - napi_valuetype valuetype0; - napi_typeof(env, args[0], &valuetype0); - - napi_valuetype valuetype1; - napi_typeof(env, args[1], &valuetype1); - - double value0; - napi_get_value_double(env, args[0], &value0); - - double value1; - napi_get_value_double(env, args[1], &value1); - - napi_value sum; - napi_create_double(env, value0 + value1, &sum); - - return sum; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - { "add", nullptr, Add, nullptr, nullptr, nullptr, napi_default, nullptr } - }; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "entry_006", - .nm_priv = ((void*)0), - .reserved = { 0 }, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule(void) -{ - napi_module_register(&demoModule); -} diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry1/Index.d.ts b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry1/Index.d.ts deleted file mode 100644 index 13a34842c293a6773ab293fd9e206d13e0a18bb1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry1/Index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry1/oh-package.json5 b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry1/oh-package.json5 deleted file mode 100644 index 0c627e92b8c6ce9cf1c57a1e667581242ff41746..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry1/oh-package.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -{ - "name": "libentry_001.so", - "types": "./Index.d.ts", - "version": "1.0.0", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry2/Index.d.ts b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry2/Index.d.ts deleted file mode 100644 index 13a34842c293a6773ab293fd9e206d13e0a18bb1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry2/Index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry2/oh-package.json5 b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry2/oh-package.json5 deleted file mode 100644 index 1cd7b67d725569da63ab62131a0d941118cf580a..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry2/oh-package.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -{ - "name": "libentry_002.so", - "types": "./Index.d.ts", - "version": "1.0.0", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry3/Index.d.ts b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry3/Index.d.ts deleted file mode 100644 index 13a34842c293a6773ab293fd9e206d13e0a18bb1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry3/Index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry3/oh-package.json5 b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry3/oh-package.json5 deleted file mode 100644 index 263ab4daaf83e12674d7272cd85914e19cc76c12..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry3/oh-package.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -{ - "name": "libentry_003.so", - "types": "./Index.d.ts", - "version": "1.0.0", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry4/Index.d.ts b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry4/Index.d.ts deleted file mode 100644 index 13a34842c293a6773ab293fd9e206d13e0a18bb1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry4/Index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry4/oh-package.json5 b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry4/oh-package.json5 deleted file mode 100644 index 82d9873bb634c6ca2b5072e7407ac7b7f73f0cb0..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry4/oh-package.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -{ - "name": "libentry_004.so", - "types": "./Index.d.ts", - "version": "1.0.0", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry5/Index.d.ts b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry5/Index.d.ts deleted file mode 100644 index 13a34842c293a6773ab293fd9e206d13e0a18bb1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry5/Index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry5/oh-package.json5 b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry5/oh-package.json5 deleted file mode 100644 index 0ce5b726a7a0072822abf1c68cd53c3bc654b3c2..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry5/oh-package.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -{ - "name": "libentry_005.so", - "types": "./Index.d.ts", - "version": "1.0.0", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry6/Index.d.ts b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry6/Index.d.ts deleted file mode 100644 index 13a34842c293a6773ab293fd9e206d13e0a18bb1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry6/Index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry6/oh-package.json5 b/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry6/oh-package.json5 deleted file mode 100644 index 464f22f93a784c48aa4c8fa23d47446f1a45e1aa..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/cpp/types/libentry6/oh-package.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -{ - "name": "libentry_006.so", - "types": "./Index.d.ts", - "version": "1.0.0", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/ets/entryability/EntryAbility.ets b/AbilityKit/MetaCompetences/entry/src/main/ets/entryability/EntryAbility.ets deleted file mode 100644 index 785f2fdee55fff28f81065144b6f70b442785081..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/ets/entryability/EntryAbility.ets +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ -// [Start startup007] -import { AbilityConstant, UIAbility, Want , startupManager} from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { BusinessError } from '@kit.BasicServicesKit'; -// [StartExclude startup007] -import { window } from '@kit.ArkUI'; -const DOMAIN = 0x0000; -// [EndExclude startup007] - -export default class EntryAbility extends UIAbility { - onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { - let startParams = ['StartupTask_005', 'StartupTask_006']; - try { - startupManager.run(startParams).then(() => { - console.info(`StartupTest startupManager run then, startParams = ${JSON.stringify(startParams)}.`); - }).catch((error: BusinessError) => { - console.error(`StartupTest promise catch error, error = ${JSON.stringify(error)}.`); - console.error(`StartupTest promise catch error, startParams = ${JSON.stringify(startParams)}.`); - }) - } catch (error) { - let errMsg = (error as BusinessError).message; - let errCode = (error as BusinessError).code; - console.error(`Startup catch error, errCode= ${errCode}.`); - console.error(`Startup catch error, errMsg= ${errMsg}.`); - } - } - // [StartExclude startup007] - onDestroy(): void { - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage): void { - // Main window is created, set main page for this ability - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); - - windowStage.loadContent('pages/Index', (err) => { - if (err.code) { - hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); - return; - } - hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); - }); - } - - onWindowStageDestroy(): void { - // Main window is destroyed, release UI related resources - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); - } - - onForeground(): void { - // Ability has brought to foreground - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); - } - - onBackground(): void { - // Ability has back to background - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); - } - // [EndExclude startup007] -} -// [End startup007] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/AbilityKit/MetaCompetences/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets deleted file mode 100644 index 4ce6449f0e91914e73d4502c9f2e8e9a395ea4b1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; - -const DOMAIN = 0x0000; - -export default class EntryBackupAbility extends BackupExtensionAbility { - async onBackup() { - hilog.info(DOMAIN, 'testTag', 'onBackup ok'); - await Promise.resolve(); - } - - async onRestore(bundleVersion: BundleVersion) { - hilog.info(DOMAIN, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); - await Promise.resolve(); - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/ets/pages/Index.ets b/AbilityKit/MetaCompetences/entry/src/main/ets/pages/Index.ets deleted file mode 100644 index 2196ccd0314af9fec6a4f6f3459b342410982f62..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/ets/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ -// [Start startup008] -import { startupManager } from '@kit.AbilityKit'; - -@Entry -@Component -struct Index { - @State message: ResourceStr = $r('app.string.manual_mode'); - @State startParams1: Array = ['StartupTask_006']; - @State startParams2: Array = ['libentry_006']; - - build() { - RelativeContainer() { - Button(this.message) - .id('AppStartup') - .fontSize(20) - .fontWeight(FontWeight.Bold) - .onClick(() => { - if (!startupManager.isStartupTaskInitialized('StartupTask_006') ) { // 判断是否已经完成初始化 - startupManager.run(this.startParams1); - } - if (!startupManager.isStartupTaskInitialized('libentry_006') ) { - startupManager.run(this.startParams2); - } - }) - .alignRules({ - center: {anchor: '__container__', align: VerticalAlign.Center}, - middle: {anchor: '__container__', align: HorizontalAlign.Center} - }) - } - .height('100%') - .width('100%') - } -} -// [End startup008] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupConfig.ets b/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupConfig.ets deleted file mode 100644 index 46e43ace91e474803ab1851c9f5c59257bc70475..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupConfig.ets +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ -// [Start startup002] -// [Start startup009] -import { StartupConfig, StartupConfigEntry, StartupListener,Want } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { BusinessError } from '@kit.BasicServicesKit'; - -export default class MyStartupConfigEntry extends StartupConfigEntry { - // [StartExclude startup009] - onConfig() { - hilog.info(0x0000, 'testTag', `onConfig`); - let onCompletedCallback = (error: BusinessError) => { - hilog.info(0x0000, 'testTag', `onCompletedCallback`); - if (error) { - hilog.error(0x0000, 'testTag', 'onCompletedCallback: %{public}d, message: %{public}s', error.code, error.message); - } else { - hilog.info(0x0000, 'testTag', `onCompletedCallback: success.`); - } - }; - let startupListener: StartupListener = { - 'onCompleted': onCompletedCallback - }; - let config: StartupConfig = { - 'timeoutMs': 10000, - 'startupListener': startupListener - }; - return config; - } - // [EndExclude startup009] - // [StartExclude startup002] - onRequestCustomMatchRule(want: Want): string { - if (want?.parameters?.fromType == 'card') { - return 'ruleCard'; - } - return ''; - } - // [EndExclude startup002] -} -// [End startup009] -// [End startup002] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_001.ets b/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_001.ets deleted file mode 100644 index 604e10a013f6923762ae068785806c0a0040def1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_001.ets +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ -// [Start startup003] -import { StartupTask, common } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -@Sendable -export default class StartupTask001 extends StartupTask { - constructor() { - super(); - } - - async init(context: common.AbilityStageContext) { - hilog.info(0x0000, 'testTag', 'StartupTask_001 init.'); - return 'StartupTask_001'; - } - - onDependencyCompleted(dependence: string, result: Object): void { - hilog.info(0x0000, 'testTag', 'StartupTask_001 onDependencyCompleted, dependence: %{public}s, result: %{public}s', - dependence, JSON.stringify(result)); - } -} -// [End startup003] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_002.ets b/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_002.ets deleted file mode 100644 index 38f8c467cba7e4e05b45b192491a2852b30d8273..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_002.ets +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -import { StartupTask, common } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -@Sendable -export default class StartupTask002 extends StartupTask { - constructor() { - super(); - } - - async init(context: common.AbilityStageContext) { - hilog.info(0x0000, 'testTag', 'StartupTask_002 init.'); - return 'StartupTask_002'; - } - - onDependencyCompleted(dependence: string, result: Object): void { - hilog.info(0x0000, 'testTag', 'StartupTask_002 onDependencyCompleted, dependence: %{public}s, result: %{public}s', - dependence, JSON.stringify(result)); - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_003.ets b/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_003.ets deleted file mode 100644 index 66ae55d299b8e7a01f247ef32291813118e19464..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_003.ets +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -import { StartupTask, common } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -@Sendable -export default class StartupTask003 extends StartupTask { - constructor() { - super(); - } - - async init(context: common.AbilityStageContext) { - hilog.info(0x0000, 'testTag', 'StartupTask_003 init.'); - return 'StartupTask_003'; - } - - onDependencyCompleted(dependence: string, result: Object): void { - hilog.info(0x0000, 'testTag', 'StartupTask_003 onDependencyCompleted, dependence: %{public}s, result: %{public}s', - dependence, JSON.stringify(result)); - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_004.ets b/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_004.ets deleted file mode 100644 index 5d08ebd551203a3b10dd88d5be0ef913a2295d09..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_004.ets +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -import { StartupTask, common } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -@Sendable -export default class StartupTask004 extends StartupTask { - constructor() { - super(); - } - - async init(context: common.AbilityStageContext) { - hilog.info(0x0000, 'testTag', 'StartupTask_004 init.'); - return 'StartupTask_004'; - } - - onDependencyCompleted(dependence: string, result: Object): void { - hilog.info(0x0000, 'testTag', 'StartupTask_004 onDependencyCompleted, dependence: %{public}s, result: %{public}s', - dependence, JSON.stringify(result)); - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_005.ets b/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_005.ets deleted file mode 100644 index 2c7859d965cd2adb087b71044de9e6fa5e15b271..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_005.ets +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -import { StartupTask, common } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -@Sendable -export default class StartupTask005 extends StartupTask { - constructor() { - super(); - } - - async init(context: common.AbilityStageContext) { - hilog.info(0x0000, 'testTag', 'StartupTask_005 init.'); - return 'StartupTask_005'; - } - - onDependencyCompleted(dependence: string, result: Object): void { - hilog.info(0x0000, 'testTag', 'StartupTask_005 onDependencyCompleted, dependence: %{public}s, result: %{public}s', - dependence, JSON.stringify(result)); - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_006.ets b/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_006.ets deleted file mode 100644 index e5f80c1f20dfc143ed854de4427990d4557e30aa..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/ets/startup/StartupTask_006.ets +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -import { StartupTask, common } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -@Sendable -export default class StartupTask006 extends StartupTask { - constructor() { - super(); - } - - async init(context: common.AbilityStageContext) { - hilog.info(0x0000, 'testTag', 'StartupTask_006 init.'); - return 'StartupTask_006'; - } - - onDependencyCompleted(dependence: string, result: Object): void { - hilog.info(0x0000, 'testTag', 'StartupTask_006 onDependencyCompleted, dependence: %{public}s, result: %{public}s', - dependence, JSON.stringify(result)); - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/module.json5 b/AbilityKit/MetaCompetences/entry/src/main/module.json5 deleted file mode 100644 index 2500f6ebd305cbdad700e5be87f0618c43df1209..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/module.json5 +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ -// [Start startup001] -{ - "module": { - "name": "entry", - "type": "entry", - // [StartExclude startup001] - "description": "$string:module_desc", - "mainElement": "EntryAbility", - "deviceTypes": [ - "default" - ], - // [EndExclude startup001] - "appStartup": "$profile:startup_config", // 启动框架的配置文件 - // [StartExclude startup001] - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "EntryAbility", - "srcEntry": "./ets/entryability/EntryAbility.ets", - "description": "$string:EntryAbility_desc", - "icon": "$media:layered_image", - "label": "$string:EntryAbility_label", - "startWindowIcon": "$media:startIcon", - "startWindowBackground": "$color:start_window_background", - "exported": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "name": "EntryBackupAbility", - "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", - "type": "backup", - "exported": false, - "metadata": [ - { - "name": "ohos.extension.backup", - "resource": "$profile:backup_config" - } - ], - } - ], - // [EndExclude startup001] - } -} -// [End startup001] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/base/element/color.json b/AbilityKit/MetaCompetences/entry/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962da3c2751c2b9ddb53559afcbd2b54a02..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/resources/base/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "start_window_background", - "value": "#FFFFFF" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/base/element/float.json b/AbilityKit/MetaCompetences/entry/src/main/resources/base/element/float.json deleted file mode 100644 index 33ea22304f9b1485b5f22d811023701b5d4e35b6..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/resources/base/element/float.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "float": [ - { - "name": "page_text_font_size", - "value": "50fp" - } - ] -} diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/base/element/string.json b/AbilityKit/MetaCompetences/entry/src/main/resources/base/element/string.json deleted file mode 100644 index a608af7abba949fa7d83b0c8ec9414504aeccfd7..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "module description" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "label" - }, - { - "name": "manual_mode", - "value": "手动模式" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/background.png b/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/background.png deleted file mode 100644 index 923f2b3f27e915d6871871deea0420eb45ce102f..0000000000000000000000000000000000000000 Binary files a/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/background.png and /dev/null differ diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/foreground.png b/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/foreground.png deleted file mode 100644 index 97014d3e10e5ff511409c378cd4255713aecd85f..0000000000000000000000000000000000000000 Binary files a/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/foreground.png and /dev/null differ diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/layered_image.json b/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/layered_image.json deleted file mode 100644 index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/layered_image.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "layered-image": - { - "background" : "$media:background", - "foreground" : "$media:foreground" - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/startIcon.png b/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/startIcon.png deleted file mode 100644 index 205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b..0000000000000000000000000000000000000000 Binary files a/AbilityKit/MetaCompetences/entry/src/main/resources/base/media/startIcon.png and /dev/null differ diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/base/profile/backup_config.json b/AbilityKit/MetaCompetences/entry/src/main/resources/base/profile/backup_config.json deleted file mode 100644 index 78f40ae7c494d71e2482278f359ec790ca73471a..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/resources/base/profile/backup_config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "allowToBackupRestore": true -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/base/profile/main_pages.json b/AbilityKit/MetaCompetences/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 1898d94f58d6128ab712be2c68acc7c98e9ab9ce..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/Index" - ] -} diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/base/profile/startup_config.json b/AbilityKit/MetaCompetences/entry/src/main/resources/base/profile/startup_config.json deleted file mode 100644 index 055de23f0aec2038eacbf7bdf2d36350a25caea6..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/resources/base/profile/startup_config.json +++ /dev/null @@ -1,120 +0,0 @@ - -{ - "startupTasks": [ - { - "name": "StartupTask_001", - "srcEntry": "./ets/startup/StartupTask_001.ets", - "dependencies": [ - "StartupTask_002", - "StartupTask_003" - ], - "runOnThread": "taskPool", - "waitOnMainThread": false - }, - { - "name": "StartupTask_002", - "srcEntry": "./ets/startup/StartupTask_002.ets", - "dependencies": [ - "StartupTask_003", - "StartupTask_004" - ], - "runOnThread": "taskPool", - "waitOnMainThread": false - }, - { - "name": "StartupTask_003", - "srcEntry": "./ets/startup/StartupTask_003.ets", - "dependencies": [ - "StartupTask_004" - ], - "runOnThread": "taskPool", - "waitOnMainThread": false - }, - { - "name": "StartupTask_004", - "srcEntry": "./ets/startup/StartupTask_004.ets", - "runOnThread": "taskPool", - "waitOnMainThread": false, - "schedulerPhase": "preAbilityStageLoad", - "matchRules": { - "uris": [ - "test://com.example.startupdemo/notification" - ] - } - }, - { - "name": "StartupTask_005", - "srcEntry": "./ets/startup/StartupTask_005.ets", - "dependencies": [ - "StartupTask_006" - ], - "runOnThread": "mainThread", - "waitOnMainThread": true, - "excludeFromAutoStart": true - }, - { - "name": "StartupTask_006", - "srcEntry": "./ets/startup/StartupTask_006.ets", - "runOnThread": "mainThread", - "waitOnMainThread": false, - "excludeFromAutoStart": true, - "matchRules": { - "uris": [ - "test://com.example.startupdemo/notification" - ], - "customization": [ - "ruleCard" - ] - } - } - ], - "appPreloadHintStartupTasks": [ - { - "name": "libentry_001", - "srcEntry": "libentry_001.so", - "dependencies": [ - "libentry_002", - "libentry_003" - ], - "runOnThread": "taskPool" - }, - { - "name": "libentry_002", - "srcEntry": "libentry_002.so", - "dependencies": [ - "libentry_003", - "libentry_004" - ], - "runOnThread": "taskPool" - }, - { - "name": "libentry_003", - "srcEntry": "libentry_003.so", - "dependencies": [ - "libentry_004" - ], - "runOnThread": "taskPool" - }, - { - "name": "libentry_004", - "srcEntry": "libentry_004.so", - "runOnThread": "taskPool" - }, - { - "name": "libentry_005", - "srcEntry": "libentry_005.so", - "dependencies": [ - "libentry_006" - ], - "runOnThread": "taskPool", - "excludeFromAutoStart": true - }, - { - "name": "libentry_006", - "srcEntry": "libentry_006.so", - "runOnThread": "taskPool", - "excludeFromAutoStart": true - } - ], - "configEntry": "./ets/startup/StartupConfig.ets" -} diff --git a/AbilityKit/MetaCompetences/entry/src/main/resources/dark/element/color.json b/AbilityKit/MetaCompetences/entry/src/main/resources/dark/element/color.json deleted file mode 100644 index 79b11c2747aec33e710fd3a7b2b3c94dd9965499..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/main/resources/dark/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "start_window_background", - "value": "#000000" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/mock/Libentry.mock.ets b/AbilityKit/MetaCompetences/entry/src/mock/Libentry.mock.ets deleted file mode 100644 index 82fa70b5693ddab96d237d2d17d943d866b61465..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/mock/Libentry.mock.ets +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ -const NativeMock: Record = { - 'add': (a: number, b: number) => { - return a + b; - }, -}; - -export default NativeMock; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/mock/mock-config.json5 b/AbilityKit/MetaCompetences/entry/src/mock/mock-config.json5 deleted file mode 100644 index 98b0ae79f0090e1fc381d54c959fb32c9f7563f4..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/mock/mock-config.json5 +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ -{ - "libentry.so": { - "source": "src/mock/Libentry.mock.ets" - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/ohosTest/ets/test/Ability.test.ets b/AbilityKit/MetaCompetences/entry/src/ohosTest/ets/test/Ability.test.ets deleted file mode 100644 index 141eb908484c8f498b4161f24fe3c4c9ae8e0c65..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/ohosTest/ets/test/Ability.test.ets +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - */ -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; -import { startupManager, Want } from '@kit.AbilityKit'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import { BusinessError } from '@kit.BasicServicesKit'; - -let want: Want = { - bundleName: 'com.samples.MetaCompetences', - abilityName: 'EntryAbility', -} - -function sleep(time: number) { - return new Promise((resolve: Function) => setTimeout(resolve, time)); -} - -export default function abilityTest() { - describe('ActsAbilityTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }) - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }) - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }) - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }) - it('MetaCompetences_StartAbility_0100', 0, async (done:Function) => { - let startParams = ['StartupTask_005', 'StartupTask_006']; - try{ - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator(); - await abilityDelegatorRegistry.startAbility(want); - done(); - }catch(e){ - expect(false).assertTrue(); - done(); - } - }) - }) -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/ohosTest/ets/test/List.test.ets b/AbilityKit/MetaCompetences/entry/src/ohosTest/ets/test/List.test.ets deleted file mode 100644 index c64e0b06938d246ce044186d4b2d02b500a89e14..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/ohosTest/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ -import abilityTest from './Ability.test'; - -export default function testsuite() { - abilityTest(); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/ohosTest/module.json5 b/AbilityKit/MetaCompetences/entry/src/ohosTest/module.json5 deleted file mode 100644 index 59667117c86b64ab9863f7b382c435ae4a3c32fa..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/ohosTest/module.json5 +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -{ - "module": { - "name": "entry_test", - "type": "feature", - "deviceTypes": [ - "default" - ], - "deliveryWithInstall": true, - "installationFree": false - } -} diff --git a/AbilityKit/MetaCompetences/entry/src/test/List.test.ets b/AbilityKit/MetaCompetences/entry/src/test/List.test.ets deleted file mode 100644 index a60c87c5cbb0badf7c3fd8975034590e6fafa992..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/entry/src/test/LocalUnit.test.ets b/AbilityKit/MetaCompetences/entry/src/test/LocalUnit.test.ets deleted file mode 100644 index 841bfd77e56060e50ec0924302a5ae624e76e3aa..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/entry/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }); - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }); - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }); - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }); - }); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/.gitignore b/AbilityKit/MetaCompetences/har1/.gitignore deleted file mode 100644 index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/node_modules -/oh_modules -/.preview -/build -/.cxx -/.test \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/Index.ets b/AbilityKit/MetaCompetences/har1/Index.ets deleted file mode 100644 index 35860d4eac351bcd9cda3537b5d24b18db8316be..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/Index.ets +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 { MainPage } from './src/main/ets/components/MainPage'; diff --git a/AbilityKit/MetaCompetences/har1/build-profile.json5 b/AbilityKit/MetaCompetences/har1/build-profile.json5 deleted file mode 100644 index abbf158309fcaf2b6e1b8b582ea5b783cf8a8f6c..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/build-profile.json5 +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -{ - "apiType": "stageMode", - "buildOption": { - "resOptions": { - "copyCodeResource": { - "enable": false - } - }, - "externalNativeOptions": { - "path": "./src/main/cpp/CMakeLists.txt", // CMake脚本路径 - "abiFilters": ["arm64-v8a", "x86_64"] // 编译目标架构 - } - }, - "buildOptionSet": [ - { - "name": "release", - "arkOptions": { - "obfuscation": { - "ruleOptions": { - "enable": false, - "files": [ - "./obfuscation-rules.txt" - ] - }, - "consumerFiles": [ - "./consumer-rules.txt" - ] - } - }, - }, - ], - "targets": [ - { - "name": "default" - }, - { - "name": "ohosTest" - } - ] -} diff --git a/AbilityKit/MetaCompetences/har1/consumer-rules.txt b/AbilityKit/MetaCompetences/har1/consumer-rules.txt deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/AbilityKit/MetaCompetences/har1/hvigorfile.ts b/AbilityKit/MetaCompetences/har1/hvigorfile.ts deleted file mode 100644 index 0ebbf7729c020d9937096de85d9ba2e494669076..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/hvigorfile.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -import { harTasks } from '@ohos/hvigor-ohos-plugin'; - -export default { - system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/obfuscation-rules.txt b/AbilityKit/MetaCompetences/har1/obfuscation-rules.txt deleted file mode 100644 index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/obfuscation-rules.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Define project specific obfuscation rules here. -# You can include the obfuscation configuration files in the current module's build-profile.json5. -# -# For more details, see -# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 - -# Obfuscation options: -# -disable-obfuscation: disable all obfuscations -# -enable-property-obfuscation: obfuscate the property names -# -enable-toplevel-obfuscation: obfuscate the names in the global scope -# -compact: remove unnecessary blank spaces and all line feeds -# -remove-log: remove all console.* statements -# -print-namecache: print the name cache that contains the mapping from the old names to new names -# -apply-namecache: reuse the given cache file - -# Keep options: -# -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope - --enable-property-obfuscation --enable-toplevel-obfuscation --enable-filename-obfuscation --enable-export-obfuscation \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/oh-package.json5 b/AbilityKit/MetaCompetences/har1/oh-package.json5 deleted file mode 100644 index 7dd2f6eeb8814c06a01a817c667b6f3b08583fa0..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/oh-package.json5 +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -{ - "name": "har1", - "version": "1.0.0", - "description": "Please describe the basic information.", - "main": "Index.ets", - "author": "", - "license": "Apache-2.0", - "dependencies": { - "libhar1_01.so": "file:./src/main/cpp/types/libhar1" - } -} diff --git a/AbilityKit/MetaCompetences/har1/src/main/cpp/CMakeLists.txt b/AbilityKit/MetaCompetences/har1/src/main/cpp/CMakeLists.txt deleted file mode 100644 index 8077129c66588eef5792c8f50418949bca669c0e..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/cpp/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# the minimum version of CMake. -cmake_minimum_required(VERSION 3.5.0) -project(MetaCompetences) - -set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) - -if(DEFINED PACKAGE_FIND_FILE) - include(${PACKAGE_FIND_FILE}) -endif() - -include_directories(${NATIVERENDER_ROOT_PATH} - ${NATIVERENDER_ROOT_PATH}/include) - -add_library(har1_01 SHARED napi_init1.cpp) - -target_link_libraries(har1_01 PUBLIC libace_napi.z.so) diff --git a/AbilityKit/MetaCompetences/har1/src/main/cpp/napi_init1.cpp b/AbilityKit/MetaCompetences/har1/src/main/cpp/napi_init1.cpp deleted file mode 100644 index 0b88813aef9d552559be169552a8758e6c364b58..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/cpp/napi_init1.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -#include "napi/native_api.h" - -static napi_value Add(napi_env env, napi_callback_info info) -{ - size_t argc = 2; - napi_value args[2] = {nullptr}; - - napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); - - napi_valuetype valuetype0; - napi_typeof(env, args[0], &valuetype0); - - napi_valuetype valuetype1; - napi_typeof(env, args[1], &valuetype1); - - double value0; - napi_get_value_double(env, args[0], &value0); - - double value1; - napi_get_value_double(env, args[1], &value1); - - napi_value sum; - napi_create_double(env, value0 + value1, &sum); - - return sum; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - { "add", nullptr, Add, nullptr, nullptr, nullptr, napi_default, nullptr } - }; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "har1_01", - .nm_priv = ((void*)0), - .reserved = { 0 }, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule1(void) -{ - napi_module_register(&demoModule); -} diff --git a/AbilityKit/MetaCompetences/har1/src/main/cpp/types/libhar1/Index.d.ts b/AbilityKit/MetaCompetences/har1/src/main/cpp/types/libhar1/Index.d.ts deleted file mode 100644 index 13a34842c293a6773ab293fd9e206d13e0a18bb1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/cpp/types/libhar1/Index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/src/main/cpp/types/libhar1/oh-package.json5 b/AbilityKit/MetaCompetences/har1/src/main/cpp/types/libhar1/oh-package.json5 deleted file mode 100644 index e81bc5684eb5f7fa6f7e2113cd4aa121bd159911..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/cpp/types/libhar1/oh-package.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -{ - "name": "libhar1_01.so", - "types": "./Index.d.ts", - "version": "1.0.0", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/src/main/ets/components/MainPage.ets b/AbilityKit/MetaCompetences/har1/src/main/ets/components/MainPage.ets deleted file mode 100644 index 3e169a1165a8dacc1972c86d06d3982ea652ccf7..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/ets/components/MainPage.ets +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -@Component -export struct MainPage { - @State message: string = 'Hello World'; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize($r('app.float.page_text_font_size')) - .fontWeight(FontWeight.Bold) - .onClick(() => { - this.message = 'Welcome'; - }) - } - .width('100%') - } - .height('100%') - } -} diff --git a/AbilityKit/MetaCompetences/har1/src/main/ets/startup/HAR1_Task_01.ets b/AbilityKit/MetaCompetences/har1/src/main/ets/startup/HAR1_Task_01.ets deleted file mode 100644 index 840391ccde02143a4464c9724a6edd2243a25c36..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/ets/startup/HAR1_Task_01.ets +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -import { StartupTask, common } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -@Sendable -export default class HAR2Task01 extends StartupTask { - constructor() { - super(); - } - - async init(context: common.AbilityStageContext) { - hilog.info(0x0000, 'testTag', 'HAR2_Task_01 init.'); - return 'HAR2_Task_01'; - } - - onDependencyCompleted(dependence: string, result: Object): void { - hilog.info(0x0000, 'testTag', 'HAR2_Task_01 onDependencyCompleted, dependence: %{public}s, result: %{public}s', - dependence, JSON.stringify(result)); - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/src/main/ets/startup/StartupConfig.ets b/AbilityKit/MetaCompetences/har1/src/main/ets/startup/StartupConfig.ets deleted file mode 100644 index f0cdc606e7328cba45df4565b9c383c498c79dc0..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/ets/startup/StartupConfig.ets +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ -// [Start startup_config_0100] -import { StartupConfig, StartupConfigEntry, StartupListener } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { BusinessError } from '@kit.BasicServicesKit'; - -export default class MyStartupConfigEntry extends StartupConfigEntry { - onConfig() { - hilog.info(0x0000, 'testTag', `onConfig`); - let onCompletedCallback = (error: BusinessError) => { - hilog.info(0x0000, 'testTag', `onCompletedCallback`); - if (error) { - hilog.error(0x0000, 'testTag', 'onCompletedCallback: %{public}d, message: %{public}s', error.code, error.message); - } else { - hilog.info(0x0000, 'testTag', `onCompletedCallback: success.`); - } - }; - let startupListener: StartupListener = { - 'onCompleted': onCompletedCallback - }; - let config: StartupConfig = { - 'timeoutMs': 10000, - 'startupListener': startupListener - }; - return config; - } -} -// [End startup_config_0100] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/src/main/module.json5 b/AbilityKit/MetaCompetences/har1/src/main/module.json5 deleted file mode 100644 index 5c02ca1a1f60dfdf98982e05762724e2f8746271..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/module.json5 +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ -// [Start startup006] -{ - "module": { - "name": "har1", - "type": "har", - // [StartExclude startup006] - "deviceTypes": [ - "default", - "tablet", - "2in1" - ], - // [EndExclude startup006] - "appStartup": "$profile:startup_config", // 启动框架的配置文件 - } -} -// [End startup006] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/src/main/resources/base/element/float.json b/AbilityKit/MetaCompetences/har1/src/main/resources/base/element/float.json deleted file mode 100644 index 33ea22304f9b1485b5f22d811023701b5d4e35b6..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/resources/base/element/float.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "float": [ - { - "name": "page_text_font_size", - "value": "50fp" - } - ] -} diff --git a/AbilityKit/MetaCompetences/har1/src/main/resources/base/element/string.json b/AbilityKit/MetaCompetences/har1/src/main/resources/base/element/string.json deleted file mode 100644 index f51a9c8461a55f6312ef950344e3145b7f82d607..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "page_show", - "value": "page from package" - } - ] -} diff --git a/AbilityKit/MetaCompetences/har1/src/main/resources/base/profile/startup_config.json b/AbilityKit/MetaCompetences/har1/src/main/resources/base/profile/startup_config.json deleted file mode 100644 index 3afce6cd2e508d592199e9583a70a3a8801501c4..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/main/resources/base/profile/startup_config.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "startupTasks": [ - { - "name": "HSP1_Task_01", - "srcEntry": "./ets/startup/HAR1_Task_01.ets", - "dependencies": [ - "HSP2_Task_01" - ], - "runOnThread": "taskPool", - "waitOnMainThread": false, - "excludeFromAutoStart": true - } - ], - "appPreloadHintStartupTasks": [ - { - "name": "libhar1_01", - "srcEntry": "libhar1_01.so", - "dependencies": [ - "libhsp2_01" - ], - "runOnThread": "taskPool", - "excludeFromAutoStart": true - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/src/ohosTest/ets/test/Ability.test.ets b/AbilityKit/MetaCompetences/har1/src/ohosTest/ets/test/Ability.test.ets deleted file mode 100644 index 7f30942b81554a399e89aa253c7089eca4f8d8d1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/ohosTest/ets/test/Ability.test.ets +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function abilityTest() { - describe('ActsAbilityTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }) - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }) - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }) - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }) - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }) - }) -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/src/ohosTest/ets/test/List.test.ets b/AbilityKit/MetaCompetences/har1/src/ohosTest/ets/test/List.test.ets deleted file mode 100644 index c64e0b06938d246ce044186d4b2d02b500a89e14..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/ohosTest/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ -import abilityTest from './Ability.test'; - -export default function testsuite() { - abilityTest(); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/src/ohosTest/module.json5 b/AbilityKit/MetaCompetences/har1/src/ohosTest/module.json5 deleted file mode 100644 index 5c6f72d827cf45a04bbaae675c813dd353084571..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/ohosTest/module.json5 +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -{ - "module": { - "name": "har1_test", - "type": "feature", - "deviceTypes": [ - "default", - "tablet", - "2in1" - ], - "deliveryWithInstall": true, - "installationFree": false - } -} diff --git a/AbilityKit/MetaCompetences/har1/src/test/List.test.ets b/AbilityKit/MetaCompetences/har1/src/test/List.test.ets deleted file mode 100644 index a60c87c5cbb0badf7c3fd8975034590e6fafa992..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/har1/src/test/LocalUnit.test.ets b/AbilityKit/MetaCompetences/har1/src/test/LocalUnit.test.ets deleted file mode 100644 index 841bfd77e56060e50ec0924302a5ae624e76e3aa..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/har1/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }); - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }); - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }); - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }); - }); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/.gitignore b/AbilityKit/MetaCompetences/hsp1/.gitignore deleted file mode 100644 index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/node_modules -/oh_modules -/.preview -/build -/.cxx -/.test \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/Index.ets b/AbilityKit/MetaCompetences/hsp1/Index.ets deleted file mode 100644 index 057894506c99a71e2b28e614a10d31ce8ea8cfe5..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/Index.ets +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 { add } from './src/main/ets/utils/Calc'; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/build-profile.json5 b/AbilityKit/MetaCompetences/hsp1/build-profile.json5 deleted file mode 100644 index 6aa37298cb55a9f4c94c6b5d56fa9fab963090f8..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/build-profile.json5 +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -{ - "apiType": "stageMode", - "buildOption": { - "resOptions": { - "copyCodeResource": { - "enable": false - } - }, - "externalNativeOptions": { - "path": "./src/main/cpp/CMakeLists.txt", // CMake脚本路径 - "abiFilters": ["arm64-v8a", "x86_64"] // 编译目标架构 - } - }, - "buildOptionSet": [ - { - "name": "release", - "arkOptions": { - "obfuscation": { - "ruleOptions": { - "enable": false, - "files": [ - "./obfuscation-rules.txt" - ] - }, - "consumerFiles": [ - "./consumer-rules.txt" - ] - } - }, - }, - ], - "targets": [ - { - "name": "default" - }, - { - "name": "ohosTest" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/consumer-rules.txt b/AbilityKit/MetaCompetences/hsp1/consumer-rules.txt deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/AbilityKit/MetaCompetences/hsp1/hvigorfile.ts b/AbilityKit/MetaCompetences/hsp1/hvigorfile.ts deleted file mode 100644 index 3685a087a33c2e63c17d4e98660f489c3f31aa25..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/hvigorfile.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -import { hspTasks } from '@ohos/hvigor-ohos-plugin'; - -export default { - system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/obfuscation-rules.txt b/AbilityKit/MetaCompetences/hsp1/obfuscation-rules.txt deleted file mode 100644 index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/obfuscation-rules.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Define project specific obfuscation rules here. -# You can include the obfuscation configuration files in the current module's build-profile.json5. -# -# For more details, see -# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 - -# Obfuscation options: -# -disable-obfuscation: disable all obfuscations -# -enable-property-obfuscation: obfuscate the property names -# -enable-toplevel-obfuscation: obfuscate the names in the global scope -# -compact: remove unnecessary blank spaces and all line feeds -# -remove-log: remove all console.* statements -# -print-namecache: print the name cache that contains the mapping from the old names to new names -# -apply-namecache: reuse the given cache file - -# Keep options: -# -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope - --enable-property-obfuscation --enable-toplevel-obfuscation --enable-filename-obfuscation --enable-export-obfuscation \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/oh-package.json5 b/AbilityKit/MetaCompetences/hsp1/oh-package.json5 deleted file mode 100644 index 6b3d51f04dd0751b539c1515c294f1688143bdd8..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/oh-package.json5 +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -{ - "name": "hsp1", - "version": "1.0.0", - "description": "Please describe the basic information.", - "main": "Index.ets", - "author": "", - "license": "Apache-2.0", - "packageType": "InterfaceHar", - "dependencies": { - "libhsp1_01.so": "file:./src/main/cpp/types/libhsp11", - "libhsp1_02.so": "file:./src/main/cpp/types/libhsp12" - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/CMakeLists.txt b/AbilityKit/MetaCompetences/hsp1/src/main/cpp/CMakeLists.txt deleted file mode 100644 index 33dfca17f0a466a2b5f96b7b2bd590e04211bd3a..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -# the minimum version of CMake. -cmake_minimum_required(VERSION 3.5.0) -project(MetaCompetences) - -set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) - -if(DEFINED PACKAGE_FIND_FILE) - include(${PACKAGE_FIND_FILE}) -endif() - -include_directories(${NATIVERENDER_ROOT_PATH} - ${NATIVERENDER_ROOT_PATH}/include) - -add_library(hsp1_01 SHARED napi_init1.cpp) -add_library(hsp1_02 SHARED napi_init2.cpp) - -target_link_libraries(hsp1_01 PUBLIC libace_napi.z.so) -target_link_libraries(hsp1_02 PUBLIC libace_napi.z.so) diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/napi_init1.cpp b/AbilityKit/MetaCompetences/hsp1/src/main/cpp/napi_init1.cpp deleted file mode 100644 index bc361f293a487d6e2822c96b4beae1cd4030e824..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/napi_init1.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -#include "napi/native_api.h" - -static napi_value Add(napi_env env, napi_callback_info info) -{ - size_t argc = 2; - napi_value args[2] = {nullptr}; - - napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); - - napi_valuetype valuetype0; - napi_typeof(env, args[0], &valuetype0); - - napi_valuetype valuetype1; - napi_typeof(env, args[1], &valuetype1); - - double value0; - napi_get_value_double(env, args[0], &value0); - - double value1; - napi_get_value_double(env, args[1], &value1); - - napi_value sum; - napi_create_double(env, value0 + value1, &sum); - - return sum; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - { "add", nullptr, Add, nullptr, nullptr, nullptr, napi_default, nullptr } - }; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "hsp1_01", - .nm_priv = ((void*)0), - .reserved = { 0 }, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule1(void) -{ - napi_module_register(&demoModule); -} diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/napi_init2.cpp b/AbilityKit/MetaCompetences/hsp1/src/main/cpp/napi_init2.cpp deleted file mode 100644 index c0231ad0920020c8e79b356f51467ec1786e5992..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/napi_init2.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -#include "napi/native_api.h" - -static napi_value Add(napi_env env, napi_callback_info info) -{ - size_t argc = 2; - napi_value args[2] = {nullptr}; - - napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); - - napi_valuetype valuetype0; - napi_typeof(env, args[0], &valuetype0); - - napi_valuetype valuetype1; - napi_typeof(env, args[1], &valuetype1); - - double value0; - napi_get_value_double(env, args[0], &value0); - - double value1; - napi_get_value_double(env, args[1], &value1); - - napi_value sum; - napi_create_double(env, value0 + value1, &sum); - - return sum; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - { "add", nullptr, Add, nullptr, nullptr, nullptr, napi_default, nullptr } - }; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "hsp1_02", - .nm_priv = ((void*)0), - .reserved = { 0 }, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule2(void) -{ - napi_module_register(&demoModule); -} diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp11/Index.d.ts b/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp11/Index.d.ts deleted file mode 100644 index 13a34842c293a6773ab293fd9e206d13e0a18bb1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp11/Index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp11/oh-package.json5 b/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp11/oh-package.json5 deleted file mode 100644 index 9a4b5580b9662c9533961fafe50b30a99f89e1ed..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp11/oh-package.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -{ - "name": "libhsp1_01.so", - "types": "./Index.d.ts", - "version": "1.0.0", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp12/Index.d.ts b/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp12/Index.d.ts deleted file mode 100644 index 13a34842c293a6773ab293fd9e206d13e0a18bb1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp12/Index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp12/oh-package.json5 b/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp12/oh-package.json5 deleted file mode 100644 index 5b8fa577aaed0486c5d35b5ac06bcd9b32750222..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/cpp/types/libhsp12/oh-package.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -{ - "name": "libhsp1_02.so", - "types": "./Index.d.ts", - "version": "1.0.0", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/ets/pages/Index.ets b/AbilityKit/MetaCompetences/hsp1/src/main/ets/pages/Index.ets deleted file mode 100644 index 8f83477a373839476b4da2220d55f6e3e9b2d0aa..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/ets/pages/Index.ets +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ -@Entry -@Component -struct Index { - @State message: string = 'Hello World'; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize($r('app.float.page_text_font_size')) - .fontWeight(FontWeight.Bold) - .onClick(() => { - this.message = 'Welcome'; - }) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/ets/startup/HSP1_Task_01.ets b/AbilityKit/MetaCompetences/hsp1/src/main/ets/startup/HSP1_Task_01.ets deleted file mode 100644 index cb9a2bebbd7247eed17d29ccb1419028b2ef6f36..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/ets/startup/HSP1_Task_01.ets +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -import { StartupTask, common } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -@Sendable -export default class HSP1Task01 extends StartupTask { - constructor() { - super(); - } - - async init(context: common.AbilityStageContext) { - hilog.info(0x0000, 'testTag', 'HSP1_Task_01 init.'); - return 'HSP1_Task_01'; - } - - onDependencyCompleted(dependence: string, result: Object): void { - hilog.info(0x0000, 'testTag', 'HSP1_Task_01 onDependencyCompleted, dependence: %{public}s, result: %{public}s', - dependence, JSON.stringify(result)); - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/ets/startup/HSP1_Task_02.ets b/AbilityKit/MetaCompetences/hsp1/src/main/ets/startup/HSP1_Task_02.ets deleted file mode 100644 index 21110f2e0e4b76d0881e7916dcf017911d021370..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/ets/startup/HSP1_Task_02.ets +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -import { StartupTask, common } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -@Sendable -export default class HSP1Task02 extends StartupTask { - constructor() { - super(); - } - - async init(context: common.AbilityStageContext) { - hilog.info(0x0000, 'testTag', 'HSP1_Task_02 init.'); - return 'HSP1_Task_02'; - } - - onDependencyCompleted(dependence: string, result: Object): void { - hilog.info(0x0000, 'testTag', 'HSP1_Task_02 onDependencyCompleted, dependence: %{public}s, result: %{public}s', - dependence, JSON.stringify(result)); - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/ets/startup/StartupConfig.ets b/AbilityKit/MetaCompetences/hsp1/src/main/ets/startup/StartupConfig.ets deleted file mode 100644 index f0cdc606e7328cba45df4565b9c383c498c79dc0..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/ets/startup/StartupConfig.ets +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ -// [Start startup_config_0100] -import { StartupConfig, StartupConfigEntry, StartupListener } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { BusinessError } from '@kit.BasicServicesKit'; - -export default class MyStartupConfigEntry extends StartupConfigEntry { - onConfig() { - hilog.info(0x0000, 'testTag', `onConfig`); - let onCompletedCallback = (error: BusinessError) => { - hilog.info(0x0000, 'testTag', `onCompletedCallback`); - if (error) { - hilog.error(0x0000, 'testTag', 'onCompletedCallback: %{public}d, message: %{public}s', error.code, error.message); - } else { - hilog.info(0x0000, 'testTag', `onCompletedCallback: success.`); - } - }; - let startupListener: StartupListener = { - 'onCompleted': onCompletedCallback - }; - let config: StartupConfig = { - 'timeoutMs': 10000, - 'startupListener': startupListener - }; - return config; - } -} -// [End startup_config_0100] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/ets/utils/Calc.ets b/AbilityKit/MetaCompetences/hsp1/src/main/ets/utils/Calc.ets deleted file mode 100644 index a5a468e6949ac73107a40372b2aeeec63227ac6b..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/ets/utils/Calc.ets +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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 function add(a: number, b: number) { - return a + b; -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/module.json5 b/AbilityKit/MetaCompetences/hsp1/src/main/module.json5 deleted file mode 100644 index df1ec0e73589c600f08f20a2f61f419a8a57db8a..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/module.json5 +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ -// [Start startup004] -{ - "module": { - "name": "hsp1", - "type": "shared", - // [StartExclude startup004] - "description": "$string:shared_desc", - // [EndExclude startup004] - "appStartup": "$profile:startup_config", // 启动框架的配置文件 - // [StartExclude startup004] - "deviceTypes": [ - ], - "deliveryWithInstall": true, - "pages": "$profile:main_pages", - // [EndExclude startup004] - } -} -// [End startup004] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/element/float.json b/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/element/float.json deleted file mode 100644 index 33ea22304f9b1485b5f22d811023701b5d4e35b6..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/element/float.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "float": [ - { - "name": "page_text_font_size", - "value": "50fp" - } - ] -} diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/element/string.json b/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/element/string.json deleted file mode 100644 index 98e1d8a84b3d8539ea33e79fe2ac593a05d23bb4..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "shared_desc", - "value": "description" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/profile/main_pages.json b/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 1898d94f58d6128ab712be2c68acc7c98e9ab9ce..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/Index" - ] -} diff --git a/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/profile/startup_config.json b/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/profile/startup_config.json deleted file mode 100644 index 596c0293264934ffc88753dbe3514d3aedbc5263..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/main/resources/base/profile/startup_config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "startupTasks": [ - { - "name": "HSP1_Task_01", - "srcEntry": "./ets/startup/HSP1_Task_01.ets", - "dependencies": [ - "HSP1_Task_02", - "HAR1_Task_01" - ], - "runOnThread": "taskPool", - "waitOnMainThread": false, - "excludeFromAutoStart": true - } - ], - "appPreloadHintStartupTasks": [ - { - "name": "libhsp1_01", - "srcEntry": "libhsp1_01.so", - "dependencies": [ - "libhsp1_02", - "libhar1_01" - ], - "runOnThread": "taskPool", - "excludeFromAutoStart": true - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/ohosTest/ets/test/Ability.test.ets b/AbilityKit/MetaCompetences/hsp1/src/ohosTest/ets/test/Ability.test.ets deleted file mode 100644 index 7f30942b81554a399e89aa253c7089eca4f8d8d1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/ohosTest/ets/test/Ability.test.ets +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function abilityTest() { - describe('ActsAbilityTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }) - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }) - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }) - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }) - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }) - }) -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/ohosTest/ets/test/List.test.ets b/AbilityKit/MetaCompetences/hsp1/src/ohosTest/ets/test/List.test.ets deleted file mode 100644 index c64e0b06938d246ce044186d4b2d02b500a89e14..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/ohosTest/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ -import abilityTest from './Ability.test'; - -export default function testsuite() { - abilityTest(); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/ohosTest/module.json5 b/AbilityKit/MetaCompetences/hsp1/src/ohosTest/module.json5 deleted file mode 100644 index 533f3781d61a7fe1fab7c1423fcec5c76532eeb9..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/ohosTest/module.json5 +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -{ - "module": { - "name": "hsp1_test", - "type": "feature", - "deviceTypes": [ - "phone", - "tablet", - "2in1" - ], - "deliveryWithInstall": true, - "installationFree": false - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/test/List.test.ets b/AbilityKit/MetaCompetences/hsp1/src/test/List.test.ets deleted file mode 100644 index a60c87c5cbb0badf7c3fd8975034590e6fafa992..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp1/src/test/LocalUnit.test.ets b/AbilityKit/MetaCompetences/hsp1/src/test/LocalUnit.test.ets deleted file mode 100644 index 841bfd77e56060e50ec0924302a5ae624e76e3aa..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp1/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }); - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }); - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }); - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }); - }); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/.gitignore b/AbilityKit/MetaCompetences/hsp2/.gitignore deleted file mode 100644 index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/node_modules -/oh_modules -/.preview -/build -/.cxx -/.test \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/Index.ets b/AbilityKit/MetaCompetences/hsp2/Index.ets deleted file mode 100644 index 057894506c99a71e2b28e614a10d31ce8ea8cfe5..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/Index.ets +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 { add } from './src/main/ets/utils/Calc'; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/build-profile.json5 b/AbilityKit/MetaCompetences/hsp2/build-profile.json5 deleted file mode 100644 index 6aa37298cb55a9f4c94c6b5d56fa9fab963090f8..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/build-profile.json5 +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -{ - "apiType": "stageMode", - "buildOption": { - "resOptions": { - "copyCodeResource": { - "enable": false - } - }, - "externalNativeOptions": { - "path": "./src/main/cpp/CMakeLists.txt", // CMake脚本路径 - "abiFilters": ["arm64-v8a", "x86_64"] // 编译目标架构 - } - }, - "buildOptionSet": [ - { - "name": "release", - "arkOptions": { - "obfuscation": { - "ruleOptions": { - "enable": false, - "files": [ - "./obfuscation-rules.txt" - ] - }, - "consumerFiles": [ - "./consumer-rules.txt" - ] - } - }, - }, - ], - "targets": [ - { - "name": "default" - }, - { - "name": "ohosTest" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/consumer-rules.txt b/AbilityKit/MetaCompetences/hsp2/consumer-rules.txt deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/AbilityKit/MetaCompetences/hsp2/hvigorfile.ts b/AbilityKit/MetaCompetences/hsp2/hvigorfile.ts deleted file mode 100644 index 3685a087a33c2e63c17d4e98660f489c3f31aa25..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/hvigorfile.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -import { hspTasks } from '@ohos/hvigor-ohos-plugin'; - -export default { - system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/obfuscation-rules.txt b/AbilityKit/MetaCompetences/hsp2/obfuscation-rules.txt deleted file mode 100644 index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/obfuscation-rules.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Define project specific obfuscation rules here. -# You can include the obfuscation configuration files in the current module's build-profile.json5. -# -# For more details, see -# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 - -# Obfuscation options: -# -disable-obfuscation: disable all obfuscations -# -enable-property-obfuscation: obfuscate the property names -# -enable-toplevel-obfuscation: obfuscate the names in the global scope -# -compact: remove unnecessary blank spaces and all line feeds -# -remove-log: remove all console.* statements -# -print-namecache: print the name cache that contains the mapping from the old names to new names -# -apply-namecache: reuse the given cache file - -# Keep options: -# -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope - --enable-property-obfuscation --enable-toplevel-obfuscation --enable-filename-obfuscation --enable-export-obfuscation \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/oh-package.json5 b/AbilityKit/MetaCompetences/hsp2/oh-package.json5 deleted file mode 100644 index 5a6af822558c186399776ab73c96afb97ca94ed2..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/oh-package.json5 +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ -{ - "name": "hsp2", - "version": "1.0.0", - "description": "Please describe the basic information.", - "main": "Index.ets", - "author": "", - "license": "Apache-2.0", - "packageType": "InterfaceHar", - "dependencies": { - "libhsp2_01.so": "file:./src/main/cpp/types/libhsp21" - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/cpp/CMakeLists.txt b/AbilityKit/MetaCompetences/hsp2/src/main/cpp/CMakeLists.txt deleted file mode 100644 index 7b202d486fa3a3ddec0b7bfb7edb91fd1f06a6a9..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/cpp/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# the minimum version of CMake. -cmake_minimum_required(VERSION 3.5.0) -project(MetaCompetences) - -set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) - -if(DEFINED PACKAGE_FIND_FILE) - include(${PACKAGE_FIND_FILE}) -endif() - -include_directories(${NATIVERENDER_ROOT_PATH} - ${NATIVERENDER_ROOT_PATH}/include) - -add_library(hsp2_01 SHARED napi_init1.cpp) - -target_link_libraries(hsp2_01 PUBLIC libace_napi.z.so) - diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/cpp/napi_init1.cpp b/AbilityKit/MetaCompetences/hsp2/src/main/cpp/napi_init1.cpp deleted file mode 100644 index 6f1293b26e4b046d2fed05a9db9200bcbf273802..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/cpp/napi_init1.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -#include "napi/native_api.h" - -static napi_value Add(napi_env env, napi_callback_info info) -{ - size_t argc = 2; - napi_value args[2] = {nullptr}; - - napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); - - napi_valuetype valuetype0; - napi_typeof(env, args[0], &valuetype0); - - napi_valuetype valuetype1; - napi_typeof(env, args[1], &valuetype1); - - double value0; - napi_get_value_double(env, args[0], &value0); - - double value1; - napi_get_value_double(env, args[1], &value1); - - napi_value sum; - napi_create_double(env, value0 + value1, &sum); - - return sum; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - { "add", nullptr, Add, nullptr, nullptr, nullptr, napi_default, nullptr } - }; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "hsp2_01", - .nm_priv = ((void*)0), - .reserved = { 0 }, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule1(void) -{ - napi_module_register(&demoModule); -} diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/cpp/types/libhsp21/Index.d.ts b/AbilityKit/MetaCompetences/hsp2/src/main/cpp/types/libhsp21/Index.d.ts deleted file mode 100644 index 13a34842c293a6773ab293fd9e206d13e0a18bb1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/cpp/types/libhsp21/Index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/cpp/types/libhsp21/oh-package.json5 b/AbilityKit/MetaCompetences/hsp2/src/main/cpp/types/libhsp21/oh-package.json5 deleted file mode 100644 index 7de35df9bba3d4a218bdd2590504025e19c151fd..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/cpp/types/libhsp21/oh-package.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -{ - "name": "libhsp2_01.so", - "types": "./Index.d.ts", - "version": "1.0.0", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/ets/pages/Index.ets b/AbilityKit/MetaCompetences/hsp2/src/main/ets/pages/Index.ets deleted file mode 100644 index 8f83477a373839476b4da2220d55f6e3e9b2d0aa..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/ets/pages/Index.ets +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ -@Entry -@Component -struct Index { - @State message: string = 'Hello World'; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize($r('app.float.page_text_font_size')) - .fontWeight(FontWeight.Bold) - .onClick(() => { - this.message = 'Welcome'; - }) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/ets/startup/HSP2_Task_01.ets b/AbilityKit/MetaCompetences/hsp2/src/main/ets/startup/HSP2_Task_01.ets deleted file mode 100644 index beddb6f4e09280541bceff4bca1434812c0ea0f0..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/ets/startup/HSP2_Task_01.ets +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -import { StartupTask, common } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -@Sendable -export default class HSP2Task01 extends StartupTask { - constructor() { - super(); - } - - async init(context: common.AbilityStageContext) { - hilog.info(0x0000, 'testTag', 'HSP2_Task_01 init.'); - return 'HSP2_Task_01'; - } - - onDependencyCompleted(dependence: string, result: Object): void { - hilog.info(0x0000, 'testTag', 'HSP2_Task_01 onDependencyCompleted, dependence: %{public}s, result: %{public}s', - dependence, JSON.stringify(result)); - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/ets/startup/StartupConfig.ets b/AbilityKit/MetaCompetences/hsp2/src/main/ets/startup/StartupConfig.ets deleted file mode 100644 index f0cdc606e7328cba45df4565b9c383c498c79dc0..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/ets/startup/StartupConfig.ets +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ -// [Start startup_config_0100] -import { StartupConfig, StartupConfigEntry, StartupListener } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { BusinessError } from '@kit.BasicServicesKit'; - -export default class MyStartupConfigEntry extends StartupConfigEntry { - onConfig() { - hilog.info(0x0000, 'testTag', `onConfig`); - let onCompletedCallback = (error: BusinessError) => { - hilog.info(0x0000, 'testTag', `onCompletedCallback`); - if (error) { - hilog.error(0x0000, 'testTag', 'onCompletedCallback: %{public}d, message: %{public}s', error.code, error.message); - } else { - hilog.info(0x0000, 'testTag', `onCompletedCallback: success.`); - } - }; - let startupListener: StartupListener = { - 'onCompleted': onCompletedCallback - }; - let config: StartupConfig = { - 'timeoutMs': 10000, - 'startupListener': startupListener - }; - return config; - } -} -// [End startup_config_0100] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/ets/utils/Calc.ets b/AbilityKit/MetaCompetences/hsp2/src/main/ets/utils/Calc.ets deleted file mode 100644 index a5a468e6949ac73107a40372b2aeeec63227ac6b..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/ets/utils/Calc.ets +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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 function add(a: number, b: number) { - return a + b; -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/module.json5 b/AbilityKit/MetaCompetences/hsp2/src/main/module.json5 deleted file mode 100644 index cd10453087d9707d8ffde729084987f28b591cd8..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/module.json5 +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ -// [Start startup005] -{ - "module": { - "name": "hsp2", - "type": "shared", - // [StartExclude startup005] - "description": "$string:shared_desc", - // [EndExclude startup005] - "appStartup": "$profile:startup_config", // 启动框架的配置文件 - // [StartExclude startup005] - "deviceTypes": [ - ], - "deliveryWithInstall": true, - "pages": "$profile:main_pages", - // [EndExclude startup005] - } -} -// [End startup005] \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/element/float.json b/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/element/float.json deleted file mode 100644 index 33ea22304f9b1485b5f22d811023701b5d4e35b6..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/element/float.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "float": [ - { - "name": "page_text_font_size", - "value": "50fp" - } - ] -} diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/element/string.json b/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/element/string.json deleted file mode 100644 index 98e1d8a84b3d8539ea33e79fe2ac593a05d23bb4..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "shared_desc", - "value": "description" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/profile/main_pages.json b/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 1898d94f58d6128ab712be2c68acc7c98e9ab9ce..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/Index" - ] -} diff --git a/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/profile/startup_config.json b/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/profile/startup_config.json deleted file mode 100644 index f0f7f5e8c02dbcc343b923d95315069d0346e88f..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/main/resources/base/profile/startup_config.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "startupTasks": [ - { - "name": "HSP2_Task_01", - "srcEntry": "./ets/startup/HSP2_Task_01.ets", - "runOnThread": "taskPool", - "waitOnMainThread": false, - "excludeFromAutoStart": true - } - ], - "appPreloadHintStartupTasks": [ - { - "name": "libhsp2_01", - "srcEntry": "libhsp2_01.so", - "runOnThread": "taskPool", - "excludeFromAutoStart": true - } - ] -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/ohosTest/ets/test/Ability.test.ets b/AbilityKit/MetaCompetences/hsp2/src/ohosTest/ets/test/Ability.test.ets deleted file mode 100644 index 7f30942b81554a399e89aa253c7089eca4f8d8d1..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/ohosTest/ets/test/Ability.test.ets +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function abilityTest() { - describe('ActsAbilityTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }) - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }) - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }) - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }) - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }) - }) -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/ohosTest/ets/test/List.test.ets b/AbilityKit/MetaCompetences/hsp2/src/ohosTest/ets/test/List.test.ets deleted file mode 100644 index c64e0b06938d246ce044186d4b2d02b500a89e14..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/ohosTest/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ -import abilityTest from './Ability.test'; - -export default function testsuite() { - abilityTest(); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/ohosTest/module.json5 b/AbilityKit/MetaCompetences/hsp2/src/ohosTest/module.json5 deleted file mode 100644 index 42d0022ad7899795f4eefc03703bac25dc3ef7d0..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/ohosTest/module.json5 +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -{ - "module": { - "name": "hsp2_test", - "type": "feature", - "deviceTypes": [ - "phone", - "tablet", - "2in1" - ], - "deliveryWithInstall": true, - "installationFree": false - } -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/test/List.test.ets b/AbilityKit/MetaCompetences/hsp2/src/test/List.test.ets deleted file mode 100644 index a60c87c5cbb0badf7c3fd8975034590e6fafa992..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hsp2/src/test/LocalUnit.test.ets b/AbilityKit/MetaCompetences/hsp2/src/test/LocalUnit.test.ets deleted file mode 100644 index 841bfd77e56060e50ec0924302a5ae624e76e3aa..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hsp2/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }); - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }); - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }); - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }); - }); -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/hvigor/hvigor-config.json5 b/AbilityKit/MetaCompetences/hvigor/hvigor-config.json5 deleted file mode 100644 index 3b057578a1bb4d591ee53054e39ab0154fc2e43a..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hvigor/hvigor-config.json5 +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ -{ - "modelVersion": "6.0.0", - "dependencies": { - }, - "execution": { - // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | "ultrafine" | false ]. Default: "normal" */ - // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ - // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ - // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ - // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ - // "optimizationStrategy": "memory" /* Define the optimization strategy. Value: [ "memory" | "performance" ]. Default: "memory" */ - }, - "logging": { - // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ - }, - "debugging": { - // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ - }, - "nodeOptions": { - // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ - // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ - } -} diff --git a/AbilityKit/MetaCompetences/hvigorfile.ts b/AbilityKit/MetaCompetences/hvigorfile.ts deleted file mode 100644 index ae9086af35844176c08f1be3772d081d95d267c6..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/hvigorfile.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -import { appTasks } from '@ohos/hvigor-ohos-plugin'; - -export default { - system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ -} \ No newline at end of file diff --git a/AbilityKit/MetaCompetences/img.png b/AbilityKit/MetaCompetences/img.png deleted file mode 100644 index 9c8c4130707cc5ba17202c8d909c23f41085abf1..0000000000000000000000000000000000000000 Binary files a/AbilityKit/MetaCompetences/img.png and /dev/null differ diff --git a/AbilityKit/MetaCompetences/img_1.png b/AbilityKit/MetaCompetences/img_1.png deleted file mode 100644 index e70ef8e4c4576245c4abb81339088e24f4934da6..0000000000000000000000000000000000000000 Binary files a/AbilityKit/MetaCompetences/img_1.png and /dev/null differ diff --git a/AbilityKit/MetaCompetences/oh-package.json5 b/AbilityKit/MetaCompetences/oh-package.json5 deleted file mode 100644 index 837c0ff9f35a6bb9eea849fead7955c19bcdec8d..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/oh-package.json5 +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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. - */ -{ - "modelVersion": "6.0.0", - "description": "Please describe the basic information.", - "dependencies": { - }, - "devDependencies": { - "@ohos/hypium": "1.0.24", - "@ohos/hamock": "1.0.0" - } -} diff --git a/AbilityKit/MetaCompetences/ohosTest.md b/AbilityKit/MetaCompetences/ohosTest.md deleted file mode 100644 index cc2b620efda11b19c7a27998ae0a17ed3d951cdb..0000000000000000000000000000000000000000 --- a/AbilityKit/MetaCompetences/ohosTest.md +++ /dev/null @@ -1,7 +0,0 @@ -# 基础能力增强测试用例 - -## 用例表 - -| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 | -|---------------| ------------ |---------------------------|----------------------------|------| -------- | -| 拉起应用 | 设备正常运行 | | 成功拉起应用 | Yes | Pass | diff --git a/AbilityKit/NativeChildProcessParams/.gitignore b/AbilityKit/NativeChildProcessParams/.gitignore deleted file mode 100644 index 08d606210b3993e8f1f4535767bb3459b7b1d208..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -/node_modules -/oh_modules -/local.properties -/.idea -**/build -/.hvigor -.cxx -/.clangd -/.clang-format -/.clang-tidy -**/.test -/.appanalyzer -/oh-package-lock.json5 \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/AppScope/app.json5 b/AbilityKit/NativeChildProcessParams/AppScope/app.json5 deleted file mode 100644 index 678ce95495fbe54c46fbba6a160ac62b08bcf7b9..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/AppScope/app.json5 +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -{ - "app": { - "bundleName": "com.sample.nativechildprocessparams", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:layered_image", - "label": "$string:app_name" - } -} diff --git a/AbilityKit/NativeChildProcessParams/AppScope/resources/base/element/string.json b/AbilityKit/NativeChildProcessParams/AppScope/resources/base/element/string.json deleted file mode 100644 index 3097c86be4f7f9aaa1275869bf32e51f8edc3b1f..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "NativeChildProcessIpc" - } - ] -} diff --git a/AbilityKit/NativeChildProcessParams/AppScope/resources/base/media/background.png b/AbilityKit/NativeChildProcessParams/AppScope/resources/base/media/background.png deleted file mode 100644 index 923f2b3f27e915d6871871deea0420eb45ce102f..0000000000000000000000000000000000000000 Binary files a/AbilityKit/NativeChildProcessParams/AppScope/resources/base/media/background.png and /dev/null differ diff --git a/AbilityKit/NativeChildProcessParams/AppScope/resources/base/media/foreground.png b/AbilityKit/NativeChildProcessParams/AppScope/resources/base/media/foreground.png deleted file mode 100644 index eb9427585b36d14b12477435b6419d1f07b3e0bb..0000000000000000000000000000000000000000 Binary files a/AbilityKit/NativeChildProcessParams/AppScope/resources/base/media/foreground.png and /dev/null differ diff --git a/AbilityKit/NativeChildProcessParams/AppScope/resources/base/media/layered_image.json b/AbilityKit/NativeChildProcessParams/AppScope/resources/base/media/layered_image.json deleted file mode 100644 index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/AppScope/resources/base/media/layered_image.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "layered-image": - { - "background" : "$media:background", - "foreground" : "$media:foreground" - } -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/README_zh.md b/AbilityKit/NativeChildProcessParams/README_zh.md deleted file mode 100644 index 1d26b4791d12066fc748fd5cba089a272aa482fa..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/README_zh.md +++ /dev/null @@ -1,93 +0,0 @@ -# 创建Native子进程(C/C++) - -### 介绍 - -本示例展示了[创建支持参数传递的Native子进程](https://gitcode.com/openharmony/docs/blob/master/zh-cn/application-dev/application-models/capi_nativechildprocess_development_guideline.md#创建支持参数传递的native子进程)的方法: - -1. 创建子进程,并传递字符串和fd句柄参数到子进程。适用于需要传递参数到子进程的场景; -2. 创建的子进程会随着父进程的退出而退出,无法脱离父进程独立运行。 - -### 效果展示 - -不涉及。 - - -### 测试代码说明 - -1.SUB_Ability_AbilityRuntime_NativeStartChildProcess_0200:验证通过TestChildProcess启动带参数(entryParams)和文件描述符(fdList)的 Native 子进程功能,检查启动返回值,处理多进程模式禁用或子进程功能禁用的场景。 - -### 工程目录 - -``` -entry/src/ -├── main -│ ├── cpp -│ │ ├── types -│ │ │ ├── libchildprocesssample //子进程so包 -│ │ │ ├── index.d.ets -│ │ │ └── oh-package.json5 -│ │ │ ├── libmainprocesssample //主进程so包 -│ │ │ ├── index.d.ets -│ │ │ └── oh-package.json5 -│ │ ├── ChildGetStartParams.cpp //子进程获取启动参数代码 -│ │ ├── ChildProcessFunc.cpp //子进程示例代码 -│ │ ├── ChildProcessFunc.h -│ │ ├── CMakeLists.txt -│ │ ├── MainProcessFunc.cpp //主进程示例代码 -│ │ └── MainProcessFunc.h -│ ├── ets -│ │ ├── entryability -│ │ ├── entrybackupability -│ │ └── pages -│ │ └── Index.ets -│ ├── module.json5 -│ ├── syscap.json -│ └── resources -└── ohosTest - └── ets - └── test - ├── Ability.test.ets // 自动化测试代码 - └── List.test.ets // 测试套执行列表 - -``` - -### 使用说明 - -1. 依赖准备:需引入libchild_process.so库及头文件,用于子进程创建和参数传递。 -2. 子进程实现:导出自定义入口函数(如Main),通过NativeChildProcess_Args接收主进程传递的entryParams字符串和fdList文件描述符链表;API 17 + 可在子进程任意位置调用OH_Ability_GetCurrentChildProcessArgs()获取启动参数。 -3. 主进程操作:配置NativeChildProcess_Args(分配内存设置entryParams和fdList,fd最多 16 个)和options,调用OH_Ability_StartNativeChildProcess启动子进程(参数格式为 “动态库名:入口函数”),启动后需释放参数内存。 -4. 编译配置:子进程和主进程的CMakeLists.txt均需链接libchild_process.so,确保编译通过。 - -### 具体实现 - -1. 准备工程依赖:确保 Native 工程包含头文件#include ,并依赖动态库libchild_process.so。 -2. 子进程实现入口函数:在子进程代码(如ChildProcessSample.cpp)中,导出自定义入口函数(如Main),通过NativeChildProcess_Args接收entryParams参数和fdList文件描述符链表,实现业务逻辑。 -3. 编译子进程动态库:修改CMakeLists.txt,将子进程代码编译为动态库(如libchildprocesssample.so),并链接libchild_process.so依赖。 -4. 主进程构建传递参数:主进程中定义NativeChildProcess_Args,分配内存设置entryParams(如字符串 "testParam"),构建fdList链表(包含 fd 名称和通过open获取的文件描述符),并配置NativeChildProcess_Options(如隔离模式)。 -5. 主进程启动子进程:调用OH_Ability_StartNativeChildProcess,传入子进程动态库名 + 入口函数(如 "libchildprocesssample.so:Main")、参数、选项和 pid 指针,启动子进程并获取 pid。 -6. 释放资源与配置依赖:主进程在子进程启动后(无论成功与否)释放entryParams和fdList的内存;修改主进程CMakeLists.txt,链接libchild_process.so确保编译通过。 - -### 相关权限 - -不涉及。 - -### 依赖 - -不涉及。 - -### 约束与限制 - -1.从API version 14开始,支持2in1和Tablet设备。API version 13及之前版本,仅支持2in1设备。 从API version 15开始,单个进程最多支持启动50个Native子进程。API version 14及之前版本,单个进程只能启动1个Native子进程。 -2.从API version 17开始,支持子进程获取启动参数。 - -### 下载 - -如需单独下载本工程,执行如下命令: - -``` -git init -git config core.sparsecheckout true -echo code/DocsSample/Ability/NativeChildProcessParams/ > .git/info/sparse-checkout -git remote add origin https://gitcode.com/openharmony/applications_app_samples.git -git pull origin master -``` \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/build-profile.json5 b/AbilityKit/NativeChildProcessParams/build-profile.json5 deleted file mode 100644 index f0f13a21671a1fb3911070eb82d6683edf8ab55d..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/build-profile.json5 +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -{ - "app": { - "signingConfigs": [], - "products": [ - { - "name": "default", - "signingConfig": "default", - "targetSdkVersion": "20", - "compatibleSdkVersion": "20", - "compileSdkVersion": 20, - "runtimeOS": "OpenHarmony", - "buildOption": { - "strictMode": { - "caseSensitiveCheck": true, - "useNormalizedOHMUrl": true - } - } - } - ], - "buildModeSet": [ - { - "name": "debug", - }, - { - "name": "release" - } - ] - }, - "modules": [ - { - "name": "entry", - "srcPath": "./entry", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default" - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/code-linter.json5 b/AbilityKit/NativeChildProcessParams/code-linter.json5 deleted file mode 100644 index ed05653cca31b61d64cf6471529eaf50d4f70709..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/code-linter.json5 +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -{ - "files": [ - "**/*.ets" - ], - "ignore": [ - "**/src/ohosTest/**/*", - "**/src/test/**/*", - "**/src/mock/**/*", - "**/node_modules/**/*", - "**/oh_modules/**/*", - "**/build/**/*", - "**/.preview/**/*" - ], - "ruleSet": [ - "plugin:@performance/recommended", - "plugin:@typescript-eslint/recommended" - ], - "rules": { - "@security/no-unsafe-aes": "error", - "@security/no-unsafe-hash": "error", - "@security/no-unsafe-mac": "warn", - "@security/no-unsafe-dh": "error", - "@security/no-unsafe-dsa": "error", - "@security/no-unsafe-ecdsa": "error", - "@security/no-unsafe-rsa-encrypt": "error", - "@security/no-unsafe-rsa-sign": "error", - "@security/no-unsafe-rsa-key": "error", - "@security/no-unsafe-dsa-key": "error", - "@security/no-unsafe-dh-key": "error", - "@security/no-unsafe-3des": "error" - } -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/.gitignore b/AbilityKit/NativeChildProcessParams/entry/.gitignore deleted file mode 100644 index eadab4e1522296628f32a70228b2c758ecab4759..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/node_modules -/oh_modules -/.preview -/build -/.cxx -/.test -/oh-package-lock.json5 \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/build-profile.json5 b/AbilityKit/NativeChildProcessParams/entry/build-profile.json5 deleted file mode 100644 index 91742547fa89926f4532caace13c4bead1a71181..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/build-profile.json5 +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. - */ - -{ - "apiType": "stageMode", - "buildOption": { - "resOptions": { - "copyCodeResource": { - "enable": false - } - }, - "externalNativeOptions": { - "path": "./src/main/cpp/CMakeLists.txt", - "abiFilters": [ - "arm64-v8a", - "x86_64" - ] - } - }, - "buildOptionSet": [ - { - "name": "release", - "arkOptions": { - "obfuscation": { - "ruleOptions": { - "enable": false, - "files": [ - "./obfuscation-rules.txt" - ] - } - } - } - }, - ], - "targets": [ - { - "name": "default" - }, - { - "name": "ohosTest", - } - ] -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/hvigorfile.ts b/AbilityKit/NativeChildProcessParams/entry/hvigorfile.ts deleted file mode 100644 index cfa8a00f74f409d9647f55cdf270ab6aec69fe41..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/hvigorfile.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -import { hapTasks } from '@ohos/hvigor-ohos-plugin'; - -export default { - system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/obfuscation-rules.txt b/AbilityKit/NativeChildProcessParams/entry/obfuscation-rules.txt deleted file mode 100644 index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/obfuscation-rules.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Define project specific obfuscation rules here. -# You can include the obfuscation configuration files in the current module's build-profile.json5. -# -# For more details, see -# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 - -# Obfuscation options: -# -disable-obfuscation: disable all obfuscations -# -enable-property-obfuscation: obfuscate the property names -# -enable-toplevel-obfuscation: obfuscate the names in the global scope -# -compact: remove unnecessary blank spaces and all line feeds -# -remove-log: remove all console.* statements -# -print-namecache: print the name cache that contains the mapping from the old names to new names -# -apply-namecache: reuse the given cache file - -# Keep options: -# -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope - --enable-property-obfuscation --enable-toplevel-obfuscation --enable-filename-obfuscation --enable-export-obfuscation \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/oh-package.json5 b/AbilityKit/NativeChildProcessParams/entry/oh-package.json5 deleted file mode 100644 index b37f9ba71198770581c50b59f5aedd251be8d472..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/oh-package.json5 +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ - -{ - "name": "entry", - "version": "1.0.0", - "description": "Please describe the basic information.", - "main": "", - "author": "", - "license": "", - "devDependencies": { - "libmainprocesssample.so": "file:./src/main/cpp/types/libmainprocesssample" - } -} - diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/CMakeLists.txt b/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/CMakeLists.txt deleted file mode 100644 index f5d3e60bf3e006aad01cf4d7c2e1aee56db84aaf..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# the minimum version of CMake. -cmake_minimum_required(VERSION 3.5.0) -project(NativeChildProcess) - -set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) - -if(DEFINED PACKAGE_FIND_FILE) - include(${PACKAGE_FIND_FILE}) -endif() - -include_directories(${NATIVERENDER_ROOT_PATH} - ${NATIVERENDER_ROOT_PATH}/include) - -add_library(mainprocesssample SHARED MainProcessFunc.cpp ChildGetStartParams.cpp) -target_link_libraries(mainprocesssample libipc_capi.so libchild_process.so libace_napi.z.so libhilog_ndk.z.so) -add_library(childprocesssample SHARED ChildProcessFunc.cpp) -target_link_libraries(childprocesssample libipc_capi.so libchild_process.so) \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/ChildGetStartParams.cpp b/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/ChildGetStartParams.cpp deleted file mode 100644 index 581fec5ff1f515286b1158eb4642f533092b558b..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/ChildGetStartParams.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -// [Start child_get_start_params_main] -// [Start child_get_start_params_header] -#include -// [End child_get_start_params_header] -#include - -extern "C" { -void ThreadFunc() -{ - // 获取子进程的启动参数 - NativeChildProcess_Args *args = OH_Ability_GetCurrentChildProcessArgs(); - // 获取启动参数失败时返回nullptr - if (args == nullptr) { - return; - } - // 获取启动参数中的entryPrams - char *entryParams = args->entryParams; - // 获取fd列表 - NativeChildProcess_Fd *current = args->fdList.head; - while (current != nullptr) { - char *fdName = current->fdName; - int32_t fd = current->fd; - current = current->next; - // 业务逻辑.. - } -} - -/** - * 子进程的入口函数,实现子进程的业务逻辑 - * args是子进程的启动参数 - */ -void Main(NativeChildProcess_Args args) -{ - // 业务逻辑.. - - // 创建线程 - std::thread tObj(ThreadFunc); -} - -} // extern "C" -// [End child_get_start_params_main] \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/ChildProcessFunc.cpp b/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/ChildProcessFunc.cpp deleted file mode 100644 index d0efe9287582a3607637a36fba2a7246744fd4bf..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/ChildProcessFunc.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -// [Start child_process_necessary_export_impl] -// [Start create_native_child_param_header] -#include -// [End create_native_child_param_header] -extern "C" { -/** - * 子进程的入口函数,实现子进程的业务逻辑 - * 函数名称可以自定义,在主进程调用OH_Ability_StartNativeChildProcess方法时指定,此示例中为Main - * 函数返回后子进程退出 - */ -void Main(NativeChildProcess_Args args) -{ - // 获取传入的entryPrams - char *entryParams = args.entryParams; - // 获取传入的fd列表 - NativeChildProcess_Fd *current = args.fdList.head; - while (current != nullptr) { - char *fdName = current->fdName; - int32_t fd = current->fd; - current = current->next; - // 业务逻辑.. - } -} -} // extern "C" -// [End child_process_necessary_export_impl] \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/ChildProcessFunc.h b/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/ChildProcessFunc.h deleted file mode 100644 index 17599a994e5e37f88b0ad3c669cb00cf5fda9d3a..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/ChildProcessFunc.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -#ifndef NATIVECHILDPROCESS_CHILDPROCESSFUNC_H -#define NATIVECHILDPROCESS_CHILDPROCESSFUNC_H - -class ChildProcessFunc {}; - -#endif // NATIVECHILDPROCESS_CHILDPROCESSFUNC_H diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/MainProcessFunc.cpp b/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/MainProcessFunc.cpp deleted file mode 100644 index 13b7ec9fcf0def15612999906e20e0419eda3fac..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/MainProcessFunc.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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. - */ - -// [Start main_process_launch_native_child] -#include -#include -#include -#include -// [StartExclude main_process_launch_native_child] -#include -#include -#include - -int32_t g_result = -1; -// [EndExclude main_process_launch_native_child] -int32_t g_fdNameMaxLength = 4; - -void StartNativeChildProcess() -{ - // ... - NativeChildProcess_Args args; - // 设置entryParams,支持传输的最大数据量为150KB - const size_t testParamLen = sizeof("testParam") - 1; - const size_t entryParamsSize = 10; - args.entryParams = (char *)malloc(sizeof(char) * entryParamsSize); - if (args.entryParams != nullptr) { - (void)strlcpy(args.entryParams, "testParam", testParamLen); - args.entryParams[testParamLen] = '\0'; - } - - // 插入节点到链表头节点中 - args.fdList.head = (NativeChildProcess_Fd *)malloc(sizeof(NativeChildProcess_Fd)); - // fd关键字,最多不超过20个字符 - const size_t fd1Len = sizeof("fd1") - 1; - const size_t fdNameSize = 10; - args.fdList.head->fdName = (char *)malloc(sizeof(char) * g_fdNameMaxLength); - if (args.fdList.head->fdName != nullptr) { - (void)strlcpy(args.fdList.head->fdName, "fd1", fdNameSize); - args.fdList.head->fdName[fd1Len] = '\0'; - } - // 获取fd逻辑 - int32_t fd = open("/data/storage/el2/base/haps/entry/files/test.txt", O_RDWR | O_CREAT, 0644); - args.fdList.head->fd = fd; - // 此处只插入一个fd记录,根据需求可以插入更多fd记录到链表中,最多不超过16个 - args.fdList.head->next = NULL; - NativeChildProcess_Options options = {.isolationMode = NCP_ISOLATION_MODE_ISOLATED}; - - // 第一个参数"libchildprocesssample.so:Main"为实现了子进程Main方法的动态库文件名称和入口方法名 - int32_t pid = -1; - Ability_NativeChildProcess_ErrCode ret = - OH_Ability_StartNativeChildProcess("libchildprocesssample.so:Main", args, options, &pid); - if (ret != NCP_NO_ERROR) { - // 释放NativeChildProcess_Args中的内存空间防止内存泄漏 - // 子进程未能正常启动时的异常处理 - // ... - } - - // 其他逻辑 -// [StartExclude main_process_launch_native_child] - g_result = ret; -// [EndExclude main_process_launch_native_child] - - // 释放NativeChildProcess_Args中的内存空间防止内存泄漏 -} -// [End main_process_launch_native_child] - -static napi_value TestChildProcess(napi_env env, napi_callback_info info) -{ - StartNativeChildProcess(); - napi_value napiRet; - napi_create_int32(env, g_result, &napiRet); - return napiRet; -} - -EXTERN_C_START -static napi_value Init(napi_env env, napi_value exports) -{ - napi_property_descriptor desc[] = { - {"testChildProcess", nullptr, TestChildProcess, nullptr, nullptr, nullptr, napi_default, nullptr}}; - napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc); - return exports; -} -EXTERN_C_END - -static napi_module demoModule = { - .nm_version = 1, - .nm_flags = 0, - .nm_filename = nullptr, - .nm_register_func = Init, - .nm_modname = "mainprocesssample", - .nm_priv = ((void *)0), - .reserved = {0}, -}; - -extern "C" __attribute__((constructor)) void RegisterEntryModule(void) { napi_module_register(&demoModule); } diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/MainProcessFunc.h b/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/MainProcessFunc.h deleted file mode 100644 index 95ab4a6381346c9839e0e3a11c3f39a06d7cfdd7..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/MainProcessFunc.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -#ifndef NATIVECHILDPROCESS_MAINPROCESSFUNC_H -#define NATIVECHILDPROCESS_MAINPROCESSFUNC_H - -#include -class MainProcessFunc { - static void OnNativeChildProcessStarted(int errCode, OHIPCRemoteProxy *remoteProxy); - void CreateNativeChildProcess(); -}; - -#endif //NATIVECHILDPROCESS_MAINPROCESSFUNC_H diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libchildprocesssample/index.d.ets b/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libchildprocesssample/index.d.ets deleted file mode 100644 index cbb87c91b8480dfdb2f5bccc80a33f8c6ee4cf3b..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libchildprocesssample/index.d.ets +++ /dev/null @@ -1,14 +0,0 @@ -/* - * 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. - */ \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libchildprocesssample/oh-package.json5 b/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libchildprocesssample/oh-package.json5 deleted file mode 100644 index 0d097a045e83411591cd5879584477bf1b70095b..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libchildprocesssample/oh-package.json5 +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -{ - "name": "libchildprocesssample.so", - "types": "./index.d.ts", - "version": "100000", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libmainprocesssample/index.d.ets b/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libmainprocesssample/index.d.ets deleted file mode 100644 index 43def1cd9f4a070605f9503b43a4f448ffa0cbbe..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libmainprocesssample/index.d.ets +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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 const testChildProcess: () => number; \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libmainprocesssample/oh-package.json5 b/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libmainprocesssample/oh-package.json5 deleted file mode 100644 index 7d25428be6009416151fb97c3b8e963f77b41214..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/cpp/types/libmainprocesssample/oh-package.json5 +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -{ - "name": "libmainprocesssample.so", - "types": "./index.d.ts", - "version": "100000", - "description": "Please describe the basic information." -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/ets/entryability/EntryAbility.ets b/AbilityKit/NativeChildProcessParams/entry/src/main/ets/entryability/EntryAbility.ets deleted file mode 100644 index 62f53acbc95e5be7985f8fb1fe2db591cea260bd..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/ets/entryability/EntryAbility.ets +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { window } from '@kit.ArkUI'; - -const DOMAIN = 0x0000; - -export default class EntryAbility extends UIAbility { - onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { - try { - this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); - } catch (err) { - hilog.error(DOMAIN, 'testTag', 'Failed to set colorMode. Cause: %{public}s', JSON.stringify(err)); - } - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); - } - - onDestroy(): void { - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage): void { - // Main window is created, set main page for this ability - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); - - windowStage.loadContent('pages/Index', (err) => { - if (err.code) { - hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); - return; - } - hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); - }); - } - - onWindowStageDestroy(): void { - // Main window is destroyed, release UI related resources - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); - } - - onForeground(): void { - // Ability has brought to foreground - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); - } - - onBackground(): void { - // Ability has back to background - hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); - } -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/AbilityKit/NativeChildProcessParams/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets deleted file mode 100644 index 0a97e21bd7a15599af76a806695860ff1eb0ebfe..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; - -const DOMAIN = 0x0000; - -export default class EntryBackupAbility extends BackupExtensionAbility { - async onBackup() { - hilog.info(DOMAIN, 'testTag', 'onBackup ok'); - await Promise.resolve(); - } - - async onRestore(bundleVersion: BundleVersion) { - hilog.info(DOMAIN, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); - await Promise.resolve(); - } -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/ets/pages/Index.ets b/AbilityKit/NativeChildProcessParams/entry/src/main/ets/pages/Index.ets deleted file mode 100644 index 0f481f696485b8c840d49ad9e7d7dff7f6b71241..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/ets/pages/Index.ets +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ - -@Entry -@Component -struct Index { - @State message: string = 'Hello World'; - - build() { - RelativeContainer() { - Text(this.message) - .id('HelloWorld') - .fontSize($r('app.float.page_text_font_size')) - .fontWeight(FontWeight.Bold) - .alignRules({ - center: { anchor: '__container__', align: VerticalAlign.Center }, - middle: { anchor: '__container__', align: HorizontalAlign.Center } - }) - .onClick(() => { - this.message = 'Welcome'; - }) - } - .height('100%') - .width('100%') - } -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/module.json5 b/AbilityKit/NativeChildProcessParams/entry/src/main/module.json5 deleted file mode 100644 index 5ab6eaa4062377fdba7bd3cf41ee4c1e2ccdfcd8..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/module.json5 +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ - -{ - "module": { - "name": "entry", - "type": "entry", - "description": "$string:module_desc", - "mainElement": "EntryAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "EntryAbility", - "srcEntry": "./ets/entryability/EntryAbility.ets", - "description": "$string:EntryAbility_desc", - "icon": "$media:layered_image", - "label": "$string:EntryAbility_label", - "startWindowIcon": "$media:startIcon", - "startWindowBackground": "$color:start_window_background", - "exported": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.home" - ] - } - ] - } - ], - "requestPermissions": [], - "extensionAbilities": [ - { - "name": "EntryBackupAbility", - "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", - "type": "backup", - "exported": false, - "metadata": [ - { - "name": "ohos.extension.backup", - "resource": "$profile:backup_config" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/element/color.json b/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962da3c2751c2b9ddb53559afcbd2b54a02..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "start_window_background", - "value": "#FFFFFF" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/element/float.json b/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/element/float.json deleted file mode 100644 index a0a93dd91fd48f08f3a9532c76e9b26e68d4c034..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/element/float.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "float": [ - { - "name": "page_text_font_size", - "value": "50fp" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/element/string.json b/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/element/string.json deleted file mode 100644 index f94595515a99e0c828807e243494f57f09251930..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "module description" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/background.png b/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/background.png deleted file mode 100644 index 923f2b3f27e915d6871871deea0420eb45ce102f..0000000000000000000000000000000000000000 Binary files a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/background.png and /dev/null differ diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/foreground.png b/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/foreground.png deleted file mode 100644 index 97014d3e10e5ff511409c378cd4255713aecd85f..0000000000000000000000000000000000000000 Binary files a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/foreground.png and /dev/null differ diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/layered_image.json b/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/layered_image.json deleted file mode 100644 index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/layered_image.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "layered-image": - { - "background" : "$media:background", - "foreground" : "$media:foreground" - } -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/startIcon.png b/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/startIcon.png deleted file mode 100644 index 205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b..0000000000000000000000000000000000000000 Binary files a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/media/startIcon.png and /dev/null differ diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/profile/backup_config.json b/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/profile/backup_config.json deleted file mode 100644 index 78f40ae7c494d71e2482278f359ec790ca73471a..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/profile/backup_config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "allowToBackupRestore": true -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/profile/main_pages.json b/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 55c3f007f87b7ce5206d325f968cc56f2f79441f..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/Index" - ] -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/dark/element/color.json b/AbilityKit/NativeChildProcessParams/entry/src/main/resources/dark/element/color.json deleted file mode 100644 index 79b11c2747aec33e710fd3a7b2b3c94dd9965499..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/resources/dark/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "start_window_background", - "value": "#000000" - } - ] -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/main/syscap.json b/AbilityKit/NativeChildProcessParams/entry/src/main/syscap.json deleted file mode 100644 index ff16ea0fd486bb600d4ad95b2f80380c98d6dee1..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/main/syscap.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "devices": { - "general": [ - "default", - "tablet" - ], - "custom": [ - { - "xts": [ - "SystemCapability.MultimodalInput.Input.Core", - "SystemCapability.Ability.AbilityRuntime.Core" - ] - } - ] - } -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/mock/mock-config.json5 b/AbilityKit/NativeChildProcessParams/entry/src/mock/mock-config.json5 deleted file mode 100644 index b9a78e201535765168a92d3543c690273ecdc019..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/mock/mock-config.json5 +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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. - */ - -{ -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/ets/test/Ability.test.ets b/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/ets/test/Ability.test.ets deleted file mode 100644 index e3efcc22980930ce5c28e02f96a7c662905b7c53..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/ets/test/Ability.test.ets +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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. - */ - -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, Level } from '@ohos/hypium'; -import testNapi from 'libmainprocesssample.so'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import { Want } from '@kit.AbilityKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; - -const DOMAIN = 0x0000; - -function sleep(time: number) { - return new Promise((resolve) => setTimeout(resolve, time)); -} - -export default function abilityTest() { - describe('ActsAbilityTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(async () => { - const delegator = AbilityDelegatorRegistry.getAbilityDelegator(); - let want: Want = { - bundleName: "com.sample.nativechildprocessparams", - abilityName: "EntryAbility", - moduleName: "entry" - }; - delegator.startAbility(want); - await sleep(2000); - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }) - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }) - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }) - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }) - - /** - * @tc.number SUB_Ability_AbilityRuntime_NativeStartChildProcess_0200 - * @tc.name testStartNativeChildProcess002 - * @tc.desc To verify the function of creating a subprocess by StartNativeChildProcess - * @tc.size MediumTest - * @tc.type Function - * @tc.level Level 1 - */ - it('SUB_Ability_AbilityRuntime_NativeStartChildProcess_0200', Level.LEVEL1, async (done: Function) => { - let tag = `SUB_Ability_AbilityRuntime_NativeStartChildProcess_0200`; - hilog.info(DOMAIN, 'testTag', '%{public}s', `${tag}` + 'it begin'); - let ret: Number = testNapi.testChildProcess(); - hilog.info(DOMAIN, 'testTag', '%{public}s', `${tag}: ret` + ret); - if (ret == 16010004) { - hilog.info(DOMAIN, 'testTag', '%{public}s', `${tag}: multi process model disable`); - expect(16010004).assertEqual(ret); - return; - } else if (ret == 801) { - hilog.info(DOMAIN, 'testTag', '%{public}s', `${tag}: Native child process disable`); - expect(801).assertEqual(ret); - return; - } - expect(0).assertEqual(ret); - done(); - }) - }) -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/ets/test/List.test.ets b/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/ets/test/List.test.ets deleted file mode 100644 index 1eac52fcebe8958e19a7b8fed2e8f39c520a3e42..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/ets/test/List.test.ets +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ - -import abilityTest from './Ability.test'; - -export default function testsuite() { - abilityTest(); -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/module.json5 b/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/module.json5 deleted file mode 100644 index c3fd9dda3040d888d9d8b0b62bcb5d3b6fbeb614..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/module.json5 +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ - -{ - "module": { - "name": "entry_test", - "type": "feature", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false - } -} diff --git a/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/syscap.json b/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/syscap.json deleted file mode 100644 index 115daad293d3ff56e8ced26e9fd9419fb3043325..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/ohosTest/syscap.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "devices": { - "general": [ - "default", - "tablet" - ], - "custom": [ - { - "xts": [ - "SystemCapability.Account.AppAccount", - "SystemCapability.Account.OsAccount", - "SystemCapability.MultimodalInput.Input.Core", - "SystemCapability.Ability.AbilityRuntime.Core" - ] - } - ] - } -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/test/List.test.ets b/AbilityKit/NativeChildProcessParams/entry/src/test/List.test.ets deleted file mode 100644 index f1186b1f53c3a70930921c5dbd1417332bec56c9..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/test/List.test.ets +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ - -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/entry/src/test/LocalUnit.test.ets b/AbilityKit/NativeChildProcessParams/entry/src/test/LocalUnit.test.ets deleted file mode 100644 index 7fc57c77dbf76d8df08a2b802a55b948e3fcf968..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/entry/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }); - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }); - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }); - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }); - }); -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/hvigor/hvigor-config.json5 b/AbilityKit/NativeChildProcessParams/hvigor/hvigor-config.json5 deleted file mode 100644 index b8fea3f097bd68b0bc4d87de986d2cb7732c1d9b..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/hvigor/hvigor-config.json5 +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ - -{ - "modelVersion": "6.0.0", - "dependencies": { - }, - "execution": { - // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | "ultrafine" | false ]. Default: "normal" */ - // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ - // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ - // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ - // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ - // "optimizationStrategy": "memory" /* Define the optimization strategy. Value: [ "memory" | "performance" ]. Default: "memory" */ - }, - "logging": { - // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ - }, - "debugging": { - // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ - }, - "nodeOptions": { - // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ - // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ - } -} diff --git a/AbilityKit/NativeChildProcessParams/hvigorfile.ts b/AbilityKit/NativeChildProcessParams/hvigorfile.ts deleted file mode 100644 index e3340f07e45ddc5dcadbb87012668555def2e6e0..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/hvigorfile.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -import { appTasks } from '@ohos/hvigor-ohos-plugin'; - -export default { - system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ -} \ No newline at end of file diff --git a/AbilityKit/NativeChildProcessParams/oh-package.json5 b/AbilityKit/NativeChildProcessParams/oh-package.json5 deleted file mode 100644 index 69cb43cba3addcee1840403c67405134a2a9102c..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/oh-package.json5 +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -{ - "modelVersion": "6.0.0", - "description": "Please describe the basic information.", - "dependencies": { - }, - "devDependencies": { - "@ohos/hypium": "1.0.24", - "@ohos/hamock": "1.0.0" - } -} diff --git a/AbilityKit/NativeChildProcessParams/ohosTest.md b/AbilityKit/NativeChildProcessParams/ohosTest.md deleted file mode 100644 index 2cdf7a7d91c91139215c26c97c9e741a37188716..0000000000000000000000000000000000000000 --- a/AbilityKit/NativeChildProcessParams/ohosTest.md +++ /dev/null @@ -1,8 +0,0 @@ -# 创建Native子进程测试用例 - -## 用例表 - -| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 | -|-------|--------|---------------------------|--------|------| -------- | -| 拉起应用 | 设备正常运行 | | 成功拉起应用 | Yes | Pass | -| 子进程创建 | 应用正常拉起 | | 返回成功码值 | Yes | Pass | \ No newline at end of file