js-apidiff-resource-scheduler.md 8.2 KB
Newer Older
Z
zengyawen 已提交
1
# 资源调度子系统JS API变更
R
RayShih 已提交
2

Z
zengyawen 已提交
3
OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,资源调度子系统的API变更如下:
R
RayShih 已提交
4 5 6

## 接口变更

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