diff --git a/en/release-notes/OpenHarmony-v3.2-beta5.md b/en/release-notes/OpenHarmony-v3.2-beta5.md index b0da1a6421cf545a3d7a9f124786894ae2225f42..32478099a0a2a3f46457fd6d191d5460ce24b6f7 100644 --- a/en/release-notes/OpenHarmony-v3.2-beta5.md +++ b/en/release-notes/OpenHarmony-v3.2-beta5.md @@ -164,7 +164,7 @@ To use the full SDK that contains system APIs, you must download the full code, For details about the API changes, see [API Differences](api-diff/v3.2-beta5/Readme-EN.md). - +For details about the API changes of each subsystem, see [Changelogs](changelogs/v3.2-beta5/Readme-EN.md). ### Chip and Development Board Adaptation diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelog-LocalStorage.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelog-LocalStorage.md deleted file mode 100644 index f835a558215db6472b339f64797b2e8c88e07a14..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelog-LocalStorage.md +++ /dev/null @@ -1,118 +0,0 @@ -# ArkUI Subsystem LocalStorage Class ChangeLog - -## cl.LocalStorage.1 Return Type Change of the get API - -Changed the return type from **get\(propName: string): T** to **get\(propName: string): T | undefined**. - -**Change Impact** - - -None - -## cl.LocalStorage.2 Mandatory/Optional Change of the newValue Parameter in setOrCreate -**Change Impact** - -API declaration before change: -```js -setOrCreate(propName: string, newValue?: T): boolean -``` -API declaration after change: -```js -setOrCreate(propName: string, newValue: T): boolean -``` -The **newValue** parameter becomes mandatory. -If it is not specified when an application calls the API, the build will fail after the SDK is replaced. - -**Adaptation Guide** - -```js -let storage = new LocalStorage(); -storage.setOrCreate('propA', 'hello'); -``` -## cl.LocalStorage.3 link Parameter and Return Type Changes -**Change Impact** - -API declaration before change: -```js -link(propName: string, linkUser?: T, subscribersName?: string): T -``` -API declaration after change: -```js -link(propName: string): SubscribedAbstractProperty -``` -1. The second and third parameters of the **link** API are reserved for internal use by the framework. Therefore, the API is changed to contain only one parameter. -2. The return type **T** is changed to **SubscribedAbstractProperty**. - -**Adaptation Guide** - -```js -let storage = new LocalStorage({"PropA": "47"}); -let linA = storage.link("PropA"); -linA.set(50); -``` - -## cl.LocalStorage.4 setAndLink Parameter and Return Type Changes -**Change Impact** - -API declaration before change: -```js -setAndLink(propName: string, defaultValue: T, linkUser?: T, subscribersName?: string): T -``` -API declaration after change: -```js -setAndLink(propName: string, defaultValue: T): SubscribedAbstractProperty -``` -1. The third and fourth parameters of the **setAndLink** API are reserved for internal use by the framework. Therefore, the API is changed to contain two parameters. -2. The return type **T** is changed to **SubscribedAbstractProperty**. - -**Adaptation Guide** - -```js -let storage = new LocalStorage({"PropA": "47"}); -let linA = storage.setAndLink("PropA", "48") -linA.set(50); -``` - -## cl.LocalStorage.5 prop Parameter and Return Type Changes -**Change Impact** - -API declaration before change: -```js -prop(propName: string, propUser?: T, subscribersName?: string): T -``` -API declaration after change: -```js -prop(propName: string): SubscribedAbstractProperty -``` -1. The second and third parameters of the **prop** API are reserved for internal use by the framework. Therefore, the API is changed to contain only one parameter. -2. The return type **T** is changed to **SubscribedAbstractProperty**. - -**Adaptation Guide** - -```js -let storage = new LocalStorage({"PropA": "47"}); -let propA = storage.prop("PropA"); -propA.set(51); // one-way sync -``` - -## cl.LocalStorage.6 setAndProp Parameter and Return Type Changes -**Change Impact** - -API declaration before change: -```js -setAndProp(propName: string, defaultValue: T, propUser?: T, subscribersName?: string): T -``` -API declaration after change: -```js -setAndProp(propName: string, defaultValue: S): SubscribedAbstractProperty -``` -1. The third and fourth parameters of the **setAndProp** API are reserved for internal use by the framework. Therefore, the API is changed to contain two parameters. -2. The return type **T** is changed to **SubscribedAbstractProperty**. - -**Adaptation Guide** - -```js -let storage = new LocalStorage({"PropA": "47"}); -let propA = storage.setAndProp("PropA", "48"); -propA.set(51); // one-way sync -``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-container.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-container.md deleted file mode 100644 index c32d54a296c01a18d623c9de9bd9b71ef6cf8bc0..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-container.md +++ /dev/null @@ -1,29 +0,0 @@ -# ChangeLog of JS API Changes in the commonlibrary Subsystem - -Compared with OpenHarmony 3.2 Beta4, OpenHarmony 3.2.10.1(Mr) has the following API changes in the commonlibrary subsystem. - -## cl.commonlibrary.1 Error Code and Information Change -Changed error codes and information returned by APIs of the **ArrayList**, **List**, **LinkedList**, **Stack**, **Queue**, **Deque**, **PlainArray**, **LightWeightMap**, **LightWeightSet**, **HashMap**, **HashSet**, **TreeMap**, and **TreeSet** classes in the commonlibrary subsystem. - -For details about the changed error codes, see [error codes of language basic class libraries](../../../application-dev/reference/errorcodes/errorcode-utils.md). - -No adaptation is required for applications developed using these APIs. - -**Key API/Component Changes** - -Error code information is redefined for APIs in these classes and marked using **'@throws'** in the `*.d.ts` file of the corresponding module. - -The sample code is as follows: - -**ArrayList** class before the change: - -constructor(); - -**ArrayList** class after the change: - -@throws { BusinessError } 10200012 - The ArrayList's constructor cannot be directly invoked. -constructor(); - -**Change Impacts** - -None diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-distributeddatamgr.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-distributeddatamgr.md deleted file mode 100644 index 3689b5c62fa100173b4b5579a38f5763b6535d23..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-distributeddatamgr.md +++ /dev/null @@ -1,178 +0,0 @@ -# ChangeLog of JS API Changes of the Distributed Data Management Subsystem - -Compared with OpenHarmony 3.2 Beta4, OpenHarmony 3.2.10.1(Mr) has the following API changes in the distributed data management subsystem: - -## cl.distributeddatamgr.1 API Change -APIs in the **kv_store** component of the distributed data management subsystem are changed: - -**createKVManager** is changed from asynchronous to synchronous, because the execution duration is fixed and short and there is no need to asynchronously wait for the execution result. Therefore, the original APIs **function createKVManager(config: KVManagerConfig): Promise\;** and **function createKVManager(config: KVManagerConfig, callback: AsyncCallback): void;** are changed to **function createKVManager(config: KVManagerConfig): KVManager;**. - -You need to adapt your applications based on the following information: - -**Change Impacts** - -JS APIs in API version 9 are affected. The application needs to adapt these APIs so that it can properly implement functions in the SDK environment of the new version. - -**Key API/Component Changes** - -| Module | Class | Method/Attribute/Enumeration/Constant | Change Type| -| ------------------------ | ------------------ | ------------------------------------------------------------ | -------- | -| @ohos.distributedKVStore | distributedKVStore | function createKVManager(config: KVManagerConfig): Promise\; | Deleted | -| @ohos.distributedKVStore | distributedKVStore | function createKVManager(config: KVManagerConfig): KVManager; | Changed | - - -**Adaptation Guide** - -The following illustrates how to call **createKVManager** to create a **KVManager** object. - -Stage model: - -```ts -import AbilityStage from '@ohos.application.Ability' -let kvManager; -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - let context = this.context - const kvManagerConfig = { - context: context, - bundleName: 'com.example.datamanagertest', - } - try { - kvManager = distributedKVStore.createKVManager(kvManagerConfig); - } catch (e) { - console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`); - } - } -} -``` - -FA model: - -```ts -import featureAbility from '@ohos.ability.featureAbility' -let kvManager; -let context = featureAbility.getContext() -const kvManagerConfig = { - context: context, - bundleName: 'com.example.datamanagertest', -} -try { - kvManager = distributedKVStore.createKVManager(kvManagerConfig); -} catch (e) { - console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`); -} -``` - -## cl.distributeddatamgr.2 Migration of function getRdbStoreV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts. -**Change Impacts** - -The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. - -**Key API/Component Changes** - -APIs: - -```ts -function getRdbStoreV9(context: Context, config: StoreConfigV9, version: number, callback: AsyncCallback): void; -function getRdbStoreV9(context: Context, config: StoreConfigV9, version: number): Promise; -``` -The APIs are migrated from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts**. -``` -function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback): void; -function getRdbStore(context: Context, config: StoreConfig): Promise; -``` - -**Adaptation Guide** - - * `import rdb from "@ohos.data.rdb"` is changed to `import rdb from "@ohos.data.relationalStore"`. - * The names of relevant methods should be changed according to the preceding changes. - -## cl.distributeddatamgr.3 Migration of function deleteRdbStoreV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts -**Change Impacts** - -The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. - -**Key API/Component Changes** - -APIs: - -```ts -function deleteRdbStoreV9(context: Context, name: string, callback: AsyncCallback): void; -function deleteRdbStoreV9(context: Context, name: string): Promise; -``` -The APIs are migrated from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts**. -``` -function deleteRdbStoreV9(context: Context, name: string, callback: AsyncCallback): void; -function deleteRdbStoreV9(context: Context, name: string): Promise; -``` - -**Adaptation Guide** - * `import rdb from "@ohos.data.rdb"` is changed to `import rdb from "@ohos.data.relationalStore"`. - * The names of relevant methods should be changed according to the preceding changes. - -## cl.distributeddatamgr.4 Migration of interface StoreConfigV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts -**Change Impacts** - -The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. - -**Key API/Component Changes** - -**interface StoreConfigV9** is migrated from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts** and is renamed as **interface StoreConfig**. - -**Adaptation Guide** - * `import rdb from "@ohos.data.rdb"` is changed to `import rdb from "@ohos.data.relationalStore"`. - * The names of relevant APIs should be changed according to the preceding changes. - -## cl.distributeddatamgr.5 Migration of enum SecurityLevel from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts -**Change Impacts** - -The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. - -**Key API/Component Changes** - -**enum SecurityLevel** is migrated from **ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts**. - -**Adaptation Guide** - * `import rdb from "@ohos.data.rdb"` is changed to `import rdb from "@ohos.data.relationalStore"`. - * The names of relevant APIs should be changed according to the preceding changes. - -## cl.distributeddatamgr.6 Migration of interface RdbStoreV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts -**Change Impacts** - -The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. - -**Key API/Component Changes** - -**interface RdbStoreV9** is migrated from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts** and is renamed as **interface RdbStore**. - -**Adaptation Guide** - * `import rdb from "@ohos.data.rdb"` is changed to `import rdb from "@ohos.data.relationalStore"`. - * The names of relevant APIs should be changed according to the preceding changes. - -## cl.distributeddatamgr.7 Migration of class RdbPredicatesV9 from ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts -**Change Impacts** - -The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. - -**Key API/Component Changes** - -**class RdbPredicatesV9** is migrated from **ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts** and is renamed as **interface RdbPredicates**. - -**Adaptation Guide** - * `import rdb from "@ohos.data.rdb"` is changed to `import rdb from "@ohos.data.relationalStore"`. - * The names of relevant APIs should be changed according to the preceding changes. - -## cl.distributeddatamgr.8 Migration of interface ResultSetV9 from api/@ohos.data.relationalStore.d.ts to @ohos.data.relationalStore.d.ts -**Change Impacts** - -The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. - -**Key API/Component Changes** - -**interface ResultSetV9** is migrated from **api/data/rdb/resultSet.d.ts** to **@ohos.data.relationalStore.d.ts** and is renamed as **interface ResultSet**. - -**Adaptation Guide** - - * `import rdb from "@ohos.data.rdb"` is changed to `import rdb from "@ohos.data.relationalStore"`. - * The **ResultSetV9** instance is obtained only via **getRdbStoreV9**. After modifications are made according to cl.distributeddatamgr.2, the code can automatically adapt to **ResultSet**. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-bundlemanager.md deleted file mode 100644 index 94e7367fe1d8daeee5d9a943ca6d85b463e7be2a..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-bundlemanager.md +++ /dev/null @@ -1,60 +0,0 @@ -# Bundle Manager Subsystem Changelog - -## cl.bundlemanager.1 Deleted the atomicService Tag from the app.json File -The **atomicService** tag is deleted from the **app.json** file. - -**Change Impact**
-If this tag is used, an error is reported during compilation on DevEco Studio. - -**Adaptation Guide**
-Delete the **atomicService** tag from your code. - -## cl.bundlemanager.2 Added the bundleType Tag to the app.json File -The **bundleType** tag is added to the **app.json** file. - -**Change Impact**
-For an existing ability with [installationFree](../../../application-dev/quick-start/module-configuration-file.md) set to **true**, **bundleType** must be set to **atomicService** in the **app.json** file. Otherwise, the packaging fails. - -**Adaptation Guide**
-Add the [bundleType](../../../application-dev/quick-start/app-configuration-file.md) tag. This tag can be left blank. The default value is **app**. The setting of this tag and the [installationFree](../../../application-dev/quick-start/module-configuration-file.md) field in the **module.json** file must meet the following rules: -- If **bundleType** is **app**, **installationFree** must be set to **false**. -- If **bundleType** is **atomicService**, **installationFree** must be set to **true**. - -## cl.bundlemanager.3 Deleted the split Field from the ApplicationInfo Struct - -The **split** field is deleted from the [ApplicationInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts) struct. - -**Change Impact**
-If the **split** field is used in your code, the compilation fails. - -**Key API/Component Changes**
-The **split** field is deleted from the [ApplicationInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts) struct. - -**Adaptation Guide**
-Delete the **split** field from the **ApplicationInfo** struct of your code. The stage model always forcibly splits bundles. - -## cl.bundlemanager.4 Deleted the atomicServiceModuleType Field from the HapModuleInfo Struct - -The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct. - -**Change Impact**
-If the **atomicServiceModuleType** field is used in your code, the compilation fails. - -**Key API/Component Changes**
-The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct. - -**Adaptation Guide**
-Record the setting of the **atomicServiceModuleType** field, delete it from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct, and set the **moduleType** field in the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct to the recorded value. - -## cl.bundlemanager.5 Deleted the AtomicServiceModuleType Enumerated Value - -The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct. - -**Change Impact**
-If the **atomicServiceModuleType** field is used in your code, the compilation fails. - -**Key API/Component Changes**
-The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct. - -**Adaptation Guide**
-Record the setting of the **atomicServiceModuleType** field, delete it from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct, and set the **moduleType** field in the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct to the recorded value. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-imf.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-imf.md deleted file mode 100644 index f158d99d9a0023c67ad982fc6b687563121f4dac..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-imf.md +++ /dev/null @@ -1,19 +0,0 @@ -# Input Method Framework Subsystem – Input Method Framework Service Changelog - - -## @ohos.InputMethodSubtype Change of name, label, and id -Changed the **name**, **label**, and **id** attributes since API version 9. - -**Change Impact** - -Applications must be adapted to the following changes. - -| Name| Before Change| After Change| -| -------- | -------- | -------- | -| label | (1) Value: ID of the input method subtype.| (1) Value: Label of the input method subtype.| -| name | (1) Description: Name of the input method subtype. (2) Value: Label of the input method subtype.| (1) Description: Bundle name of the input method; (2) Value: Bundle name of the input method.| -| id | (1) Value: Bundle name of the input method.| (1) Value: ID of the input method subtype.| - -**Adaptation Guide** - -Update the code to adapt to the preceding changes. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-screenlock.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-screenlock.md deleted file mode 100644 index deeaac319aecfd4ba2824b8f23370d6fe2601adc..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-screenlock.md +++ /dev/null @@ -1,157 +0,0 @@ -# Theme Framework Subsystem – Screenlock Management Service Changelog - - -## cl.screenlock.1 Permission Change of isLocked and unlock -Changed the **isLocked** and **unlock** APIs to system APIs since API version 9. - -You need to adapt your application based on the following information. - -**Change Impact** - -The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. - -- Involved APIs: - -```js - function isLocked(): boolean; - function unlock(callback: AsyncCallback): void; - function unlock():Promise; -``` - -- Before change: - -```js - * Checks whether the screen is currently locked. - * - * @returns Returns {@code true} if the screen is currently locked; returns {@code false} otherwise. - * @syscap SystemCapability.MiscServices.ScreenLock - * @since 9 - */ - function isLocked(): boolean; - - /** - * Unlock the screen. - * - * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. - * @syscap SystemCapability.MiscServices.ScreenLock - * @systemapi Hide this for inner system use. - * @since 9 - */ - function unlock(callback: AsyncCallback): void; - - /** - * Unlock the screen. - * - * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. - * @syscap SystemCapability.MiscServices.ScreenLock - * @systemapi Hide this for inner system use. - * @since 9 - */ - function unlock():Promise; -``` - -- After change: - -```js - * Checks whether the screen is currently locked. - * - * @returns Returns {@code true} if the screen is currently locked; returns {@code false} otherwise. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @syscap SystemCapability.MiscServices.ScreenLock - * @systemapi Hide this for inner system use. - * @since 9 - */ - function isLocked(): boolean; - - /** - * Unlock the screen. - * - * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. - * @syscap SystemCapability.MiscServices.ScreenLock - * @since 9 - */ - function unlock(callback: AsyncCallback): void; - - /** - * Unlock the screen. - * - * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. - * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. - * @syscap SystemCapability.MiscServices.ScreenLock - * @since 9 - */ - function unlock():Promise; -``` - - -**Adaptation Guide** - -Make sure the APIs are only invoked by system applications. - -The code snippet is as follows: - -```js - try { - let ret = screenLock.isLocked(); - console.error(`Obtain whether the screen is locked successfully , ret is: ${ret}`); - } catch (error) { - console.error(`Failed to obtain whether the screen is locked, error is : ${error.code}, ${error.message}`); - } -``` - -```js - screenlock.unlock((err, data) => { - if (err) { - console.error(`Failed to unlock the screen, because: ${err.message}`); - return; - } - console.info(`unlock the screen successfully. result: ${data}`); - }); -``` - -```js - screenlock.unlock().then((data) => { - console.info(`unlock the screen successfully. result: ${data}`); - }).catch((err) => { - console.error(`Failed to unlock the screen, because: ${err.message}`); - }); -``` - - -## cl.screenlock.2 Deprecation of isSecure -Deprecated the **isSecure** API since API version 9. - -You need to adapt your application based on the following information. - -**Change Impact** - -The API can no longer be used after being deleted. - -- Involved APIs: - -```js - function isSecure(): boolean; -``` - -- Before change: - -```js - function isSecure(): boolean; -``` - -- After change: - - The API is deleted. - - -**Adaptation Guide** - -Update the code so that the deprecated API is not used. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-wallpaper.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-wallpaper.md deleted file mode 100644 index 18fff418c0723c7508f6c7eacdb318b95758402b..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.12/changelog-wallpaper.md +++ /dev/null @@ -1,306 +0,0 @@ -# Theme Framework Subsystem – Wallpaper Management Service Changelog - - -## cl.wallpaper.1 Permission Change of getColorsSync, getMinHeightSync, getMinWidthSync, restore, and setImage -Changed the **getColorsSync**, **getMinHeightSync**, **getMinWidthSync**, restore, and **setImage** APIs to system APIs since API version 9. - -You need to adapt your application based on the following information. - -**Change Impact** - -The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. - -- Involved APIs: - -```js - function getColorsSync(wallpaperType: WallpaperType): Array; - function getMinHeightSync(): number; - function getMinWidthSync(): number; - function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; - function restore(wallpaperType: WallpaperType): Promise; - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; -``` - -- Before change: - -```js - /** - * Obtains the wallpaper colors for the wallpaper of the specified type. Returns rgbaColor type of array callback function. - * @param wallpaperType Indicates the wallpaper type. - * @returns { Array } the Array returned by the function. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function getColorsSync(wallpaperType: WallpaperType): Array; - - /** - * Obtains the minimum height of the wallpaper. in pixels. returns 0 if no wallpaper has been set. - * @returns { number } the number returned by the function. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function getMinHeightSync(): number; - - /** - * Obtains the minimum width of the wallpaper. in pixels. returns 0 if no wallpaper has been set. - * @returns { number } the number returned by the function. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function getMinWidthSync(): number; - - /** - * Removes a wallpaper of the specified type and restores the default one. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; - - /** - * Removes a wallpaper of the specified type and restores the default one. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function restore(wallpaperType: WallpaperType): Promise; - - /** - * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. - * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; - - /** - * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. - * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; -``` - -- After change: - -```js - /** - * Obtains the wallpaper colors for the wallpaper of the specified type. Returns rgbaColor type of array callback function. - * @param wallpaperType Indicates the wallpaper type. - * @returns { Array } the Array returned by the function. - * @throws {BusinessError} 401 - parameter error. - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function getColorsSync(wallpaperType: WallpaperType): Array; - - /** - * Obtains the minimum height of the wallpaper. in pixels. returns 0 if no wallpaper has been set. - * @returns { number } the number returned by the function. - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function getMinHeightSync(): number; - - /** - * Obtains the minimum width of the wallpaper. in pixels. returns 0 if no wallpaper has been set. - * @returns { number } the number returned by the function. - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function getMinWidthSync(): number; - - /** - * Removes a wallpaper of the specified type and restores the default one. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; - - /** - * Removes a wallpaper of the specified type and restores the default one. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function restore(wallpaperType: WallpaperType): Promise; - - /** - * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. - * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; - - /** - * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. - * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; -``` - - -**Adaptation Guide** - -Make sure the APIs are only invoked by system applications. - -The code snippet is as follows: - -```js - try { - let colors = wallpaper.getColorsSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM); - console.log(`success to getColorsSync: ${JSON.stringify(colors)}`); - } catch (error) { - console.error(`failed to getColorsSync because: ${JSON.stringify(error)}`); - } -``` - -```js - let minHeight = wallpaper.getMinHeightSync(); -``` - -```js - let minWidth = wallpaper.getMinWidthSync(); -``` - -```js - wallpaper.restore(wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { - if (error) { - console.error(`failed to restore because: ${JSON.stringify(error)}`); - return; - } - console.log(`success to restore.`); - }); -``` - -```js - wallpaper.restore(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { - console.log(`success to restore.`); - }).catch((error) => { - console.error(`failed to restore because: ${JSON.stringify(error)}`); - }); -``` - -```js - // The source type is string. - let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg"; - wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { - if (error) { - console.error(`failed to setImage because: ${JSON.stringify(error)}`); - return; - } - console.log(`success to setImage.`); - }); -``` - -```js - // The source type is string. - let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg"; - wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { - console.log(`success to setImage.`); - }).catch((error) => { - console.error(`failed to setImage because: ${JSON.stringify(error)}`); - }); -``` - - -## cl.wallpaper.2 Deprecation of getIdSync, getFileSync, isChangeAllowed, isUserChangeAllowed, on, off, and RgbaColor -Deprecated the **getIdSync**, **getFileSync**, **isChangeAllowed**, **isUserChangeAllowed**, **on**, **off**, and **RgbaColor** APIs since API version 9. - -You need to adapt your application based on the following information. - -**Change Impact** - -The APIs can no longer be used after being deleted. - -- Involved APIs: - -```js - function getIdSync(wallpaperType: WallpaperType): number; - function getFileSync(wallpaperType: WallpaperType): number; - function isChangeAllowed(): boolean; - function isUserChangeAllowed(): boolean; - function on(type: 'colorChange', callback: (colors: Array, wallpaperType: WallpaperType) => void): void; - function off(type: 'colorChange', callback?: (colors: Array, wallpaperType: WallpaperType) => void): void; - interface RgbaColor { - red: number; - green: number; - blue: number; - alpha: number; - } -``` - -- Before change: - -```js - function getIdSync(wallpaperType: WallpaperType): number; - function getFileSync(wallpaperType: WallpaperType): number; - function isChangeAllowed(): boolean; - function isUserChangeAllowed(): boolean; - function on(type: 'colorChange', callback: (colors: Array, wallpaperType: WallpaperType) => void): void; - function off(type: 'colorChange', callback?: (colors: Array, wallpaperType: WallpaperType) => void): void; - interface RgbaColor { - red: number; - green: number; - blue: number; - alpha: number; - } -``` - -- After change: - - The APIs are deleted. - - -**Adaptation Guide** - -Update the code so that the deprecated APIs are not used. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.2/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.2/changelogs-bundlemanager.md deleted file mode 100644 index abafad96dd7c025fdef8c5144e3f10c0f1ff48f9..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.2/changelogs-bundlemanager.md +++ /dev/null @@ -1,34 +0,0 @@ -# Bundle Manager Subsystem Changelog - -## cl.bundlemanager.1 Field Change of the ApplicationInfo Struct in API Version 9 - -The **ApplicationInfo** struct [bundleManager/applicationInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts) in API version 9 has field changes, with the **systemApp** field being added and the **entryDir** field being deleted. - -**Change Impact**
-There is no impact on applications that use the APIs of versions earlier than 9. The applications that use the APIs of version 9 need to adapt new modules and APIs. - -**Key API/Component Changes**
-The following table describes the changed fields in the **ApplicationInfo** struct. -| Deleted Field| Added or Changed Field in API Version 9| Type| -| --- | --- | --- | -| N/A| systemApp | boolean | -| entryDir | N/A | string | - -**Adaptation Guide**
-Import the bundle manager query module and use the **systemApp** field in the **ApplicationInfo** struct of API version 9. If the **entryDir** field is used, change the field because it is redundant in features where HAP decompression is not required. - -## cl.bundlemanager.2 Field Change of the HapModuleInfo Struct in API Version 9 - -The **moduleSourceDir** field is deleted from the **HapModuleInfo** struct [bundleManager/hapModuleInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) in API version 9. - -**Change Impact**
-There is no impact on applications that use the APIs of versions earlier than 9. The applications that use the APIs of version 9 need to adapt new modules and APIs. - -**Key API/Component Changes**
-The following table describes the changed fields in the **HapModuleInfo** struct. -| Deleted Field| Added or Changed Field in API Version 9| Type| -| --- | --- | --- | -| moduleSourceDir | N/A | string | - -**Adaptation Guide**
-Import the bundle manager query module and do not use the **moduleSourceDir** field in the **HapModuleInfo** struct of API version 9. If the **moduleSourceDir** field is used, change the field because it is redundant in features where HAP decompression is not required. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-bundlemanager.md deleted file mode 100644 index ed95a11140efc969e38d2ba50ad6ec1ed4d08b96..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-bundlemanager.md +++ /dev/null @@ -1,21 +0,0 @@ -# Bundle Manager Subsystem ChangeLog - -## cl.bundlemanager.1 Name Change of the Bundle Manager Distributed Query Module - -The name of the bundle manager distributed query module in API version 9 is changed from **ohos.bundle.distributedBundle** to **[ohos.bundle.distributedBundleManager](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.distributedBundleManager.d.ts)**. The APIs remain unchanged. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. The applications that use the APIs of version 9 need to adapt the new module. - -**Key API/Component Changes** - -The name of the bundle manager distributed query module is changed from **ohos.bundle.distributedBundle** to **ohos.bundle.distributedBundleManager**. The APIs remain unchanged. - -**Adaptation Guide** - -Change the module to import from **@ohos.bundle.distributedBundle** to **@ohos.bundle.distributedBundleManager**. - -```ts -import distributedBundle form '@ohos.bundle.distributedBundleManager'; -``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-nfc.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-nfc.md deleted file mode 100644 index a2499c7699ae3f6742ff3bc4e8bb96a879e73c36..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-nfc.md +++ /dev/null @@ -1,62 +0,0 @@ -# ChangeLog of NFC JS API Changes in the Communication Subsystem - -Compared with OpenHarmony 3.2 Beta4, OpenHarmony 3.2.10.2(Mr) has the following API changes in the distributed data management subsystem. - -## cl.nfc.1 API Change -Some NFC JS APIs in API versions 6 to 8 cannot throw error codes and need to be deprecated and deleted, and then APIs in API version 9 are used instead. - -You need to adapt your application based on the following information. - - **Change Impacts** - -Some JS APIs in API versions 6 to 8 are affected. Your application needs to adapt new APIs so that it can properly implement functions in the SDK environment of the new version. - -**Key API/Component Changes** - -| Module | Class | Method/Attribute/Enumeration/Constant| Change Type| -| -------------------------------- | ------------- | ------------------- | -------- | -| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | FeatureType | Deprecated | -| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | isSupported | Deprecated | -| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | hasHceCapability | Added | -| api/@ohos.nfc.controller.d.ts | nfcController | isNfcAvailable | Deprecated | -| api/@ohos.nfc.controller.d.ts | nfcController | openNfc | Deprecated | -| api/@ohos.nfc.controller.d.ts | nfcController | closeNfc | Deprecated | -| api/@ohos.nfc.controller.d.ts | nfcController | enableNfc | Added | -| api/@ohos.nfc.controller.d.ts | nfcController | disableNfc | Added | -| api/@ohos.nfc.tag.d.ts | tag | getNfcATag | Deprecated | -| api/@ohos.nfc.tag.d.ts | tag | getNfcBTag | Deprecated | -| api/@ohos.nfc.tag.d.ts | tag | getNfcFTag | Deprecated | -| api/@ohos.nfc.tag.d.ts | tag | getNfcVTag | Deprecated | -| api/@ohos.nfc.tag.d.ts | tag | getNfcA | Added | -| api/@ohos.nfc.tag.d.ts | tag | getNfcB | Added | -| api/@ohos.nfc.tag.d.ts | tag | getNfcF | Added | -| api/@ohos.nfc.tag.d.ts | tag | getNfcV | Added | -| api/tag/tagSession.d.ts | TagSession | getTagInfo | Deprecated | -| api/tag/tagSession.d.ts | TagSession | connectTag | Deprecated | -| api/tag/tagSession.d.ts | TagSession | reset | Deprecated | -| api/tag/tagSession.d.ts | TagSession | isTagConnected | Deprecated | -| api/tag/tagSession.d.ts | TagSession | setSendDataTimeout | Deprecated | -| api/tag/tagSession.d.ts | TagSession | getSendDataTimeout | Deprecated | -| api/tag/tagSession.d.ts | TagSession | sendData | Deprecated | -| api/tag/tagSession.d.ts | TagSession | getMaxSendLength | Deprecated | -| api/tag/tagSession.d.ts | TagSession | connect | Added | -| api/tag/tagSession.d.ts | TagSession | resetConnection | Added | -| api/tag/tagSession.d.ts | TagSession | isConnected | Added | -| api/tag/tagSession.d.ts | TagSession | setTimeout | Added | -| api/tag/tagSession.d.ts | TagSession | getTimeout | Added | -| api/tag/tagSession.d.ts | TagSession | transmit | Added | -| api/tag/tagSession.d.ts | TagSession | getMaxTransmitSize | Added | - -**Adaptation Guide** - -View the following API references: -[@ohos.nfc.cardEmulation (Standard NFC Card Emulation)](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cardEmulation.md) - -[@ohos.nfc.controller (Standard NFC)](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-nfcController.md) - -[@ohos.nfc.tag (Standard NFC Tags)](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-nfcTag.md) - -[tagSession (Standard NFC Tag Session)](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-tagSession.md) -``` - -``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-bundlemanager.md deleted file mode 100644 index 3019a09c81ab3d541eea0f5efe38c7483cd2a3d6..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-bundlemanager.md +++ /dev/null @@ -1,107 +0,0 @@ -# Bundle Manager Subsystem ChangeLog - -## cl.bundlemanager.1 Changed Underlying Capability by Adding Verification to bundle-name in the Signing Certification During Application Installation - -During application installation, the **bundle-name** field in the [signing certificate profile](../../../application-dev/security/app-provision-structure.md) is verified against the bundle name of the application. - -If the value of **bundle-name** is different from the value of **bundleName** in the application configuration file, the installation fails and the following error information is displayed: -``` -error: verify signature failed. -``` - -**Change Impact** - -For applications using system images of 3.2.10.5 or later, if the **bundle-name** field in the signing certificate profile is different from the bundle name of the application, application installation fails. This change has no impact on applications using system images earlier than 3.2.10.5. - -**Key API/Component Changes** - -No API or component change is involved. - -**Adaptation Guide** -If "error: verify signature failed" is displayed, change **bundle-name** in the signing certificate profile to the bundle name of the application, generate a new signing certificate (with the file name extension .p7b), and sign the application again. - -For details about how to use the signing tool and generate a signing certificate, see [hapsigner Guide](../../../application-dev/security/hapsigntool-guidelines.md). - -## cl.bundlemanager.2 Changed Underlying Capability by Adding Control over Applications Without Entry Icons - -If no entry icon is configured for an application that has not requested the **AllowHideDesktopIcon** privilege, a default icon is displayed on the home screen. Any click on the icon redirects to the application details page. An application is determined to have no entry icon in either of the following scenarios: -1. The **abilities** field is not configured for the application. -2. The **abilities** field is configured for the application, but the **skills** field under the ability of any page type does not contain both **ohos.want.action.home** and **entity.system.home**, as follows: - ```json - "skills": [ - { - "actions": [ - "ohos.want.action.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - ``` -If the application installation mode is **hdc_std install** or **bm install**, a default icon is displayed for the application on the home screen. - -If your application does not need an icon to be displayed on the home screen, request the **AllowHideDesktopIcon** privilege and configure it in the signing certificate or trustlist (**install_list_capability.json**). For details, see [Application Privilege Configuration Guide](../../../device-dev/subsystems/subsys-app-privilege-config-guide.md). - -If your application needs an icon to be displayed on the home screen, select an ability from **abilities** and configure its **skills** field to contain both **ohos.want.action.home** and **entity.system.home**. - -**Change Impact** - -For applications using system images of 3.2.10.5 and later versions, if no entry icon is configured for an application, the default icon is displayed on the home screen when the application is installed using the CLI. This change has no impact on applications using system images earlier than 3.2.10.5. - -**Key API/Component Changes** - -No API or component change is involved. - -**Adaptation Guide** - -If your application does not need an icon to be displayed on the home screen, request the **AllowHideDesktopIcon** privilege and configure it in the signing certificate or trustlist (**install_list_capability.json**). For details, see [Application Privilege Configuration Guide](../../../device-dev/subsystems/subsys-app-privilege-config-guide.md). - -If your application needs an icon to be displayed on the home screen, select an ability from **abilities** and configure its **skills** field to contain both **ohos.want.action.home** and **entity.system.home**. - -## cl.bundlemanager.3 Changed Underlying Capability by Restricting AllowAppUsePrivilegeExtension, AllowAppMultiProcess, and AllowFormVisibleNotify from Being Configured in the Signing Certificate - -The **AllowAppUsePrivilegeExtension**, **AllowAppMultiProcess**, and **AllowFormVisibleNotify** privileges can no longer be configured in the signing certificate. They can be requested only through the trustlist (**install_list_capability.json**). If your application requests these privileges in the signing certificate, the installation may fail or the privileges may be invalid. - -If the following error information is displayed, adapt to the new privilege configuration method. For details, see [Application Privilege Configuration Guide](../../../device-dev/subsystems/subsys-app-privilege-config-guide.md). -``` -error: install parse profile prop check error. -``` - -For the XTS or local debugging demo, if the **install_list_capability.json** file on the development board cannot be modified, you can change the bundle name of the application to start with **com.acts.** and request the privileges in the signing certificate. - -The **AllowAppUsePrivilegeExtension** privilege is requested by configuring it under the **extensionAbilities** field, with the **type** attribute set to **dataShare** or **service**, in the application configuration file. If this privilege is not configured, the installation fails. - -**Change Impact** - -For applications using system images of 3.2.10.5 or later, if the required privileges are not requested using the trustlist (**install_list_capability.json**), application installation may fail. This change has no impact on applications using system images earlier than 3.2.10.5. - -**Key API/Component Changes** - -No API or component change is involved. - -**Adaptation Guide** - -If the following error information is displayed, adapt to the new privilege configuration method. For details, see [Application Privilege Configuration Guide](../../../device-dev/subsystems/subsys-app-privilege-config-guide.md). - -``` -error: install parse profile prop check error. -``` - -For the XTS or local debugging demo, if the **install_list_capability.json** file on the development board cannot be modified, you can change the bundle name of the application to start with **com.acts.** and request the privileges in the signing certificate. - -## cl.bundlemanager.4 Changed Underlying Capability by Not Decompressing the HAP During HAP Installation - -The HAP will no longer be decompressed during installation. After the installation is complete, only the HAP file exists in the installation directory. As a result, the application must use the standard resource management interface, rather than a combined path, to access a resource file. - -**Change Impact** - -If the application uses a combined path to access a resource file, the access fails. It must use the resource management interface. - -**Key API/Component Changes** - -No API or component change is involved. - -**Adaptation Guide** - -The resource management subsystem provides the JS interface for accessing resource files. Reference: [Accessing Resource Files](../../../application-dev/reference/apis/js-apis-resource-manager.md#getrawfilecontent9) \ No newline at end of file diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-filemanagement.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-filemanagement.md deleted file mode 100644 index f8f27e77b91602c5d1b54a8e7e5d06f7fabd69c5..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-filemanagement.md +++ /dev/null @@ -1,189 +0,0 @@ -# File Management Subsystem Changelog - -## cl.filemanagement.1 environment Module Change - -The file management subsystem **d.ts** file has been archived and moved to the **file** directory. The **environment** module supports error code processing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **environment** module supports error code processing. See [Adaptation Guide](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **environment** is imported from **@ohos.environment**: - -```js -import environment from '@ohos.environment'; -``` - -Now, **environment** is imported from **@ohos.file.environment**: - -```js -import environment from '@ohos.file.environment'; -``` - -## cl.filemanagement.2 securityLabel Change - -Moved the file management subsystem **d.ts** file to the **file** directory. The **securityLabel** module supports error code processing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **securityLabel** module supports error code processing. See [Adaptation Guide](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **securityLabel** is imported from **@ohos.securityLabel**: - -```js -import securityLabel from '@ohos.securityLabel'; -``` - -Now, **securityLabel** is imported from **@ohos.file.securityLabel**: - -```js -import securityLabel from '@ohos.file.securityLabel'; -``` - -## cl.filemanagement.3 fs Change - -Changed the **ino** attribute type of **Stat** under **fs**. - -**Change Impact** - -The **ino** attribute type is changed from number to BigInt, to adapt to the **inode** range of all types of files in the file system. - -**Key API/Component Changes** - -The type of the **ino** attribute of **Stat** is changed from number to BigInt. - -## cl.filemanagement.4 fileAccess Change - -Moved the file management subsystem **d.ts** file to the **file** directory. The **fileAccess** module supports error code processing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **fileAccess** module supports error code processing. See [Adaptation Guide](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **fileAccess** is imported from **@ohos.data.fileAccess**: - -```js -import fileAccess from '@ohos.data.fileAccess'; -``` - -Now, **fileAccess** is imported from **@ohos.file.fileAccess**: - -```js -import fileAccess from '@ohos.file.fileAccess'; -``` - -## cl.filemanagement.5 fileExtensionInfo Change - -Moved the file management subsystem **d.ts** file to the **file** directory. The **fileExtensionInfo** module supports error code processing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **fileExtensionInfo** module supports error code processing. See [Adaptation Guide](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **fileExtensionInfo** is imported from **@ohos.fileExtensionInfo**: - -```js -import fileExtensionInfo from '@ohos.fileExtensionInfo'; -``` - -Now, **fileExtensionInfo** is imported from **@ohos.file.fileExtensionInfo**: - -```js -import fileExtensionInfo from '@ohos.file.fileExtensionInfo'; -``` - -## cl.filemanagement.6 storageStatistics Change - -Moved the file management subsystem **d.ts** file to the **file** directory. The **fileExtensionInfo** module supports error code processing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **storageStatistics** module supports error code processing. See [Adaptation Guide](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **storageStatistics** was imported from **@ohos.storageStatistics**: - -```js -import storageStatistics from '@ohos.storageStatistics'; -``` - -Now, **storageStatistics** is imported from **@ohos.file.storageStatistics**: - -```js -import storageStatistics from '@ohos.file.storageStatistics'; -``` - -## cl.filemanagement.7 volumeManager Change - -Moved the file management subsystem **d.ts** file to the **file** directory. The **fileExtensionInfo** module supports error code processing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **volumeManager** module supports error code processing. See [Adaptation Guide](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **volumeManager** was imported from **@ohos.volumeManager**: - -```js -import volumeManager from '@ohos.volumeManager'; -``` - -Now, **volumeManager** is imported from **@ohos.file.volumeManager**: - -```js -import volumeManager from '@ohos.file.volumeManager'; -``` - -## cl.filemanagement.8 fileio API Changes - -Deprecated the **fileio** APIs, which do not return error codes; added APIs that return error codes. - -**Change Impact** - -For applications developed based on earlier versions, pay attention to the iterative update of deprecated APIs. The specifications of the new APIs are slightly adjusted. Pay attention to the usage of the new APIs. - -**Key API/Component Changes** - -The APIs of **@ohos.fileio** do not support error code handling and are deprecated. New APIs with minor changes in parameters are added in **@ohos.file.fs** to support unified error code handling specifications. The new APIs function the same as the original APIs. The following table lists the API changes. -The API names remain unchanged. - -| Module | Method/Attribute/Enum/Constant | Change Type| -| ------------------------- | ------------------------------------------------------------ | -------- | -| @ohos.fileio | **function** access(path: string, mode?: number, callback?: AsyncCallback\): void \| Promise\ | Deprecated | -| @ohos.fileio | **function** accessSync(path: string, mode?: number): void | Deprecated | -| @ohos.file.fs | **function** access(path: string, callback?: AsyncCallback\): void \| Promise\ | Added | -| @ohos.file.fs | **function** accessSync(path: string): boolean | Added | -| @ohos.fileio | **function** close(fd: number, callback?: AsyncCallback\): void \| Promise\ | Deprecated | -| @ohos.fileio | **function** closeSync(fd: number): void | Deprecated | -| @ohos.file.fs | **function** close(file: File \| number, callback?: AsyncCallback\): void \| Promise\ | Added | -| @ohos.file.fs | **function** closeSync(file: File \| number): void | Added | -| @ohos.fileio | **function** mkdir(path: string, mode?: number, callback?: AsyncCallback\): void \| Promise\ | Deprecated | -| @ohos.fileio | **function** mkdirSync(path: string, mode?: number): void | Deprecated | -| @ohos.file.fs | **function** mkdir(path: string, callback?: AsyncCallback\): void \| Promise\ | Added | -| @ohos.file.fs | **function** mkdirSync(path: string): void | Added | -| @ohos.fileio | **function** readText(filePath: string, options?: { position?: number; length?: number; encoding?: string; }, callback?: AsyncCallback\): void \| Promise\ | Deprecated | -| @ohos.fileio | **function** readTextSync(filePath: string, options?: { position?: number; length?: number; encoding?: string; }): string | Deprecated | -| @ohos.file.fs | **function** readText(filePath: string, options?: { offset?: number; length?: number; encoding?: string; }, callback?: AsyncCallback\): void \| Promise\ | Added | -| @ohos.file.fs | **function** readTextSync(filePath: string, options?: { offset?: number; length?: number; encoding?: string; }): string | Added | -| @ohos.fileio | **function** Stream.read(buffer: ArrayBuffer, options?: { offset?: number; length?: number; position?: number; }, callback?: AsyncCallback\): void \| Promise\ | Deprecated | -| @ohos.fileio | **function** Stream.readSync(buffer: ArrayBuffer, options?: { offset?: number; length?: number; position?: number; }): number | Deprecated | -| @ohos.file.fs | **function** Stream.read(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; }, callback?: AsyncCallback\): void \| Promise\ | Added | -| @ohos.file.fs | **function** Stream.readSync(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; }): number | Added | -| @ohos.fileio | **function** Stream.write(buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }, callback?: AsyncCallback\): void \| Promise\ | Deprecated | -| @ohos.fileio | **function** Stream.writeSync(buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }): number | Deprecated | -| @ohos.file.fs | **function** Stream.write(buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; encoding?: string; }, callback?: AsyncCallback\): void \| Promise\ | Added | -| @ohos.file.fs | **function** Stream.writeSync(buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; encoding?: string; }): number | Added | - -**Adaptation Guide** - -The APIs of @ohos.file.fs support unified exception handling. For details, see [File Management](../../../application-dev/reference/apis/js-apis-file-fs.md). diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-ohos-geoLocationManager.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-ohos-geoLocationManager.md deleted file mode 100644 index 0d86d0a5fcc2d7149fe02c25e095059f60e24676..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-ohos-geoLocationManager.md +++ /dev/null @@ -1,107 +0,0 @@ -# Location Subsystem ChangeLog - -## cl.location.1 API Migration from @ohos.geolocation.d.ts to @ohos.geoLocationManager.d.ts - -APIs in **@ohos.geolocation.d.ts** do not support throwing error codes. To support this function, all APIs in **@ohos.geolocation.d.ts** are migrated to the newly added **@ohos.geoLocationManager.d.ts** file, and corresponding error code description is added. - -To use APIs of the location subsystem, you need to import **@ohos.geoLocationManager**. - -import geoLocationManager from '@ohos.geoLocationManager'; - - -**Change Impacts** - -All APIs of the location subsystem are affected. To ensure normal use of these APIs, you need to import **@ohos.geoLocationManager**. - -import geoLocationManager from '@ohos.geoLocationManager'; - -**Key API/Component Changes** - -| Class | API Type | Declaration | Change Type | -| ----------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| geolocation | method | function on(type: 'locationChange', request: LocationRequest, callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function off(type: 'locationChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function on(type: 'locationServiceState', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'locationServiceState'** to **type: 'locationEnabledChange'**.| -| geolocation | method | function off(type: 'locationServiceState', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'locationServiceState'** to **type: 'locationEnabledChange'**.| -| geolocation | method | function on(type: 'cachedGnssLocationsReporting', request: CachedGnssLocationsRequest, callback: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'cachedGnssLocationsReporting'** to **type: 'cachedGnssLocationsChange'**.| -| geolocation | method | function off(type: 'cachedGnssLocationsReporting', callback?: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'cachedGnssLocationsReporting'** to **type: 'cachedGnssLocationsChange'**.| -| geolocation | method | function on(type: 'gnssStatusChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'gnssStatusChange'** to **type: 'satelliteStatusChange'**.| -| geolocation | method | function off(type: 'gnssStatusChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'gnssStatusChange'** to **type: 'satelliteStatusChange'**.| -| geolocation | method | function on(type: 'nmeaMessageChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'nmeaMessageChange'** to **type: 'nmeaMessage'**.| -| geolocation | method | function off(type: 'nmeaMessageChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'nmeaMessageChange'** to **type: 'nmeaMessage'**.| -| geolocation | method | function on(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'fenceStatusChange'** to **type: 'gnssFenceStatusChange'**.| -| geolocation | method | function off(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'fenceStatusChange'** to **type: 'gnssFenceStatusChange'**.| -| geolocation | method | function getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getCurrentLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getCurrentLocation(request?: CurrentLocationRequest): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getLastLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function getLastLocation(): Location**.| -| geolocation | method | function getLastLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function getLastLocation(): Location**.| -| geolocation | method | function isLocationEnabled(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationEnabled(): boolean**.| -| geolocation | method | function isLocationEnabled(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationEnabled(): boolean**.| -| geolocation | method | function requestEnableLocation(callback: AsyncCallback): void; | Deleted. | -| geolocation | method | function requestEnableLocation(): Promise; | Deleted. | -| geolocation | method | function enableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function enableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function disableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocation(): void**.| -| geolocation | method | function disableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocation(): void**.| -| geolocation | method | function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getAddressesFromLocationName(request: GeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function isGeoServiceAvailable(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isGeocoderAvailable(): boolean**.| -| geolocation | method | function isGeoServiceAvailable(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isGeocoderAvailable(): boolean**.| -| geolocation | method | function getCachedGnssLocationsSize(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getCachedGnssLocationsSize(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function flushCachedGnssLocations(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function flushCachedGnssLocations(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function sendCommand(command: LocationCommand, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function sendCommand(command: LocationCommand): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function enableLocationMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableLocationMock(): void**.| -| geolocation | method | function enableLocationMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableLocationMock(): void**.| -| geolocation | method | function disableLocationMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocationMock(): void**.| -| geolocation | method | function disableLocationMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocationMock(): void**.| -| geolocation | method | function setMockedLocations(config: LocationMockConfig, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setMockedLocations(config: LocationMockConfig): void**.| -| geolocation | method | function setMockedLocations(config: LocationMockConfig): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setMockedLocations(config: LocationMockConfig): void**.| -| geolocation | method | function enableReverseGeocodingMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableReverseGeocodingMock(): void**.| -| geolocation | method | function enableReverseGeocodingMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableReverseGeocodingMock(): void**.| -| geolocation | method | function disableReverseGeocodingMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableReverseGeocodingMock(): void**.| -| geolocation | method | function disableReverseGeocodingMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableReverseGeocodingMock(): void**.| -| geolocation | method | function setReverseGeocodingMockInfo(mockInfos: Array, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setReverseGeocodingMockInfo(mockInfos: Array): void**.| -| geolocation | method | function setReverseGeocodingMockInfo(mockInfos: Array): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setReverseGeocodingMockInfo(mockInfos: Array): void**.| -| geolocation | method | function isLocationPrivacyConfirmed(type: LocationPrivacyType, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationPrivacyConfirmed(type: LocationPrivacyType): boolean**.| -| geolocation | method | function isLocationPrivacyConfirmed(type: LocationPrivacyType,): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationPrivacyConfirmed(type: LocationPrivacyType): boolean**.| -| geolocation | method | function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): void**.| -| geolocation | method | function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): void**.| -| geolocation | interface | SatelliteStatusInfo | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | CachedGnssLocationsRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | GeofenceRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | Geofence | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | ReverseGeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | GeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | GeoAddress | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | LocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | CurrentLocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | Location | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | enum | LocationRequestPriority | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | enum | LocationRequestScenario | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | enum | GeoLocationErrorCode | Deprecated. | -| geolocation | enum | LocationPrivacyType | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | enum | LocationCommand | Migrated to **@ohos.geoLocationManager.d.ts**. | - - -**(Optional) Adaptation Guide** - -The following sample code shows how to call **enableLocation** in the new version: - - ```ts - import geoLocationManager from '@ohos.geoLocationManager'; - try { - geoLocationManager.enableLocation((err, data) => { - if (err) { - console.log('enableLocation: err=' + JSON.stringify(err)); - } - }); - } catch (err) { - console.error("errCode:" + err.code + ",errMessage:" + err.message); - } - ``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-ohos-geolocation.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-ohos-geolocation.md deleted file mode 100644 index edcd6bea8cb40b01a9b7cbf278e925273b86d9ce..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-ohos-geolocation.md +++ /dev/null @@ -1,92 +0,0 @@ -# Location Subsystem ChangeLog - -## cl.location.1 API Migration from @ohos.geolocation.d.ts to @ohos.geoLocationManager.d.ts - -APIs in **@ohos.geolocation.d.ts** do not support throwing error codes. To support this function, all APIs in **@ohos.geolocation.d.ts** are migrated to the newly added **@ohos.geoLocationManager.d.ts** file, and corresponding error code description is added. - -To use APIs of the location subsystem, you need to import **@ohos.geoLocationManager**. - -import geoLocationManager from '@ohos.geoLocationManager'; - - -**Change Impacts** - -All APIs of the location subsystem are affected. To ensure normal use of these APIs, you need to import **@ohos.geoLocationManager**. - -import geoLocationManager from '@ohos.geoLocationManager'; - -**Key API/Component Changes** - -| Class | API Type | Declaration | Change Type | -| ----------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| geolocation | namespace | declare namespace geolocation | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **namespace geoLocationManager**.| -| geolocation | method | function on(type: 'locationChange', request: LocationRequest, callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function off(type: 'locationChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function on(type: 'locationServiceState', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function off(type: 'locationServiceState', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function on(type: 'cachedGnssLocationsReporting', request: CachedGnssLocationsRequest, callback: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function off(type: 'cachedGnssLocationsReporting', callback?: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function on(type: 'gnssStatusChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function off(type: 'gnssStatusChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function on(type: 'nmeaMessageChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function off(type: 'nmeaMessageChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function on(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function off(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getCurrentLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getCurrentLocation(request?: CurrentLocationRequest): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getLastLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getLastLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function isLocationEnabled(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function isLocationEnabled(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function requestEnableLocation(callback: AsyncCallback): void; | Deleted. | -| geolocation | method | function requestEnableLocation(): Promise; | Deleted. | -| geolocation | method | function enableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function enableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function disableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function disableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getAddressesFromLocationName(request: GeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function isGeoServiceAvailable(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function isGeoServiceAvailable(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getCachedGnssLocationsSize(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function getCachedGnssLocationsSize(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function flushCachedGnssLocations(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function flushCachedGnssLocations(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function sendCommand(command: LocationCommand, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | method | function sendCommand(command: LocationCommand): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | SatelliteStatusInfo | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | CachedGnssLocationsRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | GeofenceRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | Geofence | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | ReverseGeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | GeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | GeoAddress | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | LocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | CurrentLocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | interface | Location | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | enum | LocationRequestPriority | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | enum | LocationRequestScenario | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | enum | GeoLocationErrorCode | Deprecated. | -| geolocation | enum | LocationPrivacyType | Migrated to **@ohos.geoLocationManager.d.ts**. | -| geolocation | enum | LocationCommand | Migrated to **@ohos.geoLocationManager.d.ts**. | - - -**(Optional) Adaptation Guide** - -The following sample code shows how to call **enableLocation** in the new version: - - ```ts - import geoLocationManager from '@ohos.geoLocationManager'; - try { - geoLocationManager.enableLocation((err, data) => { - if (err) { - console.log('enableLocation: err=' + JSON.stringify(err)); - } - }); - } catch (err) { - console.error("errCode:" + err.code + ",errMessage:" + err.message); - } - ``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-system-geolocation.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-system-geolocation.md deleted file mode 100644 index 266c351ae272da62759df17c02a2e8368818f9ee..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-system-geolocation.md +++ /dev/null @@ -1,50 +0,0 @@ -# Location Subsystem ChangeLog - -## cl.location.1 API Migration from @system.geolocation.d.ts to @ohos.geoLocationManager.d.ts - -APIs in **@system.geolocation.d.ts** do not support throwing error codes. To support this function, all APIs in **@system.geolocation.d.ts** are migrated to the newly added **@ohos.geoLocationManager.d.ts** file, and corresponding error code description is added. - -To use APIs of the location subsystem, you need to import **@ohos.geoLocationManager**. - -import geoLocationManager from '@ohos.geoLocationManager'; - - -**Change Impacts** - -All APIs of the location subsystem are affected. To ensure normal use of these APIs, you need to import **@ohos.geoLocationManager**. - -import geoLocationManager from '@ohos.geoLocationManager'; - -**Key API/Component Changes** - -| Class | API Type | Declaration | Change Type | -| ----------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| Geolocation | class | Geolocation | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager**.| -| Geolocation | interface | static getLocation(options?: GetLocationOption): void; | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.getCurrentLocation**.| -| Geolocation | interface | static getLocationType(options?: GetLocationTypeOption): void; | Deprecated. | -| Geolocation | interface | static subscribe(options: SubscribeLocationOption): void; | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.on#event:locationChange**.| -| Geolocation | interface | static unsubscribe(): void; | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.off#event:locationChange**.| -| Geolocation | interface | static getSupportedCoordTypes(): Array; | Deprecated. | -| | interface | GeolocationResponse | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.Location**.| -| | interface | GetLocationOption | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.CurrentLocationRequest**.| -| | interface | GetLocationTypeResponse | Deprecated. | -| | interface | GetLocationTypeOption | Deprecated. | -| | interface | SubscribeLocationOption | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.LocationRequest**.| - - -**(Optional) Adaptation Guide** - -The following sample code shows how to call **enableLocation** in the new version: - - ```ts - import geoLocationManager from '@ohos.geoLocationManager'; - try { - geoLocationManager.enableLocation((err, data) => { - if (err) { - console.log('enableLocation: err=' + JSON.stringify(err)); - } - }); - } catch (err) { - console.error("errCode:" + err.code + ",errMessage:" + err.message); - } - ``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-ability.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-ability.md deleted file mode 100644 index f2cb2a81bdbd834cee896fda68a3cfa0d2626bd3..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-ability.md +++ /dev/null @@ -1,36 +0,0 @@ -# Ability Subsystem Changelog - -## cl.ability.1 RestartFlag Attribute Names Changed and Unsupported Attribute Deleted in appRecovery - -In the **appRecovery** API, the enum names of **RestartFlag** are changed from **NO_RESTART** upon a specific fault to **RESTART** upon a specific fault. -The **CPP_CRASH_NO_RESTART** enum is deleted. - -**Change Impact** - -If your application uses the **CPP_CRASH_NO_RESTART**, **JS_CRASH_NO_RESTART**, or **APP_FREEZE_NO_RESTART** attribute in versions earlier than 3.2.10.6, its behavior will change after an upgrade to 3.2.10.6. - -**Key API/Component Changes** - -**RestartFlag** 9+ - -Before change: -| Name | Value | Description | -| ----------------------------- | ---- | ------------------------------------------------------------ | -| ALWAYS_RESTART | 0 | The application is restarted in all cases.| -| CPP_CRASH_NO_RESTART | 0x0001 | The application is **not restarted** in the case of CPP_CRASH.| -| JS_CRASH_NO_RESTART | 0x0002 | The application is **not restarted** in the case of JS_CRASH.| -| APP_FREEZE_NO_RESTART | 0x0004 | The application is **not restarted** in the case of APP_FREEZE.| -| NO_RESTART | 0xFFFF | The application is not restarted in any case.| - -After change: -| Name | Value | Description | -| ---------- | ---- | ---------- | -| ALWAYS_RESTART | 0 | The application is restarted in all cases.| -| CPP_CRASH_NO_RESTART | NA | **Deleted.** The restart in this scenario is not supported.| -| RESTART_WHEN_JS_CRASH | 0x0001 | The application is **restarted** in the case of JS_CRASH.| -| RESTART_WHEN_APP_FREEZE | 0x0002 | The application is **restarted** in the case of APP_FREEZE.| -| NO_RESTART | 0xFFFF | The application is not restarted in any case.| - -**Adaptation Guide** - -Perform adaptation based on the new semantics. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-web.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-web.md deleted file mode 100644 index aff1454a2ed5fca720e5924f863361a294dacb8f..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-web.md +++ /dev/null @@ -1,528 +0,0 @@ -# Web Subsystem Changelog - -Compared with earlier versions, OpenHarmony 3.2.10.7 has the following API changes in its web subsystem: - -## cl.web.1 HitTestTypeV9 Name Change - -Renamed the enum class **HitTestTypeV9** **WebHitTestType** to meet the naming conventions. - -**Change Impact** - -The enum class **HitTestTypeV9** and APIs that use **HitTestTypeV9** as a parameter or return value cannot be used in OpenHarmony 3.2.10.7 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - enum HitTestTypeV9 - -- Before change: - - ```ts - enum HitTestTypeV9 - ``` - -- After change: - - ```ts - enum WebHitTestType - ``` - -**Adaptation Guide** - -Replace **HitTestTypeV9** with **WebHitTestType**. - -## cl.web.2 HeaderV9 Name Change - -Renamed the struct **HeaderV9** **WebHeader** to meet the naming conventions. - -**Change Impact** - -The struct **HeaderV9** and APIs that use **HeaderV9** as a parameter or return value cannot be used in OpenHarmony 3.2.10.7 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - interface HeaderV9 - -- Before change: - - ```ts - interface HeaderV9 - ``` - -- After change: - - ```ts - interface WebHeader - ``` - -**Adaptation Guide** - -Replace **HeaderV9** with **WebHeader**. - -## cl.web.3 Member Change of HitTestValue - -Rename the member variable **HitTestTypeV9** in the **HitTestValue** struct **WebHitTestType** to meet the naming conventions. - -**Change Impact** - -The struct **HitTestValue** and APIs that use **HitTestValue** as a parameter or return value cannot be used in OpenHarmony 3.2.10.7 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - interface HitTestValue - -- Before change: - - ```ts - interface HitTestValue { - - /** - * Get the hit test type. - * - * @since 9 - */ - type: HitTestTypeV9; - - /** - * Get the hit test extra data. - * - * @since 9 - */ - extra: string; - } - ``` - -- After change: - - ```ts - interface HitTestValue { - - /** - * Get the hit test type. - * - * @since 9 - */ - type: WebHitTestType; - - /** - * Get the hit test extra data. - * - * @since 9 - */ - extra: string; - } - ``` - -**Adaptation Guide** - -Replace **HitTestTypeV9** with **WebHitTestType**. - -## cl.web.4 Parameter Type Change of loadUrl - -Changed the type of the **headers** parameter in **loadUrl** to **WebHeader** to meet the naming conventions. - -**Change Impact** - -The **loadUrl** API that uses the **headers** parameter cannot be used in OpenHarmony 3.2.10.7 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - loadUrl(url: string | Resource, headers?: Array\): void - -- Before change: - - ```ts - loadUrl(url: string | Resource, headers?: Array): void - ``` - -- After change: - - ```ts - loadUrl(url: string | Resource, headers?: Array): void - ``` - -**Adaptation Guide** - -Change the type of the **headers** parameter in **loadUrl** from **HeaderV9** to **WebHeader**. - -## cl.web.5 Return Value Type Change of getHitTest - -Changed the return value type of the **getHitTest** API to **WebHitTest** to meet the naming conventions. - -**Change Impact** - -The **getHitTest** API cannot be used in OpenHarmony 3.2.10.7 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - getHitTest(): HitTestTypeV9 - -- Before change: - - ```ts - getHitTest(): HitTestTypeV9 - ``` - -- After change: - - ```ts - getHitTest(): WebHitTestType - ``` - -**Adaptation Guide** - -Change the return value type of the **getHitTest** API from **HitTestTypeV9** to **WebHitTestType**. - -## cl.web.6 Moving of the WebMessagePort Class - -Moved the **WebMessagePort** class to **@ohos.web.webview.d.ts** and added error throwing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing. - -**Key API/Component Changes** - -- Involved APIs: - - postMessageEvent(message: WebMessageEvent): void; - onMessageEvent(callback: (result: string) => void): void; - -- Before change: - - ```ts - postMessageEvent(message: WebMessageEvent): void; - onMessageEvent(callback: (result: string) => void): void; - ``` - -- After change: - - ```ts - postMessageEvent(message: WebMessage): void; - onMessageEvent(callback: (result: WebMessage) => void): void; - ``` - -**Adaptation Guide** - -Instead of importing APIs from the original **WebMessagePort** class, import APIs from **@ohos.web.webview** as follows: - - ```ts - import web_webview from '@ohos.web.webview'; - ``` - -## cl.web.7 Moving of the HitTestValue Class - -Moved the **HitTestValue** class to **@ohos.web.webview.d.ts**; changed **HitTestValue** from a class to an API; changed the **getType** and **getExtra** from APIs to attributes. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. - -**Key API/Component Changes** - -- Involved APIs: - - getType(): HitTestType; - getExtra(): string; - -- Before change: - - ```ts - getType(): HitTestType; - getExtra(): string; - ``` - -- After change: - - ```ts - type: WebHitTestType; - extra: string; - ``` - -**Adaptation Guide** - -Instead of importing APIs from the original **HitTestValue** class, import APIs from **@ohos.web.webview** as follows: - - ```ts - import web_webview from '@ohos.web.webview'; - ``` - -## cl.web.8 Moving of API Version 9 APIs Under WebCookie - -Moved APIs of API version 9 in the **WebCookie** class to **web.webview.webview.WebCookieManager** -and added error throwing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing. -The APIs in the class are static. - -**Key API/Component Changes** - -- Involved APIs: - - isCookieAllowed(): boolean; - isThirdPartyCookieAllowed(): boolean; - putAcceptCookieEnabled(accept: boolean): void; - putAcceptThirdPartyCookieEnabled(accept: boolean): void; - setCookie(url: string, value: string): boolean; - saveCookieSync(): boolean; - getCookie(url: string): string; - existCookie(): boolean; - deleteEntireCookie(): void; - deleteSessionCookie(): void; - -- Before change: - - ```ts - isCookieAllowed(): boolean; - isThirdPartyCookieAllowed(): boolean; - putAcceptCookieEnabled(accept: boolean): void; - putAcceptThirdPartyCookieEnabled(accept: boolean): void; - setCookie(url: string, value: string): boolean; - saveCookieSync(): boolean; - getCookie(url: string): string; - existCookie(): boolean; - deleteEntireCookie(): void; - deleteSessionCookie(): void; - ``` - -- After change: - - ```ts - static isCookieAllowed(): boolean; - static isThirdPartyCookieAllowed(): boolean; - static putAcceptCookieEnabled(accept: boolean): void; - static putAcceptThirdPartyCookieEnabled(accept: boolean): void; - static setCookie(url: string, value: string): void; - static saveCookieAsync(): Promise; - static saveCookieAsync(callback: AsyncCallback): void; - static getCookie(url: string): string; - static existCookie(): boolean; - static deleteEntireCookie(): void; - static deleteSessionCookie(): void; - ``` - -**Adaptation Guide** - -Instead of importing APIs from the original **WebCookie** class, import APIs from **@ohos.web.webview** as follows: - - ```ts - import web_webview from '@ohos.web.webview'; - ``` - -## cl.web.9 Moving of API Version 9 APIs Under WebController - -Moved APIs of API version 9 in the **WebController** class to **web.webview.webview.WebviewController** and added error throwing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing. -The **getDefaultUserAgent** API is renamed **getUserAgent**. - -**Key API/Component Changes** - -- Involved APIs: - - zoomIn(): boolean; - zoomOut(): boolean; - createWebMessagePorts(): Array\; - postMessage(options: { message: WebMessageEvent, uri: string}): void; - getHitTestValue(): HitTestValue; - getWebId(): number; - getDefaultUserAgent(): string; - getTitle(): string; - getPageHeight(): number; - backOrForward(step: number): void; - searchAllAsync(searchString: string): void; - clearMatches(): void; - searchNext(forward: boolean): void; - clearSslCache(): void; - clearClientAuthenticationCache(): void; - getUrl(): string; - -- Before change: - - ```ts - zoomIn(): boolean; - zoomOut(): boolean; - createWebMessagePorts(): Array; - postMessage(options: { message: WebMessageEvent, uri: string}): void; - getHitTestValue(): HitTestValue; - getWebId(): number; - getDefaultUserAgent(): string; - getTitle(): string; - getPageHeight(): number; - backOrForward(step: number): void; - searchAllAsync(searchString: string): void; - clearMatches(): void; - searchNext(forward: boolean): void; - clearSslCache(): void; - clearClientAuthenticationCache(): void; - getUrl(): string; - ``` - -- After change: - - ```ts - zoomIn(): void; - zoomOut(): void; - createWebMessagePorts(): Array; - postMessage(name: string, ports: Array, uri: string): void; - getHitTestValue(): HitTestValue; - getWebId(): number; - getUserAgent(): string; - getTitle(): string; - getPageHeight(): number; - backOrForward(step: number): void; - searchAllAsync(searchString: string): void; - clearMatches(): void; - searchNext(forward: boolean): void; - clearSslCache(): void; - clearClientAuthenticationCache(): void; - getUrl(): string; - ``` - -**Adaptation Guide** - -Instead of importing APIs from the original **WebController** class, import APIs from **@ohos.web.webview** as follows: - - ```ts - import web_webview from '@ohos.web.webview'; - ``` - -## cl.web.10 Moving of the WebAsyncController Class - -Moved the APIs in the **WebAsyncController** class to the **web.webview.webview.WebviewController** class and added error throwing. - -**Change Impact** - -If your application is developed based on earlier versions, pay attention to error code processing. - -**Key API/Component Changes** - -- Involved APIs: - - storeWebArchive(baseName: string, autoName: boolean): Promise\; - storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback\): void; - -- Before change: - - ```ts - storeWebArchive(baseName: string, autoName: boolean): Promise; - storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback): void; - ``` - -- After change: - - ```ts - storeWebArchive(baseName: string, autoName: boolean): Promise; - storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback): void; - ``` - -**Adaptation Guide** - -Example: - - ```ts - // xxx.ets - import web_webview from '@ohos.web.webview' - - @Entry - @Component - struct WebComponent { - controller: web_webview.WebviewController = new web_webview.WebviewController(); - - build() { - Column() { - Button('saveWebArchive') - .onClick(() => { - try { - this.controller.storeWebArchive("/data/storage/el2/base/", true, (error, filename) => { - if (error) { - console.info(`save web archive error: ` + JSON.stringify(error)) - return; - } - if (filename != null) { - console.info(`save web archive success: ${filename}`) - } - }); - } catch (error) { - console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); - } - }) - Web({ src: 'www.example.com', controller: this.controller }) - } - } - } - ``` - -## cl.web.11 Removal of webDebuggingAccess - -The definition of the **webDebuggingAccess** API is inappropriate. This API should take effect for all **Web** instances. In light of this, it is removed and replaced by the new API **setWebDebuggingAccess**. - -**Change Impacts** - -This API must be deprecated and replaced with the **setWebDebuggingAccess** API. - -**Key API/Component Changes** - -| Class| API Type| Declaration| Change Type| -| -- | -- | -- | -- | -|WebAttribute | method | webDebugggingAccess(webDebugggingAccess: boolean): WebAttribute| Deleted| - -**Adaptation Guide** - -Use the new API **setWebDebuggingAccess**. - -## cl.web.12 Adding of setWebDebuggingAccess - -Added the static API **setWebDebuggingAccess** to **WebviewController**. It sets whether to enable web debugging works for all **Web** instances. - -**Change Impacts** - -The original **webDebugggingAccess** API must be replaced with the new API in the application. - -**Key API/Component Changes** - -| Class| API Type| Declaration| Change Type| -| -- | -- | -- | -- | -|webview.WebviewController | method | static setWebDebugggingAccess(webDebugggingAccess: boolean): void| Added| - -**Adaptation Guide** - -The following exemplifies how to enable web debugging: - -```ts -// xxx.ets -import web_webview from '@ohos.web.webview'; - -@Entry -@Component -struct WebComponent { - controller: web_webview.WebviewController = new web_webview.WebviewController(); - - aboutToAppear():void { - try { - web_webview.WebviewController.setWebDebuggingAccess(true); - } catch(error) { - console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); - } - } - - build() { - Column() { - Web({ src: 'www.example.com', controller: this.controller }) - } - } -} -``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelogs-arkui.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelogs-arkui.md deleted file mode 100644 index 0a2bf8673fefe00b6736d5cd299e24e5f5acddf2..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelogs-arkui.md +++ /dev/null @@ -1,308 +0,0 @@ -# ArkUI Subsystem Changelog - -## cl.arkui.1 Return Value Type Change of getInspectorTree - -**Change Impact** - -The code that uses the **getInspectorTree** API in versions earlier than OpenHarmony 3.2.10.7 must be adapted. - -**Key API/Component Changes** - -The return value of the **getInspectorTree** API is changed from the string type to the Object type. - -**Adaptation Guide** - -Adapt the code that takes the return value of **getInspectorTree** as a string.The sample code is as follows: - -- Before change: - -```typescript -console.info(getInspectorTree()) -``` - -- After change: - -```typescript -console.info(JSON.stringify(getInspectorTree())) -``` - -## cl.arkui.2 Deprecation the forceRebuild Attribute of \ - -**Change Impact** - -None. The attribute has no effect. - -**Key API/Component Changes** - -Deprecate the **forceRebuild** attribute of the **\** component. - -**Adaptation Guide** - -Delete the code that uses the **forceRebuild** attribute. This will not affect the functionality of the **\** component. - -## cl.arkui.3 Plugin Module API Changes - - -### 1. API Change in the **PluginComponentTemplate** Module - -Renamed the **ability** parameter **bundleName** to more clearly indicate the intended meaning. - -You need to adapt your application. - - - -**Change Impact** - -The application developed based on earlier versions must be adapted to the change. Otherwise, build errors will occur. - - - -**Key API/Component Changes** - -- Involved APIs: - - interface PluginComponentTemplate { - source: string; - bundleName: string; - } - - interface PluginComponentInterface { - (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; -} - -- Before change: - -```js - interface PluginComponentTemplate { source: string; ability: string; } - interface PluginComponentInterface { - (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; - } -``` - -- After change: - -```js - interface PluginComponentTemplate { source: string; bundleName: string; } - interface PluginComponentInterface { - (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; - } -``` - -**Adaptation Guide** - -Use the new API. The sample code is as follows: - -- Before change: -```js -PluginComponent({ - template: { source: 'plugincomponent1', ability: 'com.example.plugin' }, - data: { 'countDownStartValue': 'new countDownStartValue' } -}).size({ width: 500, height: 100 }) -``` - -- After change: -```js -PluginComponent({ - template: { source: 'plugincomponent1', bundleName: 'com.example.plugin' }, - data: { 'countDownStartValue': 'new countDownStartValue' } -}).size({ width: 500, height: 100 }) -``` - -### 2. API Change in the **pluginComponentManager** Module - -Renamed the **want** parameter **target** to more clearly indicate the intended meaning. - -You need to adapt your application. - - - -**Change Impact** - -The application developed based on earlier versions must be adapted to the change. Otherwise, alarms will arise. Though the build may be successful, the API will not work as intended. - - - -**Key API/Component Changes** - -- Involved APIs: - - interface PushParameterForStage { - owner: Want; - target: Want; - name: string; - data: KVObject; - extraData: KVObject; - jsonPath?: string; - } - - function push(param: PushParameterForStage, callback: AsyncCallback\): void; - - interface RequestParameterForStage { - owner: Want; - target: Want; - name: string; - data: KVObject; - jsonPath?: string; - } - - function request(param: RequestParameterForStage, callback: AsyncCallback\): void; - -- Before change: - -```js - interface PushParameterForStage { - owner: Want; - want: Want; - name: string; - data: KVObject; - extraData: KVObject; - jsonPath?: string; - } - - function push(param: PushParameterForStage, callback: AsyncCallback): void; - - interface RequestParameterForStage { - owner: Want; - want: Want; - name: string; - data: KVObject; - jsonPath?: string; - } - - function request(param: RequestParameterForStage, callback: AsyncCallback): void; -``` - -- After change: - -```js - interface PushParameterForStage { - owner: Want; - target: Want; - name: string; - data: KVObject; - extraData: KVObject; - jsonPath?: string; - } - - function push(param: PushParameterForStage, callback: AsyncCallback): void; - - interface RequestParameterForStage { - owner: Want; - target: Want; - name: string; - data: KVObject; - jsonPath?: string; - } - - function request(param: RequestParameterForStage, callback: AsyncCallback): void; -``` - -**Adaptation Guide** - -Use the new API. The sample code is as follows: - -- Before change: -```js -import pluginComponentManager from '@ohos.pluginComponent' - -pluginComponentManager.push({ - owner:{ - bundleName:"com.example.provider", - abilityName:"com.example.provider.MainAbility" - }, - want: { - bundleName: "com.example.provider", - abilityName: "com.example.provider.MainAbility", - }, - name: "ets/pages/plugin2.js", - data: { - "js": "ets/pages/plugin.js", - "key_1": 1111, - }, - extraData: { - "extra_str": "this is push event" - }, - jsonPath: "", - }, - (err, data) => { - console.log("push_callback:err: " ,JSON.stringify(err)); - console.log("push_callback:data: " , JSON.stringify(data)); - console.log("push_callback: push ok!"); - } -) - -pluginComponentManager.request({ - owner:{ - bundleName:"com.example.provider", - abilityName:"com.example.provider.MainAbility" - }, - want: { - bundleName: "com.example.provider", - abilityName: "ets/pages/plugin2.js", - }, - name: "plugintemplate", - data: { - "key_1": " myapplication plugin component test", - "key_2": 123456 - }, - jsonPath: "", -}, - (err, data) => { - console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) - console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) - } -) -``` - -- After change: -```js -import pluginComponentManager from '@ohos.pluginComponent' - -pluginComponentManager.push({ - owner:{ - bundleName:"com.example.provider", - abilityName:"com.example.provider.MainAbility" - }, - target: { - bundleName: "com.example.provider", - abilityName: "com.example.provider.MainAbility", - }, - name: "ets/pages/plugin2.js", - data: { - "js": "ets/pages/plugin.js", - "key_1": 1111, - }, - extraData: { - "extra_str": "this is push event" - }, - jsonPath: "", - }, - (err, data) => { - console.log("push_callback:err: " ,JSON.stringify(err)); - console.log("push_callback:data: " , JSON.stringify(data)); - console.log("push_callback: push ok!"); - } -) - -pluginComponentManager.request({ - owner:{ - bundleName:"com.example.provider", - abilityName:"com.example.provider.MainAbility" - }, - target: { - bundleName: "com.example.provider", - abilityName: "ets/pages/plugin2.js", - }, - name: "plugintemplate", - data: { - "key_1": " myapplication plugin component test", - "key_2": 123456 - }, - jsonPath: "", -}, - (err, data) => { - console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) - console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) - } -) -``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.12.2/changelog-ability.md b/en/release-notes/changelogs/OpenHarmony_3.2.12.2/changelog-ability.md deleted file mode 100644 index 5920a7cdf72d6f3b02f7fca84eafea67abbfcc1e..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.12.2/changelog-ability.md +++ /dev/null @@ -1,34 +0,0 @@ -# Ability Framework Changelog - -Compared with OpenHarmony 3.2 Release, OpenHarmony 3.2.12.2 provides more detailed error code information for the APIs of the ability framework. - -## cl.ability.1 Added and Optimized API Error Code Description - -The error code description and all error codes that may be returned by the APIs are commented out. This helps developers control the error process more accurately. - -**Change Impact** - -The external declaration of the JS APIs of API version 9 is affected, but the API functionalities are not affected. You can determine whether to adapt to the JS APIs. - -**Key API/Component Changes** - -The comments of the following modules are updated. For details, see the corresponding external API declaration and API development guide. - -| Module | Description of Major Changes | -| ----------------------------------- | ------------------------------------------------------------ | -| @ohos.app.ability.UIAbility | Added the description of error codes 16200001, 16200002, 16200004, 16200005, 16000050.| -| @ohos.app.ability.abilityManager | Added the description of error codes 201, 202, and 16000050, and adjusted the description of error code 401.| -| @ohos.app.ability.appManager | Added the description of error codes 201, 202, and 16000050, and adjusted the description of error code 401.| -| @ohos.app.ability.dataUriUtils | Added the description of error code 401. | -| @ohos.app.ability.errorManager | Added the description of error code 16000003. | -| @ohos.app.ability.missionManager | Added the description of error codes 201, 202, 16300001, 16300002, and 16000009, and adjusted the description of error code 401.| -| @ohos.app.ability.quickFixManager | Added the description of error codes 201, 202, 18500001, 18500002, and 18500008. | -| @ohos.app.ability.wantAgent | Added the description of error codes 16000007, 16000015, and 16000151. | -| application/AbilityDelegator | Added the description of error codes 16000001, 16000002, 16000004, 16000005, 16000006, 16000008, 16000009, 16000010, 16000011, 16000050, 16000053, 16000055, 16200001, and 16000100.| -| application/ApplicationContext | Added the description of error codes 16000011 and 16000050. | -| application/Context | Added the description of error codes 201, 202, and 401. | -| application/ServiceExtensionContext | Added the description of error codes 201, 202, 16000001, 16000002, 16000004, 16000005, 16000006, 16000008, 16000009, 16000010, 16000011, 16000050, 16000053, 16000055, and 16200001.| -| application/UIAbilityContext | Added the description of error codes 201, 16000001, 16000002, 16000004, 16000005, 16000006, 16000008, 16000009, 16000010, 16000011, 16000050, 16000053, 16000055, 16200001, and 16000100.| -| @ohos.app.form.formHost | Added the description of error codes 201, 202, 16500050, 16500060, 16501000, 16501001, and 16501003, and adjusted the description of error code 401.| -| @ohos.app.form.formProvider | Added the error codes 202, 16500050, 16500060, 16500100, 16501000, 16501001, 16501002, and 16501003, and adjusted the description of error code 401.| -| application/FormExtensionContext | Added the description of error codes 202, 401, 16500050, 16500100, 16500101, and 16501000.| diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.12.2/changelog-notification.md b/en/release-notes/changelogs/OpenHarmony_3.2.12.2/changelog-notification.md deleted file mode 100644 index 6912ea1b5e419a71e017f54e91202ff5570f2477..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.12.2/changelog-notification.md +++ /dev/null @@ -1,21 +0,0 @@ -# Notification Subsystem Changelog - -Compared with OpenHarmony 3.2 Release, OpenHarmony 3.2.12.2 provides more detailed error code information for the APIs of the notification subsystem. - -## cl.notification.1 Added and Optimized API Error Code Description - -The error code description and all error codes that may be returned by the APIs are commented out. This helps developers control the error process more accurately. - -**Change Impact** - -The external declaration of the JS APIs of API version 9 is affected, but the API functionalities are not affected. You can determine whether to adapt to the JS APIs. - -**Key API/Component Changes** - -The comments of the following modules are updated. For details, see the corresponding external API declaration and API development guide. - -| Module | Major Change | -| --------------------------- | ------------------------------------------------------------ | -| @ohos.commonEventManager | Added the description of error codes 801, 1500007, and 1500008. | -| @ohos.notificationManager | Added the description of error codes 201, 202, 1600001, 1600002, 1600003, 1600004, 1600005, 1600007, 1600008, 1600009, 1600010, and 17700001, and adjusted the description of error code 401.| -| @ohos.notificationSubscribe | Added the description of error codes 201, 202, 1600001, 1600002, 1600003, 1600007, 1600008, and 17700001, and adjusted the description of error code 401.| diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-account_os_account.md b/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-account_os_account.md deleted file mode 100644 index c921c58756ee0d38d61254ae8fe2952aca708b80..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-account_os_account.md +++ /dev/null @@ -1,105 +0,0 @@ -# Account Subsystem ChangeLog - -## cl.account_os_account.1 Change of Definition and Return Mode of Error Codes - -To solve the issues that error code definitions of the account subsystem APIs were inconsistent and that the return mode of the error codes did not comply with relevant specifications of OpenHarmony, the following changes are made and take effect in API version 9 and later: - -- Added the following unified error code definitions: - - [Account Error Codes](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/errorcodes/errorcode-account.md) - - [App Account Error Codes](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/errorcodes/errorcode-account.md) - -- Returned an error code in either of the following ways, according to the API type: - - Asynchronous API: An error message is returned via **AsyncCallback** or the **error** object of **Promise**. An error message related to the parameter type or quantity is returned via an exception. - - Synchronous API: An error message is returned via an exception. - -**Change Impacts** - -The application developed based on earlier versions needs to adapt the method for returning API error information. Otherwise, the original service logic will be affected. - -**Key API/Component Changes** - -The mentioned changes involve the following APIs: - - class AccountManager - - activateOsAccount(localId: number, callback: AsyncCallback<void>): void; - - removeOsAccount(localId: number, callback: AsyncCallback<void>): void; - - setOsAccountConstraints(localId: number, constraints: Array<string>, enable: boolean, callback: AsyncCallback<void>): void; - - setOsAccountName(localId: number, localName: string, callback: AsyncCallback<void>): void; - - queryMaxOsAccountNumber(callback: AsyncCallback<number>): void; - - queryAllCreatedOsAccounts(callback: AsyncCallback<Array<OsAccountInfo>>): void; - - createOsAccount(localName: string, type: OsAccountType, callback: AsyncCallback<OsAccountInfo>): void; - - createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo, callback: AsyncCallback<OsAccountInfo>): void; - - queryOsAccountById(localId: number, callback: AsyncCallback<OsAccountInfo>): void; - - getOsAccountProfilePhoto(localId: number, callback: AsyncCallback<string>): void; - - setOsAccountProfilePhoto(localId: number, photo: string, callback: AsyncCallback<void>): void; - - on(type: 'activate' | 'activating', name: string, callback: Callback<number>): void; - - off(type: 'activate' | 'activating', name: string, callback?: Callback<number>): void; - - isMainOsAccount(callback: AsyncCallback<boolean>): void; - - queryOsAccountConstraintSourceTypes(localId: number, constraint: string, callback: AsyncCallback<Array<ConstraintSourceTypeInfo>>): void; - - class UserAuth - - constructor(); - - getVersion(): number; - - getAvailableStatus(authType: AuthType, authTrustLevel: AuthTrustLevel): number; - - getProperty(request: GetPropertyRequest, callback: AsyncCallback<ExecutorProperty>): void; - - setProperty(request: SetPropertyRequest, callback: AsyncCallback<number>): void; - - auth(challenge: Uint8Array, authType: AuthType, authTrustLevel: AuthTrustLevel, callback: IUserAuthCallback): Uint8Array; - - authUser(userId: number, challenge: Uint8Array, authType: AuthType, authTrustLevel: AuthTrustLevel, callback: IUserAuthCallback): Uint8Array; - - cancelAuth(contextID: Uint8Array): number; - - class PINAuth - - constructor(); - - registerInputer(inputer: IInputer): boolean; - - unregisterInputer(authType: AuthType): void; - - class UserIdentityManager - - constructor(); - - openSession(callback: AsyncCallback<Uint8Array>): void; - - addCredential(credentialInfo: CredentialInfo, callback: IIdmCallback): void; - - updateCredential(credentialInfo: CredentialInfo, callback: IIdmCallback): void; - - closeSession(): void; - - cancel(challenge: Uint8Array): number; - - delUser(token: Uint8Array, callback: IIdmCallback): void; - - delCred(credentialId: Uint8Array, token: Uint8Array, callback: IIdmCallback): void; - - getAuthInfo(callback: AsyncCallback<Array<EnrolledCredInfo>>): void; - - interface IInputData - - onSetData: (authSubType: AuthSubType, data: Uint8Array) => void; - -**Adaptation Guide** - -The following uses **activateOsAccount** as an example to illustrate the error information processing logic of an asynchronous API: - -```ts -import account_osAccount from "@ohos.account.osAccount" -let accountMgr = account_osAccount.getAccountManager() -let callbackFunc = (err) => { - if (err != null) { // Handle the business error. - console.log("account_osAccount failed, error: " + JSON.stringify(err)); - } else { - console.log("account_osAccount successfully"); - } -} -try { - accountMgr.activateOsAccount("100", callbackFunc); -} catch (err) { // Process the error that is related to the parameter type. - console.log("account_osAccount failed for incorrect parameter type, error: " + JSON.stringify(err)); -} -try { - accountMgr.activateOsAccount(); -} catch (err) { // Process the error that is related to the parameter quantity. - console.log("account_osAccount failed for incorrect parameter number, error: " + JSON.stringify(err)); -} -``` - -The following uses **registerInputer** as an example to illustrate the error information processing logic of a synchronous API: - -```ts -import account_osAccount from "@ohos.account.osAccount" -let pinAuth = new account_osAccount.PINAuth() -try { - pinAuth.registerInputer({}) -} catch (err) { // Process the error that is related to the parameter type. - console.log("account_osAccount failed for incorrect parameter type, error: " + JSON.stringify(err)); -} -try { - pinAuth.registerInputer() -} catch (err) { // Process the error that is related to the parameter quantity. - console.log("account_osAccount failed for incorrect parameter number, error: " + JSON.stringify(err)); -} -``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-filemanagement.md b/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-filemanagement.md deleted file mode 100644 index d50844ea44b5a523ab4c8cbd4d57ece6d6840abd..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-filemanagement.md +++ /dev/null @@ -1,90 +0,0 @@ -# File Management Subsystem ChangeLog - -## cl.filemanagement.1 File I/O API Changes - -The return value of file I/O APIs of **file_api** does not contain the error code. The original APIs are deprecated, and new APIs are added. - -**Change Impacts** - -For applications developed based on earlier versions, pay attention to the iterative update of discarded APIs. The specifications of the new APIs are slightly adjusted. Pay attention to the usage of the new APIs. - -**Key API/Component Changes** - -For the adaptation to the unified API exception handling mode, related file I/O APIs are deprecated, and corresponding new APIs are added. Original APIs are stored in **@ohos.fileio**, and the new ones are stored in **@ohos.file.fs**. The newly added APIs support unified error code handling specifications and function the same as the original APIs. The parameters are slightly adjusted. - -| Module | Method/Attribute/Enumeration/Constant | Change Type| -| ------------- | ------------------------------------------------------------ | -------- | -| @ohos.fileio | **function** open(path: string, flags?: number, mode?: number, callback?: AsyncCallback): void \| Promise; | Deprecated | -| @ohos.fileio | **function** openSync(path: string, flags?: number, mode?: number): number; | Deprecated | -| @ohos.file.fs | **function** open(path: string, mode?: number, callback?: AsyncCallback): void \| Promise; | Added | -| @ohos.file.fs | **function** openSync(path: string, mode?: number): File; | Added | -| @ohos.fileio | **function** read(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; position?: number; }, callback?: AsyncCallback): void \| Promise; | Deprecated | -| @ohos.fileio | **function** readSync(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; position?: number; }): number; | Deprecated | -| @ohos.file.fs | **function** read(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; }, callback?: AsyncCallback): void \| Promise; | Added | -| @ohos.file.fs | **function** readSync(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; }): number; | Added | -| @ohos.fileio | **function** stat(path: string, callback?: AsyncCallback): void \| Promise; | Deprecated | -| @ohos.fileio | **function** statSync(path: string): Stat; | Deprecated | -| @ohos.fileio | **function** fstat(fd: number, callback?: AsyncCallback): void \| Promise; | Deprecated | -| @ohos.fileio | **function** fstatSync(fd: number): Stat; | Deprecated | -| @ohos.file.fs | **function** stat(file: string \| number, callback?: AsyncCallback): void \| Promise; | Added | -| @ohos.file.fs | **function** statSync(file: string \| number): Stat; | Added | -| @ohos.fileio | **function** truncate(path: string, len?: number, callback?: AsyncCallback): void \| Promise; | Deprecated | -| @ohos.fileio | **function** truncateSync(path: string, len?: number): void; | Deprecated | -| @ohos.fileio | **function** ftruncate(fd: number, len?: number, callback?: AsyncCallback): void \| Promise; | Deprecated | -| @ohos.fileio | **function** ftruncateSync(fd: number, len?: number): void; | Deprecated | -| @ohos.file.fs | **function** truncate(file: string \| number, len?: number, callback?: AsyncCallback): void \| Promise; | Added | -| @ohos.file.fs | **function** truncateSync(file: string \| number, len?: number): void; | Added | -| @ohos.fileio | **function** write(fd: number, buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }, callback?: AsyncCallback): void \| Promise; | Deprecated | -| @ohos.fileio | **function** writeSync(fd: number, buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }): number; | Deprecated | -| @ohos.file.fs | **function** write(fd: number, buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; encoding?: string; }, callback?: AsyncCallback): void \| Promise; | Added | -| @ohos.file.fs | **function** writeSync(fd: number, buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; encoding?: string; }): number; | Added | - -**Adaptation Guide** - -The original APIs use **@ohos.fileio**, which is imported as follows: - -```js -import fileio from '@ohos.fileio'; -``` - -The new APIs use **@ohos.file.fs**, which is imported as follows: - -```js -import fs from '@ohos.file.fs'; -``` - -In addition, exception handling needs to be adapted. Sample code for synchronous API exception handling is as follows: -```js -import fs from '@ohos.file.fs' - -try { - let file = fs.openSync(path, fs.OpenMode.READ_ONLY); -} catch (err) { - console.error("openSync errCode:" + err.code + ", errMessage:" + err.message); -} -``` -Sample code for handling exceptions of the **promise** method of an asynchronous API: -```js -import fs from '@ohos.file.fs' - -try { - let file = await fs.open(path, fs.OpenMode.READ_ONLY); -} catch (err) { - console.error("open promise errCode:" + err.code + ", errMessage:" + err.message); -} -``` - -Sample code for handling exceptions of the **callback** method of an asynchronous API: -```js -import fs from '@ohos.file.fs' - -try { - fs.open(path, fs.OpenMode.READ_ONLY, function(e, file){ // Asynchronous thread (such as system call) errors are obtained from the callback. - if (e) { - console.error("open in async errCode:" + e.code + ", errMessage:" + e.message); - } - }); -} catch (err) {// Errors (such as invalid parameters) of the main thread are obtained through try catch. - console.error("open callback errCode:" + err.code + ", errMessage:" + err.message); -} -``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-request.md b/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-request.md deleted file mode 100644 index fcdddaf40cfed2818c196e98da66ecae758b2e16..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-request.md +++ /dev/null @@ -1,108 +0,0 @@ -# Upload and Download Subsystem ChangeLog - -Compared with OpenHarmony 3.2 Beta3, OpenHarmony 3.2.8.1 has the following changes in its upload and download subsystem: - -## cl.request.1 Changes of Error Code Definitions and Some API Names - -- The processing of the [upload and download error codes](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/errorcodes/errorcode-request.md) is added to the upload and download APIs. -- An error message is returned via **AsyncCallback** or the **error** object of **Promise**. An error message related to the parameter type or quantity is returned via an exception. -- Some APIs need to be replaced with new APIs, and the parameters remain unchanged. - -**Change Impacts** - -The application developed based on earlier versions needs to adapt the method for returning API error information. Otherwise, the original service logic will be affected. - -**Key API/Component Changes** - -| Module | Class | Method/Attribute/Enumeration/Constant | Change Type| -| -------------- | -------------------------- | ------------------------------------------------------------ | -------- | -| ohos.request | request | EXCEPTION_PERMISSION | Added | -| ohos.request | request | EXCEPTION_PARAMCHECK | Added | -| ohos.request | request | EXCEPTION_UNSUPPORTED | Added | -| ohos.request | request | EXCEPTION_FILEIO | Added | -| ohos.request | request | EXCEPTION_FILEPATH | Added | -| ohos.request | request | EXCEPTION_SERVICE | Added | -| ohos.request | request | EXCEPTION_OTHERS | Added | -| ohos.request | request | ERROR_OFFLINE | Added | -| ohos.request | request | ERROR_UNSUPPORTED_NETWORK_TYPE | Added | -| ohos.request | request | function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void; | Added | -| ohos.request | request | function downloadFile(context: BaseContext, config: DownloadConfig): Promise; | Added | -| ohos.request | request | function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; | Added | -| ohos.request | request | function uploadFile(context: BaseContext, config: UploadConfig): Promise; | Added | -| ohos.request | DownloadTask | delete(callback: AsyncCallback): void; | Added | -| ohos.request | DownloadTask | delete(): Promise; | Added | -| ohos.request | DownloadTask | suspend(callback: AsyncCallback): void; | Added | -| ohos.request | DownloadTask | suspend(): Promise; | Added | -| ohos.request | DownloadTask | restore(callback: AsyncCallback): void; | Added | -| ohos.request | DownloadTask | restore(): Promise; | Added | -| ohos.request | DownloadTask | getTaskInfo(callback: AsyncCallback): void; | Added | -| ohos.request | DownloadTask | getTaskInfo(): Promise; | Added | -| ohos.request | DownloadTask | getTaskMimeType(callback: AsyncCallback): void; | Added | -| ohos.request | DownloadTask | getTaskMimeType(): Promise; | Added | -| ohos.request | UploadTask | delete(callback: AsyncCallback): void; | Added | -| ohos.request | UploadTask | delete(): Promise; | Added | -| ohos.request | request | function download(config: DownloadConfig, callback: AsyncCallback): void;
Substitute API: function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void;| Deprecated | -| ohos.request | request | function download(config: DownloadConfig): Promise;
Substitute API: function downloadFile(context: BaseContext, config: DownloadConfig): Promise; | Deprecated | -| ohos.request | request | function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void;
Substitute API: function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void; | Deprecated | -| ohos.request | request | function download(context: BaseContext, config: DownloadConfig): Promise;
Substitute API: function downloadFile(context: BaseContext, config: DownloadConfig): Promise; | Deprecated | -| ohos.request | request | function upload(config: UploadConfig, callback: AsyncCallback): void;
Substitute API: function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; | Deprecated | -| ohos.request | request | function upload(config: UploadConfig): Promise;
Substitute API: function uploadFile(context: BaseContext, config: UploadConfig): Promise; | Deprecated | -| ohos.request | request | function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void;
Substitute API: function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; | Deprecated | -| ohos.request | request | function upload(context: BaseContext, config: UploadConfig): Promise;
Substitute API: function uploadFile(context: BaseContext, config: UploadConfig): Promise; | Deprecated | -| ohos.request | DownloadTask | remove(callback: AsyncCallback): void;
Substitute API: delete(callback: AsyncCallback): void | Deprecated | -| ohos.request | DownloadTask | remove(): Promise;
Substitute API: delete(): Promise; | Deprecated | -| ohos.request | DownloadTask | pause(callback: AsyncCallback): void;
Substitute API: suspend(callback: AsyncCallback): void; | Deprecated | -| ohos.request | DownloadTask | pause(): Promise;
Substitute API: suspend(): Promise; | Deprecated | -| ohos.request | DownloadTask | resume(callback: AsyncCallback): void;
Substitute API: restore(callback: AsyncCallback): void; | Deprecated | -| ohos.request | DownloadTask | resume(): Promise;
Substitute API: restore(): Promise; | Deprecated | -| ohos.request | DownloadTask | query(callback: AsyncCallback): void;
Substitute API: getTaskInfo(callback: AsyncCallback): void; | Deprecated | -| ohos.request | DownloadTask | query(): Promise;
Substitute API: getTaskInfo(): Promise; | Deprecated | -| ohos.request | DownloadTask | queryMimeType(callback: AsyncCallback): void;
Substitute API: getTaskMimeType(callback: AsyncCallback): void; | Deprecated | -| ohos.request | DownloadTask | queryMimeType(): Promise;
Substitute API: getTaskMimeType(): Promise; | Deprecated | -| ohos.request | UploadTask | remove(callback: AsyncCallback): void;
Substitute API: delete(callback: AsyncCallback): void; | Deprecated | -| ohos.request | UploadTask | remove(): Promise;
Substitute API: delete(): Promise; | Deprecated | -| system.request | UploadResponse | code | Deprecated | -| system.request | UploadResponse | data | Deprecated | -| system.request | UploadResponse | headers | Deprecated | -| system.request | DownloadResponse | token | Deprecated | -| system.request | OnDownloadCompleteResponse | uri | Deprecated | -| system.request | RequestFile | filename | Deprecated | -| system.request | RequestFile | name | Deprecated | -| system.request | RequestFile | uri | Deprecated | -| system.request | RequestFile | type | Deprecated | -| system.request | RequestData | name | Deprecated | -| system.request | RequestData | value | Deprecated | -| system.request | UploadRequestOptions | url | Deprecated | -| system.request | UploadRequestOptions | data | Deprecated | -| system.request | UploadRequestOptions | files | Deprecated | -| system.request | UploadRequestOptions | header | Deprecated | -| system.request | UploadRequestOptions | description | Deprecated | -| system.request | UploadRequestOptions | success | Deprecated | -| system.request | UploadRequestOptions | fail | Deprecated | -| system.request | UploadRequestOptions | complete | Deprecated | -| system.request | OnDownloadCompleteOptions | token | Deprecated | -| system.request | OnDownloadCompleteOptions | success | Deprecated | -| system.request | OnDownloadCompleteOptions | fail | Deprecated | -| system.request | OnDownloadCompleteOptions | complete | Deprecated | -| system.request | Request | static upload(options: UploadRequestOptions): void; | Deprecated | -| system.request | Request | static download(options: DownloadRequestOptions): void; | Deprecated | -| system.request | Request | static onDownloadComplete(options: OnDownloadCompleteOptions): void; | Deprecated | - - -**Adaptation Guide** - -The following uses **downloadFile** as an example to show how it is called in the new version: - -```ts -try { - request.downloadFile(globalThis.abilityContext, { url: 'https://xxxx/xxxxx.hap', - filePath: 'xxx/xxxxx.hap'}, (err, data) => { - if (err) { - console.error('Failed to request the download. Cause: ' + JSON.stringify(err)); - return; - } - }); -} catch (err) { - console.log("downloadFile callback fail." + "errCode:" + err.code + ",errMessage:" + err.message); -} -``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.2/changelog-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_3.2.8.2/changelog-bundlemanager.md deleted file mode 100644 index 3ebe7bc6878e2b63bbadc721606866342a506cee..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.2/changelog-bundlemanager.md +++ /dev/null @@ -1,761 +0,0 @@ -# Bundle Manager Subsystem ChangeLog - -## cl.bundlemanager.1 Bundle Manager API Changes -The bundle manager APIs use service logic return values to indicate the error information, which does not comply with the API error code specifications of OpenHarmony. APIs in API version 8 and earlier are deprecated. Replace them with APIs in API version 9 instead. - -**Change Impacts** - -The application developed based on the SDK versions of OpenHarmony 3.2.8.2 and later needs to adapt the modules and APIs (version 9) and their method for returning API error information. Otherwise, the original service logic will be affected. - -**Key API/Component Changes** - -The new APIs are classified by module. The original **d.ts** file is divided into multiple ones. You can import the **d.ts** files as required. The newly added APIs support unified error code handling specifications and function the same as the original APIs. APIs whose functions are changed or added are listed separately. - -For adaptation to the unified API exception handling mode, bundle manager APIs (version 8 and earlier) are deprecated (original APIs in the following table) and corresponding new APIs (version 9) in the following table are added. - -| Original API (Deprecated) | New API (Added) | -| ------------------------------------ | ------------------------------------------------------------ | -| @ohos.bundle.d.ts | [@ohos.bundle.bundleManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleManager.d.ts) | -| @ohos.bundle.d.ts | [@ohos.bundle.freeInstall.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.freeInstall.d.ts) | -| @ohos.bundle.d.ts | [@ohos.bundle.installer.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.installer.d.ts) | -| @ohos.bundle.innerBundleManager.d.ts | [@ohos.bundle.launcherBundleManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.launcherBundleManager.d.ts) | -| @ohos.bundle.innerBundleManager.d.ts | [@ohos.bundle.bundleMonitor.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleMonitor.d.ts) | -| @ohos.bundle.defaultAppManager.d.ts | [@ohos.bundle.defaultAppManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.defaultAppManager.d.ts) | -| @ohos.distributedBundle.d.ts | [@ohos.bundle.distributedBundleManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.distributedBundleManager.d.ts) | -| N/A | [@ohos.bundle.appControl.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.appControl.d.ts) | -| @system.package.d.ts | N/A | - -**Adaptation Guide** -1. Call the bundle manager query API. -``` -import bundle form '@ohos.bundle.bundleManager' -``` -2. Call the bundle manager installation and uninstallation API. -``` -import installer form '@ohos.bundle.installer' -``` -3. Call the bundle manager installation-free API. -``` -import freeInstall form '@ohos.bundle.freeInstall' -``` -4. Call the bundle manager launcher APIs. -``` -import launcherBundleManager form '@ohos.bundle.launcherBundleManager' -import bundleMonitor form '@ohos.bundle.bundleMonitor' -``` -6. Call the bundle manager API for the default application. -``` -import defaultAppManager form '@ohos.bundle.defaultAppManager' -``` -7. Call the distributed bundle manager API. -``` -import distributedBundle form '@ohos.bundle.distributedBundle' -``` -In addition, exception handling is needed. For details, see the API reference for the new APIs. - -## cl.bundlemanager.1 Bundle Manager API Structure Changes -The bundle manager APIs use service logic return values to indicate the error information, which does not comply with the API error code specifications of OpenHarmony. The structures of APIs in API version 8 and earlier are deprecated. Use the structures of APIs in API version 9 instead. - -**Change Impacts** - -The application developed based on the SDK versions of OpenHarmony 3.2.8.2 and later needs to adapt new structures. Otherwise, the original service logic will be affected. The export function of original level-2 modules will also be deprecated. Instead, the level-2 modules' export function of new APIs will be used, and new level-1 d.ts modules are imported. - -**Key API/Component Changes** - -The structures of APIs in API version 8 and earlier are sorted out and deprecated, and those of new APIs in API version 9 are added. The following table lists the comparison before and after the change. Some structures are combined. For example, replace **moduleInfo.d.ts** with **hapModuleInfo.d.ts** and **customizeData.d.ts** with **metadata.d.ts**. The structures' functions are the same as those of the original ones. Structures whose attributes are changed or added are listed separately. -| Original Structure (Deprecated) | New Structure (Added) | -| -------------------------------- | ------------------------------------------------------------ | -| bundle/abilityInfo.d.ts | [bundleManager/AbilityInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/AbilityInfo.d.ts) | -| bundle/applicationInfo.d.ts | [bundleManager/ApplicationInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts) | -| bundle/bundleInfo.d.ts | [bundleManager/BundleInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundleInfo.d.ts) | -| bundle/bundleInstaller.d.ts | [@ohos.bundle.installer.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.installer.d.ts) | -| bundle/bundleStatusCallback.d.ts | [@ohos.bundle.bundleMonitor.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleMonitor.d.ts) | -| bundle/customizeData.d.ts | [bundleManager/Metadata.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/Metadata.d.ts) | -| bundle/dispatchInfo.d.ts | [bundleManager/DispatchInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/DispatchInfo.d.ts) | -| bundle/elementName.d.ts | [bundleManager/ElementName.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ElementName.d.ts) | -| bundle/extensionAbilityInfo.d.ts | [bundleManager/ExtensionAbilityInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ExtensionAbilityInfo.d.ts) | -| bundle/hapModuleInfo.d.ts | [bundleManager/HapModuleInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) | -| bundle/launcherAbilityInfo.d.ts | [bundleManager/LauncherAbilityInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/LauncherAbilityInfo.d.ts) | -| bundle/metadata.d.ts | [bundleManager/Metadata.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/Metadata.d.ts) | -| bundle/moduleInfo.d.ts | [bundleManager/HapModuleInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) | -| bundle/PermissionDef.d.ts | [bundleManager/PermissionDef.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/PermissionDef.d.ts) | -| bundle/remoteAbilityInfo.d.ts | [bundleManager/RemoteAbilityInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/RemoteAbilityInfo.d.ts) | -| bundle/shortcutInfo.d.ts | [bundleManager/ShortcutInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ShortcutInfo.d.ts) | - -**Adaptation Guide** -1. Replace the code of original structures with the code of new ones. -2. Deprecate the export function of original level-2 modules. Instead, use the level-2 modules' export function of new APIs, and import new level-1 d.ts modules. - -## cl.bundlemanager.3 Bundle Manager Query API Changes - -Bundle manager query APIs are changed as follows: APIs of version 8 and earlier in **@ohos.bundle** are deprecated, and APIs of version 9 in **@ohos.bundle** are changed to **@ohos.bundle.bundleManager**, **@ohos.bundle.freeInstall**, and **@ohos.bundle.installer**. Most deprecated APIs are added to **@ohos.bundle.bundleManager** and changed to system APIs, and the exception handling capability is added. - -API call mode: APIs are now used by the **@ohos.bundle.bundleManager**, **@ohos.bundle.freeInstall**, and **@ohos.bundle.installer** modules, instead of the **@ohos.bundle** module. - -The system capability of the **@ohos.bundle.bundleManager** and **@ohos.bundle.installer** modules is **SystemCapability.BundleManager.BundleFramework.Core**, and that of **@ohos.bundle.freeInstall** is **SystemCapability.BundleManager.BundleFramework.FreeInstall**. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. The applications that use the APIs of version 9 need to adapt new modules and APIs. APIs of version 9 in **@ohos.bundle** are moved to the new **@ohos.bundle.bundleManager.d.ts**, **@ohos.bundle.freeInstall**, and **@ohos.bundle.installer** files. - -**Key API/Component Changes** - -The following table lists the deprecated and changed APIs involved in **@ohos.bundle.d.ts**. The APIs not listed in the table have no change in API names and input parameters, and they have new exception handling and import modules. The APIs can be directly used after being imported to **@ohos.bundle.bundleManager.d.ts**, **@ohos.bundle.freeInstall**, and **@ohos.bundle.installer**. The APIs listed in the table are changed in API version 9, and those marked with "N/A" are deprecated in API version 9. - -| Original API (Deprecated) | New API (Changed or Added) | System API| New File Name | -| ---------------------------- | ---------------------------- | --------- | ------------------------------- | -| BundleFlag | BundleFlag | No | @ohos.bundle.bundleManager.d.ts | -| N/A | ApplicationFlag | Yes | @ohos.bundle.bundleManager.d.ts | -| N/A | AbilityFlag | Yes | @ohos.bundle.bundleManager.d.ts | -| ExtensionFlag | ExtensionAbilityFlag | Yes | @ohos.bundle.bundleManager.d.ts | -| ColorMode | N/A | No | N/A | -| GrantStatus | PermissionGrantState | No | @ohos.bundle.bundleManager.d.ts | -| AbilityType | AbilityType | No | @ohos.bundle.bundleManager.d.ts | -| AbilitySubType | N/A | No | N/A | -| DisplayOrientation | DisplayOrientation | No | @ohos.bundle.bundleManager.d.ts | -| LaunchMode | LaunchType | No | @ohos.bundle.bundleManager.d.ts | -| ExtensionAbilityType | ExtensionAbilityType | Yes | @ohos.bundle.bundleManager.d.ts | -| BundleOptions | N/A | No | N/A | -| InstallErrorCode | N/A | No | N/A | -| UpgradeFlag | UpgradeFlag | Yes | @ohos.bundle.freeInstall.d.ts | -| SupportWindowMode | SupportWindowMode | No | @ohos.bundle.bundleManager.d.ts | -| getBundleInfo | getBundleInfo | Yes | @ohos.bundle.bundleManager.d.ts | -| getBundleInstaller | getBundleInstaller | Yes | @ohos.bundle.installer.d.ts | -| getAbilityInfo | queryAbilityInfo | Yes | @ohos.bundle.bundleManager.d.ts | -| getApplicationInfo | getApplicationInfo | Yes | @ohos.bundle.bundleManager.d.ts | -| queryAbilityByWant | queryAbilityInfo | Yes | @ohos.bundle.bundleManager.d.ts | -| getAllBundleInfo | getAllBundleInfo | Yes | @ohos.bundle.bundleManager.d.ts | -| getAllApplicationInfo | getAllApplicationInfo | Yes | @ohos.bundle.bundleManager.d.ts | -| getNameForUid | getBundleNameByUid | Yes | @ohos.bundle.bundleManager.d.ts | -| getBundleArchiveInfo | getBundleArchiveInfo | Yes | @ohos.bundle.bundleManager.d.ts | -| getLaunchWantForBundle | getLaunchWantForBundle | Yes | @ohos.bundle.bundleManager.d.ts | -| cleanBundleCacheFiles | cleanBundleCacheFiles | Yes | @ohos.bundle.bundleManager.d.ts | -| setApplicationEnabled | setApplicationEnabled | Yes | @ohos.bundle.bundleManager.d.ts | -| setAbilityEnabled | setAbilityEnabled | Yes | @ohos.bundle.bundleManager.d.ts | -| queryExtensionAbilityInfos | queryExtensionAbilityInfo | Yes | @ohos.bundle.bundleManager.d.ts | -| getPermissionDef | getPermissionDef | Yes | @ohos.bundle.bundleManager.d.ts | -| getAbilityLabel | getAbilityLabel | Yes | @ohos.bundle.bundleManager.d.ts | -| getAbilityIcon | getAbilityIcon | Yes | @ohos.bundle.bundleManager.d.ts | -| isAbilityEnabled | isAbilityEnabled | Yes | @ohos.bundle.bundleManager.d.ts | -| isApplicationEnabled | isApplicationEnabled | Yes | @ohos.bundle.bundleManager.d.ts | -| setModuleUpgradeFlag | setHapModuleUpgradeFlag | Yes | @ohos.bundle.freeInstall.d.ts | -| isModuleRemovable | isHapModuleRemovable | Yes | @ohos.bundle.freeInstall.d.ts | -| getBundlePackInfo | getBundlePackInfo | Yes | @ohos.bundle.freeInstall.d.ts | -| getDispatcherVersion | getDispatchInfo | Yes | @ohos.bundle.freeInstall.d.ts | -| getProfileByAbility | getProfileByAbility | No | @ohos.bundle.bundleManager.d.ts | -| getProfileByExtensionAbility | getProfileByExtensionAbility | No | @ohos.bundle.bundleManager.d.ts | -| setDisposedStatus | setDisposedStatus | Yes | @ohos.bundle.appControl.d.ts | -| getDisposedStatus | getDisposedStatus | Yes | @ohos.bundle.appControl.d.ts | -| N/A | deleteDisposedStatus | Yes | @ohos.bundle.appControl.d.ts | -| getBundleInfoSync | getBundleInfoSync | Yes | @ohos.bundle.bundleManager.d.ts | -| getApplicationInfoSync | getApplicationInfoSync | Yes | @ohos.bundle.bundleManager.d.ts | -| N/A | getBundleInfoForSelf | No | @ohos.bundle.bundleManager.d.ts | - -**Adaptation Guide** - -Replace the original APIs with new ones of version 9 and import related modules. - -Old import module: -``` -import bundle form '@ohos.bundle' -``` -New import module: -``` -import bundle form '@ohos.bundle.bundleManager' -import freeInstall form '@ohos.bundle.freeInstall' -import installer form '@ohos.bundle.installer' -import appControl form '@ohos.bundle.appControl' -``` - -## cl.bundlemanager.4 BundleInfo Structure Changes - -All **bundle/bundleInfo.d.ts** fields in the bundle manager are deprecated. [bundle/bundleInfo.d.ts]((https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundle/bundleInfo.d.ts)) is changed to [bundleManager/BundleInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundleInfo.d.ts), involving field type changes. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. The applications that use the APIs of version 9 need to adapt new modules and APIs. When a level-2 module is used to export **BundleInfo**, the **@ohos.bundle.bundleManager** module needs to be imported. - -**Key API/Component Changes** - -The following table describes the changed fields in the **BundleInfo** structure. After other fields are deprecated in **bundle/bundleInfo.d.ts**, they have corresponding values in the new **[bundleManager/BundleInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundleInfo.d.ts)**. If corresponding fields do not exist, the fields have been deprecated in API version 9. - -| Deprecated | Added or Changed in API Version 9 | Type | -| --------------------- | --------------------- | ------------------------------------------ | -| type | N/A | string | -| appId | N/A | string | -| N/A | signatureInfo | SignatureInfo | -| uid | N/A | number | -| abilityInfos | N/A | Array\ | -| reqPermissions | N/A | Array | -| compatibleVersion | N/A | number | -| isCompressNativeLibs | N/A | boolean | -| entryModuleName | N/A | string | -| cpuAbi | N/A | string | -| isSilentInstallation | N/A | string | -| entryInstallationFree | N/A | boolean | -| reqPermissionStates | permissionGrantStates | Array\ | -| extensionAbilityInfo | N/A | Array\ | -| hapModuleInfos | hapModulesInfo | Array\ | - -The **SignatureInfo** structure is added to API version 9 as follows. - -| Field | Type | -| ----------- | ------ | -| appId | string | -| fingerprint | string | - -**Adaptation Guide** - -Use the **BundleInfo** structure of API version 9 for modules imported for bundle manager query. The following module needs to be imported when a level-2 module is used for export. - -``` -import bundle form '@ohos.bundle.bundleManager' -``` - -## cl.bundlemanager.5 ApplicationInfo Structure Changes -The **ApplicationInfo** structure is changed. The original **bundle/applicationInfo.d.ts** fields in the bundle manager are deprecated, and the file is changed from **bundle/applicationInfo.d.ts** to **bundleManager/ApplicationInfo.d.ts**, involving field type changes. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. The applications that use the APIs of version 9 need to adapt new modules and APIs. When a level-2 module is used to export **ApplicationInfo**, the **@ohos.bundle.bundleManager** module needs to be imported. - -**Key API/Component Changes** - -The following table describes the changed fields in the **ApplicationInfo** structure. After other fields are deprecated in **bundle/applicationInfo.d.ts**, they have corresponding values in the new [bundleManager/ApplicationInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts). If corresponding fields do not exist, the fields have been deprecated in API version 9. - -| Deprecated | Added or Changed in API Version 9| Type | -| ---------------- | -------------- | ---------------------------------- | -| systemApp | N/A | boolean | -| labelId | N/A | string | -| labelIndex | labelId | number | -| iconId | N/A | string | -| iconIndex | iconId | number | -| supportedModes | N/A | number | -| moduleSourceDirs | N/A | Array\ | -| moduleInfos | N/A | Array\ | -| metaData | N/A | Map\> | -| entityType | N/A | string | -| fingerprint | N/A | string | - -**Adaptation Guide** - -Use the **ApplicationInfo** structure of API version 9 for modules imported for bundle manager query. - - -## cl.bundlemanager.6 HapModuleInfo Structure Changes - -The **HapModuleInfo** structure is changed. The original **bundle/hapModuleInfo.d.ts** and **moduleInfo.d.ts** fields in the bundle manager are deprecated, and the files are changed to [bundleManager/HapModuleInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts), involving field type changes. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. The applications that use the APIs of version 9 need to adapt new modules and APIs. When a level-2 module is used to export **HapModuleInfo**, the **@ohos.bundle.bundleManager** module needs to be imported. - -**Key API/Component Changes** - -The following table describes the changed fields in the **HapModuleInfo** structure. After other fields are deprecated in **bundle/hapModuleInfo.d.ts**, they have corresponding values in the new **bundleManager/HapModuleInfo.d.ts** file. - -| Deprecated | Added or Changed in API Version 9 | Type | -| -------------------- | ---------------------- | ---------------------------- | -| abilityInfo | abilitiesInfo | Array | -| N/A | moduleSourceDir | string | -| backgroundImg | N/A | string | -| supportedModes | N/A | string | -| reqCapabilities | N/A | Array\ | -| moduleName | N/A | string | -| mainAbilityName | N/A | string | -| extensionAbilityInfo | extensionAbilitiesInfo | Array\ | - -**Adaptation Guide** - -Use the **HapModuleInfo** structure of API version 9 for modules imported for bundle manager query. - -## cl.bundlemanager.7 ModuleInfo Structure Changes - -The original **bundle/hapModuleInfo.d.ts** and **moduleInfo.d.ts** fields in the bundle manager are deprecated, and the files are changed to [bundleManager/HapModuleInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts), involving field changes. - -The **ModuleInfo** structure is deprecated and replaced by **HapModuleInfo** in [bundleManager/HapModuleInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts). - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. The applications that use the APIs of version 9 need to adapt new modules and APIs. The **ModuleInfo** structure is deprecated and replaced by **HapModuleInfo**. - -**Key API/Component Changes** - -The **ModuleInfo** structure is deprecated and replaced by **HapModuleInfo**. - -**Adaptation Guide** - -Use the **HapModuleInfo** structure of API version 9. - -## cl.bundlemanager.8 AbilityInfo Structure Changes - -The **AbilityInfo** structure is changed. The original **bundle/abilityInfo.d.ts** file is deprecated and changed to **bundleManager/AbilityInfo.d.ts**, involving field type changes. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. The applications that use the APIs of version 9 need to adapt new modules and APIs. - -**Key API/Component Changes** - -The following table lists the field changes in the **AbilityInfo** structure for the bundle manager. Fields that are not listed in the table exist in the new **AbilityInfo** structure after being deprecated. Fields marked with "N/A" have been deprecated in API version 9 and do not exist in the new **AbilityInfo** structure. - -| Deprecated | Added or Changed in API Version 9 | Type | -| ------------------ | ------------------ | --------------------- | -| launchMode | launchType | number | -| supportWindowMode | supportWindowModes | Array\ | -| targetAbility | N/A | string | -| backgroundModes | N/A | number | -| formEnabled | N/A | boolean | -| subType | N/A | AbilitySubType | -| deviceCapabilities | N/A | Array\ | -| metaData | N/A | Array\ | -| maxWindowRatio | N/A | number | -| minWindowRatio | N/A | number | -| maxWindowWidth | N/A | number | -| minWindowWidth | N/A | number | -| maxWindowHeight | N/A | number | -| minWindowHeight | N/A | number | -| N/A | windowSize | WindowSize | - -The fields of the new structure **WindowSize** of API version 9 are as follows. - -| Field | Type | -| :-------------: | :----: | -| maxWindowRatio | number | -| minWindowRatio | number | -| maxWindowWidth | number | -| minWindowWidth | number | -| maxWindowHeight | number | -| minWindowHeight | number | - -**Adaptation Guide** - -Use the **AbilityInfo** structure of API version 9. - -## cl.bundlemanager.9 BundleFlag Changes - -**BundleFlag** is changed to **BundleFlag**, **ApplicationFlag**, and **AbilityFlag** in **@ohos.bundle.bundleManager**. Different types of flags are passed based on the input parameters of new APIs. - -**Change Impacts** - -**BundleFlag** is changed to **BundleFlag**, **ApplicationFlag**, and **AbilityFlag** in **@ohos.bundle.bundleManager**. Different types of flags are passed based on the input parameters of new APIs. If **BundleFlag** of a version earlier than API version 9 is directly used, the query may fail. - -**Key API/Component Changes** - -**BundleFlag** in the original **@ohos.bundle** is deprecated and replaced by **BundleFlag**, **ApplicationFlag**, and **AbilityFlag** in the new **@ohos.bundle.bundleManager**. - -The following table describes **BundleFlag** of API version 9. - -| BundleFlag | Value | Description | -| ----------------------------------------- | ---------- | ------------------------------------------------------------ | -| GET_BUNDLE_INFO_DEFAULT | 0x00000000 | Obtains the default **BundleInfo**. The obtained **BundleInfo** does not contain **signatureInfo**, **hapModuleInfo**, **appInfo**, **reqPermissionDetails**, or **permissionGrantStates**.| -| GET_BUNDLE_INFO_WITH_APPLICATION | 0x00000001 | Obtains **appInfos** with the default **BundleInfo**. | -| GET_BUNDLE_INFO_WITH_HAP_MODULE | 0x00000002 | Obtains **hapModulesInfo** with the default **BundleInfo**. | -| GET_BUNDLE_INFO_WITH_ABILITY | 0x00000004 | Indicates whether **abilitiesInfo** is obtained with **hapModulesInfo**. This flag must be used together with **GET_BUNDLE_INFO_WITH_HAP_MODULE** and cannot be used independently.| -| GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY | 0x00000008 | Indicates whether **extensionAbilitiesInfo** is obtained with **hapModulesInfo**. This flag must be used together with **GET_BUNDLE_INFO_WITH_HAP_MODULE** and cannot be used independently.| -| GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION | 0x00000010 | Obtains **reqPermissionDetails** and **permissionGrantStates** with the default **BundleInfo**. | -| GET_BUNDLE_INFO_WITH_METADATA | 0x00000020 | Indicates whether the returned **ApplicationInfo**, **AbilityInfo**, and **ExtensionAbilityInfo** contain metadata. This flag cannot be used independently.| -| GET_BUNDLE_INFO_WITH_DISABLE | 0x00000040 | Obtains **BundleInfo** of a disabled application and disabled ability information in **abilitiesInfo**.| -| GET_BUNDLE_INFO_WITH_SIGNATURE_INFO | 0x00000080 | Obtains **signatureInfo** with the default **BundleInfo**. | - -The following table describes **ApplicationFlag** of API version 9. - -| ApplicationFlag | Value | Description | -| ------------------------------------ | ---------- | ------------------------------------------------------------ | -| GET_APPLICATION_INFO_DEFAULT | 0x00000000 | Obtains the default **ApplicationInfo**. The obtained **ApplicationInfo** does not contain permission or metadata information.| -| GET_APPLICATION_INFO_WITH_PERMISSION | 0x00000001 | Obtains **permissions** with the default **ApplicationInfo**. | -| GET_APPLICATION_INFO_WITH_METADATA | 0x00000002 | Obtains **metadata** with the default **ApplicationInfo**. | -| GET_APPLICATION_INFO_WITH_DISABLE | 0x00000004 | Obtains disabled application information. | - - -The following table describes **AbilityFlag** of API version 9. -| AbilityFlag | Value | Description | -| --------------------------------- | ---------- | ------------------------------------------------------------ | -| GET_ABILITY_INFO_DEFAULT | 0x00000000 | Obtains the default **AbilityInfo**. The obtained **AbilityInfo** does not contain permission, metadata, or disabled ability information.| -| GET_ABILITY_INFO_WITH_PERMISSION | 0x00000001 | Obtains **AbilityInfo** with permission information. | -| GET_ABILITY_INFO_WITH_APPLICATION | 0x00000002 | Obtains **AbilityInfo** with the **ApplicationInfo** structure. | -| GET_ABILITY_INFO_WITH_METADATA | 0x00000004 | Obtains **AbilityInfo** with metadata information. | -| GET_ABILITY_INFO_WITH_DISABLE | 0x00000008 | Obtains all **AbilityInfo**, including disabled abilities. | -| GET_ABILITY_INFO_ONLY_SYSTEM_APP | 0x00000010 | Obtains **AbilityInfo** for system applications. | - -**Adaptation Guide** - -Use various flags according to the called API in **@ohos.bundle.bundleManager.d.ts**. - -## cl.bundlemanager.10 ApplicationType Enumerated Value Changes in the Default Application Module -For the **@ohos.bundle.defaultApp** module, both API functions and usage remain unchanged, but only the enumerated values of **ApplicationType** are changed. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. The applications that use the APIs of version 9 need to adapt new enumerated values. - -**Key API/Component Changes** - -The enumerated values of **ApplicationType** are changed as follows. - -| ApplicationType| Added or Changed in API Version 9 | API Version 8 and Earlier| -| :-------------: | :-------------: | :--------: | -| BROWSER | "Web Browser" | "BROWSER" | -| IMAGE | "Image Gallery" | "IMAGE" | -| AUDIO | "Audio Player" | "AUDIO" | -| VIDEO | "Video Player" | "VIDEO" | -| PDF | "PDF Viewer" | "PDF" | -| WORD | "Word Viewer" | "WORD" | -| EXCEL | "Excel Viewer" | "EXCEL" | -| PPT | "PPT Viewer" | "PPT" | - -**Adaptation Guide** - -Import the default application module and call related APIs. - -``` -import defaultApp form '@ohos.bundle.defaultAppManager' -``` - -## cl.bundlemanager.11 Distributed Bundle Manager Changes -API exception handling is rectified. The distributed bundle manager module is changed. The original **@ohos.distributedBundle.d.ts** APIs are deprecated, and the **@ohos.distributedBundle.d.ts** file is changed to [@ohos.bundle.distributedBundleManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.distributedBundleManager.d.ts). The **getRemoteAbilityInfos** API is changed to **getRemoteAbilityInfo**. The export function of a level-2 module in the **RemoteAbilityInfo** structure can be used only after a new module is imported. - -**Change Impacts** - -Applications using APIs earlier than version 9 are not affected. The names of the distributed module and the **getRemoteAbilityInfos** API are changed. As a result, applications using APIs of version 9 may fail to be compiled using the new SDK. - -**Key API/Component Changes** - -All APIs in **@ohos.distributedBundle.d.ts** are deprecated. The **@ohos.bundle.distributedBundleManager.d.ts** file is added. The functions of some APIs are the same as those of the original ones. New APIs support exception handling. The API changes are as follows. - -| Deprecated | Added or Changed in API Version 9 | System API| -| --------------------- | -------------------- | --------- | -| getRemoteAbilityInfos | getRemoteAbilityInfo | Yes | - -**Adaptation Guide** - -Import a new distributed module. - -``` -import distributedBundle form '@ohos.bundle.distributedBundle' -``` - -## cl.bundlemanager.12 Installation-Free Module and API Changes -APIs support exception handling rectification. The installation-free module is moved from **@ohos.bundle.d.ts** to **@ohos.bundle.freeInstall.d.ts**, involving module and API changes. The system capability is **SystemCapability.BundleManager.BundleFramework.FreeInstall**. -1. The imported **@ohos.bundle** module needs to be changed to **@ohos.bundle.freeInstall**. -2. The **setModuleUpgradeFlag** API is changed to **setHapModuleUpgradeFlag**. -3. The **isModuleRemovable** API is changed to **isHapModuleRemovable**. -4. The **getDispatcher** API is changed to **getDispatchInfo**. - -**Change Impacts** - -Applications using APIs earlier than version 9 are not affected. Applications using APIs of version 9 will fail to be compiled. - -**Key API/Component Changes** - -The following table lists the installation-free API changes. For APIs not listed in the table, their names and usage are unchanged, but the module name is changed. - -| Deprecated | Added or Changed in API Version 9 | System API| -| -------------------- | ----------------------- | --------- | -| setModuleUpgradeFlag | setHapModuleUpgradeFlag | Yes | -| isModuleRemovable | isHapModuleRemovable | Yes | -| getDispatcher | getDispatchInfo | Yes | - -**Adaptation Guide** - -To use installation-free APIs, import a new module and modify the APIs according to their mappings. - -``` -import freeInstall from '@ohos.bundle.freeInstall' -``` - -## cl.bundlemanager.13 Installation-Free Structure Field Changes -The fields of the **DisPatchInfo**, **AbilityFormInfo**, **ModuleDistroInfo**, and **ModuleConfigInfo** structures are changed as follows: -1. The name of the **dispatchAPI** field in **DispatchInfo** is changed to [dispatchAPIVersion](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/DispatchInfo.d.ts), and the type is string, which is unchanged. The field indicates the version of the installation-free API. The meaning remains unchanged. -2. The type of the **supportDimensions** field in the **AbilityFormInfo** structure is changed from **Array\** to **Array\**. -3. The type of the **defaultDimension** field in the **AbilityFormInfo** structure is changed from **number** to **string**. -4. The **mainAbility** field is deprecated in the **ModuleDistroInfo** structure and moved to the **ModuleConfigInfo** structure. -5. The **mainAbility** field is added to the **ModuleConfigInfo** structure. - -**Change Impacts** - -Applications using APIs earlier than version 9 are not affected. The value type of certain fields in the structures is changed. As a result, applications using APIs of version 9 may fail to be compiled using the new SDK. - -**Key API/Component Changes** - -1. DispatchInfo - -| Deprecated | Added or Changed in API Version 9 | Type | -| ----------- | ------------------ | ------ | -| dispatchAPI | dispatchAPIVersion | string | - -2. AbilityFormInfo - -| Field | Type in API Version 9 | Original Type | -| ----------------- | -------------- | -------------- | -| supportDimensions | Array\ | Array\ | -| defaultDimension | string | number | - -3. ModuleDistroInfo - -| Field | Added or Changed in API Version 9| Type | -| ----------- | -------------- | ------ | -| mainAbility | N/A | string | - -4. MooduleConfigInfo - -| Field| Added or Changed in API Version 9| Type | -| ---- | -------------- | ------ | -| N/A | mainAbility | string | - -**Adaptation Guide** - -To use installation-free APIs, import a new module and modify the structures according to their mappings. - -``` -import freeInstall from '@ohos.bundle.freeInstall' -``` - -## cl.bundlemanager.14 Structure Changes -The structure **GrantStatus** is changed to **PermissionGrantState**. The enumeration type and values remain unchanged. - -**Change Impacts** - -Applications using APIs earlier than version 9 are not affected. The structure name is changed. As a result, applications using APIs of version 9 may fail to be compiled using the new SDK. - -**Key API/Component Changes** - -The **GrantStatus** structure indicating the authorization status is changed to **PermissionGrantState** in **@ohos.bundle.bundleManager.d.ts**. - -| Name | Value| -| ------------------ | ------ | -| PERMISSION_DENIED | -1 | -| PERMISSION_GRANTED | 0 | - -**Adaptation Guide** - -Import a new module and change the structure name to **PermissionGrantState**. - -``` -import bundle form '@ohos.bundle.bundleManager' -``` -## cl.bundlemanager.15 Bundle Manager ShortcutInfo Structure Field Changes -Fields in the **ShortcutInfo** structure of the bundle manager are changed. The **bundle/shortcutInfo.d.ts** fields are deprecated, and the file is changed to [bundleManager/ShortcutInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ShortcutInfo.d.ts). The **ShortcutInfo** and **ShortWant** structures are changed to system APIs. - -**Change Impacts** - -Applications using APIs earlier than version 9 are not affected. The value type of certain fields in the structures is changed. As a result, applications using APIs of version 9 may fail to be compiled using the new SDK. - -**Key API/Component Changes** - -The **ShortcutInfo** and **ShortcutWant** structures are involved. To use the level-2 module export function, import the new module **@ohos.bundle.launcherBundleManager**. -The following table lists the field changes of the **ShortcutInfo** structure. Fields that are not listed in the table still exist in API version 9. - -| Deprecated | Added or Changed in API Version 9| Type | -| -------------- | -------------- | ------- | -| disableMessage | N/A | string | -| isStatic | N/A | boolean | -| isHomeShortcut | N/A | boolean | -| isEnabled | N/A | boolean | -| disableMessage | N/A | boolean | - -The following table lists the field changes of the **ShortcutWant** structure. Fields that are not listed in the table still exist in API version 9. -| Deprecated | Added or Changed in API Version 9| Type | -| ----------- | -------------- | ------ | -| targetClass | targetAbility | string | - -**Adaptation Guide** - -To use installation-free APIs, import a new module and modify the structures according to their mappings. - -``` -import launcherBundleManager form '@ohos.bundle.launcherBundleManager' -``` - -## cl.bundlemanager.16 getBundleInstaller API Changes -The **getBundleInstaller** API of the bundle manager is moved from **@ohos.bundle.d.ts** to [@ohos.bundle.installer.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.installer.d.ts). -The system capability is **SystemCapability.BundleManager.BundleFramework.Core**. - -**Change Impacts** - -Applications using APIs earlier than version 9 are not affected. Applications that use APIs of version 9 need to adapt the new module and APIs. - -**Key API/Component Changes** -1. For **getBundleInstaller**, the import module is changed from **@ohos.bundle** to **@ohos.bundle.installer**. - -**Adaptation Guide** - -Import the new bundle manager installation module and call **getBundleInstaller**. - -``` -import installer form '@ohos.bundle.installer' -``` - -## cl.bundlemanager.17 Bundle Manager Installation API Changes -The bundle manager installation API is moved from **bundle/bundleInstaller.d.ts** to [@ohos.bundle.installer.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.installer.d.ts). The system capability is **SystemCapability.BundleManager.BundleFramework.Core**. - -**Change Impacts** - -Applications using APIs earlier than version 9 are not affected. Applications that use APIs of version 9 need to adapt the new module and APIs. - -**Key API/Component Changes** - -1. The exception handling capability is added to the **install**, **uninstall**, and **recover** APIs. The API names and input parameters remain unchanged, and only the module name is changed. -2. Fields are added to the **HashParam** structure as follows. - -| Added in API Version 9 | Type | -| ---------- | ------ | -| moduleName | string | -| hashValue | string | - -3. Fields are added to the **InstallParam** structure as follows. - -| Added in API Version 9 | Type | -| ----------------- | ----------------- | -| userId | number | -| installFlag | number | -| isKeepData | boolean | -| hashParams | Array\ | -| crowdtestDeadline | number | - -4. The **InstallStatus** structure is deprecated. - -**Adaptation Guide** - -Import the new bundle manager installation module and call **getBundleInstaller**. - -``` -import installer form '@ohos.bundle.installer' -``` - -## cl.bundlemanager.18 Bundle Manager Installation Function Changes -The installation specifications of the bundle manager module are changed, in which whether the application **deviceType** setting matches the device type is verified. If they do not match, the installation fails. - -**Change Impacts** - -Applications developed in earlier versions are affected. Applications can be successfully installed in the image of the new version only after adaptation. - -**Key API/Component Changes** - -N/A - -**Adaptation Guide** - -Configure device types in the application configuration file **config.json** or **module.json**. - -``` -{ - "module": { - "name": "entry", - "type": "entry", - // ... - "deviceTypes":[ - // In this example, default and tablet are configured. In this case, the application can be installed on default and tablet. - "default", - "tablet" - ], - // ... - } -``` -## cl.bundlemanager.19 innerBundleManger Module API Changes -**innerBundleManager** API functions are unchanged, but API usage is changed. The [@ohos.bundle.launcherBundleManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.launcherBundleManager.d.ts) module needs to be imported to use **innerBundleManager** APIs. The system capability is **SystemCapability.BundleManager.BundleFramework.Core**. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. Applications that use the **innerBundleManager** API capabilities need to adapt the new module and APIs. - -**Key API/Component Changes** - -The functions and input parameters of the following APIs remain unchanged, and API exception handling is added. When a level-2 module is used to export **ShortcutInfo** and **ShortcutWant**, the **@ohos.bundle.launcherBundleManager** module needs to be imported. The **on** and **off** APIs are deprecated from **@ohos.bundle.innerBundleManger.d.ts** and moved to **@ohos.bundle.bundleMonitor.d.ts**. - -1. getLauncherAbilityInfos
-2. getAllLauncherAbilityInfos
-3. getShortcutInfos - -**Adaptation Guide** - -Import the new module **@ohos.bundle.launcherBundleManage**. - -``` -import launcherBundleManager form '@ohos.bundle.launcherBundleManage' -``` - -## cl.bundlemanager.20 innerBundleManagr Module Changes -**innerBundleManager** API functions are unchanged, but API usage is changed. The [@ohos.bundle.bundleMonitor.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleMonitor.d.ts) module needs to be imported to use **innerBundleManager** APIs, which are system APIs. The system capability is **SystemCapability.BundleManager.BundleFramework.Core**. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. Applications that use the **innerBundleManager** API capabilities need to adapt the new module and APIs. - -**Key API/Component Changes** - -The **on** and **off** APIs are changed to **@ohos.bundle.bundleMonitor.d.ts**. The input parameters are different from those of the original APIs. The function prototype of the APIs of version 9 is as follows: - -``` -function on(type: BundleChangedEvent, callback: Callback): void; -function off(type: BundleChangedEvent, callback?: Callback): void; -``` -**BundleChangedEvent**: - -``` -type BundleChangedEvent = 'add' | 'update' | 'remove'; -``` -Callback function of **BundleChangedInfo**: -``` - interface BundleChangedInfo { - readonly bundleName: string; - readonly userId: number; - } -``` -After obtaining **BundleChangedInfo**, perform related operations (that is, the **add**, **update**, and **remove** functions in **BundleStatusCallback** of the original API). - -**Adaptation Guide** - -Import the **bundleMonitor** module and call related APIs. - -``` -import bundleMonitor form '@ohos.bundle.bundleMonitor' -``` - -## cl.bundlemanager.21 bundleStatusCallback.d.ts API Changes -The **bundleStatusCallback.d.ts** APIs of the bundle manager are deprecated and moved to [@ohos.bundle.bundleMonitor.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleMonitor.d.ts). The **add**, **update**, and **remove** functions in **BundleStatusCallback** are deprecated and changed to **BundleChangedEvent**, which is a system API. The system capability is **SystemCapability.BundleManager.BundleFramework.Core**. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. Applications that use the **BundleStatusCallback** API capabilities need to adapt the new module and APIs. - -**Key API/Component Changes** - -All the following functions are deprecated. The **BundleChangedEvent** API is added to **@ohos.bundle.bundleMonitor.d.ts**. - -1. add -2. update -3. remove - -**Adaptation Guide** - -Import the **bundleMonitor** module and call related APIs. Different from the previous **BundleStatusCallback**, **BundleStatusCallback** passes the **add**, **update**, and **remove** functions to the **on** and **off** APIs. The **BundleMonitor** uses the **on** or **off** API of version 9 to return **BundleChangedInfo** to the caller through the callback. - -``` -import bundleMonitor form '@ohos.bundle.bundleMonitor' -``` - -## cl.bundlemanager.22 Zlib Module API Changes -The **Zlib** module APIs of the bundle manager are changed. Certain APIs in [@ohos.zlib.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.zlib.d.ts) are deprecated and changed. The system capability is **SystemCapability.BundleManager.Zlib**. - -**Change Impacts** - -There is no impact on applications that use the APIs of versions earlier than 9. Applications that use APIs of version 9 need to adapt the new module and APIs. - -**Key API/Component Changes** - -The following table lists the changed APIs in **@ohos.zlib.d.ts**. The usage of the new APIs of version 9 is the same, and API exception handling is supported. - -| Deprecated | Added or Changed in API Version 9| System API| -| --------- | -------------- | --------- | -| zipFile | compressFile | Yes | -| unzipFile | decompressFile | Yes | -| ErrorCode | N/A | Yes | - -**Adaptation Guide** - -The import module does not change. The new API is directly used to adapt exception handling. - -``` -import zlib form '@ohos.zlib' -``` \ No newline at end of file diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelog-wifi.md b/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelog-wifi.md deleted file mode 100644 index 7fd3843f2cedaf7f4d8d56d05c99ff7068a9bf16..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelog-wifi.md +++ /dev/null @@ -1,115 +0,0 @@ -# Wi-Fi Subsystem ChangeLog - - -## cl.wifi.1 Migration of System APIs and APIs in API Version 9 to the New @ohos.wifiManager.d.ts -**@ohos.wifi.d.ts** does not allow for throwing error codes, which is required by API version 9 and the system APIs. Therefore, all system APIs and APIs in API version 9 of **@ohos.wifi.d.ts** are migrated to the newly added **@ohos.wifiManager.d.ts**, and error code description is also added. - -Import **@ohos.wifiManager.d.ts**, so that system APIs and APIs in API version 9 of the Wi-Fi subsystem can be used. - -import wifiManager from '@ohos.wifiManager'; - - -**Change Impacts** - -System APIs and APIs in API version 9 are affected. Import **@ohos.wifiManager** to make sure that system APIs and APIs in API version 9 of the Wi-Fi subsystem can be used. - -import wifiManager from '@ohos.wifiManager'; - -Other APIs are not affected. - - -**Key API/Component Changes** - -| Class| Type | Declaration | Change Type | -| ---- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| wifi | namespace | declare namespace wifi | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function enableWifi(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value type to void. | -| wifi | method | function disableWifi(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value type to void. | -| wifi | method | function scan(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value type to void. | -| wifi | method | function getScanResults(): Promise<Array<WifiScanInfo>> | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed **getScanInfos** to **getScanResults**.| -| wifi | method | function getScanResults(callback: AsyncCallback<Array<WifiScanInfo>>): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed **getScanInfos** to **getScanResults**.| -| wifi | method | function getScanResultsSync():  Array<[WifiScanInfo]> | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function addCandidateConfig(config: WifiDeviceConfig): Promise<number> | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function addCandidateConfig(config: WifiDeviceConfig, callback: AsyncCallback<number>): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function removeCandidateConfig(networkId: number): Promise<void> | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function removeCandidateConfig(networkId: number, callback: AsyncCallback<void>): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function addUntrustedConfig(config: WifiDeviceConfig): Promise<boolean> | Deleted this API in API version 9. | -| wifi | method | function addUntrustedConfig(config: WifiDeviceConfig, callback: AsyncCallback<boolean>): void | Deleted this API in API version 9. | -| wifi | method | function removeUntrustedConfig(config: WifiDeviceConfig): Promise<boolean> | Deleted this API in API version 9. | -| wifi | method | function removeUntrustedConfig(config: WifiDeviceConfig, callback: AsyncCallback<boolean>): void | Deleted this API in API version 9. | -| wifi | method | function getCandidateConfigs():  Array<[WifiDeviceConfig]> | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function connectToCandidateConfig(networkId: number): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function connectToNetwork(networkId: number): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function connectToDevice(config: WifiDeviceConfig): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function disconnect(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function reassociate(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function reconnect(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function disableNetwork(netId: number): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function removeAllNetwork(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function removeDevice(id: number): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function enableHotspot(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function disableHotspot(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function setHotspotConfig(config: HotspotConfig): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function getP2pLocalDevice(): Promise<WifiP2pDevice> | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function getP2pLocalDevice(callback: AsyncCallback<WifiP2pDevice>): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function getP2pGroups(): Promise<Array<WifiP2pGroupInfo>> | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function getP2pGroups(callback: AsyncCallback<Array<WifiP2pGroupInfo>>): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | method | function createGroup(config: WifiP2PConfig): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function removeGroup(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function p2pConnect(config: WifiP2PConfig): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function p2pCancelConnect(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function startDiscoverDevices(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function stopDiscoverDevices(): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function deletePersistentGroup(netId: number): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | method | function setDeviceName(devName: string): void | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and changed the return value to **void**.| -| wifi | interface | export interface WifiEapConfig | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | enum | export enum EapMethod | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | enum | export enum Phase2Method | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | interface | export interface WifiDeviceConfig | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and added the **eapConfig** parameter.| -| wifi | interface | export interface IpConfig | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and added the **prefixLength** parameter.| -| wifi | interface | export interface WifiInfoElem | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | enum | export enum WifiChannelWidth | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**. | -| wifi | interface | export interface WifiScanInfo | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and added the following three parameters: **centerFrequency0**, **centerFrequency1**, and **infoElems**.| -| wifi | enum | export enum WifiSecurityType | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and added four encryption types. | -| wifi | interface | export interface WifiLinkedInfo | Migrated this API in API version 9 to **@ohos.wifiManager.d.ts**, and added the **MacType** parameter. | - - -**(Optional) Adaptation Guide** - -The following uses **getLinkedInfo** as an example to show how it is called in the new version: - -``` -import wifiManager from '@ohos.wifiManager' - -wifiManager.getLinkedInfo((err, data) => { - if (err) { - console.error("get linked info error"); - return; - } - console.info("get linked info: " + JSON.stringify(data)); -}); - -wifiManager.getLinkedInfo().then(data => { - console.info("get linked info: " + JSON.stringify(data)); -}).catch(error => { - console.info("get linked info error"); -}); - -``` - -## cl.wifiext.1 Migration of System APIs and APIs in API Version 9 to the New @ohos.wifiManagerExt.d.ts - -**@ohos.wifiext.d.ts** does not allow for throwing error codes, which is required by API version 9 and the system API. Therefore, all system APIs and APIs in API version 9 of **@ohos.wifiext.d.ts** are migrated to the newly added **@ohos.wifiManagerExt.d.ts**, and error code description is also added. - -Import **@ohos.wifiManagerExt.d.ts**, so that system APIs and APIs in API version 9 of the Wi-Fi subsystem can be used. - -import wifiManagerExt from '@ohos.wifiManagerExt'; - - -**Change Impacts** - -System APIs and APIs in API version 9 are affected. Import **@ohos.wifiManagerExt**, so that system APIs and APIs in API version 9 of the Wi-Fi subsystem can be used together with the Wi-Fi manager. - -import wifiManagerExt from '@ohos.wifiManagerExt'; - -Other APIs are not affected. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-account_os_account.md b/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-account_os_account.md deleted file mode 100644 index df7cbf93cd13a7cc4dfc04fb9aec4b112633035a..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-account_os_account.md +++ /dev/null @@ -1,124 +0,0 @@ -# Account Subsystem ChangeLog - -## cl.account_os_account.1 Change in Error Information Return Method of Account System APIs - -Certain system APIs of the account subsystem use service logic return values to indicate error information, which does not comply with the API error code specifications of OpenHarmony. The following changes are made in API version 9 and later: - -Asynchronous API: An error message is returned via **AsyncCallback** or the **error** object of **Promise**. - -Synchronous API: An error message is returned via an exception. - -**Change Impacts** - -The application developed based on earlier versions needs to adapt the new APIs and their method for returning API error information. Otherwise, the original service logic will be affected. - -**Key API/Component Changes** - -Before change: - - class UserAuth - - setProperty(request: SetPropertyRequest, callback: AsyncCallback<number>): void; - - setProperty(request: SetPropertyRequest): Promise<number>; - - cancelAuth(contextID: Uint8Array): number; - - class PINAuth - - registerInputer(inputer: Inputer): boolean; - - UserIdentityManager - - cancel(challenge: Uint8Array): number; - -After change: - - class UserAuth - - setProperty(request: SetPropertyRequest, callback: AsyncCallback<void>): void; - - setProperty(request: SetPropertyRequest): Promise<void>; - - cancelAuth(contextID: Uint8Array): void; - - class PINAuth - - registerInputer(inputer: Inputer): void; - - UserIdentityManager - - cancel(challenge: Uint8Array): void; - -**Adaptation Guide** - -The following uses **setProperty** as an example for asynchronous APIs: - -``` -import account_osAccount from "@ohos.account.osAccount" -userAuth.setProperty({ - authType: account_osAccount.AuthType.PIN, - key: account_osAccount.SetPropertyType.INIT_ALGORITHM, - setInfo: new Uint8Array([0]) -}, (err) => { - if (err) { - console.log("setProperty failed, error: " + JSON.stringify(err)); - } else { - console.log("setProperty successfully"); - } -}); - -userAuth.setProperty({ - authType: account_osAccount.AuthType.PIN, - key: account_osAccount.SetPropertyType.INIT_ALGORITHM, - setInfo: new Uint8Array([0]) -}).catch((err) => { - if (err) { - console.log("setProperty failed, error: " + JSON.stringify(err)); - } else { - console.log("setProperty successfully"); - } -}); -``` - -The following uses **registerInputer** as an example for synchronous APIs: - -``` -import account_osAccount from "@ohos.account.osAccount" -let pinAuth = new account_osAccount.PINAuth() -let inputer = { - onGetData: (authType, passwordRecipient) => { - let password = new Uint8Array([0]); - passwordRecipient.onSetData(authType, password); - } -} -try { - pinAuth.registerInputer(inputer); -} catch (err) { - console.log("registerInputer failed, error: " + JSON.stringify(err)); -} -``` - -## cl.account_os_account.2 ACTION Definition Change for the Application Account Authentication Service - -**Change Impacts** - -For the application developed based on an earlier version, you need to modify **ACTION** in the application configuration file (**config.json** for the FA model and **module.json5** for the Stage model) to normally provide the application authentication service. - -**Key API/Component Changes** - -Involved constant: - -@ohos.ability.wantConstant.ACTION_APP_ACCOUNT_AUTH - -Before change: - -ACTION_APP_ACCOUNT_AUTH = "account.appAccount.action.auth" - -After change: - -ACTION_APP_ACCOUNT_AUTH = "ohos.appAccount.action.auth" - -**Adaptation Guide** - -For a third-party application providing the account authentication service, adapt the changed application account authentication **ACTION** in the **ServiceAbility** configuration file (**config.json** for the FA module or **module.json5** for the Stage module). -``` -"abilities": [ - { - "name": "ServiceAbility", - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - ... - "visible": true, - "skills": { - { - "actions": [ - "ohos.appAccount.action.auth" - ] - } - } - }] -} diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelog-dmsfwk.md b/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelog-dmsfwk.md deleted file mode 100644 index 311b1a90b716a22e151625ab990e73dbf3249f02..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelog-dmsfwk.md +++ /dev/null @@ -1,21 +0,0 @@ -# Distributed Scheduler Subsystem ChangeLog - -## cl.DistributedManagerService.1 Adding DATASYNC Permission Verification on the continuationManager API - -In earlier versions, the **continuationManager** API does not verify the caller, which does not comply with the OpenHarmony API specifications. -Now, before using **continuationManager**, the caller must apply for the **ohos.permission.DISTRIBUTED_DATASYNC** permission. - -**Change Impacts** - -The application developed based on earlier versions needs to apply for the **ohos.permission.DISTRIBUTED_DATASYNC** permission in advance. Otherwise, the original service logic will be affected. - -**Key API/Component Changes** - -Involved APIs: - - - continuationManager.registerContinuation; - - continuationManager.on; - - continuationManager.off; - - continuationManager.unregisterContinuation; - - continuationManager.updateContinuationState; - - continuationManager.startContinuationDeviceManager; diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.9.3/changelog-x-x.md b/en/release-notes/changelogs/OpenHarmony_3.2.9.3/changelog-x-x.md deleted file mode 100644 index 3ac3e83268d2ac247676cd313d5b5e45d195ea2b..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.9.3/changelog-x-x.md +++ /dev/null @@ -1,33 +0,0 @@ -# *Example* Subsystem ChangeLog - -Changes that affect contract compatibility of the last version should be described in the ChangeLog. The changes include but are not limited to those related to API names, parameters, return values, required permissions, call sequence, enumerated values, configuration parameters, and paths. The last version can be an LTS, release, beta, or monthly version, or the like. Contract compatibility, also called semantic compatibility, means that the original program behavior should remain consistent over versions. - -## cl.subsystemname.x xxx Function Change (Example: DeviceType Attribute Change or Camera Permission Change. Use a short description.) - -Add the number **cl.*subsystemname*.*x*** before each change title, where **cl** is the abbreviation of ChangeLog, *subsystemname* is the standard English name of the subsystem, and *x* indicates the change sequence number (starting from 1 in ascending order). - -Describe the changes in terms of functions. Example: *n* and *m* of the *a* function are changed. Developers need to adapt their applications based on the change description. - -If there is a requirement or design document corresponding to the change, attach the requirement number or design document number in the description. - -**Change Impacts** - -Describe whether released APIs (JS or native APIs) are affected or API behavior is changed. - -Describe whether available applications are affected, that is, whether an adaptation is required for building the application code in the SDK environment of the new version. - -**Key API/Component Changes** - -List the API/component changes involved in the function change. - -**Adaptation Guide (Optional)** - -Provide guidance for developers on how to adapt their application to the changes to be compatible with the new version. - -Example: - -Change parameter *n* to *m* in the *a* file. - -``` -sample code -``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.9.3/changelogs-useriam.md b/en/release-notes/changelogs/OpenHarmony_3.2.9.3/changelogs-useriam.md deleted file mode 100644 index b1011149ce89079e6e45212f0d1631794c406742..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_3.2.9.3/changelogs-useriam.md +++ /dev/null @@ -1,35 +0,0 @@ -# User IAM Subsystem Changelog - -## cl.useriam.1 Deletion of API9 GetVesion - -Deleted the **GetVersion()** API. - -**Change Impact** - -The **GetVersion()** API cannot be used from this version. - -**Key API/Component Changes** - -| Module | Class | Method/Attribute/Enum/Constant | Change Type | -| ---------------------- | ------------------- | ------------------------- | ------------------------ | -| ohos.userIAM.userAuth | function | getVersion() : number | Deleted| - -**Adaptation Guide** - -Delete the use of **GetVersion()**. - -## cl.useriam.2 Change of the API8 GetVesion() Return Value - -Changed the return value of **GetVersion()** (in API version 8) from **0** to **1**. - -**Change Impact** - -If the application verifies the return value of **GetVersion()** (API version 8), the verification fails. - -**Key API/Component Changes** - -The return value of **GetVersion()** (in API version 8) is changed from **0** to **1**. - -**Adaptation Guide** - -Delete the use of **GetVersion()** (API version 8) because this API has been deprecated. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.1.1/changelogs-account_os_account.md b/en/release-notes/changelogs/OpenHarmony_4.0.1.1/changelogs-account_os_account.md deleted file mode 100644 index 22a1dad1ce6387f0a05697738e9dc688cc8c869c..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.1.1/changelogs-account_os_account.md +++ /dev/null @@ -1,19 +0,0 @@ -# Account Subsystem ChangeLog - -## cl.account_os_account.1 Expansion of Distributed Account Nickname and Profile Picture Specifications - -The existing distributed account nickname and profile picture specifications cannot meet requirements in scenarios where the nickname is long and profile picture is large. - -Therefore, the distributed account nickname and profile picture specifications are expanded. - -**Change Impacts** - -The API change is forward compatible. Applications developed based on earlier versions can use the APIs in accordance with the new specifications, without affecting the original logic. - -**Key API/Component Changes** - -Before change: - - The nickname cannot exceed 20 characters, and the profile picture size cannot exceed 3 MB. - -After change: - - The nickname cannot exceed 1024 characters, and the profile picture size cannot exceed 10 MB. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.1.5/changelogs-geoLocationManager.md b/en/release-notes/changelogs/OpenHarmony_4.0.1.5/changelogs-geoLocationManager.md deleted file mode 100644 index f5a4b46a2b9632aa012cb38fe3555efd80b82b92..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.1.5/changelogs-geoLocationManager.md +++ /dev/null @@ -1,18 +0,0 @@ -# Location Subsystem ChangeLog - -## cl.location.1 Deletion of the geoLocationManager.requestEnableLocation API in API Version 9 - -When the location function is disabled, your application can call the **geoLocationManager.requestEnableLocation** API to request the user to enable the location function. However, this API is seldom used because the user is not notified of the scenario in which your application uses the location information. - -Therefore, your application shows a popup, asking the user to go to the settings page and enable the location function. In addition, the popup clearly states the scenarios in which the location information will be used, improving user experience. - -**Change Impacts** - -Your application cannot use the **geoLocationManager.requestEnableLocation** API in API version 9 to request the user to enable the location function. Instead, you need to implement a popup asking the user to enable the location function for your application. - -**Key API/Component Changes** - -| Class | API Type| Declaration | Change Type | -| ------------------ | -------- | ------------------------------------------------------------ | ------------------ | -| geoLocationManager | method | function requestEnableLocation(callback: AsyncCallback<boolean>): void; | Deleted from API version 9| -| geoLocationManager | method | function requestEnableLocation(): Promise<boolean>; | Deleted from API version 9| diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.1.5/changelogs-wifiManager.md b/en/release-notes/changelogs/OpenHarmony_4.0.1.5/changelogs-wifiManager.md deleted file mode 100644 index f424d69976a74e00b8aab625c5d24b8dfc72c99a..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.1.5/changelogs-wifiManager.md +++ /dev/null @@ -1,62 +0,0 @@ -# Wi-Fi Subsystem ChangeLog - -## cl.location.1 Location Service Permission Change - -From API version 9, the **ohos.permission.APPROXIMATELY_LOCATION** permission is added for obtaining the approximate location. - -If you use API version 9 or later, you need to apply for both the **ohos.permission.LOCATION** and **ohos.permission.APPROXIMATELY_LOCATION** permissions. Applying for only the **ohos.permission.LOCATION** permission will fail. - -**Change Impacts** - -Applications using API versions earlier than 9 are not affected. For an application using API version 9 or later, the method for applying for the location permission is changed. The details are as follows: - -Before using basic location capabilities, check whether your application has been granted the permission to access the device location information. If not, your application needs to obtain the permission from the user as described below. - -The system provides the following location permissions: - -- ohos.permission.LOCATION - -- ohos.permission.APPROXIMATELY_LOCATION - -- ohos.permission.LOCATION_IN_BACKGROUND - -If your application needs to access the device location information, it must first apply for required permissions. Specifically speaking: - -API versions earlier than 9: Apply for **ohos.permission.LOCATION**. - -API version 9 and later: Apply for **ohos.permission.APPROXIMATELY_LOCATION**, or apply for **ohos.permission.APPROXIMATELY_LOCATION** and **ohos.permission.LOCATION**. Note that **ohos.permission.LOCATION** cannot be applied for separately. - -| API Version| Location Permission | Permission Application Result| Location Accuracy | -| ------------- | ------------------------------------------------------------ | -------- | -------------------------------- | -| Earlier than 9 | ohos.permission.LOCATION | Success | Location accurate to meters| -| 9 and later | ohos.permission.LOCATION | Failure | No location obtained | -| 9 and later | ohos.permission.APPROXIMATELY_LOCATION | Success | Location accurate to 5 kilometers | -| 9 and later | ohos.permission.APPROXIMATELY_LOCATION and ohos.permission.LOCATION| Success | Location accurate to meters| - -If your application needs to access the device location information when running in the background, it must be configured to be able to run in the background and be granted the **ohos.permission.LOCATION_IN_BACKGROUND** permission. In this way, the system continues to report device location information after your application moves to the background. - -You can declare the required permissions in your application's configuration file. For details, see the [permission application guide](../../../application-dev/security/accesstoken-guidelines.md). - -**Key API/Component Changes** - -| Class | API Type| Declaration | Change Type | -| ----------- | -------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| wifiManager | method | function scan(): void; | The permission is changed to **ohos.permission.SET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function getScanResults(): Promise<Array<WifiScanInfo>>; | The permission is changed to **ohos.permission.GET_WIFI_INFO** and **ohos.permission.GET_WIFI_PEERS_MAC** or **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function getScanResults(callback: AsyncCallback<Array<WifiScanInfo>>): void; | The permission is changed to **ohos.permission.GET_WIFI_INFO** and **ohos.permission.GET_WIFI_PEERS_MAC** or **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function getScanResultsSync(): Array<WifiScanInfo>; | The permission is changed to **ohos.permission.GET_WIFI_INFO** and **ohos.permission.GET_WIFI_PEERS_MAC** or **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function getCandidateConfigs(): Array<WifiDeviceConfig>; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function getDeviceConfigs(): Array<WifiDeviceConfig>; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, **ohos.permission.APPROXIMATELY_LOCATION**, and **ohos.permission.GET_WIFI_CONFIG**.| -| wifiManager | method | function getStations(): Array<StationInfo>; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, **ohos.permission.APPROXIMATELY_LOCATION**, and **ohos.permission.MANAGE_WIFI_HOTSPOT**.| -| wifiManager | method | function getCurrentGroup(): Promise<WifiP2pGroupInfo>; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function getCurrentGroup(callback: AsyncCallback<WifiP2pGroupInfo>): void; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function getP2pPeerDevices(): Promise<WifiP2pDevice[]>; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function getP2pPeerDevices(callback: AsyncCallback<WifiP2pDevice[]>): void; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function p2pConnect(config: WifiP2PConfig): void; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function startDiscoverDevices(): void; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function getP2pGroups(): Promise<Array<WifiP2pGroupInfo>>; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function getP2pGroups(callback: AsyncCallback<Array<WifiP2pGroupInfo>>): void; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function on(type: "p2pDeviceChange", callback: Callback<WifiP2pDevice>): void; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function off(type: "p2pDeviceChange", callback?: Callback<WifiP2pDevice>): void; | The permission is changed to **ohos.permission.LOCATION** and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function on(type: "p2pPeerDeviceChange", callback: Callback<WifiP2pDevice[]>): void; | The permission is changed to **ohos.permission.GET_WIFI_INFO**, **ohos.permission.LOCATION**, and **ohos.permission.APPROXIMATELY_LOCATION**.| -| wifiManager | method | function off(type: "p2pPeerDeviceChange", callback?: Callback<WifiP2pDevice[]>): void; | The permission is changed to **ohos.permission.LOCATION** and **ohos.permission.APPROXIMATELY_LOCATION**.| diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelog-web.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelog-web.md deleted file mode 100644 index 254050b5104e769b4b4e44d6bbee8d13876d37db..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelog-web.md +++ /dev/null @@ -1,65 +0,0 @@ -# Web Subsystem ChangeLog - -Compared with earlier versions, OpenHarmony 4.0.2.1 has the following API changes in its Web subsystem: - -## cl.web.1 Parameter Type Change of postMessageEvent - -The **postMessageEvent** API supported only the string type. In OpenHarmony 4.0.2.1 and later versions, it also supports the ArrayBuffer type. - -**Change Impacts** - -The API change is forward compatible. Applications developed based on earlier versions can still use the API, and the original functions are not affected. - -**Key API/Component Changes** - -- Involved APIs - - postMessageEvent(message: string): void - -- Before change - - ```ts - postMessageEvent(message: string): void - ``` - -- After change - - ```ts - type WebMessage = ArrayBuffer | string - postMessageEvent(message: WebMessage): void - ``` - -**Adaptation Guide** - -The API change is forward compatible. Applications developed based on earlier versions can still use the API, and the original functions are not affected. - -## cl.web.2 Parameter Type Change of onMessageEvent - -The **onMessageEvent** API supported only the string type. In OpenHarmony 4.0.2.1 and later versions, it also supports the ArrayBuffer type. - -**Change Impacts** - -The API change is forward compatible. Applications developed based on earlier versions can still use the API. With the corresponding logic handling added, the original functions are not affected. - -**Key API/Component Changes** - -- Involved APIs - - onMessageEvent(callback: (result: string) => void): void - -- Before change - - ```ts - onMessageEvent(callback: (result: string) => void): void - ``` - -- After change - - ```ts - type WebMessage = ArrayBuffer | string - onMessageEvent(callback: (result: WebMessage) => void): void - ``` - -**Adaptation Guide** - -The API change is forward compatible. Applications developed based on earlier versions can still use the API. With the corresponding logic handling added, the original functions are not affected. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-ability.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-ability.md deleted file mode 100644 index 773d4439728d3c25369d47e384120d7beb543618..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-ability.md +++ /dev/null @@ -1,140 +0,0 @@ -# Ability Subsystem ChangeLog - -## cl.ability.1 System API Usage Rule Change - -System application verification is not performed for system APIs provided by the ability when they are called. The APIs can be used by a third-party application using the full SDK, which brings security risks. Therefore, application identity verification is added to OpenHarmony 4.0.2.1 and later versions. - -**Change Impacts** - -System APIs are available to only system applications. When a third-party application tries to use a system API, the **202** error will be returned via either an exception or asynchronous callback. - -**Key API/Component Changes** - -Below are the system APIs. - -| Module | API | Error Code Return Mode| -| -------------------------------------- | ------------------------------------------------------------ | -------------- | -| @ohos.app.ability.abilityManager.d.ts | updateConfiguration(config: Configuration, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.abilityManager.d.ts | updateConfiguration(config: Configuration): Promise | Asynchronous callback | -| @ohos.app.ability.abilityManager.d.ts | getAbilityRunningInfos(): Promise> | Asynchronous callback | -| @ohos.app.ability.abilityManager.d.ts | getAbilityRunningInfos(callback: AsyncCallback>): void | Asynchronous callback | -| @ohos.app.ability.abilityManager.d.ts | getExtensionRunningInfos(upperLimit: number): Promise> | Asynchronous callback | -| @ohos.app.ability.abilityManager.d.ts | getExtensionRunningInfos(upperLimit: number, callback: AsyncCallback>): void | Asynchronous callback | -| @ohos.app.ability.abilityManager.d.ts | getTopAbility(): Promise | Exception | -| @ohos.app.ability.abilityManager.d.ts | getTopAbility(callback: AsyncCallback): void | Exception | -| @ohos.app.ability.appManager.d.ts | on(type: "applicationState", observer: ApplicationStateObserver): number | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | on(type: "applicationState", observer: ApplicationStateObserver, bundleNameList: Array): number | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | off(type: "applicationState", observerId: number, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | off(type: "applicationState", observerId: number): Promise | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | getForegroundApplications(callback: AsyncCallback>): void | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | getForegroundApplications(): Promise> | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | killProcessWithAccount(bundleName: string, accountId: number): Promise | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | killProcessesByBundleName(bundleName: string): Promise | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | killProcessesByBundleName(bundleName: string, callback: AsyncCallback) | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | clearUpApplicationData(bundleName: string): Promise | Asynchronous callback | -| @ohos.app.ability.appManager.d.ts | clearUpApplicationData(bundleName: string, callback: AsyncCallback) | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | on(type: "mission", listener: MissionListener): number | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | off(type: "mission", listenerId: number, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | off(type: "mission", listenerId: number): Promise | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | getMissionInfo(deviceId: string, missionId: number, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | getMissionInfo(deviceId: string, missionId: number): Promise | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | getMissionInfos(deviceId: string, numMax: number, callback: AsyncCallback>): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | getMissionInfos(deviceId: string, numMax: number): Promise> | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | getMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | getMissionSnapShot(deviceId: string, missionId: number): Promise | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | getLowResolutionMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | getLowResolutionMissionSnapShot(deviceId: string, missionId: number): Promise | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | lockMission(missionId: number, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | lockMission(missionId: number): Promise | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | unlockMission(missionId: number, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | unlockMission(missionId: number): Promise | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | clearMission(missionId: number, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | clearMission(missionId: number): Promise | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | clearAllMissions(callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | clearAllMissions(): Promise | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | moveMissionToFront(missionId: number, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.missionManager.d.ts | moveMissionToFront(missionId: number, options?: StartOptions): Promise | Asynchronous callback | -| @ohos.app.ability.quickFixManager.d.ts | applyQuickFix(hapModuleQuickFixFiles: Array, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.quickFixManager.d.ts | applyQuickFix(hapModuleQuickFixFiles: Array): Promise | Asynchronous callback | -| @ohos.app.ability.quickFixManager.d.ts | getApplicationQuickFixInfo(bundleName: string, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.quickFixManager.d.ts | getApplicationQuickFixInfo(bundleName: string): Promise | Asynchronous callback | -| @ohos.app.ability.wantAgent.d.ts | getWant(agent: WantAgent, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.ability.wantAgent.d.ts | getWant(agent: WantAgent): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | deleteForm(formId: string, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | deleteForm(formId: string): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | releaseForm(formId: string, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | releaseForm(formId: string, isReleaseCache?: boolean): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | requestForm(formId: string, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | requestForm(formId: string): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | castToNormalForm(formId: string, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | castToNormalForm(formId: string): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | notifyVisibleForms(formIds: Array, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | notifyVisibleForms(formIds: Array): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | notifyInvisibleForms(formIds: Array, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | notifyInvisibleForms(formIds: Array): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | enableFormsUpdate(formIds: Array, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | enableFormsUpdate(formIds: Array): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | disableFormsUpdate(formIds: Array, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | disableFormsUpdate(formIds: Array): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | isSystemReady(callback: AsyncCallback): void | Exception | -| @ohos.app.form.formHost.d.ts | isSystemReady(): Promise | Exception | -| @ohos.app.form.formHost.d.ts | getAllFormsInfo(callback: AsyncCallback>): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | getAllFormsInfo(): Promise> | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | getFormsInfo(bundleName: string, callback: AsyncCallback>): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback>): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | getFormsInfo(bundleName: string, moduleName?: string): Promise> | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | deleteInvalidForms(formIds: Array, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | deleteInvalidForms(formIds: Array): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | acquireFormState(want: Want, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | acquireFormState(want: Want): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | on(type: "formUninstall", callback: Callback): void | Exception | -| @ohos.app.form.formHost.d.ts | off(type: "formUninstall", callback?: Callback): void | Exception | -| @ohos.app.form.formHost.d.ts | notifyFormsVisible(formIds: Array, isVisible: boolean, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | notifyFormsVisible(formIds: Array, isVisible: boolean): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | notifyFormsEnableUpdate(formIds: Array, isEnableUpdate: boolean, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | notifyFormsEnableUpdate(formIds: Array, isEnableUpdate: boolean): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | shareForm(formId: string, deviceId: string, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | shareForm(formId: string, deviceId: string): Promise | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | notifyFormsPrivacyProtected(formIds: Array, isProtected: boolean, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formHost.d.ts | notifyFormsPrivacyProtected(formIds: Array, isProtected: boolean): Promise | Asynchronous callback | -| @ohos.app.form.formProvider.d.ts | requestPublishForm(want: Want, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formProvider.d.ts | requestPublishForm(want: Want, callback: AsyncCallback): void | Asynchronous callback | -| @ohos.app.form.formProvider.d.ts | requestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData): Promise | Asynchronous callback | -| @ohos.app.form.formProvider.d.ts | isRequestPublishFormSupported(callback: AsyncCallback): void | Exception | -| @ohos.app.form.formProvider.d.ts | isRequestPublishFormSupported(): Promise | Exception | -| UIAbilityContext.d.ts | startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void | Asynchronous callback | -| UIAbilityContext.d.ts | startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void | Asynchronous callback | -| UIAbilityContext.d.ts | startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise | Asynchronous callback | -| UIAbilityContext.d.ts | startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback): void | Exception | -| UIAbilityContext.d.ts | startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void | Exception | -| UIAbilityContext.d.ts | startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions): Promise | Exception | -| UIAbilityContext.d.ts | startServiceExtensionAbility(want: Want, callback: AsyncCallback): void | Asynchronous callback | -| UIAbilityContext.d.ts | startServiceExtensionAbility(want: Want): Promise | Asynchronous callback | -| UIAbilityContext.d.ts | startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void | Asynchronous callback | -| UIAbilityContext.d.ts | startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise | Asynchronous callback | -| UIAbilityContext.d.ts | stopServiceExtensionAbility(want: Want, callback: AsyncCallback): void | Asynchronous callback | -| UIAbilityContext.d.ts | stopServiceExtensionAbility(want: Want): Promise | Asynchronous callback | -| UIAbilityContext.d.ts | stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void | Asynchronous callback | -| UIAbilityContext.d.ts | stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise | Asynchronous callback | -| UIAbilityContext.d.ts | connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number | Asynchronous callback | -| UIAbilityContext.d.ts | setMissionIcon(icon: image.PixelMap, callback: AsyncCallback): void | Asynchronous callback | -| UIAbilityContext.d.ts | setMissionIcon(icon: image.PixelMap): Promise | Asynchronous callback | -| ServiceExtensionContext.d.ts | startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void | Asynchronous callback | -| ServiceExtensionContext.d.ts | startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void | Asynchronous callback | -| ServiceExtensionContext.d.ts | startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise | Asynchronous callback | -| ServiceExtensionContext.d.ts | startServiceExtensionAbility(want: Want, callback: AsyncCallback): void | Asynchronous callback | -| ServiceExtensionContext.d.ts | startServiceExtensionAbility(want: Want): Promise | Asynchronous callback | -| ServiceExtensionContext.d.ts | startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void | Asynchronous callback | -| ServiceExtensionContext.d.ts | startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise | Asynchronous callback | -| ServiceExtensionContext.d.ts | stopServiceExtensionAbility(want: Want, callback: AsyncCallback): void | Asynchronous callback | -| ServiceExtensionContext.d.ts | stopServiceExtensionAbility(want: Want): Promise | Asynchronous callback | -| ServiceExtensionContext.d.ts | stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void | Asynchronous callback | -| ServiceExtensionContext.d.ts | stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise | Asynchronous callback | -| ServiceExtensionContext.d.ts | connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number | Asynchronous callback | -| Context.d.ts | createBundleContext(bundleName: string): Context | Exception | -| Context.d.ts | createModuleContext(bundleName: string, moduleName: string): Context | Exception | -| FormExtensionContext.d.ts | startAbility(want: Want, callback: AsyncCallback): void | Asynchronous callback | -| FormExtensionContext.d.ts | startAbility(want: Want): Promise | Asynchronous callback | diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-bluetooth.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-bluetooth.md deleted file mode 100644 index 46cabda38dd35234da3b29b6e3a891fcee63dd56..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-bluetooth.md +++ /dev/null @@ -1,173 +0,0 @@ -# Bluetooth Subsystem ChangeLog - -## cl.bluetooth.1 API Migration to @ohos.bluetoothManager.d.ts - -**@ohos.bluetooth.d.ts** does not allow for throwing error codes, which is required by API version 9 and system APIs. Therefore, all APIs of **@ohos.bluetooth.d.ts** are migrated to the newly added **@ohos.bluetoothManager.d.ts**, and error code description is also added. - -To use Bluetooth APIs, import **@ohos.bluetoothManager**. - - ```ts - import bluetoothManager from '@ohos.bluetoothManager'; - ``` - - -**Change Impacts** - -System APIs and APIs in API version 9 are affected. Import **@ohos.bluetoothManager** to use APIs that can throw error codes. - - ```ts - import bluetoothManager from '@ohos.bluetoothManager'; - ``` - -**Key API/Component Changes** - -| Class | Original API | New API | Change Type | -| ---------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| bluetooth | function getState(): BluetoothState | function getState(): BluetoothState | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | method | function getBtConnectionState(): ProfileConnectionState; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function pairDevice(deviceId: string): boolean | function pairDevice(deviceId: string): void | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| bluetooth | function cancelPairedDevice(deviceId: string): boolean | function cancelPairedDevice(deviceId: string): void | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| bluetooth | function getRemoteDeviceName(deviceId: string): string | function getRemoteDeviceName(deviceId: string): string | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function getRemoteDeviceClass(deviceId: string): DeviceClass | function getRemoteDeviceClass(deviceId: string): DeviceClass | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function enableBluetooth(): boolean | function enableBluetooth(): void | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| bluetooth | function disableBluetooth(): boolean | function disableBluetooth(): void | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| bluetooth | function getLocalName(): string | function getLocalName(): string | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function getPairedDevices(): Array<string>; | function getPairedDevices(): Array<string>; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function getProfileConnState(profileId: ProfileId): ProfileConnectionState | function getProfileConnectionState(profileId: ProfileId): ProfileConnectionState | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the API name to **getProfileConnectionState**.| -| bluetooth | function setDevicePairingConfirmation(device: string, accept: boolean): boolean | function setDevicePairingConfirmation(device: string, accept: boolean): void | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| bluetooth | function setLocalName(name: string): boolean; | function setLocalName(name: string): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| bluetooth | function setBluetoothScanMode(mode: ScanMode, duration: number): boolean | function setBluetoothScanMode(mode: ScanMode, duration: number): void | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| bluetooth | function getBluetoothScanMode(): ScanMod | function getBluetoothScanMode(): ScanMode | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function startBluetoothDiscovery(): boolean | function startBluetoothDiscovery(): void | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**, added the **ohos.permission.APPROXIMATELY_LOCATION** permission, and changed the return value to **void**.| -| bluetooth | function stopBluetoothDiscovery(): boolean; | function stopBluetoothDiscovery(): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| bluetooth | function on(type: "bluetoothDeviceFind", callback: Callback<Array<string>>): void; | function on(type: "bluetoothDeviceFind", callback: Callback<Array<string>>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function off(type: "bluetoothDeviceFind", callback?: Callback<Array<string>>): void; | function off(type: "bluetoothDeviceFind", callback?: Callback<Array<string>>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function on(type: "bondStateChange", callback: Callback<BondStateParam>): void; | function on(type: "bondStateChange", callback: Callbackk<BondStateParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function off(type: "bondStateChange", callback?: Callback<BondStateParam>): void; | function off(type: "bondStateChange", callback?: Callback<BondStateParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function on(type: "pinRequired", callback: Callback<PinRequiredParam>): void; | function on(type: "pinRequired", callback: Callback<PinRequiredParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function off(type: "pinRequired", callback?: Callback<PinRequiredParam>): void; | function off(type: "pinRequired", callback?: Callback<PinRequiredParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function on(type: "stateChange", callback: Callback<BluetoothState>): void; | function on(type: "stateChange", callback: Callback<BluetoothState>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function off(type: "stateChange", callback?: Callback<BluetoothState>): void; | function off(type: "stateChange", callback?: Callback<BluetoothState>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function sppListen(name: string, option: SppOption, callback: AsyncCallback<number>): void; | function sppListen(name: string, option: SppOption, callback: AsyncCallback<number>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function sppAccept(serverSocket: number, callback: AsyncCallback<number>): void; | function sppAccept(serverSocket: number, callback: AsyncCallback<number>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function sppConnect(device: string, option: SppOption, callback: AsyncCallback<number>): void; | function sppConnect(device: string, option: SppOption, callback: AsyncCallback<number>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function sppCloseServerSocket(socket: number): void; | function sppCloseServerSocket(socket: number): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function sppCloseClientSocket(socket: number): void; | function sppCloseClientSocket(socket: number): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function sppWrite(clientSocket: number, data: ArrayBuffer): boolean; | function sppWrite(clientSocket: number, data: ArrayBuffer): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| bluetooth | function on(type: "sppRead", clientSocket: number, callback: Callback<ArrayBuffer>): void; | function on(type: "sppRead", clientSocket: number, callback: Callback<ArrayBuffer>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function off(type: "sppRead", clientSocket: number, callback?: Callback<ArrayBuffer>): void; | function off(type: "sppRead", clientSocket: number, callback?: Callback<ArrayBuffer>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | function getProfile(profileId: ProfileId): A2dpSourceProfile | HandsFreeAudioGatewayProfile; | function getProfileInstance(profileId: ProfileId): A2dpSourceProfile | -| bluetooth | function getProfileInst(profileId: ProfileId): A2dpSourceProfile | HandsFreeAudioGatewayProfile | HidHostProfile | -| BaseProfile | getConnectionDevices(): Array<string>; | getConnectionDevices(): Array<string>; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| BaseProfile | getDeviceState(device: string): ProfileConnectionState; | getDeviceState(device: string): ProfileConnectionState; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| A2dpSourceProfile | connect(device: string): boolean; | connect(device: string): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| A2dpSourceProfile | disconnect(device: string): boolean; | disconnect(device: string): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| A2dpSourceProfile | on(type: "connectionStateChange", callback: Callback<StateChangeParam>): void; | on(type: "connectionStateChange", callback: Callback<StateChangeParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| A2dpSourceProfile | off(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void; | off(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| A2dpSourceProfile | getPlayingState(device: string): PlayingState; | getPlayingState(device: string): PlayingState; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| HandsFreeAudioGatewayProfile | connect(device: string): boolean; | connect(device: string): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| HandsFreeAudioGatewayProfile | disconnect(device: string): boolean; | disconnect(device: string): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| HandsFreeAudioGatewayProfile | on(type: "connectionStateChange", callback: Callback<StateChangeParam>): void; | on(type: "connectionStateChange", callback: Callback<StateChangeParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| HandsFreeAudioGatewayProfile | off(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void; | off(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| HidHostProfile | connect(device: string): boolean; | connect(device: string): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| HidHostProfile | disconnect(device: string): boolean; | disconnect(device: string): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| HidHostProfile | on(type: "connectionStateChange", callback: Callback<StateChangeParam>): void; | on(type: "connectionStateChange", callback: Callback<StateChangeParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| HidHostProfile | off(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void; | off(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| PanProfile | disconnect(device: string): boolean; | disconnect(device: string): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| PanProfile | on(type: "connectionStateChange", callback: Callback<StateChangeParam>): void; | on(type: "connectionStateChange", callback: Callback<StateChangeParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| PanProfile | off(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void; | off(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| PanProfile | setTethering(enable: boolean): void; | setTethering(enable: boolean): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| PanProfile | isTetheringOn(): boolean; | isTetheringOn(): boolean; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| BLE | function createGattServer(): GattServer; | function createGattServer(): GattServer; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| BLE | function createGattClientDevice(deviceId: string): GattClientDevice; | function createGattClientDevice(deviceId: string): GattClientDevice; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| BLE | function getConnectedBLEDevices(): Array<string>; | function getConnectedBLEDevices(): Array<string>; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| BLE | function startBLEScan(filters: Array<ScanFilter>, options?: ScanOptions): void; | function startBLEScan(filters: Array<ScanFilter>, options?: ScanOptions): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and added the **ohos.permission.APPROXIMATELY_LOCATION** permission.| -| BLE | function stopBLEScan(): void; | function stopBLEScan(): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| BLE | mefunction on(type: "BLEDeviceFind", callback: Callback<Array<ScanResult>>): void;thod | function on(type: "BLEDeviceFind", callback: Callback<Array<ScanResult>>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| BLE | function off(type: "BLEDeviceFind", callback?: Callback<Array<ScanResult>>): void; | function off(type: "BLEDeviceFind", callback?: Callback<Array<ScanResult>>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | startAdvertising(setting: AdvertiseSetting, advData: AdvertiseData, advResponse?: AdvertiseData): void; | startAdvertising(setting: AdvertiseSetting, advData: AdvertiseData, advResponse?: AdvertiseData): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | stopAdvertising(): void; | stopAdvertising(): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | addService(service: GattService): boolean; | addService(service: GattService): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| GattServer | removeService(serviceUuid: string): boolean; | removeService(serviceUuid: string): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**.| -| GattServer | close(): void; | close(): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. -| GattServer | notifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): boolean; | notifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**. | -| GattServer | sendResponse(serverResponse: ServerResponse): boolean; | sendResponse(serverResponse: ServerResponse): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**. | -| GattServer | on(type: "characteristicRead", callback: Callback<CharacteristicReadReq>): void; | on(type: "characteristicRead", callback: Callback<CharacteristicReadRequest>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | off(type: "characteristicRead", callback?: Callback<CharacteristicReadReq>): void; | off(type: "characteristicRead", callback?: Callback<CharacteristicReadRequest>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | on(type: "characteristicWrite", callback: Callback<CharacteristicWriteReq>): void; | on(type: "characteristicWrite", callback: Callback<CharacteristicWriteRequest>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | off(type: "characteristicWrite", callback?: Callback<CharacteristicWriteReq>): void; | off(type: "characteristicWrite", callback?: Callback<CharacteristicWriteRequest>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | on(type: "descriptorRead", callback: Callback<DescriptorReadReq>): void; | on(type: "descriptorRead", callback: Callback<DescriptorReadRequest>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | off(type: "descriptorRead", callback?: Callback<DescriptorReadReq>): void; | off(type: "descriptorRead", callback?: Callback<DescriptorReadRequest>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | on(type: "descriptorWrite", callback: Callback<DescriptorWriteReq>): void; | on(type: "descriptorWrite", callback: Callback<DescriptorWriteRequest>): void;| Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | off(type: "descriptorWrite", callback?: Callback<DescriptorWriteReq>): void; | off(type: "descriptorWrite", callback?: Callback<DescriptorWriteRequest>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | on(type: "connectStateChange", callback: Callback<BLEConnectChangedState>): void; | on(type: "connectStateChange", callback: Callback<BLEConnectChangedState>): void;| Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattServer | off(type: "connectStateChange", callback?: Callback<BLEConnectChangedState>): void; | off(type: "connectStateChange", callback?: Callback<BLEConnectChangedState>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | connect(): boolean; | connect(): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**. | -| GattClientDevice | disconnect(): boolean; | disconnect(): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**. | -| GattClientDevice | close(): boolean; | close(): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**. | -| GattClientDevice | getDeviceName(callback: AsyncCallback<string>): void; | getDeviceName(callback: AsyncCallback<string>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | getDeviceName(): Promise<string>; | getDeviceName(): Promise<string>; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | getServices(callback: AsyncCallback<Array<GattService>>): void; | getServices(callback: AsyncCallback<Array<GattService>>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | getServices(): Promise<Array<GattService>>; | getServices(): Promise<Array<GattService>>; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | readCharacteristicValue(characteristic: BLECharacteristic, callback: AsyncCallback<BLECharacteristic>): void; | readCharacteristicValue(characteristic: BLECharacteristic, callback: AsyncCallback<BLECharacteristic>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | readCharacteristicValue(characteristic: BLECharacteristic): Promise<BLECharacteristic>; | readCharacteristicValue(characteristic: BLECharacteristic): Promise<BLECharacteristic>; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | readDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback<BLEDescriptor>): void; | readDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback<BLEDescriptor>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | readDescriptorValue(descriptor: BLEDescriptor): Promise<BLEDescriptor>; | readDescriptorValue(descriptor: BLEDescriptor): Promise<BLEDescriptor>; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | writeCharacteristicValue(characteristic: BLECharacteristic): boolean; | writeCharacteristicValue(characteristic: BLECharacteristic): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**. | -| GattClientDevice | writeDescriptorValue(descriptor: BLEDescriptor): boolean; | writeDescriptorValue(descriptor: BLEDescriptor): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**. | -| GattClientDevice | getRssiValue(callback: AsyncCallback<number>): void; | getRssiValue(callback: AsyncCallback<number>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | getRssiValue(): Promise<number>; | getRssiValue(): Promise<number>; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | setBLEMtuSize(mtu: number): boolean; | setBLEMtuSize(mtu: number): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**. | -| GattClientDevice | setNotifyCharacteristicChanged(characteristic: BLECharacteristic, enable: boolean): boolean; | setNotifyCharacteristicChanged(characteristic: BLECharacteristic, enable: boolean): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts** and changed the return value to **void**. | -| GattClientDevice | on(type: "BLECharacteristicChange", callback: Callback<BLECharacteristic>): void; | on(type: "BLECharacteristicChange", callback: Callback<BLECharacteristic>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | off(type: "BLECharacteristicChange", callback?: Callback<BLECharacteristic>): void; | off(type: "BLECharacteristicChange", callback?: Callback<BLECharacteristic>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | on(type: "BLEConnectionStateChange", callback: Callback<BLEConnectChangedState>): void; | on(type: "BLEConnectionStateChange", callback: Callback<BLEConnectChangedState>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| GattClientDevice | off(type: "BLEConnectionStateChange", callback?: Callback<BLEConnectChangedState>): void; | off(type: "BLEConnectionStateChange", callback?: Callback<BLEConnectChangedState>): void; | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | GattService | GattService | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | BLECharacteristic | BLECharacteristic | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | BLEDescriptor | BLEDescriptor | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | NotifyCharacteristic | NotifyCharacteristic | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | CharacteristicReadReq | CharacteristicReadRequest | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | CharacteristicWriteReq | CharacteristicWriteRequest | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | DescriptorReadRe | DescriptorReadRequest | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | DescriptorWriteReq | DescriptorWriteRequest | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | ServerResponse | ServerResponse | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | BLEConnectChangedState | BLEConnectChangedState | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | ScanResult | ScanResult | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | AdvertiseSetting | AdvertiseSetting | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | AdvertiseData | AdvertiseData | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | ManufactureData | ManufactureData | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | ServiceData | ServiceData | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | ScanFilter | ScanFilter | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | ScanOptions | ScanOptions | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | SppOption | SppOption | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | PinRequiredParam | PinRequiredParam | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | DeviceClass | DeviceClass | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | BondStateParam | BondStateParam | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | StateChangeParam | StateChangeParam | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | ScanDuty | ScanDuty | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | MatchMode | MatchMode | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | ProfileConnectionState | ProfileConnectionState | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | BluetoothState | BluetoothState | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | SppType | SppType | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | ScanMode | ScanMode | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | BondState | BondState | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | MajorClass | MajorClass | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | MajorMinorClass | MajorMinorClass | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | PlayingState | PlayingState | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | -| bluetooth | ProfileId | ProfileId | Migrated this API in API version 9 to **@ohos.bluetoothManager.d.ts**. | - - - -**(Optional) Adaptation Guide** - -The following uses **enableLocation** as an example to show how it is called in the new version: - - ```ts - import bluetoothManager from '@ohos.bluetoothManager'; - try { - var state = bluetoothManager.getState(); - } catch (err) { - console.error("errCode:" + err.code + ",errMessage:" + err.message); - } - ``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-distributeddatamgr.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-distributeddatamgr.md deleted file mode 100644 index 91eff5aaba224372581f5e3a8165f7382216c7c2..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-distributeddatamgr.md +++ /dev/null @@ -1,48 +0,0 @@ -# Distributed Data Management Subsystem JS API Changelog - -## cl.distributeddatamgr.1 API Change -Changed the **relationalStore** APIs of the distributed data management (distributeddatamgr) subsystem. - -Before change: -After **getRdbStore()** is called, the application determines whether the RDB store is newly created based on the **openStatus** attribute (openStatus == ON_CREATE) of the returned **rdbStore** object. -After change: -After **getRdbStore()** is called, the application determines whether the RDB store is newly created based on the **version** attribute (version == 0) of the returned **rdbStore** object. - -You need to adapt your application. - - **Change Impact** - -The JS APIs of API version 10 are affected and need to be changed accordingly. Otherwise, certain functions cannot be properly implemented in the SDK of the new version. - -**Key API/Component Changes** - -| Module | Class | Method/Attribute/Enum/Constant| Change Type| -| ------------------------------ | --------------- | ---------------- | ------- | -| @ohos.data.relationalStore | RdbStore | **openStatus: number;** is changed to **version: number;**.| Changed | - - -**Adaptation Guide** - -Refer to the following code to set or obtain the RDB store version for an application: - -```ts -const STORE_CONFIG = { - name: "rdbstore.db", - securityLevel: data_rdb.SecurityLevel.S1 -} -data_rdb.getRdbStore(this.context, STORE_CONFIG, function (err, rdbStore) { - // Before: - // if (rdbStore.openStatus == ON_CREATE) { - // rdbStore.executeSql("CREATE TABLE IF NOT EXISTS student (id INTEGER PRIMARY KEY AUTOINCREMENT, score REAL);", null) // create table xxx - // } - - // Now: - if (rdbStore.version == 0) { - rdbStore.executeSql("CREATE TABLE IF NOT EXISTS student (id INTEGER PRIMARY KEY AUTOINCREMENT, score REAL);", null) // create table xxx - // Set the RDB store version, which is a positive integer greater than 0. - rdbStore.version == 3 - } - // Obtain the RDB store version. - console.info("Get RdbStore version is " + rdbStore.version) -}) -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-filemanagement.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-filemanagement.md deleted file mode 100644 index 2e4e9981788e07f1f41bef6c579898fe649c7368..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-filemanagement.md +++ /dev/null @@ -1,145 +0,0 @@ -# File Management Subsystem ChangeLog - -## cl.filemanagement.1 Changed environment - -The file management subsystem **d.ts** file has been archived and moved to the **file** directory. The **environment** module supports error code processing. - -**Change Impacts** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. The **environment** module supports error code processing. See [adaptation instructions](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **environment** was imported using **@ohos.environment**: - -```js -import environment from '@ohos.environment'; -``` - -But now, **environment** is imported using **@ohos.file.environment**: - -```js -import environment from '@ohos.file.environment'; -``` - -## cl.filemanagement.2 Changed securityLabel - -The file management subsystem **d.ts** file has been archived and moved to the **file** directory. The **securityLabel** module supports error code processing. - -**Change Impacts** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. The **securityLabel** module supports error code processing. See [adaptation instructions](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **securityLabel** was imported using **@ohos.securityLabel**: - -```js -import securityLabel from '@ohos.securityLabel'; -``` - -But now, **securityLabel** is imported using **@ohos.file.securityLabel**: - -```js -import securityLabel from '@ohos.file.securityLabel'; -``` - -## cl.filemanagement.3 Changed fs - -The **ino** attribute type of the **Stat** API under the **fs** module is changed. - -**Change Impacts** - -The **ino** attribute type is changed from number to BigInt, to adapt the inode range of all types of files in the file system. - -**Key API/Component Changes** - -The type of the **ino** attribute of the **Stat** API is changed from number to BigInt. - -## cl.filemanagement.4 Changed fileAccess - -The file management subsystem **d.ts** file has been archived and moved to the **file** directory. The **fileAccess** module supports error code processing. - -**Change Impacts** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. The **fileAccess** module supports error code processing. See [adaptation instructions](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **fileAccess** was imported using **@ohos.data.fileAccess**: - -```js -import fileAccess from '@ohos.data.fileAccess'; -``` - -But now, **fileAccess** is imported using **@ohos.file.fileAccess**: - -```js -import fileAccess from '@ohos.file.fileAccess'; -``` - -## cl.filemanagement.5 Changed fileExtensionInfo - -The file management subsystem **d.ts** file has been archived and moved to the **file** directory. The **fileExtensionInfo** module supports error code processing. - -**Change Impacts** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. The **fileExtensionInfo** module supports error code processing. See [adaptation instructions](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **fileExtensionInfo** was imported using **@ohos.fileExtensionInfo**: - -```js -import fileExtensionInfo from '@ohos.fileExtensionInfo'; -``` - -But now, **fileExtensionInfo** is imported using **@ohos.file.fileExtensionInfo**: - -```js -import fileExtensionInfo from '@ohos.file.fileExtensionInfo'; -``` - -## cl.filemanagement.6 Changed storageStatistics - -The file management subsystem **d.ts** file has been archived and moved to the **file** directory. The **fileExtensionInfo** module supports error code processing. - -**Change Impacts** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. The **storageStatistics** module supports error code processing. See [adaptation instructions](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **storageStatistics** was imported using **@ohos.storageStatistics**: - -```js -import storageStatistics from '@ohos.storageStatistics'; -``` - -But now, **storageStatistics** is imported using **@ohos.file.storageStatistics**: - -```js -import storageStatistics from '@ohos.file.storageStatistics'; -``` - -## cl.filemanagement.7 Changed volumeManager - -The file management subsystem **d.ts** file has been archived moved to the **file** directory. The **volumeManager** module supports error code processing. - -**Change Impacts** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. The **volumeManager** module supports error code processing. See [adaptation instructions](../OpenHarmony_3.2.8.1/changelogs-filemanagement.md) for more details. - -**Key API/Component Changes** - -Before the change, **volumeManager** was imported using **@ohos.volumeManager**: - -```js -import volumeManager from '@ohos.volumeManager'; -``` - -But now, **volumeManager** is imported using **@ohos.file.volumeManager**: - -```js -import volumeManager from '@ohos.file.volumeManager'; -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-global.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-global.md deleted file mode 100644 index 7192f94cba5682b78cd477953ed521bc42434609..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-global.md +++ /dev/null @@ -1,41 +0,0 @@ -# Globalization Subsystem ChangeLog - -## cl.global.1 Runtime Authentication Added for System APIs - -The internationalization component of the globalization subsystem adds runtime authentication for system APIs in certain scenarios. The following changes are made in API version 9 and later: - - Setting the system language, country or region, and area - - Setting the 24-hour format of the system - - Adding and removing the preferred language - - Setting localized numbers - -You need to adapt your application based on the following information. - -**Change Impacts** - -APIs involved in the preceding scenarios can be properly called only by system applications that have the **UPDATE_CONFIGURATION** permission. - -**Key API/Component Changes** - - - Involved APIs: - - setSystemLanguage(language: string): void; - - setSystemRegion(region: string): void; - - setSystemLocale(locale: string): void; - - set24HourClock(option: boolean): void; - - addPreferredLanguage(language: string, index?: number): void; - - removePreferredLanguage(index: number): void; - - setUsingLocalDigit(flag: boolean): void; - -**Adaptation Guide** - -Make sure the application trying to call any of the above APIs is a system application. Non-system applications are not allowed to call the APIs. -An exception will be thrown upon lack of a necessary permission or a call request from a non-system application. The exception can be captured via **try-catch**. - -```js -import I18n from '@ohos.i18n' - -try { - I18n.System.setSystemLanguage('zh'); -} catch(error) { - console.error(`call System.setSystemLanguage failed, error code: ${error.code}, message: ${error.message}.`) -} -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-media.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-media.md deleted file mode 100644 index 01455e8774555943174a21a80f343b607a4a0069..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-media.md +++ /dev/null @@ -1,314 +0,0 @@ -# Media Subsystem ChangeLog - -## cl.media.1 API Change of the Playback Function - -Added the [AVPlayer](../../../application-dev/reference/apis/js-apis-media.md#avplayer9)9+ API for audio and video playback, with the updated state machine and error codes, which is recommended. The following APIs for audio playback and video playback are no longer maintained: [AudioPlayer](../../../application-dev/reference/apis/js-apis-media.md#audioplayer)6+ and [VideoPlayer](../../../application-dev/reference/apis/js-apis-media.md#videoplayer)8+. - -**Change Impacts** - -The original APIs can still be used but are no longer maintained. You are advised to use the new API instead. - -**Key API/Component Changes** - -Added APIs - -| Class | Declaration | -| -------------- | ------------------------------------------------------------ | -| media | createAVPlayer(callback: AsyncCallback\): void | -| media | createAVPlayer() : Promise\ | -| media.AVPlayer | interface AVPlayer | -| media.AVPlayer | videoScaleType ?: VideoScaleType | -| media.AVPlayer | url ?: string | -| media.AVPlayer | surfaceId ?: string | -| media.AVPlayer | stop(callback: AsyncCallback\): void | -| media.AVPlayer | stop(): Promise\ | -| media.AVPlayer | setVolume(volume: number): void | -| media.AVPlayer | setSpeed(speed: PlaybackSpeed): void | -| media.AVPlayer | setBitrate(bitrate: number): void | -| media.AVPlayer | seek(timeMs: number, mode?:SeekMode): void | -| media.AVPlayer | reset(callback: AsyncCallback\): void | -| media.AVPlayer | reset(): Promise\ | -| media.AVPlayer | release(callback: AsyncCallback\): void | -| media.AVPlayer | release(): Promise\ | -| media.AVPlayer | readonly width: number | -| media.AVPlayer | readonly state: AVPlayerState | -| media.AVPlayer | readonly height: number | -| media.AVPlayer | readonly duration: number | -| media.AVPlayer | readonly currentTime: number | -| media.AVPlayer | prepare(callback: AsyncCallback\): void | -| media.AVPlayer | prepare(): Promise\ | -| media.AVPlayer | play(callback: AsyncCallback\): void | -| media.AVPlayer | play(): Promise\ | -| media.AVPlayer | pause(callback: AsyncCallback\): void | -| media.AVPlayer | pause(): Promise\ | -| media.AVPlayer | on(type: 'volumeChange', callback: Callback\): void | -| media.AVPlayer | on(type: 'videoSizeChange', callback: (width: number, height: number) => void): void | -| media.AVPlayer | on(type: 'timeUpdate', callback: Callback\): void | -| media.AVPlayer | on(type: 'stateChange', callback: (state: AVPlayerState, reason: StateChangeReason) => void): void | -| media.AVPlayer | on(type: 'startRenderFrame', callback: Callback\): void | -| media.AVPlayer | on(type: 'speedDone', callback: Callback\): void | -| media.AVPlayer | on(type: 'seekDone', callback: Callback\): void | -| media.AVPlayer | on(type: 'error', callback: ErrorCallback): void | -| media.AVPlayer | on(type: 'endOfStream', callback: Callback\): void | -| media.AVPlayer | on(type: 'durationUpdate', callback: Callback\): void | -| media.AVPlayer | on(type: 'bufferingUpdate', callback: (infoType: BufferingInfoType, value: number) => void): void | -| media.AVPlayer | on(type: 'bitrateDone', callback: Callback\): void | -| media.AVPlayer | on(type: 'availableBitrates', callback: (bitrates: Array\) => void): void | -| media.AVPlayer | on(type: 'audioInterrupt', callback: (info: audio.InterruptEvent) => void): void | -| media.AVPlayer | off(type: 'volumeChange'): void | -| media.AVPlayer | off(type: 'videoSizeChange'): void | -| media.AVPlayer | off(type: 'timeUpdate'): void | -| media.AVPlayer | off(type: 'stateChange'): void | -| media.AVPlayer | off(type: 'startRenderFrame'): void | -| media.AVPlayer | off(type: 'speedDone'): void | -| media.AVPlayer | off(type: 'seekDone'): void | -| media.AVPlayer | off(type: 'error'): void | -| media.AVPlayer | off(type: 'endOfStream'): void | -| media.AVPlayer | off(type: 'durationUpdate'): void | -| media.AVPlayer | off(type: 'bufferingUpdate'): void | -| media.AVPlayer | off(type: 'bitrateDone'): void | -| media.AVPlayer | off(type: 'availableBitrates'): void | -| media.AVPlayer | off(type: 'audioInterrupt'): void | -| media.AVPlayer | loop: boolean | -| media.AVPlayer | getTrackDescription(callback: AsyncCallback\>): void | -| media.AVPlayer | getTrackDescription() : Promise\> | -| media.AVPlayer | fdSrc ?: AVFileDescriptor | -| media.AVPlayer | audioInterruptMode ?: audio.InterruptMode | -| unnamed | type AVPlayerState = 'idle' \| 'initialized' \| 'prepared' \| 'playing' \| 'paused' \| 'completed' \| 'stopped' \| 'released' \| 'error' | - -APIs no longer maintained - -| Class | Declaration | -| ----------------- | ------------------------------------------------------------ | -| media | createVideoPlayer(callback: AsyncCallback\): void | -| media | createVideoPlayer() : Promise\ | -| media | createAudioPlayer(): AudioPlayer | -| media.AudioPlayer | interface AudioPlayer | -| media.AudioPlayer | play(): void | -| media.AudioPlayer | release(): void | -| media.AudioPlayer | audioInterruptMode ?: audio.InterruptMode | -| media.AudioPlayer | fdSrc: AVFileDescriptor | -| media.AudioPlayer | seek(timeMs: number): void | -| media.AudioPlayer | readonly duration: number | -| media.AudioPlayer | loop: boolean | -| media.AudioPlayer | readonly state: AudioState | -| media.AudioPlayer | getTrackDescription(callback: AsyncCallback\>): void | -| media.AudioPlayer | getTrackDescription() : Promise\> | -| media.AudioPlayer | on(type: 'bufferingUpdate', callback: (infoType: BufferingInfoType, value: number) => void): void | -| media.AudioPlayer | on(type: 'play' \| 'pause' \| 'stop' \| 'reset' \| 'dataLoad' \| 'finish' \| 'volumeChange', callback: () => void): void | -| media.AudioPlayer | on(type: 'timeUpdate', callback: Callback\): void | -| media.AudioPlayer | on(type: 'audioInterrupt', callback: (info: audio.InterruptEvent) => void): void | -| media.AudioPlayer | on(type: 'error', callback: ErrorCallback): void | -| media.AudioPlayer | setVolume(vol: number): void | -| media.AudioPlayer | pause(): void | -| media.AudioPlayer | readonly currentTime: number | -| media.AudioPlayer | stop(): void | -| media.AudioPlayer | reset(): void | -| media.AudioPlayer | src: string | -| media.VideoPlayer | interface VideoPlayer | -| media.VideoPlayer | play(callback: AsyncCallback\): void | -| media.VideoPlayer | play(): Promise\ | -| media.VideoPlayer | prepare(callback: AsyncCallback\): void | -| media.VideoPlayer | prepare(): Promise\ | -| media.VideoPlayer | release(callback: AsyncCallback\): void | -| media.VideoPlayer | release(): Promise\ | -| media.VideoPlayer | audioInterruptMode ?: audio.InterruptMode | -| media.VideoPlayer | fdSrc: AVFileDescriptor | -| media.VideoPlayer | seek(timeMs: number, callback: AsyncCallback\): void | -| media.VideoPlayer | seek(timeMs: number, mode:SeekMode, callback: AsyncCallback\): void | -| media.VideoPlayer | seek(timeMs: number, mode?:SeekMode): Promise\ | -| media.VideoPlayer | readonly duration: number | -| media.VideoPlayer | loop: boolean | -| media.VideoPlayer | videoScaleType ?: VideoScaleType | -| media.VideoPlayer | readonly state: VideoPlayState | -| media.VideoPlayer | getTrackDescription(callback: AsyncCallback\>): void | -| media.VideoPlayer | getTrackDescription() : Promise\> | -| media.VideoPlayer | readonly height: number | -| media.VideoPlayer | on(type: 'playbackCompleted', callback: Callback\): void | -| media.VideoPlayer | on(type: 'bufferingUpdate', callback: (infoType: BufferingInfoType, value: number) => void): void | -| media.VideoPlayer | on(type: 'startRenderFrame', callback: Callback\): void | -| media.VideoPlayer | on(type: 'videoSizeChanged', callback: (width: number, height: number) => void): void | -| media.VideoPlayer | on(type: 'audioInterrupt', callback: (info: audio.InterruptEvent) => void): void | -| media.VideoPlayer | on(type: 'error', callback: ErrorCallback): void | -| media.VideoPlayer | setDisplaySurface(surfaceId: string, callback: AsyncCallback\): void | -| media.VideoPlayer | setDisplaySurface(surfaceId: string): Promise\ | -| media.VideoPlayer | setVolume(vol: number, callback: AsyncCallback\): void | -| media.VideoPlayer | setVolume(vol: number): Promise\ | -| media.VideoPlayer | url: string | -| media.VideoPlayer | pause(callback: AsyncCallback\): void | -| media.VideoPlayer | pause(): Promise\ | -| media.VideoPlayer | readonly currentTime: number | -| media.VideoPlayer | setSpeed(speed:number, callback: AsyncCallback\): void | -| media.VideoPlayer | setSpeed(speed:number): Promise\ | -| media.VideoPlayer | stop(callback: AsyncCallback\): void | -| media.VideoPlayer | stop(): Promise\ | -| media.VideoPlayer | readonly width: number | -| media.VideoPlayer | reset(callback: AsyncCallback\): void | -| media.VideoPlayer | reset(): Promise\ | -| unnamed | type AudioState = 'idle' \| 'playing' \| 'paused' \| 'stopped' \| 'error' | -| unnamed | type VideoPlayState = 'idle' \| 'prepared' \| 'playing' \| 'paused' \| 'stopped' \| 'error' | - -**Adaptation Guide** - -For details, see the [reference](../../../application-dev/reference/apis/js-apis-media.md) for each API. - -## cl.media.2 API Change of the Recording Function - -Added the [AVRecorder](../../../application-dev/reference/apis/js-apis-media.md#avrecorder9)9+ API for audio and video recording, with the updated state machine and error codes, which is recommended. The following APIs for audio recording and video recording are no longer maintained: [AudioRecorder](../../../application-dev/reference/apis/js-apis-media.md#audiorecorder)6+ and [VideoRecorder](../../../application-dev/reference/apis/js-apis-media.md#videorecorder9)9+. - -The [AudioSourceType](../../../application-dev/reference/apis/js-apis-media.md#audiosourcetype9) and [VideoSourceType](../../../application-dev/reference/apis/js-apis-media.md#videosourcetype9) APIs shared by the old and new recording APIs are changed to non-system APIs. - -**Change Impacts** - -The [AudioRecorder](../../../application-dev/reference/apis/js-apis-media.md#audiorecorder)6+ and [VideoRecorder](../../../application-dev/reference/apis/js-apis-media.md#videorecorder9)9+ APIs can still be used but are no longer maintained. You are advised to use the [AVRecorder](../../../application-dev/reference/apis/js-apis-media.md#avrecorder9)9+ API instead. - -**Key API/Component Changes** - -Added APIs - -| Class | Declaration | -| ----------------------- | ------------------------------------------------------------ | -| media | createAVRecorder(callback: AsyncCallback\): void | -| media | createAVRecorder() : Promise\ | -| media.AVRecorder | interface AVRecorder | -| media.AVRecorder | prepare(config: AVRecorderConfig, callback: AsyncCallback\): void | -| media.AVRecorder | prepare(config: AVRecorderConfig): Promise\ | -| media.AVRecorder | release(callback: AsyncCallback\): void | -| media.AVRecorder | release(): Promise\ | -| media.AVRecorder | readonly state: AVRecorderState | -| media.AVRecorder | on(type: 'stateChange', callback: (state: AVRecorderState, reason: StateChangeReason) => void): void | -| media.AVRecorder | on(type: 'error', callback: ErrorCallback): void | -| media.AVRecorder | resume(callback: AsyncCallback\): void | -| media.AVRecorder | resume(): Promise\ | -| media.AVRecorder | start(callback: AsyncCallback\): void | -| media.AVRecorder | start(): Promise\ | -| media.AVRecorder | off(type: 'stateChange'): void | -| media.AVRecorder | off(type: 'error'): void | -| media.AVRecorder | pause(callback: AsyncCallback\): void | -| media.AVRecorder | pause(): Promise\ | -| media.AVRecorder | stop(callback: AsyncCallback\): void | -| media.AVRecorder | stop(): Promise\ | -| media.AVRecorder | reset(callback: AsyncCallback\): void | -| media.AVRecorder | reset(): Promise\ | -| media.AVRecorder | getInputSurface(callback: AsyncCallback\): void | -| media.AVRecorder | getInputSurface(): Promise\ | -| media.AVRecorderConfig | videoSourceType?: VideoSourceType | -| media.AVRecorderConfig | audioSourceType?: AudioSourceType | -| media.AVRecorderConfig | profile: AVRecorderProfile | -| media.AVRecorderConfig | rotation?: number | -| media.AVRecorderConfig | url: string | -| media.AVRecorderConfig | location?: Location | -| media.AVRecorderConfig | interface AVRecorderConfig | -| media.AVRecorderProfile | videoBitrate?: number | -| media.AVRecorderProfile | videoCodec?: CodecMimeType | -| media.AVRecorderProfile | audioCodec?: CodecMimeType | -| media.AVRecorderProfile | videoFrameRate?: number | -| media.AVRecorderProfile | videoFrameHeight?: number | -| media.AVRecorderProfile | audioSampleRate?: number | -| media.AVRecorderProfile | audioBitrate?: number | -| media.AVRecorderProfile | videoFrameWidth?: number | -| media.AVRecorderProfile | audioChannels?: number | -| media.AVRecorderProfile | fileFormat: ContainerFormatType | -| media.AVRecorderProfile | interface AVRecorderProfile | -| unnamed | type AVRecorderState = 'idle' \| 'prepared' \| 'started' \| 'paused' \| 'stopped' \| 'released' \| 'error' | - -APIs no longer maintained - -| Class | Declaration | -| -------------------------- | ------------------------------------------------------------ | -| media | createVideoRecorder(callback: AsyncCallback\): void | -| media | createVideoRecorder(): Promise\ | -| media | createAudioRecorder(): AudioRecorder | -| media.AudioRecorder | interface AudioRecorder | -| media.AudioRecorder | prepare(config: AudioRecorderConfig): void | -| media.AudioRecorder | release(): void | -| media.AudioRecorder | on(type: 'prepare' \| 'start' \| 'pause' \| 'resume' \| 'stop' \| 'release' \| 'reset', callback: () => void): void | -| media.AudioRecorder | on(type: 'error', callback: ErrorCallback): void | -| media.AudioRecorder | resume(): void | -| media.AudioRecorder | start(): void | -| media.AudioRecorder | pause(): void | -| media.AudioRecorder | stop(): void | -| media.AudioRecorder | reset(): void | -| media.AudioRecorderConfig | audioSampleRate?: number | -| media.AudioRecorderConfig | location?: Location | -| media.AudioRecorderConfig | fileFormat?: ContainerFormatType | -| media.AudioRecorderConfig | interface AudioRecorderConfig | -| media.AudioRecorderConfig | audioEncoder?: AudioEncoder | -| media.AudioRecorderConfig | audioEncodeBitRate?: number | -| media.AudioRecorderConfig | numberOfChannels?: number | -| media.AudioRecorderConfig | format?: AudioOutputFormat | -| media.AudioRecorderConfig | uri: string | -| media.AudioRecorderConfig | audioEncoderMime?: CodecMimeType | -| media.VideoRecorder | interface VideoRecorder | -| media.VideoRecorder | prepare(config: VideoRecorderConfig, callback: AsyncCallback\): void | -| media.VideoRecorder | prepare(config: VideoRecorderConfig): Promise\ | -| media.VideoRecorder | release(callback: AsyncCallback\): void | -| media.VideoRecorder | release(): Promise\ | -| media.VideoRecorder | readonly state: VideoRecordState | -| media.VideoRecorder | on(type: 'error', callback: ErrorCallback): void | -| media.VideoRecorder | resume(callback: AsyncCallback\): void | -| media.VideoRecorder | resume(): Promise\ | -| media.VideoRecorder | start(callback: AsyncCallback\): void | -| media.VideoRecorder | start(): Promise\ | -| media.VideoRecorder | pause(callback: AsyncCallback\): void | -| media.VideoRecorder | pause(): Promise\ | -| media.VideoRecorder | stop(callback: AsyncCallback\): void | -| media.VideoRecorder | stop(): Promise\ | -| media.VideoRecorder | reset(callback: AsyncCallback\): void | -| media.VideoRecorder | reset(): Promise\ | -| media.VideoRecorder | getInputSurface(callback: AsyncCallback\): void | -| media.VideoRecorder | getInputSurface(): Promise\ | -| media.VideoRecorderConfig | videoSourceType: VideoSourceType | -| media.VideoRecorderConfig | audioSourceType?: AudioSourceType | -| media.VideoRecorderConfig | profile: VideoRecorderProfile | -| media.VideoRecorderConfig | rotation?: number | -| media.VideoRecorderConfig | url: string | -| media.VideoRecorderConfig | location?: Location | -| media.VideoRecorderConfig | interface VideoRecorderConfig | -| media.VideoRecorderProfile | readonly videoBitrate: number | -| media.VideoRecorderProfile | readonly videoCodec: CodecMimeType | -| media.VideoRecorderProfile | readonly audioCodec: CodecMimeType | -| media.VideoRecorderProfile | readonly videoFrameRate: number | -| media.VideoRecorderProfile | readonly videoFrameHeight: number | -| media.VideoRecorderProfile | readonly audioSampleRate: number | -| media.VideoRecorderProfile | readonly audioBitrate: number | -| media.VideoRecorderProfile | readonly videoFrameWidth: number | -| media.VideoRecorderProfile | readonly audioChannels: number | -| media.VideoRecorderProfile | readonly fileFormat: ContainerFormatType | -| media.VideoRecorderProfile | interface VideoRecorderProfile | -| unnamed | type VideoRecordState = 'idle' \| 'prepared' \| 'playing' \| 'paused' \| 'stopped' \| 'error' | - -Changed APIs - -| Class | Declaration | Capability Before Change | Capability After Change | Whether a System API Before Change| Whether a System API After Change| -| --------------------- | ------------------------------------------------------------ | ----------------------------------------------- | -------------------------------------------- | -------------------- | -------------------- | -| media.AudioSourceType | enum AudioSourceType { /** * default audio source type. * @since 9 * @syscap SystemCapability.Multimedia.Media.AVRecorder */ AUDIO_SOURCE_TYPE_DEFAULT = 0, /** * source type mic. * @since 9 * @syscap SystemCapability.Multimedia.Media.AVRecorder */ AUDIO_SOURCE_TYPE_MIC = 1, } | SystemCapability.Multimedia.Media.VideoRecorder | SystemCapability.Multimedia.Media.AVRecorder | Yes | No | -| media.VideoSourceType | enum VideoSourceType { /** * surface raw data. * @since 9 * @syscap SystemCapability.Multimedia.Media.AVRecorder */ VIDEO_SOURCE_TYPE_SURFACE_YUV = 0, /** * surface ES data. * @since 9 * @syscap SystemCapability.Multimedia.Media.AVRecorder */ VIDEO_SOURCE_TYPE_SURFACE_ES = 1, } | SystemCapability.Multimedia.Media.VideoRecorder | SystemCapability.Multimedia.Media.AVRecorder | Yes | No | - -**Adaptation Guide** - -For details, see the [reference](../../../application-dev/reference/apis/js-apis-media.md) for each API. - -## cl.media.3 Error Code Change - -Added the standard error code enumeration type [AVErrorCode9](../../../application-dev/reference/apis/js-apis-media.md#averrorcode)9+ that replaces the original error code enumeration type [MediaErrorCode](../../../application-dev/reference/apis/js-apis-media.md#mediaerrorcode)8+. - -**Change Impacts** - -The error code enumeration type [MediaErrorCode](../../../application-dev/reference/apis/js-apis-media.md#mediaerrorcode)8+ is still used for original APIs. [AVErrorCode9](../../../application-dev/reference/apis/js-apis-media.md#averrorcode)9+ is used for newly added APIs. - -**Key API/Component Changes** - -Added API - -| Class | Declaration | -| ----------------- | ------------------------------------------------------------ | -| media.AVErrorCode | enum AVErrorCode { /** * operation success. * @since 9 * @syscap SystemCapability.Multimedia.Media.Core */ AVERR_OK = 0, /** * permission denied. * @since 9 * @syscap SystemCapability.Multimedia.Media.Core */ AVERR_NO_PERMISSION = 201, /** * invalid parameter. * @since 9 * @syscap SystemCapability.Multimedia.Media.Core */ AVERR_INVALID_PARAMETER = 401, /** * the api is not supported in the current version * @since 9 * @syscap SystemCapability.Multimedia.Media.Core */ AVERR_UNSUPPORT_CAPABILITY = 801, /** * the system memory is insufficient or the number of services reaches the upper limit * @since 9 * @syscap SystemCapability.Multimedia.Media.Core */ AVERR_NO_MEMORY = 5400101, /** * current status does not allow or do not have permission to perform this operation * @since 9 * @syscap SystemCapability.Multimedia.Media.Core */ AVERR_OPERATE_NOT_PERMIT = 5400102, /** * data flow exception information * @since 9 * @syscap SystemCapability.Multimedia.Media.Core */ AVERR_IO = 5400103, /** * system or network response timeout. * @since 9 * @syscap SystemCapability.Multimedia.Media.Core */ AVERR_TIMEOUT = 5400104, /** * service process died. * @since 9 * @syscap SystemCapability.Multimedia.Media.Core */ AVERR_SERVICE_DIED = 5400105, /** * unsupported media format * @since 9 * @syscap SystemCapability.Multimedia.Media.Core */ AVERR_UNSUPPORT_FORMAT = 5400106, } | - -API no longer maintained - -| Class | Declaration | -| -------------------- | ------------------------------------------------------------ | -| media.MediaErrorCode | enum MediaErrorCode { /** * operation success. * @since 8 * @syscap SystemCapability.Multimedia.Media.Core */ MSERR_OK = 0, /** * malloc or new memory failed. maybe system have no memory. * @since 8 * @syscap SystemCapability.Multimedia.Media.Core */ MSERR_NO_MEMORY = 1, /** * no permission for the operation. * @since 8 * @syscap SystemCapability.Multimedia.Media.Core */ MSERR_OPERATION_NOT_PERMIT = 2, /** * invalid argument. * @since 8 * @syscap SystemCapability.Multimedia.Media.Core */ MSERR_INVALID_VAL = 3, /** * an I/O error occurred. * @since 8 * @syscap SystemCapability.Multimedia.Media.Core */ MSERR_IO = 4, /** * operation time out. * @since 8 * @syscap SystemCapability.Multimedia.Media.Core */ MSERR_TIMEOUT = 5, /** * unknown error. * @since 8 * @syscap SystemCapability.Multimedia.Media.Core */ MSERR_UNKNOWN = 6, /** * media service died. * @since 8 * @syscap SystemCapability.Multimedia.Media.Core */ MSERR_SERVICE_DIED = 7, /** * operation is not permit in current state. * @since 8 * @syscap SystemCapability.Multimedia.Media.Core */ MSERR_INVALID_STATE = 8, /** * operation is not supported in current version. * @since 8 * @syscap SystemCapability.Multimedia.Media.Core */ MSERR_UNSUPPORTED = 9, } | - - \ No newline at end of file diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-testfwk_arkxtest.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-testfwk_arkxtest.md deleted file mode 100644 index 1206d659402df80e9892ca3e7b4eba1e729c9357..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-testfwk_arkxtest.md +++ /dev/null @@ -1,42 +0,0 @@ -# Test Subsystem ChangeLog - -## cl.testfwk_arkxtest.1 API Name Change of Rect - -The definition of **Rect**, an enumeration type that indicates the component bound information, is changed since version 4.0.2.1. - -## Change Impacts - -This change affects the **Rect** API provided by **@ohos.uitest**. If you have used the **Rect** API of **@ohos.uitest-api9** during test case development, adaptation is required so that the compilation can be successful in the SDK environment of the new version. - -## Key API/Component Changes - -### Rect9+ - -Before change - -| Name | Value | Description | -| ------- | ---- | ------------------------- | -| leftX | 1 | X-coordinate of the upper left corner of the component bounds.| -| topY | 2 | Y-coordinate of the upper left corner of the component bounds.| -| rightX | 3 | X-coordinate of the lower right corner of the component bounds.| -| bottomY | 4 | Y-coordinate of the lower right corner of the component bounds.| - -After change - -| Name | Value | Description | -| ------ | ---- | ------------------------- | -| left | 1 | X-coordinate of the upper left corner of the component bounds.| -| top | 2 | Y-coordinate of the upper left corner of the component bounds.| -| right | 3 | X-coordinate of the lower right corner of the component bounds.| -| bottom | 4 | Y-coordinate of the lower right corner of the component bounds.| - -## Adaptation Guide - -### Adaptation to the API Name Change - -You can replace the class name according to the following rules: - -- `leftX-->left` -- `topY-->top` -- `rightX-->right` -- `bottomY-->bottom` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-usb.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-usb.md deleted file mode 100644 index 4802e2b0ab8c74e9fabe42238cf13e95a8657599..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-usb.md +++ /dev/null @@ -1,28 +0,0 @@ -# USB Subsystem API Changelog - -## cl.usb_manager.1 System API Change - -Runtime authentication is performed for system APIs of the USB manager. An asynchronous API throws an error code via **Promise.reject**. - -If your application is developed based on earlier versions, modify the return values of functions. Otherwise, the original service logic will be affected. - -**Key API/Component Changes** - -| Bundle Name | Original API | New API | -| --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| ohos.usbV9.d.ts | function setCurrentFunctions(funcs: FunctionType): Promise; | function setCurrentFunctions(funcs: FunctionType): Promise; | -| ohos.usbV9.d.ts | function setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise; | function setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise; | - -## cl.usb_manager.2 SDK API Deletion - -The **@ohos.usbV9.d.ts** file was deleted in OpenHarmony 4.0.5.5. - -You need to import **@ohos.usbManager** to use USB service APIs. - - ```ts - import usbManager from '@ohos.usbManager'; - ``` - -**Adaptation Guide** - -For details about usage of each API, see the [API Reference](../../../application-dev/reference/apis/js-apis-usbManager.md). diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelog-web.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelog-web.md deleted file mode 100644 index 26713e17d3561260b45b3b0da193693610e245c7..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelog-web.md +++ /dev/null @@ -1,63 +0,0 @@ -# Web Subsystem Changelog - -Compared with earlier versions, OpenHarmony 4.0.2.2 has the following API changes in its web subsystem: - -## cl.web.1 Removal of webDebuggingAccess - -The definition of the **webDebuggingAccess** API is inappropriate. This API should take effect for all **Web** instances. In light of this, it is removed and replaced by the new API **setWebDebuggingAccess**. - -**Change Impacts** - -This API must be deprecated and replaced with the **setWebDebuggingAccess** API. - -**Key API/Component Changes** - -| Class| API Type| Declaration| Change Type| -| -- | -- | -- | -- | -|WebAttribute | method | webDebugggingAccess(webDebugggingAccess: boolean): WebAttribute| Deleted | - -**Adaptation Guide** - -Use the new API **setWebDebuggingAccess**. - -## cl.web.2 Adding of setWebDebuggingAccess - -Added the static API **setWebDebuggingAccess** to **WebviewController**. It sets whether to enable web debugging works for all **Web** instances. - -**Change Impacts** - -The original **webDebugggingAccess** API must be replaced with the new API in the application. - -**Key API/Component Changes** - -| Class| API Type| Declaration| Change Type| -| -- | -- | -- | -- | -|webview.WebviewController | method | static setWebDebugggingAccess(webDebugggingAccess: boolean): void| Added| - -**Adaptation Guide** - -The following exemplifies how to enable web debugging: - -```ts -// xxx.ets -import web_webview from '@ohos.web.webview'; - -@Entry -@Component -struct WebComponent { - controller: web_webview.WebviewController = new web_webview.WebviewController(); - - aboutToAppear():void { - try { - web_webview.WebviewController.setWebDebuggingAccess(true); - } catch(error) { - console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); - } - } - - build() { - Column() { - Web({ src: 'www.example.com', controller: this.controller }) - } - } -} diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelogs-bundlemanager.md deleted file mode 100644 index f41df5b62252f03508110ed8931d47e6198b8b61..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelogs-bundlemanager.md +++ /dev/null @@ -1,14 +0,0 @@ -# Bundle Management Subsystem Changelog - -## cl.bundlemanager.1 Changed Underlying Capability by Not Decompressing the HAP During HAP Installation - -The HAP will no longer be decompressed during installation. After the installation is complete, only the HAP file exists in the installation directory. As a result, the application must use the standard resource management interface, rather than a combined path, to access a resource file. - -**Change Impact**
-If the application uses a combined path to access a resource file, the access fails. It must use the resource management interface. - -**Key API/Component Changes**
-No API or component change is involved. - -**Adaptation Guide**
-The resource management subsystem provides the JS interface for accessing resource files. Reference: [Accessing Resource Files](../../../application-dev/reference/apis/js-apis-resource-manager.md#getrawfilecontent9) diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelogs-global.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelogs-global.md deleted file mode 100644 index e6e84330a176fb8e06a5a7a4dc626aba84b362ef..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelogs-global.md +++ /dev/null @@ -1,57 +0,0 @@ -# Globalization Subsystem Changelog - -## cl.resourceManager.1 Change in the Meaning of the Return Value for the API Used to Obtain the rawfile Descriptor - -Changed the meaning of the return value for the API used to obtain the rawfile descriptor after the non-decompression feature is added in this version. The change in the meaning of the return value, namely, **descriptor: RawFileDescriptor {fd, offset, length}**, is described as follows: - -**Before change:** - -**fd**: file descriptor for accessing the rawfile. - -**offset**: offset for accessing the rawfile. In this case, the value is **0**. - -**length**: size of the rawfile to access. - -**After change:** - -**fd**: file descriptor for accessing the HAP where the rawfile is located. - -**offset**: offset of the accessed rawfile relative to the HAP. - -**length**: size of the rawfile to access. - -**Change Impact** - -In versions earlier than 4.0.2.2, the rawfile can be accessed only through **fd**. In version 4.0.2.2 or later, the rawfile can be accessed only through **{fd, offset, and length}**. - -**Key API/Component Changes** - -| **Original API** | -| ---------------- | -| getRawFd(path: string, callback: AsyncCallback\): void | -| getRawFd(path: string): Promise\ | -| getRawFileDescriptor(path: string, callback: AsyncCallback\): void| -| getRawFileDescriptor(path: string): Promise\| -|| - -**Sample Code** - -The following is an example of calling the **getRawFd** API: -``` -try { - this.context.resourceManager.getRawFd("test.ogg", (error, value) => { - if (error != null) { - console.log(`callback getRawFd failed error code: ${error.code}, message: ${error.message}.`); - } else { - let fileDescriptor = { - fd = value.fd, - offset = value.offset, - length = value.length - } - this.avPlayer.fdSrc(fileDescriptor); // Take the audio player as an example. When calling fdSrc, pass fileDescriptor in addition to fd. - } - }); - } catch (error) { - console.error(`callback getRawFd failed, error code: ${error.code}, message: ${error.message}.`) - }; -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-ability.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-ability.md deleted file mode 100644 index 8558a1379ee2f6749b413e91d1af242b7e5577e5..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-ability.md +++ /dev/null @@ -1,36 +0,0 @@ -# Ability Subsystem Changelog - -## cl.ability.1 RestartFlag Attribute Names Changed and Unsupported Attribute Deleted in appRecovery - -In the **appRecovery** API, the enum names of **RestartFlag** are changed from **NO_RESTART** upon a specific fault to **RESTART** upon a specific fault. -The **CPP_CRASH_NO_RESTART** enum is deleted. - -**Change Impact** - -If your application uses the **CPP_CRASH_NO_RESTART**, **JS_CRASH_NO_RESTART**, or **APP_FREEZE_NO_RESTART** attribute in versions earlier than 4.0.2.3, its behavior will change after an upgrade to 4.0.2.3. - -**Key API/Component Changes** - -**RestartFlag** 9+ - -Before change: -| Name | Value | Description | -| ----------------------------- | ---- | ------------------------------------------------------------ | -| ALWAYS_RESTART | 0 | The application is restarted in all cases.| -| CPP_CRASH_NO_RESTART | 0x0001 | The application is **not restarted** in the case of CPP_CRASH.| -| JS_CRASH_NO_RESTART | 0x0002 | The application is **not restarted** in the case of JS_CRASH.| -| APP_FREEZE_NO_RESTART | 0x0004 | The application is **not restarted** in the case of APP_FREEZE.| -| NO_RESTART | 0xFFFF | The application is not restarted in any case.| - -After change: -| Name | Value | Description | -| ---------- | ---- | ---------- | -| ALWAYS_RESTART | 0 | The application is restarted in all cases.| -| CPP_CRASH_NO_RESTART | NA | **Deleted.** The restart in this scenario is not supported.| -| RESTART_WHEN_JS_CRASH | 0x0001 | The application is **restarted** in the case of JS_CRASH.| -| RESTART_WHEN_APP_FREEZE | 0x0002 | The application is **restarted** in the case of APP_FREEZE.| -| NO_RESTART | 0xFFFF | The application is not restarted in any case.| - -**Adaptation Guide** - -Perform adaptation based on the new semantics. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-ans.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-ans.md deleted file mode 100644 index e33e0729c2726f145a754888b6e3b97911f9b2ae..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-ans.md +++ /dev/null @@ -1,20 +0,0 @@ -# ANS Subsystem Changelog - -## cl.notificationManager.1 API Renaming - -Renamed certain APIs to meet the naming conventions. - -**Change Impact** - -The underlying layer still supports the functions of the original APIs, and therefore these APIs can be called in OpenHarmony 4.0.2.3. - -**Key API/Component Changes** - -| Bundle Name | Original API | New API | -| --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| ohos.notificationManager.d.ts | **function** supportDoNotDisturbMode(callback: AsyncCallback\): **void**; | **function** isSupportDoNotDisturbMode(callback: AsyncCallback\): **void**; | -| ohos.notificationManager.d.ts | **function** supportDoNotDisturbMode(): Promise\; | **function** isSupportDoNotDisturbMode(): Promise\; | - -**Adaptation Guide** - -Call the new API **isSupportDoNotDisturbMode**. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-arkui.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-arkui.md deleted file mode 100644 index cb91d8c6854e5a39c552f2cb3016d671aa0664c5..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-arkui.md +++ /dev/null @@ -1,356 +0,0 @@ -# ArkUI Subsystem ChangeLog - -## cl.arkui.1 Restrictions on Data Type Declarations of State Variables - -1. The data types of state variables decorated by state decorators must be explicitly declared. They cannot be declared as **any** or **Date**. - - Example: - - ```ts - // xxx.ets - @Entry - @Component - struct DatePickerExample { - // Incorrect: @State isLunar: any = false - @State isLunar: boolean = false - // Incorrect: @State selectedDate: Date = new Date('2021-08-08') - private selectedDate: Date = new Date('2021-08-08') - - build() { - Column() { - Button('Switch Calendar') - .margin({ top: 30 }) - .onClick(() => { - this.isLunar = !this.isLunar - }) - DatePicker({ - start: new Date('1970-1-1'), - end: new Date('2100-1-1'), - selected: this.selectedDate - }) - .lunar(this.isLunar) - .onChange((value: DatePickerResult) => { - this.selectedDate.setFullYear(value.year, value.month, value.day) - console.info('select current date is: ' + JSON.stringify(value)) - }) - - }.width('100%') - } - } - ``` - - ![datePicker](../../../application-dev/reference/arkui-ts/figures/datePicker.gif) - -2. The data type declaration of the **@State**, **@Provide**, **@Link**, or **@Consume** decorated state variables can consist of only one of the primitive data types or reference data types. - - The **Length**, **ResourceStr**, and **ResourceColor** types are combinations of primitive data types or reference data types. Therefore, they cannot be used by the aforementioned types of state variables. - For details about the definitions of **Length**, **ResourceStr**, and **ResourceColor**, see [Types](../../../application-dev/reference/arkui-ts/ts-types.md). - - Example: - - ```ts - // xxx.ets - @Entry - @Component - struct IndexPage { - // Incorrect: @State message: string | Resource = 'Hello World' - @State message: string = 'Hello World' - // Incorrect: @State message: ResourceStr = $r('app.string.hello') - @State resourceStr: Resource = $r('app.string.hello') - - build() { - Row() { - Column() { - Text(`${this.message}`) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } - } - ``` - - ![hello](../../../application-dev/quick-start/figures/hello.PNG) - -**Change Impacts** - -1. If the data type of a state variable decorated by a state decorator is declared as **any**, a build error will occur. - ```ts - // ArkTS:ERROR Please define an explicit type, not any. - @State isLunar: any = false - ``` -2. If the data type of a state variable decorated by a state decorator is declared as **Date**, a build error will occur. - ```ts - // ArkTS:ERROR The @State property 'selectedDate' cannot be a 'Date' object. - @State selectedDate: Date = new Date('2021-08-08') - ``` -3. If the data type of a **@State**, **@Provide**, **@Link**, and or **@Consume** decorated state variable is Length, **ResourceStr**, or **ResourceColor**, a build error will occur. - ```ts - /* ArkTS:ERROR The state variable type here is 'ResourceStr', it contains both a simple type and an object type, - which are not allowed to be defined for state variable of a struct.*/ - @State message: ResourceStr = $r('app.string.hello') - ``` - -**Key API/Component Changes** - -N/A - -**Adaptation Guide** - -1. Explicitly declare the data type for state variables decorated by state decorators. -2. If a state variable decorated by a state decorator uses the **Date** object, change it to a regular variable – a variable not decorated by any decorator. -3. - Adapt the **@State**, **@Provide**, **@Link**, and **@Consume** decorated variables based on the following code snippet so that they do not use the **Length(string|number|Resource)**, **ResourceStr(string|Resource)**, and **ResourceColor(string|number|Color|Resource)** types: - ```ts - // Incorrect: - @State message: ResourceStr = $r('app.string.hello') - // Corrected: - @State resourceStr: Resource = $r('app.string.hello') - ``` - -## cl.arkui.2 Initialization Rules and Restrictions of Custom Components' Member Variables - -Comply with the following rules when using constructors to initialize member variables: - -| **From the Variable in the Parent Component (Right) to the Variable in the Child Component (Below)**| **regular** | **@State** | **@Link** | **@Prop** | **@Provide** | **@Consume** | **@ObjectLink** | -|---------------------------------|----------------------------|------------|-----------|-----------|--------------|--------------|------------------| -| **regular** | Supported | Supported | Supported | Supported | Not supported | Not supported | Supported | -| **@State** | Supported | Supported | Supported | Supported | Supported | Supported | Supported | -| **@Link** | Not supported | Supported (1) | Supported (1) | Supported (1) | Supported (1) | Supported (1) | Supported (1) | -| **@Prop** | Supported | Supported | Supported | Supported | Supported | Supported | Supported | -| **@Provide** | Supported | Supported | Supported | Supported | Supported | Supported | Supported | -| **@Consume** | Not supported | Not supported | Not supported | Not supported | Not supported | Not supported | Not supported | -| **@ObjectLink** | Not supported | Not supported | Not supported | Not supported | Not supported | Not supported | Not supported | - -| **From the Variable in the Parent Component (Right) to the Variable in the Child Component (Below)**| **@StorageLink** | **@StorageProp** | **@LocalStorageLink** | **@LocalStorageProp** | -|------------------|------------------|------------------|-----------------------|------------------------| -| **regular** | Supported | Not supported | Not supported | Not supported | -| **@State** | Supported | Supported | Supported | Supported | -| **@Link** | Supported (1) | Supported (1) | Supported (1) | Supported (1) | -| **@Prop** | Supported | Supported | Supported | Supported | -| **@Provide** | Supported | Supported | Supported | Supported | -| **@Consume** | Not supported | Not supported | Not supported | Not supported | -| **@ObjectLink** | Not supported | Not supported | Not supported | Not supported | - -> **NOTE** -> -> **Supported (1)**: The dollar sign ($) must be used, for example, **this.$varA**. -> -> **regular**: refers to a regular variable that is not decorated by any decorator. - -**@StorageLink**, **@StorageProp**, **@LocalStorageLink**, and **@LocalStorageProp** variables cannot be initialized from the parent component. - -**Change Impacts** - -1. Variables decorated by **@LocalStorageLink** and **@LocalStorageProp** cannot be initialized from the parent component. - ```ts - @Entry - @Component - struct LocalStorageComponent { - build() { - Column() { - Child({ - /* ArkTS:ERROR Property 'simpleVarName' in the custom component 'Child' cannot - initialize here (forbidden to specify). */ - simpleVarName: 1, - /* ArkTS:ERROR Property 'objectName' in the custom component 'Child' cannot - initialize here (forbidden to specify). */ - objectName: new ClassA("x") - }) - } - } - } - @Component - struct Child { - @LocalStorageLink("storageSimpleProp") simpleVarName: number = 0; - @LocalStorageProp("storageObjectProp") objectName: ClassA = new ClassA("x"); - build() {} - } - ``` -2. The **@ObjectLink** decorated variable cannot be directly initialized from a decorated variable in the parent component. The source of the parent component must be an array item or object attribute decorated by **@State**, **@Link**, **@Provide**, **@Consume**, or **@ObjectLink**. - ```ts - let NextID : number = 0; - - @Observed class ClassA { - public id : number; - public c: number; - constructor(c: number) { - this.id = NextID++; - this.c = c; - } - } - - @Component - struct Child { - @ObjectLink varA : ClassA; - build() { - Row() { - Text('ViewA-' + this.varA.id) - } - } - } - - @Component - struct Parent { - @Link linkValue: ClassA - build() { - Column() { - /* ArkTS:ERROR The @Link property 'linkValue' cannot be assigned to - the @ObjectLink property 'varA'.*/ - Child({ varA: this.linkValue }) - } - } - } - ``` - -**Key API/Component Changes** - -N/A - -**Adaptation Guide** -1. When building a child component, do not perform the build on the variables decorated by **@LocalStorageLink** and **@LocalStorageProp** in the child component. - - To change these variables from the parent component, use the API provided by the **LocalStorage** (such as the **set** API) to assign values to them. - -2. For details about how to use **@ObjectLink**, see [@Observed and @ObjectLink](../../../application-dev/quick-start/arkts-observed-and-objectlink.md). - -## cl.arkui.3 Change of the onScrollBegin Event of the \ and \ Components - -The **onScrollBegin** event of the **\** and **\** components is renamed **onScrollFrameBegin**. In the **onScrollBegin** event, the amount to scroll by is indicated by the **dx** and **dy** parameters. In the **onScrollFrameBegin** event, it is indicated by the **offset** parameter. The **onScrollFrameBegin** event adds the **ScrollState** parameter to indicate whether the component is in the finger dragging or inertial scrolling state. - -**Change Impacts** - -The **onScrollBegin** event is deprecated and must be replaced with the **onScrollFrameBegin** event. - -**Key API/Component Changes** - -| Old Event | New Event | -|------------------ | ------------------- | -| onScrollBegin(event: (dx: number, dy: number) => { dxRemain: number, dyRemain: number }) | onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }) | - -For details about the **onScrollFrameBegin** event, see the following: -- [Scroll](../../../application-dev/reference/arkui-ts/ts-container-scroll.md#events) -- [List](../../../application-dev/reference/arkui-ts/ts-container-list.md#events) - -**Adaptation Guide** - -Switch the event from **onScrollBegin** to **onScrollFrameBegin**, and use the **offset** parameter in **onScrollFrameBegin**, rather than the **dx** and **dy** parameters in **onScrollBegin**, to indicate the amount to scroll by. - -Example of using the **onScrollBegin** event: -```ts -@Entry -@Component -struct NestedScroll { - @State listPosition: number = 0; // 0 indicates scrolling to the top of the list, 1 indicates scrolling to the middle of the list, and 2 indicates scrolling to the bottom of the list. - private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - private scrollerForScroll: Scroller = new Scroller() - private scrollerForList: Scroller = new Scroller() - - build() { - Flex() { - Scroll(this.scrollerForScroll) { - Column() { - Text("Scroll Area") - .width("100%").height("40%").backgroundColor(0X330000FF) - .fontSize(16).textAlign(TextAlign.Center) - .onClick(() => { - this.scrollerForList.scrollToIndex(5) - }) - - List({ space: 20, scroller: this.scrollerForList }) { - ForEach(this.arr, (item) => { - ListItem() { - Text("ListItem" + item) - .width("100%").height("100%").borderRadius(15) - .fontSize(16).textAlign(TextAlign.Center).backgroundColor(Color.White) - }.width("100%").height(100) - }, item => item) - } - .width("100%") - .height("50%") - .edgeEffect(EdgeEffect.None) - .onReachStart(() => { - this.listPosition = 0 - }) - .onReachEnd(() => { - this.listPosition = 2 - }) - .onScrollBegin((dx: number, dy: number) => { - if ((this.listPosition == 0 && dy >= 0) || (this.listPosition == 2 && dy <= 0)) { - this.scrollerForScroll.scrollBy(0, -dy) - return { dxRemain: dx, dyRemain: 0 } - } - this.listPosition = 1 - return { dxRemain: dx, dyRemain: dy }; - }) - - Text("Scroll Area") - .width("100%").height("40%").backgroundColor(0X330000FF) - .fontSize(16).textAlign(TextAlign.Center) - } - } - .width("100%").height("100%") - }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) - } -} -``` -Example of using the **onScrollFrameBegin** event: -```ts -@Entry -@Component -struct NestedScroll { - @State listPosition: number = 0; // 0 indicates scrolling to the top of the list, 1 indicates scrolling to the middle of the list, and 2 indicates scrolling to the bottom of the list. - private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - private scrollerForScroll: Scroller = new Scroller() - private scrollerForList: Scroller = new Scroller() - - build() { - Flex() { - Scroll(this.scrollerForScroll) { - Column() { - Text("Scroll Area") - .width("100%").height("40%").backgroundColor(0X330000FF) - .fontSize(16).textAlign(TextAlign.Center) - .onClick(() => { - this.scrollerForList.scrollToIndex(5) - }) - - List({ space: 20, scroller: this.scrollerForList }) { - ForEach(this.arr, (item) => { - ListItem() { - Text("ListItem" + item) - .width("100%").height("100%").borderRadius(15) - .fontSize(16).textAlign(TextAlign.Center).backgroundColor(Color.White) - }.width("100%").height(100) - }, item => item) - } - .width("100%") - .height("50%") - .edgeEffect(EdgeEffect.None) - .onReachStart(() => { - this.listPosition = 0 - }) - .onReachEnd(() => { - this.listPosition = 2 - }) - .onScrollFrameBegin((offset: number, state: ScrollState) => { - if ((this.listPosition == 0 && offset >= 0) || (this.listPosition == 2 && offset <= 0)) { - this.scrollerForScroll.scrollBy(0, -offset) - return { offsetRemain: 0 } - } - this.listPosition = 1 - return { offsetRemain: offset }; - }) - - Text("Scroll Area") - .width("100%").height("40%").backgroundColor(0X330000FF) - .fontSize(16).textAlign(TextAlign.Center) - } - } - .width("100%").height("100%") - }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) - } -} -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-usb.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-usb.md deleted file mode 100644 index 909d8f69d6c116ced05232af8f3801de89282cfd..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-usb.md +++ /dev/null @@ -1,37 +0,0 @@ -# USB Subsystem API Changelog - -## cl.usb_manager.1 Bundle Name Change - -For applications developed based on earlier versions, you need to change the name of the imported bundle. Otherwise, the original service logic will be affected. - -**Key API/Component Changes** - -| Original Bundle Name | New Bundle Name | -|------------------ | ------------------- | -| ohos.usbV9.d.ts | ohos.usbManager.d.ts | - -**Adaptation Guide** - -Change **@ohos.usbV9** to **@ohos.usbManager** when importing the bundle. - -## cl.usb_manager.2 API Parameter Type Change - -For applications developed based on earlier versions, you need to modify the parameter type. Otherwise, the original service logic will be affected. - -**Key API/Component Changes** - -| Original Class Name | New Class Name | -|---------------| ------------- | -| interface USBConfig | interface USBConfiguration | - -| Original Namespace | New Namespace | -|---------------| ------------- | -| @namespace usbV9 | @namespace usbManager | - -| Bundle Name | Original API | New API | -| --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| ohos.usbManager.d.ts | function setConfiguration(pipe: USBDevicePipe, config: USBConfig): number; | function setConfiguration(pipe: USBDevicePipe, config: USBConfiguration): number; | - -**Adaptation Guide** - -When calling **setConfiguration**, change the parameter type from **USBConfig** to **USBConfiguration**. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelog-accesstoken.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelog-accesstoken.md deleted file mode 100644 index 832acd65c2ad41b5b824d9f29a046130e9217c89..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelog-accesstoken.md +++ /dev/null @@ -1,33 +0,0 @@ -# App Access Control Subsystem ChangeLog - -OpenHarmony 4.0.3.2 has the following changes in the APIs of the app access control subsystem: - -## cl.access_token.1 getPermissionUsedRecords Name Change - -Changed **getPermissionUsedRecords** to **getPermissionUsedRecord**. - -**Change Impact** - -The **getPermissionUsedRecords()** API cannot be used in OpenHarmony 4.0.3.3 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - function getPermissionUsedRecords - -- Before change: - - ```ts - function getPermissionUsedRecords - ``` - -- After change: - - ```ts - function getPermissionUsedRecord - ``` - -**Adaptation Guide** - -Use **getPermissionUsedRecord()**. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelog-security.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelog-security.md deleted file mode 100644 index caf1866f3a5caec4bb78d7f7991208f8c9da46e9..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelog-security.md +++ /dev/null @@ -1,86 +0,0 @@ -# Security Subsystem Changelog - -## cl.security.1 ParamsSpec Attribute Name Change -Changed **algoName** of the **ParamsSpec** structure to **algName**. - -**Change Impact** - -For the released JavaScript APIs that use **ParamsSpec** and its child classes **IvParamsSpec**, **GcmParamsSpec**, and **CcmParamsSpec** as parameters or return values, **algoName** must be changed to **algName**. -The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. - -**Key API/Component Changes** - -API prototype before the change: - - ```ts -interface ParamsSpec { - /** - * Indicates the algorithm name. Should be set before initialization of a cipher object. - * @type { string } - * @syscap SystemCapability.Security.CryptoFramework - * @since 9 - */ - algoName : string; -} - ``` -API prototype after the change: - - ```ts -interface ParamsSpec { - /** - * Indicates the algorithm name. Should be set before initialization of a cipher object. - * @type { string } - * @syscap SystemCapability.Security.CryptoFramework - * @since 9 - */ - algName : string; -} - ``` - -**Adaptation Guide** - -Change **algoName** to **algName** in **ParamsSpec** and its child classes **IvParamsSpec**, **GcmParamsSpec**, and **CcmParamsSpec**. - ```ts -function genGcmParamsSpec() { - let arr = [0, 0, 0, 0 , 0, 0, 0, 0, 0, 0 , 0, 0]; // 12 bytes - let dataIv = new Uint8Array(arr); - let ivBlob = {data : dataIv}; - - arr = [0, 0, 0, 0 , 0, 0, 0, 0]; // 8 bytes - let dataAad = new Uint8Array(arr); - let aadBlob = {data : dataAad}; - - arr = [0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0]; // 16 bytes - let dataTag = new Uint8Array(arr); - let tagBlob = {data : dataTag}; - let gcmParamsSpec = {iv : ivBlob, aad : aadBlob, authTag : tagBlob, algName : "GcmParamsSpec"}; - return gcmParamsSpec; -} - ``` -For details, see the APIs of **ParamsSpec** in [Crypto Framework](../../../application-dev/reference/apis/js-apis-cryptoFramework.md#paramsspec). - -## Change of cl.security.2 ECC Algorithm Parameter Name from ECC512 to ECC521 - -**Change Impact** - -Behavior of released JavaScript APIs will be changed. -The application needs to be adapted to obtain the correct result in the SDK of the new version. - -**Key API/Component Changes** -The parameter passed in the APIs is changed from **ECC512** to **ECC521**. The related APIs remain unchanged. For details, see [Key Generation Specifications](../../../application-dev/security/cryptoFramework-overview.md#key-generation-specifications). The following APIs are involved: - -cryptoFramework.createAsyKeyGenerator - -cryptoFramework.createSign - -cryptoFramework.createVerify - -cryptoFramework.createKeyAgreement - -**Adaptation Guide** - -```js -import cryptoFramework from "@ohos.security.cryptoFramework" - -let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC521"); -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelog-web.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelog-web.md deleted file mode 100644 index 44380d11950e3f018b719776edf08964d6b4c0af..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelog-web.md +++ /dev/null @@ -1,467 +0,0 @@ -# Web Subsystem Changelog - -Compared with earlier versions, OpenHarmony 4.0.3.2 has the following API changes in its web subsystem: - -## cl.web.1 HitTestTypeV9 Name Change - -Renamed the enum class **HitTestTypeV9** **WebHitTestType** to meet the naming conventions. - -**Change Impact** - -The enum class **HitTestTypeV9** and APIs that use **HitTestTypeV9** as a parameter or return value cannot be used in OpenHarmony 4.0.3.2 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - enum HitTestTypeV9 - -- Before change: - - ```ts - enum HitTestTypeV9 - ``` - -- After change: - - ```ts - enum WebHitTestType - ``` - -**Adaptation Guide** - -Replace **HitTestTypeV9** with **WebHitTestType**. - -## cl.web.2 HeaderV9 Name Change - -Renamed the struct **HeaderV9** **WebHeader** to meet the naming conventions. - -**Change Impact** - -The struct **HeaderV9** and APIs that use **HeaderV9** as a parameter or return value cannot be used in OpenHarmony 4.0.3.2 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - interface HeaderV9 - -- Before change: - - ```ts - interface HeaderV9 - ``` - -- After change: - - ```ts - interface WebHeader - ``` - -**Adaptation Guide** - -Replace **HeaderV9** with **WebHeader**. - -## cl.web.3 Member Change of HitTestValue - -Rename the member variable **HitTestTypeV9** in the **HitTestValue** struct **WebHitTestType** to meet the naming conventions. - -**Change Impact** - -The struct **HitTestValue** and APIs that use **HitTestValue** as a parameter or return value cannot be used in OpenHarmony 4.0.3.2 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - interface HitTestValue - -- Before change: - - ```ts - interface HitTestValue { - - /** - * Get the hit test type. - * - * @since 9 - */ - type: HitTestTypeV9; - - /** - * Get the hit test extra data. - * - * @since 9 - */ - extra: string; - } - ``` - -- After change: - - ```ts - interface HitTestValue { - - /** - * Get the hit test type. - * - * @since 9 - */ - type: WebHitTestType; - - /** - * Get the hit test extra data. - * - * @since 9 - */ - extra: string; - } - ``` - -**Adaptation Guide** - -Replace **HitTestTypeV9** with **WebHitTestType**. - -## cl.web.4 Parameter Type Change of loadUrl - -Changed the type of the **headers** parameter in **loadUrl** to **WebHeader** to meet the naming conventions. - -**Change Impact** - -The **loadUrl** API that uses the **headers** parameter cannot be used in OpenHarmony 4.0.3.2 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - loadUrl(url: string | Resource, headers?: Array\): void - -- Before change: - - ```ts - loadUrl(url: string | Resource, headers?: Array): void - ``` - -- After change: - - ```ts - loadUrl(url: string | Resource, headers?: Array): void - ``` - -**Adaptation Guide** - -Change the type of the **headers** parameter in **loadUrl** from **HeaderV9** to **WebHeader**. - -## cl.web.5 Return Value Type Change of getHitTest - -Changed the return value type of the **getHitTest** API to **WebHitTest** to meet the naming conventions. - -**Change Impact** - -The **getHitTest** API cannot be used in OpenHarmony 4.0.3.2 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - getHitTest(): HitTestTypeV9 - -- Before change: - - ```ts - getHitTest(): HitTestTypeV9 - ``` - -- After change: - - ```ts - getHitTest(): WebHitTestType - ``` - -**Adaptation Guide** - -Change the return value type of the **getHitTest** API from **HitTestTypeV9** to **WebHitTestType**. - -## cl.web.6 Moving of the WebMessagePort Class - -Moved the **WebMessagePort** class to **@ohos.web.webview.d.ts** and added error throwing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing. - -**Key API/Component Changes** - -- Involved APIs: - - postMessageEvent(message: WebMessageEvent): void; - onMessageEvent(callback: (result: string) => void): void; - -- Before change: - - ```ts - postMessageEvent(message: WebMessageEvent): void; - onMessageEvent(callback: (result: string) => void): void; - ``` - -- After change: - - ```ts - postMessageEvent(message: WebMessage): void; - onMessageEvent(callback: (result: WebMessage) => void): void; - ``` - -**Adaptation Guide** - -Instead of importing APIs from the original **WebMessagePort** class, import APIs from **@ohos.web.webview** as follows: - - ```ts - import web_webview from '@ohos.web.webview'; - ``` - -## cl.web.7 Moving of the HitTestValue Class - -Moved the **HitTestValue** class to **@ohos.web.webview.d.ts**; changed **HitTestValue** from a class to an API; changed the **getType** and **getExtra** from APIs to attributes. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. - -**Key API/Component Changes** - -- Involved APIs: - - getType(): HitTestType; - getExtra(): string; - -- Before change: - - ```ts - getType(): HitTestType; - getExtra(): string; - ``` - -- After change: - - ```ts - type: WebHitTestType; - extra: string; - ``` - -**Adaptation Guide** - -Instead of importing APIs from the original **HitTestValue** class, import APIs from **@ohos.web.webview** as follows: - - ```ts - import web_webview from '@ohos.web.webview'; - ``` - -## cl.web.8 Moving of API Version 9 APIs Under WebCookie - -Moved APIs of API version 9 in the **WebCookie** class to **web.webview.webview.WebCookieManager** -and added error throwing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing. -The APIs in the class are static. - -**Key API/Component Changes** - -- Involved APIs: - - isCookieAllowed(): boolean; - isThirdPartyCookieAllowed(): boolean; - putAcceptCookieEnabled(accept: boolean): void; - putAcceptThirdPartyCookieEnabled(accept: boolean): void; - setCookie(url: string, value: string): boolean; - saveCookieSync(): boolean; - getCookie(url: string): string; - existCookie(): boolean; - deleteEntireCookie(): void; - deleteSessionCookie(): void; - -- Before change: - - ```ts - isCookieAllowed(): boolean; - isThirdPartyCookieAllowed(): boolean; - putAcceptCookieEnabled(accept: boolean): void; - putAcceptThirdPartyCookieEnabled(accept: boolean): void; - setCookie(url: string, value: string): boolean; - saveCookieSync(): boolean; - getCookie(url: string): string; - existCookie(): boolean; - deleteEntireCookie(): void; - deleteSessionCookie(): void; - ``` - -- After change: - - ```ts - static isCookieAllowed(): boolean; - static isThirdPartyCookieAllowed(): boolean; - static putAcceptCookieEnabled(accept: boolean): void; - static putAcceptThirdPartyCookieEnabled(accept: boolean): void; - static setCookie(url: string, value: string): void; - static saveCookieAsync(): Promise; - static saveCookieAsync(callback: AsyncCallback): void; - static getCookie(url: string): string; - static existCookie(): boolean; - static deleteEntireCookie(): void; - static deleteSessionCookie(): void; - ``` - -**Adaptation Guide** - -Instead of importing APIs from the original **WebCookie** class, import APIs from **@ohos.web.webview** as follows: - - ```ts - import web_webview from '@ohos.web.webview'; - ``` - -## cl.web.9 Moving of API Version 9 APIs Under WebController - -Moved APIs of API version 9 in the **WebController** class to **web.webview.webview.WebviewController** and added error throwing. - -**Change Impact** - -If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing. -The **getDefaultUserAgent** API is renamed **getUserAgent**. - -**Key API/Component Changes** - -- Involved APIs: - - zoomIn(): boolean; - zoomOut(): boolean; - createWebMessagePorts(): Array\; - postMessage(options: { message: WebMessageEvent, uri: string}): void; - getHitTestValue(): HitTestValue; - getWebId(): number; - getDefaultUserAgent(): string; - getTitle(): string; - getPageHeight(): number; - backOrForward(step: number): void; - searchAllAsync(searchString: string): void; - clearMatches(): void; - searchNext(forward: boolean): void; - clearSslCache(): void; - clearClientAuthenticationCache(): void; - getUrl(): string; - -- Before change: - - ```ts - zoomIn(): boolean; - zoomOut(): boolean; - createWebMessagePorts(): Array; - postMessage(options: { message: WebMessageEvent, uri: string}): void; - getHitTestValue(): HitTestValue; - getWebId(): number; - getDefaultUserAgent(): string; - getTitle(): string; - getPageHeight(): number; - backOrForward(step: number): void; - searchAllAsync(searchString: string): void; - clearMatches(): void; - searchNext(forward: boolean): void; - clearSslCache(): void; - clearClientAuthenticationCache(): void; - getUrl(): string; - ``` - -- After change: - - ```ts - zoomIn(): void; - zoomOut(): void; - createWebMessagePorts(): Array; - postMessage(name: string, ports: Array, uri: string): void; - getHitTestValue(): HitTestValue; - getWebId(): number; - getUserAgent(): string; - getTitle(): string; - getPageHeight(): number; - backOrForward(step: number): void; - searchAllAsync(searchString: string): void; - clearMatches(): void; - searchNext(forward: boolean): void; - clearSslCache(): void; - clearClientAuthenticationCache(): void; - getUrl(): string; - ``` - -**Adaptation Guide** - -Instead of importing APIs from the original **WebController** class, import APIs from **@ohos.web.webview** as follows: - - ```ts - import web_webview from '@ohos.web.webview'; - ``` - -## cl.web.10 Moving of the WebAsyncController Class - -Moved the APIs in the **WebAsyncController** class to the **web.webview.webview.WebviewController** class and added error throwing. - -**Change Impact** - -If your application is developed based on earlier versions, pay attention to error code processing. - -**Key API/Component Changes** - -- Involved APIs: - - storeWebArchive(baseName: string, autoName: boolean): Promise\; - storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback\): void; - -- Before change: - - ```ts - storeWebArchive(baseName: string, autoName: boolean): Promise; - storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback): void; - ``` - -- After change: - - ```ts - storeWebArchive(baseName: string, autoName: boolean): Promise; - storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback): void; - ``` - -**Adaptation Guide** - -Example: - - ```ts - // xxx.ets - import web_webview from '@ohos.web.webview' - - @Entry - @Component - struct WebComponent { - controller: web_webview.WebviewController = new web_webview.WebviewController(); - - build() { - Column() { - Button('saveWebArchive') - .onClick(() => { - try { - this.controller.storeWebArchive("/data/storage/el2/base/", true, (error, filename) => { - if (error) { - console.info(`save web archive error: ` + JSON.stringify(error)) - return; - } - if (filename != null) { - console.info(`save web archive success: ${filename}`) - } - }); - } catch (error) { - console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); - } - }) - Web({ src: 'www.example.com', controller: this.controller }) - } - } - } - ``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-account_os_account.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-account_os_account.md deleted file mode 100644 index 8678507b6c8d8449e8cac47e6b8669611865bec2..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-account_os_account.md +++ /dev/null @@ -1,391 +0,0 @@ -# Account Subsystem Changelog - -OpenHarmony 4.0.3.2 has the following changes in account module APIs: - -## cl.account_os_account.1 App Account API isAccountRemovable Renamed - -Changed **isAccountRemovable** in the **Authenticator** class to **checkAccountRemovable**. - -**Change Impact** - -The **isAccountRemovable** API in the **Authenticator** class cannot be used from 4.0.3.2. Use **checkAccountRemovable** instead. - -**Key API/Component Changes** - -- Involved APIs: - ```ts - class Authenticator { - ... - isAccountRemovable - ... - } - ``` -- Before change: - - ```ts - class Authenticator { - ... - /** - * Checks whether the specified account can be removed. - * @param name Indicates the account name. - * @param callback Indicates the authenticator callback. - * @returns void. - * @since 9 - */ - isAccountRemovable(name: string, callback: AuthCallback): void; - ... - } - ``` - -- After change: - - ```ts - class Authenticator { - ... - /** - * Checks whether the specified account can be removed. - * @param name Indicates the account name. - * @param callback Indicates the authenticator callback. - * @returns void. - * @since 9 - */ - checkAccountRemovable(name: string, callback: AuthCallback): void; - ... - } - ``` - -## cl.account_os_account.2 OS Account API checkConstraintEnabled Renamed - -Changed **checkConstraintEnabled** to **checkOsAccountConstraintEnabled**. - -**Change Impact** - -The **checkConstraintEnabled** API cannot be used from 4.0.3.2. Use **checkOsAccountConstraintEnabled** instead. - -**Key API/Component Changes** - -- Involved APIs: -``` -interface AccountManager { - ... - checkConstraintEnabled - ... -} -``` - -- Before change: - - ```ts - checkConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback): void; - checkConstraintEnabled(localId: number, constraint: string): Promise; - ``` - -- After change: - - ```ts - checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback): void; - checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise; - ``` - -## cl.account_os_account.3 OS Account API **checkOsAccountConstraintEnabled** Permission Scenario Change - -Added an optional permission **ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS** to the **checkOsAccountConstraintEnabled** API. - -**Change Impact** - -In 4.0.3.2 and later versions, an app with the **ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS** permission can also call **checkOsAccountConstraintEnabled**. -The use of **ohos.permission.MANAGE_LOCAL_ACCOUNTS** is not affected. - -**Key API/Component Changes** - -- Involved APIs: -``` -interface AccountManager { - ... - checkOsAccountConstraintEnabled - ... -} -``` - -- Before change: - - ```ts - ... - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - ... - checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback): void; - checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise; - ``` - -- After change: - - ```ts - ... - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - ... - checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback): void; - checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise; - ``` - -## cl.account_os_account.4 OS Account API queryOsAccountLocalIdFromProcessd Renamed - -Changed **queryOsAccountLocalIdFromProcess** to **getOsAccountLocalId**. - -**Change Impact** - -The **queryOsAccountLocalIdFromProcess** API cannot be used from 4.0.3.2. Use **getOsAccountLocalId** instead. - -**Key API/Component Changes** - -- Involved APIs: -``` -interface AccountManager { - ... - queryOsAccountLocalIdFromProcess - ... -} -``` -- Before change: - - ```ts - queryOsAccountLocalIdFromProcess(callback: AsyncCallback): void; - queryOsAccountLocalIdFromProcess(): Promise; - ``` - -- After change: - - ```ts - getOsAccountLocalId(callback: AsyncCallback): void; - getOsAccountLocalId(): Promise; - ``` - -## cl.account_os_account.5 OS Account API queryOsAccountLocalIdFromUid Renamed - -Changed **queryOsAccountLocalIdFromUid** to **getOsAccountLocalIdForUid**. - -**Change Impact** - -The **queryOsAccountLocalIdFromUid** API cannot be used from 4.0.3.2. Use **getOsAccountLocalIdForUid** instead. - -**Key API/Component Changes** - -- Involved APIs: -``` -interface AccountManager { - ... - queryOsAccountLocalIdFromUid - ... -} -``` - -- Before change: - - ```ts - queryOsAccountLocalIdFromUid(uid: number, callback: AsyncCallback): void; - queryOsAccountLocalIdFromUid(uid: number): Promise; - ``` - -- After change: - - ```ts - getOsAccountLocalIdForUid(uid: number, callback: AsyncCallback): void; - getOsAccountLocalIdForUid(uid: number): Promise; - ``` - -## cl.account_os_account.6 OS Account API queryOsAccountLocalIdFromDomain Renamed - -Changed **queryOsAccountLocalIdFromDomain** to **getOsAccountLocalIdForDomain**. - -**Change Impact** - -The **queryOsAccountLocalIdFromDomain** API cannot be used from 4.0.3.2. Use **getOsAccountLocalIdForDomain** instead. - -**Key API/Component Changes** - -- Involved APIs: -``` -interface AccountManager { - ... - queryOsAccountLocalIdFromDomain - ... -} -``` - -- Before change: - - ```ts - queryOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback): void; - queryOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo): Promise; - ``` - -- After change: - - ```ts - getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback): void; - getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo): Promise; - ``` - -## cl.account_os_account.7 OS Account API getActivatedOsAccountIds Renamed - -Changed **getActivatedOsAccountIds** to **getActivatedOsAccountLocalIds**. - -**Change Impact** - -The **getActivatedOsAccountIds** API cannot be used from 4.0.3.2. Use **getActivatedOsAccountLocalIds** instead. - -**Key API/Component Changes** - -- Involved APIs: -``` -interface AccountManager { - ... - getActivatedOsAccountIds - ... -} -``` - -- Before change: - - ```ts - getActivatedOsAccountIds(callback: AsyncCallback>): void; - getActivatedOsAccountIds(): Promise>; - ``` - -- After change: - - ```ts - getActivatedOsAccountLocalIds(callback: AsyncCallback>): void; - getActivatedOsAccountLocalIds(): Promise>; - ``` - -## cl.account_os_account.8 OS Account API queryOsAccountLocalIdBySerialNumber Renamed - -Changed **queryOsAccountLocalIdBySerialNumber** to **getOsAccountLocalIdForSerialNumber**. - -**Change Impact** - -The **queryOsAccountLocalIdBySerialNumber** API cannot be used from 4.0.3.2. Use **getOsAccountLocalIdForSerialNumber** instead. - -**Key API/Component Changes** - -- Involved APIs: -``` -interface AccountManager { - ... - queryOsAccountLocalIdBySerialNumber - ... -} -``` - -- Before change: - - ```ts - queryOsAccountLocalIdBySerialNumber(serialNumber: number, callback: AsyncCallback): void; - queryOsAccountLocalIdBySerialNumber(serialNumber: number): Promise; - ``` - -- After change: - - ```ts - getOsAccountLocalIdForSerialNumber(serialNumber: number, callback: AsyncCallback): void; - getOsAccountLocalIdForSerialNumber(serialNumber: number): Promise; - ``` - -## cl.account_os_account.9 OS Account API querySerialNumberByOsAccountLocalId Renamed - -Changed **querySerialNumberByOsAccountLocalId** to **getSerialNumberForOsAccountLocalId**. - -**Change Impact** - -The **querySerialNumberByOsAccountLocalId** API cannot be used from 4.0.3.2. Use **getSerialNumberForOsAccountLocalId** instead. - -**Key API/Component Changes** - -- Involved APIs: -``` -interface AccountManager { - ... - querySerialNumberByOsAccountLocalId - ... -} -``` - -- Before change: - - ```ts - querySerialNumberByOsAccountLocalId(localId: number, callback: AsyncCallback): void; - querySerialNumberByOsAccountLocalId(localId: number): Promise; - ``` - -- After change: - - ```ts - getSerialNumberForOsAccountLocalId(localId: number, callback: AsyncCallback): void; - getSerialNumberForOsAccountLocalId(localId: number): Promise; - ``` - -## cl.account_os_account.10 OS Account API getBundleIdFromUid Renamed - -Changed **getBundleIdFromUid** to **getBundleIdForUid**. - -**Change Impact** - -The **getBundleIdFromUid** API cannot be used from 4.0.3.2. Use **getBundleIdForUid** instead. - -**Key API/Component Changes** - -- Involved APIs: -``` -interface AccountManager { - ... - getBundleIdFromUid - ... -} -``` - -- Before change: - - ```ts - getBundleIdFromUid(uid: number, callback: AsyncCallback): void; - getBundleIdFromUid(uid: number): Promise; - ``` - -- After change: - - ```ts - getBundleIdForUid(uid: number, callback: AsyncCallback): void; - getBundleIdForUid(uid: number): Promise; - ``` - -## cl.account_os_account.11 OS Account API queryOsAccountConstraintSourceTypes Renamed - -Changed **queryOsAccountConstraintSourceTypes** to **getOsAccountConstraintSourceTypes**. - -**Change Impact** - -The **queryOsAccountConstraintSourceTypes** API cannot be used from 4.0.3.2. Use **getOsAccountConstraintSourceTypes** instead. - -**Key API/Component Changes** - -- Involved APIs: -``` -interface AccountManager { - ... - queryOsAccountConstraintSourceTypes - ... -} -``` - -- Before change: - - ```ts - queryOsAccountConstraintSourceTypes(localId: number, constraint: string, callback: AsyncCallback>): void; - queryOsAccountConstraintSourceTypes(localId: number, constraint: string): Promise>; - ``` - -- After change: - - ```ts - getOsAccountConstraintSourceTypes(localId: number, constraint: string, callback: AsyncCallback>): void; - getOsAccountConstraintSourceTypes(localId: number, constraint: string): Promise>; - ``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-arkui.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-arkui.md deleted file mode 100644 index 2429518bb6a952b89a0f3c1a77bc16043b463bb5..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-arkui.md +++ /dev/null @@ -1,87 +0,0 @@ -# ArkUI Subsystem Changelog - -## cl.arkui.1 Return Value Type Change of getInspectorTree - -**Change Impact** - -The code that uses the **getInspectorTree** API in versions earlier than OpenHarmony 4.0.3.2 must be adapted. - -**Key API/Component Changes** - -The return value of the **getInspectorTree** API is changed from the string type to the Object type. - -**Adaptation Guide** - -Adapt the code that takes the return value of **getInspectorTree** as a string.The sample code is as follows: - -- Before change: - -```typescript -console.info(getInspectorTree()) -``` - -- After change: - -```typescript -console.info(JSON.stringify(getInspectorTree())) -``` - -## cl.arkui.2 Deprecation the forceRebuild Attribute of \ - -**Change Impact** - -None. The attribute has no effect. - -**Key API/Component Changes** - -Deprecate the **forceRebuild** attribute of the **\** component. - -**Adaptation Guide** - -Delete the code that uses the **forceRebuild** attribute. This will not affect the functionality of the **\** component. - - -## cl.arkui.1 API Changes of the Router Module in API Version 9 - -Replaced the **enableAlertBeforeBackPage**, **enableBackPageAlert**, **disableAlertBeforeBackPage** APIs in **ohos.router** to **showAlertBeforeBackPage** and **hideAlertBeforeBackPage** to facilitate development. - -**Change Impact** - -The **enableAlertBeforeBackPage** and **enableBackPageAlert** APIs must be replaced with **showAlertBeforeBackPage**. - -The **disableAlertBeforeBackPage** API must be replaced with **hideAlertBeforeBackPage**. - -**Key API/Component Changes** - -**router.enableAlertBeforeBackPage**, **router.enableBackPageAlert**, and **router.disableAlertBeforeBackPage** - -* Before change: - -```ts -router.enableAlertBeforeBackPage(); -router.enableBackPageAlert() -``` - -* After change: - -```ts -router.showAlertBeforeBackPage() -``` - -* Before change: - -```ts -router.disableAlertBeforeBackPage() -``` - -* After change: - -```ts -router.hideAlertBeforeBackPage() -``` - -**Adaptation Guide** - -Replace **enableAlertBeforeBackPage** and **enableBackPageAlert** with **showAlertBeforeBackPage**. - -Replace **disableAlertBeforeBackPage** with **hideAlertBeforeBackPage**. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-bundlemanager.md deleted file mode 100644 index 7edc40101a4bd5098765e78d56e7da7508cfd70e..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-bundlemanager.md +++ /dev/null @@ -1,27 +0,0 @@ -# Bundle Manager Subsystem Changelog - -## cl.bundlemanager.1 Deleted getAbilityIcon - -The **getAbilityIcon** API in [@ohos.bundle.bundleManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleManager.d.ts) is deleted. The **getMediaContent** API in [@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts) can be used instead. - -**Change Impact**
-The **getAbilityIcon** API does not take effect. - -**Key API/Component Changes**
-The **getAbilityIcon** API is deleted from **@ohos.bundle.bundleManager.d.ts**. - -**Adaptation Guide**
-If your application uses **getAbilityIcon** in **@ohos.bundle.bundleManager.d.ts**, replace it with **getMediaContent** in **@ohos.resourceManager.d.ts**. You need to obtain the icon ID in advance. For details, see [Usage Guide](../../../application-dev/reference/apis/js-apis-resource-manager.md#getmediacontent9). - -## cl.bundlemanager.2 Added Error Code 202 - -Error code 202 is added to the bundle manager subsystem. If a non-system application calls a system API of API version 9 or later provided by the bundle manager subsystem, error code 202 is returned. - -**Change Impact**
-Error code 202 is returned when a non-system application calls a system API of API version 9 or later provided by the bundle manager subsystem. - -**Key API/Component Changes**
-If a non-system application calls a system API of API version 9 or later provided by the bundle manager subsystem, error code 202 is returned. - -**Adaptation Guide**
-No adaptation is required. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-ces.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-ces.md deleted file mode 100644 index 452f10ca4a14709640ad529022287dd3d5aa452d..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-ces.md +++ /dev/null @@ -1,57 +0,0 @@ -# Common Event Subsystem Changelog - -## cl.ces.1 Event Enum Change of ohos.commonEvent - -**Change Impact** - -For applications developed based on earlier versions, the following common events of the **.ohos.commonEvent** module must be adapted. - -| Common Event | -| ----------------------------------- | -| COMMON_EVENT_PACKAGE_CACHE_CLEARED | -| COMMON_EVENT_USB_STATE | -| COMMON_EVENT_USB_PORT_CHANGED | -| COMMON_EVENT_VOLUME_REMOVED | -| COMMON_EVENT_VOLUME_UNMOUNTED | -| COMMON_EVENT_VOLUME_MOUNTED | -| COMMON_EVENT_VOLUME_BAD_REMOVAL | -| COMMON_EVENT_VOLUME_EJECT | -| COMMON_EVENT_SLOT_CHANGE | -| COMMON_EVENT_SPN_INFO_CHANGED | -| COMMON_EVENT_QUICK_FIX_APPLY_RESULT | - -**Key API/Component Changes** - -Replace the common events in **ohos.commonEvent** with those in **ohos.commonEventManager**. - -| Common Event in ohos.commonEvent | Common Event in ohos.commonEventManager | -| ----------------------------------- | ----------------------------------- | -| COMMON_EVENT_PACKAGE_CACHE_CLEARED | COMMON_EVENT_PACKAGE_CACHE_CLEARED | -| COMMON_EVENT_USB_STATE | COMMON_EVENT_USB_STATE | -| COMMON_EVENT_USB_PORT_CHANGED | COMMON_EVENT_USB_PORT_CHANGED | -| COMMON_EVENT_VOLUME_REMOVED | COMMON_EVENT_VOLUME_REMOVED | -| COMMON_EVENT_VOLUME_UNMOUNTED | COMMON_EVENT_VOLUME_UNMOUNTED | -| COMMON_EVENT_VOLUME_MOUNTED | COMMON_EVENT_VOLUME_MOUNTED | -| COMMON_EVENT_VOLUME_BAD_REMOVAL | COMMON_EVENT_VOLUME_BAD_REMOVAL | -| COMMON_EVENT_VOLUME_EJECT | COMMON_EVENT_VOLUME_EJECT | -| COMMON_EVENT_SLOT_CHANGE | COMMON_EVENT_SLOT_CHANGE | -| COMMON_EVENT_SPN_INFO_CHANGED | COMMON_EVENT_SPN_INFO_CHANGED | -| COMMON_EVENT_QUICK_FIX_APPLY_RESULT | COMMON_EVENT_QUICK_FIX_APPLY_RESULT | - -**Adaptation Guide** - -Replace the events in **ohos.commonEvent** with those in **ohos.commonEventManager**. - -Before change: - -```typescript -import commonEvent from '@ohos.commonEvent'; -let event: string = commonEvent.Support.COMMON_EVENT_PACKAGE_CACHE_CLEARED; -``` - -After change: - -```typescript -import commonEventManager from '@ohos.commonEventManager'; -let event: string = commonEventManager.Support.COMMON_EVENT_PACKAGE_CACHE_CLEARED; -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-filemanagement.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-filemanagement.md deleted file mode 100644 index 41cb99ecf701967d1ebe28a7e35de35896455fa6..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-filemanagement.md +++ /dev/null @@ -1,25 +0,0 @@ -# File Management Subsystem Changelog - -## cl.filemanagement.1 Filter Module Change - -Moved **Filter** from **@ohos.fileio** to **@ohos.file.fs**. The attributes of **Filter** remain unchanged. - -**Change Impact** - -If your application is developed using the APIs of earlier versions, note that the position of **Filter** in the **d.ts** file and the module name are changed. The **Filter** type is moved to **@ohos.file.fs**. - -**Key API/Component Changes** - -Before the change, **Filter** is in the **@ohos.fileio** module and imported as follows: - -```js -import Filter from '@ohos.fileio'; -``` - -**Adaptation Guide** - -Now, **Filter** is in the **@ohos.file.fs** module and imported as follows: - -```js -import Filter from '@ohos.file.fs'; -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-pasteboard.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-pasteboard.md deleted file mode 100644 index 8d8b439cc3a7461162c51abc2f84d09f00412e3d..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-pasteboard.md +++ /dev/null @@ -1,66 +0,0 @@ -# Pasteboard Subsystem Changelog - -OpenHarmony 4.0.3.2 has the following changes in the APIs of the pasteboard subsystem: - -## cl.pasteboard.1 convertToTextV9 API Change - -Renamed **convertToTextV9** **toPlainText()** and changed the API from asynchronous to synchronous. - -**Change Impact** - -Applications developed using the **convertToTextV9** API in versions earlier than OpenHarmony 4.0.3.3 cannot be used in OpenHarmony 4.0.3.3 and later versions. - -**Key API/Component Changes** - -- Involved APIs: - - function convertToTextV9 - -- Before change: - - ```ts - convertToTextV9(callback: AsyncCallback): void; - convertToTextV9(): Promise; - ``` - -- After change: - - ```ts - toPlainText(): string; - ``` - - -**Adaptation Guide** - -Replace **convertToTextV9**, an asynchronous API, with **toPlainText**, a synchronous API. - -## cl.pasteboard.2 ShareOption Enum Name Change - -Changed the enum names of **ShareOption** from UpperCamelCase to all caps. - -**Change Impact** - -Applications developed using the **InApp/LocalDevice/CrossDevice** attributes in versions earlier than OpenHarmony 4.0.3.3 cannot be used in OpenHarmony 4.0.3.3 and later versions. - -**Key API/Component Changes** - -ShareOption9+ - -Before change: -| Name| Value| Description | -| ---- |---|-------------------| -| InApp | 0 | Only intra-application pasting is allowed. | -| LocalDevice | 1 | Paste is allowed in any application on the local device.| -| CrossDevice | 2 | Paste is allowed in any application across devices. | - - -After change: -| Name| Value| Description | -| ---- |---|-------------------| -| INAPP | 0 | Only intra-application pasting is allowed. | -| LOCALDEVICE | 1 | Paste is allowed in any application on the local device.| -| CROSSDEVICE | 2 | Paste is allowed in any application across devices. | - -**Adaptation Guide** - -Perform adaptation based on the new semantics. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-power.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-power.md deleted file mode 100644 index c4506242ea6b189ec9a403e0b5ce85d2490f1b34..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-power.md +++ /dev/null @@ -1,82 +0,0 @@ -# Power Subsystem Changelog - -## cl.powermgr.1 CommonEventBatteryChangedCode API Change - -Changed the **CommonEventBatteryChangedCode** enum class in [@ohos.batteryInfo](../../../application-dev/reference/apis/js-apis-battery-info.md) as follows: - -- Changed the class name to **CommonEventBatteryChangedKey**. -- Deleted **EXTRA_MAX_CURRENT**, **EXTRA_MAX_VOLTAGE**, and **EXTRA_CHARGE_COUNTER**. -- Changed the enum value type from numeric to string. - -#### Change Impact - -The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. - -#### Key API/Component Changes - -Before change: - -| Name | Value | Description | -| -------------------- | ---- | -------------------------------------------------- | -| EXTRA_SOC | 0 | Remaining battery level in percentage. | -| EXTRA_VOLTAGE | 1 | Battery voltage of the device. | -| EXTRA_TEMPERATURE | 2 | Battery temperature of the device. | -| EXTRA_HEALTH_STATE | 3 | Battery health status of the device. | -| EXTRA_PLUGGED_TYPE | 4 | Type of the charger connected to the device. | -| EXTRA_MAX_CURRENT | 5 | Maximum battery current of the device. | -| EXTRA_MAX_VOLTAGE | 6 | Maximum battery voltage of the device. | -| EXTRA_CHARGE_STATE | 7 | Battery charging status of the device. | -| EXTRA_CHARGE_COUNTER | 8 | Number of battery charging times of the device. | -| EXTRA_PRESENT | 9 | Whether the battery is supported by the device or installed.| -| EXTRA_TECHNOLOGY | 10 | Battery technology of the device. | -| EXTRA_CAPACITY_LEVEL | 11 | Battery level of the device. | - -After change: - -| Name | Value | Description | -| -------------------- | --------------- | -------------------------------------------------- | -| EXTRA_SOC | "soc" | Remaining battery level in percentage. | -| EXTRA_CHARGE_STATE | "chargeState" | Battery charging status of the device. | -| EXTRA_HEALTH_STATE | "healthState" | Battery health status of the device. | -| EXTRA_PLUGGED_TYPE | "pluggedType" | Type of the charger connected to the device. | -| EXTRA_VOLTAGE | "voltage" | Battery voltage of the device. | -| EXTRA_TECHNOLOGY | "technology" | Battery technology of the device. | -| EXTRA_TEMPERATURE | "temperature" | Battery temperature of the device. | -| EXTRA_PRESENT | "present" | Whether the battery is supported by the device or installed.| -| EXTRA_CAPACITY_LEVEL | "capacityLevel" | Battery level of the device. | - -#### Adaptation Guide - -For details, see the API reference of the [@ohos.batteryInfo](../../../application-dev/reference/apis/js-apis-battery-info.md) API. -## cl.powermgr.2 estimatedRemainingChargeTime API Change - -Changed the **estimatedRemainingChargeTime** API in [@ohos.batteryInfo](../../../application-dev/reference/apis/js-apis-battery-info.md) to a system API. - -#### Change Impact - -The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. - -#### Adaptation Guide - -For details, see the API reference of the [@ohos.batteryInfo](../../../application-dev/reference/apis/js-apis-battery-info.md) API. - -## cl.powermgr.3 System Common Event Behavior Change - -The following common events are provided in the battery information through [@ohos.commonEventManager (common event module)](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-commonEventManager.md): - -- COMMON_EVENT_BATTERY_LOW: common event for low battery level. It includes the remaining battery in percentage. -- COMMON_EVENT_BATTERY_OKAY: common event for normal battery level. It includes the remaining battery in percentage. -- COMMON_EVENT_POWER_CONNECTED: common event for connection to an external power supply. It includes the type of the power supply to which the device is connected. -- COMMON_EVENT_POWER_DISCONNECTED: common event for disconnection from an external power supply. It includes the type of the power supply from which the device is disconnected. -- COMMON_EVENT_CHARGING: common event for starting of battery charging. It includes the battery charging status. -- COMMON_EVENT_DISCHARGING: common event for ending of battery charging. It includes the battery charging status. - -Changed the method of obtaining data from common events from **CommonEventData.data** to **CommonEventData.code**. - -#### Change Impact - -The application developed based on earlier versions needs to adapt the method for obtaining common events in the battery information. Otherwise, the original service logic will be affected. - -#### Adaptation Guide - -For details, see the API reference of the [@ohos.commonEventManager (Common Event Manager)](../../../application-dev/reference/apis/js-apis-commonEventManager.md) API. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-sensor.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-sensor.md deleted file mode 100644 index 7a2e2946d69a0f116616152cd82eb8a2bae96c58..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-sensor.md +++ /dev/null @@ -1,49 +0,0 @@ -# Pan-sensor Subsystem Changelog - -## cl.ability.1 Attribute Name Changed from venderName to vendorName in the Sensor API - -**venderName** is changed to **vendorName**. - -**Change Impact** - -The **venderName** attribute cannot be used anymore. Use **vendorName** instead. - -**Key API/Component Changes** - -- Before change: - -```js - interface Sensor { - sensorName:string; /**< Sensor name */ - venderName:string; /**< Sensor vendor version */ - firmwareVersion:string; /**< Sensor firmware version */ - hardwareVersion:string; /**< Sensor hardware version */ - sensorId:number; /**< Sensor type ID, {@code SensorType} */ - maxRange:number; /**< Maximum measurement range of the sensor */ - minSamplePeriod:number; /**< Minimum sample period allowed, in ns */ - maxSamplePeriod:number; /**< maximum sample period allowed, in ns */ - precision:number; /**< Sensor accuracy */ - power:number; /**< Sensor power */ - } -``` - -- After change: - -```js - interface Sensor { - sensorName:string; /**< Sensor name */ - vendorName:string; /**< Sensor vendor version */ - firmwareVersion:string; /**< Sensor firmware version */ - hardwareVersion:string; /**< Sensor hardware version */ - sensorId:number; /**< Sensor type ID, {@code SensorType} */ - maxRange:number; /**< Maximum measurement range of the sensor */ - minSamplePeriod:number; /**< Minimum sample period allowed, in ns */ - maxSamplePeriod:number; /**< maximum sample period allowed, in ns */ - precision:number; /**< Sensor accuracy */ - power:number; /**< Sensor power */ - } -``` - -**Adaptation Guide** - -Replace **venderName** with **vendorName**. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-startup.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-startup.md deleted file mode 100644 index 506d8dccccf8f89a173b036c1bff4750af34b59d..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.2/changelogs-startup.md +++ /dev/null @@ -1,15 +0,0 @@ -# Startup Subsystem JS API Changelog - -## cl.startup.1 Bundle Name Change - -**Change Impact** - -The original bundle name **@ohos.systemParameterV9** will be deleted and cannot be used anymore. Use the new bundle name **@ohos.systemParameterEnhance** instead. - -**Adaptation Guide** - -Change the bundle name from **@ohos.systemParameterV9** to **@ohos.systemParameterEnhance**. The APIs remain unchanged. The following is the sample code: - -```js -import @ohos.systemParameterEnhance -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.3.3/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_4.0.3.3/changelogs-bundlemanager.md deleted file mode 100644 index 867fa9fafd4e6edad6eb857250ab0cc6826df4ba..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.3.3/changelogs-bundlemanager.md +++ /dev/null @@ -1,111 +0,0 @@ -# Bundle Manager Subsystem Changelog -## cl.bundlemanager.1 Bottom-Layer Capability Changed So That Only the System Resource HAP Supports Custom Permissions - -Only the system resource HAP supports custom permissions. During HAP parsing, the bundle manager module parses the **definePermissions** field only in the configuration file of the resource HAP (bundle name: **ohos.global.systemres**), but not this field in other HAPs. This field is used to define permissions. -If an application requires custom permissions, add the permissions under the **definePermissions** field in the [configuration file](https://gitee.com/openharmony/utils_system_resources/blob/master/systemres/main/config.json) of the system resource HAP. For details about the permission format, see [Defining Permissions](../../../application-dev/quick-start/module-structure.md#internal-structure-of-the-definepermissions-attribute). - - -**Change Impact**
-After an upgrade to the new version image, the custom permission of the application does not take effect, and the authorization fails. - -**Key API/Component Changes**
-The bottom-layer capability of the bundle manager module is changed. Only the system resource HAP supports custom permissions. - -**Adaptation Guide**
-If an application requires custom permissions, add the permissions under the **definePermissions** field in the [configuration file](https://gitee.com/openharmony/utils_system_resources/blob/master/systemres/main/config.json) of the system resource HAP. For details about the permission format, see [Defining Permissions](../../../application-dev/quick-start/module-structure.md#internal-structure-of-the-definepermissions-attribute). - -## cl.bundlemanager.2 Level-2 Module File Names Changed - -The level-2 module file names of the bundle manager module are changed to their respective API names in the file, as listed below. - -| Original File Name|New File Name| -|----|----| -| bundleManager/abilityInfo.d.ts | bundleManager/AbilityInfo.d.ts | -| bundleManager/applicationInfo.d.ts | bundleManager/ApplicationInfo.d.ts | -| bundleManager/bundleInfo.d.ts | bundleManager/BundleInfo.d.ts | -| bundleManager/dispatchInfo.d.ts | bundleManager/DispatchInfo.d.ts | -| bundleManager/elementName.d.ts | bundleManager/ElementName.d.ts | -| bundleManager/extensionAbilityInfo.d.ts | bundleManager/ExtensionAbilityInfo.d.ts | -| bundleManager/hapModuleInfo.d.ts | bundleManager/HapModuleInfo.d.ts | -| bundleManager/launcherAbilityInfo.d.ts | bundleManager/LauncherAbilityInfo.d.ts | -| bundleManager/metadata.d.ts | bundleManager/Metadata.d.ts | -| bundleManager/packInfo.d.ts | bundleManager/BundlePackInfo.d.ts | -| bundleManager/permissionDef.d.ts | bundleManager/PermissionDef.d.ts | -| bundleManager/remoteAbilityInfo.d.ts | bundleManager/RemoteAbilityInfo.d.ts | -| bundleManager/shortcutInfo.d.ts | bundleManager/ShortcutInfo.d.ts | - -To sum up, except **packInfo**, which is changed to **BundlePackInfo**, the other file names are changed to start with uppercase letters. - -**Change Impact**
-The change of the level-2 module file names does not affect the use of the level-1 module. If a level-2 module interface under **bundleManager** is directly imported to the .ts file and an error is reported during compilation on DevEco Studio, you must change the name of the imported file. - -**Key API/Component Changes**
-The .d.ts file names in the **bundleManager** folder are changed to their respective API names in the file. - -**Adaptation Guide**
-Generally, no adaptation is required. If a file in the **bundleManager** folder is directly imported to the application, you must change the imported file name as follows: - -**Before change:** -```ts -import {AbilityInfo} from 'bundleManger/abilityInfo'; -import {ExtensionAbilityInfo} from 'bundleManger/extensionAbilityInfo'; -import {BundlePackInfo} from 'bundleManger/packInfo'; -``` -**After change:** -```ts -import {AbilityInfo} from 'bundleManger/AbilityInfo'; -import {ExtensionAbilityInfo} from 'bundleManger/ExtensionAbilityInfo'; -import {BundlePackInfo} from 'bundleManger/BundlePackInfo'; -``` - -## cl.bundlemanager.3 LaunchType Enum Type Name Changed from STANDARD to MULTITON - -The enum type name of [LaunchType](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleManager.d.ts) is changed from **STANDARD** to **MULTITON**. The enum value remains unchanged, indicating the multi-instance type. - -**Change Impact**
-The **LaunchType.STANDARD** type does not take effect. - -**Key API/Component Changes**
-The enum type name of **LaunchType** is changed from **STANDARD** to **MULTITON**. - -**Adaptation Guide**
-Change **LaunchType.STANDARD** to **LaunchType.MULTITON** for your application. - -## cl.bundlemanager.4 Changed the isVisible Field in the AbilityInfo Struct to exported - -The **isVisible** field in the [AbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/AbilityInfo.d.ts) struct is changed to **exported**. The type remains unchanged, indicating whether the ability can be exported and used by other abilities. - -**Change Impact**
-The **isVisible** field does not take effect. - -**Key API/Component Changes**
-The **isVisible** field in the [AbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/AbilityInfo.d.ts) struct is changed to **exported**, and the type remains unchanged. - -**Adaptation Guide**
-Change **isVisible** to **exported** for your application. - -## cl.bundlemanager.5 Changed the isVisible Field in the ExtensionAbilityInfo Struct to exported - -The **isVisible** field in the [ExtensionAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ExtensionAbilityInfo.d.ts) struct is changed to **exported**. The type remains unchanged, indicating whether the ability can be exported and used by other abilities. - -**Change Impact**
-The **isVisible** field does not take effect. - -**Key API/Component Changes**
-The **isVisible** field in the [ExtensionAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ExtensionAbilityInfo.d.ts) struct is changed to **exported**, and the type remains unchanged. - -**Adaptation Guide**
-Change **isVisible** to **exported** for your application. - -## cl.bundlemanager.6 Changed the visible Field in the ModuleAbilityInfo Struct to exported - -The **visible** field in the [ModuleAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundlePackInfo.d.ts) struct is changed to **exported**. The type remains unchanged, indicating whether the ability can be exported and used by other abilities. - -**Change Impact**
-The **visible** field does not take effect. - -**Key API/Component Changes**
-The **visible** field in the [ModuleAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundlePackInfo.d.ts) struct is changed to **exported**, and the type remains unchanged. - -**Adaptation Guide**
-Change **visible** to **exported** for your application. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.5.1/changelog-resourceschedule.md b/en/release-notes/changelogs/OpenHarmony_4.0.5.1/changelog-resourceschedule.md deleted file mode 100644 index 225ac70d1f4e080f5d83f0bcb768a9afbbc03e1f..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.5.1/changelog-resourceschedule.md +++ /dev/null @@ -1,32 +0,0 @@ -# Resource Scheduler Subsystem Changelog - -## cl.resourceschedule.workScheduler - -The WorkSchedulerExtensionAbility provides a default WorkSchedulerExtensionContext. - -**Change Impact** - -Applications developed based on OpenHarmony4.0.5.1 and later SDK versions can use the default context attribute as the context environment of a WorkSchedulerExtension. - -**Key API/Component Changes** - -The context attribute is added to **@ohos.WorkSchedulerExtensionAbility.d.ts**. The **application/WorkSchedulerExtensionContext.d.ts** file is added, which is inherited from ExtensionContext. - -| Module| Class| Method/Attribute/Enum/Constant| Change Type| -| -- | -- | -- | -- | -| @ohos.WorkSchedulerExtensionAbility.d.ts | WorkSchedulerExtensionAbility | context: WorkSchedulerExtensionContext; | Added| -| application/WorkSchedulerExtensionContext.d.ts | WorkSchedulerExtensionContext | - | Added| - -**Adaptation Guide** - -The context is obtained through a WorkSchedulerExtensionAbility child class instance. - -```ts -import WorkSchedulerExtensionAbility from '@ohos.WorkSchedulerExtensionAbility'; - -class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility { - onWorkStart(workInfo) { - let WorkSchedulerExtensionContext = this.context; // Obtain the WorkSchedulerExtensionContext. - } -} -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.5.2/changelogs-ability.md b/en/release-notes/changelogs/OpenHarmony_4.0.5.2/changelogs-ability.md deleted file mode 100644 index 229a965c8cff75c6e3a95c415b5f2449e2b10535..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.5.2/changelogs-ability.md +++ /dev/null @@ -1,64 +0,0 @@ -# Ability Framework Changelog - -## Added the saveAppState API to cl.ability.appRecovery - -The API **saveAppState (context?: UIAbilityContext): boolean;** is added. - -**Change Impact** - -When developing an application based on OpenHarmony 4.0.5.2 or a later SDK version, you can use **saveAppState** with the ability context specified to save the state of the specified ability. - -**Key API/Component Changes** - -The **saveAppState** API is added to the **@ohos.app.ability.appRecovery.d.ts** file. - -| Module| Class| Method/Attribute/Enum/Constant| Change Type| -| -- | -- | -- | -- | -| @ohos.app.ability.appRecovery.d.ts | appRecovery | saveAppState(context?: UIAbilityContext): boolean; | Added| - -**Adaptation Guide** - -Call **saveAppState** with the UIAbility context specified to save the ability state. - -```ts -import appRecovery from '@ohos.app.ability.appRecovery'; -onBackground() { - hilog.info(0x0000, '[demo]', '%{public}s', 'EntryAbility onBackground'); - appRecovery.saveAppState(this.context) -} -``` -## Added the setRestartWant API to cl.ability.appRecovery. - -The API **setRestartWant (want: Want): void;** is added. - -**Change Impact** - -To develop an application based on OpenHarmony 4.0.5.2 or a later SDK version, you can use **setRestartWant** to set the ability to recover. - -**Key API/Component Changes** - -The **setRestartWant** API is added to the **@ohos.app.ability.appRecovery.d.ts** file. - -| Module| Class| Method/Attribute/Enum/Constant| Change Type| -| -- | -- | -- | -- | -| @ohos.app.ability.appRecovery.d.ts | appRecovery | setRestartWant(want: Want): void; | Added| - -**Adaptation Guide** - -Call **setRestartWant** to set the ability to recover. - -```ts -import appRecovery from '@ohos.app.ability.appRecovery'; -Button ("Start to Recover Ability") - .fontSize(40) - .fontWeight(FontWeight.Bold) - .onClick(()=> { - // set restart want - let want = { - bundleName: "ohos.samples.recovery", - abilityName: "RecoveryAbility" - }; - - appRecovery.setRestartWant(want); - }) -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.5.2/changelogs-miscdevice.md b/en/release-notes/changelogs/OpenHarmony_4.0.5.2/changelogs-miscdevice.md deleted file mode 100644 index 100975f0aec6f581d517b3b2d0ee0e598de4388e..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.5.2/changelogs-miscdevice.md +++ /dev/null @@ -1,94 +0,0 @@ -# Pan-sensor Subsystem Changelog - -## cl.vibrator Added isSupportEffect - -The **isSupportEffect** API is added. - -**Change Impact** - -Applications developed based on OpenHarmony4.0.5.2 or a later SDK version can use **isSupportEffect** to check whether the passed effect ID is supported. - -**Key API/Component Changes** - -The **isSupportEffect** API is added in **@ohos.vibrator.d.ts**. - -| Module| Class| Method/Attribute/Enum/Constant| Change Type| -| -- | -- | -- | -- | -| @ohos.vibrator.d.ts | vibrator | isSupportEffect(effectId: string, callback: AsyncCallback<boolean>): void | Added| -| @ohos.vibrator.d.ts | vibrator | isSupportEffect(effectId: string): Promise<boolean> | Added| - -**Adaptation Guide** - -Call **isSupportEffect** to check whether the passed effect ID is supported. - -```ts -import vibrator from '@ohos.vibrator'; -try { - // Check whether 'haptic.clock.timer' is supported. - vibrator.isSupportEffect('haptic.clock.timer', function (err, state) { - if (err) { - console.error('isSupportEffect failed, error:' + JSON.stringify(err)); - return; - } - console.log('The effectId is ' + (state ? 'supported' : 'unsupported')); - if (state) { - try { - vibrator.startVibration({ // To use startVibration, you must configure the ohos.permission.VIBRATE permission. - type: 'preset', - effectId: 'haptic.clock.timer', - count: 1, - }, { - usage: 'unknown' - }, (error) => { - if(error) { - console.error('haptic.clock.timer vibrator error:' + JSON.stringify(error)); - } else { - console.log('haptic.clock.timer vibrator success'); - } - }); - } catch (error) { - console.error('Exception in, error:' + JSON.stringify(error)); - } - } - }) -} catch (error) { - console.error('Exception in, error:' + JSON.stringify(error)); -} -``` - -## cl.vibrator Added stopVibration - -The **stopVibration** API is added. - -**Change Impact** - -Applications developed based on OpenHarmony4.0.5.2 or a later SDK version can use **stopVibration** to stop vibration in all modes. - -**Key API/Component Changes** - -The **stopVibration** API is added in **@ohos.vibrator.d.ts**. - -| Module | Class | Method/Attribute/Enum/Constant | Change Type| -| ------------------- | -------- | -------------------------------------------------------- | -------- | -| @ohos.vibrator.d.ts | vibrator | stopVibration(callback: AsyncCallback<void>): void | Added | -| @ohos.vibrator.d.ts | vibrator | stopVibration(): Promise<void> | Added | - -**Adaptation Guide** - -Call **stopVibration** to stop vibration in all modes. - -```ts -import vibrator from '@ohos.vibrator'; -try { - // Stop vibration in all modes. - vibrator.stopVibration(function (error) { - if (error) { - console.log('error.code' + error.code + 'error.message' + error.message); - return; - } - console.log('Callback returned to indicate successful.'); - }) -} catch (error) { - console.info('errCode: ' + error.code + ' ,msg: ' + error.message); -} -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.5.3/changelog-imf.md b/en/release-notes/changelogs/OpenHarmony_4.0.5.3/changelog-imf.md deleted file mode 100644 index f158d99d9a0023c67ad982fc6b687563121f4dac..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.5.3/changelog-imf.md +++ /dev/null @@ -1,19 +0,0 @@ -# Input Method Framework Subsystem – Input Method Framework Service Changelog - - -## @ohos.InputMethodSubtype Change of name, label, and id -Changed the **name**, **label**, and **id** attributes since API version 9. - -**Change Impact** - -Applications must be adapted to the following changes. - -| Name| Before Change| After Change| -| -------- | -------- | -------- | -| label | (1) Value: ID of the input method subtype.| (1) Value: Label of the input method subtype.| -| name | (1) Description: Name of the input method subtype. (2) Value: Label of the input method subtype.| (1) Description: Bundle name of the input method; (2) Value: Bundle name of the input method.| -| id | (1) Value: Bundle name of the input method.| (1) Value: ID of the input method subtype.| - -**Adaptation Guide** - -Update the code to adapt to the preceding changes. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.5.3/changelog-screenlock.md b/en/release-notes/changelogs/OpenHarmony_4.0.5.3/changelog-screenlock.md deleted file mode 100644 index deeaac319aecfd4ba2824b8f23370d6fe2601adc..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.5.3/changelog-screenlock.md +++ /dev/null @@ -1,157 +0,0 @@ -# Theme Framework Subsystem – Screenlock Management Service Changelog - - -## cl.screenlock.1 Permission Change of isLocked and unlock -Changed the **isLocked** and **unlock** APIs to system APIs since API version 9. - -You need to adapt your application based on the following information. - -**Change Impact** - -The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. - -- Involved APIs: - -```js - function isLocked(): boolean; - function unlock(callback: AsyncCallback): void; - function unlock():Promise; -``` - -- Before change: - -```js - * Checks whether the screen is currently locked. - * - * @returns Returns {@code true} if the screen is currently locked; returns {@code false} otherwise. - * @syscap SystemCapability.MiscServices.ScreenLock - * @since 9 - */ - function isLocked(): boolean; - - /** - * Unlock the screen. - * - * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. - * @syscap SystemCapability.MiscServices.ScreenLock - * @systemapi Hide this for inner system use. - * @since 9 - */ - function unlock(callback: AsyncCallback): void; - - /** - * Unlock the screen. - * - * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. - * @syscap SystemCapability.MiscServices.ScreenLock - * @systemapi Hide this for inner system use. - * @since 9 - */ - function unlock():Promise; -``` - -- After change: - -```js - * Checks whether the screen is currently locked. - * - * @returns Returns {@code true} if the screen is currently locked; returns {@code false} otherwise. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @syscap SystemCapability.MiscServices.ScreenLock - * @systemapi Hide this for inner system use. - * @since 9 - */ - function isLocked(): boolean; - - /** - * Unlock the screen. - * - * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. - * @syscap SystemCapability.MiscServices.ScreenLock - * @since 9 - */ - function unlock(callback: AsyncCallback): void; - - /** - * Unlock the screen. - * - * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. - * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. - * @syscap SystemCapability.MiscServices.ScreenLock - * @since 9 - */ - function unlock():Promise; -``` - - -**Adaptation Guide** - -Make sure the APIs are only invoked by system applications. - -The code snippet is as follows: - -```js - try { - let ret = screenLock.isLocked(); - console.error(`Obtain whether the screen is locked successfully , ret is: ${ret}`); - } catch (error) { - console.error(`Failed to obtain whether the screen is locked, error is : ${error.code}, ${error.message}`); - } -``` - -```js - screenlock.unlock((err, data) => { - if (err) { - console.error(`Failed to unlock the screen, because: ${err.message}`); - return; - } - console.info(`unlock the screen successfully. result: ${data}`); - }); -``` - -```js - screenlock.unlock().then((data) => { - console.info(`unlock the screen successfully. result: ${data}`); - }).catch((err) => { - console.error(`Failed to unlock the screen, because: ${err.message}`); - }); -``` - - -## cl.screenlock.2 Deprecation of isSecure -Deprecated the **isSecure** API since API version 9. - -You need to adapt your application based on the following information. - -**Change Impact** - -The API can no longer be used after being deleted. - -- Involved APIs: - -```js - function isSecure(): boolean; -``` - -- Before change: - -```js - function isSecure(): boolean; -``` - -- After change: - - The API is deleted. - - -**Adaptation Guide** - -Update the code so that the deprecated API is not used. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.5.3/changelog-wallpaper.md b/en/release-notes/changelogs/OpenHarmony_4.0.5.3/changelog-wallpaper.md deleted file mode 100644 index 18fff418c0723c7508f6c7eacdb318b95758402b..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.5.3/changelog-wallpaper.md +++ /dev/null @@ -1,306 +0,0 @@ -# Theme Framework Subsystem – Wallpaper Management Service Changelog - - -## cl.wallpaper.1 Permission Change of getColorsSync, getMinHeightSync, getMinWidthSync, restore, and setImage -Changed the **getColorsSync**, **getMinHeightSync**, **getMinWidthSync**, restore, and **setImage** APIs to system APIs since API version 9. - -You need to adapt your application based on the following information. - -**Change Impact** - -The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. - -- Involved APIs: - -```js - function getColorsSync(wallpaperType: WallpaperType): Array; - function getMinHeightSync(): number; - function getMinWidthSync(): number; - function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; - function restore(wallpaperType: WallpaperType): Promise; - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; -``` - -- Before change: - -```js - /** - * Obtains the wallpaper colors for the wallpaper of the specified type. Returns rgbaColor type of array callback function. - * @param wallpaperType Indicates the wallpaper type. - * @returns { Array } the Array returned by the function. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function getColorsSync(wallpaperType: WallpaperType): Array; - - /** - * Obtains the minimum height of the wallpaper. in pixels. returns 0 if no wallpaper has been set. - * @returns { number } the number returned by the function. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function getMinHeightSync(): number; - - /** - * Obtains the minimum width of the wallpaper. in pixels. returns 0 if no wallpaper has been set. - * @returns { number } the number returned by the function. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function getMinWidthSync(): number; - - /** - * Removes a wallpaper of the specified type and restores the default one. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; - - /** - * Removes a wallpaper of the specified type and restores the default one. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function restore(wallpaperType: WallpaperType): Promise; - - /** - * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. - * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; - - /** - * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. - * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @systemapi Hide this for inner system use. - * @since 9 - */ - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; -``` - -- After change: - -```js - /** - * Obtains the wallpaper colors for the wallpaper of the specified type. Returns rgbaColor type of array callback function. - * @param wallpaperType Indicates the wallpaper type. - * @returns { Array } the Array returned by the function. - * @throws {BusinessError} 401 - parameter error. - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function getColorsSync(wallpaperType: WallpaperType): Array; - - /** - * Obtains the minimum height of the wallpaper. in pixels. returns 0 if no wallpaper has been set. - * @returns { number } the number returned by the function. - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function getMinHeightSync(): number; - - /** - * Obtains the minimum width of the wallpaper. in pixels. returns 0 if no wallpaper has been set. - * @returns { number } the number returned by the function. - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function getMinWidthSync(): number; - - /** - * Removes a wallpaper of the specified type and restores the default one. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; - - /** - * Removes a wallpaper of the specified type and restores the default one. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function restore(wallpaperType: WallpaperType): Promise; - - /** - * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. - * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; - - /** - * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. - * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. - * @param wallpaperType Indicates the wallpaper type. - * @throws {BusinessError} 401 - parameter error. - * @throws {BusinessError} 201 - permission denied. - * @permission ohos.permission.SET_WALLPAPER - * @syscap SystemCapability.MiscServices.Wallpaper - * @since 9 - */ - function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; -``` - - -**Adaptation Guide** - -Make sure the APIs are only invoked by system applications. - -The code snippet is as follows: - -```js - try { - let colors = wallpaper.getColorsSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM); - console.log(`success to getColorsSync: ${JSON.stringify(colors)}`); - } catch (error) { - console.error(`failed to getColorsSync because: ${JSON.stringify(error)}`); - } -``` - -```js - let minHeight = wallpaper.getMinHeightSync(); -``` - -```js - let minWidth = wallpaper.getMinWidthSync(); -``` - -```js - wallpaper.restore(wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { - if (error) { - console.error(`failed to restore because: ${JSON.stringify(error)}`); - return; - } - console.log(`success to restore.`); - }); -``` - -```js - wallpaper.restore(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { - console.log(`success to restore.`); - }).catch((error) => { - console.error(`failed to restore because: ${JSON.stringify(error)}`); - }); -``` - -```js - // The source type is string. - let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg"; - wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { - if (error) { - console.error(`failed to setImage because: ${JSON.stringify(error)}`); - return; - } - console.log(`success to setImage.`); - }); -``` - -```js - // The source type is string. - let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg"; - wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { - console.log(`success to setImage.`); - }).catch((error) => { - console.error(`failed to setImage because: ${JSON.stringify(error)}`); - }); -``` - - -## cl.wallpaper.2 Deprecation of getIdSync, getFileSync, isChangeAllowed, isUserChangeAllowed, on, off, and RgbaColor -Deprecated the **getIdSync**, **getFileSync**, **isChangeAllowed**, **isUserChangeAllowed**, **on**, **off**, and **RgbaColor** APIs since API version 9. - -You need to adapt your application based on the following information. - -**Change Impact** - -The APIs can no longer be used after being deleted. - -- Involved APIs: - -```js - function getIdSync(wallpaperType: WallpaperType): number; - function getFileSync(wallpaperType: WallpaperType): number; - function isChangeAllowed(): boolean; - function isUserChangeAllowed(): boolean; - function on(type: 'colorChange', callback: (colors: Array, wallpaperType: WallpaperType) => void): void; - function off(type: 'colorChange', callback?: (colors: Array, wallpaperType: WallpaperType) => void): void; - interface RgbaColor { - red: number; - green: number; - blue: number; - alpha: number; - } -``` - -- Before change: - -```js - function getIdSync(wallpaperType: WallpaperType): number; - function getFileSync(wallpaperType: WallpaperType): number; - function isChangeAllowed(): boolean; - function isUserChangeAllowed(): boolean; - function on(type: 'colorChange', callback: (colors: Array, wallpaperType: WallpaperType) => void): void; - function off(type: 'colorChange', callback?: (colors: Array, wallpaperType: WallpaperType) => void): void; - interface RgbaColor { - red: number; - green: number; - blue: number; - alpha: number; - } -``` - -- After change: - - The APIs are deleted. - - -**Adaptation Guide** - -Update the code so that the deprecated APIs are not used. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.5.5/changelogs-arkui.md b/en/release-notes/changelogs/OpenHarmony_4.0.5.5/changelogs-arkui.md deleted file mode 100644 index eaeba8adecf79591f6f27c06a4d8ba394d2fd42a..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.5.5/changelogs-arkui.md +++ /dev/null @@ -1,53 +0,0 @@ -# ArkUI Subsystem Changelog - -## cl.arkui.1 Change in the Default Scrollbar State of \ and \ Components - -Changed the default state of the scrollbar in the **\** and **\** components from **BarState.Off** to **BarState.Auto**. - -**Change Impact** - -In the scenario where the scrollbar status is not set in the **\** and **\** components: - -- Before change: - - The scrollbar is not displayed. - -- After change: - - The scrollbar is displayed during scrolling and is hidden 2 seconds after the scrolling stops. - -**Key API/Component Changes** - -**scrollBar** attribute of the **\** and **\** components: -- [List](../../../application-dev/reference/arkui-ts/ts-container-list.md#attributes) -- [Grid](../../../application-dev/reference/arkui-ts/ts-container-grid.md#attributes) - -**Adaptation Guide** - -In scenarios where the scrollbar is not required, set the **scrollBar** attribute of the **\** and **\** components to **BarState.Off**. - -The code snippet is as follows: -```ts -// xxx.ets -@Entry -@Component -struct ListItemExample { - private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - - build() { - Column() { - List({ space: 20, initialIndex: 0 }) { - ForEach(this.arr, (item) => { - ListItem() { - Text('' + item) - .width('100%').height(100).fontSize(16) - .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) - } - }, item => item) - } - .width('90%') - .scrollBar(BarState.Off) - }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) - } -} -``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelog-huks.md b/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelog-huks.md deleted file mode 100644 index 6541a61954eff4cfc1e55863c9ba2f7b5c5c13a3..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelog-huks.md +++ /dev/null @@ -1,30 +0,0 @@ -# HUKS Changelog - -## cl.huks.1 Change of the Permission for Using attestKeyItem - -The **attestKeyItem** interface attests a key using a public key encapsulated based on the device certificate chain. Any arbitrary export of the device certificate increases the risks on user privacy. Therefore, certain permissions are required for using this interface. - -**Change Impact** - -Applications without the **ohos.permission.ACCESS_IDS** permission or the system_basic or system_core permission cannot call **attestKeyItem()**. - -**Key API/Component Changes** - -- Involved APIs: - - attestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\): void; - attestKeyItem(keyAlias: string, options: HuksOptions): Promise\; - -- Before change: - - The AccessToken permission is verified only for the applications that pass in a tag related to **ATTESTATION_ID**. - - -- After change: - - **attestKeyItem()** can be called only by a system application with the system_basic or system_core permission or an application with the **ohos.permission.ACCESS_IDS** permission. - -**Adaptation Guide** - -Applications with the system_basic or system_core permission can call **attestKeyItem()**. If an application with the normal permission needs to call **attestKeyItem()**, it must have the **ohos.permission.ACCESS_IDS** permission. For details about how to apply for the permission, see [ACL](../../../application-dev/security/accesstoken-overview.md#acl). - diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelog-web.md b/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelog-web.md deleted file mode 100644 index a9ad760a1c58f12e013d2a7a9feeee6240cd37d2..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelog-web.md +++ /dev/null @@ -1,33 +0,0 @@ -# Web Subsystem Changelog - -Compared with earlier versions, OpenHarmony 4.0.6.1 has the following API changes in its web subsystem: - -## cl.web.1 Parameters in createWebMessagePorts - -Added an optional parameter to the **WebMessagePort** API to accommodate more data types. - -**Change Impact** - -None (The added parameter is optional, and the API is forward compatible.) - -**Key API/Component Changes** - -- Involved APIs: - - createWebMessagePorts(): Array\; - -- Before change: - - ```ts - createWebMessagePorts(): Array; - ``` - -- After change: - - ```ts - createWebMessagePorts(isExtentionType?: boolean): Array; - ``` - -**Adaptation Guide** - -N/A diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelogs-usb.md b/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelogs-usb.md deleted file mode 100644 index b8218c69f1ccde8d6f8e283f410e1dee64bb4364..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelogs-usb.md +++ /dev/null @@ -1,23 +0,0 @@ -# USB Subsystem API Changelog - -## cl.usb_manager.1 SDK API Deletion - -For applications developed based on earlier versions, you need to change the name of the imported bundle. Otherwise, the original service logic will be affected. - -**Key API/Component Changes** - -The **@ohos.usbV9.d.ts** file is replaced by the **@ohos.usbManager.d.ts** file. - -| New Bundle | Original Bundle | Deleted Bundle | -| -------------------- | ------------- | --------------- | -| ohos.usbManager.d.ts | ohos.usb.d.ts | ohos.usbV9.d.ts | - -You need to import **@ohos.usbManager** to use USB service APIs. - - ```ts - import usbManager from '@ohos.usbManager'; - ``` - -**Adaptation Guide** - -For details about usage of each API, see the [API Reference](../../../application-dev/reference/apis/js-apis-usbManager.md). diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.6.3/changelogs-arkui.md b/en/release-notes/changelogs/OpenHarmony_4.0.6.3/changelogs-arkui.md deleted file mode 100644 index 344aa3f1f64081b00755ac6b622dee3d0bbc5ad2..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.6.3/changelogs-arkui.md +++ /dev/null @@ -1,33 +0,0 @@ -# ArkUI Subsystem Changelog -Fixed the issue where the layout of child components in the [\](../../../application-dev/reference/arkui-ts/ts-container-stack.md) container does not follow the **alignContent** settings when the child components do not fit in the container. - -Example: - -```ts -@Entry -@Component -struct StackExample { - build() { - Stack({alignContent:Alignment.TopEnd}){ - Text('First child, show in bottom') - .width(200).height(200).backgroundColor(0xd2cab3).margin(10) - }.width(150).height(150).backgroundColor(Color.Pink).margin(100) - } -} -``` -Before: Child components are not arranged based on **alignContent:Alignment.TopEnd**. - -![stack](figures/stack_before.jpg) - -After: Child components are arranged based on **alignContent:Alignment.TopEnd**. - -![stack](figures/stack_after.jpg) - - -**Change Impact** - -The previous workaround – setting the **Offset** or **translate** attribute – needs to be removed. - -**Adaptation Guide** - -Remove the **Offset** and **translate** settings for the child components and use **alignContent** for layout. diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.6.3/figures/stack_after.jpg b/en/release-notes/changelogs/OpenHarmony_4.0.6.3/figures/stack_after.jpg deleted file mode 100644 index eacfe82a9b1175a8a944be8a793ec940a4a80e0d..0000000000000000000000000000000000000000 Binary files a/en/release-notes/changelogs/OpenHarmony_4.0.6.3/figures/stack_after.jpg and /dev/null differ diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.6.3/figures/stack_before.jpg b/en/release-notes/changelogs/OpenHarmony_4.0.6.3/figures/stack_before.jpg deleted file mode 100644 index b7b26a73935e28ce34d9895ac3e0cf519bbb41b5..0000000000000000000000000000000000000000 Binary files a/en/release-notes/changelogs/OpenHarmony_4.0.6.3/figures/stack_before.jpg and /dev/null differ diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.7.1/changelog-huks.md b/en/release-notes/changelogs/OpenHarmony_4.0.7.1/changelog-huks.md deleted file mode 100644 index 7399cead068359b4b99337704f1dc42f7e77172a..0000000000000000000000000000000000000000 --- a/en/release-notes/changelogs/OpenHarmony_4.0.7.1/changelog-huks.md +++ /dev/null @@ -1,98 +0,0 @@ -# HUKS Changelog - -## cl.huks.1 HUKS Supports RsaPssSaltLengthType - -Before the change, the HUKS uses **RSA_PSS_SALT_LEN_MAX** for signing or signature verification by default. - -After the change, the type defined by **HuksRsaPssSaltLenType** is passed in for signature or signature verification. If **HuksRsaPssSaltLenType** is not passed in, **RSA_PSS_SALT_LEN_MAX** is used by default. - -**Change Impact** - -Behaviors of released JavaScript APIs have been changed. - -**Key API/Component Changes** - -Released JavaScript APIs remain unchanged, but the parameter set passed to the APIs are changed. - -**Adaptation Guide** - -The following uses RSA signing as an example. - -```js -import huks from '@ohos.security.huks'; - -let keyAlias = 'rsa_Key'; -let inData = new Uint8Array( - 0x4B, 0x1E, 0x22, 0x64, 0xA9, 0x89, 0x60, 0x1D, 0xEC, 0x78, 0xC0, 0x5D, 0xBE, 0x46, 0xAD, 0xCF, - 0x1C, 0x35, 0x16, 0x11, 0x34, 0x01, 0x4E, 0x9B, 0x7C, 0x00, 0x66, 0x0E, 0xCA, 0x09, 0xC0, 0xF3, -); -/* Parameters for signing */ -let signProperties = new Array(); -signProperties[0] = { - tag: huks.HuksTag.HUKS_TAG_ALGORITHM, - value: huks.HuksKeyAlg.HUKS_ALG_RSA, -} -signProperties[1] = { - tag: huks.HuksTag.HUKS_TAG_PURPOSE, - value: - huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_SIGN -} -signProperties[2] = { - tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, - value: huks.HuksKeySize.HUKS_RSA_KEY_SIZE_2048, -} -signProperties[3] = { - tag: huks.HuksTag.HUKS_TAG_PADDING, - value: huks.HuksKeyPadding.HUKS_PADDING_PSS, -} -signProperties[4] = { - tag: huks.HuksTag.HUKS_TAG_DIGEST, - value: huks.HuksKeyDigest.HUKS_DIGEST_SHA1, -} -signProperties[5] = { - tag: huks.HuksTag.HUKS_TAG_RSA_PSS_SALT_LEN_TYPE, - value: huks.HuksRsaPssSaltLenType.HUKS_RSA_PSS_SALT_LEN_MAX, -} -let signOptions = { - properties: signProperties, - inData: inData -} - -huks.initSession(keyAlias, signOptions); -``` - -For more information, see [HUKS Development](../../../application-dev/security/huks-guidelines.md) and [HUKS](../../../application-dev/reference/apis/js-apis-huks.md). - -## cl.huks.2 Resolved the Issues in Storage or Export of Derived or Agreed Keys - -Before the change, the HUKS supports storage and export of derived keys and agreed keys, which poses security risks. - -After the change, the application needs to pass in **HuksKeyStorageType** for key derivation or key agreement. Only storage or export is allowed at a time. If this parameter is not passed in, both storage and export are supported by default, which poses security risks and is not recommended. - -**Change Impact** - -Behaviors of released JavaScript APIs have been changed. - -**Key API/Component Changes** - -Released JavaScript APIs remain unchanged, but the parameter set passed to the APIs are changed. - -**Adaptation Guide** - -For more information, see [HUKS Development](../../../application-dev/security/huks-guidelines.md) and [HUKS](../../../application-dev/reference/apis/js-apis-huks.md). - -## cl.huks.3 Adding Tags for Fine-grained User Identity Access Control - -Added **HUKS_TAG_KEY_AUTH_PURPOSE** to **HuksTag** for fine-grained user identity access control. This tag specifies the user identity authentication used for specific algorithm. - -**Change Impact** - -The new HuksTag does not affect existing APIs. - -**Key API/Component Changes** - -**HuksTag** is added with **HUKS_TAG_KEY_AUTH_PURPOSE** to support fine-grained user identity access control. - -**Adaptation Guide** - -For more information, see [Fine-grained User Identity Authentication](../../../application-dev/security/huks-guidelines.md#fine-grained-user-identity-authentication) and [HuksTag](../../../application-dev/reference/apis/js-apis-huks.md#hukstag). diff --git a/en/release-notes/changelogs/v3.2-Release/Readme-EN.md b/en/release-notes/changelogs/v3.2-Release/Readme-EN.md new file mode 100644 index 0000000000000000000000000000000000000000..340e3f1e7826670138645e5e658b8aa387ac270e --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/Readme-EN.md @@ -0,0 +1,8 @@ +# Readme + +- [Ability framework](changelogs-ability.md) +- [Bundle manager subsystem](changelogs-bundlemanager.md) +- [Resource scheduler subsystem](changelogs-resourceschedule.md) +- [Telephony subsystem](changelogs-telephony.md) +- [Util subsystem](changelogs-util.md) + diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelogs-ability.md b/en/release-notes/changelogs/v3.2-Release/changelogs-ability.md similarity index 100% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelogs-ability.md rename to en/release-notes/changelogs/v3.2-Release/changelogs-ability.md diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelogs-bundlemanager.md b/en/release-notes/changelogs/v3.2-Release/changelogs-bundlemanager.md similarity index 69% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelogs-bundlemanager.md rename to en/release-notes/changelogs/v3.2-Release/changelogs-bundlemanager.md index e90a0e21db43a89b2bad7e03ce388c7fdc35c2f7..2aa79ad27454a6277da0bb106de84c3529593d58 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelogs-bundlemanager.md +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-bundlemanager.md @@ -124,8 +124,8 @@ The **visible** field in the [ModuleAbilityInfo](https://gitee.com/openharmony/i **Adaptation Guide**
Change **visible** to **exported** for your application. -## cl.bundlemanager.8 Deleted the distributedNotificationEnabled Tag from the app.json File -The [distributedNotificationEnabled](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** file. +## cl.bundlemanager.8 Deleted the distributedNotificationEnabled Tag from the app.json Configuration File +The [distributedNotificationEnabled](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. **Change Impact**
If this tag is used, an error is reported during compilation on DevEco Studio. @@ -133,8 +133,8 @@ If this tag is used, an error is reported during compilation on DevEco Studio. **Adaptation Guide**
Delete this tag from the configuration file. -## cl.bundlemanager.9 Deleted the entityType Tag from the app.json File -The [entityType](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** file. +## cl.bundlemanager.9 Deleted the entityType Tag from the app.json Configuration File +The [entityType](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. **Change Impact**
If this tag is used, an error is reported during compilation on DevEco Studio. @@ -142,8 +142,8 @@ If this tag is used, an error is reported during compilation on DevEco Studio. **Adaptation Guide**
Delete this tag from the configuration file. -## cl.bundlemanager.10 Deleted the keepAlive Tag from the app.json File -The [keepAlive](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** file. +## cl.bundlemanager.10 Deleted the keepAlive Tag from the app.json Configuration File +The [keepAlive](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. **Change Impact**
If this tag is used, an error is reported during compilation on DevEco Studio. @@ -151,8 +151,8 @@ If this tag is used, an error is reported during compilation on DevEco Studio. **Adaptation Guide**
Delete this tag from the configuration file. -## cl.bundlemanager.11 Deleted the removable Tag from the app.json File -The [removable](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** file. +## cl.bundlemanager.11 Deleted the removable Tag from the app.json Configuration File +The [removable](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. **Change Impact**
If this tag is used, an error is reported during compilation on DevEco Studio. @@ -160,8 +160,8 @@ If this tag is used, an error is reported during compilation on DevEco Studio. **Adaptation Guide**
Delete this tag from the configuration file. -## cl.bundlemanager.12 Deleted the singleton Tag from the app.json File -The [singleton](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** file. +## cl.bundlemanager.12 Deleted the singleton Tag from the app.json Configuration File +The [singleton](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. **Change Impact**
If this tag is used, an error is reported during compilation on DevEco Studio. @@ -169,8 +169,8 @@ If this tag is used, an error is reported during compilation on DevEco Studio. **Adaptation Guide**
Delete this tag from the configuration file. -## cl.bundlemanager.13 Deleted the userDataClearable Tag from the app.json File -The [userDataClearable](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** file. +## cl.bundlemanager.13 Deleted the userDataClearable Tag from the app.json Configuration File +The [userDataClearable](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. **Change Impact**
If this tag is used, an error is reported during compilation on DevEco Studio. @@ -178,8 +178,8 @@ If this tag is used, an error is reported during compilation on DevEco Studio. **Adaptation Guide**
Delete this tag from the configuration file. -## cl.bundlemanager.14 No Longer Chinese Characters for the name Tag under module in the module.json File -The value of [name](../../../application-dev/quick-start/module-configuration-file.md) under **module** in the **module.json** file does not support Chinese characters. +## cl.bundlemanager.14 No Longer Chinese Characters for the name Tag under module in the module.json Configuration File +The value of [name](../../../application-dev/quick-start/module-configuration-file.md) under **module** in the **module.json** configuration file does not support Chinese characters. **Change Impact**
If the tag is set to Chinese, an error is reported during compilation on DevEco Studio. @@ -187,8 +187,8 @@ If the tag is set to Chinese, an error is reported during compilation on DevEco **Adaptation Guide**
Set this tag to English. -## cl.bundlemanager.15 No Longer Chinese Characters for the name Tag under ability in the module.json File -The value of [name](../../../application-dev/quick-start/module-configuration-file.md) under **ability** in the **module.json** file does not support Chinese characters. +## cl.bundlemanager.15 No Longer Chinese Characters for the name Tag under ability in the module.json Configuration File +The value of [name](../../../application-dev/quick-start/module-configuration-file.md) under **ability** in the **module.json** configuration file does not support Chinese characters. **Change Impact**
If the tag is set to Chinese, an error is reported during compilation on DevEco Studio. @@ -196,8 +196,8 @@ If the tag is set to Chinese, an error is reported during compilation on DevEco **Adaptation Guide**
Set this tag to English. -## cl.bundlemanager.16 Deleted the uiSyntax Tag from the module.json File -The [uiSyntax](../../../application-dev/quick-start/module-configuration-file.md) tag is deleted from the **module.json** file. +## cl.bundlemanager.16 Deleted the uiSyntax Tag from the module.json Configuration File +The [uiSyntax](../../../application-dev/quick-start/module-configuration-file.md) tag is deleted from the **module.json** configuration file. **Change Impact**
If this tag is used, an error is reported during compilation on DevEco Studio. @@ -205,8 +205,8 @@ If this tag is used, an error is reported during compilation on DevEco Studio. **Adaptation Guide**
Delete this tag from the configuration file. -## cl.bundlemanager.17 Changed srcEntrance to srcEntry in the module.json File -The [srcEntrance](../../../application-dev/quick-start/module-configuration-file.md) tag under **module** and **ability** in the **module.json** file is changed to **srcEntry**. +## cl.bundlemanager.17 Changed srcEntrance to srcEntry in the module.json Configuration File +The [srcEntrance](../../../application-dev/quick-start/module-configuration-file.md) tag under **module** and **ability** in the **module.json** configuration file is changed to **srcEntry**. **Change Impact**
If the **srcEntrance** tag is used, an error is reported during compilation on DevEco Studio. @@ -214,8 +214,8 @@ If the **srcEntrance** tag is used, an error is reported during compilation on D **Adaptation Guide**
Replace the **srcEntrance** tag with **srcEntry** in the configuration file. -## cl.bundlemanager.18 Deleted the apiVersion Tag Under distroFilter from the module.json File -The **apiVersion** tag under [distroFilter](../../../application-dev/quick-start/module-configuration-file.md) is deleted from the **module.json** file. +## cl.bundlemanager.18 Deleted the apiVersion Tag Under distroFilter from the module.json Configuration File +The **apiVersion** tag under [distroFilter](../../../application-dev/quick-start/module-configuration-file.md) is deleted from the **module.json** configuration file. **Change Impact**
If this tag is used, an error is reported during compilation on DevEco Studio. @@ -223,8 +223,8 @@ If this tag is used, an error is reported during compilation on DevEco Studio. **Adaptation Guide**
Delete this tag from the configuration file. -## cl.bundlemanager.19 Changed distroFilter to distributionFilter in the module.json File -The [distroFilter](../../../application-dev/quick-start/module-configuration-file.md) tag in the **module.json** file is changed to **distributionFilter**. +## cl.bundlemanager.19 Changed distroFilter to distributionFilter in the module.json Configuration File +The [distroFilter](../../../application-dev/quick-start/module-configuration-file.md) tag in the **module.json** configuration file is changed to **distributionFilter**. **Change Impact**
If the **distroFilter** tag is used, an error is reported during compilation on DevEco Studio. @@ -232,14 +232,67 @@ If the **distroFilter** tag is used, an error is reported during compilation on **Adaptation Guide**
Replace **distroFilter** with **distributionFilter** in the configuration file. -## cl.bundlemanager.20 Changed standard of launchType to multiton in the module.json File +## cl.bundlemanager.20 Changed standard of launchType to multiton in the module.json Configuration File The **standard** mode of the [launchType](../../../application-dev/quick-start/module-configuration-file.md) tag in the **module.json** file is changed to **multiton**. **Adaptation Guide**
-Replace **standard** of **launchType** with **multiton** in the configuration file. +Replace **standard** of **launchType** to **multiton** in the configuration file. -## cl.bundlemanager.20 Changed visible of abilities to exported in the module.json File -The **visible** tag under [abilities](../../../application-dev/quick-start/module-configuration-file.md) in the [module.json] file is changed to **exported**, indicating whether the ability supports export and can be used by other ability. +## cl.bundlemanager.21 Deleted the atomicService Tag from the app.json File +The **atomicService** tag is deleted from the **app.json** file. + +**Change Impact**
+If this tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Delete the **atomicService** tag from your code. + +## cl.bundlemanager.22 Added the bundleType Tag to the app.json File +The **bundleType** tag is added to the **app.json** file. + +**Change Impact**
+For an existing ability with [installationFree](../../../application-dev/quick-start/module-configuration-file.md) set to **true**, **bundleType** must be set to **atomicService** in the **app.json** file. Otherwise, the packaging fails. + +**Adaptation Guide**
+Add the [bundleType](../../../application-dev/quick-start/app-configuration-file.md) tag. This tag can be left blank. The default value is **app**. The setting of this tag and the [installationFree](../../../application-dev/quick-start/module-configuration-file.md) field in the **module.json** file must meet the following rules: +- If **bundleType** is **app**, **installationFree** must be set to **false**. +- If **bundleType** is **atomicService**, **installationFree** must be set to **true**. + +## cl.bundlemanager.23 Deleted the split Field from the ApplicationInfo Struct + +The **split** field is deleted from the [ApplicationInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts) struct. + +**Change Impact**
+If the **split** field is used in your code, the compilation fails. + +**Key API/Component Changes**
+The **split** field is deleted from the [ApplicationInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts) struct. + +**Adaptation Guide**
+Delete the **split** field from the **ApplicationInfo** struct of your code. The stage model always forcibly splits bundles. + +## cl.bundlemanager.24 Deleted the atomicServiceModuleType Field from the HapModuleInfo Struct + +The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct. + +**Change Impact**
+If the **atomicServiceModuleType** field is used in your code, the compilation fails. + +**Key API/Component Changes**
+The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct. + +**Adaptation Guide**
+Record the setting of the **atomicServiceModuleType** field, delete it from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct, and set the **moduleType** field in the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct to the recorded value. + +## cl.bundlemanager.25 Deleted the AtomicServiceModuleType Enumerated Value + +The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct. + +**Change Impact**
+If the **atomicServiceModuleType** field is used in your code, the compilation fails. + +**Key API/Component Changes**
+The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct. **Adaptation Guide**
-Replace **visible** under **abilities** with **exported** in the configuration file. +Record the setting of the **atomicServiceModuleType** field, delete it from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct, and set the **moduleType** field in the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct to the recorded value. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-resourceschedule.md b/en/release-notes/changelogs/v3.2-Release/changelogs-resourceschedule.md similarity index 100% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-resourceschedule.md rename to en/release-notes/changelogs/v3.2-Release/changelogs-resourceschedule.md diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-telephony.md b/en/release-notes/changelogs/v3.2-Release/changelogs-telephony.md similarity index 86% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-telephony.md rename to en/release-notes/changelogs/v3.2-Release/changelogs-telephony.md index e2e631e1f4cdeecd88ba792956e8becc0e0bccab..b39b2012c1a52d6bce9bf7f3f2955fd6e49e4ce7 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-telephony.md +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-telephony.md @@ -5,11 +5,11 @@ ## cl.telephony.1 Call Module reject API Change Changed the `reject` API to the `rejectCall` API in the call module of the telephony subsystem since API version 9. -You need to adapt your application. +You need to adapt your application based on the following information. **Change Impact** -The `reject` API is deprecated and cannot be used any more. Use the `rejectCall` API instead. Otherwise, relevant functions will be affected. +The `reject` API is deprecated and cannot be used anymore. Use the `rejectCall` API instead. Otherwise, relevant functions will be affected. - Involved APIs: @@ -44,7 +44,7 @@ The `reject` API is deprecated and cannot be used any more. Use the `rejectCall` **Adaptation Guide** -The `reject` API is deprecated and cannot be used any more. Use the `rejectCall` API instead. +The `reject` API is deprecated and cannot be used anymore. Use the `rejectCall` API instead. Use the new API. The sample code is as follows: ```js @@ -100,11 +100,11 @@ call.rejectCall(rejectMessageOptions, (err, data) => { ## cl.telephony.2 Call Module answer API Change Changed the `answer` API to the `answerCall` API in the call module of the telephony subsystem since API version 9. -You need to adapt your application. +You need to adapt your application based on the following information. **Change Impact** -The `answer` API is deprecated and cannot be used any more. Use the `answerCall` API instead. Otherwise, relevant functions will be affected. +The `answer` API is deprecated and cannot be used anymore. Use the `answerCall` API instead. Otherwise, relevant functions will be affected. - Involved APIs: @@ -133,7 +133,7 @@ The `answer` API is deprecated and cannot be used any more. Use the `answerCall` **Adaptation Guide** -The `answer` API is deprecated and cannot be used any more. Use the `answerCall` API instead. +The `answer` API is deprecated and cannot be used anymore. Use the `answerCall` API instead. Use the new API. The sample code is as follows: ```js @@ -163,11 +163,11 @@ call.answerCall((err, data) => { ## cl.telephony.1 Call Module hangup API Change Changed the `hangup` API to the `hangUpCall` API in the call module of the telephony subsystem since API version 9. -You need to adapt your application. +You need to adapt your application based on the following information. **Change Impact** -The `hangup` API is deprecated and cannot be used any more. Use the `hangUpCall` API instead. Otherwise, relevant functions will be affected. +The `hangup` API is deprecated and cannot be used anymore. Use the `hangUpCall` API instead. Otherwise, relevant functions will be affected. - Involved APIs: @@ -196,7 +196,7 @@ The `hangup` API is deprecated and cannot be used any more. Use the `hangUpCall` **Adaptation Guide** -The `hangup` API is deprecated and cannot be used any more. Use the `hangUpCall` API instead. +The `hangup` API is deprecated and cannot be used anymore. Use the `hangUpCall` API instead. Use the new API. The sample code is as follows: ```js diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelogs-util.md b/en/release-notes/changelogs/v3.2-Release/changelogs-util.md similarity index 100% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelogs-util.md rename to en/release-notes/changelogs/v3.2-Release/changelogs-util.md diff --git a/en/release-notes/changelogs/v3.2-beta4/Readme-EN.md b/en/release-notes/changelogs/v3.2-beta4/Readme-EN.md new file mode 100644 index 0000000000000000000000000000000000000000..a376c048c99bdf7b2073f41547ad5766c2322af5 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta4/Readme-EN.md @@ -0,0 +1,29 @@ +# Readme + +- [Ability framework](changelogs-ability.md) +- [Account subsystem](changelogs-account_os_account.md) +- [ArkUI development framework](changelogs-arkui.md) +- [Multimedia subsystem - camera](changelogs-camera.md) +- [Device management subsystem](changelogs-device-manager.md) +- [USB](changelogs-device-usb.md) +- [Distributed scheduler subsystem](changelogs-dmsfwk.md) +- [DSoftBus](changelogs-dsoftbus.md) +- [Customization subsystem](changelogs-enterprise_device_management.md) +- [File management subsystem](changelogs-filemanagement.md) +- [Location subsystem](changelogs-geolocation.md) +- [Globalization subsystem](changelogs-global.md) +- [Input method framework](changelogs-inputmethod-framworks.md) +- [Multimedia subsystem](changelogs-multimedia.md) +- [Multimodal input subsystem](changelogs-multimodalinput.md) +- [Common event and notification subsystem](changelogs-notification.md) +- [Power management subsystem](changelogs-power.md) +- [Upload and download](changelogs-request.md) +- [Resource manager subsystem](changelogs-resource-manager.md) +- [Resource scheduler subsystem](changelogs-resourceschedule.md) +- [Telephony subsystem](changelogs-telephony.md) +- [Test subsystem](changelogs-testfwk_arkxtest.md) +- [Theme](changelogs-theme.md) +- [User IAM subsystem](changelogs-useriam.md) +- [Ability framework - WantAgent](changelogs-wantAgent.md) +- [Web subsystem](changelogs-web.md) +- [Communication subsystem - WiFi](changelogs-wifi.md) diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.9.2/changelog-x-x.md b/en/release-notes/changelogs/v3.2-beta4/changelog-x-x.md similarity index 88% rename from en/release-notes/changelogs/OpenHarmony_3.2.9.2/changelog-x-x.md rename to en/release-notes/changelogs/v3.2-beta4/changelog-x-x.md index 3ac3e83268d2ac247676cd313d5b5e45d195ea2b..dcc7cd9aabb636ed248b5a37383410d4218b346f 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.9.2/changelog-x-x.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelog-x-x.md @@ -1,31 +1,26 @@ -# *Example* Subsystem ChangeLog +# *Example* Subsystem Changelog -Changes that affect contract compatibility of the last version should be described in the ChangeLog. The changes include but are not limited to those related to API names, parameters, return values, required permissions, call sequence, enumerated values, configuration parameters, and paths. The last version can be an LTS, release, beta, or monthly version, or the like. Contract compatibility, also called semantic compatibility, means that the original program behavior should remain consistent over versions. +Changes that affect contract compatibility of the last version should be described in the changelog. The changes include but are not limited to those related to API names, parameters, return values, required permissions, call sequence, enumerated values, configuration parameters, and paths. The last version can be an LTS, release, beta, or monthly version, or the like. Contract compatibility, also called semantic compatibility, means that the original program behavior should remain consistent over versions. ## cl.subsystemname.x xxx Function Change (Example: DeviceType Attribute Change or Camera Permission Change. Use a short description.) -Add the number **cl.*subsystemname*.*x*** before each change title, where **cl** is the abbreviation of ChangeLog, *subsystemname* is the standard English name of the subsystem, and *x* indicates the change sequence number (starting from 1 in ascending order). - +Add the number **cl.*subsystemname*.*x*** before each change title, where **cl** is the abbreviation of changelog, *subsystemname* is the standard English name of the subsystem, and *x* indicates the change sequence number (starting from 1 in ascending order). Describe the changes in terms of functions. Example: *n* and *m* of the *a* function are changed. Developers need to adapt their applications based on the change description. - If there is a requirement or design document corresponding to the change, attach the requirement number or design document number in the description. -**Change Impacts** +**Change Impact** Describe whether released APIs (JS or native APIs) are affected or API behavior is changed. - Describe whether available applications are affected, that is, whether an adaptation is required for building the application code in the SDK environment of the new version. **Key API/Component Changes** List the API/component changes involved in the function change. -**Adaptation Guide (Optional)** +**Adaptation Guide** Provide guidance for developers on how to adapt their application to the changes to be compatible with the new version. - Example: - Change parameter *n* to *m* in the *a* file. ``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-ability.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-ability.md similarity index 83% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-ability.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-ability.md index ae3d6a17cce9d488dff3f84765ca9f2cfc2260fe..111e725be013af24299c340cd541d385000f182c 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-ability.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-ability.md @@ -1,20 +1,21 @@ -# Ability Subsystem ChangeLog +# Ability Framework Changelog ## cl.ability.1 Application Component Startup Rule Change -The rules for starting application components of the ability subsystem are changed in the following scenarios: +The rules for starting application components are changed in the following scenarios: - - Start application components when the application is in the background. - - Start invisible application components across applications. - - Start **serviceAbility** and **dataAbility** of the FA model across applications. + - Start an application component when the application is in the background. + - Start an invisible application component across applications. + - Start a ServiceAbility and DataAbility of the FA model across applications. - Use the **startAbilityByCall** API. -You need to adapt your application based on the following information. +You need to adapt your application. -**Change Impacts** + +**Change Impact** If new rules are not adapted, application components cannot be started in the previous scenarios. -> **NOTE** +> **NOTE** > > Starting application components refers to any behavior starting or connecting to an ability. > @@ -69,13 +70,13 @@ If new rules are not adapted, application components cannot be started in the pr **Adaptation Guide** Startup rules for different scenarios are as follows: - - **Start application components when the application is in the background.** - - OpenHarmony 3.2 Beta3 rules: + - **Starting an application component when the application is in the background** + - Rule in OpenHarmony 3.2 Beta3: - - Starting application components when the application is in the background is not restricted. - - OpenHarmony 3.2 Beta4 rules: - - When the application is in the background, starting application components requires authentication. The following permission needs to be applied for: - ```json + - There is no restriction. + - Rule in OpenHarmony 3.2 Beta4: + - Authentication is required. The following permissions must be configured: + - ```json { "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND", "grantMode": "system_grant", @@ -84,18 +85,19 @@ Startup rules for different scenarios are as follows: "distributedSceneEnable": false } ``` - > **NOTE** + > **NOTE** > - > 1. Starting components of the same application is also restricted by this rule. - > 2. For SDKs of API version 8 or earlier, starting **serviceAbility** and **dataAbility** is not restricted by this rule. + > 1. Starting an application component of the same application is also restricted by this rule. + > 2. For SDKs of API version 8 or earlier, starting a ServiceAbility and DataAbility is not restricted by this rule. + + - **Starting an invisible application component across applications** - - **Start invisible application components across applications.** - - OpenHarmony 3.2 Beta3 rules: + - Rule in OpenHarmony 3.2 Beta3: - For applications whose APL is normal, invisible application components cannot be started across applications. - - OpenHarmony 3.2 Beta4 rules: - - For all applications, starting invisible application components across applications requires authentication. The following permission needs to be applied for: - ```json + - Rule in OpenHarmony 3.2 Beta4: + - For all applications, starting an invisible application component across applications requires authentication. The following permissions must be configured: + - ```json { "name": "ohos.permission.START_INVISIBLE_ABILITY", "grantMode": "system_grant", @@ -103,26 +105,26 @@ Startup rules for different scenarios are as follows: "provisionEnable": true, "distributedSceneEnable": false } - ``` - - - **Start serviceAbility and dataAbility of the FA model across applications.** + ``` + + - **Starting a ServiceAbility and DataAbility of the FA model across applications** - - OpenHarmony 3.2 Beta3 rules: - - Starting **serviceAbility** and **dataAbility** across applications is not restricted. - - OpenHarmony 3.2 Beta4 rules: - - Associated startup needs to be configured for the provider of **serviceAbility** and **dataAbility**. Otherwise, **serviceAbility** and **dataAbility** cannot be started across applications. (Associated startup cannot be configured for common applications.) + - Rule in OpenHarmony 3.2 Beta3: + - There is no restriction. + - Rule in OpenHarmony 3.2 Beta4: + - Associated startup must be configured for the provider of the ServiceAbility and DataAbility. Otherwise, they cannot be started across applications. (Associated startup cannot be configured for common applications.) - - **Use the startAbilityByCall API.** - - OpenHarmony 3.2 Beta3 rules: + - **Using the startAbilityByCall API** + - Rule in OpenHarmony 3.2 Beta3: - - The API call is not restricted. - - OpenHarmony 3.2 Beta4 rules: + - This is no restriction. + - Rule in OpenHarmony 3.2 Beta4: - The **startAbilityByCall** API cannot be called by the same application. - - Calling the **startAbilityByCall** API across applications requires authentication. The following permission needs to be applied for: + - Calling the **startAbilityByCall** API across applications requires authentication. The following permissions must be configured: - ```json + - ```json { "name": "ohos.permission.ABILITY_BACKGROUND_COMMUNICATION", "grantMode": "system_grant", @@ -137,24 +139,24 @@ Startup rules for different scenarios are as follows: ## cl.ability.2 Cross-Device Application Component Startup Rule Change (for System Applications Only) -The rules for starting cross-device application components of the ability subsystem are changed in the following scenarios: +The rules for starting cross-device application components are changed in the following scenarios: - - Start application components when the application is in the background. - - Start invisible application components across applications. - - Start **serviceAbility** of the FA model across applications. + - Start an application component when the application is in the background. + - Start an invisible application component across applications. + - Start a ServiceAbility of the FA model across applications. -You need to adapt your application based on the following information. +You need to adapt your application. -**Change Impacts** +**Change Impact** If new rules are not adapted, application components cannot be started in the previous scenarios. ->**NOTE** +> **NOTE** > ->Starting application components refers to any behavior starting or connecting to an ability. +> Starting application components refers to any behavior starting or connecting to an ability. > ->1. Start an ability using APIs such as **startAbility**, **startAbilityForResult**, and **startAbilityByCall**. ->2. Connect to an ability using APIs such as **connectAbility**. +> 1. Start an ability using APIs such as **startAbility**, **startAbilityForResult**, and **startAbilityByCall**. +> 2. Connect to an ability using APIs such as **connectAbility**. **Key API/Component Changes** @@ -181,13 +183,13 @@ If new rules are not adapted, application components cannot be started in the pr **Adaptation Guide** Startup rules for different scenarios are as follows: - - **Start application components when the application is in the background.** - - OpenHarmony 3.2 Beta3 rules: + - **Starting an application component when the application is in the background** + - Rule in OpenHarmony 3.2 Beta3: - - Starting application components when the application is in the background is not restricted. - - OpenHarmony 3.2 Beta4 rules: - - When the application is in the background, starting application components requires authentication. The following permission needs to be applied for: - ```json + - There is no restriction. + - Rule in OpenHarmony 3.2 Beta4: + - Authentication is required. The following permissions must be configured: + - ```json { "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND", "grantMode": "system_grant", @@ -196,18 +198,18 @@ Startup rules for different scenarios are as follows: "distributedSceneEnable": false } ``` - > **NOTE** - > - > 1. Starting components of the same application is also restricted by this rule. - > 2. For SDKs of API version 8 or earlier, starting **serviceAbility** is not restricted by this rule. + > **NOTE** + 1. Starting an application component of the same application is also restricted by this rule. + 2. For SDKs of API version 8 or earlier, starting a ServiceAbility is not restricted by this rule. + + - **Starting an invisible application component across applications** - - **Start invisible application components across applications.** - - OpenHarmony 3.2 Beta3 rules: + - Rule in OpenHarmony 3.2 Beta3: - Invisible application components cannot be started across applications. - - OpenHarmony 3.2 Beta4 rules: - - Starting invisible application components across applications requires authentication. The following permission needs to be applied for: - ```json + - Rule in OpenHarmony 3.2 Beta4: + - Authentication is required. The following permissions must be configured: + - ```json { "name": "ohos.permission.START_INVISIBLE_ABILITY", "grantMode": "system_grant", @@ -215,31 +217,31 @@ Startup rules for different scenarios are as follows: "provisionEnable": true, "distributedSceneEnable": false } - ``` + ``` - - **Start serviceAbility of the FA model across applications.** + - **Starting a ServiceAbility of the FA model across applications** - - OpenHarmony 3.2 Beta3 rules: + - Rule in OpenHarmony 3.2 Beta3: - - Starting **serviceAbility** across applications is not restricted. - - OpenHarmony 3.2 Beta4 rules: - - Associated startup needs to be configured for the **serviceAbility** provider application. Otherwise, **serviceAbility** cannot be started across applications. (Associated startup cannot be configured for common applications.) + - There is no restriction. + - Rule in OpenHarmony 3.2 Beta4: + - Associated startup needs to be configured for the provider of the ServiceAbility. Otherwise, the ServiceAbility cannot be started across applications. (Associated startup cannot be configured for common applications.) - Configure associated startup as follows: - ```json + - ```json { "bundleName": "", "app_signature": ["xxxxxxxxxxxxxxxxxxx"], "associatedWakeUp": true } - ``` + ``` ## cl.ability.3 API Exception Handling Method Change Certain APIs of the ability subsystem use service logic return values to indicate error information, which does not comply with the API error code specifications of OpenHarmony. -**Change Impacts** +**Change Impact** -The application developed based on earlier versions needs to adapt the new APIs and their method for returning API error information. Otherwise, the original service logic will be affected. +The application developed based on earlier versions needs to be adapted. Otherwise, the service logic will be affected. **Key API/Component Changes** @@ -275,7 +277,7 @@ For adaptation to the unified API exception handling mode, certain ability subsy **Adaptation Guide** -The original APIs are only migrated to the new namespace. Therefore, you can modify **import** to solve the adaptation problem. +The original APIs are only moved to the new namespace. Therefore, you can modify **import** to solve the adaptation problem. If the original API uses **@ohos.application.missionManager**: @@ -293,11 +295,11 @@ In addition, exception handling is needed. For details, see the API reference fo ## cl.ability.4 API Change -The names of some ability subsystem APIs are changed. +The names of certain ability subsystem APIs are changed. **Key API/Component Changes** -| Module | Class | Method/Attribute/Enumeration/Constant | Change Type| +| Module | Class | Method/Attribute/Enum/Constant | Change Type| | ----------------------------------------- | ----------------------- | ------------------------------------------------------------ | -------- | | @ohos.application.Ability | Caller | onRelease(callback: OnReleaseCallBack): **void**; | Deprecated | | @ohos.app.ability.UIAbility | Caller | on(**type**: "release", callback: OnReleaseCallBack): **void**; | Added | diff --git a/en/release-notes/changelogs/v3.2-beta4/changelogs-account_os_account.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-account_os_account.md new file mode 100644 index 0000000000000000000000000000000000000000..6a768be1685140abcb5d5b8301e95d0803d38698 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-account_os_account.md @@ -0,0 +1,233 @@ +# Account Subsystem Changelog + +## cl.account_os_account.1 Change of Definition and Return Mode of Error Codes + +To ensure consistent error codes and normalized return of error codes in the account subsystem APIs, the following changes are made in API version 9: + +- Added the following error code definitions: [Account Error Codes](../../../application-dev/reference/errorcodes/errorcode-account.md) + +- Changed the error code return modes as follows: + - Asynchronous APIs: Return error information in the **error** object of **AsyncCallback** or **Promise**. Throw an exception to return an error related to the parameter type or quantity. + - Synchronous APIs: Throw an exception to return an error message. + +**Change Impact** + +The application developed based on earlier versions needs to adapt the method for returning API error information. Otherwise, the service logic will be affected. + +**Key API/Component Changes** + +Involved APIs: + - class AccountManager + - activateOsAccount(localId: number, callback: AsyncCallback<void>): void; + - removeOsAccount(localId: number, callback: AsyncCallback<void>): void; + - setOsAccountConstraints(localId: number, constraints: Array<string>, enable: boolean, callback: AsyncCallback<void>): void; + - setOsAccountName(localId: number, localName: string, callback: AsyncCallback<void>): void; + - queryMaxOsAccountNumber(callback: AsyncCallback<number>): void; + - queryAllCreatedOsAccounts(callback: AsyncCallback<Array<OsAccountInfo>>): void; + - createOsAccount(localName: string, type: OsAccountType, callback: AsyncCallback<OsAccountInfo>): void; + - createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo, callback: AsyncCallback<OsAccountInfo>): void; + - queryOsAccountById(localId: number, callback: AsyncCallback<OsAccountInfo>): void; + - getOsAccountProfilePhoto(localId: number, callback: AsyncCallback<string>): void; + - setOsAccountProfilePhoto(localId: number, photo: string, callback: AsyncCallback<void>): void; + - on(type: 'activate' | 'activating', name: string, callback: Callback<number>): void; + - off(type: 'activate' | 'activating', name: string, callback?: Callback<number>): void; + - isMainOsAccount(callback: AsyncCallback<boolean>): void; + - queryOsAccountConstraintSourceTypes(localId: number, constraint: string, callback: AsyncCallback<Array<ConstraintSourceTypeInfo>>): void; + - class UserAuth + - constructor(); + - getVersion(): number; + - getAvailableStatus(authType: AuthType, authTrustLevel: AuthTrustLevel): number; + - getProperty(request: GetPropertyRequest, callback: AsyncCallback<ExecutorProperty>): void; + - setProperty(request: SetPropertyRequest, callback: AsyncCallback<number>): void; + - auth(challenge: Uint8Array, authType: AuthType, authTrustLevel: AuthTrustLevel, callback: IUserAuthCallback): Uint8Array; + - authUser(userId: number, challenge: Uint8Array, authType: AuthType, authTrustLevel: AuthTrustLevel, callback: IUserAuthCallback): Uint8Array; + - cancelAuth(contextID: Uint8Array): number; + - class PINAuth + - constructor(); + - registerInputer(inputer: IInputer): boolean; + - unregisterInputer(authType: AuthType): void; + - class UserIdentityManager + - constructor(); + - openSession(callback: AsyncCallback<Uint8Array>): void; + - addCredential(credentialInfo: CredentialInfo, callback: IIdmCallback): void; + - updateCredential(credentialInfo: CredentialInfo, callback: IIdmCallback): void; + - closeSession(): void; + - cancel(challenge: Uint8Array): number; + - delUser(token: Uint8Array, callback: IIdmCallback): void; + - delCred(credentialId: Uint8Array, token: Uint8Array, callback: IIdmCallback): void; + - getAuthInfo(callback: AsyncCallback<Array<EnrolledCredInfo>>): void; + - interface IInputData + - onSetData: (authSubType: AuthSubType, data: Uint8Array) => void; + +**Adaptation Guide** + +The following uses **activateOsAccount** as an example to describe the error information processing logic of an asynchronous API: + +```ts +import account_osAccount from "@ohos.account.osAccount" +let accountMgr = account_osAccount.getAccountManager() +let callbackFunc = (err) => { + if (err != null) { // handle the bussiness error + console.log("account_osAccount failed, error: " + JSON.stringify(err)); + } else { + console.log("account_osAccount successfully"); + } +} +try { + accountMgr.activateOsAccount("100", callbackFunc); +} catch (err) { // handle the parameter type error + console.log("account_osAccount failed for incorrect parameter type, error: " + JSON.stringify(err)); +} +try { + accountMgr.activateOsAccount(); +} catch (err) { // handle the parameter number error + console.log("account_osAccount failed for incorrect parameter number, error: " + JSON.stringify(err)); +} +``` + +The following uses **registerInputer** as an example to describe the error information processing logic of a synchronous API: + +```ts +import account_osAccount from "@ohos.account.osAccount" +let pinAuth = new account_osAccount.PINAuth() +try { + pinAuth.registerInputer({}) +} catch (err) { // handle the parameter type error + console.log("account_osAccount failed for incorrect parameter type, error: " + JSON.stringify(err)); +} +try { + pinAuth.registerInputer() +} catch (err) { // handle the parameter number error + console.log("account_osAccount failed for incorrect parameter number, error: " + JSON.stringify(err)); +} +``` + +# Account Subsystem Changelog + +## cl.account_os_account.2 Change in Error Information Return of Account System APIs + +Some system APIs of the account subsystem use service logic return values to indicate error information, which does not comply with the API error code specifications of OpenHarmony. The following changes are made in API version 9: + +Asynchronous APIs: Return error information in the **error** object of **AsyncCallback** or **Promise**. + +Synchronous APIs: Throw an exception to return error information. + +**Change Impact** + +The application developed based on earlier versions needs to be adapted. Otherwise, the service logic will be affected. + +**Key API/Component Changes** + +Before change: + + - class UserAuth + - setProperty(request: SetPropertyRequest, callback: AsyncCallback<number>): void; + - setProperty(request: SetPropertyRequest): Promise<number>; + - cancelAuth(contextID: Uint8Array): number; + - class PINAuth + - registerInputer(inputer: Inputer): boolean; + - UserIdentityManager + - cancel(challenge: Uint8Array): number; + +After change: + + - class UserAuth + - setProperty(request: SetPropertyRequest, callback: AsyncCallback<void>): void; + - setProperty(request: SetPropertyRequest): Promise<void>; + - cancelAuth(contextID: Uint8Array): void; + - class PINAuth + - registerInputer(inputer: Inputer): void; + - UserIdentityManager + - cancel(challenge: Uint8Array): void; + +**Adaptation Guide** + +The following uses **setProperty** as an example for asynchronous APIs: + +``` +import account_osAccount from "@ohos.account.osAccount" +userAuth.setProperty({ + authType: account_osAccount.AuthType.PIN, + key: account_osAccount.SetPropertyType.INIT_ALGORITHM, + setInfo: new Uint8Array([0]) +}, (err) => { + if (err) { + console.log("setProperty failed, error: " + JSON.stringify(err)); + } else { + console.log("setProperty successfully"); + } +}); + +userAuth.setProperty({ + authType: account_osAccount.AuthType.PIN, + key: account_osAccount.SetPropertyType.INIT_ALGORITHM, + setInfo: new Uint8Array([0]) +}).catch((err) => { + if (err) { + console.log("setProperty failed, error: " + JSON.stringify(err)); + } else { + console.log("setProperty successfully"); + } +}); +``` + +The following uses **registerInputer** as an example for synchronous APIs: + +``` +import account_osAccount from "@ohos.account.osAccount" +let pinAuth = new account_osAccount.PINAuth() +let inputer = { + onGetData: (authType, passwordRecipient) => { + let password = new Uint8Array([0]); + passwordRecipient.onSetData(authType, password); + } +} +try { + pinAuth.registerInputer(inputer); +} catch (err) { + console.log("registerInputer failed, error: " + JSON.stringify(err)); +} +``` + +## cl.account_os_account.3 ACTION Definition Change for the Application Account Authentication Service + +**Change Impact** + +For the application developed based on an earlier version, you need to modify **ACTION** in the application configuration file (**config.json** for the FA model and **module.json5** for the stage model). Otherwise, the application authentication service will be affected. + +**Key API/Component Changes** + +Involved constant: + +@ohos.ability.wantConstant.ACTION_APP_ACCOUNT_AUTH + +Before change: + +ACTION_APP_ACCOUNT_AUTH = "account.appAccount.action.auth" + +After change: + +ACTION_APP_ACCOUNT_AUTH = "ohos.appAccount.action.auth" + +**Adaptation Guide** + +For a third-party application providing the account authentication service, change **ACTION** in the **ServiceAbility** configuration file (**config.json** for the FA module or **module.json5** for the stage module). + +``` +"abilities": [ + { + "name": "ServiceAbility", + "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", + ... + "visible": true, + "skills": { + { + "actions": [ + "ohos.appAccount.action.auth" + ] + } + } + }] +} + +``` diff --git a/en/release-notes/changelogs/v3.2-beta4/changelogs-arkui.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-arkui.md new file mode 100644 index 0000000000000000000000000000000000000000..9122b5fa26084abcbee3157456d0944c89da6133 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-arkui.md @@ -0,0 +1,126 @@ +# ArkUI Subsystem ChangeLog + +## cl.arkui.1 xcomponent API Change + +Changed the following APIs of the **xcomponent** component of the ArkUI subsystem: + + - **getXComponentSurfaceId** and **setXComponentSurfaceSize**: Removed the **@systemapi** tag. + - **getXComponentSurfaceId**, **getXComponentContext**, and **setXComponentSurfaceSize**: Specified the return value type. + +You need to adapt your application based on the following information. + + +**Change Impact** + +Released JS APIs are affected. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** + + - **getXComponentSurfaceId**: is changed to a public API, with its return value type specified as string. + - **setXComponentSurfaceSize**: is changed to a public API, with its return value type specified as void. + - **getXComponentContext**: has its return value type specified as object. + +**Adaptation Guide** + +Startup rules for different scenarios are as follows: +Adaptions to be made: + + - **getXComponentSurfaceId** + - Rule in OpenHarmony 3.2 Beta3: + - System API + - No specified return value + - OpenHarmony 3.2 Beta4 rules: + - Public API + - Return value type specified as string + - You need to process the return value as a string. + - **setXComponentSurfaceSize** + - Rule in OpenHarmony 3.2 Beta3: + - System API + - No specified return value + - OpenHarmony 3.2 Beta4 rules: + - Public API + - Return value type specified as void + - You need to process the return value as a void. + - **getXComponentContext** + - Rule in OpenHarmony 3.2 Beta3: + - No specified return value + - OpenHarmony 3.2 Beta4 rules: + - Return value type specified as object + - You need to process the return value as an object. + +## cl.arkui.2 Change of Styles of Popup Component and APIs + +Changed the styles of the **alertDialog**, **actionSheet**, and **customDialog** components, as well as the **prompt** and **promptAction** APIs. Specifically speaking: + + - Added the popup background blur effect to **promptAction.showDialog**, **promptAction.showActionMenu**, **alertDialog**, **actionSheet**, and **customDialog**. + +**Change Impact** + +The popup background blur effect is set by default. + +**Key API/Component Changes** + +APIs: **promptAction.showDialog** and **promptAction.showActionMenu;** +Components: **alertDialog**, **actionSheet**, and **customDialog** + +**Adaptation Guide** + +No adaptation is required. + +## cl.arkui.3 Supplementation of the Initialization Mode and Restriction Verification Scenarios of Custom Components' Member Variables + +For details, see **Restrictions and Extensions**. + + +**Change Impact** + +If custom components' member variables are initialized or assigned with values not according to the document specifications, an error will be reported during compilation. + +**Key API/Component Changes** + +N/A. + +**Adaptation Guide** + +Make modification according to specifications in the above document. + +## cl.arkui.4 Supplementation of Verification Scenarios of Value Assignment Restrictions on Member Variables of Custom Parent Components and Child Components + +For details, see **Restrictions and Extensions**. + + +**Change Impact** + +If member variables of the parent component or child component are initialized not according to the document specifications, an error will be reported during compilation. + +**Key API/Component Changes** + +N/A. + +**Adaptation Guide** + +Make modification according to specifications in the above document, using other decorators or normal member variables for value assignment. + +## cl.arkui.5 Supplementation of Verification for a Single Subcomponent + +Added the check rule that allows only one child component to be enabled for the following components: **Button**, **FlowItem**, **GridItem**, **GridCol**, **ListItem**, **Navigator**, **Refresh**, **RichText**, **ScrollBar**, **StepperItem**, and **TabContent**. + + +**Change Impact** + +If one of the preceding components contains more than one child component, an error will be reported during compilation. + +**Key API/Component Changes** + +```js +RichText('RichText') { + Text('Text1') + Text('Text2') +} +/* ArkTS:ERROR File: /root/newOH/developtools/ace-ets2bundle/compiler/sample/pages/home.ets:25:7 + The component 'RichText' can only have a single child component. */ +``` + +**Adaptation Guide** + +Make modification based on the error message. Make sure that the specified component contains only one child component. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-camera.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-camera.md similarity index 92% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-camera.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-camera.md index 16559935d6dba10f19739a84c4fe45c11855298f..f7acbc22c91eed241e6ddfa34e041f87ece63130 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-camera.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-camera.md @@ -1,6 +1,4 @@ -# ChangeLog of JS API Changes in the Multimedia Subsystem - -Compared with OpenHarmony 3.2 Beta3, OpenHarmony 3.2 Beta4 has the following changes in APIs of the camera component in the multimedia subsystem. +# Multimedia Subsystem Changelog ## Camera API Changes Some functional APIs are added and some others are deprecated to: @@ -10,13 +8,13 @@ Some functional APIs are added and some others are deprecated to: You need to refer to the following change description to adapt your application. -**Change Impacts** +**Change Impact** -JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement functions in the SDK environment of the new version. +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. **Key API/Component Changes** -| Module | Class | Method/Attribute/Enumeration/Constant | Change Type| +| Module | Class | Method/Attribute/Enum/Constant | Change Type| | ---------------------- | ----------------------- | ------------------------------------------------------------ | -------- | | ohos.multimedia.camera | Profile | readonly format:CameraFormat; | Added | | ohos.multimedia.camera | Profile | readonly size: Size; | Added | @@ -195,7 +193,7 @@ In Beta4 and later versions, the following APIs are changed. getSupportedOutputCapability(camera: CameraDevice): Promise; - The sample code is as follows: + The code snippet is as follows: ``` cameraManager.getSupportedCameras().then((cameras) => { @@ -221,7 +219,7 @@ In Beta4 and later versions, the following APIs are changed. 6. The **isCameraMuted(): boolean;** API is added to **CameraManager**. - The sample code is as follows: + The code snippet is as follows: ``` let ismuted = cameraManager.isCameraMuted(); @@ -229,7 +227,7 @@ In Beta4 and later versions, the following APIs are changed. 7. The **isCameraMuteSupported(): boolean;** API is added to **CameraManager**. - The sample code is as follows: + The code snippet is as follows: ``` let ismutesuppotred = cameraManager.isCameraMuteSupported(); @@ -237,7 +235,7 @@ In Beta4 and later versions, the following APIs are changed. 8. The **muteCamera(mute: boolean): void;** API is added to **CameraManager**. - The sample code is as follows: + The code snippet is as follows: ``` let mute = true; @@ -246,7 +244,7 @@ In Beta4 and later versions, the following APIs are changed. 9. The **on(type: 'cameraMute', callback: AsyncCallback): void;** API is added to **CameraManager**. - The sample code is as follows: + The code snippet is as follows: ``` cameraManager.on('cameraMute', (err, curMuetd) => { @@ -259,27 +257,27 @@ In Beta4 and later versions, the following APIs are changed. 10. The **open(callback: AsyncCallback): void;** and **open(): Promise;** APIs are added to **CameraInput**. -The sample code is as follows: + The code snippet is as follows: -``` -cameraInput.open((err) => { - if (err) { - console.error(`Failed to open the camera. ${err.message}`); - return; - } - console.log('Callback returned with camera opened.'); -}) -``` + ``` + cameraInput.open((err) => { + if (err) { + console.error(`Failed to open the camera. ${err.message}`); + return; + } + console.log('Callback returned with camera opened.'); + }) + ``` -``` -cameraInput.open().then(() => { - console.log('Promise returned with camera opened.'); -}) -``` + ``` + cameraInput.open().then(() => { + console.log('Promise returned with camera opened.'); + }) + ``` 11. The **close(callback: AsyncCallback): void;** and **close(): Promise;** APIs are added to **CameraInput**. - The sample code is as follows: + The code snippet is as follows: ``` cameraInput.close((err) => { @@ -297,25 +295,25 @@ cameraInput.open().then(() => { }) ``` -12. The following enumerations are added to **CameraInputErrorCode**: +12. The following enums are added to **CameraInputErrorCode**: - Enumeration: ERROR_NO_PERMISSION; value: 0 + Enum: ERROR_NO_PERMISSION; value: 0 - Enumeration: ERROR_DEVICE_PREEMPTED; value: 1 + Enum: ERROR_DEVICE_PREEMPTED; value: 1 - Enumeration: ERROR_DEVICE_DISCONNECTED; value: 2 + Enum: ERROR_DEVICE_DISCONNECTED; value: 2 - Enumeration: ERROR_DEVICE_IN_USE; value: 3 + Enum: ERROR_DEVICE_IN_USE; value: 3 - Enumeration: ERROR_DRIVER_ERROR; value: 4 + Enum: ERROR_DRIVER_ERROR; value: 4 -13. The following enumeration is added to **CameraFormat**: +13. The following enum is added to **CameraFormat**: - Enumeration: CAMERA_FORMAT_RGBA_8888; value: 3 + Enum: CAMERA_FORMAT_RGBA_8888; value: 3 14. The **getMeteringPoint(callback: AsyncCallback): void;** and **getMeteringPoint(): Promise;** APIs are added to **CaptureSession**. - The sample code is as follows: + The code snippet is as follows: ``` captureSession.getMeteringPoint((err, exposurePoint) => { @@ -335,7 +333,7 @@ cameraInput.open().then(() => { 15. The **setMeteringPoint(point: Point, callback: AsyncCallback): void;** and **setMeteringPoint(point: Point): Promise;** APIs are added to **CaptureSession**. - The sample code is as follows: + The code snippet is as follows: ``` const Point1 = {x: 1, y: 1}; @@ -357,11 +355,11 @@ cameraInput.open().then(() => { }) ``` -16. The following enumerations are added to **CaptureSessionErrorCode**: +16. The following enums are added to **CaptureSessionErrorCode**: - Enumeration: ERROR_INSUFFICIENT_RESOURCES; value: 0 + Enum: ERROR_INSUFFICIENT_RESOURCES; value: 0 - Enumeration: ERROR_TIMEOUT; value: 1 + Enum: ERROR_TIMEOUT; value: 1 17. The **CameraOutput** API is added and contains the **release(callback: AsyncCallback): void;** and **release(): Promise;** methods. @@ -385,7 +383,7 @@ cameraInput.open().then(() => { 18. The **start(callback: AsyncCallback): void;** and **start(): Promise;** APIs are added to **PreviewOutput**. - The sample code is as follows: + The code snippet is as follows: ``` previewOutput.start((err) => { @@ -405,7 +403,7 @@ cameraInput.open().then(() => { 19. The **stop(callback: AsyncCallback): void;** and **stop(): Promise;** APIs are added to **PreviewOutput**. - The sample code is as follows: + The code snippet is as follows: ``` previewOutput.stop((err) => { @@ -427,21 +425,21 @@ cameraInput.open().then(() => { Attribute 1: mirror?; type: boolean -21. The following enumerations are added to **PhotoOutputErrorCode**: +21. The following enums are added to **PhotoOutputErrorCode**: - Enumeration: ERROR_DRIVER_ERROR; value: 0 + Enum: ERROR_DRIVER_ERROR; value: 0 - Enumeration: ERROR_INSUFFICIENT_RESOURCES; value: 1 + Enum: ERROR_INSUFFICIENT_RESOURCES; value: 1 - Enumeration: ERROR_TIMEOUT; value: 2 + Enum: ERROR_TIMEOUT; value: 2 -22. The following enumeration is added to **VideoOutputErrorCode**: +22. The following enum is added to **VideoOutputErrorCode**: - Enumeration: ERROR_DRIVER_ERROR; value: 0 + Enum: ERROR_DRIVER_ERROR; value: 0 23. The **on(type: 'error', callback: ErrorCallback): void;** API is added to **MetadataOutput**. - The sample code is as follows: + The code snippet is as follows: ``` metadataOutput.on('error', (metadataOutputError) => { @@ -449,11 +447,11 @@ cameraInput.open().then(() => { }) ``` -24. The following enumerations are added to **MetadataOutputErrorCode**. +24. The following enums are added to **MetadataOutputErrorCode**. - Enumeration: ERROR_UNKNOWN; value: -1 + Enum: ERROR_UNKNOWN; value: -1 - Enumeration: ERROR_INSUFFICIENT_RESOURCES; value: 0 + Enum: ERROR_INSUFFICIENT_RESOURCES; value: 0 25. **MetadataOutputError** API @@ -489,7 +487,7 @@ cameraInput.open().then(() => { 1. In **CameraManager**, the return value of **getCameras** is changed from **Array** to **Array**, and the API name is changed from **getCameras** to **getSupportedCameras**. Therefore, the **getCameras(callback: AsyncCallback>): void;** and **getCameras(): Promise>;** APIs are changed to **getSupportedCameras(callback: AsyncCallback>): void** and **getSupportedCameras(): Promise>;**. - The sample code is as follows: + The code snippet is as follows: ``` cameraManager.getSupportedCameras((err, cameras) => { @@ -509,7 +507,7 @@ cameraInput.open().then(() => { 2. In **CameraManager**, the input parameter of **createCameraInput** is changed from **cameraId: string** to **camera: CameraDevice**. Therefore, the **createCameraInput(cameraId: string, callback: AsyncCallback): void;** and **createCameraInput(cameraId: string): Promise;** APIs are changed to **createCameraInput(camera: CameraDevice, callback: AsyncCallback): void;** and **createCameraInput(camera: CameraDevice): Promise;**. - The sample code is as follows: + The code snippet is as follows: ``` let cameraDevice = cameras[0]; @@ -531,7 +529,7 @@ cameraInput.open().then(() => { 3. In **CameraManager**, the input parameter **profile: Profile** is added to **createPreviewOutput** and the **profile** parameter is obtained by the **getSupportedOutputCapability** API. Therefore, the **createPreviewOutput(surfaceId: string, callback: AsyncCallback): void;** and **createPreviewOutput(surfaceId: string): Promise;** APIs are changed to **createPreviewOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void;** and **createPreviewOutput(profile: Profile, surfaceId: string): Promise;**. - The sample code is as follows: + The code snippet is as follows: ``` let profile = cameraoutputcapability.previewProfiles[0]; @@ -553,7 +551,7 @@ cameraInput.open().then(() => { 4. In **CameraManager**, the input parameter **profile: Profile** is added to **createPhotoOutput** and the **profile** parameter is obtained by the **getSupportedOutputCapability** API. Therefore, the **CreatePhotoOutput(surfaceId: string, callback: AsyncCallback): void;** and **CreatePhotoOutput(surfaceId: string): Promise;** APIs are changed to **createPhotoOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void;** and **createPhotoOutput(profile: Profile, surfaceId: string): Promise;**. - The sample code is as follows: + The code snippet is as follows: ``` let profile = cameraoutputcapability.photoProfiles[0]; @@ -575,7 +573,7 @@ cameraInput.open().then(() => { 5. In **CameraManager**, the input parameter **profile: Profile** is added to **createVideoOutput** and the **profile** parameter is obtained by the **getSupportedOutputCapability** API. Therefore, the **createVideoOutput(surfaceId: string, callback: AsyncCallback): void;** and **createVideoOutput(surfaceId: string): Promise;** APIs are changed to **createVideoOutput(profile: VideoProfile, surfaceId: string, callback: AsyncCallback): void;** and **createVideoOutput(profile: VideoProfile, surfaceId: string): Promise;**. - The sample code is as follows: + The code snippet is as follows: ``` let profile = cameraoutputcapability.videoProfiles[0]; @@ -597,7 +595,7 @@ cameraInput.open().then(() => { 6. In **CameraManager**, the input parameter **metadataObjectTypes: Array** is added to **createMetadataOutput**, and the **metadataObjectTypes** parameter is obtained by the **getSupportedOutputCapability** API. Therefore, the **function createMetadataOutput(callback: AsyncCallback): void;** and **function createMetadataOutput(): Promise;** APIs are changed to **createMetadataOutput(metadataObjectTypes: Array, callback: AsyncCallback): void;** and **createMetadataOutput(metadataObjectTypes: Array): Promise;**. - The sample code is as follows: + The code snippet is as follows: ``` let metadataObjectTypes = cameraoutputcapability.supportedMetadataObjectTypes; @@ -619,7 +617,7 @@ cameraInput.open().then(() => { 7. In **CameraManager**, **createCaptureSession** does not need to consider the context attribute. Therefore, the **createCaptureSession(context: Context, callback: AsyncCallback): void;** and **createCaptureSession(context: Context): Promise;** APIs are changed to **createCaptureSession(callback: AsyncCallback): void;** and **createCaptureSession(): Promise;**. - The sample code is as follows: + The code snippet is as follows: ```typescript cameraManager.createCaptureSession((err, captureSession) => { @@ -641,7 +639,7 @@ cameraInput.open().then(() => { 9. In **CameraInput**, the input parameter **camera: CameraDevice** is added to the **on(type: 'error')** API. Therefore, the **on(type: 'error', callback: ErrorCallback): void;** API is changed to **on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void;**. - The sample code is as follows: + The code snippet is as follows: ``` let cameraDevice = cameras[0]; @@ -696,7 +694,7 @@ cameraInput.open().then(() => { 11. The **on(type: 'focusStateChange', callback: AsyncCallback): void;** API is moved from **CameraInput** to **CaptureSession**. - The sample code is as follows: + The code snippet is as follows: ``` captureSession.on('focusStateChange', (focusState) => { @@ -704,23 +702,23 @@ cameraInput.open().then(() => { }) ``` -12. The following enumerations are added to **ExposureMode**: +12. The following enums are added to **ExposureMode**: - Enumeration: EXPOSURE_MODE_AUTO; initial value: changed from the default value to **1** + Enum: EXPOSURE_MODE_AUTO; initial value: changed from the default value to **1** - Enumeration: EXPOSURE_MODE_CONTINUOUS_AUTO; initial value: changed from the default value to **2** + Enum: EXPOSURE_MODE_CONTINUOUS_AUTO; initial value: changed from the default value to **2** -13. The following enumerations are added to **VideoStabilizationMode**: +13. The following enums are added to **VideoStabilizationMode**: - Enumeration: LOW; initial value: changed from the default value to **1** + Enum: LOW; initial value: changed from the default value to **1** - Enumeration: MIDDLE; initial value: changed from the default value to **2** + Enum: MIDDLE; initial value: changed from the default value to **2** - Enumeration: HIGH; initial value: changed from the default value to **3** + Enum: HIGH; initial value: changed from the default value to **3** - Enumeration: AUTO; initial value: changed from the default value to **4** + Enum: AUTO; initial value: changed from the default value to **4** -14. In **CaptureSession**, the parameter of the **addOutput** API is changed from the original subclass type (**PreviewOutput**, **PhotoOutput**, **VideoOutput**, and **MetadataOutput**) to the base class type (**CameraOutput**). After the change, the number of APIs is reduced from 8 to 2. +14. In **CaptureSession**, the parameter of the **addOutput** API is changed from the original child class type (**PreviewOutput**, **PhotoOutput**, **VideoOutput**, and **MetadataOutput**) to the base class type (**CameraOutput**). After the change, the number of APIs is reduced from 8 to 2. APIs before change: @@ -730,7 +728,7 @@ cameraInput.open().then(() => { addOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void;
addOutput(cameraOutput: CameraOutput): Promise; - The sample code (for **PreviewOutput**) is as follows: + The sample code (for **previewOutput**) is as follows: ``` captureSession.addOutput(previewOutput, (err) => { @@ -748,7 +746,7 @@ cameraInput.open().then(() => { }) ``` -15. In **CaptureSession**, the parameter of the **removeOutput** API is changed from the original subclass type (**PreviewOutput**, **PhotoOutput**, **VideoOutput**, and **MetadataOutput**) to the base class type (**CameraOutput**). After the change, the number of APIs is reduced from 8 to 2. +15. In **CaptureSession**, the parameter of the **removeOutput** API is changed from the original child class type (**PreviewOutput**, **PhotoOutput**, **VideoOutput**, and **MetadataOutput**) to the base class type (**CameraOutput**). After the change, the number of APIs is reduced from 8 to 2. APIs before change: @@ -758,7 +756,7 @@ cameraInput.open().then(() => { removeOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void;
removeOutput(cameraOutput: CameraOutput): Promise; - The sample code (for **PreviewOutput**) is as follows: + The sample code (for **previewOutput**) is as follows: ``` captureSession.removeOutput(previewOutput, (err) => { @@ -776,8 +774,8 @@ cameraInput.open().then(() => { }) ``` -16. The following enumeration in **MetadataObjectType** is changed: +16. The following enum in **MetadataObjectType** is changed: - The enumeration value name is changed from **FACE** to **FACE_DETECTION**. + The enum value name is changed from **FACE** to **FACE_DETECTION**. 17. The name of the **Camera** API is changed to **CameraDevice**. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-device-manager.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-device-manager.md similarity index 100% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-device-manager.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-device-manager.md diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-device-usb.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-device-usb.md similarity index 95% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-device-usb.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-device-usb.md index cc7d82ae7758a9be105037bfc60c9ab7eb54b0b1..9890002af31ae8d36e4f645adfc2d920000fe936 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-device-usb.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-device-usb.md @@ -1,10 +1,10 @@ -# USB Manager ChangeLog +# USB Manager Changelog ## cl.usb_manager.1 Error Information Return Method Change of APIs The USB manager API uses service logic return values to indicate the error information, which does not comply with the API error code specifications of OpenHarmony. Beginning from API version 9, error information is returned by throwing exceptions. -**Change Impacts** +**Change Impact** The application developed based on earlier versions needs to adapt the method for returning API error information. Otherwise, the original service logic will be affected. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelog-dmsfwk.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-dmsfwk.md similarity index 55% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelog-dmsfwk.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-dmsfwk.md index 5eda23bba4e9832210d6f57de819bfe341ba75d4..d81d9080a4eea114c2028114c99e62c542f5d54c 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelog-dmsfwk.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-dmsfwk.md @@ -1,18 +1,18 @@ -# Distributed Scheduler Subsystem ChangeLog +# Distributed Scheduler Subsystem Changelog -## cl.DistributedManagerService.1 continuationManager API Changes +## cl.DistributedManagerService.1 continuationManager on()/off() Changes -- Event names passed to the **continuationManager** API do not comply with the OpenHarmony API specifications. -- The **continuationManager.on** API does not have a unified return value for various events, which does not comply with the OpenHarmony API specifications. +- The event types passed to the **continuationManager.on** and **continuationManager.off** APIs do not comply with the OpenHarmony API specifications. +- The return value of **continuationManager.on** varies with the event type, which does not comply with the OpenHarmony API specifications. The following changes have been made: -- The device selection event name of **continuationManager.on** and **continuationManager.off** is changed from **deviceConnect** to **deviceSelected**, and the device deselection event name is changed from **deviceDisconnect** to **deviceUnselected**. -- The **continuationManager.on** API returns **Callback<Array<ContinuationResult>>** for all events. +- Changed the event type **deviceConnect** to **deviceSelected** and **deviceDisconnect** to **deviceUnselected** in the **continuationManager.on** and **continuationManager.off** APIs. +- Changed the return value of **continuationManager.on** to **Callback<Array<ContinuationResult>>** for all events. -**Change Impacts** +**Change Impact** -The application developed based on earlier versions needs to adapt the new APIs. Otherwise, the original service logic will be affected. +The application developed based on earlier versions needs to be adapted. Otherwise, the service logic will be affected. **Key API/Component Changes** @@ -40,10 +40,9 @@ The application developed based on earlier versions needs to adapt the new APIs. ``` **Adaptation Guide** - Change the event names. The sample code is as follows: -Device selection event of **continuationManager.on**: +Event of device selection in **continuationManager.on**: ```ts let token = 1; @@ -61,7 +60,7 @@ Device selection event of **continuationManager.on**: } ``` -Device selection event of **continuationManager.off**: +Event of device selection in **continuationManager.off**: ```ts let token = 1; @@ -72,7 +71,7 @@ Device selection event of **continuationManager.off**: } ``` -Device deselection event of **continuationManager.on**: +Event of device deselection in **continuationManager.on**: ```ts let token = 1; @@ -91,7 +90,7 @@ Device deselection event of **continuationManager.on**: } ``` -Device deselection event of **continuationManager.off**: +Event of device deselection in **continuationManager.off**: ```ts let token = 1; @@ -101,3 +100,23 @@ Device deselection event of **continuationManager.off**: console.error('off failed, cause: ' + JSON.stringify(err)); } ``` + +## cl.DistributedManagerService.2 Adding DATASYNC Permission Verification to continuationManager APIs + +In earlier versions, the **continuationManager** APIs do not verify the caller, which does not comply with the OpenHarmony API specifications. +Now, before using a **continuationManager** API, the caller must apply for the **ohos.permission.DISTRIBUTED_DATASYNC** permission. + +**Change Impact** + +The application developed based on earlier versions needs to apply for the **ohos.permission.DISTRIBUTED_DATASYNC** permission in advance. Otherwise, the service logic will be affected. + +**Key API/Component Changes** + +Involved APIs: + + - continuationManager.registerContinuation; + - continuationManager.on; + - continuationManager.off; + - continuationManager.unregisterContinuation; + - continuationManager.updateContinuationState; + - continuationManager.startContinuationDeviceManager; diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-dsoftbus.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-dsoftbus.md similarity index 91% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-dsoftbus.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-dsoftbus.md index ef64e7d28caf508bcbc0011975071a613e544649..ea1e10f12173db035ae4c1a702d392511cdd4108 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-dsoftbus.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-dsoftbus.md @@ -1,17 +1,17 @@ -# DSoftBus Subsystem ChangeLog +# DSoftBus Subsystem Changelog -## IPC&RPC APIs support the exception handling mode and the selection of synchronous or asynchronous message sending by passing a Boolean value or a numeric value. -1. Some IPC&RPC APIs of DSoftBus use service logic return values to indicate the error information, which does not comply with the API error code specifications of OpenHarmony. -2. A Boolean value can be passed to specify the mode of sending information as asynchronous or synchronous. -#### Change Impacts +## Support for Exception Handling and Selecting Synchronous or Asynchronous Message Sending by Using a Boolean or Numeric Value in IPC&RPC APIs +1. Some IPC&RPC APIs of DSoftBus use service logic return values to indicate error information, which does not comply with the API error code specifications of OpenHarmony. +2. A Boolean value can be passed in to specify the asynchronous or synchronous message transfer mode. +#### Change Impact -This version is compatible with earlier versions and no adaptation is required. Newly added APIs can be called to support the following changes: -1. Supports exception handling and return of error codes. -2. Supports selection of synchronous or asynchronous message sending by passing a Boolean value or by passing 0 or a non-0 number. +No adaptation is required. Use the new APIs provided by this version to: +1. Implement exception handling and return of error codes. +2. Select synchronous or asynchronous message transfer by using a Boolean value or a number of 0 or non-0. #### **Key API/Component Changes** -For adaptation to the unified API exception handling mode, related IPC&RPC APIs are deprecated, and corresponding new APIs and methods are added. The newly added APIs support unified error code handling specifications and function the same as the original APIs. +For easy use, related IPC&RPC APIs are deprecated, and new APIs are added to implement unified error code handling. The functionalities of these APIs remain unchanged. | Class| Deprecated API | New Class | New API | | ------------ | ------------ | ------------ | ------------ | | MessageParcel | static create(): MessageParcel | MessageSequence | static create(): MessageSequence | @@ -130,7 +130,7 @@ For adaptation to the unified API exception handling mode, related IPC&RPC APIs #### Adaptation Guide -The newly added APIs return error codes and corresponding error information by throwing exceptions. Take the **create** API in **MessageParcel** as an example. The sample code is as follows: +The new APIs return error codes and error information by throwing exceptions. The following uses the **create()** API of **MessageParcel** as an example. ```js import rpc from '@ohos.rpc' @@ -142,4 +142,4 @@ try { console.info("create meassageParcel failed, errorMessage = " + error.errorMessage); } ``` -For details about sample code of more APIs, see [RPC API reference](../../../application-dev/reference/apis/js-apis-rpc.md). +For details about the APIs, see [RPC](../../../application-dev/reference/apis/js-apis-rpc.md). diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-enterprise_device_management.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-enterprise_device_management.md similarity index 80% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-enterprise_device_management.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-enterprise_device_management.md index 5a3f51481a6ce67f75c16deded929f64c1b29432..dd8eb99aa48bbc0ab5ea2b83e51233a41320b03e 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-enterprise_device_management.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-enterprise_device_management.md @@ -1,12 +1,10 @@ # Customization Subsystem ChangeLog -Compared with OpenHarmony 3.2.8.1, OpenHarmony 3.2.8.3 has the following API changes in the customization subsystem: - ## cl.Customization.1 Change of the Enterprise Device Management Module Name -Beginning from OpenHarmony 3.2.8.3, **@ohos.enterpriseDeviceManager.d.ts** is changed to **@ohos.enterprise.adminManager.d.ts**. You need to adapt your applications according to the following information. +Changed **@ohos.enterpriseDeviceManager.d.ts** to **@ohos.enterprise.adminManager.d.ts**. -**Change Impacts** +**Change Impact** The application developed based on OpenHarmony earlier than 3.2.8.3 must be adapted so that it can be properly compiled in the SDK environment of the new version. @@ -18,7 +16,7 @@ The application developed based on OpenHarmony earlier than 3.2.8.3 must be adap **Adaptation Guide** -The original APIs are only migrated to the new namespace. Therefore, you can modify **import** to solve the adaptation problem. +The original APIs are only moved to the new namespace. Therefore, you can modify **import** to solve the adaptation problem. If the original API uses **@ohos.enterpriseDeviceManager**: @@ -26,7 +24,7 @@ If the original API uses **@ohos.enterpriseDeviceManager**: import enterpriseDeviceManager from '@ohos.enterpriseDeviceManager'; ``` -You can directly modify **import** to switch to the new namespace: +You can modify **import** to switch to the new namespace: ```js import enterpriseDeviceManager from '@ohos.enterprise.adminManager'; @@ -34,9 +32,9 @@ import enterpriseDeviceManager from '@ohos.enterprise.adminManager'; ## cl.Customization.2 enterpriseDeviceManager/DeviceSettingsManager.d.ts Module Change -Beginning from OpenHarmony 3.2.8.3, **enterpriseDeviceManager/DeviceSettingsManager.d.ts** is changed to **ohos.enterprise.dateTimeManager.d.ts**. +Changed **enterpriseDeviceManager/DeviceSettingsManager.d.ts** to **ohos.enterprise.dateTimeManager.d.ts**. -**Change Impacts** +**Change Impact** The application developed based on OpenHarmony earlier than 3.2.8.3 must be adapted so that it can be properly compiled in the SDK environment of the new version. @@ -88,54 +86,54 @@ dateTimeManager.setDateTime(wantTemp, 1526003846000, (error) => { ## cl.Customization.3 System API Change -Beginning from OpenHarmony 3.2.8.3, all enterprise device management APIs are changed to system APIs. +Changed all enterprise device management APIs to system APIs. -**Change Impacts** +**Change Impact** All APIs can be called only by system applications. **Key API/Component Changes** -| Module | Class | Method/Attribute/Enumeration/Constant | Change Type| +| Module | Class | Method/Attribute/Enum/Constant | Change Type| | ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | -| @ohos.enterprise.adminManager | adminManager | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback<**void**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId: number, callback: AsyncCallback<**void**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number): Promise<**void**>; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** disableAdmin(admin: Want, callback: AsyncCallback<**void**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** disableAdmin(admin: Want, userId: number, callback: AsyncCallback<**void**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** disableAdmin(admin: Want, userId?: number): Promise<**void**>; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** disableSuperAdmin(bundleName: String, callback: AsyncCallback<**void**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** disableSuperAdmin(bundleName: String): Promise<**void**>; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** isAdminEnabled(admin: Want, callback: AsyncCallback<**boolean**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** isAdminEnabled(admin: Want, userId: number, callback: AsyncCallback<**boolean**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** isAdminEnabled(admin: Want, userId?: number): Promise<**boolean**>; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** getEnterpriseInfo(admin: Want, callback: AsyncCallback<**EnterpriseInfo**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** getEnterpriseInfo(admin: Want): Promise<**EnterpriseInfo**>; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo, callback: AsyncCallback<**void**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo): Promise<**void**>; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** isSuperAdmin(bundleName: String, callback: AsyncCallback<**boolean**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** isSuperAdmin(bundleName: String): Promise<**boolean**>; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** subscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>, callback: AsyncCallback<**void**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** subscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>): Promise<**void**>; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** unsubscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>, callback: AsyncCallback<**void**>): void; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **function** unsubscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>): Promise<**void**>; | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **interface** EnterpriseInfo | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **enum** AdminType | Changed to a system API | -| @ohos.enterprise.adminManager | adminManager | **enum** ManagedEvent | Changed to a system API | -| @ohos.enterprise.dataTimeManager | dateTimeManager | **function** setDateTime(admin: Want, time: number, callback: AsyncCallback<**void**>): void; | Changed to a system API | -| @ohos.enterprise.dataTimeManager | dateTimeManager | **function** setDateTime(admin: Want, time: number): Promise<**void**>; | Changed to a system API | +| @ohos.enterprise.adminManager | adminManager | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback<**void**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId: number, callback: AsyncCallback<**void**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number): Promise<**void**>; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** disableAdmin(admin: Want, callback: AsyncCallback<**void**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** disableAdmin(admin: Want, userId: number, callback: AsyncCallback<**void**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** disableAdmin(admin: Want, userId?: number): Promise<**void**>; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** disableSuperAdmin(bundleName: String, callback: AsyncCallback<**void**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** disableSuperAdmin(bundleName: String): Promise<**void**>; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** isAdminEnabled(admin: Want, callback: AsyncCallback<**boolean**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** isAdminEnabled(admin: Want, userId: number, callback: AsyncCallback<**boolean**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** isAdminEnabled(admin: Want, userId?: number): Promise<**boolean**>; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** getEnterpriseInfo(admin: Want, callback: AsyncCallback<**EnterpriseInfo**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** getEnterpriseInfo(admin: Want): Promise<**EnterpriseInfo**>; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo, callback: AsyncCallback<**void**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo): Promise<**void**>; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** isSuperAdmin(bundleName: String, callback: AsyncCallback<**boolean**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** isSuperAdmin(bundleName: String): Promise<**boolean**>; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** subscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>, callback: AsyncCallback<**void**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** subscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>): Promise<**void**>; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** unsubscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>, callback: AsyncCallback<**void**>): void; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **function** unsubscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>): Promise<**void**>; | systemapi | +| @ohos.enterprise.adminManager | adminManager | **interface** EnterpriseInfo | systemapi | +| @ohos.enterprise.adminManager | adminManager | **enum** AdminType | systemapi | +| @ohos.enterprise.adminManager | adminManager | **enum** ManagedEvent | systemapi | +| @ohos.enterprise.dataTimeManager | dateTimeManager | **function** setDateTime(admin: Want, time: number, callback: AsyncCallback<**void**>): void; | systemapi | +| @ohos.enterprise.dataTimeManager | dateTimeManager | **function** setDateTime(admin: Want, time: number): Promise<**void**>; | systemapi | ## cl.Customization.4 API Permission Change -Beginning from OpenHarmony 3.2.8.3, permission verification is required for some APIs. +Added permission verification for some APIs. -**Change Impacts** +**Change Impact** The application developed based on OpenHarmony earlier than 3.2.8.3 must have the corresponding permission so that it can properly call these APIs. **Key API/Component Changes** -| Module | Class | Method/Attribute/Enumeration/Constant | New Permission| +| Module | Class | Method/Attribute/Enum/Constant | New Permission| | ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | | @ohos.enterprise.adminManager | adminManager | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback<**void**>): void; | ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN | | @ohos.enterprise.adminManager | adminManager | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId: number, callback: AsyncCallback<**void**>): void; | ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN | diff --git a/en/release-notes/changelogs/v3.2-beta4/changelogs-filemanagement.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-filemanagement.md new file mode 100644 index 0000000000000000000000000000000000000000..154e840dddb2be62b03af5209b199340ef798c94 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-filemanagement.md @@ -0,0 +1,93 @@ +# File Management Subsystem Changelog + +## cl.filemanagement.1 fileio API Changes + +Deprecated the **fileio** APIs, which do not return error codes; added APIs that return error codes. + +**Change Impact** + +For applications developed based on earlier versions, pay attention to the changes of APIs. The specifications of the new APIs are slightly adjusted. Pay attention to the usage of the new APIs. + +**Key API/Component Changes** + +The APIs of **@ohos.fileio** do not support error code handling and are deprecated. New APIs are added in **@ohos.file.fs** to support unified error code handling and have slight changes in parameters. The functionalities of the APIs remain unchanged. + +| Module | Method/Attribute/Enum/Constant | Change Type| +| ------------------------- | ------------------------------------------------------------ | -------- | +| @ohos.fileio | **function** open(path: string, flags?: number, mode?: number, callback?: AsyncCallback): void \| Promise; | Deprecated | +| @ohos.fileio | **function** openSync(path: string, flags?: number, mode?: number): number; | Deprecated | +| @ohos.file.fs | **function** open(path: string, mode?: number, callback?: AsyncCallback): void \| Promise; | Added | +| @ohos.file.fs | **function** openSync(path: string, mode?: number): File; | Added | +| @ohos.fileio | **function** read(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; position?: number; }, callback?: AsyncCallback): void \| Promise; | Deprecated | +| @ohos.fileio | **function** readSync(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; position?: number; }): number; | Deprecated | +| @ohos.file.fs | **function** read(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; }, callback?: AsyncCallback): void \| Promise; | Added | +| @ohos.file.fs | **function** readSync(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; }): number; | Added | +| @ohos.fileio | **function** stat(path: string, callback?: AsyncCallback): void \| Promise; | Deprecated | +| @ohos.fileio | **function** statSync(path: string): Stat; | Deprecated | +| @ohos.fileio | **function** fstat(fd: number, callback?: AsyncCallback): void \| Promise; | Deprecated | +| @ohos.fileio | **function** fstatSync(fd: number): Stat; | Deprecated | +| @ohos.file.fs | **function** stat(file: string \| number, callback?: AsyncCallback): void \| Promise; | Added | +| @ohos.file.fs | **function** statSync(file: string \| number): Stat; | Added | +| @ohos.fileio | **function** truncate(path: string, len?: number, callback?: AsyncCallback): void \| Promise; | Deprecated | +| @ohos.fileio | **function** truncateSync(path: string, len?: number): void; | Deprecated | +| @ohos.fileio | **function** ftruncate(fd: number, len?: number, callback?: AsyncCallback): void \| Promise; | Deprecated | +| @ohos.fileio | **function** ftruncateSync(fd: number, len?: number): void; | Deprecated | +| @ohos.file.fs | **function** truncate(file: string \| number, len?: number, callback?: AsyncCallback): void \| Promise; | Added | +| @ohos.file.fs | **function** truncateSync(file: string \| number, len?: number): void; | Added | +| @ohos.fileio | **function** write(fd: number, buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }, callback?: AsyncCallback): void \| Promise; | Deprecated | +| @ohos.fileio | **function** writeSync(fd: number, buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }): number; | Deprecated | +| @ohos.file.fs | **function** write(fd: number, buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; encoding?: string; }, callback?: AsyncCallback): void \| Promise; | Added | +| @ohos.file.fs | **function** writeSync(fd: number, buffer: ArrayBuffer \| string, options?: { offset?: number; length?: number; encoding?: string; }): number; | Added | + +**Adaptation Guide** + +Before the change, the APIs are imported as follows: + +```js +import fileio from '@ohos.fileio'; +``` + +Now, the APIs are imported as follows: + +```js +import fs from '@ohos.file.fs'; +``` + +In addition, exception handling needs to be adapted. + +Sample code for exception handling in a synchronous API: + +```js +import fs from '@ohos.file.fs' + +try { + let file = fs.openSync(path, fs.OpenMode.READ_ONLY); +} catch (err) { + console.error("openSync errCode:" + err.code + ", errMessage:" + err.message); +} +``` +Sample code for exception handling in an asynchronous API (promise): +```js +import fs from '@ohos.file.fs' + +try { + let file = await fs.open(path, fs.OpenMode.READ_ONLY); +} catch (err) { + console.error("open promise errCode:" + err.code + ", errMessage:" + err.message); +} +``` + +Sample code for exception handling in an asynchronous API (callback): +```js +import fs from '@ohos.file.fs' + +try { + fs.open(path, fs.OpenMode.READ_ONLY, function(e, file){ // Asynchronous thread errors (such as a syscall error) are obtained via a callback. + if (e) { + console.error("open in async errCode:" + e.code + ", errMessage:" + e.message); + } + }); +} catch (err) {// Main thread errors (such as invalid parameters) are obtained by try catch. + console.error("open callback errCode:" + err.code + ", errMessage:" + err.message); +} +``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-geolocation.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-geolocation.md similarity index 94% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-geolocation.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-geolocation.md index 2c593c302956fa32807147e0a549da967fc1b264..5dfe147895af9dbd969f32864e981644be48c70b 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-geolocation.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-geolocation.md @@ -1,4 +1,4 @@ -# Location Subsystem ChangeLog +# Location Subsystem Changelog ## cl.location.1 Migration of System APIs and APIs in API Version 9 to the New @ohos.geoLocationManager.d.ts @@ -9,7 +9,7 @@ To use system APIs and APIs in API version 9 of the location subsystem, you need import geoLocationManager from '@ohos.geoLocationManager'; -**Change Impacts** +**Change Impact** System APIs and APIs in API version 9 are affected. To ensure normal use of these APIs, you need to import **@ohos.geoLocationManager**. @@ -19,7 +19,7 @@ Other APIs are not affected. **Key API/Component Changes** -| Class| Type| Declaration| Change Type| +| Class| API Type| Declaration| Change Type| | -- | -- | -- | -- | |geolocation| namespace | declare namespacegeolocation| Migrated this API in API version 9 to **@ohos.geoLocationManager.d.ts**.| |geolocation | interface | export interface ReverseGeocodingMockInfo | Migrated this API in API version 9 to **@ohos.geoLocationManager.d.ts**.| @@ -57,7 +57,7 @@ Other APIs are not affected. **(Optional) Adaptation Guide** -The following uses **enableLocation** as an example to show how it is called in the new version: +The following sample code shows how to call **enableLocation** in the new version: ```ts import geoLocationManager from '@ohos.geoLocationManager'; @@ -78,7 +78,7 @@ From API version 9, the **ohos.permission.APPROXIMATELY_LOCATION** permission is If you use API version 9 or later, you need to apply for both the **ohos.permission.LOCATION** and **ohos.permission.APPROXIMATELY_LOCATION** permissions. Applying for only the **ohos.permission.LOCATION** permission will fail. -**Change Impacts** +**Change Impact** Applications using API versions earlier than 9 are not affected. For an application using API version 9 or later, the method for applying for the location permission is changed. The details are as follows: @@ -101,13 +101,13 @@ API version 9 and later: Apply for **ohos.permission.APPROXIMATELY_LOCATION**, o | API Version| Location Permission| Permission Application Result| Location Accuracy| | -------- | -------- | -------- | -------- | | Earlier than 9| ohos.permission.LOCATION | Success| Location accurate to meters| -| 9 and later| ohos.permission.LOCATION | Failure| No location obtained| -| 9 and later| ohos.permission.APPROXIMATELY_LOCATION | Success| Location accurate to 5 kilometers| +| 9 and later| ohos.permission.LOCATION | Failed| No location obtained.| +| 9 and later| ohos.permission.APPROXIMATELY_LOCATION | Success| Location accurate to 5 kilometers.| | 9 and later| ohos.permission.APPROXIMATELY_LOCATION and ohos.permission.LOCATION| Success| Location accurate to meters| If your application needs to access the device location information when running in the background, it must be configured to be able to run in the background and be granted the **ohos.permission.LOCATION_IN_BACKGROUND** permission. In this way, the system continues to report device location information after your application moves to the background. -You can declare the required permission in your application's configuration file. For details, see the [permission application guide](../../../application-dev/security/accesstoken-guidelines.md). +You can declare the required permissions in your application's configuration file. For details, see the [permission application guide](../../../application-dev/security/accesstoken-guidelines.md). **Key API/Component Changes** diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-global.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-global.md similarity index 52% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-global.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-global.md index 3ea6d2e61ae7d061f0631b217bdba75d0a27319c..e572a20c68e1b4ea3dbb64ed110a0493b40ccb72 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-global.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-global.md @@ -1,8 +1,8 @@ -# Globalization Subsystem ChangeLog +# Globalization Subsystem Changelog ## cl.global.1 Support of Error Codes for the Internalization Module -APIs provided by the internationalization component of the globalization subsystem are changed to support error codes in the following scenarios. The following changes are made in API version 9 and later: +APIs provided by the internationalization component of the globalization subsystem are changed to support error codes in the following scenarios. The following changes are made in API version 9: - Obtaining the local expression of a country or language - Obtaining the list of languages supported by the system and the list of areas supported by a language - Checking whether a language matches an area @@ -11,37 +11,37 @@ APIs provided by the internationalization component of the globalization subsyst - Obtaining, adding, and removing the preferred language - Obtaining and setting localized numbers -You need to adapt your applications based on the following information: +You need to adapt your application based on the following information. -**Change Impacts** +**Change Impact** The preceding APIs are changed to the static methods of the **System** class. When such an API is called, add the class name to the end of the module name. -The return value data type of the setting APIs (for example, **setSystemLanguage**) is changed from boolean to void. +For setter APIs, the type of the return value is changed from boolean to void, for example, setSystemLanguage. When a call to an API fails, an error code is returned according to the failure cause. For example, when permissions are not correctly configured for an application, **201** is returned. **Key API/Component Changes** -Involved APIs: -- getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string; -- getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string; -- getSystemLanguages(): Array; -- getSystemCountries(language: string): Array; -- isSuggested(language: string, region?: string): boolean; -- getSystemLanguage(): string; -- setSystemLanguage(language: string): void; -- getSystemRegion(): string; -- setSystemRegion(region: string): void; -- getSystemLocale(): string; -- setSystemLocale(locale: string): void; -- is24HourClock(): boolean; -- set24HourClock(option: boolean): void; -- addPreferredLanguage(language: string, index?: number): void; -- removePreferredLanguage(index: number): void; -- getPreferredLanguageList(): Array; -- getFirstPreferredLanguage(): string; -- getAppPreferredLanguage(): string; -- setUsingLocalDigit(flag: boolean): void; -- getUsingLocalDigit(): boolean; + - Involved APIs: + - getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string; + - getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string; + - getSystemLanguages(): Array; + - getSystemCountries(language: string): Array; + - isSuggested(language: string, region?: string): boolean; + - getSystemLanguage(): string; + - setSystemLanguage(language: string): void; + - getSystemRegion(): string; + - setSystemRegion(region: string): void; + - getSystemLocale(): string; + - setSystemLocale(locale: string): void; + - is24HourClock(): boolean; + - set24HourClock(option: boolean): void; + - addPreferredLanguage(language: string, index?: number): void; + - removePreferredLanguage(index: number): void; + - getPreferredLanguageList(): Array; + - getFirstPreferredLanguage(): string; + - getAppPreferredLanguage(): string; + - setUsingLocalDigit(flag: boolean): void; + - getUsingLocalDigit(): boolean; **Adaptation Guide** diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-inputmethod-framworks.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-inputmethod-framworks.md similarity index 69% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-inputmethod-framworks.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-inputmethod-framworks.md index 10b882debbe61ecbb41c7ef43f96f1d563ea22ca..be4a459e4070a68f50a6b68ea019167c70897e02 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-inputmethod-framworks.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-inputmethod-framworks.md @@ -18,7 +18,7 @@ Asynchronous API: An error message is returned via **AsyncCallback** or the **er Synchronous API: An error message is returned via an exception. -**Change Impacts** +**Change Impact** The application developed based on earlier versions needs to adapt the method for returning API error information. Otherwise, the original service logic will be affected. @@ -26,51 +26,97 @@ The application developed based on earlier versions needs to adapt the method fo Error code processing is added for the following APIs: - getSetting(): InputMethodSetting; + - getController(): InputMethodController; - - switchInputMethod(target: InputMethodProperty, callback: AsyncCallback): void; - - switchInputMethod(target: InputMethodProperty): Promise; - - switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallback): void; - - switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise; - - switchCurrentInputMethodAndSubtype(inputMethodProperty: InputMethodProperty, inputMethodSubtype: InputMethodSubtype, callback: AsyncCallback): void; - - switchCurrentInputMethodAndSubtype(inputMethodProperty: InputMethodProperty, inputMethodSubtype: InputMethodSubtype): Promise; - - listInputMethodSubtype(inputMethodProperty: InputMethodProperty, callback: AsyncCallback>): void; - - listInputMethodSubtype(inputMethodProperty: InputMethodProperty): Promise>; - - listCurrentInputMethodSubtype(callback: AsyncCallback>): void; - - listCurrentInputMethodSubtype(): Promise>; - - getInputMethods(enable: boolean, callback: AsyncCallback>): void; - - getInputMethods(enable: boolean): Promise>; - - showOptionalInputMethods(callback: AsyncCallback): void; - - showOptionalInputMethods(): Promise; - - stopInputSession(callback: AsyncCallback): void; - - stopInputSession(): Promise; - - showSoftKeyboard(callback: AsyncCallback): void; - - showSoftKeyboard():Promise; - - hideSoftKeyboard(callback: AsyncCallback): void; - - hideSoftKeyboard():Promise; - - hide(callback: AsyncCallback): void; - - hide(): Promise; - - onCreate(want: Want): void; - - onDestroy(): void; - In **InputClient**: - - sendKeyFunction(action: number, callback: AsyncCallback): void; - - sendKeyFunction(action: number): Promise; - - deleteForward(length: number, callback: AsyncCallback): void; - - deleteForward(length: number): Promise; - - deleteBackward(length: number, callback: AsyncCallback): void; - - deleteBackward(length: number): Promise; - - insertText(text: string, callback: AsyncCallback): void; - - insertText(text: string): Promise; - - getForward(length: number, callback: AsyncCallback): void; - - getForward(length: number): Promise; - - getBackward(length: number, callback: AsyncCallback): void; - - getBackward(length: number): Promise; - - getEditorAttribute(callback: AsyncCallback): void; - - getEditorAttribute(): Promise; - - moveCursor(direction: number, callback: AsyncCallback): void; - - moveCursor(direction: number): Promise; - In **InputMethodExtensionAbility**: + + - switchInputMethod(target: InputMethodProperty, callback: AsyncCallback\): void; + + - switchInputMethod(target: InputMethodProperty): Promise\; + + - switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallback\): void; + + - switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise\; + + - switchCurrentInputMethodAndSubtype(inputMethodProperty: InputMethodProperty, inputMethodSubtype: InputMethodSubtype, callback: AsyncCallback\): void; + + - switchCurrentInputMethodAndSubtype(inputMethodProperty: InputMethodProperty, inputMethodSubtype: InputMethodSubtype): Promise\; + + - listInputMethodSubtype(inputMethodProperty: InputMethodProperty, callback: AsyncCallback>): void; + + - listInputMethodSubtype(inputMethodProperty: InputMethodProperty): Promise>; + + - listCurrentInputMethodSubtype(callback: AsyncCallback>): void; + + - listCurrentInputMethodSubtype(): Promise>; + + - getInputMethods(enable: boolean, callback: AsyncCallback>): void; + + - getInputMethods(enable: boolean): Promise>; + + - showOptionalInputMethods(callback: AsyncCallback\): void; + + - showOptionalInputMethods(): Promise\; + + - stopInputSession(callback: AsyncCallback\): void; + + - stopInputSession(): Promise\; + + - showSoftKeyboard(callback: AsyncCallback\): void; + + - showSoftKeyboard():Promise\; + + - hideSoftKeyboard(callback: AsyncCallback\): void; + + - hideSoftKeyboard():Promise\; + + - hide(callback: AsyncCallback\): void; + + - hide(): Promise\; + - onCreate(want: Want): void; + - onDestroy(): void; + + + - In **InputClient**: + + - sendKeyFunction(action: number, callback: AsyncCallback\): void; + + - sendKeyFunction(action: number): Promise\; + + - deleteForward(length: number, callback: AsyncCallback\): void; + + - deleteForward(length: number): Promise\; + + - deleteBackward(length: number, callback: AsyncCallback\): void; + + - deleteBackward(length: number): Promise\; + + - insertText(text: string, callback: AsyncCallback\): void; + + - insertText(text: string): Promise\; + + - getForward(length: number, callback: AsyncCallback\): void; + + - getForward(length: number): Promise\; + + - getBackward(length: number, callback: AsyncCallback\): void; + + - getBackward(length: number): Promise\; + + - getEditorAttribute(callback: AsyncCallback\): void; + + - getEditorAttribute(): Promise\EditorAttribute>; + + - moveCursor(direction: number, callback: AsyncCallback\): void; + + - moveCursor(direction: number): Promise\; + +- In **InputMethodExtensionAbility**: + + - onCreate(want: Want): void; + + - onDestroy(): void; **Adaptation Guide** @@ -143,11 +189,9 @@ Substitute APIs: - hide(): Promise; **NOTE** - -- Use the **getInputMethodAbility()** API to obtain an **InputMethodAbility** object, and do not use **getInputMethodEngine()** to obtain an **InputMethodEngine** object. -- Use methods in **InputMethodAbility**, and do not use methods in **InputMethodEngine**. -- Use the **on('inputStart')** method in **InputMethodAbility** to obtain a **KeyboardController** instance and an **InputClient** instance, and do not use the **on('inputStart')** method in **InputMethodEngine** to obtain a **TextInputClient** instance. - + Use the **getInputMethodAbility()** API to obtain an **InputMethodAbility** object, and do not use **getInputMethodEngine()** to obtain an **InputMethodEngine** object. + Use methods in **InputMethodAbility**, and do not use methods in **InputMethodEngine**. + Use the **on('inputStart')** method in **InputMethodAbility** to obtain a **KeyboardController** instance and an **InputClient** instance, and do not use the **on('inputStart')** method in **InputMethodEngine** to obtain a **TextInputClient** instance. Before: ```js diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-multimedia.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-multimedia.md similarity index 68% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-multimedia.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-multimedia.md index a2edb4e0b1bb14cf4d8185549b09069dc5da7cf1..aa585ed0e8922116000a5aa0cf766e1e04a6dcb1 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-multimedia.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-multimedia.md @@ -1,10 +1,10 @@ -# Multimedia Subsystem ChangeLog +# Multimedia Subsystem Changelog ## cl.multimedia.audio.001 Call Mode Change of getRoutingManager() **getRoutingManager()** is changed from asynchronous to synchronous. -**Change Impacts** +**Change Impact** If the new mode is not used, an error will be reported during compilation. @@ -25,7 +25,7 @@ getRoutingManager(): AudioRoutingManager; **getStreamManager()** is changed from asynchronous to synchronous. -**Change Impacts** +**Change Impact** If the new mode is not used, an error will be reported during compilation. @@ -46,7 +46,7 @@ getStreamManager(): AudioStreamManager; In the original **AudioRoutingManager**, the registration mode of the **micStateChange** listener of the **on()** function is changed. -**Change Impacts** +**Change Impact** If the new mode is not used, an error will be reported during compilation. @@ -71,7 +71,7 @@ interface AudioVolumeGroupManager { The call mode of **getVolumeGroups()** is changed. -**Change Impacts** +**Change Impact** If the new mode is not used, an error will be reported during compilation. @@ -96,7 +96,7 @@ interface AudioVolumeManager{ The call mode of **getGroupManager()** is changed. -**Change Impacts** +**Change Impact** If the new mode is not used, an error will be reported during compilation. @@ -121,9 +121,9 @@ interface AudioVolumeManager{ **FOCUS_TYPE_RECORDING** of **FocusType** is renamed as **FOCUS_TYPE_DEFAULT**. -**Change Impacts** +**Change Impact** -If the new name is not used, an error will be reported during compilation. +If the new mode is not used, an error will be reported during compilation. **Key API/Component Changes** @@ -145,9 +145,9 @@ enum InterruptRequestType { The listener registration name of **interrupt** of the **on()** function in **AudioRenderer** is changed. -**Change Impacts** +**Change Impact** -If the new name is not used, an error will be reported during compilation. +If the new mode is not used, an error will be reported during compilation. **Key API/Component Changes** @@ -170,141 +170,84 @@ interface AudioRenderer { In the MR version, the formal **AVRecorder** APIs (integrating audio and video) will be provided for external use. **VideoRecorder** APIs in API version 9 are changed to system APIs, which are available only to system users. In the future, **VideoRecorder** APIs will be deprecated after system users switch to **AVRecorder**. -**Change Impacts** +**Change Impact** If the **VideoRecorder** caller is not a system user, the call will fail. - -Involved APIs and enumerations: - +Involved APIs and enums: function createVideoRecorder(callback: AsyncCallback): void; - function createVideoRecorder(): Promise; - type VideoRecordState = 'idle' | 'prepared' | 'playing' | 'paused' | 'stopped' | 'error'; - interface VideoRecorder{ - -​ prepare(config: VideoRecorderConfig, callback: AsyncCallback): void; - -​ prepare(config: VideoRecorderConfig): Promise; - -​ getInputSurface(callback: AsyncCallback): void; - -​ getInputSurface(): Promise; - -​ start(callback: AsyncCallback): void; - -​ start(): Promise; - -​ pause(callback: AsyncCallback): void; - -​ pause(): Promise; - -​ resume(callback: AsyncCallback): void; - -​ resume(): Promise; - -​ stop(callback: AsyncCallback): void; - -​ stop(): Promise; - -​ release(callback: AsyncCallback): void; - -​ release(): Promise; - -​ reset(callback: AsyncCallback): void; - -​ reset(): Promise; - -​ on(type: 'error', callback: ErrorCallback): void; - -​ readonly state: VideoRecordState; - + prepare(config: VideoRecorderConfig, callback: AsyncCallback): void; + prepare(config: VideoRecorderConfig): Promise; + getInputSurface(callback: AsyncCallback): void; + getInputSurface(): Promise; + start(callback: AsyncCallback): void; + start(): Promise; + pause(callback: AsyncCallback): void; + pause(): Promise; + resume(callback: AsyncCallback): void; + resume(): Promise; + stop(callback: AsyncCallback): void; + stop(): Promise; + release(callback: AsyncCallback): void; + release(): Promise; + reset(callback: AsyncCallback): void; + reset(): Promise; + on(type: 'error', callback: ErrorCallback): void; + readonly state: VideoRecordState; } - interface VideoRecorderProfile { - -​ readonly audioBitrate: number; - -​ readonly audioChannels: number; - -​ readonly audioCodec: CodecMimeType; - -​ readonly audioSampleRate: number; - -​ readonly fileFormat: ContainerFormatType; - -​ readonly videoBitrate: number; - -​ readonly videoCodec: CodecMimeType; - -​ readonly videoFrameWidth: number; - -​ readonly videoFrameHeight: number; - -​ readonly videoFrameRate: number; - + readonly audioBitrate: number; + readonly audioChannels: number; + readonly audioCodec: CodecMimeType; + readonly audioSampleRate: number; + readonly fileFormat: ContainerFormatType; + readonly videoBitrate: number; + readonly videoCodec: CodecMimeType; + readonly videoFrameWidth: number; + readonly videoFrameHeight: number; + readonly videoFrameRate: number; } - enum AudioSourceType { - -​ AUDIO_SOURCE_TYPE_DEFAULT = 0, - -​ AUDIO_SOURCE_TYPE_MIC = 1, - + AUDIO_SOURCE_TYPE_DEFAULT = 0, + AUDIO_SOURCE_TYPE_MIC = 1, } - enum VideoSourceType { - -​ VIDEO_SOURCE_TYPE_SURFACE_YUV = 0, - -​ VIDEO_SOURCE_TYPE_SURFACE_ES = 1, - + VIDEO_SOURCE_TYPE_SURFACE_YUV = 0, + VIDEO_SOURCE_TYPE_SURFACE_ES = 1, } - enum VideoRecorderConfig { - -​ audioSourceType?: AudioSourceType; - -​ videoSourceType: VideoSourceType; - -​ profile: VideoRecorderProfile; - -​ url: string; - -​ rotation?: number; - -​ location?: Location; - + audioSourceType?: AudioSourceType; + videoSourceType: VideoSourceType; + profile: VideoRecorderProfile; + url: string; + rotation?: number; + location?: Location; } ## cl.multimedia.media.002 No Externally Provided Bit Rate Selection API in VideoPlayer In API version 9, **VideoPlayer** does not externally provide the bit rate selection API. Such an API will be provided by **AVPlayer** in the MR version. -**Change Impacts** +**Change Impact** Bit rate selection cannot be performed in the multi-bit rate scenario of **VideoPlayer**. Relevant functions will be provided by **AVPlayer**. **Key API/Component Changes** Deleted APIs: - interface VideoPlayer { - -​ selectBitrate(bitrate: number): Promise; - -​ selectBitrate(bitrate: number, callback: AsyncCallback): void; - -​ on(type: 'availableBitratesCollect', callback: (bitrates: Array) => void): void; - + selectBitrate(bitrate: number): Promise; + selectBitrate(bitrate: number, callback: AsyncCallback): void; + on(type: 'availableBitratesCollect', callback: (bitrates: Array) => void): void; } ## cl.multimedia.media.003 Error Information Change of VideoRecorder Original error codes of **VideoRecorder** are changed because they do not comply with the error code specifications. -**Change Impacts** +**Change Impact** Error codes returned from **VideoRecorder** are changed. @@ -315,5 +258,5 @@ Error codes returned from **VideoRecorder** are changed. **Adaptation Guide** For details about exception handling, see the following documents: -[Media](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-media.md) -[Media Error Codes](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/errorcodes/errorcode-media.md) +https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-media.md +https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/errorcodes/errorcode-media.md diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-multimodalinput.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-multimodalinput.md similarity index 55% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-multimodalinput.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-multimodalinput.md index c9514a515412e1d6b765558272650f2c20cac5af..f128d80d2e74c6b03c5ed749b933e9d6fc371397 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-multimodalinput.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-multimodalinput.md @@ -1,4 +1,4 @@ -# Multimodal Input ChangeLog +# Multimodal Input Changelog ## cl.multimodalinput.1 Error Information Return Method Change of APIs @@ -17,45 +17,45 @@ The internal APIs of the following modules used service logic return values to i Asynchronous APIs in the preceding modules have the following changes: A parameter check error is returned synchronously; a service logic error is returned via **AsyncCallback** or the **error** object of **Promise**. No change is made to synchronous APIs. -**Change Impacts** +**Change Impact** The application developed based on earlier versions needs to adapt the method for returning API error information. Otherwise, the original service logic will be affected. **Key API/Component Changes** - supportKeys(deviceId: number, keys: Array<KeyCode>, callback: AsyncCallback<Array<boolean>>): void; - - supportKeys(deviceId: number, keys: Array<KeyCode>): Promise<Array<boolean>>; - - getKeyboardType(deviceId: number, callback: AsyncCallback<KeyboardType>): void; > - - getKeyboardType(deviceId: number): Promise<KeyboardType>; - - setPointerSpeed(speed: number, callback: AsyncCallback<void>): void; - - setPointerSpeed(speed: number): Promise<void>; - - getPointerSpeed(callback: AsyncCallback<number>): void; - - getPointerSpeed(): Promise<number>; - - setPointerStyle(windowId: number, pointerStyle: PointerStyle, callback: AsyncCallback<void>): void; - - setPointerStyle(windowId: number, pointerStyle: PointerStyle): Promise<void>; - - getPointerStyle(windowId: number, callback: AsyncCallback<PointerStyle>): void; - - getPointerStyle(windowId: number): Promise<PointerStyle>; - - setPointerVisible(visible: boolean, callback: AsyncCallback<void>): void; - - setPointerVisible(visible: boolean): Promise<void>; - - isPointerVisible(callback: AsyncCallback<boolean>): void; - - isPointerVisible(): Promise<boolean>; - - on(type:"touch", receiver:TouchEventReceiver):void; - - on(type:"mouse", receiver:Callback<MouseEvent>):void; - - off(type:"touch", receiver?:TouchEventReceiver):void; - - off(type:"mouse", receiver?:Callback<MouseEvent>):void; - - injectEvent({KeyEvent: KeyEvent}): void; - - enable(enable: boolean, callback: AsyncCallback<void>): void; - - enable(enable: boolean): Promise<void>; - - start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCallback<void>): void; - - start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise<void>; - - stop(callback: AsyncCallback<void>): void; - - stop(): Promise<void>; - - getState(deviceDescriptor: string, callback: AsyncCallback<{ state: boolean }>): void; - - getState(deviceDescriptor: string): Promise<{ state: boolean }>; - - on(type: 'cooperation', callback: AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }>): void; - - off(type: 'cooperation', callback?: AsyncCallback<void>): void; - - on(type: "key", keyOptions: KeyOptions, callback: Callback<KeyOptions>): void; - - off(type: "key", keyOptions: KeyOptions, callback?: Callback<KeyOptions>): void; + - supportKeys(deviceId: number, keys: Array<KeyCode>): Promise<Array<boolean>>; + - getKeyboardType(deviceId: number, callback: AsyncCallback<KeyboardType>): void; > + - getKeyboardType(deviceId: number): Promise<KeyboardType>; + - setPointerSpeed(speed: number, callback: AsyncCallback<void>): void; + - setPointerSpeed(speed: number): Promise<void>; + - getPointerSpeed(callback: AsyncCallback<number>): void; + - getPointerSpeed(): Promise<number>; + - setPointerStyle(windowId: number, pointerStyle: PointerStyle, callback: AsyncCallback<void>): void; + - setPointerStyle(windowId: number, pointerStyle: PointerStyle): Promise<void>; + - getPointerStyle(windowId: number, callback: AsyncCallback<PointerStyle>): void; + - getPointerStyle(windowId: number): Promise<PointerStyle>; + - setPointerVisible(visible: boolean, callback: AsyncCallback<void>): void; + - setPointerVisible(visible: boolean): Promise<void>; + - isPointerVisible(callback: AsyncCallback<boolean>): void; + - isPointerVisible(): Promise<boolean>; + - on(type:"touch", receiver:TouchEventReceiver):void; + - on(type:"mouse", receiver:Callback<MouseEvent>):void; + - off(type:"touch", receiver?:TouchEventReceiver):void; + - off(type:"mouse", receiver?:Callback<MouseEvent>):void; + - injectEvent({KeyEvent: KeyEvent}): void; + - enable(enable: boolean, callback: AsyncCallback<void>): void; + - enable(enable: boolean): Promise<void>; + - start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCallback<void>): void; + - start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise<void>; + - stop(callback: AsyncCallback<void>): void; + - stop(): Promise<void>; + - getState(deviceDescriptor: string, callback: AsyncCallback<{ state: boolean }>): void; + - getState(deviceDescriptor: string): Promise<{ state: boolean }>; + - on(type: 'cooperation', callback: AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }>): void; + - off(type: 'cooperation', callback?: AsyncCallback<void>): void; + - on(type: "key", keyOptions: KeyOptions, callback: Callback<KeyOptions>): void; + - off(type: "key", keyOptions: KeyOptions, callback?: Callback<KeyOptions>): void; Deprecated APIs: - getDeviceIds(callback: AsyncCallback<Array<number>>): void; diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-notification.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-notification.md similarity index 100% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-notification.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-notification.md diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-power.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-power.md similarity index 91% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-power.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-power.md index 116bff7f084ebed42c0c8842f4c8e2936bca3e75..5edb31b22901b2afdf8cdb76ccd008ae13162727 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-power.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-power.md @@ -1,8 +1,8 @@ -# Power Subsystem ChangeLog +# Power Subsystem Changelog ## cl.powermgr.1 Error Information Return Method Change of APIs -The following APIs used service logic return values to indicate error information, which did not comply with the error code specifications of OpenHarmony. Therefore, they are modified in API version 9 and later. +The **power** module uses service logic return values to indicate error information, which does not comply with the API error code specifications of OpenHarmony. Therefore, modification is made in API version 9 and later. - Power consumption statistics: [@ohos.batteryStatistics](../../../application-dev/reference/apis/js-apis-batteryStatistics.md) - Brightness: [@ohos.brightness](../../../application-dev/reference/apis/js-apis-brightness.md) @@ -14,7 +14,7 @@ Asynchronous API: An error message is returned via **AsyncCallback** or the **er Synchronous API: An error message is returned via an exception. -#### Change Impacts +#### Change Impact The application developed based on earlier versions needs to adapt the method for returning API error information. Otherwise, the original service logic will be affected. @@ -50,7 +50,7 @@ Error code processing is added for the following APIs: For details, see the API reference document of each API. ## cl.powermgr.2 System API Change -#### Change Impacts +#### Change Impact The application developed based on earlier versions needs to adapt to new API names and the new method for returning API error information. Otherwise, the original service logic will be affected. diff --git a/en/release-notes/changelogs/v3.2-beta4/changelogs-request.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-request.md new file mode 100644 index 0000000000000000000000000000000000000000..a6911a3e16d7c249981afe350fb893261a5f7686 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-request.md @@ -0,0 +1,106 @@ +# Upload and Download Subsystem Changelog + +## cl.request.1 Changes of Error Code Definitions and Some API Names + +- The processing of the [upload and download error codes](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/errorcodes/errorcode-request.md) is added to the upload and download APIs. +- An error message is returned via **AsyncCallback** or the **error** object of **Promise**. An error message related to the parameter type or quantity is returned via an exception. +- Some APIs need to be replaced with new APIs, and the parameters remain unchanged. + +**Change Impact** + +The application developed based on earlier versions needs to adapt the method for returning API error information. Otherwise, the original service logic will be affected. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enumeration/Constant | Change Type | +|--------------|--------------|-----------------------------------------------------------------------------------------------------------------------|-----------| +| ohos.request | request | EXCEPTION_PERMISSION | Added| +| ohos.request | request | EXCEPTION_PARAMCHECK | Added| +| ohos.request | request | EXCEPTION_UNSUPPORTED | Added| +| ohos.request | request | EXCEPTION_FILEIO | Added| +| ohos.request | request | EXCEPTION_FILEPATH | Added| +| ohos.request | request | EXCEPTION_SERVICE | Added| +| ohos.request | request | EXCEPTION_OTHERS | Added| +| ohos.request | request | ERROR_OFFLINE | Added| +| ohos.request | request | ERROR_UNSUPPORTED_NETWORK_TYPE | Added| +| ohos.request | request | function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void; | Added| +| ohos.request | request | function downloadFile(context: BaseContext, config: DownloadConfig): Promise; | Added| +| ohos.request | request | function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; | Added| +| ohos.request | request | function uploadFile(context: BaseContext, config: UploadConfig): Promise; | Added| +| ohos.request | DownloadTask | delete(callback: AsyncCallback): void; | Added| +| ohos.request | DownloadTask | delete(): Promise; | Added| +| ohos.request | DownloadTask | suspend(callback: AsyncCallback): void; | Added| +| ohos.request | DownloadTask | suspend(): Promise; | Added| +| ohos.request | DownloadTask | restore(callback: AsyncCallback): void; | Added| +| ohos.request | DownloadTask | restore(): Promise; | Added| +| ohos.request | DownloadTask | getTaskInfo(callback: AsyncCallback): void; | Added| +| ohos.request | DownloadTask | getTaskInfo(): Promise; | Added| +| ohos.request | DownloadTask | getTaskMimeType(callback: AsyncCallback): void; | Added| +| ohos.request | DownloadTask | getTaskMimeType(): Promise; | Added| +| ohos.request | UploadTask | delete(callback: AsyncCallback): void; | Added| +| ohos.request | UploadTask | delete(): Promise; | Added| +| ohos.request | request | function download(config: DownloadConfig, callback: AsyncCallback): void;
Substitute API: function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void;| Deprecated| +| ohos.request | request | function download(config: DownloadConfig): Promise;
Substitute API: function downloadFile(context: BaseContext, config: DownloadConfig): Promise; | Deprecated| +| ohos.request | request | function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void;
Substitute API: function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void;| Deprecated| +| ohos.request | request | function download(context: BaseContext, config: DownloadConfig): Promise;
Substitute API: function downloadFile(context: BaseContext, config: DownloadConfig): Promise; | Deprecated| +| ohos.request | request | function upload(config: UploadConfig, callback: AsyncCallback): void;
Substitute API: function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; | Deprecated| +| ohos.request | request | function upload(config: UploadConfig): Promise;
Substitute API: function uploadFile(context: BaseContext, config: UploadConfig): Promise; | Deprecated| +| ohos.request | request | function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void;
Substitute API: function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; | Deprecated| +| ohos.request | request | function upload(context: BaseContext, config: UploadConfig): Promise;
Substitute API: function uploadFile(context: BaseContext, config: UploadConfig): Promise; | Deprecated| +| ohos.request | DownloadTask | remove(callback: AsyncCallback): void;
Substitute API: delete(callback: AsyncCallback): void | Deprecated| +| ohos.request | DownloadTask | remove(): Promise;
Substitute API: delete(): Promise; | Deprecated| +| ohos.request | DownloadTask | pause(callback: AsyncCallback): void;
Substitute API: suspend(callback: AsyncCallback): void; | Deprecated| +| ohos.request | DownloadTask | pause(): Promise;
Substitute API: suspend(): Promise; | Deprecated| +| ohos.request | DownloadTask | resume(callback: AsyncCallback): void;
Substitute API: restore(callback: AsyncCallback): void; | Deprecated| +| ohos.request | DownloadTask | resume(): Promise;
Substitute API: restore(): Promise; | Deprecated| +| ohos.request | DownloadTask | query(callback: AsyncCallback): void;
Substitute API: getTaskInfo(callback: AsyncCallback): void; | Deprecated| +| ohos.request | DownloadTask | query(): Promise;
Substitute API: getTaskInfo(): Promise; | Deprecated| +| ohos.request | DownloadTask | queryMimeType(callback: AsyncCallback): void;
Substitute API: getTaskMimeType(callback: AsyncCallback): void; | Deprecated| +| ohos.request | DownloadTask | queryMimeType(): Promise;
Substitute API: getTaskMimeType(): Promise; | Deprecated| +| ohos.request | UploadTask | remove(callback: AsyncCallback): void;
Substitute API: delete(callback: AsyncCallback): void; | Deprecated| +| ohos.request | UploadTask | remove(): Promise;
Substitute API: delete(): Promise; | Deprecated| +| system.request | UploadResponse | code | Deprecated| +| system.request | UploadResponse | data | Deprecated| +| system.request | UploadResponse | headers | Deprecated| +| system.request | DownloadResponse | token | Deprecated| +| system.request | OnDownloadCompleteResponse | uri | Deprecated| +| system.request | RequestFile | filename | Deprecated| +| system.request | RequestFile | name | Deprecated| +| system.request | RequestFile | uri | Deprecated| +| system.request | RequestFile | type | Deprecated| +| system.request | RequestData | name | Deprecated| +| system.request | RequestData | value | Deprecated| +| system.request | UploadRequestOptions | url | Deprecated| +| system.request | UploadRequestOptions | data | Deprecated| +| system.request | UploadRequestOptions | files | Deprecated| +| system.request | UploadRequestOptions | header | Deprecated| +| system.request | UploadRequestOptions | description | Deprecated| +| system.request | UploadRequestOptions | success | Deprecated| +| system.request | UploadRequestOptions | fail | Deprecated| +| system.request | UploadRequestOptions | complete | Deprecated| +| system.request | OnDownloadCompleteOptions | token | Deprecated| +| system.request | OnDownloadCompleteOptions | success | Deprecated| +| system.request | OnDownloadCompleteOptions | fail | Deprecated| +| system.request | OnDownloadCompleteOptions | complete | Deprecated| +| system.request | Request | static upload(options: UploadRequestOptions): void; | Deprecated| +| system.request | Request | static download(options: DownloadRequestOptions): void; | Deprecated| +| system.request | Request | static onDownloadComplete(options: OnDownloadCompleteOptions): void; | Deprecated| + + +**Adaptation Guide** + +The following uses **downloadFile** as an example to show how it is called in the new version: + +```ts +try { + request.downloadFile(globalThis.abilityContext, { url: 'https://xxxx/xxxxx.hap', + filePath: 'xxx/xxxxx.hap'}, (err, data) => { + if (err) { + console.error('Failed to request the download. Cause: ' + JSON.stringify(err)); + return; + } + }); +} catch (err) { + console.log("downloadFile callback fail." + "errCode:" + err.code + ",errMessage:" + err.message); +} +``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-resource-manager.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-resource-manager.md similarity index 95% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-resource-manager.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-resource-manager.md index b5c769a395a5bc9efc9239fde9b4284f85f74c3c..d3c7391445f3497c388b4804f4fa3a730f14ba06 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-resource-manager.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-resource-manager.md @@ -1,12 +1,12 @@ -# Resource Manager ChangeLog +# Resource Manager Changelog ## cl.resourceManager.1 Name Change of Some Multi-Project APIs in API Version 9 of Resource Manager -The resource manager can return error codes and error information for APIs in API version 9 and later. Some multi-project APIs in API version 9 need to be adapted. The following changes are made in API version 9 and later: +The resource manager can return error codes and error information for APIs in API version 9 and later. Some multi-project APIs in API version 9 need to be adapted. The following changes are made in API version 9: Some multi-project APIs of the resource manager need to be replaced with new APIs, and the parameters remain unchanged. -**Change Impacts** +**Change Impact** For applications developed based on earlier versions, relevant JavaScript multi-project APIs need to be replaced with new APIs. @@ -27,10 +27,10 @@ For applications developed based on earlier versions, relevant JavaScript multi- **Adaptation Guide** -The following describes how to change **getMedia** to **getMediaContent** in callback mode. The promise mode is similar. You only need to change the function name, add the error code and error information, and keep other information unchanged. The sample code is as follows: +The following describes how to change **getMedia** to **getMediaContent** in callback mode. The promise mode is similar. You only need to change the function name, add the error code and error information, and keep other information unchanged. The code snippet is as follows: - Before the change: **getMedia(resource: Resource, callback: AsyncCallback): void;** -```ts + ```ts let resource = { bundleName: "com.example.myapplication", moduleName: "entry", diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.2/changelog-resourceschedule.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-resourceschedule.md similarity index 53% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.2/changelog-resourceschedule.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-resourceschedule.md index f109d28cec55335f3422fd063532aad1cafe310f..73ffb069e25875d25b14dd6c199996b4af8cdf2b 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.2/changelog-resourceschedule.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-resourceschedule.md @@ -1,61 +1,60 @@ -# Resource Scheduler Subsystem ChangeLog +# Resource Scheduler Subsystem Changelog -## cl.resourceschedule.backgroundTaskManager - +## cl.resourceschedule.backgroundTaskManager Rectified original APIs of **backgroundTaskManager** of the resource scheduler subsystem. All APIs in API version 8 and earlier versions are deprecated, and original APIs in API version 9 are deleted. New APIs in API version 9 need to be used. The new APIs in API version 9 comply with the error code specifications. -**Change Impacts** +**Change Impact** The application developed based on the SDK versions of OpenHarmony 3.2.8.2 and later needs to adapt the modules and APIs in API version 9 and their methods for returning API error information. Otherwise, the original service logic will be affected. **Key API/Component Changes** -The following methods, attributes, enumerations, and constants are changed in API version 9 and later versions. The **@ohos.backgroundTaskManager.d.ts** file is deprecated and related APIs are migrated to the newly added **@ohos.resourceschedule.backgroundTaskManager.d.ts** file. +The following methods, attributes, enums, and constants are changed in API version 9 and later versions. The **@ohos.backgroundTaskManager.d.ts** file is deprecated and related APIs are moved to the newly added **@ohos.resourceschedule.backgroundTaskManager.d.ts** file. | Class| API Type| Declaration| Description| | -- | -- | -- | -- | -| backgroundTaskManager | namespace | declare namespace backgroundTaskManager | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager | method | function resetAllEfficiencyResources(): void; | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager | method | function applyEfficiencyResources(request: EfficiencyResourcesRequest): bool; | This API is changed in API version 9 to **function applyEfficiencyResources(request: EfficiencyResourcesRequest): void;** and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager | method | function stopBackgroundRunning(context: Context): Promise; | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager | method | function stopBackgroundRunning(context: Context, callback: AsyncCallback): void; | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager | method | function startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent): Promise; | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager | method | function startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent, callback: AsyncCallback): void; | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager | method | function requestSuspendDelay(reason: string, callback: Callback): DelaySuspendInfo; | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager | method | function getRemainingDelayTime(requestId: number): Promise; | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager | method | function getRemainingDelayTime(requestId: number, callback: AsyncCallback): void; | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager | method | function cancelSuspendDelay(requestId: number): void; | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.BackgroundMode | enum | export enum BackgroundMode | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.BackgroundMode | enum | DATA_TRANSFER = 1 | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.BackgroundMode | enum | AUDIO_PLAYBACK = 2 | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.BackgroundMode | enum | AUDIO_RECORDING = 3 | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.BackgroundMode | enum | LOCATION = 4 | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.BackgroundMode | enum | BLUETOOTH_INTERACTION = 5 | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.BackgroundMode | enum | MULTI_DEVICE_CONNECTION = 6 | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.BackgroundMode | enum | WIFI_INTERACTION = 7 | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.BackgroundMode | enum | VOIP = 8 | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.BackgroundMode | enum | TASK_KEEPING = 9 | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.DelaySuspendInfo | interface | interface DelaySuspendInfo | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.DelaySuspendInfo | field | requestId: number | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.DelaySuspendInfo | field | actualDelayTime: number | This API is deprecated in API version 9 and later versions and is migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.ResourceType | enum | export enum ResourceType | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.ResourceType | enum | CPU = 1 | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.ResourceType | enum | COMMON_EVENT = 1 << 1 | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.ResourceType | enum | TIMER = 1 << 2 | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.ResourceType | enum | WORK_SCHEDULER = 1 << 3 | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.ResourceType | enum | BLUETOOTH = 1 << 4 | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.ResourceType | enum | GPS = 1 << 5 | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.ResourceType | enum | AUDIO = 1 << 6 | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.EfficiencyResourcesRequest | interface | export interface EfficiencyResourcesRequest | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.EfficiencyResourcesRequest | field | reason: string | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.EfficiencyResourcesRequest | field | isProcess?: bool | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.EfficiencyResourcesRequest | field | isPersist?: bool | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.EfficiencyResourcesRequest | field | timeOut: number | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.EfficiencyResourcesRequest | field | isApply: bool | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| -| backgroundTaskManager.EfficiencyResourcesRequest | field | resourceTypes: number | This API is changed in API version 9 and migrated to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| - - -**Adaptation Guide**
+| backgroundTaskManager | namespace | declare namespace backgroundTaskManager | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function resetAllEfficiencyResources(): void; | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function applyEfficiencyResources(request: EfficiencyResourcesRequest): bool; | Changed in API version 9 to **function applyEfficiencyResources(request: EfficiencyResourcesRequest): void;** and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function stopBackgroundRunning(context: Context): Promise; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function stopBackgroundRunning(context: Context, callback: AsyncCallback): void; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent): Promise; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent, callback: AsyncCallback): void; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function requestSuspendDelay(reason: string, callback: Callback): DelaySuspendInfo; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function getRemainingDelayTime(requestId: number): Promise; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function getRemainingDelayTime(requestId: number, callback: AsyncCallback): void; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function cancelSuspendDelay(requestId: number): void; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.BackgroundMode | enum | export enum BackgroundMode | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.BackgroundMode | enum | DATA_TRANSFER = 1 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.BackgroundMode | enum | AUDIO_PLAYBACK = 2 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.BackgroundMode | enum | AUDIO_RECORDING = 3 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.BackgroundMode | enum | LOCATION = 4 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.BackgroundMode | enum | BLUETOOTH_INTERACTION = 5 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.BackgroundMode | enum | MULTI_DEVICE_CONNECTION = 6 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.BackgroundMode | enum | WIFI_INTERACTION = 7 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.BackgroundMode | enum | VOIP = 8 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.BackgroundMode | enum | TASK_KEEPING = 9 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.DelaySuspendInfo | interface | interface DelaySuspendInfo | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.DelaySuspendInfo | field | requestId: number | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.DelaySuspendInfo | field | actualDelayTime: number | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | export enum ResourceType | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | CPU = 1 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | COMMON_EVENT = 1 << 1 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | TIMER = 1 << 2 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | WORK_SCHEDULER = 1 << 3 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | BLUETOOTH = 1 << 4 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | GPS = 1 << 5 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | AUDIO = 1 << 6 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | interface | export interface EfficiencyResourcesRequest | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | reason: string | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | isProcess?: bool | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | isPersist?: bool | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | timeOut: number | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | isApply: bool | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | resourceTypes: number | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| + + +**Adaptation Guide** Import the **backgroundTaskManager** module. ``` @@ -63,107 +62,106 @@ import bundle form '@ohos.resourceschedule.backgroundTaskManager' ``` Exception handling also needs to be adapted. For details, see the [backgroundTaskManager API reference](../../../application-dev/reference/apis/js-apis-resourceschedule-backgroundTaskManager.md). -## c2.resourceschedule.usageStatistics - +## c2.resourceschedule.usageStatistics Rectified original APIs of **deviceUsageStatistics** of the resource scheduler subsystem. All APIs in API version 8 and earlier versions are deprecated, and original APIs in API version 9 are deleted. New APIs in API version 9 need to be used. The new APIs in API version 9 comply with the error code specifications. -**Change Impacts** +**Change Impact** The application developed based on the SDK versions of OpenHarmony 3.2.8.2 and later needs to adapt the modules and APIs in API version 9 and their methods for returning API error information. Otherwise, the original service logic will be affected. **Key API/Component Changes** -The following methods, attributes, enumerations, and constants are changed in API version 9 and later versions. The **@ohos.bundleState.d.ts** file is deprecated, the **@ohos.resourceschedule.usageStatistics.d.ts** file is added, and the class name is changed from **bundleState** to **usageStatistics**. +The following methods, attributes, enums, and constants are changed in API version 9 and later versions. The **@ohos.bundleState.d.ts** file is deprecated, the **@ohos.resourceschedule.usageStatistics.d.ts** file is added, and the class name is changed from **bundleState** to **usageStatistics**. -| Class | API Type | Method/Attribute/Enumeration/Constant | Change Type | +| Class | API Type | Method/Attribute/Enum/Constant | Change Type | | ----------------------------------------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| bundleState | method | function isIdleState(bundleName: string, callback: AsyncCallback): void; | Deprecated and migrated to **usageStatistics.isIdleState** | -| bundleState | method | function isIdleState(bundleName: string): Promise; | Deprecated and migrated to **usageStatistics.isIdleState** | -| bundleState | method | function queryAppUsagePriorityGroup(callback: AsyncCallback): void; | Deprecated and changed to **function queryAppGroup(callback: AsyncCallback): void;**| -| bundleState | method | function queryAppUsagePriorityGroup(): Promise; | Deprecated and changed to **function queryAppGroup(): Promise;** | -| bundleState | method | function queryBundleStateInfos(begin: number, end: number, callback: AsyncCallback): void; | Deprecated and changed to **function queryBundleStatsInfos(begin: number, end: number, callback: AsyncCallback): void;**| -| bundleState | method | function queryBundleStateInfos(begin: number, end: number): Promise; | Deprecated and changed to **function queryBundleStatsInfos(begin: number, end: number): Promise;**| -| bundleState | method | function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number): Promise>; | Deprecated and changed to **function queryBundleStatsInfoByInterval(byInterval: IntervalType, begin: number, end: number): Promise>;**| -| bundleState | method | function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number, callback: AsyncCallback>): void; | Deprecated and changed to **function queryBundleStatsInfoByInterval(byInterval: IntervalType, begin: number, end: number, callback: AsyncCallback>): void;**| -| bundleState | method | function queryBundleActiveStates(begin: number, end: number): Promise>; | Deprecated and changed to **function queryBundleEvents(begin: number, end: number): Promise>;**| -| bundleState | method | function queryBundleActiveStates(begin: number, end: number, callback: AsyncCallback>): void; | Deprecated and changed to **function queryBundleEvents(begin: number, end: number, callback: AsyncCallback>): void;**| -| bundleState | method | function queryCurrentBundleActiveStates(begin: number, end: number): Promise>; | Deprecated and changed to **function queryCurrentBundleEvents(begin: number, end: number): Promise>;**| -| bundleState | method | function queryCurrentBundleActiveStates(begin: number, end: number, callback: AsyncCallback>): void; | Deprecated and changed to **function queryCurrentBundleEvents(begin: number, end: number, callback: AsyncCallback>): void;**| -| bundleState | method | function getRecentlyUsedModules(maxNum?: number): Promise>; | Deprecated and changed to the following two APIs: **function QueryModuleUsageRecords(maxNum: number): Promise>;** and **function QueryModuleUsageRecords(): Promise>;**| -| bundleState | method | function getRecentlyUsedModules(maxNum?: number, callback: AsyncCallback>): void; | Deprecated and changed to the following two APIs: **function QueryModuleUsageRecords(maxNum: number, callback: AsyncCallback>): void;** and **function QueryModuleUsageRecords(callback: AsyncCallback>): void;**| -| bundleState | method | function queryAppUsagePriorityGroup(bundleName? : string): Promise; | Deprecated and changed to **function queryAppGroup(bundleName: string): Promise;**| -| bundleState | method | function queryAppUsagePriorityGroup(bundleName? : string, callback: AsyncCallback): void; | Deprecated and changed to **function queryAppGroup(bundleName: string, callback: AsyncCallback): void;**| -| bundleState | method | function setBundleGroup(bundleName: string, newGroup: GroupType, callback: AsyncCallback): void; | Deprecated and changed to **function setAppGroup(bundleName: string, newGroup: GroupType, callback: AsyncCallback): void;**| -| bundleState | method | function setBundleGroup(bundleName: string, newGroup: GroupType): Promise; | Deprecated and changed to **function setAppGroup(bundleName: string, newGroup: GroupType): Promise;**| -| bundleState | method | function registerGroupCallBack(callback: Callback, callback: AsyncCallback): void; | Deprecated and changed to **function registerAppGroupCallBack(callback: Callback, callback: AsyncCallback): void;**| -| bundleState | method | function registerGroupCallBack(callback: Callback): Promise; | Deprecated and changed to **function registerAppGroupCallBack(callback: Callback): Promise;**| -| bundleState | method | function unRegisterGroupCallBack(callback: AsyncCallback): void; | Deprecated and changed to **function unregisterAppGroupCallBack(): Promise;**| -| bundleState | method | function unRegisterGroupCallBack(): Promise; | Deprecated and changed to **function unregisterAppGroupCallBack(): Promise;**| +| bundleState | method | function isIdleState(bundleName: string, callback: AsyncCallback): void; | Deprecated and moved to **usageStatistics.isIdleState**. | +| bundleState | method | function isIdleState(bundleName: string): Promise; | Deprecated and moved to **usageStatistics.isIdleState**. | +| bundleState | method | function queryAppUsagePriorityGroup(callback: AsyncCallback): void; | Deprecated and changed to **function queryAppGroup(callback: AsyncCallback): void;**.| +| bundleState | method | function queryAppUsagePriorityGroup(): Promise; | Deprecated and changed to **function queryAppGroup(): Promise;**. | +| bundleState | method | function queryBundleStateInfos(begin: number, end: number, callback: AsyncCallback): void; | Deprecated and changed to **function queryBundleStatsInfos(begin: number, end: number, callback: AsyncCallback): void;**.| +| bundleState | method | function queryBundleStateInfos(begin: number, end: number): Promise; | Deprecated and changed to **function queryBundleStatsInfos(begin: number, end: number): Promise;**.| +| bundleState | method | function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number): Promise>; | Deprecated and changed to **function queryBundleStatsInfoByInterval(byInterval: IntervalType, begin: number, end: number): Promise>;**.| +| bundleState | method | function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number, callback: AsyncCallback>): void; | Deprecated and changed to **function queryBundleStatsInfoByInterval(byInterval: IntervalType, begin: number, end: number, callback: AsyncCallback>): void;**.| +| bundleState | method | function queryBundleActiveStates(begin: number, end: number): Promise>; | Deprecated and changed to **function queryBundleEvents(begin: number, end: number): Promise>;**.| +| bundleState | method | function queryBundleActiveStates(begin: number, end: number, callback: AsyncCallback>): void; | Deprecated and changed to **function queryBundleEvents(begin: number, end: number, callback: AsyncCallback>): void;**.| +| bundleState | method | function queryCurrentBundleActiveStates(begin: number, end: number): Promise>; | Deprecated and changed to **function queryCurrentBundleEvents(begin: number, end: number): Promise>;**.| +| bundleState | method | function queryCurrentBundleActiveStates(begin: number, end: number, callback: AsyncCallback>): void; | Deprecated and changed to **function queryCurrentBundleEvents(begin: number, end: number, callback: AsyncCallback>): void;**.| +| bundleState | method | function getRecentlyUsedModules(maxNum?: number): Promise>; | Deprecated and changed to **function QueryModuleUsageRecords(maxNum: number): Promise>;** and **function QueryModuleUsageRecords(): Promise>;**.| +| bundleState | method | function getRecentlyUsedModules(maxNum?: number, callback: AsyncCallback>): void; | Deprecated and changed to **function QueryModuleUsageRecords(maxNum: number, callback: AsyncCallback>): void;** and **function QueryModuleUsageRecords(callback: AsyncCallback>): void;**.| +| bundleState | method | function queryAppUsagePriorityGroup(bundleName? : string): Promise; | Deprecated and changed to **function queryAppGroup(bundleName: string): Promise;**.| +| bundleState | method | function queryAppUsagePriorityGroup(bundleName? : string, callback: AsyncCallback): void; | Deprecated and changed to **function queryAppGroup(bundleName: string, callback: AsyncCallback): void;**.| +| bundleState | method | function setBundleGroup(bundleName: string, newGroup: GroupType, callback: AsyncCallback): void; | Deprecated and changed to **function setAppGroup(bundleName: string, newGroup: GroupType, callback: AsyncCallback): void;**.| +| bundleState | method | function setBundleGroup(bundleName: string, newGroup: GroupType): Promise; | Deprecated and changed to **function setAppGroup(bundleName: string, newGroup: GroupType): Promise;**.| +| bundleState | method | function registerGroupCallBack(callback: Callback, callback: AsyncCallback): void; | Deprecated and changed to **function registerAppGroupCallBack(callback: Callback, callback: AsyncCallback): void;**.| +| bundleState | method | function registerGroupCallBack(callback: Callback): Promise; | Deprecated and changed to **function registerAppGroupCallBack(callback: Callback): Promise;**.| +| bundleState | method | function unRegisterGroupCallBack(callback: AsyncCallback): void; | Changed to **function unregisterAppGroupCallBack(): Promise;**.| +| bundleState | method | function unRegisterGroupCallBack(): Promise; | Changed to **function unregisterAppGroupCallBack(): Promise;**.| | bundleState | method | function queryBundleActiveEventStates(begin: number, end: number, callback: AsyncCallback>): void; | Changed to **function queryDeviceEventStats(begin: number, end: number, callback: AsyncCallback>): void;**| -| bundleState | method | function queryBundleActiveEventStates(begin: number, end: number): Promise>; | Changed in API version 9 and later versions to **function queryDeviceEventStats(begin: number, end: number): Promise>;**| -| bundleState | method | function queryAppNotificationNumber(begin: number, end: number, callback: AsyncCallback>): void; | Changed in API version 9 and later versions to **function queryNotificationEventStats(begin: number, end: number, callback: AsyncCallback>): void;**| -| bundleState | method | function queryAppNotificationNumber(begin: number, end: number): Promise>; | Changed in API version 9 and later versions to **function queryNotificationEventStats(begin: number, end: number): Promise>;**| -| bundleState.BundleActiveGroupCallbackInfo | interface | interface BundleActiveGroupCallbackInfo | Changed to **usageStatistics.AppGroupCallbackInfo** | -| bundleState.BundleActiveGroupCallbackInfo | field | bundleName: string | Changed and migrated to **usageStatistics.AppGroupCallbackInfo** | -| bundleState.BundleActiveGroupCallbackInfo | field | changeReason: number | Changed and migrated to **usageStatistics.AppGroupCallbackInfo** | -| bundleState.BundleActiveGroupCallbackInfo | field | userId: number | Changed and migrated to **usageStatistics.AppGroupCallbackInfo** | -| bundleState.BundleActiveGroupCallbackInfo | field | appUsageNewGroup: number | Deprecated and changed to **appNewGroup** | -| bundleState.BundleActiveGroupCallbackInfo | field | appUsageOldGroup: number | Deprecated and changed to **appOldGroup** | -| bundleState.BundleActiveEventState | interface | interface BundleActiveEventState | Deprecated and changed to **usageStatistics.DeviceEventStats** | -| bundleState.BundleActiveEventState | field | count: number | Changed and migrated to **usageStatistics.DeviceEventStats** | -| bundleState.BundleActiveEventState | field | eventId: number | Changed and migrated to **usageStatistics.DeviceEventStats** | -| bundleState.BundleActiveEventState | field | name: string | Changed and migrated to **usageStatistics.DeviceEventStats** | -| bundleState.BundleActiveModuleInfo | interface | interface BundleActiveModuleInfo | Changed in API version 9 and later versions to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | formRecords: Array | Changed to **formRecords: Array** | -| bundleState.BundleActiveModuleInfo | field | lastModuleUsedTime: number | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | launchedCount: number | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | abilityIconId?: number | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | abilityDescriptionId?: number | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | abilityLableId?: number | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | descriptionId?: number; | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | labelId?: number | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | appLabelId?: number | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | abilityName?: string | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | moduleName: string | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | bundleName: string | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.BundleActiveModuleInfo | field | deviceId?: string | Changed and migrated to **usageStatistics.HapModuleInfo** | -| bundleState.GroupType | enum | enum GroupType | Changed and migrated to **usageStatistics.GroupType** | -| bundleState.GroupType | enum | ACTIVE_GROUP_ALIVE | Deprecated and changed to **ALIVE_GROUP** | -| bundleState.GroupType | enum | ACTIVE_GROUP_DAILY | Deprecated and changed to **DAILY_GROUP** | -| bundleState.GroupType | enum | ACTIVE_GROUP_FIXED | Deprecated and changed to **FIXED_GROUP** | -| bundleState.GroupType | enum | ACTIVE_GROUP_RARE | Deprecated and changed to **RARE_GROUP** | -| bundleState.GroupType | enum | ACTIVE_GROUP_LIMIT | Deprecated and changed to **LIMITED_GROUP** | -| bundleState.GroupType | enum | ACTIVE_GROUP_NEVER | Deprecated and changed to **NEVER_GROUP** | -| bundleState.IntervalType | enum | enum IntervalType | Deprecated and migrated to **usageStatistics.IntervalType** | -| bundleState.IntervalType | enum | BY_OPTIMIZED | Deprecated and migrated to **usageStatistics.IntervalType** | -| bundleState.IntervalType | enum | BY_DAILY | Deprecated and migrated to **usageStatistics.IntervalType** | -| bundleState.IntervalType | enum | BY_WEEKLY | Deprecated and migrated to **usageStatistics.IntervalType** | -| bundleState.IntervalType | enum | BY_MONTHLY | Deprecated and migrated to **usageStatistics.IntervalType** | -| bundleState.IntervalType | enum | BY_ANNUALLY | Deprecated and migrated to **usageStatistics.IntervalType** | -| bundleState.BundleActiveInfoResponse | interface | interface BundleActiveInfoResponse | Deprecated and changed to **usageStatistics.BundleStatsMap** | -| bundleState.BundleActiveState | interface | interface BundleActiveState | Deprecated and changed to **usageStatistics.BundleEvents** | -| bundleState.BundleActiveState | field | stateType?: number | Deprecated and changed to **eventId** | -| bundleState.BundleActiveState | field | stateOccurredTime?: number | Deprecated and changed to **eventOccurredTime** | -| bundleState.BundleActiveState | field | nameOfClass?: string | Deprecated and migrated to **usageStatistics.BundleEvents** | -| bundleState.BundleActiveState | field | indexOfLink?: string | Deprecated and migrated to **usageStatistics.BundleEvents** | -| bundleState.BundleActiveState | field | bundleName?: string | Deprecated and migrated to **usageStatistics.BundleEvents** | -| bundleState.BundleActiveState | field | appUsagePriorityGroup?: number | Deprecated and changed to **appGroup** | -| bundleState.BundleStateInfo | interface | interface BundleStateInfo | Deprecated and changed to **usageStatistics.BundleStatsInfo** | -| bundleState.BundleStateInfo | method | merge(toMerge: BundleStateInfo): void | Deprecated | -| bundleState.BundleStateInfo | field | infosEndTime?: number | Deprecated and migrated to **usageStatistics.BundleStatsInfo** | -| bundleState.BundleStateInfo | field | infosBeginTime?: number | Deprecated and migrated to **usageStatistics.BundleStatsInfo** | -| bundleState.BundleStateInfo | field | fgAbilityPrevAccessTime?: number | Deprecated and migrated to **usageStatistics.BundleStatsInfo** | -| bundleState.BundleStateInfo | field | fgAbilityAccessTotalTime?: number | Deprecated and migrated to **usageStatistics.BundleStatsInfo** | -| bundleState.BundleStateInfo | field | bundleName?: string | Deprecated and migrated to **usageStatistics.BundleStatsInfo** | -| bundleState.BundleStateInfo | field | abilitySeenTotalTime?: number | Deprecated and migrated to **usageStatistics.BundleStatsInfo** | -| bundleState.BundleStateInfo | field | abilityPrevSeenTime?: number | Deprecated and migrated to **usageStatistics.BundleStatsInfo** | -| bundleState.BundleStateInfo | field | abilityPrevAccessTime?: number | Deprecated and migrated to **usageStatistics.BundleStatsInfo** | -| bundleState.BundleStateInfo | field | abilityInFgTotalTime?: number | Deprecated and migrated to **usageStatistics.BundleStatsInfo** | -| bundleState.BundleStateInfo | field | id: number | Deprecated and migrated to **usageStatistics.BundleStatsInfo** | -| bundleState | namespace | declare namespace bundleState | Deprecated and changed to **usageStatistics**, and migrated to **ohos.resourceschedule.usageStatistics.d.ts**| - - -**Adaptation Guide**
+| bundleState | method | function queryBundleActiveEventStates(begin: number, end: number): Promise>; | Changed in API version 9 to **function queryDeviceEventStats(begin: number, end: number): Promise>;**.| +| bundleState | method | function queryAppNotificationNumber(begin: number, end: number, callback: AsyncCallback>): void; | Changed in API version 9 to **function queryNotificationEventStats(begin: number, end: number, callback: AsyncCallback>): void;**.| +| bundleState | method | function queryAppNotificationNumber(begin: number, end: number): Promise>; | Changed in API version 9 to **function queryNotificationEventStats(begin: number, end: number): Promise>;**.| +| bundleState.BundleActiveGroupCallbackInfo | interface | interface BundleActiveGroupCallbackInfo | Moved to **usageStatistics.AppGroupCallbackInfo**. | +| bundleState.BundleActiveGroupCallbackInfo | field | bundleName: string | Moved to **usageStatistics.AppGroupCallbackInfo**. | +| bundleState.BundleActiveGroupCallbackInfo | field | changeReason: number | Moved to **usageStatistics.AppGroupCallbackInfo**. | +| bundleState.BundleActiveGroupCallbackInfo | field | userId: number | Moved to **usageStatistics.AppGroupCallbackInfo**. | +| bundleState.BundleActiveGroupCallbackInfo | field | appUsageNewGroup: number | Deprecated and changed to **appNewGroup**. | +| bundleState.BundleActiveGroupCallbackInfo | field | appUsageOldGroup: number | Deprecated and changed to **appOldGroup**. | +| bundleState.BundleActiveEventState | interface | interface BundleActiveEventState | Deprecated and changed to **usageStatistics.DeviceEventStats**. | +| bundleState.BundleActiveEventState | field | count: number | Moved to **usageStatistics.DeviceEventStats**. | +| bundleState.BundleActiveEventState | field | eventId: number | Moved to **usageStatistics.DeviceEventStats**. | +| bundleState.BundleActiveEventState | field | name: string | Moved to **usageStatistics.DeviceEventStats**. | +| bundleState.BundleActiveModuleInfo | interface | interface BundleActiveModuleInfo | Changed in API version 9 to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | formRecords: Array | Changed to **formRecords: Array**. | +| bundleState.BundleActiveModuleInfo | field | lastModuleUsedTime: number | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | launchedCount: number | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | abilityIconId?: number | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | abilityDescriptionId?: number | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | abilityLableId?: number | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | descriptionId?: number; | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | labelId?: number | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | appLabelId?: number | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | abilityName?: string | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | moduleName: string | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | bundleName: string | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.BundleActiveModuleInfo | field | deviceId?: string | Moved to **usageStatistics.HapModuleInfo**. | +| bundleState.GroupType | enum | enum GroupType | Moved to **usageStatistics.GroupType**. | +| bundleState.GroupType | enum | ACTIVE_GROUP_ALIVE | Deprecated and changed to **ALIVE_GROUP**. | +| bundleState.GroupType | enum | ACTIVE_GROUP_DAILY | Deprecated and changed to **DAILY_GROUP**. | +| bundleState.GroupType | enum | ACTIVE_GROUP_FIXED | Deprecated and changed to **FIXED_GROUP**. | +| bundleState.GroupType | enum | ACTIVE_GROUP_RARE | Deprecated and changed to **RARE_GROUP**. | +| bundleState.GroupType | enum | ACTIVE_GROUP_LIMIT | Deprecated and changed to **LIMITED_GROUP**. | +| bundleState.GroupType | enum | ACTIVE_GROUP_NEVER | Deprecated and changed to **NEVER_GROUP**. | +| bundleState.IntervalType | enum | enum IntervalType | Deprecated and moved to **usageStatistics.IntervalType**. | +| bundleState.IntervalType | enum | BY_OPTIMIZED | Deprecated and moved to **usageStatistics.IntervalType**. | +| bundleState.IntervalType | enum | BY_DAILY | Deprecated and moved to **usageStatistics.IntervalType**. | +| bundleState.IntervalType | enum | BY_WEEKLY | Deprecated and moved to **usageStatistics.IntervalType**. | +| bundleState.IntervalType | enum | BY_MONTHLY | Deprecated and moved to **usageStatistics.IntervalType**. | +| bundleState.IntervalType | enum | BY_ANNUALLY | Deprecated and moved to **usageStatistics.IntervalType**. | +| bundleState.BundleActiveInfoResponse | interface | interface BundleActiveInfoResponse | Deprecated and changed to **usageStatistics.BundleStatsMap**. | +| bundleState.BundleActiveState | interface | interface BundleActiveState | Deprecated and changed to **usageStatistics.BundleEvents**. | +| bundleState.BundleActiveState | field | stateType?: number | Deprecated and changed to **eventId**. | +| bundleState.BundleActiveState | field | stateOccurredTime?: number | Deprecated and changed to **eventOccurredTime**. | +| bundleState.BundleActiveState | field | nameOfClass?: string | Deprecated and moved to **usageStatistics.BundleEvents**. | +| bundleState.BundleActiveState | field | indexOfLink?: string | Deprecated and moved to **usageStatistics.BundleEvents**. | +| bundleState.BundleActiveState | field | bundleName?: string | Deprecated and moved to **usageStatistics.BundleEvents**. | +| bundleState.BundleActiveState | field | appUsagePriorityGroup?: number | Deprecated and changed to **appGroup**. | +| bundleState.BundleStateInfo | interface | interface BundleStateInfo | Deprecated and changed to **usageStatistics.BundleStatsInfo**. | +| bundleState.BundleStateInfo | method | merge(toMerge: BundleStateInfo): void | Deprecated. | +| bundleState.BundleStateInfo | field | infosEndTime?: number | Deprecated and moved to **usageStatistics.BundleStatsInfo**. | +| bundleState.BundleStateInfo | field | infosBeginTime?: number | Deprecated and moved to **usageStatistics.BundleStatsInfo**. | +| bundleState.BundleStateInfo | field | fgAbilityPrevAccessTime?: number | Deprecated and moved to **usageStatistics.BundleStatsInfo**. | +| bundleState.BundleStateInfo | field | fgAbilityAccessTotalTime?: number | Deprecated and moved to **usageStatistics.BundleStatsInfo**. | +| bundleState.BundleStateInfo | field | bundleName?: string | Deprecated and moved to **usageStatistics.BundleStatsInfo**. | +| bundleState.BundleStateInfo | field | abilitySeenTotalTime?: number | Deprecated and moved to **usageStatistics.BundleStatsInfo**. | +| bundleState.BundleStateInfo | field | abilityPrevSeenTime?: number | Deprecated and moved to **usageStatistics.BundleStatsInfo**. | +| bundleState.BundleStateInfo | field | abilityPrevAccessTime?: number | Deprecated and moved to **usageStatistics.BundleStatsInfo**. | +| bundleState.BundleStateInfo | field | abilityInFgTotalTime?: number | Deprecated and moved to **usageStatistics.BundleStatsInfo**. | +| bundleState.BundleStateInfo | field | id: number | Deprecated and moved to **usageStatistics.BundleStatsInfo**. | +| bundleState | namespace | declare namespace bundleState | Deprecated and changed to **usageStatistics**, and moved to **ohos.resourceschedule.usageStatistics.d.ts**.| + + +**Adaptation Guide** Import the **usageStatistics** module. ``` @@ -172,70 +170,69 @@ import bundle form '@ohos.resourceschedule.usageStatistics' Exception handling also needs to be adapted. For details, see the [usageStatistics API reference](../../../application-dev/reference/apis/js-apis-resourceschedule-deviceUsageStatistics.md). -## c3.resourceschedule.workScheduler - +## c3.resourceschedule.workScheduler Rectified original APIs of **workScheduler** of the resource scheduler subsystem. The original APIs in API version 9 are changed to new APIs in API version 9. The new APIs in API version 9 comply with the error code specifications. -**Change Impacts** +**Change Impact** The application developed based on the SDK versions of OpenHarmony 3.2.8.2 and later needs to adapt the modules and APIs in API version 9 and their methods for returning API error information. Otherwise, the original service logic will be affected. **Key API/Component Changes** -The following methods, attributes, enumerations, and constants are changed in API version 9 and later versions. The **@ohos.workScheduler.d.ts** file is deprecated and related APIs are migrated to the newly added **@ohos.resourceschedule.workScheduler.d.ts** file. +The following methods, attributes, enums, and constants are changed in API version 9 and later versions. The **@ohos.workScheduler.d.ts** file is deprecated and related APIs are moved to the newly added **@ohos.resourceschedule.workScheduler.d.ts** file. | Class| API Type| Declaration| Change Type| | -- | -- | -- | -- | -| workScheduler | namespace | declare namespace workScheduler | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | interface | export interface WorkInfo | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | parameters?: {[key: string]: any} | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | idleWaitTime?: number | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | isDeepIdle?: boolean | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | repeatCount?: number | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | isRepeat?: boolean | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | repeatCycleTime?: number | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | storageRequest?: StorageRequest | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | batteryStatus?: BatteryStatus | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | batteryLevel?: number | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | chargerType?: ChargingType | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | isCharging?: boolean | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | networkType?: NetworkType | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | isPersisted?: boolean | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | abilityName: string | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | bundleName: string | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.WorkInfo | field | workId: number | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler | method | function isLastWorkTimeOut(workId: number): Promise; | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler | method | function isLastWorkTimeOut(workId: number, callback: AsyncCallback): boolean; | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler | method | function stopAndClearWorks(): boolean; | Changed in API version 8 to **function stopAndClearWorks(): boolean;** and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler | method | function obtainAllWorks(): Promise>; | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler | method | function obtainAllWorks(callback: AsyncCallback): Array; | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler | method | function getWorkStatus(workId: number): Promise; | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler | method | function getWorkStatus(workId: number, callback: AsyncCallback): void; | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler | method | function stopWork(work: WorkInfo, needCancel?: boolean): boolean; | Changed in API version 8 to **function stopWork(work: WorkInfo, needCancel?: boolean): void;** and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler | method | function startWork(work: WorkInfo): boolean; | Changed in API version 9 to **function startWork(work: WorkInfo): void;** and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.NetworkType | enum | export enum NetworkType | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.NetworkType | enum | NETWORK_TYPE_ANY = 0 | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.NetworkType | enum | NETWORK_TYPE_MOBILE | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.NetworkType | enum | NETWORK_TYPE_BLUETOOTH | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI_P2P | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.NetworkType | enum | NETWORK_TYPE_ETHERNET | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.ChargingType | enum | export enum ChargingType | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.ChargingType | enum | CHARGING_PLUGGED_ANY = 0 | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.ChargingType | enum | CHARGING_PLUGGED_AC | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.ChargingType | enum | CHARGING_PLUGGED_USB | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.ChargingType | enum | CHARGING_PLUGGED_WIRELESS | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.BatteryStatus | enum | export enum BatteryStatus | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW = 0 | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.BatteryStatus | enum | BATTERY_STATUS_OKAY | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW_OR_OKAY | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.StorageRequest | enum | export enum StorageRequest | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW = 0 | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_OKAY | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| -| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW_OR_OKAY | Changed in API version 9 and migrated to the **ohos.resourceschedule.workScheduler.d.ts** file| - - -**Adaptation Guide**
+| workScheduler | namespace | declare namespace workScheduler | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | interface | export interface WorkInfo | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | parameters?: {[key: string]: any} | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | idleWaitTime?: number | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | isDeepIdle?: boolean | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | repeatCount?: number | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | isRepeat?: boolean | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | repeatCycleTime?: number | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | storageRequest?: StorageRequest | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | batteryStatus?: BatteryStatus | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | batteryLevel?: number | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | chargerType?: ChargingType | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | isCharging?: boolean | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | networkType?: NetworkType | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | isPersisted?: boolean | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | abilityName: string | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | bundleName: string | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | workId: number | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function isLastWorkTimeOut(workId: number): Promise; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function isLastWorkTimeOut(workId: number, callback: AsyncCallback): boolean; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function stopAndClearWorks(): boolean; | Changed in API version 8 to **function stopAndClearWorks(): boolean;** and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function obtainAllWorks(): Promise>; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function obtainAllWorks(callback: AsyncCallback): Array; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function getWorkStatus(workId: number): Promise; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function getWorkStatus(workId: number, callback: AsyncCallback): void; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function stopWork(work: WorkInfo, needCancel?: boolean): boolean; | Changed in API version 8 to **function stopWork(work: WorkInfo, needCancel?: boolean): void;** and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function startWork(work: WorkInfo): boolean; | Changed in API version 9 to **function startWork(work: WorkInfo): void;** and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | export enum NetworkType | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_ANY = 0 | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_MOBILE | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_BLUETOOTH | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI_P2P | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_ETHERNET | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.ChargingType | enum | export enum ChargingType | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_ANY = 0 | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_AC | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_USB | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_WIRELESS | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | export enum BatteryStatus | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW = 0 | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | BATTERY_STATUS_OKAY | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW_OR_OKAY | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.StorageRequest | enum | export enum StorageRequest | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW = 0 | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_OKAY | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW_OR_OKAY | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| + + +**Adaptation Guide** Import the **workScheduler** module. ``` @@ -245,71 +242,70 @@ Exception handling also needs to be adapted. For details, see the [workScheduler ## c4.resourceschedule.reminderAgent - Rectified original APIs of **reminderAgent** of the resource scheduler subsystem. All APIs in API version 8 and earlier versions are deprecated, and original APIs in API version 9 are deleted. New APIs in API version 9 need to be used. The new APIs in API version 9 comply with the error code specifications. -**Change Impacts** +**Change Impact** The application developed based on the SDK versions of OpenHarmony 3.2.8.2 and later needs to adapt the modules and APIs in API version 9 and their methods for returning API error information. Otherwise, the original service logic will be affected. **Key API/Component Changes** -The following methods, attributes, enumerations, and constants are changed in API version 9 and later versions. The **@ohos.reminderAgent.d.ts** file is deprecated, the **@ohos.reminderAgentManager.d.ts** file is added, and the class name is changed from **reminderAgent** to **reminderAgentManager**. +The following methods, attributes, enums, and constants are changed in API version 9 and later versions. The **@ohos.reminderAgent.d.ts** file is deprecated, the **@ohos.reminderAgentManager.d.ts** file is added, and the class name is changed from **reminderAgent** to **reminderAgentManager**. -| Class | API Type | Method/Attribute/Enumeration/Constant | Change Type | +| Class | API Type | Method/Attribute/Enum/Constant | Change Type | | --------------------- | ----------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| reminderAgent | method | publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback): void; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | publishReminder(reminderReq: ReminderRequest): Promise; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | cancelReminder(reminderId: number, callback: AsyncCallback): void; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | cancelReminder(reminderId: number): Promise; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | getValidReminders(callback: AsyncCallback>): void; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | getValidReminders(): Promise>; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | cancelAllReminders(callback: AsyncCallback): void; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | cancelAllReminders(): Promise; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback): void; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | addNotificationSlot(slot: NotificationSlot): Promise; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback): void; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent | method | removeNotificationSlot(slotType: notification.SlotType): Promise; | Deprecated and migrated to **reminderAgentManager**| -| reminderAgent.ActionButtonType | enum | ACTION_BUTTON_TYPE_CLOSE | Deprecated and migrated to **reminderAgentManager.ActionButtonType**| -| reminderAgent.ActionButtonType | enum | ACTION_BUTTON_TYPE_SNOOZE | Deprecated and migrated to **reminderAgentManager.ActionButtonType**| -| reminderAgent.ReminderType | enum | REMINDER_TYPE_TIMER | Deprecated and migrated to **reminderAgentManager.ReminderType**| -| reminderAgent.ReminderType | enum | REMINDER_TYPE_CALENDAR | Deprecated and migrated to **reminderAgentManager.ReminderType**| -| reminderAgent.ReminderType | enum | REMINDER_TYPE_CALENDAR | Deprecated and migrated to **reminderAgentManager.ReminderType**| -| reminderAgent.ActionButton | field | title:string | Deprecated and migrated to **reminderAgentManager.ActionButton**| -| reminderAgent.ActionButton | field | type:ActionButtonType | Deprecated and migrated to **reminderAgentManager.ActionButton**| -| reminderAgent.WantAgent | field | pkgName:string | Deprecated and migrated to **reminderAgentManager.WantAgent**| -| reminderAgent.WantAgent | field | abilityName:string | Deprecated and migrated to **reminderAgentManager.WantAgent**| -| reminderAgent.MaxScreenWantAgent | field | pkgName:string | Deprecated and migrated to **reminderAgentManager.MaxScreenWantAgent**| -| reminderAgent.MaxScreenWantAgent | field | abilityName:string | Deprecated and migrated to **reminderAgentManager.MaxScreenWantAgent**| -| reminderAgent.ReminderRequest | field | reminderType:ReminderType | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | actionButton?:ActionButton | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | wantAgent?:WantAgent | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | maxScreenWantAgent?:MaxScreenWantAgent | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | ringDuration?:number | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | snoozeTimes?:number | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | timeInterval?:number | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | title?:string | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | content?:string | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | expiredContent?:string | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | snoozeContent?:string | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | notificationId?:number | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequest | field | slotType?: notification.SlotType | Deprecated and migrated to **reminderAgentManager.ReminderRequest**| -| reminderAgent.ReminderRequestCalendar | field | dateTime:LocalDateTime | Deprecated and migrated to **reminderAgentManager.ReminderRequestCalendar**| -| reminderAgent.ReminderRequestCalendar | field | repeatMonths?:Array | Deprecated and migrated to **reminderAgentManager.ReminderRequestCalendar**| -| reminderAgent.ReminderRequestCalendar | field | repeatDays?:Array | Deprecated and migrated to **reminderAgentManager.ReminderRequestCalendar**| -| reminderAgent.ReminderRequestAlarm | field | hour:number | Deprecated and migrated to **reminderAgentManager.ReminderRequestAlarm**| -| reminderAgent.ReminderRequestAlarm | field | minute:number | Deprecated and migrated to **reminderAgentManager.ReminderRequestAlarm**| -| reminderAgent.ReminderRequestAlarm | field | daysOfWeek?:Array | Deprecated and migrated to **reminderAgentManager.ReminderRequestAlarm**| -| reminderAgent.ReminderRequestTimer | field | triggerTimeInSeconds:number | Deprecated and migrated to **reminderAgentManager.ReminderRequestTimer**| -| reminderAgent.LocalDateTime | field | year:number | Deprecated and migrated to **reminderAgentManager.LocalDateTime**| -| reminderAgent.LocalDateTime | field | month:number | Deprecated and migrated to **reminderAgentManager.LocalDateTime**| -| reminderAgent.LocalDateTime | field | day:number | Deprecated and migrated to **reminderAgentManager.LocalDateTime**| -| reminderAgent.LocalDateTime | field | hour:number | Deprecated and migrated to **reminderAgentManager.LocalDateTime**| -| reminderAgent.LocalDateTime | field | minute:number | Deprecated and migrated to **reminderAgentManager.LocalDateTime**| -| reminderAgent.LocalDateTime | field | second?:number | Deprecated and migrated to **reminderAgentManager.LocalDateTime**| - - -**Adaptation Guide**
+| reminderAgent | method | publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback): void; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | publishReminder(reminderReq: ReminderRequest): Promise; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | cancelReminder(reminderId: number, callback: AsyncCallback): void; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | cancelReminder(reminderId: number): Promise; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | getValidReminders(callback: AsyncCallback>): void; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | getValidReminders(): Promise>; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | cancelAllReminders(callback: AsyncCallback): void; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | cancelAllReminders(): Promise; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback): void; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | addNotificationSlot(slot: NotificationSlot): Promise; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback): void; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent | method | removeNotificationSlot(slotType: notification.SlotType): Promise; | Deprecated and moved to **reminderAgentManager**.| +| reminderAgent.ActionButtonType | enum | ACTION_BUTTON_TYPE_CLOSE | Deprecated and moved to **reminderAgentManager.ActionButtonType**.| +| reminderAgent.ActionButtonType | enum | ACTION_BUTTON_TYPE_SNOOZE | Deprecated and moved to **reminderAgentManager.ActionButtonType**.| +| reminderAgent.ReminderType | enum | REMINDER_TYPE_TIMER | Deprecated and moved to **reminderAgentManager.ReminderType**.| +| reminderAgent.ReminderType | enum | REMINDER_TYPE_CALENDAR | Deprecated and moved to **reminderAgentManager.ReminderType**.| +| reminderAgent.ReminderType | enum | REMINDER_TYPE_CALENDAR | Deprecated and moved to **reminderAgentManager.ReminderType**.| +| reminderAgent.ActionButton | field | title:string | Deprecated and moved to **reminderAgentManager.ActionButton**.| +| reminderAgent.ActionButton | field | type:ActionButtonType | Deprecated and moved to **reminderAgentManager.ActionButton**.| +| reminderAgent.WantAgent | field | pkgName:string | Deprecated and moved to **reminderAgentManager.WantAgent**.| +| reminderAgent.WantAgent | field | abilityName:string | Deprecated and moved to **reminderAgentManager.WantAgent**.| +| reminderAgent.MaxScreenWantAgent | field | pkgName:string | Deprecated and moved to **reminderAgentManager.MaxScreenWantAgent**.| +| reminderAgent.MaxScreenWantAgent | field | abilityName:string | Deprecated and moved to **reminderAgentManager.MaxScreenWantAgent**.| +| reminderAgent.ReminderRequest | field | reminderType:ReminderType | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | actionButton?:ActionButton | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | wantAgent?:WantAgent | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | maxScreenWantAgent?:MaxScreenWantAgent | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | ringDuration?:number | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | snoozeTimes?:number | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | timeInterval?:number | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | title?:string | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | content?:string | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | expiredContent?:string | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | snoozeContent?:string | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | notificationId?:number | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequest | field | slotType?: notification.SlotType | Deprecated and moved to **reminderAgentManager.ReminderRequest**.| +| reminderAgent.ReminderRequestCalendar | field | dateTime:LocalDateTime | Deprecated and moved to **reminderAgentManager.ReminderRequestCalendar**.| +| reminderAgent.ReminderRequestCalendar | field | repeatMonths?:Array | Deprecated and moved to **reminderAgentManager.ReminderRequestCalendar**.| +| reminderAgent.ReminderRequestCalendar | field | repeatDays?:Array | Deprecated and moved to **reminderAgentManager.ReminderRequestCalendar**.| +| reminderAgent.ReminderRequestAlarm | field | hour:number | Deprecated and moved to **reminderAgentManager.ReminderRequestAlarm**.| +| reminderAgent.ReminderRequestAlarm | field | minute:number | Deprecated and moved to **reminderAgentManager.ReminderRequestAlarm**.| +| reminderAgent.ReminderRequestAlarm | field | daysOfWeek?:Array | Deprecated and moved to **reminderAgentManager.ReminderRequestAlarm**.| +| reminderAgent.ReminderRequestTimer | field | triggerTimeInSeconds:number | Deprecated and moved to **reminderAgentManager.ReminderRequestTimer**.| +| reminderAgent.LocalDateTime | field | year:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.| +| reminderAgent.LocalDateTime | field | month:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.| +| reminderAgent.LocalDateTime | field | day:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.| +| reminderAgent.LocalDateTime | field | hour:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.| +| reminderAgent.LocalDateTime | field | minute:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.| +| reminderAgent.LocalDateTime | field | second?:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.| + + +**Adaptation Guide** Import the **reminderAgentManager** module. ``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelogs-telephony.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-telephony.md similarity index 77% rename from en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelogs-telephony.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-telephony.md index 9e31a3ecf2f85cc83be7eace01d25fe8f060e238..1d72dd98d69e748adcf597fa4eb970ccd2ba6670 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelogs-telephony.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-telephony.md @@ -4,17 +4,21 @@ ## cl.telephony.1 Input Parameter Change of System APIs of the SMS Module -Input parameters are changed for some released system APIs of the SMS module of the telephony subsystem, which do not comply with the API specifications of OpenHarmony. The following changes are made in API version 9 and later: +Input parameters are changed for some released system APIs of the SMS module of the telephony subsystem, leading to noncompliance with the API specifications of OpenHarmony. The following changes are made in API version 9 and later: The **slotId** parameter is added to the **isImsSmsSupported** API, indicating the slot ID. -**Change Impacts** -Input parameters of JavaScript APIs need to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. + +**Change Impact** + +Input parameters of JS APIs need to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. + + **Key API/Component Changes** -- Involved APIs +- Involved APIs: isImsSmsSupported(callback: AsyncCallback): void; isImsSmsSupported(): Promise; @@ -33,6 +37,8 @@ function isImsSmsSupported(slotId: number, callback: AsyncCallback): vo function isImsSmsSupported(slotId: number): Promise; ``` + + **Adaptation Guide** Add an input parameter. The sample code is as follows: @@ -56,4 +62,4 @@ promise.then(data => { }).catch(err => { console.error(`isImsSmsSupported failed, promise: err->${JSON.stringify(err)}`); }); -``` \ No newline at end of file +``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-testfwk_arkxtest.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-testfwk_arkxtest.md similarity index 62% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-testfwk_arkxtest.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-testfwk_arkxtest.md index 69bf6038edfb09bcee929d5f85bb66254ef58ab7..48e66b1bbf35ef9d79889ea95c2c460d8d8eb8ad 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-testfwk_arkxtest.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-testfwk_arkxtest.md @@ -2,7 +2,7 @@ ## cl.testfwk_arkxtest.1 Exception Handling Support of On, Driver, and Component APIs -The original APIs in API version 8 are deprecated, and substitute APIs that support exception handling are introduced in API version 9. You must use **try catch** to capture exceptions thrown by the APIs. +Deprecated the original APIs in API version 8, and introduced substitute APIs that support exception handling in API version 9. You must use **try catch** to capture exceptions thrown by the APIs. ## Change Impacts @@ -17,25 +17,25 @@ This change affects the JS APIs in API version 9 provided by **@ohos.uitest**. I ## Adaptation Guide -1. Adapt to the API name changes. +### 1. Adapt to the API name changes. - You can replace the class name according to the following rules: +You can replace the class name according to the following rules: - - `By-->On` - - `BY-->ON` - - `UiDriver-->Driver` - - `UiComponent-->Component` +- `By-->On` +- `BY-->ON` +- `UiDriver-->Driver` +- `UiComponent-->Component` -2. Catch and handle exceptions. +### 2. Catch and handle exceptions. - Use **try-catch** to catch and handle exceptions thrown by the APIs. Below is the sample code: +Use **try-catch** to catch and handle exceptions thrown by the APIs. Below is the sample code: - ```typescript - import {Driver,ON,Component} from '@ohos.uitest' - - try { - let driver = Driver.create(); - } catch (error) { - // error handle; error.code indicates the error code. - } - ``` \ No newline at end of file +```typescript +import {Driver,ON,Component} from '@ohos.uitest' + +try { + let driver = Driver.create(); +} catch (error) { + // error handle; error.code indicates the error code. +} +``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-theme.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-theme.md similarity index 100% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-theme.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-theme.md diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-useriam.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-useriam.md similarity index 50% rename from en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-useriam.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-useriam.md index a9a1a8dd9d3b33f6a36b741d60e4859e61e00bee..61146c1ff8b3c53feb9d20ec72d768852abbb1f7 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.8.3/changelogs-useriam.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-useriam.md @@ -1,20 +1,20 @@ -# User IAM Subsystem ChangeLog +# User IAM Subsystem Changelog -## cl.useriam.1 API Exception Handling Method Change +## cl.useriam.1 API Exception Handling Change in APIs -Certain APIs of user IAM use service logic return values to indicate error information, which does not comply with the API error code specifications of OpenHarmony. The following changes are made in API version 9 and later: +Certain user IAM APIs use service logic return values to indicate error information, which does not comply with the API error code specifications of OpenHarmony. The following changes are made in API version 9: -An error message is returned via an exception. +An error message is returned by throwing an exception. -**Change Impacts** +**Change Impact** -Applications developed based on earlier versions are not affected. If your application uses API version 9 or later, you need to adapt the change in the way for APIs to return the error information. Otherwise, service logic will be affected. +Applications developed based on earlier versions are not affected. If your application uses API version 9 or later, you need to adapt the change in the way for APIs to return error information. Otherwise, service logic will be affected. **Key API/Component Changes** -For adaptation to the unified API exception handling mode, certain APIs of user IAM are deprecated (original APIs in the following table) and corresponding new APIs in the following table are added. The newly added APIs support unified error code handling specifications and function the same as the original APIs. +For easy use, related user IAM APIs are deprecated, and new APIs are added to implement unified error code handling. The functionalities of these APIs remain unchanged. -| Module | Class | Method/Attribute/Enumeration/Constant | Change Type | +| Module | Class | Method/Attribute/Enum/Constant | Change Type | | ---------------------- | ------------------- | ------------------------- | ------------------------ | | ohos.userIAM.userAuth | UserAuth | constructor() | Deprecated| | ohos.userIAM.userAuth | UserAuth | getVersion() : number | Deprecated| @@ -24,18 +24,18 @@ For adaptation to the unified API exception handling mode, certain APIs of user | ohos.userIAM.userAuth | IUserAuthCallback | onResult: (result : number, extraInfo : AuthResult) => void | Deprecated| | ohos.userIAM.userAuth | IUserAuthCallback | onAcquireInfo ?: (module : number, acquire : number, extraInfo : any) => void | Deprecated| | ohos.userIAM.userAuth | AuthResult | AuthResult {
token ?: Uint8Array;
remainTimes ?: number;
freezingTime ?: number;} | Deprecated| -| ohos.userIAM.userAuth | Enumeration| ResultCode {
SUCCESS = 0,
FAIL = 1,
GENERAL_ERROR = 2,
CANCELED = 3,
TIMEOUT = 4,
TYPE_NOT_SUPPORT = 5,
TRUST_LEVEL_NOT_SUPPORT = 6,
BUSY = 7,
INVALID_PARAMETERS = 8,
LOCKED = 9,
NOT_ENROLLED = 10,} | Deprecated| +| ohos.userIAM.userAuth | Enum| ResultCode {
SUCCESS = 0,
FAIL = 1,
GENERAL_ERROR = 2,
CANCELED = 3,
TIMEOUT = 4,
TYPE_NOT_SUPPORT = 5,
TRUST_LEVEL_NOT_SUPPORT = 6,
BUSY = 7,
INVALID_PARAMETERS = 8,
LOCKED = 9,
NOT_ENROLLED = 10,} | Deprecated| | ohos.userIAM.userAuth | type | AuthEventKey = "result" | Added| | ohos.userIAM.userAuth | type | EventInfo = AuthResultInfo | Added| | ohos.userIAM.userAuth | AuthResultInfo | AuthResultInfo {
result : number;
token ?: Uint8Array;
remainAttempts ?: number;
lockoutDuration ?: number;} | Added| | ohos.userIAM.userAuth | TipInfo | TipInfo {
module : number;
tip : number;} | Added| | ohos.userIAM.userAuth | AuthInstance | AuthInstance {
on: (name: AuthEventKey, callback: AuthEvent) => void;
off: (name: AuthEventKey) => void;
start: () => void;
cancel: () => void;} | Added| -| ohos.userIAM.userAuth | Enumeration| ResultCodeV9 {
SUCCESS = 12500000,
FAIL = 12500001,
GENERAL_ERROR = 12500002,
CANCELED = 12500003,
TIMEOUT = 12500004,
TYPE_NOT_SUPPORT = 12500005,
TRUST_LEVEL_NOT_SUPPORT = 12500006,
BUSY = 12500007,
LOCKED = 12500009,
NOT_ENROLLED = 12500010,} | Added| +| ohos.userIAM.userAuth | Enum| ResultCodeV9 {
SUCCESS = 12500000,
FAIL = 12500001,
GENERAL_ERROR = 12500002,
CANCELED = 12500003,
TIMEOUT = 12500004,
TYPE_NOT_SUPPORT = 12500005,
TRUST_LEVEL_NOT_SUPPORT = 12500006,
BUSY = 12500007,
LOCKED = 12500009,
NOT_ENROLLED = 12500010,} | Added| | ohos.userIAM.userAuth | function | getAuthInstance(challenge : Uint8Array, authType : UserAuthType, authTrustLevel : AuthTrustLevel) : AuthInstance | Added| | ohos.userIAM.userAuth | function | getVersion() : number | Added| | ohos.userIAM.userAuth | function | getAvailableStatus(authType : UserAuthType, authTrustLevel : AuthTrustLevel) : void | Added| | ohos.userIAM.faceAuth | FaceAuthManager | setSurfaceId(surfaceId : string) : ResultCode | Deleted| -| ohos.userIAM.faceAuth | Enumeration| ResultCode {
SUCCESS = 0,
FAIL = 1,} | Deleted| +| ohos.userIAM.faceAuth | Enum| ResultCode {
SUCCESS = 0,
FAIL = 1,} | Deleted| | ohos.userIAM.faceAuth | FaceAuthManager | setSurfaceId(surfaceId: string) : void | Added| **Adaptation Guide** @@ -53,22 +53,22 @@ try { } ``` -For sample code of more APIs, see the [user authentication API reference](../../../application-dev/reference/apis/js-apis-useriam-userauth.md) and [face authentication API reference](../../../application-dev/reference/apis/js-apis-useriam-faceauth.md). +For more information about the APIs, see [User Authentication](../../../application-dev/reference/apis/js-apis-useriam-userauth.md) and [Facial Authentication](../../../application-dev/reference/apis/js-apis-useriam-faceauth.md). -## cl.useriam.2 API Call Permission Change +## cl.useriam.2 API Invoking Permission Change -Some APIs of user IAM can only be called by system applications, and system application runtime authentication is required. The following changes are made in API version 9 and later: +Some user IAM APIs can only be called by system applications, and system application runtime authentication is required. The following changes are made in API version 9: -The service logic for checking whether an application is a system application is added for the **setSurfaceId** API of the face authentication module. Non-system applications cannot call this API. +Added the service logic for checking whether an application is a system application to the **setSurfaceId** API of the facial authentication module. Non-system applications cannot call this API. -**Change Impacts** +**Change Impact** -Applications developed based on earlier versions are not affected. If your application uses API version 9 or later and wants to call this API, your application must be a system application. +Applications developed based on earlier versions are not affected. **Key API/Component Changes** -The service logic for checking whether an application is a system application is added for the **setSurfaceId** API. Error code **202** will be returned if the API is called by a non-system application. +The service logic for checking whether an application is a system application is added to **setSurfaceId()** . Error code **202** will be returned if the API is called by a non-system application. **Adaptation Guide** -Modify the **UnsgnedReleasedProfileTemplate.json** file related to [app signing](https://gitee.com/openharmony/developtools_hapsigner/tree/master/dist) to change the **app-feature** field to **hos_system_app**, so that the signed application is a system application. +Change the **app-feature** field to **hos_system_app** in the **UnsgnedReleasedProfileTemplate.json** file in [developtools_hapsigner](https://gitee.com/openharmony/developtools_hapsigner/tree/master/dist). Then, the signed application is a system application. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelogs-wantAgent.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-wantAgent.md similarity index 87% rename from en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelogs-wantAgent.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-wantAgent.md index a060017598caf758524179f7fa4ee836ee5f6fec..0700c6585be1ac90b3371ba7b230ef821a4d43ee 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelogs-wantAgent.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-wantAgent.md @@ -1,6 +1,4 @@ -# ChangeLog of JS API Changes in the WantAgent - -This document describes the WantAgent API changes in OpenHarmony 3.2.9.1 SP8 when compared with OpenHarmony 3.2.8.1. +# WantAgent JS API Changelog ## cl.url.1 Trigger API Changes trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: Callback): void ; @@ -9,7 +7,7 @@ This API has been deleted, because some functions have not been implemented. You trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: AsyncCallback): void -**Change Impacts** +**Change Impact** Released JS APIs are affected. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. @@ -71,7 +69,7 @@ function getWantAgentCallback(err, data) { // getUid callback function triggerCallback(err, data) { if(err) { - console.info('getUid failed!' + err.code + err.message); + console.info('getUid failed!' + JSON.stringify(err.code) + JSON.stringify(err.message)); } else { console.info('getUid ok!' + JSON.stringify(data)); } @@ -79,12 +77,12 @@ function getWantAgentCallback(err, data) { try { WantAgent.trigger(wantAgent, triggerInfo, triggerCallback); } catch(err) { - console.info('getUid failed!' + err.code + err.message); + console.info('getUid failed!' + JSON.stringify(err.code) + JSON.stringify(err.message)); } } try{ WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); } catch(err){ - console.info('getWantAgent failed!' + err.code + err.message); + console.info('getWantAgent failed!' + JSON.stringify(err.code) + JSON.stringify(err.message)); } ``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelog-web.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-web.md similarity index 96% rename from en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelog-web.md rename to en/release-notes/changelogs/v3.2-beta4/changelogs-web.md index c9bccbb9f588c2ed237f73516a27d10effeded39..a754808f32c35ceab510e8a87150f9ed858b3c48 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelog-web.md +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-web.md @@ -1,7 +1,5 @@ # Web Subsystem ChangeLog -This document describes the web API changes in OpenHarmony 3.2.9.1 SP8 when compared with OpenHarmony 3.2.8.1. - ## cl.web.1 Deletion of Unnecessary Error Codes APIs in the webviewController component of the web subsystem are changed: diff --git a/en/release-notes/changelogs/v3.2-beta4/changelogs-wifi.md b/en/release-notes/changelogs/v3.2-beta4/changelogs-wifi.md new file mode 100644 index 0000000000000000000000000000000000000000..f2cd5ba5068c702016f1469cddac6810e3921cf8 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta4/changelogs-wifi.md @@ -0,0 +1,115 @@ +# Wi-Fi Subsystem Changelog + + +## cl.wifi.1 Change of System APIs and APIs of Version 9 +Moved all system APIs and APIs of version 9 from **@ohos.wifi.d.ts** to the newly added **@ohos.wifiManager.d.ts**, and added error code description. The **@ohos.wifi.d.ts** APIs do not support error code handling. + +To use these APIs, import the **@ohos.wifiManager.d.ts** module as follows: + +import wifiManager from '@ohos.wifiManager'; + + +**Change Impact** + +System APIs and APIs of version 9 are affected. To use these APIs, import **@ohos.wifiManager** as follows: + +import wifiManager from '@ohos.wifiManager'; + +Other APIs are not affected. + + +**Key API/Component Changes** + +| Class| API Type| Declaration| Change Type| +| -- | -- | -- | -- | +| wifi | namespace | declare namespace wifi | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function enableWifi(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function disableWifi(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function scan(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function getScanResults(): Promise<Array<WifiScanInfo>> | Changed from **getScanInfos** to **getScanResults** and moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function getScanResults(callback: AsyncCallback<Array<WifiScanInfo>>): void | Changed from **getScanInfos** to **getScanResults** and moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function getScanResultsSync():  Array<[WifiScanInfo]> | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function addCandidateConfig(config: WifiDeviceConfig): Promise<number> | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function addCandidateConfig(config: WifiDeviceConfig, callback: AsyncCallback<number>): void | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function removeCandidateConfig(networkId: number): Promise<void> | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function removeCandidateConfig(networkId: number, callback: AsyncCallback<void>): void | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function addUntrustedConfig(config: WifiDeviceConfig): Promise<boolean> | Deleted| +| wifi | method | function addUntrustedConfig(config: WifiDeviceConfig, callback: AsyncCallback<boolean>): void | Deleted| +| wifi | method | function removeUntrustedConfig(config: WifiDeviceConfig): Promise<boolean> | Deleted| +| wifi | method | function removeUntrustedConfig(config: WifiDeviceConfig, callback: AsyncCallback<boolean>): void | Deleted| +| wifi | method | function getCandidateConfigs():  Array<[WifiDeviceConfig]> | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function connectToCandidateConfig(networkId: number): void | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function connectToNetwork(networkId: number): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function connectToDevice(config: WifiDeviceConfig): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function disconnect(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function reassociate(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function reconnect(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function disableNetwork(netId: number): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function removeAllNetwork(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function removeDevice(id: number): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function enableHotspot(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function disableHotspot(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function setHotspotConfig(config: HotspotConfig): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function getP2pLocalDevice(): Promise<WifiP2pDevice> | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function getP2pLocalDevice(callback: AsyncCallback<WifiP2pDevice>): void | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function getP2pGroups(): Promise<Array<WifiP2pGroupInfo>> | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function getP2pGroups(callback: AsyncCallback<Array<WifiP2pGroupInfo>>): void | Moved to **@ohos.wifiManager.d.ts**| +| wifi | method | function createGroup(config: WifiP2PConfig): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function removeGroup(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function p2pConnect(config: WifiP2PConfig): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function p2pCancelConnect(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function startDiscoverDevices(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function stopDiscoverDevices(): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function deletePersistentGroup(netId: number): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | method | function setDeviceName(devName: string): void | Moved to **@ohos.wifiManager.d.ts**, with the return value changed to **void**| +| wifi | interface | export interface WifiEapConfig | Moved to **@ohos.wifiManager.d.ts**| +| wifi | enum | export enum EapMethod | Moved to **@ohos.wifiManager.d.ts**| +| wifi | enum | export enum Phase2Method | Moved to **@ohos.wifiManager.d.ts**| +| wifi | interface | export interface WifiDeviceConfig | Added with the **eapConfig** parameter and moved to **@ohos.wifiManager.d.ts**| +| wifi | interface | export interface IpConfig | Added with the **prefixLength** parameter and moved to **@ohos.wifiManager.d.ts**| +| wifi | interface | export interface WifiInfoElem | Moved to **@ohos.wifiManager.d.ts**| +| wifi | enum | export enum WifiChannelWidth | Moved to **@ohos.wifiManager.d.ts**| +| wifi | interface | export interface WifiScanInfo | Added with the **centerFrequency0**, **centerFrequency1**, and **infoElems** parameters and moved to **@ohos.wifiManager.d.ts**| +| wifi | enum | export enum WifiSecurityType | Added with four encryption types and moved to **@ohos.wifiManager.d.ts**| +| wifi | interface | export interface WifiLinkedInfo | Added with the **MacType** parameter and moved to **@ohos.wifiManager.d.ts**| + + +**Adaptation Guide** + +The following uses **getLinkedInfo** as an example: + +``` +import wifiManager from '@ohos.wifiManager' + +wifiManager.getLinkedInfo((err, data) => { + if (err) { + console.error("get linked info error"); + return; + } + console.info("get linked info: " + JSON.stringify(data)); +}); + +wifiManager.getLinkedInfo().then(data => { + console.info("get linked info: " + JSON.stringify(data)); +}).catch(error => { + console.info("get linked info error"); +}); + +``` + +## cl.wifiext.1 Change of System APIs and APIs of Version 9 + +Moved all system APIs and APIs of version 9 from **@ohos.wifiext.d.ts** to the newly added **@ohos.wifiManagerExt.d.ts**, and added error code description. + +To use these APIs, import the **@ohos.wifiManagerExt.d.ts** module as follows: + +import wifiManagerExt from '@ohos.wifiManagerExt'; + + +**Change Impact** + +System APIs and APIs of version 9 are affected. Import **@ohos.wifiManagerExt** and use it together with **wifiManager**. + +import wifiManagerExt from '@ohos.wifiManagerExt'; + +Other APIs are not affected. diff --git a/en/release-notes/changelogs/v3.2-beta5/Readme-EN.md b/en/release-notes/changelogs/v3.2-beta5/Readme-EN.md new file mode 100644 index 0000000000000000000000000000000000000000..fb9d008aee389972cd00926b4fad6d66b408bb05 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/Readme-EN.md @@ -0,0 +1,27 @@ +# Readme + +- [Ability framework](changelogs-ability.md) +- [Account subsystem](changelogs-account_os_account.md) +- [ArkUI development framework](changelogs-arkui.md) +- [Multimedia subsystem - camera](changelogs-camera-sync.md) +- [Common library subsystem - container](changelogs-container.md) +- [Distributed data management](changelogs-distributeddatamgr.md) +- [File management subsystem](changelogs-filemanagement.md) +- [Input method framework](changelogs-inputmethod-framworks.md) +- [File management subsystem - MediaLibrary](changelogs-mediaLibrary.md) +- [Multimedia subsystem](changelogs-multimedia.md) +- [Communication subsystem - NFC](changelogs-nfc.md) +- [Common event and notification subsystem](changelogs-notification.md) +- Location subsystem + - [ohos.geoLocationManager](changelogs-ohos-geoLocationManager.md) + - [ohos.geoLocation](changelogs-ohos-geolocation.md) + - [system.geolocation](changelogs-system-geolocation.md) +- [Upload and download](changelogs-request.md) +- [Resource scheduler subsystem](changelogs-resourceschedule.md) +- [Security subsystem](changelogs-security.md) +- [Telephony subsystem](changelogs-telephony.md) +- [Time service](changelogs-time.md) +- [Common library subsystem - URL](changelogs-url.md) +- [User IAM subsystem](changelogs-useriam.md) +- [Window manager subsystem](changelogs-window.md) + diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelog-x-x.md b/en/release-notes/changelogs/v3.2-beta5/changelog-x-x.md similarity index 88% rename from en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelog-x-x.md rename to en/release-notes/changelogs/v3.2-beta5/changelog-x-x.md index 3ac3e83268d2ac247676cd313d5b5e45d195ea2b..dcc7cd9aabb636ed248b5a37383410d4218b346f 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.9.1/changelog-x-x.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelog-x-x.md @@ -1,31 +1,26 @@ -# *Example* Subsystem ChangeLog +# *Example* Subsystem Changelog -Changes that affect contract compatibility of the last version should be described in the ChangeLog. The changes include but are not limited to those related to API names, parameters, return values, required permissions, call sequence, enumerated values, configuration parameters, and paths. The last version can be an LTS, release, beta, or monthly version, or the like. Contract compatibility, also called semantic compatibility, means that the original program behavior should remain consistent over versions. +Changes that affect contract compatibility of the last version should be described in the changelog. The changes include but are not limited to those related to API names, parameters, return values, required permissions, call sequence, enumerated values, configuration parameters, and paths. The last version can be an LTS, release, beta, or monthly version, or the like. Contract compatibility, also called semantic compatibility, means that the original program behavior should remain consistent over versions. ## cl.subsystemname.x xxx Function Change (Example: DeviceType Attribute Change or Camera Permission Change. Use a short description.) -Add the number **cl.*subsystemname*.*x*** before each change title, where **cl** is the abbreviation of ChangeLog, *subsystemname* is the standard English name of the subsystem, and *x* indicates the change sequence number (starting from 1 in ascending order). - +Add the number **cl.*subsystemname*.*x*** before each change title, where **cl** is the abbreviation of changelog, *subsystemname* is the standard English name of the subsystem, and *x* indicates the change sequence number (starting from 1 in ascending order). Describe the changes in terms of functions. Example: *n* and *m* of the *a* function are changed. Developers need to adapt their applications based on the change description. - If there is a requirement or design document corresponding to the change, attach the requirement number or design document number in the description. -**Change Impacts** +**Change Impact** Describe whether released APIs (JS or native APIs) are affected or API behavior is changed. - Describe whether available applications are affected, that is, whether an adaptation is required for building the application code in the SDK environment of the new version. **Key API/Component Changes** List the API/component changes involved in the function change. -**Adaptation Guide (Optional)** +**Adaptation Guide** Provide guidance for developers on how to adapt their application to the changes to be compatible with the new version. - Example: - Change parameter *n* to *m* in the *a* file. ``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-ability.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-ability.md similarity index 80% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-ability.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-ability.md index 7bac43bac44302e751f466896946d345a5ed90f9..6117462498c03b872b83d1cde479be6b2f094a01 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-ability.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-ability.md @@ -1,15 +1,13 @@ -# Ability Subsystem Changelog - -Compared with OpenHarmony 3.2 Beta4, OpenHarmony 3.2.10.1(MR) has the following API changes in the ability subsystem: +# Ability Framework Changelog ## cl.ability.1 API Migration The **requestPermissionsFromUser** API of **UIAbilityContext** is migrated from the ability subsystem to the security subsystem. Previously, the permission popup was implemented based on **UIAbility**, which used the **startAbilityForResult** API of **UIAbilityContext** to return the permission authorization result to the caller. Therefore, **requestPermissionsFromUser** was temporarily placed in **UIAbilityContext**. The permission popup is now implemented based on **ServiceExtensionAbility**, which no longer requires **startAbilityForResult** of **UIAbilityContext**. Therefore, **requestPermissionsFromUser** is migrated to the security subsystem. -You need to adapt your application. +You need to adapt your application based on the following information. -**Change Impact** + **Change Impact** JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. @@ -50,7 +48,7 @@ onWindowStageCreate() { ## cl.ability.2 Deletion of Deprecated APIs in API Version 9 -In the [Ability Exception Rectification](../OpenHarmony_3.2.8.3/changelogs-ability.md) document, some APIs in API version 9 have been marked as deprecated. According to API specifications of OpenHarmony, these APIs should be deleted. +In the **Ability Exception Rectification** document, some APIs in API version 9 have been marked as deprecated. According to API specifications of OpenHarmony, these APIs should be deleted. **Change Impact** @@ -112,10 +110,6 @@ APIs or attributes are deleted: - @ohos.wantAgent.d.ts - **TriggerInfo** and **WantAgentInfo** are deleted. Use the classes with the same name in **@ohos.app.ability.wantAgent.d.ts**. - - - - **Adaptation Guide** As mentioned above, only several APIs have their names changed in terms of, for example, the registration callbacks (**registerAbilityLifecycleCallback**, **unregisterAbilityLifecycleCallback**, **registerEnvironmentCallback**, and **unregisterEnvironmentCallback**) and connection and disconnection **ServiceExtensionAbility** (**connectAbility**, **connectAbilityWithAccount**, and **disconnectAbility**). For such APIs, replace their names with those of their corresponding new APIs in the lifecycle callbacks. @@ -135,3 +129,40 @@ import Ability from '@ohos.app.ability.UIAbility'; ``` In addition, exception handling is needed. For details, see the API reference for the new APIs. + +## cl.ability.3 RestartFlag Attribute Names Changed and Unsupported Attribute Deleted in appRecovery + +In the **appRecovery** API, the enum names of **RestartFlag** are changed from **NO_RESTART** upon a specific fault to **RESTART** upon a specific fault. +The **CPP_CRASH_NO_RESTART** enum is deleted. + +**Change Impact** + +If your application uses the **CPP_CRASH_NO_RESTART**, **JS_CRASH_NO_RESTART**, or **APP_FREEZE_NO_RESTART** attribute in versions earlier than 3.2.10.6, its behavior will change after an upgrade to 3.2.10.6. + +**Key API/Component Changes** + +**RestartFlag** 9+ + +Before change + +| Name | Value | Description | +| --------------------- | ------ | -------------------------------- | +| ALWAYS_RESTART | 0 | The application is restarted in all cases. | +| CPP_CRASH_NO_RESTART | 0x0001 | The application is **not restarted** in the case of CPP_CRASH. | +| JS_CRASH_NO_RESTART | 0x0002 | The application is **not restarted** in the case of JS_CRASH. | +| APP_FREEZE_NO_RESTART | 0x0004 | The application is **not restarted** in the case of APP_FREEZE.| +| NO_RESTART | 0xFFFF | The application is not restarted in any case. | + +After change + +| Name | Value | Description | +| ----------------------- | ------ | ------------------------------ | +| ALWAYS_RESTART | 0 | The application is restarted in all cases. | +| CPP_CRASH_NO_RESTART | NA | **Deleted.** The restart in this scenario is not supported.| +| RESTART_WHEN_JS_CRASH | 0x0001 | The application is **restarted** in the case of JS_CRASH. | +| RESTART_WHEN_APP_FREEZE | 0x0002 | The application is **restarted** in the case of APP_FREEZE.| +| NO_RESTART | 0xFFFF | The application is not restarted in any case. | + +**Adaptation Guide** + +Perform adaptation based on the new semantics. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-account_os_account.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-account_os_account.md similarity index 100% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-account_os_account.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-account_os_account.md diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-arkui.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-arkui.md similarity index 73% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-arkui.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-arkui.md index 8b4e22b93cf9d6124ac0ac1082ad903fb25ba11d..f4262ae286c279a79b30a657e24faea35b3c7fac 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-arkui.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-arkui.md @@ -102,7 +102,7 @@ N/A 1. Explicitly declare the data type for state variables decorated by state decorators. 2. If a state variable decorated by a state decorator uses the **Date** object, change it to a regular variable – a variable not decorated by any decorator. 3. Adapt the **@State**, **@Provide**, **@Link**, and **@Consume** decorated variables based on the following code snippet so that they do not use the **Length(string|number|Resource)**, **ResourceStr(string|Resource)**, and **ResourceColor(string|number|Color|Resource)** types: - + ```ts // Incorrect: @State message: ResourceStr = $r('app.string.hello') @@ -214,4 +214,121 @@ N/A To change these variables from the parent component, use the API provided by the **LocalStorage** (such as the **set** API) to assign values to them. -2. For details about how to use **@ObjectLink**, see [@Observed and @ObjectLink](../../../application-dev/quick-start/arkts-observed-and-objectlink.md). +2. For details about how to use **@ObjectLink**, see @ObjectLink. + +## cl.LocalStorage.1 Return Type Change of the get API + +Changed the return type from **get\(propName: string): T** to **get\(propName: string): T | undefined**. + +**Change Impact** + + +None + +## cl.arkui.LocalStorage.2 Mandatory/Optional Change of the newValue Parameter in setOrCreate +**Change Impact** + +API declaration before change: +```js +setOrCreate(propName: string, newValue?: T): boolean +``` +API declaration after change: +```js +setOrCreate(propName: string, newValue: T): boolean +``` +The **newValue** parameter becomes mandatory. +If it is not specified when an application calls the API, the build will fail after the SDK is replaced. + +**Adaptation Guide** + +```js +let storage = new LocalStorage(); +storage.setOrCreate('propA', 'hello'); +``` +## cl.arkui.LocalStorage.3 link Parameter and Return Type Changes +**Change Impact** + +API declaration before change: +```js +link(propName: string, linkUser?: T, subscribersName?: string): T +``` +API declaration after change: +```js +link(propName: string): SubscribedAbstractProperty +``` +1. The second and third parameters of the **link** API are reserved for internal use by the framework. Therefore, the API is changed to contain only one parameter. +2. The return type **T** is changed to **SubscribedAbstractProperty**. + +**Adaptation Guide** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let linA = storage.link("PropA"); +linA.set(50); +``` + +## cl.arkui.LocalStorage.4 setAndLink Parameter and Return Type Changes +**Change Impact** + +API declaration before change: +```js +setAndLink(propName: string, defaultValue: T, linkUser?: T, subscribersName?: string): T +``` +API declaration after change: +```js +setAndLink(propName: string, defaultValue: T): SubscribedAbstractProperty +``` +1. The third and fourth parameters of the **setAndLink** API are reserved for internal use by the framework. Therefore, the API is changed to contain two parameters. +2. The return type **T** is changed to **SubscribedAbstractProperty**. + +**Adaptation Guide** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let linA = storage.setAndLink("PropA", "48") +linA.set(50); +``` + +## cl.arkui.LocalStorage.5 prop Parameter and Return Type Changes +**Change Impact** + +API declaration before change: +```js +prop(propName: string, propUser?: T, subscribersName?: string): T +``` +API declaration after change: +```js +prop(propName: string): SubscribedAbstractProperty +``` +1. The second and third parameters of the **prop** API are reserved for internal use by the framework. Therefore, the API is changed to contain only one parameter. +2. The return type **T** is changed to **SubscribedAbstractProperty**. + +**Adaptation Guide** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let propA = storage.prop("PropA"); +propA.set(51); // one-way sync +``` + +## cl.arkui.LocalStorage.6 setAndProp Parameter and Return Type Changes +**Change Impact** + +API declaration before change: +```js +setAndProp(propName: string, defaultValue: T, propUser?: T, subscribersName?: string): T +``` +API declaration after change: +```js +setAndProp(propName: string, defaultValue: S): SubscribedAbstractProperty +``` +1. The third and fourth parameters of the **setAndProp** API are reserved for internal use by the framework. Therefore, the API is changed to contain two parameters. +2. The return type **T** is changed to **SubscribedAbstractProperty**. + +**Adaptation Guide** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let propA = storage.setAndProp("PropA", "48"); +propA.set(51); // one-way sync +``` \ No newline at end of file diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-camera-sync.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-camera-sync.md similarity index 93% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-camera-sync.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-camera-sync.md index c20c9e4c50f8de7ba2c8a0323f19d2000e4007ad..ef66b7500c4b5fccde024c10c95beeca5b6cbd5d 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.3/changelogs-camera-sync.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-camera-sync.md @@ -1,18 +1,16 @@ -# Multimedia Subsystem ChangeLog - -Compared with OpenHarmony 3.2 Beta4, OpenHarmony3.2.10.3 has the following changes in APIs of the camera component in the multimedia subsystem. +# Multimedia Subsystem Changelog ## cl.subsystemname.1 Camera API Changed 1. All the APIs of the camera component are changed to system APIs in the API version 9. 2. Some functional APIs are added and some others are deprecated to: -- Improve the usability of camera APIs. -- Help you quickly understand camera APIs and use them for development. -- Facilitate expansion of framework functions in later versions, and reduce coupling between framework modules. +Improve the usability of camera APIs. +Help you quickly understand camera APIs and use them for development. +Facilitate expansion of framework functions in later versions, and reduce coupling between framework modules. You need to refer to the following change description to adapt your application. -**Change Impacts** +**Change Impact** JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. @@ -57,7 +55,7 @@ JS APIs in API version 9 are affected. Your application needs to adapt these API **Adaptation Guide** -In addition to the new APIs and deprecated APIs, you need to adapt your application to the changed APIs. +In addition to new APIs and deprecated APIs, you need to adapt your application to changed APIs. In Beta4 and later versions, the following APIs are changed. @@ -135,388 +133,388 @@ In Beta4 and later versions, the following APIs are changed. 1. Changed the return modes of the **getCameraManager** API in the camera module from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getCameraManager(context: Context, callback: AsyncCallback): void** and **getCameraManager(context: Context): Promise** are changed to **getCameraManager(context: Context): CameraManager**. - The sample code is as follows: + The code snippet is as follows: ``` let cameraManager = camera.getCameraManager(context); ``` - + 2. Changed the return modes of the **getSupportedCameras** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getSupportedCameras(callback: AsyncCallback>): void** and **getSupportedCameras(): Promise>** are changed to **getSupportedCameras(): Array**. - The sample code is as follows: + The code snippet is as follows: ``` let cameras = cameraManager.getSupportedCameras(); ``` - + 3. Changed the return modes of the **getSupportedOutputCapability** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getSupportedOutputCapability(camera: CameraDevice, callback: AsyncCallback): void** and **getSupportedOutputCapability(camera: CameraDevice): Promise** are changed to **getSupportedOutputCapability(camera: CameraDevice): CameraOutputCapability**. - The sample code is as follows: - + The code snippet is as follows: + ``` let cameraDevice = cameras[0]; let CameraOutputCapability = cameraManager.getSupportedOutputCapability(cameraDevice); ``` - + 4. Changed the return modes of the **createCameraInput(camera: CameraDevice)** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createCameraInput(camera: CameraDevice, callback: AsyncCallback): void** and **createCameraInput(camera: CameraDevice): Promise** are changed to **createCameraInput(camera: CameraDevice): CameraInput**. - The sample code is as follows: - + The code snippet is as follows: + ``` let cameraDevice = cameras[0]; let cameraInput = cameraManager.createCameraInput(cameraDevice); ``` - + 5. Changed the return modes of the **createCameraInput(position: CameraPosition, type: CameraType)** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createCameraInput(position: CameraPosition, type: CameraType, callback: AsyncCallback): void** and **createCameraInput(position: CameraPosition, type: CameraType): Promise** are changed to **createCameraInput(position: CameraPosition, type: CameraType): CameraInput**. - The sample code is as follows: - + The code snippet is as follows: + ``` let cameraDevice = cameras[0]; let position = cameraDevice.cameraPosition; let type = cameraDevice.cameraType; let cameraInput = cameraManager.createCameraInput(position, type); ``` - + 6. Changed the return modes of the **createPreviewOutput** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createPreviewOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void** and **createPreviewOutput(profile: Profile, surfaceId: string): Promise** are changed to **createPreviewOutput(profile: Profile, surfaceId: string): PreviewOutput**. - The sample code is as follows: - + The code snippet is as follows: + ``` let profile = cameraoutputcapability.previewProfiles[0]; let previewOutput = cameraManager.createPreviewOutput(profile, surfaceId); ``` - + 7. Changed the return modes of the **createPhotoOutput** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createPhotoOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void** and **createPhotoOutput(profile: Profile, surfaceId: string): Promise** are changed to **createPhotoOutput(profile: Profile, surfaceId: string): PhotoOutput**. - The sample code is as follows: - + The code snippet is as follows: + ``` let profile = cameraoutputcapability.photoProfiles[0]; let photoOutput = cameraManager.createPhotoOutput(profile, surfaceId); ``` - + 8. Changed the return modes of the **createVideoOutput** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createVideoOutput(profile: VideoProfile, surfaceId: string, callback: AsyncCallback): void** and **createVideoOutput(profile: VideoProfile, surfaceId: string): Promise** are changed to **createVideoOutput(profile: VideoProfile, surfaceId: string): VideoOutput**. - The sample code is as follows: - + The code snippet is as follows: + ``` let profile = cameraoutputcapability.videoProfiles[0]; let videoOutput = cameraManager.createVideoOutput(profile, surfaceId); ``` - + 9. Changed the return modes of the **createMetadataOutput** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createMetadataOutput(metadataObjectTypes: Array, callback: AsyncCallback): void** and **createMetadataOutput(metadataObjectTypes: Array): Promise** are changed to **createMetadataOutput(metadataObjectTypes: Array): MetadataOutput**. - The sample code is as follows: - + The code snippet is as follows: + ``` let metadataObjectTypes = cameraoutputcapability.supportedMetadataObjectTypes; let metadataOutput = cameraManager.createMetadataOutput(metadataObjectTypes); ``` - + 10. Changed the return modes of the **createCaptureSession** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createCaptureSession(callback: AsyncCallback): void** and **createCaptureSession(): Promise** are changed to **createCaptureSession(): CaptureSession**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let captureSession = cameraManager.createCaptureSession(); - ``` + ``` 11. Changed the enum **CAMERA_TYPE_UNSPECIFIED** of **CameraType** to **CAMERA_TYPE_DEFAULT**. 12. Changed the return value type of the **on** API in CameraInput from **CameraInputError** to **BusinessError**. Therefore, the original API **on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void** is changed to **on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let cameraDevice = cameras[0]; cameraInput.on('error', cameraDevice, (BusinessError) => { - + }) - ``` + ``` 13. Changed the return modes of the **beginConfig** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **beginConfig(callback: AsyncCallback): void** and **beginConfig(): Promise** are changed to **beginConfig(): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` captureSession.beginConfig(); - ``` + ``` 14. Changed the return modes of the **addInput** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **addInput(cameraInput: CameraInput, callback: AsyncCallback): void** and **addInput(cameraInput: CameraInput): Promise** are changed to **addInput(cameraInput: CameraInput): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` captureSession.addInput(cameraInput); - ``` + ``` 15. Changed the return modes of the **removeInput** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **removeInput(cameraInput: CameraInput, callback: AsyncCallback): void** and **removeInput(cameraInput: CameraInput): Promise** are changed to **removeInput(cameraInput: CameraInput): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` captureSession.removeInput(cameraInput); - ``` + ``` 16. Changed the return modes of the **addOutput** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **addOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void** and **addOutput(cameraOutput: CameraOutput): Promise** are changed to **addOutput(cameraOutput: CameraOutput): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` captureSession.addOutput(previewOutput); - ``` + ``` 17. Changed the return modes of the **removeOutput** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **removeOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void** and **removeOutput(cameraOutput: CameraOutput): Promise** are changed to **removeOutput(cameraOutput: CameraOutput): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` captureSession.removeOutput(previewOutput); - ``` + ``` 18. Changed the return modes of the **hasFlash** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **hasFlash(callback: AsyncCallback): void** and **hasFlash(): Promise** are changed to **hasFlash(): boolean**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let status = captureSession.hasFlash(); - ``` + ``` 19. Changed the return modes of the **isFlashModeSupported** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **isFlashModeSupported(flashMode: FlashMode, callback: AsyncCallback): void** and **isFlashModeSupported(flashMode: FlashMode): Promise** are changed to **isFlashModeSupported(flashMode: FlashMode): boolean**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let status = captureSession.isFlashModeSupported(camera.FlashMode.FLASH_MODE_AUTO); - ``` + ``` 20. Changed the return modes of the **getFlashMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getFlashMode(callback: AsyncCallback): void** and **getFlashMode(): Promise** are changed to **getFlashMode(): FlashMode**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let flashMode = captureSession.getFlashMode(); - ``` + ``` 21. Changed the return modes of the **isExposureModeSupported** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **isExposureModeSupported(aeMode: ExposureMode, callback: AsyncCallback): void** and **isExposureModeSupported(aeMode: ExposureMode): Promise** are changed to **isExposureModeSupported(aeMode: ExposureMode): boolean**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let isSupported = captureSession.isExposureModeSupported(camera.ExposureMode.EXPOSURE_MODE_LOCKED); - ``` + ``` 22. Changed the return modes of the **getExposureMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getExposureMode(callback: AsyncCallback): void** and **getExposureMode(): Promise** are changed to **getExposureMode(): ExposureMode**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let exposureMode = captureSession.getExposureMode(); - ``` + ``` 23. Changed the return modes of the **setExposureMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setExposureMode(aeMode: ExposureMode, callback: AsyncCallback): void** and **setExposureMode(aeMode: ExposureMode): Promise** are changed to **setExposureMode(aeMode: ExposureMode): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` captureSession.setExposureMode(camera.ExposureMode.EXPOSURE_MODE_LOCKED); - ``` + ``` 24. Changed the return modes of the **getMeteringPoint** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getMeteringPoint(callback: AsyncCallback): void** and **getMeteringPoint(): Promise** are changed to **getMeteringPoint(): Point**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let exposurePoint = captureSession.getMeteringPoint(); - ``` + ``` 25. Changed the return modes of the **setMeteringPoint** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setMeteringPoint(point: Point, callback: AsyncCallback): void** and **setMeteringPoint(point: Point): Promise** are changed to **setMeteringPoint(point: Point): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let Point2 = {x: 2, y: 2}; captureSession.setMeteringPoint(Point2); - ``` + ``` 26. Changed the return modes of the **getExposureBiasRange** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getExposureBiasRange(callback: AsyncCallback>): void** and **getExposureBiasRange(): Promise>** are changed to **getExposureBiasRange(): Array**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let biasRangeArray = captureSession.getExposureBiasRange(); - ``` + ``` 27. Changed the return modes of the **setExposureBias** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setExposureBias(exposureBias: number, callback: AsyncCallback): void** and **setExposureBias(exposureBias: number): Promise** are changed to **setExposureBias(exposureBias: number): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let exposureBias = biasRangeArray[0]; captureSession.setExposureBias(exposureBias); - ``` + ``` 28. Changed the return modes of the **getExposureValue** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getExposureValue(callback: AsyncCallback): void** and **getExposureValue(): Promise** are changed to **getExposureValue(): number**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let exposureValue = captureSession.getExposureValue(); - ``` + ``` 29. Changed the return modes of the **isFocusModeSupported** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **isFocusModeSupported(afMode: FocusMode, callback: AsyncCallback): void** and **isFocusModeSupported(afMode: FocusMode): Promise** are changed to **isFocusModeSupported(afMode: FocusMode): boolean**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let status = captureSession.isFocusModeSupported(camera.FocusMode.FOCUS_MODE_AUTO); - ``` + ``` 30. Changed the return modes of the **getFocusMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getFocusMode(callback: AsyncCallback): void** and **getFocusMode(): Promise** are changed to **getFocusMode(): FocusMode**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let afMode = captureSession.getFocusMode(); - ``` + ``` 31. Changed the return modes of the **setFocusMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setFocusMode(afMode: FocusMode, callback: AsyncCallback): void** and **setFocusMode(afMode: FocusMode): Promise** are changed to **setFocusMode(afMode: FocusMode): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` captureSession.setFocusMode(camera.FocusMode.FOCUS_MODE_AUTO); - ``` + ``` 32. Changed the return modes of the **setFocusPoint** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setFocusPoint(point: Point, callback: AsyncCallback): void** and **setFocusPoint(point: Point): Promise** are changed to **setFocusPoint(point: Point): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let Point2 = {x: 2, y: 2}; captureSession.setFocusPoint(Point2); - ``` + ``` 33. Changed the return modes of the **getFocusPoint** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getFocusPoint(callback: AsyncCallback): void** and **getFocusPoint(): Promise** are changed to **getFocusPoint(): Point**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let point = captureSession.getFocusPoint(); - ``` + ``` 34. Changed the return modes of the **getFocalLength** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getFocalLength(callback: AsyncCallback): void** and **getFocalLength(): Promise** are changed to **getFocalLength(): number**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let focalLength = captureSession.getFocalLength(); - ``` + ``` 35. Changed the return modes of the **getZoomRatioRange** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getZoomRatioRange(callback: AsyncCallback>): void** and **getZoomRatioRange(): Promise>** are changed to **getZoomRatioRange(): Array**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let zoomRatioRange = captureSession.getZoomRatioRange(); - ``` + ``` 36. Changed the return modes of the **getZoomRatio** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getZoomRatio(callback: AsyncCallback): void** and **getZoomRatio(): Promise** are changed to **getZoomRatio(): number**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let zoomRatio = captureSession.getZoomRatio(); - ``` + ``` 37. Changed the return modes of the **setZoomRatio** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setZoomRatio(zoomRatio: number, callback: AsyncCallback): void** and **setZoomRatio(zoomRatio: number): Promise** are changed to **setZoomRatio(zoomRatio: number): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let zoomRatio = zoomRatioRange[0]; captureSession.setZoomRatio(zoomRatio); - ``` + ``` 38. Changed the return modes of the **isVideoStabilizationModeSupported** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode, callback: AsyncCallback): void** and **isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): Promise** are changed to **isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): boolean**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let isSupported = captureSession.isVideoStabilizationModeSupported(camera.VideoStabilizationMode.OFF); - ``` + ``` 39. Changed the return modes of the **getActiveVideoStabilizationMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getActiveVideoStabilizationMode(callback: AsyncCallback): void** and **getActiveVideoStabilizationMode(): Promise** are changed to **getActiveVideoStabilizationMode(): VideoStabilizationMode**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let vsMode = captureSession.getActiveVideoStabilizationMode(); - ``` + ``` 40. Changed the return modes of the **setVideoStabilizationMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setVideoStabilizationMode(mode: VideoStabilizationMode, callback: AsyncCallback): void** and **setVideoStabilizationMode(mode: VideoStabilizationMode): Promise** are changed to **setVideoStabilizationMode(mode: VideoStabilizationMode): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` captureSession.setVideoStabilizationMode(camera.VideoStabilizationMode.OFF); - ``` + ``` 41. Changed the **on(type:'error') callback** type in CaptureSession from **ErrorCallback** to **ErrorCallback**. Therefore, the original API **on(type: 'error', callback: ErrorCallback): void** is changed to **on(type: 'error', callback: ErrorCallback): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` captureSession.on('error', (BusinessError) => { - + }) - ``` + ``` 42. Changed the **on(type:'error') callback** type in PreviewOutput, from **ErrorCallback** to **ErrorCallback**. Therefore, the original API **on(type: 'error', callback: ErrorCallback): void** is changed to **on(type: 'error', callback: ErrorCallback): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` previewOutput.on('error', (BusinessError) => { - + }) - ``` + ``` 43. Changed the return modes of the **isMirrorSupported** API in PhotoOutput from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **isMirrorSupported(callback: AsyncCallback): void** and **isMirrorSupported(): Promise** are changed to **isMirrorSupported(): boolean**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` let isSupported = photoOutput.isMirrorSupported(); - ``` + ``` 44. Changed the **on(type:'error') callback** type in PhotoOutput, from **ErrorCallback** to **ErrorCallback**. Therefore, the original API **on(type: 'error', callback: ErrorCallback): void** is changed to **on(type: 'error', callback: ErrorCallback): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` PhotoOutput.on('error', (BusinessError) => { - + }) - ``` + ``` 45. Changed the **on(type:'error') callback** type in VideoOutput, from **ErrorCallback** to **ErrorCallback**. Therefore, the original API **on(type: 'error', callback: ErrorCallback): void** is changed to **on(type: 'error', callback: ErrorCallback): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` VideoOutput.on('error', (BusinessError) => { - + }) - ``` + ``` 46. Changed the **on(type:'error') callback** type in MetadataOutput, from **ErrorCallback** to **ErrorCallback**. Therefore, the original API **on(type: 'error', callback: ErrorCallback): void** is changed to **on(type: 'error', callback: ErrorCallback): void**. - The sample code is as follows: + The code snippet is as follows: - ``` + ``` MetadataOutput.on('error', (BusinessError) => { - + }) - ``` \ No newline at end of file + ``` \ No newline at end of file diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-container.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-container.md new file mode 100644 index 0000000000000000000000000000000000000000..6bd06001584f34addcbec3f81a80d47d482e7ffe --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-container.md @@ -0,0 +1,21 @@ +# Common Library Subsystem Changelog + +## cl.commonlibrary.1 Error Code and Information Change +The error codes and information returned by APIs of the **ArrayList**, **List**, **LinkedList**, **Stack**, **Queue**, **Deque**, **PlainArray**, **LightWeightMap**, **LightWeightSet**, **HashMap**, **HashSet**, **TreeMap**, and **TreeSet** classes are changed. + +For details about the changed error codes, see [Utils Error Codes](../../../application-dev/reference/errorcodes/errorcode-utils.md). + +No adaptation is required for applications developed using these APIs. + +**Key API/Component Changes** +Error code information is redefined for APIs in these classes and marked using **'@throws'** in the *.d.ts file of the corresponding module. +The sample code is as follows: +**ArrayList** class before the change: +constructor(); +**ArrayList** class after the change: +@throws { BusinessError } 10200012 - The ArrayList's constructor cannot be directly invoked. +constructor(); + +**Change Impact** + +No impact. diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-distributeddatamgr.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-distributeddatamgr.md new file mode 100644 index 0000000000000000000000000000000000000000..20f6121d2cc72d776f490cafb627128dec59fb3c --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-distributeddatamgr.md @@ -0,0 +1,168 @@ +# Distributed Data Management Subsystem JS API Changelog + +## cl.distributeddatamgr.1 API Change +Changed the APIs in **kv_store** of the distributed data management subsystem: + +Changed the **createKVManager()** implementation from asynchronous mode to synchronous mode because the execution duration is fixed and short. + +Before change:
**createKVManager(config: KVManagerConfig): Promise\;**
**createKVManager(config: KVManagerConfig, callback: AsyncCallback): void;**
After change:
**createKVManager(config: KVManagerConfig): KVManager;** + +You need to adapt your application. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.distributedKVStore | distributedKVStore | function createKVManager(config: KVManagerConfig): Promise\; | Deleted | +| @ohos.distributedKVStore | distributedKVStore | function createKVManager(config: KVManagerConfig): KVManager; | Changed | + + +**Adaptation Guide** + +The following illustrates how to call **createKVManager** to create a **KVManager** object. + +Stage model: + +```ts +import AbilityStage from '@ohos.application.Ability' +let kvManager; +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("MyAbilityStage onCreate") + let context = this.context + const kvManagerConfig = { + context: context, + bundleName: 'com.example.datamanagertest', + } + try { + kvManager = distributedKVStore.createKVManager(kvManagerConfig); + } catch (e) { + console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`); + } + } +} +``` + +FA model: + +```ts +import featureAbility from '@ohos.ability.featureAbility' +let kvManager; +let context = featureAbility.getContext() +const kvManagerConfig = { + context: context, + bundleName: 'com.example.datamanagertest', +} +try { + kvManager = distributedKVStore.createKVManager(kvManagerConfig); +} catch (e) { + console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`); +} +``` + +## cl.distributeddatamgr.2 Move of getRdbStoreV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts +Moved **getRdbStoreV9()** from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts, and renamed it **getRdbStore()**. + +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +APIs: + +```ts +function getRdbStoreV9(context: Context, config: StoreConfigV9, version: number, callback: AsyncCallback): void; +function getRdbStoreV9(context: Context, config: StoreConfigV9, version: number): Promise; +``` +Moved the above APIs from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts**. +``` +function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback): void; +function getRdbStore(context: Context, config: StoreConfig): Promise; +``` + +**Adaptation Guide** + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Change the names of the **getRdbStore()** APIs. + +## cl.distributeddatamgr.3 Move of deleteRdbStoreV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts + +Moved **deleteRdbStoreV9()** from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts, and renamed it **deleteRdbStore()**. + +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +APIs: +```ts +function deleteRdbStoreV9(context: Context, name: string, callback: AsyncCallback): void; +function deleteRdbStoreV9(context: Context, name: string): Promise; +``` +Moved the above APIs from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts**. +``` +function deleteRdbStore(context: Context, name: string, callback: AsyncCallback): void; +function deleteRdbStore(context: Context, name: string): Promise; +``` + +**Adaptation Guide** + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Change the names of the **deleteRdbStoreV9()** APIs. + +## cl.distributeddatamgr.4 Move of StoreConfigV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +Moved **StoreConfigV9** from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts** and renamed it **StoreConfig**. + +**Adaptation Guide** + + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Change the **StoreConfigV9** in APIs. + +## cl.distributeddatamgr.5 Move of enum SecurityLevel from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +Moved **enum SecurityLevel** from **ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts**. + +**Adaptation Guide** + +Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + +## cl.distributeddatamgr.6 Mover of RdbStoreV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +Moved **RdbStoreV9** from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts** and renamed it **RdbStore**. + +**Adaptation Guide** + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Change **RdbStoreV9** in relevant APIs. + +## cl.distributeddatamgr.7 Move of class RdbPredicatesV9 from ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +Moved the class **RdbPredicatesV9** from **ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts** and renamed it **RdbPredicates**. + +**Adaptation Guide** + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Change **RdbPredicatesV9** in the relevant APIs. + +## cl.distributeddatamgr.8 Move of ResultSetV9 from api/@ohos.data.relationalStore.d.ts to @ohos.data.relationalStore.d.ts +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +Moved **ResultSetV9** from **api/data/rdb/resultSet.d.ts** to **@ohos.data.relationalStore.d.ts** and renamed it **ResultSet**. + +**Adaptation Guide** + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Obtain the **ResultSetV9** instance only by using **getRdbStoreV9**. After modifications are made according to cl.distributeddatamgr.2, the code can automatically adapt to **ResultSet**. + diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-filemanagement.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-filemanagement.md new file mode 100644 index 0000000000000000000000000000000000000000..5e8d6ff199e2f3786489708028e9e3744d3e3530 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-filemanagement.md @@ -0,0 +1,145 @@ +# File Management Subsystem Changelog + +## cl.filemanagement.1 environment Module Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **environment** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **environment** module supports error code processing. See [Adaptation Guide](../v3.2-beta4/changelogs-filemanagement.md) for more details. + +**Key API/Component Changes** + +Before the change, **environment** was imported from **@ohos.environment**: + +```js +import environment from '@ohos.environment'; +``` + +Now, **environment** is imported from **@ohos.file.environment**: + +```js +import environment from '@ohos.file.environment'; +``` + +## cl.filemanagement.2 securityLabel Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **securityLabel** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **securityLabel** module supports error code processing. See [Adaptation Guide](../v3.2-beta4/changelogs-filemanagement.md) for more details. + +**Key API/Component Changes** + +Before the change, **securityLabel** was imported from **@ohos.securityLabel**: + +```js +import securityLabel from '@ohos.securityLabel'; +``` + +Now, **securityLabel** is imported from **@ohos.file.securityLabel**: + +```js +import securityLabel from '@ohos.file.securityLabel'; +``` + +## cl.filemanagement.3 fs Change + +Changed the **ino** attribute type of **Stat** under **fs**. + +**Change Impact** + +The **ino** attribute type is changed from number to BigInt, to adapt to the **inode** range of all types of files in the file system. + +**Key API/Component Changes** + +The type of the **ino** attribute of **Stat** is changed from number to BigInt. + +## cl.filemanagement.4 fileAccess Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **fileAccess** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **fileAccess** module supports error code processing. See [Adaptation Guide](../v3.2-beta4/changelogs-filemanagement.md) for more details. + +**Key API/Component Changes** + +Before the change, **fileAccess** was imported from **@ohos.data.fileAccess**: + +```js +import fileAccess from '@ohos.data.fileAccess'; +``` + +Now, **fileAccess** is imported from **@ohos.file.fileAccess**: + +```js +import fileAccess from '@ohos.file.fileAccess'; +``` + +## cl.filemanagement.5 fileExtensionInfo Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **fileExtensionInfo** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **fileExtensionInfo** module supports error code processing. See [Adaptation Guide](../v3.2-beta4/changelogs-filemanagement.md) for more details. + +**Key API/Component Changes** + +Before the change, **fileExtensionInfo** was imported from **@ohos.fileExtensionInfo**: + +```js +import fileExtensionInfo from '@ohos.fileExtensionInfo'; +``` + +Now, **fileExtensionInfo** is imported from **@ohos.file.fileExtensionInfo**: + +```js +import fileExtensionInfo from '@ohos.file.fileExtensionInfo'; +``` + +## cl.filemanagement.6 storageStatistics Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **fileExtensionInfo** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **storageStatistics** module supports error code processing. See [Adaptation Guide](../v3.2-beta4/changelogs-filemanagement.md) for more details. + +**Key API/Component Changes** + +Before the change, **storageStatistics** was imported from **@ohos.storageStatistics**: + +```js +import storageStatistics from '@ohos.storageStatistics'; +``` + +Now, **storageStatistics** is imported from **@ohos.file.storageStatistics**: + +```js +import storageStatistics from '@ohos.file.storageStatistics'; +``` + +## cl.filemanagement.7 volumeManager Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **fileExtensionInfo** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **volumeManager** module supports error code processing. See [Adaptation Guide](../v3.2-beta4/changelogs-filemanagement.md) for more details. + +**Key API/Component Changes** + +Before the change, **volumeManager** was imported from **@ohos.volumeManager**: + +```js +import volumeManager from '@ohos.volumeManager'; +``` + +Now, **volumeManager** is imported from **@ohos.file.volumeManager**: + +```js +import volumeManager from '@ohos.file.volumeManager'; +``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-inputmethod-framworks.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-inputmethod-framworks.md similarity index 65% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-inputmethod-framworks.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-inputmethod-framworks.md index 3318c618bd3cb511da78865aa85a779c689673fb..b8dc285044dc94ad02ba7cc17ea70005e1f282da 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-inputmethod-framworks.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-inputmethod-framworks.md @@ -4,12 +4,12 @@ The following modules do not comply with the OpenHarmony API file naming rules. Therefore, they are modified in API version 9 and later. -**Change Impacts** - -The SDK after the change is incompatible with the earlier versions. Therefore, adaptation is required for applications developed in earlier versions so that they can be properly built with the SDK in the new version. - -**Key API/Component Changes** - + **Change Impacts** + + The SDK after the change is incompatible with the earlier versions. Therefore, adaptation is required for applications developed in earlier versions so that they can be properly built with the SDK in the new version. + + **Key API/Component Changes** + | Module| File Name Before Change| File Name After Change| |------|--------------|--------------| | Input method framework module| @ohos.inputmethod.d.ts |@ohos.inputMethod.d.ts | @@ -17,15 +17,14 @@ The SDK after the change is incompatible with the earlier versions. Therefore, a | Input method ExtentionAbility module| @ohos.inputmethodextensionability.d.ts | @ohos.InputMethodExtensionAbility.d.ts | | Input method ExtentionContext module|@ohos.inputmethodextensioncontext.d.ts | @ohos.InputMethodExtensionContext.d.ts | | Input method subtype module| @ohos.inputMethodSubtype.d.ts | @ohos.InputMethodSubtype.d.ts | - -**Adaptation Guide** - -In the application code, change the name of the d.ts file following **import** to the new file name, which complies with the UpperCamelCase or lowerCamelCase style. - -Example: - + + **Adaptation Guide** + + In the application code, change the name of the d.ts file following **import** to the new file name, which complies with the UpperCamelCase or lowerCamelCase style. + Example: + ```js import inputMethodEngine from '@ohos.inputMethodEngine'; ``` - + diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-mediaLibrary.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-mediaLibrary.md similarity index 51% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-mediaLibrary.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-mediaLibrary.md index b3e49188e7630f1f6a5cd7c1d43f6d85d302b2d8..459adbacf8a02fbb45ef82ee6bb6dba706633258 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-mediaLibrary.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-mediaLibrary.md @@ -1,33 +1,64 @@ -# File Subsystem Changelog +# File Management Subsystem Changelog ## cl.file.1 mediaLibrary APIs Changed -All APIs provided by the mediaLibrary module of the multimedia subsystem are deprecated. +The **MediaLibrary** class of the multimedia component is replaced by the **FilePicker** class. **Change Impact** -All APIs described in [mediaLibrary](../../../application-dev/reference/apis/js-apis-medialibrary.md) are deprecated. Third-party applications can only select and save files in the public directory by calling the APIs of [FilePicker](../../../application-dev/reference/apis/js-apis-file-picker.md). -For applications developed based on earlier versions, pay attention to the changes of APIs. +For applications developed based on earlier versions, pay attention to the changes of APIs. **FilePicker** is a system application preset in OpenHarmony. You can use it to select and save files. **Key API/Component Changes** -The table below lists the **mediaLibrary** APIs that can be substituted by the **FilePicker** APIs. +The APIs of **MediaLibrary**, located in **@ohos.multimedia.medialibrary**, are deprecated. The **FilePicker** class, located in [@ohos.file.picker](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.file.picker.d.ts) is used. | Module | Method/Attribute/Enum/Constant | Change Type| | ------------------------- | ------------------------------------------------------------ | -------- | +| medialibrary | **function** getMediaLibrary(): MediaLibrary; | Deprecated | | medialibrary | **function** getMediaLibrary(context: Context): MediaLibrary; | Deprecated | | medialibrary | **function** getFileAssets(options: MediaFetchOptions, callback: AsyncCallback\): void | Deprecated | | medialibrary | **function** getFileAssets(options: MediaFetchOptions): Promise\ | Deprecated | +| medialibrary | **function** on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\): void | Deprecated | +| medialibrary | **function** off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\): void | Deprecated | | medialibrary | **function** createAsset(mediaType: MediaType, displayName: string, relativePath: string, callback: AsyncCallback\): void | Deprecated | | medialibrary | **function** createAsset(mediaType: MediaType, displayName: string, relativePath: string): Promise\ | Deprecated | +| medialibrary | **function** deleteAsset(uri: string): Promise\ | Deprecated | +| medialibrary | **function** deleteAsset(uri: string, callback: AsyncCallback\): void | Deprecated | | medialibrary | **function** getPublicDirectory(type: DirectoryType, callback: AsyncCallback\): void | Deprecated | | medialibrary | **function** getPublicDirectory(type: DirectoryType): Promise\ | Deprecated | -| medialibrary | **function** release(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** getAlbums(options: MediaFetchOptions, callback: AsyncCallback\\>): void | Deprecated | +| medialibrary | **function** getAlbums(options: MediaFetchOptions): Promise\\> | Deprecated | +| medialibrary | **function** release(callback: AsyncCallback\): void | Deprecated | | medialibrary | **function** release(): Promise\ | Deprecated | +| medialibrary | **function** storeMediaAsset(option: MediaAssetOption, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** storeMediaAsset(option: MediaAssetOption): Promise\ | Deprecated | +| medialibrary | **function** startImagePreview(images: Array\, index: number, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** startImagePreview(images: Array\, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** startImagePreview(images: Array\, index?: number): Promise\ | Deprecated | +| medialibrary | **function** startMediaSelect(option: MediaSelectOption, callback: AsyncCallback\\>): void | Deprecated | +| medialibrary | **function** startMediaSelect(option: MediaSelectOption): Promise\\> | Deprecated | +| medialibrary | **function** getActivePeers(): Promise\\>; | Deprecated | +| medialibrary | **function** getActivePeers(callback: AsyncCallback\\>): void; | Deprecated | +| medialibrary | **function** getAllPeers(): Promise\\>; | Deprecated | +| medialibrary | **function** FileAsset.isDirectory(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.isDirectory():Promise\ | Deprecated | +| medialibrary | **function** FileAsset.commitModify(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.commitModify(): Promise\ | Deprecated | | medialibrary | **function** FileAsset.open(mode: string, callback: AsyncCallback\): void | Deprecated | | medialibrary | **function** FileAsset.open(mode: string): Promise\ | Deprecated | | medialibrary | **function** FileAsset.close(fd: number, callback: AsyncCallback\): void | Deprecated | | medialibrary | **function** FileAsset.close(fd: number): Promise\ | Deprecated | +| medialibrary | **function** FileAsset.getThumbnail(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.getThumbnail(size: Size, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.getThumbnail(size?: Size): Promise\ | Deprecated | +| medialibrary | **function** FileAsset.favorite(isFavorite: boolean, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.favorite(isFavorite: boolean): Promise\ | Deprecated | +| medialibrary | **function** FileAsset.isFavorite(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.isFavorite():Promise\ | Deprecated | +| medialibrary | **function** FileAsset.trash(isTrash: boolean, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.trash(isTrash: boolean): Promise\ | Deprecated | +| medialibrary | **function** FileAsset.isTrash(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.isTrash():Promise\ | Deprecated | | medialibrary | **function** FetchFileResult.getCount(): number | Deprecated | | medialibrary | **function** FetchFileResult.isAfterLast(): boolean | Deprecated | | medialibrary | **function** FetchFileResult.close(): void | Deprecated | @@ -41,232 +72,45 @@ The table below lists the **mediaLibrary** APIs that can be substituted by the * | medialibrary | **function** FetchFileResult.getPositionObject(index: number): Promise\ | Deprecated | | medialibrary | **function** FetchFileResult.getAllObject(callback: AsyncCallback\\>): void | Deprecated | | medialibrary | **function** FetchFileResult.getAllObject(): Promise\\> | Deprecated | +| medialibrary | **function** Album.commitModify(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** Album.commitModify(): Promise\ | Deprecated | | medialibrary | **function** Album.getFileAssets(options: MediaFetchOptions, callback: AsyncCallback\): void | Deprecated | | medialibrary | **function** Album.getFileAssets(options?: MediaFetchOptions): Promise\ | Deprecated | +| medialibrary | **enum** DeviceType | Deprecated | | medialibrary | **enum** FileKey | Deprecated | | medialibrary | **enum** DirectoryType | Deprecated | | medialibrary | **enum** MediaType | Deprecated | +| medialibrary | **interface** PeerInfo | Deprecated | +| medialibrary | **interface** Size | Deprecated | | medialibrary | **interface** MediaFetchOptions | Deprecated | +| medialibrary | **interface** MediaAssetOption | Deprecated | +| medialibrary | **interface** MediaSelectOption | Deprecated | | medialibrary | **interface** FileAsset | Deprecated | **Adaptation Guide** -**The following example shows how to use the mediaLibrary APIs to edit a file in the public directory:** - -1. Call **getMediaLibrary** to obtain a **mediaLibrary** instance. -2. Create a **MediaFetchOptions** object, and call **getFileAssets** to obtain files in the public directory. -3. Call the **FetchFileResult** APIs to obtain the file asset of the target file. -4. Call **fileAsset.open** to open the file and obtain the FD. -5. Call [fs.writeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#writesync) to edit the file through the FD. -6. After the edit, call **fileAsset.close** to close the FD of the file. -7. Call **fetchFileResult.close** to release the resources occupied by **getFileAssets**. -8. Call **release** to release the **mediaLibrary** instance. - -**Example** - -```js -import mediaLibrary from '@ohos.multimedia.mediaLibrary'; -import fs from '@ohos.file.fs'; - -async function example() { - try { - let context = getContext(this); - let media = mediaLibrary.getMediaLibrary(context); - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const fileAsset = await fetchFileResult.getFirstObject(); - console.info('mediaLibrary fileAsset displayName: ' + fileAsset.displayName); - let fd = await fileAsset.open('rw'); - console.info('mediaLibrary fileAsset open fd: ' + fd); - let writeLen = fs.writeSync(fd, 'hello, world'); - console.info('write data to file succeed and size is: ' + writeLen); - fileAsset.close(fd); - fetchFileResult.close(); - media.release(); - } catch (err) { - console.error('mediaLibrary fail, err: ' + err); - } -} -``` - -**The following example shows how to use the FilePicker APIs to edit a file in the public directory:** - -1. Obtain a **DocumentViewPicker** object. -2. Call **DocumentViewPicker.select** to select a file. -3. After a file is selected, a file URI is returned. -4. After the UI is returned from DocumentViewPicker, call [fs.openSync](../../../application-dev/reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. -5. Call [fs.writeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#writesync) to edit the file through the FD. -6. After the edit, call [fs.closeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#closesync) to close the FD. - -**Example** - -```js -import mediaLibrary from '@ohos.multimedia.mediaLibrary'; -import picker from '@ohos.file.picker'; -import fs from '@ohos.file.fs'; - -let uri; - -async function example() { - try { - let DocumentSelectOptions = new picker.DocumentSelectOptions(); - let documentPicker = new picker.DocumentViewPicker(); - documentPicker.select(DocumentSelectOptions).then((DocumentSelectResult) => { - console.info('DocumentViewPicker.select successfully, DocumentSelectResult uri: ' + JSON.stringify(DocumentSelectResult)); - uri = DocumentSelectResult[0]; - }).catch((err) => { - console.error('DocumentViewPicker.select failed with err: ' + err); - }); - } catch (err) { - console.error('DocumentViewPicker failed with err: ' + err); - } -} - -async function writeFile() { - try { - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); - console.info('DocumentViewPicker file fd: ' + file.fd); - let writeLen = fs.writeSync(file.fd, 'hello, world'); - console.info('write data to file succeed and size is: ' + writeLen); - fs.closeSync(file); - } catch (err) { - console.error('DocumentViewPicker fail, err: ' + err); - } -} -``` - -**The following example shows how to use the mediaLibrary APIs to create a file in the public directory:** - -1. Call **getMediaLibrary** to obtain a **mediaLibrary** instance. -2. Call **getPublicDirectory** to obtain the path of the public directory. -3. Call **createAsset** to create a file and obtain the file asset. -4. Call **fileAsset.open** to open the file and obtain the FD. -5. Call **fs.write** to edit the file through the FD. -6. After the edit, call **fileAsset.close** to close the FD. -7. Call **release** to release the **mediaLibrary** instance. - -**Example** +For example, refer to the code snippet below to call an API to select an image: ```js -import mediaLibrary from '@ohos.multimedia.mediaLibrary'; -import fs from '@ohos.file.fs'; - -async function example() { - try { - let context = getContext(this); - let media = mediaLibrary.getMediaLibrary(context); - let mediaType = mediaLibrary.MediaType.FILE; - let DIR_DOWNLOAD = mediaLibrary.DirectoryType.DIR_DOWNLOAD; - const path = await media.getPublicDirectory(DIR_DOWNLOAD); - const fileAsset = await media.createAsset(mediaType, 'test.txt', path); - console.info('mediaLibrary fileAsset displayName: ' + fileAsset.displayName); - let fd = await fileAsset.open('rw'); - console.info('mediaLibrary fileAsset open fd: ' + fd); - let writeLen = fs.writeSync(fd, 'hello, world'); - console.info('write data to file succeed and size is: ' + writeLen); - fileAsset.close(fd); - media.release(); - } catch (err) { - console.error('mediaLibrary fail, err: ' + err); - } -} -``` - -**The following example shows how to use the FilePicker APIs to create a file in the public directory:** - -1. Obtain a **DocumentViewPicker** object. -2. Call **DocumentViewPicker.save** to create and save an empty file. -3. After the file is saved, a file URI is returned. -4. After the UI is returned from DocumentViewPicker, call [fs.openSync](../../../application-dev/reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. -5. Call [fs.writeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#writesync) to edit the file through the FD. -6. After the edit, call [fs.closeSync](../../../application-dev/reference/apis/js-apis-file-fs.md#closesync) to close the FD. - -**Example** - -```js -import mediaLibrary from '@ohos.multimedia.mediaLibrary'; import picker from '@ohos.file.picker'; -import fs from '@ohos.file.fs'; - -let uri; async function example() { - try { - let DocumentSaveOptions = new picker.DocumentSaveOptions(); - DocumentSaveOptions.newFileNames = ['DocumentViewPicker01.txt']; - let documentPicker = new picker.DocumentViewPicker(); - documentPicker.save(DocumentSaveOptions).then((DocumentSaveResult) => { - console.info('DocumentViewPicker.save successfully, DocumentSaveResult uri: ' + JSON.stringify(DocumentSaveResult)); - uri = DocumentSaveResult[0]; - }).catch((err) => { - console.error('DocumentViewPicker.save failed with err: ' + err); - }); - } catch (err) { - console.error('DocumentViewPicker failed with err: ' + err); - } -} - -async function writeFile() { - try { - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); - console.info('DocumentViewPicker file fd: ' + file.fd); - let writeLen = fs.writeSync(file.fd, 'hello, world'); - console.info('write data to file succeed and size is: ' + writeLen); - fs.closeSync(file); - } catch (err) { - console.error('DocumentViewPicker fail, err: ' + err); - } + try { + let PhotoSelectOptions = new picker.PhotoSelectOptions(); + PhotoSelectOptions.MIMEType = picker.PhotoViewMIMETypes.IMAGE_TYPE; + PhotoSelectOptions.maxSelectNumber = 1; + let photoPicker = new picker.PhotoViewPicker(); + photoPicker.select(PhotoSelectOptions).then((PhotoSelectResult) => { + if (PhotoSelectResult !== undefined) { + console.info("PhotoViewPicker.select pass, PhotoSelectResult uri: " + JSON.stringify(PhotoSelectResult)); + } else { + console.error("PhotoViewPicker.select PhotoSelectResult is undefined"); + } + }).catch((err) => { + console.error("PhotoViewPicker.select fail, err: " + err); + }); + } catch (err) { + console.error("PhotoViewPicker fail, err: " + err); + } } ``` - -**Key API/Component Changes** - -The table below lists the mediaLibrary APIs that are not open to third-party applications due to function control. There are no substitute APIs for them. - -| Module | Method/Attribute/Enum/Constant | Change Type| -| ------------------------- | ------------------------------------------------------------ | -------- | -| medialibrary | **function** getMediaLibrary(): MediaLibrary; | Deprecated | -| medialibrary | **function** on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\): void | Deprecated | -| medialibrary | **function** off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\): void | Deprecated | -| medialibrary | **function** deleteAsset(uri: string): Promise\ | Deprecated | -| medialibrary | **function** deleteAsset(uri: string, callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** storeMediaAsset(option: MediaAssetOption, callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** storeMediaAsset(option: MediaAssetOption): Promise\ | Deprecated | -| medialibrary | **function** startImagePreview(images: Array\, index: number, callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** startImagePreview(images: Array\, callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** startImagePreview(images: Array\, index?: number): Promise\ | Deprecated | -| medialibrary | **function** startMediaSelect(option: MediaSelectOption, callback: AsyncCallback\\>): void | Deprecated | -| medialibrary | **function** startMediaSelect(option: MediaSelectOption): Promise\\> | Deprecated | -| medialibrary | **function** getActivePeers(): Promise\\>; | Deprecated | -| medialibrary | **function** getActivePeers(callback: AsyncCallback\\>): void; | Deprecated | -| medialibrary | **function** getAllPeers(): Promise\\>; | Deprecated | -| medialibrary | **function** FileAsset.isDirectory(callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** FileAsset.isDirectory():Promise\ | Deprecated | -| medialibrary | **function** FileAsset.commitModify(callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** FileAsset.commitModify(): Promise\ | Deprecated | -| medialibrary | **function** FileAsset.getThumbnail(callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** FileAsset.getThumbnail(size: Size, callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** FileAsset.getThumbnail(size?: Size): Promise\ | Deprecated | -| medialibrary | **function** FileAsset.favorite(isFavorite: boolean, callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** FileAsset.favorite(isFavorite: boolean): Promise\ | Deprecated | -| medialibrary | **function** FileAsset.isFavorite(callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** FileAsset.isFavorite():Promise\ | Deprecated | -| medialibrary | **function** FileAsset.trash(isTrash: boolean, callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** FileAsset.trash(isTrash: boolean): Promise\ | Deprecated | -| medialibrary | **function** FileAsset.isTrash(callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** FileAsset.isTrash():Promise\ | Deprecated | -| medialibrary | **function** getAlbums(options: MediaFetchOptions, callback: AsyncCallback\\>): void | Deprecated | -| medialibrary | **function** getAlbums(options: MediaFetchOptions): Promise\\> | Deprecated | -| medialibrary | **function** Album.commitModify(callback: AsyncCallback\): void | Deprecated | -| medialibrary | **function** Album.commitModify(): Promise\ | Deprecated | -| medialibrary | **enum** DeviceType | Deprecated | -| medialibrary | **interface** PeerInfo | Deprecated | -| medialibrary | **interface** Size | Deprecated | -| medialibrary | **interface** MediaAssetOption | Deprecated | -| medialibrary | **interface** MediaSelectOption | Deprecated | diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-multimedia.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-multimedia.md similarity index 95% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-multimedia.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-multimedia.md index 4b223c8ac73a16fceaa2002167640f8aeb94fabd..ffeb68c714639f07a5b53a0bacaca16be2aab81a 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-multimedia.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-multimedia.md @@ -2,7 +2,7 @@ All av_session APIs are changed to system APIs. -**Change Impacts** +**Change Impact** Non-system applications and applications without system API permission cannot call system APIs. @@ -10,7 +10,7 @@ Non-system applications and applications without system API permission cannot ca All APIs are changed to system APIs. The table below describes the APIs. -| API, Enumeration, or Variable| Type| Is System API| +| API/Enum/Variable| Type| Is System API| | -------- | -------- | ------- | | SessionToken | interface | Yes| | AVMetadata | interface | Yes| diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-nfc.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-nfc.md new file mode 100644 index 0000000000000000000000000000000000000000..d1693278786b3ebcb09e1bbb60e33177b7cec656 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-nfc.md @@ -0,0 +1,58 @@ +# Changelog of NFC JS APIs in the Communication Subsystem + +## cl.nfc.1 API Change +Deprecated some NFC JS APIs in API versions 6 to 8 because the APIs cannot throw error codes, and added new APIs in API version 9 instead. + +You need to adapt your application based on the following information. + + **Change Impact** + +The deprecated JS APIs in API versions 6 to 8 are affected. Your application needs to adapt new APIs so that it can properly implement functions in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enumeration/Constant | Change Type| +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | FeatureType | Deprecated | +| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | isSupported | Deprecated | +| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | hasHceCapability | Added | +| api/@ohos.nfc.controller.d.ts | nfcController | isNfcAvailable | Deprecated | +| api/@ohos.nfc.controller.d.ts | nfcController | openNfc | Deprecated | +| api/@ohos.nfc.controller.d.ts | nfcController | closeNfc | Deprecated | +| api/@ohos.nfc.controller.d.ts | nfcController | enableNfc | Added | +| api/@ohos.nfc.controller.d.ts | nfcController | disableNfc | Added | +| api/@ohos.nfc.tag.d.ts | tag | getNfcATag | Deprecated | +| api/@ohos.nfc.tag.d.ts | tag | getNfcBTag | Deprecated | +| api/@ohos.nfc.tag.d.ts | tag | getNfcFTag | Deprecated | +| api/@ohos.nfc.tag.d.ts | tag | getNfcVTag | Deprecated | +| api/@ohos.nfc.tag.d.ts | tag | getNfcA | Added | +| api/@ohos.nfc.tag.d.ts | tag | getNfcB | Added | +| api/@ohos.nfc.tag.d.ts | tag | getNfcF | Added | +| api/@ohos.nfc.tag.d.ts | tag | getNfcV | Added | +| api/tag/tagSession.d.ts | TagSession | getTagInfo | Deprecated | +| api/tag/tagSession.d.ts | TagSession | connectTag | Deprecated | +| api/tag/tagSession.d.ts | TagSession | reset | Deprecated | +| api/tag/tagSession.d.ts | TagSession | isTagConnected | Deprecated | +| api/tag/tagSession.d.ts | TagSession | setSendDataTimeout | Deprecated | +| api/tag/tagSession.d.ts | TagSession | getSendDataTimeout | Deprecated | +| api/tag/tagSession.d.ts | TagSession | sendData | Deprecated | +| api/tag/tagSession.d.ts | TagSession | getMaxSendLength | Deprecated | +| api/tag/tagSession.d.ts | TagSession | connect | Added | +| api/tag/tagSession.d.ts | TagSession | resetConnection | Added | +| api/tag/tagSession.d.ts | TagSession | isConnected | Added | +| api/tag/tagSession.d.ts | TagSession | setTimeout | Added | +| api/tag/tagSession.d.ts | TagSession | getTimeout | Added | +| api/tag/tagSession.d.ts | TagSession | transmit | Added | +| api/tag/tagSession.d.ts | TagSession | getMaxTransmitSize | Added | + +**Adaptation Guide** + +See the following: +[@ohos.nfc.cardEmulation (Standard NFC Card Emulation)](../../../application-dev/reference/apis/js-apis-cardEmulation.md) + +[@ohos.nfc.controller (Standard NFC)](../../../application-dev/reference/apis/js-apis-nfcController.md) + +[@ohos.nfc.tag (Standard NFC Tags)](../../../application-dev/reference/apis/js-apis-nfcTag.md) + +[tagSession (Standard NFC Tag Session)](../../../application-dev/reference/apis/js-apis-tagSession.md) +``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-notification.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-notification.md similarity index 91% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-notification.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-notification.md index 9a1113faab7fcf5329564939b5be571da88dec80..2a028d4b32b85c1f6894139df16cfa11d1f78c9a 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-notification.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-notification.md @@ -2,7 +2,7 @@ ## cl.notification.1 Deleting Deprecated APIs (Version 9) -In the [event notification exception handling rectification](../OpenHarmony_3.2.8.3/changelogs-notification.md), some APIs in API version 9 are marked as deprecated, and these APIs need to be deleted, according to OpenHarmony API specifications. +In the event notification exception handling rectification, some APIs in API version 9 are marked as deprecated, and these APIs need to be deleted, according to OpenHarmony API specifications. **Change Impacts** diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geoLocationManager.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geoLocationManager.md new file mode 100644 index 0000000000000000000000000000000000000000..fe1db611f384bf1550c0fa4583df6c9fd186d7e4 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geoLocationManager.md @@ -0,0 +1,107 @@ +# Location Subsystem Changelog + +## cl.location.1 API Migration from @ohos.geolocation.d.ts to @ohos.geoLocationManager.d.ts + +APIs in **@ohos.geolocation.d.ts** do not support throwing error codes. To support this function, all APIs in **@ohos.geolocation.d.ts** are migrated to the newly added **@ohos.geoLocationManager.d.ts** file, and corresponding error code description is added. + +To use APIs of the location subsystem, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + + +**Change Impact** + +All APIs of the location subsystem are affected. To ensure normal use of these APIs, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + +**Key API/Component Changes** + +| Class| API Type| Declaration| Change Type| +| -- | -- | -- | -- | +|geolocation| method | function on(type: 'locationChange', request: LocationRequest, callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'locationChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'locationServiceState', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'locationServiceState'** to **type: 'locationEnabledChange'**.| +|geolocation| method | function off(type: 'locationServiceState', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'locationServiceState'** to **type: 'locationEnabledChange'**.| +|geolocation| method | function on(type: 'cachedGnssLocationsReporting', request: CachedGnssLocationsRequest, callback: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'cachedGnssLocationsReporting'** to **type: 'cachedGnssLocationsChange'**.| +|geolocation| method | function off(type: 'cachedGnssLocationsReporting', callback?: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'cachedGnssLocationsReporting'** to **type: 'cachedGnssLocationsChange'**.| +|geolocation| method | function on(type: 'gnssStatusChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'gnssStatusChange'** to **type: 'satelliteStatusChange'**.| +|geolocation| method | function off(type: 'gnssStatusChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'gnssStatusChange'** to **type: 'satelliteStatusChange'**.| +|geolocation| method | function on(type: 'nmeaMessageChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'nmeaMessageChange'** to **type: 'nmeaMessage'**.| +|geolocation| method | function off(type: 'nmeaMessageChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'nmeaMessageChange'** to **type: 'nmeaMessage'**.| +|geolocation| method | function on(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'fenceStatusChange'** to **type: 'gnssFenceStatusChange'**.| +|geolocation| method | function off(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'fenceStatusChange'** to **type: 'gnssFenceStatusChange'**.| +|geolocation| method | function getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCurrentLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCurrentLocation(request?: CurrentLocationRequest): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getLastLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function getLastLocation(): Location**.| +|geolocation| method | function getLastLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function getLastLocation(): Location**.| +|geolocation| method | function isLocationEnabled(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationEnabled(): boolean**.| +|geolocation| method | function isLocationEnabled(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationEnabled(): boolean**.| +|geolocation| method | function requestEnableLocation(callback: AsyncCallback): void; | Deleted.| +|geolocation| method | function requestEnableLocation(): Promise; | Deleted.| +|geolocation| method | function enableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function enableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function disableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocation(): void**.| +|geolocation| method | function disableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocation(): void**.| +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function isGeoServiceAvailable(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isGeocoderAvailable(): boolean**.| +|geolocation| method | function isGeoServiceAvailable(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isGeocoderAvailable(): boolean**.| +|geolocation| method | function getCachedGnssLocationsSize(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCachedGnssLocationsSize(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function flushCachedGnssLocations(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function flushCachedGnssLocations(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function sendCommand(command: LocationCommand, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function sendCommand(command: LocationCommand): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function enableLocationMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableLocationMock(): void**.| +|geolocation| method | function enableLocationMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableLocationMock(): void**.| +|geolocation| method | function disableLocationMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocationMock(): void**.| +|geolocation| method | function disableLocationMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocationMock(): void**.| +|geolocation| method | function setMockedLocations(config: LocationMockConfig, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setMockedLocations(config: LocationMockConfig): void**.| +|geolocation| method | function setMockedLocations(config: LocationMockConfig): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setMockedLocations(config: LocationMockConfig): void**.| +|geolocation| method | function enableReverseGeocodingMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableReverseGeocodingMock(): void**.| +|geolocation| method | function enableReverseGeocodingMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableReverseGeocodingMock(): void**.| +|geolocation| method | function disableReverseGeocodingMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableReverseGeocodingMock(): void**.| +|geolocation| method | function disableReverseGeocodingMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableReverseGeocodingMock(): void**.| +|geolocation| method | function setReverseGeocodingMockInfo(mockInfos: Array, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setReverseGeocodingMockInfo(mockInfos: Array): void**.| +|geolocation| method | function setReverseGeocodingMockInfo(mockInfos: Array): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setReverseGeocodingMockInfo(mockInfos: Array): void**.| +|geolocation| method | function isLocationPrivacyConfirmed(type: LocationPrivacyType, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationPrivacyConfirmed(type: LocationPrivacyType): boolean**.| +|geolocation| method | function isLocationPrivacyConfirmed(type: LocationPrivacyType,): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationPrivacyConfirmed(type: LocationPrivacyType): boolean**.| +|geolocation| method | function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): void**.| +|geolocation| method | function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): void**.| +|geolocation| interface | SatelliteStatusInfo | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | CachedGnssLocationsRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeofenceRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | Geofence | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | ReverseGeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeoAddress | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | LocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | CurrentLocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | Location | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationRequestPriority | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationRequestScenario | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | GeoLocationErrorCode | Deprecated.| +|geolocation| enum | LocationPrivacyType | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationCommand | Migrated to **@ohos.geoLocationManager.d.ts**.| + + +**(Optional) Adaptation Guide** + +The following sample code shows how to call **enableLocation** in the new version: + + ```ts + import geoLocationManager from '@ohos.geoLocationManager'; + try { + geoLocationManager.enableLocation((err, data) => { + if (err) { + console.log('enableLocation: err=' + JSON.stringify(err)); + } + }); + } catch (err) { + console.error("errCode:" + err.code + ",errMessage:" + err.message); + } + ``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geolocation.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geolocation.md new file mode 100644 index 0000000000000000000000000000000000000000..aaa0ed72daf37764bbf4cc36a23b783799d2e6bb --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geolocation.md @@ -0,0 +1,92 @@ +# Location Subsystem Changelog + +## cl.location.1 API Migration from @ohos.geolocation.d.ts to @ohos.geoLocationManager.d.ts + +APIs in **@ohos.geolocation.d.ts** do not support throwing error codes. To support this function, all APIs in **@ohos.geolocation.d.ts** are migrated to the newly added **@ohos.geoLocationManager.d.ts** file, and corresponding error code description is added. + +To use APIs of the location subsystem, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + + +**Change Impact** + +All APIs of the location subsystem are affected. To ensure normal use of these APIs, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + +**Key API/Component Changes** + +| Class| API Type| Declaration| Change Type| +| -- | -- | -- | -- | +|geolocation| namespace | declare namespace geolocation| Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **namespace geoLocationManager**.| +|geolocation| method | function on(type: 'locationChange', request: LocationRequest, callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'locationChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'locationServiceState', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'locationServiceState', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'cachedGnssLocationsReporting', request: CachedGnssLocationsRequest, callback: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'cachedGnssLocationsReporting', callback?: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'gnssStatusChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'gnssStatusChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'nmeaMessageChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'nmeaMessageChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCurrentLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCurrentLocation(request?: CurrentLocationRequest): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getLastLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getLastLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function isLocationEnabled(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function isLocationEnabled(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function requestEnableLocation(callback: AsyncCallback): void; | Deleted.| +|geolocation| method | function requestEnableLocation(): Promise; | Deleted.| +|geolocation| method | function enableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function enableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function disableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function disableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function isGeoServiceAvailable(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function isGeoServiceAvailable(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCachedGnssLocationsSize(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCachedGnssLocationsSize(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function flushCachedGnssLocations(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function flushCachedGnssLocations(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function sendCommand(command: LocationCommand, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function sendCommand(command: LocationCommand): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | SatelliteStatusInfo | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | CachedGnssLocationsRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeofenceRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | Geofence | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | ReverseGeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeoAddress | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | LocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | CurrentLocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | Location | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationRequestPriority | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationRequestScenario | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | GeoLocationErrorCode | Deprecated.| +|geolocation| enum | LocationPrivacyType | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationCommand | Migrated to **@ohos.geoLocationManager.d.ts**.| + + +**(Optional) Adaptation Guide** + +The following sample code shows how to call **enableLocation** in the new version: + + ```ts + import geoLocationManager from '@ohos.geoLocationManager'; + try { + geoLocationManager.enableLocation((err, data) => { + if (err) { + console.log('enableLocation: err=' + JSON.stringify(err)); + } + }); + } catch (err) { + console.error("errCode:" + err.code + ",errMessage:" + err.message); + } + ``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-request.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-request.md similarity index 53% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-request.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-request.md index f5d0e2eb9849c362fc25c6c106c127aeacfdd471..d3e9b53e4d93fb4e6067a7485dbfa0925b2404d9 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-request.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-request.md @@ -1,31 +1,31 @@ # Upload and Download Subsystem Changelog -## cl.request.2 request API Change +## cl.request.2 Upload and Download API Change -Deleted the beta APIs in API version 9: - -1. function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback\): void; -2. function download(context: BaseContext, config: DownloadConfig): Promise\; -3. function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback\): void; -4. function upload(context: BaseContext, config: UploadConfig): Promise\; +- Deleted the beta APIs in API version 9: +1. function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void; +2. function download(context: BaseContext, config: DownloadConfig): Promise; +3. function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; +4. function upload(context: BaseContext, config: UploadConfig): Promise; **Change Impact** -The application developed based on an earlier version in the stage model needs to be adapted to the new APIs. Otherwise, the original service logic will be affected. +The application developed based on the Stage mode of earlier versions needs to be adapted. Otherwise, the service logic will be affected. **Key API/Component Changes** -| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| Module | Class | Method/Attribute/Enumeration/Constant | Change Type| |--------------|--------------|-------------------------------------------------------------------------------------------------------------------|------| -| ohos.request | request | function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback\): void; | Deleted | -| ohos.request | request | function download(context: BaseContext, config: DownloadConfig): Promise\; | Deleted | -| ohos.request | request | function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback\): void; | Deleted | -| ohos.request | request | function upload(context: BaseContext, config: UploadConfig): Promise\; | Deleted | +| ohos.request | request | function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void; | Deleted. | +| ohos.request | request | function download(context: BaseContext, config: DownloadConfig): Promise; | Deleted. | +| ohos.request | request | function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; | Deleted. | +| ohos.request | request | function upload(context: BaseContext, config: UploadConfig): Promise; | Deleted. | + **Adaptation Guide** -Call the new APIs. The following uses **downloadFile** as an example to show how it is called in the new version: +The following sample code shows how to call **downloadFile** in the new version: ```ts try { diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelog-resourceschedule.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-resourceschedule.md similarity index 99% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelog-resourceschedule.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-resourceschedule.md index 48da92c6fc824d0d4f799c21bf28906a1a784040..8df3e6671bd98eb04092412fd0c6e563268fb91d 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelog-resourceschedule.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-resourceschedule.md @@ -1,4 +1,4 @@ -# Resource Scheduler Subsystem ChangeLog +# Resource Scheduler Subsystem Changelog ## cl.resourceschedule.backgroundTaskManager Rectified the original APIs of **backgroundTaskManager** of the resource scheduler subsystem. All APIs of API version 9 in the **@ohos.backgroundTaskManager.d.ts** file are deleted, and the APIs of API version 9 in the **@ohos.resourceschedule.backgroundTaskManager.d.ts** file are used. The new APIs in API version 9 comply with the error code specifications. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelog-security.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-security.md similarity index 53% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelog-security.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-security.md index 4bd1acf87dcc5940947215d8c3dd3d459d0c49bc..94ef4335af23115d485ea58eb5ce28af9e4aedc9 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelog-security.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-security.md @@ -1,354 +1,354 @@ -# Security Subsystem ChangeLog +# Security Subsystem Changelog -## cl.security.1 Change of the setSeed API of Random from Asynchronous to Synchronous +## cl.security.1 Change of setSeed() from Asynchronous to Synchronous -**Change Impacts** +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -API prototype before the change: +API before the change: setSeed(seed : DataBlob, callback : AsyncCallback\) : void; setSeed(seed : DataBlob) : Promise\; -API prototype after the change: +API after the change: setSeed(seed : DataBlob) : void; **Adaptation Guide** -See the API adaptation guide of **setSeed** in the API reference: -[Crypto Framework - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cryptoFramework.md) +See **setSeed()** in the following: +[Crypto Framework](../../../application-dev/reference/apis/js-apis-cryptoFramework.md) -## cl.security.2 Migration of interface DataArray from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts -**Change Impacts** +## cl.security.2 Move of DataArray from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **interface DataArray** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **DataArray** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.3 Migration of interface EncodingFormat from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts -**Change Impacts** +## cl.security.3 Move of EncodingFormat from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **interface EncodingFormat** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **EncodingFormat** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.4 Migration of interface EncodingBlob from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts -**Change Impacts** +## cl.security.4 Move of EncodingBlob from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **interface EncodingBlob** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **EncodingBlob** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.5 Migration of interface CertChainData from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts -**Change Impacts** +## cl.security.5 Move of CertChainData from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **interface CertChainData** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **interface CertChainData** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.6 Migration of interface X509Cert from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts -**Change Impacts** +## cl.security.6 Move of X509Cert from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **interface X509Cert** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **X509Cert** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.7 Migration of function createX509Cert from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts -**Change Impacts** +## cl.security.7 Move of createX509Cert from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **function createX509Cert** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **createX509Cert** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.8 Migration of interface X509CrlEntry from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts. -**Change Impacts** +## cl.security.8 Move of X509CrlEntry from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts. +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **interface X509CrlEntry** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **X509CrlEntry** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.9 Migration of interface X509Crl from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts -**Change Impacts** +## cl.security.9 Move of X509Crl from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **interface X509Crl** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **X509Crl** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.10 Migration of function createX509Crl from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts -**Change Impacts** +## cl.security.10 Move of createX509Crl from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **function createX509Crl** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **createX509Crl** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.11 Migration of interface CertChainValidator from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts -**Change Impacts** +## cl.security.11 Move of CertChainValidator from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **interface CertChainValidator** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **CertChainValidator** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.12 Migration of function createCertChainValidator from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts -**Change Impacts** +## cl.security.12 Move of createCertChainValidator from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -Migrated **function createCertChainValidator** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. +Moved **createCertChainValidator** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. **Adaptation Guide** Import and use the new .d.ts file: import cryptoCert from '@ohos.security.cert'; -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.13 Change of the getPublicKey API of X509Cert from Asynchronous to Synchronous -**Change Impacts** +## cl.security.13 Change of getPublicKey() of X509Cert from Asynchronous to Synchronous +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -API prototype before the change: +API before the change: getPublicKey(callback : AsyncCallback\) : void; getPublicKey() : Promise\; -API prototype after the change: +API after the change: getPublicKey() : cryptoFramework.PubKey; **Adaptation Guide** -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.14 Change of the checkValidityWithDate API of X509Cert from Asynchronous to Synchronous -**Change Impacts** +## cl.security.14 Change of checkValidityWithDate of X509Cert from Asynchronous to Synchronous +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -API prototype before the change: +API before the change: checkValidityWithDate(date: string, callback : AsyncCallback\) : void; checkValidityWithDate(date: string) : Promise\; -API prototype after the change: +API after the change: checkValidityWithDate(date: string) : void; **Adaptation Guide** -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.15 Change of the getCertIssuer API of X509CrlEntry from Asynchronous to Synchronous -**Change Impacts** +## cl.security.15 Change of getCertIssuer of X509CrlEntry from Asynchronous to Synchronous +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -API prototype before the change: +API before the change: getCertIssuer(callback : AsyncCallback\) : void; getCertIssuer() : Promise\; -API prototype after the change: +API after the change: getCertIssuer() : DataBlob; **Adaptation Guide** -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.16 Change of the getRevocationDate API of X509CrlEntry from Asynchronous to Synchronous -**Change Impacts** +## cl.security.16 Change of getRevocationDate of X509CrlEntry from Asynchronous to Synchronous +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -API prototype before the change: +API before the change: getRevocationDate(callback : AsyncCallback\) : void; getRevocationDate() : Promise\; -API prototype after the change: +API after the change: getRevocationDate() : string; **Adaptation Guide** -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.17 Change of the isRevoked API of X509Crl from Asynchronous to Synchronous -**Change Impacts** +## cl.security.17 Change of isRevoked of X509Crl from Asynchronous to Synchronous +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -API prototype before the change: +API before the change: isRevoked(cert : X509Cert, callback : AsyncCallback\) : void; isRevoked(cert : X509Cert) : Promise\; -API prototype after the change: +API after the change: isRevoked(cert : X509Cert) : boolean; **Adaptation Guide** -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.18 Change of the getRevokedCert API of X509Crl from Asynchronous to Synchronous -**Change Impacts** +## cl.security.18 Change of getRevokedCert of X509Crl from Asynchronous to Synchronous +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -API prototype before the change: +API before the change: getRevokedCert(serialNumber : number, callback : AsyncCallback\) : void; getRevokedCert(serialNumber : number) : Promise\; -API prototype after the change: +API after the change: getRevokedCert(serialNumber : number) : X509CrlEntry; **Adaptation Guide** -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.19 Change of the getRevokedCertWithCert API of X509Crl from Asynchronous to Synchronous -**Change Impacts** +## cl.security.19 Change of getRevokedCertWithCert of X509Crl from Asynchronous to Synchronous +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -API prototype before the change: +API before the change: getRevokedCertWithCert(cert : X509Cert, callback : AsyncCallback\) : void; getRevokedCertWithCert(cert : X509Cert) : Promise\; -API prototype after the change: +API after the change: getRevokedCertWithCert(cert : X509Cert) : X509CrlEntry; **Adaptation Guide** -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) -## cl.security.20 Change of the getTbsInfo API of X509Crl from Asynchronous to Synchronous -**Change Impacts** +## cl.security.20 Change of getTbsInfo of X509Crl from Asynchronous to Synchronous +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. **Key API/Component Changes** -API prototype before the change: +API before the change: getTbsInfo(callback : AsyncCallback\) : void; getTbsInfo() : Promise\; -API prototype after the change: +API after the change: getTbsInfo() : DataBlob; **Adaptation Guide** -See the corresponding API adaptation guide in the API reference: -[Certificate - API Reference](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-cert.md) +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) ## cl.security.21 Support of No-Hash Signing Mode for HUKS -Before the change, the application passes **huks.HuksTag.HUKS_TAG_DIGEST = huks.HuksKeyDigest.HUKS_DIGEST_NONE** and HUKS uses **huks.HuksKeyDigest.HUKS_DIGEST_SHA256** for processing by default. After the change, the application passes **huks.HuksTag.HUKS_TAG_DIGEST = huks.HuksKeyDigest.HUKS_DIGEST_NONE** and HUKS does not perform digest processing by default. In this case, the service needs to perform the hash operation on the original data and then pass the hashed digest to HUKS for signing or signature verification. +Before the change, the application passes **huks.HuksTag.HUKS_TAG_DIGEST = huks.HuksKeyDigest.HUKS_DIGEST_NONE** and HUKS uses **huks.HuksKeyDigest.HUKS_DIGEST_SHA256** for processing by default. After the change, the application passes **huks.HuksTag.HUKS_TAG_DIGEST = huks.HuksKeyDigest.HUKS_DIGEST_NONE** and HUKS does not generate a digest by default. Instead, the service performs a hash operation on the original data and then passes a hashed digest to HUKS for signing or signature verification. -**Change Impacts** +**Change Impact** Behavior of released JavaScript APIs will be changed. The application needs to adapt these APIs so that the signing or signature verification result can be passed before and after the change. @@ -357,11 +357,11 @@ The application needs to adapt these APIs so that the signing or signature verif Released JavaScript APIs remain unchanged, but parameter sets passed to the APIs are changed. -The service uses the No-Hash signing mode, and needs to hash the original data and then pass the hashed digest to the signing or signature verification API of HUKS. In addition, the **huks.HuksTag.HUKS_TAG_DIGEST** parameter is set to **huks.HuksKeyDigest.HUKS_DIGEST_NONE**. +The service uses the No-Hash signing mode, and hashes the original data and then passes a hashed digest to the signing or signature verification API of HUKS. In addition, the **huks.HuksTag.HUKS_TAG_DIGEST** parameter is set to **huks.HuksKeyDigest.HUKS_DIGEST_NONE**. **Adaptation Guide** -Take signing as an example. The sample code is as follows: +The following uses signing as an example. ```js import huks from '@ohos.security.huks'; @@ -399,13 +399,13 @@ let signOptions = { huks.initSession(keyAlias, signOptions); ``` -For sample codes of other APIs, see [HUKS guidelines](../../../application-dev/security/huks-guidelines.md) and [HUKS APIs](../../../application-dev/reference/apis/js-apis-huks.md). +For for information about the sample code, see [HUKS Development](../../../application-dev/security/huks-guidelines.md) and [HUKS](../../../application-dev/reference/apis/js-apis-huks.md). -## cl.security.22 Support of Key Calculation Parameter Specification for HUKS During Key Usage +## cl.security.22 Support for Key Calculation Parameter Specifications During Key Usage -Before the change, all parameters for key calculation must be specified when the application generates a key. After the change, only mandatory parameters need to be specified when the application generates a key, and other parameters can be specified when the key is used. The application can specify key calculation parameters more flexibly. +Before the change, all parameters for key calculation must be specified when the application generates a key. After the change, only mandatory parameters need to be specified when the application generates a key, and other parameters can be passed in when the key is used. The application can specify key calculation parameters more flexibly. -**Change Impacts** +**Change Impact** Behavior of released JavaScript APIs will be changed. @@ -413,7 +413,7 @@ The application can specify only mandatory parameters when creating a key and sp **Key API/Component Changes** -Released JavaScript APIs remain unchanged, but parameter sets passed to the APIs are changed and parameters are classified into mandatory parameters and optional parameters. For details, see [HUKS guidelines](../../../application-dev/security/huks-guidelines.md). +Released JavaScript APIs remain unchanged, but parameter sets passed to the APIs are changed and parameters are classified into mandatory parameters and optional parameters. For details, see [HUKS Development](../../../application-dev/security/huks-guidelines.md). huks.generateKeyItem @@ -429,7 +429,7 @@ huks.finishSession **Adaptation Guide** -Take key generation as an example. The sample code is as follows: +The following uses the key generation process as an example. ```js let keyAlias = 'keyAlias'; @@ -472,4 +472,4 @@ try { } ``` -For sample codes of other APIs, see [HUKS guidelines](../../../application-dev/security/huks-guidelines.md) and [HUKS APIs](../../../application-dev/reference/apis/js-apis-huks.md). +For for information about the sample code, see [HUKS Development](../../../application-dev/security/huks-guidelines.md) and [HUKS](../../../application-dev/reference/apis/js-apis-huks.md). diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-system-geolocation.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-system-geolocation.md new file mode 100644 index 0000000000000000000000000000000000000000..70dc51c8a568783425dba3b5d56791a43274258f --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-system-geolocation.md @@ -0,0 +1,50 @@ +# Location Subsystem Changelog + +## cl.location.1 API Migration from @system.geolocation.d.ts to @ohos.geoLocationManager.d.ts + +APIs in **@system.geolocation.d.ts** do not support throwing error codes. To support this function, all APIs in **@system.geolocation.d.ts** are migrated to the newly added **@ohos.geoLocationManager.d.ts** file, and corresponding error code description is added. + +To use APIs of the location subsystem, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + + +**Change Impact** + +All APIs of the location subsystem are affected. To ensure normal use of these APIs, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + +**Key API/Component Changes** + +| Class| API Type| Declaration| Change Type| +| -- | -- | -- | -- | +|Geolocation| class | Geolocation | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager**.| +|Geolocation| interface | static getLocation(options?: GetLocationOption): void; | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.getCurrentLocation**.| +|Geolocation| interface | static getLocationType(options?: GetLocationTypeOption): void; | Deprecated.| +|Geolocation| interface | static subscribe(options: SubscribeLocationOption): void; | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.on#event:locationChange**.| +|Geolocation| interface | static unsubscribe(): void; | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.off#event:locationChange**.| +|Geolocation| interface | static getSupportedCoordTypes(): Array; | Deprecated.| +|| interface | GeolocationResponse| Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.Location**.| +|| interface | GetLocationOption | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.CurrentLocationRequest**.| +|| interface | GetLocationTypeResponse | Deprecated.| +|| interface | GetLocationTypeOption | Deprecated.| +|| interface | SubscribeLocationOption | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.LocationRequest**.| + + +**(Optional) Adaptation Guide** + +The following sample code shows how to call **enableLocation** in the new version: + + ```ts + import geoLocationManager from '@ohos.geoLocationManager'; + try { + geoLocationManager.enableLocation((err, data) => { + if (err) { + console.log('enableLocation: err=' + JSON.stringify(err)); + } + }); + } catch (err) { + console.error("errCode:" + err.code + ",errMessage:" + err.message); + } + ``` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-telephony.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-telephony.md similarity index 89% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-telephony.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-telephony.md index 63af2cfb5f1e316fd85236469dcc16ac9e51506e..222ae6bf97ebe7c9b9cacea29fba53436c73cb9d 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.6/changelogs-telephony.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-telephony.md @@ -5,15 +5,15 @@ ## cl.telephony.1 Radio Module API Change -### Changed the `isNrSupported` API in the radio module of the telephone subsystem: +### Changed the `isNrSupported` API in the radio module of the telephony subsystem: NR is a proper noun and must be capitalized. -You need to adapt your application. +You need to adapt your application based on the following information. -**Change Impacts** +**Change Impact** The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-time.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-time.md similarity index 100% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-time.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-time.md diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-url.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-url.md similarity index 92% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-url.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-url.md index c5f219a9dca53926c131a4bf36e17122e2b47cce..4dfc6cacb85bb40bc9f02dab6343a82d4dbf7691 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.1/changelogs-url.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-url.md @@ -1,9 +1,6 @@ # Common Library Subsystem Changelog -Compared with OpenHarmony 3.2 Beta4, OpenHarmony 3.2.10.1(MR) has the following API changes in the URL module of the common library subsystem. - ## cl.commonlibrary.1 URLParams Class Changes - The constructor function of the **URLParams** class in the URL module of the common library subsystem is changed. Specifically, **constructor(init?: string[][] | Record | string | URLSearchParams)** is changed to **constructor(init?: string[][] | Record | string | URLParams)**, and the parameter type is changed from **URLSearchParams** to **URLParams**. @@ -19,7 +16,7 @@ JS APIs in API version 9 are affected. Your application needs to adapt these API | Module | Class | Method/Attribute/Enum/Constant | Change Type| | :------------------------ | ------------------- | ------------------------------------------------------------ | -------- | | @ohos.url | URLParams | constructor(string[][] \| Record<string, string> \| string \| URLSearchParams) | Deleted | -| @ohos.url | URLParams | constructor(string[][] \| Record<string, string> \| string \| URLParams)| Changed +| @ohos.url | URLParams | constructor(string[][] \| Record<string, string> \| string \| URLParams)| Changed | **Adaptation Guide** @@ -39,14 +36,13 @@ try { } ``` ## cl.commonlibrary.2 URL Attribute Changes of URLParams Class APIs - The URL attributes of the URL module in the common library subsystem are changed. Specifically, the **searchParams: URLSearchParams** attribute is deprecated, and the **params: URLParams** attribute is added. You need to adapt your application. -**Change Impacts** + **Change Impacts** JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-useriam.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-useriam.md similarity index 60% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-useriam.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-useriam.md index a3abb3143332e234f4583eaffc95aed632cb5260..b081b93fe1433c2268715314a2bef6a746b8e18b 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-useriam.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-useriam.md @@ -1,10 +1,10 @@ -# User IAM Subsystem ChangeLog +# User IAM Subsystem Changelog -## cl.useriam.1 API9 Authentication Result Code Class Name Change +## cl.useriam.1 API9 Result Value Change -The name of the authentication result code class of user IAM API version 9 is changed from **ResultCode** to **UserAuthResultCode**. +Changed the return value **ResultCodeV9** to **UserAuthResultCode** for API9. -**Change Impacts** +**Change Impact** Applications developed based on earlier versions are not affected. For the applications developed from this version, the class name of the error code needs to be adapted. Otherwise, the service logic is affected. diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-window.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-window.md similarity index 98% rename from en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-window.md rename to en/release-notes/changelogs/v3.2-beta5/changelogs-window.md index b3514e82cca44c154a70b999e6cc62a54d47ff92..45f62272f6749f6822179648004f04623401a093 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.5/changelogs-window.md +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-window.md @@ -1,4 +1,4 @@ -# Window Subsystem ChangeLog +# Window Manager Subsystem Changelog ## cl.window.1 Change of Window Stage Lifecycle Listener Types