mirror of
https://gitee.com/openharmony/applications_permission_manager
synced 2024-11-23 03:09:41 +00:00
fix application_copy problem
Signed-off-by: baoyang <baoyang9@huawei.com> Change-Id: I2d573cb73d1625c76216c103f99ffc298c4f7bd5
This commit is contained in:
parent
cd4f029e11
commit
e43f62bd79
@ -61,13 +61,13 @@ export default class SecurityExtensionAbility extends extension {
|
||||
|
||||
private async createWindow(name: string, windowType, rect, want): Promise<void> {
|
||||
console.info(TAG + 'create securityWindow');
|
||||
let dialogSet: Set<string> = GlobalContext.load('dialogSet');
|
||||
let dialogSet: Set<number> = GlobalContext.load('dialogSet');
|
||||
if (!dialogSet) {
|
||||
dialogSet = new Set<string>();
|
||||
dialogSet = new Set<number>();
|
||||
console.info(TAG + 'new dialogSet');
|
||||
GlobalContext.store('dialogSet', dialogSet);
|
||||
}
|
||||
let callerToken: string = want.parameters['ohos.aafwk.param.callerBundleName'];
|
||||
let callerToken: number = want.parameters['ohos.caller.uid'];
|
||||
if (dialogSet.has(callerToken)) {
|
||||
console.info(TAG + 'window already exists');
|
||||
return;
|
||||
@ -77,8 +77,8 @@ export default class SecurityExtensionAbility extends extension {
|
||||
let storage: LocalStorage = new LocalStorage({ 'want': want, 'win': win });
|
||||
await win.bindDialogTarget(want.parameters['ohos.ability.params.token'].value, () => {
|
||||
win.destroyWindow();
|
||||
let dialogSet: Set<string> = GlobalContext.load('dialogSet');
|
||||
let callerToken: string = want.parameters['ohos.aafwk.param.callerBundleName'];
|
||||
let dialogSet: Set<number> = GlobalContext.load('dialogSet');
|
||||
let callerToken: number = want.parameters['ohos.caller.uid'];
|
||||
dialogSet.delete(callerToken);
|
||||
GlobalContext.store('dialogSet', dialogSet);
|
||||
if (dialogSet.size === 0) {
|
||||
|
@ -20,7 +20,7 @@ export class GlobalContext {
|
||||
bundleName: string;
|
||||
globalState: string;
|
||||
windowNum: number;
|
||||
dialogSet: Set<string>;
|
||||
dialogSet: Set<number>;
|
||||
|
||||
public static getContext(): GlobalContext {
|
||||
if (!GlobalContext.instance) {
|
||||
|
@ -63,8 +63,8 @@ struct SecurityDialog {
|
||||
action: () => {
|
||||
this.dialogController?.close();
|
||||
this.win.destroyWindow();
|
||||
let dialogSet: Set<string> = GlobalContext.load('dialogSet');
|
||||
let callerToken: string = this.want.parameters['ohos.aafwk.param.callerBundleName'];
|
||||
let dialogSet: Set<number> = GlobalContext.load('dialogSet');
|
||||
let callerToken: number = this.want.parameters['ohos.caller.uid'];
|
||||
dialogSet.delete(callerToken);
|
||||
GlobalContext.store('dialogSet', dialogSet);
|
||||
if (dialogSet.size === 0) {
|
||||
@ -85,8 +85,8 @@ struct SecurityDialog {
|
||||
autoCancel: false,
|
||||
cancel: () => {
|
||||
this.win.destroyWindow();
|
||||
let dialogSet: Set<string> = GlobalContext.load('dialogSet');
|
||||
let callerToken: string = this.want.parameters['ohos.aafwk.param.callerBundleName'];
|
||||
let dialogSet: Set<number> = GlobalContext.load('dialogSet');
|
||||
let callerToken: number = this.want.parameters['ohos.caller.uid'];
|
||||
dialogSet.delete(callerToken);
|
||||
GlobalContext.store('dialogSet', dialogSet);
|
||||
if (dialogSet.size === 0) {
|
||||
@ -238,8 +238,8 @@ struct SecurityDialog {
|
||||
data.reclaim();
|
||||
reply.reclaim();
|
||||
this.win.destroyWindow();
|
||||
let dialogSet: Set<string> = GlobalContext.load('dialogSet');
|
||||
let callerToken: string = this.want.parameters['ohos.aafwk.param.callerBundleName'];
|
||||
let dialogSet: Set<number> = GlobalContext.load('dialogSet');
|
||||
let callerToken: number = this.want.parameters['ohos.caller.uid'];
|
||||
dialogSet.delete(callerToken);
|
||||
GlobalContext.store('dialogSet', dialogSet);
|
||||
if (dialogSet.size === 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user