mirror of
https://gitee.com/openharmony/applications_dlp_manager
synced 2024-11-23 09:59:57 +00:00
move into if
Signed-off-by: xuqian <xuqian65@huawei.com>
This commit is contained in:
parent
6f7e00b522
commit
bef19bab61
@ -36,14 +36,14 @@ export default class DataAbility extends ServiceExtensionAbility {
|
||||
private isSubscriber = false;
|
||||
|
||||
async sandbox2linkFile(key: string) {
|
||||
try {
|
||||
await deleteSandbox2linkFileData(key, true);
|
||||
} catch (err) {
|
||||
HiLog.error(TAG, `deleteSandbox2linkFileData error`);
|
||||
}
|
||||
let sandbox2linkFile: Map<string, (number | string | dlpPermission.DLPFile)[][]> =
|
||||
GlobalContext.load('sandbox2linkFile') as Map<string, (number | string | dlpPermission.DLPFile)[][]>;
|
||||
if (sandbox2linkFile.has(key)) {
|
||||
try {
|
||||
await deleteSandbox2linkFileData(key, true);
|
||||
} catch (err) {
|
||||
HiLog.error(TAG, `deleteSandbox2linkFileData error`);
|
||||
}
|
||||
let fileOpenHistory:Map<string, (number | string)[]> =
|
||||
GlobalContext.load('fileOpenHistory') as Map<string, (number | string)[]>;
|
||||
for (let item of Array.from<(string | (number | string)[])[]>(fileOpenHistory)) {
|
||||
|
Loading…
Reference in New Issue
Block a user