harmony 鸿蒙Screen Lock Changelog
Screen Lock Changelog
cl.screenlock.1 System Events Added to EventType
Access Level
System API
Reason for Change
The strongAuthChanged and screenLockDisabledChanged system events need to be added to report the enabling of strong authentication and disabling of screen lock.
Change Impact
This change is a compatible change.
Before change: The strongAuthChanged and screenLockDisabledChanged system events are not supported.
After change: The strongAuthChanged and screenLockDisabledChanged system events are supported.
Start API Level
API 12
Change Since
OpenHarmony SDK 5.0.0.38
Adaptation Guide The following is the sample code for registering system lock events:
try {
let isSuccess = screenLock.onSystemEvent((event: screenLock.SystemEvent) => {
console.log(`Succeeded in Registering the system event which related to screenlock. eventType: ${event.eventType}`)
});
} catch (err) {
let error = err as BusinessError;
console.error(`Failed to register the system event which related to screenlock, Code: ${error.code}, message: ${error.message}`)
}
你可能感兴趣的鸿蒙文章
harmony 鸿蒙ArkTS Subsystem Changelog
harmony 鸿蒙Resource Scheduler Subsystem Changelog
harmony 鸿蒙Distributed Data Management Changelog
harmony 鸿蒙Media Subsystem Changelog
harmony 鸿蒙Multimodal Subsystem Changelog
harmony 鸿蒙Network Subsystem Changelog
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦