From cb8c1c7843a101e959107cda8ff34570c8a8feeb Mon Sep 17 00:00:00 2001 From: qiuxiangdong Date: Sat, 7 May 2022 15:11:57 +0800 Subject: [PATCH] fix: Supports hibernation interfaces for three-party devices Signed-off-by: qiuxiangdong --- runtime/main/extend/systemplugin/napi/power.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/runtime/main/extend/systemplugin/napi/power.js b/runtime/main/extend/systemplugin/napi/power.js index 14f72487..4c3263a6 100644 --- a/runtime/main/extend/systemplugin/napi/power.js +++ b/runtime/main/extend/systemplugin/napi/power.js @@ -36,6 +36,14 @@ export function mockPower() { resolve(paramMock.paramBooleanMock); }) } + }, + wakeupDevice: function (...args) { + console.warn("power.wakeupDevice interface mocked in the Previewer. How this interface works on the" + + " Previewer may be different from that on a real device.") + }, + suspendDevice: function (...args) { + console.warn("power.suspendDevice interface mocked in the Previewer. How this interface works on the" + + " Previewer may be different from that on a real device.") } } return power