diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index de5da3875d7b897f8873668e0cad47cf78d3544b..e10e78a68328c335ed4769eeb9047ed4bfad8eff 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.');