Signed-off-by: qixiao-meng <qimeng11@huawei.com>

feat: add lockScreen api
This commit is contained in:
qixiao-meng 2022-08-26 16:12:47 +08:00
parent c9a52beed2
commit db74e93614

View File

@ -53,6 +53,18 @@ export function mockScreenLock() {
})
}
},
lockScreen: function (...args) {
console.warn("screenLock.lockScreen interface mocked in the Previewer. How this interface works on the" +
" Previewer may be different from that on a real device.")
const len = args.length
if (typeof args[len - 1] === 'function') {
args[len - 1].call(this, paramMock.businessErrorMock)
} else {
return new Promise((resolve) => {
resolve();
})
}
},
on: function (...args) {
console.warn("screenLock.on interface mocked in the Previewer. How this interface works on the" +
" Previewer may be different from that on a real device.")