From 0d9b88026f7f59f6be5209814a31090d0e5c4585 Mon Sep 17 00:00:00 2001 From: liuyanzhi Date: Fri, 22 Jul 2022 09:02:57 +0800 Subject: [PATCH] aaaa Signed-off-by: liuyanzhi Change-Id: Icacfe143b9dc1284577699364ea3f2163d646692 --- .../main/extend/systemplugin/napi/ohos_commonEvent.js | 3 ++- .../extend/systemplugin/napi/ohos_events_emitter.js | 3 +++ .../extend/systemplugin/napi/ohos_notification.js | 11 ++++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/runtime/main/extend/systemplugin/napi/ohos_commonEvent.js b/runtime/main/extend/systemplugin/napi/ohos_commonEvent.js index 9dbe65dd..9e7abd7c 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_commonEvent.js +++ b/runtime/main/extend/systemplugin/napi/ohos_commonEvent.js @@ -252,7 +252,8 @@ export function mockCommonEvent() { if (typeof args[len - 1] === 'function') { args[len - 1].call(this, paramMock.businessErrorMock); } - } + }, + Support } return commonEvent } diff --git a/runtime/main/extend/systemplugin/napi/ohos_events_emitter.js b/runtime/main/extend/systemplugin/napi/ohos_events_emitter.js index b712a291..0ef3f567 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_events_emitter.js +++ b/runtime/main/extend/systemplugin/napi/ohos_events_emitter.js @@ -55,6 +55,9 @@ export function mockEmitter() { console.warn("emitter.emit interface mocked in the Previewer. How this interface works on the" + " Previewer may be different from that on a real device."); }, + EventData, + InnerEvent, + EventPriority } return emitter } diff --git a/runtime/main/extend/systemplugin/napi/ohos_notification.js b/runtime/main/extend/systemplugin/napi/ohos_notification.js index 6aa55fb7..cab703c9 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_notification.js +++ b/runtime/main/extend/systemplugin/napi/ohos_notification.js @@ -419,6 +419,9 @@ export function mockNotification() { }); } }, + SlotType, + ContentType, + SlotLevel, subscribe: function (...args) { console.warn('notification.subscribe interface mocked in the Previewer. How this interface works on the' + ' Previewer may be different from that on a real device.'); @@ -778,7 +781,13 @@ export function mockNotification() { resolve(paramMock.paramBooleanMock); }) } - } + }, + BundleOption, + NotificationKey, + DoNotDisturbType, + DoNotDisturbDate, + DeviceRemindType, + SourceType } return notification }