OpenHarmony 4.0.3.2 has the following changes in the APIs of the pasteboard subsystem:
## cl.pasteboard.1 convertToTextV9 API Change
Renamed **convertToTextV9****toPlainText()** and changed the API from asynchronous to synchronous.
**Change Impact**
Applications developed using the **convertToTextV9** API in versions earlier than OpenHarmony 4.0.3.3 cannot be used in OpenHarmony 4.0.3.3 and later versions.
Replace **convertToTextV9**, an asynchronous API, with **toPlainText**, a synchronous API.
## cl.pasteboard.2 ShareOption Enum Name Change
Changed the enum names of **ShareOption** from UpperCamelCase to all caps.
**Change Impact**
Applications developed using the **InApp/LocalDevice/CrossDevice** attributes in versions earlier than OpenHarmony 4.0.3.3 cannot be used in OpenHarmony 4.0.3.3 and later versions.
**Key API/Component Changes**
ShareOption<sup>9+</sup>
Before change:
| Name| Value| Description |
| ---- |---|-------------------|
| InApp | 0 | Only intra-application pasting is allowed. |
| LocalDevice | 1 | Paste is allowed in any application on the local device.|
| CrossDevice | 2 | Paste is allowed in any application across devices. |
After change:
| Name| Value| Description |
| ---- |---|-------------------|
| INAPP | 0 | Only intra-application pasting is allowed. |
| LOCALDEVICE | 1 | Paste is allowed in any application on the local device.|
| CROSSDEVICE | 2 | Paste is allowed in any application across devices. |
Changes that affect contract compatibility of the last version should be described in the changelog. The changes include but are not limited to those related to API names, parameters, return values, required permissions, call sequence, enumerated values, configuration parameters, and paths. The last version can be an LTS, release, beta, or monthly version, or the like. Contract compatibility, also called semantic compatibility, means that the original program behavior should remain consistent over versions.
## cl.subsystemname.x xxx Function Change (Example: DeviceType Attribute Change or Camera Permission Change. Use a short description.)
Add the number **cl.*subsystemname*.*x*** before each change title, where **cl** is the abbreviation of changelog, *subsystemname* is the standard English name of the subsystem, and *x* indicates the change sequence number (starting from 1 in ascending order).
Describe the changes in terms of functions. Example: *n* and *m* of the *a* function are changed. Developers need to adapt their applications based on the change description.
If there is a requirement or design document corresponding to the change, attach the requirement number or design document number in the description.
**Change Impact**
Describe whether released APIs (JS or native APIs) are affected or API behavior is changed.
Describe whether available applications are affected, that is, whether an adaptation is required for building the application code in the SDK environment of the new version.
**Key API/Component Changes**
List the API/component changes involved in the function change.
**Adaptation Guide**
Provide guidance for developers on how to adapt their application to the changes to be compatible with the new version.
## cl.device_manager.1 Error Information Return Method Change of APIs
The device manager API uses service logic return values to indicate the error information, which does not comply with the API error code specifications of OpenHarmony. The following changes are made in API version 9 and later:
Asynchronous API: An error message is returned via **AsyncCallback** or the **error** object of **Promise**.
Synchronous API: An error message is returned via an exception.
**Change Impact**
The application developed based on earlier versions needs to adapt the method for returning API error information. Otherwise, the original service logic will be affected.
**Key API/Component Changes**
Error code processing is added for the following APIs:
- The event types passed to the **continuationManager.on** and **continuationManager.off** APIs do not comply with the OpenHarmony API specifications.
- The return value of **continuationManager.on** varies with the event type, which does not comply with the OpenHarmony API specifications.
The following changes have been made:
- Changed the event type **deviceConnect** to **deviceSelected** and **deviceDisconnect** to **deviceUnselected** in the **continuationManager.on** and **continuationManager.off** APIs.
- Changed the return value of **continuationManager.on** to **Callback<Array<ContinuationResult>>** for all events.
**Change Impact**
The application developed based on earlier versions needs to be adapted. Otherwise, the service logic will be affected.
## cl.DistributedManagerService.2 Adding DATASYNC Permission Verification to continuationManager APIs
In earlier versions, the **continuationManager** APIs do not verify the caller, which does not comply with the OpenHarmony API specifications.
Now, before using a **continuationManager** API, the caller must apply for the **ohos.permission.DISTRIBUTED_DATASYNC** permission.
**Change Impact**
The application developed based on earlier versions needs to apply for the **ohos.permission.DISTRIBUTED_DATASYNC** permission in advance. Otherwise, the service logic will be affected.
## cl.multimedia.media.001 Change of VideoRecorder APIs to System APIs
In the MR version, the formal **AVRecorder** APIs (integrating audio and video) will be provided for external use.
**VideoRecorder** APIs in API version 9 are changed to system APIs, which are available only to system users. In the future, **VideoRecorder** APIs will be deprecated after system users switch to **AVRecorder**.
**Change Impact**
If the **VideoRecorder** caller is not a system user, the call will fail.
Involved APIs and enums:
function createVideoRecorder(callback: AsyncCallback<VideoRecorder>): void;
function createVideoRecorder(): Promise<VideoRecorder>;
## cl.multimedia.media.002 No Externally Provided Bit Rate Selection API in VideoPlayer
In API version 9, **VideoPlayer** does not externally provide the bit rate selection API. Such an API will be provided by **AVPlayer** in the MR version.
**Change Impact**
Bit rate selection cannot be performed in the multi-bit rate scenario of **VideoPlayer**. Relevant functions will be provided by **AVPlayer**.
Released JS APIs are affected. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version.
**Key API/Component Changes**
| OpenHarmony 3.2.8.1 API | OpenHarmony 3.2.9.1 SP8 API |
Changes that affect contract compatibility of the last version should be described in the changelog. The changes include but are not limited to those related to API names, parameters, return values, required permissions, call sequence, enumerated values, configuration parameters, and paths. The last version can be an LTS, release, beta, or monthly version, or the like. Contract compatibility, also called semantic compatibility, means that the original program behavior should remain consistent over versions.
## cl.subsystemname.x xxx Function Change (Example: DeviceType Attribute Change or Camera Permission Change. Use a short description.)
Add the number **cl.*subsystemname*.*x*** before each change title, where **cl** is the abbreviation of changelog, *subsystemname* is the standard English name of the subsystem, and *x* indicates the change sequence number (starting from 1 in ascending order).
Describe the changes in terms of functions. Example: *n* and *m* of the *a* function are changed. Developers need to adapt their applications based on the change description.
If there is a requirement or design document corresponding to the change, attach the requirement number or design document number in the description.
**Change Impact**
Describe whether released APIs (JS or native APIs) are affected or API behavior is changed.
Describe whether available applications are affected, that is, whether an adaptation is required for building the application code in the SDK environment of the new version.
**Key API/Component Changes**
List the API/component changes involved in the function change.
**Adaptation Guide**
Provide guidance for developers on how to adapt their application to the changes to be compatible with the new version.
The **requestPermissionsFromUser** API of **UIAbilityContext** is migrated from the ability subsystem to the security subsystem.
Previously, the permission popup was implemented based on **UIAbility**, which used the **startAbilityForResult** API of **UIAbilityContext** to return the permission authorization result to the caller. Therefore, **requestPermissionsFromUser** was temporarily placed in **UIAbilityContext**. The permission popup is now implemented based on **ServiceExtensionAbility**, which no longer requires **startAbilityForResult** of **UIAbilityContext**. Therefore, **requestPermissionsFromUser** is migrated to the security subsystem.
You need to adapt your application based on the following information.
**Change Impact**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|
console.error('Failed to start ability',err.code);
})
}
```
## cl.ability.2 Deletion of Deprecated APIs in API Version 9
In the [Ability Exception Rectification](../OpenHarmony_3.2.8.3/changelogs-ability.md) document, some APIs in API version 9 have been marked as deprecated. According to API specifications of OpenHarmony, these APIs should be deleted.
**Change Impact**
The application developed based on earlier versions needs to use new APIs to replace the deleted ones. Otherwise, the application compilation will be affected.
-**direction**, **screenDensity**, **displayId**, and **hasPointerDevice** of **Configuration** are deleted. Use **Configuration** of **@ohos.app.ability.Configuration.d.ts**.
- @ohos.application.ConfigurationConstant.d.ts
-**Direction** and **ScreenDensity** are deleted. Use **Direction** and **ScreenDensity** of **@ohos.app.ability.ConfigurationConstant.d.ts**.
- @ohos.application.abilityManager.d.ts
-**getExtensionRunningInfos** and **getTopAbility** are deleted. Use the APIs with the same name in **@ohos.app.ability.abilityManager.d.ts**.
- @ohos.application.appManager.d.ts
-**ApplicationState** and **ProcessState** are deleted. Use **ApplicationState** and **ProcessState** of **@ohos.app.ability.appManager.d.ts**.
-**registerApplicationStateObserver** and **getProcessRunningInformation** are deleted. Use the APIs with the same name in **@ohos.app.ability.appManager.d.ts**.
- @ohos.application.formHost.d.ts
-**shareForm** and **notifyFormsPrivacyProtected** are deleted. Use the APIs with the same name in **@ohos.app.form.formHost.d.ts**.
- @ohos.application.formInfo.d.ts
-**eTS** of **FormType** is deleted. Use **eTS** of **FormType** in **@ohos.app.form.formInfo.d.ts**.
-**IDENTITY_KEY**, **BUNDLE_NAME_KEY**, **ABILITY_NAME_KEY**, and **DEVICE_ID_KEY** of **FormParam** are deleted. Use the enums with the same name in **@ohos.app.form.formInfo.d.ts**.
-**FormInfoFilter** is deleted. Use **FormInfoFilter** of **@ohos.app.form.formInfo.d.ts**.
-**FormDimension** is deleted. Use **FormDimension** of **@ohos.app.form.formInfo.d.ts**.
-**VisibilityType** is deleted. Use **VisibilityType** of **@ohos.app.form.formInfo.d.ts**.
- @ohos.wantAgent.d.ts
-**trigger** and **getOperationType** are deleted. Use the APIs with the same name in **@ohos.app.ability.wantAgent.d.ts**.
- application/ApplicationContext.d.ts
-**registerAbilityLifecycleCallback**, **unregisterAbilityLifecycleCallback**, **registerEnvironmentCallback**, and **unregisterEnvironmentCallback** are deleted. Use **on** and **off**.
- application/ServiceExtensionContext.d.ts
-**connectAbility**, **connectAbilityWithAccount**, and **disconnectAbility** are deleted. Use **connectServiceExtensionAbility**, **connectServiceExtensionAbilityWithAccount**, and **disconnectServiceExtensionAbility**.
- @ohos.application.FormExtension.d.ts
-**onCreate**, **onCastToNormal**, **onUpdate**, **onVisibilityChange**, **onEvent**, **onDestroy**, **onAcquireFormState**, and **onShare** are deleted. Use the following lifecycle methods of **@ohos.app.form.FormExtensionAbility.d.ts**: **onAddForm**, **onCastToNormalForm**, **onUpdateForm**, **onChangeFormVisibility**, **onFormEvent**, **onRemoveForm**, **onAcquireFormState**, and **onShareForm**.
- @ohos.application.abilityDelegatorRegistry.d.ts
-**AbilityDelegator**, **AbilityDelegatorArgs**, **AbilityMonitor**, and **ShellCmdResult** are deleted. Use the classes with the same name in **@ohos.app.ability.abilityDelegatorRegistry.d.ts**.
- @ohos.application.abilityManager.d.ts
-**AbilityRunningInfo** and **ExtensionRunningInfo** are deleted. Use the classes with the same name in **@ohos.app.ability.abilityManager.d.ts**.
- @ohos.application.appManager.d.ts
-**AbilityStateData**, **AppStateData**, **ApplicationStateObserver**, **ProcessRunningInfo**, and **ProcessRunningInformation** are deleted. Use the classes with the same name in **@ohos.app.ability.appManager.d.ts**.
- @ohos.application.missionManager.d.ts
-**MissionInfo**, **MissionListener**, and **MissionSnapshot** are deleted. Use the classes with the same name in **@ohos.app.ability.missionManager.d.ts**.
- @ohos.wantAgent.d.ts
-**TriggerInfo** and **WantAgentInfo** are deleted. Use the classes with the same name in **@ohos.app.ability.wantAgent.d.ts**.
**Adaptation Guide**
As mentioned above, only several APIs have their names changed in terms of, for example, the registration callbacks (**registerAbilityLifecycleCallback**, **unregisterAbilityLifecycleCallback**, **registerEnvironmentCallback**, and **unregisterEnvironmentCallback**) and connection and disconnection **ServiceExtensionAbility** (**connectAbility**, **connectAbilityWithAccount**, and **disconnectAbility**). For such APIs, replace their names with those of their corresponding new APIs in the lifecycle callbacks.
Most APIs are moved to the new namespace. Therefore, you can modify **import** for adaptation.
For example, the original API uses **@ohos.application.Ability**:
```js
importAbilityfrom'@ohos.application.Ability';
```
You can directly modify **import** to switch to the new namespace:
```js
importAbilityfrom'@ohos.app.ability.UIAbility';
```
In addition, exception handling is needed. For details, see the API reference for the new APIs.
## cl.ability.2 RestartFlag Attribute Names Changed and Unsupported Attribute Deleted in appRecovery
In the **appRecovery** API, the enum names of **RestartFlag** are changed from **NO_RESTART** upon a specific fault to **RESTART** upon a specific fault.
The **CPP_CRASH_NO_RESTART** enum is deleted.
**Change Impact**
If your application uses the **CPP_CRASH_NO_RESTART**, **JS_CRASH_NO_RESTART**, or **APP_FREEZE_NO_RESTART** attribute in versions earlier than 3.2.10.6, its behavior will change after an upgrade to 3.2.10.6.
## cl.commonlibrary.1 Error Code and Information Change
The error codes and information returned by APIs of the **ArrayList**, **List**, **LinkedList**, **Stack**, **Queue**, **Deque**, **PlainArray**, **LightWeightMap**, **LightWeightSet**, **HashMap**, **HashSet**, **TreeMap**, and **TreeSet** classes are changed.
For details about the changed error codes, see [Utils Error Codes](../../../application-dev/reference/errorcodes/errorcode-utils.md).
No adaptation is required for applications developed using these APIs.
**Key API/Component Changes**
Error code information is redefined for APIs in these classes and marked using **'@throws'** in the *.d.ts file of the corresponding module.
The sample code is as follows:
**ArrayList** class before the change:
constructor();
**ArrayList** class after the change:
@throws { BusinessError } 10200012 - The ArrayList's constructor cannot be directly invoked.
The **MediaLibrary** class of the multimedia component is replaced by the **FilePicker** class.
**Change Impact**
For applications developed based on earlier versions, pay attention to the changes of APIs. **FilePicker** is a system application preset in OpenHarmony. You can use it to select and save files.
**Key API/Component Changes**
The APIs of **MediaLibrary**, located in **@ohos.multimedia.medialibrary**, are deprecated. The **FilePicker** class, located in [@ohos.file.picker](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.file.picker.d.ts) is used.
Rectified the original APIs of **backgroundTaskManager** of the resource scheduler subsystem. All APIs of API version 9 in the **@ohos.backgroundTaskManager.d.ts** file are deleted, and the APIs of API version 9 in the **@ohos.resourceschedule.backgroundTaskManager.d.ts** file are used. The new APIs in API version 9 comply with the error code specifications.
**Change Impacts**
If your application is developed based on the SDK versions of OpenHarmony 3.2.10.5 and later, adapt to the modules and APIs in API version 9 and the pattern for returning error codes. Otherwise, the service logic will be affected.
**Key API/Component Changes**
The following methods, attributes, enums, and constants are changed in API version 9 and later versions. All the APIs in the **@ohos.backgroundTaskManager.d.ts** file are migrated to the **@ohos.resourceschedule.backgroundTaskManager.d.ts** file.
| Class| API Type| Declaration| Description|
| -- | -- | -- | -- |
| backgroundTaskManager | method | function resetAllEfficiencyResources(): void; | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager | method | function applyEfficiencyResources(request: EfficiencyResourcesRequest): bool; | Changed in API version 9 to **function applyEfficiencyResources(request: EfficiencyResourcesRequest): void;** and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.ResourceType | enum | export enum ResourceType | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.ResourceType | enum | CPU = 1 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.ResourceType | enum | COMMON_EVENT = 1 << 1 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.ResourceType | enum | TIMER = 1 << 2 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.ResourceType | enum | WORK_SCHEDULER = 1 << 3 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.ResourceType | enum | BLUETOOTH = 1 << 4 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.ResourceType | enum | GPS = 1 << 5 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.ResourceType | enum | AUDIO = 1 << 6 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.EfficiencyResourcesRequest | interface | export interface EfficiencyResourcesRequest | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.EfficiencyResourcesRequest | field | reason: string | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.EfficiencyResourcesRequest | field | isProcess?: bool | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.EfficiencyResourcesRequest | field | isPersist?: bool | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.EfficiencyResourcesRequest | field | timeOut: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.EfficiencyResourcesRequest | field | isApply: bool | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
| backgroundTaskManager.EfficiencyResourcesRequest | field | resourceTypes: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
**Adaptation Guide**
Import the **backgroundTaskManager** module.
```
import bundle form '@ohos.resourceschedule.backgroundTaskManager'
```
Exception handling also needs to be adapted. For details, see the [backgroundTaskManager API reference](../../../application-dev/reference/apis/js-apis-resourceschedule-backgroundTaskManager.md).
## c2.resourceschedule.workScheduler
Rectified the original APIs of **workScheduler** of the resource scheduler subsystem. All APIs of API version 9 in the **@ohos.workScheduler.d.ts** file are deleted, and the APIs of API version 9 in the **@ohos.resourceschedule.workScheduler.d.ts** file are used. The new APIs in API version 9 comply with the error code specifications.
**Change Impacts**
If your application is developed based on the SDK versions of OpenHarmony 3.2.10.5 and later, adapt to the modules and APIs in API version 9 and the pattern for returning error codes. Otherwise, the service logic will be affected.
**Key API/Component Changes**
The following methods, attributes, enums, and constants are changed in API version 9 and later versions. The **@ohos.workScheduler.d.ts** file is deleted, and all the APIs in it are moved to the **@ohos.resourceschedule.workScheduler.d.ts** file.
| Class| API Type| Declaration| Change Type|
| -- | -- | -- | -- |
| workScheduler | namespace | declare namespace workScheduler | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | interface | export interface WorkInfo | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | parameters?: {[key: string]: any} | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | idleWaitTime?: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | isDeepIdle?: boolean | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | repeatCount?: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | isRepeat?: boolean | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | repeatCycleTime?: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | storageRequest?: StorageRequest | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | batteryStatus?: BatteryStatus | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | batteryLevel?: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | chargerType?: ChargingType | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | isCharging?: boolean | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | networkType?: NetworkType | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | isPersisted?: boolean | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | abilityName: string | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | bundleName: string | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.WorkInfo | field | workId: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler | method | function isLastWorkTimeOut(workId: number): Promise; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler | method | function isLastWorkTimeOut(workId: number, callback: AsyncCallback<void>): boolean; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler | method | function stopAndClearWorks(): boolean; | Changed in API version 8 to **function stopAndClearWorks(): boolean;** and moved to the **ohos.resourceschedule.workScheduler.d.ts** file|
| workScheduler | method | function obtainAllWorks(): Promise<Array<WorkInfo>>; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler | method | function obtainAllWorks(callback: AsyncCallback<void>): Array<WorkInfo>; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler | method | function getWorkStatus(workId: number): Promise<WorkInfo>; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler | method | function getWorkStatus(workId: number, callback: AsyncCallback<WorkInfo>): void; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler | method | function stopWork(work: WorkInfo, needCancel?: boolean): boolean; | Changed in API version 8 to **function stopWork(work: WorkInfo, needCancel?: boolean): void;** and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler | method | function startWork(work: WorkInfo): boolean; | Changed in API version 9 to **function startWork(work: WorkInfo): void;** and moved to the **ohos.resourceschedule.workScheduler.d.ts** file|
| workScheduler.NetworkType | enum | export enum NetworkType | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.NetworkType | enum | NETWORK_TYPE_ANY = 0 | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.NetworkType | enum | NETWORK_TYPE_MOBILE | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.NetworkType | enum | NETWORK_TYPE_BLUETOOTH | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI_P2P | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.NetworkType | enum | NETWORK_TYPE_ETHERNET | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.ChargingType | enum | export enum ChargingType | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.ChargingType | enum | CHARGING_PLUGGED_ANY = 0 | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.ChargingType | enum | CHARGING_PLUGGED_AC | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.ChargingType | enum | CHARGING_PLUGGED_USB | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.ChargingType | enum | CHARGING_PLUGGED_WIRELESS | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.BatteryStatus | enum | export enum BatteryStatus | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW = 0 | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.BatteryStatus | enum | BATTERY_STATUS_OKAY | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW_OR_OKAY | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.StorageRequest | enum | export enum StorageRequest | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW = 0 | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_OKAY | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW_OR_OKAY | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
**Adaptation Guide**
Import the **workScheduler** module.
```
import bundle form '@ohos.resourceschedule.workScheduler'
```
Exception handling also needs to be adapted. For details, see the [workScheduler API reference](../../../application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md).
The constructor function of the **URLParams** class in the URL module of the common library subsystem is changed.
Specifically, **constructor(init?: string[][] | Record<string, string> | string | URLSearchParams)** is changed to **constructor(init?: string[][] | Record<string, string> | string | URLParams)**, and the parameter type is changed from **URLSearchParams** to **URLParams**.
You need to adapt your application.
**Change Impacts**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|
console.error(`Fail to ceate URLParams.codeis${err.code},message is ${err.message}`);
}
```
## cl.commonlibrary.2 URL Attribute Changes of URLParams Class APIs
The URL attributes of the URL module in the common library subsystem are changed.
Specifically, the **searchParams: URLSearchParams** attribute is deprecated, and the **params: URLParams** attribute is added.
You need to adapt your application.
**Change Impacts**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|
## cl.window.1 Change of Window Stage Lifecycle Listener Types
Changed the enumerated listener types of the window stage lifecycle in version 3.2.10.5 and later.
**Change Impacts**
Application lifecycle listeners developed using **FOREGROUND** and **BACKGROUND** in versions earlier than 3.2.10.5 will be invalidated in version 3.2.10.5 and later.
**Key API/Component Changes**
## WindowStageEventType<sup>9+</sup>
Before change
| Name | Value | Description |
| ---------- | ---- | ---------- |
| FOREGROUND | 1 | The window stage is running in the foreground.|
| BACKGROUND | 4 | The window stage is running in the background.|
After change
| Name | Value | Description |
| ------ | ---- | ---------- |
| SHOWN | 1 | The window stage is running in the foreground.|
| HIDDEN | 4 | The window stage is running in the background.|
**Adaptation Guide**
When registering lifecycle listeners, change the foreground and background event types to **SHOWN** and **HIDDEN**, respectively.
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|
The **killProcessesBySelf** API is renamed **killAllProcesses**.
**Change Impact**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|
The **getProcessRunningInformation** API is renamed **getRunningProcessInformation**.
**Change Impact**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|
**WantConstant.Flags** has multiple invalid flag definitions. These invalid flags are deleted.
**Change Impact**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|
**WantConstant.Action** has multiple invalid action definitions. These invalid actions are deleted.
**Change Impact**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|
Caller APIs use the **Parcelable** and **MessageSequence** objects provided by RPC in API version 9 to replace the deprecated **Sequenceable** and **MessageParcel** object.
**Change Impact**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|
The **wantConstant** API had two similar enums. Now the two enums are combined into one.
**Change Impact**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|
The **getAbilityIcon** API in [@ohos.bundle.bundleManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleManager.d.ts) is deleted. The **getMediaContent** API in [@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts) can be used instead.
**Change Impact**<br>
The **getAbilityIcon** API does not take effect.
**Key API/Component Changes**<br>
The **getAbilityIcon** API is deleted from **@ohos.bundle.bundleManager.d.ts**.
**Adaptation Guide**<br>
If your application uses **getAbilityIcon** in **@ohos.bundle.bundleManager.d.ts**, replace it with **getMediaContent** in **@ohos.resourceManager.d.ts**. You need to obtain the icon ID in advance. For details, see [Usage Guide](../../../application-dev/reference/apis/js-apis-resource-manager.md#getmediacontent9).
## cl.bundlemanager.2 Bottom-Layer Capability Changed So That Only the System Resource HAP Supports Custom Permissions
Only the system resource HAP supports custom permissions. During HAP parsing, the bundle manager module parses the **definePermissions** field only in the configuration file of the resource HAP (bundle name: **ohos.global.systemres**), but not this field in other HAPs. This field is used to define permissions.
If an application requires custom permissions, add the permissions under the **definePermissions** field in the [configuration file](https://gitee.com/openharmony/utils_system_resources/blob/master/systemres/main/config.json) of the system resource HAP. For details about the permission format, see [Defining Permissions](../../../application-dev/quick-start/module-structure.md#internal-structure-of-the-definepermissions-attribute).
**Change Impact**<br>
After an upgrade to the new version image, the custom permission of the application does not take effect, and the authorization fails.
**Key API/Component Changes**<br>
The bottom-layer capability of the bundle manager module is changed. Only the system resource HAP supports custom permissions.
**Adaptation Guide**<br>
If an application requires custom permissions, add the permissions under the **definePermissions** field in the [configuration file](https://gitee.com/openharmony/utils_system_resources/blob/master/systemres/main/config.json) of the system resource HAP. For details about the permission format, see [Defining Permissions](../../../application-dev/quick-start/module-structure.md#internal-structure-of-the-definepermissions-attribute).
To sum up, except **packInfo**, which is changed to **BundlePackInfo**, the other file names are changed to start with uppercase letters.
**Change Impact**<br>
The change of the level-2 module file names does not affect the use of the level-1 module. If a level-2 module interface under **bundleManager** is directly imported to the .ts file and an error is reported during compilation on DevEco Studio, you must change the name of the imported file.
**Key API/Component Changes**<br>
The .d.ts file names in the **bundleManager** folder are changed to their respective API names in the file.
**Adaptation Guide**<br>
Generally, no adaptation is required. If a file in the **bundleManager** folder is directly imported to the application, you must change the imported file name as follows:
## cl.bundlemanager.4 LaunchType Enum Type Name Changed from STANDARD to MULTITON
The enum type name of [LaunchType](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleManager.d.ts) is changed from **STANDARD** to **MULTITON**. The enum value remains unchanged, indicating the multi-instance type.
**Change Impact**<br>
The **LaunchType.STANDARD** type does not take effect.
**Key API/Component Changes**<br>
The enum type name of **LaunchType** is changed from **STANDARD** to **MULTITON**.
**Adaptation Guide**<br>
Change **LaunchType.STANDARD** to **LaunchType.MULTITON** for your application.
## cl.bundlemanager.5 Changed the isVisible Field in the AbilityInfo Struct to exported
The **isVisible** field in the [AbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/AbilityInfo.d.ts) struct is changed to **exported**. The type remains unchanged, indicating whether the ability can be exported and used by other abilities.
**Change Impact**<br>
The **isVisible** field does not take effect.
**Key API/Component Changes**<br>
The **isVisible** field in the [AbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/AbilityInfo.d.ts) struct is changed to **exported**, and the type remains unchanged.
**Adaptation Guide**<br>
Change **isVisible** to **exported** for your application.
## cl.bundlemanager.6 Changed the isVisible Field in the ExtensionAbilityInfo Struct to exported
The **isVisible** field in the [ExtensionAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ExtensionAbilityInfo.d.ts) struct is changed to **exported**. The type remains unchanged, indicating whether the ability can be exported and used by other abilities.
**Change Impact**<br>
The **isVisible** field does not take effect.
**Key API/Component Changes**<br>
The **isVisible** field in the [ExtensionAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ExtensionAbilityInfo.d.ts) struct is changed to **exported**, and the type remains unchanged.
**Adaptation Guide**<br>
Change **isVisible** to **exported** for your application.
## cl.bundlemanager.7 Changed the visible Field in the ModuleAbilityInfo Struct to exported
The **visible** field in the [ModuleAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundlePackInfo.d.ts) struct is changed to **exported**. The type remains unchanged, indicating whether the ability can be exported and used by other abilities.
**Change Impact**<br>
The **visible** field does not take effect.
**Key API/Component Changes**<br>
The **visible** field in the [ModuleAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundlePackInfo.d.ts) struct is changed to **exported**, and the type remains unchanged.
**Adaptation Guide**<br>
Change **visible** to **exported** for your application.
## cl.bundlemanager.8 Deleted the distributedNotificationEnabled Tag from the app.json Configuration File
The [distributedNotificationEnabled](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file.
**Change Impact**<br>
If this tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Delete this tag from the configuration file.
## cl.bundlemanager.9 Deleted the entityType Tag from the app.json Configuration File
The [entityType](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file.
**Change Impact**<br>
If this tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Delete this tag from the configuration file.
## cl.bundlemanager.10 Deleted the keepAlive Tag from the app.json Configuration File
The [keepAlive](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file.
**Change Impact**<br>
If this tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Delete this tag from the configuration file.
## cl.bundlemanager.11 Deleted the removable Tag from the app.json Configuration File
The [removable](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file.
**Change Impact**<br>
If this tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Delete this tag from the configuration file.
## cl.bundlemanager.12 Deleted the singleton Tag from the app.json Configuration File
The [singleton](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file.
**Change Impact**<br>
If this tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Delete this tag from the configuration file.
## cl.bundlemanager.13 Deleted the userDataClearable Tag from the app.json Configuration File
The [userDataClearable](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file.
**Change Impact**<br>
If this tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Delete this tag from the configuration file.
## cl.bundlemanager.14 No Longer Chinese Characters for the name Tag under module in the module.json Configuration File
The value of [name](../../../application-dev/quick-start/module-configuration-file.md) under **module** in the **module.json** configuration file does not support Chinese characters.
**Change Impact**<br>
If the tag is set to Chinese, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Set this tag to English.
## cl.bundlemanager.15 No Longer Chinese Characters for the name Tag under ability in the module.json Configuration File
The value of [name](../../../application-dev/quick-start/module-configuration-file.md) under **ability** in the **module.json** configuration file does not support Chinese characters.
**Change Impact**<br>
If the tag is set to Chinese, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Set this tag to English.
## cl.bundlemanager.16 Deleted the uiSyntax Tag from the module.json Configuration File
The [uiSyntax](../../../application-dev/quick-start/module-configuration-file.md) tag is deleted from the **module.json** configuration file.
**Change Impact**<br>
If this tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Delete this tag from the configuration file.
## cl.bundlemanager.17 Changed srcEntrance to srcEntry in the module.json Configuration File
The [srcEntrance](../../../application-dev/quick-start/module-configuration-file.md) tag under **module** and **ability** in the **module.json** configuration file is changed to **srcEntry**.
**Change Impact**<br>
If the **srcEntrance** tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Replace the **srcEntrance** tag with **srcEntry** in the configuration file.
## cl.bundlemanager.18 Deleted the apiVersion Tag Under distroFilter from the module.json Configuration File
The **apiVersion** tag under [distroFilter](../../../application-dev/quick-start/module-configuration-file.md) is deleted from the **module.json** configuration file.
**Change Impact**<br>
If this tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Delete this tag from the configuration file.
## cl.bundlemanager.19 Changed distroFilter to distributionFilter in the module.json Configuration File
The [distroFilter](../../../application-dev/quick-start/module-configuration-file.md) tag in the **module.json** configuration file is changed to **distributionFilter**.
**Change Impact**<br>
If the **distroFilter** tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Replace **distroFilter** with **distributionFilter** in the configuration file.
## cl.bundlemanager.20 Changed standard of launchType to multiton in the module.json Configuration File
The **standard** mode of the [launchType](../../../application-dev/quick-start/module-configuration-file.md) tag in the **module.json** file is changed to **multiton**.
**Adaptation Guide**<br>
Replace **standard** of **launchType** to **multiton** in the configuration file.
## cl.bundlemanager.21 Deleted the atomicService Tag from the app.json File
The **atomicService** tag is deleted from the **app.json** file.
**Change Impact**<br>
If this tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Delete the **atomicService** tag from your code.
## cl.bundlemanager.22 Added the bundleType Tag to the app.json File
The **bundleType** tag is added to the **app.json** file.
**Change Impact**<br>
For an existing ability with [installationFree](../../../application-dev/quick-start/module-configuration-file.md) set to **true**, **bundleType** must be set to **atomicService** in the **app.json** file. Otherwise, the packaging fails.
**Adaptation Guide**<br>
Add the [bundleType](../../../application-dev/quick-start/app-configuration-file.md) tag. This tag can be left blank. The default value is **app**. The setting of this tag and the [installationFree](../../../application-dev/quick-start/module-configuration-file.md) field in the **module.json** file must meet the following rules:
- If **bundleType** is **app**, **installationFree** must be set to **false**.
- If **bundleType** is **atomicService**, **installationFree** must be set to **true**.
## cl.bundlemanager.23 Deleted the split Field from the ApplicationInfo Struct
The **split** field is deleted from the [ApplicationInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts) struct.
**Change Impact**<br>
If the **split** field is used in your code, the compilation fails.
**Key API/Component Changes**<br>
The **split** field is deleted from the [ApplicationInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts) struct.
**Adaptation Guide**<br>
Delete the **split** field from the **ApplicationInfo** struct of your code. The stage model always forcibly splits bundles.
## cl.bundlemanager.24 Deleted the atomicServiceModuleType Field from the HapModuleInfo Struct
The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct.
**Change Impact**<br>
If the **atomicServiceModuleType** field is used in your code, the compilation fails.
**Key API/Component Changes**<br>
The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct.
**Adaptation Guide**<br>
Record the setting of the **atomicServiceModuleType** field, delete it from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct, and set the **moduleType** field in the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct to the recorded value.
## cl.bundlemanager.25 Deleted the AtomicServiceModuleType Enumerated Value
The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct.
**Change Impact**<br>
If the **atomicServiceModuleType** field is used in your code, the compilation fails.
**Key API/Component Changes**<br>
The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct.
**Adaptation Guide**<br>
Record the setting of the **atomicServiceModuleType** field, delete it from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct, and set the **moduleType** field in the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct to the recorded value.
The data type of the **parameters** attribute value is changed. Specifically, the number, string, and boolean types are supported, but the any type is not.
**Change Impact**
For applications developed based on OpenHarmony3.2.10.7 and later SDK versions, the **parameters** attribute value can use the number, string, and boolean types only. If it uses the any type, a compilation error is reported.
**Key API/Component Changes**
The **parameters** attribute in @ohos.resourceschedule.workScheduler.d.ts is changed.
| Class| API Type| Statement Before the Change| Statement After the Change|
| -- | -- | -- | -- |
| workScheduler.WorkInfo | field | parameters?: {[key: string]: any} | parameters?: {[key: string]: number | string | boolean} |
**Adaptation Guide**
The **parameters** attribute uses the {[key: string]: number | string | boolean} data type.
Compared with OpenHarmony 3.2 Beta4, OpenHarmony 3.2.10.7(MR) has the following API changes in the util subsystem.
## cl.util.1. randomUUID Name Changed
The **randomUUID** function name is changed to **generateRandomUUID**.
Before change: function randomUUID(entropyCache?: boolean): string <br>After change: function generateRandomUUID(entropyCache?: boolean): string
You need to adapt your application.
**Change Impact**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
| @ohos.util | function randomUUID(entropyCache?: boolean): string | Deleted |
| @ohos.util | function generateRandomUUID(entropyCache?: boolean): string| Added |
**Adaptation Guide**
Refer to the code snippet below to call **generateRandomUUID** in your application.
Example:
```ts
importutilfrom'@ohos.util'
letuuid=util.generateRandomUUID(true);
console.log("RFC 4122 Version 4 UUID:"+uuid);
// Output:
// RFC 4122 Version 4 UUID:88368f2a-d5db-47d8-a05f-534fab0a0045
```
## cl.util.2 randomBinaryUUID Name Changed
The **randomBinaryUUID** function name is changed to **generateRandomBinaryUUID**.
Before change: function randomBinaryUUID(entropyCache?: boolean): Uint8Array<br>After change: function generateRandomBinaryUUID(entropyCache?: boolean): Uint8Array
You need to adapt your application.
**Change Impact**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
## cl.util.3. contains Parameter Type in the LRUCache Class Changed
The **contains** parameter type in the LRUCache class is changed from **object** to **K**.
Before change: contains(key: object): boolean <br>After change: contains(key: K): boolean
You need to adapt your application.
**Change Impact**
JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
**Key API/Component Changes**
| Module | Class | Method/Attribute/Enum/Constant | Change Type|