From d31c0ec30f3daeedb09b6f93fabd2f7a5be908bb Mon Sep 17 00:00:00 2001 From: hwx869784 <“zhouxj1111@thundersoft.com”> Date: Mon, 25 Mar 2024 15:36:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E5=8F=8A=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E8=A7=84=E8=8C=83=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AppScope/app.json5 | 2 +- application/build-profile.json5 | 14 ++++ application/hvigorfile.ts | 15 ++++ application/oh-package.json5 | 14 ++++ .../applicationability/ApplicationAbility.ets | 15 ++++ application/src/main/ets/pages/Index.ets | 15 ++++ build-profile.json5 | 23 ++++-- entry/build-profile.json5 | 2 +- entry/hvigorfile.ts | 2 +- entry/oh-package.json5 | 15 ++++ entry/src/main/ets/common/base/BaseIntent.ets | 2 +- entry/src/main/ets/common/base/BaseModel.ets | 2 +- entry/src/main/ets/common/base/BaseState.ets | 2 +- .../main/ets/common/base/BaseViewModel.ets | 4 +- .../ets/common/bean/AccessTableTypedef.ets | 2 +- .../main/ets/common/bean/BundleInfoBean.ets | 2 +- .../ets/common/bean/DefaultMenuConfig.ets | 2 +- entry/src/main/ets/common/bean/MenuConfig.ets | 2 +- entry/src/main/ets/common/bean/MenuInfo.ets | 2 +- .../ets/common/components/ComponentConfig.ets | 2 +- .../common/components/TitleBarComponent.ets | 4 +- .../ets/common/components/headComponent.ets | 2 +- .../main/ets/common/constants/ComConstant.ets | 2 +- .../common/constants/DataShareConstant.ets | 2 +- .../common/constants/HiSysEventConstant.ets | 8 +- .../ets/common/constants/RouterConstant.ets | 24 ++---- .../main/ets/common/utils/AutoMenuManager.ets | 42 +++++----- .../common/utils/GetSelfBundleInfoUtils.ets | 2 +- .../main/ets/common/utils/HiSysEventUtil.ets | 19 ++--- entry/src/main/ets/common/utils/Logger.ets | 4 +- .../src/main/ets/common/utils/RawFileUtil.ets | 20 ++--- .../src/main/ets/common/utils/RdbManager.ets | 2 +- .../main/ets/common/utils/ResourceUtil.ets | 9 +-- .../src/main/ets/common/utils/StringUtil.ets | 12 +-- .../main/ets/entryability/EntryAbility.ets | 2 +- .../ets/main/auto_menu/AutoMenuIntent.ets | 2 +- .../main/ets/main/auto_menu/AutoMenuModel.ets | 18 ++--- .../ets/main/auto_menu/AutoMenuViewModel.ets | 2 +- .../ets/main/auto_menu/AutoMenuViewState.ets | 6 +- .../ets/model/bundleInfo/BundleInfoModel.ets | 4 +- .../locationServicesImpl/ListenerBean.ets | 2 +- .../locationServicesImpl/LocationService.ets | 2 +- .../LocationViewModel.ets | 2 +- entry/src/main/ets/pages/Index.ets | 12 +-- entry/src/main/ets/pages/UiExtensionPage.ets | 2 +- entry/src/main/ets/pages/locationServices.ets | 77 +++++++++---------- .../privacy/PrivacyProtectionListView.ets | 5 +- entry/src/main/module.json5 | 2 +- .../main/resources/rawfile/advice_config.json | 30 -------- .../resources/rawfile/default_policy.json | 47 ----------- .../resources/rawfile/menu_list_rule.json | 23 ------ .../main/resources/rawfile/ordering_rule.json | 21 ----- .../rawfile/searchConfig/searchPage.json | 24 ------ entry/src/ohosTest/ets/test/Ability.test.ets | 2 +- entry/src/ohosTest/ets/test/List.test.ets | 2 +- entry/src/ohosTest/ets/test/Model.test.ets | 2 +- .../ets/test/bean/BundleInfoBean.test.ets | 2 +- .../LocationService.test.ets | 2 +- .../LocationViewModel.test.ets | 2 +- .../ohosTest/ets/test/common/Common.test.ets | 12 ++- .../ets/test/model/CheckedStateParameter.ets | 14 ++-- .../ohosTest/ets/testability/TestAbility.ets | 2 +- .../ohosTest/ets/testability/pages/Index.ets | 2 +- .../ets/testrunner/OpenHarmonyTestRunner.ts | 2 +- entry/src/ohosTest/module.json5 | 2 +- hvigor/hvigor-config.json5 | 11 +-- hvigor/hvigor-wrapper.js | 2 +- hvigorfile.ts | 2 +- hvigorw | 2 +- hvigorw.bat | 2 +- oh-package-lock.json5 | 3 +- oh-package.json5 | 15 ++++ 72 files changed, 305 insertions(+), 352 deletions(-) delete mode 100644 entry/src/main/resources/rawfile/advice_config.json delete mode 100644 entry/src/main/resources/rawfile/default_policy.json delete mode 100644 entry/src/main/resources/rawfile/menu_list_rule.json delete mode 100644 entry/src/main/resources/rawfile/ordering_rule.json delete mode 100644 entry/src/main/resources/rawfile/searchConfig/searchPage.json diff --git a/AppScope/app.json5 b/AppScope/app.json5 index ed3ffa8..d62b426 100644 --- a/AppScope/app.json5 +++ b/AppScope/app.json5 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/application/build-profile.json5 b/application/build-profile.json5 index e223344..b90740d 100644 --- a/application/build-profile.json5 +++ b/application/build-profile.json5 @@ -1,3 +1,17 @@ +/** + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ { "apiType": "stageMode", "buildOption": { diff --git a/application/hvigorfile.ts b/application/hvigorfile.ts index c6edcd9..bea37d2 100644 --- a/application/hvigorfile.ts +++ b/application/hvigorfile.ts @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { hapTasks } from '@ohos/hvigor-ohos-plugin'; export default { diff --git a/application/oh-package.json5 b/application/oh-package.json5 index 50c9b9a..6a36d1d 100644 --- a/application/oh-package.json5 +++ b/application/oh-package.json5 @@ -1,3 +1,17 @@ +/** + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ { "license": "", "devDependencies": {}, diff --git a/application/src/main/ets/applicationability/ApplicationAbility.ets b/application/src/main/ets/applicationability/ApplicationAbility.ets index 8ab0309..4bb10d3 100644 --- a/application/src/main/ets/applicationability/ApplicationAbility.ets +++ b/application/src/main/ets/applicationability/ApplicationAbility.ets @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import AbilityConstant from '@ohos.app.ability.AbilityConstant'; import hilog from '@ohos.hilog'; import UIAbility from '@ohos.app.ability.UIAbility'; diff --git a/application/src/main/ets/pages/Index.ets b/application/src/main/ets/pages/Index.ets index 423b427..06b805d 100644 --- a/application/src/main/ets/pages/Index.ets +++ b/application/src/main/ets/pages/Index.ets @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + @Entry @Component struct Index { diff --git a/build-profile.json5 b/build-profile.json5 index 75e3750..41aa7c9 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "app": { "signingConfigs": [ @@ -5,9 +20,9 @@ "name": "default", "material": { "certpath": "signature/auto_ohos_default_security_privacy_center_com.ohos.certmanager.cer", - "storePassword": "0000001A37024DC31259D322DB3DC82683D3CE6A1D567E83D9804E52C018E93152C260E218E096D39D12", + "storePassword": "0000001AF4A5205DCC15B288A620B441F195D5C432826E337CD4E6FB53D6F3941F3ACAB2A58B39F2DD1A", "keyAlias": "openharmony application release", - "keyPassword": "0000001A8D895754537EB5A2A9EDA581CAE2388163DF1FEA2486DFFCADD1BE9D3CC359D1279C62ED86A9", + "keyPassword": "0000001A2617019B05D0B0A0E1770DD7079AA6849043AAE47F6E178A3E6D4F1C742726DE1992F25EA89D", "profile": "signature/auto_ohos_default_security_privacy_center_com.ohos.certmanager.p7b", "signAlg": "SHA256withECDSA", "storeFile": "signature/auto_ohos_default_security_privacy_center_com.ohos.certmanager.p12" @@ -19,13 +34,9 @@ "name": "default", "signingConfig": "default", "compileSdkVersion": 10, - //指定OpenHarmony应用/服务编译时的版本git "compatibleSdkVersion": 10, - //指定OpenHarmony应用/服务兼容的最低版本。 "targetSdkVersion": 10, - //指定OpenHarmony应用/服务目标版本。若没有设置,默认为compatibleSdkVersion "runtimeOS": "OpenHarmony", - //指定为OpenHarmony } ], "buildModeSet": [ diff --git a/entry/build-profile.json5 b/entry/build-profile.json5 index 3e231f9..765019f 100644 --- a/entry/build-profile.json5 +++ b/entry/build-profile.json5 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/hvigorfile.ts b/entry/hvigorfile.ts index 5e6218b..bea37d2 100644 --- a/entry/hvigorfile.ts +++ b/entry/hvigorfile.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/oh-package.json5 b/entry/oh-package.json5 index 225946c..219105b 100644 --- a/entry/oh-package.json5 +++ b/entry/oh-package.json5 @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "license": "", "devDependencies": {}, diff --git a/entry/src/main/ets/common/base/BaseIntent.ets b/entry/src/main/ets/common/base/BaseIntent.ets index 7400752..1e7007c 100644 --- a/entry/src/main/ets/common/base/BaseIntent.ets +++ b/entry/src/main/ets/common/base/BaseIntent.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/base/BaseModel.ets b/entry/src/main/ets/common/base/BaseModel.ets index 91213b9..ff19bd3 100644 --- a/entry/src/main/ets/common/base/BaseModel.ets +++ b/entry/src/main/ets/common/base/BaseModel.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/base/BaseState.ets b/entry/src/main/ets/common/base/BaseState.ets index a5906b8..1c47e23 100644 --- a/entry/src/main/ets/common/base/BaseState.ets +++ b/entry/src/main/ets/common/base/BaseState.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/base/BaseViewModel.ets b/entry/src/main/ets/common/base/BaseViewModel.ets index 0f453a3..9335e1c 100644 --- a/entry/src/main/ets/common/base/BaseViewModel.ets +++ b/entry/src/main/ets/common/base/BaseViewModel.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,7 +21,7 @@ import Logger from '../utils/Logger'; const TAG = 'BaseViewModel'; /** - * 执行结果 + * results of enforcement */ export enum ProcessResult { FAIL = 0, diff --git a/entry/src/main/ets/common/bean/AccessTableTypedef.ets b/entry/src/main/ets/common/bean/AccessTableTypedef.ets index 93c30a7..d0568a5 100644 --- a/entry/src/main/ets/common/bean/AccessTableTypedef.ets +++ b/entry/src/main/ets/common/bean/AccessTableTypedef.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/bean/BundleInfoBean.ets b/entry/src/main/ets/common/bean/BundleInfoBean.ets index 67f464c..e266f89 100644 --- a/entry/src/main/ets/common/bean/BundleInfoBean.ets +++ b/entry/src/main/ets/common/bean/BundleInfoBean.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/bean/DefaultMenuConfig.ets b/entry/src/main/ets/common/bean/DefaultMenuConfig.ets index 83b9f2d..5bbe294 100644 --- a/entry/src/main/ets/common/bean/DefaultMenuConfig.ets +++ b/entry/src/main/ets/common/bean/DefaultMenuConfig.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/bean/MenuConfig.ets b/entry/src/main/ets/common/bean/MenuConfig.ets index 81e697c..11fa9d4 100644 --- a/entry/src/main/ets/common/bean/MenuConfig.ets +++ b/entry/src/main/ets/common/bean/MenuConfig.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/bean/MenuInfo.ets b/entry/src/main/ets/common/bean/MenuInfo.ets index 40c7db6..ce57602 100644 --- a/entry/src/main/ets/common/bean/MenuInfo.ets +++ b/entry/src/main/ets/common/bean/MenuInfo.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/components/ComponentConfig.ets b/entry/src/main/ets/common/components/ComponentConfig.ets index 729808b..dc178d5 100644 --- a/entry/src/main/ets/common/components/ComponentConfig.ets +++ b/entry/src/main/ets/common/components/ComponentConfig.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/components/TitleBarComponent.ets b/entry/src/main/ets/common/components/TitleBarComponent.ets index eccc5df..b51d223 100644 --- a/entry/src/main/ets/common/components/TitleBarComponent.ets +++ b/entry/src/main/ets/common/components/TitleBarComponent.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -26,7 +26,7 @@ export default struct TitleBar { onBackClick?: () => void; build() { - // 分栏模式下首页不显示返回按钮 + // In column mode, the homepage does not display a return button Column() { Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) { Row() { diff --git a/entry/src/main/ets/common/components/headComponent.ets b/entry/src/main/ets/common/components/headComponent.ets index dde9c1c..08f9995 100644 --- a/entry/src/main/ets/common/components/headComponent.ets +++ b/entry/src/main/ets/common/components/headComponent.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/constants/ComConstant.ets b/entry/src/main/ets/common/constants/ComConstant.ets index 05b3c8a..4ee9ca6 100644 --- a/entry/src/main/ets/common/constants/ComConstant.ets +++ b/entry/src/main/ets/common/constants/ComConstant.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/constants/DataShareConstant.ets b/entry/src/main/ets/common/constants/DataShareConstant.ets index 48a575d..1ea285c 100644 --- a/entry/src/main/ets/common/constants/DataShareConstant.ets +++ b/entry/src/main/ets/common/constants/DataShareConstant.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/constants/HiSysEventConstant.ets b/entry/src/main/ets/common/constants/HiSysEventConstant.ets index b219d57..3a089e7 100644 --- a/entry/src/main/ets/common/constants/HiSysEventConstant.ets +++ b/entry/src/main/ets/common/constants/HiSysEventConstant.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -17,6 +17,8 @@ export default class HiSysEventConstant { static BUNDLE_NAME = 'com.ohos.security_privacy_center'; static EVENT_DOMAIN = 'PRIVACY_UE'; static ACCESS_CLICK_EVENT_NAME = 'SECU_PRIV_ENTRANCE'; - static MAIN_PERMISSION_LIST_EVENT_NAME = 'MAIN_PERMISSION_LIST'; // 设置-隐私与安全-隐私权限列表打点事件 - static PERMISSION_PAGE_LOCATION_EVENT_NAME = 'PERMISSION_PAGE_LOCATION'; //设置-隐私与安全-权限-访问我的位置信息开关 + // Settings - Privacy and Security - Privacy Permission List Management Event + static MAIN_PERMISSION_LIST_EVENT_NAME = 'MAIN_PERMISSION_LIST'; + //Settings Privacy and Security Permissions Access My Location Information Switch + static PERMISSION_PAGE_LOCATION_EVENT_NAME = 'PERMISSION_PAGE_LOCATION'; } \ No newline at end of file diff --git a/entry/src/main/ets/common/constants/RouterConstant.ets b/entry/src/main/ets/common/constants/RouterConstant.ets index 32c44f7..6f0efc6 100644 --- a/entry/src/main/ets/common/constants/RouterConstant.ets +++ b/entry/src/main/ets/common/constants/RouterConstant.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,34 +14,24 @@ */ /** - * 路由地址配置 + * Routing address configuration */ export default class RouterConstant { - // 首页 + // home page static INDEX_URL = 'pages/Index' - // 权限管理 - static PERMISSION_MANAGEMENT_URL = 'pages/PermissionManagementPage' - // 权限访问记录 - static PERMISSION_ACCESS_RECORD_URL = 'pages/PermissionAccessRecordPage' - // 应用权限访问记录 - static PERMISSION_CONTROL_AND_RECORD_URL = 'pages/PermissionControlAndRecordPage' - // 外部模块条换路径对应表 - static OUTSIDE_ROUTE_PAGE_MAP = new Map([ - ['location_manager_settings', 'pages/PermissionManagementPage'] - ]) } /** - * 页面进入方式,需和设置保持一致 - * 当设置传入backMode为1时,点返回跳转到拉起页面 + * The page entry method needs to be consistent with the settings + * When setting the incoming backMode to 1, click return to jump to the pull-up page */ export enum PageRouteMode { /** - * 内部跳转 + * Internal jump */ INSIDE, /** - * 外部跳转 + * External jump */ OUTSIDE } \ No newline at end of file diff --git a/entry/src/main/ets/common/utils/AutoMenuManager.ets b/entry/src/main/ets/common/utils/AutoMenuManager.ets index d2f7e78..954937e 100644 --- a/entry/src/main/ets/common/utils/AutoMenuManager.ets +++ b/entry/src/main/ets/common/utils/AutoMenuManager.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -34,7 +34,7 @@ const DST_ABILITY_MODE = 1; //UIAbility access method const DST_UIABILITY_MODE = 0; -//数据库唯一标识符 +//Database unique identifier const DISPLAY_ONLY_PRIMARY_USER = 'ONLY_PRIMARY_USER'; const DISPLAY_ONLY_SUB_USER = 'ONLY_SUB_USER'; const MAIN_USER_ID = 100; @@ -46,7 +46,7 @@ const DISPLAY_MODEL_CARD = 'card'; const DISPLAY_MODEL_LIST = 'list'; export class AutoMenuManager { - // 默认的配置信息,key is bundle name, value is config + // Default configuration information,key is bundle name, value is config private _defaultMenuConfigMap: HashMap = new HashMap(); // key is bundle name, value is id. private _defaultBusinessIdMap: HashMap = new HashMap(); @@ -72,9 +72,9 @@ export class AutoMenuManager { * @returns The all menu config */ async getMenuConfigFromBms(context: Context, userId: number): Promise { - // 获取所有配置信息,内部会检查权限 + // Obtain all configuration information and internally check permissions let allPkgConfigList: MenuConfig[] = await this._readConfigFromBms(context); - // 适配businessId + // Adapt to businessId for (let index = 0; index < allPkgConfigList.length; index++) { const item = allPkgConfigList[index]; if (item.businessId === null || item.businessId === undefined || item.businessId.length === 0) { @@ -82,7 +82,7 @@ export class AutoMenuManager { } } Logger.info(TAG, 'getMenuConfigFromBms allPkgConfigList: ' + JSON.stringify(allPkgConfigList)); - // 过滤不合法的配置信息 + // Filter illegal configuration information let verifiedPkgConfigList: MenuConfig[] = []; for (let index = 0; index < allPkgConfigList.length; index++) { const menuConfig = allPkgConfigList[index]; @@ -167,7 +167,7 @@ export class AutoMenuManager { } } - // 查询有功能接入的Ability信息 + // Query Ability information with functional access private async _readConfigFromBms(context: Context): Promise { let abilityInfoList: bundleManager.ExtensionAbilityInfo[] = []; let uiAbilityInfoList: bundleManager.AbilityInfo[] = []; @@ -176,7 +176,7 @@ export class AutoMenuManager { } catch (err) { Logger.error(TAG, 'queryExtensionAbilityInfoOther error.') } - // 查询通过uiAbility方式接入的信息 + // Query information accessed through uiAbility try { uiAbilityInfoList = await BundleInfoModel.queryAbilityInfoOther() } catch (err) { @@ -185,7 +185,7 @@ export class AutoMenuManager { if (abilityInfoList.length === 0 && uiAbilityInfoList.length === 0) { return []; } - // 检查功能接入的Ability权限 + // Check the Ability permissions for feature access let atManage: abilityAccessCtrl.AtManager = abilityAccessCtrl.createAtManager(); let pkgConfigList: MenuConfig[] = []; for (let index = 0; index < abilityInfoList.length; index++) { @@ -202,7 +202,7 @@ export class AutoMenuManager { Logger.info(TAG, 'checkAccessToken error: ' + abilityInfo.bundleName); } } - // 检查功能通过uiAbility方式接入的Ability权限 + // Check the Ability permissions of the function accessed through uiAbility method for (let index = 0; index < uiAbilityInfoList.length; index++) { const uiAbilityInfo = uiAbilityInfoList[index]; try { @@ -220,10 +220,10 @@ export class AutoMenuManager { return pkgConfigList; } - // 读取接入方式配置信息转换为对应的数据类 + // Read access method configuration information and convert it to the corresponding data class private async _readConfigFromSingleAbilityInfo(context: Context, abilityInfo: bundleManager.ExtensionAbilityInfo | bundleManager.AbilityInfo): Promise { - // 获取metaData数据 + // Get MetaData data let singleAbilityMenuConfigList: MenuConfig[] = []; for (let index = 0; index < abilityInfo.metadata.length; index++) { const metaData = abilityInfo.metadata[index]; @@ -232,7 +232,7 @@ export class AutoMenuManager { } let bundleName = abilityInfo.bundleName; let fileName = metaData.value; - // 根据metaData获取json文件 + // Retrieve JSON files based on metaData let content: string = await this._getFileByMetaData(context, bundleName, fileName); if (StringUtil.isEmpty(content)) { continue; @@ -245,14 +245,14 @@ export class AutoMenuManager { return singleAbilityMenuConfigList; } - // 根据包名查询metaData的json数据 + // Query the JSON data of metaData based on the package name private async _getFileByMetaData(context: Context, bundleName: string, fileName: string): Promise { let resourceManager = resourceUtil.getBundleResourceManager(bundleName, context) as resourceManager.ResourceManager; return await RawFileUtil.getStringByFile(resourceManager, fileName); } private async _verifyMenuConfig(context: Context, menuConfig: MenuConfig, userId: number): Promise { - // 根据卡片或列表模式进行分类验证,目前暂只支持列表方式 + // Classification verification based on card or list mode, currently only list mode is supported try { if (menuConfig.displayedMode === DISPLAY_MODEL_CARD || menuConfig.displayedMode === DISPLAY_MODEL_LIST) { @@ -264,7 +264,7 @@ export class AutoMenuManager { return false; } - // 校验showControlAbilityUri + // Verify showControlAbilityUri private async _verificationUri(context: Context, uri: string): Promise { try { let data: dataShare.DataShareHelper = await dataShare.createDataShareHelper(context, uri, { isProxy: false }); @@ -309,7 +309,7 @@ export class AutoMenuManager { if (!_isValidResourceWithList) { return false; } - // 校验主子用户配置,可选字段 + // Verify the configuration of primary and secondary users, optional fields if (menuConfig.displayUserConfig !== undefined) { let displayUserConfigRes = this._verificationPrimaryUser(menuConfig.displayUserConfig, userId); Logger.info(TAG, `displayUserConfigRes value is: ${displayUserConfigRes}`); @@ -317,7 +317,7 @@ export class AutoMenuManager { return displayUserConfigRes; } } - // 校验uri,可选字段 + // Verify uri, optional fields let showControlAbilityUri = menuConfig.showControlAbilityUri; if (showControlAbilityUri !== undefined) { let _verificationUriResult: string = await this._verificationUri(context, showControlAbilityUri); @@ -341,13 +341,13 @@ export class AutoMenuManager { if (StringUtil.isEmpty(menuConfig.mainTitleResource)) { return false; } - // 标题 + // title let titleResList = menuConfig.mainTitleResource.split(':'); if (titleResList.length < 2) { Logger.error(TAG, 'titleResList length is error.') return false; } - // 校验title + // Verify title let value: string = await resourceManager?.getStringByName(titleResList[1]); if (value === '') { Logger.error(TAG, 'titlePromise is error.') @@ -361,7 +361,7 @@ export class AutoMenuManager { return dstAbilityMode !== DST_ABILITY_MODE && dstAbilityMode !== DST_UIABILITY_MODE } - // 校验子用户 + // Verify sub users private _verificationPrimaryUser(displayUserConfig: string, userId: number): boolean { let isPrimaryUser: boolean = userId === MAIN_USER_ID; Logger.info(TAG, `verificationSubUser, displayUser: ${displayUserConfig}, isPrimaryUser: ${isPrimaryUser}`); diff --git a/entry/src/main/ets/common/utils/GetSelfBundleInfoUtils.ets b/entry/src/main/ets/common/utils/GetSelfBundleInfoUtils.ets index 37cf150..563e5c9 100644 --- a/entry/src/main/ets/common/utils/GetSelfBundleInfoUtils.ets +++ b/entry/src/main/ets/common/utils/GetSelfBundleInfoUtils.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/utils/HiSysEventUtil.ets b/entry/src/main/ets/common/utils/HiSysEventUtil.ets index 0327ac6..c4eb020 100644 --- a/entry/src/main/ets/common/utils/HiSysEventUtil.ets +++ b/entry/src/main/ets/common/utils/HiSysEventUtil.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +15,6 @@ import hiSysEvent from '@ohos.hiSysEvent'; import { BusinessError } from '@ohos.base'; -import { StringUtil } from './StringUtil'; import Logger from './Logger'; import HiSysEventConstant from '../constants/HiSysEventConstant'; import GetSelfBundleInfoUtils from './GetSelfBundleInfoUtils'; @@ -27,9 +26,9 @@ export default class HiSysEventUtil { } /** - * 接入框架接入应用点击事件打点 + * Access framework access application click event management * - * @params { clickedBundleName } 所点击的应用包名 + * @params { clickedBundleName } Click on the application package name */ static async reportAccessClick(clickedBundleName: string): Promise { Logger.info(TAG,"reportAccessClick start.") @@ -43,7 +42,8 @@ export default class HiSysEventUtil { } /** - * 访问我的位置信息点击打点事件 + * Access my location information and click on the management event + * @params { operation } LOCATION */ static async reportLocationClick(operation: string): Promise { Logger.info(TAG,"reportLocationClick start.") @@ -57,7 +57,8 @@ export default class HiSysEventUtil { } /** - * 访问我的位置信息开关点击打点事件 + * Access My Location Information Switch Click on Dotting Event + * @params { checkedState } Position information switch status; 1: On 0: Off */ static async reportLocationFlagClick(checkedState: number) { let versionName: string = await GetSelfBundleInfoUtils.getVersionName(); @@ -70,10 +71,10 @@ export default class HiSysEventUtil { } /** - * 界面点击操作打点 + * Click on the interface to operate the dots * - * @param eventName 事件名 - * @param params 参数 + * @param eventName Event Name + * @param params parameter */ static async reportClick(eventName: string, params: Record): Promise { let versionName: string = await GetSelfBundleInfoUtils.getVersionName(); diff --git a/entry/src/main/ets/common/utils/Logger.ets b/entry/src/main/ets/common/utils/Logger.ets index 14a2833..a504e92 100644 --- a/entry/src/main/ets/common/utils/Logger.ets +++ b/entry/src/main/ets/common/utils/Logger.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +15,7 @@ import hilog from '@ohos.hilog'; /** - * 日志打印工具类 + * Log printing tool class */ class Logger { private domain: number; diff --git a/entry/src/main/ets/common/utils/RawFileUtil.ets b/entry/src/main/ets/common/utils/RawFileUtil.ets index e02026f..cd8664c 100644 --- a/entry/src/main/ets/common/utils/RawFileUtil.ets +++ b/entry/src/main/ets/common/utils/RawFileUtil.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,15 +21,15 @@ const TAG: string = 'RawFileUtil'; const UNICODE: string = 'utf-8'; /** - * RawFile工具类 + * RawFile utility class */ export class RawFileUtil { /** - * 获取指定的JSON文件的对象 + * Get the object of the specified JSON file * - * @param resourceManager 资源管理器 - * @param fileName 文件名 - * @returns string格式的文件内容 + * @param resourceManager Resource Manager + * @param fileName file name + * @returns The file content in string format */ public static async getStringByFile(resourceManager: resmgr.ResourceManager, fileName: string): Promise { Logger.info(TAG, `getFileContent. fileName: ${fileName}`); @@ -48,11 +48,11 @@ export class RawFileUtil { } /** - * 获取指定的JSON文件的对象 + * Get the object of the specified JSON file * - * @param context 上下文 - * @param fileName 文件名 - * @return string格式的文件内容 + * @param context context + * @param fileName file name + * @return The file content in string format */ public static async getRawFileByContext(context: Context, fileName: string): Promise { Logger.info(TAG, `getFileContent. fileName: ${fileName}`); diff --git a/entry/src/main/ets/common/utils/RdbManager.ets b/entry/src/main/ets/common/utils/RdbManager.ets index f2ac374..2762b0b 100644 --- a/entry/src/main/ets/common/utils/RdbManager.ets +++ b/entry/src/main/ets/common/utils/RdbManager.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/common/utils/ResourceUtil.ets b/entry/src/main/ets/common/utils/ResourceUtil.ets index f212665..5a22283 100644 --- a/entry/src/main/ets/common/utils/ResourceUtil.ets +++ b/entry/src/main/ets/common/utils/ResourceUtil.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -23,7 +23,6 @@ const TAG = 'ResourceUtil' class ResourceUtil { /** * Obtains the resource name - * 获取资源文件 * @param resource Resource file * @returns Resource File Name */ @@ -43,9 +42,9 @@ class ResourceUtil { } /** - * 获取指定包名资源管理器 - * @params bundleName 应用包名 - * @params context 上下文 + * Get the specified package name resource manager + * @params bundleName Application package name + * @params context context */ getBundleResourceManager(bundleName: string, context: common.Context | null): resourceManager.ResourceManager | null { diff --git a/entry/src/main/ets/common/utils/StringUtil.ets b/entry/src/main/ets/common/utils/StringUtil.ets index 03376fd..8bb92b5 100644 --- a/entry/src/main/ets/common/utils/StringUtil.ets +++ b/entry/src/main/ets/common/utils/StringUtil.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,20 +14,20 @@ */ /** - * 字符串工具类 + * String Tool Class */ export class StringUtil { /** - * 判断字符是否是空字符串 - * @Param stringValue 字符串 + * Determine whether a character is an empty string + * @Param stringValue character string */ public static isEmpty(stringValue: string | null | undefined): boolean { return stringValue === undefined || stringValue === null || stringValue.length === 0; } /** - * 判断字符转是否是非空字符串 - * @params stringValue 字符串 + * Determine whether character conversion is a non empty string + * @params stringValue character string */ public static isNotEmpty(stringValue: string | null | undefined): boolean { return stringValue !== undefined && stringValue !== null && stringValue.length !== 0; diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index aff8942..4acbe90 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/main/auto_menu/AutoMenuIntent.ets b/entry/src/main/ets/main/auto_menu/AutoMenuIntent.ets index f0e3eab..0a45ae3 100644 --- a/entry/src/main/ets/main/auto_menu/AutoMenuIntent.ets +++ b/entry/src/main/ets/main/auto_menu/AutoMenuIntent.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/main/auto_menu/AutoMenuModel.ets b/entry/src/main/ets/main/auto_menu/AutoMenuModel.ets index 6175c21..b13a94f 100644 --- a/entry/src/main/ets/main/auto_menu/AutoMenuModel.ets +++ b/entry/src/main/ets/main/auto_menu/AutoMenuModel.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -30,7 +30,7 @@ import Logger from '../../common/utils/Logger'; import common from '@ohos.app.ability.common'; const TAG = 'AutoMenu'; -// 该ability模式需继承自UIExtensionAbility +// This ability pattern needs to inherit from UIExtensionAbility const DST_ABILITY_MODE = 1; // this mode is jump page const DST_PAGE_MODE = 2; @@ -86,13 +86,13 @@ export class AutoMenuModel extends BaseModel { async getMenuInfoListFromBms(context: Context): Promise { let userId: number = await this._getUserId(); - // 步骤一,获取配置数据 + // Obtain configuration data let menuConfigs: MenuConfig[] = await AutoMenuManager.getInstance().getMenuConfigFromBms(context, userId); Logger.info(TAG, 'getMenuInfoList menuConfigList: ' + JSON.stringify(menuConfigs)); - // 步骤二,转换为实际需要展示的数据 + // Convert to actual data that needs to be displayed let menuInfoList: MenuInfo[] = await this._convertMenuConfigToMenuInfo(context, menuConfigs, userId); Logger.info(TAG, 'getMenuInfoList menuInfoList: ' + JSON.stringify(menuInfoList)); - // 步骤三,排序 + // sort menuInfoList.sort((left: MenuInfo, right: MenuInfo) => { if (left.priority !== right.priority) { return right.priority - left.priority; @@ -100,13 +100,13 @@ export class AutoMenuModel extends BaseModel { return left.bundleName.localeCompare(right.bundleName); } }) - // 步骤四,写入数据库缓存 + // Write to database cache this._refreshDb(context, menuInfoList); return menuInfoList; } handleMenuClick(menuInfo: MenuInfo) { - // 通过UIAbility方式接入框架 + // Accessing the framework through UIAbility if (menuInfo.dstAbilityMode === DST_UIABILITY_MODE) { let context = getContext() as common.UIAbilityContext; context.startAbility({ @@ -128,7 +128,7 @@ export class AutoMenuModel extends BaseModel { Logger.error(TAG, `Failed to jump to the second page.Code is ${err.code},message is ${err.message}`); }) } - // 跳转UIExtensionAbility + // Jump UIExtensionAbility HiSysEventUtil.reportAccessClick(menuInfo.dstBundleName) if (menuInfo.dstAbilityMode === DST_ABILITY_MODE) { router.pushUrl({ @@ -194,7 +194,7 @@ export class AutoMenuModel extends BaseModel { return userId; } - // 获取配置的标题字符串资源 + // Get the configured title string resource private async _getConfigResString(context: Context, bundleName: string, res: string): Promise { if (res === null || res === undefined) { return ''; diff --git a/entry/src/main/ets/main/auto_menu/AutoMenuViewModel.ets b/entry/src/main/ets/main/auto_menu/AutoMenuViewModel.ets index 3d60e12..f892b9f 100644 --- a/entry/src/main/ets/main/auto_menu/AutoMenuViewModel.ets +++ b/entry/src/main/ets/main/auto_menu/AutoMenuViewModel.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/main/auto_menu/AutoMenuViewState.ets b/entry/src/main/ets/main/auto_menu/AutoMenuViewState.ets index 839e215..d2d71ce 100644 --- a/entry/src/main/ets/main/auto_menu/AutoMenuViewState.ets +++ b/entry/src/main/ets/main/auto_menu/AutoMenuViewState.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,8 +18,8 @@ import MenuInfo from '../../common/bean/MenuInfo'; @Observed export class AutoMenuViewState extends BaseState { - // 功能接入,列表数据 + // list data public listMenuList: MenuInfo[] = []; - // 功能接入,卡片数据 + // card data public cardMenuList: MenuInfo[] = []; } \ No newline at end of file diff --git a/entry/src/main/ets/model/bundleInfo/BundleInfoModel.ets b/entry/src/main/ets/model/bundleInfo/BundleInfoModel.ets index 4960c7e..b655117 100644 --- a/entry/src/main/ets/model/bundleInfo/BundleInfoModel.ets +++ b/entry/src/main/ets/model/bundleInfo/BundleInfoModel.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -123,7 +123,7 @@ class BundleInfoModel { return result; } - // 获取所有应用信息关于功能接入 + // Get all application information about feature access getAllBundleInfoByFunctionAccess() { let modelFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_METADATA | bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION | diff --git a/entry/src/main/ets/model/locationServicesImpl/ListenerBean.ets b/entry/src/main/ets/model/locationServicesImpl/ListenerBean.ets index ae56cd7..116706f 100644 --- a/entry/src/main/ets/model/locationServicesImpl/ListenerBean.ets +++ b/entry/src/main/ets/model/locationServicesImpl/ListenerBean.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/model/locationServicesImpl/LocationService.ets b/entry/src/main/ets/model/locationServicesImpl/LocationService.ets index 3bab97b..7d7827c 100644 --- a/entry/src/main/ets/model/locationServicesImpl/LocationService.ets +++ b/entry/src/main/ets/model/locationServicesImpl/LocationService.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/model/locationServicesImpl/LocationViewModel.ets b/entry/src/main/ets/model/locationServicesImpl/LocationViewModel.ets index ce34a6d..088803f 100644 --- a/entry/src/main/ets/model/locationServicesImpl/LocationViewModel.ets +++ b/entry/src/main/ets/model/locationServicesImpl/LocationViewModel.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 3245b79..aa962d8 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -59,7 +59,7 @@ struct Index { this.getBundleInfo(); } - // 获取所有包信息 + // Get all package information getBundleInfo() { BundleInfoModel.getAllBundleInfoByFunctionAccess() .then(async (data: bundleManager.BundleInfo[]) => { @@ -89,14 +89,14 @@ struct Index { Scroll(this.scroller) { Column() { - // 组件1 功能接入‘列表’ + // Function access' list 'component PrivacyProtectionListView({ menuViewState: autoMenuViewModel.getViewState(), itemClickEvent: ((menuInfo: MenuInfo) => { autoMenuViewModel.processIntent(new AutoMenuClickIntent(menuInfo)); }) }) - // 组件2 位置信息 + // Location information component Row() { Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Text($r('app.string.locationServicesTab')) @@ -137,7 +137,7 @@ struct Index { .hoverEffect(HoverEffect.Highlight) .borderRadius(ResourceUtil.getFloatNumber($r('sys.float.ohos_id_corner_radius_default_l')) - 4) .onClick(async () => { - // 定位服务打点 + // Positioning service management HiSysEventUtil.reportLocationClick('LOCATION') router.pushUrl({ @@ -156,7 +156,7 @@ struct Index { } } .height(Constants.WIDTH_HEIGHT_FULL_SCREEN) - .scrollable(ScrollDirection.Vertical) //滚动方向纵向 + .scrollable(ScrollDirection.Vertical) .edgeEffect(EdgeEffect.Spring) .margin({ bottom: $r('app.float.index_margin_bottom') diff --git a/entry/src/main/ets/pages/UiExtensionPage.ets b/entry/src/main/ets/pages/UiExtensionPage.ets index cd97436..c617c4c 100644 --- a/entry/src/main/ets/pages/UiExtensionPage.ets +++ b/entry/src/main/ets/pages/UiExtensionPage.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/ets/pages/locationServices.ets b/entry/src/main/ets/pages/locationServices.ets index 7ec9031..9dfdb37 100644 --- a/entry/src/main/ets/pages/locationServices.ets +++ b/entry/src/main/ets/pages/locationServices.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -17,9 +17,8 @@ import ViewModel from '../model/locationServicesImpl/LocationViewModel'; import Logger from '../common/utils/Logger'; import HeadComponent from '../common/components/headComponent'; import HiSysEventUtil from '../common/utils/HiSysEventUtil'; -import HiSysEventConstant from '../common/constants/HiSysEventConstant'; -const TAG:string = 'LocationServicesPage' +const TAG: string = 'LocationServicesPage' /** * LocationServices @@ -31,48 +30,46 @@ struct LocationServices { build() { Column() { - GridContainer({ gutter: 24, margin: 24}) { - Column() { - HeadComponent({ headName: $r('app.string.locationServicesTab'), isActive: true }); + GridRow({ columns: { sm: 4, md: 6, lg: 8 }, gutter: 12 }) { + GridCol({ span: { sm: 4, md: 6, lg: 8 }, offset: { sm: 0, md: 1, lg: 2 } }) { + Column() { + HeadComponent({ headName: $r('app.string.locationServicesTab'), isActive: true }); - Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { - Text($r('app.string.positionInformation')) - .fontColor($r("app.color.font_color_182431")) - .fontStyle(FontStyle.Normal) - .fontSize($r("app.float.location_font_size")) - .margin({ left: $r('app.float.distance_12') }) + Flex({ + direction: FlexDirection.Row, + justifyContent: FlexAlign.SpaceBetween, + alignItems: ItemAlign.Center + }) { + Text($r('app.string.positionInformation')) + .fontColor($r("app.color.font_color_182431")) + .fontStyle(FontStyle.Normal) + .fontSize($r("app.float.location_font_size")) + .margin({ left: $r('app.float.distance_12') }) - Toggle({ type: ToggleType.Switch, isOn: this.locationServiceStatus }) - .margin({ right: $r('app.float.padding_or_margin_s') }) - .width('36vp') - .height('20vp') - .selectedColor('#007DFF') - .onChange((isOn: boolean) => { - Logger.info(TAG, 'location service status is :' + this.locationServiceStatus); - if (isOn) { - ViewModel.enableLocation(); - HiSysEventUtil.reportLocationFlagClick(1) - - } else { - ViewModel.disableLocation(); - - HiSysEventUtil.reportLocationFlagClick(0) - } - }); + Toggle({ type: ToggleType.Switch, isOn: this.locationServiceStatus }) + .margin({ right: $r('app.float.padding_or_margin_s') }) + .width('36vp') + .height('20vp') + .selectedColor('#007DFF') + .onChange((isOn: boolean) => { + Logger.info(TAG, 'location service status is :' + this.locationServiceStatus); + if (isOn) { + ViewModel.enableLocation(); + HiSysEventUtil.reportLocationFlagClick(1) + } else { + ViewModel.disableLocation(); + HiSysEventUtil.reportLocationFlagClick(0) + } + }); + } + .margin({ top: $r("app.float.padding_or_margin_m") }) + .height($r('app.float.wh_value_56')) + .backgroundColor($r("app.color.white_bg_color")) + .borderRadius($r("sys.float.ohos_id_corner_radius_default_l")) } - .margin({ top: $r("app.float.padding_or_margin_m") }) - .height($r('app.float.wh_value_56')) - .backgroundColor($r("app.color.white_bg_color")) - .borderRadius($r("sys.float.ohos_id_corner_radius_default_l")) } - .useSizeType({ - sm: { span: 4, offset: 0 }, - md: { span: 6, offset: 1 }, - lg: { span: 8, offset: 2 } - }) } - .width('100%') - .height('100%') + .margin({ left: $r('app.float.grid_row_margin'), right: $r('app.float.grid_row_margin') }) } .backgroundColor($r("sys.color.ohos_id_color_sub_background")) .width('100%') diff --git a/entry/src/main/ets/view/privacy/PrivacyProtectionListView.ets b/entry/src/main/ets/view/privacy/PrivacyProtectionListView.ets index 4edb558..9a98ebc 100644 --- a/entry/src/main/ets/view/privacy/PrivacyProtectionListView.ets +++ b/entry/src/main/ets/view/privacy/PrivacyProtectionListView.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,14 +20,13 @@ import MenuInfo from '../../common/bean/MenuInfo'; @Component export default struct PrivacyProtectionListView { - // 功能接入卡片的数据 + // Function access list data @Prop menuViewState: AutoMenuViewState; private itemClickEvent = (menuInfo: MenuInfo) => { }; build() { Column() { - //循环遍历渲染 List({ space: Constants.DEFAULT_SPACE }) { ForEach(this.menuViewState.listMenuList, (item: MenuInfo) => { ListItem() { diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index da5ec01..aaa1da4 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/main/resources/rawfile/advice_config.json b/entry/src/main/resources/rawfile/advice_config.json deleted file mode 100644 index 1d5e14a..0000000 --- a/entry/src/main/resources/rawfile/advice_config.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "primaryKey": "lock_screen_password", - "bundleName": "com.huawei.hmos.settings", - "category": "lock_screen_password", - "uxConfig": { - "titleRes": "app.string.category_title_lock_screen_password", - "contentRes": "app.string.category_desc_lock_screen_password", - "iconRes": "app.media.ic_lock_password", - "actionButtonRes": "app.string.button_go", - "ignoreButtonRes": "app.string.button_ignore" - }, - "urlConfig": { - "bundleName": "com.huawei.hmos.settings", - "abilityName": "com.huawei.hmos.settings.MainAbility", - "uri": "lock_screen_password_title", - "parameters": { - "pushParams": { - "action": "open_create_password_dialog" - } - } - }, - "otherConfig": { - "ignoreTimesKey": "ignoreLockScreenTimes", - "ignoreTimestampKey": "ignoreLockScreenSetTimes", - "priority": 300, - "riskLevel": "HIGH" - } - } -] \ No newline at end of file diff --git a/entry/src/main/resources/rawfile/default_policy.json b/entry/src/main/resources/rawfile/default_policy.json deleted file mode 100644 index c269b82..0000000 --- a/entry/src/main/resources/rawfile/default_policy.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "titleNameId": "privacy_protect_proposition", - "listType": "1", - "jumperType": "uri", - "uriResId": "privacy_protect_proposition_uri", - "bundleName": "", - "abilityName": "", - "ueParam": "1" - }, - { - "titleNameId": "consumer_business_privacy_statement", - "listType": "1", - "jumperType": "uri", - "uriResId": "consumer_business_privacy_statement_uri", - "bundleName": "", - "abilityName": "", - "ueParam": "2" - }, - { - "titleNameId": "cookies_policy", - "listType": "1", - "jumperType": "uri", - "uriResId": "cookies_policy_uri", - "bundleName": "", - "abilityName": "", - "ueParam": "3" - }, - { - "titleNameId": "privacy_and_security_certification", - "listType": "1", - "jumperType": "uri", - "uriResId": "privacy_and_security_certification_uri", - "bundleName": "", - "abilityName": "", - "ueParam": "4" - }, - { - "titleNameId": "more_privacy_protection_information", - "listType": "1", - "jumperType": "uri", - "uriResId": "more_privacy_protection_information_uri", - "bundleName": "", - "abilityName": "", - "ueParam": "5" - } -] \ No newline at end of file diff --git a/entry/src/main/resources/rawfile/menu_list_rule.json b/entry/src/main/resources/rawfile/menu_list_rule.json deleted file mode 100644 index 49ae467..0000000 --- a/entry/src/main/resources/rawfile/menu_list_rule.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "businessId": "lock_screen_password", - "bundleName": "com.huawei.hmos.passwordvault", - "priority": 9999 - }, - { - "businessId": "high_safe_mode", - "bundleName": "com.huawei.hmos.advsecmode", - "priority": 8888 - }, - { - "businessId": "data_and_privacy", - "bundleName": "com.huawei.hmos.security.privacycenter", - "priority": 7777 - }, - { - "businessId": "hw_ads_service", - "bundleName": "com.huawei.hmos.adsservice", - "priority": 6666 - } - -] \ No newline at end of file diff --git a/entry/src/main/resources/rawfile/ordering_rule.json b/entry/src/main/resources/rawfile/ordering_rule.json deleted file mode 100644 index 245f9be..0000000 --- a/entry/src/main/resources/rawfile/ordering_rule.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "cardRuleList": [ - { - "dstBundleName": "com.example.extensionabilitycard" - } - ], - "listRuleList": [ - { - "dstBundleName": "com.huawei.hmos.passwordvault" - }, - { - "dstBundleName": "com.huawei.hmos.advsecmode" - }, - { - "dstBundleName": "com.huawei.hmos.security.privacycenter" - }, - { - "dstBundleName": "com.huawei.hmos.adsservice" - } - ] -} \ No newline at end of file diff --git a/entry/src/main/resources/rawfile/searchConfig/searchPage.json b/entry/src/main/resources/rawfile/searchConfig/searchPage.json deleted file mode 100644 index fec0d59..0000000 --- a/entry/src/main/resources/rawfile/searchConfig/searchPage.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "searchPages": [ - { - "pageTitle": "string:privacy_ability_label", - "pageDescription": "Privacy and security", - "entryKey": "privacy_settings", - "params": "", - "searchItems": [ - { - "itemName": "Privacy and security", - "itemTitle": "$string:privacy_ability_label", - "itemDescription": "", - "icon": "" - }, - { - "itemName": "Permission Management", - "itemTitle": "$string:search_item_permission_management", - "itemDescription": "", - "icon": "" - } - ] - } - ] -} \ No newline at end of file diff --git a/entry/src/ohosTest/ets/test/Ability.test.ets b/entry/src/ohosTest/ets/test/Ability.test.ets index a31182e..0d49537 100644 --- a/entry/src/ohosTest/ets/test/Ability.test.ets +++ b/entry/src/ohosTest/ets/test/Ability.test.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/ohosTest/ets/test/List.test.ets b/entry/src/ohosTest/ets/test/List.test.ets index 27c8925..8b53dde 100644 --- a/entry/src/ohosTest/ets/test/List.test.ets +++ b/entry/src/ohosTest/ets/test/List.test.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/ohosTest/ets/test/Model.test.ets b/entry/src/ohosTest/ets/test/Model.test.ets index 86fe7eb..1f8ed70 100644 --- a/entry/src/ohosTest/ets/test/Model.test.ets +++ b/entry/src/ohosTest/ets/test/Model.test.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/ohosTest/ets/test/bean/BundleInfoBean.test.ets b/entry/src/ohosTest/ets/test/bean/BundleInfoBean.test.ets index 67f464c..e266f89 100644 --- a/entry/src/ohosTest/ets/test/bean/BundleInfoBean.test.ets +++ b/entry/src/ohosTest/ets/test/bean/BundleInfoBean.test.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/ohosTest/ets/test/bean/model/locationServicesImpl/LocationService.test.ets b/entry/src/ohosTest/ets/test/bean/model/locationServicesImpl/LocationService.test.ets index 1b62c14..e7013a6 100644 --- a/entry/src/ohosTest/ets/test/bean/model/locationServicesImpl/LocationService.test.ets +++ b/entry/src/ohosTest/ets/test/bean/model/locationServicesImpl/LocationService.test.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/ohosTest/ets/test/bean/model/locationServicesImpl/LocationViewModel.test.ets b/entry/src/ohosTest/ets/test/bean/model/locationServicesImpl/LocationViewModel.test.ets index e39833e..f754214 100644 --- a/entry/src/ohosTest/ets/test/bean/model/locationServicesImpl/LocationViewModel.test.ets +++ b/entry/src/ohosTest/ets/test/bean/model/locationServicesImpl/LocationViewModel.test.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/ohosTest/ets/test/common/Common.test.ets b/entry/src/ohosTest/ets/test/common/Common.test.ets index 3a700cf..55ed346 100644 --- a/entry/src/ohosTest/ets/test/common/Common.test.ets +++ b/entry/src/ohosTest/ets/test/common/Common.test.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -51,16 +51,14 @@ export default function BundleInfoBeanTest() { getSelfBundleInfoUtils.getVersionName() }) it('HiSysEventUtilTest', 0, () => { - HiSysEventUtil.reportAppPermJumpMorePerm('com.example.test', '1.0.0'); - HiSysEventUtil.reportAppPermissionJumpPage('com.example.test', '1.0.0', 'ohos.permission.Location'); - HiSysEventUtil.reportUpdateAppPermissionGroupState('com.example.test', '1.0.0', 'ohos.permission.Location', 'ALLOW', 1, 1) HiSysEventUtil.reportAccessClick('com.example.test'); - HiSysEventUtil.reportDataPrivacyClick('test'); - + HiSysEventUtil.reportLocationClick('LOCATION'); + HiSysEventUtil.reportLocationFlagClick(1); + HiSysEventUtil.reportLocationFlagClick(0); let eventParams: Record = { "PERMISSION_GROUP": 'ohos.permission.Location' } - HiSysEventUtil.reportClick(HiSysEventConstant.PERMISSION_PAGE_SEARCH_EVENT_NAME, eventParams) + HiSysEventUtil.reportClick(HiSysEventConstant.PERMISSION_PAGE_LOCATION_EVENT_NAME, eventParams) }) it('RawfileUtilTest', 0, () => { diff --git a/entry/src/ohosTest/ets/test/model/CheckedStateParameter.ets b/entry/src/ohosTest/ets/test/model/CheckedStateParameter.ets index 534a016..1436a69 100644 --- a/entry/src/ohosTest/ets/test/model/CheckedStateParameter.ets +++ b/entry/src/ohosTest/ets/test/model/CheckedStateParameter.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,16 +13,16 @@ * limitations under the License. */ -//检查的状态参数。用于设置应用权限组检查状态 -// 这是应用权限组的状态部分,仅包含选中的状态和权限组标志 +// Check the status parameters. Used to set application permission group check status +// This is the status section of the application permission group, which only includes the selected status and permission group flag export class CheckedStateParameter { - // 权限组检查状态 - // 有效的权限状态:ALLOW,ALLOW_ALL_THE_TIME,ALLOW_ONLY_WHILE_IN_USE,ASK_EACH_TIME,DENY, + // Permission group check status + // Valid permission status:ALLOW,ALLOW_ALL_THE_TIME,ALLOW_ONLY_WHILE_IN_USE,ASK_EACH_TIME,DENY, // MEDIA_ONLY,ALLOW_MANAGEMENT_OF_ALL_FILES checkedState: string; - // 附加标志 + // Additional signs flagMask: number; - // 附加标志 + // Additional signs flagValue: number; constructor(checkedState: string, flagMask: number, flagValue: number) { diff --git a/entry/src/ohosTest/ets/testability/TestAbility.ets b/entry/src/ohosTest/ets/testability/TestAbility.ets index c9c75ef..48f4545 100644 --- a/entry/src/ohosTest/ets/testability/TestAbility.ets +++ b/entry/src/ohosTest/ets/testability/TestAbility.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/ohosTest/ets/testability/pages/Index.ets b/entry/src/ohosTest/ets/testability/pages/Index.ets index 5838517..bb12e91 100644 --- a/entry/src/ohosTest/ets/testability/pages/Index.ets +++ b/entry/src/ohosTest/ets/testability/pages/Index.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts b/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts index de2144d..9a7ed07 100644 --- a/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts +++ b/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/entry/src/ohosTest/module.json5 b/entry/src/ohosTest/module.json5 index 77b031d..9aa0b1b 100644 --- a/entry/src/ohosTest/module.json5 +++ b/entry/src/ohosTest/module.json5 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/hvigor/hvigor-config.json5 b/hvigor/hvigor-config.json5 index 0553286..e3cfb29 100644 --- a/hvigor/hvigor-config.json5 +++ b/hvigor/hvigor-config.json5 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,15 +19,12 @@ "@ohos/hvigor-ohos-plugin": "3.0.9" }, "execution": { - // "daemon": true, /* Enable daemon compilation. Default: true */ - // "incremental": true, /* Enable incremental compilation. Default: true */ - // "parallel": true, /* Enable parallel compilation. Default: true */ - // "typeCheck": false, /* Enable typeCheck. Default: false */ + }, "logging": { - // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, "debugging": { - // "stacktrace": false /* Disable stacktrace compilation. Default: false */ + } } diff --git a/hvigor/hvigor-wrapper.js b/hvigor/hvigor-wrapper.js index 3f6712c..110b32e 100644 --- a/hvigor/hvigor-wrapper.js +++ b/hvigor/hvigor-wrapper.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/hvigorfile.ts b/hvigorfile.ts index b42d9d5..d911c06 100644 --- a/hvigorfile.ts +++ b/hvigorfile.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/hvigorw b/hvigorw index c73e4f2..1f1f5e5 100644 --- a/hvigorw +++ b/hvigorw @@ -1,4 +1,4 @@ - # Copyright (c) 2022-2023 Huawei Device Co., Ltd. + # Copyright (c) 2024-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/hvigorw.bat b/hvigorw.bat index 15c8246..8459f3e 100644 --- a/hvigorw.bat +++ b/hvigorw.bat @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/oh-package-lock.json5 b/oh-package-lock.json5 index 00275fd..d4b280e 100644 --- a/oh-package-lock.json5 +++ b/oh-package-lock.json5 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + { "lockfileVersion": 1, "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", diff --git a/oh-package.json5 b/oh-package.json5 index c2f75b1..6742eaa 100644 --- a/oh-package.json5 +++ b/oh-package.json5 @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2024-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "license": "", "devDependencies": {