diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index a561a24..d6bf3af 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -22,7 +22,8 @@ "type": "dataShare", "uri": "datashare://com.ohos.settingsdata.DataAbility", "visible": true, - "writePermission": "ohos.permission.MANAGE_SECURE_SETTINGS" + "writePermission": "ohos.permission.MANAGE_SECURE_SETTINGS", + "metadata": [{"name": "ohos.extension.dataShare", "resource": "$profile:data_share_config"}] } ] } diff --git a/entry/src/main/resources/base/profile/data_share_config.json b/entry/src/main/resources/base/profile/data_share_config.json new file mode 100644 index 0000000..bec383c --- /dev/null +++ b/entry/src/main/resources/base/profile/data_share_config.json @@ -0,0 +1,18 @@ +{ + "tableConfig": [ + { + "uri": "*", + "writePermission": "ohos.permission.xxx" + }, + { + "uri": "datashare:///com.ohos.settingsdata/entry/settingsdata", + "crossUserMode": 1, + "writePermission": "ohos.permission.xxx", + "readPermission": "ohos.permission.xxx" + }, + { + "uri": "datashare:///com.ohos.settingsdata/entry/settingsdata/SETTINGSDATA", + "crossUserMode": 1 + } + ] +} \ No newline at end of file