diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index c28007f884cfa400d19f22764b51a647265e9d8f..0000000000000000000000000000000000000000
--- a/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-*.ms filter=lfs diff=lfs merge=lfs -text
diff --git a/Account/DomainAccount/.gitignore b/Account/DomainAccount/.gitignore
deleted file mode 100644
index d2ff20141ceed86d87c0ea5d99481973005bab2b..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/.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/Account/DomainAccount/AppScope/app.json5 b/Account/DomainAccount/AppScope/app.json5
deleted file mode 100644
index 2daf34b8353fcfe05098873b7826fd87711e6c4e..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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.samples.domainaccount",
- "vendor": "example",
- "versionCode": 1000000,
- "versionName": "1.0.0",
- "icon": "$media:app_icon",
- "label": "$string:app_name"
- }
-}
diff --git a/Account/DomainAccount/AppScope/resources/base/element/string.json b/Account/DomainAccount/AppScope/resources/base/element/string.json
deleted file mode 100644
index 1cbfc016cbd9684ea1c1bbc44c328dbed4b7e279..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "DomainAccount"
- }
- ]
-}
diff --git a/Account/DomainAccount/AppScope/resources/base/media/app_icon.png b/Account/DomainAccount/AppScope/resources/base/media/app_icon.png
deleted file mode 100644
index a39445dc87828b76fed6d2ec470dd455c45319e3..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/AppScope/resources/base/media/app_icon.png and /dev/null differ
diff --git a/Account/DomainAccount/README.md b/Account/DomainAccount/README.md
deleted file mode 100644
index 30bf03feddb2ba8e700cfdb6462bbc6103f2aa24..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/README.md
+++ /dev/null
@@ -1,92 +0,0 @@
-# DomainAccount
-
-### 介绍
-
-用户可以在系统中添加域账号,后续可以使用该账号登录、使用系统。
-
-当需要验证域账号身份(比如屏幕解锁、登录会话失效等场景)时,可以使用系统提供的接口对域账号进行身份认证。
-
-OEM厂商可以采用插件方式定制化域账号管理能力,系统提供了域账号插件注册和注销能能力。
-
-实现对以下指南文件中[管理域账号](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/manage-domain-account.md) [域账号](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/auth-domain-account.md) [管理域账号插件](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/manage-domain-plugin.md) 示例代码片段的工程化。保证指南中示例代码与sample工程文件同源。
-
-### 效果预览
-
-| 首页 | 域账号插件管理页面 | 注册插件及结果 |
-| :----------------------------------------------------------: | :----------------------------------------------------------: | ------------------------------------------------------------ |
-|
|
|
|
-| 注销插件及结果 | 域账号管理页面 | 判断指定域账号是否存在及结果 |
-|
|
|
|
-| 添加域账号及结果 | 删除域账号及结果 | 查询域账号信息和认证结果 |
-|
|
|
|
-| 域账号认证页面 | 使用密码认证域账号及结果 | 弹窗验证域账号及结果 |
-|
|
|
|
-
-### 使用说明
-
-1. 在主界面,点击ManageDomainAccountsPlugin,进入域账号插件管理页面。
-2. 点击注册插件按钮,进行插件注册。
-3. 进入管理域账号管理页面。
-4. 点击判断指定域账号是否存在。
-5. 点击添加域账号。
-6. 点击删除域账号。
-7. 点击查询域账号信息。
-8. 进入认证域账号界面。
-9. 点击使用密码认证域账号。
-10. 点击使用弹窗验证域账号。
-11. 回到域账号插件管理页面。
-12. 点击注销插件按钮,进行注销插件。
-
-### 工程目录
-
-```
-entry/src/
- ├── main
- │ ├── ets
- │ │ ├── entryability
- │ │ ├── entrybackupability
- │ │ ├── pages
- | | ├──DomainAccount
- | | | ├──AuthenticationDomainAccount // 域账号管理示例代码
- | | | ├──ManageDomainAccounts // 域处理示例代码
- | | | └──ManageDomainAccountsPlugin // 域账号插件示例代码
- │ │ ├── Index.ets
- │ ├── module.json5
- │ └── resources
- ├── ohosTest
- │ ├── ets
- │ │ ├── test
- │ │ ├── Ability.test.ets // 自动化测试代码
-```
-
-### 相关权限
-
-[ohos.permission.MANAGE_LOCAL_ACCOUNTS](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissionmanagelocalaccounts)
-
-[ohos.permission.GET_DOMAIN_ACCOUNTS](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissiongetdomainaccounts)
-
-[ohos.permission.ACCESS_USER_AUTH_INTERNAL](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissionaccessuserauthinternal)
-
-### 依赖
-
-不涉及。
-
-### 约束与限制
-
-1.本示例仅支持标准系统上运行, 支持设备:RK3568。
-
-2.本示例为Stage模型,支持API14版本full-SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。
-
-3.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。
-
-### 下载
-
-如需单独下载本工程,执行如下命令:
-
-````
-git init
-git config core.sparsecheckout true
-echo code/DocsSample/Account/DomainAccount > .git/info/sparse-checkout
-git remote add origin https://gitee.com/openharmony/applications_app_samples.git
-git pull origin master
-````
\ No newline at end of file
diff --git a/Account/DomainAccount/build-profile.json5 b/Account/DomainAccount/build-profile.json5
deleted file mode 100644
index a33a4782e91c9280a45ec05115ebd546882ce072..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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",
- "compatibleSdkVersion": 14,
- "compileSdkVersion": 14,
- "targetSdkVersion": 14,
- "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/Account/DomainAccount/code-linter.json5 b/Account/DomainAccount/code-linter.json5
deleted file mode 100644
index 28586467ee7a761c737d8654a73aed6fddbc3c71..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/code-linter.json5
+++ /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.
- */
-
-{
- "files": [
- "**/*.ets"
- ],
- "ignore": [
- "**/src/ohosTest/**/*",
- "**/src/test/**/*",
- "**/src/mock/**/*",
- "**/node_modules/**/*",
- "**/oh_modules/**/*",
- "**/build/**/*",
- "**/.preview/**/*"
- ],
- "ruleSet": [
- "plugin:@performance/recommended",
- "plugin:@typescript-eslint/recommended"
- ],
- "rules": {
- }
-}
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/.gitignore b/Account/DomainAccount/entry/.gitignore
deleted file mode 100644
index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-/node_modules
-/oh_modules
-/.preview
-/build
-/.cxx
-/.test
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/build-profile.json5 b/Account/DomainAccount/entry/build-profile.json5
deleted file mode 100644
index b4d65d490ef6cbe22d933b9231555210f1555786..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/build-profile.json5
+++ /dev/null
@@ -1,43 +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": {
- },
- "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/Account/DomainAccount/entry/hvigorfile.ts b/Account/DomainAccount/entry/hvigorfile.ts
deleted file mode 100644
index e4f43d54667f8327c367c8096bd08bb8c75aff54..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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. */
-}
diff --git a/Account/DomainAccount/entry/obfuscation-rules.txt b/Account/DomainAccount/entry/obfuscation-rules.txt
deleted file mode 100644
index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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/Account/DomainAccount/entry/oh-package.json5 b/Account/DomainAccount/entry/oh-package.json5
deleted file mode 100644
index 4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/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": "entry",
- "version": "1.0.0",
- "description": "Please describe the basic information.",
- "main": "",
- "author": "",
- "license": "",
- "dependencies": {}
-}
-
diff --git a/Account/DomainAccount/entry/src/main/ets/entryability/EntryAbility.ets b/Account/DomainAccount/entry/src/main/ets/entryability/EntryAbility.ets
deleted file mode 100644
index 3e77e4b9f7946d80aa77e6b2dcfe40b23ccf6178..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/main/ets/entryability/EntryAbility.ets
+++ /dev/null
@@ -1,57 +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';
-
-export default class EntryAbility extends UIAbility {
- onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
- this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET);
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
- }
-
- onDestroy(): void {
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
- }
-
- onWindowStageCreate(windowStage: window.WindowStage): void {
- // Main window is created, set main page for this ability
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
-
- windowStage.loadContent('pages/Index', (err) => {
- if (err.code) {
- hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
- return;
- }
- hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
- });
- }
-
- onWindowStageDestroy(): void {
- // Main window is destroyed, release UI related resources
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
- }
-
- onForeground(): void {
- // Ability has brought to foreground
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
- }
-
- onBackground(): void {
- // Ability has back to background
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
- }
-}
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/Account/DomainAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
deleted file mode 100644
index 1504a74f09dfdcfae408be979f99369a2c5affab..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
+++ /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.
- */
-
-import { hilog } from '@kit.PerformanceAnalysisKit';
-import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit';
-
-export default class EntryBackupAbility extends BackupExtensionAbility {
- async onBackup() {
- hilog.info(0x0000, 'testTag', 'onBackup ok');
- }
-
- async onRestore(bundleVersion: BundleVersion) {
- hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion));
- }
-}
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/src/main/ets/pages/DomainAccount/AuthenticationDomainAccount.ets b/Account/DomainAccount/entry/src/main/ets/pages/DomainAccount/AuthenticationDomainAccount.ets
deleted file mode 100644
index 18ed52c2cecc5624ff0b214e16df0ea23cb9f3ea..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/main/ets/pages/DomainAccount/AuthenticationDomainAccount.ets
+++ /dev/null
@@ -1,117 +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 import_the_system_account_module]
-import { osAccount, BusinessError } from '@kit.BasicServicesKit';
-// [End import_the_system_account_module]
-import { router } from '@kit.ArkUI';
-
-@Entry
-@Component
-struct AuthenticationDomainAccount {
- @State message: string = 'No Message';
-
- private async passwordAuthenticateDomainAccount(): Promise {
- // [Start get_user_input]
- let domainAccountInfo: osAccount.DomainAccountInfo = {
- domain: 'CHINA',
- accountName: 'zhangsan'
- };
- let credential: Uint8Array = new Uint8Array([0]);
- // [End get_user_input]
- // [Start define_the_callback_for_the_authentication_result]
- let callback: osAccount.IUserAuthCallback = {
- onResult: (resultCode: number, authResult: osAccount.AuthResult) => {
- console.info('auth resultCode = ' + resultCode);
- console.info('auth authResult = ' + JSON.stringify(authResult));
- // [StartExclude define_the_callback_for_the_authentication_result]
- if(resultCode == 0) {
- this.message = 'Successfully authenticated domain account using password';
- } else {
- this.message = 'Failed to authenticate domain account using password: ' + resultCode;
- }
- // [EndExclude define_the_callback_for_the_authentication_result]
-
- }
- };
- // [End define_the_callback_for_the_authentication_result]
- // [Start perform_password_authentication]
- try {
- osAccount.DomainAccountManager.auth(domainAccountInfo, credential, callback);
- } catch (e) {
- const err = e as BusinessError;
- console.error(`auth exception = ${err.message}`);
- }
- // [End perform_password_authentication]
- }
-
- private async popupAuthenticateDomainAccount(): Promise {
- // [Start define_the_callback_object_of_the_authentication_result]
- let callback: osAccount.IUserAuthCallback = {
- onResult: (resultCode: number, authResult: osAccount.AuthResult) => {
- console.info('authWithPopup resultCode = ' + resultCode);
- console.info('authWithPopup authResult = ' + JSON.stringify(authResult));
- // [StartExclude define_the_callback_object_of_the_authentication_result]
- if(resultCode == 0) {
- this.message = 'Successfully authenticated domain account using popup';
- } else if(resultCode == 12300003) {
- this.message = 'No domain account is bound';
- } else {
- this.message = 'Failed to authenticate domain account using popup: ' + resultCode;
- }
- // [EndExclude define_the_callback_object_of_the_authentication_result]
- }
- }
- // [End define_the_callback_object_of_the_authentication_result]
- // [Start call_operation_to_authenticate_the_current_domain_account]
- try {
- osAccount.DomainAccountManager.authWithPopup(callback)
- } catch (e) {
- const err = e as BusinessError;
- console.error(`authWithPopup exception = ${err.message}`);
- // [StartExclude call_operation_to_authenticate_the_current_domain_account]
- this.message = 'Exception occurred during popup authentication: ' + JSON.stringify(err);
- // [EndExclude call_operation_to_authenticate_the_current_domain_account]
- }
- // [End call_operation_to_authenticate_the_current_domain_account]
- }
-
- build() {
- Column() {
- Text(this.message)
- .id('show')
- .fontSize(36)
- .fontWeight(FontWeight.Bold)
- Button($r('app.string.Domain1'))
- .margin(10)
- .id('button1')
- .onClick(() => this.passwordAuthenticateDomainAccount())
- Button($r('app.string.Domain2'))
- .margin(10)
- .id('button2')
- .onClick(() => this.popupAuthenticateDomainAccount())
- Button('Go to plugin')
- .margin(10)
- .id('button3')
- .onClick(() => {
- router.pushUrl({
- url: 'pages/DomainAccount/ManageDomainAccountsPlugin'
- })
- })
- }
- .height('100%')
- .width('100%')
- }
-}
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/src/main/ets/pages/DomainAccount/ManageDomainAccounts.ets b/Account/DomainAccount/entry/src/main/ets/pages/DomainAccount/ManageDomainAccounts.ets
deleted file mode 100644
index fb2edc6145a60fa69f1c2f5fc9af92ed72cfd542..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/main/ets/pages/DomainAccount/ManageDomainAccounts.ets
+++ /dev/null
@@ -1,189 +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 import_the_system_account_module]
-import { osAccount, BusinessError } from '@kit.BasicServicesKit';
-// [End import_the_system_account_module]
-import { router } from '@kit.ArkUI';
-
-// [Start obtain_the_system_account_management_object]
-let osAccountMgr = osAccount.getAccountManager();
-// [End obtain_the_system_account_management_object]
-
-@Entry
-@Component
-struct ManageDomainAccounts {
- @State message: string = 'Hello World';
-
- private async domainAccountExists(): Promise {
- // [Start define_the_domain_account_information_to_be_determined]
- let domainAccountInfo: osAccount.DomainAccountInfo = {
- accountName: 'testAccountName',
- domain: 'testDomain'
- }
- // [End define_the_domain_account_information_to_be_determined]
-
- // [Start call_the_hasaccount_operation]
- osAccount.DomainAccountManager.hasAccount(domainAccountInfo).then((isAccountExisted: boolean)=>{
- console.info('execute hasAccount successfully, isAccountExisted:' + JSON.stringify(isAccountExisted));
- // [StartExclude call_the_hasaccount_operation]
- if(isAccountExisted) {
- this.message = 'Domain account already exists';
- } else {
- this.message = 'Domain account does not exist';
- }
- // [EndExclude call_the_hasaccount_operation]
- }).catch((err: BusinessError)=>{
- console.error(`execute hasAccount code is ${err.code}, message is ${err.message}`);
- });
- // [End call_the_hasaccount_operation]
- }
-
- private async createDomainAccount(): Promise {
- // [Start define_the_domain_account_information]
- let domainInfo: osAccount.DomainAccountInfo = {
- domain: 'testDomain',
- accountName: 'testAccountName'
- };
- // [End define_the_domain_account_information]
-
- // [Start create_a_domain_account]
- try {
- osAccountMgr.createOsAccountForDomain(osAccount.OsAccountType.NORMAL, domainInfo,
- (err: BusinessError, osAccountInfo: osAccount.OsAccountInfo)=>{
- console.error(`createOsAccountForDomain exception: code is ${err.code}, message is ${err.message}`);
- console.info('createOsAccountForDomain osAccountInfo:' + JSON.stringify(osAccountInfo));
- // [StartExclude create_a_domain_account]
- this.message = 'Account creation information: ' + JSON.stringify(osAccountInfo.localName);
- // [EndExclude create_a_domain_account]
- });
- } catch (e) {
- const err = e as BusinessError;
- console.error(`createOsAccountForDomain exception: code is ${e.code}, message is ${e.message}`);
- // [StartExclude create_a_domain_account]
- this.message = 'Account creation failed: ' + JSON.stringify(e);
- // [EndExclude create_a_domain_account]
- }
- // [End create_a_domain_account]
- }
-
- private async deleteDomainAccount(): Promise {
- // [Start obtain_the_system_account_id_based_on_the_domain_account_information]
- let domainInfo: osAccount.DomainAccountInfo = {
- domain: 'testDomain',
- accountName: 'testAccountName'
- };
- let localId: number = 0;
- try {
- localId = await osAccountMgr.getOsAccountLocalIdForDomain(domainInfo);
- } catch (e) {
- const err = e as BusinessError;
- console.error(`getOsAccountLocalIdForDomain exception: code is ${err.code}, message is ${err.message}`);
- // [StartExclude obtain_the_system_account_id_based_on_the_domain_account_information]
- this.message = 'Failed to get account deletion information: ' + JSON.stringify(err);
- // [EndExclude obtain_the_system_account_id_based_on_the_domain_account_information]
- }
- // [End obtain_the_system_account_id_based_on_the_domain_account_information]
- // [Start delete_the_domain_account]
- try {
- osAccountMgr.removeOsAccount(localId, (err: BusinessError)=>{
- if (err) {
- console.error(`removeOsAccount failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude delete_the_domain_account]
- this.message = 'Failed to delete account: ' + JSON.stringify(err);
- // [EndExclude delete_the_domain_account]
- } else {
- console.info('removeOsAccount successfully');
- // [StartExclude delete_the_domain_account]
- this.message = 'Successfully deleted account';
- // [EndExclude delete_the_domain_account]
- }
- });
- } catch (e) {
- const err = e as BusinessError;
- console.error(`removeOsAccount exception: code is ${err.code}, message is ${err.message}`);
- }
- // [End delete_the_domain_account]
-
- }
-
- private async queryDomainAccount(): Promise {
- // [Start define_query_options]
- let options: osAccount.GetDomainAccountInfoOptions = {
- domain: 'testDomain',
- accountName: 'testAccountName'
- }
- // [End define_query_options]
- // [Start query_the_domain_account_information]
- try {
- osAccount.DomainAccountManager.getAccountInfo(options,
- (err: BusinessError, result: osAccount.DomainAccountInfo) => {
- if (err) {
- console.error(`call getAccountInfo failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude query_the_domain_account_information]
- this.message = 'Query failed: ' + JSON.stringify(err);
- // [EndExclude query_the_domain_account_information]
- } else {
- console.info('getAccountInfo result: ' + result);
- // [StartExclude query_the_domain_account_information]
- this.message = 'Queried account information: ' + JSON.stringify(result.accountName);
- // [EndExclude query_the_domain_account_information]
- }
- });
- } catch (e) {
- const err = e as BusinessError;
- console.error(`getAccountInfo exception = code is ${err.code}, message is ${err.message}`);
- // [StartExclude query_the_domain_account_information]
- this.message = 'Failed to query account information: ' + JSON.stringify(err);
- // [EndExclude query_the_domain_account_information]
- }
- // [End query_the_domain_account_information]
- }
-
- build() {
- Column() {
- Text(this.message)
- .id('show')
- .fontSize(36)
- .fontWeight(FontWeight.Bold)
- Button($r('app.string.Domain5'))
- .margin(10)
- .id('button1')
- .onClick(() => this.domainAccountExists())
- Button($r('app.string.Domain6'))
- .margin(10)
- .id('button2')
- .onClick(() => this.createDomainAccount())
- Button($r('app.string.Domain7'))
- .margin(10)
- .id('button3')
- .onClick(() => this.deleteDomainAccount())
- Button($r('app.string.Domain8'))
- .margin(10)
- .id('button4')
- .onClick(() => this.queryDomainAccount())
- Button('Go to AuthenticationDomainAccount')
- .margin(10)
- .id('button5')
- .onClick(() => {
- router.pushUrl({
- url: 'pages/DomainAccount/AuthenticationDomainAccount'
- })
- })
- }
- .height('100%')
- .width('100%')
- }
-}
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/src/main/ets/pages/DomainAccount/ManageDomainAccountsPlugin.ets b/Account/DomainAccount/entry/src/main/ets/pages/DomainAccount/ManageDomainAccountsPlugin.ets
deleted file mode 100644
index 54ff5cdc92de8a88043491a5c3cc75ea54730f53..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/main/ets/pages/DomainAccount/ManageDomainAccountsPlugin.ets
+++ /dev/null
@@ -1,209 +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 import_the_system_account_module]
-import { osAccount, AsyncCallback, BusinessError } from '@kit.BasicServicesKit';
-// [End import_the_system_account_module]
-import { router } from '@kit.ArkUI';
-
-// [Start define_the_plug_in]
-let plugin: osAccount.DomainPlugin = {
- auth: (domainAccountInfo: osAccount.DomainAccountInfo, credential: Uint8Array,
- callback: osAccount.IUserAuthCallback) => {
- console.info('plugin auth domain' + domainAccountInfo.domain);
- console.info('plugin auth accountName' + domainAccountInfo.accountName);
- console.info('plugin auth accountId' + domainAccountInfo.accountId);
-
- let result: osAccount.AuthResult = {
- token: new Uint8Array([0]),
- remainTimes: 5,
- freezingTime: 0
- };
- callback.onResult(0, result);
- },
- authWithPopup: (domainAccountInfo: osAccount.DomainAccountInfo,
- callback: osAccount.IUserAuthCallback) => {
- console.info('plugin authWithPopup domain' + domainAccountInfo.domain);
- console.info('plugin authWithPopup accountName' + domainAccountInfo.accountName);
- console.info('plugin authWithPopup accountId' + domainAccountInfo.accountId);
-
- let result: osAccount.AuthResult = {
- token: new Uint8Array([0]),
- remainTimes: 5,
- freezingTime: 0
- };
- callback.onResult(0, result);
- },
- authWithToken: (domainAccountInfo: osAccount.DomainAccountInfo,
- token: Uint8Array, callback: osAccount.IUserAuthCallback) => {
- console.info('plugin authWithToken domain' + domainAccountInfo.domain);
- console.info('plugin authWithToken accountName' + domainAccountInfo.accountName);
- console.info('plugin authWithToken accountId' + domainAccountInfo.accountId);
- let result: osAccount.AuthResult = {
- token: new Uint8Array([0]),
- remainTimes: 5,
- freezingTime: 0
- };
- callback.onResult(0, result);
- },
- getAccountInfo: (options: osAccount.GetDomainAccountInfoPluginOptions,
- callback: AsyncCallback) => {
- console.info('plugin getAccountInfo domain');
- let domainAccountId = Date.now().toString();
- let code: BusinessError = {
- code: 0,
- name: 'mock_name',
- message: 'mock_message'
- };
- let domainStr: string = '';
- if (options.domain != undefined) {
- domainStr = options.domain
- }
- let accountInfo: osAccount.DomainAccountInfo = {
- domain: domainStr,
- accountName: options.accountName,
- accountId: domainAccountId,
- isAuthenticated: false
- };
- callback(code, accountInfo);
- },
- getAuthStatusInfo: (domainAccountInfo: osAccount.DomainAccountInfo,
- callback: AsyncCallback) => {
-
- console.info('plugin getAuthStatusInfo domain' + domainAccountInfo.domain);
- console.info('plugin getAuthStatusInfo accountName' + domainAccountInfo.accountName);
- console.info('plugin getAuthStatusInfo accountId' + domainAccountInfo.accountId);
-
- let code: BusinessError = {
- code: 0,
- name: 'mock_name',
- message: 'mock_message'
- };
- let statusInfo: osAccount.AuthStatusInfo = {
- remainTimes: 5,
- freezingTime: 0
- };
- callback(code, statusInfo);
- },
- bindAccount: (domainAccountInfo: osAccount.DomainAccountInfo, localId: number,
- callback: AsyncCallback) => {
- console.info('plugin bindAccount domain' + domainAccountInfo.domain);
- console.info('plugin bindAccount accountName' + domainAccountInfo.accountName);
- console.info('plugin bindAccount accountId' + domainAccountInfo.accountId);
- let code: BusinessError = {
- code: 0,
- name: 'mock_name',
- message: 'mock_message'
- };
- callback(code);
- },
- unbindAccount: (domainAccountInfo: osAccount.DomainAccountInfo, callback: AsyncCallback) => {
- console.info('plugin unbindAccount domain' + domainAccountInfo.domain);
- console.info('plugin unbindAccount accountName' + domainAccountInfo.accountName);
- console.info('plugin unbindAccount accountId' + domainAccountInfo.accountId);
- },
- isAccountTokenValid: (domainAccountInfo: osAccount.DomainAccountInfo, token: Uint8Array,
- callback: AsyncCallback) => {
- console.info('plugin isAccountTokenValid domain' + domainAccountInfo.domain);
- console.info('plugin isAccountTokenValid accountName' + domainAccountInfo.accountName);
- console.info('plugin isAccountTokenValid accountId' + domainAccountInfo.accountId);
- let code: BusinessError = {
- code: 0,
- name: 'mock_name',
- message: 'mock_message'
- };
- callback(code, true);
- },
- getAccessToken: (options: osAccount.GetDomainAccessTokenOptions, callback: AsyncCallback) => {
- console.info('plugin getAccessToken domain')
- let code: BusinessError = {
- code: 0,
- name: 'mock_name',
- message: 'mock_message'
- };
- let token: Uint8Array = new Uint8Array([0]);
- callback(code, token);
- }
-}
-// [End define_the_plug_in]
-
-
-@Entry
-@Component
-struct ManageDomainAccountsPlugin {
- @State message: string = 'Manage domain account plugin';
-
- private async registrationPlugin(): Promise {
- // [Start call_the_api_to_register_the_plug_in]
- try {
- osAccount.DomainAccountManager.registerPlugin(plugin)
- console.info('registerPlugin success');
- // [StartExclude call_the_api_to_register_the_plug_in]
- this.message = 'Successfully registered plugin';
- // [EndExclude call_the_api_to_register_the_plug_in]
- } catch (e) {
- const err = e as BusinessError;
- console.error(`registerPlugin err: code is ${err.code}, message is ${err.message}`);
- // [StartExclude call_the_api_to_register_the_plug_in]
- this.message = 'Failed to register plugin: ' + JSON.stringify(err);
- // [EndExclude call_the_api_to_register_the_plug_in]
- }
- // [End call_the_api_to_register_the_plug_in]
- }
-
- private async logoutPlugin(): Promise {
- // [Start call_the_api_to_log_out_the_plug_in]
- try {
- osAccount.DomainAccountManager.unregisterPlugin();
- console.info('unregisterPlugin success.');
- // [StartExclude call_the_api_to_log_out_the_plug_in]
- this.message = 'unregisterPlugin success';
- // [EndExclude call_the_api_to_log_out_the_plug_in]
- } catch (e) {
- const err = e as BusinessError;
- console.error(`unregisterPlugin failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude call_the_api_to_log_out_the_plug_in]
- this.message = 'Failed to unregister plugin: ' + JSON.stringify(err);
- // [EndExclude call_the_api_to_log_out_the_plug_in]
- }
- // [End call_the_api_to_log_out_the_plug_in]
- }
-
- build() {
- Column() {
- Text(this.message)
- .id('show')
- .fontSize(36)
- .fontWeight(FontWeight.Bold)
- Button($r('app.string.Domain3'))
- .margin(10)
- .id('button1')
- .onClick(() => this.registrationPlugin())
- Button($r('app.string.Domain4'))
- .margin(10)
- .id('button2')
- .onClick(() => this.logoutPlugin())
- Button('Return back')
- .id('button3')
- .onClick(() => {
- router.pushUrl({
- url: 'pages/DomainAccount/ManageDomainAccounts'
- })
- })
- }
- .height('100%')
- .width('100%')
- }
-}
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/src/main/ets/pages/Index.ets b/Account/DomainAccount/entry/src/main/ets/pages/Index.ets
deleted file mode 100644
index 2a207adae204d5245cf80aabcd5bef33581de5b0..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/main/ets/pages/Index.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 { CommonButton } from '../util/CommonButton';
-
-@Entry
-@Component
-struct Index {
- build() {
- Scroll() {
- Column() {
- Text('DomainAccountHome')
- .padding('15vp')
- .width('100%')
- .fontSize('25fp')
- .textAlign(TextAlign.Center)
- CommonButton({
- buttonName: 'AuthenticationDomainAccount',
- buttonUrl: 'pages/DomainAccount/AuthenticationDomainAccount'
- });
- CommonButton({
- buttonName: 'ManageDomainAccounts',
- buttonUrl: 'pages/DomainAccount/ManageDomainAccounts'
- });
- CommonButton({
- buttonName: 'ManageDomainAccountsPlugin',
- buttonUrl: 'pages/DomainAccount/ManageDomainAccountsPlugin'
- });
- }
- .padding('5vp')
- .width('100%')
- }.margin({ bottom: 60 })
- .width('100%')
- }
-}
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/src/main/ets/util/CommonButton.ets b/Account/DomainAccount/entry/src/main/ets/util/CommonButton.ets
deleted file mode 100644
index b2d268bf3aec25d2dcec35d282290ebc90d9d7d9..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/main/ets/util/CommonButton.ets
+++ /dev/null
@@ -1,45 +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 router from '@ohos.router';
-
-@Component
-export struct CommonButton {
- @State buttonName: string = '';
- @State buttonUrl: string = '';
- @State data: string = '';
-
- build() {
- Text(this.buttonName)
- .id(this.buttonName)
- .padding(px2vp(5))
- .fontSize(px2fp(24))
- .textAlign(TextAlign.Center)
- .backgroundColor(Color.Blue)
- .fontColor(Color.White)
- .borderRadius(5)
- .margin(px2vp(20))
- .padding(px2vp(15))
- .onClick(() => {
- router.pushUrl({
- url: this.buttonUrl,
- params: {
- text: this.data,
- buttonName: this.buttonName
- }
- })
- })
- }
-}
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/src/main/module.json5 b/Account/DomainAccount/entry/src/main/module.json5
deleted file mode 100644
index cc58129f9628f1c02fb0227f56c35984903cce07..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/main/module.json5
+++ /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.
- */
-
-{
- "module": {
- "name": "entry",
- "type": "entry",
- "description": "$string:module_desc",
- "mainElement": "EntryAbility",
- "deviceTypes": [
- "default",
- "tablet"
- ],
- "deliveryWithInstall": true,
- "installationFree": false,
- "pages": "$profile:main_pages",
- "requestPermissions": [{
- "name": "ohos.permission.MANAGE_LOCAL_ACCOUNTS"
- },
- {
- "name": "ohos.permission.GET_DOMAIN_ACCOUNTS"
- },
- {
- "name": "ohos.permission.ACCESS_USER_AUTH_INTERNAL"
- }],
- "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": [
- "action.system.home"
- ]
- }
- ]
- }
- ],
- "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/Account/DomainAccount/entry/src/main/resources/base/element/color.json b/Account/DomainAccount/entry/src/main/resources/base/element/color.json
deleted file mode 100644
index d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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/Account/DomainAccount/entry/src/main/resources/base/element/string.json b/Account/DomainAccount/entry/src/main/resources/base/element/string.json
deleted file mode 100644
index 195e14de37503d0215b75d2f13a2ad44804085c7..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "module description"
- },
- {
- "name": "EntryAbility_desc",
- "value": "description"
- },
- {
- "name": "EntryAbility_label",
- "value": "DomainAccount"
- },
- {
- "name": "Domain1",
- "value": "Authenticate domain account using password"
- },
- {
- "name": "Domain2",
- "value": "Authenticate domain account using popup"
- },
- {
- "name": "Domain3",
- "value": "Register plugin"
- },
- {
- "name": "Domain4",
- "value": "Unregister plugin"
- },
- {
- "name": "Domain5",
- "value": "Check if the specified domain account exists"
- },
- {
- "name": "Domain6",
- "value": "Add domain account"
- },
- {
- "name": "Domain7",
- "value": "Delete domain account"
- },
- {
- "name": "Domain8",
- "value": "Query domain account information"
- }
- ]
-}
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/src/main/resources/base/media/background.png b/Account/DomainAccount/entry/src/main/resources/base/media/background.png
deleted file mode 100644
index f939c9fa8cc8914832e602198745f592a0dfa34d..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/entry/src/main/resources/base/media/background.png and /dev/null differ
diff --git a/Account/DomainAccount/entry/src/main/resources/base/media/foreground.png b/Account/DomainAccount/entry/src/main/resources/base/media/foreground.png
deleted file mode 100644
index 4483ddad1f079e1089d685bd204ee1cfe1d01902..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/entry/src/main/resources/base/media/foreground.png and /dev/null differ
diff --git a/Account/DomainAccount/entry/src/main/resources/base/media/layered_image.json b/Account/DomainAccount/entry/src/main/resources/base/media/layered_image.json
deleted file mode 100644
index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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/Account/DomainAccount/entry/src/main/resources/base/media/startIcon.png b/Account/DomainAccount/entry/src/main/resources/base/media/startIcon.png
deleted file mode 100644
index 205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/entry/src/main/resources/base/media/startIcon.png and /dev/null differ
diff --git a/Account/DomainAccount/entry/src/main/resources/base/profile/backup_config.json b/Account/DomainAccount/entry/src/main/resources/base/profile/backup_config.json
deleted file mode 100644
index d742c2f96e7dd0f406f499941f3147345e998f95..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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/Account/DomainAccount/entry/src/main/resources/base/profile/main_pages.json b/Account/DomainAccount/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100644
index e47a9436e04a20e9f2c2c825ba5c7049a6b0d372..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/main/resources/base/profile/main_pages.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "src": [
- "pages/Index",
- "pages/DomainAccount/AuthenticationDomainAccount",
- "pages/DomainAccount/ManageDomainAccounts",
- "pages/DomainAccount/ManageDomainAccountsPlugin"
- ]
-}
diff --git a/Account/DomainAccount/entry/src/main/resources/dark/element/color.json b/Account/DomainAccount/entry/src/main/resources/dark/element/color.json
deleted file mode 100644
index 438d5bc43bb23c59c210d586b96635a72da5b64a..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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/Account/DomainAccount/entry/src/mock/mock-config.json5 b/Account/DomainAccount/entry/src/mock/mock-config.json5
deleted file mode 100644
index b9a78e201535765168a92d3543c690273ecdc019..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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/Account/DomainAccount/entry/src/ohosTest/ets/test/Ability.test.ets b/Account/DomainAccount/entry/src/ohosTest/ets/test/Ability.test.ets
deleted file mode 100644
index 25279cdbcac906d8242ec0a379fe58af536f71f8..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/entry/src/ohosTest/ets/test/Ability.test.ets
+++ /dev/null
@@ -1,117 +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, it, expect } from '@ohos/hypium';
-// 导入测试依赖kit
-import { abilityDelegatorRegistry, Driver, ON } from '@kit.TestKit';
-import { UIAbility, Want } from '@kit.AbilityKit';
-
-const delegator: abilityDelegatorRegistry.AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator();
-const bundleName = abilityDelegatorRegistry.getArguments().bundleName;
-function sleep(time: number) {
- return new Promise((resolve: Function) => setTimeout(resolve, time));
-}
-export default function abilityTest() {
- describe('DomainAccountAbilityTest', () => {
- /*
- * 打开应用,依次点击页面中按钮
- * 使用域账号接口功能
- */
- it('DomainAccountsExample', 0, async (done: Function) => {
- console.info("uitest: TestUiExample begin");
- const want: Want = {
- bundleName: bundleName,
- abilityName: 'EntryAbility'
- }
- await delegator.startAbility(want);
- await sleep(1000);
- const ability: UIAbility = await delegator.getCurrentTopAbility();
- console.info("get top ability");
- expect(ability.context.abilityInfo.name).assertEqual('EntryAbility');
- const driver = Driver.create();
- await driver.delayMs(1000);
-
- const button1 = await driver.findComponent(ON.text('ManageDomainAccountsPlugin'));
- await button1.click();
- await driver.delayMs(1000);
-
- const button2 = await driver.findComponent(ON.id('button1'));
- await button2.click();
- await driver.delayMs(1000);
- const text0 = await driver.findComponent(ON.id('show'));
- let content0: string = await text0.getText();
- expect(content0).assertEqual('Successfully registered plugin');
-
- const button3 = await driver.findComponent(ON.id('button3'));
- await button3.click();
- await driver.delayMs(1000);
-
- const button5 = await driver.findComponent(ON.id('button1'));
- await button5.click();
- await driver.delayMs(1000);
- const text = await driver.findComponent(ON.id('show'));
- let content1: string = await text.getText();
- expect(content1).assertEqual('Domain account already exists');
-
- const button6 = await driver.findComponent(ON.id('button2'));
- await button6.click();
- await driver.delayMs(10000);
- let content2: string = await text.getText();
- expect(content2).assertEqual('Account creation information: "testAccountName"');
-
- const button7 = await driver.findComponent(ON.id('button3'));
- await button7.click();
- await driver.delayMs(10000);
- let content3: string = await text.getText();
- expect(content3).assertEqual('Successfully deleted account');
-
- const button8 = await driver.findComponent(ON.id('button4'));
- await button8.click();
- await driver.delayMs(1000);
- let content4: string = await text.getText();
- expect(content4).assertEqual('Queried account information: "testAccountName"');
-
- const button9 = await driver.findComponent(ON.id('button5'));
- await button9.click();
- await driver.delayMs(1000);
-
- const button10 = await driver.findComponent(ON.id('button1'));
- await button10.click();
- await driver.delayMs(1000);
- const text1 = await driver.findComponent(ON.id('show'));
- let content5: string = await text1.getText();
- expect(content5).assertEqual('Successfully authenticated domain account using password');
-
- const button11 = await driver.findComponent(ON.id('button2'));
- await button11.click();
- await driver.delayMs(10000);
- let content6: string = await text1.getText();
- expect(content6).assertEqual('No domain account is bound');
-
- const button12 = await driver.findComponent(ON.id('button3'));
- await button12.click();
- await driver.delayMs(1000);
-
- const button13 = await driver.findComponent(ON.id('button2'));
- await button13.click();
- await driver.delayMs(1000);
- const text2 = await driver.findComponent(ON.id('show'));
- let content7: string = await text2.getText();
- expect(content7).assertEqual('unregisterPlugin success');
- done();
- console.info("uitest: TestUiExample end");
- })
- })
-}
\ No newline at end of file
diff --git a/Account/DomainAccount/entry/src/ohosTest/ets/test/List.test.ets b/Account/DomainAccount/entry/src/ohosTest/ets/test/List.test.ets
deleted file mode 100644
index 1eac52fcebe8958e19a7b8fed2e8f39c520a3e42..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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/Account/DomainAccount/entry/src/ohosTest/module.json5 b/Account/DomainAccount/entry/src/ohosTest/module.json5
deleted file mode 100644
index 9983b2ba4e55e31a172f0328c82c9a75bfa00ded..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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/Account/DomainAccount/entry/src/test/List.test.ets b/Account/DomainAccount/entry/src/test/List.test.ets
deleted file mode 100644
index f1186b1f53c3a70930921c5dbd1417332bec56c9..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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/Account/DomainAccount/entry/src/test/LocalUnit.test.ets b/Account/DomainAccount/entry/src/test/LocalUnit.test.ets
deleted file mode 100644
index 7fc57c77dbf76d8df08a2b802a55b948e3fcf968..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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/Account/DomainAccount/hvigor/hvigor-config.json5 b/Account/DomainAccount/hvigor/hvigor-config.json5
deleted file mode 100644
index cef74543b1f97c82275e4bf3434b162395bff2eb..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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": "5.0.1",
- "dependencies": {
- },
- "execution": {
- // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | 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 */
- },
- "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/Account/DomainAccount/hvigorfile.ts b/Account/DomainAccount/hvigorfile.ts
deleted file mode 100644
index 2a5e543f190732c159beb574dfc9fa37bc94e156..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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. */
-}
diff --git a/Account/DomainAccount/oh-package.json5 b/Account/DomainAccount/oh-package.json5
deleted file mode 100644
index eaef52736f22c14e04fca386ba01611ab32a7e4a..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/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": "5.0.1",
- "description": "Please describe the basic information.",
- "dependencies": {
- },
- "devDependencies": {
- "@ohos/hypium": "1.0.19",
- "@ohos/hamock": "1.0.0"
- }
-}
diff --git a/Account/DomainAccount/ohosTest.md b/Account/DomainAccount/ohosTest.md
deleted file mode 100644
index 3145d43fc6fb2626a0ecb7730c6cc3b3f6bab8ab..0000000000000000000000000000000000000000
--- a/Account/DomainAccount/ohosTest.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# DomainAccount 测试用例归档
-
-## 用例表
-
-| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 |
-| ---------------------- | ----------------------------------------------- | ----------------------------- | --------------------------------------------- | -------- | -------- |
-| 拉起应用 | 设备正常运行 | | 成功拉起应用 | 是 | Pass |
-| 注册插件 | 位于ManageDomainAccountsPlugin页面 | 点击‘Register plugin’ | 页面显示“Successfully registered plugin” | 是 | Pass |
-| 注销插件 | 位于ManageDomainAccountsPlugin页面 | 点击‘Register plugin’ | 页面显示“unregisterPlugin success“ | 是 | Pass |
-| Check if the specified domain account exists | 位于ManageDomainAccounts页面,已注册插件 | 点击‘ Check if the specified domain account exists’ | 页面显示“Domain account already exists“ | 是 | Pass |
-| Add domain account | 位于ManageDomainAccounts页面,已注册插件 | 点击‘Add domain account’ | 页面显示“Account creation information: "testAccountName"“ | 是 | Pass |
-| Delete domain account | 位于ManageDomainAccounts页面,已注册插件 | 点击‘Delete domain account’ | 页面显示“Successfully deleted account“ | 是 | Pass |
-| Query domain account information | 位于ManageDomainAccounts页面,已注册插件 | 点击‘Query domain account information’ | 页面显示“Queried account information: "testAccountName"“ | 是 | Pass |
-| Authenticate domain account using password | 位于AuthenticationDomainAccount页面,已注册插件 | 点击‘使用密码进行认证’ | 页面显示“Successfully authenticated domain account using password“ | 是 | Pass |
-| Authenticate domain account using popup | 位于AuthenticationDomainAccount页面,已注册插件 | 点击‘Authenticate domain account using popup’ | 页面显示"No domain account is bound" | 是 | Pass |
\ No newline at end of file
diff --git a/Account/DomainAccount/screenshots/DomainAccount_1.png b/Account/DomainAccount/screenshots/DomainAccount_1.png
deleted file mode 100644
index cfd2e01bbc1b4122f2bc5479238d691c8673115e..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_1.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_10.png b/Account/DomainAccount/screenshots/DomainAccount_10.png
deleted file mode 100644
index 31c95223b1684e300cd35310cfe1c22cafbb980e..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_10.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_11.png b/Account/DomainAccount/screenshots/DomainAccount_11.png
deleted file mode 100644
index 9974b35442f9b7520afb0a83a494ea3af0773e6f..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_11.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_12.png b/Account/DomainAccount/screenshots/DomainAccount_12.png
deleted file mode 100644
index 8bc5178f742f2bd95f690ca1c31e4edc2b69e113..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_12.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_2.png b/Account/DomainAccount/screenshots/DomainAccount_2.png
deleted file mode 100644
index dc15152d5840f7c70fc56ddd75e6b16791e154f9..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_2.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_3.png b/Account/DomainAccount/screenshots/DomainAccount_3.png
deleted file mode 100644
index 1ed3f8e478479524fca7c47b0efb3be7c04c39ee..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_3.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_4.png b/Account/DomainAccount/screenshots/DomainAccount_4.png
deleted file mode 100644
index 74a8cba911568d6a44eded3ca078fd7863a4ded2..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_4.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_5.png b/Account/DomainAccount/screenshots/DomainAccount_5.png
deleted file mode 100644
index 2fac836435d2f5dabd4b4610f81f32a017511d61..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_5.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_6.png b/Account/DomainAccount/screenshots/DomainAccount_6.png
deleted file mode 100644
index 9724d16af1c3dab011b73cdc353682ad9a7e1be2..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_6.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_7.png b/Account/DomainAccount/screenshots/DomainAccount_7.png
deleted file mode 100644
index fe58ce1397f4ec097f487a98f369408a3c576ff7..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_7.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_8.png b/Account/DomainAccount/screenshots/DomainAccount_8.png
deleted file mode 100644
index bd5431a1fa936b673a520a25067af24bfd084e00..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_8.png and /dev/null differ
diff --git a/Account/DomainAccount/screenshots/DomainAccount_9.png b/Account/DomainAccount/screenshots/DomainAccount_9.png
deleted file mode 100644
index 7897af572765f17884b765aa06f983a5773d99de..0000000000000000000000000000000000000000
Binary files a/Account/DomainAccount/screenshots/DomainAccount_9.png and /dev/null differ
diff --git a/Account/ManageDistributedAccount/.gitignore b/Account/ManageDistributedAccount/.gitignore
deleted file mode 100644
index d2ff20141ceed86d87c0ea5d99481973005bab2b..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/.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/Account/ManageDistributedAccount/AppScope/app.json5 b/Account/ManageDistributedAccount/AppScope/app.json5
deleted file mode 100644
index d6cb5185f09411c25d82165401b5cc82b134a637..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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.samples.managedistributedaccount",
- "vendor": "example",
- "versionCode": 1000000,
- "versionName": "1.0.0",
- "icon": "$media:app_icon",
- "label": "$string:app_name"
- }
-}
diff --git a/Account/ManageDistributedAccount/AppScope/resources/base/element/string.json b/Account/ManageDistributedAccount/AppScope/resources/base/element/string.json
deleted file mode 100644
index 975d8e8814253333cdc926c9c61809fb63ef2808..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "ManageDistributedAccount"
- }
- ]
-}
diff --git a/Account/ManageDistributedAccount/AppScope/resources/base/media/app_icon.png b/Account/ManageDistributedAccount/AppScope/resources/base/media/app_icon.png
deleted file mode 100644
index a39445dc87828b76fed6d2ec470dd455c45319e3..0000000000000000000000000000000000000000
Binary files a/Account/ManageDistributedAccount/AppScope/resources/base/media/app_icon.png and /dev/null differ
diff --git a/Account/ManageDistributedAccount/README.md b/Account/ManageDistributedAccount/README.md
deleted file mode 100644
index 1b2394ac51a0088d138c05654109e8ac6979f392..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# 管理分布式账号(仅对系统应用开放)
-
-### 介绍
-
-1.OEM厂商可以通过[分布式账号SDK](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-basic-services-kit/js-apis-distributed-account.md)将自有账号与本地系统账号建立关联关系。
-
-2.实现对以下指南文档中 [管理分布式账号](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/manage-distributed-account.md) 示例代码片段的工程化,保证指南中示例代码与sample工程文件同源。
-
-### 效果预览
-
-| 首页 | 执行Log in and bind distributed account on the current system account |
-| :----------------------------------------------------------: | :----------------------------------------------------------: |
-|
|
|
-| **执行Log out and unbind distributed account on the current system account** | **执行Log in and bind distributed account on the specified system account** |
-|
|
|
-| **执行Log out and unbind distributed account on the specified system account** | |
-|
| |
-
-### 使用说明
-
-1. 在主界面,点击'Log in and bind distributed account on the current system account',执行Log in and bind distributed account on the current system account。
-2. 点击'Log out and unbind distributed account on the current system account',执行Log out and unbind distributed account on the current system account。
-3. 点击'Log in and bind distributed account on the specified system account',执行Log in and bind distributed account on the specified system account。
-4. 点击'Log out and unbind distributed account on the specified system account',执行Log out and unbind distributed account on the specified system account。
-5. 执行结果会即时反馈在屏幕中央,并在控制台打印log。
-
-### 工程目录
-
-```
-entry/src/
- ├── main
- │ ├── ets
- │ │ ├── entryability
- │ │ ├── entrybackupability
- │ │ └── pages
- │ │ └── Index.ets // 管理分布式账号示例代码
- │ ├── module.json5
- │ └── resources
- ├── ohosTest
- │ ├── ets
- │ │ └── test
- │ │ └── Ability.test.ets // 自动化测试代码
-```
-
-### 相关权限
-
-[ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissionmanagedistributedaccounts)
-
-### 依赖
-
-不涉及。
-
-### 约束与限制
-
-1.本示例仅支持标准系统上运行, 支持设备:RK3568。
-
-2.本示例为Stage模型,支持API14版本full-SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。
-
-3.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。
-
-### 下载
-
-如需单独下载本工程,执行如下命令:
-
-````
-git init
-git config core.sparsecheckout true
-echo code/DocsSample/Account/ManageDistributedAccount > .git/info/sparse-checkout
-git remote add origin https://gitee.com/openharmony/applications_app_samples.git
-git pull origin master
-````
\ No newline at end of file
diff --git a/Account/ManageDistributedAccount/build-profile.json5 b/Account/ManageDistributedAccount/build-profile.json5
deleted file mode 100644
index 3c1dc3a4c625f2ec0629fbb2c33a841fa39111e6..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/build-profile.json5
+++ /dev/null
@@ -1,52 +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",
- "compatibleSdkVersion": 14,
- "compileSdkVersion": 14,
- "targetSdkVersion": 14,
- "runtimeOS": "OpenHarmony",
- }
- ],
- "buildModeSet": [
- {
- "name": "debug",
- },
- {
- "name": "release"
- }
- ]
- },
- "modules": [
- {
- "name": "entry",
- "srcPath": "./entry",
- "targets": [
- {
- "name": "default",
- "applyToProducts": [
- "default"
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/Account/ManageDistributedAccount/code-linter.json5 b/Account/ManageDistributedAccount/code-linter.json5
deleted file mode 100644
index 28586467ee7a761c737d8654a73aed6fddbc3c71..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/code-linter.json5
+++ /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.
- */
-
-{
- "files": [
- "**/*.ets"
- ],
- "ignore": [
- "**/src/ohosTest/**/*",
- "**/src/test/**/*",
- "**/src/mock/**/*",
- "**/node_modules/**/*",
- "**/oh_modules/**/*",
- "**/build/**/*",
- "**/.preview/**/*"
- ],
- "ruleSet": [
- "plugin:@performance/recommended",
- "plugin:@typescript-eslint/recommended"
- ],
- "rules": {
- }
-}
\ No newline at end of file
diff --git a/Account/ManageDistributedAccount/entry/.gitignore b/Account/ManageDistributedAccount/entry/.gitignore
deleted file mode 100644
index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/entry/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-/node_modules
-/oh_modules
-/.preview
-/build
-/.cxx
-/.test
\ No newline at end of file
diff --git a/Account/ManageDistributedAccount/entry/build-profile.json5 b/Account/ManageDistributedAccount/entry/build-profile.json5
deleted file mode 100644
index b4d65d490ef6cbe22d933b9231555210f1555786..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/entry/build-profile.json5
+++ /dev/null
@@ -1,43 +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": {
- },
- "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/Account/ManageDistributedAccount/entry/hvigorfile.ts b/Account/ManageDistributedAccount/entry/hvigorfile.ts
deleted file mode 100644
index e4f43d54667f8327c367c8096bd08bb8c75aff54..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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. */
-}
diff --git a/Account/ManageDistributedAccount/entry/obfuscation-rules.txt b/Account/ManageDistributedAccount/entry/obfuscation-rules.txt
deleted file mode 100644
index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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/Account/ManageDistributedAccount/entry/oh-package.json5 b/Account/ManageDistributedAccount/entry/oh-package.json5
deleted file mode 100644
index 4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/entry/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": "entry",
- "version": "1.0.0",
- "description": "Please describe the basic information.",
- "main": "",
- "author": "",
- "license": "",
- "dependencies": {}
-}
-
diff --git a/Account/ManageDistributedAccount/entry/src/main/ets/entryability/EntryAbility.ets b/Account/ManageDistributedAccount/entry/src/main/ets/entryability/EntryAbility.ets
deleted file mode 100644
index 3e77e4b9f7946d80aa77e6b2dcfe40b23ccf6178..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/entry/src/main/ets/entryability/EntryAbility.ets
+++ /dev/null
@@ -1,57 +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';
-
-export default class EntryAbility extends UIAbility {
- onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
- this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET);
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
- }
-
- onDestroy(): void {
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
- }
-
- onWindowStageCreate(windowStage: window.WindowStage): void {
- // Main window is created, set main page for this ability
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
-
- windowStage.loadContent('pages/Index', (err) => {
- if (err.code) {
- hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
- return;
- }
- hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
- });
- }
-
- onWindowStageDestroy(): void {
- // Main window is destroyed, release UI related resources
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
- }
-
- onForeground(): void {
- // Ability has brought to foreground
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
- }
-
- onBackground(): void {
- // Ability has back to background
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
- }
-}
\ No newline at end of file
diff --git a/Account/ManageDistributedAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/Account/ManageDistributedAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
deleted file mode 100644
index 1504a74f09dfdcfae408be979f99369a2c5affab..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
+++ /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.
- */
-
-import { hilog } from '@kit.PerformanceAnalysisKit';
-import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit';
-
-export default class EntryBackupAbility extends BackupExtensionAbility {
- async onBackup() {
- hilog.info(0x0000, 'testTag', 'onBackup ok');
- }
-
- async onRestore(bundleVersion: BundleVersion) {
- hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion));
- }
-}
\ No newline at end of file
diff --git a/Account/ManageDistributedAccount/entry/src/main/ets/pages/Index.ets b/Account/ManageDistributedAccount/entry/src/main/ets/pages/Index.ets
deleted file mode 100644
index 0f3a44f5093a99ccf5b6833db9623f58ccb0537f..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/entry/src/main/ets/pages/Index.ets
+++ /dev/null
@@ -1,176 +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 import_the_distributed_account_module]
-import { distributedAccount, BusinessError } from '@kit.BasicServicesKit';
-// [End import_the_distributed_account_module]
-
-// [Start obtain_the_single-instance_object_of_the_distributed_account]
-const distributedAccountAbility = distributedAccount.getDistributedAccountAbility();
-// [End obtain_the_single-instance_object_of_the_distributed_account]
-
-@Entry
-@Component
-struct Index {
- @State message: string = 'No Name';
-
- private async bindCurrentManageDistributedAccounts(): Promise {
- // [Start define_the_distributed_account_information_to_be_logged_in]
- let distributedInfo: distributedAccount.DistributedInfo = {
- name: 'ZhangSan',
- id: '12345',
- event: 'Ohos.account.event.LOGIN',
- };
- // [End define_the_distributed_account_information_to_be_logged_in]
-
- // [Start bind_the_current_system_account_to_the_specified_distributed_account]
- await distributedAccountAbility.setOsAccountDistributedInfo(distributedInfo).then(() => {
- console.info('setOsAccountDistributedInfo successfully');
- }).catch((err: BusinessError) => {
- console.error(`setOsAccountDistributedInfo exception: code is ${err.code}, message is ${err.message}`);
- // [StartExclude bind_the_current_system_account_to_the_specified_distributed_account]
- this.message = 'Failed to bind distributed account: ' + JSON.stringify(err);
- // [EndExclude bind_the_current_system_account_to_the_specified_distributed_account]
- });
- // [End bind_the_current_system_account_to_the_specified_distributed_account]
-
- // [Start view_the_login_information_of_distributed_account]
- distributedAccountAbility.getOsAccountDistributedInfo().then((data: distributedAccount.DistributedInfo) => {
- console.info('distributed information: ' + JSON.stringify(data));
- // [StartExclude view_the_login_information_of_distributed_account]
- this.message = 'Bind distributed account: ' + data.name;
- // [EndExclude view_the_login_information_of_distributed_account]
- }).catch((err: BusinessError) => {
- console.error(`getOsAccountDistributedInfo exception: code is ${err.code}, message is ${err.message}`);
- // [StartExclude view_the_login_information_of_distributed_account]
- this.message = 'Failed to get distributed account: ' + JSON.stringify(err);
- // [EndExclude view_the_login_information_of_distributed_account]
- });
- // [End view_the_login_information_of_distributed_account]
- }
-
- private async unbindCurrentManageDistributedAccounts(): Promise {
- // [Start define_the_distributed_account_information_to_be_logged_out]
- let distributedInfo: distributedAccount.DistributedInfo = {
- name: 'ZhangSan',
- id: '12345',
- event: 'Ohos.account.event.LOGOUT',
- };
- // [End define_the_distributed_account_information_to_be_logged_out]
-
- // [Start unbind_the_specified_distributed_account_from_the_current_system_account]
- distributedAccountAbility.setOsAccountDistributedInfo(distributedInfo).then(() => {
- console.info('setOsAccountDistributedInfo successfully');
- // [StartExclude unbind_the_specified_distributed_account_from_the_current_system_account]
- this.message = 'Successfully unbound distributed account'
- // [EndExclude unbind_the_specified_distributed_account_from_the_current_system_account]
- }).catch((err: BusinessError) => {
- console.error(`setOsAccountDistributedInfo exception: code is ${err.code}, message is ${err.message}`);
- // [StartExclude unbind_the_specified_distributed_account_from_the_current_system_account]
- this.message = 'Failed to unbind distributed account'
- // [EndExclude unbind_the_specified_distributed_account_from_the_current_system_account]
- });
- // [End unbind_the_specified_distributed_account_from_the_current_system_account]
- }
-
- private async bindSpecifyManageDistributedAccounts(): Promise {
- // [Start determine_the_target_system_account_and_define_the_distributed_account_information_to_be_logged_in]
- let localId: number = 100;
- let distributedInfo: distributedAccount.DistributedInfo = {
- name: 'ZhangSan',
- id: '12345',
- event: 'Ohos.account.event.LOGIN',
- };
- // [End determine_the_target_system_account_and_define_the_distributed_account_information_to_be_logged_in]
-
- // [Start bind_the_specified_distributed_account_to_the_current_system_account]
- await distributedAccountAbility.setOsAccountDistributedInfoByLocalId(localId, distributedInfo).then(() => {
- console.info('setOsAccountDistributedInfoByLocalId successfully');
- }).catch((err: BusinessError) => {
- console.error(`setOsAccountDistributedInfoByLocalId exception: code is ${err.code}, message is ${err.message}`);
- // [StartExclude bind_the_specified_distributed_account_to_the_current_system_account]
- this.message = 'Failed to bind distributed account on the specified system account: ' + JSON.stringify(err);
- // [EndExclude bind_the_specified_distributed_account_to_the_current_system_account]
- });
- // [End bind_the_specified_distributed_account_to_the_current_system_account]
-
- // [Start view_the_login_information_of_a_distributed_account]
- distributedAccountAbility.getOsAccountDistributedInfoByLocalId(localId)
- .then((data: distributedAccount.DistributedInfo) => {
- console.info('distributed information: ' + JSON.stringify(data));
- // [StartExclude view_the_login_information_of_a_distributed_account]
- this.message = 'Bind distributed account on the specified system account: ' + data.name;
- // [EndExclude view_the_login_information_of_a_distributed_account]
- }).catch((err: BusinessError) => {
- console.error(`getOsAccountDistributedInfoByLocalId exception: code is ${err.code}, message is ${err.message}`);
- // [StartExclude view_the_login_information_of_a_distributed_account]
- this.message = 'Failed to get distributed account on the specified system account: ' + JSON.stringify(err);
- // [EndExclude view_the_login_information_of_a_distributed_account]
- });
- // [End view_the_login_information_of_a_distributed_account]
- }
-
- private async unbindSpecifyManageDistributedAccounts(): Promise {
- // [Start determine_the_target_system_account_and_define_the_distributed_account_information_to_be_logged_out]
- let localId: number = 100;
- let distributedInfo: distributedAccount.DistributedInfo = {
- name: 'ZhangSan',
- id: '12345',
- event: 'Ohos.account.event.LOGOUT',
- };
- // [End determine_the_target_system_account_and_define_the_distributed_account_information_to_be_logged_out]
-
- // [Start unbind_the_specified_distributed_account_from_the_target_system_account]
- distributedAccountAbility.setOsAccountDistributedInfoByLocalId(localId, distributedInfo).then(() => {
- console.info('setOsAccountDistributedInfoByLocalId successfully');
- // [StartExclude unbind_the_specified_distributed_account_from_the_target_system_account]
- this.message = 'Successfully logged out and unbound distributed account on the specified system account'
- // [EndExclude unbind_the_specified_distributed_account_from_the_target_system_account]
- }).catch((err: BusinessError) => {
- console.error(`setOsAccountDistributedInfoByLocalId exception: code is ${err.code}, message is ${err.message}`);
- // [StartExclude unbind_the_specified_distributed_account_from_the_target_system_account]
- this.message = 'Failed to log out and unbind distributed account on the specified system account'
- // [EndExclude unbind_the_specified_distributed_account_from_the_target_system_account]
- });
- // [End unbind_the_specified_distributed_account_from_the_target_system_account]
- }
-
- build() {
- Column() {
- Text(this.message)
- .id('show')
- .fontSize(36)
- .fontWeight(FontWeight.Bold)
- Button($r('app.string.DistributedAccount1'))
- .margin(10)
- .id('button1')
- .onClick(() => this.bindCurrentManageDistributedAccounts())
- Button($r('app.string.DistributedAccount2'))
- .margin(10)
- .id('button2')
- .onClick(() => this.unbindCurrentManageDistributedAccounts())
- Button($r('app.string.DistributedAccount3'))
- .margin(10)
- .id('button3')
- .onClick(() => this.bindSpecifyManageDistributedAccounts())
- Button($r('app.string.DistributedAccount4'))
- .margin(10)
- .id('button4')
- .onClick(() => this.unbindSpecifyManageDistributedAccounts())
- }
- .height('100%')
- .width('100%')
- }
-}
\ No newline at end of file
diff --git a/Account/ManageDistributedAccount/entry/src/main/module.json5 b/Account/ManageDistributedAccount/entry/src/main/module.json5
deleted file mode 100644
index b5fe5daf759281fbe99c6f486651cf9e361585fa..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/entry/src/main/module.json5
+++ /dev/null
@@ -1,69 +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",
- "requestPermissions": [{
- "name": "ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS"
- }],
- "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": [
- "action.system.home"
- ]
- }
- ]
- }
- ],
- "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/Account/ManageDistributedAccount/entry/src/main/resources/base/element/color.json b/Account/ManageDistributedAccount/entry/src/main/resources/base/element/color.json
deleted file mode 100644
index d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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/Account/ManageDistributedAccount/entry/src/main/resources/base/element/string.json b/Account/ManageDistributedAccount/entry/src/main/resources/base/element/string.json
deleted file mode 100644
index fd8ed54be3d64ad16b0c9fa46bfb2c3294b569a0..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/entry/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "module description"
- },
- {
- "name": "EntryAbility_desc",
- "value": "description"
- },
- {
- "name": "EntryAbility_label",
- "value": "label"
- },
- {
- "name": "DistributedAccount1",
- "value": "Log in and bind distributed account on the current system account"
- },
- {
- "name": "DistributedAccount2",
- "value": "Log out and unbind distributed account on the current system account"
- },
- {
- "name": "DistributedAccount3",
- "value": "Log in and bind distributed account on the specified system account"
- },
- {
- "name": "DistributedAccount4",
- "value": "Log out and unbind distributed account on the specified system account"
- }
- ]
-}
\ No newline at end of file
diff --git a/Account/ManageDistributedAccount/entry/src/main/resources/base/media/background.png b/Account/ManageDistributedAccount/entry/src/main/resources/base/media/background.png
deleted file mode 100644
index f939c9fa8cc8914832e602198745f592a0dfa34d..0000000000000000000000000000000000000000
Binary files a/Account/ManageDistributedAccount/entry/src/main/resources/base/media/background.png and /dev/null differ
diff --git a/Account/ManageDistributedAccount/entry/src/main/resources/base/media/foreground.png b/Account/ManageDistributedAccount/entry/src/main/resources/base/media/foreground.png
deleted file mode 100644
index 4483ddad1f079e1089d685bd204ee1cfe1d01902..0000000000000000000000000000000000000000
Binary files a/Account/ManageDistributedAccount/entry/src/main/resources/base/media/foreground.png and /dev/null differ
diff --git a/Account/ManageDistributedAccount/entry/src/main/resources/base/media/layered_image.json b/Account/ManageDistributedAccount/entry/src/main/resources/base/media/layered_image.json
deleted file mode 100644
index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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/Account/ManageDistributedAccount/entry/src/main/resources/base/media/startIcon.png b/Account/ManageDistributedAccount/entry/src/main/resources/base/media/startIcon.png
deleted file mode 100644
index 205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b..0000000000000000000000000000000000000000
Binary files a/Account/ManageDistributedAccount/entry/src/main/resources/base/media/startIcon.png and /dev/null differ
diff --git a/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/backup_config.json b/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/backup_config.json
deleted file mode 100644
index d742c2f96e7dd0f406f499941f3147345e998f95..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/main_pages.json b/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100644
index 1898d94f58d6128ab712be2c68acc7c98e9ab9ce..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/entry/src/main/resources/base/profile/main_pages.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "src": [
- "pages/Index"
- ]
-}
diff --git a/Account/ManageDistributedAccount/entry/src/main/resources/dark/element/color.json b/Account/ManageDistributedAccount/entry/src/main/resources/dark/element/color.json
deleted file mode 100644
index 438d5bc43bb23c59c210d586b96635a72da5b64a..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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/Account/ManageDistributedAccount/entry/src/mock/mock-config.json5 b/Account/ManageDistributedAccount/entry/src/mock/mock-config.json5
deleted file mode 100644
index b9a78e201535765168a92d3543c690273ecdc019..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/Ability.test.ets b/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/Ability.test.ets
deleted file mode 100644
index 915855c45b514631b0cd26fd559926b27919fd55..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/Ability.test.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.
- */
-
-import { describe, it, expect } from '@ohos/hypium';
-// 导入测试依赖kit
-import { abilityDelegatorRegistry, Driver, ON } from '@kit.TestKit';
-import { UIAbility, Want } from '@kit.AbilityKit';
-
-const delegator: abilityDelegatorRegistry.AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator()
-const bundleName = abilityDelegatorRegistry.getArguments().bundleName;
-function sleep(time: number) {
- return new Promise((resolve: Function) => setTimeout(resolve, time));
-}
-export default function abilityTest() {
- describe('DistributedAccountsTest', () => {
- /*
- * 打开应用,依次点击页面中按钮
- * 使用分布式账号接口功能
- */
- it('distributedAccountsExample', 0, async (done: Function) => {
- console.info("uitest: TestUiExample begin");
- const want: Want = {
- bundleName: bundleName,
- abilityName: 'EntryAbility'
- }
- await delegator.startAbility(want);
- await sleep(1000);
- const ability: UIAbility = await delegator.getCurrentTopAbility();
- console.info("get top ability");
- expect(ability.context.abilityInfo.name).assertEqual('EntryAbility');
- const driver = Driver.create();
- await driver.delayMs(1000);
-
- const button1 = await driver.findComponent(ON.id('button1'));
- await button1.click();
- await driver.delayMs(1000);
- const text = await driver.findComponent(ON.id('show'));
- let content1: string = await text.getText();
- expect(content1).assertEqual('Bind distributed account: ZhangSan');
-
- const button2 = await driver.findComponent(ON.id('button2'));
- await button2.click();
- await driver.delayMs(1000);
- let content2: string = await text.getText();
- expect(content2).assertEqual('Successfully unbound distributed account');
-
- const button3 = await driver.findComponent(ON.id('button3'));
- await button3.click();
- await driver.delayMs(1000);
- let content3: string = await text.getText();
- expect(content3).assertEqual('Bind distributed account on the specified system account: ZhangSan');
-
- const button4 = await driver.findComponent(ON.id('button4'));
- await button4.click();
- await driver.delayMs(1000);
- let content4: string = await text.getText();
- expect(content4)
- .assertEqual('Successfully logged out and unbound distributed account on the specified system account');
- done();
- console.info("uitest: TestUiExample end");
- })
- })
-}
\ No newline at end of file
diff --git a/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/List.test.ets b/Account/ManageDistributedAccount/entry/src/ohosTest/ets/test/List.test.ets
deleted file mode 100644
index 1eac52fcebe8958e19a7b8fed2e8f39c520a3e42..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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/Account/ManageDistributedAccount/entry/src/ohosTest/module.json5 b/Account/ManageDistributedAccount/entry/src/ohosTest/module.json5
deleted file mode 100644
index 9983b2ba4e55e31a172f0328c82c9a75bfa00ded..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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/Account/ManageDistributedAccount/entry/src/test/List.test.ets b/Account/ManageDistributedAccount/entry/src/test/List.test.ets
deleted file mode 100644
index f1186b1f53c3a70930921c5dbd1417332bec56c9..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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/Account/ManageDistributedAccount/entry/src/test/LocalUnit.test.ets b/Account/ManageDistributedAccount/entry/src/test/LocalUnit.test.ets
deleted file mode 100644
index 7fc57c77dbf76d8df08a2b802a55b948e3fcf968..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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/Account/ManageDistributedAccount/hvigor/hvigor-config.json5 b/Account/ManageDistributedAccount/hvigor/hvigor-config.json5
deleted file mode 100644
index cef74543b1f97c82275e4bf3434b162395bff2eb..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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": "5.0.1",
- "dependencies": {
- },
- "execution": {
- // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | 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 */
- },
- "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/Account/ManageDistributedAccount/hvigorfile.ts b/Account/ManageDistributedAccount/hvigorfile.ts
deleted file mode 100644
index 2a5e543f190732c159beb574dfc9fa37bc94e156..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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. */
-}
diff --git a/Account/ManageDistributedAccount/oh-package.json5 b/Account/ManageDistributedAccount/oh-package.json5
deleted file mode 100644
index eaef52736f22c14e04fca386ba01611ab32a7e4a..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/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": "5.0.1",
- "description": "Please describe the basic information.",
- "dependencies": {
- },
- "devDependencies": {
- "@ohos/hypium": "1.0.19",
- "@ohos/hamock": "1.0.0"
- }
-}
diff --git a/Account/ManageDistributedAccount/ohosTest.md b/Account/ManageDistributedAccount/ohosTest.md
deleted file mode 100644
index 6a829ef97b3f8ea0e27a48a09dcfe95d56207b8f..0000000000000000000000000000000000000000
--- a/Account/ManageDistributedAccount/ohosTest.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ManageDistributedAccount 测试用例归档
-
-## 用例表
-
-| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 |
-| ------------------------------------ | ------------ | ------------------------------------------ | -------------------------------------------------- | -------- | -------- |
-| 拉起应用 | 设备正常运行 | | 成功拉起应用 | 是 | Pass |
-| Log in and bind distributed account on the current system account | 位于首页 | 点击'Log in and bind distributed account on the current system account' | 页面显示'Bind distributed account: ZhangSan' | 是 | Pass |
-| Log out and unbind distributed account on the current system account | 位于首页 | 点击'Log out and unbind distributed account on the current system account' | 页面显示'Successfully unbound distributed account' | 是 | Pass |
-| Log in and bind distributed account on the specified system account | 位于首页 | 点击'Log in and bind distributed account on the specified system account' | 页面显示'指定的系统账号上Bind distributed account: ZhangSan' | 是 | Pass |
-| Log out and unbind distributed account on the specified system account | 位于首页 | 点击'Log out and unbind distributed account on the specified system account' | 页面显示'指定系统账号上登出Successfully unbound distributed account' | 是 | Pass |
\ No newline at end of file
diff --git a/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_1.png b/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_1.png
deleted file mode 100644
index 468804a9bded5cd7abfc0e5d8f1b686cea9a281c..0000000000000000000000000000000000000000
Binary files a/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_1.png and /dev/null differ
diff --git a/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_2.png b/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_2.png
deleted file mode 100644
index 285dc2044b277e98fab204c5e8d23005a6d6615b..0000000000000000000000000000000000000000
Binary files a/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_2.png and /dev/null differ
diff --git a/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_3.png b/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_3.png
deleted file mode 100644
index 51f9f245174a540e6136017ec679ac26809509d1..0000000000000000000000000000000000000000
Binary files a/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_3.png and /dev/null differ
diff --git a/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_4.png b/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_4.png
deleted file mode 100644
index 83e36c3fa8715332a9057754727a7c6762ac1844..0000000000000000000000000000000000000000
Binary files a/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_4.png and /dev/null differ
diff --git a/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_5.png b/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_5.png
deleted file mode 100644
index be827dc3a026b33836334a927c9853240489a4f2..0000000000000000000000000000000000000000
Binary files a/Account/ManageDistributedAccount/screenshots/ManageDistributedAccount_5.png and /dev/null differ
diff --git a/Account/ManageSystemAccountCredentials/.gitignore b/Account/ManageSystemAccountCredentials/.gitignore
deleted file mode 100644
index d2ff20141ceed86d87c0ea5d99481973005bab2b..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/.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/Account/ManageSystemAccountCredentials/AppScope/app.json5 b/Account/ManageSystemAccountCredentials/AppScope/app.json5
deleted file mode 100644
index d3142d219c5e3f970aada650575ba0d522c8f662..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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.samples.managesystemaccountcredentials",
- "vendor": "example",
- "versionCode": 1000000,
- "versionName": "1.0.0",
- "icon": "$media:app_icon",
- "label": "$string:app_name"
- }
-}
diff --git a/Account/ManageSystemAccountCredentials/AppScope/resources/base/element/string.json b/Account/ManageSystemAccountCredentials/AppScope/resources/base/element/string.json
deleted file mode 100644
index ed0031b2726f87930b679a0c78da46f749d2e031..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "ManageSystemAccountCredentials"
- }
- ]
-}
diff --git a/Account/ManageSystemAccountCredentials/AppScope/resources/base/media/app_icon.png b/Account/ManageSystemAccountCredentials/AppScope/resources/base/media/app_icon.png
deleted file mode 100644
index a39445dc87828b76fed6d2ec470dd455c45319e3..0000000000000000000000000000000000000000
Binary files a/Account/ManageSystemAccountCredentials/AppScope/resources/base/media/app_icon.png and /dev/null differ
diff --git a/Account/ManageSystemAccountCredentials/README.md b/Account/ManageSystemAccountCredentials/README.md
deleted file mode 100644
index a3a7b7775723d33dcf4666ef30d634c4a67bb490..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# 管理系统账号凭据
-
-### 介绍
-
-凭据可用于认证用户的身份,本文档将介绍如何录入、认证、更新、查询和删除指定系统账号的凭据。
-
-该工程中展示的代码详细描述可查如下链接:
-
-- [ 管理系统账号凭据](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/manage-os-account-credential.md)
-
-### 效果预览
-
-| 首页 | 执行录入PIN码 |
-| :----------------------------------------------------------: | :----------------------------------------------------------: |
-|
|
|
-| 执行认证PIN码 | 执行更新凭据 |
-|
|
|
-| 执行查询凭据信息 | 执行删除凭据 |
-|
|
|
-
-### 使用说明
-
-1. 在主界面,点击'Enter PIN code',执行录入PIN码。
-2. 点击'Authenticate PIN code',执行认证PIN码。
-3. 点击'Update credentials',执行更新凭据。
-4. 点击'Query credential information',执行查询凭据信息。
-5. 点击'Delete credentials',执行删除凭据。
-6. 执行结果会即时反馈在屏幕中央,并在控制台打印log。
-
-### 工程目录
-
-```
-entry/src/
- ├── main
- │ ├── ets
- │ │ ├── entryability
- │ │ ├── entrybackupability
- │ │ ├── pages
- │ │ ├── Index.ets // 管理系统账号凭据示例代码
- │ ├── module.json5
- │ └── resources
- ├── ohosTest
- │ ├── ets
- │ │ ├── test
- │ │ ├── Ability.test.ets // 自动化测试代码
-```
-
-### 相关权限
-
-[ohos.permission.MANAGE_USER_IDM](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissionmanageuseridm)
-
-[ohos.permission.ACCESS_PIN_AUTH](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissionaccesspinauth)
-
-[ohos.permission.ACCESS_USER_AUTH_INTERNAL](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissionaccessuserauthinternal)
-
-[ohos.permission.USE_USER_IDM](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissionuseuseridm)
-
-### 依赖
-
-不涉及。
-
-### 约束与限制
-
-1.本示例仅支持标准系统上运行, 支持设备:RK3568。
-
-2.本示例为Stage模型,支持API14版本full-SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。
-
-3.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。
-
-### 下载
-
-如需单独下载本工程,执行如下命令:
-
-````
-git init
-git config core.sparsecheckout true
-echo code/DocsSample/Account/ManageSystemAccountCredentials > .git/info/sparse-checkout
-git remote add origin https://gitee.com/openharmony/applications_app_samples.git
-git pull origin master
-````
\ No newline at end of file
diff --git a/Account/ManageSystemAccountCredentials/build-profile.json5 b/Account/ManageSystemAccountCredentials/build-profile.json5
deleted file mode 100644
index a33a4782e91c9280a45ec05115ebd546882ce072..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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",
- "compatibleSdkVersion": 14,
- "compileSdkVersion": 14,
- "targetSdkVersion": 14,
- "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/Account/ManageSystemAccountCredentials/code-linter.json5 b/Account/ManageSystemAccountCredentials/code-linter.json5
deleted file mode 100644
index 28586467ee7a761c737d8654a73aed6fddbc3c71..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/code-linter.json5
+++ /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.
- */
-
-{
- "files": [
- "**/*.ets"
- ],
- "ignore": [
- "**/src/ohosTest/**/*",
- "**/src/test/**/*",
- "**/src/mock/**/*",
- "**/node_modules/**/*",
- "**/oh_modules/**/*",
- "**/build/**/*",
- "**/.preview/**/*"
- ],
- "ruleSet": [
- "plugin:@performance/recommended",
- "plugin:@typescript-eslint/recommended"
- ],
- "rules": {
- }
-}
\ No newline at end of file
diff --git a/Account/ManageSystemAccountCredentials/entry/.gitignore b/Account/ManageSystemAccountCredentials/entry/.gitignore
deleted file mode 100644
index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/entry/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-/node_modules
-/oh_modules
-/.preview
-/build
-/.cxx
-/.test
\ No newline at end of file
diff --git a/Account/ManageSystemAccountCredentials/entry/build-profile.json5 b/Account/ManageSystemAccountCredentials/entry/build-profile.json5
deleted file mode 100644
index b4d65d490ef6cbe22d933b9231555210f1555786..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/entry/build-profile.json5
+++ /dev/null
@@ -1,43 +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": {
- },
- "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/Account/ManageSystemAccountCredentials/entry/hvigorfile.ts b/Account/ManageSystemAccountCredentials/entry/hvigorfile.ts
deleted file mode 100644
index e4f43d54667f8327c367c8096bd08bb8c75aff54..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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. */
-}
diff --git a/Account/ManageSystemAccountCredentials/entry/obfuscation-rules.txt b/Account/ManageSystemAccountCredentials/entry/obfuscation-rules.txt
deleted file mode 100644
index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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/Account/ManageSystemAccountCredentials/entry/oh-package.json5 b/Account/ManageSystemAccountCredentials/entry/oh-package.json5
deleted file mode 100644
index 4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/entry/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": "entry",
- "version": "1.0.0",
- "description": "Please describe the basic information.",
- "main": "",
- "author": "",
- "license": "",
- "dependencies": {}
-}
-
diff --git a/Account/ManageSystemAccountCredentials/entry/src/main/ets/entryability/EntryAbility.ets b/Account/ManageSystemAccountCredentials/entry/src/main/ets/entryability/EntryAbility.ets
deleted file mode 100644
index 3e77e4b9f7946d80aa77e6b2dcfe40b23ccf6178..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/entry/src/main/ets/entryability/EntryAbility.ets
+++ /dev/null
@@ -1,57 +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';
-
-export default class EntryAbility extends UIAbility {
- onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
- this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET);
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
- }
-
- onDestroy(): void {
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
- }
-
- onWindowStageCreate(windowStage: window.WindowStage): void {
- // Main window is created, set main page for this ability
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
-
- windowStage.loadContent('pages/Index', (err) => {
- if (err.code) {
- hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
- return;
- }
- hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
- });
- }
-
- onWindowStageDestroy(): void {
- // Main window is destroyed, release UI related resources
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
- }
-
- onForeground(): void {
- // Ability has brought to foreground
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
- }
-
- onBackground(): void {
- // Ability has back to background
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
- }
-}
\ No newline at end of file
diff --git a/Account/ManageSystemAccountCredentials/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/Account/ManageSystemAccountCredentials/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
deleted file mode 100644
index 1504a74f09dfdcfae408be979f99369a2c5affab..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
+++ /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.
- */
-
-import { hilog } from '@kit.PerformanceAnalysisKit';
-import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit';
-
-export default class EntryBackupAbility extends BackupExtensionAbility {
- async onBackup() {
- hilog.info(0x0000, 'testTag', 'onBackup ok');
- }
-
- async onRestore(bundleVersion: BundleVersion) {
- hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion));
- }
-}
\ No newline at end of file
diff --git a/Account/ManageSystemAccountCredentials/entry/src/main/ets/pages/Index.ets b/Account/ManageSystemAccountCredentials/entry/src/main/ets/pages/Index.ets
deleted file mode 100644
index 76f18728f2901c2e59feb46a7d636f70b22c6cf0..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/entry/src/main/ets/pages/Index.ets
+++ /dev/null
@@ -1,544 +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 import_system_account_module]
-import { osAccount } from '@kit.BasicServicesKit';
-// [End import_system_account_module]
-
-function strToUint8Arr(str: string): Uint8Array {
- const buffer: number[] = [];
- for (let i = 0; i < str.length; i++) {
- const char = str.charAt(i);
- const code = char.codePointAt(0)!;
- if (code < 0x80) {
- buffer.push(code);
- } else if (code < 0x800) {
- buffer.push(0xc0 + (code >> 6));
- buffer.push(0x80 + (code & 0x3f));
- } else if (code < 0x10000) {
- buffer.push(0xe0 + (code >> 12));
- buffer.push(0x80 + ((code >> 6) & 0x3f));
- buffer.push(0x80 + (code & 0x3f));
- }
- }
- return new Uint8Array(buffer);
-}
-
-@Entry
-@Component
-struct SystemAccount {
- @State message: string = 'Nothing';
- @State cid: number = 100;
- @State textPassword: string = ''
- @State oldTextPassword: string = ''
-
- private async addCred(): Promise {
- try {
- this.cid = await osAccount.getAccountManager().getForegroundOsAccountLocalId();
- // [Start create_credential_management_object]
- let userIDM: osAccount.UserIdentityManager = new osAccount.UserIdentityManager();
- // [End create_credential_management_object]
- // [Start define_pin_inputer_pinData]
- let pinData: Uint8Array = new Uint8Array([31, 32, 33, 34, 35, 36]);
- // [StartExclude define_pin_inputer_pinData]
- if (this.textPassword != '') {
- pinData = strToUint8Arr(this.textPassword);
- }
- // [EndExclude define_pin_inputer_pinData]
- let inputer: osAccount.IInputer = {
- onGetData: (authSubType: osAccount.AuthSubType, callback: osAccount.IInputData) => {
- callback.onSetData(authSubType, pinData);
- }
- }
- // [End define_pin_inputer_pinData]
- // [Start define_pin_credential_information]
- let credentialInfo :osAccount.CredentialInfo = {
- // [StartExclude define_pin_credential_information]
- accountId: this.cid,
- // [EndExclude define_pin_credential_information]
- credType:osAccount.AuthType.PIN,
- credSubType:osAccount.AuthSubType.PIN_SIX,
- token:new Uint8Array([0])
- };
- // [End define_pin_credential_information]
- // [Start call_the_api_to_register_the_inputer]
- let PINAuth: osAccount.PINAuth = new osAccount.PINAuth();
- // [StartExclude call_the_api_to_register_the_inputer]
- PINAuth.unregisterInputer();
- // [EndExclude call_the_api_to_register_the_inputer]
- PINAuth.registerInputer(inputer);
- // [End call_the_api_to_register_the_inputer]
- userIDM.closeSession(this.cid);
- userIDM.openSession(this.cid).then((challenge)=>{
- console.info('openSession info: ' + JSON.stringify(challenge));
- // [Start call_the_api_to_add_the_specified_credentials]
- userIDM.addCredential(credentialInfo,{
- onResult: (err, extraInfo)=>{
- console.info('addCredential result: ' + JSON.stringify(err));
- console.info('edential info: ' + JSON.stringify(extraInfo));
- // [StartExclude call_the_api_to_add_the_specified_credentials]
- if (err == 0) {
- this.message = 'PIN code entry successful';
- } else {
- this.message = 'PIN code entry failed: ' + JSON.stringify(err);
- }
- PINAuth.unregisterInputer();
- userIDM.closeSession(this.cid);
- // [EndExclude call_the_api_to_add_the_specified_credentials]
- }})
- // [End call_the_api_to_add_the_specified_credentials]
- }).catch((err: Error)=>{
- console.error('openSession failed, error: ' + JSON.stringify(err));
- this.message = 'Failed to open session:' + JSON.stringify(err);
- })
- } catch (e) {
- console.error('getEnrolledId cur failed, error: ' + JSON.stringify(e));
- }
- }
-
- private async auth(): Promise {
- try {
- let userIDM = new osAccount.UserIdentityManager();
- let PINAuth = new osAccount.PINAuth();
- let password: Uint8Array = new Uint8Array([31, 32, 33, 34, 35, 36]);
- if (this.textPassword != '') {
- password = strToUint8Arr(this.textPassword);
- }
- PINAuth.unregisterInputer();
- PINAuth.registerInputer({
- onGetData:(authSubType, callback)=>{
- callback.onSetData(osAccount.AuthSubType.PIN_SIX, password);
- }
- })
- userIDM.closeSession(this.cid);
- userIDM.openSession(this.cid).then((challenge)=>{
- console.info('openSession info: ' + JSON.stringify(challenge));
- // [Start define_parameters_pin_type_and_level_to_auth]
- let authType: osAccount.AuthType = osAccount.AuthType.PIN;
- let authTrustLevel: osAccount.AuthTrustLevel = osAccount.AuthTrustLevel.ATL1;
- // [End define_parameters_pin_type_and_level_to_auth]
- // [Start call_the_auth_operation_for_authentication]
- let userAuth: osAccount.UserAuth = new osAccount.UserAuth();
- userAuth.auth(challenge, authType, authTrustLevel, {
- onResult: (result: number, extraInfo: osAccount.AuthResult) => {
- console.info('pin auth result = ' + result);
- console.info('pin auth extraInfo = ' + JSON.stringify(extraInfo));
- let authToken = extraInfo.token;
- // [StartExclude call_the_auth_operation_for_authentication]
- if(result == 0) {
- this.message = 'PIN code entry successful';
- } else {
- this.message = 'PIN code authentication failed: ' + result;
- }
- // [EndExclude call_the_auth_operation_for_authentication]
- }
- });
- // [End call_the_auth_operation_for_authentication]
- }).catch((err: Error)=>{
- console.error('openSession failed, error: ' + JSON.stringify(err));
- this.message = 'Failed to open session:' + JSON.stringify(err);
- })
- } catch (err) {
- console.error('getEnrolledId cur failed, error: ' + JSON.stringify(err));
- }
- }
-
- private async addBiologyCred(): Promise {
- // [Start define_facial_credential_information]
- let faceCredInfo: osAccount.CredentialInfo = {
- credType: osAccount.AuthType.FACE,
- credSubType: osAccount.AuthSubType.FACE_2D,
- token: new Uint8Array([1, 2, 3, 4, 5])
- }
- // [End define_facial_credential_information]
- // [Start define_fingerprint_credential_information]
- let fingerprintCredInfo: osAccount.CredentialInfo = {
- credType: osAccount.AuthType.FINGERPRINT,
- credSubType: osAccount.AuthSubType.FINGERPRINT_CAPACITIVE,
- token: new Uint8Array([1, 2, 3, 4, 5])
- }
- // [End define_fingerprint_credential_information]
- try {
- let userIDM = new osAccount.UserIdentityManager();
- let userAuth = new osAccount.UserAuth();
- let PINAuth = new osAccount.PINAuth();
- let password: Uint8Array = new Uint8Array([31, 32, 33, 34, 35, 36]);
- PINAuth.unregisterInputer();
- PINAuth.registerInputer({
- onGetData:(authSubType, callback)=>{
- callback.onSetData(osAccount.AuthSubType.PIN_SIX, password);
- }
- })
- userIDM.closeSession(this.cid);
- userIDM.openSession(this.cid).then((challenge)=>{
- console.info('openSession info: ' + JSON.stringify(challenge));
- let authType: osAccount.AuthType = osAccount.AuthType.PIN;
- let authTrustLevel: osAccount.AuthTrustLevel = osAccount.AuthTrustLevel.ATL1;
- userAuth.auth(challenge, authType, authTrustLevel, {
- onResult: (result: number, extraInfo: osAccount.AuthResult) => {
- console.info('pin auth result = ' + result);
- console.info('pin auth extraInfo = ' + JSON.stringify(extraInfo));
- faceCredInfo.token = extraInfo.token;
- fingerprintCredInfo.token = extraInfo.token;
- // [Start input_facial_credential_information]
- userIDM.addCredential(faceCredInfo, {
- onResult: (code: number, result: osAccount.RequestResult) => {
- console.info('add face credential, resultCode: ' + code);
- console.info('add face credential, request result: ' + result);
- // [StartExclude input_facial_credential_information]
- if(code == 0) {
- this.message = 'Successfully entered facial credentials';
- } else {
- this.message = 'Failed to enter facial credentials: ' + code;
- }
- // [EndExclude input_facial_credential_information]
- }
- });
- // [End input_facial_credential_information]
- // [Start enter_the_fingerprint_credentials]
- userIDM.addCredential(fingerprintCredInfo, {
- onResult: (code: number, result: osAccount.RequestResult) => {
- console.info('add fingerprint credential, resultCode: ' + code);
- console.info('add fingerprint credential, request result: ' + result);
- // [StartExclude enter_the_fingerprint_credentials]
- if(code == 0) {
- this.message += 'Successfully entered fingerprint credentials';
- } else {
- this.message = 'Failed to enter fingerprint credentials: ' + code;
- }
- // [EndExclude enter_the_fingerprint_credentials]
- }
- });
- // [End enter_the_fingerprint_credentials]
- }
- });
- }).catch((err: Error)=>{
- console.error('openSession failed, error: ' + JSON.stringify(err));
- this.message = 'Failed to open session:' + JSON.stringify(err);
- })
- } catch (err) {
- console.error('getEnrolledId cur failed, error: ' + JSON.stringify(err));
- }
- }
-
- private async biologyAuth(): Promise {
- try {
- let userIDM = new osAccount.UserIdentityManager();
- let PINAuth = new osAccount.PINAuth();
- let password: Uint8Array = new Uint8Array([31, 32, 33, 34, 35, 36]);
- PINAuth.unregisterInputer();
- PINAuth.registerInputer({
- onGetData:(authSubType, callback)=>{
- callback.onSetData(osAccount.AuthSubType.PIN_SIX, password);
- }
- })
- userIDM.closeSession(this.cid);
- userIDM.openSession(this.cid).then((challenge)=>{
- console.info('openSession info: ' + JSON.stringify(challenge));
- // [Start define_parameters_face_type_and_level_to_auth]
- let authType: osAccount.AuthType = osAccount.AuthType.FACE;
- let authTrustLevel: osAccount.AuthTrustLevel = osAccount.AuthTrustLevel.ATL1;
- // [End define_parameters_face_type_and_level_to_auth]
- // [Start call_the_auth_operation_for_face_authentication]
- let userAuth: osAccount.UserAuth = new osAccount.UserAuth();
- userAuth.auth(challenge, authType, authTrustLevel, {
- onResult: (result: number, extraInfo: osAccount.AuthResult) => {
- console.info('face auth result = ' + result);
- console.info('face auth extraInfo = ' + JSON.stringify(extraInfo));
- // [StartExclude call_the_auth_operation_for_face_authentication]
- if(result == 0) {
- this.message = 'Successfully authenticated biometric credentials';
- } else {
- this.message = 'Failed to authenticate biometric credentials: ' + result;
- }
- // [EndExclude call_the_auth_operation_for_face_authentication]
- }
- });
- // [End call_the_auth_operation_for_face_authentication]
- }).catch((err: Error)=>{
- console.error('openSession failed, error: ' + JSON.stringify(err));
- this.message = 'Failed to open session:' + JSON.stringify(err);
- })
- } catch (err) {
- console.error('getEnrolledId cur failed, error: ' + JSON.stringify(err));
- }
- }
-
- private async updateCred(): Promise {
- let userIDM = new osAccount.UserIdentityManager();
- let userAuth = new osAccount.UserAuth();
- let PINAuth = new osAccount.PINAuth();
- let oldPassword: Uint8Array = new Uint8Array([31, 32, 33, 34, 35, 36]);
- if (this.oldTextPassword != '') {
- oldPassword = strToUint8Arr(this.oldTextPassword);
- }
- let password: Uint8Array = new Uint8Array([0x31, 0x31, 0x31, 0x31, 0x31, 0x31]);
- if (this.textPassword != '') {
- password = strToUint8Arr(this.textPassword);
- }
- // [Start define_the_credential_information_to_be_updated]
- let credentialInfo :osAccount.CredentialInfo = {
- // [StartExclude define_the_credential_information_to_be_updated]
- accountId:this.cid,
- // [EndExclude define_the_credential_information_to_be_updated]
- credType:osAccount.AuthType.PIN,
- credSubType:osAccount.AuthSubType.PIN_SIX,
- token:new Uint8Array([1, 2, 3, 4, 5])
- };
- // [End define_the_credential_information_to_be_updated]
- PINAuth.unregisterInputer();
- PINAuth.registerInputer({
- onGetData:(authSubType, callback)=>{
- callback.onSetData(osAccount.AuthSubType.PIN_SIX, oldPassword);
- }
- })
- userIDM.openSession(this.cid).then((challenge)=>{
- console.info('openSession info: ' + JSON.stringify(challenge));
- userAuth.authUser(this.cid, challenge, osAccount.AuthType.PIN,
- osAccount.AuthTrustLevel.ATL1, {
- onResult:(err, authResult)=>{
- console.info('authUser err: ' + JSON.stringify(err));
- console.info('authUser info: ' + JSON.stringify(authResult));
- console.info('authUser info.userId: ' + authResult.accountId);
- credentialInfo.token = authResult.token;
- PINAuth.unregisterInputer();
- PINAuth.registerInputer({
- onGetData:(subType, callback) =>{
- callback.onSetData(osAccount.AuthSubType.PIN_SIX, password)
- }
- })
- // [Start update_your_credentials]
- userIDM.updateCredential(credentialInfo, {
- onResult:(result: number, extraInfo: osAccount.RequestResult)=>{
- console.info('updateCredential result: ' + JSON.stringify(result));
- console.info('updateCredential extraInfo: ' + JSON.stringify(extraInfo));
- // [StartExclude update_your_credentials]
- if(result == 0) {
- this.message = 'Successfully updated PIN code credentials';
- } else {
- this.message = 'Failed to update PIN code credentials: ' + JSON.stringify(result);
- }
- PINAuth.unregisterInputer();
- userIDM.closeSession(this.cid);
- // [EndExclude update_your_credentials]
- }
- })
- // [End update_your_credentials]
- }
- })
- }).catch((err: Error)=>{
- console.error('openSession failed, error: ' + JSON.stringify(err));
- this.message = 'Failed to open session:' + JSON.stringify(err);
- })
- }
-
- private async getCred(): Promise {
- let userIDM = new osAccount.UserIdentityManager();
- try {
- userIDM.getAuthInfo((err, data)=>{
- console.info('getAuthInfo err: ' + JSON.stringify(err));
- console.info('getAuthInfo data: ' + JSON.stringify(data));
- this.message = 'Query information length: ' + data.length;
- })
- // [Start obtain_credential_information_of_the_specified_type]
- let enrolledFingerCredInfoList: osAccount.EnrolledCredInfo[] =
- await userIDM.getAuthInfo(osAccount.AuthType.PIN);
- // [End obtain_credential_information_of_the_specified_type]
- } catch (err) {
- console.error('getAuthInfo failed: ' + JSON.stringify(err));
- this.message = 'Query information failed: ' + JSON.stringify(err);
- }
- }
-
- private async deleteBiologyCred(): Promise {
- let userIDM = new osAccount.UserIdentityManager();
- let userAuth = new osAccount.UserAuth();
- let PINAuth = new osAccount.PINAuth();
- // [Start obtain_the_credential_information_of_the_fingerprint_type]
- let credentialId: Uint8Array = new Uint8Array([1, 2, 3, 4, 5]);
- let token: Uint8Array = new Uint8Array([1, 2, 3, 4, 5]);
- let credInfoList: osAccount.EnrolledCredInfo[] =
- await userIDM.getAuthInfo(osAccount.AuthType.FINGERPRINT);
- if (credInfoList.length != 0) {
- credentialId = credInfoList[0].credentialId;
- }
- // [End obtain_the_credential_information_of_the_fingerprint_type]
- PINAuth.unregisterInputer();
- PINAuth.registerInputer({
- onGetData:(authSubType, callback)=>{
- callback.onSetData(osAccount.AuthSubType.PIN_SIX,
- new Uint8Array([0x31, 0x31, 0x31, 0x31, 0x31, 0x31]));
- }
- });
- userIDM.closeSession(this.cid);
- userIDM.openSession(this.cid).then((challenge)=>{
- console.info('openSession info: ' + JSON.stringify(challenge));
- userAuth.authUser(this.cid, challenge, osAccount.AuthType.PIN,
- osAccount.AuthTrustLevel.ATL1, {
- onResult:(err, authResult)=>{
- console.info('authUser err: ' + JSON.stringify(err));
- console.info('authUser info: ' + JSON.stringify(authResult));
- console.info('authUser info.userId: ' + authResult.accountId);
- try {
- // [Start delete_specified_credentials]
- userIDM.delCred(credentialId, authResult.token, {
- onResult: (result: number, extraInfo: osAccount.RequestResult) => {
- console.info('delCred result = ' + result);
- console.info('delCred extraInfo = ' + JSON.stringify(extraInfo));
- // [StartExclude delete_specified_credentials]
- if(result == 0) {
- this.message = 'Successfully deleted credentials';
- } else {
- this.message = 'Failed to delete credentials: ' + result;
- }
- // [EndExclude delete_specified_credentials]
- }
- });
- // [End delete_specified_credentials]
- } catch (e) {
- console.error('delUser exception = ' + JSON.stringify(e));
- this.message = 'Failed to delete credentials: ' + JSON.stringify(e);
- }
- // [Start deactivate_pin_input_device]
- PINAuth.unregisterInputer();
- // [End deactivate_pin_input_device]
- // [Start close_the_session_and_end_credential_management]
- userIDM.closeSession(this.cid);
- // [End close_the_session_and_end_credential_management]
- }
- })
- }).catch((err: Error)=>{
- console.error('openSession failed, error: ' + JSON.stringify(err));
- this.message = 'Failed to open session:' + JSON.stringify(err);
- })
- }
-
- private async deleteCred(): Promise {
- let userIDM = new osAccount.UserIdentityManager();
- let userAuth = new osAccount.UserAuth();
- let PINAuth = new osAccount.PINAuth();
- let password: Uint8Array = new Uint8Array([0x31, 0x31, 0x31, 0x31, 0x31, 0x31]);
- if (this.textPassword != '') {
- password = strToUint8Arr(this.textPassword);
- }
- PINAuth.unregisterInputer();
- PINAuth.registerInputer({
- onGetData:(authSubType, callback)=>{
- callback.onSetData(osAccount.AuthSubType.PIN_SIX, password);
- }
- })
- userIDM.closeSession(this.cid)
- userIDM.openSession(this.cid).then((challenge)=>{
- console.info('openSession info: ' + JSON.stringify(challenge));
- userAuth.authUser(this.cid, challenge, osAccount.AuthType.PIN,
- osAccount.AuthTrustLevel.ATL1, {
- onResult:(err, authResult)=>{
- console.info('authUser err: ' + JSON.stringify(err));
- console.info('authUser info: ' + JSON.stringify(authResult));
- console.info('authUser info.userId: ' + authResult.accountId);
- console.info('authUser info.token: ' + authResult.token);
- try {
- userIDM.delUser(authResult.token, {
- onResult: (result: number, extraInfo: osAccount.RequestResult) => {
- console.info('delUser result = ' + result);
- console.info('delUser extraInfo = ' + JSON.stringify(extraInfo));
- if(result == 0) {
- this.message = 'Successfully deleted PIN code credentials';
- } else {
- this.message = 'Failed to delete PIN code credentials: ' + JSON.stringify(result);
- }
-
- PINAuth.unregisterInputer();
- userIDM.closeSession(this.cid);
- }
- });
- } catch (e) {
- console.error('delUser exception = ' + JSON.stringify(e));
- }
- }
- })
- }).catch((err: Error)=>{
- console.error('openSession failed, error: ' + JSON.stringify(err));
- this.message = 'Failed to open session:' + JSON.stringify(err);
- })
- }
-
- build() {
- Column() {
- TextInput({ text: this.textPassword, placeholder: 'input password...'})
- .placeholderColor(Color.Grey)
- .placeholderFont({ size: 14, weight: 400 })
- .caretColor(Color.Blue)
- .width(200)
- .height(40)
- .margin(10)
- .fontSize(14)
- .fontColor(Color.Black)
- .onChange((value: string) => {
- this.textPassword = value;
- })
- TextInput({ text: this.oldTextPassword, placeholder: 'old password...'})
- .placeholderColor(Color.Grey)
- .placeholderFont({ size: 14, weight: 400 })
- .caretColor(Color.Blue)
- .width(200)
- .height(40)
- .margin(10)
- .fontSize(14)
- .fontColor(Color.Black)
- .onChange((value: string) => {
- this.oldTextPassword = value;
- })
- Text(this.message)
- .id('show')
- .fontSize(36)
- .fontWeight(FontWeight.Bold)
- Button($r('app.string.ManageSystemAccountCredentials1'))
- .margin(10)
- .id('button1')
- .onClick(() => this.addCred())
- Button($r('app.string.ManageSystemAccountCredentials2'))
- .margin(10)
- .id('button2')
- .onClick(() => this.auth())
- Button($r('app.string.ManageSystemAccountCredentials3'))
- .margin(10)
- .id('button3')
- .onClick(() => this.addBiologyCred())
- Button($r('app.string.ManageSystemAccountCredentials4'))
- .margin(10)
- .id('button4')
- .onClick(() => this.biologyAuth())
- Button($r('app.string.ManageSystemAccountCredentials5'))
- .margin(10)
- .id('button5')
- .onClick(() => this.updateCred())
- Button($r('app.string.ManageSystemAccountCredentials6'))
- .margin(10)
- .id('button6')
- .onClick(() => this.getCred())
- Button($r('app.string.ManageSystemAccountCredentials7'))
- .margin(10)
- .id('button8')
- .onClick(() => this.deleteBiologyCred())
- Button($r('app.string.ManageSystemAccountCredentials8'))
- .margin(10)
- .id('button7')
- .onClick(() => this.deleteCred())
- }
- .height('100%')
- .width('100%')
- }
-}
\ No newline at end of file
diff --git a/Account/ManageSystemAccountCredentials/entry/src/main/module.json5 b/Account/ManageSystemAccountCredentials/entry/src/main/module.json5
deleted file mode 100644
index d41c174be09411df64de6445f9833f520b681ec7..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/entry/src/main/module.json5
+++ /dev/null
@@ -1,79 +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",
- "requestPermissions": [{
- "name": "ohos.permission.MANAGE_USER_IDM"
- },
- {
- "name": "ohos.permission.ACCESS_PIN_AUTH"
- },
- {
- "name": "ohos.permission.ACCESS_USER_AUTH_INTERNAL"
- },
- {
- "name": "ohos.permission.USE_USER_IDM"
- }
- ],
- "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": [
- "action.system.home"
- ]
- }
- ]
- }
- ],
- "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/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/element/color.json b/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/element/color.json
deleted file mode 100644
index d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/element/string.json b/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/element/string.json
deleted file mode 100644
index 2fe0787892f6c85c8ac11eaf73caeb7aeab0020f..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "module description"
- },
- {
- "name": "EntryAbility_desc",
- "value": "description"
- },
- {
- "name": "EntryAbility_label",
- "value": "ManageSystemAccountCredentials"
- },
- {
- "name": "ManageSystemAccountCredentials1",
- "value": "Enter PIN code"
- },
- {
- "name": "ManageSystemAccountCredentials2",
- "value": "Authenticate PIN code"
- },
- {
- "name": "ManageSystemAccountCredentials3",
- "value": "Enter biometric credentials"
- },
- {
- "name": "ManageSystemAccountCredentials4",
- "value": "Authenticate biometric credentials"
- },
- {
- "name": "ManageSystemAccountCredentials5",
- "value": "Update credentials"
- },
- {
- "name": "ManageSystemAccountCredentials6",
- "value": "Query credential information"
- },
- {
- "name": "ManageSystemAccountCredentials7",
- "value": "Delete biometric credentials"
- },
- {
- "name": "ManageSystemAccountCredentials8",
- "value": "Delete credentials"
- }
- ]
-}
\ No newline at end of file
diff --git a/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/background.png b/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/background.png
deleted file mode 100644
index f939c9fa8cc8914832e602198745f592a0dfa34d..0000000000000000000000000000000000000000
Binary files a/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/background.png and /dev/null differ
diff --git a/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/foreground.png b/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/foreground.png
deleted file mode 100644
index 4483ddad1f079e1089d685bd204ee1cfe1d01902..0000000000000000000000000000000000000000
Binary files a/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/foreground.png and /dev/null differ
diff --git a/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/layered_image.json b/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/layered_image.json
deleted file mode 100644
index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/startIcon.png b/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/startIcon.png
deleted file mode 100644
index 205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b..0000000000000000000000000000000000000000
Binary files a/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/media/startIcon.png and /dev/null differ
diff --git a/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/profile/backup_config.json b/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/profile/backup_config.json
deleted file mode 100644
index d742c2f96e7dd0f406f499941f3147345e998f95..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/profile/main_pages.json b/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100644
index 1898d94f58d6128ab712be2c68acc7c98e9ab9ce..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/entry/src/main/resources/base/profile/main_pages.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "src": [
- "pages/Index"
- ]
-}
diff --git a/Account/ManageSystemAccountCredentials/entry/src/main/resources/dark/element/color.json b/Account/ManageSystemAccountCredentials/entry/src/main/resources/dark/element/color.json
deleted file mode 100644
index 438d5bc43bb23c59c210d586b96635a72da5b64a..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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/Account/ManageSystemAccountCredentials/entry/src/mock/mock-config.json5 b/Account/ManageSystemAccountCredentials/entry/src/mock/mock-config.json5
deleted file mode 100644
index b9a78e201535765168a92d3543c690273ecdc019..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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/Account/ManageSystemAccountCredentials/entry/src/ohosTest/ets/test/Ability.test.ets b/Account/ManageSystemAccountCredentials/entry/src/ohosTest/ets/test/Ability.test.ets
deleted file mode 100644
index e500640d0d1e343422b48aefa1a77a8ebd7f1dc8..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/entry/src/ohosTest/ets/test/Ability.test.ets
+++ /dev/null
@@ -1,80 +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, it, expect } from '@ohos/hypium';
-// 导入测试依赖kit
-import { abilityDelegatorRegistry, Driver, ON } from '@kit.TestKit';
-import { UIAbility, Want } from '@kit.AbilityKit';
-
-const delegator: abilityDelegatorRegistry.AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator()
-const bundleName = abilityDelegatorRegistry.getArguments().bundleName;
-function sleep(time: number) {
- return new Promise((resolve: Function) => setTimeout(resolve, time));
-}
-export default function abilityTest() {
- describe('AccountCredentialsAbilityTest', () => {
- /*
- * 打开应用,依次点击页面中按钮
- * 使用系统凭证账号接口功能
- */
- it('accountCredentialsExample',0, async (done: Function) => {
- console.info("uitest: TestUiExample begin");
- const want: Want = {
- bundleName: bundleName,
- abilityName: 'EntryAbility'
- }
- await delegator.startAbility(want);
- await sleep(1000);
- const ability: UIAbility = await delegator.getCurrentTopAbility();
- console.info("get top ability");
- expect(ability.context.abilityInfo.name).assertEqual('EntryAbility');
- const driver = Driver.create();
- await driver.delayMs(1000);
-
- const button1 = await driver.findComponent(ON.id('button1'));
- await button1.click();
- await driver.delayMs(1000);
- const text = await driver.findComponent(ON.id('show'));
- let content1: string = await text.getText();
- expect(content1).assertEqual('PIN code entry successful');
-
- const button2 = await driver.findComponent(ON.id('button2'));
- await button2.click();
- await driver.delayMs(1000);
- let content2: string = await text.getText();
- expect(content2).assertEqual('PIN code entry successful');
-
- const button3 = await driver.findComponent(ON.id('button5'));
- await button3.click();
- await driver.delayMs(5000);
- let content3: string = await text.getText();
- expect(content3).assertEqual('Successfully updated PIN code credentials');
-
- const button4 = await driver.findComponent(ON.id('button6'));
- await button4.click();
- await driver.delayMs(1000);
- let content4: string = await text.getText();
- expect(content4).assertEqual('Query information length: 1');
-
- const button5 = await driver.findComponent(ON.id('button7'));
- await button5.click();
- await driver.delayMs(3000);
- let content5: string = await text.getText();
- expect(content5).assertEqual('Successfully deleted PIN code credentials');
- done();
- console.info("uitest: TestUiExample end");
- })
- })
-}
\ No newline at end of file
diff --git a/Account/ManageSystemAccountCredentials/entry/src/ohosTest/ets/test/List.test.ets b/Account/ManageSystemAccountCredentials/entry/src/ohosTest/ets/test/List.test.ets
deleted file mode 100644
index 1eac52fcebe8958e19a7b8fed2e8f39c520a3e42..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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/Account/ManageSystemAccountCredentials/entry/src/ohosTest/module.json5 b/Account/ManageSystemAccountCredentials/entry/src/ohosTest/module.json5
deleted file mode 100644
index 9983b2ba4e55e31a172f0328c82c9a75bfa00ded..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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/Account/ManageSystemAccountCredentials/entry/src/test/List.test.ets b/Account/ManageSystemAccountCredentials/entry/src/test/List.test.ets
deleted file mode 100644
index f1186b1f53c3a70930921c5dbd1417332bec56c9..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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/Account/ManageSystemAccountCredentials/entry/src/test/LocalUnit.test.ets b/Account/ManageSystemAccountCredentials/entry/src/test/LocalUnit.test.ets
deleted file mode 100644
index 7fc57c77dbf76d8df08a2b802a55b948e3fcf968..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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/Account/ManageSystemAccountCredentials/hvigor/hvigor-config.json5 b/Account/ManageSystemAccountCredentials/hvigor/hvigor-config.json5
deleted file mode 100644
index cef74543b1f97c82275e4bf3434b162395bff2eb..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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": "5.0.1",
- "dependencies": {
- },
- "execution": {
- // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | 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 */
- },
- "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/Account/ManageSystemAccountCredentials/hvigorfile.ts b/Account/ManageSystemAccountCredentials/hvigorfile.ts
deleted file mode 100644
index 2a5e543f190732c159beb574dfc9fa37bc94e156..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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. */
-}
diff --git a/Account/ManageSystemAccountCredentials/oh-package.json5 b/Account/ManageSystemAccountCredentials/oh-package.json5
deleted file mode 100644
index eaef52736f22c14e04fca386ba01611ab32a7e4a..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/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": "5.0.1",
- "description": "Please describe the basic information.",
- "dependencies": {
- },
- "devDependencies": {
- "@ohos/hypium": "1.0.19",
- "@ohos/hamock": "1.0.0"
- }
-}
diff --git a/Account/ManageSystemAccountCredentials/ohosTest.md b/Account/ManageSystemAccountCredentials/ohosTest.md
deleted file mode 100644
index 8cb7ede0ab2aab3c52f317f4d3ed9e0efb8f0565..0000000000000000000000000000000000000000
--- a/Account/ManageSystemAccountCredentials/ohosTest.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# ManageSystemAccountCredentials 测试用例归档
-
-## 用例表
-
-| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 |
-| ------------ | ------------ | ------------------ | --------------------------- | -------- | -------- |
-| 拉起应用 | 设备正常运行 | | 成功拉起应用 | 是 | Pass |
-| Enter PIN code | 位于首页 | 点击'Enter PIN code' | 页面显示“PIN code entry successful” | 是 | Pass |
-| Authenticate PIN code | 位于首页 | 点击'Authenticate PIN code' | 页面显示“PIN code entry successful” | 是 | Pass |
-| Update credentials | 位于首页 | 点击'Update credentials' | 页面显示“Successfully updated PIN code credentials” | 是 | Pass |
-| Query credential information | 位于首页 | 点击'Query credential information' | 页面显示“Query information length:1” | 是 | Pass |
-| Delete credentials | 位于首页 | 点击'Delete credentials' | 页面显示“Successfully deleted PIN code credentials” | 是 | Pass |
\ No newline at end of file
diff --git a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_1.png b/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_1.png
deleted file mode 100644
index 42f43349352fe4d0ee4201410ebad572cf508341..0000000000000000000000000000000000000000
Binary files a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_1.png and /dev/null differ
diff --git a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_2.png b/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_2.png
deleted file mode 100644
index e190b36d6184400dbb043b378340c8e70e0ce503..0000000000000000000000000000000000000000
Binary files a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_2.png and /dev/null differ
diff --git a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_3.png b/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_3.png
deleted file mode 100644
index 3a977ab2959b85ba2e6de1368e0ba2e4fa0888ef..0000000000000000000000000000000000000000
Binary files a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_3.png and /dev/null differ
diff --git a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_4.png b/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_4.png
deleted file mode 100644
index 49c2f301a595c25a342bb610e5538800fe07804d..0000000000000000000000000000000000000000
Binary files a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_4.png and /dev/null differ
diff --git a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_5.png b/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_5.png
deleted file mode 100644
index a67b5d00bbd1d0c979f849891fbff0eeaa64a86d..0000000000000000000000000000000000000000
Binary files a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_5.png and /dev/null differ
diff --git a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_6.png b/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_6.png
deleted file mode 100644
index 5d8283bfd24f2af70725ba7e31ad369bb59a13d2..0000000000000000000000000000000000000000
Binary files a/Account/ManageSystemAccountCredentials/screenshots/AccountCredentials_6.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/.gitignore b/Account/ManagerApplicationAccount/.gitignore
deleted file mode 100644
index d2ff20141ceed86d87c0ea5d99481973005bab2b..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/.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/Account/ManagerApplicationAccount/AppScope/app.json5 b/Account/ManagerApplicationAccount/AppScope/app.json5
deleted file mode 100644
index 04e9307b8b3c5ebfe8acc7a1f561f5089198695c..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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.samples.managerapplicationaccount",
- "vendor": "example",
- "versionCode": 1000000,
- "versionName": "1.0.0",
- "icon": "$media:app_icon",
- "label": "$string:app_name"
- }
-}
diff --git a/Account/ManagerApplicationAccount/AppScope/resources/base/element/string.json b/Account/ManagerApplicationAccount/AppScope/resources/base/element/string.json
deleted file mode 100644
index 4e396ec1fbd7340b3154078890610ee490dff4da..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "ManagerApplicationAccount"
- }
- ]
-}
diff --git a/Account/ManagerApplicationAccount/AppScope/resources/base/media/app_icon.png b/Account/ManagerApplicationAccount/AppScope/resources/base/media/app_icon.png
deleted file mode 100644
index a39445dc87828b76fed6d2ec470dd455c45319e3..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/AppScope/resources/base/media/app_icon.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/README.md b/Account/ManagerApplicationAccount/README.md
deleted file mode 100644
index d83cb068c99561a1a5e0a0db3e17f5ff0649b64a..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/README.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# 管理应用账号
-
-### 介绍
-
-1.应用开发者可以使用[应用账号SDK](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-basic-services-kit/js-apis-appAccount.md)管理本应用的账号数据。
-
-能力限制:应用卸载场景下,被卸载应用的账号数据会被删除;本地账号删除场景下,被删除本地账号下的所有应用的账号数据会被删除。
-
-2.实现对以下指南文件中 [管理应用账号](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/manage-application-account.md#/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-basic-services-kit/js-apis-appAccount.md) 示例代码片段的工程化。保证指南中示例代码与sample工程文件同源。
-
-### 效果预览
-
-| 首页 | **执行创建应用账号** |
-| :----------------------------------------------------------: | :----------------------------------------------------------: |
-|
|
|
-| **执行查询应用账号** | **执行存取账号的凭据** |
-|
|
|
-| **执行存取账号的自定义数据** | **执行存取账号的授权令牌** |
-|
|
|
-| **执行删除应用账号** | |
-|
| |
-
-### 使用说明
-
-1. 在主界面,可以点击’Create application account‘,创建应用账号。
-2. 点击’Query application account‘,查询应用账号。
-3. 点击’Access account credentials‘,存取账号的凭据。
-4. 点击’Access custom data of the account‘,存取账号的自定义数据。
-5. 点击’Access account authorization token‘,存取账号的授权令牌。
-6. 点击’Delete application account‘,删除应用账号。
-7. 执行结果会即时反馈在屏幕中央,并在控制台打印log。
-
-### 工程目录
-
-```
-entry/src/
- ├── main
- │ ├── ets
- │ │ ├── entryability
- │ │ ├── entrybackupability
- │ │ └── pages
- │ │ └── Index.ets // 管理应用账号示例代码
- │ ├── module.json5
- │ └── resources
- └── ohosTest
- └── ets
- └── test
- └── Ability.test.ets // 自动化测试代码
-```
-
-### 相关权限
-
-不涉及。
-
-### 依赖
-
-不涉及。
-
-### 约束与限制
-
-1.本示例仅支持标准系统上运行, 支持设备:RK3568。
-
-2.本示例为Stage模型,支持API14版本full-SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。
-
-3.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。
-
-### 下载
-
-如需单独下载本工程,执行如下命令:
-
-````
-git init
-git config core.sparsecheckout true
-echo code/DocsSample/Account/ApplicationAccount > .git/info/sparse-checkout
-git remote add origin https://gitee.com/openharmony/applications_app_samples.git
-git pull origin master
-````
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/build-profile.json5 b/Account/ManagerApplicationAccount/build-profile.json5
deleted file mode 100644
index a33a4782e91c9280a45ec05115ebd546882ce072..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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",
- "compatibleSdkVersion": 14,
- "compileSdkVersion": 14,
- "targetSdkVersion": 14,
- "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/Account/ManagerApplicationAccount/code-linter.json5 b/Account/ManagerApplicationAccount/code-linter.json5
deleted file mode 100644
index 28586467ee7a761c737d8654a73aed6fddbc3c71..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/code-linter.json5
+++ /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.
- */
-
-{
- "files": [
- "**/*.ets"
- ],
- "ignore": [
- "**/src/ohosTest/**/*",
- "**/src/test/**/*",
- "**/src/mock/**/*",
- "**/node_modules/**/*",
- "**/oh_modules/**/*",
- "**/build/**/*",
- "**/.preview/**/*"
- ],
- "ruleSet": [
- "plugin:@performance/recommended",
- "plugin:@typescript-eslint/recommended"
- ],
- "rules": {
- }
-}
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/entry/.gitignore b/Account/ManagerApplicationAccount/entry/.gitignore
deleted file mode 100644
index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-/node_modules
-/oh_modules
-/.preview
-/build
-/.cxx
-/.test
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/entry/build-profile.json5 b/Account/ManagerApplicationAccount/entry/build-profile.json5
deleted file mode 100644
index b4d65d490ef6cbe22d933b9231555210f1555786..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/build-profile.json5
+++ /dev/null
@@ -1,43 +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": {
- },
- "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/Account/ManagerApplicationAccount/entry/hvigorfile.ts b/Account/ManagerApplicationAccount/entry/hvigorfile.ts
deleted file mode 100644
index e4f43d54667f8327c367c8096bd08bb8c75aff54..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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. */
-}
diff --git a/Account/ManagerApplicationAccount/entry/obfuscation-rules.txt b/Account/ManagerApplicationAccount/entry/obfuscation-rules.txt
deleted file mode 100644
index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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/Account/ManagerApplicationAccount/entry/oh-package.json5 b/Account/ManagerApplicationAccount/entry/oh-package.json5
deleted file mode 100644
index 4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/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": "entry",
- "version": "1.0.0",
- "description": "Please describe the basic information.",
- "main": "",
- "author": "",
- "license": "",
- "dependencies": {}
-}
-
diff --git a/Account/ManagerApplicationAccount/entry/src/main/ets/entryability/EntryAbility.ets b/Account/ManagerApplicationAccount/entry/src/main/ets/entryability/EntryAbility.ets
deleted file mode 100644
index 3e77e4b9f7946d80aa77e6b2dcfe40b23ccf6178..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/src/main/ets/entryability/EntryAbility.ets
+++ /dev/null
@@ -1,57 +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';
-
-export default class EntryAbility extends UIAbility {
- onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
- this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET);
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
- }
-
- onDestroy(): void {
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
- }
-
- onWindowStageCreate(windowStage: window.WindowStage): void {
- // Main window is created, set main page for this ability
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
-
- windowStage.loadContent('pages/Index', (err) => {
- if (err.code) {
- hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
- return;
- }
- hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
- });
- }
-
- onWindowStageDestroy(): void {
- // Main window is destroyed, release UI related resources
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
- }
-
- onForeground(): void {
- // Ability has brought to foreground
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
- }
-
- onBackground(): void {
- // Ability has back to background
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
- }
-}
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/Account/ManagerApplicationAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
deleted file mode 100644
index 1504a74f09dfdcfae408be979f99369a2c5affab..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
+++ /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.
- */
-
-import { hilog } from '@kit.PerformanceAnalysisKit';
-import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit';
-
-export default class EntryBackupAbility extends BackupExtensionAbility {
- async onBackup() {
- hilog.info(0x0000, 'testTag', 'onBackup ok');
- }
-
- async onRestore(bundleVersion: BundleVersion) {
- hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion));
- }
-}
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/entry/src/main/ets/pages/Index.ets b/Account/ManagerApplicationAccount/entry/src/main/ets/pages/Index.ets
deleted file mode 100644
index a589906a0f1aa700c00f8fe42d534a172e1cd111..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/src/main/ets/pages/Index.ets
+++ /dev/null
@@ -1,217 +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 import_the_application_account_module]
-import { appAccount, BusinessError } from '@kit.BasicServicesKit';
-// [End import_the_application_account_module]
-
-// [Start obtain_the_instance_object_of_the_application_account]
-const appAccountManager = appAccount.createAppAccountManager();
-// [End obtain_the_instance_object_of_the_application_account]
-
-@Entry
-@Component
-struct Index {
- @State message: string = 'No Name';
-
- private async createAccount(): Promise {
- // [Start parameter_preparation]
- let name: string = 'ZhangSan';
- let options: appAccount.CreateAccountOptions = {
- customData: {
- age: '10'
- }
- };
- // [End parameter_preparation]
- // [Start create_an_app_account_based_on_the_name_and_options]
- appAccountManager.createAccount(name, options).then(()=>{
- console.info('createAccount successfully');
- // [StartExclude create_an_app_account_based_on_the_name_and_options]
- this.message = 'Account creation successful';
- // [EndExclude create_an_app_account_based_on_the_name_and_options]
- }).catch((err: BusinessError)=>{
- console.error(`createAccount failed, error: code is ${err.code}, message is ${err.message}`);
- // [StartExclude create_an_app_account_based_on_the_name_and_options]
- this.message = 'Account creation failed: ' + JSON.stringify(err);
- // [EndExclude create_an_app_account_based_on_the_name_and_options]
- });
- // [End create_an_app_account_based_on_the_name_and_options]
- }
-
- private async getAccounts(): Promise {
- // [Start query_the_account_list]
- appAccountManager.getAllAccounts().then((data: appAccount.AppAccountInfo[]) => {
- console.info('getAllAccounts successfully, data: ' + JSON.stringify(data));
- // [StartExclude query_the_account_list]
- this.message = 'Query account result: ' + data[0].name;
- // [EndExclude query_the_account_list]
- }).catch((err: BusinessError) => {
- console.error(`getAllAccounts failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude query_the_account_list]
- this.message = 'Query account failed: ' + JSON.stringify(err);
- // [EndExclude query_the_account_list]
- });
- // [End query_the_account_list]
- }
-
- private async setCredential(): Promise {
- // [Start prepare_parameters_to_specify_the_account_name_credential_type_and_credential]
- let name: string = 'ZhangSan';
- let credentialType: string = 'PIN_SIX';
- let credential: string = 'xxxxxx';
- // [End prepare_parameters_to_specify_the_account_name_credential_type_and_credential]
-
- // [Start set_the_credentials_for_your_account]
- await appAccountManager.setCredential(name, credentialType, credential).then(() => {
- console.info('setCredential successfully');
- }).catch((err: BusinessError) => {
- console.error(`setCredential failed: code is ${err.code}, message is ${err.message}`);
- // [StartExclude set_the_credentials_for_your_account]
- this.message = 'Failed to set account credentials: ' + JSON.stringify(err);
- // [EndExclude set_the_credentials_for_your_account]
- });
- // [End set_the_credentials_for_your_account]
-
- // [Start obtain_the_credentials_for_your_account]
- appAccountManager.getCredential(name, credentialType).then((data: string) => {
- console.info('getCredential successfully, data: ' + data);
- // [StartExclude obtain_the_credentials_for_your_account]
- this.message = 'Successfully set account credentials: ' + data;
- // [EndExclude obtain_the_credentials_for_your_account]
- }).catch((err: BusinessError) => {
- console.error(`getCredential failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude obtain_the_credentials_for_your_account]
- this.message = 'Failed to query account credentials: ' + JSON.stringify(err);
- // [EndExclude obtain_the_credentials_for_your_account]
- });
- // [End obtain_the_credentials_for_your_account]
- }
-
- private async setCustomData(): Promise {
- // [Start prepare_parameters_specify_the_account_name_and_custom_key_values]
- let name: string = 'ZhangSan';
- let key: string = 'age';
- let value: string = '12';
- // [End prepare_parameters_specify_the_account_name_and_custom_key_values]
- // [Start set_up_custom_data_for_your_account]
- await appAccountManager.setCustomData(name, key, value).then(() => {
- console.info('setCustomData successfully');
- }).catch((err: BusinessError) => {
- console.error(`setCustomData failed: code is ${err.code}, message is ${err.message}`);
- // [StartExclude set_up_custom_data_for_your_account]
- this.message = 'Failed to set custom account credentials: ' + JSON.stringify(err);
- // [EndExclude set_up_custom_data_for_your_account]
- });
- // [End set_up_custom_data_for_your_account]
- // [Start obtain_the_custom_data_of_the_account]
- appAccountManager.getCustomData(name, key).then((data: string) => {
- console.info('getCustomData successfully, data: ' + data);
- // [StartExclude obtain_the_custom_data_of_the_account]
- this.message = 'Successfully set custom account credentials, ' + key + ' is ' + data;
- // [EndExclude obtain_the_custom_data_of_the_account]
- }).catch((err: BusinessError) => {
- console.error(`getCustomData failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude obtain_the_custom_data_of_the_account]
- this.message = 'Failed to query custom account credentials: ' + JSON.stringify(err);
- // [EndExclude obtain_the_custom_data_of_the_account]
- });
- // [End obtain_the_custom_data_of_the_account]
- }
-
- private async setAuthToken(): Promise {
- // [Start prepare_parameters_to_specify_the_account_name_account_owner_authorization_type_and_authorization_token]
- let name: string = 'ZhangSan';
- let owner: string = 'com.samples.managerapplicationaccount';
- let authType: string = 'getSocialData';
- let token: string = 'xxxxxx';
- // [End prepare_parameters_to_specify_the_account_name_account_owner_authorization_type_and_authorization_token]
- // [Start set_the_authorization_token_for_the_specified_authorization_type]
- await appAccountManager.setAuthToken(name, authType, token).then(() => {
- console.info('setAuthToken successfully');
- }).catch((err: BusinessError) => {
- console.error(`setAuthToken failed: code is ${err.code}, message is ${err.message}`);
- // [StartExclude set_the_authorization_token_for_the_specified_authorization_type]
- this.message = 'Failed to store account authorization token: ' + JSON.stringify(err);
- // [EndExclude set_the_authorization_token_for_the_specified_authorization_type]
- });
- // [End set_the_authorization_token_for_the_specified_authorization_type]
- // [Start obtain_an_authorization_token_for_the_specified_authorization_type]
- await appAccountManager.getAuthToken(name, owner, authType).then((data: string) => {
- console.info('getAuthToken successfully, data: ' + data);
- // [StartExclude obtain_an_authorization_token_for_the_specified_authorization_type]
- this.message = 'Successfully stored account authorization token: ' + data;
- // [EndExclude obtain_an_authorization_token_for_the_specified_authorization_type]
- }).catch((err: BusinessError) => {
- console.error(`getAuthToken failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude obtain_an_authorization_token_for_the_specified_authorization_type]
- this.message = 'Failed to get account authorization token: ' + JSON.stringify(err);
- // [EndExclude obtain_an_authorization_token_for_the_specified_authorization_type]
- });
- // [End obtain_an_authorization_token_for_the_specified_authorization_type]
- }
-
- private async removeAccount(): Promise {
- // [Start delete_account]
- let name: string = 'ZhangSan';
- appAccountManager.removeAccount(name).then(() => {
- console.info('removeAccount successfully');
- // [StartExclude delete_account]
- this.message = 'removeAccount successfully';
- // [EndExclude delete_account]
- }).catch((err: BusinessError) => {
- console.error(`removeAccount failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude delete_account]
- this.message = 'Account removal failed: ' + JSON.stringify(err);
- // [EndExclude delete_account]
- });
- // [End delete_account]
-
- }
-
- build() {
- Column() {
- Text(this.message)
- .id('show')
- .fontSize(36)
- .fontWeight(FontWeight.Bold)
- Button($r('app.string.Application1'))
- .margin(10)
- .id('button1')
- .onClick(() => this.createAccount())
- Button($r('app.string.Application2'))
- .margin(10)
- .id('button2')
- .onClick(() => this.getAccounts())
- Button($r('app.string.Application3'))
- .margin(10)
- .id('button3')
- .onClick(() => this.setCredential())
- Button($r('app.string.Application4'))
- .margin(10)
- .id('button4')
- .onClick(() => this.setCustomData())
- Button($r('app.string.Application5'))
- .margin(10)
- .id('button5')
- .onClick(() => this.setAuthToken())
- Button($r('app.string.Application6'))
- .margin(10)
- .id('button6')
- .onClick(() => this.removeAccount())
- }
- .height('100%')
- .width('100%')
- }
-}
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/entry/src/main/module.json5 b/Account/ManagerApplicationAccount/entry/src/main/module.json5
deleted file mode 100644
index 776ce01475229d674487a2830790c4c87b777379..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/src/main/module.json5
+++ /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.
- */
-
-{
- "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": [
- "action.system.home"
- ]
- }
- ]
- }
- ],
- "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/Account/ManagerApplicationAccount/entry/src/main/resources/base/element/color.json b/Account/ManagerApplicationAccount/entry/src/main/resources/base/element/color.json
deleted file mode 100644
index d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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/Account/ManagerApplicationAccount/entry/src/main/resources/base/element/string.json b/Account/ManagerApplicationAccount/entry/src/main/resources/base/element/string.json
deleted file mode 100644
index 599fe1e3ea8035e3be37b3e3c4e9966f75b88cbd..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "module description"
- },
- {
- "name": "EntryAbility_desc",
- "value": "description"
- },
- {
- "name": "EntryAbility_label",
- "value": "label"
- },
- {
- "name": "Application1",
- "value": "Create application account"
- },
- {
- "name": "Application2",
- "value": "Query application account"
- },
- {
- "name": "Application3",
- "value": "Access account credentials"
- },
- {
- "name": "Application4",
- "value": "Access custom data of the account"
- },
- {
- "name": "Application5",
- "value": "Access account authorization token"
- },
- {
- "name": "Application6",
- "value": "Delete application account"
- }
- ]
-}
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/background.png b/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/background.png
deleted file mode 100644
index f939c9fa8cc8914832e602198745f592a0dfa34d..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/background.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/foreground.png b/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/foreground.png
deleted file mode 100644
index 4483ddad1f079e1089d685bd204ee1cfe1d01902..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/foreground.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/layered_image.json b/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/layered_image.json
deleted file mode 100644
index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/startIcon.png b/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/startIcon.png
deleted file mode 100644
index 205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/entry/src/main/resources/base/media/startIcon.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/entry/src/main/resources/base/profile/backup_config.json b/Account/ManagerApplicationAccount/entry/src/main/resources/base/profile/backup_config.json
deleted file mode 100644
index d742c2f96e7dd0f406f499941f3147345e998f95..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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/Account/ManagerApplicationAccount/entry/src/main/resources/base/profile/main_pages.json b/Account/ManagerApplicationAccount/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100644
index 1898d94f58d6128ab712be2c68acc7c98e9ab9ce..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/src/main/resources/base/profile/main_pages.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "src": [
- "pages/Index"
- ]
-}
diff --git a/Account/ManagerApplicationAccount/entry/src/main/resources/dark/element/color.json b/Account/ManagerApplicationAccount/entry/src/main/resources/dark/element/color.json
deleted file mode 100644
index 438d5bc43bb23c59c210d586b96635a72da5b64a..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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/Account/ManagerApplicationAccount/entry/src/main/resources/en_US/element/string.json b/Account/ManagerApplicationAccount/entry/src/main/resources/en_US/element/string.json
deleted file mode 100644
index 8fddd8fce87fcaf4635a7294392822515acdc9b7..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/src/main/resources/en_US/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": "AsyncConcurrencyOverview"
- }
- ]
-}
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/entry/src/main/resources/zh_CN/element/string.json b/Account/ManagerApplicationAccount/entry/src/main/resources/zh_CN/element/string.json
deleted file mode 100644
index 55f88339349ae1e6872f5a14b04db8fa78445b2b..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/src/main/resources/zh_CN/element/string.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "模块描述"
- },
- {
- "name": "EntryAbility_desc",
- "value": "description"
- },
- {
- "name": "EntryAbility_label",
- "value": "AsyncConcurrencyOverview"
- }
- ]
-}
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/entry/src/mock/mock-config.json5 b/Account/ManagerApplicationAccount/entry/src/mock/mock-config.json5
deleted file mode 100644
index b9a78e201535765168a92d3543c690273ecdc019..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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/Account/ManagerApplicationAccount/entry/src/ohosTest/ets/test/Ability.test.ets b/Account/ManagerApplicationAccount/entry/src/ohosTest/ets/test/Ability.test.ets
deleted file mode 100644
index afaa47a2b8605108403c0f0163ccdad3c22f5fbe..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/entry/src/ohosTest/ets/test/Ability.test.ets
+++ /dev/null
@@ -1,85 +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, it, expect } from '@ohos/hypium';
-import { abilityDelegatorRegistry, Driver, ON } from '@kit.TestKit';
-import { UIAbility, Want } from '@kit.AbilityKit';
-
-const delegator: abilityDelegatorRegistry.AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator()
-const bundleName = abilityDelegatorRegistry.getArguments().bundleName;
-function sleep(time: number) {
- return new Promise((resolve: Function) => setTimeout(resolve, time));
-}
-export default function abilityTest() {
- describe('ApplicationAccountAbilityTest', () => {
- /*
- * 打开应用,依次点击页面中按钮
- * 使用应用账号接口功能
- */
- it('applicationAccountExample',0, async (done: Function) => {
- console.info("uitest: TestUiExample begin");
- const want: Want = {
- bundleName: bundleName,
- abilityName: 'EntryAbility'
- }
- await delegator.startAbility(want);
- await sleep(1000);
- const ability: UIAbility = await delegator.getCurrentTopAbility();
- console.info("get top ability");
- expect(ability.context.abilityInfo.name).assertEqual('EntryAbility');
- const driver = Driver.create();
- await driver.delayMs(1000);
-
- const button1 = await driver.findComponent(ON.id('button1'));
- await button1.click();
- await driver.delayMs(1000);
- const text = await driver.findComponent(ON.id('show'));
- let content1: string = await text.getText();
- expect(content1).assertEqual('Account creation successful');
-
- const button2 = await driver.findComponent(ON.id('button2'));
- await button2.click();
- await driver.delayMs(1000);
- let content2: string = await text.getText();
- expect(content2).assertEqual('Query account result: ZhangSan');
-
- const button3 = await driver.findComponent(ON.id('button3'));
- await button3.click();
- await driver.delayMs(1000);
- let content3: string = await text.getText();
- expect(content3).assertEqual('Successfully set account credentials: xxxxxx');
-
- const button4 = await driver.findComponent(ON.id('button4'));
- await button4.click();
- await driver.delayMs(1000);
- let content4: string = await text.getText();
- expect(content4).assertEqual('Successfully set custom account credentials, age is 12');
-
- const button5 = await driver.findComponent(ON.id('button5'));
- await button5.click();
- await driver.delayMs(1000);
- let content5: string = await text.getText();
- expect(content5).assertEqual('Successfully stored account authorization token: xxxxxx');
-
- const button6 = await driver.findComponent(ON.id('button6'));
- await button6.click();
- await driver.delayMs(1000);
- let content6: string = await text.getText();
- expect(content6).assertEqual('removeAccount successfully');
- done();
- console.info("uitest: TestUiExample end");
- })
- })
-}
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/entry/src/ohosTest/ets/test/List.test.ets b/Account/ManagerApplicationAccount/entry/src/ohosTest/ets/test/List.test.ets
deleted file mode 100644
index 1eac52fcebe8958e19a7b8fed2e8f39c520a3e42..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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/Account/ManagerApplicationAccount/entry/src/ohosTest/module.json5 b/Account/ManagerApplicationAccount/entry/src/ohosTest/module.json5
deleted file mode 100644
index 9983b2ba4e55e31a172f0328c82c9a75bfa00ded..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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/Account/ManagerApplicationAccount/entry/src/test/List.test.ets b/Account/ManagerApplicationAccount/entry/src/test/List.test.ets
deleted file mode 100644
index f1186b1f53c3a70930921c5dbd1417332bec56c9..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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/Account/ManagerApplicationAccount/entry/src/test/LocalUnit.test.ets b/Account/ManagerApplicationAccount/entry/src/test/LocalUnit.test.ets
deleted file mode 100644
index 7fc57c77dbf76d8df08a2b802a55b948e3fcf968..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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/Account/ManagerApplicationAccount/hvigor/hvigor-config.json5 b/Account/ManagerApplicationAccount/hvigor/hvigor-config.json5
deleted file mode 100644
index cef74543b1f97c82275e4bf3434b162395bff2eb..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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": "5.0.1",
- "dependencies": {
- },
- "execution": {
- // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | 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 */
- },
- "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/Account/ManagerApplicationAccount/hvigorfile.ts b/Account/ManagerApplicationAccount/hvigorfile.ts
deleted file mode 100644
index 2a5e543f190732c159beb574dfc9fa37bc94e156..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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. */
-}
diff --git a/Account/ManagerApplicationAccount/oh-package.json5 b/Account/ManagerApplicationAccount/oh-package.json5
deleted file mode 100644
index eaef52736f22c14e04fca386ba01611ab32a7e4a..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/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": "5.0.1",
- "description": "Please describe the basic information.",
- "dependencies": {
- },
- "devDependencies": {
- "@ohos/hypium": "1.0.19",
- "@ohos/hamock": "1.0.0"
- }
-}
diff --git a/Account/ManagerApplicationAccount/ohosTest.md b/Account/ManagerApplicationAccount/ohosTest.md
deleted file mode 100644
index d2d8495a3d0575addd5d4e8bb2501c9259ae7b58..0000000000000000000000000000000000000000
--- a/Account/ManagerApplicationAccount/ohosTest.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# AsyncConcurrencyOverview 测试用例归档
-
-## 用例表
-
-| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 |
-| -------------------- | ------------ | -------------------------- | --------------------------------------------- | -------- | -------- |
-| 拉起应用 | 设备正常运行 | | 成功拉起应用 | 是 | Pass |
-| Create application account | 位于首页 | 点击'Create application account' | 页面显示'Account creation successful' | 是 | Pass |
-| Query application account | 位于首页 | 点击'Query application account' | 页面显示'Query account result: ZhangSan' | 是 | Pass |
-| Access account credentials | 位于首页 | 点击'Access account credentials' | 页面显示'Successfully set account credentials: xxxxxx' | 是 | Pass |
-| Access custom data of the account | 位于首页 | 点击'Access custom data of the account’ | 页面显示'Successfully set custom account credentials, age is 12‘ | 是 | Pass |
-| Access account authorization token | 位于首页 | 点击'Access account authorization token’ | 页面显示'Successfully stored account authorization token: xxxxxx‘ | 是 | Pass |
-| Delete application account | 位于首页 | 点击'Delete application account’ | 页面显示'removeAccount successfully‘ | 是 | Pass |
\ No newline at end of file
diff --git a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_1.png b/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_1.png
deleted file mode 100644
index e840eb7e55fc25e9b807f4f18727ca714c0847a7..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_1.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_2.png b/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_2.png
deleted file mode 100644
index 8ec82f37622be4a3bc2c905f0ee8efc0a1536082..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_2.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_3.png b/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_3.png
deleted file mode 100644
index 3e78d78424a5b91b9508ebf040ca239eae6de99f..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_3.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_4.png b/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_4.png
deleted file mode 100644
index 0b6925fc1f9138fbe541b79d53e8dd86b6cc1878..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_4.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_5.png b/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_5.png
deleted file mode 100644
index f3da04caeaa894ea9de33a1779e5ed8906d73841..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_5.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_6.png b/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_6.png
deleted file mode 100644
index 2a0130469bb7d2f9cb6b0a9b8408a22f29236253..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_6.png and /dev/null differ
diff --git a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_7.png b/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_7.png
deleted file mode 100644
index abeb59ba0df57be165623d48a6113b14e3e6ff65..0000000000000000000000000000000000000000
Binary files a/Account/ManagerApplicationAccount/screenshots/ManagerApplicationAccount_7.png and /dev/null differ
diff --git a/Account/SystemAccount/.gitignore b/Account/SystemAccount/.gitignore
deleted file mode 100644
index d2ff20141ceed86d87c0ea5d99481973005bab2b..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/.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/Account/SystemAccount/AppScope/app.json5 b/Account/SystemAccount/AppScope/app.json5
deleted file mode 100644
index c35b144d7b6477671dc306481203795a0ea03c59..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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.samples.systemaccount",
- "vendor": "example",
- "versionCode": 1000000,
- "versionName": "1.0.0",
- "icon": "$media:app_icon",
- "label": "$string:app_name"
- }
-}
diff --git a/Account/SystemAccount/AppScope/resources/base/element/string.json b/Account/SystemAccount/AppScope/resources/base/element/string.json
deleted file mode 100644
index baaa541dcbd4e47043e2a5670f557375fd3790ba..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "SystemAccount"
- }
- ]
-}
diff --git a/Account/SystemAccount/AppScope/resources/base/media/app_icon.png b/Account/SystemAccount/AppScope/resources/base/media/app_icon.png
deleted file mode 100644
index a39445dc87828b76fed6d2ec470dd455c45319e3..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/AppScope/resources/base/media/app_icon.png and /dev/null differ
diff --git a/Account/SystemAccount/README.md b/Account/SystemAccount/README.md
deleted file mode 100644
index a6af6cf4d0593c4bfffbcf647e66be24193ad239..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/README.md
+++ /dev/null
@@ -1,95 +0,0 @@
-# 系统账号 (管理系统账号和使用约束管控系统账号)
-
-### 介绍
-
-1.管理系统账号:
-
-系统提供了用于管理系统账号的接口。 系统应用开发者在申请对应的权限后,可以创建、激活、修改和删除系统账号,实现对系统账号的生命周期管理;三方应用开发者可以查询系统账号的基本信息,以完成与系统账号相关的业务逻辑开发。
-
-2.使用约束管控系统账号:
-
-账号管理模块提供了基于角色的访问控制机制,用户可以为系统账号设置约束,以限制目标账号的行为。
-
-预定义的账号约束条件,可以参考 :[系统账号约束列表](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-basic-services-kit/js-apis-osAccount.md#系统账号约束列表)
-
-3.实现对以下指南文件中 [管理系统账号](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/manage-os-account.md) [使用约束管控系统账号](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/control-os-account-by-constraints.md) 示例代码片段的工程化。保证指南中示例代码与sample工程文件同源。
-
-### 效果预览
-
-| 首页 | 使用约束管控系统账号页面 |
-| :----------------------------------------------------------: | :----------------------------------------------------------: |
-|
|
|
-| 执行Set the constraint list for the specified system account | 执行Determine if the specified constraint for the target system account is enabled |
-|
|
|
-| 管理系统账号首页 | 执行Create system account |
-|
|
|
-| 执行Query all system accounts | 执行Query specified system account information |
-|
|
|
-| 执行Modify system account avatar | 执行Modify system account nickname |
-|
|
|
-| 执行Delete system account | |
-|
| |
-
-### 使用说明
-
-1. 在主界面,点击’UseConstraintManagementSystemAccount‘,进入约束管控系统账号页面。
-2. 点击’Set the constraint list for the specified system account‘,Set the constraint list for the specified system account。
-3. 点击’Determine if the specified constraint for the target system account is enabled‘,Determine if the specified constraint for the target system account is enabled。
-4. 点击’Go to ManageSystem‘,进入管理系统账号首页。
-5. 点击’Create system account‘,Create system account。
-6. 点击’Query all system accounts‘,Query all system accounts。
-7. 点击’Query specified system account information‘,Query specified system account information。
-8. 点击’Modify system account avatar‘,Modify system account avatar。
-9. 点击’Modify system account nickname‘,Modify system account nickname。
-10. 点击’Delete system account‘,Delete system account。
-
-### 工程目录
-
-```
-entry/src/
- ├── main
- │ ├── ets
- │ │ ├── entryability
- │ │ ├── entrybackupability
- │ │ └── pages
- | | ├──SystemAccount
- | | | ├── ManageSystemAccounts // 管理系统账号示例代码
- | | | └── UseConstraintManagementSystemAccount // 使用约束管控系统账号示例代码
- │ │ └── Index.ets // 系统账号首页
- │ ├── module.json5
- │ └── resources
- ├── ohosTest
- │ ├── ets
- │ │ └── test
- │ │ └── Ability.test.ets // 自动化测试代码
-```
-
-### 相关权限
-
-[ohos.permission.MANAGE_LOCAL_ACCOUNTS](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissionmanagelocalaccounts)
-
-[ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissioninteractacrosslocalaccountsextension)
-
-### 依赖
-
-不涉及。
-
-### 约束与限制
-
-1.本示例仅支持标准系统上运行, 支持设备:RK3568。
-
-2.本示例为Stage模型,支持API14版本full-SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。
-
-3.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。
-
-### 下载
-
-如需单独下载本工程,执行如下命令:
-
-````
-git init
-git config core.sparsecheckout true
-echo code/DocsSample/Account/SystemAccount > .git/info/sparse-checkout
-git remote add origin https://gitee.com/openharmony/applications_app_samples.git
-git pull origin master
-````
\ No newline at end of file
diff --git a/Account/SystemAccount/build-profile.json5 b/Account/SystemAccount/build-profile.json5
deleted file mode 100644
index a33a4782e91c9280a45ec05115ebd546882ce072..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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",
- "compatibleSdkVersion": 14,
- "compileSdkVersion": 14,
- "targetSdkVersion": 14,
- "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/Account/SystemAccount/code-linter.json5 b/Account/SystemAccount/code-linter.json5
deleted file mode 100644
index 28586467ee7a761c737d8654a73aed6fddbc3c71..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/code-linter.json5
+++ /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.
- */
-
-{
- "files": [
- "**/*.ets"
- ],
- "ignore": [
- "**/src/ohosTest/**/*",
- "**/src/test/**/*",
- "**/src/mock/**/*",
- "**/node_modules/**/*",
- "**/oh_modules/**/*",
- "**/build/**/*",
- "**/.preview/**/*"
- ],
- "ruleSet": [
- "plugin:@performance/recommended",
- "plugin:@typescript-eslint/recommended"
- ],
- "rules": {
- }
-}
\ No newline at end of file
diff --git a/Account/SystemAccount/entry/.gitignore b/Account/SystemAccount/entry/.gitignore
deleted file mode 100644
index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-/node_modules
-/oh_modules
-/.preview
-/build
-/.cxx
-/.test
\ No newline at end of file
diff --git a/Account/SystemAccount/entry/build-profile.json5 b/Account/SystemAccount/entry/build-profile.json5
deleted file mode 100644
index b4d65d490ef6cbe22d933b9231555210f1555786..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/build-profile.json5
+++ /dev/null
@@ -1,43 +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": {
- },
- "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/Account/SystemAccount/entry/hvigorfile.ts b/Account/SystemAccount/entry/hvigorfile.ts
deleted file mode 100644
index e4f43d54667f8327c367c8096bd08bb8c75aff54..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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. */
-}
diff --git a/Account/SystemAccount/entry/obfuscation-rules.txt b/Account/SystemAccount/entry/obfuscation-rules.txt
deleted file mode 100644
index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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/Account/SystemAccount/entry/oh-package.json5 b/Account/SystemAccount/entry/oh-package.json5
deleted file mode 100644
index 4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/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": "entry",
- "version": "1.0.0",
- "description": "Please describe the basic information.",
- "main": "",
- "author": "",
- "license": "",
- "dependencies": {}
-}
-
diff --git a/Account/SystemAccount/entry/src/main/ets/entryability/EntryAbility.ets b/Account/SystemAccount/entry/src/main/ets/entryability/EntryAbility.ets
deleted file mode 100644
index 3e77e4b9f7946d80aa77e6b2dcfe40b23ccf6178..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/src/main/ets/entryability/EntryAbility.ets
+++ /dev/null
@@ -1,57 +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';
-
-export default class EntryAbility extends UIAbility {
- onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
- this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET);
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
- }
-
- onDestroy(): void {
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
- }
-
- onWindowStageCreate(windowStage: window.WindowStage): void {
- // Main window is created, set main page for this ability
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
-
- windowStage.loadContent('pages/Index', (err) => {
- if (err.code) {
- hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
- return;
- }
- hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
- });
- }
-
- onWindowStageDestroy(): void {
- // Main window is destroyed, release UI related resources
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
- }
-
- onForeground(): void {
- // Ability has brought to foreground
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
- }
-
- onBackground(): void {
- // Ability has back to background
- hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
- }
-}
\ No newline at end of file
diff --git a/Account/SystemAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/Account/SystemAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
deleted file mode 100644
index 1504a74f09dfdcfae408be979f99369a2c5affab..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
+++ /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.
- */
-
-import { hilog } from '@kit.PerformanceAnalysisKit';
-import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit';
-
-export default class EntryBackupAbility extends BackupExtensionAbility {
- async onBackup() {
- hilog.info(0x0000, 'testTag', 'onBackup ok');
- }
-
- async onRestore(bundleVersion: BundleVersion) {
- hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion));
- }
-}
\ No newline at end of file
diff --git a/Account/SystemAccount/entry/src/main/ets/pages/Index.ets b/Account/SystemAccount/entry/src/main/ets/pages/Index.ets
deleted file mode 100644
index 03155159c8eadbae023eb7ac642613afb9f1c101..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/src/main/ets/pages/Index.ets
+++ /dev/null
@@ -1,43 +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 { CommonButton } from '../util/CommonButton';
-
-@Entry
-@Component
-struct Index {
- build() {
- Scroll() {
- Column() {
- Text('SystemAccountHome')
- .padding('15vp')
- .width('100%')
- .fontSize('25fp')
- .textAlign(TextAlign.Center)
- CommonButton({
- buttonName: 'ManageSystemAccounts',
- buttonUrl: 'pages/SystemAccount/ManageSystemAccounts'
- });
- CommonButton({
- buttonName: 'UseConstraintManagementSystemAccount',
- buttonUrl: 'pages/SystemAccount/UseConstraintManagementSystemAccount'
- });
- }
- .padding('5vp')
- .width('100%')
- }.margin({ bottom: 60 })
- .width('100%')
- }
-}
\ No newline at end of file
diff --git a/Account/SystemAccount/entry/src/main/ets/pages/SystemAccount/ManageSystemAccounts.ets b/Account/SystemAccount/entry/src/main/ets/pages/SystemAccount/ManageSystemAccounts.ets
deleted file mode 100644
index 292b9ff8f889da5e4ef6a7418ecde84d887fad69..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/src/main/ets/pages/SystemAccount/ManageSystemAccounts.ets
+++ /dev/null
@@ -1,212 +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 import_system_account_module]
-import { osAccount, BusinessError } from '@kit.BasicServicesKit';
-// [End import_system_account_module]
-
-// [Start obtain_account_management_single_instance_object]
-let accountManager = osAccount.getAccountManager();
-// [End obtain_account_management_single_instance_object]
-
-@Entry
-@Component
-struct ManageSystemAccounts {
- @State message: string = 'No work done';
- @State createLocalId: number = -1;
-
- private async createOsAccount(): Promise {
- // [Start specify_nickname_and_type_information_to_create_system_account]
- let name: string = 'Bob';
- let type: osAccount.OsAccountType = osAccount.OsAccountType.NORMAL;
-
- accountManager.createOsAccount(name, type, (err: BusinessError, osAccountInfo: osAccount.OsAccountInfo)=>{
- console.info(`createOsAccount code is ${err.code}, message is ${err.message}`);
- console.info('createOsAccount osAccountInfo:' + JSON.stringify(osAccountInfo));
- // [StartExclude specify_nickname_and_type_information_to_create_system_account]
- if (!err) {
- this.message = 'Account creation successful. Account name: ' + JSON.stringify(osAccountInfo.localName);
- this.createLocalId = osAccountInfo.localId;
- } else {
- this.message = 'Failed to create account: ' + JSON.stringify(err);
- }
- // [EndExclude specify_nickname_and_type_information_to_create_system_account]
- });
- // [End specify_nickname_and_type_information_to_create_system_account]
- }
-
- private async findAllOsAccount(): Promise {
- // [Start query_the_full_account]
- accountManager.queryAllCreatedOsAccounts((err: BusinessError, accountArr: osAccount.OsAccountInfo[])=>{
- console.info(`queryAllCreatedOsAccounts code is ${err.code}, message is ${err.message}`);
- console.info('queryAllCreatedOsAccounts accountArr:' + JSON.stringify(accountArr));
- // [StartExclude query_the_full_account]
- if (!err) {
- this.message = 'Query account successful. Account name:' + JSON.stringify(accountArr[0].localName);
- } else {
- this.message = 'Query account failed: ' + JSON.stringify(err);
- }
- // [EndExclude query_the_full_account]
- });
- // [End query_the_full_account]
- }
-
- private async findOsAccount(): Promise {
- // [Start query_information_of_the_specified_account]
- let localId: number = 100;
- accountManager.queryOsAccountById(localId, (err: BusinessError, accountInfo: osAccount.OsAccountInfo)=>{
- console.info(`queryOsAccountById code is ${err.code}, message is ${err.message}`);
- console.info('queryOsAccountById accountInfo:' + JSON.stringify(accountInfo));
- // [StartExclude query_information_of_the_specified_account]
- if (!err) {
- this.message = 'Query account successful. Account name for account 100: ' + JSON.stringify(accountInfo.localName);
- } else {
- this.message = 'Query account failed: ' + JSON.stringify(err);
- }
- // [EndExclude query_information_of_the_specified_account]
- });
- // [End query_information_of_the_specified_account]
- }
-
- private async changeOsAccountHead(): Promise {
- // [Start change_system_account_avatar]
- let localId: number = 100;
- // [StartExclude change_system_account_avatar]
- localId = this.createLocalId;
- // [EndExclude change_system_account_avatar]
- let newPhoto: string = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPCAYAAAA/I0V3AAAAAXNSR0IArs4c6QAAAARnQU1BAA'+
- 'Cxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACwSURBVDhPvZLBDYMwDEV/ugsXRjAT0EHCOuFIBwkbdIRewi6unbiAyoGgSn1SFH85+Y'+
- 'q/4ljARW62X+LHS8uIzjm4dXUYF+utzBikB52Jo5e5iEPKqpACk7R9NM2RvWm5tIkD2czLCUFNKLD6IjdMHFHDzws285MgGrT0xCtp3WOKHo'+
- '+7q0mP0DZW9pNmoEFUzrQjp5cCnaen2kSJXLFD8ghbXyZCMQf/8e8Ns1XVAG/XAgqKzVnJFAAAAABJRU5ErkJggg=='
-
- accountManager.setOsAccountProfilePhoto(localId, newPhoto, (err: BusinessError)=>{
- console.info(`setOsAccountProfilePhoto code is ${err.code}, message is ${err.message}`);
- // [StartExclude change_system_account_avatar]
- if(!err) {
- this.message = 'Successfully updated system account avatar'
- } else {
- this.message = 'Failed to update system account avatar: ' + JSON.stringify(err);
- }
- // [EndExclude change_system_account_avatar]
- });
- // [End change_system_account_avatar]
- }
-
- private async changeOsAccountName(): Promise {
- // [Start change_system_account_name]
- let localId: number = 100;
- // [StartExclude change_system_account_name]
- localId = this.createLocalId;
- // [EndExclude change_system_account_name]
- let newName: string = 'Tom';
- accountManager.setOsAccountName(localId, newName, (err: BusinessError) => {
- if (err) {
- console.error(`setOsAccountName failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude change_system_account_name]
- this.message = 'Failed to modify system account name: ' + JSON.stringify(err);
- // [EndExclude change_system_account_name]
- } else {
- console.info('setOsAccountName successfully');
- // [StartExclude change_system_account_name]
- this.message = 'Successfully modified system account name';
- // [EndExclude change_system_account_name]
- }
- });
- // [End change_system_account_name]
- }
-
- private async activateOsAccount(): Promise {
- // [Start activate_system_account]
- let localId: number = 101;
- // [StartExclude activate_system_account]
- localId = this.createLocalId;
- // [EndExclude activate_system_account]
- accountManager.activateOsAccount(localId, (err: BusinessError)=>{
- if (err) {
- console.error(`activateOsAccount failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude activate_system_account]
- this.message = 'Failed to activate system account: ' + err.code;
- // [EndExclude activate_system_account]
- } else {
- console.info('activateOsAccount successfully');
- // [StartExclude activate_system_account]
- this.message = 'Successfully activated system account'
- // [EndExclude activate_system_account]
- }
- });
- // [End activate_system_account]
- }
-
- private async deleteOsAccount(): Promise {
- // [Start delete_the_specified_account]
- let localId: number = 101;
- // [StartExclude delete_the_specified_account]
- localId = this.createLocalId;
- // [EndExclude delete_the_specified_account]
- accountManager.removeOsAccount(localId, (err: BusinessError)=>{
- if (err) {
- console.error(`removeOsAccount failed, code is ${err.code}, message is ${err.message}`);
- // [StartExclude delete_the_specified_account]
- this.message = 'Failed to delete system account: ' + JSON.stringify(err);
- // [EndExclude delete_the_specified_account]
- } else {
- console.info('removeOsAccount successfully');
- // [StartExclude delete_the_specified_account]
- this.message = 'Successfully deleted system account'
- // [EndExclude delete_the_specified_account]
- }
- });
- // [End delete_the_specified_account]
- }
-
- build() {
- Column() {
- Text(this.message)
- .id('show')
- .fontSize(36)
- .fontWeight(FontWeight.Bold)
- Button($r('app.string.Manager1'))
- .margin(10)
- .id('button1')
- .onClick(() => this.createOsAccount())
- Button($r('app.string.Manager2'))
- .margin(10)
- .id('button2')
- .onClick(() => this.findAllOsAccount())
- Button($r('app.string.Manager3'))
- .margin(10)
- .id('button3')
- .onClick(() => this.findOsAccount())
- Button($r('app.string.Manager4'))
- .margin(10)
- .id('button4')
- .onClick(() => this.changeOsAccountHead())
- Button($r('app.string.Manager5'))
- .margin(10)
- .id('button5')
- .onClick(() => this.changeOsAccountName())
- Button($r('app.string.Manager6'))
- .margin(10)
- .id('button6')
- .onClick(() => this.activateOsAccount())
- Button($r('app.string.Manager7'))
- .margin(10)
- .id('button7')
- .onClick(() => this.deleteOsAccount())
- }
- .height('100%')
- .width('100%')
- }
-}
\ No newline at end of file
diff --git a/Account/SystemAccount/entry/src/main/ets/pages/SystemAccount/UseConstraintManagementSystemAccount.ets b/Account/SystemAccount/entry/src/main/ets/pages/SystemAccount/UseConstraintManagementSystemAccount.ets
deleted file mode 100644
index 47acddffe6e02a003a9b4d7f80c70ede13d369de..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/src/main/ets/pages/SystemAccount/UseConstraintManagementSystemAccount.ets
+++ /dev/null
@@ -1,97 +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 import_system_account_module]
-import { osAccount, BusinessError } from '@kit.BasicServicesKit';
-// [End import_system_account_module]
-import { router } from '@kit.ArkUI';
-
-// [Start obtain_account_single_instance_object]
-let accountManager = osAccount.getAccountManager();
-// [End obtain_account_single_instance_object]
-
-@Entry
-@Component
-struct UseConstraintManagementSystemAccount {
- @State message: string = 'No work done';
-
- private async setOsAccountConstraints(): Promise {
- // [Start constraint_collections]
- let localId: number = 100;
- let constraint: string[] = [ 'constraint.wifi.set' ];
- // [End constraint_collections]
- // [Start system_account_constraint]
- try {
- accountManager.setOsAccountConstraints(localId, constraint, true);
- console.info('setOsAccountConstraints successfully');
- // [StartExclude system_account_constraint]
- this.message = 'Successfully set the constraint list for the specified system account';
- // [EndExclude system_account_constraint]
- } catch (e) {
- const err = e as BusinessError;
- console.error(`setOsAccountConstraints failed, error: code is ${err.code}, message is ${err.message}`);
- // [StartExclude system_account_constraint]
- this.message = 'Failed to set the constraint list for the specified system account';
- // [EndExclude system_account_constraint]
- }
- // [End system_account_constraint]
- }
-
- private async isOsAccountConstraintEnabled(): Promise {
- // [Start specify_the_system_account_id_and_constraint_name]
- let localId: number = 100;
- let constraint: string = 'constraint.wifi.set';
- // [End specify_the_system_account_id_and_constraint_name]
- // [Start check_whether_the_specified_constraint_is_enabled]
- accountManager.isOsAccountConstraintEnabled(localId, constraint).then((isEnabled: boolean) => {
- if (isEnabled) {
- // your business logic
- // [StartExclude check_whether_the_specified_constraint_is_enabled]
- this.message = 'Set the constraint list for the specified system account';
- } else {
- this.message = 'Can not set the constraint list for the specified system account';
- // [EndExclude check_whether_the_specified_constraint_is_enabled]
- }
- });
- // [End check_whether_the_specified_constraint_is_enabled]
- }
-
- build() {
- Column() {
- Text(this.message)
- .id('show')
- .fontSize(36)
- .fontWeight(FontWeight.Bold)
- Button($r('app.string.Use1'))
- .margin(10)
- .id('button1')
- .onClick(() => this.setOsAccountConstraints())
- Button($r('app.string.Use2'))
- .margin(10)
- .id('button2')
- .onClick(() => this.isOsAccountConstraintEnabled())
- Button($r('app.string.Use3'))
- .margin(10)
- .id('button3')
- .onClick(() => {
- router.pushUrl({
- url: 'pages/SystemAccount/ManageSystemAccounts'
- })
- })
- }
- .height('100%')
- .width('100%')
- }
-}
\ No newline at end of file
diff --git a/Account/SystemAccount/entry/src/main/ets/util/CommonButton.ets b/Account/SystemAccount/entry/src/main/ets/util/CommonButton.ets
deleted file mode 100644
index b2d268bf3aec25d2dcec35d282290ebc90d9d7d9..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/src/main/ets/util/CommonButton.ets
+++ /dev/null
@@ -1,45 +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 router from '@ohos.router';
-
-@Component
-export struct CommonButton {
- @State buttonName: string = '';
- @State buttonUrl: string = '';
- @State data: string = '';
-
- build() {
- Text(this.buttonName)
- .id(this.buttonName)
- .padding(px2vp(5))
- .fontSize(px2fp(24))
- .textAlign(TextAlign.Center)
- .backgroundColor(Color.Blue)
- .fontColor(Color.White)
- .borderRadius(5)
- .margin(px2vp(20))
- .padding(px2vp(15))
- .onClick(() => {
- router.pushUrl({
- url: this.buttonUrl,
- params: {
- text: this.data,
- buttonName: this.buttonName
- }
- })
- })
- }
-}
\ No newline at end of file
diff --git a/Account/SystemAccount/entry/src/main/module.json5 b/Account/SystemAccount/entry/src/main/module.json5
deleted file mode 100644
index 73b404544611ddb2ce8c9fdb145596f9f80195ab..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/src/main/module.json5
+++ /dev/null
@@ -1,72 +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",
- "requestPermissions": [{
- "name": "ohos.permission.MANAGE_LOCAL_ACCOUNTS"
- },
- {
- "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION"
- }],
- "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": [
- "action.system.home"
- ]
- }
- ]
- }
- ],
- "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/Account/SystemAccount/entry/src/main/resources/base/element/color.json b/Account/SystemAccount/entry/src/main/resources/base/element/color.json
deleted file mode 100644
index d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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/Account/SystemAccount/entry/src/main/resources/base/element/string.json b/Account/SystemAccount/entry/src/main/resources/base/element/string.json
deleted file mode 100644
index a6934d02eacecd5cbad2c08b2e1223f1727fab26..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "module description"
- },
- {
- "name": "EntryAbility_desc",
- "value": "description"
- },
- {
- "name": "EntryAbility_label",
- "value": "system account"
- },
- {
- "name": "Manager1",
- "value": "Create system account"
- },
- {
- "name": "Manager2",
- "value": "Query all system accounts"
- },
- {
- "name": "Manager3",
- "value": "Query specified system account information"
- },
- {
- "name": "Manager4",
- "value": "Modify system account avatar"
- },
- {
- "name": "Manager5",
- "value": "Modify system account nickname"
- },
- {
- "name": "Manager6",
- "value": "Activate system account"
- },
- {
- "name": "Manager7",
- "value": "Delete system account"
- },
- {
- "name": "Use1",
- "value": "Set the constraint list for the specified system account"
- },
- {
- "name": "Use2",
- "value": "Determine if the specified constraint for the target system account is enabled"
- },
- {
- "name": "Use3",
- "value": "Go to ManageSystem"
- }
- ]
-}
\ No newline at end of file
diff --git a/Account/SystemAccount/entry/src/main/resources/base/media/background.png b/Account/SystemAccount/entry/src/main/resources/base/media/background.png
deleted file mode 100644
index f939c9fa8cc8914832e602198745f592a0dfa34d..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/entry/src/main/resources/base/media/background.png and /dev/null differ
diff --git a/Account/SystemAccount/entry/src/main/resources/base/media/foreground.png b/Account/SystemAccount/entry/src/main/resources/base/media/foreground.png
deleted file mode 100644
index 4483ddad1f079e1089d685bd204ee1cfe1d01902..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/entry/src/main/resources/base/media/foreground.png and /dev/null differ
diff --git a/Account/SystemAccount/entry/src/main/resources/base/media/layered_image.json b/Account/SystemAccount/entry/src/main/resources/base/media/layered_image.json
deleted file mode 100644
index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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/Account/SystemAccount/entry/src/main/resources/base/media/startIcon.png b/Account/SystemAccount/entry/src/main/resources/base/media/startIcon.png
deleted file mode 100644
index 205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/entry/src/main/resources/base/media/startIcon.png and /dev/null differ
diff --git a/Account/SystemAccount/entry/src/main/resources/base/profile/backup_config.json b/Account/SystemAccount/entry/src/main/resources/base/profile/backup_config.json
deleted file mode 100644
index d742c2f96e7dd0f406f499941f3147345e998f95..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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/Account/SystemAccount/entry/src/main/resources/base/profile/main_pages.json b/Account/SystemAccount/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100644
index 01e59d474ed71c8ce240b7b0e4c5bde146e57a3f..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/src/main/resources/base/profile/main_pages.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "src": [
- "pages/Index",
- "pages/SystemAccount/ManageSystemAccounts",
- "pages/SystemAccount/UseConstraintManagementSystemAccount"
- ]
-}
diff --git a/Account/SystemAccount/entry/src/main/resources/dark/element/color.json b/Account/SystemAccount/entry/src/main/resources/dark/element/color.json
deleted file mode 100644
index 438d5bc43bb23c59c210d586b96635a72da5b64a..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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/Account/SystemAccount/entry/src/mock/mock-config.json5 b/Account/SystemAccount/entry/src/mock/mock-config.json5
deleted file mode 100644
index b9a78e201535765168a92d3543c690273ecdc019..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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/Account/SystemAccount/entry/src/ohosTest/ets/test/Ability.test.ets b/Account/SystemAccount/entry/src/ohosTest/ets/test/Ability.test.ets
deleted file mode 100644
index 9ca272522bf3b12990942f335f7240a4d2c6ce3e..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/entry/src/ohosTest/ets/test/Ability.test.ets
+++ /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.
- */
-
-import { describe, it, expect } from '@ohos/hypium';
-// 导入测试依赖kit
-import { abilityDelegatorRegistry, Driver, ON } from '@kit.TestKit';
-import { UIAbility, Want } from '@kit.AbilityKit';
-
-const delegator: abilityDelegatorRegistry.AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator();
-const bundleName = abilityDelegatorRegistry.getArguments().bundleName;
-function sleep(time: number) {
- return new Promise((resolve: Function) => setTimeout(resolve, time));
-}
-export default function abilityTest() {
- describe('ActsAbilityTest', () => {
- /*
- * 打开应用,依次点击页面中按钮
- * 使用系统账号接口功能
- */
- it('UseConstraintManagementSystemAccountExample',0, async (done: Function) => {
- console.info("uitest: TestUiExample begin");
- const want: Want = {
- bundleName: bundleName,
- abilityName: 'EntryAbility'
- }
- await delegator.startAbility(want);
- await sleep(1000);
- const ability: UIAbility = await delegator.getCurrentTopAbility();
- console.info("get top ability");
- expect(ability.context.abilityInfo.name).assertEqual('EntryAbility');
- const driver = Driver.create();
- await driver.delayMs(1000);
-
- const button1 = await driver.findComponent(ON.id('UseConstraintManagementSystemAccount'));
- await button1.click();
- await driver.delayMs(1000);
-
- const button2 = await driver.findComponent(ON.id('button1'));
- await button2.click();
- await driver.delayMs(1000);
- const text = await driver.findComponent(ON.id('show'));
- let content1: string = await text.getText();
- expect(content1).assertEqual('Successfully set the constraint list for the specified system account');
-
- const button3 = await driver.findComponent(ON.id('button2'));
- await button3.click();
- await driver.delayMs(1000);
- let content2: string = await text.getText();
- expect(content2).assertEqual('Set the constraint list for the specified system account');
-
- const button4 = await driver.findComponent(ON.id('button3'));
- await button4.click();
- await driver.delayMs(1000);
-
- const button5 = await driver.findComponent(ON.id('button1'));
- await button5.click();
- await driver.delayMs(10000);
- const text2 = await driver.findComponent(ON.id('show'));
- let content3: string = await text2.getText();
- expect(content3).assertEqual('Account creation successful. Account name: "Bob"');
-
- const button6 = await driver.findComponent(ON.id('button2'));
- await button6.click();
- await driver.delayMs(1000);
- let content4: string = await text2.getText();
- expect(content4).assertEqual('Query account successful. Account name:"user"');
-
- const button7 = await driver.findComponent(ON.id('button3'));
- await button7.click();
- await driver.delayMs(1000);
- let content5: string = await text2.getText();
- expect(content5).assertEqual('Query account successful. Account name for account 100: "user"');
-
- const button8 = await driver.findComponent(ON.id('button4'));
- await button8.click();
- await driver.delayMs(1000);
- let content6: string = await text2.getText();
- expect(content6).assertEqual('Successfully updated system account avatar');
-
- const button9 = await driver.findComponent(ON.id('button5'));
- await button9.click();
- await driver.delayMs(1000);
- let content7: string = await text2.getText();
- expect(content7).assertEqual('Successfully modified system account name');
-
- const button10 = await driver.findComponent(ON.id('button7'));
- await button10.click();
- await driver.delayMs(10000);
- let content8: string = await text2.getText();
- expect(content8).assertEqual('Successfully deleted system account');
- done();
- console.info("uitest: TestUiExample end");
- })
- })
-}
\ No newline at end of file
diff --git a/Account/SystemAccount/entry/src/ohosTest/ets/test/List.test.ets b/Account/SystemAccount/entry/src/ohosTest/ets/test/List.test.ets
deleted file mode 100644
index 1eac52fcebe8958e19a7b8fed2e8f39c520a3e42..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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/Account/SystemAccount/entry/src/ohosTest/module.json5 b/Account/SystemAccount/entry/src/ohosTest/module.json5
deleted file mode 100644
index 9983b2ba4e55e31a172f0328c82c9a75bfa00ded..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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/Account/SystemAccount/entry/src/test/List.test.ets b/Account/SystemAccount/entry/src/test/List.test.ets
deleted file mode 100644
index f1186b1f53c3a70930921c5dbd1417332bec56c9..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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/Account/SystemAccount/entry/src/test/LocalUnit.test.ets b/Account/SystemAccount/entry/src/test/LocalUnit.test.ets
deleted file mode 100644
index 7fc57c77dbf76d8df08a2b802a55b948e3fcf968..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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/Account/SystemAccount/hvigor/hvigor-config.json5 b/Account/SystemAccount/hvigor/hvigor-config.json5
deleted file mode 100644
index cef74543b1f97c82275e4bf3434b162395bff2eb..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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": "5.0.1",
- "dependencies": {
- },
- "execution": {
- // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | 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 */
- },
- "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/Account/SystemAccount/hvigorfile.ts b/Account/SystemAccount/hvigorfile.ts
deleted file mode 100644
index 2a5e543f190732c159beb574dfc9fa37bc94e156..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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. */
-}
diff --git a/Account/SystemAccount/oh-package.json5 b/Account/SystemAccount/oh-package.json5
deleted file mode 100644
index eaef52736f22c14e04fca386ba01611ab32a7e4a..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/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": "5.0.1",
- "description": "Please describe the basic information.",
- "dependencies": {
- },
- "devDependencies": {
- "@ohos/hypium": "1.0.19",
- "@ohos/hamock": "1.0.0"
- }
-}
diff --git a/Account/SystemAccount/ohosTest.md b/Account/SystemAccount/ohosTest.md
deleted file mode 100644
index 8d85ddec9590bb6f96f95f53b8305fed0420df88..0000000000000000000000000000000000000000
--- a/Account/SystemAccount/ohosTest.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# SystemAccount 测试用例归档
-
-## 用例表
-
-| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 |
-| ---------------------------------- | -------------------------------------------- | ---------------------------------------- | -------------------------------------------- | -------- | -------- |
-| 拉起应用 | 设备正常运行 | | 成功拉起应用 | 是 | Pass |
-| Set the constraint list for the specified system account | 位于UseConstraintManagementSystemAccount页面 | 点击'Set the constraint list for the specified system account' | 页面显示“Successfully set the constraint list for the specified system account” | 是 | Pass |
-| Determine if the specified constraint for the target system account is enabled | 位于UseConstraintManagementSystemAccount页面 | 点击'Determine if the specified constraint for the target system account is enabled' | 页面显示“Set the constraint list for the specified system account” | 是 | Pass |
-| Create system account | 位于ManageSystemAccounts页面 | 点击'Create system account' | 页面显示“Account creation successful. Account name:: "Bob"” | 是 | Pass |
-| Query all system accounts | 位于ManageSystemAccounts页面 | 点击'Query all system accounts' | 页面显示“Query account successful. Account name:"user"” | 是 | Pass |
-| Query specified system account information | 位于ManageSystemAccounts页面 | 点击'Query specified system account information' | 页面显示“Query account successful. Account name for account 100: "user"” | 是 | Pass |
-| Modify system account avatar | 位于ManageSystemAccounts页面 | 点击'Modify system account avatar' | 页面显示“Successfully updated system account avatar” | 是 | Pass |
-| Modify system account nickname | 位于ManageSystemAccounts页面 | 点击'Modify system account nickname' | 页面显示“Successfully modified system account name” | 是 | Pass |
-| Delete system account | 位于ManageSystemAccounts页面 | 点击'Delete system account' | 页面显示“Successfully deleted system account” | 是 | Pass |
\ No newline at end of file
diff --git a/Account/SystemAccount/screenshots/SystemAccount_1.png b/Account/SystemAccount/screenshots/SystemAccount_1.png
deleted file mode 100644
index 1d7ec794c6292a897740cfcde219814339a3994b..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_1.png and /dev/null differ
diff --git a/Account/SystemAccount/screenshots/SystemAccount_10.png b/Account/SystemAccount/screenshots/SystemAccount_10.png
deleted file mode 100644
index 30e8339df87811f81041e178bdeb09337bd22599..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_10.png and /dev/null differ
diff --git a/Account/SystemAccount/screenshots/SystemAccount_11.png b/Account/SystemAccount/screenshots/SystemAccount_11.png
deleted file mode 100644
index 8931d3c2a129fe1644eecb2b55d9b3a9b21b18d0..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_11.png and /dev/null differ
diff --git a/Account/SystemAccount/screenshots/SystemAccount_2.png b/Account/SystemAccount/screenshots/SystemAccount_2.png
deleted file mode 100644
index 26a2bae68313c755c3d8b380d7571cc5c1903783..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_2.png and /dev/null differ
diff --git a/Account/SystemAccount/screenshots/SystemAccount_3.png b/Account/SystemAccount/screenshots/SystemAccount_3.png
deleted file mode 100644
index b2ebf0788fcecb471818e837027be14b279304f5..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_3.png and /dev/null differ
diff --git a/Account/SystemAccount/screenshots/SystemAccount_4.png b/Account/SystemAccount/screenshots/SystemAccount_4.png
deleted file mode 100644
index 003428c601687fd8d309b94e8d01facb9e671408..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_4.png and /dev/null differ
diff --git a/Account/SystemAccount/screenshots/SystemAccount_5.png b/Account/SystemAccount/screenshots/SystemAccount_5.png
deleted file mode 100644
index b216e3b0281dd34abe0402d5af6f021100c0b4ca..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_5.png and /dev/null differ
diff --git a/Account/SystemAccount/screenshots/SystemAccount_6.png b/Account/SystemAccount/screenshots/SystemAccount_6.png
deleted file mode 100644
index 9f4c4e852eb50d3182412bfaa0a723bd3d33d316..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_6.png and /dev/null differ
diff --git a/Account/SystemAccount/screenshots/SystemAccount_7.png b/Account/SystemAccount/screenshots/SystemAccount_7.png
deleted file mode 100644
index 5137afedc7b49d54f893817ea4093c8e17de2f3c..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_7.png and /dev/null differ
diff --git a/Account/SystemAccount/screenshots/SystemAccount_8.png b/Account/SystemAccount/screenshots/SystemAccount_8.png
deleted file mode 100644
index a743e513d97af5263509b3e8d8dc047b91a8c9e7..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_8.png and /dev/null differ
diff --git a/Account/SystemAccount/screenshots/SystemAccount_9.png b/Account/SystemAccount/screenshots/SystemAccount_9.png
deleted file mode 100644
index dfae1df5d9dcb2ae9c132e6112807ada63eec648..0000000000000000000000000000000000000000
Binary files a/Account/SystemAccount/screenshots/SystemAccount_9.png and /dev/null differ
diff --git a/ArkData/DataShare/ShareConfig/.gitignore b/ArkData/DataShare/ShareConfig/.gitignore
deleted file mode 100644
index d2ff20141ceed86d87c0ea5d99481973005bab2b..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/.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/ArkData/DataShare/ShareConfig/AppScope/app.json5 b/ArkData/DataShare/ShareConfig/AppScope/app.json5
deleted file mode 100644
index e13c309cbfbb7cd269cbe00df46a4f4eacbbfae8..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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.samples.shareconfig",
- "vendor": "example",
- "versionCode": 1000000,
- "versionName": "1.0.0",
- "icon": "$media:layered_image",
- "label": "$string:app_name"
- }
-}
diff --git a/ArkData/DataShare/ShareConfig/AppScope/resources/base/element/string.json b/ArkData/DataShare/ShareConfig/AppScope/resources/base/element/string.json
deleted file mode 100644
index 9e2b32d1fd1fa83462717e748e42341d26fae937..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "ShareConfig"
- }
- ]
-}
diff --git a/ArkData/DataShare/ShareConfig/AppScope/resources/base/media/background.png b/ArkData/DataShare/ShareConfig/AppScope/resources/base/media/background.png
deleted file mode 100644
index 923f2b3f27e915d6871871deea0420eb45ce102f..0000000000000000000000000000000000000000
Binary files a/ArkData/DataShare/ShareConfig/AppScope/resources/base/media/background.png and /dev/null differ
diff --git a/ArkData/DataShare/ShareConfig/AppScope/resources/base/media/foreground.png b/ArkData/DataShare/ShareConfig/AppScope/resources/base/media/foreground.png
deleted file mode 100644
index eb9427585b36d14b12477435b6419d1f07b3e0bb..0000000000000000000000000000000000000000
Binary files a/ArkData/DataShare/ShareConfig/AppScope/resources/base/media/foreground.png and /dev/null differ
diff --git a/ArkData/DataShare/ShareConfig/AppScope/resources/base/media/layered_image.json b/ArkData/DataShare/ShareConfig/AppScope/resources/base/media/layered_image.json
deleted file mode 100644
index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/README_zh.md b/ArkData/DataShare/ShareConfig/README_zh.md
deleted file mode 100644
index d5eb6569b96d6aa070ba1cac23a8d996e8639279..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/README_zh.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# 应用间配置共享 (ArkTS)
-
-## 介绍
-
-本实例主要介绍应用间配置共享通过集中管理公共配置信息,在不同应用间共享配置,提升协作效率。
-
-
-
-- [ 应用间配置共享 (ArkTS)](https://gitcode.com/openharmony/docs/blob/master/zh-cn/application-dev/database/share-config.md)
-
-## 效果预览
-
-| 应用成功启动界面 | 文件访问结果 |
-|---------------------------------------------------|-------------------------------------------------|
-|
|
|
-
-使用说明:
-1.在主界面中通过点击相应的按钮,应用可以完成相应的功能,完成的反馈将如日志的形式出现在主界面的上半部分。
-
-## 工程目录
-
-```
-//应用文件访问
-data
-├──entry/src/main
-| ├──ets
-| | ├──entryability
-| | | └──EntryAbility.ets // 程序入口类
-| | ├──entrybackupability
-| | | └──EntryBackupAbility.ets
-| | └──pages // 页面文件
-| | └──Index.ets // 主界面
-| ├──resources // 资源文件目录
-```
-
-## 具体实现
-
-- **配置发布方(即数据提供方)**:负责提供默认共享配置项,并能动态修改配置项信息。当前支持静态配置和动态配置两种配置方式。
- - **静态配置**:应用包在安装时提供的默认共享配置项(不依赖应用启动即生效)。
- - **动态配置**:配置发布方通过调用相关接口可以动态新增、删除或修改配置项(不依赖应用升级)。
-
-- 配置的新建、更新、读取、订阅配置变化与取消订阅的使用的功能函数都集成在[Index.ets](entry/src/main/ets/pages/Index.ets)文件中。
-
- - 接口请参考:[@ohos.data.dataShare](https://gitcode.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkdata/js-apis-data-dataShare.md)
-
-- 一个应用最多可以发布32个配置项,这个数量是静态配置与动态配置的总和。
-
-- 配置项中的allowlist使用的是appIdentifier,详见[什么是appIdentifier](https://gitcode.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/common_problem_of_application.md#%E4%BB%80%E4%B9%88%E6%98%AFappidentifier)
-
-## 相关权限
-
-无
-
-## 依赖
-
-不涉及
-
-## 约束与限制
-
-1.本示例仅支持标准系统上运行,支持设备:RK3568。
-
-2.本示例为Stage模型,支持API20版本SDK,版本号:6.0.0.47,镜像版本号:OpenHarmony 6.0.0.47。
-
-3.本示例需要使用DevEco Studio 6.0.0 Release (构建版本:6.0.0.858,构建 2025年9月24日)及以上版本才可编译运行。
-
-
-## 下载
-
-如需单独下载本工程,执行如下命令
-
-```
-git init
-git config core.sparsecheckout true
-echo code/DocsSample/ArkData/DataShare/ShareConfig > .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/ArkData/DataShare/ShareConfig/build-profile.json5 b/ArkData/DataShare/ShareConfig/build-profile.json5
deleted file mode 100644
index c613d78e4c8b6e5e1aada4ab5bf618bfc748ed1d..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/build-profile.json5
+++ /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.
- */
-
-{
- "app": {
- "products": [
- {
- "name": "default",
- "signingConfig": "default",
- "targetSdkVersion": "6.0.0(20)",
- "compatibleSdkVersion": "6.0.0(20)",
- "runtimeOS": "HarmonyOS",
- "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/ArkData/DataShare/ShareConfig/code-linter.json5 b/ArkData/DataShare/ShareConfig/code-linter.json5
deleted file mode 100644
index ed05653cca31b61d64cf6471529eaf50d4f70709..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/.gitignore b/ArkData/DataShare/ShareConfig/entry/.gitignore
deleted file mode 100644
index e2713a2779c5a3e0eb879efe6115455592caeea5..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/entry/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-/node_modules
-/oh_modules
-/.preview
-/build
-/.cxx
-/.test
\ No newline at end of file
diff --git a/ArkData/DataShare/ShareConfig/entry/build-profile.json5 b/ArkData/DataShare/ShareConfig/entry/build-profile.json5
deleted file mode 100644
index 1d2fc52afb11467a138506d8509a3ca2c123707e..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/entry/build-profile.json5
+++ /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.
- */
-
-{
- "apiType": "stageMode",
- "buildOption": {
- "resOptions": {
- "copyCodeResource": {
- "enable": false
- }
- }
- },
- "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/ArkData/DataShare/ShareConfig/entry/hvigorfile.ts b/ArkData/DataShare/ShareConfig/entry/hvigorfile.ts
deleted file mode 100644
index cfa8a00f74f409d9647f55cdf270ab6aec69fe41..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/obfuscation-rules.txt b/ArkData/DataShare/ShareConfig/entry/obfuscation-rules.txt
deleted file mode 100644
index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/oh-package.json5 b/ArkData/DataShare/ShareConfig/entry/oh-package.json5
deleted file mode 100644
index 4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/entry/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": "entry",
- "version": "1.0.0",
- "description": "Please describe the basic information.",
- "main": "",
- "author": "",
- "license": "",
- "dependencies": {}
-}
-
diff --git a/ArkData/DataShare/ShareConfig/entry/src/main/ets/entryability/EntryAbility.ets b/ArkData/DataShare/ShareConfig/entry/src/main/ets/entryability/EntryAbility.ets
deleted file mode 100644
index 6a95f638674014a6d6088fb8a25f00854a309e53..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/ArkData/DataShare/ShareConfig/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets
deleted file mode 100644
index 1fca37ecc34e1079aaf6557f1272cd694aa0068c..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/src/main/ets/pages/Index.ets b/ArkData/DataShare/ShareConfig/entry/src/main/ets/pages/Index.ets
deleted file mode 100644
index d73a5f78878d9cdb7ab3ec1f2c72db9a27f9c4f1..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/entry/src/main/ets/pages/Index.ets
+++ /dev/null
@@ -1,200 +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 { dataShare } from '@kit.ArkData';
-import { BusinessError } from '@kit.BasicServicesKit';
-
-// [Start publish_shared_config]
-function publishSharedConfig() {
- dataShare.createDataProxyHandle().then((dataProxyHandle) => {
- const newConfigData: dataShare.ProxyData[] = [
- {
- uri: 'datashareproxy://com.samples.shareconfig/config1',
- value: 'Value1',
- allowList: [
- 'appIdentifier1',
- 'appIdentifier2'
- ]
- },
- {
- uri: 'datashareproxy://com.samples.shareconfig/config2',
- value: 'Value2',
- allowList: [
- 'appIdentifier3',
- 'appIdentifier4'
- ]
- }
- ];
- const config: dataShare.DataProxyConfig = {
- type: dataShare.DataProxyType.SHARED_CONFIG,
- };
- dataProxyHandle.publish(newConfigData, config).then((results: dataShare.DataProxyResult[]) => {
- results.forEach((result) => {
- console.info(`URI: ${result.uri}, Result: ${result.result}`);
- });
- }).catch((error: BusinessError) => {
- console.error('Error publishing config:', error);
- });
- }).catch((error: BusinessError) => {
- console.error('Error creating DataProxyHandle:', error);
- });
-}
-
-// [End publish_shared_config]
-
-// [Start delete_shared_config]
-function deleteSharedConfig() {
- dataShare.createDataProxyHandle().then((dataProxyHandle) => {
- const urisToDelete: string[] = [
- 'datashareproxy://com.samples.shareconfig/config1',
- 'datashareproxy://com.samples.shareconfig/config2'
- ];
- const config: dataShare.DataProxyConfig = {
- type: dataShare.DataProxyType.SHARED_CONFIG,
- };
- dataProxyHandle.delete(urisToDelete, config).then((results: dataShare.DataProxyResult[]) => {
- results.forEach((result) => {
- console.info(`URI: ${result.uri}, Result: ${result.result}`);
- });
- }).catch((error: BusinessError) => {
- console.error('Error deleting config:', error);
- });
- }).catch((error: BusinessError) => {
- console.error('Error creating DataProxyHandle:', error);
- });
-}
-
-// [End delete_shared_config]
-
-// [Start get_shared_config]
-function getSharedConfig() {
- dataShare.createDataProxyHandle().then((dataProxyHandle) => {
- const urisToGet: string[] = [
- 'datashareproxy://com.samples.shareconfig/config1',
- 'datashareproxy://com.samples.shareconfig/config2'
- ];
- const config: dataShare.DataProxyConfig = {
- type: dataShare.DataProxyType.SHARED_CONFIG,
- };
- dataProxyHandle.get(urisToGet, config).then((results: dataShare.DataProxyGetResult[]) => {
- results.forEach((result) => {
- console.info(`URI: ${result.uri}, Result: ${result.result}, AllowList: ${result.allowList}`);
- });
- }).catch((error: BusinessError) => {
- console.error('Error getting config:', error);
- });
- }).catch((error: BusinessError) => {
- console.error('Error creating DataProxyHandle:', error);
- });
-}
-
-// [End get_shared_config]
-
-// [Start watch_shared_config]
-function watchConfigChanges() {
- dataShare.createDataProxyHandle().then((dsProxyHelper) => {
- const uris: string[] = [
- 'datashareproxy://com.samples.shareconfig/config1',
- 'datashareproxy://com.samples.shareconfig/config2'
- ];
- const config: dataShare.DataProxyConfig = {
- type: dataShare.DataProxyType.SHARED_CONFIG,
- };
- const callback = (err: BusinessError, changes: dataShare.DataProxyChangeInfo[]): void => {
- if (err) {
- console.error('err:', err);
- } else {
- changes.forEach((change) => {
- console.info(`Change Type: ${change.type}, URI: ${change.uri}, Value: ${change.value}`);
- });
- }
- };
- // 监听配置变化
- const listenResults: dataShare.DataProxyResult[] = dsProxyHelper.on('dataChange', uris, config, callback);
- listenResults.forEach((result) => {
- console.info(`URI: ${result.uri}, Result: ${result.result}`);
- });
- // 取消监听配置变化
- const unListenResults: dataShare.DataProxyResult[] = dsProxyHelper.off('dataChange', uris, config, callback);
- unListenResults.forEach((result) => {
- console.info(`URI: ${result.uri}, Result: ${result.result}`);
- });
- }).catch((error: BusinessError) => {
- console.error('Error creating DataProxyHandle:', error);
- });
-}
-
-// [End watch_shared_config]
-
-
-@Entry
-@Component
-struct Index {
- @State message: string = '';
-
- build() {
- Column() {
- TextArea({
- text: this.message,
- placeholder: '',
- })
- .width('100%')
- .height('50%');
- Row() {
- Button($r('app.string.publishSharedConfig'))
- .onClick(() => {
- publishSharedConfig();
- console.info('publishSharedConfig SUCCESS');
- this.message += 'publishSharedConfig SUCCESS' + '\n';
- })
- .margin({ top: 20 })
- .width('60%');
- };
-
- Row() {
- Button($r('app.string.deleteSharedConfig'))
- .onClick(() => {
- deleteSharedConfig();
- console.info('deleteSharedConfig SUCCESS');
- this.message += 'deleteSharedConfig SUCCESS' + '\n';
- })
- .margin({ top: 20 })
- .width('60%');
- };
-
- Row() {
- Button($r('app.string.getSharedConfig'))
- .onClick(() => {
- getSharedConfig();
- console.info('getSharedConfig SUCCESS');
- this.message += 'getSharedConfig SUCCESS' + '\n';
- })
- .margin({ top: 20 })
- .width('60%');
- };
-
- Row() {
- Button($r('app.string.watchConfigChanges'))
- .onClick(() => {
- watchConfigChanges();
- console.info('watchConfigChanges SUCCESS');
- this.message += 'watchConfigChanges SUCCESS' + '\n';
- })
- .margin({ top: 20 })
- .width('60%');
- };
- };
- }
-}
\ No newline at end of file
diff --git a/ArkData/DataShare/ShareConfig/entry/src/main/module.json5 b/ArkData/DataShare/ShareConfig/entry/src/main/module.json5
deleted file mode 100644
index e93dadfa773b13cd6a84d2a3916544f4e6e22766..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/entry/src/main/module.json5
+++ /dev/null
@@ -1,65 +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": [
- "phone"
- ],
- "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"
- }
- ],
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/element/color.json b/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/element/color.json
deleted file mode 100644
index d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/element/float.json b/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/element/float.json
deleted file mode 100644
index a8a5d404dcd8b0466194afc3aa25d90a8a327470..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/element/string.json b/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/element/string.json
deleted file mode 100644
index f40149a13cc6e8c6e9b1a50dc079c84f892e6074..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "module description"
- },
- {
- "name": "EntryAbility_desc",
- "value": "description"
- },
- {
- "name": "EntryAbility_label",
- "value": "label"
- },
- {
- "name": "publishSharedConfig",
- "value": "发布或修改配置项"
- },
- {
- "name": "deleteSharedConfig",
- "value": "删除配置项"
- },
- {
- "name": "getSharedConfig",
- "value": "获取配置项信息"
- },
- {
- "name": "watchConfigChanges",
- "value": "监听/取消监听配置变化"
- }
- ]
-}
\ No newline at end of file
diff --git a/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/background.png b/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/background.png
deleted file mode 100644
index 923f2b3f27e915d6871871deea0420eb45ce102f..0000000000000000000000000000000000000000
Binary files a/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/background.png and /dev/null differ
diff --git a/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/foreground.png b/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/foreground.png
deleted file mode 100644
index 97014d3e10e5ff511409c378cd4255713aecd85f..0000000000000000000000000000000000000000
Binary files a/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/foreground.png and /dev/null differ
diff --git a/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/layered_image.json b/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/layered_image.json
deleted file mode 100644
index fb49920440fb4d246c82f9ada275e26123a2136a..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/startIcon.png b/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/startIcon.png
deleted file mode 100644
index 205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b..0000000000000000000000000000000000000000
Binary files a/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/media/startIcon.png and /dev/null differ
diff --git a/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/profile/backup_config.json b/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/profile/backup_config.json
deleted file mode 100644
index d742c2f96e7dd0f406f499941f3147345e998f95..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/profile/main_pages.json b/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100644
index 1898d94f58d6128ab712be2c68acc7c98e9ab9ce..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/entry/src/main/resources/base/profile/main_pages.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "src": [
- "pages/Index"
- ]
-}
diff --git a/ArkData/DataShare/ShareConfig/entry/src/main/resources/dark/element/color.json b/ArkData/DataShare/ShareConfig/entry/src/main/resources/dark/element/color.json
deleted file mode 100644
index 438d5bc43bb23c59c210d586b96635a72da5b64a..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/src/ohosTest/ets/test/Ability.test.ets b/ArkData/DataShare/ShareConfig/entry/src/ohosTest/ets/test/Ability.test.ets
deleted file mode 100644
index b3f044b3a9458b54af9a1c95483cc7588073d9f0..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/entry/src/ohosTest/ets/test/Ability.test.ets
+++ /dev/null
@@ -1,279 +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';
-import { abilityDelegatorRegistry, Component, Driver, ON, } from '@kit.TestKit';
-
-import { dataShare } from '@kit.ArkData';
-import { BusinessError } from '@kit.BasicServicesKit';
-import { UIAbility, Want } from '@kit.AbilityKit';
-
-let TAG = 'SharedConfigPublishTest ';
-const DELAY_TIME = 1500; // delay time 1.5 second
-
-const delegator = abilityDelegatorRegistry.getAbilityDelegator();
-const bundleName = abilityDelegatorRegistry.getArguments().bundleName;
-const abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator();
-
-const newConfigData: dataShare.ProxyData[] = [
- {
- uri: 'datashareproxy://com.samples.shareconfig/config1',
- value: 'Value1',
- allowList: [
- 'appIdentifier1',
- 'appIdentifier2'
- ]
- },
- {
- uri: 'datashareproxy://com.samples.shareconfig/config2',
- value: 'Value2',
- allowList: [
- 'appIdentifier3',
- 'appIdentifier4'
- ]
- }
-];
-
-async function getResourceString(resource: Resource): Promise {
- let manage = abilityDelegator.getAppContext().resourceManager;
- let text = await manage.getStringValue(resource);
- return text;
-}
-
-export default function abilityTest() {
- describe('ActsAbilityTest', () => {
- 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.
- });
-
- /**
- * @tc.number StartAbility_001
- * @tc.name StartAbility_001
- * @tc.desc 启动Ability
- */
- it('StartAbility_001', 0, async (done: Function) => {
- console.info(TAG + 'StartAbility_001 begin');
- const want: Want = {
- bundleName: bundleName,
- abilityName: 'EntryAbility'
- };
-
- await delegator.startAbility(want);
- let driver: Driver = Driver.create();
- await driver.delayMs(DELAY_TIME);
- const ability: UIAbility = await delegator.getCurrentTopAbility();
- console.info(TAG + 'get top ability');
- expect(ability.context.abilityInfo.name).assertEqual('EntryAbility');
- done();
- console.info(TAG + 'StartAbility_001 end');
- });
-
- /**
- * @tc.number SharedConfigPublishTest001
- * @tc.name SharedConfigPublishTest001
- * @tc.desc 发布指定配置项
- */
- it('SharedConfigPublishTest001', 0, async (done: Function) => {
- console.info(TAG + 'SharedConfigPublishTest001 start');
- let str = await getResourceString($r('app.string.publishSharedConfig'));
- let driver: Driver = Driver.create();
- await driver.assertComponentExist(ON.text(str));
- let button: Component = await driver.findComponent(ON.text(str));
- await button.click();
- await driver.delayMs(DELAY_TIME);
- // publishSharedConfig();
-
- // get config published before
- let testUri1 = 'datashareproxy://com.samples.shareconfig/config1';
- let urisToGet = [testUri1];
- let config: dataShare.DataProxyConfig = {
- type: dataShare.DataProxyType.SHARED_CONFIG
- };
- let expectedValue = 'Value1';
- let expectedAllowList = [
- 'appIdentifier1',
- 'appIdentifier2'
- ];
- try {
- dataShare.createDataProxyHandle().then((dataProxyHandle) => {
- dataProxyHandle!.get(urisToGet, config).then(results => {
- expect(results.length).assertEqual(urisToGet.length);
- expect(results[0].uri).assertEqual(testUri1);
- expect(results[0].result).assertEqual(dataShare.DataProxyErrorCode.SUCCESS);
- expect(results[0].value).assertEqual(expectedValue);
- // expect(results[0].allowList).assertEqual(expectedAllowList);
- }).catch((err: BusinessError) => {
- console.error(TAG + 'SharedConfigGetTest001 failed.code =' + err.code + ', message=' + err.message);
- expect().assertFail();
- });
- });
- } catch (err) {
- console.error(TAG + 'SharedConfigGetTest001 failed,code =' + err.code + ',message=' + err.message);
- expect().assertFail();
- }
- done();
- console.info(TAG + 'SharedConfigPublishTest001 end');
- });
-
- /**
- * @tc.number SharedConfigDeleteTest001
- * @tc.name SharedConfigDeleteTest001
- * @tc.desc 删除配置项
- */
- it('SharedConfigDeleteTest001', 0, async (done: Function) => {
- console.info(TAG + 'SharedConfigDeleteTest001 start');
-
- let testUri1 = 'datashareproxy://com.samples.shareconfig/config1';
- let urisToGet = [testUri1];
- let config: dataShare.DataProxyConfig = {
- type: dataShare.DataProxyType.SHARED_CONFIG
- };
-
- try {
- let dataProxyHandle = await dataShare.createDataProxyHandle();
- // publish config at first
- dataProxyHandle.publish(newConfigData, config).then((results: dataShare.DataProxyResult[]) => {
- results.forEach((result) => {
- console.info(`URI: ${result.uri}, Result: ${result.result}`);
- });
- }).catch((error: BusinessError) => {
- console.error('Error publishing config:', error);
- });
- // get button
- let str = await getResourceString($r('app.string.deleteSharedConfig'));
- let driver: Driver = Driver.create();
- await driver.assertComponentExist(ON.text(str));
- let button: Component = await driver.findComponent(ON.text(str));
- // click button and wait
- await button.click();
- await driver.delayMs(DELAY_TIME);
-
- // get return uri exist
- dataProxyHandle!.get(urisToGet, config).then(results => {
- expect(results.length).assertEqual(urisToGet.length);
- expect(results[0].uri).assertEqual(testUri1);
- expect(results[0].result).assertEqual(dataShare.DataProxyErrorCode.URI_NOT_EXIST);
- expect(results[0].value).assertEqual(undefined);
- expect(results[0].allowList).assertEqual(undefined);
- }).catch((err: BusinessError) => {
- console.error(TAG + 'SharedConfigDeleteTest001 failed.code =' + err.code + ', message=' + err.message);
- expect().assertFail();
- });
- } catch (err) {
- console.error(TAG + 'SharedConfigDeleteTest001 failed,code =' + err.code + ',message=' + err.message);
- expect().assertFail();
- }
- done();
- console.info(TAG + 'SharedConfigDeleteTest001 end');
- });
-
- /**
- * @tc.number SharedConfigGetTest001
- * @tc.name SharedConfigGetTest001
- * @tc.desc 获取配置项信息
- */
- it('SharedConfigGetTest001', 0, async (done: Function) => {
- console.info(TAG + 'SharedConfigGetTest001 start');
-
- let testUri1 = 'datashareproxy://com.samples.shareconfig/config1';
- let urisToGet = [testUri1];
- let config: dataShare.DataProxyConfig = {
- type: dataShare.DataProxyType.SHARED_CONFIG
- };
-
- try {
- let dataProxyHandle = await dataShare.createDataProxyHandle();
- // publish config at first
- dataProxyHandle.publish(newConfigData, config).then((results: dataShare.DataProxyResult[]) => {
- expect(results.length).assertEqual(newConfigData.length);
- expect(results[0].uri).assertEqual(testUri1);
- expect(results[0].result).assertEqual(dataShare.DataProxyErrorCode.SUCCESS);
- results.forEach((result) => {
- console.info(`URI: ${result.uri}, Result: ${result.result}`);
- });
- }).catch((error: BusinessError) => {
- console.error('Error publishing config:', error);
- });
-
- // get button
- let str = await getResourceString($r('app.string.getSharedConfig'));
- let driver: Driver = Driver.create();
- await driver.assertComponentExist(ON.text(str));
- let button: Component = await driver.findComponent(ON.text(str));
- // click button and wait
- await button.click();
- await driver.delayMs(DELAY_TIME);
- } catch (err) {
- console.error(TAG + 'SharedConfigGetTest001 failed,code =' + err.code + ',message=' + err.message);
- expect().assertFail();
- }
- done();
- console.info(TAG + 'SharedConfigGetTest001 end');
- });
-
- /**
- * @tc.number WatchSharedConfigChangeTest001
- * @tc.name WatchSharedConfigChangeTest001
- * @tc.desc 监听与取消监听配置变化
- */
- it('WatchSharedConfigChangeTest001', 0, async (done: Function) => {
- console.info(TAG + 'WatchSharedConfigChangeTest001 start');
-
- let config: dataShare.DataProxyConfig = {
- type: dataShare.DataProxyType.SHARED_CONFIG
- };
-
- try {
- let dataProxyHandle = await dataShare.createDataProxyHandle();
- // publish config at first
- dataProxyHandle.publish(newConfigData, config).then((results: dataShare.DataProxyResult[]) => {
- results.forEach((result) => {
- console.info(`URI: ${result.uri}, Result: ${result.result}`);
- });
- }).catch((error: BusinessError) => {
- console.error('Error publishing config:', error);
- });
- // get button
- let str = await getResourceString($r('app.string.watchConfigChanges'));
- let driver: Driver = Driver.create();
- await driver.assertComponentExist(ON.text(str));
- let button: Component = await driver.findComponent(ON.text(str));
- // click button and wait
- await button.click();
- await driver.delayMs(DELAY_TIME);
- } catch (err) {
- console.error(TAG + 'WatchSharedConfigChangeTest001 failed,code =' + err.code + ',message=' + err.message);
- expect().assertFail();
- }
- done();
- console.info(TAG + 'WatchSharedConfigChangeTest001 end');
- });
- });
-}
\ No newline at end of file
diff --git a/ArkData/DataShare/ShareConfig/entry/src/ohosTest/ets/test/List.test.ets b/ArkData/DataShare/ShareConfig/entry/src/ohosTest/ets/test/List.test.ets
deleted file mode 100644
index 1eac52fcebe8958e19a7b8fed2e8f39c520a3e42..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/src/ohosTest/module.json5 b/ArkData/DataShare/ShareConfig/entry/src/ohosTest/module.json5
deleted file mode 100644
index 32cf39532cec143354a4814c46c160e70f607411..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/entry/src/ohosTest/module.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.
- */
-
-{
- "module": {
- "name": "entry_test",
- "type": "feature",
- "deviceTypes": [
- "phone"
- ],
- "deliveryWithInstall": true,
- "installationFree": false
- }
-}
diff --git a/ArkData/DataShare/ShareConfig/entry/src/test/List.test.ets b/ArkData/DataShare/ShareConfig/entry/src/test/List.test.ets
deleted file mode 100644
index f1186b1f53c3a70930921c5dbd1417332bec56c9..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/entry/src/test/LocalUnit.test.ets b/ArkData/DataShare/ShareConfig/entry/src/test/LocalUnit.test.ets
deleted file mode 100644
index 7fc57c77dbf76d8df08a2b802a55b948e3fcf968..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/hvigor/hvigor-config.json5 b/ArkData/DataShare/ShareConfig/hvigor/hvigor-config.json5
deleted file mode 100644
index e0c92fdad58a7851692e144df9a4b1f4953ec26c..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/hvigorfile.ts b/ArkData/DataShare/ShareConfig/hvigorfile.ts
deleted file mode 100644
index e3340f07e45ddc5dcadbb87012668555def2e6e0..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/oh-package.json5 b/ArkData/DataShare/ShareConfig/oh-package.json5
deleted file mode 100644
index 34a126da756d306c9412997bcd7d57a34b6da0a2..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/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/ArkData/DataShare/ShareConfig/ohosTest.md b/ArkData/DataShare/ShareConfig/ohosTest.md
deleted file mode 100644
index 7899c1f056754ed8a6b3107864e8032b6046f0ea..0000000000000000000000000000000000000000
--- a/ArkData/DataShare/ShareConfig/ohosTest.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# 测试用例归档
-
-## 用例表
-
-| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 |
-|-------------|--------|----|--------------------------------------|------|------|
-| 发布或修改指定配置项 | 设备正常运行 | | 日志中输出publishSharedConfig SUCCESS | 是 | pass |
-| 删除指定配置项 | 设备正常运行 | | 日志中输出deleteSharedConfig SUCCESS | 是 | pass |
-| 获取配置项信息 | 设备正常运行 | | 日志中输出readWriteFileWithStream SUCCESS | 是 | pass |
-| 监听/取消监听配置变化 | 设备正常运行 | | 日志中输出watchConfigChanges SUCCESS | 是 | pass |
diff --git a/ArkData/DataShare/ShareConfig/screenshots/end.png b/ArkData/DataShare/ShareConfig/screenshots/end.png
deleted file mode 100644
index 774f7826d633664c2f24d0f12071d5d20c8413dc..0000000000000000000000000000000000000000
Binary files a/ArkData/DataShare/ShareConfig/screenshots/end.png and /dev/null differ
diff --git a/ArkData/DataShare/ShareConfig/screenshots/start.png b/ArkData/DataShare/ShareConfig/screenshots/start.png
deleted file mode 100644
index a7efe9e62ab79de3512b54a83314589c371f2c05..0000000000000000000000000000000000000000
Binary files a/ArkData/DataShare/ShareConfig/screenshots/start.png and /dev/null differ
diff --git a/ArkGraphics2D/DisplaySoloist/.gitignore b/ArkGraphics2D/DisplaySoloist/.gitignore
deleted file mode 100644
index ea27eaff8c3ecef3e9ebe6399a5f9073cd962a7b..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/.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/ArkGraphics2D/DisplaySoloist/AppScope/app.json5 b/ArkGraphics2D/DisplaySoloist/AppScope/app.json5
deleted file mode 100644
index feca14423759e8b0358a04fa19b0917d01b6da04..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/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.Displaysoloist",
- "vendor": "example",
- "versionCode": 1000000,
- "versionName": "1.0.0",
- "icon": "$media:app_icon",
- "label": "$string:app_name"
- }
-}
diff --git a/ArkGraphics2D/DisplaySoloist/AppScope/resources/base/element/string.json b/ArkGraphics2D/DisplaySoloist/AppScope/resources/base/element/string.json
deleted file mode 100644
index 8f27bbd6363b153e19eb343ee29e37f4a2813c8e..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "DisplaySoloist"
- }
- ]
-}
diff --git a/ArkGraphics2D/DisplaySoloist/AppScope/resources/base/media/app_icon.png b/ArkGraphics2D/DisplaySoloist/AppScope/resources/base/media/app_icon.png
deleted file mode 100644
index a39445dc87828b76fed6d2ec470dd455c45319e3..0000000000000000000000000000000000000000
Binary files a/ArkGraphics2D/DisplaySoloist/AppScope/resources/base/media/app_icon.png and /dev/null differ
diff --git a/ArkGraphics2D/DisplaySoloist/README.md b/ArkGraphics2D/DisplaySoloist/README.md
deleted file mode 100644
index d23435ceb2a2786987178d32abae11223ab7e6dc..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/README.md
+++ /dev/null
@@ -1,83 +0,0 @@
-# DisplaySoloist分级管控
-
-### 介绍
-
-本示例通过 DisplaySoloist 系列功能,使用 UI 外的线程对 XComponent 的绘制内容,设置开发者所期望的帧率。使用 [NativeDisplaySoloist](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/displaysoloist-native-guidelines) 和 [Drawing](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/graphic-drawing-overview) 来实现图像绘制和显示。
-
-### 效果预览
-
-| XComponent |
-| :------------------------------------------------------: |
-|
|
-
-使用说明
-
-1.进入 XComponent 页面,依次点击“**Start**”,三个方块分别按照 30Hz、60Hz、120Hz 移动;点击“**Stop**”动画停止。
-
-### 工程目录
-
-```
-├──entry/src/main
-│ ├──cpp // C++代码区
-│ │ ├──CMakeLists.txt // CMake配置文件
-│ │ ├──napi_init.cpp // Napi模块注册
-│ │ ├──common
-│ │ │ └──log_common.h // 日志封装定义文件
-│ │ ├──plugin // 生命周期管理模块
-│ │ │ ├──plugin_manager.cpp
-│ │ │ └──plugin_manager.h
-│ │ ├──samples // samples渲染模块
-│ │ │ ├──sample_xcomponent.cpp
-│ │ │ └──sample_xcomponent.h
-│ ├──ets // ets代码区
-│ │ ├──entryability
-│ │ │ ├──EntryAbility.ts // 程序入口类
-| | | └──EntryAbility.ets
-| | ├──interface
-│ │ │ └──XComponentContext.ts // XComponentContext
-│ │ ├──pages // 页面文件
-│ │ | └──Index.ets // XComponent页面
-│ │ ├──utils // 工具类
-| ├──resources // 资源文件目录
-```
-
-### 具体实现
-
-* XComponent:通过在 IDE 中的 Native C++ 工程,在 TS 侧中声明对外接口为 register、unregister 以及 destroy;在 C++ 侧调用 NativeDisplaySoloist 分级管控接口,并在使用 drawing 来绘制期望帧率图像。
-
- | 接口名 | 描述 |
- | ------------------------------------------- | --------------------------------------------------- |
- | OH_DisplaySoloist_Create | 创建一个OH_DisplaySoloist实例 |
- | OH_DisplaySoloist_Destroy | 销毁一个OH_DisplaySoloist实例 |
- | OH_DisplaySoloist_Start | 设置每帧回调函数,每次vsync信号到来时启动每帧回调 |
- | OH_DisplaySoloist_Stop | 停止请求下一次vsync信号,并停止调用回调函数callback |
- | OH_DisplaySoloist_SetExpectedFrameRateRange | 设置期望帧率范围 |
-
-
-### 相关权限
-
-不涉及。
-
-### 依赖
-
-不涉及。
-
-### 约束与限制
-
-1.本示例仅支持在标准系统上运行;
-
-2.本示例为 Stage 模型,已适配 API version 14 版本 SDK,SDK 版本号(API Version 14 5.0.2.57);
-
-3.本示例需要使用 DevEco Studio 版本号(5.0.5.306)及以上版本才可编译运行。
-
-### 下载
-
-如需单独下载本工程,执行如下命令:
-
-```
-git init
-git config core.sparsecheckout true
-echo ArkGraphics2D/DisplaySoloist/ > .git/info/sparse-checkout
-git remote add origin https://gitee.com/harmonyos_samples/guide-snippets.git
-git pull origin master
-```
\ No newline at end of file
diff --git a/ArkGraphics2D/DisplaySoloist/build-profile.json5 b/ArkGraphics2D/DisplaySoloist/build-profile.json5
deleted file mode 100644
index ee9f710ef18f2965ae1469bdb5d65f02591834f5..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/build-profile.json5
+++ /dev/null
@@ -1,42 +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",
- "compatibleSdkVersion": "5.0.2(14)",
- "targetSdkVersion": "5.0.2(14)",
- "runtimeOS": "HarmonyOS"
- }
- ]
- },
- "modules": [
- {
- "name": "entry",
- "srcPath": "./entry",
- "targets": [
- {
- "name": "default",
- "applyToProducts": [
- "default"
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/ArkGraphics2D/DisplaySoloist/code-linter.json5 b/ArkGraphics2D/DisplaySoloist/code-linter.json5
deleted file mode 100644
index 44d50304643a42f437232b908c9b44c51cea8f60..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/code-linter.json5
+++ /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.
- */
-{
- "files": [
- "**/*.ets"
- ],
- "ignore": [
- "**/src/ohosTest/**/*",
- "**/src/test/**/*",
- "**/src/mock/**/*",
- "**/node_modules/**/*",
- "**/oh_modules/**/*",
- "**/build/**/*",
- "**/.preview/**/*"
- ],
- "ruleSet": [
- "plugin:@performance/recommended",
- "plugin:@typescript-eslint/recommended"
- ],
- "rules": {
- }
-}
\ No newline at end of file
diff --git a/ArkGraphics2D/DisplaySoloist/entry/.gitignore b/ArkGraphics2D/DisplaySoloist/entry/.gitignore
deleted file mode 100644
index eadab4e1522296628f32a70228b2c758ecab4759..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/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/ArkGraphics2D/DisplaySoloist/entry/build-profile.json5 b/ArkGraphics2D/DisplaySoloist/entry/build-profile.json5
deleted file mode 100644
index 98128447b577770b257af752b1d5e91c850f64f4..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/entry/build-profile.json5
+++ /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.
- */
-{
- "apiType": "stageMode",
- "buildOption": {
- "externalNativeOptions": {
- "path": "./src/main/cpp/CMakeLists.txt",
- "arguments": "",
- "cppFlags": "",
- }
- },
- "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/ArkGraphics2D/DisplaySoloist/entry/hvigorfile.ts b/ArkGraphics2D/DisplaySoloist/entry/hvigorfile.ts
deleted file mode 100644
index 90e5d264bb75363bfb6969f0b832c2f1b9a02a75..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/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. */
-}
diff --git a/ArkGraphics2D/DisplaySoloist/entry/obfuscation-rules.txt b/ArkGraphics2D/DisplaySoloist/entry/obfuscation-rules.txt
deleted file mode 100644
index 272efb6ca3f240859091bbbfc7c5802d52793b0b..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/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/ArkGraphics2D/DisplaySoloist/entry/oh-package.json5 b/ArkGraphics2D/DisplaySoloist/entry/oh-package.json5
deleted file mode 100644
index 5b21e253af246edab8b6ef4f10938f4417e8bc25..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/entry/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": "entry",
- "version": "1.0.0",
- "description": "Please describe the basic information.",
- "main": "",
- "author": "",
- "license": "",
- "dependencies": {
- "libentry.so": "file:./src/main/cpp/types/libentry"
- }
-}
\ No newline at end of file
diff --git a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/CMakeLists.txt b/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/CMakeLists.txt
deleted file mode 100644
index 0e5253594a889deea00f2e32cdc8cff59ca626a7..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-# the minimum version of CMake.
-cmake_minimum_required(VERSION 3.5.0)
-project(drawing_test)
-
-set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
-
-include_directories(${NATIVERENDER_ROOT_PATH}
- ${NATIVERENDER_ROOT_PATH}/include)
-
-add_library(entry SHARED
- napi_init.cpp
- samples/sample_xcomponent.cpp
- plugin/plugin_manager.cpp
-)
-find_library(
- # Sets the name of the path variable.
- hilog-lib
- # Specifies the name of the NDK library that
- # you want CMake to locate.
- hilog_ndk.z
-)
-target_link_libraries(entry PUBLIC ${hilog-lib})
-target_link_libraries(entry PUBLIC libace_napi.z.so libnative_drawing.so libnative_window.so libace_ndk.z.so libnative_display_soloist.so)
\ No newline at end of file
diff --git a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/common/log_common.h b/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/common/log_common.h
deleted file mode 100644
index db232e78289ae5cddb36f10c8e98b389d19b0a47..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/common/log_common.h
+++ /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.
- */
-#ifndef LOG_COMMON_H
-#define LOG_COMMON_H
-#include
-#define LOG_PRINT_DOMAIN 0xFF00
-#define APP_LOG_DOMAIN 0x0001
-constexpr const char *APP_LOG_TAG = "DisplaySoloistSample";
-#define SAMPLE_LOGI(...) ((void)OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, APP_LOG_TAG, __VA_ARGS__))
-#define SAMPLE_LOGD(...) ((void)OH_LOG_Print(LOG_APP, LOG_DEBUG, LOG_DOMAIN, APP_LOG_TAG, __VA_ARGS__))
-#define SAMPLE_LOGW(...) ((void)OH_LOG_Print(LOG_APP, LOG_WARN, LOG_DOMAIN, APP_LOG_TAG, __VA_ARGS__))
-#define SAMPLE_LOGE(...) ((void)OH_LOG_Print(LOG_APP, LOG_ERROR, LOG_DOMAIN, APP_LOG_TAG, __VA_ARGS__))
-
-#endif // LOG_COMMON_H
diff --git a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/napi_init.cpp b/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/napi_init.cpp
deleted file mode 100644
index 43e51b0018c9d42e3e9831a4953e3ef1b3eee3c0..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/napi_init.cpp
+++ /dev/null
@@ -1,39 +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
-#include "napi/native_api.h"
-#include "common/log_common.h"
-#include "plugin/plugin_manager.h"
-
-EXTERN_C_START
-static napi_value Init(napi_env env, napi_value exports)
-{
- SAMPLE_LOGI("napi init");
- PluginManager::GetInstance()->Export(env, exports);
- 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",
- .nm_priv = ((void *)0),
- .reserved = {0},
-};
-
-extern "C" __attribute__((constructor)) void RegisterEntryModule(void) { napi_module_register(&demoModule); }
diff --git a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/plugin/plugin_manager.cpp b/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/plugin/plugin_manager.cpp
deleted file mode 100644
index b71c471ab9250ce025eba9f2f0a561960adb6c58..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/plugin/plugin_manager.cpp
+++ /dev/null
@@ -1,122 +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
-#include
-#include
-#include
-#include "common/log_common.h"
-#include "plugin_manager.h"
-
-PluginManager *PluginManager::GetInstance()
-{
- static PluginManager pluginManager;
- return &pluginManager;
-}
-
-PluginManager::~PluginManager()
-{
- SAMPLE_LOGI("~PluginManager");
- for (auto iter = nativeXComponentMap_.begin(); iter != nativeXComponentMap_.end(); ++iter) {
- if (iter->second != nullptr) {
- delete iter->second;
- iter->second = nullptr;
- }
- }
- nativeXComponentMap_.clear();
-
- for (auto iter = pluginRenderMap_.begin(); iter != pluginRenderMap_.end(); ++iter) {
- if (iter->second != nullptr) {
- delete iter->second;
- iter->second = nullptr;
- }
- }
- pluginRenderMap_.clear();
-}
-
-// [Start display_soloist_export_api]
-void PluginManager::Export(napi_env env, napi_value exports)
-{
- nativeXComponentMap_.clear();
- pluginRenderMap_.clear();
- if ((env == nullptr) || (exports == nullptr)) {
- SAMPLE_LOGE("Export: env or exports is null");
- return;
- }
-
- napi_value exportInstance = nullptr;
- if (napi_get_named_property(env, exports, OH_NATIVE_XCOMPONENT_OBJ, &exportInstance) != napi_ok) {
- SAMPLE_LOGE("Export: napi_get_named_property fail");
- return;
- }
-
- OH_NativeXComponent *nativeXComponent = nullptr;
- if (napi_unwrap(env, exportInstance, reinterpret_cast(&nativeXComponent)) != napi_ok) {
- SAMPLE_LOGE("Export: napi_unwrap fail");
- return;
- }
-
- char idStr[OH_XCOMPONENT_ID_LEN_MAX + 1] = {'\0'};
- uint64_t idSize = OH_XCOMPONENT_ID_LEN_MAX + 1;
- if (OH_NativeXComponent_GetXComponentId(nativeXComponent, idStr, &idSize) != OH_NATIVEXCOMPONENT_RESULT_SUCCESS) {
- SAMPLE_LOGE("Export: OH_NativeXComponent_GetXComponentId fail");
- return;
- }
-
- std::string id(idStr);
- auto context = PluginManager::GetInstance();
- if ((context != nullptr) && (nativeXComponent != nullptr)) {
- context->SetNativeXComponent(id, nativeXComponent);
- auto render = context->GetRender(id);
- if (render != nullptr) {
- render->RegisterCallback(nativeXComponent);
- render->Export(env, exports);
- } else {
- SAMPLE_LOGE("render is nullptr");
- }
- }
-}
-// [End display_soloist_export_api]
-
-void PluginManager::SetNativeXComponent(std::string &id, OH_NativeXComponent *nativeXComponent)
-{
- SAMPLE_LOGI("set native xComponent, ID = %{public}s.", id.c_str());
- if (nativeXComponent == nullptr) {
- SAMPLE_LOGE("xcomponent null");
- return;
- }
-
- if (nativeXComponentMap_.find(id) == nativeXComponentMap_.end()) {
- nativeXComponentMap_[id] = nativeXComponent;
- return;
- }
-
- if (nativeXComponentMap_[id] != nativeXComponent) {
- OH_NativeXComponent *tmp = nativeXComponentMap_[id];
- delete tmp;
- tmp = nullptr;
- nativeXComponentMap_[id] = nativeXComponent;
- }
-}
-
-SampleXComponent *PluginManager::GetRender(std::string &id)
-{
- if (pluginRenderMap_.find(id) == pluginRenderMap_.end()) {
- SampleXComponent *instance = SampleXComponent::GetInstance(id);
- pluginRenderMap_[id] = instance;
- return instance;
- }
- return pluginRenderMap_[id];
-}
diff --git a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/plugin/plugin_manager.h b/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/plugin/plugin_manager.h
deleted file mode 100644
index 0c323bb130ada5130718aea50a50c6c5789e3904..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/plugin/plugin_manager.h
+++ /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.
- */
-#ifndef PLUGIN_MANAGER_H
-#define PLUGIN_MANAGER_H
-
-#include
-#include
-#include
-#include
-#include
-#include "samples/sample_xcomponent.h"
-
-// [Start display_soloist_create_plugin_manager]
-class PluginManager {
-public:
- ~PluginManager();
-
- static PluginManager *GetInstance();
-
- void SetNativeXComponent(std::string &id, OH_NativeXComponent *nativeXComponent);
- SampleXComponent *GetRender(std::string &id);
- void Export(napi_env env, napi_value exports);
-
-private:
- std::unordered_map nativeXComponentMap_;
- std::unordered_map pluginRenderMap_;
-};
-// [End display_soloist_create_plugin_manager]
-#endif // PLUGIN_MANAGER_H
diff --git a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/samples/sample_xcomponent.cpp b/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/samples/sample_xcomponent.cpp
deleted file mode 100644
index 464f21b74af20dcae486375cd16e4c928a9bd56f..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/samples/sample_xcomponent.cpp
+++ /dev/null
@@ -1,473 +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
-#include
-#include
-#include
-#include "common/log_common.h"
-#include "sample_xcomponent.h"
-
-static std::unordered_map g_displaySync;
-
-static void OnSurfaceCreatedCB(OH_NativeXComponent *component, void *window)
-{
- SAMPLE_LOGI("OnSurfaceCreatedCB");
- if ((component == nullptr) || (window == nullptr)) {
- SAMPLE_LOGE("OnSurfaceCreatedCB: component or window is null");
- return;
- }
- char idStr[OH_XCOMPONENT_ID_LEN_MAX + 1] = {'\0'};
- uint64_t idSize = OH_XCOMPONENT_ID_LEN_MAX + 1;
- if (OH_NativeXComponent_GetXComponentId(component, idStr, &idSize) != OH_NATIVEXCOMPONENT_RESULT_SUCCESS) {
- SAMPLE_LOGE("OnSurfaceCreatedCB: Unable to get XComponent id");
- return;
- }
- std::string id(idStr);
- auto render = SampleXComponent::GetInstance(id);
- OHNativeWindow *nativeWindow = static_cast(window);
- render->SetNativeWindow(nativeWindow);
-
- uint64_t width;
- uint64_t height;
- int32_t xSize = OH_NativeXComponent_GetXComponentSize(component, window, &width, &height);
- if ((xSize == OH_NATIVEXCOMPONENT_RESULT_SUCCESS) && (render != nullptr)) {
- render->SetHeight(height);
- render->SetWidth(width);
- SAMPLE_LOGI("xComponent width = %{public}llu, height = %{public}llu", width, height);
- }
-}
-
-static void OnSurfaceDestroyedCB(OH_NativeXComponent *component, void *window)
-{
- SAMPLE_LOGI("OnSurfaceDestroyedCB");
- if ((component == nullptr) || (window == nullptr)) {
- SAMPLE_LOGE("OnSurfaceDestroyedCB: component or window is null");
- return;
- }
- char idStr[OH_XCOMPONENT_ID_LEN_MAX + 1] = {'\0'};
- uint64_t idSize = OH_XCOMPONENT_ID_LEN_MAX + 1;
- if (OH_NativeXComponent_GetXComponentId(component, idStr, &idSize) != OH_NATIVEXCOMPONENT_RESULT_SUCCESS) {
- SAMPLE_LOGE("OnSurfaceDestroyedCB: Unable to get XComponent id");
- return;
- }
- std::string id(idStr);
- SampleXComponent::Release(id);
-}
-
-// [Start display_soloist_frame_rate_setting_and_subscription_function_registration]
-static void TestCallback(long long timestamp, long long targetTimestamp, void *data)
-{
- SAMPLE_LOGI("test callback timestamp = %{public}llu, ", timestamp);
- OH_NativeXComponent *component = nullptr;
- component = static_cast(data);
- if (component == nullptr) {
- SAMPLE_LOGE("TestCallback: component is null");
- return;
- }
-
- char idStr[OH_XCOMPONENT_ID_LEN_MAX + 1] = {'\0'};
- uint64_t idSize = OH_XCOMPONENT_ID_LEN_MAX + 1;
- if (OH_NativeXComponent_GetXComponentId(component, idStr, &idSize) != OH_NATIVEXCOMPONENT_RESULT_SUCCESS) {
- SAMPLE_LOGE("TestCallback: Unable to get XComponent id");
- return;
- }
-
- std::string id(idStr);
- auto render = SampleXComponent::GetInstance(id);
- OHNativeWindow *nativeWindow = render->GetNativeWindow();
- uint64_t width;
- uint64_t height;
-
- int32_t xSize = OH_NativeXComponent_GetXComponentSize(component, nativeWindow, &width, &height);
- if ((xSize == OH_NATIVEXCOMPONENT_RESULT_SUCCESS) && (render != nullptr)) {
- render->Prepare();
- render->Create();
- if (id == "xcomponentId_30") {
- int offset = 16;
- render->ConstructPath(offset, offset, render->defaultOffsetY);
- }
- if (id == "xcomponentId_120") {
- int offset = 4;
- render->ConstructPath(offset, offset, render->defaultOffsetY);
- }
- render->SetPenAndBrush();
- render->DrawPath();
- render->DisPlay();
- render->Destroy();
- }
-}
-// [End display_soloist_frame_rate_setting_and_subscription_function_registration]
-
-static std::unordered_map g_instance;
-
-void SampleXComponent::SetWidth(uint64_t width) { width_ = width; }
-
-void SampleXComponent::SetHeight(uint64_t height) { height_ = height; }
-
-void SampleXComponent::SetNativeWindow(OHNativeWindow *nativeWindow) { nativeWindow_ = nativeWindow; }
-
-OHNativeWindow *SampleXComponent::GetNativeWindow() { return nativeWindow_; }
-
-void SampleXComponent::Prepare()
-{
- if (nativeWindow_ == nullptr) {
- SAMPLE_LOGE("nativeWindow_ is nullptr");
- return;
- }
- int ret = OH_NativeWindow_NativeWindowRequestBuffer(nativeWindow_, &buffer_, &fenceFd_);
- SAMPLE_LOGI("request buffer ret = %{public}d", ret);
- bufferHandle_ = OH_NativeWindow_GetBufferHandleFromNative(buffer_);
- mappedAddr_ = static_cast(
- mmap(bufferHandle_->virAddr, bufferHandle_->size, PROT_READ | PROT_WRITE, MAP_SHARED, bufferHandle_->fd, 0));
- if (mappedAddr_ == MAP_FAILED) {
- SAMPLE_LOGE("mmap failed");
- }
-}
-
-void SampleXComponent::DisPlay()
-{
- void *bitmapAddr = OH_Drawing_BitmapGetPixels(cBitmap_);
- uint32_t *value = static_cast(bitmapAddr);
-
- uint32_t *pixel = static_cast(mappedAddr_);
- if (pixel == nullptr) {
- SAMPLE_LOGE("pixel is null");
- return;
- }
- if (value == nullptr) {
- SAMPLE_LOGE("value is null");
- return;
- }
- for (uint32_t x = 0; x < width_; x++) {
- for (uint32_t y = 0; y < height_; y++) {
- *pixel++ = *value++;
- }
- }
- Region region{nullptr, 0};
- OH_NativeWindow_NativeWindowFlushBuffer(nativeWindow_, buffer_, fenceFd_, region);
- int result = munmap(mappedAddr_, bufferHandle_->size);
- if (result == -1) {
- SAMPLE_LOGE("munmap failed!");
- }
-}
-
-void SampleXComponent::Create()
-{
- uint32_t width = static_cast(bufferHandle_->stride / 4);
- cBitmap_ = OH_Drawing_BitmapCreate();
- OH_Drawing_BitmapFormat cFormat{COLOR_FORMAT_RGBA_8888, ALPHA_FORMAT_OPAQUE};
- OH_Drawing_BitmapBuild(cBitmap_, width, height_, &cFormat);
-
- cCanvas_ = OH_Drawing_CanvasCreate();
- OH_Drawing_CanvasBind(cCanvas_, cBitmap_);
- OH_Drawing_CanvasClear(cCanvas_, OH_Drawing_ColorSetArgb(0xFF, 0xFF, 0xFF, 0xFF));
-}
-
-void SampleXComponent::ConstructPath(int x, int y, int offsetY)
-{
- float offsetOfAy = 100.0;
- float offsetOfCy = 200.0;
-
- aY = offsetOfAy + offsetY;
- cY = offsetOfCy + offsetY;
-
- if (desc) {
- float offset = 1.0;
- aX -= x * offset;
- bX -= x * offset;
- } else {
- float offset = 1.0;
- aX += x * offset;
- bX += x * offset;
- }
-
- if (bX >= width_) {
- desc = true;
- }
-
- if (aX <= 0) {
- desc = false;
- }
-
- float bY = aY;
- float cX = bX;
- float dX = aX;
- float dY = cY;
-
- cPath_ = OH_Drawing_PathCreate();
- OH_Drawing_PathMoveTo(cPath_, aX, aY);
- OH_Drawing_PathLineTo(cPath_, bX, bY);
- OH_Drawing_PathLineTo(cPath_, cX, cY);
- OH_Drawing_PathLineTo(cPath_, dX, dY);
-
- OH_Drawing_PathClose(cPath_);
-}
-
-void SampleXComponent::SetPenAndBrush()
-{
- constexpr float penWidth = 10.0f; // pen width 10
- cPen_ = OH_Drawing_PenCreate();
- OH_Drawing_PenSetAntiAlias(cPen_, true);
- OH_Drawing_PenSetColor(cPen_, OH_Drawing_ColorSetArgb(0xFF, 0xFF, 0x00, 0x00));
- OH_Drawing_PenSetWidth(cPen_, penWidth);
- OH_Drawing_PenSetJoin(cPen_, LINE_ROUND_JOIN);
- OH_Drawing_CanvasAttachPen(cCanvas_, cPen_);
-
- cBrush_ = OH_Drawing_BrushCreate();
- OH_Drawing_BrushSetColor(cBrush_, OH_Drawing_ColorSetArgb(0xFF, 0x00, 0xFF, 0x00));
-
- OH_Drawing_CanvasAttachBrush(cCanvas_, cBrush_);
-}
-
-void SampleXComponent::DrawPath()
-{
- OH_Drawing_CanvasDrawPath(cCanvas_, cPath_);
-}
-
-void ExecuteDisplaySoloist(std::string id, DisplaySoloist_ExpectedRateRange range, bool useExclusiveThread,
- OH_NativeXComponent *nativeXComponent)
-{
- OH_DisplaySoloist *nativeDisplaySoloist = nullptr;
- if (g_displaySync.find(id) == g_displaySync.end()) {
- g_displaySync[id] = OH_DisplaySoloist_Create(useExclusiveThread);
- }
- nativeDisplaySoloist = g_displaySync[id];
- OH_DisplaySoloist_SetExpectedFrameRateRange(nativeDisplaySoloist, &range);
- OH_DisplaySoloist_Start(nativeDisplaySoloist, TestCallback, nativeXComponent);
-}
-
-// [Start display_soloist_napi_register]
-napi_value SampleXComponent::NapiRegister(napi_env env, napi_callback_info info)
-{
- SAMPLE_LOGI("NapiRegister");
- if ((env == nullptr) || (info == nullptr)) {
- SAMPLE_LOGE("NapiRegister: env or info is null");
- return nullptr;
- }
-
- napi_value thisArg;
- if (napi_get_cb_info(env, info, nullptr, nullptr, &thisArg, nullptr) != napi_ok) {
- SAMPLE_LOGE("NapiRegister: napi_get_cb_info fail");
- return nullptr;
- }
-
- napi_value exportInstance;
- if (napi_get_named_property(env, thisArg, OH_NATIVE_XCOMPONENT_OBJ, &exportInstance) != napi_ok) {
- SAMPLE_LOGE("NapiRegister: napi_get_named_property fail");
- return nullptr;
- }
-
- OH_NativeXComponent *nativeXComponent = nullptr;
- if (napi_unwrap(env, exportInstance, reinterpret_cast(&nativeXComponent)) != napi_ok) {
- SAMPLE_LOGE("NapiRegister: napi_unwrap fail");
- return nullptr;
- }
-
- char idStr[OH_XCOMPONENT_ID_LEN_MAX + 1] = {'\0'};
- uint64_t idSize = OH_XCOMPONENT_ID_LEN_MAX + 1;
- if (OH_NativeXComponent_GetXComponentId(nativeXComponent, idStr, &idSize) != OH_NATIVEXCOMPONENT_RESULT_SUCCESS) {
- SAMPLE_LOGE("NapiRegister: Unable to get XComponent id");
- return nullptr;
- }
- SAMPLE_LOGI("RegisterID = %{public}s", idStr);
- std::string id(idStr);
- SampleXComponent *render = SampleXComponent().GetInstance(id);
- if (render != nullptr) {
- DisplaySoloist_ExpectedRateRange range;
- bool useExclusiveThread = false;
- if (id == "xcomponentId30") {
- range = {30, 120, 30};
- }
-
- if (id == "xcomponentId120") {
- range = {30, 120, 120};
- }
- ExecuteDisplaySoloist(id, range, useExclusiveThread, nativeXComponent);
- }
- return nullptr;
-}
-// [End display_soloist_napi_register]
-
-napi_value SampleXComponent::NapiUnregister(napi_env env, napi_callback_info info)
-{
- SAMPLE_LOGI("NapiUnregister");
- if ((env == nullptr) || (info == nullptr)) {
- SAMPLE_LOGE("NapiUnregister: env or info is null");
- return nullptr;
- }
-
- napi_value thisArg;
- if (napi_get_cb_info(env, info, nullptr, nullptr, &thisArg, nullptr) != napi_ok) {
- SAMPLE_LOGE("NapiUnregister: napi_get_cb_info fail");
- return nullptr;
- }
-
- napi_value exportInstance;
- if (napi_get_named_property(env, thisArg, OH_NATIVE_XCOMPONENT_OBJ, &exportInstance) != napi_ok) {
- SAMPLE_LOGE("NapiUnregister: napi_get_named_property fail");
- return nullptr;
- }
-
- OH_NativeXComponent *nativeXComponent = nullptr;
- if (napi_unwrap(env, exportInstance, reinterpret_cast(&nativeXComponent)) != napi_ok) {
- SAMPLE_LOGE("NapiUnregister: napi_unwrap fail");
- return nullptr;
- }
-
- char idStr[OH_XCOMPONENT_ID_LEN_MAX + 1] = {'\0'};
- uint64_t idSize = OH_XCOMPONENT_ID_LEN_MAX + 1;
- if (OH_NativeXComponent_GetXComponentId(nativeXComponent, idStr, &idSize) != OH_NATIVEXCOMPONENT_RESULT_SUCCESS) {
- SAMPLE_LOGE("NapiUnregister: Unable to get XComponent id");
- return nullptr;
- }
- SAMPLE_LOGI("ID = %{public}s", idStr);
- std::string id(idStr);
- SampleXComponent *render = SampleXComponent().GetInstance(id);
- if (render != nullptr) {
- OH_DisplaySoloist_Stop(g_displaySync[id]);
- SAMPLE_LOGI("NapiUnregister executed");
- } else {
- SAMPLE_LOGE("render is nullptr");
- }
- return nullptr;
-}
-
-napi_value SampleXComponent::NapiDestroy(napi_env env, napi_callback_info info)
-{
- SAMPLE_LOGI("NapiUnregister");
- if ((env == nullptr) || (info == nullptr)) {
- SAMPLE_LOGE("NapiDestroy: env or info is null");
- return nullptr;
- }
-
- napi_value thisArg;
- if (napi_get_cb_info(env, info, nullptr, nullptr, &thisArg, nullptr) != napi_ok) {
- SAMPLE_LOGE("NapiDestroy: napi_get_cb_info fail");
- return nullptr;
- }
-
- napi_value exportInstance;
- if (napi_get_named_property(env, thisArg, OH_NATIVE_XCOMPONENT_OBJ, &exportInstance) != napi_ok) {
- SAMPLE_LOGE("NapiDestroy: napi_get_named_property fail");
- return nullptr;
- }
-
- OH_NativeXComponent *nativeXComponent = nullptr;
- if (napi_unwrap(env, exportInstance, reinterpret_cast(&nativeXComponent)) != napi_ok) {
- SAMPLE_LOGE("NapiDestroy: napi_unwrap fail");
- return nullptr;
- }
-
- char idStr[OH_XCOMPONENT_ID_LEN_MAX + 1] = {'\0'};
- uint64_t idSize = OH_XCOMPONENT_ID_LEN_MAX + 1;
- if (OH_NativeXComponent_GetXComponentId(nativeXComponent, idStr, &idSize) != OH_NATIVEXCOMPONENT_RESULT_SUCCESS) {
- SAMPLE_LOGE("NapiDestroy: Unable to get XComponent id");
- return nullptr;
- }
- SAMPLE_LOGI("ID = %{public}s", idStr);
- std::string id(idStr);
- SampleXComponent *render = SampleXComponent().GetInstance(id);
- if (render != nullptr) {
- OH_DisplaySoloist_Destroy(g_displaySync[id]);
- g_displaySync.erase(id);
- SAMPLE_LOGI("NapiUnregister executed");
- } else {
- SAMPLE_LOGE("render is nullptr");
- }
- return nullptr;
-}
-
-SampleXComponent::~SampleXComponent()
-{
- OH_Drawing_BrushDestroy(cBrush_);
- cBrush_ = nullptr;
- OH_Drawing_PenDestroy(cPen_);
- cPen_ = nullptr;
- OH_Drawing_PathDestroy(cPath_);
- cPath_ = nullptr;
- OH_Drawing_CanvasDestroy(cCanvas_);
- cCanvas_ = nullptr;
- OH_Drawing_BitmapDestroy(cBitmap_);
- cBitmap_ = nullptr;
-
- buffer_ = nullptr;
- bufferHandle_ = nullptr;
- nativeWindow_ = nullptr;
- mappedAddr_ = nullptr;
-}
-
-void SampleXComponent::Destroy()
-{
- OH_Drawing_BrushDestroy(cBrush_);
- cBrush_ = nullptr;
- OH_Drawing_PenDestroy(cPen_);
- cPen_ = nullptr;
- OH_Drawing_PathDestroy(cPath_);
- cPath_ = nullptr;
- OH_Drawing_CanvasDestroy(cCanvas_);
- cCanvas_ = nullptr;
- OH_Drawing_BitmapDestroy(cBitmap_);
- cBitmap_ = nullptr;
-}
-
-void SampleXComponent::Release(std::string &id)
-{
- SampleXComponent *render = SampleXComponent::GetInstance(id);
- if (render != nullptr) {
- delete render;
- render = nullptr;
- g_instance.erase(g_instance.find(id));
- }
-}
-
-void SampleXComponent::Export(napi_env env, napi_value exports)
-{
- if ((env == nullptr) || (exports == nullptr)) {
- SAMPLE_LOGE("Export: env or exports is null");
- return;
- }
- napi_property_descriptor desc[] = {
- {"register", nullptr, SampleXComponent::NapiRegister, nullptr, nullptr, nullptr, napi_default, nullptr},
- {"unregister", nullptr, SampleXComponent::NapiUnregister, nullptr, nullptr, nullptr, napi_default, nullptr},
- {"destroy", nullptr, SampleXComponent::NapiDestroy, nullptr, nullptr, nullptr, napi_default, nullptr}};
-
- napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc);
- if (napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc) != napi_ok) {
- SAMPLE_LOGE("Export: napi_define_properties failed");
- }
-}
-
-void SampleXComponent::RegisterCallback(OH_NativeXComponent *nativeXComponent)
-{
- SAMPLE_LOGI("register callback");
- renderCallback_.OnSurfaceCreated = OnSurfaceCreatedCB;
- renderCallback_.OnSurfaceDestroyed = OnSurfaceDestroyedCB;
- // Callback must be initialized
- renderCallback_.DispatchTouchEvent = nullptr;
- renderCallback_.OnSurfaceChanged = nullptr;
- OH_NativeXComponent_RegisterCallback(nativeXComponent, &renderCallback_);
-}
-
-SampleXComponent *SampleXComponent::GetInstance(std::string &id)
-{
- if (g_instance.find(id) == g_instance.end()) {
- SampleXComponent *render = new SampleXComponent(id);
- g_instance[id] = render;
- return render;
- } else {
- return g_instance[id];
- }
-}
\ No newline at end of file
diff --git a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/samples/sample_xcomponent.h b/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/samples/sample_xcomponent.h
deleted file mode 100644
index 9ced152ef6a1c5ad7d19ed8ac8b41d123042e26f..0000000000000000000000000000000000000000
--- a/ArkGraphics2D/DisplaySoloist/entry/src/main/cpp/samples/sample_xcomponent.h
+++ /dev/null
@@ -1,87 +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 SAMPLE_XCOMPONENT_H
-#define SAMPLE_XCOMPONENT_H
-// [Start display_soloist_import_module]
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include