diff --git a/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts b/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts index ce4446f..844a0e3 100644 --- a/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts +++ b/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts @@ -73,7 +73,7 @@ class ServiceExtAbility extends ServiceExtension { private createWindow(name: string) { Log.showDebug(TAG, `createWindow name:${name}`) - windowManager.create(this.context, name, 2110).then((win) => { + windowManager.create(this.context, name, windowManager.WindowType.TYPE_KEYGUARD).then((win) => { Log.showInfo(TAG, "before begin " + name + " window show!") win.setPreferredOrientation(AUTO_ROTATION_RETRICTED, (err) => { if (err.code) { diff --git a/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts b/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts index 62b71eb..d4b98e0 100644 --- a/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts +++ b/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts @@ -34,7 +34,7 @@ class ServiceExtAbility extends ServiceExtension { private createWindow(name: string) { Log.showDebug(TAG, `createWindow name:${name}`) - windowManager.create(this.context, name, 2110).then((win) => { + windowManager.create(this.context, name, windowManager.WindowType.TYPE_KEYGUARD).then((win) => { win.loadContent("pages/index").then(() => { Log.showInfo(TAG, name + " window loadContent in then! ") win.show().then(() => {