harmony 鸿蒙Screen Lock Changelog

  • 2025-06-12
  • 浏览 (17)

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

harmony 鸿蒙File Subsystem Changelog

harmony 鸿蒙Window Subsystem Changelog

0  赞