未验证 提交 3e8f2778 编写于 作者: O openharmony_ci 提交者: Gitee

!5983 【杂散】【主题】覆盖新增壁纸和锁屏的接口,挑单到月度分支

Merge pull request !5983 from 张育帅/cherry-pick-1666247868
// @ts-nocheck
/* /*
* Copyright (c) 2022 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
...@@ -295,15 +294,10 @@ export default function screenLockJSUnit() { ...@@ -295,15 +294,10 @@ export default function screenLockJSUnit() {
console.info("------------------start SUB_MISC_THEME_screenLock_API_0009-------------------"); console.info("------------------start SUB_MISC_THEME_screenLock_API_0009-------------------");
let flag = null; let flag = null;
try{ try{
flag = await screenLock.onSystemEvent((err, data) => { flag = await screenLock.onSystemEvent((data) => {
console.info("SUB_MISC_THEME_screenLock_API_0009 screenLock.onSystemEvent start"); console.info("SUB_MISC_THEME_screenLock_API_0009 screenLock.onSystemEvent start");
if (err){
console.info("SUB_MISC_THEME_screenLock_API_0009 screenLock.onSystemEvent err: " + JSON.stringify(err));
expect().assertFalse();
done();
};
expect( data != null ).assertTrue(); expect( data != null ).assertTrue();
console.info("SUB_MISC_THEME_screenLock_API_0009 screenLock.onSystemEvent end" + data) console.info("SUB_MISC_THEME_screenLock_API_0009 screenLock.onSystemEvent end" + data);
done(); done();
}); });
console.info("SUB_MISC_THEME_screenLock_API_0009 data: " + flag); console.info("SUB_MISC_THEME_screenLock_API_0009 data: " + flag);
...@@ -315,5 +309,62 @@ export default function screenLockJSUnit() { ...@@ -315,5 +309,62 @@ export default function screenLockJSUnit() {
console.info("-----------------end SUB_MISC_THEME_screenLock_API_0009--------------------"); console.info("-----------------end SUB_MISC_THEME_screenLock_API_0009--------------------");
done() done()
}); });
/*
* @tc.number SUB_MISC_THEME_screenLock_API_0010
* @tc.name Test isLocked() to Checks whether the screen is currently locked.
* @tc.desc Function test
* @tc.level 0
*/
it('SUB_MISC_THEME_screenLock_API_0010', 0, async function (done) {
console.info('------------------SUB_MISC_THEME_screenLock_API_0010 start----------------------');
let lock = null;
try{
lock = screenLock.isLocked()
console.info('SUB_MISC_THEME_screenLock_API_0010 data : ' + JSON.stringify(lock));
if (typeof lock == "boolean") {
expect(true).assertTrue();
done()
}else{
expect().assertFail();
done()
}
}catch(err){
console.info('SUB_MISC_THEME_screenLock_API_0010 err : ' + JSON.stringify(err));
expect().assertFail();
done()
}
console.info('------------------SUB_MISC_THEME_screenLock_API_0010 end----------------------');
done()
});
/*
* @tc.number SUB_MISC_THEME_screenLock_API_0011
* @tc.name Test isSecure() to Checks whether the screen lock of the current device is secure.
* @tc.desc Function test
* @tc.level 0
*/
it('SUB_MISC_THEME_screenLock_API_0011', 0, async function (done) {
console.info('------------------SUB_MISC_THEME_screenLock_API_0011 start----------------------');
let secured = null;
try{
secured = screenLock.isSecure()
console.info('SUB_MISC_THEME_screenLock_API_0011 data : ' + JSON.stringify(secured));
if (typeof secured == "boolean") {
expect(true).assertTrue();
done()
}else{
expect().assertFail();
done()
}
}catch(err){
console.info('SUB_MISC_THEME_screenLock_API_0011 err : ' + JSON.stringify(err));
expect().assertFail();
done()
}
console.info('------------------SUB_MISC_THEME_screenLock_API_0011 end----------------------');
done()
});
}); });
} }
...@@ -14,6 +14,15 @@ ...@@ -14,6 +14,15 @@
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
},
{
"type": "PushKit",
"pre-push": [
"mount -o rw,remount /"
],
"push": [
"wp.png ->/system/etc/wp.png"
]
} }
] ]
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册