diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.1.5/changelogs-geoLocationManager.md b/en/release-notes/changelogs/OpenHarmony_4.0.1.5/changelogs-geoLocationManager.md new file mode 100644 index 0000000000000000000000000000000000000000..610a18c426c33ef08212dfa28070f9053bd4d44e --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_4.0.1.5/changelogs-geoLocationManager.md @@ -0,0 +1,18 @@ +# Location Subsystem ChangeLog + +## cl.location.1 Deletion of the geoLocationManager.requestEnableLocation API in API Version 9 + +When the location function is disabled, your application can call the **geoLocationManager.requestEnableLocation** API to request the user to enable the location function. However, this API is seldom used, and user experience for this API is not very good because the user is not notified of the scenario in which your application uses the location information. + +Therefore, your app shows a popup, asking the user to go to the settings page and enable the location function. In addition, the popup clearly states the scenarios in which the location information will be used, improving user experience. + +**Change Impacts** + +Your application cannot use the **geoLocationManager.requestEnableLocation** API in API version 9 to request the user to enable the location function. Instead, you need to implement a popup asking the user to enable the location function for your application. + +**Key API/Component Changes** + +| Class | API Type| Declaration | Change Type | +| ------------------ | -------- | ------------------------------------------------------------ | ------------------ | +| geoLocationManager | method | function requestEnableLocation(callback: AsyncCallback<boolean>): void; | Deleted from API version 9| +| geoLocationManager | method | function requestEnableLocation(): Promise<boolean>; | Deleted from API version 9| diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-global.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-global.md new file mode 100644 index 0000000000000000000000000000000000000000..7192f94cba5682b78cd477953ed521bc42434609 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-global.md @@ -0,0 +1,41 @@ +# Globalization Subsystem ChangeLog + +## cl.global.1 Runtime Authentication Added for System APIs + +The internationalization component of the globalization subsystem adds runtime authentication for system APIs in certain scenarios. The following changes are made in API version 9 and later: + - Setting the system language, country or region, and area + - Setting the 24-hour format of the system + - Adding and removing the preferred language + - Setting localized numbers + +You need to adapt your application based on the following information. + +**Change Impacts** + +APIs involved in the preceding scenarios can be properly called only by system applications that have the **UPDATE_CONFIGURATION** permission. + +**Key API/Component Changes** + + - Involved APIs: + - setSystemLanguage(language: string): void; + - setSystemRegion(region: string): void; + - setSystemLocale(locale: string): void; + - set24HourClock(option: boolean): void; + - addPreferredLanguage(language: string, index?: number): void; + - removePreferredLanguage(index: number): void; + - setUsingLocalDigit(flag: boolean): void; + +**Adaptation Guide** + +Make sure the application trying to call any of the above APIs is a system application. Non-system applications are not allowed to call the APIs. +An exception will be thrown upon lack of a necessary permission or a call request from a non-system application. The exception can be captured via **try-catch**. + +```js +import I18n from '@ohos.i18n' + +try { + I18n.System.setSystemLanguage('zh'); +} catch(error) { + console.error(`call System.setSystemLanguage failed, error code: ${error.code}, message: ${error.message}.`) +} +``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-usb.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-usb.md new file mode 100644 index 0000000000000000000000000000000000000000..9a5e30e4a4c8d24266d966f9ac6dc249748cfa60 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-usb.md @@ -0,0 +1,18 @@ +USB Manager ChangeLog + +## cl.usb_manager.1 System API Change + +Runtime authentication is performed for system APIs of the USB manager. An asynchronous API throws an error code via **Promise.reject**. + +If your application is developed based on earlier versions, modify the return values of functions. Otherwise, the original service logic will be affected. + +**Key API/Component Changes** + +| Bundle Name | Original API | New API | +| --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| ohos.usbV9.d.ts | function setCurrentFunctions(funcs: FunctionType): Promise; | function setCurrentFunctions(funcs: FunctionType): Promise; | +| ohos.usbV9.d.ts | function setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise; | function setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise; | + +**Adaptation Guide** + +For details, see the [reference](../../../application-dev/reference/errorcodes/errorcode-universal.md) for each API.