diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.0.32/changelogs-arkts.md b/en/release-notes/changelogs/OpenHarmony_5.0.0.32/changelogs-arkts.md index 83c464a3aa33868cfadf4e3b23e36243b2414544..c61516daf5598fdca4a2cf8161514dbba4890fc5 100644 --- a/en/release-notes/changelogs/OpenHarmony_5.0.0.32/changelogs-arkts.md +++ b/en/release-notes/changelogs/OpenHarmony_5.0.0.32/changelogs-arkts.md @@ -8,7 +8,7 @@ Public API **Reason for Change** -The constructors of the **TreeMap** and **TreeSet** classes support the input of a comparator, through which you can control the position to which an element is inserted in the binary tree. +The constructors of the **TreeMap** and **TreeSet** classes support the input of a comparator, through which you can control the position to which an element is inserted in the binary tree. When the **clear** API of **TreeMap** and **TreeSet** is called, the expected result is that only data is cleared. However, the actual result is that both the data and the passed-in comparator are cleared. As a result, when the API for inserting data is called again, the rules of the default comparator, rather than those of the passed-in comparator, are used. Consequently, the result does not meet the expectation. @@ -20,100 +20,98 @@ This change is a non-compatible change. It affects the sorting rule after **clea - Case 1: When a user passes in a comparator and calls the **clear** API of **TreeMap**, the comparator becomes invalid. - ``` - // Use comparator firstValue > secondValue to sort data in descending order. - let treeMap : TreeMap = new TreeMap((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); - treeMap.set("aa","3"); - treeMap.set("dd","1"); - treeMap.set("cc","2"); - treeMap.set("bb","4"); - let numbers = Array.from(treeMap.keys()) - for (let item of numbers) { - console.log("treeMap:" + item); // key: dd cc bb aa - } - treeMap.clear(); - treeMap.set("aa","3"); - treeMap.set("dd","1"); - treeMap.set("cc","2"); - treeMap.set("bb","4"); - numbers = Array.from(treeMap.keys()) - for (let item of numbers) { - console.log("treeMap:" + item); //key: aa bb cc dd - } - ``` +``` +// Use comparator firstValue > secondValue to sort data in descending order. +let treeMap : TreeMap = new TreeMap((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); +treeMap.set("aa","3"); +treeMap.set("dd","1"); +treeMap.set("cc","2"); +treeMap.set("bb","4"); +let numbers = Array.from(treeMap.keys()) +for (let item of numbers) { + console.log("treeMap:" + item); // key: dd cc bb aa +} +treeMap.clear(); +treeMap.set("aa","3"); +treeMap.set("dd","1"); +treeMap.set("cc","2"); +treeMap.set("bb","4"); +numbers = Array.from(treeMap.keys()) +for (let item of numbers) { + console.log("treeMap:" + item); //key: aa bb cc dd +} +``` - Case 2: When a user passes in a comparator and calls the **clear** API of **TreeSet**, the comparator becomes invalid. - ``` - let treeSet : TreeSet = new TreeSet((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); - treeSet.add("a"); - treeSet.add("c"); - treeSet.add("d"); - treeSet.add("b"); - let numbers = Array.from(treeSet.values()) - for (let item of numbers) { - console.log("TreeSet:" + item); // value: d c b a - } - treeSet.clear(); - treeSet.add("a"); - treeSet.add("c"); - treeSet.add("d"); - treeSet.add("b"); - numbers = Array.from(treeSet.values()) - for (let item of numbers) { - console.log("TreeSet:" + item); // value: a b c d - } - ``` - +``` +let treeSet : TreeSet = new TreeSet((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); +treeSet.add("a"); +treeSet.add("c"); +treeSet.add("d"); +treeSet.add("b"); +let numbers = Array.from(treeSet.values()) +for (let item of numbers) { + console.log("TreeSet:" + item); // value: d c b a +} +treeSet.clear(); +treeSet.add("a"); +treeSet.add("c"); +treeSet.add("d"); +treeSet.add("b"); +numbers = Array.from(treeSet.values()) +for (let item of numbers) { + console.log("TreeSet:" + item); // value: a b c d +} +``` **After Change** - Case 1: When a user passes in a comparator and calls the **clear** API of **TreeMap**, the comparator functions normally. - ``` - // Use comparator firstValue > secondValue to sort data in descending order. - let treeMap : TreeMap = new TreeMap((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); - treeMap.set("aa","3"); - treeMap.set("dd","1"); - treeMap.set("cc","2"); - treeMap.set("bb","4"); - let numbers = Array.from(treeMap.keys()) - for (let item of numbers) { - console.log("treeMap:" + item); // treeMap: dd cc bb aa - } - treeMap.clear(); - treeMap.set("aa","3"); - treeMap.set("dd","1"); - treeMap.set("cc","2"); - treeMap.set("bb","4"); - numbers = Array.from(treeMap.keys()) - for (let item of numbers) { - console.log("treeMap:" + item); // treeMap: dd cc bb aa - } - ``` +``` +// Use comparator firstValue > secondValue to sort data in descending order. +let treeMap : TreeMap = new TreeMap((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); +treeMap.set("aa","3"); +treeMap.set("dd","1"); +treeMap.set("cc","2"); +treeMap.set("bb","4"); +let numbers = Array.from(treeMap.keys()) +for (let item of numbers) { + console.log("treeMap:" + item); // treeMap: dd cc bb aa +} +treeMap.clear(); +treeMap.set("aa","3"); +treeMap.set("dd","1"); +treeMap.set("cc","2"); +treeMap.set("bb","4"); +numbers = Array.from(treeMap.keys()) +for (let item of numbers) { + console.log("treeMap:" + item); // treeMap: dd cc bb aa +} +``` - Case 2: When a user passes in a comparator and calls the **clear** API of **TreeSet**, the comparator functions normally. - ``` - let treeSet : TreeSet = new TreeSet((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); - treeSet.add("a"); - treeSet.add("c"); - treeSet.add("d"); - treeSet.add("b"); - let numbers = Array.from(treeSet.values()) - for (let item of numbers) { - console.log("TreeSet:" + item); // TreeSet: d c b a - } - treeSet.clear(); - treeSet.add("a"); - treeSet.add("c"); - treeSet.add("d"); - treeSet.add("b"); - numbers = Array.from(treeSet.values()) - for (let item of numbers) { - console.log("TreeSet:" + item); // TreeSet: d c b a - } - ``` - +``` +let treeSet : TreeSet = new TreeSet((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); +treeSet.add("a"); +treeSet.add("c"); +treeSet.add("d"); +treeSet.add("b"); +let numbers = Array.from(treeSet.values()) +for (let item of numbers) { + console.log("TreeSet:" + item); // TreeSet: d c b a +} +treeSet.clear(); +treeSet.add("a"); +treeSet.add("c"); +treeSet.add("d"); +treeSet.add("b"); +numbers = Array.from(treeSet.values()) +for (let item of numbers) { + console.log("TreeSet:" + item); // TreeSet: d c b a +} +``` **Start API Level** 8 @@ -154,21 +152,21 @@ This change is a non-compatible change. It affects the tree map length after **T - Before change: When treeMap1 is added using **setAll**, the tree map length is 1. - ``` - let treeMap : TreeMap = new TreeMap(); - let treeMap1 : TreeMap = new TreeMap(); - treeMap.setAll(treeMap1); // Add all elements in treeMap1 to treeMap. - console.info("length:", treeMap.length) // length:1 - ``` +``` +let treeMap : TreeMap = new TreeMap(); +let treeMap1 : TreeMap = new TreeMap(); +treeMap.setAll(treeMap1); // Add all elements in treeMap1 to treeMap. +console.info("length:", treeMap.length) // length:1 +``` - After change: When treeMap1 is added using **setAll**, the tree map length is 0. - ``` - let treeMap : TreeMap = new TreeMap(); - let treeMap1 : TreeMap = new TreeMap(); - treeMap.setAll(treeMap1); // Add all elements in treeMap1 to treeMap. - console.info("length:",treeMap.length) // length:0 - ``` +``` +let treeMap : TreeMap = new TreeMap(); +let treeMap1 : TreeMap = new TreeMap(); +treeMap.setAll(treeMap1); // Add all elements in treeMap1 to treeMap. +console.info("length:",treeMap.length) // length:0 +``` **Start API Level** @@ -205,57 +203,57 @@ Public API This change is a non-compatible change. It affects the return value of **TreeMap.hasKey()** and **TreeSet.has()** when undefined or null is passed in. -**Before Change** +- **Before Change** - Case 1: For a **TreeMap** object with a user-defined comparator, if null or undefined is not inserted, **hasKey(null/undefined)** returns **true**. - ``` - let treeMap : TreeMap = new TreeMap((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); - treeMap.set("aa",3); - treeMap.set("dd",1); - let res = treeMap.hasKey(null); - let res1 = treeMap.hasKey(undefined); - console.info("res:", res) // res:true - console.info("res1:",res1) // res1:true - ``` +``` +let treeMap : TreeMap = new TreeMap((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); +treeMap.set("aa",3); +treeMap.set("dd",1); +let res = treeMap.hasKey(null); +let res1 = treeMap.hasKey(undefined); +console.info("res:", res) // res:true +console.info("res1:",res1) // res1:true +``` - Case 2: For a **TreeSet** object with a user-defined comparator, if null or undefined is not inserted, **has(null/undefined)** returns **true**. - ``` - let treeSet : TreeSet = new TreeSet((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); - treeSet.add("a"); - treeSet.add("c"); - let res = treeSet.has(null); - let res1 = treeSet.has(undefined); - console.info("res:", res) // res:true - console.info("res1:",res1) // res1:true - ``` +``` +let treeSet : TreeSet = new TreeSet((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); +treeSet.add("a"); +treeSet.add("c"); +let res = treeSet.has(null); +let res1 = treeSet.has(undefined); +console.info("res:", res) // res:true +console.info("res1:",res1) // res1:true +``` -**After Change** +- **After Change** - Case 1: For a **TreeMap** object with a user-defined comparator, if null or undefined is not inserted, **hasKey(null/undefined)** returns **false**. - ``` - let treeMap : TreeMap = new TreeMap((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); - treeMap.set("aa",3); - treeMap.set("dd",1); - let res = treeMap.hasKey(null); - let res1 = treeMap.hasKey(undefined); - console.info("res:", res) // res:false - console.info("res1:",res1) // res1:false - ``` +``` +let treeMap : TreeMap = new TreeMap((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); +treeMap.set("aa",3); +treeMap.set("dd",1); +let res = treeMap.hasKey(null); +let res1 = treeMap.hasKey(undefined); +console.info("res:", res) // res:false +console.info("res1:",res1) // res1:false +``` - Case 2: For a **TreeSet** object with a user-defined comparator, if null or undefined is not inserted, **has(null/undefined)** returns **false**. - ``` - let treeSet : TreeSet = new TreeSet((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); - treeSet.add("a"); - treeSet.add("c"); - let res = treeSet.has(null); - let res1 = treeSet.has(undefined); - console.info("res:", res) // res:false - console.info("res1:",res1) // res1:false - ``` +``` +let treeSet : TreeSet = new TreeSet((firstValue: string, secondValue: string) : boolean => {return firstValue > secondValue}); +treeSet.add("a"); +treeSet.add("c"); +let res = treeSet.has(null); +let res1 = treeSet.has(undefined); +console.info("res:", res) // res:false +console.info("res1:",res1) // res1:false +``` **Start API Level** @@ -269,7 +267,6 @@ OpenHarmony SDK 5.0.0.32 **Key API/Component Changes** TreeMap.hasKey(); - TreeSet.has(); **Adaptation Guide** @@ -409,10 +406,10 @@ Before change: The **append()** API of the **URLParams** class is used to add a ```ts { const objectParams = new url.URLParams('?fod=1&bard=2') - objectParams.append("key&大", "abc"); - objectParams.has('key&大'); // false + objectParams.append("key&large", "abc"); + objectParams.has('key&large'); // false objectParams.has('%E5%A4%A7'); // true - objectParams.get('key&大'); // undefined + objectParams.get('key&large'); // undefined objectParams.get('%E5%A4%A7'); // abc } ``` @@ -421,10 +418,10 @@ After change: The **append()** API of the **URLParams** class is used to add a k ```ts { const objectParams = new url.URLParams('?fod=1&bard=2') - objectParams.append("key&大", "abc"); - objectParams.has('key&大'); // true + objectParams.append("key&large", "abc"); + objectParams.has('key&large'); // true objectParams.has('%E5%A4%A7'); // false - objectParams.get('key&大'); // abc + objectParams.get('key&large'); // abc objectParams.get('%E5%A4%A7'); // undefined } ``` @@ -432,5 +429,3 @@ After change: The **append()** API of the **URLParams** class is used to add a k **Adaptation Guide** If the passed-in parameter of **URLParams.append()** contains special characters such as Chinese characters, you need to adapt to the changes in the processing result and return value of **has()**, **get()**, **delete()**, and **set()**. - - \ No newline at end of file diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.0.38/changelogs-window.md b/en/release-notes/changelogs/OpenHarmony_5.0.0.38/changelogs-window.md index 7044e351d96168e851311331ca55ccdff051807a..dafa73b999ce7acb0b6c7c213af59f41791f3647 100644 --- a/en/release-notes/changelogs/OpenHarmony_5.0.0.38/changelogs-window.md +++ b/en/release-notes/changelogs/OpenHarmony_5.0.0.38/changelogs-window.md @@ -8,7 +8,7 @@ Public API **Reason for Change** -The injected value does not match the enumerated value when the [Input_KeyEventAction](../../../application-dev/reference/apis-input-kit/input.md#input_keyeventaction) field of the [Input_KeyEvent](../../../application-dev/reference/apis-input-kit/input.md) struct is injected into the callback function. Before the change, the values 1, 2, and 3 of **Input_KeyEventAction** correspond to KEY_ACTION_CANCEL, KEY_ACTION_DOWN, and KEY_ACTION_UP, respectively, whereas the enumerated values are 0 (KEY_ACTION_CANCEL), 1 (KEY_ACTION_DOWN), and 2 (KEY_ACTION_UP). +The injected value does not match the enumerated value when the [Input_KeyEventAction](../../../application-dev/reference/apis-input-kit/capi-oh-input-manager-h.md#input_keyeventaction) field of the [Input_KeyEvent](../../../application-dev/reference/apis-input-kit/capi-input-input-keyevent.md) struct is injected into the callback function. Before the change, the values 1, 2, and 3 of **Input_KeyEventAction** correspond to KEY_ACTION_CANCEL, KEY_ACTION_DOWN, and KEY_ACTION_UP, respectively, whereas the enumerated values are 0 (KEY_ACTION_CANCEL), 1 (KEY_ACTION_DOWN), and 2 (KEY_ACTION_UP). **Change Impact** diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.0.46/changelogs-multimedia.md b/en/release-notes/changelogs/OpenHarmony_5.0.0.46/changelogs-multimedia.md new file mode 100644 index 0000000000000000000000000000000000000000..04f15420fb4cad62df13ba8631a330a30e7a8e04 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.0.0.46/changelogs-multimedia.md @@ -0,0 +1,37 @@ +# Multimedia Changelog + +## cl.multimedia.1 APIs of @ohos.multimedia.medialibrary Changed + +**Access Level** + +Public API + +**Reason for Change** + +When dynamic photos are set to autoplay, they zoom in to 1.1 times their original size. This zoom effect is particularly noticeable and somewhat jarring when users swipe left or right to navigate through dynamic photos, causing a flickering and shaking effect. To enhance user experience, dynamic photos will no longer zoom in when set to autoplay. + +**Impact of the Change** + +This change requires application adaptation. + +The default UX behavior of the **autoPlay** API in the @ohos.multimedia.medialibrary module has been updated. + +Before change: Dynamic photos zoom in to 1.1 times their size when set to autoplay. + +After change: Dynamic photos will no longer zoom in when set to autoplay. + +**Start API Level** + +13 + +**Change Since** + +OpenHarmony SDK 5.0.0.46 + +**Key API/Component Changes** + +API **autoPlay** of the @ohos.multimedia.medialibrary module + +**Adaptation Guide** + +No adaptation is required. diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.0.53/changelogs-arkts.md b/en/release-notes/changelogs/OpenHarmony_5.0.0.53/changelogs-arkts.md new file mode 100644 index 0000000000000000000000000000000000000000..1b68dd5c596f8d61515c46722acbee39d4ad0e6d --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.0.0.53/changelogs-arkts.md @@ -0,0 +1,115 @@ +# ArkTS Changelog + +## cl.arkts.1 Changed the Return Value of Exponentiation (\*\*) with Base 1 and NaN Exponent + +**Access Level** + +Others + +**Reason for Change** + + When you perform exponentiation in ArkTS with a base of 1 and an exponent of NaN (or a value that converts to NaN via **ToNumber**), the result is incorrectly returned as 1. This does not comply with the description in [ECMAScript® 2021 Language Specification](https://262.ecma-international.org/12.0/index.html#sec-numeric-types-number-exponentiate). + +**Impact of the Change** + +This change is a non-compatible change. + +Before change: When the base is 1 and the exponent is NaN or a value that converts to NaN via **ToNumber**, the return value is 1. + +After change: When the base is 1 and the exponent is NaN or a value that converts to NaN via **ToNumber**, the return value is NaN. + +**Start API Level** + +6 + +**Change Since** + +OpenHarmony SDK 5.0.0.53 + +**Key API/Component Changes** + +N/A + +**Adaptation Guide** + +Check for exponentiation operations matching this pattern. + +Example: + +```typescript +console.log((1 ** NaN).toString()) +``` + +Before the change, the output of this example is: + +``` +1 +``` + +After the change, the output of this example is: + +``` +NaN +``` + +> **NOTE** + +> While expressions like `1 ** "test"` are invalid in ETS files, they may exist in third-party libraries. These will now also return NaN. + +This change fixes this issue. Exponentiation operations returns NaN if the base number is 1 and the exponent is NaN or a value that converts to NaN via **ToNumber**. + + + +## cl.arkts.2 Changed Behavior for String.prototype.lastIndexOf with Empty Strings + +**Access Level** + +Others + +**Reason for Change** + +When **String.prototype.lastIndexOf** is used to search for an empty string, the return value is -1. This does not comply with the description in [ECMAScript® 2021 Language Specification](https://262.ecma-international.org/12.0/index.html#sec-string.prototype.lastindexof). + +**Impact of the Change** + +This change is a non-compatible change. + +Before change: If the string to search for is empty, the return value of **String.prototype.lastIndexOf** is -1. + +After change: If the string to search for is empty, the return value of **String.prototype.lastIndexOf** is the index of the last character plus 1. + +**Start API Level** + +6 + +**Change Since** + +OpenHarmony SDK 5.0.0.53 + +**Key API/Component Changes** + +String.prototype.lastIndexOf + +**Adaptation Guide** + +Check for empty string searches. + +Example: + +```typescript +console.log("abcde".lastIndexOf("").toString()) +``` + +Before the change, the output of this example is: + +``` +-1 +``` + +After the change, the output of this example is: + +``` +5 +``` + +This change is made to fix the issue. The **String.prototype.lastIndexOf** API now returns the index of the last character plus 1 when searching for an empty string. diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.0.54/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_5.0.0.54/changelogs-bundlemanager.md index 911400932d42311ba97cd4e76516094bea38af8d..88a14731df3ef45aee0ae0f3ac381b16731958dd 100644 --- a/en/release-notes/changelogs/OpenHarmony_5.0.0.54/changelogs-bundlemanager.md +++ b/en/release-notes/changelogs/OpenHarmony_5.0.0.54/changelogs-bundlemanager.md @@ -8,15 +8,15 @@ Public API **Reason for Change** -After a preset application is uninstalled, an HAP with the same bundle name but different signatures can be installed, which poses security risks. +After a preset application is uninstalled, an application with the same bundle name but different signature information can be installed, which poses security risks. **Change Impact** This change is a non-compatible change. -Before change: After a preset application is uninstalled, an HAP with the same bundle name but different signatures can be installed. +Before change: After a preset application is uninstalled, an application with the same bundle name but different keys and APP ID in the signature information can be installed. -After change: After a preset application is uninstalled, an HAP with the same bundle name but different signatures fails to be installed. +After change: After a preset application is uninstalled, an application with the same bundle name but different keys and APP ID in the signature information fails to be installed. **Start API Level** @@ -32,4 +32,43 @@ Installation command provided by the [bm Tool](https://gitee.com/openharmony/doc **Adaptation Guide** -To install a preset application using the hdc command, the signature of the HAP to install must be the same as that of the preset HAP. +1. Re-sign the application to ensure that either the (https://developer.huawei.com/consumer/en/doc/harmonyos-guides/ide-signing#section462703710326) or [APP ID](https://developer.huawei.com/consumer/en/doc/app/agc-help-createharmonyapp-0000001945392297) in the application's signature information matches that of the preset application. +2. Modify the [bundleName](https://gitee.com/openharmony/docs/blob/master/en/application-dev/quick-start/app-configuration-file.md) of the application to make it different from that of the preset application. + +## cl.bundlemanager.2 Command bm uninstall Cannot Directly Uninstall Applications with App Lock + +**Access Level** + +System API + +**Reason for Change** + +For security management reasons, a new app lock feature has been introduced. The **bm uninstall** command now requires unlocking or disabling the app lock before it can uninstall an application that has an app lock set. + +**Change Impact** + +This change does not require application adaptation. + +Before the change: + +The **bm uninstall** command can directly uninstall an application without additional handling. + +After the change: + +The **bm uninstall** command fails to uninstall an application if the application has an app lock set. + +**Start API Level** + +API 6 + +**Change Since** + +OpenHarmony 5.0.0.54 + +**Key API/Component Changes** + +bm uninstall command + +**Adaptation Guide** + +Before using the **bm uninstall** command to uninstall an application with an app lock, use [deleteUninstallDisposedRule](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis-ability-kit/js-apis-appControl-sys.md#appcontroldeleteuninstalldisposedrule15) to disable the app lock. For a terminal device, you can also disable the app lock on the **Settings > Privacy & security > App lock** screen of the device. Alternatively, enter the password to unlock the app lock when prompted after executing the uninstall command. diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.0.57/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_5.0.0.57/changelogs-bundlemanager.md new file mode 100644 index 0000000000000000000000000000000000000000..3b1c5f81a4458662e696429969d1047c9db34c78 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.0.0.57/changelogs-bundlemanager.md @@ -0,0 +1,29 @@ +# Bundle Manager Subsystem Changelog + +## cl.bundlemanager.1 Added Mandatory Property orientationId in AbilityInfo.d.ts + +The mandatory property **orientationId** is added to [AbilityInfo.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/AbilityInfo.d.ts). + +**Access Level** +Public API + +**Reason for Change** +To align with the usage habits of end users, applications should be able to configure the default window rotation method based on the device type. Applications reference orientation configurations using resource IDs, and **orientationId** is used to parse the specific configuration. + +**Impact of the Change**
+This change requires application adaptation. + +Before change: The application can compile successfully when constructing AbilityInfo. +After change: Applications must now include the parameter **orientationId** when constructing AbilityInfo. + +**Start API Level** +API 9 + +**Change Since** +OpenHarmony SDK 5.0.2.57 + +**Key API/Component Changes**
+Mandatory property **orientationId** added to **AbilityInfo.d.ts** + +**Adaptation Guide**
+After upgrading to API 14, if your application constructs the AbilityInfo struct, you must add the mandatory property **orientationId** to the constructed AbilityInfo struct. diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.1.1/changelogs-arkts.md b/en/release-notes/changelogs/OpenHarmony_5.0.1.1/changelogs-arkts.md index 74eae1a9063fb0b5a59071fc4707d9dde52403c4..e0a90700e93503e73bcabe18c6232b4ba84712b1 100644 --- a/en/release-notes/changelogs/OpenHarmony_5.0.1.1/changelogs-arkts.md +++ b/en/release-notes/changelogs/OpenHarmony_5.0.1.1/changelogs-arkts.md @@ -165,74 +165,3 @@ let dest_be = new Uint8Array(14); let res_le = encoderUtf16Le.encodeIntoUint8Array('abcdefg', dest_le); // dest_le: 97,0,98,0,99,0,100,0,101,0,102,0,103,0 let res_be = encoderUtf16Be.encodeIntoUint8Array('abcdefg', dest_be); // dest_be: 0,97,0,98,0,99,0,100,0,101,0,102,0,103 ``` - -## cl.arkui.3 Changed the Unit of the radius Parameter in modifier for the backgroundEffect Attribute - -**Access Level** - -Public API - -**Reason for Change** - -When **backgroundEffect** is directly used, the unit of the **radius** parameter is vp. When it is used through modifier or CAPI, the unit is px. The unit is changed to vp. - -**Change Impact** - -This change is a non-compatible change. - -Before change: The unit of the **radius** parameter in **backgroundEffect** used through modifier is px. - -![addComponentContent_before](figures/backgroundEffect_before.png) - -After change: The unit of the **radius** parameter in **backgroundEffect** used through modifier is vp. - -![addComponentContent_after](figures//backgroundEffect_after.png) - -**Start API Level** - -12 - -**Change Since** - -OpenHarmony SDK 5.0.1.1 - -**Key API/Component Changes** - -backgroundEffect - -**Adaptation Guide** - -Use the px2vp method in modifier to convert the **radius** parameter to vp. - -```ts - -import { CommonModifier } from '@kit.ArkUI'; - -class ColumnModifier extends CommonModifier { - public radius: number = 0; - applyNormalAttribute(instance: CommonAttribute): void { - instance.backgroundEffect({ radius: this.radius }) - } -} - -@Entry -@Component -struct Index { - @State testSize: number = 200; - @State modifier:ColumnModifier = new ColumnModifier(); - onPageShow(): void { - // Before change: - // this.modifier.radius = 10; - // Adaptation after the change: - this.modifier.radius = px2vp(10); - } - build() { - Column() { - Stack() { - Image($r('app.media.test')).width(this.testSize).height(this.testSize) - Column().width(this.testSize).height(this.testSize).attributeModifier(this.modifier) - }.width('100%') - } - } -} -``` diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.1.45/changelogs-window.md b/en/release-notes/changelogs/OpenHarmony_5.0.1.45/changelogs-window.md index 2ad6b66c8568c30c660643006323e518deeadd3d..7d487e9119007a3699caad767b56f78693c7cc5b 100644 --- a/en/release-notes/changelogs/OpenHarmony_5.0.1.45/changelogs-window.md +++ b/en/release-notes/changelogs/OpenHarmony_5.0.1.45/changelogs-window.md @@ -50,8 +50,8 @@ To distinguish whether the window is maximized or in full-screen mode on 2-in-1 The following example uses the **on('windowStatusChange')** API as an example to describe how to distinguish the maximized state and full-screen mode on 2-in-1 devices. +Example for API version 13 and earlier versions: ```ts -// API version 13 and earlier versions // EntryAbility.ets import { BusinessError } from '@kit.BasicServicesKit'; @@ -76,8 +76,8 @@ export default class EntryAbility extends UIAbility { } ``` +Example for API version 14: ```ts -// API version 14 or later // EntryAbility.ets import { BusinessError } from '@kit.BasicServicesKit'; @@ -104,8 +104,8 @@ export default class EntryAbility extends UIAbility { } ``` +Example for API version 14 without distinguishing maximized state: ```ts -// API version 14 or later // EntryAbility.ets import { BusinessError } from '@kit.BasicServicesKit'; @@ -130,3 +130,43 @@ export default class EntryAbility extends UIAbility { } } ``` + +## cl.window.2 Changed the Return Values of hasImmersiveWindow on 2-in-1 Devices When the Window Is Maximized + +**Access Level** + +System API + +**Reason for Change** + +When the **hasImmersiveWindow** API is called on a 2-in-1 device, the return value is **true** if the window is maximized, which is inconsistent with the actual situation. + +This API cannot be used to determine whether any window is maximized or in full screen mode on 2-in-1 devices, which does not comply with the API functionality design. + +**Change Impact** + +This change is a non-compatible change. + +Before change: On 2-in-1 devices, calling **hasImmersiveWindow** when the window is in a maximized state returns true. + +After change: On 2-in-1 devices, calling **hasImmersiveWindow** when the window is in a maximized state returns false. + +**Start API Level** + +API version 11 for **hasImmersiveWindow** + +**Change Since** + +OpenHarmony SDK 5.0.1.45 + +**Key API/Component Changes** + +@ohos.display.d.ts + +System capability: SystemCapability.Window.SessionManager + +API: **hasImmersiveWindow** + +**Adaptation Guide** + +Review your application implementation to see if there are any calls to **hasImmersiveWindow** to determine whether the current screen contains a full-screen window. If so, you need to adjust the code based on the change in return value. diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.1.52/changelogs-window.md b/en/release-notes/changelogs/OpenHarmony_5.0.1.52/changelogs-window.md new file mode 100644 index 0000000000000000000000000000000000000000..592c3862095564c24824522664e5ea556f830bbc --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.0.1.52/changelogs-window.md @@ -0,0 +1,37 @@ +# Window Subsystem Changelog + +## cl.window.1 Floating Window Layer Is Adjusted to Be Above the Dock Bar on 2-in-1 Devices + +**Access Level** + +Public API + +**Reason for Change** + +Floating windows of the type **TYPE_FLOAT** created by applications are positioned below the dock bar, which mean that they may be obscured by it. This is particularly problematic in scenarios like video meeting, where user experience does not meet application expectations. + +**Impact of the Change** + +This change does not require application adaptation. + +- Before the change, on 2-in-1 devices, the floating window of the TYPE_FLOAT type is positioned below the dock bar. + +- After the change, on 2-in-1 devices, the floating window of the TYPE_FLOAT type is positioned above the dock bar. + +**Start API Level** + +9 + +**Change Since** + +OpenHarmony SDK 5.0.1.52 + +**Key API/Component Changes** + +@ohos.window.d.ts + +Interface: TYPE_FLOAT + +**Adaptation Guide** + +No adaptation is required. diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/changelogs-display.md b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/changelogs-display.md index 32ebfb7061a5017647d671aa64c4517a0a7afc41..8c70c80b139ef5824bbb647974752e7a80be46f0 100644 --- a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/changelogs-display.md +++ b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/changelogs-display.md @@ -8,9 +8,7 @@ Public API **Reason for Change** -There are variations in the alignment of electronic components across different devices such as mobile phones and tablets, and the natural orientation of the sensor does not align with the physical orientation of the screen. As a result, the return values of the **rotation** and **orientation** attributes in the Display object on tablets are different from those on mobile phones. - -When both devices are rotated by the same angle, the values obtained from the **rotation** and **orientation** attributes of the Display object are different. Special processing is required based on the device type. +The orientation of electronic components on different devices such as smartphones and tablets varies. This variation causes a discrepancy between the natural direction of sensors and the physical orientation of the screen. As a result, the rotation and orientation changes in the Display object on tablets do not align with those on smartphones. This inconsistency can be confusing for users and necessitates special handling based on the device type, which can impact usability. **Change Impact** diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/changelogs-window.md b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/changelogs-window.md index 9e43028e6074f1e539cb98a1f27ae1a34ed6dca6..205860efb01a3a79d94024bfcd28bfeb57b12a52 100644 --- a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/changelogs-window.md +++ b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/changelogs-window.md @@ -1,37 +1,128 @@ # Window Subsystem Changelog -## cl.window.1 Verification Condition Added to setRaiseByClickEnabled + +## cl.window.1 Disabling setWindowLayoutFullScreen and setImmersiveModeEnabledState on 2-in-1 Devices and Tablets in Freeform Window Mode **Access Level** -System API +Public API **Reason for Change** -The code implementation for **setRaiseByClickEnabled** is inconsistent with the design document. This API is designed to be used only by application subwindows. If it is called in the main window of an application or a system window, an error code is expected to be returned. Yet, the current code does not include the necessary return scenarios, failing to properly check and prevent calls based on window type and state. +On smartphones, immersive mode means the application layout is full-screen and the window overlaps with the system status bar and navigation bar. On tablets in freeform window mode, immersive mode means the application layout is full-screen and the window overlaps with the navigation bar. On 2-in-1 devices, immersive mode means the application layout is full-screen and the system status bar and dock bar are hidden. Since the behavior on 2-in-1 devices and tablets does not align with that on smartphones, the **setWindowLayoutFullScreen** and **setImmersiveModeEnabledState** APIs have been disabled on 2-in-1 devices and tablets in freeform window mode. Instead, the **maximize** API should be used to enter or exit immersive mode, and the visibility of the status bar and dock bar should be controlled through the parameters of the **maximize** API when entering maximized mode. **Change Impact** This change is a non-compatible change. -Before change: When this API is called in the main window of an application or a system window, no error code is returned but the change does not take effect. +Before the change, on 2-in-1 devices and tablets in freeform window mode, calling **setWindowLayoutFullScreen** and **setImmersiveModeEnabledState** puts the window into or exit immersive mode. -After change: When this API is called in the main window of an application or a system window, an error code is returned and the change does not take effect. +After the change, on 2-in-1 devices and tablets in freeform window mode, calling **setWindowLayoutFullScreen** and **setImmersiveModeEnabledState** does not take effect. **Start API Level** -10 +API version 9 for **setWindowLayoutFullScreen** + +API version 12 for **setImmersiveModeEnabledState** **Change Since** -OpenHarmony 5.0.2.1 +OpenHarmony SDK 5.0.0.56 **Key API/Component Changes** @ohos.window.d.ts +System capability: SystemCapability.Window.SessionManager -setRaiseByClickEnabled +APIs: **setWindowLayoutFullScreen** and **setImmersiveModeEnabledState** **Adaptation Guide** -Check whether your application code contains the scenario where this API is called by non-subwindows. If yes, capture the error code and rectify the fault. +To set immersive mode for 2-in-1 devices and tablets in freeform window mode, call [maximize](../../../application-dev/reference/apis-arkui/js-apis-window.md#maximize12). + +When calling [setWindowLayoutFullScreen](../../../application-dev/reference/apis-arkui/js-apis-window.md#setwindowlayoutfullscreen9), you are advised to call **maximize** at the same time. + +When calling [setImmersiveModeEnabledState](../../../application-dev/reference/apis-arkui/js-apis-window.md#setimmersivemodeenabledstate12), you are advised to call **maximize** at the same time. + +Example: + +```ts +// EntryAbility.ets +import { BusinessError } from '@kit.BasicServicesKit'; + +export default class EntryAbility extends UIAbility { + // ... + onWindowStageCreate(windowStage: window.WindowStage): void { + console.info('onWindowStageCreate'); + let windowClass: window.Window | undefined = undefined; + windowStage.getMainWindow((err: BusinessError, data) => { + const errCode: number = err.code; + if (errCode) { + console.error(`Failed to obtain the main window. Cause code: ${err.code}, message: ${err.message}`); + return; + } + windowClass = data; + let isLayoutFullScreen = true; + try { + let promise = windowClass.setWindowLayoutFullScreen(isLayoutFullScreen); + promise.then(() => { + console.info('Succeeded in setting the window layout to full-screen mode.'); + }).catch((err: BusinessError) => { + console.error(`Failed to set the window layout to full-screen mode. Cause code: ${err.code}, message: ${err.message}`); + }); + } catch (exception) { + console.error(`Failed to set the window layout to full-screen mode. Cause code: ${exception.code}, message: ${exception.message}`); + } + + try { + let promise = windowClass.maximize(window.MaximizePresentation.ENTER_IMMERSIVE); + promise.then(() => { + console.info('Succeeded in maximizing the window.'); + }).catch((err: BusinessError) => { + console.error(`Failed to maximize the window. Cause code: ${err.code}, message: ${err.message}`); + }); + } catch (exception) { + console.error(`Failed to maximize the window. Cause code: ${exception.code}, message: ${exception.message}`); + } + }); + } +} +``` + +```ts +// EntryAbility.ets +import { BusinessError } from '@kit.BasicServicesKit'; + +export default class EntryAbility extends UIAbility { + // ... + onWindowStageCreate(windowStage: window.WindowStage): void { + console.info('onWindowStageCreate'); + let windowClass: window.Window | undefined = undefined; + windowStage.getMainWindow((err: BusinessError, data) => { + const errCode: number = err.code; + if (errCode) { + console.error(`Failed to obtain the main window. Cause code: ${err.code}, message: ${err.message}`); + return; + } + windowClass = data; + try { + let enabled = true; + windowClass.setImmersiveModeEnabledState(enabled); + } catch (exception) { + console.error(`Failed to set the window immersive mode enabled status. Cause code: ${exception.code}, message: ${exception.message}`); + } + + try { + let promise = windowClass.maximize(window.MaximizePresentation.ENTER_IMMERSIVE); + promise.then(() => { + console.info('Succeeded in maximizing the window.'); + }).catch((err: BusinessError) => { + console.error(`Failed to maximize the window. Cause code: ${err.code}, message: ${err.message}`); + }); + } catch (exception) { + console.error(`Failed to maximize the window. Cause code: ${exception.code}, message: ${exception.message}`); + } + }); + } +} +``` diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/0.PNG b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/0.PNG index 9d16c7b0c4c422a9fe55763ac095f5c9b279db10..c3a492eafaeeecfa4cf2bc47051a6869941a53cd 100644 Binary files a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/0.PNG and b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/0.PNG differ diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/180.PNG b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/180.PNG index f2ed384e4fa14f8c588fbba0a521c6ca573991e3..146082198711708a551ebfad5a962581387cd0b3 100644 Binary files a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/180.PNG and b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/180.PNG differ diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/270.PNG b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/270.PNG index ab44d5600e9eeb47ef58435e00ba069ab6aee01f..bdfed65e1d3daafc263cb9794132ab58b2f6d6c9 100644 Binary files a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/270.PNG and b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/270.PNG differ diff --git a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/90.PNG b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/90.PNG index 49e13ada0b749adbe23e2ddff238a17f6756a899..05d6add17c8bb93277238e606f66c67658821c8a 100644 Binary files a/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/90.PNG and b/en/release-notes/changelogs/OpenHarmony_5.0.2.1/figures/90.PNG differ diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.45/changelogs-arkcompiler.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.45/changelogs-arkcompiler.md new file mode 100644 index 0000000000000000000000000000000000000000..b51448063c7d8696b4ffa221512ca7896633c981 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.45/changelogs-arkcompiler.md @@ -0,0 +1,270 @@ +# ArkCompiler Subsystem Changelog + +## cl.arkcompiler.1 Behavior Change for Property Lookup and Setting on Array + +**Access Level** + +Public API + +**Reason for Change** + +According to the ECMAScript specification, when certain properties are queried on Array instances and these properties do not exist on the Array instance itself, the prototype chain should be traversed to perform the query. Some non-StableArrays are mistakenly identified as StableArrays. As a result, the prototype chain query is skipped, and the query result is inconsistent with the expected outcomes defined by the ECMAScript specification. + +**Impact of the Change** + +This change does not require application adaptation. + +**Before** + +- Case 1: When an object (o) is an instance of the Array type and (Array.prototype) is modified using specific methods (**fill**, **push**, **splice**, or **unshift**), certain APIs (**concat**, **slice**, **at**, **reduce**, or **reverse**) cannot correctly read elements from (o) on (Array.prototype), returning an incorrect result. +- Case 2: When a class MyArray inherits from Array and an object (o) is an instance of MyArray, the constructor property on (o) is not correctly invoked, leading to incorrect results when calling **instance of** on (o). +- Case 3: When a class MyArray inherits from Array, an object (o) is an instance of MyArray, and MyArray.prototype.proto is modified, certain APIs (**concat**, **slice**, **at**, **reduce**, or **reverse**) cannot correctly read elements from (o) on MyArray.prototype.proto, returning an incorrect result. +- Case 4: When a class MyArray inherits from Array, an object (o) is an instance of MyArray, and an element is inserted to (MyArray.prototype), certain APIs (**concat**, **slice**, **at**, **reduce**, or **reverse**) cannot correctly read elements from (o) on (MyArray.prototype), returning an incorrect result. + +```js +// Case 1: +function BehaviorChange1() { +// The following provides four methods to modify Array.prototype, making Array.prototype = [233, 233, 233]. Each code block is parallel. +// ----------------- Method 1 ----------------- + let arr1 = new Array(10); + arr1.__proto__.length = 3; + arr1.__proto__.fill(233, 0, 3); +// ----------------- Method 1 ----------------- + +// ----------------- Method 2 ----------------- + let arr1 = new Array(10); + arr1.__proto__.push(233, 233, 233); +// ----------------- Method 2 ----------------- + +// ----------------- Method 3 ----------------- + let arr1 = new Array(10); + arr1.__proto__.length = 3; + arr1.__proto__.splice(1, 0, 233, 233, 233); +// ----------------- Method 3 ----------------- + +// ----------------- Method 4 ----------------- + let arr1 = new Array(10); + arr1.__proto__.unshift(233, 233, 233); +// ----------------- Method 4 ----------------- + + let arr2 = new Array(10); + let arr3 = arr1.concat(arr2); + print(arr3[11]); // Output: undefined, non-compliant + + let arr4 = arr1.slice(1); + print(arr4[0]); // Output: undefined, non-compliant + + let res = arr1.at(1); + print(res); // Output: undefined, non-compliant + + const sum = arr1.reduce((accumulator, currentValue) => { + return accumulator + currentValue; + }) + print(sum); // Output: undefined, non-compliant + + arr1.reverse(); + print(arr1[1]); // Output: undefined, non-compliant +} +BehaviorChange1(); + +// Case 2: +function BehaviorChange2() { + class MyArray extends Array {} + let custom = new MyArray(1, 2, 3); + let result1 = custom.concat([4, 5]); + print(result1 instanceof MyArray); // Output: false, non-compliant + + let result2 = custom.slice(1); + print(result2 instanceof MyArray); // Output: false, non-compliant +} +BehaviorChange2() + +// Case 3: +function BehaviorChange3() { + class MyArray extends Array {} + let arr1 = new MyArray(10); + MyArray.prototype.__proto__ = [233, 233, 233]; + let arr2 = new Array(10); + let arr3 = arr1.concat(arr2); + print(arr3[1]); // Output: undefined, non-compliant + + let arr4 = arr1.slice(1); + print(arr4[0]); // Output: undefined, non-compliant + + let res = arr1.at(1); + print(res); // Output: undefined, non-compliant + + const sum = arr1.reduce((accumulator, currentValue) => { + return accumulator + currentValue; + }) + print(sum); // Output: undefined, non-compliant + + arr1.reverse(); + print(arr1[1]); // Output: undefined, non-compliant +} +BehaviorChange3(); + +// Case 4: +function BehaviorChange4() { + class MyArray extends Array {} + let arr1 = new MyArray(10); + MyArray.prototype[0] = 233; + MyArray.prototype[1] = 233; + MyArray.prototype[2] = 233; + + let arr2 = new Array(10); + let arr3 = arr1.concat(arr2); + print(arr3[1]); // Output: undefined, non-compliant + + let arr4 = arr1.slice(1); + print(arr4[0]); // Output: undefined, non-compliant + + let res = arr1.at(1); + print(res); // Output: undefined, non-compliant + + const sum = arr1.reduce((accumulator, currentValue) => { + return accumulator + currentValue; + }) + print(sum); // Output: undefined, non-compliant + + arr1.reverse(); + print(arr1[1]); // Output: undefined, non-compliant +} +BehaviorChange4(); +``` +**After change** + +- Case 1: When an object (o) is an instance of the Array type and (Array.prototype) is modified using specific methods (**fill**, **push**, **splice**, or **unshift**), the APIs (**concat**, **slice**, **at**, **reduce**, or **reverse**) can correctly read elements from (o) on (Array.prototype), returning the correct result. (incompatible change) +- Case 2: When a class MyArray inherits from Array and an object (o) is an instance of MyArray, the constructor property on (o) is not correctly invoked, leading to correct results when calling **instance of** on (o). (incompatible change) +- Case 3: When a class MyArray inherits from Array, an object (o) is an instance of MyArray, and MyArray.prototype.proto is modified, the APIs (**concat**, **slice**, **at**, **reduce**, or **reverse**) can correctly read elements from (o) on MyArray.prototype.proto, returning the correct result. (incompatible change) +- Case 4: When a class MyArray inherits from Array, an object (o) is an instance of MyArray, and an element is inserted to (MyArray.prototype), the APIs (**concat**, **slice**, **at**, **reduce**, or **reverse**) can correctly read elements from (o) on (MyArray.prototype), returning the correct result. (incompatible change) + +```js +// Case 1: +function BehaviorChange1() { +// The following provides four methods to modify Array.prototype, making Array.prototype = [233, 233, 233]. Each code block is parallel. +// ----------------- Method 1 ----------------- + let arr1 = new Array(10); + arr1.__proto__.length = 3; + arr1.__proto__.fill(233, 0, 3); +// ----------------- Method 1 ----------------- + +// ----------------- Method 2 ----------------- + let arr1 = new Array(10); + arr1.__proto__.push(233, 233, 233); +// ----------------- Method 2 ----------------- + +// ----------------- Method 3 ----------------- + let arr1 = new Array(10); + arr1.__proto__.length = 3; + arr1.__proto__.splice(1, 0, 233, 233, 233); +// ----------------- Method 3 ----------------- + +// ----------------- Method 4 ----------------- + let arr1 = new Array(10); + arr1.__proto__.unshift(233, 233, 233); +// ----------------- Method 4 ----------------- + + let arr2 = new Array(10); + let arr3 = arr1.concat(arr2); + print(arr3[11]); // Output: 233, compliant. concat traverses the prototype chain when the property is not found on the instance. + + let arr4 = arr1.slice(1); + print(arr4[0]); // Output: 233, compliant. slice traverses the prototype chain when the property is not found on the instance. + + let res = arr1.at(1); + print(res); // Output: 233, compliant. at traverses the prototype chain when the property is not found on the instance. + + const sum = arr1.reduce((accumulator, currentValue) => { + return accumulator + currentValue; + }) + print(sum); // Output: 699, compliant. reduce traverses the prototype chain when the property is not found on the instance. + + arr1.reverse(); + print(arr1[1]); // Output: 233, compliant. reverse traverses the prototype chain when the property is not found on the instance. +} +BehaviorChange1(); + +// Case 2: +function BehaviorChange2() { + class MyArray extends Array {} + let custom = new MyArray(1, 2, 3); + let result1 = custom.concat([4, 5]); + print(result1 instanceof MyArray); // Output: true, compliant. constructor on custom is correctly called. + + let result2 = custom.slice(1); + print(result2 instanceof MyArray); // Output: true, compliant. constructor on custom is correctly called. +} +BehaviorChange2() + +// Case 3: +function BehaviorChange3() { + class MyArray extends Array {} + let arr1 = new MyArray(10); + MyArray.prototype.__proto__ = [233, 233, 233]; + let arr2 = new Array(10); + let arr3 = arr1.concat(arr2); + print(arr3[1]); // Output: 233, compliant. concat traverses the prototype chain when the property is not found on the instance. + + let arr4 = arr1.slice(1); + print(arr4[0]); // Output: 233, compliant. slice traverses the prototype chain when the property is not found on the instance. + + let res = arr1.at(1); + print(res); // Output: 233, compliant. at traverses the prototype chain when the property is not found on the instance. + + const sum = arr1.reduce((accumulator, currentValue) => { + return accumulator + currentValue; + }) + print(sum); // Output: 233, compliant. reduce traverses the prototype chain when the property is not found on the instance. + + arr1.reverse(); + print(arr1[1]); // Output: 233, compliant. reverse traverses the prototype chain when the property is not found on the instance. +} +BehaviorChange3(); + +// Case 4: +function BehaviorChange4() { + class MyArray extends Array {} + let arr1 = new MyArray(10); + MyArray.prototype[0] = 233; + MyArray.prototype[1] = 233; + MyArray.prototype[2] = 233; + + let arr2 = new Array(10); + let arr3 = arr1.concat(arr2); + print(arr3[1]); // Output: 233, compliant. concat traverses the prototype chain when the property is not found on the instance. + + let arr4 = arr1.slice(1); + print(arr4[0]); // Output: 233, compliant. slice traverses the prototype chain when the property is not found on the instance. + + let res = arr1.at(1); + print(res); // Output: 233, compliant. at traverses the prototype chain when the property is not found on the instance. + + const sum = arr1.reduce((accumulator, currentValue) => { + return accumulator + currentValue; + }) + print(sum); // Output: 699, compliant. reduce traverses the prototype chain when the property is not found on the instance. + + arr1.reverse(); + print(arr1[1]); // Output: 233, compliant. reverse traverses the prototype chain when the property is not found on the instance. +} +BehaviorChange4(); + + +``` + +**Start API Level** + +API 9 + +**Change Since** + +OpenHarmony 5.1.0.45 + +**Key API/Component Changes** + +**instance of**, **concat**, **slice**, **at**, **reduce**, and **reverse** APIs in Array + +**Adaptation Guide** + +When looking up properties on Array, pay attention to the changes in return values. diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.46/changelogs-arkcompiler.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.46/changelogs-arkcompiler.md new file mode 100644 index 0000000000000000000000000000000000000000..2eb5d9d8b96091b5cef72ec3d934635bf6ff492d --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.46/changelogs-arkcompiler.md @@ -0,0 +1,126 @@ +# ArkCompiler Subsystem Changelog + +## cl.arkcompiler.1 Behavior Change for Property Lookup and Setting on TypedArray + +**Access Level** + +Public API + +**Reason for Change** + +The ECMAScript specification defines the behavior of calling **Reflect.set** and** [[HasProperty]]** on JS objects, both of which involve traversing the prototype chain. +If a TypedArray object is involved in the process of traversing the prototype chain, the current runtime implementation causes the return value to be inconsistent with the expected result defined in the specifications. + +**Impact of the Change** + +This change is a non-compatible change. + +**Before** + +- Case 1: When an object (o) has a prototype that is a TypedArray object (ta), using **in** to check whether a property exists on (o) returns an incorrect result if the key being checked is an index greater than the length of (ta). +- Case 2: When an object (o) has a prototype that is a TypedArray object (ta), using **in** to check whether a property exists on (o) returns an incorrect result if the key being checked is a Number type and exists on the prototype of (ta). +- Case 3: Using **Reflect.set** to set a value for a property key on an object (o), where the receiver in the local call is a TypedArray object (ta), returns an incorrect result if the property key is a NumericIndex type with a value greater than the length of (ta). + +```js +// Case 1: When an object (o) has a prototype that is a TypedArray object (ta), using in to check whether a property exists on (o), and the key being checked is an index greater than the length of (ta). +function BehaviorChange1() { + // Create a TypedArray object using Int8Array as an example. + const typedArray = new Int8Array(5); + typedArray[1] = 42; + + // Create an Object object and set its prototype to the TypedArray object. + const obj = Object.create(typedArray); + // Traverse the prototype chain to check whether the object has the property "6". + print(6 in obj); // Output: true +} +BehaviorChange1(); + +// Case 2: When an object (o) has a prototype that is a TypedArray object (ta), using in to check whether a property exists on (o), and the key being checked is a Number type that exists on the prototype of (ta). +function BehaviorChange2() { + // Create a regular Object object holding the property "6". + const obj1 = {}; + obj1[6] = "b"; + + // Create a TypedArray object using Int8Array as an example. + const typedArray = new Int8Array(5); + typedArray[1] = 42; + // Set the prototype of typedArray to the obj1 object created in the first step. + typedArray.__proto__ = obj1; + + // Create an Object object and set its prototype to the TypedArray object. + const obj = Object.create(typedArray); + // Traverse the prototype chain to check whether the object has the property "6". + print("6" in obj); // Output: true +} +BehaviorChange2() + +// Case 3: Using Reflect.set to set a value for a property key on an object (o), where the receiver in the local call is a TypedArray object (ta), and the property key is a NumericIndex type with a value greater than the length of (ta). +function BehaviorChange3() { + // The second parameter is propKey, the third parameter is value, and the fourth parameter is receiver. + print(Reflect.set({}, 100, 123, new Int32Array())); // Output: true +} +BehaviorChange3(); +``` + +**After** + +- Case 1: When an object (o) has a prototype that is a TypedArray object (ta), using **in** to check whether a property exists on (o) returns the correct result if the key being checked is an index greater than the length of (ta). (incompatible change) +- Case 2: When an object (o) has a prototype that is a TypedArray object (ta), using **in** to check whether a property exists on (o) returns the correct result if the key being checked is a Number type that exists on the prototype of (ta). (incompatible change) +- Case 3: Using **Reflect.set** to set a value for a property key on an object (o), where the receiver in the local call is a TypedArray object (ta), returns the correct result if the property key is a NumericIndex type with a value greater than the length of (ta). (incompatible change) + +```js +// Case 1: When an object (o) has a prototype that is a TypedArray object (ta), using in to check whether a property exists on (o), and the key being checked is an index greater than the length of (ta). +function BehaviorChange1() { + // Create a TypedArray object using Int8Array as an example. + const typedArray = new Int8Array(5); + typedArray[1] = 42; + + // Create an Object object and set its prototype to the TypedArray object. + const obj = Object.create(typedArray); + // Traverse the prototype chain to check whether the object has the property "6". + print(6 in obj); // Output: false (consistent with the specification. The property cannot be found even after traversing the prototype chain.) +} +BehaviorChange1(); + +// Case 2: When an object (o) has a prototype that is a TypedArray object (ta), using in to check whether a property exists on (o), and the key being checked is a Number type that exists on the prototype of (ta). +function BehaviorChange2() { + // Create a regular Object object holding the property "6". + const obj1 = {}; + obj1[6] = "b"; + + // Create a TypedArray object using Int8Array as an example. + const typedArray = new Int8Array(5); + typedArray[1] = 42; + // Set the prototype of typedArray to the obj1 object created in the first step. + typedArray.__proto__ = obj1; + + // Create an Object object and set its prototype to the TypedArray object. + const obj = Object.create(typedArray); + // Traverse the prototype chain to check whether the object has the property "6". + print("6" in obj); // Output: false (consistent with the specification. The key is a NumericIndex type, and the search stops at typedArray.) +} +BehaviorChange2() + +// Case 3: Using Reflect.set to set a value for a property key on an object (o), where the receiver in the local call is a TypedArray object (ta), and the property key is a NumericIndex type with a value greater than the length of (ta). +function BehaviorChange3() { + // The second parameter is propKey, the third parameter is value, and the fourth parameter is receiver. + print(Reflect.set({}, 100, 123, new Int32Array())); // Output: false (100 is greater than the length of the TypedArray object. Therefore, adding the property fails.) +} +BehaviorChange3(); +``` + +**Start API Level** + +API 9 + +**Change Since** + +OpenHarmony 5.1.0.46 + +**Key API/Component Changes** + +Using the ECMAScript built-in functions **in** and **Reflect.set** for property access-related operations on Object type objects with TypedArray objects (including Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Uint8ClampedArray, Float32Array, Float64Array) as their prototypes. + +**Adaptation Guide** + +When accessing or setting properties on TypedArray objects in the scenarios described above, pay attention to the changes in return values. diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.46/changelogs-arkguard.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.46/changelogs-arkguard.md new file mode 100644 index 0000000000000000000000000000000000000000..ac2a46d0ea297ea2e9ba6f0ff82fadfecd41fd75 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.46/changelogs-arkguard.md @@ -0,0 +1,86 @@ +# ArkCompiler Subsystem Changelog + +## cl.arkcompiler.1 Change in Default Behavior of Merging Dependency Obfuscation Rules + +**Access Level** + +Others + +**Reason for Change** + +The default behavior of merging dependency obfuscation rules during obfuscation causes issues for some developers who were not familiar with the obfuscation mechanism. Some third-party libraries include obfuscation switch options in their **obfuscation.txt** files. When other applications depended on these libraries, it causes application crashes at startup, and developers cannot directly detect that these third-party libraries have introduced obfuscation switches. + +**Impact of the Change** + +This change requires application adaptation. + +Before change: + +When compiling a module, the effective obfuscation rules are the result of merging all obfuscation configurations from the current module, dependent modules, and third-party libraries. + +For example, if the obfuscation configurations for the current module, a dependent HAR module, and a third-party library are as follows: + +``` +// current-obfuscation-rules.txt +-enable-toplevel-obfuscation +-keep-global-name +currentVar + +// dependencyHar-consumer-rule.txt +-enable-property-obfuscation +-keep-global-name +harVar +-keep-property-name +harProp + +// dependencyThirdParty-obfuscation.txt +-compact +-keep-property-name +thirdPartyProp +``` + +Then the effective obfuscation rules when compiling the current module are as follows: + +``` +-enable-toplevel-obfuscation +-enable-property-obfuscation +-compact +-keep-global-name +currentVar +harVar +-keep-property-name +harProp +thirdPartyProp +``` + +After change: + +When compiling a module, the effective obfuscation rules are the result of merging the current module's obfuscation configurations with the obfuscation retention options from dependent modules and third-party libraries. + + +For the same example, the effective obfuscation rules when compiling the current module are as follows: +``` +-enable-toplevel-obfuscation +-keep-global-name +currentVar +harVar +-keep-property-name +harProp +thirdPartyProp +``` + +**Start API Level** + +API 10 + +**Change Since** + +OpenHarmony 5.1.0.46 + +**Key API/Component Changes** + +N/A + +**Adaptation Guide** + +To achieve the pre-change behavior of merging all obfuscation configurations from dependent modules and third-party libraries when compiling the current module, you can configure the obfuscation switch option **-enable-lib-obfuscation-options** in the current module's obfuscation configuration file **obfuscation-rules.txt**. diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.46/changelogs-media.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.46/changelogs-media.md new file mode 100644 index 0000000000000000000000000000000000000000..672b6dd94445ee94fb2ad879368700c4e28af4f8 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.46/changelogs-media.md @@ -0,0 +1,37 @@ +# Media Subsystem Changelog + +## cl.media.1 Change in Screenshot API Called by the System Screen Recording Application + +**Access Level** + +Other + +**Reason for Change** + +At the end of the system screen recording, a screenshot API provided by the window module will be called to generate a thumbnail of the screen, which will then trigger a screenshot event. This event can interfere with listeners of third-party applications if these applications have subscribed to screenshot events through the window module. + +To mitigate this problem, the window module has introduced a new screenshot API designated for the system screen recording application. This way, third-party applications will no longer capture the screenshot events generated by system screen recording application. + +**Impact of the Change** + +This change does not require application adaptation. + +Before change: When system screen recording ends, third-party applications receive a callback event if they have subscribed to screenshot events through the window module. + +After change: When system screen recording ends, third-party applications do not receive a callback event if they have subscribed to screenshot events through the window module. + +**Start API Level** + +API 9 + +**Change Since** + +OpenHarmony SDK 5.1.0.46 + +**Key API/Component Changes** + +No API or component change is involved. + +**Adaptation Guide** + +No adaptation is required. diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.47/changelogs-arkts.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.47/changelogs-arkts.md new file mode 100644 index 0000000000000000000000000000000000000000..ca07cd799130f94c30a11fe2e534cefee82e96e5 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.47/changelogs-arkts.md @@ -0,0 +1,54 @@ +# ArkTS Changelog + +## cl.arkts.1 Change in JSON.parse() Return Value for Number.MIN_VALUE + +**Access Level** + +Public API + +**Reason for Change** + + The static data property **Number.MIN_VALUE** represents the smallest positive number that can be represented in JavaScript, which is approximately 5e-324. This change introduces support for parsing this value in **JSON.parse()**. + +**Impact of the Change** + +This change requires application adaptation. + +Before the change, the return value of **Number.MIN_VALUE** parsed by **JSON.parse()** is **Infinity**. + +After the change, the return value of **Number.MIN_VALUE** parsed by **JSON.parse()** is **5e-324**. + +**Start API Level** + +6 + +**Change Since** + +OpenHarmony SDK 5.1.0.47 + +**Key API/Component Changes** + +N/A + +**Adaptation Guide** + +Currently, the smallest number that **JSON.parse()** can parse is **Number.MIN_VALUE**, which is approximately 5e-324. Before this change, the smallest number that could be parsed was approximately 2.22e-308. + +Example: + +```typescript +let res = JSON.parse('{"num":5e-324}') +console.info(res.num) +``` + +Before the change, the output of this example is: + +``` +Infinity +``` + +After the change, the output of this example is: + +``` +5e-324 +``` diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.47/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.47/changelogs-bundlemanager.md new file mode 100644 index 0000000000000000000000000000000000000000..86ae620b3ad8a9ce412edca6b82485761791d012 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.47/changelogs-bundlemanager.md @@ -0,0 +1,51 @@ +# Bundle Manager Subsystem Changelog + +## cl.bundlemanager.1 installSource Field Specification Change + +**Access Level** + +Public API + +**Reason for Change** + +The **installSource** field is updated to allow you to determine whether an application is a preset one. + +**Impact of the Change** + +This change requires application adaptation. + +Before the change: +The value of **installSource** changes with application updates. + +Values of **installSource** before change: +- **pre-installed**: The application is a preset one installed at initial device startup. +- Bundle name of an application: The preset application is installed from the application mapping to the bundle name. +- **unknown**: The installation source is unknown. + +After the change: +The value of **installSource** does not change with application updates. + +Values of **installSource** after change: +- **pre-installed**: The application is a preset one installed at initial device startup. +- **ota**: The application is a preset one added during system upgrade. +- **recovery**: The preset application is uninstalled and then restored. +- Bundle name of an application: The preset application is installed from the application mapping to the bundle name. +- **unknown**: The installation source is unknown. + +For example, if a preset application whose **installSource** is **pre-installed** is updated on AppGallery, **installSource** is changed to the AppGallery app package name before change and retained as **pre-installed** after change. + +**Start API Level** + +API 12 + +**Change Since** + +OpenHarmony 5.1.0.47 + +**Key API/Component Changes** + +**installSource** field in [ApplicationInfo](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis-ability-kit/js-apis-bundleManager-applicationInfo.md) + +**Adaptation Guide** + +Adapt the preset application to the new specifications. This way, you can determine whether an application is a preset one based on the **installSource** field in [ApplicationInfo](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis-ability-kit/js-apis-bundleManager-applicationInfo.md). diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.50/changelogs-arkcomplier.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.50/changelogs-arkcomplier.md new file mode 100644 index 0000000000000000000000000000000000000000..cd8bb627335886d05226144b5565f2c89a19c75d --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.50/changelogs-arkcomplier.md @@ -0,0 +1,77 @@ +# ArkCompiler Subsystem Changelog + +## cl.arkcompiler.1 ArkTSUtils.ASON.stringify Behavior for Handling undefined in Maps and Sets Aligned with EcmaScript Standard Containers + +**Access Level** + +Public API + +**Reason for Change** + +If an undefined element is added to a Map or Set and then serialized using **ArkTSUtils.ASON.stringify**, the serialization of the undefined element will be skipped. As a result, the serialized JSON string does not comply with the JSON standard, and an exception is thrown when the JSON string is used. + +**Impact of the Change** + +This change does not require application adaptation. + +Before: After an undefined element is added to a Map or Set, the serialized string is an invalid JSON string. Example: + +```ts +import { ArkTSUtils } from '@kit.ArkTS' + +let map = new Map(); +map.set("a", "A"); +map.set("b", undefined); +map.set(undefined, "c"); +console.log(ArkTSUtils.ASON.stringify(map)); +// Output before change: {"a":"A","b":,:"c"} + +let set = new Set(); +set.add("a"); +set.add(undefined); +set.add(null); +console.log(ArkTSUtils.ASON.stringify(set)); +// Output before change: ["a",, null] +``` + +After change: undefined is correctly processed. The string serialized by **ArkTSUtils.ASON.stringify** complies with the JSON specifications. + +The processing specifications of undefined are aligned with those of the standard containers in Ecmascript. Set is aligned with Array, and Map is aligned with Object. +1. The undefined elements in the array are serialized into the null string. +2. In an object, if the value is undefined, the object is not serialized. If the key is undefined and the value is not undefined, the key is serialized as undefined. + +Example: + +```ts +import { ArkTSUtils } from '@kit.ArkTS' + +let map = new Map(); +map.set("a", "A"); +map.set("b", undefined); +map.set(undefined, "c"); +console.log(ArkTSUtils.ASON.stringify(map)); +// Output after change: {"a":"A","undefined":"c"}. + +let set = new Set(); +set.add("a"); +set.add(undefined); +set.add(null); +console.log(ArkTSUtils.ASON.stringify(set)); +// Output after change: ["a",null,null]. +``` + +**Start API Level** + +12 + +**Change Since** + +OpenHarmony SDK 5.1.0.50 + +**Key API/Component Changes** + +**ArkTSUTils.ASON.stringify** in the **arkts.utils.d.ets** file + +**Adaptation Guide** + +After adding undefined elements to a Map or Set, note the change of the return value when **ArkTSUtils.ASON.stringify** is used for serialization. diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.50/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.50/changelogs-bundlemanager.md new file mode 100644 index 0000000000000000000000000000000000000000..bc3e215572e702e342cd4aa8cfa60c0d9f054f65 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.50/changelogs-bundlemanager.md @@ -0,0 +1,35 @@ +# Bundle Manager Subsystem Changelog + +## cl.bundlemanager.1 Prohibition of shortcutId Field Configuration via a Resource Index (Starting with $Character) in the Shortcut Configuration File + +**Access Level** + +Public API + +**Reason for Change** + +The [shortcutId field](https://gitee.com/openharmony/docs/blob/master/en/application-dev/quick-start/module-configuration-file.md#shortcuts) cannot be configured via a resource index (starting with **$**) in the application shortcut configuration file. + +**Impact of the Change** + +Application adaptation is required. + +Before change: **shortcutId** fields can be configured via a resource index (starting with **$**) in the application shortcut configuration file. + +After change: **shortcutId** fields cannot be configured via a resource index (starting with **$**) in the application shortcut configuration file. + +**Start API Level** + +API 8 + +**Change Since** + +OpenHarmony 5.1.0.50 + +**Key API/Component Changes** + +**shortcuts** in **module.json5** + +**Adaptation Guide** + +Do not configure **shortcutId** fields with a resource index (starting with **$**) in the application shortcut configuration file. Use a regular string (not starting with **$**) instead. diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.50/changelogs-multimedia.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.50/changelogs-multimedia.md new file mode 100644 index 0000000000000000000000000000000000000000..e5b700818fd4db497208f545972fb7e26820b8ff --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.50/changelogs-multimedia.md @@ -0,0 +1,35 @@ +# Multimedia Subsystem Changelog + +## cl.multimedia.1 The default behavior of OH_AVCodecOnStreamChanged in the audio decoding scenario is changed. + +**Access Level** + +Public API + +**Reason for Change** + +If parameters such as the sampling rate change during audio decoding, a callback needs to be invoked to notify the caller. + +**Impact of the Change** + +This change does not require application adaptation. + +Before change: If an application has registered the **OH_AVCodecOnStreamChanged** callback by calling **OH_AudioCodec_RegisterCallback**, this callback is triggered when the sampling rate or number of audio channels changes during audio decoding. + +After change: If an application has registered the **OH_AVCodecOnStreamChanged** callback by calling **OH_AudioCodec_RegisterCallback**, this callback is triggered when the sampling rate or number of audio channels changes during audio decoding. + +**Start API Level** + +9 + +**Change Since** + +OpenHarmony SDK 5.1.0.50 + +**Key API/Component Changes** + +**OH_AVCodecOnStreamChanged** in **native_avcodec_base.h**, which is registered by **OH_AudioCodec_RegisterCallback** in **native_avcodec_audiocodec.h** + +**Adaptation Guide** + +No adaptation is required. diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.51/changelogs-arkcompiler.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.51/changelogs-arkcompiler.md new file mode 100644 index 0000000000000000000000000000000000000000..6017c1a1618a724ce4e9c37332c4cdea52c3a72a --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.51/changelogs-arkcompiler.md @@ -0,0 +1,46 @@ +# ArkCompiler Changelog + +## cl.arkcompiler.1 JIT Is Disabled by Default and Requires Permission Certificate and Approval to Enable + +**Access Level** + +Public API + +**Reason for Change** + +The Just In Time (JIT) compilation feature, which compiles code on-the-fly during execution, can pose risks of arbitrary code injection. To safeguard application security and uphold the integrity of the OpenHarmony ecosystem, the system now defaults to disabling the JIT functionality in the JSVM. Instead, it executes JS code through interpretation. + +**Impact of the Change** + +This change requires application adaptation. + +Before the change: +JIT is enabled by default. + +After the change: +JIT is disabled by default and can only be enabled after obtaining a permission certificate. Without JIT, wasm interfaces that rely on JIT fail to execute, and there may be performance differences between JIT and interpretation in specific scenarios. + +**Start API Level** + +API 11 + +**Change Since** + +OpenHarmony SDK 5.1.0.51 + +**Key API/Component Changes** + +| API | Impact | +| ------------------------------- | --------------------------------------------------------------- | +| OH\_JSVM\_CompileWasmModule | Returns JIT\_MODE\_EXPECTED status code without JIT permission. | +| OH\_JSVM\_CompileWasmFunction | Returns JIT\_MODE\_EXPECTED status code without JIT permission. | +| OH\_JSVM\_CreateWasmCache | Returns JIT\_MODE\_EXPECTED status code without JIT permission. | +| OH\_JSVM\_RunScript | Fails to execute scripts containing wasm without JIT permission and may exhibit performance differences in specific scenarios.| + +**Adaptation Guide** + +For new applications that wish to use JIT, you must submit an application for the **ohos.permission.kernel.ALLOW_EXECUTABLE_FORT_MEMORY** restricted ACL permission to the AppGallery Connect (AGC). In your application materials, specify the exact scenarios in which the JIT functionality of the JSVM engine will be used. Once the permission is approved, you can update your profile certificate from the AGC website and repackage your application for release. For details, see [Requesting Restricted Permissions](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V5/declare-permissions-in-acl-V5). + +Precautions +1. If restricted permissions are only declared in the configuration file without a permission profile, the application installation will fail. +2. If the error "The ohos.permission.kernel.ALLOW_EXECUTABLE_FORT_MEMORY permission under requestPermissions must be a value that is predefined within the SDK or a custom one that you have included under definePermissions." is displayed during the compilation process, update the OpenHarmony SDK to the latest version (5.0.2.125 or later). diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.52/changelogs-ability.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.52/changelogs-ability.md new file mode 100644 index 0000000000000000000000000000000000000000..0e675922fcfd75b2411dd42e547971ac99d740af --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.52/changelogs-ability.md @@ -0,0 +1,41 @@ +# Ability Subsystem Changelog + +## cl.ability.1 Behavior Change in startAbility for Full-screen and Split Window Modes + +**Access Level** + +Public API + +**Reason for Change** + +On 2-in-1 devices, when [supportWindowModes](../../../application-dev/reference/apis-ability-kit/js-apis-app-ability-startOptions.md) is configured with the values **fullscreen** and **split**, the window starts in a freeform window state, which is not as expected. + +**Impact of the Change** + +This change requires application adaptation. + +Before the change, when **supportWindowModes** is configured with the values **fullscreen** and **split** on a 2-in-1 devices, windows are launched in freeform window mode. + +After the change, when **supportWindowModes** is configured with the values **fullscreen** and **split** on a 2-in-1 devices, windows are launched in full-screen mode. + + +**Start API Level** + +API 14 + +**Change Since** + +OpenHarmony SDK 5.1.0.52 + +**Key API/Component Changes** + +@ohos.app.ability.StartOptions.d.ts + +**System capability**: SystemCapability.Ability.AbilityRuntime.Core + +API: **supportWindowModes** + +**Adaptation Guide** + +In API version 15 or later, configure windows to launch in full-screen mode when **supportWindowModes** is configured with the values **fullscreen** and **split** on 2-in-1 devices. +If the intention is to start in a freeform window state, add the **floating** configuration item to the existing **supportWindowModes** configuration. diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.52/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.52/changelogs-bundlemanager.md new file mode 100644 index 0000000000000000000000000000000000000000..dd3a79ddc1f97931fa3e6ecd588975675ff8742b --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.52/changelogs-bundlemanager.md @@ -0,0 +1,74 @@ +# Bundle Manager Subsystem Changelog + +## cl.bundlemanager.1 Behavior Change in supportWindowModes for Full-screen and Split Window Modes + +**Access Level** + +Public API + +**Reason for Change** + +On 2-in-1 devices, when [supportWindowModes](../../../application-dev/quick-start/module-configuration-file.md#abilities) is configured with the values **fullscreen** and **split**, the window starts in a freeform window state, which is not as expected. + +**Impact of the Change** + +This change requires application adaptation. + +Before the change, when **supportWindowModes** is configured with the values **fullscreen** and **split** on a 2-in-1 devices, windows are launched in freeform window mode. + +After the change, when **supportWindowModes** is configured with the values **fullscreen** and **split** on a 2-in-1 devices, windows are launched in full-screen mode. + +**Start API Level** + +API 9 + +**Change Since** + +OpenHarmony 5.1.0.52 + +**Key API/Component Changes** + +**supportWindowModes** in **module.json5** + +**Adaptation Guide** + +In API version 15 or later, configure windows to launch in full-screen mode when **supportWindowModes** is configured with the values **fullscreen** and **split** on 2-in-1 devices. +If the intention is to start in a freeform window state, add the **floating** configuration item to the existing **supportWindowModes** configuration. + +## cl.bundlemanager.2 Behavior Change in install for Preinstalled System Applications + +**Access Level** + +System API + +**Reason for Change** + +Previously, any version of a system application can be installed directly, allowing versions earlier than or equal to the preinstalled version to be successfully installed. After the change, when reinstalling a preinstalled system application that has been uninstalled, if a preinstalled version exists, it will be installed first, followed by the target version. If the target version number is earlier than or equal to the preinstalled version number, the target version installation will fail, preventing the installation of system applications with versions earlier than or equal to the preinstalled version. Additionally, the target version application can inherit the preinstalled attributes of the preinstalled version. + +**Impact of the Change** + +This change requires application adaptation. + +Before the change, any version of a system application can be installed directly. + +After the change, when installing a system application, if a preinstalled version exists and has been uninstalled, the preinstalled version is installed first, followed by the target version. If the target version number is later than the preinstalled version, the installation succeeds; otherwise, the preinstalled version is installed successfully, but the target version installation fails. + +**Start API Level** + +API 9 + +**Change Since** + +OpenHarmony 5.1.0.52 + +**Key API/Component Changes** + +APIs in **bundle.installer.d.ts**: + +1. install(hapFilePaths: Array\, installParam: InstallParam, callback: AsyncCallback\) +2. install(hapFilePaths: Array\, callback: AsyncCallback\) +3. install(hapFilePaths: Array\, installParam?: InstallParam): Promise\ + +**Adaptation Guide** + +When installing a preinstalled system application, if the installation fails but the preinstalled version is successfully installed, ensure that the target version number is later than the corresponding preinstalled version number, and then reinstall the specified application. diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.53/changelogs-multimedia.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.53/changelogs-multimedia.md new file mode 100644 index 0000000000000000000000000000000000000000..a603cd69885e5f2143a0ebd3ee697b1249922a36 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.53/changelogs-multimedia.md @@ -0,0 +1,101 @@ +# Multimedia Subsystem Changelog + +## c1.multimedia.1 Behavior Change in the Audio Framework for Identifying USB Audio Device Types +**Access Level** + +Public API + +**Reason for Change** + +Previously, all USB audio devices are recognized by the system as headset input/output devices. To improve recognition accuracy and meet the UX display requirements of applications, the system now differentiates between USB headsets and ordinary USB audio devices (such as speakers). + +**Impact of the Change** + +This change requires application adaptation. + +When audio devices are connected or disconnected, the system reports the type of audio device to the application. Applications can also actively query the available device types through interfaces. For applications targeting API levels before 18, the system behavior remains unchanged. For applications targeting API level 18 and later, the identification and reporting of USB devices have been changed as follows: + +TS APIs + +| Platform| Before Change| After Change| +| --- | ----- | ----- | +| General| If only an input device is present at a USB address, it is recognized as a USB_HEADSET.| If only an input device is present at a USB address, it is recognized as a USB_DEVICE.| +| PC/2-in-1 device| If only an output device is present at a USB address, it is recognized as a USB_HEADSET.| If only an output device is present at a USB address, it is recognized as a USB_DEVICE.| + +NDK APIs +| Platform| Before Change| After Change| +| --- | ----- | ----- | +| General| If only an input device is present at a USB address, it is recognized as an AUDIO_DEVICE_USB_HEADSET.| If only an input device is present at a USB address, it is recognized as an AUDIO_DEVICE_USB_DEVICE.| +| PC/2-in-1 device| If only an output device is present at a USB address, it is recognized as an AUDIO_DEVICE_USB_HEADSET.| If only an output device is present at a USB address, it is recognized as an AUDIO_DEVICE_USB_DEVICE.| + +**Start API Level** + +9 + +**Change Since** + +OpenHarmony 5.1.0.53 + +**Key API/Component Changes** + +After this change, when a single-input or single-output USB audio device is connected to the system, the device type returned by the following APIs changes: + +@ohos.multimedia.audio.d.ts ArkTS APIs: + +| Class | API | +|---|---| +| audio.AudioRoutingManager | getDevices(deviceFlag: DeviceFlag, callback: AsyncCallback\): void | +| audio.AudioRoutingManager | getDevices(deviceFlag: DeviceFlag): Promise\ | +| audio.AudioRoutingManager | getDevicesSync(deviceFlag: DeviceFlag): AudioDeviceDescriptors | +| audio.AudioRoutingManager | getAvailableDevices(deviceUsage: DeviceUsage): AudioDeviceDescriptors | +| audio.AudioRoutingManager | on(type: 'availableDeviceChange', deviceUsage: DeviceUsage, callback: Callback\): void | +| audio.AudioRoutingManager | off(type: 'availableDeviceChange', callback?: Callback\): void | + +C APIs in **native_audio_routing_manager.h**: + +| API| +|--| +| OH_AudioCommon_Result OH_AudioRoutingManager_GetDevices(OH_AudioRoutingManager *audioRoutingManager, OH_AudioDevice_Flag deviceFlag, OH_AudioDeviceDescriptorArray **audioDeviceDescriptorArray) | +| OH_AudioCommon_Result OH_AudioRoutingManager_GetAvailableDevices(OH_AudioRoutingManager *audioRoutingManager, OH_AudioDevice_Usage deviceUsage, OH_AudioDeviceDescriptorArray **audioDeviceDescriptorArray) | + +**Adaptation Guide** + +TS APIs + +If your application has specific handling requirements for USB audio devices, you now need to handle both USB_HEADSET and USB_DEVICE types. +```cpp +// Perform special processing for the USB audio device. +if (devicetype == DeviceType.USB_HEADSET) { + // do sth +} +``` + +After the change, if your application has specific handling requirements for USB audio devices, you now need to handle both USB_HEADSET and USB_DEVICE types. +```cpp +// Perform special processing for the USB audio device. +if (devicetype == DeviceType.USB_HEADSET || devicetype == DeviceType.USB_DEVICE) { + // do sth +} +``` + + +NDK APIs + +If your application has specific handling requirements for USB audio devices, you now need to handle both AUDIO_DEVICE_USB_HEADSET and AUDIO_DEVICE_USB_DEVICE types. + +Before the change, if your application has specific handling requirements for USB audio devices, you only need to handle AUDIO_DEVICE_USB_HEADSET. + +```cpp +// Perform special processing for the USB audio device. +if (devicetype == OH_AudioDevice_Type.AUDIO_DEVICE_USB_HEADSET) { + // do sth +} +``` + +After the change, if your application has specific handling requirements for USB audio devices, you now need to handle both AUDIO_DEVICE_USB_HEADSET and AUDIO_DEVICE_USB_DEVICE types. +```cpp +// Perform special processing for the USB audio device. +if (devicetype == OH_AudioDevice_Type.AUDIO_DEVICE_USB_HEADSET || devicetype == OH_AudioDevice_Type.AUDIO_DEVICE_USB_DEVICE) { + // do sth +} +``` diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.56/changelogs-media.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.56/changelogs-media.md new file mode 100644 index 0000000000000000000000000000000000000000..344491d53c260d1702236e6040f7025cae7b4f09 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.56/changelogs-media.md @@ -0,0 +1,152 @@ +# Media Subsystem Changelog + +## cl.media.1 Behavior Changed for media.createSoundPool When Creating SoundPool + +**Access Level** + +Public API + +**Reason for Change** + +Previously, an application can create only one SoundPool instance within a process, adhering to a singleton pattern, resulting in a failure to meet various use cases. For example, applications using SoundPool often also use the **TimePicker** component, which internally uses SoundPool. The singleton pattern causes interference between SoundPool objects, negatively impacting user experience. + +**Impact of the Change** + +This change does not require application adaptation. + +Before the change, the underlying implementation of SoundPool is a singleton pattern, allowing only one instance per application process. + +After the change, the underlying implementation of SoundPool supports multiple instances, allowing up to 128 instances per application process. + +**Start API Level** + +API 10 + +**Change Since** + +OpenHarmony SDK 5.1.0.56 + +**Key API/Component Changes** + +No API or component change is involved. + +**Adaptation Guide** + +No adaptation is required. + +## cl.media.2 Behavior Changed for getTrackDescription + +**Access Level** + +Public API + +**Reason for Change** + +When the **getTrackDescription** API is used to query track information in scenarios with multiple video, audio, or subtitle tracks, the API returns inaccurate information for non-active tracks, including incorrect video HDR types, audio/subtitle language fields, and non-intuitive default MIME types. The behavior of the API has been modified to return more accurate track information in these cases. + +**Impact of the Change** + +This change does not require application adaptation. + +Before the change, when the API is called to query the track information, non-active tracks had fixed values: hdr_type=0, language=undefined, and MIME types of audio/xxx or video/xxx. + +After the change, when the API is called to query the track information, non-active tracks now have hdr_type and language values consistent with the resource, and MIME types of audio/unknown or video/unknown. +| API | Before Change | After Change | +| :--------------------------------------------------: | :------------------------------: | :---------------------------: | +| getTrackDescription | Non-active tracks have
hdr_type=0, language=undefined, and MIME types of audio/xxx or video/xxx. | Non-active tracks have
have hdr_type and language consistent with the resource, and MIME types of audio/unknown or video/unknown. | + +**Start API Level** + +9 + +**Change Since** + +OpenHarmony SDK 5.1.0.56 + +**Key API/Component Changes** + +APIs in [@ohos.multimedia.media](../../../application-dev/reference/apis-media-kit/js-apis-media.md): +- getTrackDescription(callback: AsyncCallback\\>): void +- getTrackDescription(): Promise\\> + +**Adaptation Guide** + +No adaptation is required. + +## cl.media.3 Behavior Changed for setPlaybackStrategy + +**Access Level** + +Public API + +**Reason for Change** + +Previously, when the **setPlaybackStrategy** API is used, other parameters can take effect only when **mutedMediaType** is set to **MediaType.MEDIA_TYPE_AUD**. The API behavior has been modified to allow setting other properties without setting **mutedMediaType**. For details, see [PlaybackStrategy](../../../application-dev/reference/apis-media-kit/js-apis-media.md#playbackstrategy12). + +**Impact of the Change** + +This change does not require application adaptation. + +Before the change, when this API is used to configure a playback strategy, only parameters set alongside **mutedMediaType** as **MediaType.MEDIA_TYPE_AUD** take effect. + +After the change, any combination of parameters set using this API takes effect. +| API | Before Change | After Change | +| :--------------------------------------------------: | :------------------------------: | :---------------------------: | +| setPlaybackStrategy | Parameters take effect only when **mutedMediaType** is set to
**MediaType.MEDIA_TYPE_AUD**. | Any parameter combination takes effect. | + +**Start API Level** + +12 + +**Change Since** + +OpenHarmony SDK 5.1.0.56 + +**Key API/Component Changes** + +APIs in [@ohos.multimedia.media](../../../application-dev/reference/apis-media-kit/js-apis-media.md): + +setPlaybackStrategy(strategy: PlaybackStrategy): Promise\ + +**Adaptation Guide** + +No adaptation is required. + +## cl.media.4 Behavior Changed for setMediaSource + +**Access Level** + +Public API + +**Reason for Change** + +Previously, setting **mutedMediaType** using **setMediaSource** does not take effect. This behavior has been modified to ensure that parameter settings are effective. For details, see [PlaybackStrategy](../../../application-dev/reference/apis-media-kit/js-apis-media.md#playbackstrategy12). + +**Impact of the Change** + +This change does not require application adaptation. + +Before the change, when this API is used to set **mutedMediaType**, the setting does not take effect. + +After the change, when this API is used to set **mutedMediaType**, the setting takes effect. +| API | Before Change | After Change | +| :--------------------------------------------------: | :------------------------------: | :---------------------------: | +| setMediaSource | Setting **mutedMediaType** does not take effect. | Setting **mutedMediaType** takes effect. | + +**Start API Level** + +12 + +**Change Since** + +OpenHarmony SDK 5.1.0.56 + +**Key API/Component Changes** + +APIs in [@ohos.multimedia.media](../../../application-dev/reference/apis-media-kit/js-apis-media.md): + +setMediaSource(src:MediaSource, strategy?: PlaybackStrategy): Promise\ + +**Adaptation Guide** + +No adaptation is required. diff --git a/en/release-notes/changelogs/OpenHarmony_5.1.0.59/changelogs-arkgraphics2d.md b/en/release-notes/changelogs/OpenHarmony_5.1.0.59/changelogs-arkgraphics2d.md new file mode 100644 index 0000000000000000000000000000000000000000..e8479b620071036f01c385997f968aee07395729 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_5.1.0.59/changelogs-arkgraphics2d.md @@ -0,0 +1,33 @@ +# ArkGraphics2D Changelog + +## c1.ArkGraphics2D.1 OH_Drawing_GpuContextCreateFromGL Deprecated + +**Access Level** + +Public API + +**Reason for Change** + +The specialized API **OH_Drawing_GpuContextCreateFromGL**, which is tightly coupled with the GPU backend, has been deprecated. Instead, use the new interface **OH_DrawingGpuContextCreate**, which abstracts away the GPU backend. + +**Impact of the Change** + +The **OH_Drawing_GpuContextCreateFromGL** API is no longer maintained. + +You are advised to use **OH_Drawing_GpuContextCreate** instead. + +**Start API Level** + +12 + +**Change Since** + +OpenHarmony SDK 5.1.0.59 + +**Deprecated APIs/Components** + +The **OH_Drawing_GpuContextCreateFromGL** API and the **OH_Drawing_GpuContextOptions** struct are deprecated. You are advised to use **OH_Drawing_GpuContextCreate** instead. + +**Adaptation Guide** + +Replace **OH_Drawing_GpuContextCreateFromGL** with **OH_Drawing_GpuContextCreate** in your code. diff --git a/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-ability.md b/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-ability.md new file mode 100644 index 0000000000000000000000000000000000000000..52485d03cbc3ec2881548a35be0299ce2ce56381 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-ability.md @@ -0,0 +1,116 @@ +# Ability Framework Changelog + +## cl.ability.1 AbilityDelegator.startAbility() Error Code Changed + +**Access Level** + +Public API + +**Reason for Change** + +All error codes returned by **AbilityDelegator.startAbility()** are inconsistent with the API documentation. + +**Impact of the Change** + +This change does not require application adaptation. + +The change affects all error codes returned by **AbilityDelegator.startAbility()**. The error code mapping is as follows: + +| Before Change | After Change | +| -------- | -------- | +| 29360128 | 401 | +| 2097199 | 16000001 | +| 2097187 | 16000002 | +| 2097179 | 16000004 | +| 2097208 | 16000005 | +| 2097207 |16000006 | +| 2097203 | 16000008 | +| 11 | 16000009 | +| 2097206 | 16000010 | +| 2097323 | 16000011 | +| 2097204 | 16000012 | +| 2097215 | 16000013 | +| 2097167 | 16000050 | +| 5242881 | 16000053 | +| 29360300 | 16000055 | +| 2097205 | 16200001 | + +**Start API Level** + +API 9 + +**Change Since** + +OpenHarmony SDK 6.0.0.32 + +**Key API/Component Changes** + +**startAbility()** provided by AbilityDelegator + +**Adaptation Guide** + +No adaptation is required. + +For details about the **startAbility()** API provided by AbilityDelegator, see [startAbility](../../../application-dev/reference/apis-test-kit/js-apis-inner-application-abilityDelegator.md#startability9). + +## cl.ability.2 Erasing Invalid URIs When Sharing Files via Want + +**Access Level** + +Public API + +**Reason for Change** + +In file sharing scenarios (where the **flags** field of Want is configured with [wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION](../../../application-dev/reference/apis-ability-kit/js-apis-app-ability-wantConstant.md#flags) or [wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION](../../../application-dev/reference/apis-ability-kit/js-apis-app-ability-wantConstant.md#flags)), an application can pass a single URI through the **uri** field of Want, or pass multiple URIs using the **Key** value of [wantConstant.Params.PARAMS_STREAM](../../../application-dev/reference/apis-ability-kit/js-apis-app-ability-wantConstant.md#params). To ensure that the parameters passed to the target application are valid, the system proactively erases URIs that do not meet the conditions. + +**Impact of the Change** + +This change does not require application adaptation. + +Before change, in file sharing scenarios, if the scheme of the **uri** field in Want is empty, or the scheme of the URIs in the **wantConstant.Params.PARAMS_STREAM** field is not **file**, the system does not perform any processing. + +After change, in file sharing scenarios, if the scheme of the **uri** field in Want is empty, or the scheme of the URIs in the **wantConstant.Params.PARAMS_STREAM** field is not **file**, the system erases the corresponding URI values. + +**Start API Level** + +API 9 + +**Change Since** + +OpenHarmony SDK 6.0.0.32 + +**Key API/Component Changes** + +The APIs related to starting and exiting applications can trigger this change in file sharing scenarios. The involved interfaces are as follows: + +[UIAbilityContext](../../../application-dev/reference/apis-ability-kit/js-apis-inner-application-uiAbilityContext.md#uiabilitycontext): +- startAbility(want: Want, callback: AsyncCallback<void>): void +- startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void +- startAbility(want: Want, options?: StartOptions): Promise<void> +- startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): void +- startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>): void +- startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityResult> +- terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void +- terminateSelfWithResult(parameter: AbilityResult): Promise<void> +- connectServiceExtensionAbility(want: Want, options: ConnectOptions): number +- startAbilityByCall(want: Want): Promise<Caller> +- startUIServiceExtensionAbility(want: Want): Promise<void> +- connectUIServiceExtensionAbility(want: Want, callback: UIServiceExtensionConnectCallback) : Promise<UIServiceProxy> + +[UIExtensionContext](../../../application-dev/reference/apis-ability-kit/js-apis-inner-application-uiExtensionContext.md#uiextensioncontext): + +- startAbility(want: Want, callback: AsyncCallback<void>): void +- startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void +- startAbility(want: Want, options?: StartOptions): Promise<void> +- startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): void +- startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>): void +- startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityResult> +- connectServiceExtensionAbility(want: Want, options: ConnectOptions): number +- terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void +- terminateSelfWithResult(parameter: AbilityResult): Promise<void> +- startUIServiceExtensionAbility(want: Want): Promise<void> +- connectUIServiceExtensionAbility(want: Want, callback: UIServiceExtensionConnectCallback) : Promise<UIServiceProxy> + +**Adaptation Guide** + +No adaptation is required. diff --git a/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-arkts.md b/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-arkts.md new file mode 100644 index 0000000000000000000000000000000000000000..ba1ae5ebd3389a5e98a7677c290174b6b4f06140 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-arkts.md @@ -0,0 +1,61 @@ +# ArkTS Changelog + +## cl.arkts.1 Fix for Array Content Exceptions When Redefining Arrays with Literals After Element Deletion + +**Access Level** + +Public API + +**Reason for Change** + +After an element is deleted from an array defined by a literal, the array content is abnormal when the literal is used to define the array again. + +**Impact of the Change** + +This change requires application adaptation. + +Before the change, when an array defined by a literal has elements deleted and is redefined with the same literal, the new array contains the elements that remained after deletion. + +After the change, when an array defined by a literal has elements deleted and is redefined with the same literal, the new array contains the elements as originally defined by the literal. + +**Start API Level** + +6 + +**Change Since** + +OpenHarmony SDK 6.0.0.32 + +**Key API/Component Changes** + +N/A + +**Adaptation Guide** + +Check for instances where arrays are defined using literals and elements are deleted without other modifications. + +For example: + +```typescript +for (let i = 0; i < 2; i++) { + let arr = [0, 0] + console.log(JSON.stringify(arr)); + delete arr[0]; +} +``` + +Before the change, the output of this example is: + +``` +[0,0] +[null,0] +``` + +After the change, the output of this example is: + +``` +[0,0] +[0,0] +``` + +This change fixes the issue, ensuring that when an array defined by a literal has elements deleted and is redefined with the same literal, the new array contains the elements as originally defined by the literal. diff --git a/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-image.md b/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-image.md new file mode 100644 index 0000000000000000000000000000000000000000..c68e3e5a6fd77cc14f68f583f64d1f8ff2e62188 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-image.md @@ -0,0 +1,66 @@ +# Image Framework Changelog + +## cl.image.1 Changed the Return Value of mimeType in ImageInfo + +**Access Level** + +Public API + +**Reason for Change** + +The interface is used for querying image information, and the current return values do not match the actual formats. +- For raw format images, the actual **mimeType** should reflect the true format. Since the current decoding of raw format images results in **previewImage** or **JpgFromRaw** fields, the incorrect value **image/jpeg** is returned. +- For icon format images, the standard name is not used in the return value. + +**Impact of the Change** + +This change requires application adaptation. + +| Actual Format| Return Value Before Change| Return Value After Change| Decoding Support|Encoding Support| +| --- | --- | --- | --- | --- | +|jpeg|image/jpeg|image/jpeg|Supported|Supported| +|icon|image/ico|image/x-icon|Supported|Not supported| +|dng|image/jpeg|image/x-adobe-dng|Supported|Not supported| +|cr2|image/jpeg|image/x-canon-cr2|Decoding of preview supported|Not supported| +|raf|image/jpeg|image/x-fuji-raf|Decoding of preview supported|Not supported| +|nef|image/jpeg|image/x-nikon-nef|Decoding of preview supported|Not supported| +|nrw|image/jpeg|image/x-nikon-nrw|Decoding of preview supported|Not supported| +|orf|image/jpeg|image/x-olympus-orf|Decoding of preview supported|Not supported| +|rw2|image/jpeg|image/x-panasonic-rw2|Decoding of preview supported|Not supported| +|pef|image/jpeg|image/x-pentax-pef|Decoding of preview supported|Not supported| +|srw|image/jpeg|image/x-samsung-srw|Decoding of preview supported|Not supported| +|arw|image/jpeg|image/x-sony-arw|Decoding of preview supported|Not supported| + + +**Start API Level** + +API 12 + +**Change Since** + +OpenHarmony SDK 6.0.0.32 + +**Key API/Component Changes** + +The return value of the **mimeType** parameter in the ImageInfo object is changed. + +**Adaptation Guide** + +The return value of the image information query interface has changed, but the calling method remains the same. +```js +const context: Context = getContext(this); +// 'test.dng' is only an example. Replace it with the actual one in use. Otherwise, the imageSource instance fails to be created, and subsequent operations cannot be performed. +const path: string = context.filesDir + "/test.dng"; +const imageSourceApi: image.ImageSource = image.createImageSource(path); +if (imageSourceApi != undefined) { + imageSourceApi.getImageInfo().then((imageInfo: image.ImageInfo) => { + console.info("Succeeded in obtaining the image mimeType information."); + // No need to change the calling method. Update the condition here to match the new return value for actual raw formats. + if (imageInfo.mimeType == "image/x-adobe-dng") { + console.info("Image mimeType is image/x-adobe-dng."); + } + }).catch((error: BusinessError) => { + console.error(`Failed to obtain the image information. code is ${error.code}, message is ${error.message}`); + }) +} +``` diff --git a/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-multimedia.md b/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-multimedia.md new file mode 100644 index 0000000000000000000000000000000000000000..05441c4d84d75f7b2a1b3b770ca819c489d357d4 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_6.0.0.32/changelogs-multimedia.md @@ -0,0 +1,34 @@ +# Multimedia Subsystem Changelog + +## cl.multimedia.1 Change in Memory Ownership for Player Usage + +**Access Level** + +Other + +**Reason for Change** + +Currently, the memory used by AVPlayer instances created by applications is uniformly attributed to the operating system. This makes it impossible to manage memory finely based on applications and can easily lead to misuse of AVPlayer instances by applications. This change will associate the memory cache used by the AVPlayer with the application that created the AVPlayer, facilitating the statistical use of resources by applications. + +**Impact of the Change** + +This change requires application adaptation. + +Before the change, when an application uses AVPlayer, the memory used by the AVPlayer is attributed to the operating system's memory usage during memory management. +After the change, when an application uses AVPlayer, the memory used by the AVPlayer is attributed to the application's memory usage during memory management. + +**Start API Level** + +9 + +**Change Since** + +OpenHarmony SDK 6.0.0.32 + +**Key API/Component Changes** + +AVPlayer + +**Adaptation Guide** + +If the number of instances used by an application exceeds the recommended number (16), adjust the number of instances based on its actual memory usage to prevent the application from being terminated by RSS when it transitions to the background. diff --git a/en/release-notes/changelogs/OpenHarmony_6.0.0.39/changelogs-arkts.md b/en/release-notes/changelogs/OpenHarmony_6.0.0.39/changelogs-arkts.md new file mode 100644 index 0000000000000000000000000000000000000000..eda10bdc44309ba4370631368b2f98abc9d2bf65 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_6.0.0.39/changelogs-arkts.md @@ -0,0 +1,81 @@ +# ArkTS Changelog + +## cl.arkts.1 Forward Fix for TreeSet and TreeMap Comparator Loss on Capacity Expansion + +**Access Level** + +Public API + +**Reason for Change** + +When the **add** interface of the TreeSet or TreeMap module triggers a capacity expansion, the custom comparator for TreeSet or TreeMap is lost after the capacity expansion, causing the system to resort to default sorting. + +**Impact of the Change** + +This change requires application adaptation. + +**Before the Change** + +For the following code, the expected results do not match the actual execution results, leading to errors. + +The reason is that the comparator is lost after capacity expansion, causing **remove(a1)** to fail and subsequent behavior to become abnormal. + +```ts +import TreeSet from '@kit.ArkTS'; +class A { +time: number; +constructor(time: number) { + this.time = time; +} +static readonly compared = ((first: A, second: A): number => { + return second.time - first.time; + }); +} +const a1 = new A(1); +const a2 = new A(2); +const a3 = new A(3); +const a4 = new A(4); +const a5 = new A(5); +const a6 = new A(6); +const set = new TreeSet(A.compared); // Comparator A.compared is lost after add triggers a capacity expansion. +set.add(a1); +set.add(a2); +set.add(a3); // Capacity expansion is triggered, and A.compared is lost. +set.add(a4); +set.add(a5); +set.add(a6); +for (let i = 0; i < 5; ++i) { + set.remove(a1); // Two different comparison rules used before and after the capacity expansion, and the data structure integrity is compromised. + console.log(set.has(a1)); + // Expected result: false, false, false, false, false + // Actual result: false, false, true, true, true + set.add(a1); +} +for (let item of set) { + console.log(item.time); + // Expected result: 6, 5, 4, 3, 2, and 1 + // Actual result: 6, 1, 1 +} +``` + +**After modification:** + +The **TaggedTree** comparator remains consistent before and after the capacity expansion. All **add** and **remove** operations on **TaggedTree** use the same comparison rule, and the output results match expectations. + +**Start API Level** + +8 + +**Change Since** + +OpenHarmony SDK 6.0 + +**Key API/Component Changes** + +TreeSet, TreeMap + +**Adaptation Guide** + +This is a behavioral change. In most cases, no adaptation is required. + +If you use custom comparators and have relied on the incorrect results as correct, you should be aware of the changes in TreeSet and TreeMap results and adapt your code according to the fixed results. diff --git a/en/release-notes/changelogs/OpenHarmony_6.0.0.39/changelogs-bundlemanager.md b/en/release-notes/changelogs/OpenHarmony_6.0.0.39/changelogs-bundlemanager.md new file mode 100644 index 0000000000000000000000000000000000000000..102d714036e46c818a311ef4d4199600eef0a167 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_6.0.0.39/changelogs-bundlemanager.md @@ -0,0 +1,163 @@ +# Bundle Manager Subsystem Changelog + +## cl.bundlemanager.1 zlib.unzipFile and zlib.decompressFile Changed + +**Access Level** + +Public API + +**Reason for Change** + +During file decompression, the system intercepts compressed packages that do not meet the format requirements to avoid unexpected decompressed files. + + +**Change Impact** + +This change requires application adaptation. + +Before the change, incorrectly formatted compressed packages can be decompressed, but the decompressed content does not meet expectations. + +After the change, decompression of incorrectly formatted compressed packages fails, and an error code indicating incorrect file format is thrown. + +**Start API Level** + +9 + +**Change Since** + +OpenHarmony SDK 6.0.0.39 + +**Key API/Component Changes** + +[zlib.unzipFile](../../../application-dev/reference/apis-basic-services-kit/js-apis-zlib.md#zlibunzipfiledeprecated) and [zlib.decompressFile](../../../application-dev/reference/apis-basic-services-kit/js-apis-zlib.md#zlibdecompressfile10). + + +**Adaptation Guide** + +When calling the **zlib.unzipFile** and **zlib.decompressFile** APIs, you need to catch interface exceptions, handle them based on the returned error code, and check for errors in the input compressed package. + + +## cl.bundlemanager.2 Parameter Type Changed for getDeveloperIds and sharedBundleDirPaths + +**Access Level** + +System API + +**Reason for Change** + +The return type of [getDeveloperIds](../../../application-dev/reference/apis-ability-kit/js-apis-bundleManager-sys.md#bundlemanagergetdeveloperids12) and the parameter type of [sharedBundleDirPaths](../../../application-dev/reference/apis-ability-kit/js-apis-installer-sys.md#installparam) are actually Array\, but the APIs are declared as Array\, which does not match the actual types and needs to be corrected. + + +**Change Impact** + +This change requires application adaptation. + +Before the change, the return type of [getDeveloperIds](../../../application-dev/reference/apis-ability-kit/js-apis-bundleManager-sys.md#bundlemanagergetdeveloperids12) and the parameter type of [sharedBundleDirPaths](../../../application-dev/reference/apis-ability-kit/js-apis-installer-sys.md#installparam) are Array\. Applications can call them with the Array\ type, and the compilation can pass, but an exception is thrown at runtime. + +After the change, the return type of [getDeveloperIds](../../../application-dev/reference/apis-ability-kit/js-apis-bundleManager-sys.md#bundlemanagergetdeveloperids12) and the parameter type of [sharedBundleDirPaths](../../../application-dev/reference/apis-ability-kit/js-apis-installer-sys.md#installparam) are Array\. Applications can only call them with the Array\ type, and both compilation and runtime execution are normal. + +**Start API Level** + +10 + +**Change Since** + +OpenHarmony SDK 6.0.0.39 + +**Key API/Component Changes** + +| Name| Before Change| After Change| +| -------- | -------- | ---| +| [getDeveloperIds](../../../application-dev/reference/apis-ability-kit/js-apis-bundleManager-sys.md#bundlemanagergetdeveloperids12) | function getDeveloperIds(appDistributionType?: number): Array\ | function getDeveloperIds(appDistributionType?: number): Array\ | +| [InstallParam.sharedBundleDirPaths](../../../application-dev/reference/apis-ability-kit/js-apis-installer-sys.md#installparam) | sharedBundleDirPaths?: Array\ | sharedBundleDirPaths?: Array\ | + + +**Adaptation Guide** + +1. If the application uses the return value of [getDeveloperIds](../../../application-dev/reference/apis-ability-kit/js-apis-bundleManager-sys.md#bundlemanagergetdeveloperids12) as an [getDeveloperIds](../../../application-dev/reference/apis-ability-kit/js-apis-bundleManager-sys.md#bundlemanagergetdeveloperids12) object, it needs to be changed to use it as an Array\. +2. If the application uses the parameter of [InstallParam.sharedBundleDirPaths](../../../application-dev/reference/apis-ability-kit/js-apis-installer-sys.md#installparam) as an Array\ object, it needs to be changed to use it as an Array\. + + +## cl.bundlemanager.3 enableDynamicIcon Changed + +**Access Level** + +System API + +**Reason for Change** + +To ensure that custom theme application icons have a higher priority than dynamic icons, after the change, if the application has a custom theme icon, calling the enable dynamic icon interface will fail, and the application icon on the home screen will not switch to a dynamic icon. + + +**Change Impact** + +This change requires application adaptation. + +Before the change, when custom theme application icon resources exist, the application can successfully call the **enableDynamicIcon** API. + +After the change, when custom theme application icon resources exist, calling the **enableDynamicIcon** API fails, and error code 17700307 is thrown. + + +**Start API Level** + +12 + +**Change Since** + +OpenHarmony SDK 6.0.0.39 + +**Key API/Component Changes** + +[enableDynamicIcon](../../../application-dev/reference/apis-ability-kit/js-apis-bundleManager-sys.md#bundlemanagerenabledynamicicon12) + + +**Adaptation Guide** + +Applications need to catch the newly added error code 17700307 and handle it. + + +## cl.bundlemanager.4 Behavior Changed and Control Increased for Ability Kit Related Common Events + +**Access Level** + +Public API + +**Reason for Change** + +Some common events in Ability Kit contain application information, which poses a security risk of information leakage and requires increased control. + +**Change Impact** + +This change requires application adaptation. + +Controls are added for subscribers of the following common events: [COMMON_EVENT_PACKAGE_ADDED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_added), [COMMON_EVENT_PACKAGE_REMOVED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_removed), [COMMON_EVENT_PACKAGE_CHANGED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_changed), [COMMON_EVENT_PACKAGE_RESTARTED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_restarted), [COMMON_EVENT_PACKAGE_DATA_CLEARED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_data_cleared), [COMMON_EVENT_PACKAGE_CACHE_CLEARED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_cache_cleared), and [COMMON_EVENT_QUICK_FIX_APPLY_RESULT](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_quick_fix_apply_result). + +Before the change, both system applications and third-party applications can listen for these events. + +After the change, system applications can listen for events for their own applications and other applications, whereas third-party applications can only listen for events for their own applications. + +**Start API Level** + +9 + +**Change Since** + +OpenHarmony SDK 6.0.0.39 + +**Key API/Component Changes** + +Changed common events: +| Event Name| Description| +| -------- | -------- | +| [COMMON_EVENT_PACKAGE_ADDED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_added) | Event indicating that an application is installed.| +| [COMMON_EVENT_PACKAGE_REMOVED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_removed) | Event indicating that an application is uninstalled.| +| [COMMON_EVENT_PACKAGE_CHANGED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_changed) | Event indicating that an application is updated.| +| [COMMON_EVENT_PACKAGE_RESTARTED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_restarted) | Event indicating that an application is restarted.| +| [COMMON_EVENT_PACKAGE_DATA_CLEARED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_data_cleared) | Event indicating that the application data is cleared.| +| [COMMON_EVENT_PACKAGE_CACHE_CLEARED](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_package_cache_cleared) | Event indicating that the application cache data is cleared.| +| [COMMON_EVENT_QUICK_FIX_APPLY_RESULT](../../../application-dev/reference/apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_quick_fix_apply_result) | Event indicating that the application enables the quick fix package.| + + +**Adaptation Guide** + +If you use the above common events to determine whether an application is installed, switch to using the [canOpenLink](../../../application-dev/reference/apis-ability-kit/js-apis-bundleManager.md#bundlemanagercanopenlink12) API to check whether the application exists. diff --git a/en/release-notes/changelogs/OpenHarmony_6.0.0.39/changelogs-third-party-library.md b/en/release-notes/changelogs/OpenHarmony_6.0.0.39/changelogs-third-party-library.md new file mode 100644 index 0000000000000000000000000000000000000000..7146348c367520c5181fd3950acb0420e2b22443 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_6.0.0.39/changelogs-third-party-library.md @@ -0,0 +1,70 @@ +# Third-Party Library Changelog + +## libc++ condition_variable::wait_for Changed + +**Access Level** + +Public API + +**Reason for Change** + +Before the change, the **condition_variable::wait_for** API of the libc++ library uses the system wall clock time, which is affected by changes to the system time and does not meet expectations. + +``` +template +cv_status +condition_variable::wait_for(unique_lock& __lk, + const chrono::duration<_Rep, _Period>& __d) +{ + ... + +#if defined(_LIBCPP_HAS_COND_CLOCKWAIT) + using __clock_tp_ns = time_point; + __ns_rep __now_count_ns = _VSTD::__safe_nanosecond_cast(__c_now.time_since_epoch()).count(); +#else + using __clock_tp_ns = time_point; + __ns_rep __now_count_ns = _VSTD::__safe_nanosecond_cast(system_clock::now().time_since_epoch()).count(); +#endif + + ... + __do_timed_wait(...); + ... +} +``` + +``` +void +condition_variable::__do_timed_wait(unique_lock& lk, + chrono::time_point tp) noexcept +{ + ... + nanoseconds d = tp.time_since_epoch(); + if (d > nanoseconds(0x59682F000000E941)) + d = nanoseconds(0x59682F000000E941); + ... + int ec = __libcpp_condvar_timedwait(&__cv_, lk.mutex()->native_handle(), &ts); + ... +} +``` + +Here, 0x59682F000000E941 ns = 6442450944s = 2174-02-25 17:42:24. When the current system time plus the wait time specified in the **wait_for** API exceeds this value, it gets truncated, and **__libcpp_condvar_timedwait** returns immediately. + +**Impact of the Change** + +This change requires application adaptation. + +- Before the change, the **condition_variable::wait_for** API of the libc++ library uses the system wall clock time and is affected by changes to the system time. When the current system time plus the wait time specified in the API exceeded a specific value (0x59682F000000E941), the **condition_variable::wait_for** API returns immediately. + +- After the change, the **condition_variable::wait_for** API of the libc++ library uses a monotonically increasing time and is not affected by changes to the system time. + +**Start API Level** + +9 + +**Change Since** + +OpenHarmony SDK 6.0.0.39 + +**Adaptation Guide** + +The libc++ library is released in binary form in the NDK (**libc++_shared.so**). The prototype of the **condition_variable::wait_for** API remains unchanged. Only the implementation has been aligned with the C++ standard and platforms like Android, iOS, and Windows. You can simply recompile your applications after updating the NDK.