• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# 资源调度子系统JS API变更
2
3OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,资源调度子系统的API变更如下:
4
5## 接口变更
6
7| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
8|---|---|---|---|
9| ohos.reminderAgent | LocalDateTime | second?: number; | 新增 |
10| ohos.reminderAgent | LocalDateTime | minute: number; | 新增 |
11| ohos.reminderAgent | LocalDateTime | hour: number; | 新增 |
12| ohos.reminderAgent | LocalDateTime | day: number; | 新增 |
13| ohos.reminderAgent | LocalDateTime | month: number; | 新增 |
14| ohos.reminderAgent | LocalDateTime | year: number; | 新增 |
15| ohos.reminderAgent | ReminderRequestTimer | triggerTimeInSeconds: number; | 新增 |
16| ohos.reminderAgent | ReminderRequestAlarm | daysOfWeek?: Array\<number>; | 新增 |
17| ohos.reminderAgent | ReminderRequestAlarm | minute: number; | 新增 |
18| ohos.reminderAgent | ReminderRequestAlarm | hour: number; | 新增 |
19| ohos.reminderAgent | ReminderRequestCalendar | repeatDays?: Array\<number>; | 新增 |
20| ohos.reminderAgent | ReminderRequestCalendar | repeatMonths?: Array\<number>; | 新增 |
21| ohos.reminderAgent | ReminderRequestCalendar | dateTime: LocalDateTime; | 新增 |
22| ohos.reminderAgent | ReminderRequest | slotType?: notification.SlotType; | 新增 |
23| ohos.reminderAgent | ReminderRequest | notificationId?: number; | 新增 |
24| ohos.reminderAgent | ReminderRequest | snoozeContent?: string; | 新增 |
25| ohos.reminderAgent | ReminderRequest | expiredContent?: string; | 新增 |
26| ohos.reminderAgent | ReminderRequest | content?: string; | 新增 |
27| ohos.reminderAgent | ReminderRequest | title?: string; | 新增 |
28| ohos.reminderAgent | ReminderRequest | timeInterval?: number; | 新增 |
29| ohos.reminderAgent | ReminderRequest | snoozeTimes?: number; | 新增 |
30| ohos.reminderAgent | ReminderRequest | ringDuration?: number; | 新增 |
31| ohos.reminderAgent | ReminderRequest | maxScreenWantAgent?: MaxScreenWantAgent; | 新增 |
32| ohos.reminderAgent | ReminderRequest | wantAgent?: WantAgent; | 新增 |
33| ohos.reminderAgent | ReminderRequest | actionButton?: [ActionButton?, ActionButton?]; | 新增 |
34| ohos.reminderAgent | ReminderRequest | reminderType: ReminderType; | 新增 |
35| ohos.reminderAgent | MaxScreenWantAgent | abilityName: string; | 新增 |
36| ohos.reminderAgent | MaxScreenWantAgent | pkgName: string; | 新增 |
37| ohos.reminderAgent | WantAgent | abilityName: string; | 新增 |
38| ohos.reminderAgent | WantAgent | pkgName: string; | 新增 |
39| ohos.reminderAgent | ActionButton | type: ActionButtonType; | 新增 |
40| ohos.reminderAgent | ActionButton | title: string; | 新增 |
41| ohos.reminderAgent | ReminderType | REMINDER_TYPE_ALARM = 2 | 新增 |
42| ohos.reminderAgent | ReminderType | REMINDER_TYPE_CALENDAR = 1 | 新增 |
43| ohos.reminderAgent | ReminderType | REMINDER_TYPE_TIMER = 0 | 新增 |
44| ohos.reminderAgent | ActionButtonType | ACTION_BUTTON_TYPE_SNOOZE = 1 | 新增 |
45| ohos.reminderAgent | ActionButtonType | ACTION_BUTTON_TYPE_CLOSE = 0 | 新增 |
46| ohos.reminderAgent | reminderAgent | removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback\<void>): void;<br>removeNotificationSlot(slotType: notification.SlotType): Promise\<void>; | 新增 |
47| ohos.reminderAgent | reminderAgent | addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback\<void>): void;<br>addNotificationSlot(slot: NotificationSlot): Promise\<void>; | 新增 |
48| ohos.reminderAgent | reminderAgent | cancelAllReminders(callback: AsyncCallback\<void>): void;<br>cancelAllReminders(): Promise\<void>; | 新增 |
49| ohos.reminderAgent | reminderAgent | getValidReminders(callback: AsyncCallback\<Array\<ReminderRequest>>): void;<br>getValidReminders(): Promise\<Array\<ReminderRequest>>; | 新增 |
50| ohos.reminderAgent | reminderAgent | cancelReminder(reminderId: number, callback: AsyncCallback\<void>): void;<br>cancelReminder(reminderId: number): Promise\<void>; | 新增 |
51| ohos.reminderAgent | reminderAgent | publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback\<number>): void;<br>publishReminder(reminderReq: ReminderRequest): Promise\<number>; | 新增 |
52| ohos.bundleState | bundleState | queryCurrentBundleActiveStates(begin: number, end: number, callback: AsyncCallback\<Array\<BundleActiveState>>): void;<br>queryCurrentBundleActiveStates(begin: number, end: number): Promise\<Array\<BundleActiveState>>; | 新增 |
53| ohos.bundleState | IntervalType | BY_ANNUALLY = 4 | 新增 |
54| ohos.bundleState | IntervalType | BY_MONTHLY = 3 | 新增 |
55| ohos.bundleState | IntervalType | BY_WEEKLY = 2 | 新增 |
56| ohos.bundleState | IntervalType | BY_DAILY = 1 | 新增 |
57| ohos.bundleState | IntervalType | BY_OPTIMIZED = 0 | 新增 |
58| ohos.bundleState | BundleActiveInfoResponse | [key: string]: BundleStateInfo; | 新增 |
59| ohos.bundleState | bundleState | queryAppUsagePriorityGroup(callback: AsyncCallback\<number>): void;<br>queryAppUsagePriorityGroup(): Promise\<number>; | 新增 |
60| ohos.bundleState | bundleState | isIdleState(bundleName: string, callback: AsyncCallback\<boolean>): void;<br>isIdleState(bundleName: string): Promise\<boolean>; | 新增 |
61| ohos.bundleState | BundleActiveState | stateType?: number; | 新增 |
62| ohos.bundleState | BundleActiveState | stateOccurredTime?: number; | 新增 |
63| ohos.bundleState | BundleActiveState | nameOfClass?: string; | 新增 |
64| ohos.bundleState | BundleActiveState | indexOfLink?: string; | 新增 |
65| ohos.bundleState | BundleActiveState | bundleName?: string; | 新增 |
66| ohos.bundleState | BundleActiveState | appUsagePriorityGroup?: number; | 新增 |
67| ohos.bundleState | BundleStateInfo | merge(toMerge: BundleStateInfo): void; | 新增 |
68| ohos.bundleState | BundleStateInfo | infosEndTime?: number; | 新增 |
69| ohos.bundleState | BundleStateInfo | infosBeginTime?: number; | 新增 |
70| ohos.bundleState | BundleStateInfo | fgAbilityPrevAccessTime?: number; | 新增 |
71| ohos.bundleState | BundleStateInfo | fgAbilityAccessTotalTime?: number; | 新增 |
72| ohos.bundleState | BundleStateInfo | bundleName?: string; | 新增 |
73| ohos.bundleState | BundleStateInfo | abilitySeenTotalTime?: number; | 新增 |
74| ohos.bundleState | BundleStateInfo | abilityPrevSeenTime?: number; | 新增 |
75| ohos.bundleState | BundleStateInfo | abilityPrevAccessTime?: number; | 新增 |
76| ohos.bundleState | BundleStateInfo | abilityInFgTotalTime?: number; | 新增 |
77| ohos.bundleState | BundleStateInfo | id: number; | 新增 |
78| ohos.backgroundTaskManager | BackgroundMode | TASK_KEEPING = 9 | 新增 |
79| ohos.backgroundTaskManager | BackgroundMode | MULTI_DEVICE_CONNECTION = 6 | 新增 |
80| ohos.backgroundTaskManager | BackgroundMode | BLUETOOTH_INTERACTION = 5 | 新增 |
81| ohos.backgroundTaskManager | BackgroundMode | LOCATION = 4 | 新增 |
82| ohos.backgroundTaskManager | BackgroundMode | AUDIO_RECORDING = 3 | 新增 |
83| ohos.backgroundTaskManager | BackgroundMode | AUDIO_PLAYBACK = 2 | 新增 |
84| ohos.backgroundTaskManager | BackgroundMode | DATA_TRANSFER = 1 | 新增 |
85| ohos.backgroundTaskManager | backgroundTaskManager | stopBackgroundRunning(context: Context, callback: AsyncCallback\<void>): void;<br>stopBackgroundRunning(context: Context): Promise\<void>; | 新增 |
86| ohos.backgroundTaskManager | backgroundTaskManager | startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent, callback: AsyncCallback\<void>): void;<br>startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent): Promise\<void>; | 新增 |
87| ohos.backgroundTaskManager | backgroundTaskManager | requestSuspendDelay(reason: string, callback: Callback\<void>): DelaySuspendInfo; | 新增 |
88| ohos.backgroundTaskManager | backgroundTaskManager | getRemainingDelayTime(requestId: number, callback: AsyncCallback\<number>): void;<br>getRemainingDelayTime(requestId: number): Promise\<number>; | 新增 |
89| ohos.backgroundTaskManager | backgroundTaskManager | cancelSuspendDelay(requestId: number): void; | 新增 |
90| ohos.backgroundTaskManager | DelaySuspendInfo | actualDelayTime: number; | 新增 |
91| ohos.backgroundTaskManager | DelaySuspendInfo | requestId: number; | 新增 |
92