Theme Framework Subsystem – Screen Lock Management Service Changelog

cl.screenlock.1 Instance Name Change

Changed the name of the instance for importing the @ohos.screenLock module from screenlock to screenLock.

Change Impact

None.

Key API/Component Changes

Before change:

screenlock.isLocked();
screenlock.unlock();
screenlock.lock();
screenlock.onSystemEvent(event=>{});
screenlock.sendScreenLockEvent('unlockScreenResult', 0);
screenlock.isScreenLocked()
screenlock.isSecureMode();
screenlock.unlockScreen();

After change:

screenLock.isLocked();
screenLock.unlock();
screenLock.lock();
screenLock.onSystemEvent(event=>{});
screenLock.sendScreenLockEvent('unlockScreenResult', 0);
screenLock.isScreenLocked()
screenLock.isSecureMode();
screenLock.unlockScreen();

Adaptation Guide

Use screenLock in the import statement.

Before change:

import screenlock from '@ohos.screenLock';

After change:

import screenLock from '@ohos.screenLock';