From 02793e4a2b50b672e20f607248bd1c5eea049855 Mon Sep 17 00:00:00 2001 From: EasyGuohf <163991322+EasyGuohf@users.noreply.github.com> Date: Thu, 12 Jun 2025 17:18:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E4=BF=AE=E6=94=B9=EF=BC=9A?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0canIUse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/entryability/EntryAbility.ets | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index de5da38..e10e78a 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -51,8 +51,10 @@ export default class EntryAbility extends UIAbility { }); windowClass = data; if (deviceInfo.deviceType === '2in1') { - data.setWindowDecorVisible(false); - data.setWindowDecorHeight(64); + if (canIUse('SystemCapability.Window.SessionManager')) { + data.setWindowDecorVisible(false); + data.setWindowDecorHeight(64); + } } else { windowClass.setWindowLayoutFullScreen(true).then(() => { hilog.info(0x0000, TAG, 'Succeeded in setting the window layout to full-screen mode.'); -- Gitee