未验证 提交 ee1777e9 编写于 作者: O openharmony_ci 提交者: Gitee

!19814 一致性修改

Merge pull request !19814 from ningning/master
......@@ -230,7 +230,6 @@
- [@ohos.distributedMissionManager (分布式任务管理)](js-apis-distributedMissionManager.md)
- [@ohos.reminderAgentManager (后台代理提醒)](js-apis-reminderAgentManager.md)
- [@ohos.resourceschedule.backgroundTaskManager (后台任务管理)](js-apis-resourceschedule-backgroundTaskManager.md)
- [@ohos.resourceschedule.deviceStandby(设备待机模块)](js-apis-resourceschedule-deviceStandby.md)
- [@ohos.resourceschedule.workScheduler (延迟任务调度)](js-apis-resourceschedule-workScheduler.md)
- [@ohos.resourceschedule.usageStatistics (设备使用信息统计)](js-apis-resourceschedule-deviceUsageStatistics.md)
- [@ohos.WorkSchedulerExtensionAbility (延迟任务调度回调)](js-apis-WorkSchedulerExtensionAbility.md)
......@@ -369,6 +368,7 @@
- [@ohos.multimodalInput.shortKey(快捷键)](js-apis-shortKey.md)
- [@ohos.power (系统电源管理)](js-apis-power.md)
- [@ohos.runningLock (Runninglock锁)](js-apis-runninglock.md)
- [@ohos.resourceschedule.deviceStandby(设备待机模块)](js-apis-resourceschedule-deviceStandby.md)
- [@ohos.sensor (传感器)](js-apis-sensor.md)
- [@ohos.settings (设置数据项名称)](js-apis-settings.md)
- [@ohos.stationary (设备状态感知框架)](js-apis-stationary.md)
......
......@@ -33,23 +33,23 @@ getAttestStatus(callback: AsyncCallback<AttestResultInfo>) : void
| 错误码ID | 错误信息 |
|----------|----------------------|
| 20000001 | system service exception |
| 20000001 | system service exception. |
**示例:**
```js
try {
deviceAttest.getAttestStatus((error, result) => {
if (typeof err === 'undefined') {
console.info("error code:" + error.code + " message:" + error.message);
} else {
console.info("auth:" + result.authResult + " software:" + result.softwareResult + " ticket:" + result.ticket);
console.info("versionIdResult:" + result.softwareResultDetail[0],
" patchlevelResult:" + result.softwareResultDetail[1],
" roothashResult:" + result.softwareResultDetail[2],
" PCIDResult:" + result.softwareResultDetail[3],
" reserver:" + result.softwareResultDetail[4]);
}
deviceAttest.getAttestStatus((error, value) => {
if (typeof error != 'undefined') {
console.info("error code:" + error.code + " message:" + error.message);
} else {
console.info("auth:" + value.authResult + " software:" + value.softwareResult + " ticket:" + value.ticket);
console.info("versionIdResult:" + value.softwareResultDetail[0],
" patchlevelResult:" + value.softwareResultDetail[1],
" roothashResult:" + value.softwareResultDetail[2],
" PCIDResult:" + value.softwareResultDetail[3],
" reserver:" + value.softwareResultDetail[4]);
}
})
} catch (error) {
console.info("error code:" + error.code + " message:" + error.message);
......@@ -74,21 +74,21 @@ getAttestStatus() : Promise<AttestResultInfo>
| 错误码ID | 错误信息 |
|----------|----------------------|
| 20000001 | system service exception |
| 20000001 | system service exception. |
**示例:**
```js
try {
deviceAttest.getAttestStatus().then((value) => {
console.info("auth:" + result.authResult + " software:" + result.softwareResult + " ticket:" + result.ticket);
console.info("versionIdResult:" + result.softwareResultDetail[0],
" patchlevelResult:" + result.softwareResultDetail[1],
" roothashResult:" + result.softwareResultDetail[2],
" PCIDResult:" + result.softwareResultDetail[3],
" reserver:" + result.softwareResultDetail[4]);
console.info("auth:" + value.authResult + " software:" + value.softwareResult + " ticket:" + value.ticket);
console.info("versionIdResult:" + value.softwareResultDetail[0],
" patchlevelResult:" + value.softwareResultDetail[1],
" roothashResult:" + value.softwareResultDetail[2],
" PCIDResult:" + value.softwareResultDetail[3],
" reserver:" + value.softwareResultDetail[4]);
}).catch((error) => {
console.info("error code:" + error.code + " message:" + error.message);
console.info("error code:" + error.code + " message:" + error.message);
});
} catch (error) {
console.info("error code:" + error.code + " message:" + error.message);
......@@ -113,19 +113,19 @@ getAttestStatusSync() : AttestResultInfo
| 错误码ID | 错误信息 |
|----------|----------------------|
| 20000001 | system service exception |
| 20000001 | system service exception. |
**示例:**
```js
try {
let attestResultInfo = deviceAttest.getAttestStatusSync();
console.info("auth:" + result.authResult + " software:" + result.softwareResult + " ticket:" + result.ticket);
console.info("versionIdResult:" + result.softwareResultDetail[0],
" patchlevelResult:" + result.softwareResultDetail[1],
" roothashResult:" + result.softwareResultDetail[2],
" PCIDResult:" + result.softwareResultDetail[3],
" reserver:" + result.softwareResultDetail[4]);
let value = deviceAttest.getAttestStatusSync();
console.info("auth:" + value.authResult + " software:" + value.softwareResult + " ticket:" + value.ticket);
console.info("versionIdResult:" + value.softwareResultDetail[0],
" patchlevelResult:" + value.softwareResultDetail[1],
" roothashResult:" + value.softwareResultDetail[2],
" PCIDResult:" + value.softwareResultDetail[3],
" reserver:" + value.softwareResultDetail[4]);
} catch (error) {
console.info("error code:" + error.code + " message:" + error.message);
}
......
......@@ -1059,7 +1059,7 @@ constructor(country: string, options?: PhoneNumberFormatOptions)
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------- |
| country | string | 是 | 表示电话号码所属国家或地区代码。 |
| options | [PhoneNumberFormatOptions](#phonenumberformatoptions9) | 否 | 电话号码格式化对象的相关选项。 |
| options | [PhoneNumberFormatOptions](#phonenumberformatoptions8) | 否 | 电话号码格式化对象的相关选项。 |
**示例:**
```js
......@@ -1149,7 +1149,7 @@ getLocationName(number: string, locale: string): string
```
## PhoneNumberFormatOptions<sup>9+</sup>
## PhoneNumberFormatOptions<sup>8+</sup>
表示电话号码格式化对象可设置的属性。
......@@ -1157,7 +1157,7 @@ getLocationName(number: string, locale: string): string
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ---- | ------ | ---- | ---- | ---------------------------------------- |
| type | string | 是 | 是 | 表示对电话号码格式化的类型,取值范围:"E164",&nbsp;"INTERNATIONAL",&nbsp;"NATIONAL",&nbsp;"RFC3966"。 |
| type | string | 是 | 是 | 表示对电话号码格式化的类型,取值范围:"E164",&nbsp;"INTERNATIONAL",&nbsp;"NATIONAL",&nbsp;"RFC3966"。<br>-在API version 8版本,type为必填项。 <br>-API version 9版本开始,type为选填项。|
## UnitInfo<sup>8+</sup>
......
......@@ -27,9 +27,9 @@ publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback\<number>):
> **说明:**
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[reminderAgentManager.publishReminder](js-apis-reminderAgentManager.md#reminderagentmanagerpublishreminder)替代。
**需要权限** ohos.permission.PUBLISH_AGENT_REMINDER
**需要权限**:ohos.permission.PUBLISH_AGENT_REMINDER
**系统能力** SystemCapability.Notification.ReminderAgent
**系统能力**:SystemCapability.Notification.ReminderAgent
**参数**
......@@ -361,14 +361,14 @@ reminderAgent.addNotificationSlot(mySlot).then(() => {
## reminderAgent.removeNotificationSlot<sup>(deprecated)</sup>
removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback<void>): void
removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback\<void>): void
删除目标NotificationSlot,使用callback方式实现异步调用。
> **说明:**
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#reminderagentmanagerremovenotificationslot)替代。
**系统能力** SystemCapability.Notification.ReminderAgent
**系统能力**:SystemCapability.Notification.ReminderAgent
**参数**
......@@ -390,14 +390,14 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION,
## reminderAgent.removeNotificationSlot<sup>(deprecated)</sup>
removeNotificationSlot(slotType: notification.SlotType): Promise<void>
removeNotificationSlot(slotType: notification.SlotType): Promise\<void>
删除目标NotificationSlot,使用Promise方式实现异步调用。
> **说明:**
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#reminderagentmanagerremovenotificationslot-1)替代。
**系统能力** SystemCapability.Notification.ReminderAgent
**系统能力**:SystemCapability.Notification.ReminderAgent
**参数**
......@@ -505,7 +505,7 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).
> **说明:**
> 从 API version 7开始支持,从API version 9开始废弃。建议使用[reminderAgentManager.ReminderRequest](js-apis-reminderAgentManager.md#ReminderRequest)替代。
**系统能力**`SystemCapability.Notification.ReminderAgent
**系统能力**SystemCapability.Notification.ReminderAgent
| 名称 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
......
......@@ -546,7 +546,7 @@ try {
| -------- | -------- | -------- |
| ACTION_BUTTON_TYPE_CLOSE | 0 | 表示关闭提醒的按钮。 |
| ACTION_BUTTON_TYPE_SNOOZE | 1 | 表示延迟提醒的按钮。 |
| ACTION_BUTTON_TYPE_CUSTOM<sup>10+</sup> | 2 | 表示自定义的按钮。<br>-**系统接口**: 系统接口,三方应用不支持调用。 |
| ACTION_BUTTON_TYPE_CUSTOM<sup>10+</sup> | 2 | 表示自定义的按钮。<br>**系统接口**: 系统接口,三方应用不支持调用。 |
## ReminderType
......@@ -573,7 +573,7 @@ try {
| -------- | -------- | -------- | -------- |
| title | string | 是 | 按钮显示的标题。 |
| type | [ActionButtonType](#actionbuttontype) | 是 | 按钮的类型。 |
| wantAgent<sup>10+</sup> | [WantAgent](#wantagent) | 否 | 点击按钮跳转的ability信息。<br>-**系统接口**: 系统接口,三方应用不支持调用。 |
| wantAgent<sup>10+</sup> | [WantAgent](#wantagent) | 否 | 点击按钮跳转的ability信息。<br>**系统接口**: 系统接口,三方应用不支持调用。 |
## WantAgent
......@@ -587,7 +587,7 @@ try {
| -------- | -------- | -------- | -------- |
| pkgName | string | 是 | 指明跳转的目标包名。 |
| abilityName | string | 是 | 指明跳转的目标ability名称。 |
| uri<sup>10+</sup> | string | 否 | 指明跳转目标的uri信息。<br>-**系统接口**: 系统接口,三方应用不支持调用。 |
| uri<sup>10+</sup> | string | 否 | 指明跳转目标的uri信息。<br>**系统接口**: 系统接口,三方应用不支持调用。 |
## MaxScreenWantAgent
......@@ -611,7 +611,7 @@ try {
| 名称 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| reminderType | [ReminderType](#remindertype) | 是 | 指明提醒类型。 |
| actionButton<sup>10+</sup> | [ActionButton](#actionbutton) | 否 | 弹出的提醒通知栏中显示的按钮(参数可选。普通应用:最多支持两个按钮,系统应用:API9最多支持两个按钮,API10及以后最多支持三个按钮。)。 |
| actionButton<sup></sup> | [ActionButton](#actionbutton) | 否 | 弹出的提醒通知栏中显示的按钮。<br>-普通应用:最多支持两个按钮。<br>-系统应用:API9最多支持两个按钮,在API10开始最多支持三个按钮。 |
| wantAgent | [WantAgent](#wantagent) | 否 | 点击通知后需要跳转的目标ability信息。 |
| maxScreenWantAgent | [MaxScreenWantAgent](#maxscreenwantagent) | 否 | 提醒到达时跳转的目标包。如果设备正在使用中,则弹出一个通知框。 |
| ringDuration | number | 否 | 指明响铃时长(单位:秒),默认1秒。 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册