From f5b87fe9bd142bf8d811b43be4d0042ff4609c69 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Wed, 4 Jun 2025 21:19:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan --- .../Account/DomainAccount/README.md | 2 +- .../DomainAccount/entry/src/main/module.json5 | 5 +- .../ManageDistributedAccount/README.md | 2 +- .../entry/src/main/module.json5 | 5 +- .../ManageSystemAccountCredentials/README.md | 2 +- .../entry/src/main/module.json5 | 5 +- .../ManagerApplicationAccount/README.md | 2 +- .../entry/src/main/module.json5 | 5 +- .../Account/SystemAccount/README.md | 2 +- .../SystemAccount/entry/src/main/module.json5 | 5 +- .../src/main/module.json5 | 4 +- .../InheritedfromnonAbility.ets | 56 ++++++++++++++++++ .../NocalculationsupportAbility.ets | 56 ++++++++++++++++++ .../main/resources/base/element/color.json | 8 +++ .../main/resources/base/element/string.json | 16 ++++++ .../resources/base/profile/backup_config.json | 3 + .../resources/base/profile/main_pages.json | 5 ++ .../main/resources/dark/element/color.json | 8 +++ .../NotallowedInsideAbility.ets | 57 +++++++++++++++++++ .../VariablenotsupportedAbility.ets | 57 +++++++++++++++++++ .../main/resources/base/element/color.json | 8 +++ .../main/resources/base/element/string.json | 16 ++++++ .../resources/base/profile/main_pages.json | 5 ++ .../VariablesupportAbility.ets | 57 +++++++++++++++++++ .../ScrollableComponent/README_zh.md | 2 +- .../entry2/src/main/module.json5 | 4 +- .../entry2/src/main/ets/pages/Index.ets | 2 +- .../entry1/src/main/module.json5 | 2 +- .../entry/src/main/module.json5 | 5 +- .../entry1/src/main/module.json5 | 2 +- .../main/resources/base/element/string.json | 4 -- .../main/resources/base/element/string.json | 4 -- 32 files changed, 376 insertions(+), 40 deletions(-) create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/inheritedfromnon/src/main/ets/inheritedfromnonability/InheritedfromnonAbility.ets create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/ets/nocalculationsupportability/NocalculationsupportAbility.ets create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/element/color.json create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/element/string.json create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/profile/backup_config.json create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/profile/main_pages.json create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/dark/element/color.json create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/notallowedInside/src/main/ets/notallowedinsideability/NotallowedInsideAbility.ets create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/ets/variablenotsupportedability/VariablenotsupportedAbility.ets create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/element/color.json create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/element/string.json create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/profile/main_pages.json create mode 100644 code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablesupport/src/main/ets/variablesupportability/VariablesupportAbility.ets diff --git a/code/DocsSample/Account/DomainAccount/README.md b/code/DocsSample/Account/DomainAccount/README.md index df95cacd34..30bf03fedd 100644 --- a/code/DocsSample/Account/DomainAccount/README.md +++ b/code/DocsSample/Account/DomainAccount/README.md @@ -75,7 +75,7 @@ entry/src/ 1.本示例仅支持标准系统上运行, 支持设备:RK3568。 -2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 +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)及以上版本才可编译运行。 diff --git a/code/DocsSample/Account/DomainAccount/entry/src/main/module.json5 b/code/DocsSample/Account/DomainAccount/entry/src/main/module.json5 index 269eca939a..dcdeb019cb 100755 --- a/code/DocsSample/Account/DomainAccount/entry/src/main/module.json5 +++ b/code/DocsSample/Account/DomainAccount/entry/src/main/module.json5 @@ -20,9 +20,8 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "phone", - "tablet", - "2in1" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/code/DocsSample/Account/ManageDistributedAccount/README.md b/code/DocsSample/Account/ManageDistributedAccount/README.md index 1bfe0aeada..1b2394ac51 100644 --- a/code/DocsSample/Account/ManageDistributedAccount/README.md +++ b/code/DocsSample/Account/ManageDistributedAccount/README.md @@ -54,7 +54,7 @@ entry/src/ 1.本示例仅支持标准系统上运行, 支持设备:RK3568。 -2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 +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)及以上版本才可编译运行。 diff --git a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/module.json5 b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/module.json5 index f16c302eb9..5998c54d24 100755 --- a/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/module.json5 +++ b/code/DocsSample/Account/ManageDistributedAccount/entry/src/main/module.json5 @@ -20,9 +20,8 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "phone", - "tablet", - "2in1" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/code/DocsSample/Account/ManageSystemAccountCredentials/README.md b/code/DocsSample/Account/ManageSystemAccountCredentials/README.md index cda2b5fac4..a3a7b77757 100644 --- a/code/DocsSample/Account/ManageSystemAccountCredentials/README.md +++ b/code/DocsSample/Account/ManageSystemAccountCredentials/README.md @@ -63,7 +63,7 @@ entry/src/ 1.本示例仅支持标准系统上运行, 支持设备:RK3568。 -2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 +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)及以上版本才可编译运行。 diff --git a/code/DocsSample/Account/ManageSystemAccountCredentials/entry/src/main/module.json5 b/code/DocsSample/Account/ManageSystemAccountCredentials/entry/src/main/module.json5 index 347fa0676c..344bea5824 100644 --- a/code/DocsSample/Account/ManageSystemAccountCredentials/entry/src/main/module.json5 +++ b/code/DocsSample/Account/ManageSystemAccountCredentials/entry/src/main/module.json5 @@ -20,9 +20,8 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "phone", - "tablet", - "2in1" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/code/DocsSample/Account/ManagerApplicationAccount/README.md b/code/DocsSample/Account/ManagerApplicationAccount/README.md index 0f4ea32c21..d83cb068c9 100755 --- a/code/DocsSample/Account/ManagerApplicationAccount/README.md +++ b/code/DocsSample/Account/ManagerApplicationAccount/README.md @@ -60,7 +60,7 @@ entry/src/ 1.本示例仅支持标准系统上运行, 支持设备:RK3568。 -2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 +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)及以上版本才可编译运行。 diff --git a/code/DocsSample/Account/ManagerApplicationAccount/entry/src/main/module.json5 b/code/DocsSample/Account/ManagerApplicationAccount/entry/src/main/module.json5 index dece7db447..85ecaa9d27 100755 --- a/code/DocsSample/Account/ManagerApplicationAccount/entry/src/main/module.json5 +++ b/code/DocsSample/Account/ManagerApplicationAccount/entry/src/main/module.json5 @@ -20,9 +20,8 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "phone", - "tablet", - "2in1" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/code/DocsSample/Account/SystemAccount/README.md b/code/DocsSample/Account/SystemAccount/README.md index c9fdd597ca..a6af6cf4d0 100644 --- a/code/DocsSample/Account/SystemAccount/README.md +++ b/code/DocsSample/Account/SystemAccount/README.md @@ -78,7 +78,7 @@ entry/src/ 1.本示例仅支持标准系统上运行, 支持设备:RK3568。 -2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 +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)及以上版本才可编译运行。 diff --git a/code/DocsSample/Account/SystemAccount/entry/src/main/module.json5 b/code/DocsSample/Account/SystemAccount/entry/src/main/module.json5 index 08ab0350ec..8de8420122 100755 --- a/code/DocsSample/Account/SystemAccount/entry/src/main/module.json5 +++ b/code/DocsSample/Account/SystemAccount/entry/src/main/module.json5 @@ -20,9 +20,8 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "phone", - "tablet", - "2in1" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/code/DocsSample/ArkTS/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/module.json5 b/code/DocsSample/ArkTS/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/module.json5 index 840daa891a..55738a746b 100755 --- a/code/DocsSample/ArkTS/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/module.json5 +++ b/code/DocsSample/ArkTS/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/module.json5 @@ -30,9 +30,9 @@ { "name": "NocalculationsupportAbility", "srcEntry": "./ets/nocalculationsupportability/NocalculationsupportAbility.ets", - "description": "$string:NocalculationsupportAbility_desc", + "description": "$string:EntryAbility_desc", "icon": "$media:layered_image", - "label": "$string:NocalculationsupportAbility_label", + "label": "$string:EntryAbility_label", "startWindowIcon": "$media:startIcon", "startWindowBackground": "$color:start_window_background", "exported": true diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/inheritedfromnon/src/main/ets/inheritedfromnonability/InheritedfromnonAbility.ets b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/inheritedfromnon/src/main/ets/inheritedfromnonability/InheritedfromnonAbility.ets new file mode 100644 index 0000000000..34d438e5cc --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/inheritedfromnon/src/main/ets/inheritedfromnonability/InheritedfromnonAbility.ets @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +export default class InheritedfromnonAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + 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'); + } +} diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/ets/nocalculationsupportability/NocalculationsupportAbility.ets b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/ets/nocalculationsupportability/NocalculationsupportAbility.ets new file mode 100644 index 0000000000..d132964afa --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/ets/nocalculationsupportability/NocalculationsupportAbility.ets @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +export default class NocalculationsupportAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + 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'); + } +} diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/element/color.json b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/element/color.json new file mode 100644 index 0000000000..3c712962da --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/element/string.json b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/element/string.json new file mode 100644 index 0000000000..e6cee127d3 --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "RulesAndRestrictions" + } + ] +} \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/profile/backup_config.json b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000..78f40ae7c4 --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/profile/main_pages.json b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000..1898d94f58 --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/dark/element/color.json b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/dark/element/color.json new file mode 100644 index 0000000000..79b11c2747 --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/nocalculationsupport/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/notallowedInside/src/main/ets/notallowedinsideability/NotallowedInsideAbility.ets b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/notallowedInside/src/main/ets/notallowedinsideability/NotallowedInsideAbility.ets new file mode 100644 index 0000000000..82a6b719d8 --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/notallowedInside/src/main/ets/notallowedinsideability/NotallowedInsideAbility.ets @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 NotallowedInsideAbility 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/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/ets/variablenotsupportedability/VariablenotsupportedAbility.ets b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/ets/variablenotsupportedability/VariablenotsupportedAbility.ets new file mode 100644 index 0000000000..82a6b719d8 --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/ets/variablenotsupportedability/VariablenotsupportedAbility.ets @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 NotallowedInsideAbility 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/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/element/color.json b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/element/color.json new file mode 100644 index 0000000000..3c712962da --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/element/string.json b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/element/string.json new file mode 100644 index 0000000000..e663b872a0 --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "VariablenotsupportedAbility_desc", + "value": "description" + }, + { + "name": "VariablenotsupportedAbility_label", + "value": "RulesAndRestrictions" + } + ] +} \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/profile/main_pages.json b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000..1898d94f58 --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablenotsupported/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablesupport/src/main/ets/variablesupportability/VariablesupportAbility.ets b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablesupport/src/main/ets/variablesupportability/VariablesupportAbility.ets new file mode 100644 index 0000000000..f8e8f48478 --- /dev/null +++ b/code/DocsSample/ArkTs/ArkTsConcurrent/ConcurrentThreadCommunication/InterThreadCommunicationObjects/SendableObject/RulesAndRestrictions/variablesupport/src/main/ets/variablesupportability/VariablesupportAbility.ets @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 VariablesupportAbility 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/code/DocsSample/ArkUISample/ScrollableComponent/README_zh.md b/code/DocsSample/ArkUISample/ScrollableComponent/README_zh.md index 6050e802cc..908bf46005 100644 --- a/code/DocsSample/ArkUISample/ScrollableComponent/README_zh.md +++ b/code/DocsSample/ArkUISample/ScrollableComponent/README_zh.md @@ -133,7 +133,7 @@ entry/src/ohosTest/ 1.本示例仅支持标准系统上运行, 支持设备:RK3568。 -2.本示例为Stage模型,支持API18版本SDK,版本号:5.1.0.107,镜像版本号:OpenHarmony_5.1.0 Release。 +2.本示例为Stage模型,支持API18版本full-SDK,版本号:5.1.0.107,镜像版本号:OpenHarmony_5.1.0 Release。 3.本示例需要使用DevEco Studio 5.0.5 Release (Build Version: 5.0.13.200, built on May 13, 2025)及以上版本才可编译运行。 diff --git a/code/DocsSample/ArkWeb/ManageWebPageInteracts/entry2/src/main/module.json5 b/code/DocsSample/ArkWeb/ManageWebPageInteracts/entry2/src/main/module.json5 index 3ab4a8f46b..54db8428ec 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageInteracts/entry2/src/main/module.json5 +++ b/code/DocsSample/ArkWeb/ManageWebPageInteracts/entry2/src/main/module.json5 @@ -20,9 +20,7 @@ "description": "$string:module_desc", "mainElement": "Entry2Ability", "deviceTypes": [ - "phone", - "2in1", - "car" + "default" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/NetReqInterceptCacheWinOps/entry2/src/main/ets/pages/Index.ets b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/NetReqInterceptCacheWinOps/entry2/src/main/ets/pages/Index.ets index 9364a623c7..446ba7f8d6 100755 --- a/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/NetReqInterceptCacheWinOps/entry2/src/main/ets/pages/Index.ets +++ b/code/DocsSample/ArkWeb/ManageWebPageLoadBrowse/NetReqInterceptCacheWinOps/entry2/src/main/ets/pages/Index.ets @@ -1,4 +1,4 @@ -z/* +/* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry1/src/main/module.json5 b/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry1/src/main/module.json5 index 38684d0ac4..386c8d00ee 100644 --- a/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry1/src/main/module.json5 +++ b/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry1/src/main/module.json5 @@ -20,7 +20,7 @@ "description": "$string:module_desc", "mainElement": "Entry1Ability", "deviceTypes": [ - "phone" + "default" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry/src/main/module.json5 b/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry/src/main/module.json5 index 87decab6f7..d3456df81f 100644 --- a/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry/src/main/module.json5 +++ b/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry/src/main/module.json5 @@ -20,9 +20,8 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "phone", - "tablet", - "2in1" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry1/src/main/module.json5 b/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry1/src/main/module.json5 index 22892b5f3d..bcd0b04fc4 100644 --- a/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry1/src/main/module.json5 +++ b/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry1/src/main/module.json5 @@ -20,7 +20,7 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "phone" + "default", ], "deliveryWithInstall": true, "installationFree": false, diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/resources/base/element/string.json b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/resources/base/element/string.json index b9c1cef564..4d2a735257 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/resources/base/element/string.json +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/resources/base/element/string.json @@ -40,10 +40,6 @@ "name": "sm4_gcm_seg_encryption_decryption_asynchronous", "value": "sm4_gcm_seg_encryption_decryption_asynchronous" }, - { - "name": "sm4_gcm_seg_encryption_decryption_synchronous", - "value": "sm4_gcm_seg_encryption_decryption_synchronous" - }, { "name": "call_sm4_cbc_asynchronous", "value": "Call SM4_CBC Asynchronous" diff --git a/code/DocsSample/Security/CryptoArchitectureKit/KeyGenerationConversion/RandomlyGenerateSymmetricKeyArkTS/entry/src/main/resources/base/element/string.json b/code/DocsSample/Security/CryptoArchitectureKit/KeyGenerationConversion/RandomlyGenerateSymmetricKeyArkTS/entry/src/main/resources/base/element/string.json index 5574ba8002..3db39e1d2f 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/KeyGenerationConversion/RandomlyGenerateSymmetricKeyArkTS/entry/src/main/resources/base/element/string.json +++ b/code/DocsSample/Security/CryptoArchitectureKit/KeyGenerationConversion/RandomlyGenerateSymmetricKeyArkTS/entry/src/main/resources/base/element/string.json @@ -43,10 +43,6 @@ { "name": "call_sm4_promise", "value": "Call SM4 Promise" - }, - { - "name": "sm4_sync", - "value": "SM4 Sync" } ] } \ No newline at end of file -- Gitee