• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Resource Scheduler Subsystem Changelog
2
3## cl.resourceschedule.backgroundTaskManager
4Rectified original APIs of **backgroundTaskManager** of the resource scheduler subsystem. All APIs in API version 8 and earlier versions are deprecated, and original APIs in API version 9 are deleted. New APIs in API version 9 need to be used. The new APIs in API version 9 comply with the error code specifications.
5
6**Change Impact**
7
8The application developed based on the SDK versions of OpenHarmony 3.2.8.2 and later needs to adapt the modules and APIs in API version 9 and their methods for returning API error information. Otherwise, the original service logic will be affected.
9
10**Key API/Component Changes**
11
12The following methods, attributes, enums, and constants are changed in API version 9 and later versions. The **@ohos.backgroundTaskManager.d.ts** file is deprecated and related APIs are moved to the newly added **@ohos.resourceschedule.backgroundTaskManager.d.ts** file.
13
14| Class| API Type| Declaration| Description|
15|  -- | -- | -- | -- |
16| backgroundTaskManager | namespace | declare namespace backgroundTaskManager | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
17| backgroundTaskManager | method | function resetAllEfficiencyResources(): void; | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
18| 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.|
19| backgroundTaskManager | method | function stopBackgroundRunning(context: Context): Promise<void>; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
20| backgroundTaskManager | method | function stopBackgroundRunning(context: Context, callback: AsyncCallback<void>): void; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
21| backgroundTaskManager | method | function startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent): Promise<void>; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
22| backgroundTaskManager | method | function startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent, callback: AsyncCallback<void>): void; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
23| backgroundTaskManager | method | function requestSuspendDelay(reason: string, callback: Callback<void>): DelaySuspendInfo; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
24| backgroundTaskManager | method | function getRemainingDelayTime(requestId: number): Promise<number>; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
25| backgroundTaskManager | method | function getRemainingDelayTime(requestId: number, callback: AsyncCallback<number>): void; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
26| backgroundTaskManager | method | function cancelSuspendDelay(requestId: number): void; | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
27| backgroundTaskManager.BackgroundMode | enum | export enum BackgroundMode | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
28| backgroundTaskManager.BackgroundMode | enum | DATA_TRANSFER = 1 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
29| backgroundTaskManager.BackgroundMode | enum | AUDIO_PLAYBACK = 2 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
30| backgroundTaskManager.BackgroundMode | enum | AUDIO_RECORDING = 3 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
31| backgroundTaskManager.BackgroundMode | enum | LOCATION = 4 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
32| backgroundTaskManager.BackgroundMode | enum | BLUETOOTH_INTERACTION = 5 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
33| backgroundTaskManager.BackgroundMode | enum | MULTI_DEVICE_CONNECTION = 6 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
34| backgroundTaskManager.BackgroundMode | enum | WIFI_INTERACTION = 7 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
35| backgroundTaskManager.BackgroundMode | enum | VOIP = 8 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
36| backgroundTaskManager.BackgroundMode | enum | TASK_KEEPING = 9 | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
37| backgroundTaskManager.DelaySuspendInfo | interface | interface DelaySuspendInfo | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
38| backgroundTaskManager.DelaySuspendInfo | field | requestId: number | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
39| backgroundTaskManager.DelaySuspendInfo | field | actualDelayTime: number | Deprecated in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
40| backgroundTaskManager.ResourceType | enum | export enum ResourceType | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
41| backgroundTaskManager.ResourceType | enum | CPU = 1 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
42| backgroundTaskManager.ResourceType | enum | COMMON_EVENT = 1 << 1 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
43| backgroundTaskManager.ResourceType | enum | TIMER = 1 << 2 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
44| backgroundTaskManager.ResourceType | enum | WORK_SCHEDULER = 1 << 3 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
45| backgroundTaskManager.ResourceType | enum | BLUETOOTH = 1 << 4 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
46| backgroundTaskManager.ResourceType | enum | GPS = 1 << 5 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
47| backgroundTaskManager.ResourceType | enum | AUDIO = 1 << 6 | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
48| backgroundTaskManager.EfficiencyResourcesRequest | interface | export interface EfficiencyResourcesRequest | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
49| backgroundTaskManager.EfficiencyResourcesRequest | field | reason: string | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
50| backgroundTaskManager.EfficiencyResourcesRequest | field | isProcess?: bool | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
51| backgroundTaskManager.EfficiencyResourcesRequest | field | isPersist?: bool | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
52| backgroundTaskManager.EfficiencyResourcesRequest | field | timeOut: number | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
53| backgroundTaskManager.EfficiencyResourcesRequest | field | isApply: bool | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
54| backgroundTaskManager.EfficiencyResourcesRequest | field | resourceTypes: number | Changed in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.|
55
56
57**Adaptation Guide**
58
59Import the **backgroundTaskManager** module.
60```
61import bundle form '@ohos.resourceschedule.backgroundTaskManager'
62```
63Exception handling also needs to be adapted. For details, see the [backgroundTaskManager API reference](../../../application-dev/reference/apis/js-apis-resourceschedule-backgroundTaskManager.md).
64
65## c2.resourceschedule.usageStatistics
66Rectified original APIs of **deviceUsageStatistics** of the resource scheduler subsystem. All APIs in API version 8 and earlier versions are deprecated, and original APIs in API version 9 are deleted. New APIs in API version 9 need to be used. The new APIs in API version 9 comply with the error code specifications.
67
68**Change Impact**
69
70The application developed based on the SDK versions of OpenHarmony 3.2.8.2 and later needs to adapt the modules and APIs in API version 9 and their methods for returning API error information. Otherwise, the original service logic will be affected.
71
72**Key API/Component Changes**
73
74The following methods, attributes, enums, and constants are changed in API version 9 and later versions. The **@ohos.bundleState.d.ts** file is deprecated, the **@ohos.resourceschedule.usageStatistics.d.ts** file is added, and the class name is changed from **bundleState** to **usageStatistics**.
75
76| Class                                     | API Type | Method/Attribute/Enum/Constant                                         | Change Type                                                    |
77| ----------------------------------------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
78| bundleState                               | method    | function isIdleState(bundleName: string, callback: AsyncCallback<boolean>): void; | Deprecated and moved to **usageStatistics.isIdleState**.                     |
79| bundleState                               | method    | function isIdleState(bundleName: string): Promise<boolean>;  | Deprecated and moved to **usageStatistics.isIdleState**.                     |
80| bundleState                               | method    | function queryAppUsagePriorityGroup(callback: AsyncCallback<number>): void; | Deprecated and changed to **function queryAppGroup(callback: AsyncCallback<number>): void;**.|
81| bundleState                               | method    | function queryAppUsagePriorityGroup(): Promise<number>;      | Deprecated and changed to **function queryAppGroup(): Promise<number>;**.      |
82| bundleState                               | method    | function queryBundleStateInfos(begin: number, end: number, callback: AsyncCallback<BundleActiveInfoResponse>): void; | Deprecated and changed to **function queryBundleStatsInfos(begin: number, end: number, callback: AsyncCallback<BundleStatsMap>): void;**.|
83| bundleState                               | method    | function queryBundleStateInfos(begin: number, end: number): Promise<BundleActiveInfoResponse>; | Deprecated and changed to **function queryBundleStatsInfos(begin: number, end: number): Promise<BundleStatsMap>;**.|
84| bundleState                               | method    | function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number): Promise<Array<BundleStateInfo>>; | Deprecated and changed to **function queryBundleStatsInfoByInterval(byInterval: IntervalType, begin: number, end: number): Promise<Array<BundleStatsInfo>>;**.|
85| bundleState                               | method    | function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number, callback: AsyncCallback<Array<BundleStateInfo>>): void; | Deprecated and changed to **function queryBundleStatsInfoByInterval(byInterval: IntervalType, begin: number, end: number, callback: AsyncCallback<Array<BundleStatsInfo>>): void;**.|
86| bundleState                               | method    | function queryBundleActiveStates(begin: number, end: number): Promise<Array<BundleActiveState>>; | Deprecated and changed to **function queryBundleEvents(begin: number, end: number): Promise<Array<BundleEvents>>;**.|
87| bundleState                               | method    | function queryBundleActiveStates(begin: number, end: number, callback: AsyncCallback<Array<BundleActiveState>>): void; | Deprecated and changed to **function queryBundleEvents(begin: number, end: number, callback: AsyncCallback<Array<BundleEvents>>): void;**.|
88| bundleState                               | method    | function queryCurrentBundleActiveStates(begin: number, end: number): Promise<Array<BundleActiveState>>; | Deprecated and changed to **function queryCurrentBundleEvents(begin: number, end: number): Promise<Array<BundleEvents>>;**.|
89| bundleState                               | method    | function queryCurrentBundleActiveStates(begin: number, end: number, callback: AsyncCallback<Array<BundleActiveState>>): void; | Deprecated and changed to **function queryCurrentBundleEvents(begin: number, end: number, callback: AsyncCallback<Array<BundleEvents>>): void;**.|
90| bundleState                               | method    | function getRecentlyUsedModules(maxNum?: number): Promise<Array<BundleActiveModuleInfo>>; | Deprecated and changed to **function QueryModuleUsageRecords(maxNum: number): Promise<Array<HapModuleInfo>>;** and **function QueryModuleUsageRecords(): Promise<Array<HapModuleInfo>>;**.|
91| bundleState                               | method    | function getRecentlyUsedModules(maxNum?: number, callback: AsyncCallback<Array<BundleActiveModuleInfo>>): void; | Deprecated and changed to **function QueryModuleUsageRecords(maxNum: number, callback: AsyncCallback<Array<HapModuleInfo>>): void;** and **function QueryModuleUsageRecords(callback: AsyncCallback<Array<HapModuleInfo>>): void;**.|
92| bundleState                               | method    | function queryAppUsagePriorityGroup(bundleName? : string): Promise<number>; | Deprecated and changed to **function queryAppGroup(bundleName: string): Promise<number>;**.|
93| bundleState                               | method    | function queryAppUsagePriorityGroup(bundleName? : string, callback: AsyncCallback<number>): void; | Deprecated and changed to **function queryAppGroup(bundleName: string, callback: AsyncCallback<number>): void;**.|
94| bundleState                               | method    | function setBundleGroup(bundleName: string, newGroup: GroupType, callback: AsyncCallback<void>): void; | Deprecated and changed to **function setAppGroup(bundleName: string, newGroup: GroupType, callback: AsyncCallback<void>): void;**.|
95| bundleState                               | method    | function setBundleGroup(bundleName: string, newGroup: GroupType): Promise<void>; | Deprecated and changed to **function setAppGroup(bundleName: string, newGroup: GroupType): Promise<void>;**.|
96| bundleState                               | method    | function registerGroupCallBack(callback: Callback<BundleActiveGroupCallbackInfo>, callback: AsyncCallback<void>): void; | Deprecated and changed to **function registerAppGroupCallBack(callback: Callback<AppGroupCallbackInfo>, callback: AsyncCallback<void>): void;**.|
97| bundleState                               | method    | function registerGroupCallBack(callback: Callback<BundleActiveGroupCallbackInfo>): Promise<void>; | Deprecated and changed to **function registerAppGroupCallBack(callback: Callback<AppGroupCallbackInfo>): Promise<void>;**.|
98| bundleState                               | method    | function unRegisterGroupCallBack(callback: AsyncCallback<void>): void; | Changed to **function unregisterAppGroupCallBack(): Promise<void>;**.|
99| bundleState                               | method    | function unRegisterGroupCallBack(): Promise<void>;           | Changed to **function unregisterAppGroupCallBack(): Promise<void>;**.|
100| bundleState                               | method    | function queryBundleActiveEventStates(begin: number, end: number, callback: AsyncCallback<Array<BundleActiveEventState>>): void; | Changed to **function queryDeviceEventStats(begin: number, end: number, callback: AsyncCallback<Array<DeviceEventStats>>): void;**|
101| bundleState                               | method    | function queryBundleActiveEventStates(begin: number, end: number): Promise<Array<BundleActiveEventState>>; | Changed in API version 9 to **function queryDeviceEventStats(begin: number, end: number): Promise<Array<DeviceEventStats>>;**.|
102| bundleState                               | method    | function queryAppNotificationNumber(begin: number, end: number, callback: AsyncCallback<Array<BundleActiveEventState>>): void; | Changed in API version 9 to **function queryNotificationEventStats(begin: number, end: number, callback: AsyncCallback<Array<NotificationEventStats >>): void;**.|
103| bundleState                               | method    | function queryAppNotificationNumber(begin: number, end: number): Promise<Array<BundleActiveEventState>>; | Changed in API version 9 to **function queryNotificationEventStats(begin: number, end: number): Promise<Array<NotificationEventStats >>;**.|
104| bundleState.BundleActiveGroupCallbackInfo | interface | interface BundleActiveGroupCallbackInfo                      | Moved to **usageStatistics.AppGroupCallbackInfo**.            |
105| bundleState.BundleActiveGroupCallbackInfo | field     | bundleName: string                                           | Moved to **usageStatistics.AppGroupCallbackInfo**.            |
106| bundleState.BundleActiveGroupCallbackInfo | field     | changeReason: number                                         | Moved to **usageStatistics.AppGroupCallbackInfo**.            |
107| bundleState.BundleActiveGroupCallbackInfo | field     | userId: number                                               | Moved to **usageStatistics.AppGroupCallbackInfo**.            |
108| bundleState.BundleActiveGroupCallbackInfo | field     | appUsageNewGroup: number                                     | Deprecated and changed to **appNewGroup**.                                     |
109| bundleState.BundleActiveGroupCallbackInfo | field     | appUsageOldGroup: number                                     | Deprecated and changed to **appOldGroup**.                                     |
110| bundleState.BundleActiveEventState        | interface | interface BundleActiveEventState                             | Deprecated and changed to **usageStatistics.DeviceEventStats**.                |
111| bundleState.BundleActiveEventState        | field     | count: number                                                | Moved to **usageStatistics.DeviceEventStats**.                |
112| bundleState.BundleActiveEventState        | field     | eventId: number                                              | Moved to **usageStatistics.DeviceEventStats**.                |
113| bundleState.BundleActiveEventState        | field     | name: string                                                 | Moved to **usageStatistics.DeviceEventStats**.                |
114| bundleState.BundleActiveModuleInfo        | interface | interface BundleActiveModuleInfo                             | Changed in API version 9 to **usageStatistics.HapModuleInfo**.         |
115| bundleState.BundleActiveModuleInfo        | field     | formRecords: Array<BundleActiveFormInfo>                     | Changed to **formRecords: Array<HapModuleInfo>**.               |
116| bundleState.BundleActiveModuleInfo        | field     | lastModuleUsedTime: number                                   | Moved to **usageStatistics.HapModuleInfo**.                   |
117| bundleState.BundleActiveModuleInfo        | field     | launchedCount: number                                        | Moved to **usageStatistics.HapModuleInfo**.                   |
118| bundleState.BundleActiveModuleInfo        | field     | abilityIconId?: number                                       | Moved to **usageStatistics.HapModuleInfo**.                   |
119| bundleState.BundleActiveModuleInfo        | field     | abilityDescriptionId?: number                                | Moved to **usageStatistics.HapModuleInfo**.                   |
120| bundleState.BundleActiveModuleInfo        | field     | abilityLableId?: number                                      | Moved to **usageStatistics.HapModuleInfo**.                   |
121| bundleState.BundleActiveModuleInfo        | field     | descriptionId?: number;                                      | Moved to **usageStatistics.HapModuleInfo**.                   |
122| bundleState.BundleActiveModuleInfo        | field     | labelId?: number                                             | Moved to **usageStatistics.HapModuleInfo**.                   |
123| bundleState.BundleActiveModuleInfo        | field     | appLabelId?: number                                          | Moved to **usageStatistics.HapModuleInfo**.                   |
124| bundleState.BundleActiveModuleInfo        | field     | abilityName?: string                                         | Moved to **usageStatistics.HapModuleInfo**.                   |
125| bundleState.BundleActiveModuleInfo        | field     | moduleName: string                                           | Moved to **usageStatistics.HapModuleInfo**.                   |
126| bundleState.BundleActiveModuleInfo        | field     | bundleName: string                                           | Moved to **usageStatistics.HapModuleInfo**.                   |
127| bundleState.BundleActiveModuleInfo        | field     | deviceId?: string                                            | Moved to **usageStatistics.HapModuleInfo**.                   |
128| bundleState.GroupType                     | enum      | enum GroupType                                               | Moved to **usageStatistics.GroupType**.                       |
129| bundleState.GroupType                     | enum      | ACTIVE_GROUP_ALIVE                                           | Deprecated and changed to **ALIVE_GROUP**.                                     |
130| bundleState.GroupType                     | enum      | ACTIVE_GROUP_DAILY                                           | Deprecated and changed to **DAILY_GROUP**.                                     |
131| bundleState.GroupType                     | enum      | ACTIVE_GROUP_FIXED                                           | Deprecated and changed to **FIXED_GROUP**.                                     |
132| bundleState.GroupType                     | enum      | ACTIVE_GROUP_RARE                                            | Deprecated and changed to **RARE_GROUP**.                                      |
133| bundleState.GroupType                     | enum      | ACTIVE_GROUP_LIMIT                                           | Deprecated and changed to **LIMITED_GROUP**.                                   |
134| bundleState.GroupType                     | enum      | ACTIVE_GROUP_NEVER                                           | Deprecated and changed to **NEVER_GROUP**.                                     |
135| bundleState.IntervalType                  | enum      | enum IntervalType                                            | Deprecated and moved to **usageStatistics.IntervalType**.                    |
136| bundleState.IntervalType                  | enum      | BY_OPTIMIZED                                                 | Deprecated and moved to **usageStatistics.IntervalType**.                    |
137| bundleState.IntervalType                  | enum      | BY_DAILY                                                     | Deprecated and moved to **usageStatistics.IntervalType**.                    |
138| bundleState.IntervalType                  | enum      | BY_WEEKLY                                                    | Deprecated and moved to **usageStatistics.IntervalType**.                    |
139| bundleState.IntervalType                  | enum      | BY_MONTHLY                                                   | Deprecated and moved to **usageStatistics.IntervalType**.                    |
140| bundleState.IntervalType                  | enum      | BY_ANNUALLY                                                  | Deprecated and moved to **usageStatistics.IntervalType**.                    |
141| bundleState.BundleActiveInfoResponse      | interface | interface BundleActiveInfoResponse                           | Deprecated and changed to **usageStatistics.BundleStatsMap**.                  |
142| bundleState.BundleActiveState             | interface | interface BundleActiveState                                  | Deprecated and changed to **usageStatistics.BundleEvents**.                    |
143| bundleState.BundleActiveState             | field     | stateType?: number                                           | Deprecated and changed to **eventId**.                                         |
144| bundleState.BundleActiveState             | field     | stateOccurredTime?: number                                   | Deprecated and changed to **eventOccurredTime**.                               |
145| bundleState.BundleActiveState             | field     | nameOfClass?: string                                         | Deprecated and moved to **usageStatistics.BundleEvents**.                    |
146| bundleState.BundleActiveState             | field     | indexOfLink?: string                                         | Deprecated and moved to **usageStatistics.BundleEvents**.                    |
147| bundleState.BundleActiveState             | field     | bundleName?: string                                          | Deprecated and moved to **usageStatistics.BundleEvents**.                    |
148| bundleState.BundleActiveState             | field     | appUsagePriorityGroup?: number                               | Deprecated and changed to **appGroup**.                                        |
149| bundleState.BundleStateInfo               | interface | interface BundleStateInfo                                    | Deprecated and changed to **usageStatistics.BundleStatsInfo**.                 |
150| bundleState.BundleStateInfo               | method    | merge(toMerge: BundleStateInfo): void                        | Deprecated.                                                        |
151| bundleState.BundleStateInfo               | field     | infosEndTime?: number                                        | Deprecated and moved to **usageStatistics.BundleStatsInfo**.                 |
152| bundleState.BundleStateInfo               | field     | infosBeginTime?: number                                      | Deprecated and moved to **usageStatistics.BundleStatsInfo**.                 |
153| bundleState.BundleStateInfo               | field     | fgAbilityPrevAccessTime?: number                             | Deprecated and moved to **usageStatistics.BundleStatsInfo**.                 |
154| bundleState.BundleStateInfo               | field     | fgAbilityAccessTotalTime?: number                            | Deprecated and moved to **usageStatistics.BundleStatsInfo**.                 |
155| bundleState.BundleStateInfo               | field     | bundleName?: string                                          | Deprecated and moved to **usageStatistics.BundleStatsInfo**.                 |
156| bundleState.BundleStateInfo               | field     | abilitySeenTotalTime?: number                                | Deprecated and moved to **usageStatistics.BundleStatsInfo**.                 |
157| bundleState.BundleStateInfo               | field     | abilityPrevSeenTime?: number                                 | Deprecated and moved to **usageStatistics.BundleStatsInfo**.                 |
158| bundleState.BundleStateInfo               | field     | abilityPrevAccessTime?: number                               | Deprecated and moved to **usageStatistics.BundleStatsInfo**.                 |
159| bundleState.BundleStateInfo               | field     | abilityInFgTotalTime?: number                                | Deprecated and moved to **usageStatistics.BundleStatsInfo**.                 |
160| bundleState.BundleStateInfo               | field     | id: number                                                   | Deprecated and moved to **usageStatistics.BundleStatsInfo**.                 |
161| bundleState                               | namespace | declare namespace bundleState                                | Deprecated and changed to **usageStatistics**, and moved to **ohos.resourceschedule.usageStatistics.d.ts**.|
162
163
164**Adaptation Guide**
165
166Import the **usageStatistics** module.
167```
168import bundle form '@ohos.resourceschedule.usageStatistics'
169```
170Exception handling also needs to be adapted. For details, see the [usageStatistics API reference](../../../application-dev/reference/apis/js-apis-resourceschedule-deviceUsageStatistics.md).
171
172
173## c3.resourceschedule.workScheduler
174Rectified original APIs of **workScheduler** of the resource scheduler subsystem. The original APIs in API version 9 are changed to new APIs in API version 9. The new APIs in API version 9 comply with the error code specifications.
175
176**Change Impact**
177
178The application developed based on the SDK versions of OpenHarmony 3.2.8.2 and later needs to adapt the modules and APIs in API version 9 and their methods for returning API error information. Otherwise, the original service logic will be affected.
179
180**Key API/Component Changes**
181
182The following methods, attributes, enums, and constants are changed in API version 9 and later versions. The **@ohos.workScheduler.d.ts** file is deprecated and related APIs are moved to the newly added **@ohos.resourceschedule.workScheduler.d.ts** file.
183
184| Class| API Type| Declaration| Change Type|
185|  -- | -- | -- | -- |
186| workScheduler | namespace | declare namespace workScheduler | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
187| workScheduler.WorkInfo | interface | export interface WorkInfo | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
188| workScheduler.WorkInfo | field | parameters?: {[key: string]: any} | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
189| workScheduler.WorkInfo | field | idleWaitTime?: number | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
190| workScheduler.WorkInfo | field | isDeepIdle?: boolean | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
191| workScheduler.WorkInfo | field | repeatCount?: number | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
192| workScheduler.WorkInfo | field | isRepeat?: boolean | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
193| workScheduler.WorkInfo | field | repeatCycleTime?: number | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
194| workScheduler.WorkInfo | field | storageRequest?: StorageRequest | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
195| workScheduler.WorkInfo | field | batteryStatus?: BatteryStatus | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
196| workScheduler.WorkInfo | field | batteryLevel?: number | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
197| workScheduler.WorkInfo | field | chargerType?: ChargingType | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
198| workScheduler.WorkInfo | field | isCharging?: boolean | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
199| workScheduler.WorkInfo | field | networkType?: NetworkType | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
200| workScheduler.WorkInfo | field | isPersisted?: boolean | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
201| workScheduler.WorkInfo | field | abilityName: string | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
202| workScheduler.WorkInfo | field | bundleName: string | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
203| workScheduler.WorkInfo | field | workId: number | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
204| workScheduler | method | function isLastWorkTimeOut(workId: number): Promise; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
205| workScheduler | method | function isLastWorkTimeOut(workId: number, callback: AsyncCallback<void>): boolean; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
206| workScheduler | method | function stopAndClearWorks(): boolean; | Changed in API version 8 to **function stopAndClearWorks(): boolean;** and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
207| workScheduler | method | function obtainAllWorks(): Promise<Array<WorkInfo>>; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
208| workScheduler | method | function obtainAllWorks(callback: AsyncCallback<void>): Array<WorkInfo>; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
209| workScheduler | method | function getWorkStatus(workId: number): Promise<WorkInfo>; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
210| workScheduler | method | function getWorkStatus(workId: number, callback: AsyncCallback<WorkInfo>): void; | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
211| 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.|
212| 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.|
213| workScheduler.NetworkType | enum | export enum NetworkType | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
214| workScheduler.NetworkType | enum | NETWORK_TYPE_ANY = 0 | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
215| workScheduler.NetworkType | enum | NETWORK_TYPE_MOBILE | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
216| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
217| workScheduler.NetworkType | enum | NETWORK_TYPE_BLUETOOTH | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
218| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI_P2P | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
219| workScheduler.NetworkType | enum | NETWORK_TYPE_ETHERNET | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
220| workScheduler.ChargingType | enum | export enum ChargingType | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
221| workScheduler.ChargingType | enum | CHARGING_PLUGGED_ANY = 0 | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
222| workScheduler.ChargingType | enum | CHARGING_PLUGGED_AC | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
223| workScheduler.ChargingType | enum | CHARGING_PLUGGED_USB | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
224| workScheduler.ChargingType | enum | CHARGING_PLUGGED_WIRELESS | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
225| workScheduler.BatteryStatus | enum | export enum BatteryStatus | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
226| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW = 0 | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
227| workScheduler.BatteryStatus | enum | BATTERY_STATUS_OKAY | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
228| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW_OR_OKAY | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
229| workScheduler.StorageRequest | enum | export enum StorageRequest | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
230| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW = 0 | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
231| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_OKAY | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
232| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW_OR_OKAY | Changed in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.|
233
234
235**Adaptation Guide**
236
237Import the **workScheduler** module.
238```
239import bundle form '@ohos.resourceschedule.workScheduler'
240```
241Exception handling also needs to be adapted. For details, see the [workScheduler API reference](../../../application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md).
242
243
244## c4.resourceschedule.reminderAgent
245Rectified original APIs of **reminderAgent** of the resource scheduler subsystem. All APIs in API version 8 and earlier versions are deprecated, and original APIs in API version 9 are deleted. New APIs in API version 9 need to be used. The new APIs in API version 9 comply with the error code specifications.
246
247**Change Impact**
248
249The application developed based on the SDK versions of OpenHarmony 3.2.8.2 and later needs to adapt the modules and APIs in API version 9 and their methods for returning API error information. Otherwise, the original service logic will be affected.
250
251**Key API/Component Changes**
252
253The following methods, attributes, enums, and constants are changed in API version 9 and later versions. The **@ohos.reminderAgent.d.ts** file is deprecated, the **@ohos.reminderAgentManager.d.ts** file is added, and the class name is changed from **reminderAgent** to **reminderAgentManager**.
254
255| Class               | API Type       | Method/Attribute/Enum/Constant                                         | Change Type                                                    |
256| --------------------- | ----------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
257| reminderAgent | method | publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback<number>): void; | Deprecated and moved to **reminderAgentManager**.|
258| reminderAgent | method | publishReminder(reminderReq: ReminderRequest): Promise<number>;  | Deprecated and moved to **reminderAgentManager**.|
259| reminderAgent | method | cancelReminder(reminderId: number, callback: AsyncCallback<void>): void; | Deprecated and moved to **reminderAgentManager**.|
260| reminderAgent | method | cancelReminder(reminderId: number): Promise<void>; | Deprecated and moved to **reminderAgentManager**.|
261| reminderAgent | method | getValidReminders(callback: AsyncCallback<Array<ReminderRequest>>): void; | Deprecated and moved to **reminderAgentManager**.|
262| reminderAgent | method | getValidReminders(): Promise<Array<ReminderRequest>>; | Deprecated and moved to **reminderAgentManager**.|
263| reminderAgent | method | cancelAllReminders(callback: AsyncCallback<void>): void; | Deprecated and moved to **reminderAgentManager**.|
264| reminderAgent | method | cancelAllReminders(): Promise<void>; |  Deprecated and moved to **reminderAgentManager**.|
265| reminderAgent | method | addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback<void>): void; | Deprecated and moved to **reminderAgentManager**.|
266| reminderAgent | method | addNotificationSlot(slot: NotificationSlot): Promise<void>; | Deprecated and moved to **reminderAgentManager**.|
267| reminderAgent | method | removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback<void>): void; | Deprecated and moved to **reminderAgentManager**.|
268| reminderAgent | method | removeNotificationSlot(slotType: notification.SlotType): Promise<void>; | Deprecated and moved to **reminderAgentManager**.|
269| reminderAgent.ActionButtonType | enum | ACTION_BUTTON_TYPE_CLOSE | Deprecated and moved to **reminderAgentManager.ActionButtonType**.|
270| reminderAgent.ActionButtonType | enum | ACTION_BUTTON_TYPE_SNOOZE |  Deprecated and moved to **reminderAgentManager.ActionButtonType**.|
271| reminderAgent.ReminderType | enum | REMINDER_TYPE_TIMER | Deprecated and moved to **reminderAgentManager.ReminderType**.|
272| reminderAgent.ReminderType | enum | REMINDER_TYPE_CALENDAR | Deprecated and moved to **reminderAgentManager.ReminderType**.|
273| reminderAgent.ReminderType | enum | REMINDER_TYPE_CALENDAR | Deprecated and moved to **reminderAgentManager.ReminderType**.|
274| reminderAgent.ActionButton | field | title:string | Deprecated and moved to **reminderAgentManager.ActionButton**.|
275| reminderAgent.ActionButton | field | type:ActionButtonType | Deprecated and moved to **reminderAgentManager.ActionButton**.|
276| reminderAgent.WantAgent | field | pkgName:string | Deprecated and moved to **reminderAgentManager.WantAgent**.|
277| reminderAgent.WantAgent | field | abilityName:string | Deprecated and moved to **reminderAgentManager.WantAgent**.|
278| reminderAgent.MaxScreenWantAgent | field | pkgName:string | Deprecated and moved to **reminderAgentManager.MaxScreenWantAgent**.|
279| reminderAgent.MaxScreenWantAgent | field | abilityName:string | Deprecated and moved to **reminderAgentManager.MaxScreenWantAgent**.|
280| reminderAgent.ReminderRequest | field | reminderType:ReminderType | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
281| reminderAgent.ReminderRequest | field | actionButton?:ActionButton | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
282| reminderAgent.ReminderRequest | field | wantAgent?:WantAgent | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
283| reminderAgent.ReminderRequest | field | maxScreenWantAgent?:MaxScreenWantAgent | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
284| reminderAgent.ReminderRequest | field | ringDuration?:number | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
285| reminderAgent.ReminderRequest | field | snoozeTimes?:number | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
286| reminderAgent.ReminderRequest | field | timeInterval?:number | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
287| reminderAgent.ReminderRequest | field | title?:string | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
288| reminderAgent.ReminderRequest | field | content?:string | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
289| reminderAgent.ReminderRequest | field | expiredContent?:string | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
290| reminderAgent.ReminderRequest | field | snoozeContent?:string | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
291| reminderAgent.ReminderRequest | field | notificationId?:number | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
292| reminderAgent.ReminderRequest | field | slotType?:	notification.SlotType | Deprecated and moved to **reminderAgentManager.ReminderRequest**.|
293| reminderAgent.ReminderRequestCalendar | field | dateTime:LocalDateTime | Deprecated and moved to **reminderAgentManager.ReminderRequestCalendar**.|
294| reminderAgent.ReminderRequestCalendar | field | repeatMonths?:Array<number> | Deprecated and moved to **reminderAgentManager.ReminderRequestCalendar**.|
295| reminderAgent.ReminderRequestCalendar | field | repeatDays?:Array<number> | Deprecated and moved to **reminderAgentManager.ReminderRequestCalendar**.|
296| reminderAgent.ReminderRequestAlarm | field | hour:number | Deprecated and moved to **reminderAgentManager.ReminderRequestAlarm**.|
297| reminderAgent.ReminderRequestAlarm | field | minute:number | Deprecated and moved to **reminderAgentManager.ReminderRequestAlarm**.|
298| reminderAgent.ReminderRequestAlarm | field | daysOfWeek?:Array<number> | Deprecated and moved to **reminderAgentManager.ReminderRequestAlarm**.|
299| reminderAgent.ReminderRequestTimer | field | triggerTimeInSeconds:number | Deprecated and moved to **reminderAgentManager.ReminderRequestTimer**.|
300| reminderAgent.LocalDateTime | field | year:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.|
301| reminderAgent.LocalDateTime | field | month:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.|
302| reminderAgent.LocalDateTime | field | day:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.|
303| reminderAgent.LocalDateTime | field | hour:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.|
304| reminderAgent.LocalDateTime | field | minute:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.|
305| reminderAgent.LocalDateTime | field | second?:number | Deprecated and moved to **reminderAgentManager.LocalDateTime**.|
306
307
308**Adaptation Guide**
309
310Import the **reminderAgentManager** module.
311```
312import bundle form '@ohos.reminderAgentManager'
313```
314Exception handling also needs to be adapted. For details, see the [reminderAgentManager API reference](../../../application-dev/reference/apis/js-apis-reminderAgentManager.md).
315