1# Theme Framework Subsystem – Screenlock Management Service Changelog
2
3## cl.screenlock.1 API Error Change
4
5Since API version 11, error code 13200002 is added to the **unlock()** API. This change is a compatible change and does not require adaptation.
6
7**Access Level**
8
9System API
10
11**Reason for Change**
12
13When an application not in focus calls the **unlock()** API, the previous error code returned – 201 "Permission denied" – does not signify the actual error. To rectify this issue, error code 13200002 is added.
14
15**Change Impact**
16
17This change is a compatible change and does not require adaptation.
18
19**Change Since**
20
21OpenHarmony SDK 4.1.5.2
22
23**Key API/Component Changes**
24
25The error code returned when an application not in focus calls **unlock()** is changed.
26
27- Involved API:
28
29```js
30  function unlock(callback: AsyncCallback<boolean>): void;
31  function unlock():Promise<boolean>;
32```
33
34- Before change:
35
36When an application not in focus calls **unlock()**, error code 201 is returned.
37
38```js
39  /**
40   * Unlock the screen.
41   *
42   * @param { AsyncCallback<boolean> } callback - the callback of unlock.
43   * @throws { BusinessError } 401 - parameter error.
44   * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API.
45   * @throws { BusinessError } 13200002 - the screenlock management service is abnormal.
46   * @syscap SystemCapability.MiscServices.ScreenLock
47   * @systemapi Hide this for inner system use.
48   * @since 9
49   */
50  function unlock(callback: AsyncCallback<boolean>): void;
51
52  /**
53   * Unlock the screen.
54   *
55   * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise.
56   * @throws {BusinessError} 401 - parameter error.
57   * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API.
58   * @throws {BusinessError} 13200002 - the screenlock management service is abnormal.
59   * @syscap SystemCapability.MiscServices.ScreenLock
60   * @systemapi Hide this for inner system use.
61   * @since 9
62   */
63  function unlock():Promise<boolean>;
64```
65
66- After change:
67
68When an application not in focus calls **unlock()**, error code 13200003 is returned.
69
70```js
71  /**
72   * Unlock the screen.
73   *
74   * @param { AsyncCallback<boolean> } callback - the callback of unlock.
75   * @throws { BusinessError } 401 - parameter error.
76   * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API.
77   * @throws { BusinessError } 13200002 - the screenlock management service is abnormal.
78   * @syscap SystemCapability.MiscServices.ScreenLock
79   * @systemapi Hide this for inner system use.
80   * @since 9
81   */
82  /**
83   * Unlock the screen.
84   *
85   * @param { AsyncCallback<boolean> } callback - the callback of unlock.
86   * @throws { BusinessError } 401 - parameter error.
87   * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API.
88   * @throws { BusinessError } 13200002 - the screenlock management service is abnormal.
89   * @throws { BusinessError } 13200003 - illegal use.
90   * @syscap SystemCapability.MiscServices.ScreenLock
91   * @systemapi Hide this for inner system use.
92   * @since 11
93   */
94  function unlock(callback: AsyncCallback<boolean>): void;
95
96  /**
97   * Unlock the screen.
98   *
99   * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise.
100   * @throws {BusinessError} 401 - parameter error.
101   * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API.
102   * @throws {BusinessError} 13200002 - the screenlock management service is abnormal.
103   * @syscap SystemCapability.MiscServices.ScreenLock
104   * @systemapi Hide this for inner system use.
105   * @since 9
106   */
107  /**
108   * Unlock the screen.
109   *
110   * @returns { Promise<boolean> } the promise returned by the function.
111   * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API.
112   * @throws { BusinessError } 13200002 - the screenlock management service is abnormal.
113   * @throws { BusinessError } 13200003 - illegal use.
114   * @syscap SystemCapability.MiscServices.ScreenLock
115   * @systemapi Hide this for inner system use.
116   * @since 11
117   */
118  function unlock():Promise<boolean>;
119```
120
121
122**Adaptation Guide**
123
124This change only involves error codes, and no adaptation is required.
125