未验证 提交 89b2d781 编写于 作者: O openharmony_ci 提交者: Gitee

!16166 翻译完成 16121:【主题框架】api 接口变更适配

Merge pull request !16166 from ester.zhou/TR-16121
...@@ -58,6 +58,8 @@ Checks whether the screen is locked. ...@@ -58,6 +58,8 @@ Checks whether the screen is locked.
**System capability**: SystemCapability.MiscServices.ScreenLock **System capability**: SystemCapability.MiscServices.ScreenLock
**System API**: This is a system API.
**Return value** **Return value**
| Type | Description | | Type | Description |
...@@ -70,26 +72,6 @@ Checks whether the screen is locked. ...@@ -70,26 +72,6 @@ Checks whether the screen is locked.
let isLocked = screenlock.isLocked(); let isLocked = 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.
**System capability**: SystemCapability.MiscServices.ScreenLock
**Return value**
| Type | Description |
| ------- | ------------------------------------------------------------ |
| boolean | Returns **true** if the device is in secure mode; returns **false** otherwise.|
**Example**
```js
let isSecure = screenlock.isSecure();
```
## screenlock.unlock<sup>9+</sup> ## screenlock.unlock<sup>9+</sup>
unlock(callback: AsyncCallback&lt;boolean&gt;): void unlock(callback: AsyncCallback&lt;boolean&gt;): void
...@@ -98,6 +80,8 @@ Unlocks the screen. This API uses an asynchronous callback to return the result. ...@@ -98,6 +80,8 @@ Unlocks the screen. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.MiscServices.ScreenLock **System capability**: SystemCapability.MiscServices.ScreenLock
**System API**: This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
...@@ -132,6 +116,8 @@ Unlocks the screen. This API uses a promise to return the result. ...@@ -132,6 +116,8 @@ Unlocks the screen. This API uses a promise to return the result.
**System capability**: SystemCapability.MiscServices.ScreenLock **System capability**: SystemCapability.MiscServices.ScreenLock
**System API**: This is a system API.
**Return value** **Return value**
| Type | Description | | Type | Description |
...@@ -347,7 +333,7 @@ Checks whether the screen is locked. This API uses an asynchronous callback to r ...@@ -347,7 +333,7 @@ Checks whether the screen is locked. This API uses an asynchronous callback to r
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.ScreenLock **System capability**: SystemCapability.MiscServices.ScreenLock
...@@ -377,7 +363,7 @@ Checks whether the screen is locked. This API uses a promise to return the resul ...@@ -377,7 +363,7 @@ Checks whether the screen is locked. This API uses a promise to return the resul
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.ScreenLock **System capability**: SystemCapability.MiscServices.ScreenLock
...@@ -405,7 +391,7 @@ Checks whether the device is in secure mode. When the device is in secure mode, ...@@ -405,7 +391,7 @@ Checks whether the device is in secure mode. When the device is in secure mode,
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.ScreenLock **System capability**: SystemCapability.MiscServices.ScreenLock
...@@ -435,7 +421,7 @@ Checks whether the device is in secure mode. When the device is in secure mode, ...@@ -435,7 +421,7 @@ Checks whether the device is in secure mode. When the device is in secure mode,
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.ScreenLock **System capability**: SystemCapability.MiscServices.ScreenLock
...@@ -462,7 +448,7 @@ Unlocks the screen. This API uses an asynchronous callback to return the result. ...@@ -462,7 +448,7 @@ Unlocks the screen. This API uses an asynchronous callback to return the result.
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.ScreenLock **System capability**: SystemCapability.MiscServices.ScreenLock
...@@ -492,7 +478,7 @@ Unlocks the screen. This API uses a promise to return the result. ...@@ -492,7 +478,7 @@ Unlocks the screen. This API uses a promise to return the result.
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.ScreenLock **System capability**: SystemCapability.MiscServices.ScreenLock
......
...@@ -14,7 +14,7 @@ The **wallpaper** module is a system service module in OpenHarmony that provides ...@@ -14,7 +14,7 @@ The **wallpaper** module is a system service module in OpenHarmony that provides
import wallpaper from '@ohos.wallpaper'; import wallpaper from '@ohos.wallpaper';
``` ```
## WallpaperType ## WallpaperType<sup>7+</sup>
Enumerates the wallpaper types. Enumerates the wallpaper types.
...@@ -26,12 +26,14 @@ Enumerates the wallpaper types. ...@@ -26,12 +26,14 @@ Enumerates the wallpaper types.
| WALLPAPER_LOCKSCREEN | 1 |Lock screen wallpaper.| | WALLPAPER_LOCKSCREEN | 1 |Lock screen wallpaper.|
## RgbaColor ## RgbaColor<sup>9+</sup>
Defines the RGBA color space for the wallpaper. Defines the RGBA color space for the wallpaper.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
**System API**: This is a system API.
| Name| Type| Readable| Writable| Description| | Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| red | number | Yes| Yes| Red color. The value ranges from 0 to 255.| | red | number | Yes| Yes| Red color. The value ranges from 0 to 255.|
...@@ -48,6 +50,8 @@ Obtains the main color information of the wallpaper of the specified type. ...@@ -48,6 +50,8 @@ Obtains the main color information of the wallpaper of the specified type.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
**System API**: This is a system API.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
...@@ -71,37 +75,6 @@ try { ...@@ -71,37 +75,6 @@ try {
} }
``` ```
## wallpaper.getIdSync<sup>9+</sup>
getIdSync(wallpaperType: WallpaperType): number
Obtains the ID of the wallpaper of the specified type.
**System capability**: SystemCapability.MiscServices.Wallpaper
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| wallpaperType | [WallpaperType](#wallpapertype) | Yes| Wallpaper type.|
**Return value**
| Type| Description|
| -------- | -------- |
| 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).|
**Example**
```js
try {
let id = wallpaper.getIdSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM);
console.log(`success to getIdSync: ${JSON.stringify(id)}`);
} catch (error) {
console.error(`failed to getIdSync because: ${JSON.stringify(error)}`);
}
```
## wallpaper.getMinHeightSync<sup>9+</sup> ## wallpaper.getMinHeightSync<sup>9+</sup>
getMinHeightSync(): number getMinHeightSync(): number
...@@ -110,6 +83,8 @@ Obtains the minimum height of this wallpaper. ...@@ -110,6 +83,8 @@ Obtains the minimum height of this wallpaper.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
**System API**: This is a system API.
**Return value** **Return value**
| Type| Description| | Type| Description|
...@@ -130,6 +105,8 @@ Obtains the minimum width of this wallpaper. ...@@ -130,6 +105,8 @@ Obtains the minimum width of this wallpaper.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
**System API**: This is a system API.
**Return value** **Return value**
| Type| Description| | Type| Description|
...@@ -142,46 +119,6 @@ Obtains the minimum width of this wallpaper. ...@@ -142,46 +119,6 @@ Obtains the minimum width of this wallpaper.
let minWidth = wallpaper.getMinWidthSync(); let minWidth = wallpaper.getMinWidthSync();
``` ```
## wallpaper.isChangeAllowed<sup>9+</sup>
isChangeAllowed(): boolean
Checks whether to allow the application to change the wallpaper for the current user.
**System capability**: SystemCapability.MiscServices.Wallpaper
**Return value**
| Type| Description|
| -------- | -------- |
| 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
let isChangeAllowed = wallpaper.isChangeAllowed();
```
## wallpaper.isUserChangeAllowed<sup>9+</sup>
isUserChangeAllowed(): boolean
Checks whether the user is allowed to set wallpapers.
**System capability**: SystemCapability.MiscServices.Wallpaper
**Return value**
| Type| Description|
| -------- | -------- |
| boolean | Whether the user is allowed to set wallpapers. The value **true** means that the operation is allowed, and **false** means the opposite.|
**Example**
```js
let isUserChangeAllowed = wallpaper.isUserChangeAllowed();
```
## wallpaper.restore<sup>9+</sup> ## wallpaper.restore<sup>9+</sup>
restore(wallpaperType: WallpaperType, callback: AsyncCallback&lt;void&gt;): void restore(wallpaperType: WallpaperType, callback: AsyncCallback&lt;void&gt;): void
...@@ -192,6 +129,8 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us ...@@ -192,6 +129,8 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
**System API**: This is a system API.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
...@@ -221,6 +160,8 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us ...@@ -221,6 +160,8 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
**System API**: This is a system API.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
...@@ -253,6 +194,8 @@ Sets a specified source as the wallpaper of a specified type. This API uses an a ...@@ -253,6 +194,8 @@ Sets a specified source as the wallpaper of a specified type. This API uses an a
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
**System API**: This is a system API.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
...@@ -306,6 +249,8 @@ Sets a specified source as the wallpaper of a specified type. This API uses a pr ...@@ -306,6 +249,8 @@ Sets a specified source as the wallpaper of a specified type. This API uses a pr
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
**System API**: This is a system API.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
...@@ -350,39 +295,6 @@ imageSource.createPixelMap(opts).then((pixelMap) => { ...@@ -350,39 +295,6 @@ imageSource.createPixelMap(opts).then((pixelMap) => {
}); });
``` ```
## wallpaper.getFileSync<sup>9+</sup>
getFileSync(wallpaperType: WallpaperType): number;
Obtains the wallpaper of the specified type.
**Required permissions**: ohos.permission.GET_WALLPAPER
**System capability**: SystemCapability.MiscServices.Wallpaper
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| wallpaperType | [WallpaperType](#wallpapertype) | Yes| Wallpaper type.|
**Return value**
| Type| Description|
| -------- | -------- |
| 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.|
**Example**
```js
try {
let file = wallpaper.getFileSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM);
console.log(`success to getFileSync: ${JSON.stringify(file)}`);
} catch (error) {
console.error(`failed to getFileSync because: ${JSON.stringify(error)}`);
}
```
## wallpaper.getImage<sup>9+</sup> ## wallpaper.getImage<sup>9+</sup>
getImage(wallpaperType: WallpaperType, callback: AsyncCallback&lt;image.PixelMap&gt;): void; getImage(wallpaperType: WallpaperType, callback: AsyncCallback&lt;image.PixelMap&gt;): void;
...@@ -449,12 +361,16 @@ wallpaper.getImage(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => { ...@@ -449,12 +361,16 @@ wallpaper.getImage(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => {
}); });
``` ```
## wallpaper.on('colorChange')<sup>9+</sup> ## wallpaper.on('colorChange')<sup>(deprecated)</sup>
on(type: 'colorChange', callback: (colors: Array&lt;RgbaColor&gt;, wallpaperType: WallpaperType) =&gt; void): void on(type: 'colorChange', callback: (colors: Array&lt;RgbaColor&gt;, wallpaperType: WallpaperType) =&gt; void): void
Subscribes to the wallpaper color change event. Subscribes to the wallpaper color change event.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
**Parameters** **Parameters**
...@@ -477,12 +393,16 @@ try { ...@@ -477,12 +393,16 @@ try {
} }
``` ```
## wallpaper.off('colorChange')<sup>9+</sup> ## wallpaper.off('colorChange')<sup>(deprecated)</sup>
off(type: 'colorChange', callback?: (colors: Array&lt;RgbaColor&gt;, wallpaperType: WallpaperType) =&gt; void): void off(type: 'colorChange', callback?: (colors: Array&lt;RgbaColor&gt;, wallpaperType: WallpaperType) =&gt; void): void
Unsubscribes from the wallpaper color change event. Unsubscribes from the wallpaper color change event.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
**Parameters** **Parameters**
...@@ -527,7 +447,7 @@ Obtains the main color information of the wallpaper of the specified type. This ...@@ -527,7 +447,7 @@ Obtains the main color information of the wallpaper of the specified type. This
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -558,7 +478,7 @@ Obtains the main color information of the wallpaper of the specified type. This ...@@ -558,7 +478,7 @@ Obtains the main color information of the wallpaper of the specified type. This
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -592,7 +512,7 @@ Obtains the ID of the wallpaper of the specified type. This API uses an asynchro ...@@ -592,7 +512,7 @@ Obtains the ID of the wallpaper of the specified type. This API uses an asynchro
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -623,7 +543,7 @@ Obtains the ID of the wallpaper of the specified type. This API uses a promise t ...@@ -623,7 +543,7 @@ Obtains the ID of the wallpaper of the specified type. This API uses a promise t
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -657,7 +577,7 @@ Obtains the minimum height of this wallpaper. This API uses an asynchronous call ...@@ -657,7 +577,7 @@ Obtains the minimum height of this wallpaper. This API uses an asynchronous call
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -687,7 +607,7 @@ Obtains the minimum height of this wallpaper. This API uses a promise to return ...@@ -687,7 +607,7 @@ Obtains the minimum height of this wallpaper. This API uses a promise to return
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -715,7 +635,7 @@ Obtains the minimum width of this wallpaper. This API uses an asynchronous callb ...@@ -715,7 +635,7 @@ Obtains the minimum width of this wallpaper. This API uses an asynchronous callb
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -745,7 +665,7 @@ Obtains the minimum width of this wallpaper. This API uses a promise to return t ...@@ -745,7 +665,7 @@ Obtains the minimum width of this wallpaper. This API uses a promise to return t
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -773,7 +693,7 @@ Checks whether to allow the application to change the wallpaper for the current ...@@ -773,7 +693,7 @@ Checks whether to allow the application to change the wallpaper for the current
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -803,7 +723,7 @@ Checks whether to allow the application to change the wallpaper for the current ...@@ -803,7 +723,7 @@ Checks whether to allow the application to change the wallpaper for the current
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -831,7 +751,7 @@ Checks whether the user is allowed to set wallpapers. This API uses an asynchron ...@@ -831,7 +751,7 @@ Checks whether the user is allowed to set wallpapers. This API uses an asynchron
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -861,7 +781,7 @@ Checks whether the user is allowed to set wallpapers. This API uses a promise to ...@@ -861,7 +781,7 @@ Checks whether the user is allowed to set wallpapers. This API uses a promise to
> **NOTE** > **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.
**System capability**: SystemCapability.MiscServices.Wallpaper **System capability**: SystemCapability.MiscServices.Wallpaper
...@@ -889,7 +809,7 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us ...@@ -889,7 +809,7 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us
> **NOTE** > **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.
**Required permissions**: ohos.permission.SET_WALLPAPER **Required permissions**: ohos.permission.SET_WALLPAPER
...@@ -922,7 +842,7 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us ...@@ -922,7 +842,7 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us
> **NOTE** > **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.
**Required permissions**: ohos.permission.SET_WALLPAPER **Required permissions**: ohos.permission.SET_WALLPAPER
...@@ -958,7 +878,7 @@ Sets a specified source as the wallpaper of a specified type. This API uses an a ...@@ -958,7 +878,7 @@ Sets a specified source as the wallpaper of a specified type. This API uses an a
> **NOTE** > **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.
**Required permissions**: ohos.permission.SET_WALLPAPER **Required permissions**: ohos.permission.SET_WALLPAPER
...@@ -1015,7 +935,7 @@ Sets a specified source as the wallpaper of a specified type. This API uses a pr ...@@ -1015,7 +935,7 @@ Sets a specified source as the wallpaper of a specified type. This API uses a pr
> **NOTE** > **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.
**Required permissions**: ohos.permission.SET_WALLPAPER **Required permissions**: ohos.permission.SET_WALLPAPER
...@@ -1074,7 +994,7 @@ Obtains the wallpaper of the specified type. This API uses an asynchronous callb ...@@ -1074,7 +994,7 @@ Obtains the wallpaper of the specified type. This API uses an asynchronous callb
> **NOTE** > **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.
**Required permissions**: ohos.permission.GET_WALLPAPER **Required permissions**: ohos.permission.GET_WALLPAPER
...@@ -1107,7 +1027,7 @@ Obtains the wallpaper of the specified type. This API uses a promise to return t ...@@ -1107,7 +1027,7 @@ Obtains the wallpaper of the specified type. This API uses a promise to return t
> **NOTE** > **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.
**Required permissions**: ohos.permission.GET_WALLPAPER **Required permissions**: ohos.permission.GET_WALLPAPER
...@@ -1143,7 +1063,7 @@ Obtains the pixel map for the wallpaper of the specified type. This API uses an ...@@ -1143,7 +1063,7 @@ Obtains the pixel map for the wallpaper of the specified type. This API uses an
> **NOTE** > **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.
**Required permissions**: ohos.permission.GET_WALLPAPER **Required permissions**: ohos.permission.GET_WALLPAPER
...@@ -1178,7 +1098,7 @@ Obtains the pixel map for the wallpaper of the specified type. This API uses a p ...@@ -1178,7 +1098,7 @@ Obtains the pixel map for the wallpaper of the specified type. This API uses a p
> **NOTE** > **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.
**Required permissions**: ohos.permission.GET_WALLPAPER **Required permissions**: ohos.permission.GET_WALLPAPER
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册