@@ -70,26 +72,6 @@ Checks whether the screen is locked.
letisLocked=screenlock.isLocked();
```
## screenlock.isSecure<sup>9+</sup>
isSecure(): boolean
Checks whether the device is in secure mode. When the device is in secure mode, its screen requires a password, unlock pattern, or other user credentials to unlock.
@@ -347,7 +333,7 @@ Checks whether the screen is locked. This API uses an asynchronous callback to r
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [screenlock.isLocked<sup>9+</sup>](#screenlockislocked9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -377,7 +363,7 @@ Checks whether the screen is locked. This API uses a promise to return the resul
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [screenlock.isLocked<sup>9+</sup>](#screenlockislocked9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -405,7 +391,7 @@ Checks whether the device is in secure mode. When the device is in secure mode,
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [screenlock.isSecure<sup>9+</sup>](#screenlockissecure9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -435,7 +421,7 @@ Checks whether the device is in secure mode. When the device is in secure mode,
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [screenlock.isSecure<sup>9+</sup>](#screenlockissecure9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -462,7 +448,7 @@ Unlocks the screen. This API uses an asynchronous callback to return the result.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [screenlock.unlock<sup>9+</sup>](#screenlockunlock9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -492,7 +478,7 @@ Unlocks the screen. This API uses a promise to return the result.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [screenlock.unlock<sup>9+</sup>](#screenlockunlock9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
| number | ID of the wallpaper. If this type of wallpaper is configured, a number greater than or equal to **0** is returned. Otherwise, **-1** is returned. The value ranges from -1 to (2^31-1).|
| boolean | Whether to allow the application to change the wallpaper for the current user. The value **true** means that the operation is allowed, and **false** means the opposite.|
**Example**
```js
letisChangeAllowed=wallpaper.isChangeAllowed();
```
## wallpaper.isUserChangeAllowed<sup>9+</sup>
isUserChangeAllowed(): boolean
Checks whether the user is allowed to set wallpapers.
| number | Promise used to return the result. If the operation is successful, the file descriptor ID to the wallpaper is returned. Otherwise, error information is returned.|
@@ -527,7 +447,7 @@ Obtains the main color information of the wallpaper of the specified type. This
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.getColorsSync<sup>9+</sup>](#wallpapergetcolorssync9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -558,7 +478,7 @@ Obtains the main color information of the wallpaper of the specified type. This
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.getColorsSync<sup>9+</sup>](#wallpapergetcolorssync9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -592,7 +512,7 @@ Obtains the ID of the wallpaper of the specified type. This API uses an asynchro
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.getIdSync<sup>9+</sup>](#wallpapergetidsync9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -623,7 +543,7 @@ Obtains the ID of the wallpaper of the specified type. This API uses a promise t
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.getIdSync<sup>9+</sup>](#wallpapergetidsync9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -657,7 +577,7 @@ Obtains the minimum height of this wallpaper. This API uses an asynchronous call
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.getMinHeightSync<sup>9+</sup>](#wallpapergetminheightsync9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -687,7 +607,7 @@ Obtains the minimum height of this wallpaper. This API uses a promise to return
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.getMinHeightSync<sup>9+</sup>](#wallpapergetminheightsync9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -715,7 +635,7 @@ Obtains the minimum width of this wallpaper. This API uses an asynchronous callb
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.getMinWidthSync<sup>9+</sup>](#wallpapergetminwidthsync9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -745,7 +665,7 @@ Obtains the minimum width of this wallpaper. This API uses a promise to return t
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.getMinWidthSync<sup>9+</sup>](#wallpapergetminwidthsync9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -773,7 +693,7 @@ Checks whether to allow the application to change the wallpaper for the current
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.isChangeAllowed<sup>9+</sup>](#wallpaperischangeallowed9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -803,7 +723,7 @@ Checks whether to allow the application to change the wallpaper for the current
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.isChangeAllowed<sup>9+</sup>](#wallpaperischangeallowed9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -831,7 +751,7 @@ Checks whether the user is allowed to set wallpapers. This API uses an asynchron
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.isUserChangeAllowed<sup>9+</sup>](#wallpaperisuserchangeallowed9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -861,7 +781,7 @@ Checks whether the user is allowed to set wallpapers. This API uses a promise to
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.isUserChangeAllowed<sup>9+</sup>](#wallpaperisuserchangeallowed9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -889,7 +809,7 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.restore<sup>9+</sup>](#wallpaperrestore9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -922,7 +842,7 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.restore<sup>9+</sup>](#wallpaperrestore9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -958,7 +878,7 @@ Sets a specified source as the wallpaper of a specified type. This API uses an a
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.setImage<sup>9+</sup>](#wallpapersetimage9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -1015,7 +935,7 @@ Sets a specified source as the wallpaper of a specified type. This API uses a pr
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.setImage<sup>9+</sup>](#wallpapersetimage9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -1074,7 +994,7 @@ Obtains the wallpaper of the specified type. This API uses an asynchronous callb
> **NOTE**
>
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [wallpaper.getFileSync<sup>9+</sup>](#wallpapergetfilesync9) instead.
> This API is supported since API version 8 and deprecated since API version 9.
@@ -1107,7 +1027,7 @@ Obtains the wallpaper of the specified type. This API uses a promise to return t
> **NOTE**
>
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [wallpaper.getFileSync<sup>9+</sup>](#wallpapergetfilesync9) instead.
> This API is supported since API version 8 and deprecated since API version 9.
@@ -1143,7 +1063,7 @@ Obtains the pixel map for the wallpaper of the specified type. This API uses an
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.getImage<sup>9+</sup>](#wallpapergetimage9) instead.
> This API is supported since API version 7 and deprecated since API version 9.
@@ -1178,7 +1098,7 @@ Obtains the pixel map for the wallpaper of the specified type. This API uses a p
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [wallpaper.getImage<sup>9+</sup>](#wallpapergetimage9) instead.
> This API is supported since API version 7 and deprecated since API version 9.