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