diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md index 67da7a63bdbf7cf3936ddd156c8d95e66d1f95c4..5b7484b36c57d4423f5bc74761cf8a8ddd58617d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md +++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md @@ -16,7 +16,7 @@ import WantAgent from '@ohos.app.ability.wantAgent'; getWantAgent(info: WantAgentInfo, callback: AsyncCallback\): void -创建WantAgent(callback形式)。 +创建WantAgent(callback形式)。 创建失败返回的WantAgent为空值。 **系统能力**:SystemCapability.Ability.AbilityRuntime.Core @@ -108,7 +108,7 @@ try { getWantAgent(info: WantAgentInfo): Promise\ -创建WantAgent(Promise形式)。 +创建WantAgent(Promise形式)。 创建失败返回的WantAgent为空值。 **系统能力**:SystemCapability.Ability.AbilityRuntime.Core diff --git a/zh-cn/application-dev/reference/apis/js-apis-notificationManager.md b/zh-cn/application-dev/reference/apis/js-apis-notificationManager.md index 8765e590c1ef0bf111873299455f65a3ee4342a0..804b78251304dccae0f08e9d9a88565b65ac794e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-notificationManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-notificationManager.md @@ -2486,9 +2486,9 @@ notificationManager.getDoNotDisturbDate(userId).then((data) => { ``` -## notificationManager.supportDoNotDisturbMode +## notificationManager.isSupportDoNotDisturbMode -supportDoNotDisturbMode(callback: AsyncCallback\): void + isSupportDoNotDisturbMode(callback: AsyncCallback\): void 查询是否支持免打扰功能(Callback形式)。 @@ -2515,20 +2515,20 @@ supportDoNotDisturbMode(callback: AsyncCallback\): void **示例:** ```ts -function supportDoNotDisturbModeCallback(err,data) { +function isSupportDoNotDisturbModeCallback(err,data) { if (err) { - console.error(`supportDoNotDisturbMode failed, code is ${err.code}, message is ${err.message}`); + console.error(`isSupportDoNotDisturbMode failed, code is ${err.code}, message is ${err.message}`); } else { - console.info("supportDoNotDisturbMode success"); + console.info("isSupportDoNotDisturbMode success"); } } -notificationManager.supportDoNotDisturbMode(supportDoNotDisturbModeCallback); +notificationManager.isSupportDoNotDisturbMode(isSupportDoNotDisturbModeCallback); ``` -## notificationManager.supportDoNotDisturbMode +## notificationManager.isSupportDoNotDisturbMode -supportDoNotDisturbMode(): Promise\ +isSupportDoNotDisturbMode(): Promise\ 查询是否支持勿扰模式功能(Promise形式)。 @@ -2557,7 +2557,7 @@ supportDoNotDisturbMode(): Promise\ **示例:** ```ts -notificationManager.supportDoNotDisturbMode().then((data) => { +notificationManager.isSupportDoNotDisturbMode().then((data) => { console.info("supportDoNotDisturbMode success, data: " + JSON.stringify(data)); }); ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-wantAgent.md b/zh-cn/application-dev/reference/apis/js-apis-wantAgent.md index 0784a5c5db881acacc773738a049ad035f86c1d1..318a37a9735cabd2ad566542c7783eec2dfeb621 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-wantAgent.md +++ b/zh-cn/application-dev/reference/apis/js-apis-wantAgent.md @@ -16,7 +16,7 @@ import WantAgent from '@ohos.wantAgent'; getWantAgent(info: WantAgentInfo, callback: AsyncCallback\): void -创建WantAgent(callback形式)。 +创建WantAgent(callback形式)。 创建失败返回的WantAgent为空值。 **系统能力**:SystemCapability.Ability.AbilityRuntime.Core @@ -75,7 +75,7 @@ WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback); getWantAgent(info: WantAgentInfo): Promise\ -创建WantAgent(Promise形式)。 +创建WantAgent(Promise形式)。 创建失败返回的WantAgent为空值。 **系统能力**:SystemCapability.Ability.AbilityRuntime.Core diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-ans.md b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-ans.md new file mode 100644 index 0000000000000000000000000000000000000000..4053bb4f9bab409b673f1f8675382c0fd1710f7b --- /dev/null +++ b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.3/changelogs-ans.md @@ -0,0 +1,21 @@ +# ANS通知子系统ChangeLog + +## cl.notificationManager.1 接口名变更 + +基于此前接口名定义不够规范,与其他功能类型的接口命名不一致,对此接口名进行变更。 + +**变更影响** + +底层仍支持原接口功能,不影响4.0.2.3版本调用该接口的应用。 + +**关键接口/组件变更** + +| 包名 | 旧接口 | 新接口 | +| --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| ohos.notificationManager.d.ts | **function** supportDoNotDisturbMode(callback: AsyncCallback): **void**; | **function** isSupportDoNotDisturbMode(callback: AsyncCallback): **void**; | +| ohos.notificationManager.d.ts | **function** supportDoNotDisturbMode(): Promise; | **function** isSupportDoNotDisturbMode(): Promise; | + +**适配指导** + +按新的接口isSupportDoNotDisturbMode调用。 +