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 cf1636ce99912c031e86fdfb0b9e627f9f069388..4a2f27fd332094ca87dd01ae1a2c3205d74cb30a 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 50072a29d3d45636495c043a45be97da0484ee6d..a5cde0387b54b1efb6971bcfd49ab8d6446e0a2a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-notificationManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-notificationManager.md @@ -2301,9 +2301,9 @@ notificationManager.getDoNotDisturbDate(userId).then((data) => { ``` -## notificationManager.supportDoNotDisturbMode +## notificationManager.isSupportDoNotDisturbMode -supportDoNotDisturbMode(callback: AsyncCallback\): void + isSupportDoNotDisturbMode(callback: AsyncCallback\): void 查询是否支持免打扰功能(Callback形式)。 @@ -2330,20 +2330,20 @@ supportDoNotDisturbMode(callback: AsyncCallback\): void **示例:** ```ts -function supportDoNotDisturbModeCallback(err,data) { +function isSupportDoNotDisturbModeCallback(err,data) { if (err) { - console.info("supportDoNotDisturbMode failed " + JSON.stringify(err)); + console.info("isSupportDoNotDisturbMode failed " + JSON.stringify(err)); } else { - console.info("supportDoNotDisturbMode success"); + console.info("isSupportDoNotDisturbMode success"); } } -notificationManager.supportDoNotDisturbMode(supportDoNotDisturbModeCallback); +notificationManager.isSupportDoNotDisturbMode(isSupportDoNotDisturbModeCallback); ``` -## notificationManager.supportDoNotDisturbMode +## notificationManager.isSupportDoNotDisturbMode -supportDoNotDisturbMode(): Promise\ +isSupportDoNotDisturbMode(): Promise\ 查询是否支持勿扰模式功能(Promise形式)。 @@ -2370,7 +2370,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 bf2fe339f78f70f38c7159f457981ebbeaf56e8e..9cee8383f07be7834597d89146007920f65bdcc3 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调用。 +