diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/.gitignore b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/.gitignore
deleted file mode 100644
index b297692bedf04c7870a547564251df6228c9c74b..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/.gitignore
+++ /dev/null
@@ -1,21 +0,0 @@
-*.iml
-.gradle
-/local.properties
-/.idea/caches
-/.idea/libraries
-/.idea/modules.xml
-/.idea/workspace.xml
-/.idea/navEditor.xml
-/.idea/assetWizardSettings.xml
-.DS_Store
-/build
-/captures
-.externalNativeBuild
-/entry/.preview
-.cxx
-/node_modules
-**/.gradle
-**/.idea
-
-/.idea/previewer/phone/
-/.idea/previewer/previewConfigV2.json
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/build.gradle b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/build.gradle
deleted file mode 100644
index 924a888a108e0af16c918e3b049937f48089a7bf..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/build.gradle
+++ /dev/null
@@ -1,33 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-apply plugin: 'com.huawei.ohos.app'
-
-//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
-ohos {
- compileSdkVersion 7
-}
-
-buildscript {
- repositories {
- maven {
- url 'https://repo.huaweicloud.com/repository/maven/'
- }
- maven {
- url 'https://developer.huawei.com/repo/'
- }
- }
- dependencies {
- classpath 'com.huawei.ohos:hap:3.0.5.2'
- classpath 'com.huawei.ohos:decctest:1.2.7.2'
- }
-}
-
-allprojects {
- repositories {
- maven {
- url 'https://repo.huaweicloud.com/repository/maven/'
- }
- maven {
- url 'https://developer.huawei.com/repo/'
- }
- }
-}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/.gitignore b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/.gitignore
deleted file mode 100644
index 7d5b7a94f4dcf381f03ff21f28f8a2494b58023f..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/build
-/node_modules
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/build.gradle b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/build.gradle
deleted file mode 100644
index 0f0156791bf6048a230e13abccb9d631170209dc..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/build.gradle
+++ /dev/null
@@ -1,26 +0,0 @@
-apply plugin: 'com.huawei.ohos.hap'
-apply plugin: 'com.huawei.ohos.decctest'
-//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
-ohos {
- compileSdkVersion 7
- defaultConfig {
- compatibleSdkVersion 7
- }
- buildTypes {
- release {
- proguardOpt {
- proguardEnabled false
- rulesFiles 'proguard-rules.pro'
- }
- }
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
- testImplementation 'junit:junit:4.13.1'
- ohosTestImplementation 'com.huawei.ohos.testkit:runner:2.0.0.200'
-}
-decc {
- supportType = ['html','xml']
-}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/package.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/package.json
deleted file mode 100644
index 0967ef424bce6791893e9a57bb952f80fd536e93..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/package.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/config.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/config.json
deleted file mode 100644
index 693761dd8bf03aff34dbe94c254317ec2315855a..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/config.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.myapplication",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.myapplication",
- "name": ".MyApplication",
- "mainAbility": "com.example.myapplication.GrantAbility",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "portrait",
- "visible": true,
- "name": "com.example.myapplication.GrantAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "mode": {
- "syntax": "ets",
- "type": "pageAbility"
- },
- "pages": [
- "pages/dialog",
- "pages/dialogPlus"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/app.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/app.ets
deleted file mode 100644
index 2a3b6238737330f469fc124b0669aacd9a376056..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/app.ets
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export default {
- onCreate() {
- console.info('Application onCreate')
- },
- onDestroy() {
- console.info('Application onDestroy')
- },
-}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/common/components/dialog.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/common/components/dialog.ets
deleted file mode 100644
index 4c1632976531962cc1e52b52b4e8b62210c50895..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/common/components/dialog.ets
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 { dialogData } from "../model/dialogDataList.ets"
-
-@Extend(Button) function customizeButton() {
- .backgroundColor($r('app.color.default_background_color'))
- .fontColor($r('app.color.button_color'))
-}
-
-@CustomDialog
-export struct spaceDialog {
- controller: CustomDialogController
- cancel: () => void
- confirm: () => void
-
- build() {
- Column() {
- Image($r('app.media.ic_nearby'))
- .width(24)
- .height(24)
- .margin({
- top: 24
- })
- Column() {
- Row() {
- Flex({ justifyContent: FlexAlign.Start }) {
- Text('是否允许“XX”查找、连接附近设备?').fontSize(16)
- .margin({
- top: 16,
- left: 24
- })
- }
- }
- Row() {
- Flex({ justifyContent: FlexAlign.Start }) {
- Text('用于XXXX。').fontSize(14)
- .fontColor($r('app.color.secondary_font_color'))
- .margin({
- top: 2,
- left: 24
- })
- }
- }
- }
- Row() {
- Flex({ justifyContent: FlexAlign.SpaceAround }) {
- Button('禁止')
- .fontSize(16)
- .onClick(() => {
- this.controller.close()
- this.cancel()
- }).customizeButton()
- Text('|').fontSize(30).fontColor($r('app.color.divider_color'))
- Button('允许')
- .fontSize(16)
- .onClick(() => {
- this.controller.close()
- this.confirm()
- }).customizeButton()
- }.margin({
- top: 8
- })
- }
- }
- .backgroundColor($r('app.color.default_background_color'))
- .borderRadius(24)
- .height(170)
- .width(336)
- }
-}
-
-@CustomDialog
-export struct privacyDialog {
- @Prop count: number
- controller: CustomDialogController
- cancel: () => void
- confirm: () => void
-
- build() {
- Column() {
- if (this.count < dialogData.length) {
- Image(dialogData[this.count].icon)
- .width(24)
- .height(24)
- .margin({
- top: 24
- })
- Text(`${this.count + 1} / ${dialogData.length}`)
- .fontSize(14)
- .fontColor($r('app.color.secondary_font_color'))
- .margin({
- top: 2
- })
- Column() {
- Row() {
- Flex({ justifyContent: FlexAlign.Start }) {
- Text(dialogData[this.count].message1).fontSize(16)
- .margin({
- top: 16,
- left: 24
- })
- }
- }
- Row() {
- Flex({ justifyContent: FlexAlign.Start }) {
- Text(dialogData[this.count].message2).fontSize(14)
- .fontColor($r('app.color.secondary_font_color'))
- .margin({
- top: 2,
- left: 24
- })
- }
- }
- }
- }
- Row() {
- Flex({ justifyContent: FlexAlign.SpaceAround }) {
- Button('禁止')
- .fontSize(16)
- .onClick(() => {
- this.cancel()
- if (this.count === dialogData.length) {
- this.controller.close()
- }
- }).customizeButton()
- Text('|').fontSize(30).fontColor($r('app.color.divider_color'))
- Button('允许')
- .fontSize(16)
- .onClick(() => {
- this.confirm()
- if (this.count === dialogData.length) {
- this.controller.close()
- }
- }).customizeButton()
- }.margin({
- top: 8
- })
- }
- }
- .backgroundColor($r('app.color.default_background_color'))
- .borderRadius(24)
- .height(186)
- .width(336)
- }
-}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/common/model/dialogDataList.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/common/model/dialogDataList.ets
deleted file mode 100644
index f3c5572c29b23cfd870c8b0289ba932924127e42..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/common/model/dialogDataList.ets
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export const dialogData: any[] = [
- { 'name': '权限1', 'index': 1, 'message1': '内容1','message2': '内容一', 'icon': $r("app.media.ic_exercise") },
- { 'name': '权限2', 'index': 2, 'message1': '内容2','message2': '内容二', 'icon': $r("app.media.ic_exercise") },
- { 'name': '权限3', 'index': 3, 'message1': '内容3','message2': '内容三', 'icon': $r("app.media.ic_exercise") },
- { 'name': '权限4', 'index': 4, 'message1': '内容4','message2': '内容四', 'icon': $r("app.media.ic_exercise") }
-]
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/pages/dialogPlus.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/pages/dialogPlus.ets
deleted file mode 100644
index b8e8718d35af447390b1eacbdb65d72a11ec9f85..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/pages/dialogPlus.ets
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 { privacyDialog } from "../common/components/dialog.ets"
-import { dialogData } from "../common/model/dialogDataList.ets"
-
-@Entry
-@Component
-struct dialogPlusPage {
- @State count: number = 0
- privacyDialogController: CustomDialogController = new CustomDialogController({
- builder: privacyDialog({ cancel: this.privacyCancel, confirm: this.privacyAccept, count:this.count }),
- cancel: this.privacyExist,
- autoCancel: true,
- alignment: DialogAlignment.Bottom,
- offset: { dx: 0 , dy: -12 },
- customStyle: true
- })
- privacyAccept() {
- this.count < dialogData.length ? this.count += 1 : this.count = 0
- console.info('accept ' + this.count)
-
- }
- privacyCancel() {
- if (this.count < dialogData.length) {
- this.count += 1
- } else {
- this.count = 0
- }
- console.info('cancel' + this.count)
-
- }
- privacyExist() {
- console.info("exist")
- }
- aboutToAppear() {
- this.privacyDialogController.open()
- }
- build() {
- }
-}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/ar/properties/string.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/ar/properties/string.json
deleted file mode 100644
index c3a6df19ca632072f943b0fba85ac22aec902416..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/ar/properties/string.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "strings": {
- "app_name": "CategoryPage",
- "describe": "describe",
- "category": "Category",
- "itemChild": "ItemChild",
- "item": "Item",
- "search": "search...",
- "you_search": "You search ",
- "you_clicked": "You clicked ",
- "tab": "Tab",
- "more": "< more"
- }
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/dark/properties/string.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/dark/properties/string.json
deleted file mode 100644
index ddc52a17f97a258671b91d1f14330a673df33285..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/dark/properties/string.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "colors": {
- "colorSubBackground": "#000000",
- "appbar_subtitle_color": "#99ffffff",
- "text_color": "#ffffff"
- }
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/default/media/icon_actived.png b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/default/media/icon_actived.png
deleted file mode 100644
index 49991d108d51f1803ff3dcadc8870d69977908e7..0000000000000000000000000000000000000000
Binary files a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/default/media/icon_actived.png and /dev/null differ
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/default/media/icon_normal.png b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/default/media/icon_normal.png
deleted file mode 100644
index cdf5bb49392dfce97ea9fa1be0ace95715903498..0000000000000000000000000000000000000000
Binary files a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/default/media/icon_normal.png and /dev/null differ
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/default/properties/string.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/default/properties/string.json
deleted file mode 100644
index 127f01aeb3e034b0bc10cfdb98e59160afc9f5de..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/default/properties/string.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "strings": {
- "app_name": "CategoryPage",
- "describe": "describe",
- "category": "Category",
- "itemChild": "ItemChild",
- "item": "Item",
- "search": "search...",
- "you_search": "You search ",
- "you_clicked": "You clicked ",
- "tab": "Tab",
- "more": "more >"
- },
- "colors": {
- "colorSubBackground": "#f1f3f5",
- "appbar_subtitle_color": "#99000000",
- "text_color": "#000000"
- }
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/en/properties/string.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/en/properties/string.json
deleted file mode 100644
index 319b5d66eabfb2e956923d29ef1f267e48bafbc8..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/en/properties/string.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "strings": {
- "app_name": "CategoryPage",
- "describe": "describe",
- "category": "Category",
- "itemChild": "ItemChild",
- "item": "Item",
- "search": "search...",
- "you_search": "You search ",
- "you_clicked": "You clicked ",
- "tab": "Tab",
- "more": "more >"
- }
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/light/properties/string.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/light/properties/string.json
deleted file mode 100644
index 4b9482c8f2954ce8b38cb37addef4d297b33a279..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/light/properties/string.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "colors": {
- "colorSubBackground": "#f1f3f5",
- "appbar_subtitle_color": "#99000000",
- "text_color": "#000000"
- }
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/zh/properties/string.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/zh/properties/string.json
deleted file mode 100644
index 4ca364c6261d5db6919dbaf791b5432bc0c7e0da..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/resources/zh/properties/string.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "strings": {
- "app_name": "分类页",
- "describe": "描述",
- "category": "分类",
- "itemChild": "子类",
- "item": "类型",
- "search": "搜索...",
- "you_search": "你搜索了",
- "you_clicked": "你点击了",
- "tab": "分页",
- "more": "更多 >"
- }
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/element/color.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/element/color.json
deleted file mode 100644
index 3477227c1b62449eb58f468a80352382ace8786e..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/element/color.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "color": [
- {
- "name": "divider_color",
- "value": "#f3f4f6"
- },
- {
- "name": "default_background_color",
- "value": "#ffffff"
- },
- {
- "name": "button_color",
- "value": "#0a59f7"
- },
- {
- "name": "secondary_font_color",
- "value": "#808080"
- }
- ]
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/element/string.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/element/string.json
deleted file mode 100644
index 319332fcdae89b2ab2aeb1b57fc7c9beb0cde757..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "mainability_description",
- "value": "ETS_Category Ability"
- }
- ]
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/media/ic_exercise.svg b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/media/ic_exercise.svg
deleted file mode 100644
index b488a424376659859601df4743a9293877be0e1e..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/media/ic_exercise.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/media/ic_nearby.svg b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/media/ic_nearby.svg
deleted file mode 100644
index 4b201c865105325c085d7c761baef6087e4e57d3..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/media/ic_nearby.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/media/icon.png b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/media/icon.png
deleted file mode 100644
index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000
Binary files a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/resources/base/media/icon.png and /dev/null differ
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/gradle.properties b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/gradle.properties
deleted file mode 100644
index 1b57260a6277efaa592ab3c7f9f49601d3478a82..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/gradle.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. DevEco Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-# If the Chinese output is garbled, please configure the following parameter.
-# This function is enabled by default when the DevEco Studio builds the hap/app,if you need disable gradle parallel,you should set org.gradle.parallel false.
-# more information see https://docs.gradle.org/current/userguide/performance.html
-# org.gradle.parallel=false
-# org.gradle.jvmargs=-Dfile.encoding=GBK
-android.overridePathCheck=true
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/gradlew b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/gradlew
deleted file mode 100644
index 7d39bb885b8d60f4d29879de526ecf01af81dcfe..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/gradlew
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright (c) 2021 Huawei Device Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/gradlew.bat b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/gradlew.bat
deleted file mode 100644
index acdc32e2dae3e8e42e391878d96766acce16af0a..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/gradlew.bat
+++ /dev/null
@@ -1,103 +0,0 @@
-@rem
-@rem Copyright (c) 2021 Huawei Device Co., Ltd.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem http://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/settings.gradle b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/settings.gradle
deleted file mode 100644
index 4773db73233a570c2d0c01a22e75321acfbf7a07..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include ':entry'
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/build.gradle b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/build.gradle
index 924a888a108e0af16c918e3b049937f48089a7bf..1a5f01714f24ceb8bfa91af60357eac583c9160f 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/build.gradle
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/build.gradle
@@ -3,6 +3,17 @@ apply plugin: 'com.huawei.ohos.app'
//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {
+ signingConfigs {
+ release {
+ storeFile file('D:\\myKey\\myApplication.p12')
+ storePassword '00000019158AC866FF55373F18ED315DEED8BB1B9C4423EEA7DA65E15E2C670DCF82991936587199A8'
+ keyAlias = 'fcx_app'
+ keyPassword '000000194B2CB7E4FF552AC3A6435D0061BD7A5A5357AECE4EDAD989D1B61DFEF758FCAB0B9DAADD63'
+ signAlg = 'SHA256withECDSA'
+ profile file('D:\\myKey\\myApplication_ohos_Provision.p7b')
+ certpath file('D:\\myKey\\myApplication_ohos.cer')
+ }
+ }
compileSdkVersion 7
}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/config.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/config.json
index 8de07a3831fe909d352da9702b6046abec221665..8b2995420f8c56723c50882c254c13b743349d32 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/config.json
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/config.json
@@ -41,6 +41,26 @@
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
+ },
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "portrait",
+ "visible": true,
+ "name": "com.example.myapplication.GrantAbility",
+ "icon": "$media:icon",
+ "description": "$string:mainability_description",
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
}
],
"js": [
@@ -56,7 +76,10 @@
"pages/app-name",
"pages/location-info",
"pages/app-name-plus",
- "pages/other-permissions"
+ "pages/other-permissions",
+ "pages/calendar",
+ "pages/dialog",
+ "pages/dialogPlus"
],
"name": "default",
"window": {
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/alphabeticalIndex.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/alphabeticalIndex.ets
index d4332cdc6738c474baaaf955c180f70454a1443e..98e91a0d4adae61c993ab815bda7e5463aa10023 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/alphabeticalIndex.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/alphabeticalIndex.ets
@@ -34,7 +34,7 @@ export struct alphabetIndexerComponent {
}
build() {
- Flex({ justifyContent: FlexAlign.End }) {
+ Flex({ justifyContent: FlexAlign.Start }) {
AlphabetIndexer({ ArrayValue: this.value, selected: this.alphabeticalIndex })
.selectedColor(0xffffff) // 选中颜色
.popupColor(0xFFFAF0) // 弹出框颜色
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/backBar.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/backBar.ets
index a5d8ff6da31c11e277e5da0860be2e2b41d13e65..cb999982bc5b72ec6d31f49ac1d779750e0493e0 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/backBar.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/backBar.ets
@@ -65,7 +65,6 @@ export struct backBar {
}
}
}
- .width(360)
.height(56)
.constraintSize({ minHeight: "56vp" })
.alignItems(HorizontalAlign.Start)
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/category.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/category.ets
deleted file mode 100644
index 5fb0927b50905b452bfcdcbdbceb4eb19d9258f0..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/category.ets
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 { categoryListItem } from "../model/categoryList.ets"
-
-@Component
-export struct categoryPage {
- build() {
- Column() {
- categoryList({
- categoryListItem: categoryListItem,
- })
- }
- }
-}
-
-@Component
-struct categoryList {
- private categoryListItem: any[]
- @State color: string[] = [
- "#ffffff",
- "#ffffff",
- "#ffffff",
- "#ffffff",
- "#ffffff",
- "#ffffff",
- "#ffffff",
- "#e5f3ff",
- "#ffffff",
- "#ffffff",
- "#ffffff"
- ]
- private listState: number = 0
-
- build() {
- Column() {
- List() {
- ForEach(this.categoryListItem, (item) => {
- ListItem() {
- Column() {
- Row() {
- Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
- Image(item.image)
- .objectFit(ImageFit.Contain)
- .height(25)
- .width(25)
- .margin({
- left: "10vp",
- right: "15vp"
- })
- Text(item.name)
- .fontSize("18vp")
- .fontColor($r('app.color.text_color'))
- .flexGrow(1)
- Image(item.icon)
- .objectFit(ImageFit.Contain)
- .height(20)
- .width(20)
- }
- }.margin({
- top: '16vp'
- }
- )
- Row() {
- Column()
- .backgroundColor($r('app.color.text_decoration_color'))
- .width('100%')
- .height('2vp')
- .margin({
- top: '10vp',
- left: '24%'
- })
- }
- }
- .backgroundColor(this.color[item.index - 1])
- .width('100%')
- .height('10%')
- .borderRadius('25px')
- .margin({
- bottom: '10vp'
- })
- .onClick(() => {
- if (this.color[item.index - 1] == "#ffffff") {
- for (var i = 0; i < this.color.length; i++) {
- if (i == item.index - 1) {
- this.color[i] = "#e5f3ff"
- } else {
- this.color[i] = "#ffffff"
- }
- }
- }
- this.listState = item.index - 1;
- console.debug("you click" + this.listState)
- })
- }
- }, item => item.index.toString())
- }.width('40%')
- Divider()
- .vertical(true)
- .color($r('app.color.divider_color'))
- .width('2vp')
- .margin({
- top: "8vp",
- bottom: "8vp"
- })
- }.useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
- }
-}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/dialog.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/dialog.ets
index 5aba069938c482cb10c17ada24de4753d3aef207..689f130db9178554e3fccc8902b89d88fba3e862 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/dialog.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/dialog.ets
@@ -14,42 +14,14 @@
*/
import { dialogData } from "../model/dialogDataList.ets"
+import { permissionGroups, groups } from "../model/permissionGroup.ets"
+import bundle from '@ohos.bundle';
@Extend(Button) function customizeButton() {
.backgroundColor($r('app.color.default_background_color'))
.fontColor($r('app.color.button_color'))
}
-@CustomDialog
-export struct positionDialog {
- @Link messageList: string[]
- controller: CustomDialogController
- cancel: () => void
- confirm: () => void
-
- build() {
- Column() {
- Text('是否开启定位服务?').width('45%').fontSize(16).margin({ top: 20, bottom: 10 })
- Flex({ justifyContent: FlexAlign.SpaceAround }) {
- Button('禁止')
- .onClick(() => {
- this.controller.close()
- this.cancel()
- }).customizeButton()
- Text('|').fontSize(25).fontColor($r('app.color.divider_color')).margin({ top: 3 })
- Button('允许')
- .onClick(() => {
- this.controller.close()
- this.confirm()
- }).customizeButton()
- }.margin({ bottom: 10 })
- }.backgroundColor($r('app.color.default_background_color'))
- .borderRadius(24)
- .height(100)
- .width(336)
- }
-}
-
@CustomDialog
export struct spaceDialog {
controller: CustomDialogController
@@ -58,7 +30,7 @@ export struct spaceDialog {
build() {
Column() {
- Image($r('app.media.ic_nearby'))
+ Image($r('app.media.ic_ssensor'))
.width(24)
.height(24)
.margin({
@@ -67,7 +39,7 @@ export struct spaceDialog {
Column() {
Row() {
Flex({ justifyContent: FlexAlign.Start }) {
- Text('是否允许“XX”查找、连接附近设备?').fontSize(16)
+ Text('是否允许“XX”使用身体传感器?').fontSize(16)
.margin({
top: 16,
left: 24
@@ -118,17 +90,18 @@ export struct privacyDialog {
controller: CustomDialogController
cancel: () => void
confirm: () => void
+ @State permissionList: Array = []
build() {
Column() {
- if (this.count < dialogData.length) {
+ if (this.count < this.permissionList.length) {
Image(dialogData[this.count].icon)
.width(24)
.height(24)
.margin({
top: 24
})
- Text(`${this.count + 1} / ${dialogData.length}`)
+ Text(`${this.count + 1} / ${this.permissionList.length}`)
.fontSize(14)
.fontColor($r('app.color.secondary_font_color'))
.margin({
@@ -137,7 +110,7 @@ export struct privacyDialog {
Column() {
Row() {
Flex({ justifyContent: FlexAlign.Start }) {
- Text(dialogData[this.count].message1).fontSize(16)
+ Text("是否允许该应用访问" + this.current().groupName).fontSize(16)
.margin({
top: 16,
left: 24
@@ -146,7 +119,7 @@ export struct privacyDialog {
}
Row() {
Flex({ justifyContent: FlexAlign.Start }) {
- Text(dialogData[this.count].message2).fontSize(14)
+ Text("用于" + this.current().description).fontSize(14)
.fontColor($r('app.color.secondary_font_color'))
.margin({
top: 2,
@@ -162,18 +135,22 @@ export struct privacyDialog {
.fontSize(16)
.onClick(() => {
this.cancel()
- if (this.count === dialogData.length) {
- this.controller.close()
- }
+ setTimeout(() => {
+ if (this.count === this.permissionList.length) {
+ this.controller.close()
+ }
+ }, 1)
}).customizeButton()
Text('|').fontSize(30).fontColor($r('app.color.divider_color'))
Button('允许')
.fontSize(16)
.onClick(() => {
this.confirm()
- if (this.count === dialogData.length) {
- this.controller.close()
- }
+ setTimeout(() => {
+ if (this.count === this.permissionList.length) {
+ this.controller.close()
+ }
+ }, 1)
}).customizeButton()
}.margin({
top: 8
@@ -185,4 +162,16 @@ export struct privacyDialog {
.height(186)
.width(336)
}
+ current() {
+ var current = this.permissionList[this.count]
+ var permission = permissionGroups.filter(item => item.name == current)
+ var group = groups.filter(item => item.name == permission[0].group)
+ return group[0]
+ }
+
+ aboutToAppear() {
+ bundle.getApplicationInfo('com.example.myapplication', 0x00000000, 0).then(res => {
+ this.permissionList = res.permissions
+ })
+ }
}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/search.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/search.ets
index 79ccd94966a7697e78ee12bb14ca59612af68865..30b56968979742fbf52c4a23c42642e455c2380b 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/search.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/search.ets
@@ -23,12 +23,11 @@ export struct textInput {
.padding({ left: 36 })
.type(InputType.Normal)
.border({ radius: 20 })
- .placeholderColor($r('app.color.secondary_font_color'))
+ .placeholderColor($r('app.color.default_background_color'))
.placeholderFont({ size: '16vp', weight: FontWeight.Normal, family: "sans-serif", style: FontStyle.Normal })
.caretColor($r('app.color.secondary_font_color'))
.backgroundColor($r('app.color.default_background_color'))
.height(40)
- .width(324)
.onChange((value: string) => {
})
@@ -43,7 +42,7 @@ export struct textInput {
.objectFit(ImageFit.Contain)
.width(16)
.height(16)
- .margin({ left: -312, top: 12 })
+ .margin({ left: -300, top: 12 })
}
}
}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/titleBar.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/titleBar.ets
deleted file mode 100644
index cb0cfa744fee5c69d54a0b8761875ab879be954a..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/components/titleBar.ets
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-@Component
-export struct titleBar {
- build() {
- Column() {
- Text($r('app.string.settings'))
- .fontColor($r('app.color.title_text_color'))
- .fontSize("24fp")
- .margin({
- left: "14vp",
- right: "24vp",
- top: "12vp"
- })
- }
- .useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
- .width('40%')
- .height(56)
- .constraintSize({ minHeight: "56vp" })
- .alignItems(HorizontalAlign.Start)
- .backgroundColor($r('app.color.background_color'))
- }
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/authorityManagementList.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/authorityManagementList.ets
index bf8f8bc76922b1b179c9d5d467904e1de4a60f0d..f24fa36e97744f91d87a92dda960ed35e920049f 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/authorityManagementList.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/authorityManagementList.ets
@@ -19,24 +19,11 @@ export const authorityListItem: any[] = [
{ 'name': '麦克风', 'index': 3, 'image': $r('app.media.ic_public_voice'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
]
export const messageListItem: any[] = [
- { 'name': '电话', 'index': 1, 'image': $r('app.media.ic_public_phone'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '信息', 'index': 2, 'image': $r('app.media.ic_public_message'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '通讯录', 'index': 3, 'image': $r('app.media.ic_public_contacts_group'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '通话记录', 'index': 4, 'image': $r('app.media.ic_call_logs'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '媒体和文件', 'index': 5, 'image': $r('app.media.ic_public_folder'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '日历', 'index': 6, 'image': $r('app.media.ic_public_calendar'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '健身运动', 'index': 7, 'image': $r('app.media.ic_sport'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '身体传感器', 'index': 8, 'image': $r('app.media.ic_ssensor'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '附近设备', 'index': 9, 'image': $r('app.media.ic_nearby'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' }
-]
-export const appInstallListItem: any[] = [
- { 'name': '已安装应用列表', 'index': 1, 'image': $r('app.media.in_app_installations'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '应用内安装其他应用', 'index': 2, 'image': $r('app.media.in_app_installations'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '创建桌面快捷方式', 'index': 3, 'image': $r('app.media.ic_forward'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
- { 'name': '悬浮窗', 'index': 4, 'image': $r('app.media.ic_dropzone'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' }
-]
-export const otherPermissionsListItem: any[] = [
- { 'name': '其他权限', 'index': 1, 'image': $r('app.media.ic_more'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' }
+ { 'name': '媒体和文件', 'index': 1, 'image': $r('app.media.ic_public_folder'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
+ { 'name': '日历', 'index': 2, 'image': $r('app.media.ic_public_calendar'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
+ { 'name': '健身运动', 'index': 3, 'image': $r('app.media.ic_sport'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
+ { 'name': '身体传感器', 'index': 4, 'image': $r('app.media.ic_ssensor'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
+ { 'name': '多设备协同', 'index': 5, 'image': $r('app.media.ic_dropzone'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' }
]
export const applicationListItem: any[] = [
{ 'name': '备忘录', 'index': 1, 'image': $r('app.media.beiwanglu'), 'message': '6项权限', 'icon': $r('app.media.rightarrow'), alphabeticalIndex: 'B' },
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/definePermission.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/definePermission.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3ec8b5776f9210bdec2d3abcb2924b3f9e337181
--- /dev/null
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/definePermission.ets
@@ -0,0 +1,753 @@
+/*
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export const definePermissions: any[] = [
+ {
+ "name": "ohos.permission.ANSWER_CALL",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_answer_call",
+ "description": "$string:ohos_desc_answer_call"
+ },
+ {
+ "name": "ohos.permission.USE_BLUETOOTH",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.DISCOVER_BLUETOOTH",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.MANAGE_BLUETOOTH",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.INTERNET",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_internet",
+ "description": "$string:ohos_desc_internet"
+ },
+ {
+ "name": "ohos.permission.MODIFY_AUDIO_SETTINGS",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_modify_audio_settings",
+ "description": "$string:ohos_desc_modify_audio_settings"
+ },
+ {
+ "name": "ohos.permission.READ_CALENDAR",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_read_calendar",
+ "description": "$string:ohos_desc_read_calendar"
+ },
+ {
+ "name": "ohos.permission.READ_CALL_LOG",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_read_call_log",
+ "description": "$string:ohos_desc_read_call_log"
+ },
+ {
+ "name": "ohos.permission.READ_CELL_MESSAGES",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_read_cell_messages",
+ "description": "$string:ohos_desc_read_cell_messages"
+ },
+ {
+ "name": "ohos.permission.READ_CONTACTS",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_read_contacts",
+ "description": "$string:ohos_desc_read_contacts"
+ },
+ {
+ "name": "ohos.permission.GET_TELEPHONY_STATE",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_get_telephony_state",
+ "description": "$string:ohos_desc_get_telephony_state"
+ },
+ {
+ "name": "ohos.permission.READ_MESSAGES",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_read_messages",
+ "description": "$string:ohos_desc_read_messages"
+ },
+ {
+ "name": "ohos.permission.RECEIVE_MMS",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_receive_mms",
+ "description": "$string:ohos_desc_receive_mms"
+ },
+ {
+ "name": "ohos.permission.RECEIVE_SMS",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_receive_sms",
+ "description": "$string:ohos_desc_receive_sms"
+ },
+ {
+ "name": "ohos.permission.RECEIVE_WAP_MESSAGES",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_receive_wap_messages",
+ "description": "$string:ohos_desc_receive_wap_messages"
+ },
+ {
+ "name": "ohos.permission.MICROPHONE",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_microphone",
+ "description": "$string:ohos_desc_microphone"
+ },
+ {
+ "name": "ohos.permission.SEND_MESSAGES",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_send_messages",
+ "description": "$string:ohos_desc_send_messages"
+ },
+ {
+ "name": "ohos.permission.WRITE_CALENDAR",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_write_calendar",
+ "description": "$string:ohos_desc_write_calendar"
+ },
+ {
+ "name": "ohos.permission.WRITE_CALL_LOG",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_write_call_log",
+ "description": "$string:ohos_desc_write_call_log"
+ },
+ {
+ "name": "ohos.permission.WRITE_CONTACTS",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_write_contacts",
+ "description": "$string:ohos_desc_write_contacts"
+ },
+ {
+ "name": "ohos.permission.DISTRIBUTED_DATASYNC",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": true,
+ "label": "$string:ohos_lab_distributed_datasync",
+ "description": "$string:ohos_desc_distributed_datasync"
+ },
+ {
+ "name": "ohos.permission.MANAGE_VOICEMAIL",
+ "grantMode": "user_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_manage_voicemail",
+ "description": "$string:ohos_desc_manage_voicemail"
+ },
+ {
+ "name": "ohos.permission.REQUIRE_FORM",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.LOCATION_IN_BACKGROUND",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": false,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_location_in_background",
+ "description": "$string:ohos_desc_location_in_background"
+ },
+ {
+ "name": "ohos.permission.LOCATION",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": true,
+ "label": "$string:ohos_lab_location",
+ "description": "$string:ohos_desc_location"
+ },
+ {
+ "name": "ohos.permission.MEDIA_LOCATION",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": true,
+ "label": "$string:ohos_lab_media_location",
+ "description": "$string:ohos_desc_media_location"
+ },
+ {
+ "name": "ohos.permission.GET_NETWORK_INFO",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_get_network_info",
+ "description": "$string:ohos_desc_get_network_info"
+ },
+ {
+ "name": "ohos.permission.PLACE_CALL",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": true,
+ "label": "$string:ohos_lab_place_call",
+ "description": "$string:ohos_desc_place_call"
+ },
+ {
+ "name": "ohos.permission.CAMERA",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_camera",
+ "description": "$string:ohos_desc_camera"
+ },
+ {
+ "name": "ohos.permission.SET_NETWORK_INFO",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_set_network_info",
+ "description": "$string:ohos_desc_set_network_info"
+ },
+ {
+ "name": "ohos.permission.REMOVE_CACHE_FILES",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.READ_MEDIA",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": true,
+ "label": "$string:ohos_lab_read_media",
+ "description": "$string:ohos_desc_read_media"
+ },
+ {
+ "name": "ohos.permission.REBOOT",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.RUNNING_LOCK",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.WRITE_MEDIA",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": true,
+ "label": "$string:ohos_lab_write_media",
+ "description": "$string:ohos_desc_write_media"
+ },
+ {
+ "name": "com.huawei.permission.DISTRIBUTED_VIRTUALDEVICE",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_distributed_virtualdevice",
+ "description": "$string:ohos_desc_distributed_virtualdevice"
+ },
+ {
+ "name": "ohos.permission.ENROLL_BIOMETRIC",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": false,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_enroll_biometric",
+ "description": "$string:ohos_desc_enroll_biometric"
+ },
+ {
+ "name": "ohos.permission.ACCESS_BIOMETRIC",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": false,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_access_biometric",
+ "description": "$string:ohos_desc_access_biometric"
+ },
+ {
+ "name": "ohos.permission.ACCESS_BIOMETRIC_INTERNAL",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": false,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_access_biometric_internal",
+ "description": "$string:ohos_desc_access_biometric_internal"
+ },
+ {
+ "name": "ohos.permission.RESET_BIOMETRIC_LOCKOUT",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": false,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_reset_biometric_lockout",
+ "description": "$string:ohos_desc_reset_biometric_lockout"
+ },
+ {
+ "name": "ohos.permission.SET_TIME",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_set_time",
+ "description": "$string:ohos_desc_set_time"
+ },
+ {
+ "name": "ohos.permission.SET_TIME_ZONE",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_set_time_zone",
+ "description": "$string:ohos_desc_set_time_zone"
+ },
+ {
+ "name": "ohos.permission.DOWNLOAD_SESSION_MANAGER",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_download_session_manager",
+ "description": "$string:ohos_desc_download_session_manager"
+ },
+ {
+ "name": "ohos.permission.COMMONEVENT_STICKY",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": true,
+ "label": "$string:ohos_lab_commonevent_sticky",
+ "description": "$string:ohos_desc_commonevent_sticky"
+ },
+ {
+ "name": "ohos.permission.SYSTEM_FLOAT_WINDOW",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.POWER_MANAGER",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.REFRESH_USER_ACTION",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.POWER_OPTIMIZATION",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.REBOOT_RECOVERY",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.MANAGE_LOCAL_ACCOUNTS",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_manage_local_accounts",
+ "description": "$string:ohos_desc_manage_local_accounts"
+ },
+ {
+ "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_interact_across_local_accounts",
+ "description": "$string:ohos_desc_interact_across_local_accounts"
+ },
+ {
+ "name": "ohos.permission.VIBRATE",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_vibrate",
+ "description": "$string:ohos_desc_vibrate"
+ },
+ {
+ "name": "ohos.permission.ACTIVITY_MOTION",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_activity_motion",
+ "description": "$string:ohos_desc_activity_motion"
+ },
+ {
+ "name": "ohos.permission.READ_HEALTH_DATA",
+ "grantMode": "user_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_read_health_data",
+ "description": "$string:ohos_desc_read_health_data"
+ },
+ {
+ "name": "ohos.permission.CONNECT_IME_ABILITY",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_connect_ime_ability",
+ "description": "$string:ohos_desc_connect_ime_ability"
+ },
+ {
+ "name": "ohos.permission.CONNECT_SCREEN_SAVER_ABILITY",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.READ_SCREEN_SAVER",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.WRITE_SCREEN_SAVER",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.SET_WALLPAPER",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_set_wallpaper",
+ "description": "$string:ohos_desc_set_wallpaper"
+ },
+ {
+ "name": "ohos.permission.GET_WALLPAPER",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_get_wallpaper",
+ "description": "$string:ohos_desc_get_wallpaper"
+ },
+ {
+ "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.ACCESS_MISSIONS",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.KEEP_BACKGROUND_RUNNING",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.UPDATE_CONFIGURATION",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.GET_SENSITIVE_PERMISSIONS",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_interact_across_local_accounts_extension",
+ "description": "$string:ohos_desc_interact_across_local_accounts_extension"
+ },
+ {
+ "name": "ohos.permission.LISTEN_BUNDLE_CHANGE",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.GET_BUNDLE_INFO",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.ACCELEROMETER",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_accelerometer",
+ "description": "$string:ohos_desc_accelerometer"
+ },
+ {
+ "name": "ohos.permission.GYROSCOPE",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_gyroscope",
+ "description": "$string:ohos_desc_gyroscope"
+ },
+ {
+ "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.INSTALL_BUNDLE",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.MANAGE_SHORTCUTS",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.radio.ACCESS_FM_AM",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.SET_TELEPHONY_STATE",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_set_telephony_state",
+ "description": "$string:ohos_desc_set_telephony_state"
+ },
+ {
+ "name": "ohos.permission.START_ABILIIES_FROM_BACKGROUND",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.BUNDLE_ACTIVE_INFO",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_bundle_active_info",
+ "description": "$string:ohos_desc_bundle_active_info"
+ },
+ {
+ "name": "ohos.permission.START_INVISIBLE_ABILITY",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.sec.ACCESS_UDID",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.LAUNCH_DATA_PRIVACY_CENTER",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.MANAGE_MEDIA_RESOURCES",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.PUBLISH_AGENT_REMINDER",
+ "grantMode": "system_grant",
+ "availableScope": "normal",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_publish_agent_reminder",
+ "description": "$string:ohos_desc_publish_agent_reminder"
+ },
+ {
+ "name": "ohos.permission.CONTROL_TASK_SYNC_ANIMATOR",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_control_task_sync_animator",
+ "description": "$string:ohos_desc_control_task_sync_animator"
+ },
+ {
+ "name": "ohos.permission.INPUT_MONITORING",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.MANAGE_MISSIONS",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ },
+ {
+ "name": "ohos.permission.NOTIFICATION_CONTROLLER",
+ "grantMode": "system_grant",
+ "availableScope": "system_core",
+ "provisionEnable": true,
+ "distributedSceneEnable": false,
+ "label": "$string:ohos_lab_notification_controller",
+ "description": "$string:ohos_desc_notification_controller"
+ },
+ {
+ "name": "ohos.permission.CONNECTIVITY_INTERNAL",
+ "grantMode": "system_grant",
+ "availableScope": "system_basic",
+ "provisionEnable": true,
+ "distributedSceneEnable": false
+ }
+]
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/dialogDataList.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/dialogDataList.ets
index f3c5572c29b23cfd870c8b0289ba932924127e42..f6dbf9c9b22f7072a33813b3ce8e07677efb716e 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/dialogDataList.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/dialogDataList.ets
@@ -14,7 +14,7 @@
*/
export const dialogData: any[] = [
- { 'name': '权限1', 'index': 1, 'message1': '内容1','message2': '内容一', 'icon': $r("app.media.ic_exercise") },
+ { 'name': '权限1', 'index': 1, 'message1': '是否允许"XX"访问健身运动','message2': '用于XXXX', 'icon': $r("app.media.ic_exercise") },
{ 'name': '权限2', 'index': 2, 'message1': '内容2','message2': '内容二', 'icon': $r("app.media.ic_exercise") },
{ 'name': '权限3', 'index': 3, 'message1': '内容3','message2': '内容三', 'icon': $r("app.media.ic_exercise") },
{ 'name': '权限4', 'index': 4, 'message1': '内容4','message2': '内容四', 'icon': $r("app.media.ic_exercise") }
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/mediaDocList.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/mediaDocList.ets
index bf9dcd3409385f490013bb408866fb787050c025..6bcb6341f7b37345af9bfc4223c0e049c550cfee 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/mediaDocList.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/mediaDocList.ets
@@ -14,6 +14,12 @@
*/
export const mediaDocListItem: any[] = [
- { 'name': '允许', 'index': 1, groupName: 'radio', checked: 1 },
- { 'name': '禁止', 'index': 2, groupName: 'radio', checked: 0 }
+ { 'name': '允许', 'index': 1, groupName: 'radio' },
+ { 'name': '禁止', 'index': 2, groupName: 'radio' }
+]
+export const mediaListItem: any[] = [
+ { 'name': '相机', 'index': 2, 'image': $r('app.media.ic_public_camera'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
+ { 'name': '麦克风', 'index': 3, 'image': $r('app.media.ic_public_voice'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
+ { 'name': '媒体和文件', 'index': 5, 'image': $r('app.media.ic_public_folder'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' },
+ { 'name': '日历', 'index': 6, 'image': $r('app.media.ic_public_calendar'), 'icon': $r('app.media.rightarrow'), version: '1.1.1', use: '用途001' }
]
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/permissionGroup.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/permissionGroup.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e37aabf773b6093b2b4dbe07d3a3adcf9378beaa
--- /dev/null
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/permissionGroup.ets
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export const permissionGroups: any[] = [
+ { 'name': 'ohos.permission.READ_CALENDAR', "group": "CALENDAR"},
+ { 'name': 'ohos.permission.WRITE_CALENDAR', "group": "CALENDAR"},
+ { 'name': 'ohos.permission.READ_CALL_LOG', "group": "CALL_LOG"},
+ { 'name': 'ohos.permission.WRITE_CALL_LOG', "group": "CALL_LOG"},
+ { 'name': 'ohos.permission.READ_CONTACTS', "group": "CONTACTS"},
+ { 'name': 'ohos.permission.WRITE_CONTACTS', "group": "CONTACTS"},
+ { 'name': 'ohos.permission.ANSWER_CALL', "group": "PHONE"},
+ { 'name': 'ohos.permission.MANAGE_VOICEMAIL', "group": "PHONE"},
+ { 'name': 'ohos.permission.READ_CELL_MESSAGES', "group": "SMS"},
+ { 'name': 'ohos.permission.READ_MESSAGES', "group": "SMS"},
+ { 'name': 'ohos.permission.RECEIVE_MMS', "group": "SMS"},
+ { 'name': 'ohos.permission.RECEIVE_SMS', "group": "SMS"},
+ { 'name': 'ohos.permission.RECEIVE_WAP_MESSAGES', "group": "SMS"},
+ { 'name': 'ohos.permission.SEND_MESSAGES', "group": "SMS"},
+]
+
+export const groups: any[] = [
+ { 'name': 'CALENDAR',
+ "permissions": ["ohos.permission.READ_CALENDAR", 'ohos.permission.WRITE_CALENDAR'],
+ "groupName": '日历',
+ "description": '访问日历和活动'
+ },
+ { 'name': 'CALL_LOG',
+ "permissions": ["ohos.permission.READ_CALL_LOG", 'ohos.permission.WRITE_CALL_LOG'],
+ "groupName": '通话记录',
+ "description": '读取和写入手机通话记录'
+ },
+ { 'name': 'CONTACTS',
+ "permissions": ["ohos.permission.READ_CONTACTS", 'ohos.permission.WRITE_CONTACTS'],
+ "groupName": '通讯录',
+ "description": '访问您的通讯录'
+ },
+ { 'name': 'PHONE',
+ "permissions": ["ohos.permission.ANSWER_CALL", 'ohos.permission.MANAGE_VOICEMAIL'],
+ "groupName": '电话',
+ "description": '拨打电话和管理通话'
+ },
+ { 'name': 'SMS',
+ "permissions": ["ohos.permission.READ_CELL_MESSAGES", 'ohos.permission.READ_MESSAGES', 'ohos.permission.RECEIVE_MMS', 'ohos.permission.RECEIVE_SMS', 'ohos.permission.RECEIVE_WAP_MESSAGES', 'ohos.permission.SEND_MESSAGES'],
+ "groupName": '短信',
+ "description": '发送和查看短信'
+ },
+]
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/privacyList.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/privacyList.ets
deleted file mode 100644
index 4e0561447ea7ae0cf7512bfddc83fc059a61317d..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/common/model/privacyList.ets
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export const privacyListItem: any[] = [
- { 'name': '权限管理', 'index': 1, 'message': '', 'icon': $r('app.media.rightarrow') },
- { 'name': '定位服务', 'index': 2, 'message': '已开启', 'icon': $r('app.media.rightarrow') },
- { 'name': '隐私空间', 'index': 3, 'message': '', 'icon': $r('app.media.rightarrow') },
- { 'name': '广告与隐私', 'index': 4,'message': '', 'icon': $r('app.media.rightarrow') }
-]
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/app-name-plus.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/app-name-plus.ets
index 8d6e5c7be96edd7cc33160168e1f625a7d2b54ca..a410d746623bc6183a8bba586973e19141dcd9b2 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/app-name-plus.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/app-name-plus.ets
@@ -13,8 +13,6 @@
* limitations under the License.
*/
-import { titleBar } from "../common/components/titleBar.ets"
-import { categoryPage } from "../common/components/category.ets"
import { backBar } from "../common/components/backBar.ets"
import { allowedListItem, bannedListItem } from "../common/model/appNameList.ets"
import router from '@system.router'
@@ -24,31 +22,52 @@ import router from '@system.router'
struct appNamePlusPage {
private routerData = router.getParams().routerData
build() {
- Flex({ justifyContent: FlexAlign.Center }) {
- Column() {
- Row() {
- // titleBar()
- backBar({ title: JSON.stringify(this.routerData.name) })
- }
- Row() {
- // categoryPage()
- Column() {
- Scroll() {
- appNameItem({
- allowedListItem: allowedListItem,
- bannedListItem: bannedListItem,
-// buttonListItem: buttonListItem
- })
- }
- }.width('100%')
- }.layoutWeight(1).width(360)
- }
- }
+ GridContainer({ gutter: 0 }) {
+ Row() {
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
+ md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
+ })
+ .height("100%")
+ Row() {
+ Column() {
+ Row() {
+ backBar({ title: JSON.stringify(this.routerData.name) })
+ }
+ Row() {
+ Column() {
+ Scroll() {
+ appNameItem({
+ allowedListItem: allowedListItem,
+ bannedListItem: bannedListItem,
+ // buttonListItem: buttonListItem
+ })
+ }
+ }.width('100%')
+ }.layoutWeight(1).width("100%")
+ }
+ }
+ .useSizeType({
+ xs: { span: 1, offset: 1 }, sm: { span: 2, offset: 1 },
+ md: { span: 6, offset: 1 }, lg: { span: 8, offset: 2 }
+ })
+ .height("100%")
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 2 }, sm: { span: 1, offset: 3 },
+ md: { span: 1, offset: 7 }, lg: { span: 2, offset: 10 }
+ })
+ .height("100%")
+ }
+ .height('100%')
+ }
}
}
@Component
struct appNameItem {
+ private routerData = router.getParams().routerData
private allowedListItem: any[]
private bannedListItem: any[]
// private buttonListItem: any[]
@@ -118,8 +137,8 @@ struct appNameItem {
}
}.onClick(() => {
router.push({
- uri: 'pages/app-name',
- params: { routerData: item }
+ uri: 'pages/media-documents',
+ params: { routerData: item}
})
})
}
@@ -164,7 +183,7 @@ struct appNameItem {
}
}.onClick(() => {
router.push({
- uri: 'pages/app-name',
+ uri: 'pages/media-documents',
params: { routerData: item }
})
})
@@ -188,6 +207,10 @@ struct appNameItem {
if (event.type === TouchType.Down) {
}
if (event.type === TouchType.Up) {
+ router.push({
+ uri: 'pages/app-name',
+ params: { routerData: this.routerData.name }
+ })
}
if (event.type === TouchType.Move) {
if(event.touches[0].x < 0 || event.touches[0].x > 90 || event.touches[0].y > 0 || event.touches[0].y > 48) {
@@ -202,9 +225,6 @@ struct appNameItem {
.height('100%')
.backgroundColor($r('app.color.background_color'))
- }.useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
+ }
}
}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/app-name.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/app-name.ets
index 60acc9c60e02a10d236bc5f2d4182717e9b70bb0..f26f8e8f645a6f918d826e145ece6ee7ee29bc01 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/app-name.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/app-name.ets
@@ -13,8 +13,6 @@
* limitations under the License.
*/
-import { titleBar } from "../common/components/titleBar.ets"
-import { categoryPage } from "../common/components/category.ets"
import { backBar } from "../common/components/backBar.ets"
import { calendarListItem, dynamicListItem } from "../common/model/appNameList.ets"
import router from '@system.router'
@@ -23,24 +21,44 @@ import router from '@system.router'
struct appNamePage {
private routerData = router.getParams().routerData
build() {
- Flex({ justifyContent: FlexAlign.Center }) {
- Column() {
- Row() {
- // titleBar()
- backBar({ title: JSON.stringify(this.routerData.name) })
- }
+ GridContainer({ gutter: 0 }) {
+ Row() {
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
+ md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
+ })
+ .height("100%")
Row() {
- // categoryPage()
Column() {
- Scroll() {
- appNameItem({
- calendarListItem: calendarListItem,
- dynamicListItem: dynamicListItem
- })
+ Row() {
+ backBar({ title: JSON.stringify(this.routerData) })
}
+ Row() {
+ Column() {
+ Scroll() {
+ appNameItem({
+ calendarListItem: calendarListItem,
+ dynamicListItem: dynamicListItem
+ })
+ }
+ }
+ }.layoutWeight(1).width("100%")
}
- }.layoutWeight(1).width(360)
+ }
+ .useSizeType({
+ xs: { span: 1, offset: 1 }, sm: { span: 2, offset: 1 },
+ md: { span: 6, offset: 1 }, lg: { span: 8, offset: 2 }
+ })
+ .height("100%")
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 2 }, sm: { span: 1, offset: 3 },
+ md: { span: 1, offset: 7 }, lg: { span: 2, offset: 10 }
+ })
+ .height("100%")
}
+ .height('100%')
}
}
}
@@ -145,9 +163,6 @@ struct appNameItem {
.width('100%')
.height('100%')
.backgroundColor($r('app.color.background_color'))
- }.useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
+ }
}
}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/authority-management.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/authority-management.ets
index 9080c62681ffe80ee18fb787a2b228051bac8748..787fa6016b9d97d5cc2874f9033b7f7ecc4ce8c5 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/authority-management.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/authority-management.ets
@@ -13,13 +13,12 @@
* limitations under the License.
*/
-import { authorityListItem, messageListItem, appInstallListItem, otherPermissionsListItem, applicationListItem } from "../common/model/authorityManagementList.ets"
-import { titleBar } from "../common/components/titleBar.ets"
-import { categoryPage } from "../common/components/category.ets"
+import { authorityListItem, messageListItem, applicationListItem } from "../common/model/authorityManagementList.ets"
import { backBar } from "../common/components/backBar.ets"
import { alphabetIndexerComponent } from "../common/components/alphabeticalIndex.ets"
import { textInput } from "../common/components/search.ets"
import router from '@system.router'
+import bundle from "@ohos.bundle"
@Extend(Text) function customizeText(fontSize: string) {
.fontSize(fontSize)
@@ -45,51 +44,64 @@ import router from '@system.router'
struct authorityManagementPage {
build() {
- Flex({ justifyContent: FlexAlign.Center }) {
- Column() {
- Row() {
- // titleBar()
- backBar( { title: JSON.stringify($r('app.string.authority_management')) })
- }
+ GridContainer({ gutter: 0 }) {
+ Row() {
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
+ md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
+ })
+ .height("100%")
Row() {
- // categoryPage()
Column() {
- Column() {
- Stack() {
- Tabs() {
- TabContent() {
- Scroll() {
- authorityItem({
- authorityListItem: authorityListItem,
- messageListItem: messageListItem,
- appInstallListItem: appInstallListItem,
- otherPermissionsListItem: otherPermissionsListItem
- })
- }
- }.tabBar('权限')
+ Row() {
+ backBar( { title: JSON.stringify($r('app.string.authority_management')) })
+ }
+ Row() {
+ Column() {
+ Column() {
+ Stack() {
+ Tabs() {
+ TabContent() {
+ Scroll() {
+ authorityItem({
+ authorityListItem: authorityListItem,
+ messageListItem: messageListItem
+ })
+ }
+ }.tabBar('权限')
- TabContent() {
- Scroll() {
- applicationItem({
- applicationListItem: applicationListItem,
- })
+ TabContent() {
+ Scroll() {
+ applicationItem({
+ applicationListItem: applicationListItem,
+ })
+ }
+ }.tabBar('应用')
}
- }.tabBar('应用')
+ .backgroundColor($r('app.color.background_color'))
+ .barWidth(744)
+ .barMode(BarMode.Scrollable)
+ }.height('100%')
}
- .backgroundColor($r('app.color.background_color'))
- .barWidth(744)
- .barMode(BarMode.Scrollable)
- }.height('100%')
+ }
}
- }.width('100%')
+ .layoutWeight(1)
+ }
}
.useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
+ xs: { span: 1, offset: 1 }, sm: { span: 2, offset: 1 },
+ md: { span: 6, offset: 1 }, lg: { span: 8, offset: 2 }
})
- .layoutWeight(1)
- .width(360)
+ .height("100%")
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 2 }, sm: { span: 1, offset: 3 },
+ md: { span: 1, offset: 7 }, lg: { span: 2, offset: 10 }
+ })
+ .height("100%")
}
+ .height('100%')
}
}
}
@@ -98,9 +110,7 @@ struct authorityManagementPage {
struct authorityItem {
private authorityListItem: any[]
private messageListItem: any[]
- private appInstallListItem: any[]
- private otherPermissionsListItem: any[]
-@Builder ListItemLayout(item, list) {
+ @Builder ListItemLayout(item, list) {
ListItem() {
Row() {
Column() {
@@ -128,22 +138,14 @@ struct authorityItem {
}
}
}.onClick(() => {
- if (item.name === '其他权限') {
+ if (item.name === '日历') {
router.push({
- uri: 'pages/other-permissions',
- })
- }else if (item.name === '位置信息') {
- router.push({
- uri: 'pages/location-info',
- })
- }else if (item.name === '媒体和文件') {
- router.push({
- uri: 'pages/media-documents',
+ uri: 'pages/calendar',
params: { routerData: item }
})
- }else{
+ } else {
router.push({
- uri: 'pages/media-documents',
+ uri: 'pages/location-info',
params: { routerData: item }
})
}
@@ -152,6 +154,18 @@ struct authorityItem {
}
}.padding({ left: 12, right: 12 })
}
+ aboutToAppear() {
+ console.info("start run testcase!!!!")
+// bundle.getAllApplicationInfo(0x00000000,1)
+// .then((Want) => {
+// console.info( "yanxi" + JSON.stringify(Want));
+// console.log( "yanxi" + JSON.stringify(Want));
+// })
+// .catch((error) => {
+// console.error('Operation failed. Cause: ' + JSON.stringify(error));
+// })
+
+ }
build() {
Row() {
Column() {
@@ -169,26 +183,9 @@ struct authorityItem {
}, item => item.toString())
}.backgroundColor($r('app.color.default_background_color')).borderRadius(24).padding({ top: 4, bottom: 4 })
}.margin({ top: 12 }).padding({ left: 12, right: 12 })
- Row() {
- List() {
- ForEach(this.appInstallListItem, (item) => {
- this.ListItemLayout(item, this.appInstallListItem)
- }, item => item.toString())
- }.backgroundColor($r('app.color.default_background_color')).borderRadius(24).padding({ top: 4, bottom: 4 })
- }.margin({ top: 12 }).padding({ left: 12, right: 12 })
- Row() {
- List() {
- ForEach(this.otherPermissionsListItem, (item) => {
- this.ListItemLayout(item, this.otherPermissionsListItem)
- }, item => item.toString())
- }.backgroundColor($r('app.color.default_background_color')).borderRadius(24).padding({ top: 4, bottom: 4 })
- }.margin({ top: 12 }).padding({ left: 12, right: 12 })
}.width('100%')
.backgroundColor($r('app.color.background_color'))
- }.useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
+ }
}
}
@@ -242,7 +239,8 @@ struct applicationItem {
Column() {
Row() {
textInput({ placeholder: '搜索应用' })
- }.padding({ left: 12, top: 8 })
+// .width("100%")
+ }.padding({ left: 12, top: 8, right: 4 })
Scroll() {
Row() {
Flex({ alignItems: ItemAlign.Start }) {
@@ -265,12 +263,8 @@ struct applicationItem {
}
.margin({ top: 12 })
.width(24)
- .padding({ right: 0 })
}
- }.useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
+ }
}
}
}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/calendar.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/calendar.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7938a47a348a4185c0a571e765bdfcb5ccc0d767
--- /dev/null
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/calendar.ets
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 { backBar } from "../common/components/backBar.ets"
+import { calendarListItem } from "../common/model/appNameList.ets"
+import router from '@system.router'
+@Entry
+@Component
+struct appNamePage {
+ build() {
+ GridContainer({ gutter: 0 }) {
+ Row() {
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
+ md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
+ })
+ .height("100%")
+ Row() {
+ Column() {
+ Row() {
+ backBar({title: JSON.stringify($r("app.string.calendar"))})
+ }
+ Row() {
+ Column() {
+ Scroll() {
+ appNameItem({
+ calendarListItem: calendarListItem,
+ })
+ }
+ }
+ }.layoutWeight(1)
+ }
+ }
+ .useSizeType({
+ xs: { span: 1, offset: 1 }, sm: { span: 2, offset: 1 },
+ md: { span: 6, offset: 1 }, lg: { span: 8, offset: 2 }
+ })
+ .height("100%")
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 2 }, sm: { span: 1, offset: 3 },
+ md: { span: 1, offset: 7 }, lg: { span: 2, offset: 10 }
+ })
+ .height("100%")
+ }
+ .height('100%')
+ }
+ }
+}
+
+@Component
+struct appNameItem {
+ private calendarListItem: any[]
+
+ build() {
+ Row() {
+ Column() {
+ Row() {
+ List() {
+ ForEach(this.calendarListItem, (item) => {
+ ListItem() {
+ Row() {
+ Column() {
+ Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
+ Row() {
+ Text(item.name)
+ .fontSize(16)
+ .fontColor($r('app.color.text_color'))
+ .flexGrow(1)
+ Image($r('app.media.rightarrow'))
+ .objectFit(ImageFit.Contain)
+ .height(24)
+ .width(12)
+ }
+ .width('100%')
+ .height(48)
+ }
+ if (item.index !== this.calendarListItem.length) {
+ Row() {
+ Column()
+ .backgroundColor($r('app.color.text_decoration_color'))
+ .width('100%')
+ .height('2vp')
+ }
+ }
+ }.onClick(() => {
+ router.push({
+ uri: 'pages/location-info',
+ params: { routerData: item }
+ })
+ })
+ }
+ }.padding({ left: 24, right: 24 })
+ }, item => item.toString())
+ }.backgroundColor($r('app.color.default_background_color')).borderRadius(24).padding({ top: 4, bottom: 4 })
+ }.margin({ top: 9 }).padding({ left: 24, right: 24 })
+ }
+ .width('100%')
+ .height('100%')
+ .backgroundColor($r('app.color.background_color'))
+ }
+ }
+}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/pages/dialog.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/dialog.ets
similarity index 100%
rename from frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.GrantAbility/entry/src/main/ets/default/pages/dialog.ets
rename to frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/dialog.ets
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/dialogPlus.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/dialogPlus.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0eb74ca8b03d431750b290a3b516cc170fb28e85
--- /dev/null
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/dialogPlus.ets
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 { privacyDialog } from "../common/components/dialog.ets"
+import { dialogData } from "../common/model/dialogDataList.ets"
+import { permissionGroups, groups } from "../common/model/permissionGroup.ets"
+import bundle from '@ohos.bundle';
+import prompt from '@system.prompt';
+import abilityAccessCtrl from '@ohos.abilityAccessCtrl';
+
+@Entry
+@Component
+struct dialogPlusPage {
+ @State count: number = 0
+ @State userId: number = 0
+ @State GET_BUNDLE_DEFAULT: number = 0x00000000
+ privacyDialogController: CustomDialogController = new CustomDialogController({
+ builder: privacyDialog({ cancel: this.privacyCancel, confirm: this.privacyAccept, count:this.count }),
+ cancel: this.privacyExist,
+ autoCancel: true,
+ alignment: DialogAlignment.Bottom,
+ offset: { dx: 0 , dy: -12 },
+ customStyle: true
+ })
+ privacyAccept() {
+ bundle.getApplicationInfo('com.example.myapplication', this.GET_BUNDLE_DEFAULT, this.userId).then(async res => {
+ var acManager = abilityAccessCtrl.createAtManager()
+ var verify = await acManager.verifyAccessToken(res.accessTokenId, res.permissions[this.count])
+ if(verify) {
+ var permission = permissionGroups.filter(item => item.name == res.permissions[this.count])
+ if(permission.length) {
+ var group = groups.filter(item => item.name == permission[0].group)
+ await group[0].permissions.forEach(async item => {
+ var permissionFlag = await acManager.getPermissionFlags(res.accessTokenId, item)
+ acManager.grantUserGrantedPermission(res.accessTokenId, item, permissionFlag).then(result => {
+ if(result !== 0) {
+ prompt.showToast({
+ message: '授权信息失败',
+ duration: 2000,
+ });
+ }
+ })
+ })
+ this.verify(res.accessTokenId, res.permissions[this.count])
+ }else {
+ var permissionFlag = await acManager.getPermissionFlags(res.accessTokenId, res.permissions[this.count])
+ acManager.grantUserGrantedPermission(res.accessTokenId, res.permissions[this.count], permissionFlag).then(result => {
+ if(result !== 0) {
+ prompt.showToast({
+ message: '授权信息失败',
+ duration: 2000,
+ });
+ }
+ this.verify(res.accessTokenId, res.permissions[this.count])
+ })
+ }
+ }else {
+ this.verify(res.accessTokenId, res.permissions[this.count])
+ }
+ }).catch(() => {
+ this.count < dialogData.length ? this.count += 1 : ''
+ })
+
+ }
+ privacyCancel() {
+ bundle.getApplicationInfo('com.example.myapplication', this.GET_BUNDLE_DEFAULT, this.userId).then(async res => {
+ var acManager = abilityAccessCtrl.createAtManager()
+ var verify = await acManager.verifyAccessToken(res.accessTokenId, res.permissions[this.count])
+ if(verify) {
+ var permission = permissionGroups.filter(item => item.name == res.permissions[this.count])
+ if(permission.length) {
+ var group = groups.filter(item => item.name == permission[0].group)
+ await group[0].permissions.forEach(async item => {
+ var permissionFlag = await acManager.getPermissionFlags(res.accessTokenId, item)
+ acManager.revokeUserGrantedPermission(res.accessTokenId, item, permissionFlag).then(result => {
+ if(result !== 0) {
+ prompt.showToast({
+ message: '授权信息失败',
+ duration: 2000,
+ });
+ }
+ })
+ })
+ this.verify(res.accessTokenId, res.permissions[this.count])
+ }else {
+ var permissionFlag = await acManager.getPermissionFlags(res.accessTokenId, res.permissions[this.count])
+ acManager.revokeUserGrantedPermission(res.accessTokenId, res.permissions[this.count], permissionFlag).then(result => {
+ if(result !== 0) {
+ prompt.showToast({
+ message: '授权信息失败',
+ duration: 2000,
+ });
+ }
+ this.verify(res.accessTokenId, res.permissions[this.count])
+ })
+ }
+ }else {
+ this.verify(res.accessTokenId, res.permissions[this.count])
+ }
+ }).catch(() => {
+ this.count < dialogData.length ? this.count += 1 : ''
+ })
+
+ }
+ async verify(tokenId, permissions) {
+ if(this.count < dialogData.length) {
+ this.count += 1
+ var acManager = abilityAccessCtrl.createAtManager()
+ var verify = await acManager.verifyAccessToken(tokenId, permissions)
+ if (verify) {
+ this.verify(tokenId, permissions)
+ }
+ }
+ }
+ privacyExist() {
+ console.info("exist")
+ }
+ aboutToAppear() {
+ this.privacyDialogController.open()
+ }
+ build() {
+ }
+}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/location-info.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/location-info.ets
index c73e3621794839f545207fe6410e0fe39ad2d1f5..23761a23bf1257eba26eea257042d97fede6f1f0 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/location-info.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/location-info.ets
@@ -14,8 +14,6 @@
*/
import { applicationListItem } from "../common/model/authorityManagementList.ets"
-import { titleBar } from "../common/components/titleBar.ets"
-import { categoryPage } from "../common/components/category.ets"
import { backBar } from "../common/components/backBar.ets"
import { alphabetIndexerComponent } from "../common/components/alphabeticalIndex.ets"
import { textInput } from "../common/components/search.ets"
@@ -43,23 +41,44 @@ import router from '@system.router'
@Entry
@Component
struct locationInfoPage {
+ private routerData = router.getParams().routerData
build() {
- Flex({ justifyContent: FlexAlign.Center }) {
- Column() {
- Row() {
- // titleBar()
- backBar({title: JSON.stringify($r("app.string.location_info"))})
- }
+ GridContainer({ gutter: 0 }) {
+ Row() {
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
+ md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
+ })
+ .height("100%")
Row() {
- // categoryPage()
Column() {
- applicationItem({
- applicationListItem: applicationListItem
- })
- }.width(360)
+ Row() {
+ backBar({title: JSON.stringify(this.routerData.name)})
+ }
+ Row() {
+ Column() {
+ applicationItem({
+ applicationListItem: applicationListItem
+ })
+ }.width("100%")
+ }
+ .layoutWeight(1)
+ }
}
- .layoutWeight(1)
+ .useSizeType({
+ xs: { span: 1, offset: 1 }, sm: { span: 2, offset: 1 },
+ md: { span: 6, offset: 1 }, lg: { span: 8, offset: 2 }
+ })
+ .height("100%")
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 2 }, sm: { span: 1, offset: 3 },
+ md: { span: 1, offset: 7 }, lg: { span: 2, offset: 10 }
+ })
+ .height("100%")
}
+ .height('100%')
}
}
}
@@ -109,7 +128,7 @@ struct applicationItem {
Column() {
Row() {
textInput({ placeholder: '搜索应用' })
- }.padding({ left: 12 })
+ }.padding({ left: 12, right: 4 })
.backgroundColor($r('app.color.background_color'))
Row() {
Flex({ alignItems:ItemAlign.Start, justifyContent: FlexAlign.Start }) {
@@ -137,14 +156,11 @@ struct applicationItem {
.padding({ top: 4, bottom: 4 })
}.margin({ top: 24 })
}.width('100%')
- .height('89%')
+ .height('95%')
.backgroundColor($r('app.color.background_color'))
- }.useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
+ }
}
- }.padding({ left: 12 }).width(336)
+ }.padding({ left: 12 })
Column() {
alphabetIndexerComponent({ page: 'location-info', applicationList: $applicationList })
}.width(24).padding({ top: 16 })
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/media-documents.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/media-documents.ets
index 5b098a51e6f6b25e0a07d6ce69c1d577441eef1f..51173c37fbdaf3f8465bc50cf32eb188c96ccabb 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/media-documents.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/media-documents.ets
@@ -13,48 +13,85 @@
* limitations under the License.
*/
-import { titleBar } from "../common/components/titleBar.ets"
-import { categoryPage } from "../common/components/category.ets"
import { backBar } from "../common/components/backBar.ets"
-import { mediaDocListItem } from "../common/model/mediaDocList.ets"
+import { mediaDocListItem, mediaListItem } from "../common/model/mediaDocList.ets"
import router from '@system.router'
+import AccessCtrl from "@ohos.abilityAccessCtrl"
+
@Entry
@Component
struct mediaDocumentPage {
private routerData = router.getParams().routerData
build() {
- Flex({ justifyContent: FlexAlign.Center }) {
- Column() {
- Row() {
-// titleBar()
- backBar({title: JSON.stringify(this.routerData.name)})
- }
+ GridContainer({ gutter: 0 }) {
+ Row() {
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
+ md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
+ })
+ .height("100%")
Row() {
-// categoryPage()
Column() {
- Scroll() {
- otherMediaDocItem({
- mediaDocListItem:mediaDocListItem
- })
+ Row() {
+ backBar({title: JSON.stringify(this.routerData.name)})
}
- }.width(360)
+ Row() {
+ Column() {
+ Scroll() {
+ otherMediaDocItem({
+ mediaDocListItem:mediaDocListItem,
+ mediaListItem:mediaListItem
+ })
+ }
+ }.width("100%")
+ }
+ .layoutWeight(1)
+ }
}
- .layoutWeight(1)
+ .useSizeType({
+ xs: { span: 1, offset: 1 }, sm: { span: 2, offset: 1 },
+ md: { span: 6, offset: 1 }, lg: { span: 8, offset: 2 }
+ })
+ .height("100%")
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 2 }, sm: { span: 1, offset: 3 },
+ md: { span: 1, offset: 7 }, lg: { span: 2, offset: 10 }
+ })
+ .height("100%")
}
+ .height('100%')
}
}
}
@Component
struct otherMediaDocItem {
+ aboutToAppear() {
+ console.info("yanxi" + "start run testcase!!!!")
+ AccessCtrl.createAtManager().verifyAccessToken(0, 'ohos.permission.PLACE_CALL')
+ .then((Want) => {
+ console.info( "yanxi" + Want);
+ console.info( "yanxi" + Want);
+ })
+ .catch((error) => {
+ console.error("yanxi" + 'Operation failed. Cause: ' + error);
+ })
+ }
private routerData = router.getParams().routerData
@State checkList: any[] = [1, 0]
private mediaDocListItem: any[]
+ private mediaListItem: any[]
build() {
Column() {
Row() {
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
- Image(this.routerData.image)
+// Text(this.mediaListItem[0].name)
+// this.mediaListItem.filter(item => {
+//
+// })
+ Image(this.mediaListItem[0].image)
.width(64)
.height(64)
.margin({left:24,right:12})
@@ -83,7 +120,8 @@ struct otherMediaDocItem {
Row() {
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Row() {
- Text('媒体和文件访问权限')
+ Text(this.routerData.name + '访问权限')
+ .fontSize(16)
}.margin({left:36,right:12})
}
}
@@ -118,7 +156,6 @@ struct otherMediaDocItem {
this.checkList = [1, 0]
}
})
- Image($r('app.media.ic_ssensor'))
}.backgroundColor($r('app.color.default_background_color'))
.width('100%')
.height('48')
@@ -142,9 +179,5 @@ struct otherMediaDocItem {
.backgroundColor($r('app.color.background_color'))
}
.backgroundColor($r('app.color.background_color'))
- .useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
}
}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/other-permissions.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/other-permissions.ets
index c376f0390d0614b3099bd16dd6e70b8128bac3ad..be5c75a60d8dd3d92727ae0a9a6b3da078a1a392 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/other-permissions.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/other-permissions.ets
@@ -13,8 +13,6 @@
* limitations under the License.
*/
-import { titleBar } from "../common/components/titleBar.ets"
-import { categoryPage } from "../common/components/category.ets"
import { backBar } from "../common/components/backBar.ets"
import { otherPermissionsListItem } from "../common/model/otherPermissionsList.ets"
import router from '@system.router'
@@ -22,26 +20,44 @@ import router from '@system.router'
@Component
struct permissionsPage {
build() {
- Flex({ justifyContent: FlexAlign.Center }) {
- Column() {
- Row() {
-// titleBar()
- backBar({title: JSON.stringify($r("app.string.other_permissions"))})
- }
+ GridContainer({ gutter: 0 }) {
+ Row() {
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
+ md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
+ })
+ .height("100%")
Row() {
Column() {
-// categoryPage()
- }
- Column() {
- Scroll() {
- otherPermissionsItem({
- otherPermissionsListItem: otherPermissionsListItem
- })
+ Row() {
+ backBar({title: JSON.stringify($r("app.string.other_permissions"))})
}
- }.width(360)
+ Row() {
+ Column() {
+ Scroll() {
+ otherPermissionsItem({
+ otherPermissionsListItem: otherPermissionsListItem
+ })
+ }
+ }.width("100%")
+ }
+ .layoutWeight(1)
+ }
}
- .layoutWeight(1)
+ .useSizeType({
+ xs: { span: 1, offset: 1 }, sm: { span: 2, offset: 1 },
+ md: { span: 6, offset: 1 }, lg: { span: 8, offset: 2 }
+ })
+ .height("100%")
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 2 }, sm: { span: 1, offset: 3 },
+ md: { span: 1, offset: 7 }, lg: { span: 2, offset: 10 }
+ })
+ .height("100%")
}
+ .height('100%')
}
}
}
@@ -98,9 +114,5 @@ struct otherPermissionsItem {
.height('100%')
.backgroundColor($r('app.color.background_color'))
}
- .useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
}
}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/permission-access-record.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/permission-access-record.ets
index 32215490926f3ecd1e9d82d79b2fa22a502589c1..7467ff5d188d0f554292b705cc1790b436225389 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/permission-access-record.ets
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/permission-access-record.ets
@@ -14,8 +14,6 @@
*/
import { permissionAccessRecordListItem } from "../common/model/permissionAccessRecordList.ets"
-import { titleBar } from "../common/components/titleBar.ets"
-import { categoryPage } from "../common/components/category.ets"
import { backBar } from "../common/components/backBar.ets"
import router from '@system.router'
@@ -33,34 +31,54 @@ import router from '@system.router'
@Component
struct permissionAccessRecordPage {
build() {
- Flex({ justifyContent: FlexAlign.Center }) {
- Column() {
- Row() {
- // titleBar()
- backBar({ title: JSON.stringify($r('app.string.permission_access_record'))})
- }
+ GridContainer({ gutter: 0 }) {
+ Row() {
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
+ md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
+ })
+ .height("100%")
Row() {
- // categoryPage()
Column() {
- Column() {
- Flex({ justifyContent: FlexAlign.Start }) {
- Text($r('app.string.authority_message'))
- .fontSize("16vp")
- .margin({
- left: '15vp'
- })
- }
- .backgroundColor($r('app.color.background_color'))
- Scroll() {
- permissionAccessRecordItem({
- permissionAccessRecordListItem: permissionAccessRecordListItem,
- })
- }
+ Row() {
+ backBar({ title: JSON.stringify($r('app.string.permission_access_record'))})
}
- }.width(360)
+ Row() {
+ Column() {
+ Column() {
+ Flex({ justifyContent: FlexAlign.Start }) {
+ Text($r('app.string.authority_message'))
+ .fontSize("16vp")
+ .margin({
+ left: '15vp'
+ })
+ }
+ .backgroundColor($r('app.color.background_color'))
+ Scroll() {
+ permissionAccessRecordItem({
+ permissionAccessRecordListItem: permissionAccessRecordListItem,
+ })
+ }
+ }
+ }.width("100%")
+ }
+ .layoutWeight(1)
+ }
}
- .layoutWeight(1)
+ .useSizeType({
+ xs: { span: 1, offset: 1 }, sm: { span: 2, offset: 1 },
+ md: { span: 6, offset: 1 }, lg: { span: 8, offset: 2 }
+ })
+ .height("100%")
+ Row()
+ .useSizeType({
+ xs: { span: 1, offset: 2 }, sm: { span: 1, offset: 3 },
+ md: { span: 1, offset: 7 }, lg: { span: 2, offset: 10 }
+ })
+ .height("100%")
}
+ .height('100%')
}
}
}
@@ -172,16 +190,9 @@ struct permissionAccessRecordItem {
}, item => item.index.toString())
}
}
- .useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
.width('100%')
.height('100%')
.backgroundColor($r('app.color.background_color'))
- }.useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
+ }
}
}
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/privacy.ets b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/privacy.ets
deleted file mode 100644
index afcdc8b09f732c035016d5f4e86645c76fc65fa3..0000000000000000000000000000000000000000
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/ets/default/pages/privacy.ets
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 { positionDialog, spaceDialog, privacyDialog } from "../common/components/dialog.ets"
-import { titleBar } from "../common/components/titleBar.ets"
-import { categoryPage } from "../common/components/category.ets"
-import { backBar } from "../common/components/backBar.ets"
-import { privacyListItem } from "../common/../common/model/privacyList.ets"
-import { dialogData } from "../common/model/dialogDataList.ets"
-import router from '@system.router'
-
-@Entry
-@Component
-struct privacyPage {
- build() {
- Flex({ justifyContent: FlexAlign.Center }) {
- Column() {
- Row() {
- // titleBar()
- backBar({title: JSON.stringify($r("app.string.privacy"))})
- }
- Row() {
- // categoryPage()
- Column() {
- Scroll() {
- privacyItem({
- privacyListItem: privacyListItem
- })
- }
- }.width(360)
- }.layoutWeight(1)
- }
- }
- }
-}
-
-@Component
-struct privacyItem {
- private privacyListItem: any[]
- @State messageList: string[] = [ '', '未开启', '', '']
- @State count: number = 0
-// @State returnList :string[] = []
- positionDialogController: CustomDialogController = new CustomDialogController({
- builder: positionDialog({ cancel: this.positionCancel, confirm: this.positionAccept, messageList: $messageList }),
- cancel: this.positionExist,
- autoCancel: true,
- alignment: DialogAlignment.Bottom,
- offset: { dx: 0 , dy: -12 },
- customStyle: true
- })
- positionCancel() {
- const index = privacyListItem.findIndex((item) => { return item.name === '定位服务' })
- this.messageList[index] = '未开启'
- }
- positionAccept() {
- const index = privacyListItem.findIndex((item) => { return item.name === '定位服务' })
- this.messageList[index] = '已开启'
- }
- positionExist() {
- }
- spaceDialogController: CustomDialogController = new CustomDialogController({
- builder: spaceDialog({ cancel: this.spaceCancel, confirm: this.spaceAccept }),
- cancel: this.spaceExist,
- autoCancel: true,
- alignment: DialogAlignment.Bottom,
- offset: { dx: 0 , dy: -12 },
- customStyle: true
- })
- spaceCancel() {
- }
- spaceAccept() {
- }
- spaceExist() {
- }
- privacyDialogController: CustomDialogController = new CustomDialogController({
- builder: privacyDialog({ cancel: this.privacyCancel, confirm: this.privacyAccept, count:this.count }),
- cancel: this.privacyExist,
- autoCancel: true,
- alignment: DialogAlignment.Bottom,
- offset: { dx: 0 , dy: -12 },
- customStyle: true
- })
- privacyAccept() {
- this.count < dialogData.length ? this.count += 1 : this.count = 0
- // this.returnList.push('0')
- console.info('accept ' + this.count)
-
- }
- privacyCancel() {
- if (this.count < dialogData.length) {
- this.count += 1
- // this.returnList.push('1')
- } else {
- this.count = 0
- // this.returnList = []
- }
- console.info('cancel' + this.count)
-
- }
- privacyExist() {
- // this.returnList = []
- console.info("exist")
- }
- build() {
- Row() {
- Column() {
- List() {
- ForEach(this.privacyListItem, (item) => {
- ListItem() {
- Column() {
- Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
- Row() {
- Text(item.name)
- .fontSize(18)
- .fontColor($r('app.color.text_color'))
- .flexGrow(1)
- Text(this.messageList[item.index - 1])
- .fontSize(18)
- .fontColor($r('app.color.icon_color'))
- Image(item.icon)
- .objectFit(ImageFit.Contain)
- .height(20)
- .width(20)
- }.backgroundColor($r('app.color.default_background_color'))
- .borderRadius('25px')
- .width('100%')
- .height('7%')
- .margin({
- left: '10vp',
- bottom: '10vp'
- })
- }
- }.margin({ right: '20vp'}).onClick(() => {
- if (item.name === '权限管理') {
- router.push({ uri: 'pages/authority-management' })
- }
- if (item.name === '定位服务') {
- this.positionDialogController.open()
- }
- if (item.name === '隐私空间') {
- this.spaceDialogController.open()
- }
- if (item.name === '广告与隐私') {
- this.privacyDialogController.open()
- }
- })
- }
- }, item => item.toString())
- }
- }
- .width('100%')
- .height('100%')
- .backgroundColor($r('app.color.background_color'))
- }.useSizeType({
- xs: { span: 1, offset: 0 }, sm: { span: 1, offset: 0 },
- md: { span: 1, offset: 0 }, lg: { span: 2, offset: 0 }
- })
- }
-}
\ No newline at end of file
diff --git a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/resources/base/element/string.json b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/resources/base/element/string.json
index 2088d38fe85bbcfb0b2560f38b64da0183e4d941..bca2742b6b887c872f1f0412dd92a9fb79e059fd 100644
--- a/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/resources/base/element/string.json
+++ b/frameworks/com.ohos.permissionmanager/com.ohos.permissionmanager.MainAbility/entry/src/main/resources/base/element/string.json
@@ -58,7 +58,7 @@
},
{
"name": "location_info_message",
- "value": "已允许7个应用查找、连接附近的设备。"
+ "value": "系统定位服务开关开启时,已允许19个应用获取此设备的位置。"
}
]
}
\ No newline at end of file