mirror of
https://gitee.com/openharmony/applications_launcher
synced 2025-02-17 06:19:04 +00:00
Revert "修改检视问题"
This reverts commit d70cb2a20d031b0708a3193a102c910f50541de9. Signed-off-by: 梅旺027708 <wang.mei@archermind.com>
This commit is contained in:
parent
e9d233fd93
commit
5bbbbeee1f
1
OAT.xml
1
OAT.xml
@ -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>
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user