mirror of
https://gitee.com/openharmony/applications_permission_manager
synced 2024-11-23 03:09:41 +00:00
权限弹窗标题超长处理
Signed-off-by: fanchenxuan <fanchenxuan@huawei.com>
This commit is contained in:
parent
85403ea690
commit
c122e1412d
@ -14,4 +14,4 @@
|
||||
*/
|
||||
|
||||
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
|
||||
module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks
|
||||
module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks;
|
||||
|
@ -14,4 +14,4 @@
|
||||
*/
|
||||
|
||||
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
|
||||
module.exports = require('@ohos/hvigor-ohos-plugin').appTasks
|
||||
module.exports = require('@ohos/hvigor-ohos-plugin').appTasks;
|
@ -14,4 +14,4 @@
|
||||
*/
|
||||
|
||||
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
|
||||
module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks
|
||||
module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks;
|
||||
|
@ -77,8 +77,8 @@ export default class SecurityExtensionAbility extends extension {
|
||||
win.setWindowBackgroundColor(BG_COLOR);
|
||||
await win.showWindow();
|
||||
this.monitorFold(win);
|
||||
} catch {
|
||||
console.error(TAG + 'window create failed!');
|
||||
} catch (err) {
|
||||
console.error(TAG + `window create failed! err: ${JSON.stringify(err)}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,27 +94,26 @@ export default class ServiceExtensionAbility extends extension {
|
||||
console.info(TAG + 'showWindow end.');
|
||||
globalThis.windowNum ++;
|
||||
GlobalContext.store('windowNum', globalThis.windowNum);
|
||||
} catch {
|
||||
console.info(TAG + 'window create failed!');
|
||||
} catch (err) {
|
||||
console.error(TAG + `window create failed! err: ${JSON.stringify(err)}`);
|
||||
}
|
||||
}
|
||||
|
||||
private async BindDialogTarget(win, want): Promise<void> {
|
||||
let proxy = want.parameters['ohos.ability.params.callback'].value;
|
||||
let option = new rpc.MessageOption();
|
||||
let data = new rpc.MessageSequence();
|
||||
let reply = new rpc.MessageSequence();
|
||||
win.bindDialogTarget(want.parameters['ohos.ability.params.token'].value, () => {
|
||||
Promise.all([
|
||||
data.writeInterfaceToken(ACCESS_TOKEN),
|
||||
]).then(() => {
|
||||
let option = new rpc.MessageOption();
|
||||
let data = new rpc.MessageSequence();
|
||||
let reply = new rpc.MessageSequence();
|
||||
try {
|
||||
data.writeInterfaceToken(ACCESS_TOKEN);
|
||||
proxy.sendMessageRequest(RESULT_CODE_1, data, reply, option);
|
||||
} catch (err) {
|
||||
console.error(TAG + `write result failed: ${JSON.stringify(err)}`);
|
||||
} finally {
|
||||
data.reclaim();
|
||||
reply.reclaim();
|
||||
}).catch(() => {
|
||||
data.reclaim();
|
||||
reply.reclaim();
|
||||
console.error('write result failed!');
|
||||
});
|
||||
}
|
||||
let windowNum = GlobalContext.load('windowNum');
|
||||
windowNum --;
|
||||
GlobalContext.store('windowNum', windowNum);
|
||||
|
@ -50,24 +50,24 @@ export const permissionGroups: PermissionInfo[] = [
|
||||
]
|
||||
|
||||
export const groups: GroupInfo[] = [
|
||||
new GroupInfo('LOCATION', $r('app.string.groupName_location'), $r('app.string.group_label_location'), $r('app.media.ic_public_gps'), [], '', ['ohos.permission.LOCATION_IN_BACKGROUND', 'ohos.permission.APPROXIMATELY_LOCATION', 'ohos.permission.LOCATION'], true, 'app.string.enable_description_location', $r('app.string.forbidden_description_location')),
|
||||
new GroupInfo('CAMERA', $r('app.string.groupName_camera'), $r('app.string.group_label_camera'), $r('app.media.ic_public_camera'), [], '', ['ohos.permission.CAMERA'], true, 'app.string.enable_description_camera', $r('app.string.forbidden_description_camera')),
|
||||
new GroupInfo('MICROPHONE', $r('app.string.groupName_microphone'), $r('app.string.group_label_microphone'), $r('app.media.ic_public_voice'), [], '', ['ohos.permission.MICROPHONE'], true, 'app.string.enable_description_microphone', $r('app.string.forbidden_description_microphone')),
|
||||
new GroupInfo('CONTACTS', $r('app.string.groupName_contacts'), $r('app.string.group_label_contacts'), $r('app.media.ic_public_contacts_group'), [], '', ['ohos.permission.READ_CONTACTS', 'ohos.permission.WRITE_CONTACTS'], false),
|
||||
new GroupInfo('CALENDAR', $r('app.string.groupName_calendar'), $r('app.string.group_label_calendar'), $r('app.media.ic_public_calendar'), [], '', ['ohos.permission.READ_CALENDAR', 'ohos.permission.WRITE_CALENDAR', 'ohos.permission.READ_WHOLE_CALENDAR', 'ohos.permission.WRITE_WHOLE_CALENDAR'], true),
|
||||
new GroupInfo('SPORT', $r('app.string.groupName_sport'), $r('app.string.group_label_sport'), $r('app.media.ic_sport'), [], '', ['ohos.permission.ACTIVITY_MOTION'], true, 'app.string.enable_description_sport', $r('app.string.forbidden_description_sport')),
|
||||
new GroupInfo('HEALTH', $r('app.string.groupName_health'), $r('app.string.group_label_health'), $r('app.media.ic_ssensor'), [], '', ['ohos.permission.READ_HEALTH_DATA'], true, 'app.string.enable_description_health', $r('app.string.forbidden_description_health')),
|
||||
new GroupInfo('LOCATION', $r('app.string.groupName_location'), 'app.string.group_label_location', $r('app.media.ic_public_gps'), [], '', ['ohos.permission.LOCATION_IN_BACKGROUND', 'ohos.permission.APPROXIMATELY_LOCATION', 'ohos.permission.LOCATION'], true, 'app.string.enable_description_location', $r('app.string.forbidden_description_location')),
|
||||
new GroupInfo('CAMERA', $r('app.string.groupName_camera'), 'app.string.group_label_camera', $r('app.media.ic_public_camera'), [], '', ['ohos.permission.CAMERA'], true, 'app.string.enable_description_camera', $r('app.string.forbidden_description_camera')),
|
||||
new GroupInfo('MICROPHONE', $r('app.string.groupName_microphone'), 'app.string.group_label_microphone', $r('app.media.ic_public_voice'), [], '', ['ohos.permission.MICROPHONE'], true, 'app.string.enable_description_microphone', $r('app.string.forbidden_description_microphone')),
|
||||
new GroupInfo('CONTACTS', $r('app.string.groupName_contacts'), 'app.string.group_label_contacts', $r('app.media.ic_public_contacts_group'), [], '', ['ohos.permission.READ_CONTACTS', 'ohos.permission.WRITE_CONTACTS'], false),
|
||||
new GroupInfo('CALENDAR', $r('app.string.groupName_calendar'), 'app.string.group_label_calendar', $r('app.media.ic_public_calendar'), [], '', ['ohos.permission.READ_CALENDAR', 'ohos.permission.WRITE_CALENDAR', 'ohos.permission.READ_WHOLE_CALENDAR', 'ohos.permission.WRITE_WHOLE_CALENDAR'], true),
|
||||
new GroupInfo('SPORT', $r('app.string.groupName_sport'), 'app.string.group_label_sport', $r('app.media.ic_sport'), [], '', ['ohos.permission.ACTIVITY_MOTION'], true, 'app.string.enable_description_sport', $r('app.string.forbidden_description_sport')),
|
||||
new GroupInfo('HEALTH', $r('app.string.groupName_health'), 'app.string.group_label_health', $r('app.media.ic_ssensor'), [], '', ['ohos.permission.READ_HEALTH_DATA'], true, 'app.string.enable_description_health', $r('app.string.forbidden_description_health')),
|
||||
new GroupInfo('OTHER', $r('app.string.groupName_other'), '', $r('app.media.ic_more'), [], '', [], true),
|
||||
new GroupInfo('IMAGE_AND_VIDEOS', $r('sys.string.ohos_lab_read_imagevideo'), $r('app.string.group_label_image_and_videos'), $r('app.media.ic_public_picture'), [], '', ['ohos.permission.READ_IMAGEVIDEO', 'ohos.permission.WRITE_IMAGEVIDEO', 'ohos.permission.MEDIA_LOCATION'], false, 'app.string.enable_description_image', $r('app.string.forbidden_description_image')),
|
||||
new GroupInfo('AUDIOS', $r('sys.string.ohos_lab_read_audio'), $r('app.string.group_label_audios'), $r('app.media.ic_public_audio'), [], '', ['ohos.permission.READ_AUDIO', 'ohos.permission.WRITE_AUDIO'], false, 'app.string.enable_description_audios', $r('app.string.forbidden_description_audios')),
|
||||
new GroupInfo('DOCUMENTS', $r('sys.string.ohos_lab_read_document'), $r('app.string.group_label_document'), $r('app.media.ic_public_folder'), [], '', ['ohos.permission.READ_DOCUMENT', 'ohos.permission.WRITE_DOCUMENT', 'ohos.permission.READ_MEDIA', 'ohos.permission.WRITE_MEDIA'], false, 'app.string.enable_description_documents', $r('app.string.forbidden_description_documents')),
|
||||
new GroupInfo('ADS', $r('app.string.groupName_ADS'), $r('app.string.group_label_ADS'), $r('app.media.track'), [], '', ['ohos.permission.APP_TRACKING_CONSENT'], false, 'app.string.enable_description_ADS', $r('app.string.forbidden_description_ADS')),
|
||||
new GroupInfo('GET_INSTALLED_BUNDLE_LIST', $r('app.string.groupName_appList'), $r('app.string.group_label_appList'), $r('app.media.ic_public_app_list'), [], '', ['ohos.permission.GET_INSTALLED_BUNDLE_LIST'], false, 'app.string.enable_description_appList', $r('app.string.forbidden_description_appList')),
|
||||
new GroupInfo('DISTRIBUTED_DATASYNC', $r('app.string.multi_device_collaboration'), $r('app.string.group_label_distributed_datasync'), $r('app.media.ic_multi_device_vector'), [], '', ['ohos.permission.DISTRIBUTED_DATASYNC'], false, 'app.string.enable_description_distributed_datasync', $r('app.string.forbidden_description_distributed_datasync')),
|
||||
new GroupInfo('BLUETOOTH', $r('app.string.groupName_bluetooth'), $r('app.string.group_label_bluetooth'), $r('app.media.ic_public_bluetooth'), [], '', ['ohos.permission.ACCESS_BLUETOOTH'], false, 'app.string.enable_description_bluetooth', $r('app.string.forbidden_description_bluetooth')),
|
||||
new GroupInfo('PASTEBOARD', $r('app.string.groupName_pasteboard'), $r('app.string.group_label_pasteboard'), $r('app.media.ic_clipboard'), [], '', ['ohos.permission.READ_PASTEBOARD'], false, 'app.string.enable_description_pasteboard', $r('app.string.forbidden_description_pasteboard')),
|
||||
new GroupInfo('FOLDER', $r('app.string.groupName_folder'), $r('app.string.group_label_folder'), $r('app.media.ic_public_folder'), [], '', ['ohos.permission.READ_WRITE_DOWNLOAD_DIRECTORY', 'ohos.permission.READ_WRITE_DESKTOP_DIRECTORY', 'ohos.permission.READ_WRITE_DOCUMENTS_DIRECTORY'], false, 'app.string.enable_description_folder', $r('app.string.forbidden_description_folder')),
|
||||
new GroupInfo('NEARLINK', $r('app.string.groupName_nearLink'), $r('app.string.group_label_nearLink'), $r('app.media.ic_nearLink'), [], '', ['ohos.permission.ACCESS_NEARLINK'], false, 'app.string.enable_description_nearLink', $r('app.string.forbidden_description_nearLink'))
|
||||
new GroupInfo('IMAGE_AND_VIDEOS', $r('sys.string.ohos_lab_read_imagevideo'), 'app.string.group_label_image_and_videos', $r('app.media.ic_public_picture'), [], '', ['ohos.permission.READ_IMAGEVIDEO', 'ohos.permission.WRITE_IMAGEVIDEO', 'ohos.permission.MEDIA_LOCATION'], false, 'app.string.enable_description_image', $r('app.string.forbidden_description_image')),
|
||||
new GroupInfo('AUDIOS', $r('sys.string.ohos_lab_read_audio'), 'app.string.group_label_audios', $r('app.media.ic_public_audio'), [], '', ['ohos.permission.READ_AUDIO', 'ohos.permission.WRITE_AUDIO'], false, 'app.string.enable_description_audios', $r('app.string.forbidden_description_audios')),
|
||||
new GroupInfo('DOCUMENTS', $r('sys.string.ohos_lab_read_document'), 'app.string.group_label_document', $r('app.media.ic_public_folder'), [], '', ['ohos.permission.READ_DOCUMENT', 'ohos.permission.WRITE_DOCUMENT', 'ohos.permission.READ_MEDIA', 'ohos.permission.WRITE_MEDIA'], false, 'app.string.enable_description_documents', $r('app.string.forbidden_description_documents')),
|
||||
new GroupInfo('ADS', $r('app.string.groupName_ADS'), 'app.string.group_label_ADS', $r('app.media.track'), [], '', ['ohos.permission.APP_TRACKING_CONSENT'], false, 'app.string.enable_description_ADS', $r('app.string.forbidden_description_ADS')),
|
||||
new GroupInfo('GET_INSTALLED_BUNDLE_LIST', $r('app.string.groupName_appList'), 'app.string.group_label_appList', $r('app.media.ic_public_app_list'), [], '', ['ohos.permission.GET_INSTALLED_BUNDLE_LIST'], false, 'app.string.enable_description_appList', $r('app.string.forbidden_description_appList')),
|
||||
new GroupInfo('DISTRIBUTED_DATASYNC', $r('app.string.multi_device_collaboration'), 'app.string.group_label_distributed_datasync', $r('app.media.ic_multi_device_vector'), [], '', ['ohos.permission.DISTRIBUTED_DATASYNC'], false, 'app.string.enable_description_distributed_datasync', $r('app.string.forbidden_description_distributed_datasync')),
|
||||
new GroupInfo('BLUETOOTH', $r('app.string.groupName_bluetooth'), 'app.string.group_label_bluetooth', $r('app.media.ic_public_bluetooth'), [], '', ['ohos.permission.ACCESS_BLUETOOTH'], false, 'app.string.enable_description_bluetooth', $r('app.string.forbidden_description_bluetooth')),
|
||||
new GroupInfo('PASTEBOARD', $r('app.string.groupName_pasteboard'), 'app.string.group_label_pasteboard', $r('app.media.ic_clipboard'), [], '', ['ohos.permission.READ_PASTEBOARD'], false, 'app.string.enable_description_pasteboard', $r('app.string.forbidden_description_pasteboard')),
|
||||
new GroupInfo('FOLDER', $r('app.string.groupName_folder'), 'app.string.group_label_folder', $r('app.media.ic_public_folder'), [], '', ['ohos.permission.READ_WRITE_DOWNLOAD_DIRECTORY', 'ohos.permission.READ_WRITE_DESKTOP_DIRECTORY', 'ohos.permission.READ_WRITE_DOCUMENTS_DIRECTORY'], false, 'app.string.enable_description_folder', $r('app.string.forbidden_description_folder')),
|
||||
new GroupInfo('NEARLINK', $r('app.string.groupName_nearLink'), 'app.string.group_label_nearLink', $r('app.media.ic_nearLink'), [], '', ['ohos.permission.ACCESS_NEARLINK'], false, 'app.string.enable_description_nearLink', $r('app.string.forbidden_description_nearLink'))
|
||||
];
|
||||
|
||||
export const userGrantPermissions: string[] = [
|
||||
|
@ -252,7 +252,7 @@ export class PermissionInfo {
|
||||
export class GroupInfo {
|
||||
public name: string
|
||||
public groupName: ResourceStr
|
||||
public label: ResourceStr
|
||||
public label: string
|
||||
public icon: ResourceStr
|
||||
public description: Array<ResourceStr>
|
||||
public reason: string
|
||||
@ -264,7 +264,7 @@ export class GroupInfo {
|
||||
constructor(
|
||||
name: string,
|
||||
groupName: ResourceStr,
|
||||
label: ResourceStr,
|
||||
label: string,
|
||||
icon: ResourceStr,
|
||||
description: Array<ResourceStr>,
|
||||
reason: string,
|
||||
|
@ -97,27 +97,30 @@ struct dialogPlusPage {
|
||||
Scroll() {
|
||||
Column() {
|
||||
Row() {
|
||||
Flex({ justifyContent: FlexAlign.Start }) {
|
||||
Text() {
|
||||
Span($r('app.string.whether_to_allow'))
|
||||
Span(this.appName)
|
||||
Span($r('app.string.quotes'))
|
||||
Span(this.showTitle())
|
||||
}
|
||||
.fontSize(Constants.DIALOG_REQ_FONT_SIZE)
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.lineHeight(Constants.DIALOG_REQ_LINE_HEIGHT)
|
||||
.margin({
|
||||
top: Constants.DIALOG_REQ_MARGIN_TOP,
|
||||
left: Constants.DIALOG_REQ_MARGIN_LEFT,
|
||||
right: Constants.DIALOG_REQ_MARGIN_RIGHT
|
||||
})
|
||||
Column() {
|
||||
Text($r(this.showTitle(), this.appName))
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontSize($r('sys.float.Title_S'))
|
||||
.fontColor($r('sys.color.font_primary'))
|
||||
.fontWeight(FontWeight.Bold)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.maxLines(Constants.SECURITY_HEADER_MAX_LINES)
|
||||
.minFontSize($r('sys.float.Subtitle_M'))
|
||||
.maxFontSize($r('sys.float.Title_S'))
|
||||
.heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
|
||||
}
|
||||
.height(Constants.HEADLINE_HEIGHT)
|
||||
.justifyContent(FlexAlign.Center)
|
||||
.padding({
|
||||
top: Constants.DEFAULT_PADDING_TOP,
|
||||
bottom: Constants.DEFAULT_PADDING_BOTTOM,
|
||||
left: Constants.PADDING_24,
|
||||
right: Constants.PADDING_24
|
||||
})
|
||||
}
|
||||
|
||||
Row() {
|
||||
Flex({ justifyContent: FlexAlign.Start }) {
|
||||
Flex({ justifyContent: FlexAlign.Center }) {
|
||||
Text() {
|
||||
if (
|
||||
this.currentGroup().name === 'LOCATION' &&
|
||||
@ -141,11 +144,10 @@ struct dialogPlusPage {
|
||||
}
|
||||
}
|
||||
.textAlign(TextAlign.Start)
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body1'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontColor($r('sys.color.font_primary'))
|
||||
.fontSize($r('sys.float.Body_L'))
|
||||
.lineHeight(Constants.TEXT_SMALL_LINE_HEIGHT)
|
||||
.margin({
|
||||
top: Constants.DIALOG_DESP_MARGIN_TOP,
|
||||
left: Constants.DIALOG_DESP_MARGIN_LEFT,
|
||||
right: Constants.DIALOG_DESP_MARGIN_RIGHT,
|
||||
bottom: Constants.DIALOG_DESP_MARGIN_BOTTOM
|
||||
@ -160,7 +162,7 @@ struct dialogPlusPage {
|
||||
}.constraintSize({ maxHeight: Constants.MAXIMUM_HEADER_HEIGHT })
|
||||
if (this.currentGroup().name === 'LOCATION') {
|
||||
Column() {
|
||||
Button($r('app.string.ALLOWED_ONLY_DURING_USE'))
|
||||
Button($r('app.string.allowed_only_during_use'))
|
||||
.customizeButton()
|
||||
.width(Constants.FULL_WIDTH)
|
||||
.margin({ bottom: Constants.MARGIN_4 })
|
||||
@ -192,7 +194,7 @@ struct dialogPlusPage {
|
||||
} else {
|
||||
Row() {
|
||||
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
|
||||
Button($r('app.string.BAN'))
|
||||
Button($r('app.string.ban'))
|
||||
.onClick(() => {
|
||||
this.privacyCancel(
|
||||
this.grantGroups[this.count], this.accessTokenId, this.reqPerms, this.userFixedFlag
|
||||
@ -206,7 +208,7 @@ struct dialogPlusPage {
|
||||
.opacity(0.2)
|
||||
.margin({ left: Constants.MARGIN_4, right: Constants.MARGIN_4 })
|
||||
Button(
|
||||
this.currentGroup().name === 'PASTEBOARD' ? $r('app.string.THIS_TIME_ONLY') : $r('app.string.ALLOW')
|
||||
this.currentGroup().name === 'PASTEBOARD' ? $r('app.string.This_time_only') : $r('app.string.allow')
|
||||
)
|
||||
.onClick(() => {
|
||||
this.privacyAccept(
|
||||
@ -233,14 +235,14 @@ struct dialogPlusPage {
|
||||
|
||||
build() {}
|
||||
|
||||
showTitle(): ResourceStr {
|
||||
showTitle(): string {
|
||||
let index = this.count >= this.grantGroups.length ? this.grantGroups.length - 1 : this.count;
|
||||
if (this.grantGroups[index].name == 'LOCATION') {
|
||||
if (this.locationFlag == Constants.LOCATION_FUZZY) {
|
||||
return $r('app.string.access_general_location');
|
||||
return 'app.string.access_general_location';
|
||||
}
|
||||
if (this.locationFlag == Constants.LOCATION_UPGRADE) {
|
||||
return $r('app.string.fuzzy_to_exact');
|
||||
return 'app.string.fuzzy_to_exact';
|
||||
}
|
||||
}
|
||||
return this.grantGroups[index].label;
|
||||
@ -400,17 +402,17 @@ struct dialogPlusPage {
|
||||
if (group.name === 'FOLDER') {
|
||||
switch (permission) {
|
||||
case DOWNLOAD_PERMISSION:
|
||||
let downloadGroup = new GroupInfo(group.name, group.groupName, $r('app.string.group_label_download_folder'),
|
||||
let downloadGroup = new GroupInfo(group.name, group.groupName, 'app.string.group_label_download_folder',
|
||||
group.icon, group.description, group.reason, [DOWNLOAD_PERMISSION], group.isShow)
|
||||
this.grantGroups.push(downloadGroup);
|
||||
break;
|
||||
case DESKTOP_PERMISSION:
|
||||
let desktopGroup = new GroupInfo(group.name, group.groupName, $r('app.string.group_label_desktop_folder'),
|
||||
let desktopGroup = new GroupInfo(group.name, group.groupName, 'app.string.group_label_desktop_folder',
|
||||
group.icon, group.description, group.reason, [DESKTOP_PERMISSION], group.isShow)
|
||||
this.grantGroups.push(desktopGroup);
|
||||
break;
|
||||
case DOCUMENTS_PERMISSION:
|
||||
let documentGroup = new GroupInfo(group.name, group.groupName, $r('app.string.group_label_document_folder'),
|
||||
let documentGroup = new GroupInfo(group.name, group.groupName, 'app.string.group_label_document_folder',
|
||||
group.icon, group.description, group.reason, [DOCUMENTS_PERMISSION], group.isShow)
|
||||
this.grantGroups.push(documentGroup);
|
||||
break;
|
||||
|
@ -62,7 +62,7 @@ struct SecurityDialog {
|
||||
}
|
||||
},
|
||||
{
|
||||
value: $r('app.string.ALLOW'),
|
||||
value: $r('app.string.allow'),
|
||||
buttonStyle: ButtonStyleMode.TEXTUAL,
|
||||
action: () => {
|
||||
if (this.dialogController !== null) {
|
||||
@ -119,6 +119,10 @@ struct SecurityDialog {
|
||||
}
|
||||
.height(Constants.HEADLINE_HEIGHT)
|
||||
.justifyContent(FlexAlign.Center)
|
||||
.padding({
|
||||
top: Constants.DEFAULT_PADDING_TOP,
|
||||
bottom: Constants.DEFAULT_PADDING_BOTTOM,
|
||||
})
|
||||
|
||||
Text($r(this.securityParams[this.index].description, this.appName))
|
||||
.textAlign(TextAlign.Start)
|
||||
|
@ -117,20 +117,8 @@
|
||||
"value": "Per inquiry"
|
||||
},
|
||||
{
|
||||
"name": "ALLOW",
|
||||
"value": "ALLOW"
|
||||
},
|
||||
{
|
||||
"name": "BAN",
|
||||
"value": "BAN"
|
||||
},
|
||||
{
|
||||
"name": "THIS_TIME_ONLY",
|
||||
"value": "THIS TIME ONLY"
|
||||
},
|
||||
{
|
||||
"name": "ALLOWED_ONLY_DURING_USE",
|
||||
"value": "ALLOWED ONLY DURING USE"
|
||||
"name": "This_time_only",
|
||||
"value": "This time only"
|
||||
},
|
||||
{
|
||||
"name": "allowed_only_during_use",
|
||||
@ -138,7 +126,7 @@
|
||||
},
|
||||
{
|
||||
"name": "allow_this_time",
|
||||
"value": "ALLOW THIS TIME"
|
||||
"value": "Allow this time"
|
||||
},
|
||||
{
|
||||
"name": "precise_location",
|
||||
@ -160,33 +148,25 @@
|
||||
"name": "close_exact_position",
|
||||
"value": "When Precise location is turned off, the location obtained by the application is biased."
|
||||
},
|
||||
{
|
||||
"name": "whether_to_allow",
|
||||
"value": "Whether to allow \""
|
||||
},
|
||||
{
|
||||
"name": "quotes",
|
||||
"value": "\""
|
||||
},
|
||||
{
|
||||
"name": "access_general_location",
|
||||
"value": " access the general location?"
|
||||
"value": "Allow \"%s\" access the general location?"
|
||||
},
|
||||
{
|
||||
"name": "fuzzy_to_exact",
|
||||
"value": " position access to change from \"APPROXIMATE POSITION\" to \"EXACT POSITION\"?"
|
||||
"value": "Allow \"%s\" position access to change from \"APPROXIMATE POSITION\" to \"EXACT POSITION\"?"
|
||||
},
|
||||
{
|
||||
"name": "cancel",
|
||||
"value": "CANCEL"
|
||||
"value": "Cancel"
|
||||
},
|
||||
{
|
||||
"name": "open",
|
||||
"value": "OPEN"
|
||||
"value": "Open"
|
||||
},
|
||||
{
|
||||
"name": "close",
|
||||
"value": "CLOSE"
|
||||
"value": "Close"
|
||||
},
|
||||
{
|
||||
"name": "camera",
|
||||
@ -330,99 +310,83 @@
|
||||
},
|
||||
{
|
||||
"name": "group_label_location",
|
||||
"value": " access location information?"
|
||||
"value": "Allow \"%s\" access location information?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_camera",
|
||||
"value": " using a camera?"
|
||||
"value": "Allow \"%s\" using a camera?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_microphone",
|
||||
"value": " using a microphone?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_phone",
|
||||
"value": " use to dial a phone?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_sms",
|
||||
"value": " access to information?"
|
||||
"value": "Allow \"%s\" using a microphone?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_contacts",
|
||||
"value": " access the address book?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_call_log",
|
||||
"value": " access to call records?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_media",
|
||||
"value": " access to media and files?"
|
||||
"value": "Allow \"%s\" access the address book?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_calendar",
|
||||
"value": " access to the calendar?"
|
||||
"value": "Allow \"%s\" access to the calendar?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_sport",
|
||||
"value": " visit the gym?"
|
||||
"value": "Allow \"%s\" visit the gym?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_health",
|
||||
"value": " use body sensors?"
|
||||
"value": "Allow \"%s\" use body sensors?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_distributed_datasync",
|
||||
"value": " use multiple device collaboration?"
|
||||
"value": "Allow \"%s\" use multiple device collaboration?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_image_and_videos",
|
||||
"value": " access to pictures and videos?"
|
||||
"value": "Allow \"%s\" access to pictures and videos?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_audios",
|
||||
"value": " access to music and audio?"
|
||||
"value": "Allow \"%s\" access to music and audio?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_document",
|
||||
"value": " access to files?"
|
||||
"value": "Allow \"%s\" access to files?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_ADS",
|
||||
"value": " access AD tracking?"
|
||||
"value": "Allow \"%s\" access AD tracking?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_appList",
|
||||
"value": " read the list of installed apps?"
|
||||
"value": "Allow \"%s\" read the list of installed apps?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_bluetooth",
|
||||
"value": " access Bluetooth?"
|
||||
"value": "Allow \"%s\" access Bluetooth?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_pasteboard",
|
||||
"value": " access Pasteboard?"
|
||||
"value": "Allow \"%s\" access Pasteboard?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_folder",
|
||||
"value": " access Folder?"
|
||||
"value": "Allow \"%s\" access Folder?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_download_folder",
|
||||
"value": " access the \"Downloads\" folder?"
|
||||
"value": "Allow \"%s\" access the \"Downloads\" folder?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_desktop_folder",
|
||||
"value": " access the \"Desktop\" folder?"
|
||||
"value": "Allow \"%s\" access the \"Desktop\" folder?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_document_folder",
|
||||
"value": " access the \"Document\" folder?"
|
||||
"value": "Allow \"%s\" access the \"Document\" folder?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_nearLink",
|
||||
"value": " access NearLink?"
|
||||
"value": "Allow \"%s\" access NearLink?"
|
||||
},
|
||||
{
|
||||
"name": "enable_description_location",
|
||||
|
@ -117,21 +117,9 @@
|
||||
"value": "每次询问"
|
||||
},
|
||||
{
|
||||
"name": "ALLOW",
|
||||
"value": "允许"
|
||||
},
|
||||
{
|
||||
"name": "BAN",
|
||||
"value": "禁止"
|
||||
},
|
||||
{
|
||||
"name": "THIS_TIME_ONLY",
|
||||
"name": "This_time_only",
|
||||
"value": "仅本次允许"
|
||||
},
|
||||
{
|
||||
"name": "ALLOWED_ONLY_DURING_USE",
|
||||
"value": "仅使用期间允许"
|
||||
},
|
||||
{
|
||||
"name": "allowed_only_during_use",
|
||||
"value": "仅使用期间允许"
|
||||
@ -160,21 +148,13 @@
|
||||
"name": "close_exact_position",
|
||||
"value": "关闭精确位置后,应用获取的位置会有偏差。"
|
||||
},
|
||||
{
|
||||
"name": "whether_to_allow",
|
||||
"value": "是否允许“"
|
||||
},
|
||||
{
|
||||
"name": "quotes",
|
||||
"value": "”"
|
||||
},
|
||||
{
|
||||
"name": "access_general_location",
|
||||
"value": "访问大致位置?"
|
||||
"value": "允许“%s”访问大致位置?"
|
||||
},
|
||||
{
|
||||
"name": "fuzzy_to_exact",
|
||||
"value": "的位置访问权限从“大致位置”改为“精确位置”?"
|
||||
"value": "允许“%s”的位置访问权限从“大致位置”改为“精确位置”?"
|
||||
},
|
||||
{
|
||||
"name": "cancel",
|
||||
@ -330,99 +310,83 @@
|
||||
},
|
||||
{
|
||||
"name": "group_label_location",
|
||||
"value": "访问位置信息?"
|
||||
"value": "允许“%s”访问位置信息?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_camera",
|
||||
"value": "使用相机?"
|
||||
"value": "允许“%s”使用相机?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_microphone",
|
||||
"value": "使用麦克风?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_phone",
|
||||
"value": "使用拨打电话?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_sms",
|
||||
"value": "访问信息?"
|
||||
"value": "允许“%s”使用麦克风?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_contacts",
|
||||
"value": "访问通讯录?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_call_log",
|
||||
"value": "访问通话记录?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_media",
|
||||
"value": "访问媒体和文件?"
|
||||
"value": "允许“%s”访问通讯录?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_calendar",
|
||||
"value": "访问日历?"
|
||||
"value": "允许“%s”访问日历?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_sport",
|
||||
"value": "访问健身运动?"
|
||||
"value": "允许“%s”访问健身运动?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_health",
|
||||
"value": "使用身体传感器?"
|
||||
"value": "允许“%s”使用身体传感器?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_distributed_datasync",
|
||||
"value": "使用多设备协同?"
|
||||
"value": "允许“%s”使用多设备协同?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_image_and_videos",
|
||||
"value": "访问图片和视频?"
|
||||
"value": "允许“%s”访问图片和视频?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_audios",
|
||||
"value": "访问音乐和音频?"
|
||||
"value": "允许“%s”访问音乐和音频?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_document",
|
||||
"value": "访问文件?"
|
||||
"value": "允许“%s”访问文件?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_ADS",
|
||||
"value": "访问广告跟踪?"
|
||||
"value": "允许“%s”访问广告跟踪?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_appList",
|
||||
"value": "读取已安装应用列表?"
|
||||
"value": "允许“%s”读取已安装应用列表?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_bluetooth",
|
||||
"value": "访问蓝牙?"
|
||||
"value": "允许“%s”访问蓝牙?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_pasteboard",
|
||||
"value": "访问剪贴板?"
|
||||
"value": "允许“%s”访问剪贴板?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_folder",
|
||||
"value": "访问文件夹?"
|
||||
"value": "允许“%s”访问文件夹?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_download_folder",
|
||||
"value": "访问“下载”文件夹?"
|
||||
"value": "允许“%s”访问“下载”文件夹?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_desktop_folder",
|
||||
"value": "访问“桌面”文件夹?"
|
||||
"value": "允许“%s”访问“桌面”文件夹?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_document_folder",
|
||||
"value": "访问“文档”文件夹?"
|
||||
"value": "允许“%s”访问“文档”文件夹?"
|
||||
},
|
||||
{
|
||||
"name": "group_label_nearLink",
|
||||
"value": "访问星闪?"
|
||||
"value": "允许“%s”访问星闪?"
|
||||
},
|
||||
{
|
||||
"name": "enable_description_location",
|
||||
|
Loading…
Reference in New Issue
Block a user