Revert "修改检视问题"

This reverts commit d70cb2a20d031b0708a3193a102c910f50541de9.

Signed-off-by: 梅旺027708 <wang.mei@archermind.com>
This commit is contained in:
ludao518 2024-03-21 08:49:40 +00:00 committed by 梅旺027708
parent e9d233fd93
commit 5bbbbeee1f
4 changed files with 14 additions and 12 deletions

View File

@ -51,6 +51,7 @@
<policy name="projectPolicy" desc="">
<policyitem type="license" name="Apache-2.0" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/>
<policyitem type="copyright" name="Huawei Device Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/>
<policyitem type="copyright" name="Archermind Technology (Nanjing) Co. Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by Nanjing Archermind"/>
<policyitem type="filetype" name="!binary" path=".*" rule="must" group="defaultGroup" filefilter="binaryFileTypePolicyFilter" desc=""/>
</policy>
</policylist>

View File

@ -1,5 +1,5 @@
/**
* Copyright (c) 2024-2024 Huawei Device Co., Ltd.
* Copyright (c) 2024 Archermind Technology (Nanjing) Co. Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -49,7 +49,7 @@ export class DisplayManager {
private async loadAllDisplays() {
let displays: Array<display.Display> = await display.getAllDisplays()
for (let display of displays) {
for await (let display of displays) {
if (this.displayDevices.findIndex(item => item.id === display.id) < 0) {
Log.showInfo(TAG, 'new display added. detail: ' + JSON.stringify(display))
this.displayDevices.push(display)
@ -78,7 +78,7 @@ export class DisplayManager {
* window(;)
* @param display
*/
private createMainWindow(display: display.Display) {
private async createMainWindow(display: display.Display) {
if (display.id === this.defaultDisplay?.id) {
//主屏不需要创建主窗口
return
@ -100,7 +100,7 @@ export class DisplayManager {
})
}
private findWindow(displayId: number): window.Window {
private async findWindow(displayId: number): Promise<window.Window> {
let resultWindow = undefined
try {
resultWindow = window.findWindow(this.MAIN_WINDOW_PREFIX + displayId)
@ -115,12 +115,13 @@ export class DisplayManager {
if (displayId === this.defaultDisplay?.id) {
return
}
let resultWindow = this.findWindow(displayId)
if (resultWindow?.isWindowShowing()) {
resultWindow.hideWithAnimation()
}
resultWindow?.destroyWindow()
Log.showInfo(TAG, `destroy main window ${displayId} success.`)
this.findWindow(displayId).then((resultWindow: window.Window) => {
if (resultWindow?.isWindowShowing()) {
resultWindow.hideWithAnimation()
}
resultWindow?.destroyWindow()
Log.showInfo(TAG, `destroy main window ${displayId} success.`)
})
}
public destroySubDisplayWindow() {

View File

@ -1,5 +1,5 @@
/**
* Copyright (c) 2024-2024 Huawei Device Co., Ltd.
* Copyright (c) 2024 Archermind Technology (Nanjing) Co. Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at

View File

@ -1,5 +1,5 @@
/**
* Copyright (c) 2024-2024 Huawei Device Co., Ltd.
* Copyright (c) 2024 Archermind Technology (Nanjing) Co. Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at