!167 2c文件右键加密保护

Merge pull request !167 from 王力量/share_weekly
This commit is contained in:
openharmony_ci 2024-06-06 07:42:52 +00:00 committed by Gitee
commit d5f0372803
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 12 additions and 1 deletions

View File

@ -319,7 +319,7 @@ export default class MainAbility extends UIExtensionAbility {
this.dlpFilesToEncrypt(session);
} else {
await GetAlertMessage.startAlertAbility(this.context, {
code: Constants.ERR_JS_APP_INSIDE_ERROR } as BusinessError);
code: Constants.ERR_JS_APP_CANNOT_OPEN } as BusinessError);
}
} catch {
return;

View File

@ -142,6 +142,8 @@ export class GetAlertMessage {
return { 'msg': $r('app.string.MESSAGE_APP_FILE_PARAM_ERROR') } as Record<string, Resource>;
case Constants.ERR_JS_USER_NO_PERMISSION:
return { 'msg': $r('app.string.MESSAGE_APP_NOT_HAVE_PERM') } as Record<string, Resource>;
case Constants.ERR_JS_APP_CANNOT_OPEN:
return { 'msg': $r('app.string.CANNOT_OPEN_THIS_TYPE_FILE') } as Record<string, Resource>;
default:
if (defaultTitle !== undefined && defaultMessage != undefined) {
return { 'title': defaultTitle, 'msg': defaultMessage } as Record<string, Resource>;

View File

@ -177,6 +177,7 @@ export default class Constants {
public static readonly ERR_JS_APP_SYSTEM_IS_AUTHENTICATED = 8;
public static readonly ERR_JS_APP_NETWORK_INVALID = 9;
public static readonly ERR_JS_APP_ENCRYPTING = 10;
public static readonly ERR_JS_APP_CANNOT_OPEN = 11;
public static readonly ERR_JS_CREDENTIAL_TIMEOUT = 19100003;
public static readonly ERR_JS_CREDENTIAL_SERVICE_ERROR = 19100004;
public static readonly ERR_JS_CREDENTIAL_SERVER_ERROR = 19100005;

View File

@ -208,6 +208,10 @@
"name": "MESSAGE_APP_NOT_HAVE_PERM",
"value": "You don't have permission to view this file."
},
{
"name": "CANNOT_OPEN_THIS_TYPE_FILE",
"value": "Cannot open this type of file"
},
{
"name": "MESSAGE_APP_FILE_PARAM_ERROR",
"value": "Unable to open file. Check and try again."

View File

@ -208,6 +208,10 @@
"name": "MESSAGE_APP_NOT_HAVE_PERM",
"value": "您没有权限查看此文件。"
},
{
"name": "CANNOT_OPEN_THIS_TYPE_FILE",
"value": "无法打开此类型文件。"
},
{
"name": "MESSAGE_APP_FILE_PARAM_ERROR",
"value": "无法打开此文件。请检查后重试。"